Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(641)

Unified Diff: Source/core/css/resolver/StyleResolverState.h

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/resolver/StyleResolver.cpp ('k') | Source/core/css/resolver/StyleResolverState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleResolverState.h
diff --git a/Source/core/css/resolver/StyleResolverState.h b/Source/core/css/resolver/StyleResolverState.h
index 508f02ee5bb1b022010952ec13d156302b55c909..a76ff26c4d351aca1ca0b8ee89301bbbbd4ab62a 100644
--- a/Source/core/css/resolver/StyleResolverState.h
+++ b/Source/core/css/resolver/StyleResolverState.h
@@ -33,7 +33,7 @@
#include "core/dom/Document.h"
#include "core/dom/Element.h"
#include "core/layout/style/CachedUAStyle.h"
-#include "core/layout/style/LayoutStyle.h"
+#include "core/layout/style/ComputedStyle.h"
#include "core/layout/style/StyleInheritedData.h"
namespace blink {
@@ -45,8 +45,8 @@ class StyleResolverState {
STACK_ALLOCATED();
WTF_MAKE_NONCOPYABLE(StyleResolverState);
public:
- StyleResolverState(Document&, const ElementResolveContext&, const LayoutStyle* parentStyle);
- StyleResolverState(Document&, Element*, const LayoutStyle* parentStyle = 0);
+ StyleResolverState(Document&, const ElementResolveContext&, const ComputedStyle* parentStyle);
+ StyleResolverState(Document&, Element*, const ComputedStyle* parentStyle = 0);
~StyleResolverState();
// In FontFaceSet and CanvasRenderingContext2D, we don't have an element to grab the document from.
@@ -55,24 +55,24 @@ public:
// These are all just pass-through methods to ElementResolveContext.
Element* element() const { return m_elementContext.element(); }
const ContainerNode* parentNode() const { return m_elementContext.parentNode(); }
- const LayoutStyle* rootElementStyle() const { return m_elementContext.rootElementStyle(); }
+ const ComputedStyle* rootElementStyle() const { return m_elementContext.rootElementStyle(); }
EInsideLink elementLinkState() const { return m_elementContext.elementLinkState(); }
bool distributedToInsertionPoint() const { return m_elementContext.distributedToInsertionPoint(); }
const ElementResolveContext& elementContext() const { return m_elementContext; }
- void setStyle(PassRefPtr<LayoutStyle> style)
+ void setStyle(PassRefPtr<ComputedStyle> style)
{
// FIXME: Improve RAII of StyleResolverState to remove this function.
m_style = style;
m_cssToLengthConversionData = CSSToLengthConversionData(m_style.get(), rootElementStyle(), document().layoutView(), m_style->effectiveZoom());
}
- const LayoutStyle* style() const { return m_style.get(); }
- LayoutStyle* style() { return m_style.get(); }
- PassRefPtr<LayoutStyle> takeStyle() { return m_style.release(); }
+ const ComputedStyle* style() const { return m_style.get(); }
+ ComputedStyle* style() { return m_style.get(); }
+ PassRefPtr<ComputedStyle> takeStyle() { return m_style.release(); }
- LayoutStyle& mutableStyleRef() const { return *m_style; }
- const LayoutStyle& styleRef() const { return mutableStyleRef(); }
+ ComputedStyle& mutableStyleRef() const { return *m_style; }
+ const ComputedStyle& styleRef() const { return mutableStyleRef(); }
const CSSToLengthConversionData& cssToLengthConversionData() const { return m_cssToLengthConversionData; }
@@ -83,9 +83,9 @@ public:
const CSSAnimationUpdate* animationUpdate() { return m_animationUpdate.get(); }
PassOwnPtrWillBeRawPtr<CSSAnimationUpdate> takeAnimationUpdate();
- void setParentStyle(PassRefPtr<LayoutStyle> parentStyle) { m_parentStyle = parentStyle; }
- const LayoutStyle* parentStyle() const { return m_parentStyle.get(); }
- LayoutStyle* parentStyle() { return m_parentStyle.get(); }
+ void setParentStyle(PassRefPtr<ComputedStyle> parentStyle) { m_parentStyle = parentStyle; }
+ const ComputedStyle* parentStyle() const { return m_parentStyle.get(); }
+ ComputedStyle* parentStyle() { return m_parentStyle.get(); }
// FIXME: These are effectively side-channel "out parameters" for the various
// map functions. When we map from CSS to style objects we use this state object
@@ -124,9 +124,9 @@ public:
FontBuilder& fontBuilder() { return m_fontBuilder; }
// FIXME: These exist as a primitive way to track mutations to font-related properties
- // on a LayoutStyle. As designed, these are very error-prone, as some callers
- // set these directly on the LayoutStyle w/o telling us. Presumably we'll
- // want to design a better wrapper around LayoutStyle for tracking these mutations
+ // on a ComputedStyle. As designed, these are very error-prone, as some callers
+ // set these directly on the ComputedStyle w/o telling us. Presumably we'll
+ // want to design a better wrapper around ComputedStyle for tracking these mutations
// and separate it from StyleResolverState.
const FontDescription& parentFontDescription() { return m_parentStyle->fontDescription(); }
@@ -159,13 +159,13 @@ private:
RawPtrWillBeMember<Document> m_document;
// m_style is the primary output for each element's style resolve.
- RefPtr<LayoutStyle> m_style;
+ RefPtr<ComputedStyle> m_style;
CSSToLengthConversionData m_cssToLengthConversionData;
// m_parentStyle is not always just ElementResolveContext::parentStyle,
// so we keep it separate.
- RefPtr<LayoutStyle> m_parentStyle;
+ RefPtr<ComputedStyle> m_parentStyle;
OwnPtrWillBeMember<CSSAnimationUpdate> m_animationUpdate;
« no previous file with comments | « Source/core/css/resolver/StyleResolver.cpp ('k') | Source/core/css/resolver/StyleResolverState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698