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

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

Issue 2647533002: Force compositing inputs to be clean for getBoundingClientRect (Closed)
Patch Set: Only force compositing input update if we're in the active document Created 3 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d5ea539ee3527b4a3f90bb8e3b32abb76b499bdf..35b5897441f5ac726b50add9068003417590a9f4 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -1121,6 +1121,14 @@ IntRect Element::visibleBoundsInVisualViewport() const {
void Element::clientQuads(Vector<FloatQuad>& quads) {
document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
+ // To ensure that the quads are correct for position:sticky elements or
+ // descendants, compositing inputs must be clean. In most cases this should
+ // already be true but not always e.g. if javascript has dirtied layout/style
+ // and then requested bounds on an element without yielding.
+ FrameView* view = document().view();
+ if (inActiveDocument() && view)
+ view->updateLifecycleToCompositingCleanPlusScrolling();
flackr 2017/01/20 02:47:02 I suspect we'll need to do this for a lot of other
smcgruer 2017/01/20 16:07:09 Done. I think it could also be just an anon functi
+
LayoutObject* elementLayoutObject = layoutObject();
if (!elementLayoutObject)
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698