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..10bed857f5600ba0a8c327aaaa7540c735196fa6 100644 |
--- a/Source/core/rendering/style/CachedUAStyle.h |
+++ b/Source/core/rendering/style/CachedUAStyle.h |
@@ -32,12 +32,17 @@ namespace WebCore { |
// applyMatchedProperties for later use during adjustRenderStyle. |
class CachedUAStyle { |
public: |
- CachedUAStyle() |
- : hasAppearance(false) |
- , backgroundLayers(BackgroundFillLayer) |
- , backgroundColor(StyleColor::currentColor()) |
- { } |
+ static PassOwnPtr<CachedUAStyle> create(const RenderStyle* style) |
+ { |
+ return adoptPtr(new CachedUAStyle(style)); |
+ } |
+ bool hasAppearance; |
+ BorderData border; |
+ FillLayer backgroundLayers; |
+ StyleColor backgroundColor; |
+ |
+private: |
explicit CachedUAStyle(const RenderStyle* style) |
: hasAppearance(true) |
, backgroundLayers(BackgroundFillLayer) |
@@ -48,14 +53,10 @@ public: |
backgroundLayers = *style->backgroundLayers(); |
backgroundColor = style->backgroundColor(); |
} |
- |
- bool hasAppearance; |
- BorderData border; |
- FillLayer backgroundLayers; |
- StyleColor backgroundColor; |
}; |
+ |
} // namespace WebCore |
#endif // CachedUAStyle_h |