Title: [117248] trunk
Revision
117248
Author
abe...@webkit.org
Date
2012-05-16 02:58:59 -0700 (Wed, 16 May 2012)

Log Message

[WTR] Visited link tracking is not disabled properly
https://bugs.webkit.org/show_bug.cgi?id=76699

Reviewed by Jocelyn Turcotte.

Source/WebKit2:

If PLATFORM_STRATEGIES is enabled visited link tracking is done through
VisitedLinkProvider and not through PageGroup.
InjectedBundle sets the shouldTrackVisitedLinks flag on the PageGroup,
thus the shared VisitedLinkTable does get populated with visited links
regardless of the flag.

The WebProcess should only track visited links if tracking is specifically
enabled for a test through WTR's LayoutTestController.

This patch fixes several flacky and failing layout tests on Qt-WK2.

* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setShouldTrackVisitedLinks): Let the WebProcess
know about visited link tracking.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::setShouldTrackVisitedLinks):
(WebKit::WebProcess::addVisitedLink):
* WebProcess/WebProcess.h:
(WebProcess):

LayoutTests:

* platform/qt-5.0-wk2/Skipped: Unskip passing tests.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (117247 => 117248)


--- trunk/LayoutTests/ChangeLog	2012-05-16 09:54:21 UTC (rev 117247)
+++ trunk/LayoutTests/ChangeLog	2012-05-16 09:58:59 UTC (rev 117248)
@@ -1,3 +1,12 @@
+2012-05-16  Andras Becsi  <andras.be...@nokia.com>
+
+        [WTR] Visited link tracking is not disabled properly
+        https://bugs.webkit.org/show_bug.cgi?id=76699
+
+        Reviewed by Jocelyn Turcotte.
+
+        * platform/qt-5.0-wk2/Skipped: Unskip passing tests.
+
 2012-05-16  Kenichi Ishibashi  <ba...@chromium.org>
 
         [Chromium] Unreviewed test expectations update

Modified: trunk/LayoutTests/platform/qt-5.0-wk2/Skipped (117247 => 117248)


--- trunk/LayoutTests/platform/qt-5.0-wk2/Skipped	2012-05-16 09:54:21 UTC (rev 117247)
+++ trunk/LayoutTests/platform/qt-5.0-wk2/Skipped	2012-05-16 09:58:59 UTC (rev 117248)
@@ -396,17 +396,6 @@
 fast/dynamic/012.html
 platform/qt/plugins/qt-qwidget-plugin.html
 
-# [Qt][WK2]REGRESSION(r105461): It made 8 tests fail
-# https://bugs.webkit.org/show_bug.cgi?id=76699
-fast/block/margin-collapse/056.html
-tables/mozilla/marvin/backgr_simple-table-column.html
-tables/mozilla/marvin/backgr_simple-table-row-group.html
-tables/mozilla/marvin/backgr_simple-table-row.html
-tables/mozilla_expected_failures/marvin/backgr_border-table-column.html
-tables/mozilla_expected_failures/marvin/backgr_border-table-row-group.html
-tables/mozilla_expected_failures/marvin/backgr_layers-show.html
-tables/mozilla_expected_failures/marvin/backgr_position-table-column.html
-
 # [Qt][WK2] scrollbars/scroll-rtl-or-bt-layer.html fails
 # https://bugs.webkit.org/show_bug.cgi?id=76986
 scrollbars/scroll-rtl-or-bt-layer.html
@@ -541,10 +530,6 @@
 # https://bugs.webkit.org/show_bug.cgi?id=80209
 http/tests/security/xss-DENIED-xsl-document-securityOrigin.xml
 
-# [Qt][WK2]REGRESSION(r105461): It made 8 tests fail and 30 tests flakey
-# https://bugs.webkit.org/show_bug.cgi?id=76699
-tables/mozilla/marvin/backgr_simple-table-cell.html
-
 # [Qt][WK2] Failing http/tests/plugins tests after reenabled plugins
 # https://bugs.webkit.org/show_bug.cgi?id=82895
 http/tests/plugins/create-v8-script-objects.html

Modified: trunk/Source/WebKit2/ChangeLog (117247 => 117248)


