Changeset 151703 in webkit
- Timestamp:
- Jun 18, 2013 3:31:57 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r151702 r151703 1 2013-06-18 Zoltan Horvath <zoltan@webkit.org> 2 3 [CSS Shapes] Remove lineOverflowsFromShapeInside boolean from RenderBlock::layoutRunsAndFloatsInRange function 4 https://bugs.webkit.org/show_bug.cgi?id=117757 5 6 Reviewed by David Hyatt. 7 8 We don't need keep lineOverflowsFromShapeInside boolean in RenderBlock::layoutRunsAndFloatsInRange and in its 9 helpers because it's easy to decide whether we are in an shape content overflow state or not, so I got rid of 10 lineOverflowsFromShapeInside's occurences and updated the affected functions. 11 12 Covered by existing overflow tests in fast/exclusions/shape-inside and fast/regions/shape-inside. 13 14 * rendering/RenderBlock.h: Update helper's definition. 15 * rendering/RenderBlockLineLayout.cpp: 16 (WebCore::pushShapeContentOverflowBelowTheContentBox): Add condition when overflow is already positioned. 17 (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLine): Remove lineOverflowsFromShapeInside. 18 (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread): Remove lineOverflowsFromShapeInside. 19 (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Remove lineOverflowsFromShapeInside. 20 1 21 2013-06-18 Zalan Bujtas <zalan@apple.com> 2 22 -
trunk/Source/WebCore/rendering/RenderBlock.h
r151570 r151703 1086 1086 void layoutRunsAndFloatsInRange(LineLayoutState&, InlineBidiResolver&, const InlineIterator& cleanLineStart, const BidiStatus& cleanLineBidiStatus, unsigned consecutiveHyphenatedLines); 1087 1087 #if ENABLE(CSS_SHAPES) 1088 void updateShapeAndSegmentsForCurrentLine(ShapeInsideInfo*&, LayoutUnit&, LineLayoutState& , bool&);1089 void updateShapeAndSegmentsForCurrentLineInFlowThread(ShapeInsideInfo*&, LineLayoutState& , bool&);1088 void updateShapeAndSegmentsForCurrentLine(ShapeInsideInfo*&, LayoutUnit&, LineLayoutState&); 1089 void updateShapeAndSegmentsForCurrentLineInFlowThread(ShapeInsideInfo*&, LineLayoutState&); 1090 1090 bool adjustLogicalLineTopAndLogicalHeightIfNeeded(ShapeInsideInfo*, LayoutUnit, LineLayoutState&, InlineBidiResolver&, FloatingObject*, InlineIterator&, WordMeasurements&); 1091 1091 #endif -
trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp
r151652 r151703 1653 1653 } 1654 1654 1655 static inline void pushShapeContentOverflowBelowTheContentBox(RenderBlock* block, ShapeInsideInfo* shapeInsideInfo, LayoutUnit lineTop, LayoutUnit lineHeight, bool& lineOverflowsFromShapeInside) 1656 { 1657 if (lineOverflowsFromShapeInside) 1658 return; 1655 static inline void pushShapeContentOverflowBelowTheContentBox(RenderBlock* block, ShapeInsideInfo* shapeInsideInfo, LayoutUnit lineTop, LayoutUnit lineHeight) 1656 { 1657 ASSERT(shapeInsideInfo); 1659 1658 1660 1659 LayoutUnit logicalLineBottom = lineTop + lineHeight; 1661 1660 LayoutUnit shapeContainingBlockHeight = shapeInsideInfo->shapeContainingBlockHeight(); 1662 if (logicalLineBottom <= shapeInsideInfo->shapeLogicalBottom() || !shapeContainingBlockHeight) 1661 1662 bool isOverflowPositionedAlready = (shapeContainingBlockHeight - shapeInsideInfo->owner()->borderAndPaddingAfter() + lineHeight) <= lineTop; 1663 1664 if (logicalLineBottom <= shapeInsideInfo->shapeLogicalBottom() || !shapeContainingBlockHeight || isOverflowPositionedAlready) 1663 1665 return; 1664 1666 1665 1667 LayoutUnit newLogicalHeight = block->logicalHeight() + (shapeContainingBlockHeight - (lineTop + shapeInsideInfo->owner()->borderAndPaddingAfter())); 1666 1668 block->setLogicalHeight(newLogicalHeight); 1667 1668 lineOverflowsFromShapeInside = true; 1669 } 1670 1671 void RenderBlock::updateShapeAndSegmentsForCurrentLine(ShapeInsideInfo*& shapeInsideInfo, LayoutUnit& absoluteLogicalTop, LineLayoutState& layoutState, bool& lineOverflowsFromShapeInside) 1669 } 1670 1671 void RenderBlock::updateShapeAndSegmentsForCurrentLine(ShapeInsideInfo*& shapeInsideInfo, LayoutUnit& absoluteLogicalTop, LineLayoutState& layoutState) 1672 1672 { 1673 1673 if (layoutState.flowThread()) 1674 return updateShapeAndSegmentsForCurrentLineInFlowThread(shapeInsideInfo, layoutState , lineOverflowsFromShapeInside);1675 1676 if (!shapeInsideInfo || lineOverflowsFromShapeInside)1674 return updateShapeAndSegmentsForCurrentLineInFlowThread(shapeInsideInfo, layoutState); 1675 1676 if (!shapeInsideInfo) 1677 1677 return; 1678 1678 … … 1683 1683 shapeInsideInfo->computeSegmentsForLine(lineTop, lineHeight); 1684 1684 1685 pushShapeContentOverflowBelowTheContentBox(this, shapeInsideInfo, lineTop, lineHeight , lineOverflowsFromShapeInside);1686 } 1687 1688 void RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread(ShapeInsideInfo*& shapeInsideInfo, LineLayoutState& layoutState , bool& lineOverflowsFromShapeInside)1685 pushShapeContentOverflowBelowTheContentBox(this, shapeInsideInfo, lineTop, lineHeight); 1686 } 1687 1688 void RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread(ShapeInsideInfo*& shapeInsideInfo, LineLayoutState& layoutState) 1689 1689 { 1690 1690 ASSERT(layoutState.flowThread()); … … 1727 1727 1728 1728 currentRegion = nextRegion; 1729 lineOverflowsFromShapeInside = false;1730 1729 1731 1730 logicalLineTopInFlowThread = logicalHeight() + offsetFromLogicalTopOfFirstPage(); … … 1756 1755 1757 1756 if (currentRegion->isLastRegion()) 1758 pushShapeContentOverflowBelowTheContentBox(this, shapeInsideInfo, lineTop, lineHeight , lineOverflowsFromShapeInside);1757 pushShapeContentOverflowBelowTheContentBox(this, shapeInsideInfo, lineTop, lineHeight); 1759 1758 } 1760 1759 … … 1808 1807 } 1809 1808 } 1810 1811 bool lineOverflowsFromShapeInside = false;1812 1809 #endif 1813 1810 … … 1832 1829 1833 1830 #if ENABLE(CSS_SHAPES) 1834 updateShapeAndSegmentsForCurrentLine(shapeInsideInfo, absoluteLogicalTop, layoutState , lineOverflowsFromShapeInside);1831 updateShapeAndSegmentsForCurrentLine(shapeInsideInfo, absoluteLogicalTop, layoutState); 1835 1832 #endif 1836 1833 WordMeasurements wordMeasurements;
Note: See TracChangeset
for help on using the changeset viewer.