Index: Source/core/dom/TreeScope.cpp |
diff --git a/Source/core/dom/TreeScope.cpp b/Source/core/dom/TreeScope.cpp |
index 0edb20cf2b66e6765bf442bc9f89da67c8ca227f..b763292fee21504b14075ada0dbee55bf85edf1a 100644 |
--- a/Source/core/dom/TreeScope.cpp |
+++ b/Source/core/dom/TreeScope.cpp |
@@ -497,4 +497,15 @@ Element* TreeScope::getElementByAccessKey(const String& key) const |
return result; |
} |
+void TreeScope::setNeedsStyleRecalcForViewportUnits() |
+{ |
+ for (Element* element = ElementTraversal::firstWithin(*rootNode()); element; element = ElementTraversal::nextIncludingPseudo(*element)) { |
+ for (ShadowRoot* root = element->youngestShadowRoot(); root; root = root->olderShadowRoot()) |
+ root->setNeedsStyleRecalcForViewportUnits(); |
+ RenderStyle* style = element->renderStyle(); |
+ if (style && style->hasViewportUnits()) |
+ element->setNeedsStyleRecalc(LocalStyleChange); |
+ } |
+} |
+ |
} // namespace WebCore |