| Index: third_party/WebKit/Source/core/dom/LayoutTreeBuilder.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/LayoutTreeBuilder.cpp b/third_party/WebKit/Source/core/dom/LayoutTreeBuilder.cpp
|
| index d6df798b0f74e0a0ac49c3206c4ce4bbbb770dde..026e0f3260b3aa1170b814d5e556918e5f35da88 100644
|
| --- a/third_party/WebKit/Source/core/dom/LayoutTreeBuilder.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/LayoutTreeBuilder.cpp
|
| @@ -100,8 +100,15 @@ bool LayoutTreeBuilderForElement::shouldCreateLayoutObject() const {
|
| }
|
|
|
| ComputedStyle& LayoutTreeBuilderForElement::style() const {
|
| - if (!m_style)
|
| - m_style = m_node->styleForLayoutObject();
|
| + if (!m_style) {
|
| + if (m_node->hasCustomStyleCallbacks()) {
|
| + m_style = m_node->styleForLayoutObject();
|
| + }
|
| + else {
|
| + m_style = m_node->document().getStyleReattachData(*m_node).computedStyle.get();
|
| + }
|
| + }
|
| + DCHECK(m_style);
|
| return *m_style;
|
| }
|
|
|
|
|