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..e4589602368c0ff0cd546ec20d1ce10059b2fa1d 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()); |
} |
+ComputedStyle* Element::displayContentsStyle() const { |
+ if (layoutObject() || !hasRareData()) |
+ return 0; |
jfernandez
2016/10/27 17:08:01
return nullptr
|
+ |
+ ComputedStyle* style = elementRareData()->computedStyle(); |
+ if (!style || style->display() != EDisplay::Contents) |
+ return 0; |
jfernandez
2016/10/27 17:08:01
return nullptr
|
+ |
+ return style; |
+} |
+ |
+void Element::storeDisplayContentsStyle(ComputedStyle& style) { |
+ DCHECK_EQ(style.display(), EDisplay::Contents); |
+ ensureElementRareData().setComputedStyle(&style); |
jfernandez
2016/10/27 17:08:01
The setComputedStyle argument is a PassRefPtr so I
|
+} |
+ |
AtomicString Element::computeInheritedLanguage() const { |
const Node* n = this; |
AtomicString value; |