Title: [211143] branches/safari-603-branch/Source

Diff

Modified: branches/safari-603-branch/Source/WebCore/ChangeLog (211142 => 211143)


--- branches/safari-603-branch/Source/WebCore/ChangeLog	2017-01-25 14:34:27 UTC (rev 211142)
+++ branches/safari-603-branch/Source/WebCore/ChangeLog	2017-01-25 16:45:58 UTC (rev 211143)
@@ -1,3 +1,32 @@
+2017-01-25  Matthew Hanson  <matthew_han...@apple.com>
+
+        Merge r211052. rdar://problem/29857388
+
+    2017-01-20  Anders Carlsson  <ander...@apple.com>
+
+            When Safari reloads pages with Flash objects after Flash is installed, placeholders don't paint (but do work!)
+            https://bugs.webkit.org/show_bug.cgi?id=167268
+            rdar://problem/29857388
+
+            Reviewed by Sam Weinig.
+
+            * page/Page.cpp:
+            (WebCore::Page::refreshPlugins):
+            Call PluginInfoProvider::refresh instead.
+
+            (WebCore::Page::clearPluginData):
+            Add new setter.
+
+            * page/Page.h:
+            Declare new members.
+
+            * plugins/PluginInfoProvider.cpp:
+            (WebCore::PluginInfoProvider::refresh):
+            Put the logic to clear plug-in data and reload frames here.
+
+            * plugins/PluginInfoProvider.h:
+            Add new members.
+
 2017-01-24  Matthew Hanson  <matthew_han...@apple.com>
 
         Merge r211067. rdar://problem/29319962

Modified: branches/safari-603-branch/Source/WebCore/page/Page.cpp (211142 => 211143)


--- branches/safari-603-branch/Source/WebCore/page/Page.cpp	2017-01-25 14:34:27 UTC (rev 211142)
+++ branches/safari-603-branch/Source/WebCore/page/Page.cpp	2017-01-25 16:45:58 UTC (rev 211143)
@@ -538,24 +538,11 @@
 
     Vector<Ref<Frame>> framesNeedingReload;
 
-    for (auto& page : *allPages) {
+    for (auto& page : *allPages)
         pluginInfoProviders.add(&page->pluginInfoProvider());
-        page->m_pluginData = nullptr;
 
-        if (!reload)
-            continue;
-        
-        for (Frame* frame = &page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
-            if (frame->loader().subframeLoader().containsPlugins())
-                framesNeedingReload.append(*frame);
-        }
-    }
-
     for (auto& pluginInfoProvider : pluginInfoProviders)
-        pluginInfoProvider->refreshPlugins();
-
-    for (auto& frame : framesNeedingReload)
-        frame->loader().reload();
+        pluginInfoProvider->refresh(reload);
 }
 
 PluginData& Page::pluginData()
@@ -565,6 +552,11 @@
     return *m_pluginData;
 }
 
