Changeset 165720 in webkit
- Timestamp:
- Mar 16, 2014 11:35:27 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r165702 r165720 1 2014-03-16 Mihnea Ovidenie <mihnea@adobe.com> 2 3 [CSSRegions]Do not compute region range for a box unless the parent has one 4 https://bugs.webkit.org/show_bug.cgi?id=130249 5 6 Reviewed by Andrei Bucur. 7 8 * fast/regions/inline-block-flowed-in-regions-expected.html: Added. 9 * fast/regions/inline-block-flowed-in-regions.html: Added. 10 1 11 2014-03-16 Frédéric Wang <fred.wang@free.fr> 2 12 -
trunk/Source/WebCore/ChangeLog
r165717 r165720 1 2014-03-16 Mihnea Ovidenie <mihnea@adobe.com> 2 3 [CSSRegions]Do not compute region range for a box unless the parent has one 4 https://bugs.webkit.org/show_bug.cgi?id=130249 5 6 Reviewed by Andrei Bucur. 7 8 If the containing block does not have a region range computed, do not attempt to compute 9 a region range for a child. In such cases, the range computation for a child can lead to 10 a result that is wrong, possibly leading to an incorrect clipping. 11 12 Test: fast/regions/inline-block-flowed-in-regions.html 13 14 * rendering/RenderBlock.cpp: 15 (WebCore::canComputeRegionRangeForBox): 16 (WebCore::RenderBlock::computeRegionRangeForBoxChild): 17 (WebCore::RenderBlock::estimateRegionRangeForBoxChild): 18 (WebCore::RenderBlock::updateRegionRangeForBoxChild): 19 * rendering/RenderFlowThread.h: 20 1 21 2014-03-16 Andreas Kling <akling@apple.com> 2 22 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r165607 r165720 5038 5038 } 5039 5039 5040 static bool canComputeRegionRangeForBox(const RenderBlock* parentBlock, const RenderBox& childBox, const RenderFlowThread* flowThreadContainingBlock) 5041 { 5042 ASSERT(parentBlock); 5043 ASSERT(!childBox.isRenderFlowThread()); 5044 5045 if (!flowThreadContainingBlock) 5046 return false; 5047 5048 if (!flowThreadContainingBlock->hasRegions()) 5049 return false; 5050 5051 if (!childBox.canHaveOutsideRegionRange()) 5052 return false; 5053 5054 return flowThreadContainingBlock->hasRegionRangeForBox(parentBlock); 5055 } 5056 5040 5057 void RenderBlock::computeRegionRangeForBoxChild(const RenderBox& box) const 5041 5058 { 5042 5059 RenderFlowThread* flowThread = flowThreadContainingBlock(); 5043 if (!flowThread || !flowThread->hasRegions()) 5044 return; 5060 ASSERT(canComputeRegionRangeForBox(this, box, flowThread)); 5045 5061 5046 5062 RenderRegion* startRegion; … … 5060 5076 { 5061 5077 RenderFlowThread* flowThread = flowThreadContainingBlock(); 5062 if (! flowThread || !flowThread->hasRegions() || !box.canHaveOutsideRegionRange())5078 if (!canComputeRegionRangeForBox(this, box, flowThread)) 5063 5079 return; 5064 5080 … … 5081 5097 { 5082 5098 RenderFlowThread* flowThread = flowThreadContainingBlock(); 5083 if (! flowThread || !flowThread->hasRegions() || !box.canHaveOutsideRegionRange())5099 if (!canComputeRegionRangeForBox(this, box, flowThread)) 5084 5100 return false; 5085 5101 -
trunk/Source/WebCore/rendering/RenderFlowThread.h
r165377 r165720 125 125 void setRegionRangeForBox(const RenderBox*, RenderRegion*, RenderRegion*); 126 126 void getRegionRangeForBox(const RenderBox*, RenderRegion*& startRegion, RenderRegion*& endRegion) const; 127 bool hasRegionRangeForBox(const RenderBox* box) const { ASSERT(box); return m_regionRangeMap.contains(box); } 127 128 128 129 // Check if the object is in region and the region is part of this flow thread.
Note: See TracChangeset
for help on using the changeset viewer.