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

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

Issue 2646133002: Add offset contributed to sticky position box rect by location containers (Closed)
Patch Set: Add localToAncestorQuadInternal. 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 fa4d1c1e25981cdc0e9ed8acd3e685f2caf5507a..1bb5c34bf25a12f7bdcc9c3425b855fe1d446c5f 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -2238,14 +2238,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