Chromium Code Reviews| Index: Source/core/rendering/shapes/ShapeOutsideInfo.cpp |
| diff --git a/Source/core/rendering/shapes/ShapeOutsideInfo.cpp b/Source/core/rendering/shapes/ShapeOutsideInfo.cpp |
| index 6b4138b66064792b7e32429ee8adf85d9171312b..90e1566862e638a9830d15bac13234b879b02276 100644 |
| --- a/Source/core/rendering/shapes/ShapeOutsideInfo.cpp |
| +++ b/Source/core/rendering/shapes/ShapeOutsideInfo.cpp |
| @@ -307,4 +307,39 @@ void ShapeOutsideInfo::updateDeltasForContainingBlockLine(const RenderBlockFlow& |
| } |
| } |
| +LayoutRect ShapeOutsideInfo::computedShapePhysicalBoundingBox() const |
| +{ |
| + LayoutRect physicalBoundingBox = computedShape().shapeMarginLogicalBoundingBox(); |
| + physicalBoundingBox.setX(physicalBoundingBox.x() + logicalLeftOffset()); |
| + |
| + if (m_renderer.style()->isFlippedBlocksWritingMode()) |
| + physicalBoundingBox.setY(m_renderer.logicalHeight() - physicalBoundingBox.maxY()); |
| + else |
| + physicalBoundingBox.setY(physicalBoundingBox.y() + logicalTopOffset()); |
| + |
| + if (!m_renderer.style()->isHorizontalWritingMode()) |
| + physicalBoundingBox = physicalBoundingBox.transposedRect(); |
| + else |
| + physicalBoundingBox.setY(physicalBoundingBox.y() + logicalTopOffset()); |
|
apavlov
2014/05/06 12:08:35
Great, that's exactly what I meant!
I have a quic
Habib Virji
2014/05/06 12:25:41
Relation between isFlippedBlocksWritingMode() and
apavlov
2014/05/06 12:30:29
Sure. The best approach here is to try coming up w
|
| + |
| + return physicalBoundingBox; |
| +} |
| + |
| +FloatPoint ShapeOutsideInfo::shapeToRendererPoint(FloatPoint point) const |
| +{ |
| + FloatPoint result = FloatPoint(point.x() + logicalLeftOffset(), point.y() + logicalTopOffset()); |
| + if (m_renderer.style()->isFlippedBlocksWritingMode()) |
| + result.setY(m_renderer.logicalHeight() - result.y()); |
| + if (!m_renderer.style()->isHorizontalWritingMode()) |
| + result = result.transposedPoint(); |
| + return result; |
| +} |
| + |
| +FloatSize ShapeOutsideInfo::shapeToRendererSize(FloatSize size) const |
| +{ |
| + if (!m_renderer.style()->isHorizontalWritingMode()) |
| + return size.transposedSize(); |
| + return size; |
| +} |
| + |
| } |