| Index: Source/core/rendering/RenderBox.cpp
|
| diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
|
| index 356f8d868f1f483623db8d66f6b639b43fb3d2ac..1a192ba6dcb31c3b79d3fff7209939c349f012b4 100644
|
| --- a/Source/core/rendering/RenderBox.cpp
|
| +++ b/Source/core/rendering/RenderBox.cpp
|
| @@ -4339,6 +4339,8 @@ LayoutUnit RenderBox::offsetTop() const
|
|
|
| LayoutPoint RenderBox::flipForWritingModeForChild(const RenderBox* child, const LayoutPoint& point) const
|
| {
|
| + if (!UNLIKELY(document().hasVerticalWritingMode()))
|
| + return point;
|
| if (!style()->isFlippedBlocksWritingMode())
|
| return point;
|
|
|
| @@ -4349,63 +4351,15 @@ LayoutPoint RenderBox::flipForWritingModeForChild(const RenderBox* child, const
|
| return LayoutPoint(point.x() + width() - child->width() - (2 * child->x()), point.y());
|
| }
|
|
|
| -void RenderBox::flipForWritingMode(LayoutRect& rect) const
|
| -{
|
| - if (!style()->isFlippedBlocksWritingMode())
|
| - return;
|
| -
|
| - if (isHorizontalWritingMode())
|
| - rect.setY(height() - rect.maxY());
|
| - else
|
| - rect.setX(width() - rect.maxX());
|
| -}
|
| -
|
| -LayoutUnit RenderBox::flipForWritingMode(LayoutUnit position) const
|
| -{
|
| - if (!style()->isFlippedBlocksWritingMode())
|
| - return position;
|
| - return logicalHeight() - position;
|
| -}
|
| -
|
| -LayoutPoint RenderBox::flipForWritingMode(const LayoutPoint& position) const
|
| -{
|
| - if (!style()->isFlippedBlocksWritingMode())
|
| - return position;
|
| - return isHorizontalWritingMode() ? LayoutPoint(position.x(), height() - position.y()) : LayoutPoint(width() - position.x(), position.y());
|
| -}
|
| -
|
| LayoutPoint RenderBox::flipForWritingModeIncludingColumns(const LayoutPoint& point) const
|
| {
|
| + if (!UNLIKELY(document().hasVerticalWritingMode()))
|
| + return point;
|
| if (!hasColumns() || !style()->isFlippedBlocksWritingMode())
|
| return flipForWritingMode(point);
|
| return toRenderBlock(this)->flipForWritingModeIncludingColumns(point);
|
| }
|
|
|
| -LayoutSize RenderBox::flipForWritingMode(const LayoutSize& offset) const
|
| -{
|
| - if (!style()->isFlippedBlocksWritingMode())
|
| - return offset;
|
| - return isHorizontalWritingMode() ? LayoutSize(offset.width(), height() - offset.height()) : LayoutSize(width() - offset.width(), offset.height());
|
| -}
|
| -
|
| -FloatPoint RenderBox::flipForWritingMode(const FloatPoint& position) const
|
| -{
|
| - if (!style()->isFlippedBlocksWritingMode())
|
| - return position;
|
| - return isHorizontalWritingMode() ? FloatPoint(position.x(), height() - position.y()) : FloatPoint(width() - position.x(), position.y());
|
| -}
|
| -
|
| -void RenderBox::flipForWritingMode(FloatRect& rect) const
|
| -{
|
| - if (!style()->isFlippedBlocksWritingMode())
|
| - return;
|
| -
|
| - if (isHorizontalWritingMode())
|
| - rect.setY(height() - rect.maxY());
|
| - else
|
| - rect.setX(width() - rect.maxX());
|
| -}
|
| -
|
| LayoutPoint RenderBox::topLeftLocation() const
|
| {
|
| RenderBlock* containerBlock = containingBlock();
|
|
|