OLD | NEW |
---|---|
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 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1114 // We don't use absoluteBoundingBoxRect() because it can return an IntRect | 1114 // We don't use absoluteBoundingBoxRect() because it can return an IntRect |
1115 // larger the actual size by 1px. crbug.com/470503 | 1115 // larger the actual size by 1px. crbug.com/470503 |
1116 rect.intersect(document().view()->contentsToViewport( | 1116 rect.intersect(document().view()->contentsToViewport( |
1117 roundedIntRect(layoutObject()->absoluteBoundingBoxFloatRect()))); | 1117 roundedIntRect(layoutObject()->absoluteBoundingBoxFloatRect()))); |
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 // To ensure that the quads are correct for position:sticky elements or | |
1125 // descendants, compositing inputs must be clean. In most cases this should | |
1126 // already be true but not always e.g. if javascript has dirtied layout/style | |
1127 // and then requested bounds on an element without yielding. | |
1128 FrameView* view = document().view(); | |
1129 if (inActiveDocument() && view) | |
1130 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
| |
1131 | |
1124 LayoutObject* elementLayoutObject = layoutObject(); | 1132 LayoutObject* elementLayoutObject = layoutObject(); |
1125 if (!elementLayoutObject) | 1133 if (!elementLayoutObject) |
1126 return; | 1134 return; |
1127 | 1135 |
1128 if (isSVGElement() && !elementLayoutObject->isSVGRoot()) { | 1136 if (isSVGElement() && !elementLayoutObject->isSVGRoot()) { |
1129 // Get the bounding rectangle from the SVG model. | 1137 // Get the bounding rectangle from the SVG model. |
1130 if (toSVGElement(this)->isSVGGraphicsElement()) | 1138 if (toSVGElement(this)->isSVGGraphicsElement()) |
1131 quads.push_back(elementLayoutObject->localToAbsoluteQuad( | 1139 quads.push_back(elementLayoutObject->localToAbsoluteQuad( |
1132 elementLayoutObject->objectBoundingBox())); | 1140 elementLayoutObject->objectBoundingBox())); |
1133 return; | 1141 return; |
(...skipping 2996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4130 } | 4138 } |
4131 | 4139 |
4132 DEFINE_TRACE_WRAPPERS(Element) { | 4140 DEFINE_TRACE_WRAPPERS(Element) { |
4133 if (hasRareData()) { | 4141 if (hasRareData()) { |
4134 visitor->traceWrappers(elementRareData()); | 4142 visitor->traceWrappers(elementRareData()); |
4135 } | 4143 } |
4136 ContainerNode::traceWrappers(visitor); | 4144 ContainerNode::traceWrappers(visitor); |
4137 } | 4145 } |
4138 | 4146 |
4139 } // namespace blink | 4147 } // namespace blink |
OLD | NEW |