Title: [208165] trunk/Source/WebCore
Revision
208165
Author
[email protected]
Date
2016-10-31 11:59:45 -0700 (Mon, 31 Oct 2016)

Log Message

[CSS Parser] Allow unitless values on background-size in quirks mode
https://bugs.webkit.org/show_bug.cgi?id=164232

Reviewed by Dean Jackson.

* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeBackgroundSize):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (208164 => 208165)


--- trunk/Source/WebCore/ChangeLog	2016-10-31 18:43:36 UTC (rev 208164)
+++ trunk/Source/WebCore/ChangeLog	2016-10-31 18:59:45 UTC (rev 208165)
@@ -1,3 +1,13 @@
+2016-10-31  Dave Hyatt  <[email protected]>
+
+        [CSS Parser] Allow unitless values on background-size in quirks mode
+        https://bugs.webkit.org/show_bug.cgi?id=164232
+
+        Reviewed by Dean Jackson.
+
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::consumeBackgroundSize):
+
 2016-10-31  Jer Noble  <[email protected]>
 
         Unreviewed build fix after r208151; _setPreventsSleepDuringVideoPlayback: only defined in non-simulator SDKs.

Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (208164 => 208165)


--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp	2016-10-31 18:43:36 UTC (rev 208164)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp	2016-10-31 18:59:45 UTC (rev 208165)
@@ -2566,9 +2566,11 @@
     if (identMatches<CSSValueContain, CSSValueCover>(range.peek().id()))
         return consumeIdent(range);
 
+    // FIXME: We're allowing the unitless quirk on this property because our
+    // tests assume that. Other browser engines don't allow it though.
     RefPtr<CSSPrimitiveValue> horizontal = consumeIdent<CSSValueAuto>(range);
     if (!horizontal)
-        horizontal = consumeLengthOrPercent(range, cssParserMode, ValueRangeAll, UnitlessQuirk::Forbid);
+        horizontal = consumeLengthOrPercent(range, cssParserMode, ValueRangeAll, UnitlessQuirk::Allow);
 
     RefPtr<CSSPrimitiveValue> vertical;
     if (!range.atEnd()) {
@@ -2575,7 +2577,7 @@
         if (range.peek().id() == CSSValueAuto) // `auto' is the default
             range.consumeIncludingWhitespace();
         else
-            vertical = consumeLengthOrPercent(range, cssParserMode, ValueRangeAll, UnitlessQuirk::Forbid);
+            vertical = consumeLengthOrPercent(range, cssParserMode, ValueRangeAll, UnitlessQuirk::Allow);
     } else if (!vertical && property == CSSPropertyWebkitBackgroundSize) {
         // Legacy syntax: "-webkit-background-size: 10px" is equivalent to "background-size: 10px 10px".
         vertical = horizontal;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to