OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
10 * disclaimer. | 10 * disclaimer. |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 | 300 |
301 // Lines that do not overlap the shape should act as if the float | 301 // Lines that do not overlap the shape should act as if the float |
302 // wasn't there for layout purposes. So we set the deltas to remove the | 302 // wasn't there for layout purposes. So we set the deltas to remove the |
303 // entire width of the float. | 303 // entire width of the float. |
304 m_leftMarginBoxDelta = floatMarginBoxWidth; | 304 m_leftMarginBoxDelta = floatMarginBoxWidth; |
305 m_rightMarginBoxDelta = -floatMarginBoxWidth; | 305 m_rightMarginBoxDelta = -floatMarginBoxWidth; |
306 m_lineOverlapsShape = false; | 306 m_lineOverlapsShape = false; |
307 } | 307 } |
308 } | 308 } |
309 | 309 |
| 310 LayoutRect ShapeOutsideInfo::computedShapePhysicalBoundingBox() const |
| 311 { |
| 312 LayoutRect physicalBoundingBox = computedShape().shapeMarginLogicalBoundingB
ox(); |
| 313 physicalBoundingBox.setX(physicalBoundingBox.x() + logicalLeftOffset()); |
| 314 physicalBoundingBox.setY(physicalBoundingBox.y() + logicalTopOffset()); |
| 315 if (m_renderer.style()->isFlippedBlocksWritingMode()) |
| 316 physicalBoundingBox.setY(m_renderer.logicalHeight() - physicalBoundingBo
x.maxY()); |
| 317 if (!m_renderer.style()->isHorizontalWritingMode()) |
| 318 physicalBoundingBox = physicalBoundingBox.transposedRect(); |
| 319 return physicalBoundingBox; |
310 } | 320 } |
| 321 |
| 322 FloatPoint ShapeOutsideInfo::shapeToRendererPoint(FloatPoint point) const |
| 323 { |
| 324 FloatPoint result = FloatPoint(point.x() + logicalLeftOffset(), point.y() +
logicalTopOffset()); |
| 325 if (m_renderer.style()->isFlippedBlocksWritingMode()) |
| 326 result.setY(m_renderer.logicalHeight() - result.y()); |
| 327 if (!m_renderer.style()->isHorizontalWritingMode()) |
| 328 result = result.transposedPoint(); |
| 329 return result; |
| 330 } |
| 331 |
| 332 FloatSize ShapeOutsideInfo::shapeToRendererSize(FloatSize size) const |
| 333 { |
| 334 if (!m_renderer.style()->isHorizontalWritingMode()) |
| 335 return size.transposedSize(); |
| 336 return size; |
| 337 } |
| 338 |
| 339 } |
OLD | NEW |