summaryrefslogtreecommitdiff
path: root/Source/WebCore/dom/Element.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/dom/Element.cpp')
-rw-r--r--Source/WebCore/dom/Element.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/Source/WebCore/dom/Element.cpp b/Source/WebCore/dom/Element.cpp
index 15804a3fa..9176f8977 100644
--- a/Source/WebCore/dom/Element.cpp
+++ b/Source/WebCore/dom/Element.cpp
@@ -999,7 +999,7 @@ void Element::removedFrom(ContainerNode* insertionPoint)
void Element::attach()
{
suspendPostAttachCallbacks();
- RenderWidget::suspendWidgetHierarchyUpdates();
+ WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates;
createRendererIfNeeded();
StyleResolverParentPusher parentPusher(this);
@@ -1028,7 +1028,6 @@ void Element::attach()
}
}
- RenderWidget::resumeWidgetHierarchyUpdates();
resumePostAttachCallbacks();
}
@@ -1042,7 +1041,7 @@ void Element::unregisterNamedFlowContentNode()
void Element::detach()
{
- RenderWidget::suspendWidgetHierarchyUpdates();
+ WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates;
unregisterNamedFlowContentNode();
cancelFocusAppearanceUpdate();
if (hasRareData()) {
@@ -1055,8 +1054,6 @@ void Element::detach()
shadow->detach();
}
ContainerNode::detach();
-
- RenderWidget::resumeWidgetHierarchyUpdates();
}
bool Element::pseudoStyleCacheIsInvalid(const RenderStyle* currentStyle, RenderStyle* newStyle)
@@ -1176,7 +1173,7 @@ void Element::recalcStyle(StyleChange change)
// If "rem" units are used anywhere in the document, and if the document element's font size changes, then go ahead and force font updating
// all the way down the tree. This is simpler than having to maintain a cache of objects (and such font size changes should be rare anyway).
- if (document()->usesRemUnits() && document()->documentElement() == this && ch != NoChange && currentStyle && newStyle && currentStyle->fontSize() != newStyle->fontSize()) {
+ if (document()->styleSheetCollection()->usesRemUnits() && document()->documentElement() == this && ch != NoChange && currentStyle && newStyle && currentStyle->fontSize() != newStyle->fontSize()) {
// Cached RenderStyles may depend on the rem units.
document()->styleResolver()->invalidateMatchedPropertiesCache();
change = Force;