Index: third_party/WebKit/Source/core/layout/LayoutObject.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
index f9660903f4b0737c6183822d5baf5c0f4d9d1f0c..024e8e5b61fe699460dc69e9bf6d9ff93e783566 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
@@ -35,6 +35,7 @@ |
#include "core/css/resolver/StyleResolver.h" |
#include "core/dom/AXObjectCache.h" |
#include "core/dom/ElementTraversal.h" |
+#include "core/dom/PseudoElement.h" |
#include "core/dom/StyleChangeReason.h" |
#include "core/dom/StyleEngine.h" |
#include "core/dom/shadow/ShadowRoot.h" |
@@ -1580,6 +1581,11 @@ void LayoutObject::setPseudoStyle(PassRefPtr<ComputedStyle> pseudoStyle) { |
setStyle(std::move(pseudoStyle)); |
} |
+bool LayoutObject::isPseudoElementGeneratedContentFor( |
+ const PseudoElement& pseudo) const { |
+ return isAnonymous() && m_node.get() == &pseudo; |
+} |
+ |
void LayoutObject::firstLineStyleDidChange(const ComputedStyle& oldStyle, |
const ComputedStyle& newStyle) { |
StyleDifference diff = oldStyle.visualInvalidationDiff(newStyle); |
@@ -3072,6 +3078,9 @@ ComputedStyle* LayoutObject::cachedFirstLineStyle() const { |
ComputedStyle* LayoutObject::getCachedPseudoStyle( |
PseudoId pseudo, |
const ComputedStyle* parentStyle) const { |
rune
2017/03/13 10:29:50
So, longer term, we'd remove this method as well,
emilio
2017/03/13 13:28:31
Yes, I think that'd be saner.
|
+ DCHECK_NE(pseudo, PseudoIdBefore); |
+ DCHECK_NE(pseudo, PseudoIdAfter); |
+ |
if (pseudo < FirstInternalPseudoId && !style()->hasPseudoStyle(pseudo)) |
return nullptr; |