| 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 6e66dcecbf1827f0aa76ed281430a9a10e05164a..c5a185e1fde853ee40e84ddfb8704a3eebe5bf01 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
|
| @@ -174,8 +174,11 @@ LayoutObject* LayoutObject::createObject(Element* element,
|
|
|
| switch (style.display()) {
|
| case EDisplay::None:
|
| - case EDisplay::Contents:
|
| return nullptr;
|
| + case EDisplay::Contents:
|
| + if (LIKELY(!element->isPseudoElement()))
|
| + return nullptr;
|
| + // fall through
|
| case EDisplay::Inline:
|
| return new LayoutInline(element);
|
| case EDisplay::Block:
|
| @@ -3019,6 +3022,9 @@ ComputedStyle* LayoutObject::cachedFirstLineStyle() const {
|
| ComputedStyle* LayoutObject::getCachedPseudoStyle(
|
| PseudoId pseudo,
|
| const ComputedStyle* parentStyle) const {
|
| + DCHECK_NE(pseudo, PseudoIdBefore);
|
| + DCHECK_NE(pseudo, PseudoIdAfter);
|
| +
|
| if (pseudo < FirstInternalPseudoId && !style()->hasPseudoStyle(pseudo))
|
| return nullptr;
|
|
|
|
|