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 | |
315 if (m_renderer.style()->isFlippedBlocksWritingMode()) | |
316 physicalBoundingBox.setY(m_renderer.logicalHeight() - physicalBoundingBo x.maxY()); | |
317 else | |
318 physicalBoundingBox.setY(physicalBoundingBox.y() + logicalTopOffset()); | |
319 | |
320 if (!m_renderer.style()->isHorizontalWritingMode()) | |
321 physicalBoundingBox = physicalBoundingBox.transposedRect(); | |
322 else | |
323 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
| |
324 | |
325 return physicalBoundingBox; | |
310 } | 326 } |
327 | |
328 FloatPoint ShapeOutsideInfo::shapeToRendererPoint(FloatPoint point) const | |
329 { | |
330 FloatPoint result = FloatPoint(point.x() + logicalLeftOffset(), point.y() + logicalTopOffset()); | |
331 if (m_renderer.style()->isFlippedBlocksWritingMode()) | |
332 result.setY(m_renderer.logicalHeight() - result.y()); | |
333 if (!m_renderer.style()->isHorizontalWritingMode()) | |
334 result = result.transposedPoint(); | |
335 return result; | |
336 } | |
337 | |
338 FloatSize ShapeOutsideInfo::shapeToRendererSize(FloatSize size) const | |
339 { | |
340 if (!m_renderer.style()->isHorizontalWritingMode()) | |
341 return size.transposedSize(); | |
342 return size; | |
343 } | |
344 | |
345 } | |
OLD | NEW |