Title: [158465] trunk/Source/WebCore
- Revision
- 158465
- Author
- akl...@apple.com
- Date
- 2013-11-01 16:34:47 -0700 (Fri, 01 Nov 2013)
Log Message
CSS 'initial' and 'inherit' value constructors should return PassRef.
<https://webkit.org/b/123641>
Make the helpers involved in constructing CSS{Initial,Inherited}Value
all return PassRef instead of PassRefPtr. This avoids generating
pointless null checks at the call sites.
Reviewed by Darin Adler.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (158464 => 158465)
--- trunk/Source/WebCore/ChangeLog 2013-11-01 23:29:50 UTC (rev 158464)
+++ trunk/Source/WebCore/ChangeLog 2013-11-01 23:34:47 UTC (rev 158465)
@@ -1,5 +1,16 @@
2013-11-01 Andreas Kling <akl...@apple.com>
+ CSS 'initial' and 'inherit' value constructors should return PassRef.
+ <https://webkit.org/b/123641>
+
+ Make the helpers involved in constructing CSS{Initial,Inherited}Value
+ all return PassRef instead of PassRefPtr. This avoids generating
+ pointless null checks at the call sites.
+
+ Reviewed by Darin Adler.
+
+2013-11-01 Andreas Kling <akl...@apple.com>
+
Kill RenderArena.
<https://webkit.org/b/123634>
Modified: trunk/Source/WebCore/css/CSSInheritedValue.h (158464 => 158465)
--- trunk/Source/WebCore/css/CSSInheritedValue.h 2013-11-01 23:29:50 UTC (rev 158464)
+++ trunk/Source/WebCore/css/CSSInheritedValue.h 2013-11-01 23:34:47 UTC (rev 158465)
@@ -28,9 +28,9 @@
class CSSInheritedValue : public CSSValue {
public:
- static PassRefPtr<CSSInheritedValue> create()
+ static PassRef<CSSInheritedValue> create()
{
- return adoptRef(new CSSInheritedValue);
+ return adoptRef(*new CSSInheritedValue);
}
String customCSSText() const;
Modified: trunk/Source/WebCore/css/CSSInitialValue.h (158464 => 158465)
--- trunk/Source/WebCore/css/CSSInitialValue.h 2013-11-01 23:29:50 UTC (rev 158464)
+++ trunk/Source/WebCore/css/CSSInitialValue.h 2013-11-01 23:34:47 UTC (rev 158465)
@@ -28,13 +28,13 @@
class CSSInitialValue : public CSSValue {
public:
- static PassRefPtr<CSSInitialValue> createExplicit()
+ static PassRef<CSSInitialValue> createExplicit()
{
- return adoptRef(new CSSInitialValue(/* implicit */ false));
+ return adoptRef(*new CSSInitialValue(/* implicit */ false));
}
- static PassRefPtr<CSSInitialValue> createImplicit()
+ static PassRef<CSSInitialValue> createImplicit()
{
- return adoptRef(new CSSInitialValue(/* implicit */ true));
+ return adoptRef(*new CSSInitialValue(/* implicit */ true));
}
String customCSSText() const;
Modified: trunk/Source/WebCore/css/CSSValuePool.h (158464 => 158465)
--- trunk/Source/WebCore/css/CSSValuePool.h 2013-11-01 23:29:50 UTC (rev 158464)
+++ trunk/Source/WebCore/css/CSSValuePool.h 2013-11-01 23:34:47 UTC (rev 158465)
@@ -44,9 +44,9 @@
public:
PassRefPtr<CSSValueList> createFontFaceValue(const AtomicString&);
PassRefPtr<CSSPrimitiveValue> createFontFamilyValue(const String&);
- PassRefPtr<CSSInheritedValue> createInheritedValue() { return m_inheritedValue; }
- PassRefPtr<CSSInitialValue> createImplicitInitialValue() { return m_implicitInitialValue; }
- PassRefPtr<CSSInitialValue> createExplicitInitialValue() { return m_explicitInitialValue; }
+ PassRef<CSSInheritedValue> createInheritedValue() { return m_inheritedValue.get(); }
+ PassRef<CSSInitialValue> createImplicitInitialValue() { return m_implicitInitialValue.get(); }
+ PassRef<CSSInitialValue> createExplicitInitialValue() { return m_explicitInitialValue.get(); }
PassRefPtr<CSSPrimitiveValue> createIdentifierValue(CSSValueID identifier);
PassRefPtr<CSSPrimitiveValue> createIdentifierValue(CSSPropertyID identifier);
PassRefPtr<CSSPrimitiveValue> createColorValue(unsigned rgbValue);
@@ -60,9 +60,9 @@
private:
CSSValuePool();
- RefPtr<CSSInheritedValue> m_inheritedValue;
- RefPtr<CSSInitialValue> m_implicitInitialValue;
- RefPtr<CSSInitialValue> m_explicitInitialValue;
+ Ref<CSSInheritedValue> m_inheritedValue;
+ Ref<CSSInitialValue> m_implicitInitialValue;
+ Ref<CSSInitialValue> m_explicitInitialValue;
RefPtr<CSSPrimitiveValue> m_identifierValueCache[numCSSValueKeywords];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes