Index: Source/core/layout/LayoutObject.h |
diff --git a/Source/core/layout/LayoutObject.h b/Source/core/layout/LayoutObject.h |
index ddb9559a0557daec9653640daa5ef0a5e353937b..e5aadfdb3316d62e2a7cdafe8b6ba694e4bea9df 100644 |
--- a/Source/core/layout/LayoutObject.h |
+++ b/Source/core/layout/LayoutObject.h |
@@ -42,7 +42,7 @@ |
#include "core/layout/SubtreeLayoutScope.h" |
#include "core/layout/compositing/CompositingState.h" |
#include "core/layout/compositing/CompositingTriggers.h" |
-#include "core/layout/style/LayoutStyle.h" |
+#include "core/layout/style/ComputedStyle.h" |
#include "core/layout/style/StyleInheritedData.h" |
#include "platform/geometry/FloatQuad.h" |
#include "platform/geometry/LayoutRect.h" |
@@ -282,7 +282,7 @@ public: |
////////////////////////////////////////// |
virtual bool canHaveChildren() const { return virtualChildren(); } |
virtual bool canHaveGeneratedChildren() const; |
- virtual bool isChildAllowed(LayoutObject*, const LayoutStyle&) const { return true; } |
+ virtual bool isChildAllowed(LayoutObject*, const ComputedStyle&) const { return true; } |
virtual void addChild(LayoutObject* newChild, LayoutObject* beforeChild = 0); |
virtual void addChildIgnoringContinuation(LayoutObject* newChild, LayoutObject* beforeChild = 0) { return addChild(newChild, beforeChild); } |
virtual void removeChild(LayoutObject*); |
@@ -318,7 +318,7 @@ private: |
// Gets pseudoStyle from Shadow host(in case of input elements) |
// or from Parent element. |
- PassRefPtr<LayoutStyle> getUncachedPseudoStyleFromParentOrShadowHost() const; |
+ PassRefPtr<ComputedStyle> getUncachedPseudoStyleFromParentOrShadowHost() const; |
bool skipInvalidationWhenLaidOutChildren() const; |
@@ -335,7 +335,7 @@ public: |
void showLayoutTreeAndMark(const LayoutObject* markedObject1 = 0, const char* markedLabel1 = 0, const LayoutObject* markedObject2 = 0, const char* markedLabel2 = 0, int depth = 0) const; |
#endif |
- static LayoutObject* createObject(Element*, const LayoutStyle&); |
+ static LayoutObject* createObject(Element*, const ComputedStyle&); |
static unsigned instanceCount() { return s_instanceCount; } |
// LayoutObjects are allocated out of the rendering partition. |
@@ -615,8 +615,8 @@ public: |
// The pseudo element style can be cached or uncached. Use the cached method if the pseudo element doesn't respect |
// any pseudo classes (and therefore has no concept of changing state). |
- LayoutStyle* getCachedPseudoStyle(PseudoId, const LayoutStyle* parentStyle = 0) const; |
- PassRefPtr<LayoutStyle> getUncachedPseudoStyle(const PseudoStyleRequest&, const LayoutStyle* parentStyle = 0, const LayoutStyle* ownStyle = 0) const; |
+ ComputedStyle* getCachedPseudoStyle(PseudoId, const ComputedStyle* parentStyle = 0) const; |
+ PassRefPtr<ComputedStyle> getUncachedPseudoStyle(const PseudoStyleRequest&, const ComputedStyle* parentStyle = 0, const ComputedStyle* ownStyle = 0) const; |
virtual void updateDragState(bool dragOn); |
@@ -750,14 +750,14 @@ public: |
virtual void dirtyLinesFromChangedChild(LayoutObject*); |
// Set the style of the object and update the state of the object accordingly. |
- void setStyle(PassRefPtr<LayoutStyle>); |
+ void setStyle(PassRefPtr<ComputedStyle>); |
// Set the style of the object if it's generated content. |
- void setPseudoStyle(PassRefPtr<LayoutStyle>); |
+ void setPseudoStyle(PassRefPtr<ComputedStyle>); |
// Updates only the local style ptr of the object. Does not update the state of the object, |
// and so only should be called when the style is known not to have changed (or from setStyle). |
- void setStyleInternal(PassRefPtr<LayoutStyle> style) { m_style = style; } |
+ void setStyleInternal(PassRefPtr<ComputedStyle> style) { m_style = style; } |
// returns the containing block level element for this element. |
LayoutBlock* containingBlock() const; |
@@ -812,21 +812,21 @@ public: |
virtual LayoutUnit minPreferredLogicalWidth() const { return 0; } |
virtual LayoutUnit maxPreferredLogicalWidth() const { return 0; } |
- LayoutStyle* style() const { return m_style.get(); } |
+ ComputedStyle* style() const { return m_style.get(); } |
// m_style can only be nullptr before the first style is set, thus most |
// callers will never see a nullptr style and should use styleRef(). |
// FIXME: It would be better if style() returned a const reference. |
- const LayoutStyle& styleRef() const { return mutableStyleRef(); } |
- LayoutStyle& mutableStyleRef() const { ASSERT(m_style); return *m_style; } |
+ const ComputedStyle& styleRef() const { return mutableStyleRef(); } |
+ ComputedStyle& mutableStyleRef() const { ASSERT(m_style); return *m_style; } |
/* The following methods are inlined in LayoutObjectInlines.h */ |
- const LayoutStyle* firstLineStyle() const; |
- const LayoutStyle& firstLineStyleRef() const; |
- const LayoutStyle* style(bool firstLine) const; |
- const LayoutStyle& styleRef(bool firstLine) const; |
+ const ComputedStyle* firstLineStyle() const; |
+ const ComputedStyle& firstLineStyleRef() const; |
+ const ComputedStyle* style(bool firstLine) const; |
+ const ComputedStyle& styleRef(bool firstLine) const; |
- static inline Color resolveColor(const LayoutStyle& styleToUse, int colorProperty) |
+ static inline Color resolveColor(const ComputedStyle& styleToUse, int colorProperty) |
{ |
return styleToUse.visitedDependentColor(colorProperty); |
} |
@@ -838,7 +838,7 @@ public: |
// Used only by Element::pseudoStyleCacheIsInvalid to get a first line style based off of a |
// given new style, without accessing the cache. |
- PassRefPtr<LayoutStyle> uncachedFirstLineStyle(LayoutStyle*) const; |
+ PassRefPtr<ComputedStyle> uncachedFirstLineStyle(ComputedStyle*) const; |
virtual CursorDirective getCursor(const LayoutPoint&, Cursor&) const; |
@@ -1165,12 +1165,12 @@ protected: |
// Overrides should call the superclass at the end. m_style will be 0 the first time |
// this function will be called. |
- virtual void styleWillChange(StyleDifference, const LayoutStyle& newStyle); |
+ virtual void styleWillChange(StyleDifference, const ComputedStyle& newStyle); |
// Overrides should call the superclass at the start. |oldStyle| will be 0 the first |
// time this function is called. |
- virtual void styleDidChange(StyleDifference, const LayoutStyle* oldStyle); |
+ virtual void styleDidChange(StyleDifference, const ComputedStyle* oldStyle); |
void propagateStyleToAnonymousChildren(bool blockChildrenOnly = false); |
- virtual void updateAnonymousChildStyle(const LayoutObject& child, LayoutStyle& style) const { } |
+ virtual void updateAnonymousChildStyle(const LayoutObject& child, ComputedStyle& style) const { } |
protected: |
void setSelfMayNeedPaintInvalidation(); |
@@ -1244,7 +1244,7 @@ private: |
void removeFromLayoutFlowThread(); |
void removeFromLayoutFlowThreadRecursive(LayoutFlowThread*); |
- LayoutStyle* cachedFirstLineStyle() const; |
+ ComputedStyle* cachedFirstLineStyle() const; |
StyleDifference adjustStyleDifference(StyleDifference) const; |
Color selectionColor(int colorProperty) const; |
@@ -1263,7 +1263,7 @@ private: |
const LayoutBoxModelObject* invalidatePaintRectangleInternal(const LayoutRect&) const; |
- RefPtr<LayoutStyle> m_style; |
+ RefPtr<ComputedStyle> m_style; |
// Oilpan: raw pointer back to the owning Node is considered safe. |
Node* m_node; |