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

Unified Diff: Source/core/layout/LayoutInline.cpp

Issue 1181953005: Merge LayoutInline::mapAbsoluteToLocalPoint() into LayoutObject. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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: Source/core/layout/LayoutInline.cpp
diff --git a/Source/core/layout/LayoutInline.cpp b/Source/core/layout/LayoutInline.cpp
index a7f8d2498b278cc8fcd15b269bcb1b6a5ed8e47a..5ca2700abaae12a1a250006802248e0d50c50fbb 100644
--- a/Source/core/layout/LayoutInline.cpp
+++ b/Source/core/layout/LayoutInline.cpp
@@ -1145,54 +1145,6 @@ LayoutSize LayoutInline::offsetFromContainer(const LayoutObject* container, cons
return offset;
}
-void LayoutInline::mapLocalToContainer(const LayoutBoxModelObject* paintInvalidationContainer, TransformState& transformState, MapCoordinatesFlags mode, bool* wasFixed, const PaintInvalidationState* paintInvalidationState) const
-{
- if (paintInvalidationContainer == this)
- return;
-
- if (paintInvalidationState && paintInvalidationState->canMapToContainer(paintInvalidationContainer)) {
- LayoutSize offset = paintInvalidationState->paintOffset();
- if (style()->hasInFlowPosition() && layer())
- offset += layer()->offsetForInFlowPosition();
- transformState.move(offset);
- return;
- }
-
- bool containerSkipped;
- LayoutObject* o = container(paintInvalidationContainer, &containerSkipped);
- if (!o)
- return;
-
- if (mode & ApplyContainerFlip && o->isBox()) {
- if (o->style()->isFlippedBlocksWritingMode()) {
- IntPoint centerPoint = roundedIntPoint(transformState.mappedPoint());
- transformState.move(toLayoutBox(o)->flipForWritingMode(LayoutPoint(centerPoint)) - centerPoint);
- }
- mode &= ~ApplyContainerFlip;
- }
-
- LayoutSize containerOffset = offsetFromContainer(o, roundedLayoutPoint(transformState.mappedPoint()));
-
- bool preserve3D = mode & UseTransforms && (o->style()->preserves3D() || style()->preserves3D());
- if (mode & UseTransforms && shouldUseTransformFromContainer(o)) {
- TransformationMatrix t;
- getTransformFromContainer(o, containerOffset, t);
- transformState.applyTransform(t, preserve3D ? TransformState::AccumulateTransform : TransformState::FlattenTransform);
- } else {
- transformState.move(containerOffset.width(), containerOffset.height(), preserve3D ? TransformState::AccumulateTransform : TransformState::FlattenTransform);
- }
-
- if (containerSkipped) {
- // There can't be a transform between paintInvalidationContainer and o, because transforms create containers, so it should be safe
- // to just subtract the delta between the paintInvalidationContainer and o.
- LayoutSize containerOffset = paintInvalidationContainer->offsetFromAncestorContainer(o);
- transformState.move(-containerOffset.width(), -containerOffset.height(), preserve3D ? TransformState::AccumulateTransform : TransformState::FlattenTransform);
- return;
- }
-
- o->mapLocalToContainer(paintInvalidationContainer, transformState, mode, wasFixed, paintInvalidationState);
-}
-
void LayoutInline::updateDragState(bool dragOn)
{
LayoutBoxModelObject::updateDragState(dragOn);

Powered by Google App Engine
This is Rietveld 408576698