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

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 localToAncestorQuadWithoutTransforms and use container and sticky box rect offsets. 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..9488b171adb53029c112ed886c8ab8d6dcdd328e 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -2238,14 +2238,21 @@ FloatQuad LayoutObject::localToAncestorQuad(
const FloatQuad& localQuad,
const LayoutBoxModelObject* ancestor,
MapCoordinatesFlags mode) const {
+ return localToAncestorQuadWithoutTransforms(localQuad, ancestor,
+ mode | UseTransforms);
+}
+
+FloatQuad LayoutObject::localToAncestorQuadWithoutTransforms(
Xianzhu 2017/01/24 22:53:11 I like the direction of the new code, but localA
flackr 2017/01/25 13:23:24 Done.
+ 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