From 708ceb88a08cdf19abebc93fe07a0b3982e4d809 Mon Sep 17 00:00:00 2001
From: "antti@apple.com" <antti@apple.com@bbb929c8-8fbe-4397-9dbb-9b2b20218538>
Date: Mon, 28 May 2012 16:22:01 +0000
Subject: REGRESSION(r96517): Attribute selector fails to match dynamically
 modified style attribute https://bugs.webkit.org/show_bug.cgi?id=87349

Source/WebCore:

Reviewed by Andreas Kling.

Selector fast path does not trigger lazy style attribute generation. Since attribute selectors matching
style attribute are rare, disallow them from the fast path rather than making it more branchy.

Test: fast/css/dynamic-style-attribute-query.html

* css/SelectorChecker.cpp:
(WebCore::isFastCheckableMatch):

LayoutTests:

Reviewed by Andreas Kling.

* fast/css/dynamic-style-attribute-query-expected.txt: Added.
* fast/css/dynamic-style-attribute-query.html: Added.



git-svn-id: svn://svn.chromium.org/blink/trunk@118688 bbb929c8-8fbe-4397-9dbb-9b2b20218538
---
 .../fast/css/dynamic-style-attribute-query.html            | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 third_party/WebKit/LayoutTests/fast/css/dynamic-style-attribute-query.html

(limited to 'third_party/WebKit/LayoutTests/fast/css/dynamic-style-attribute-query.html')

diff --git a/third_party/WebKit/LayoutTests/fast/css/dynamic-style-attribute-query.html b/third_party/WebKit/LayoutTests/fast/css/dynamic-style-attribute-query.html
new file mode 100644
index 0000000..e63f1f9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/dynamic-style-attribute-query.html
@@ -0,0 +1,14 @@
+<html>
+<head>
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<div id="testDiv">
+</div>
+<script>
+document.getElementById('testDiv').style.top = 0;
+shouldNotBe("document.querySelector('#testDiv[style]')", "null");
+</script>
+</body>
+<script src="../js/resources/js-test-post.js"></script>
+</html>
-- 
cgit v1.1