Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Unified Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 2825343003: Clean compositing inputs for location APIs for sticky-affected elements. (Closed)
Patch Set: Rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 9e22bf067b59f01a58ce245bc9a14358d1735e64..406ccfc9b05755070367a8ca7eaf22f6ba2fb7c2 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -431,7 +431,7 @@ AtomicString Element::LowercaseIfNecessary(const AtomicString& name) const {
}
void Element::scrollIntoView(bool align_to_top) {
- GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
+ GetDocument().EnsurePaintLocationDataValidForNode(this);
if (!GetLayoutObject())
return;
@@ -456,7 +456,7 @@ void Element::scrollIntoView(bool align_to_top) {
}
void Element::scrollIntoViewIfNeeded(bool center_if_needed) {
- GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
+ GetDocument().EnsurePaintLocationDataValidForNode(this);
if (!GetLayoutObject())
return;
@@ -643,7 +643,7 @@ void Element::CallApplyScroll(ScrollState& scroll_state) {
}
int Element::OffsetLeft() {
- GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
+ GetDocument().EnsurePaintLocationDataValidForNode(this);
if (LayoutBoxModelObject* layout_object = GetLayoutBoxModelObject())
return AdjustLayoutUnitForAbsoluteZoom(
LayoutUnit(
@@ -654,7 +654,7 @@ int Element::OffsetLeft() {
}
int Element::OffsetTop() {
- GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
+ GetDocument().EnsurePaintLocationDataValidForNode(this);
if (LayoutBoxModelObject* layout_object = GetLayoutBoxModelObject())
return AdjustLayoutUnitForAbsoluteZoom(
LayoutUnit(layout_object->PixelSnappedOffsetTop(OffsetParent())),
@@ -664,7 +664,7 @@ int Element::OffsetTop() {
}
int Element::OffsetWidth() {
- GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
+ GetDocument().EnsurePaintLocationDataValidForNode(this);
if (LayoutBoxModelObject* layout_object = GetLayoutBoxModelObject())
return AdjustLayoutUnitForAbsoluteZoom(
LayoutUnit(
@@ -675,7 +675,7 @@ int Element::OffsetWidth() {
}
int Element::OffsetHeight() {
- GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
+ GetDocument().EnsurePaintLocationDataValidForNode(this);
if (LayoutBoxModelObject* layout_object = GetLayoutBoxModelObject())
return AdjustLayoutUnitForAbsoluteZoom(
LayoutUnit(
@@ -1089,7 +1089,7 @@ bool Element::HasNonEmptyLayoutSize() const {
}
IntRect Element::BoundsInViewport() const {
- GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets();
+ GetDocument().EnsurePaintLocationDataValidForNode(this);
FrameView* view = GetDocument().View();
if (!view)
@@ -1132,7 +1132,7 @@ IntRect Element::VisibleBoundsInVisualViewport() const {
}
void Element::ClientQuads(Vector<FloatQuad>& quads) {
- GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
+ GetDocument().EnsurePaintLocationDataValidForNode(this);
LayoutObject* element_layout_object = GetLayoutObject();
if (!element_layout_object)
« no previous file with comments | « third_party/WebKit/Source/core/dom/DocumentTest.cpp ('k') | third_party/WebKit/Source/core/dom/ElementTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698