Title: [289588] trunk/Source/WebCore
Revision
289588
Author
[email protected]
Date
2022-02-10 15:36:55 -0800 (Thu, 10 Feb 2022)

Log Message

Use Ref<> for getBackground/MaskShorthandValue
https://bugs.webkit.org/show_bug.cgi?id=236408

Patch by Matt Woodrow <[email protected]> on 2022-02-10
Reviewed by Tim Nguyen.

Simple cleanup to make it clearer that these can't return nullptr, no tests needed.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::getFillLayerPropertyShorthandValue):
(WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
(WebCore::ComputedStyleExtractor::getMaskShorthandValue):
* css/CSSComputedStyleDeclaration.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (289587 => 289588)


--- trunk/Source/WebCore/ChangeLog	2022-02-10 23:22:23 UTC (rev 289587)
+++ trunk/Source/WebCore/ChangeLog	2022-02-10 23:36:55 UTC (rev 289588)
@@ -1,3 +1,18 @@
+2022-02-10  Matt Woodrow  <[email protected]>
+
+        Use Ref<> for getBackground/MaskShorthandValue
+        https://bugs.webkit.org/show_bug.cgi?id=236408
+
+        Reviewed by Tim Nguyen.
+
+        Simple cleanup to make it clearer that these can't return nullptr, no tests needed.
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::ComputedStyleExtractor::getFillLayerPropertyShorthandValue):
+        (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
+        (WebCore::ComputedStyleExtractor::getMaskShorthandValue):
+        * css/CSSComputedStyleDeclaration.h:
+
 2022-02-10  Kimmo Kinnunen  <[email protected]>
 
         ImageBuffer::get/putPixelBuffer should not go through DisplayList

Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (289587 => 289588)


--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2022-02-10 23:22:23 UTC (rev 289587)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2022-02-10 23:36:55 UTC (rev 289588)
@@ -4434,7 +4434,7 @@
     return layerCount;
 }
 
-RefPtr<CSSValue> ComputedStyleExtractor::getFillLayerPropertyShorthandValue(CSSPropertyID property, const StylePropertyShorthand& propertiesBeforeSlashSeparator, const StylePropertyShorthand& propertiesAfterSlashSeparator, CSSPropertyID lastLayerProperty)
+Ref<CSSValue> ComputedStyleExtractor::getFillLayerPropertyShorthandValue(CSSPropertyID property, const StylePropertyShorthand& propertiesBeforeSlashSeparator, const StylePropertyShorthand& propertiesAfterSlashSeparator, CSSPropertyID lastLayerProperty)
 {
     ASSERT(property == CSSPropertyBackground || property == CSSPropertyMask);
     size_t layerCount = getLayerCount(property);
@@ -4482,7 +4482,7 @@
 }
 
 
-RefPtr<CSSValue> ComputedStyleExtractor::getBackgroundShorthandValue()
+Ref<CSSValue> ComputedStyleExtractor::getBackgroundShorthandValue()
 {
     static const CSSPropertyID propertiesBeforeSlashSeparator[] = { CSSPropertyBackgroundImage, CSSPropertyBackgroundRepeat, CSSPropertyBackgroundAttachment, CSSPropertyBackgroundPosition };
     static const CSSPropertyID propertiesAfterSlashSeparator[] = { CSSPropertyBackgroundSize, CSSPropertyBackgroundOrigin, CSSPropertyBackgroundClip };
@@ -4490,7 +4490,7 @@
     return getFillLayerPropertyShorthandValue(CSSPropertyBackground, StylePropertyShorthand(CSSPropertyBackground, propertiesBeforeSlashSeparator), StylePropertyShorthand(CSSPropertyBackground, propertiesAfterSlashSeparator), CSSPropertyBackgroundColor);
 }
 
-RefPtr<CSSValue> ComputedStyleExtractor::getMaskShorthandValue()
+Ref<CSSValue> ComputedStyleExtractor::getMaskShorthandValue()
 {
     static const CSSPropertyID propertiesBeforeSlashSeperator[2] = { CSSPropertyMaskImage, CSSPropertyMaskPosition };
     static const CSSPropertyID propertiesAfterSlashSeperator[6] = { CSSPropertyMaskSize, CSSPropertyMaskRepeat, CSSPropertyMaskOrigin, CSSPropertyMaskClip, CSSPropertyMaskComposite, CSSPropertyMaskMode };

Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h (289587 => 289588)


--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h	2022-02-10 23:22:23 UTC (rev 289587)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h	2022-02-10 23:36:55 UTC (rev 289588)
@@ -94,9 +94,9 @@
     RefPtr<CSSValueList> getCSSPropertyValuesFor4SidesShorthand(const StylePropertyShorthand&);
 
     size_t getLayerCount(CSSPropertyID);
-    RefPtr<CSSValue> getFillLayerPropertyShorthandValue(CSSPropertyID, const StylePropertyShorthand& propertiesBeforeSlashSeparator, const StylePropertyShorthand& propertiesAfterSlashSeparator, CSSPropertyID lastLayerProperty);
-    RefPtr<CSSValue> getBackgroundShorthandValue();
-    RefPtr<CSSValue> getMaskShorthandValue();
+    Ref<CSSValue> getFillLayerPropertyShorthandValue(CSSPropertyID, const StylePropertyShorthand& propertiesBeforeSlashSeparator, const StylePropertyShorthand& propertiesAfterSlashSeparator, CSSPropertyID lastLayerProperty);
+    Ref<CSSValue> getBackgroundShorthandValue();
+    Ref<CSSValue> getMaskShorthandValue();
     Ref<CSSValueList> getCSSPropertyValuesForGridShorthand(const StylePropertyShorthand&);
 
     RefPtr<Element> m_element;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to