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

Side by Side Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 2647533002: Force compositing inputs to be clean for getBoundingClientRect (Closed)
Patch Set: For discussion; only do compositing update when in sticky subtree 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
8 * All rights reserved. 8 * All rights reserved.
9 * (C) 2007 Eric Seidel (eric@webkit.org) 9 * (C) 2007 Eric Seidel (eric@webkit.org)
10 * 10 *
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 return rect; 1118 return rect;
1119 } 1119 }
1120 1120
1121 void Element::clientQuads(Vector<FloatQuad>& quads) { 1121 void Element::clientQuads(Vector<FloatQuad>& quads) {
1122 document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this); 1122 document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
1123 1123
1124 LayoutObject* elementLayoutObject = layoutObject(); 1124 LayoutObject* elementLayoutObject = layoutObject();
1125 if (!elementLayoutObject) 1125 if (!elementLayoutObject)
1126 return; 1126 return;
1127 1127
1128 FrameView* view = document().view();
1129 if (UNLIKELY(view && elementLayoutObject->enclosingBoxModelObject() &&
1130 elementLayoutObject->enclosingBoxModelObject()
1131 ->isInStickySubtree())) {
1132 view->updateLifecycleToCompositingCleanPlusScrolling();
chrishtr 2017/01/19 21:29:19 Hmm. I think this will be incorrect if layout/styl
smcgruer 2017/01/20 01:40:41 I think those are all fair points. I'm happy to re
flackr 2017/01/20 02:19:41 We could certainly measure how often we actually d
smcgruer 2017/01/20 02:32:29 Ack, uploaded new PS that takes the code back to P
1133 }
1134
1128 if (isSVGElement() && !elementLayoutObject->isSVGRoot()) { 1135 if (isSVGElement() && !elementLayoutObject->isSVGRoot()) {
1129 // Get the bounding rectangle from the SVG model. 1136 // Get the bounding rectangle from the SVG model.
1130 if (toSVGElement(this)->isSVGGraphicsElement()) 1137 if (toSVGElement(this)->isSVGGraphicsElement())
1131 quads.push_back(elementLayoutObject->localToAbsoluteQuad( 1138 quads.push_back(elementLayoutObject->localToAbsoluteQuad(
1132 elementLayoutObject->objectBoundingBox())); 1139 elementLayoutObject->objectBoundingBox()));
1133 return; 1140 return;
1134 } 1141 }
1135 1142
1136 // FIXME: Handle table/inline-table with a caption. 1143 // FIXME: Handle table/inline-table with a caption.
1137 if (elementLayoutObject->isBoxModelObject() || elementLayoutObject->isBR()) 1144 if (elementLayoutObject->isBoxModelObject() || elementLayoutObject->isBR())
(...skipping 2992 matching lines...) Expand 10 before | Expand all | Expand 10 after
4130 } 4137 }
4131 4138
4132 DEFINE_TRACE_WRAPPERS(Element) { 4139 DEFINE_TRACE_WRAPPERS(Element) {
4133 if (hasRareData()) { 4140 if (hasRareData()) {
4134 visitor->traceWrappers(elementRareData()); 4141 visitor->traceWrappers(elementRareData());
4135 } 4142 }
4136 ContainerNode::traceWrappers(visitor); 4143 ContainerNode::traceWrappers(visitor);
4137 } 4144 }
4138 4145
4139 } // namespace blink 4146 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698