[CSS Parser] Make sure -webkit-background-size coalesces identical values.
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Nov 2016 19:39:12 +0000 (19:39 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Nov 2016 19:39:12 +0000 (19:39 +0000)
https://bugs.webkit.org/show_bug.cgi?id=165207

Reviewed by Dean Jackson.

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

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

Source/WebCore/ChangeLog
Source/WebCore/css/parser/CSSPropertyParser.cpp

index 773ba68..a068104 100644 (file)
@@ -1,3 +1,13 @@
+2016-11-30  Dave Hyatt  <hyatt@apple.com>
+
+        [CSS Parser] Make sure -webkit-background-size coalesces identical values.
+        https://bugs.webkit.org/show_bug.cgi?id=165207
+
+        Reviewed by Dean Jackson.
+
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::consumeBackgroundSize):
+
 2016-11-30  Eric Carlson  <eric.carlson@apple.com>
 
         [MediaStream] Sync video preview layer and parent layer sizes
 2016-11-30  Eric Carlson  <eric.carlson@apple.com>
 
         [MediaStream] Sync video preview layer and parent layer sizes
index c164457..28d3708 100644 (file)
@@ -2724,7 +2724,7 @@ static RefPtr<CSSPrimitiveValue> consumeBackgroundSize(CSSPropertyID property, C
     }
     if (!vertical)
         return horizontal;
     }
     if (!vertical)
         return horizontal;
-    return createPrimitiveValuePair(horizontal.releaseNonNull(), vertical.releaseNonNull(), Pair::IdenticalValueEncoding::DoNotCoalesce);
+    return createPrimitiveValuePair(horizontal.releaseNonNull(), vertical.releaseNonNull(), property == CSSPropertyWebkitBackgroundSize ? Pair::IdenticalValueEncoding::Coalesce : Pair::IdenticalValueEncoding::DoNotCoalesce);
 }
 
 #if ENABLE(CSS_GRID_LAYOUT)
 }
 
 #if ENABLE(CSS_GRID_LAYOUT)