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; |