Index: third_party/WebKit/Source/core/dom/Element.cpp |
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp |
index eb9f8b0bd53da4d62b3319c1e6604d0869563e71..dde22c864e3e8c69e3a0d326fb5b214babe2bcc5 100644 |
--- a/third_party/WebKit/Source/core/dom/Element.cpp |
+++ b/third_party/WebKit/Source/core/dom/Element.cpp |
@@ -429,7 +429,7 @@ |
} |
void Element::scrollIntoView(bool alignToTop) { |
- ensureCompositingInputsClean(); |
+ document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this); |
if (!layoutObject()) |
return; |
@@ -454,7 +454,7 @@ |
} |
void Element::scrollIntoViewIfNeeded(bool centerIfNeeded) { |
- ensureCompositingInputsClean(); |
+ document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this); |
if (!layoutObject()) |
return; |
@@ -634,7 +634,7 @@ |
} |
int Element::offsetLeft() { |
- ensureCompositingInputsClean(); |
+ document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this); |
if (LayoutBoxModelObject* layoutObject = layoutBoxModelObject()) |
return adjustLayoutUnitForAbsoluteZoom( |
LayoutUnit(layoutObject->pixelSnappedOffsetLeft(offsetParent())), |
@@ -644,7 +644,7 @@ |
} |
int Element::offsetTop() { |
- ensureCompositingInputsClean(); |
+ document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this); |
if (LayoutBoxModelObject* layoutObject = layoutBoxModelObject()) |
return adjustLayoutUnitForAbsoluteZoom( |
LayoutUnit(layoutObject->pixelSnappedOffsetTop(offsetParent())), |
@@ -1119,7 +1119,7 @@ |
} |
void Element::clientQuads(Vector<FloatQuad>& quads) { |
- ensureCompositingInputsClean(); |
+ document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this); |
LayoutObject* elementLayoutObject = layoutObject(); |
if (!elementLayoutObject) |
@@ -4120,19 +4120,6 @@ |
activityLogger->logEvent("blinkSetAttribute", argv.size(), argv.data()); |
} |
-void Element::ensureCompositingInputsClean() { |
- if (!inActiveDocument()) |
- return; |
- |
- // The call to updateLifecycleToCompositingCleanPlusScrolling| below would |
- // also run layout for us if we omitted this call. However we do not want to |
- // include pending style sheets when doing the layout, hence this call. |
- document().updateStyleAndLayoutIgnorePendingStylesheets(); |
- |
- if (FrameView* view = document().view()) |
- view->updateLifecycleToCompositingCleanPlusScrolling(); |
-} |
- |
DEFINE_TRACE(Element) { |
if (hasRareData()) |
visitor->trace(elementRareData()); |