| Index: third_party/WebKit/Source/core/dom/Element.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
|
| index 24b75742fc9986422bbe76bbeb7380fefc21829f..1535fd480a6b5d3556f9819f200fd72c0a0972f3 100644
|
| --- a/third_party/WebKit/Source/core/dom/Element.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Element.cpp
|
| @@ -1527,7 +1527,8 @@ const AtomicString Element::imageSourceURL() const {
|
| }
|
|
|
| bool Element::layoutObjectIsNeeded(const ComputedStyle& style) {
|
| - return style.display() != EDisplay::None;
|
| + return style.display() != EDisplay::None &&
|
| + style.display() != EDisplay::Contents;
|
| }
|
|
|
| LayoutObject* Element::createLayoutObject(const ComputedStyle& style) {
|
| @@ -3133,6 +3134,22 @@ const ComputedStyle* Element::ensureComputedStyle(
|
| return elementStyle->addCachedPseudoStyle(result.release());
|
| }
|
|
|
| +const ComputedStyle* Element::displayContentsStyle() const {
|
| + if (layoutObject() || !hasRareData())
|
| + return nullptr;
|
| +
|
| + ComputedStyle* style = elementRareData()->computedStyle();
|
| + if (!style || style->display() != EDisplay::Contents)
|
| + return nullptr;
|
| +
|
| + return style;
|
| +}
|
| +
|
| +void Element::storeDisplayContentsStyle(ComputedStyle& style) {
|
| + DCHECK_EQ(style.display(), EDisplay::Contents);
|
| + ensureElementRareData().setComputedStyle(&style);
|
| +}
|
| +
|
| AtomicString Element::computeInheritedLanguage() const {
|
| const Node* n = this;
|
| AtomicString value;
|
|
|