| Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| index 2dae9193d9c32f32b75eeb6aa231e20bf0b40965..5a99fceca47d3732f411d633448c13cf90f9239f 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| @@ -991,15 +991,11 @@ bool LayoutBox::mapScrollingContentsRectToBoxSpace(LayoutRect& rect, ApplyOverfl
|
| return true;
|
|
|
| LayoutSize offset = LayoutSize(-scrolledContentOffset());
|
| - if (UNLIKELY(hasFlippedBlocksWritingMode()))
|
| - offset.setWidth(-offset.width());
|
| rect.move(offset);
|
|
|
| if (applyOverflowClip == ApplyNonScrollOverflowClip && scrollsOverflow())
|
| return true;
|
|
|
| - flipForWritingMode(rect);
|
| -
|
| LayoutRect clipRect = overflowClipRect(LayoutPoint());
|
|
|
| bool doesIntersect;
|
| @@ -1009,8 +1005,6 @@ bool LayoutBox::mapScrollingContentsRectToBoxSpace(LayoutRect& rect, ApplyOverfl
|
| rect.intersect(clipRect);
|
| doesIntersect = !rect.isEmpty();
|
| }
|
| - if (doesIntersect)
|
| - flipForWritingMode(rect);
|
| return doesIntersect;
|
| }
|
|
|
| @@ -2046,11 +2040,8 @@ bool LayoutBox::mapToVisualRectInAncestorSpace(const LayoutBoxModelObject* ances
|
| {
|
| inflateVisualRectForReflectionAndFilter(rect);
|
|
|
| - if (ancestor == this) {
|
| - // The final rect returned is always in the physical coordinate space of the ancestor.
|
| - flipForWritingMode(rect);
|
| + if (ancestor == this)
|
| return true;
|
| - }
|
|
|
| bool ancestorSkipped;
|
| bool filterOrReflectionSkipped;
|
| @@ -2061,25 +2052,16 @@ bool LayoutBox::mapToVisualRectInAncestorSpace(const LayoutBoxModelObject* ances
|
| if (filterOrReflectionSkipped)
|
| inflateVisualRectForReflectionAndFilterUnderContainer(rect, *container, ancestor);
|
|
|
| - // The rect we compute at each step is shifted by our x/y offset in the parent container's coordinate space.
|
| - // Only when we cross a writing mode boundary will we have to possibly flipForWritingMode (to convert into a more
|
| - // appropriate offset corner for the enclosing container).
|
| - if (isWritingModeRoot()) {
|
| - flipForWritingMode(rect);
|
| - // Then flip rect currently in physical direction to container's block direction.
|
| - if (container->styleRef().isFlippedBlocksWritingMode())
|
| - rect.setX(m_frameRect.width() - rect.maxX());
|
| - }
|
| -
|
| LayoutPoint topLeft = rect.location();
|
| - topLeft.move(locationOffset());
|
| + if (!(isInline() && isLayoutInline()))
|
| + topLeft.moveBy(topLeftLocation());
|
|
|
| // We are now in our parent container's coordinate space. Apply our transform to obtain a bounding box
|
| // in the parent's coordinate space that encloses us.
|
| if (hasLayer() && layer()->transform()) {
|
| rect = LayoutRect(layer()->transform()->mapRect(pixelSnappedIntRect(rect)));
|
| topLeft = rect.location();
|
| - topLeft.move(locationOffset());
|
| + topLeft.moveBy(topLeftLocation());
|
| }
|
|
|
| const ComputedStyle& styleToUse = styleRef();
|
| @@ -2102,7 +2084,7 @@ bool LayoutBox::mapToVisualRectInAncestorSpace(const LayoutBoxModelObject* ances
|
| return false;
|
|
|
| if (ancestorSkipped) {
|
| - // If the ancestor is below o, then we need to map the rect into ancestor's coordinates.
|
| + // If the ancestor is below the container, then we need to map the rect into ancestor's coordinates.
|
| LayoutSize containerOffset = ancestor->offsetFromAncestorContainer(container);
|
| rect.move(-containerOffset);
|
| // If the ancestor is fixed, then the rect is already in its coordinates so doesn't need viewport-adjusting.
|
|
|