Chromium Code Reviews| Index: Source/core/layout/shapes/ShapeOutsideInfo.cpp |
| diff --git a/Source/core/layout/shapes/ShapeOutsideInfo.cpp b/Source/core/layout/shapes/ShapeOutsideInfo.cpp |
| index 8e2f81d369b722b9b5020478835df591fe79ed71..a1535ed73ef62c7735280198626278db5c0c1eb9 100644 |
| --- a/Source/core/layout/shapes/ShapeOutsideInfo.cpp |
| +++ b/Source/core/layout/shapes/ShapeOutsideInfo.cpp |
| @@ -56,6 +56,10 @@ void ShapeOutsideInfo::setReferenceBoxLogicalSize(LayoutSize newReferenceBoxLogi |
| newReferenceBoxLogicalSize.expand(m_renderer.marginWidth(), m_renderer.marginHeight()); |
| else |
| newReferenceBoxLogicalSize.expand(m_renderer.marginHeight(), m_renderer.marginWidth()); |
| + if (newReferenceBoxLogicalSize.isEmpty()) { |
|
bjonesbe
2015/03/16 22:26:34
Sorry I missed this earlier, but in this case you
|
| + newReferenceBoxLogicalSize.setWidth(newReferenceBoxLogicalSize.width().clamp(0.0)); |
| + newReferenceBoxLogicalSize.setHeight(newReferenceBoxLogicalSize.height().clamp(0.0)); |
| + } |
| break; |
| case BorderBox: |
| break; |
| @@ -287,7 +291,7 @@ ShapeOutsideDeltas ShapeOutsideInfo::computeDeltasForContainingBlockLine(const L |
| if (isShapeDirty() || !m_shapeOutsideDeltas.isForLine(borderBoxLineTop, lineHeight)) { |
| LayoutUnit referenceBoxLineTop = borderBoxLineTop - logicalTopOffset(); |
| - LayoutUnit floatMarginBoxWidth = containingBlock.logicalWidthForFloat(&floatingObject); |
| + LayoutUnit floatMarginBoxWidth = containingBlock.logicalWidthForFloat(&floatingObject).abs(); |
|
bjonesbe
2015/03/16 22:26:34
This one also needs to clamp to 0, as a float with
|
| if (computedShape().lineOverlapsShapeMarginBounds(referenceBoxLineTop, lineHeight)) { |
| LineSegment segment = computedShape().getExcludedInterval((borderBoxLineTop - logicalTopOffset()), std::min(lineHeight, shapeLogicalBottom() - borderBoxLineTop)); |