| Index: Source/core/layout/LayoutBox.cpp
|
| diff --git a/Source/core/layout/LayoutBox.cpp b/Source/core/layout/LayoutBox.cpp
|
| index aaf15908b75400b2c123c6183c0c7757ec23d129..026fd703ed84d465992bd41a79cfe1c8f31d9d67 100644
|
| --- a/Source/core/layout/LayoutBox.cpp
|
| +++ b/Source/core/layout/LayoutBox.cpp
|
| @@ -1558,60 +1558,6 @@ LayoutUnit LayoutBox::perpendicularContainingBlockLogicalHeight() const
|
| return cb->adjustContentBoxLogicalHeightForBoxSizing(logicalHeightLength.value());
|
| }
|
|
|
| -void LayoutBox::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() + locationOffset();
|
| - if (style()->hasInFlowPosition() && layer())
|
| - offset += layer()->offsetForInFlowPosition();
|
| - transformState.move(offset);
|
| - return;
|
| - }
|
| -
|
| - bool containerSkipped;
|
| - LayoutObject* o = container(paintInvalidationContainer, &containerSkipped);
|
| - if (!o)
|
| - return;
|
| -
|
| - bool isFixedPos = style()->position() == FixedPosition;
|
| - bool hasTransform = hasLayer() && layer()->transform();
|
| - // If this box has a transform, it acts as a fixed position container for fixed descendants,
|
| - // and may itself also be fixed position. So propagate 'fixed' up only if this box is fixed position.
|
| - if (hasTransform && !isFixedPos)
|
| - mode &= ~IsFixed;
|
| - else if (isFixedPos)
|
| - mode |= IsFixed;
|
| -
|
| - if (wasFixed)
|
| - *wasFixed = mode & IsFixed;
|
| -
|
| - 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;
|
| - }
|
| -
|
| - mode &= ~ApplyContainerFlip;
|
| -
|
| - o->mapLocalToContainer(paintInvalidationContainer, transformState, mode, wasFixed);
|
| -}
|
| -
|
| void LayoutBox::mapAbsoluteToLocalPoint(MapCoordinatesFlags mode, TransformState& transformState) const
|
| {
|
| bool isFixedPos = style()->position() == FixedPosition;
|
| @@ -1627,34 +1573,14 @@ void LayoutBox::mapAbsoluteToLocalPoint(MapCoordinatesFlags mode, TransformState
|
| LayoutBoxModelObject::mapAbsoluteToLocalPoint(mode, transformState);
|
| }
|
|
|
| -LayoutSize LayoutBox::offsetFromContainer(const LayoutObject* o, const LayoutPoint& point, bool* offsetDependsOnPoint) const
|
| +LayoutSize LayoutBox::offsetFromContainer(const LayoutObject* o) const
|
| {
|
| - ASSERT(o == container());
|
| -
|
| - LayoutSize offset;
|
| - if (isRelPositioned())
|
| - offset += offsetForInFlowPosition();
|
| -
|
| - if (!isInline() || isReplaced()) {
|
| - offset += topLeftLocationOffset();
|
| - if (o->isLayoutFlowThread()) {
|
| - // So far the point has been in flow thread coordinates (i.e. as if everything in
|
| - // the fragmentation context lived in one tall single column). Convert it to a
|
| - // visual point now.
|
| - LayoutPoint pointInContainer = point + offset;
|
| - offset += o->columnOffset(pointInContainer);
|
| - if (offsetDependsOnPoint)
|
| - *offsetDependsOnPoint = true;
|
| - }
|
| - }
|
| -
|
| - if (o->hasOverflowClip())
|
| - offset -= toLayoutBox(o)->scrolledContentOffset();
|
| + LayoutSize offset = topLeftLocationOffset();
|
|
|
| if (style()->position() == AbsolutePosition && o->isRelPositioned() && o->isLayoutInline())
|
| offset += toLayoutInline(o)->offsetForInFlowPositionedInline(*this);
|
|
|
| - return offset;
|
| + return offset + LayoutBoxModelObject::offsetFromContainer(o);
|
| }
|
|
|
| InlineBox* LayoutBox::createInlineBox()
|
|
|