+void Page::clearPluginData()
+{
+    m_pluginData = nullptr;
+}
+
 bool Page::showAllPlugins() const
 {
     if (m_showAllPlugins)

Modified: branches/safari-603-branch/Source/WebCore/page/Page.h (211142 => 211143)


--- branches/safari-603-branch/Source/WebCore/page/Page.h	2017-01-25 14:34:27 UTC (rev 211142)
+++ branches/safari-603-branch/Source/WebCore/page/Page.h	2017-01-25 16:45:58 UTC (rev 211143)
@@ -166,6 +166,7 @@
 
     static void refreshPlugins(bool reload);
     WEBCORE_EXPORT PluginData& pluginData();
+    void clearPluginData();
 
     WEBCORE_EXPORT void setCanStartMedia(bool);
     bool canStartMedia() const { return m_canStartMedia; }

Modified: branches/safari-603-branch/Source/WebCore/plugins/PluginInfoProvider.cpp (211142 => 211143)


--- branches/safari-603-branch/Source/WebCore/plugins/PluginInfoProvider.cpp	2017-01-25 14:34:27 UTC (rev 211142)
+++ branches/safari-603-branch/Source/WebCore/plugins/PluginInfoProvider.cpp	2017-01-25 16:45:58 UTC (rev 211143)
@@ -26,6 +26,10 @@
 #include "config.h"
 #include "PluginInfoProvider.h"
 
+#include "MainFrame.h"
+#include "Page.h"
+#include "SubframeLoader.h"
+
 namespace WebCore {
 
 PluginInfoProvider::~PluginInfoProvider()
@@ -33,6 +37,26 @@
     ASSERT(m_pages.isEmpty());
 }
 
+void PluginInfoProvider::refresh(bool reloadPages)
+{
+    Vector<Ref<Frame>> framesNeedingReload;
+
+    for (auto& page : m_pages) {
+        page->clearPluginData();
+
+        if (!reloadPages)
+            continue;
+
+        for (Frame* frame = &page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
+            if (frame->loader().subframeLoader().containsPlugins())
+                framesNeedingReload.append(*frame);
+        }
+    }
+
+    for (auto& frame : framesNeedingReload)
+        frame->loader().reload();
+}
+
 void PluginInfoProvider::addPage(Page& page)
 {
     ASSERT(!m_pages.contains(&page));

Modified: branches/safari-603-branch/Source/WebCore/plugins/PluginInfoProvider.h (211142 => 211143)


--- branches/safari-603-branch/Source/WebCore/plugins/PluginInfoProvider.h	2017-01-25 14:34:27 UTC (rev 211142)
+++ branches/safari-603-branch/Source/WebCore/plugins/PluginInfoProvider.h	2017-01-25 16:45:58 UTC (rev 211143)
@@ -34,16 +34,17 @@
 public:
     virtual ~PluginInfoProvider();
 
-    void refreshPlugins(bool reloadPages);
+    void refresh(bool reloadPages);
 
     void addPage(Page&);
     void removePage(Page&);
 
-    virtual void refreshPlugins() = 0;
     virtual void getPluginInfo(Page&, Vector<PluginInfo>&) = 0;
     virtual void getWebVisiblePluginInfo(Page&, Vector<PluginInfo>&) = 0;
 
 private:
+    virtual void refreshPlugins() = 0;
+
     HashSet<Page*> m_pages;
 };
 

Modified: branches/safari-603-branch/Source/WebKit2/ChangeLog (211142 => 211143)


--- branches/safari-603-branch/Source/WebKit2/ChangeLog	2017-01-25 14:34:27 UTC (rev 211142)
+++ branches/safari-603-branch/Source/WebKit2/ChangeLog	2017-01-25 16:45:58 UTC (rev 211143)
@@ -1,3 +1,22 @@
+2017-01-25  Matthew Hanson  <matthew_han...@apple.com>
+
+        Merge r211052. rdar://problem/29857388
+
+    2017-01-20  Anders Carlsson  <ander...@apple.com>
+
+            When Safari reloads pages with Flash objects after Flash is installed, placeholders don't paint (but do work!)
+            https://bugs.webkit.org/show_bug.cgi?id=167268
+            rdar://problem/29857388
+
+            Reviewed by Sam Weinig.
+
+            * WebProcess/Plugins/WebPluginInfoProvider.h:
+            Make refreshPlugins() private.
+
+            * WebProcess/WebProcess.cpp:
+            (WebKit::WebProcess::refreshPlugins):
+            Call the newly added PluginInfoProvider::refresh().
+
 2017-01-24  Matthew Hanson  <matthew_han...@apple.com>
 
         Merge r211086. rdar://problem/29948645

Modified: branches/safari-603-branch/Source/WebKit2/WebProcess/Plugins/WebPluginInfoProvider.h (211142 => 211143)


--- branches/safari-603-branch/Source/WebKit2/WebProcess/Plugins/WebPluginInfoProvider.h	2017-01-25 14:34:27 UTC (rev 211142)
+++ branches/safari-603-branch/Source/WebKit2/WebProcess/Plugins/WebPluginInfoProvider.h	2017-01-25 16:45:58 UTC (rev 211143)
@@ -42,13 +42,12 @@
     void clearPluginClientPolicies();
 #endif
 
-    void refreshPlugins() override;
-
 private:
     WebPluginInfoProvider();
 
     void getPluginInfo(WebCore::Page&, Vector<WebCore::PluginInfo>&) override;
     void getWebVisiblePluginInfo(WebCore::Page&, Vector<WebCore::PluginInfo>&) override;
+    void refreshPlugins() override;
 
 #if ENABLE(NETSCAPE_PLUGIN_API)
     void populatePluginCache(const WebCore::Page&);

Modified: branches/safari-603-branch/Source/WebKit2/WebProcess/WebProcess.cpp (211142 => 211143)


--- branches/safari-603-branch/Source/WebKit2/WebProcess/WebProcess.cpp	2017-01-25 14:34:27 UTC (rev 211142)
+++ branches/safari-603-branch/Source/WebKit2/WebProcess/WebProcess.cpp	2017-01-25 16:45:58 UTC (rev 211143)
@@ -921,7 +921,7 @@
 void WebProcess::refreshPlugins()
 {
 #if ENABLE(NETSCAPE_PLUGIN_API)
-    WebPluginInfoProvider::singleton().refreshPlugins();
+    WebPluginInfoProvider::singleton().refresh(false);
 #endif
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to