Title: [133942] branches/safari-536.28-branch

Diff

Modified: branches/safari-536.28-branch/Source/WebKit2/ChangeLog (133941 => 133942)


--- branches/safari-536.28-branch/Source/WebKit2/ChangeLog	2012-11-08 21:39:56 UTC (rev 133941)
+++ branches/safari-536.28-branch/Source/WebKit2/ChangeLog	2012-11-08 21:48:05 UTC (rev 133942)
@@ -1,5 +1,37 @@
 2012-11-08  Lucas Forschler  <lforsch...@apple.com>
 
+        Merge r124649
+
+    2012-08-03  Brady Eidson  <beid...@apple.com>
+
+            Small part of "Out-of-process plug-ins should support asynchronous initialization."
+            <rdar://problem/10598594> and https://bugs.webkit.org/show_bug.cgi?id=92919
+
+            Reviewed by Anders Carlsson.
+
+            -Add API-level preferences for forcing asynchronous initialization of all plug-ins (for testing).
+            -Make sure "overridePreference" is hooked up properly for all needed preferences.
+
+            * UIProcess/API/C/WKPreferences.cpp:
+            (WKPreferencesSetAsynchronousPluginInitializationEnabledForAllPlugins):
+            (WKPreferencesGetAsynchronousPluginInitializationEnabledForAllPlugins):
+            * UIProcess/API/C/WKPreferencesPrivate.h:
+
+            * WebProcess/InjectedBundle/InjectedBundle.cpp:
+            (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
+
+            * WebProcess/WebPage/WebPage.cpp:
+            (WebKit::WebPage::WebPage):
+            (WebKit::WebPage::updatePreferences):
+            * WebProcess/WebPage/WebPage.h:
+            (WebKit::WebPage::setAsynchronousPluginInitializationEnabled):
+            (WebKit::WebPage::asynchronousPluginInitializationEnabledForAllPlugins):
+            (WebKit::WebPage::setAsynchronousPluginInitializationEnabledForAllPlugins):
+            (WebKit::WebPage::setArtificialPluginInitializationDelayEnabled):
+            (WebPage):
+
+2012-11-08  Lucas Forschler  <lforsch...@apple.com>
+
         Merge r124393
 
     2012-08-01  Brady Eidson  <beid...@apple.com>
@@ -47521,3 +47553,4 @@
 .
 .
 .
+.

Modified: branches/safari-536.28-branch/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (133941 => 133942)


--- branches/safari-536.28-branch/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp	2012-11-08 21:39:56 UTC (rev 133941)
+++ branches/safari-536.28-branch/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp	2012-11-08 21:48:05 UTC (rev 133942)
@@ -815,6 +815,16 @@
     return toImpl(preferencesRef)->asynchronousPluginInitializationEnabled();
 }
 
