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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2658783006: Add offset contributed to sticky position box rect by location containers (Closed)
Patch Set: 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
Index: third_party/WebKit/Source/core/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index fae72842b367f9582de641faae9588229239546c..b5f82161f715d5037408dd464fcc40636cb03645 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -2237,14 +2237,28 @@ FloatQuad LayoutObject::localToAncestorQuad(
const FloatQuad& localQuad,
const LayoutBoxModelObject* ancestor,
MapCoordinatesFlags mode) const {
+ return localToAncestorQuadInternal(localQuad, ancestor, mode | UseTransforms);
+}
+
+FloatQuad LayoutObject::localToAncestorQuadWithoutTransforms(
+ const FloatQuad& localQuad,
+ const LayoutBoxModelObject* ancestor,
+ MapCoordinatesFlags mode) const {
+ DCHECK(!(mode & UseTransforms));
+ return localToAncestorQuadInternal(localQuad, ancestor, mode);
+}
+
+FloatQuad LayoutObject::localToAncestorQuadInternal(
+ const FloatQuad& localQuad,
+ const LayoutBoxModelObject* ancestor,
+ MapCoordinatesFlags mode) const {
// Track the point at the center of the quad's bounding box. As
// mapLocalToAncestor() calls offsetFromContainer(), it will use that point
// as the reference point to decide which column's transform to apply in
// multiple-column blocks.
TransformState transformState(TransformState::ApplyTransformDirection,
localQuad.boundingBox().center(), localQuad);
- mapLocalToAncestor(ancestor, transformState,
- mode | ApplyContainerFlip | UseTransforms);
+ mapLocalToAncestor(ancestor, transformState, mode | ApplyContainerFlip);
transformState.flatten();
return transformState.lastPlanarQuad();

Powered by Google App Engine
This is Rietveld 408576698