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

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

Issue 1516003003: Merge LayoutInline::mapLocalToAncestor() into LayoutObject. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review constness + bonus constness Created 4 years, 10 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/LayoutInline.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutInline.cpp b/third_party/WebKit/Source/core/layout/LayoutInline.cpp
index a4c0baaf6e75d3d87b54f5d1938f6406c77fbb18..0fcce8b18b8b20ecdaec27fd96ae94d2d0d479b9 100644
--- a/third_party/WebKit/Source/core/layout/LayoutInline.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutInline.cpp
@@ -1155,54 +1155,6 @@ PaintLayerType LayoutInline::layerTypeRequired() const
|| style()->hasCompositorProxy() || style()->containsPaint() ? NormalPaintLayer : NoPaintLayer;
}
-void LayoutInline::mapLocalToAncestor(const LayoutBoxModelObject* ancestor, TransformState& transformState, MapCoordinatesFlags mode, bool* wasFixed, const PaintInvalidationState* paintInvalidationState) const
-{
- if (ancestor == this)
- return;
-
- if (paintInvalidationState && paintInvalidationState->canMapToContainer(ancestor)) {
- LayoutSize offset = paintInvalidationState->paintOffset();
- if (style()->hasInFlowPosition() && layer())
- offset += layer()->offsetForInFlowPosition();
- transformState.move(offset);
- return;
- }
-
- bool containerSkipped;
- LayoutObject* o = container(ancestor, &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 = ancestor->offsetFromAncestorContainer(o);
- transformState.move(-containerOffset.width(), -containerOffset.height(), preserve3D ? TransformState::AccumulateTransform : TransformState::FlattenTransform);
- return;
- }
-
- o->mapLocalToAncestor(ancestor, transformState, mode, wasFixed, paintInvalidationState);
-}
-
void LayoutInline::updateDragState(bool dragOn)
{
LayoutBoxModelObject::updateDragState(dragOn);
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutInline.h ('k') | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698