--- trunk/Source/WebKit2/ChangeLog	2012-05-16 09:54:21 UTC (rev 117247)
+++ trunk/Source/WebKit2/ChangeLog	2012-05-16 09:58:59 UTC (rev 117248)
@@ -1,3 +1,31 @@
+2012-05-16  Andras Becsi  <andras.be...@nokia.com>
+
+        [WTR] Visited link tracking is not disabled properly
+        https://bugs.webkit.org/show_bug.cgi?id=76699
+
+        Reviewed by Jocelyn Turcotte.
+
+        If PLATFORM_STRATEGIES is enabled visited link tracking is done through
+        VisitedLinkProvider and not through PageGroup.
+        InjectedBundle sets the shouldTrackVisitedLinks flag on the PageGroup,
+        thus the shared VisitedLinkTable does get populated with visited links
+        regardless of the flag.
+
+        The WebProcess should only track visited links if tracking is specifically
+        enabled for a test through WTR's LayoutTestController.
+
+        This patch fixes several flacky and failing layout tests on Qt-WK2.
+
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::setShouldTrackVisitedLinks): Let the WebProcess
+        know about visited link tracking.
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::WebProcess):
+        (WebKit::WebProcess::setShouldTrackVisitedLinks):
+        (WebKit::WebProcess::addVisitedLink):
+        * WebProcess/WebProcess.h:
+        (WebProcess):
+
 2012-05-15  Caio Marcelo de Oliveira Filho  <caio.olive...@openbossa.org>
 
         Fix Qt5/Mac build after r117212 by adding missing NETSCAPE_PLUGIN_API guards

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp (117247 => 117248)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp	2012-05-16 09:54:21 UTC (rev 117247)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp	2012-05-16 09:58:59 UTC (rev 117248)
@@ -111,7 +111,7 @@
 
 void InjectedBundle::setShouldTrackVisitedLinks(bool shouldTrackVisitedLinks)
 {
-    PageGroup::setShouldTrackVisitedLinks(shouldTrackVisitedLinks);
+    WebProcess::shared().setShouldTrackVisitedLinks(shouldTrackVisitedLinks);
 }
 
 void InjectedBundle::removeAllVisitedLinks()

Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (117247 => 117248)


--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp	2012-05-16 09:54:21 UTC (rev 117247)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp	2012-05-16 09:58:59 UTC (rev 117248)
@@ -130,6 +130,7 @@
 WebProcess::WebProcess()
     : ChildProcess(shutdownTimeout)
     , m_inDidClose(false)
+    , m_shouldTrackVisitedLinks(true)
     , m_hasSetCacheModel(false)
     , m_cacheModel(CacheModelDocumentViewer)
 #if USE(ACCELERATED_COMPOSITING) && PLATFORM(MAC)
@@ -261,6 +262,7 @@
 
 void WebProcess::setShouldTrackVisitedLinks(bool shouldTrackVisitedLinks)
 {
+    m_shouldTrackVisitedLinks = shouldTrackVisitedLinks;
     PageGroup::setShouldTrackVisitedLinks(shouldTrackVisitedLinks);
 }
 
@@ -344,7 +346,7 @@
 
 void WebProcess::addVisitedLink(WebCore::LinkHash linkHash)
 {
-    if (isLinkVisited(linkHash))
+    if (isLinkVisited(linkHash) || !m_shouldTrackVisitedLinks)
         return;
     connection()->send(Messages::WebContext::AddVisitedLinkHash(linkHash), 0);
 }

Modified: trunk/Source/WebKit2/WebProcess/WebProcess.h (117247 => 117248)


--- trunk/Source/WebKit2/WebProcess/WebProcess.h	2012-05-16 09:54:21 UTC (rev 117247)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.h	2012-05-16 09:58:59 UTC (rev 117248)
@@ -115,6 +115,7 @@
 #endif
 #endif
     
+    void setShouldTrackVisitedLinks(bool);
     void addVisitedLink(WebCore::LinkHash);
     bool isLinkVisited(WebCore::LinkHash) const;
 
@@ -167,7 +168,6 @@
     void initializeWebProcess(const WebProcessCreationParameters&, CoreIPC::ArgumentDecoder*);
     void platformInitializeWebProcess(const WebProcessCreationParameters&, CoreIPC::ArgumentDecoder*);
     void platformTerminate();
-    void setShouldTrackVisitedLinks(bool);
     void registerURLSchemeAsEmptyDocument(const String&);
     void registerURLSchemeAsSecure(const String&) const;
     void setDomainRelaxationForbiddenForURLScheme(const String&) const;
@@ -261,6 +261,7 @@
 
     // FIXME: The visited link table should not be per process.
     VisitedLinkTable m_visitedLinkTable;
+    bool m_shouldTrackVisitedLinks;
 
     bool m_hasSetCacheModel;
     CacheModel m_cacheModel;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to