REGRESSION(r98542): Chromium: CSS text is rendered on page
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Nov 2011 15:34:58 +0000 (15:34 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Nov 2011 15:34:58 +0000 (15:34 +0000)
https://bugs.webkit.org/show_bug.cgi?id=71703

Patch by David Barr <davidbarr@chromium.org> on 2011-11-19
Reviewed by Antti Koivisto.

Source/WebCore:

Matched UA declarations uncacheable when using simpleDefaultStyleSheet.

Test: fast/css/style-tag-display-none.html

* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::matchUARules):

LayoutTests:

* fast/css/style-tag-display-none-expected.txt: Added.
* fast/css/style-tag-display-none.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@100856 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/css/style-tag-display-none-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/style-tag-display-none.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSStyleSelector.cpp

index 5452f0ba7ed9094011196173df6cb6bb52b97b8e..6a4bc70cd71f95d0d4c64b064494c04c4682c1d2 100644 (file)
@@ -1,3 +1,13 @@
+2011-11-19  David Barr  <davidbarr@chromium.org>
+
+        REGRESSION(r98542): Chromium: CSS text is rendered on page
+        https://bugs.webkit.org/show_bug.cgi?id=71703
+
+        Reviewed by Antti Koivisto.
+
+        * fast/css/style-tag-display-none-expected.txt: Added.
+        * fast/css/style-tag-display-none.html: Added.
+
 2011-11-18  Mihnea Ovidenie  <mihnea@adobe.com>
 
         Pixel results missing for fast/regions/render-region-custom-style-mark.html
diff --git a/LayoutTests/fast/css/style-tag-display-none-expected.txt b/LayoutTests/fast/css/style-tag-display-none-expected.txt
new file mode 100644 (file)
index 0000000..6487aee
--- /dev/null
@@ -0,0 +1,8 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x8
+  RenderBlock {HTML} at (0,0) size 800x8
+    RenderBody {BODY} at (8,8) size 784x0
+      RenderInline {A} at (0,0) size 0x0 [color=#551A8B]
+      RenderText {#text} at (0,0) size 0x0
+      RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/fast/css/style-tag-display-none.html b/LayoutTests/fast/css/style-tag-display-none.html
new file mode 100644 (file)
index 0000000..a228c7d
--- /dev/null
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html>
+  <head>
+    <style>
+      .header {
+        overflow: auto;
+        clear: both;
+      }
+    </style>
+  </head>
+<body>
+  <a href=""></a>
+  <script>
+    document.documentElement.setAttribute("dir", "ltr");
+  </script>
+</body>
+</html>
index d33e45b3f39011d19de239475d242d92d705b712..4331f67ceb199cee746341ba757e786ead4b35a9 100644 (file)
@@ -1,3 +1,17 @@
+2011-11-19  David Barr  <davidbarr@chromium.org>
+
+        REGRESSION(r98542): Chromium: CSS text is rendered on page
+        https://bugs.webkit.org/show_bug.cgi?id=71703
+
+        Reviewed by Antti Koivisto.
+
+        Matched UA declarations uncacheable when using simpleDefaultStyleSheet.
+
+        Test: fast/css/style-tag-display-none.html
+
+        * css/CSSStyleSelector.cpp:
+        (WebCore::CSSStyleSelector::matchUARules):
+
 2011-11-19  Jay Civelli  <jcivelli@chromium.org>
 
         When loading a MHTML document, make sure we set the base URL before
index 8aced07bc84d000e5fba60560ab36c99d1b9f529..d3d528953fa1b52721a131649c730638775c22a8 100644 (file)
@@ -1135,6 +1135,8 @@ void CSSStyleSelector::matchUARules(MatchResult& result)
     MatchingUARulesScope scope;
 
     // First we match rules from the user agent sheet.
+    if (simpleDefaultStyleSheet)
+        result.isCacheable = false;
     RuleSet* userAgentStyleSheet = m_medium->mediaTypeMatchSpecific("print")
         ? defaultPrintStyle : defaultStyle;
     matchRules(userAgentStyleSheet, result.firstUARule, result.lastUARule, false);