Chromium Code Reviews| Index: Source/core/layout/LayoutObject.h |
| diff --git a/Source/core/layout/LayoutObject.h b/Source/core/layout/LayoutObject.h |
| index 63e56b9c8c67b90a3b3a9229b7f50bd1cbb1d0d4..5bfd59c7794b07a5128a160dc48922f7cad4a2e3 100644 |
| --- a/Source/core/layout/LayoutObject.h |
| +++ b/Source/core/layout/LayoutObject.h |
| @@ -601,8 +601,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, LayoutStyle* parentStyle = 0) const; |
| - PassRefPtr<LayoutStyle> getUncachedPseudoStyle(const PseudoStyleRequest&, LayoutStyle* parentStyle = 0, LayoutStyle* ownStyle = 0) const; |
| + LayoutStyle* getCachedPseudoStyle(PseudoId, const LayoutStyle* parentStyle = 0) const; |
| + PassRefPtr<LayoutStyle> getUncachedPseudoStyle(const PseudoStyleRequest&, const LayoutStyle* parentStyle = 0, const LayoutStyle* ownStyle = 0) const; |
| virtual void updateDragState(bool dragOn); |
| @@ -798,7 +798,8 @@ public: |
| virtual LayoutUnit minPreferredLogicalWidth() const { return 0; } |
| virtual LayoutUnit maxPreferredLogicalWidth() const { return 0; } |
| - LayoutStyle* style() const { return m_style.get(); } |
| + const LayoutStyle* style() const { return m_style.get(); } |
| + LayoutStyle* mutableStyle() 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(). |
| @@ -807,9 +808,9 @@ public: |
| LayoutStyle& mutableStyleRef() const { ASSERT(m_style); return *m_style; } |
| /* The following methods are inlined in LayoutObjectInlines.h */ |
| - LayoutStyle* firstLineStyle() const; |
| + const LayoutStyle* firstLineStyle() const; |
| const LayoutStyle& firstLineStyleRef() const; |
| - LayoutStyle* style(bool firstLine) const; |
| + const LayoutStyle* style(bool firstLine) const; |
| const LayoutStyle& styleRef(bool firstLine) const; |
|
rune
2015/02/10 12:03:01
Why do you need the pointer-return variants?
I as
rune
2015/02/10 12:03:01
Do we really need the pointer-return variants?
Wh
Julien - ping for review
2015/02/10 23:10:43
We do. The reason is that there is a small window
|
| static inline Color resolveColor(const LayoutStyle& styleToUse, int colorProperty) |