Diff
Modified: trunk/Source/WebCore/ChangeLog (157567 => 157568)
--- trunk/Source/WebCore/ChangeLog 2013-10-17 09:02:19 UTC (rev 157567)
+++ trunk/Source/WebCore/ChangeLog 2013-10-17 12:15:36 UTC (rev 157568)
@@ -1,3 +1,17 @@
+2013-10-17 Andreas Kling <[email protected]>
+
+ DataRef<T> should use Ref<T> internally.
+ <https://webkit.org/b/122953>
+
+ DataRef is used to hold RenderStyle substructures, and due to the
+ way style inheritance is implemented, DataRef will always point to
+ a live object.
+
+ Codify this by making DataRef::m_data a Ref, and making all methods
+ that create substructure objects return PassRef.
+
+ Reviewed by Antti Koivisto.
+
2013-10-17 Mihnea Ovidenie <[email protected]>
[CSS Regions] Anonymous nested regions
Modified: trunk/Source/WebCore/rendering/style/DataRef.h (157567 => 157568)
--- trunk/Source/WebCore/rendering/style/DataRef.h 2013-10-17 09:02:19 UTC (rev 157567)
+++ trunk/Source/WebCore/rendering/style/DataRef.h 2013-10-17 12:15:36 UTC (rev 157568)
@@ -24,14 +24,19 @@
#ifndef DataRef_h
#define DataRef_h
-#include <wtf/RefPtr.h>
+#include <wtf/PassRef.h>
+#include <wtf/Ref.h>
namespace WebCore {
template <typename T> class DataRef {
public:
- const T* get() const { return m_data.get(); }
+ DataRef(PassRef<T> data) : m_data(std::move(data)) { }
+ DataRef(const DataRef& other) : m_data(const_cast<T&>(other.m_data.get())) { }
+ DataRef& operator=(const DataRef& other) { m_data = const_cast<T&>(other.m_data.get()); return *this; }
+ const T* get() const { return &m_data.get(); }
+
const T& operator*() const { return *get(); }
const T* operator->() const { return get(); }
@@ -39,31 +44,21 @@
{
if (!m_data->hasOneRef())
m_data = m_data->copy();
- return m_data.get();
+ return &m_data.get();
}
- void init()
- {
- ASSERT(!m_data);
- m_data = T::create();
- }
-
bool operator==(const DataRef<T>& o) const
{
- ASSERT(m_data);
- ASSERT(o.m_data);
- return m_data == o.m_data || *m_data == *o.m_data;
+ return &m_data.get() == &o.m_data.get() || m_data.get() == o.m_data.get();
}
bool operator!=(const DataRef<T>& o) const
{
- ASSERT(m_data);
- ASSERT(o.m_data);
- return m_data != o.m_data && *m_data != *o.m_data;
+ return &m_data.get() != &o.m_data.get() && m_data.get() != o.m_data.get();
}
private:
- RefPtr<T> m_data;
+ Ref<T> m_data;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/rendering/style/NinePieceImage.cpp (157567 => 157568)
--- trunk/Source/WebCore/rendering/style/NinePieceImage.cpp 2013-10-17 09:02:19 UTC (rev 157567)
+++ trunk/Source/WebCore/rendering/style/NinePieceImage.cpp 2013-10-17 12:15:36 UTC (rev 157568)
@@ -23,15 +23,14 @@
#include "config.h"
#include "NinePieceImage.h"
+#include <wtf/NeverDestroyed.h>
namespace WebCore {
static DataRef<NinePieceImageData>& defaultData()
{
- static DataRef<NinePieceImageData>* data = "" DataRef<NinePieceImageData>;
- if (!data->get())
- data->init();
- return *data;
+ static NeverDestroyed<DataRef<NinePieceImageData>> data(NinePieceImageData::create());
+ return data.get();
}
NinePieceImage::NinePieceImage()
@@ -40,8 +39,8 @@
}
NinePieceImage::NinePieceImage(PassRefPtr<StyleImage> image, LengthBox imageSlices, bool fill, LengthBox borderSlices, LengthBox outset, ENinePieceImageRule horizontalRule, ENinePieceImageRule verticalRule)
+ : m_data(NinePieceImageData::create())
{
- m_data.init();
m_data.access()->image = image;
m_data.access()->imageSlices = std::move(imageSlices);
m_data.access()->borderSlices = std::move(borderSlices);
Modified: trunk/Source/WebCore/rendering/style/NinePieceImage.h (157567 => 157568)
--- trunk/Source/WebCore/rendering/style/NinePieceImage.h 2013-10-17 09:02:19 UTC (rev 157567)
+++ trunk/Source/WebCore/rendering/style/NinePieceImage.h 2013-10-17 12:15:36 UTC (rev 157568)
@@ -37,8 +37,8 @@
class NinePieceImageData : public RefCounted<NinePieceImageData> {
public:
- static PassRefPtr<NinePieceImageData> create() { return adoptRef(new NinePieceImageData); }
- PassRefPtr<NinePieceImageData> copy() const { return adoptRef(new NinePieceImageData(*this)); }
+ static PassRef<NinePieceImageData> create() { return adoptRef(*new NinePieceImageData); }
+ PassRef<NinePieceImageData> copy() const { return adoptRef(*new NinePieceImageData(*this)); }
bool operator==(const NinePieceImageData&) const;
bool operator!=(const NinePieceImageData& o) const { return !(*this == o); }
Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (157567 => 157568)
--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp 2013-10-17 09:02:19 UTC (rev 157567)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp 2013-10-17 12:15:36 UTC (rev 157568)
@@ -128,29 +128,16 @@
}
ALWAYS_INLINE RenderStyle::RenderStyle(bool)
+ : m_box(StyleBoxData::create())
+ , visual(StyleVisualData::create())
+ , m_background(StyleBackgroundData::create())
+ , surround(StyleSurroundData::create())
+ , rareNonInheritedData(StyleRareNonInheritedData::create())
+ , rareInheritedData(StyleRareInheritedData::create())
+ , inherited(StyleInheritedData::create())
+ , m_svgStyle(SVGRenderStyle::create())
{
setBitDefaults();
-
- m_box.init();
- visual.init();
- m_background.init();
- surround.init();
- rareNonInheritedData.init();
- rareNonInheritedData.access()->m_deprecatedFlexibleBox.init();
- rareNonInheritedData.access()->m_flexibleBox.init();
- rareNonInheritedData.access()->m_marquee.init();
- rareNonInheritedData.access()->m_multiCol.init();
- rareNonInheritedData.access()->m_transform.init();
-#if ENABLE(CSS_FILTERS)
- rareNonInheritedData.access()->m_filter.init();
-#endif
- rareNonInheritedData.access()->m_grid.init();
- rareNonInheritedData.access()->m_gridItem.init();
- rareInheritedData.init();
- inherited.init();
-#if ENABLE(SVG)
- m_svgStyle.init();
-#endif
}
ALWAYS_INLINE RenderStyle::RenderStyle(const RenderStyle& o)
Modified: trunk/Source/WebCore/rendering/style/SVGRenderStyle.cpp (157567 => 157568)
--- trunk/Source/WebCore/rendering/style/SVGRenderStyle.cpp 2013-10-17 09:02:19 UTC (rev 157567)
+++ trunk/Source/WebCore/rendering/style/SVGRenderStyle.cpp 2013-10-17 12:15:36 UTC (rev 157568)
@@ -35,55 +35,62 @@
#include "IntRect.h"
#include "NodeRenderStyle.h"
#include "SVGElement.h"
+#include <wtf/NeverDestroyed.h>
using namespace std;
namespace WebCore {
-SVGRenderStyle::SVGRenderStyle()
+static const SVGRenderStyle& defaultSVGStyle()
{
- static SVGRenderStyle* defaultStyle = new SVGRenderStyle(CreateDefault);
+ static NeverDestroyed<DataRef<SVGRenderStyle>> style(SVGRenderStyle::createDefaultStyle());
+ return *style.get().get();
+}
- fill = defaultStyle->fill;
- stroke = defaultStyle->stroke;
- text = defaultStyle->text;
- stops = defaultStyle->stops;
- misc = defaultStyle->misc;
- shadowSVG = defaultStyle->shadowSVG;
- inheritedResources = defaultStyle->inheritedResources;
- resources = defaultStyle->resources;
+PassRef<SVGRenderStyle> SVGRenderStyle::createDefaultStyle()
+{
+ return adoptRef(*new SVGRenderStyle(CreateDefault));
+}
+SVGRenderStyle::SVGRenderStyle()
+ : fill(defaultSVGStyle().fill)
+ , stroke(defaultSVGStyle().stroke)
+ , text(defaultSVGStyle().text)
+ , inheritedResources(defaultSVGStyle().inheritedResources)
+ , stops(defaultSVGStyle().stops)
+ , misc(defaultSVGStyle().misc)
+ , shadowSVG(defaultSVGStyle().shadowSVG)
+ , resources(defaultSVGStyle().resources)
+{
setBitDefaults();
}
SVGRenderStyle::SVGRenderStyle(CreateDefaultType)
+ : fill(StyleFillData::create())
+ , stroke(StyleStrokeData::create())
+ , text(StyleTextData::create())
+ , inheritedResources(StyleInheritedResourceData::create())
+ , stops(StyleStopData::create())
+ , misc(StyleMiscData::create())
+ , shadowSVG(StyleShadowSVGData::create())
+ , resources(StyleResourceData::create())
{
setBitDefaults();
-
- fill.init();
- stroke.init();
- text.init();
- stops.init();
- misc.init();
- shadowSVG.init();
- inheritedResources.init();
- resources.init();
}
SVGRenderStyle::SVGRenderStyle(const SVGRenderStyle& other)
: RefCounted<SVGRenderStyle>()
+ , svg_inherited_flags(other.svg_inherited_flags)
+ , svg_noninherited_flags(other.svg_noninherited_flags)
+ , fill(other.fill)
+ , stroke(other.stroke)
+ , text(other.text)
+ , inheritedResources(other.inheritedResources)
+ , stops(other.stops)
+ , misc(other.misc)
+ , shadowSVG(other.shadowSVG)
+ , resources(other.resources)
{
- fill = other.fill;
- stroke = other.stroke;
- text = other.text;
- stops = other.stops;
- misc = other.misc;
- shadowSVG = other.shadowSVG;
- inheritedResources = other.inheritedResources;
- resources = other.resources;
-
- svg_inherited_flags = other.svg_inherited_flags;
- svg_noninherited_flags = other.svg_noninherited_flags;
}
SVGRenderStyle::~SVGRenderStyle()
Modified: trunk/Source/WebCore/rendering/style/SVGRenderStyle.h (157567 => 157568)
--- trunk/Source/WebCore/rendering/style/SVGRenderStyle.h 2013-10-17 09:02:19 UTC (rev 157567)
+++ trunk/Source/WebCore/rendering/style/SVGRenderStyle.h 2013-10-17 12:15:36 UTC (rev 157568)
@@ -41,8 +41,9 @@
class SVGRenderStyle : public RefCounted<SVGRenderStyle> {
public:
- static PassRefPtr<SVGRenderStyle> create() { return adoptRef(new SVGRenderStyle); }
- PassRefPtr<SVGRenderStyle> copy() const { return adoptRef(new SVGRenderStyle(*this));}
+ static PassRef<SVGRenderStyle> createDefaultStyle();
+ static PassRef<SVGRenderStyle> create() { return adoptRef(*new SVGRenderStyle); }
+ PassRef<SVGRenderStyle> copy() const { return adoptRef(*new SVGRenderStyle(*this));}
~SVGRenderStyle();
bool inheritedNotEqual(const SVGRenderStyle*) const;
Modified: trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.h (157567 => 157568)
--- trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.h 2013-10-17 09:02:19 UTC (rev 157567)
+++ trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.h 2013-10-17 12:15:36 UTC (rev 157568)
@@ -101,8 +101,8 @@
// Inherited/Non-Inherited Style Datastructures
class StyleFillData : public RefCounted<StyleFillData> {
public:
- static PassRefPtr<StyleFillData> create() { return adoptRef(new StyleFillData); }
- PassRefPtr<StyleFillData> copy() const { return adoptRef(new StyleFillData(*this)); }
+ static PassRef<StyleFillData> create() { return adoptRef(*new StyleFillData); }
+ PassRef<StyleFillData> copy() const { return adoptRef(*new StyleFillData(*this)); }
bool operator==(const StyleFillData&) const;
bool operator!=(const StyleFillData& other) const
@@ -125,8 +125,8 @@
class StyleStrokeData : public RefCounted<StyleStrokeData> {
public:
- static PassRefPtr<StyleStrokeData> create() { return adoptRef(new StyleStrokeData); }
- PassRefPtr<StyleStrokeData> copy() const { return adoptRef(new StyleStrokeData(*this)); }
+ static PassRef<StyleStrokeData> create() { return adoptRef(*new StyleStrokeData); }
+ PassRef<StyleStrokeData> copy() const { return adoptRef(*new StyleStrokeData(*this)); }
bool operator==(const StyleStrokeData&) const;
bool operator!=(const StyleStrokeData& other) const
@@ -155,8 +155,8 @@
class StyleStopData : public RefCounted<StyleStopData> {
public:
- static PassRefPtr<StyleStopData> create() { return adoptRef(new StyleStopData); }
- PassRefPtr<StyleStopData> copy() const { return adoptRef(new StyleStopData(*this)); }
+ static PassRef<StyleStopData> create() { return adoptRef(*new StyleStopData); }
+ PassRef<StyleStopData> copy() const { return adoptRef(*new StyleStopData(*this)); }
bool operator==(const StyleStopData&) const;
bool operator!=(const StyleStopData& other) const
@@ -174,8 +174,8 @@
class StyleTextData : public RefCounted<StyleTextData> {
public:
- static PassRefPtr<StyleTextData> create() { return adoptRef(new StyleTextData); }
- PassRefPtr<StyleTextData> copy() const { return adoptRef(new StyleTextData(*this)); }
+ static PassRef<StyleTextData> create() { return adoptRef(*new StyleTextData); }
+ PassRef<StyleTextData> copy() const { return adoptRef(*new StyleTextData(*this)); }
bool operator==(const StyleTextData& other) const;
bool operator!=(const StyleTextData& other) const
@@ -193,8 +193,8 @@
// Note: the rule for this class is, *no inheritance* of these props
class StyleMiscData : public RefCounted<StyleMiscData> {
public:
- static PassRefPtr<StyleMiscData> create() { return adoptRef(new StyleMiscData); }
- PassRefPtr<StyleMiscData> copy() const { return adoptRef(new StyleMiscData(*this)); }
+ static PassRef<StyleMiscData> create() { return adoptRef(*new StyleMiscData); }
+ PassRef<StyleMiscData> copy() const { return adoptRef(*new StyleMiscData(*this)); }
bool operator==(const StyleMiscData&) const;
bool operator!=(const StyleMiscData& other) const
@@ -216,8 +216,8 @@
class StyleShadowSVGData : public RefCounted<StyleShadowSVGData> {
public:
- static PassRefPtr<StyleShadowSVGData> create() { return adoptRef(new StyleShadowSVGData); }
- PassRefPtr<StyleShadowSVGData> copy() const { return adoptRef(new StyleShadowSVGData(*this)); }
+ static PassRef<StyleShadowSVGData> create() { return adoptRef(*new StyleShadowSVGData); }
+ PassRef<StyleShadowSVGData> copy() const { return adoptRef(*new StyleShadowSVGData(*this)); }
bool operator==(const StyleShadowSVGData&) const;
bool operator!=(const StyleShadowSVGData& other) const
@@ -235,8 +235,8 @@
// Non-inherited resources
class StyleResourceData : public RefCounted<StyleResourceData> {
public:
- static PassRefPtr<StyleResourceData> create() { return adoptRef(new StyleResourceData); }
- PassRefPtr<StyleResourceData> copy() const { return adoptRef(new StyleResourceData(*this)); }
+ static PassRef<StyleResourceData> create() { return adoptRef(*new StyleResourceData); }
+ PassRef<StyleResourceData> copy() const { return adoptRef(*new StyleResourceData(*this)); }
bool operator==(const StyleResourceData&) const;
bool operator!=(const StyleResourceData& other) const
@@ -256,8 +256,8 @@
// Inherited resources
class StyleInheritedResourceData : public RefCounted<StyleInheritedResourceData> {
public:
- static PassRefPtr<StyleInheritedResourceData> create() { return adoptRef(new StyleInheritedResourceData); }
- PassRefPtr<StyleInheritedResourceData> copy() const { return adoptRef(new StyleInheritedResourceData(*this)); }
+ static PassRef<StyleInheritedResourceData> create() { return adoptRef(*new StyleInheritedResourceData); }
+ PassRef<StyleInheritedResourceData> copy() const { return adoptRef(*new StyleInheritedResourceData(*this)); }
bool operator==(const StyleInheritedResourceData&) const;
bool operator!=(const StyleInheritedResourceData& other) const
Modified: trunk/Source/WebCore/rendering/style/StyleBackgroundData.h (157567 => 157568)
--- trunk/Source/WebCore/rendering/style/StyleBackgroundData.h 2013-10-17 09:02:19 UTC (rev 157567)
+++ trunk/Source/WebCore/rendering/style/StyleBackgroundData.h 2013-10-17 12:15:36 UTC (rev 157568)
@@ -35,8 +35,8 @@
class StyleBackgroundData : public RefCounted<StyleBackgroundData> {
public:
- static PassRefPtr<StyleBackgroundData> create() { return adoptRef(new StyleBackgroundData); }
- PassRefPtr<StyleBackgroundData> copy() const { return adoptRef(new StyleBackgroundData(*this)); }
+ static PassRef<StyleBackgroundData> create() { return adoptRef(*new StyleBackgroundData); }
+ PassRef<StyleBackgroundData> copy() const { return adoptRef(*new StyleBackgroundData(*this)); }
~StyleBackgroundData() { }
bool operator==(const StyleBackgroundData& o) const;
Modified: trunk/Source/WebCore/rendering/style/StyleBoxData.h (157567 => 157568)
--- trunk/Source/WebCore/rendering/style/StyleBoxData.h 2013-10-17 09:02:19 UTC (rev 157567)
+++ trunk/Source/WebCore/rendering/style/StyleBoxData.h 2013-10-17 12:15:36 UTC (rev 157568)
@@ -34,8 +34,8 @@
class StyleBoxData : public RefCounted<StyleBoxData> {
public:
- static PassRefPtr<StyleBoxData> create() { return adoptRef(new StyleBoxData); }
- PassRefPtr<StyleBoxData> copy() const { return adoptRef(new StyleBoxData(*this)); }
+ static PassRef<StyleBoxData> create() { return adoptRef(*new StyleBoxData); }
+ PassRef<StyleBoxData> copy() const { return adoptRef(*new StyleBoxData(*this)); }
bool operator==(const StyleBoxData& o) const;
bool operator!=(const StyleBoxData& o) const
Modified: trunk/Source/WebCore/rendering/style/StyleDeprecatedFlexibleBoxData.h (157567 => 157568)
--- trunk/Source/WebCore/rendering/style/StyleDeprecatedFlexibleBoxData.h 2013-10-17 09:02:19 UTC (rev 157567)
+++ trunk/Source/WebCore/rendering/style/StyleDeprecatedFlexibleBoxData.h 2013-10-17 12:15:36 UTC (rev 157568)
@@ -32,8 +32,8 @@
class StyleDeprecatedFlexibleBoxData : public RefCounted<StyleDeprecatedFlexibleBoxData> {
public:
- static PassRefPtr<StyleDeprecatedFlexibleBoxData> create() { return adoptRef(new StyleDeprecatedFlexibleBoxData); }
- PassRefPtr<StyleDeprecatedFlexibleBoxData> copy() const { return adoptRef(new StyleDeprecatedFlexibleBoxData(*this)); }
+ static PassRef<StyleDeprecatedFlexibleBoxData> create() { return adoptRef(*new StyleDeprecatedFlexibleBoxData); }
+ PassRef<StyleDeprecatedFlexibleBoxData> copy() const { return adoptRef(*new StyleDeprecatedFlexibleBoxData(*this)); }
bool operator==(const StyleDeprecatedFlexibleBoxData&) const;
bool operator!=(const StyleDeprecatedFlexibleBoxData& o) const
Modified: trunk/Source/WebCore/rendering/style/StyleFilterData.h (157567 => 157568)
--- trunk/Source/WebCore/rendering/style/StyleFilterData.h 2013-10-17 09:02:19 UTC (rev 157567)
+++ trunk/Source/WebCore/rendering/style/StyleFilterData.h 2013-10-17 12:15:36 UTC (rev 157568)
@@ -36,8 +36,8 @@
class StyleFilterData : public RefCounted<StyleFilterData> {
public:
- static PassRefPtr<StyleFilterData> create() { return adoptRef(new StyleFilterData); }
- PassRefPtr<StyleFilterData> copy() const { return adoptRef(new StyleFilterData(*this)); }
+ static PassRef<StyleFilterData> create() { return adoptRef(*new StyleFilterData); }
+ PassRef<StyleFilterData> copy() const { return adoptRef(*new StyleFilterData(*this)); }
bool operator==(const StyleFilterData&) const;
bool operator!=(const StyleFilterData& o) const
Modified: trunk/Source/WebCore/rendering/style/StyleFlexibleBoxData.h (157567 => 157568)
--- trunk/Source/WebCore/rendering/style/StyleFlexibleBoxData.h 2013-10-17 09:02:19 UTC (rev 157567)
+++ trunk/Source/WebCore/rendering/style/StyleFlexibleBoxData.h 2013-10-17 12:15:36 UTC (rev 157568)
@@ -35,8 +35,8 @@
class StyleFlexibleBoxData : public RefCounted<StyleFlexibleBoxData> {
public:
- static PassRefPtr<StyleFlexibleBoxData> create() { return adoptRef(new StyleFlexibleBoxData); }
- PassRefPtr<StyleFlexibleBoxData> copy() const { return adoptRef(new StyleFlexibleBoxData(*this)); }
+ static PassRef<StyleFlexibleBoxData> create() { return adoptRef(*new StyleFlexibleBoxData); }
+ PassRef<StyleFlexibleBoxData> copy() const { return adoptRef(*new StyleFlexibleBoxData(*this)); }
bool operator==(const StyleFlexibleBoxData&) const;
bool operator!=(const StyleFlexibleBoxData& o) const
Modified: trunk/Source/WebCore/rendering/style/StyleGridData.h (157567 => 157568)
--- trunk/Source/WebCore/rendering/style/StyleGridData.h 2013-10-17 09:02:19 UTC (rev 157567)
+++ trunk/Source/WebCore/rendering/style/StyleGridData.h 2013-10-17 12:15:36 UTC (rev 157568)
@@ -40,8 +40,8 @@
class StyleGridData : public RefCounted<StyleGridData> {
public:
- static PassRefPtr<StyleGridData> create() { return adoptRef(new StyleGridData); }
- PassRefPtr<StyleGridData> copy() const { return adoptRef(new StyleGridData(*this)); }
+ static PassRef<StyleGridData> create() { return adoptRef(*new StyleGridData); }
+ PassRef<StyleGridData> copy() const { return adoptRef(*new StyleGridData(*this)); }
bool operator==(const StyleGridData& o) const
{
Modified: trunk/Source/WebCore/rendering/style/StyleGridItemData.h (157567 => 157568)
--- trunk/Source/WebCore/rendering/style/StyleGridItemData.h 2013-10-17 09:02:19 UTC (rev 157567)
+++ trunk/Source/WebCore/rendering/style/StyleGridItemData.h 2013-10-17 12:15:36 UTC (rev 157568)
@@ -41,8 +41,8 @@
class StyleGridItemData : public RefCounted<StyleGridItemData> {
public:
- static PassRefPtr<StyleGridItemData> create() { return adoptRef(new StyleGridItemData); }
- PassRefPtr<StyleGridItemData> copy() const { return adoptRef(new StyleGridItemData(*this)); }
+ static PassRef<StyleGridItemData> create() { return adoptRef(*new StyleGridItemData); }
+ PassRef<StyleGridItemData> copy() const { return adoptRef(*new StyleGridItemData(*this)); }
bool operator==(const StyleGridItemData& o) const
{
Modified: trunk/Source/WebCore/rendering/style/StyleInheritedData.h (157567 => 157568)
--- trunk/Source/WebCore/rendering/style/StyleInheritedData.h 2013-10-17 09:02:19 UTC (rev 157567)
+++ trunk/Source/WebCore/rendering/style/StyleInheritedData.h 2013-10-17 12:15:36 UTC (rev 157568)
@@ -36,8 +36,8 @@
class StyleInheritedData : public RefCounted<StyleInheritedData> {
public:
- static PassRefPtr<StyleInheritedData> create() { return adoptRef(new StyleInheritedData); }
- PassRefPtr<StyleInheritedData> copy() const { return adoptRef(new StyleInheritedData(*this)); }
+ static PassRef<StyleInheritedData> create() { return adoptRef(*new StyleInheritedData); }
+ PassRef<StyleInheritedData> copy() const { return adoptRef(*new StyleInheritedData(*this)); }
~StyleInheritedData();
bool operator==(const StyleInheritedData& o) const;
Modified: trunk/Source/WebCore/rendering/style/StyleMarqueeData.h (157567 => 157568)
--- trunk/Source/WebCore/rendering/style/StyleMarqueeData.h 2013-10-17 09:02:19 UTC (rev 157567)
+++ trunk/Source/WebCore/rendering/style/StyleMarqueeData.h 2013-10-17 12:15:36 UTC (rev 157568)
@@ -34,8 +34,8 @@
class StyleMarqueeData : public RefCounted<StyleMarqueeData> {
public:
- static PassRefPtr<StyleMarqueeData> create() { return adoptRef(new StyleMarqueeData); }
- PassRefPtr<StyleMarqueeData> copy() const { return adoptRef(new StyleMarqueeData(*this)); }
+ static PassRef<StyleMarqueeData> create() { return adoptRef(*new StyleMarqueeData); }
+ PassRef<StyleMarqueeData> copy() const { return adoptRef(*new StyleMarqueeData(*this)); }
bool operator==(const StyleMarqueeData& o) const;
bool operator!=(const StyleMarqueeData& o) const
Modified: trunk/Source/WebCore/rendering/style/StyleMultiColData.h (157567 => 157568)
--- trunk/Source/WebCore/rendering/style/StyleMultiColData.h 2013-10-17 09:02:19 UTC (rev 157567)
+++ trunk/Source/WebCore/rendering/style/StyleMultiColData.h 2013-10-17 12:15:36 UTC (rev 157568)
@@ -37,8 +37,8 @@
class StyleMultiColData : public RefCounted<StyleMultiColData> {
public:
- static PassRefPtr<StyleMultiColData> create() { return adoptRef(new StyleMultiColData); }
- PassRefPtr<StyleMultiColData> copy() const { return adoptRef(new StyleMultiColData(*this)); }
+ static PassRef<StyleMultiColData> create() { return adoptRef(*new StyleMultiColData); }
+ PassRef<StyleMultiColData> copy() const { return adoptRef(*new StyleMultiColData(*this)); }
bool operator==(const StyleMultiColData& o) const;
bool operator!=(const StyleMultiColData &o) const
Modified: trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp (157567 => 157568)
--- trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp 2013-10-17 09:02:19 UTC (rev 157567)
+++ trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp 2013-10-17 12:15:36 UTC (rev 157568)
@@ -129,11 +129,11 @@
#endif
#if ENABLE(TOUCH_EVENTS)
, tapHighlightColor(RenderStyle::initialTapHighlightColor())
-#endif
-{
+#endif
#if ENABLE(CSS_VARIABLES)
- m_variables.init();
+ , m_variables(StyleVariableData::create())
#endif
+{
}
StyleRareInheritedData::StyleRareInheritedData(const StyleRareInheritedData& o)
Modified: trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h (157567 => 157568)
--- trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h 2013-10-17 09:02:19 UTC (rev 157567)
+++ trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h 2013-10-17 12:15:36 UTC (rev 157568)
@@ -52,8 +52,8 @@
// actually uses one of these properties.
class StyleRareInheritedData : public RefCounted<StyleRareInheritedData> {
public:
- static PassRefPtr<StyleRareInheritedData> create() { return adoptRef(new StyleRareInheritedData); }
- PassRefPtr<StyleRareInheritedData> copy() const { return adoptRef(new StyleRareInheritedData(*this)); }
+ static PassRef<StyleRareInheritedData> create() { return adoptRef(*new StyleRareInheritedData); }
+ PassRef<StyleRareInheritedData> copy() const { return adoptRef(*new StyleRareInheritedData(*this)); }
~StyleRareInheritedData();
bool operator==(const StyleRareInheritedData& o) const;
Modified: trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp (157567 => 157568)
--- trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp 2013-10-17 09:02:19 UTC (rev 157567)
+++ trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp 2013-10-17 12:15:36 UTC (rev 157568)
@@ -44,6 +44,16 @@
#if ENABLE(DRAGGABLE_REGION)
, m_draggableRegionMode(DraggableRegionNone)
#endif
+ , m_deprecatedFlexibleBox(StyleDeprecatedFlexibleBoxData::create())
+ , m_flexibleBox(StyleFlexibleBoxData::create())
+ , m_marquee(StyleMarqueeData::create())
+ , m_multiCol(StyleMultiColData::create())
+ , m_transform(StyleTransformData::create())
+#if ENABLE(CSS_FILTERS)
+ , m_filter(StyleFilterData::create())
+#endif
+ , m_grid(StyleGridData::create())
+ , m_gridItem(StyleGridItemData::create())
, m_mask(FillLayer(MaskFillLayer))
, m_pageSize()
#if ENABLE(CSS_SHAPES)
Modified: trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h (157567 => 157568)
--- trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h 2013-10-17 09:02:19 UTC (rev 157567)
+++ trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h 2013-10-17 12:15:36 UTC (rev 157568)
@@ -77,8 +77,8 @@
// actually uses one of these properties.
class StyleRareNonInheritedData : public RefCounted<StyleRareNonInheritedData> {
public:
- static PassRefPtr<StyleRareNonInheritedData> create() { return adoptRef(new StyleRareNonInheritedData); }
- PassRefPtr<StyleRareNonInheritedData> copy() const { return adoptRef(new StyleRareNonInheritedData(*this)); }
+ static PassRef<StyleRareNonInheritedData> create() { return adoptRef(*new StyleRareNonInheritedData); }
+ PassRef<StyleRareNonInheritedData> copy() const { return adoptRef(*new StyleRareNonInheritedData(*this)); }
~StyleRareNonInheritedData();
bool operator==(const StyleRareNonInheritedData&) const;
Modified: trunk/Source/WebCore/rendering/style/StyleSurroundData.h (157567 => 157568)
--- trunk/Source/WebCore/rendering/style/StyleSurroundData.h 2013-10-17 09:02:19 UTC (rev 157567)
+++ trunk/Source/WebCore/rendering/style/StyleSurroundData.h 2013-10-17 12:15:36 UTC (rev 157568)
@@ -34,8 +34,8 @@
class StyleSurroundData : public RefCounted<StyleSurroundData> {
public:
- static PassRefPtr<StyleSurroundData> create() { return adoptRef(new StyleSurroundData); }
- PassRefPtr<StyleSurroundData> copy() const { return adoptRef(new StyleSurroundData(*this)); }
+ static PassRef<StyleSurroundData> create() { return adoptRef(*new StyleSurroundData); }
+ PassRef<StyleSurroundData> copy() const { return adoptRef(*new StyleSurroundData(*this)); }
bool operator==(const StyleSurroundData& o) const;
bool operator!=(const StyleSurroundData& o) const
Modified: trunk/Source/WebCore/rendering/style/StyleTransformData.h (157567 => 157568)
--- trunk/Source/WebCore/rendering/style/StyleTransformData.h 2013-10-17 09:02:19 UTC (rev 157567)
+++ trunk/Source/WebCore/rendering/style/StyleTransformData.h 2013-10-17 12:15:36 UTC (rev 157568)
@@ -34,8 +34,8 @@
class StyleTransformData : public RefCounted<StyleTransformData> {
public:
- static PassRefPtr<StyleTransformData> create() { return adoptRef(new StyleTransformData); }
- PassRefPtr<StyleTransformData> copy() const { return adoptRef(new StyleTransformData(*this)); }
+ static PassRef<StyleTransformData> create() { return adoptRef(*new StyleTransformData); }
+ PassRef<StyleTransformData> copy() const { return adoptRef(*new StyleTransformData(*this)); }
bool operator==(const StyleTransformData& o) const;
bool operator!=(const StyleTransformData& o) const
Modified: trunk/Source/WebCore/rendering/style/StyleVariableData.h (157567 => 157568)
--- trunk/Source/WebCore/rendering/style/StyleVariableData.h 2013-10-17 09:02:19 UTC (rev 157567)
+++ trunk/Source/WebCore/rendering/style/StyleVariableData.h 2013-10-17 12:15:36 UTC (rev 157568)
@@ -46,8 +46,8 @@
class StyleVariableData : public RefCounted<StyleVariableData> {
public:
- static PassRefPtr<StyleVariableData> create() { return adoptRef(new StyleVariableData()); }
- PassRefPtr<StyleVariableData> copy() const { return adoptRef(new StyleVariableData(*this)); }
+ static PassRef<StyleVariableData> create() { return adoptRef(*new StyleVariableData()); }
+ PassRef<StyleVariableData> copy() const { return adoptRef(*new StyleVariableData(*this)); }
bool operator==(const StyleVariableData& other) const { return other.m_data == m_data; }
bool operator!=(const StyleVariableData& other) const { return !(*this == other); }
Modified: trunk/Source/WebCore/rendering/style/StyleVisualData.h (157567 => 157568)
--- trunk/Source/WebCore/rendering/style/StyleVisualData.h 2013-10-17 09:02:19 UTC (rev 157567)
+++ trunk/Source/WebCore/rendering/style/StyleVisualData.h 2013-10-17 12:15:36 UTC (rev 157568)
@@ -34,8 +34,8 @@
class StyleVisualData : public RefCounted<StyleVisualData> {
public:
- static PassRefPtr<StyleVisualData> create() { return adoptRef(new StyleVisualData); }
- PassRefPtr<StyleVisualData> copy() const { return adoptRef(new StyleVisualData(*this)); }
+ static PassRef<StyleVisualData> create() { return adoptRef(*new StyleVisualData); }
+ PassRef<StyleVisualData> copy() const { return adoptRef(*new StyleVisualData(*this)); }
~StyleVisualData();
bool operator==(const StyleVisualData& o) const