Don't parse "show" and "hide" as valid values for display property.
authormacpherson@chromium.org <macpherson@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Apr 2012 05:05:37 +0000 (05:05 +0000)
committermacpherson@chromium.org <macpherson@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Apr 2012 05:05:37 +0000 (05:05 +0000)
https://bugs.webkit.org/show_bug.cgi?id=83115

Reviewed by Adam Barth.

No new tests.

* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):

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

LayoutTests/fast/css/display-no-show-hide-expected.html [new file with mode: 0644]
LayoutTests/fast/css/display-no-show-hide.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSParser.cpp

diff --git a/LayoutTests/fast/css/display-no-show-hide-expected.html b/LayoutTests/fast/css/display-no-show-hide-expected.html
new file mode 100644 (file)
index 0000000..5cc8226
--- /dev/null
@@ -0,0 +1,3 @@
+<!DOCTYPE html>
+<div>This text should be visible.</div>
+<div>This text should be visible.</div>
diff --git a/LayoutTests/fast/css/display-no-show-hide.html b/LayoutTests/fast/css/display-no-show-hide.html
new file mode 100644 (file)
index 0000000..9e7b7f7
--- /dev/null
@@ -0,0 +1,3 @@
+<!DOCTYPE html>
+<div style="display:show">This text should be visible.</div>
+<div style="display:hide">This text should be visible.</div>
index d1e423a..4373ef0 100644 (file)
@@ -1,3 +1,15 @@
+2012-04-03  Luke Macpherson  <macpherson@chromium.org>
+
+        Don't parse "show" and "hide" as valid values for display property.
+        https://bugs.webkit.org/show_bug.cgi?id=83115
+
+        Reviewed by Adam Barth.
+
+        No new tests.
+
+        * css/CSSParser.cpp:
+        (WebCore::isValidKeywordPropertyAndValue):
+
 2012-04-03  Yuta Kitamura  <yutak@chromium.org>
 
         Crash in WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadCreateWebSocketChannel
index dadb8d5..28ef677 100644 (file)
@@ -531,8 +531,8 @@ static inline bool isValidKeywordPropertyAndValue(CSSPropertyID propertyId, int
 #if ENABLE(CSS_GRID_LAYOUT)
         if (valueID == CSSValueWebkitGrid || valueID == CSSValueWebkitInlineGrid)
             return true;
-        break;
 #endif
+        break;
     case CSSPropertyEmptyCells: // show | hide | inherit
         if (valueID == CSSValueShow || valueID == CSSValueHide)
             return true;