| Index: Source/core/dom/Document.cpp
|
| diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
|
| index aedb82cfd8d8e76b27f94995805b7fa7464715f8..7ef5ed03dac6fb681e89fe00103a8c2dbc035b4b 100644
|
| --- a/Source/core/dom/Document.cpp
|
| +++ b/Source/core/dom/Document.cpp
|
| @@ -1781,8 +1781,14 @@ void Document::updateLayoutTree(StyleRecalcChange change)
|
| // re-attaching our containing iframe, which when asked HTMLFrameElementBase::isURLAllowed
|
| // hits a null-dereference due to security code always assuming the document has a SecurityOrigin.
|
|
|
| - if (m_elemSheet && m_elemSheet->contents()->usesRemUnits())
|
| - styleEngine().setUsesRemUnit(true);
|
| + if (m_elemSheet) {
|
| + if (m_elemSheet->contents()->usesRemUnits())
|
| + styleEngine().setUsesRemUnit(true);
|
| + if (m_elemSheet->contents()->usesVariables()) {
|
| + ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled());
|
| + styleEngine().setUsesVariables(true);
|
| + }
|
| + }
|
|
|
| updateStyle(change);
|
|
|
| @@ -2844,6 +2850,7 @@ void Document::updateBaseURL()
|
| m_elemSheet = CSSStyleSheet::createInline(this, m_baseURL);
|
| // FIXME: So we are not really the parser. The right fix is to eliminate the element sheet completely.
|
| m_elemSheet->contents()->parserSetUsesRemUnits(usesRemUnits);
|
| + m_elemSheet->contents()->parserSetUsesVariables(m_elemSheet->contents()->usesVariables());
|
| }
|
|
|
| if (!equalIgnoringFragmentIdentifier(oldBaseURL, m_baseURL)) {
|
|
|