Index: Source/core/rendering/style/CachedUAStyle.h |
diff --git a/Source/core/rendering/style/CachedUAStyle.h b/Source/core/rendering/style/CachedUAStyle.h |
index a3d7446128baca8992dc2d1fc2cd0fdd82991402..8021f90c5dba799bbb1ed72137be1d056976487e 100644 |
--- a/Source/core/rendering/style/CachedUAStyle.h |
+++ b/Source/core/rendering/style/CachedUAStyle.h |
@@ -32,12 +32,14 @@ namespace WebCore { |
// applyMatchedProperties for later use during adjustRenderStyle. |
class CachedUAStyle { |
public: |
- CachedUAStyle() |
- : hasAppearance(false) |
- , backgroundLayers(BackgroundFillLayer) |
- , backgroundColor(StyleColor::currentColor()) |
- { } |
+ static inline PassOwnPtr<CachedUAStyle> create(const RenderStyle*); |
+ |
+ bool hasAppearance; |
+ BorderData border; |
+ FillLayer backgroundLayers; |
+ StyleColor backgroundColor; |
+private: |
explicit CachedUAStyle(const RenderStyle* style) |
: hasAppearance(true) |
, backgroundLayers(BackgroundFillLayer) |
@@ -48,13 +50,12 @@ public: |
backgroundLayers = *style->backgroundLayers(); |
backgroundColor = style->backgroundColor(); |
} |
- |
- bool hasAppearance; |
- BorderData border; |
- FillLayer backgroundLayers; |
- StyleColor backgroundColor; |
}; |
+PassOwnPtr<CachedUAStyle> CachedUAStyle::create(const RenderStyle* style) |
esprehn
2014/06/15 05:09:59
Just put this in the class above.
pdr.
2014/06/15 05:33:45
Done.
|
+{ |
+ return adoptPtr(new CachedUAStyle(style)); |
+} |
} // namespace WebCore |