Title: [123942] trunk/Source/WebCore
Revision
123942
Author
[email protected]
Date
2012-07-27 17:41:18 -0700 (Fri, 27 Jul 2012)

Log Message

Reset the set of "seen" plugins when the main frame load is committed.
https://bugs.webkit.org/show_bug.cgi?id=92564

Reviewed by Anders Carlsson.

Because the Page object is re-used across navigation and reload, reset the list
of seen plugins when the main frame load commits. This gives a good baseline to
compare against the number of pages loaded.

No new tests; the "seen" plugin list is for diagnostic purposes only.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::dispatchDidCommitLoad):
* page/Page.cpp:
(WebCore::Page::resetSeenPlugins):
* page/Page.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (123941 => 123942)


--- trunk/Source/WebCore/ChangeLog	2012-07-28 00:34:51 UTC (rev 123941)
+++ trunk/Source/WebCore/ChangeLog	2012-07-28 00:41:18 UTC (rev 123942)
@@ -1,3 +1,22 @@
+2012-07-27  Jer Noble  <[email protected]>
+
+        Reset the set of "seen" plugins when the main frame load is committed.
+        https://bugs.webkit.org/show_bug.cgi?id=92564
+
+        Reviewed by Anders Carlsson.
+
+        Because the Page object is re-used across navigation and reload, reset the list
+        of seen plugins when the main frame load commits. This gives a good baseline to
+        compare against the number of pages loaded.
+
+        No new tests; the "seen" plugin list is for diagnostic purposes only.
+
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::dispatchDidCommitLoad):
+        * page/Page.cpp:
+        (WebCore::Page::resetSeenPlugins):
+        * page/Page.h:
+
 2012-07-27  Sukolsak Sakshuwong  <[email protected]>
 
         execCommand copies the backgroung-color of the enclosing element to the element being edited.

Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (123941 => 123942)


--- trunk/Source/WebCore/loader/FrameLoader.cpp	2012-07-28 00:34:51 UTC (rev 123941)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp	2012-07-28 00:41:18 UTC (rev 123942)
@@ -3185,6 +3185,9 @@
 
     m_client->dispatchDidCommitLoad();
 
+    if (isLoadingMainFrame())
+        m_frame->page()->resetSeenPlugins();
+
     InspectorInstrumentation::didCommitLoad(m_frame, m_documentLoader.get());
 }
 

Modified: trunk/Source/WebCore/page/Page.cpp (123941 => 123942)


--- trunk/Source/WebCore/page/Page.cpp	2012-07-28 00:34:51 UTC (rev 123941)
+++ trunk/Source/WebCore/page/Page.cpp	2012-07-28 00:41:18 UTC (rev 123942)
@@ -1173,6 +1173,11 @@
     m_seenPlugins.add(serviceType);
 }
 
+void Page::resetSeenPlugins()
+{
+    m_seenPlugins.clear();
+}
+
 Page::PageClients::PageClients()
     : alternativeTextClient(0)
     , chromeClient(0)

Modified: trunk/Source/WebCore/page/Page.h (123941 => 123942)


--- trunk/Source/WebCore/page/Page.h	2012-07-28 00:34:51 UTC (rev 123941)
+++ trunk/Source/WebCore/page/Page.h	2012-07-28 00:41:18 UTC (rev 123942)
@@ -351,6 +351,7 @@
         bool hasSeenPlugin(const String& serviceType) const;
         bool hasSeenAnyPlugin() const;
         void sawPlugin(const String& serviceType);
+        void resetSeenPlugins();
 
     private:
         void initGroup();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to