Title: [171378] trunk
- Revision
- 171378
- Author
- commit-qu...@webkit.org
- Date
- 2014-07-22 18:01:55 -0700 (Tue, 22 Jul 2014)
Log Message
Fix window-inactive css selectors when using querySelector.
https://bugs.webkit.org/show_bug.cgi?id=135149
Patch by Alex Christensen <achristen...@webkit.org> on 2014-07-22
Reviewed by Tim Horton.
Source/WebCore:
Test: fast/selectors/querySelector-window-inactive.html
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
Removed default and implemented case PseudoClassWindowInactive.
LayoutTests:
* fast/selectors/querySelector-window-inactive-expected.txt: Added.
* fast/selectors/querySelector-window-inactive.html: Added.
* platform/wk2/TestExpectations:
Added querySelector-window-inactive.html to list of tests that do not work in WK2 because of setWindowIsKey.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (171377 => 171378)
--- trunk/LayoutTests/ChangeLog 2014-07-23 00:41:02 UTC (rev 171377)
+++ trunk/LayoutTests/ChangeLog 2014-07-23 01:01:55 UTC (rev 171378)
@@ -1,3 +1,15 @@
+2014-07-22 Alex Christensen <achristen...@webkit.org>
+
+ Fix window-inactive css selectors when using querySelector.
+ https://bugs.webkit.org/show_bug.cgi?id=135149
+
+ Reviewed by Tim Horton.
+
+ * fast/selectors/querySelector-window-inactive-expected.txt: Added.
+ * fast/selectors/querySelector-window-inactive.html: Added.
+ * platform/wk2/TestExpectations:
+ Added querySelector-window-inactive.html to list of tests that do not work in WK2 because of setWindowIsKey.
+
2014-07-22 Filip Pizlo <fpi...@apple.com>
Merge r168635, r168780, r169005, r169014, and r169143 from ftlopt.
Added: trunk/LayoutTests/fast/selectors/querySelector-window-inactive-expected.txt (0 => 171378)
--- trunk/LayoutTests/fast/selectors/querySelector-window-inactive-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/selectors/querySelector-window-inactive-expected.txt 2014-07-23 01:01:55 UTC (rev 171378)
@@ -0,0 +1,11 @@
+Test window-inactive in querySelectorAll.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS document.querySelectorAll("a:window-inactive").length is 0
+PASS document.querySelectorAll("a:window-inactive").length is 1
+PASS successfullyParsed is true
+
+TEST COMPLETE
+some text
Added: trunk/LayoutTests/fast/selectors/querySelector-window-inactive.html (0 => 171378)
--- trunk/LayoutTests/fast/selectors/querySelector-window-inactive.html (rev 0)
+++ trunk/LayoutTests/fast/selectors/querySelector-window-inactive.html 2014-07-23 01:01:55 UTC (rev 171378)
@@ -0,0 +1,18 @@
+<!doctype html>
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<a>some text</a>
+</body>
+<script>
+description('Test window-inactive in querySelectorAll.');
+shouldBe('document.querySelectorAll("a:window-inactive").length', '0');
+if (window.testRunner) {
+ testRunner.setWindowIsKey(false);
+ shouldBe('document.querySelectorAll("a:window-inactive").length', '1');
+}
+</script>
+<script src=""
+</html>
Modified: trunk/LayoutTests/platform/wk2/TestExpectations (171377 => 171378)
--- trunk/LayoutTests/platform/wk2/TestExpectations 2014-07-23 00:41:02 UTC (rev 171377)
+++ trunk/LayoutTests/platform/wk2/TestExpectations 2014-07-23 01:01:55 UTC (rev 171378)
@@ -210,6 +210,7 @@
# layoutTestController.setWindowIsKey() has no effect on the web process side in WebKit2
# https://bugs.webkit.org/show_bug.cgi?id=81736 rdar://problem/11088268
fast/events/blur-focus-window-should-blur-focus-element.html
+fast/selectors/querySelector-window-inactive.html
fast/selectors/selection-window-inactive.html
fast/dom/Window/window-focus-self.html
Modified: trunk/Source/WebCore/ChangeLog (171377 => 171378)
--- trunk/Source/WebCore/ChangeLog 2014-07-23 00:41:02 UTC (rev 171377)
+++ trunk/Source/WebCore/ChangeLog 2014-07-23 01:01:55 UTC (rev 171378)
@@ -1,3 +1,16 @@
+2014-07-22 Alex Christensen <achristen...@webkit.org>
+
+ Fix window-inactive css selectors when using querySelector.
+ https://bugs.webkit.org/show_bug.cgi?id=135149
+
+ Reviewed by Tim Horton.
+
+ Test: fast/selectors/querySelector-window-inactive.html
+
+ * css/SelectorChecker.cpp:
+ (WebCore::SelectorChecker::checkOne):
+ Removed default and implemented case PseudoClassWindowInactive.
+
2014-07-22 Tim Horton <timothy_hor...@apple.com>
REGRESSION (r171016): Reproducible infinite spin selecting phone number
Modified: trunk/Source/WebCore/css/SelectorChecker.cpp (171377 => 171378)
--- trunk/Source/WebCore/css/SelectorChecker.cpp 2014-07-23 00:41:02 UTC (rev 171377)
+++ trunk/Source/WebCore/css/SelectorChecker.cpp 2014-07-23 01:01:55 UTC (rev 171378)
@@ -776,6 +776,9 @@
break;
}
+ case CSSSelector::PseudoClassWindowInactive:
+ return !element->document().page()->focusController().isActive();
+
case CSSSelector::PseudoClassHorizontal:
case CSSSelector::PseudoClassVertical:
case CSSSelector::PseudoClassDecrement:
@@ -789,7 +792,6 @@
return false;
case CSSSelector::PseudoClassUnknown:
- default:
ASSERT_NOT_REACHED();
break;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes