Title: [159184] trunk/Source/WebCore
Revision
159184
Author
[email protected]
Date
2013-11-13 03:38:14 -0800 (Wed, 13 Nov 2013)

Log Message

Make remaining CSSPrimitiveValue constructors return PassRef.
<https://webkit.org/b/124270>

..and same with the corresponding CSSValuePool functions.

Reviewed by Antti Koivisto.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (159183 => 159184)


--- trunk/Source/WebCore/ChangeLog	2013-11-13 11:25:43 UTC (rev 159183)
+++ trunk/Source/WebCore/ChangeLog	2013-11-13 11:38:14 UTC (rev 159184)
@@ -1,3 +1,12 @@
+2013-11-13  Andreas Kling  <[email protected]>
+
+        Make remaining CSSPrimitiveValue constructors return PassRef.
+        <https://webkit.org/b/124270>
+
+        ..and same with the corresponding CSSValuePool functions.
+
+        Reviewed by Antti Koivisto.
+
 2013-11-13  Alexey Proskuryakov  <[email protected]>
 
         Implement key generation and JWK import for RSASSA-PKCS1-v1_5

Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.h (159183 => 159184)


--- trunk/Source/WebCore/css/CSSPrimitiveValue.h	2013-11-13 11:25:43 UTC (rev 159183)
+++ trunk/Source/WebCore/css/CSSPrimitiveValue.h	2013-11-13 11:38:14 UTC (rev 159184)
@@ -213,27 +213,27 @@
 
     static PassRef<CSSPrimitiveValue> createIdentifier(CSSValueID valueID) { return adoptRef(*new CSSPrimitiveValue(valueID)); }
     static PassRef<CSSPrimitiveValue> createIdentifier(CSSPropertyID propertyID) { return adoptRef(*new CSSPrimitiveValue(propertyID)); }
-    static PassRefPtr<CSSPrimitiveValue> createParserOperator(int parserOperator) { return adoptRef(new CSSPrimitiveValue(parserOperator)); }
+    static PassRef<CSSPrimitiveValue> createParserOperator(int parserOperator) { return adoptRef(*new CSSPrimitiveValue(parserOperator)); }
 
     static PassRef<CSSPrimitiveValue> createColor(unsigned rgbValue) { return adoptRef(*new CSSPrimitiveValue(rgbValue)); }
     static PassRef<CSSPrimitiveValue> create(double value, UnitTypes type) { return adoptRef(*new CSSPrimitiveValue(value, type)); }
     static PassRef<CSSPrimitiveValue> create(const String& value, UnitTypes type) { return adoptRef(*new CSSPrimitiveValue(value, type)); }
     static PassRef<CSSPrimitiveValue> create(const Length& value, const RenderStyle* style) { return adoptRef(*new CSSPrimitiveValue(value, style)); }
 
-    template<typename T> static PassRefPtr<CSSPrimitiveValue> create(T value)
+    template<typename T> static PassRef<CSSPrimitiveValue> create(T value)
     {
-        return adoptRef(new CSSPrimitiveValue(value));
+        return adoptRef(*new CSSPrimitiveValue(value));
     }
 
     // This value is used to handle quirky margins in reflow roots (body, td, and th) like WinIE.
     // The basic idea is that a stylesheet can use the value __qem (for quirky em) instead of em.
     // When the quirky value is used, if you're in quirks mode, the margin will collapse away
     // inside a table cell.
-    static PassRefPtr<CSSPrimitiveValue> createAllowingMarginQuirk(double value, UnitTypes type)
+    static PassRef<CSSPrimitiveValue> createAllowingMarginQuirk(double value, UnitTypes type)
     {
         CSSPrimitiveValue* quirkValue = new CSSPrimitiveValue(value, type);
         quirkValue->m_isQuirkValue = true;
-        return adoptRef(quirkValue);
+        return adoptRef(*quirkValue);
     }
 
     ~CSSPrimitiveValue();

Modified: trunk/Source/WebCore/css/CSSValuePool.h (159183 => 159184)


--- trunk/Source/WebCore/css/CSSValuePool.h	2013-11-13 11:25:43 UTC (rev 159183)
+++ trunk/Source/WebCore/css/CSSValuePool.h	2013-11-13 11:38:14 UTC (rev 159184)
@@ -53,7 +53,7 @@
     PassRef<CSSPrimitiveValue> createValue(double value, CSSPrimitiveValue::UnitTypes);
     PassRef<CSSPrimitiveValue> createValue(const String& value, CSSPrimitiveValue::UnitTypes type) { return CSSPrimitiveValue::create(value, type); }
     PassRef<CSSPrimitiveValue> createValue(const Length& value, const RenderStyle* style) { return CSSPrimitiveValue::create(value, style); }
-    template<typename T> static PassRefPtr<CSSPrimitiveValue> createValue(T value) { return CSSPrimitiveValue::create(value); }
+    template<typename T> static PassRef<CSSPrimitiveValue> createValue(T value) { return CSSPrimitiveValue::create(value); }
 
     void drain();
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to