Diff
Modified: branches/safari-600.1.4-branch/LayoutTests/ChangeLog (171772 => 171773)
--- branches/safari-600.1.4-branch/LayoutTests/ChangeLog 2014-07-29 22:41:19 UTC (rev 171772)
+++ branches/safari-600.1.4-branch/LayoutTests/ChangeLog 2014-07-29 22:46:44 UTC (rev 171773)
@@ -1,26 +1,3 @@
-2014-07-29 Matthew Hanson <matthew_han...@apple.com>
-
- Merge r171675. <rdar://problem/17826572>
-
- 2014-07-28 Yusuke Suzuki <utatane....@gmail.com>
-
- CSS: Fix :visited behavior for SubSelectors
- https://bugs.webkit.org/show_bug.cgi?id=135324
-
- Reviewed by Benjamin Poulain.
-
- Disable :visited match for the selectors that has SubSelectors.
- This `isSubSelector` (`context.firstSelectorOfTheFragment == context.selector`) is intended to
- check `relation != CSSSelector::SubSelector`.
- But since this value belongs to the previous selector and it is tested inside the branch that checks
- the next selector isn't SubSelector `relation != CSSSelector::SubSelector`,
- this only matches when the previous selector doesn't has SubSelectors.
-
- * fast/history/nested-visited-test-complex-expected.txt: Added.
- * fast/history/nested-visited-test-complex.html: Added.
- * fast/history/sibling-visited-test-complex-expected.txt: Added.
- * fast/history/sibling-visited-test-complex.html: Added.
-
2014-07-27 Matthew Hanson <matthew_han...@apple.com>
Merge r171661. <rdar://problem/17315237>
Deleted: branches/safari-600.1.4-branch/LayoutTests/fast/history/nested-visited-test-complex-expected.txt (171772 => 171773)
--- branches/safari-600.1.4-branch/LayoutTests/fast/history/nested-visited-test-complex-expected.txt 2014-07-29 22:41:19 UTC (rev 171772)
+++ branches/safari-600.1.4-branch/LayoutTests/fast/history/nested-visited-test-complex-expected.txt 2014-07-29 22:46:44 UTC (rev 171773)
@@ -1,9 +0,0 @@
-These contents (not underline) of two links should be different colors (green and orange):
-
-One Two
-
-PASS firstStyle.color became different from secondStyle.color
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Deleted: branches/safari-600.1.4-branch/LayoutTests/fast/history/nested-visited-test-complex.html (171772 => 171773)
--- branches/safari-600.1.4-branch/LayoutTests/fast/history/nested-visited-test-complex.html 2014-07-29 22:41:19 UTC (rev 171772)
+++ branches/safari-600.1.4-branch/LayoutTests/fast/history/nested-visited-test-complex.html 2014-07-29 22:46:44 UTC (rev 171773)
@@ -1,44 +0,0 @@
-<html>
-<head>
-<script src=""
-<script>
-jsTestIsAsync = true;
-
-if (window.testRunner)
- window.testRunner.keepWebHistory();
-
-function compareStyles()
-{
- var anchor = document.createElement("a");
- anchor.href=""
- anchor.setAttribute("id", "one");
- anchor.classList.add("ok");
- anchor.classList.add("ng");
- anchor.innerHTML = "One";
- document.getElementById('enclosure').appendChild(anchor);
-
- if (window.internals) {
- firstStyle = internals.computedStyleIncludingVisitedInfo(document.getElementById('one'));
- secondStyle = internals.computedStyleIncludingVisitedInfo(document.getElementById('two'));
- shouldBecomeDifferent('firstStyle.color', 'secondStyle.color', finishJSTest);
- }
-}
-</script>
-<style>
-a { color: green }
-:visited.ok > a.ok { color: orange }
-:visited.ok > span.ok { color: orange }
-</style>
-</head>
-<body _onload_="compareStyles()">
-<iframe src="" style="display:none"></iframe>
-
-<p>These contents (not underline) of two links should be different colors (green and orange):</p>
-<p style="color:green">
-<a id="enclosure" class="ok" href=""
-<a class="ok" href="" class="ok" id="two">Two</span></a>
-</p>
-<div id=console></div>
-</body>
-<script src=""
-</html>
Deleted: branches/safari-600.1.4-branch/LayoutTests/fast/history/sibling-visited-test-complex-expected.txt (171772 => 171773)
--- branches/safari-600.1.4-branch/LayoutTests/fast/history/sibling-visited-test-complex-expected.txt 2014-07-29 22:41:19 UTC (rev 171772)
+++ branches/safari-600.1.4-branch/LayoutTests/fast/history/sibling-visited-test-complex-expected.txt 2014-07-29 22:46:44 UTC (rev 171773)
@@ -1,9 +0,0 @@
-These two links should be different colors (green and orange):
-
-One Two
-
-PASS firstStyle.color became different from secondStyle.color
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Deleted: branches/safari-600.1.4-branch/LayoutTests/fast/history/sibling-visited-test-complex.html (171772 => 171773)
--- branches/safari-600.1.4-branch/LayoutTests/fast/history/sibling-visited-test-complex.html 2014-07-29 22:41:19 UTC (rev 171772)
+++ branches/safari-600.1.4-branch/LayoutTests/fast/history/sibling-visited-test-complex.html 2014-07-29 22:46:44 UTC (rev 171773)
@@ -1,36 +0,0 @@
-<html>
-<head>
-<script src=""
-<script>
-jsTestIsAsync = true;
-
-if (window.testRunner)
- window.testRunner.keepWebHistory();
-
-function compareStyles()
-{
- if (window.internals) {
- firstStyle = internals.computedStyleIncludingVisitedInfo(document.getElementById('one'));
- secondStyle = internals.computedStyleIncludingVisitedInfo(document.getElementById('two'));
- shouldBecomeDifferent('firstStyle.color', 'secondStyle.color', finishJSTest);
- }
-}
-</script>
-<style>
-:link { color: orange }
-:visited + :link.ok { color: green }
-:visited { color: green }
-</style>
-</head>
-<body _onload_="compareStyles()">
-<iframe src="" style="display:none"></iframe>
-
-<p>These two links should be different colors (green and orange):</p>
-<p style="color:green">
-<a href="" class="ok" id="one">One</a>
-<a href="" class="ok" id="two">Two</a>
-</p>
-<div id=console></div>
-</body>
-<script src=""
-</html>
Modified: branches/safari-600.1.4-branch/Source/WebCore/ChangeLog (171772 => 171773)
--- branches/safari-600.1.4-branch/Source/WebCore/ChangeLog 2014-07-29 22:41:19 UTC (rev 171772)
+++ branches/safari-600.1.4-branch/Source/WebCore/ChangeLog 2014-07-29 22:46:44 UTC (rev 171773)
@@ -1,5 +1,28 @@
2014-07-29 Matthew Hanson <matthew_han...@apple.com>
+ Rollout r171675. <rdar://problem/17826572>
+
+ 2014-07-29 Matthew Hanson <matthew_han...@apple.com>
+
+ Merge r171675. <rdar://problem/17826572>
+
+ 2014-07-28 Yusuke Suzuki <utatane....@gmail.com>
+
+ CSS: Fix :visited behavior for SubSelectors
+ https://bugs.webkit.org/show_bug.cgi?id=135324
+
+ Reviewed by Benjamin Poulain.
+
+ Disable :visited match for the selectors that has SubSelectors.
+
+ Tests: fast/history/nested-visited-test-complex.html
+ fast/history/sibling-visited-test-complex.html
+
+ * css/SelectorChecker.cpp:
+ (WebCore::SelectorChecker::matchRecursively):
+
+2014-07-29 Matthew Hanson <matthew_han...@apple.com>
+
Rollout r171702. <rdar://problem/16828238>
2014-07-29 Matthew Hanson <matthew_han...@apple.com>
Modified: branches/safari-600.1.4-branch/Source/WebCore/css/SelectorChecker.cpp (171772 => 171773)
--- branches/safari-600.1.4-branch/Source/WebCore/css/SelectorChecker.cpp 2014-07-29 22:41:19 UTC (rev 171772)
+++ branches/safari-600.1.4-branch/Source/WebCore/css/SelectorChecker.cpp 2014-07-29 22:46:44 UTC (rev 171773)
@@ -207,7 +207,7 @@
return SelectorFailsCompletely;
// Disable :visited matching when we see the first link or try to match anything else than an ancestors.
- if (context.element->isLink() || (relation != CSSSelector::Descendant && relation != CSSSelector::Child))
+ if (context.firstSelectorOfTheFragment == context.selector && (context.element->isLink() || (relation != CSSSelector::Descendant && relation != CSSSelector::Child)))
nextContext.visitedMatchType = VisitedMatchDisabled;
nextContext.pseudoId = NOPSEUDO;