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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.h

Issue 2727853002: [css-display] Support display: contents pseudo-elements.
Patch Set: Add missing nullcheck (whoops). Created 3 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
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 52203ef7d78deed99d9c2e611e0d0a1adbd08440..ab95b25652eb2e5ef0510e6a11672e9f16ff6e76 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"
@@ -68,6 +69,7 @@ class LayoutMultiColumnSpannerPlaceholder;
class LayoutView;
class ObjectPaintProperties;
class PaintLayer;
+class PseudoElement;
class PseudoStyleRequest;
struct PaintInfo;
@@ -473,6 +475,7 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
void operator delete(void*);
bool isPseudoElement() const { return node() && node()->isPseudoElement(); }
+ bool isPseudoElementGeneratedContentFor(const PseudoElement&) const;
virtual bool isBoxModelObject() const { return false; }
bool isBR() const { return isOfType(LayoutObjectBr); }
@@ -1986,6 +1989,11 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
virtual void insertedIntoTree();
virtual void willBeRemovedFromTree();
+ void setPseudoForAnonymous(PseudoElement& pseudo) {
+ DCHECK(isAnonymous());
+ m_node = &pseudo;
+ }
+
void setDocumentForAnonymous(Document* document) {
DCHECK(isAnonymous());
m_node = document;

Powered by Google App Engine
This is Rietveld 408576698