Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutObject.h |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h |
| index f59a44bbfcd08d3f4e903cbbc8425c825ebc048f..c12dbe26cc150d7ffc54c4fabb76d11731090e2b 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutObject.h |
| +++ b/third_party/WebKit/Source/core/layout/LayoutObject.h |
| @@ -30,6 +30,7 @@ |
| #include "core/CoreExport.h" |
| #include "core/dom/Document.h" |
| #include "core/dom/DocumentLifecycle.h" |
| +#include "core/dom/PseudoElement.h" |
| #include "core/editing/PositionWithAffinity.h" |
| #include "core/layout/LayoutObjectChildList.h" |
| #include "core/layout/MapCoordinatesFlags.h" |
| @@ -543,6 +544,13 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver, |
| void operator delete(void*); |
| bool isPseudoElement() const { return node() && node()->isPseudoElement(); } |
| + PseudoElement* ownerPseudoElement() { |
| + // NB: This also handles anonymous generated content for a given |
|
rune
2017/04/04 14:23:41
What is anonymous generated content?
emilio
2017/04/04 15:09:18
It's my ability to badly word comments. I meant an
|
| + // pseudo-element. |
| + return m_node && m_node->isPseudoElement() ? toPseudoElement(m_node) |
| + : nullptr; |
| + } |
| + bool isPseudoElementGeneratedContentFor(const PseudoElement&) const; |
|
rune
2017/04/04 14:23:41
This name is incomprehensible. It means that this
emilio
2017/04/04 15:09:18
Yeah, that's the idea. I'm terrible at naming, so
|
| virtual bool isBoxModelObject() const { return false; } |
| bool isBR() const { return isOfType(LayoutObjectBr); } |
| @@ -2064,6 +2072,11 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver, |
| virtual void insertedIntoTree(); |
| virtual void willBeRemovedFromTree(); |
| + void setPseudoForAnonymous(PseudoElement& pseudo) { |
|
rune
2017/04/04 14:23:41
This also needs a better name if possible.
emilio
2017/04/04 15:09:18
Acknowledged.
|
| + DCHECK(isAnonymous()); |
| + m_node = &pseudo; |
| + } |
| + |
| void setDocumentForAnonymous(Document* document) { |
| DCHECK(isAnonymous()); |
| m_node = document; |