| Index: Source/core/dom/Document.cpp
|
| diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
|
| index b6e91f24d5543f0f9a7d752612536bf4db254e34..6209e42bc9b569c48f27a4f6de717c6f1d864232 100644
|
| --- a/Source/core/dom/Document.cpp
|
| +++ b/Source/core/dom/Document.cpp
|
| @@ -1729,8 +1729,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);
|
|
|
| @@ -2778,6 +2784,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)) {
|
|
|