+void WKPreferencesSetAsynchronousPluginInitializationEnabledForAllPlugins(WKPreferencesRef preferencesRef, bool enabled)
+{
+    toImpl(preferencesRef)->setAsynchronousPluginInitializationEnabledForAllPlugins(enabled);
+}
+
+bool WKPreferencesGetAsynchronousPluginInitializationEnabledForAllPlugins(WKPreferencesRef preferencesRef)
+{
+    return toImpl(preferencesRef)->asynchronousPluginInitializationEnabledForAllPlugins();
+}
+
 void WKPreferencesSetArtificialPluginInitializationDelayEnabled(WKPreferencesRef preferencesRef, bool enabled)
 {
     toImpl(preferencesRef)->setArtificialPluginInitializationDelayEnabled(enabled);

Modified: branches/safari-536.28-branch/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h (133941 => 133942)


--- branches/safari-536.28-branch/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h	2012-11-08 21:39:56 UTC (rev 133941)
+++ branches/safari-536.28-branch/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h	2012-11-08 21:48:05 UTC (rev 133942)
@@ -188,6 +188,10 @@
 WK_EXPORT bool WKPreferencesGetAsynchronousPluginInitializationEnabled(WKPreferencesRef preferencesRef);
 
 // Defaults to false
+WK_EXPORT void WKPreferencesSetAsynchronousPluginInitializationEnabledForAllPlugins(WKPreferencesRef preferencesRef, bool enabled);
+WK_EXPORT bool WKPreferencesGetAsynchronousPluginInitializationEnabledForAllPlugins(WKPreferencesRef preferencesRef);
+
+// Defaults to false
 WK_EXPORT void WKPreferencesSetArtificialPluginInitializationDelayEnabled(WKPreferencesRef preferencesRef, bool enabled);
 WK_EXPORT bool WKPreferencesGetArtificialPluginInitializationDelayEnabled(WKPreferencesRef preferencesRef);
 

Modified: branches/safari-536.28-branch/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp (133941 => 133942)


--- branches/safari-536.28-branch/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp	2012-11-08 21:39:56 UTC (rev 133941)
+++ branches/safari-536.28-branch/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp	2012-11-08 21:48:05 UTC (rev 133942)
@@ -125,6 +125,30 @@
 
     // FIXME: Need an explicit way to set "WebKitTabToLinksPreferenceKey" directly in WebPage.
 
+    if (preference == "WebKit2AsynchronousPluginInitializationEnabled") {
+        WebPreferencesStore::overrideBoolValueForKey(WebPreferencesKey::asynchronousPluginInitializationEnabledKey(), enabled);
+        for (HashSet<Page*>::iterator i = pages.begin(); i != pages.end(); ++i) {
+            WebPage* webPage = static_cast<WebFrameLoaderClient*>((*i)->mainFrame()->loader()->client())->webFrame()->page();
+            webPage->setAsynchronousPluginInitializationEnabled(enabled);
+        }
+    }
+
+    if (preference == "WebKit2AsynchronousPluginInitializationEnabledForAllPlugins") {
+        WebPreferencesStore::overrideBoolValueForKey(WebPreferencesKey::asynchronousPluginInitializationEnabledForAllPluginsKey(), enabled);
+        for (HashSet<Page*>::iterator i = pages.begin(); i != pages.end(); ++i) {
+            WebPage* webPage = static_cast<WebFrameLoaderClient*>((*i)->mainFrame()->loader()->client())->webFrame()->page();
+            webPage->setAsynchronousPluginInitializationEnabledForAllPlugins(enabled);
+        }
+    }
+
+    if (preference == "WebKit2ArtificialPluginInitializationDelayEnabled") {
+        WebPreferencesStore::overrideBoolValueForKey(WebPreferencesKey::artificialPluginInitializationDelayEnabledKey(), enabled);
+        for (HashSet<Page*>::iterator i = pages.begin(); i != pages.end(); ++i) {
+            WebPage* webPage = static_cast<WebFrameLoaderClient*>((*i)->mainFrame()->loader()->client())->webFrame()->page();
+            webPage->setArtificialPluginInitializationDelayEnabled(enabled);
+        }
+    }
+
     // Map the names used in LayoutTests with the names used in WebCore::Settings and WebPreferencesStore.
 #define FOR_EACH_OVERRIDE_BOOL_PREFERENCE(macro) \
     macro(WebKitAcceleratedCompositingEnabled, AcceleratedCompositingEnabled, acceleratedCompositingEnabled) \

Modified: branches/safari-536.28-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (133941 => 133942)


--- branches/safari-536.28-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2012-11-08 21:39:56 UTC (rev 133941)
+++ branches/safari-536.28-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2012-11-08 21:48:05 UTC (rev 133942)
@@ -190,6 +190,7 @@
     , m_isClosed(false)
     , m_tabToLinks(false)
     , m_asynchronousPluginInitializationEnabled(false)
+    , m_asynchronousPluginInitializationEnabledForAllPlugins(false)
     , m_artificialPluginInitializationDelayEnabled(false)
 #if PLATFORM(MAC)
     , m_windowIsVisible(false)
@@ -1897,6 +1898,7 @@
 
     m_tabToLinks = store.getBoolValueForKey(WebPreferencesKey::tabsToLinksKey());
     m_asynchronousPluginInitializationEnabled = store.getBoolValueForKey(WebPreferencesKey::asynchronousPluginInitializationEnabledKey());
+    m_asynchronousPluginInitializationEnabledForAllPlugins = store.getBoolValueForKey(WebPreferencesKey::asynchronousPluginInitializationEnabledForAllPluginsKey());
     m_artificialPluginInitializationDelayEnabled = store.getBoolValueForKey(WebPreferencesKey::artificialPluginInitializationDelayEnabledKey());
 
     // FIXME: This should be generated from macro expansion for all preferences,

Modified: branches/safari-536.28-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h (133941 => 133942)


--- branches/safari-536.28-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h	2012-11-08 21:39:56 UTC (rev 133941)
+++ branches/safari-536.28-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h	2012-11-08 21:48:05 UTC (rev 133942)
@@ -534,7 +534,11 @@
 #endif
 
     bool asynchronousPluginInitializationEnabled() const { return m_asynchronousPluginInitializationEnabled; }
+    void setAsynchronousPluginInitializationEnabled(bool enabled) { m_asynchronousPluginInitializationEnabled = enabled; }
+    bool asynchronousPluginInitializationEnabledForAllPlugins() const { return m_asynchronousPluginInitializationEnabledForAllPlugins; }
+    void setAsynchronousPluginInitializationEnabledForAllPlugins(bool enabled) { m_asynchronousPluginInitializationEnabledForAllPlugins = enabled; }
     bool artificialPluginInitializationDelayEnabled() const { return m_artificialPluginInitializationDelayEnabled; }
+    void setArtificialPluginInitializationDelayEnabled(bool enabled) { m_artificialPluginInitializationDelayEnabled = enabled; }
 
 private:
     WebPage(uint64_t pageID, const WebPageCreationParameters&);
@@ -719,6 +723,7 @@
     bool m_tabToLinks;
     
     bool m_asynchronousPluginInitializationEnabled;
+    bool m_asynchronousPluginInitializationEnabledForAllPlugins;
     bool m_artificialPluginInitializationDelayEnabled;
 
 #if PLATFORM(MAC)

Modified: branches/safari-536.28-branch/Tools/ChangeLog (133941 => 133942)


--- branches/safari-536.28-branch/Tools/ChangeLog	2012-11-08 21:39:56 UTC (rev 133941)
+++ branches/safari-536.28-branch/Tools/ChangeLog	2012-11-08 21:48:05 UTC (rev 133942)
@@ -1,3 +1,17 @@
+2012-11-08  Lucas Forschler  <lforsch...@apple.com>
+
+        Merge r124649
+
+    2012-08-03  Brady Eidson  <beid...@apple.com>
+
+            Small part of "Out-of-process plug-ins should support asynchronous initialization."
+            <rdar://problem/10598594> and https://bugs.webkit.org/show_bug.cgi?id=92919
+
+            Reviewed by Anders Carlsson.
+
+            * WebKitTestRunner/TestController.cpp:
+            (WTR::TestController::resetStateToConsistentValues): Reset all preferences related to asynchronous plugin initialization.
+
 2012-10-19  Lucas Forschler  <lforsch...@apple.com>
 
         <rdar://problem/12523419> Use v2 bundle page loader client structure.
@@ -69751,3 +69765,4 @@
         * Scripts/webkitpy/common/checkout/changelog_unittest.py:
 
 == Rolled over to ChangeLog-2011-02-16 ==
+.

Modified: branches/safari-536.28-branch/Tools/WebKitTestRunner/TestController.cpp (133941 => 133942)


--- branches/safari-536.28-branch/Tools/WebKitTestRunner/TestController.cpp	2012-11-08 21:39:56 UTC (rev 133941)
+++ branches/safari-536.28-branch/Tools/WebKitTestRunner/TestController.cpp	2012-11-08 21:48:05 UTC (rev 133942)
@@ -451,6 +451,9 @@
     WKPreferencesSetFullScreenEnabled(preferences, true);
 #endif
     WKPreferencesSetPageCacheEnabled(preferences, false);
+    WKPreferencesSetAsynchronousPluginInitializationEnabled(preferences, false);
+    WKPreferencesSetAsynchronousPluginInitializationEnabledForAllPlugins(preferences, false);
+    WKPreferencesSetArtificialPluginInitializationDelayEnabled(preferences, false);
 
 // [Qt][WK2]REGRESSION(r104881):It broke hundreds of tests
 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=76247
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to