Changeset 209158 in webkit
- Timestamp:
- Nov 30, 2016 3:12:45 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r209155 r209158 1 2016-11-30 Zalan Bujtas <zalan@apple.com> 2 3 ASSERTION FAILED: layoutState->m_renderer == this in WebCore::RenderBlock::offsetFromLogicalTopOfFirstPage 4 https://bugs.webkit.org/show_bug.cgi?id=155364 5 <rdar://problem/27720461> 6 7 Reviewed by David Hyatt. 8 9 * fast/replaced/replaced-element-with-percentage-width-inside-flow-asserts-expected.txt: Added. 10 * fast/replaced/replaced-element-with-percentage-width-inside-flow-asserts.html: Added. 11 1 12 2016-11-30 Jiewen Tan <jiewen_tan@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r209157 r209158 1 2016-11-30 Zalan Bujtas <zalan@apple.com> 2 3 ASSERTION FAILED: layoutState->m_renderer == this in WebCore::RenderBlock::offsetFromLogicalTopOfFirstPage 4 https://bugs.webkit.org/show_bug.cgi?id=155364 5 <rdar://problem/27720461> 6 7 Reviewed by David Hyatt. 8 9 RenderNamedFlowThread is considered to be a root for the current renderer context so 10 we need to bail out from the containing block traversal here (like we do for the RenderView). 11 12 Test: fast/replaced/replaced-element-with-percentage-width-inside-flow-asserts.html 13 14 * rendering/RenderBox.cpp: 15 (WebCore::RenderBox::computeReplacedLogicalHeightUsing): 16 1 17 2016-11-30 Brady Eidson <beidson@apple.com> 2 18 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r208985 r209158 3142 3142 case Calculated: 3143 3143 { 3144 auto cb = isOutOfFlowPositioned() ? container() : containingBlock(); 3145 while (cb && cb->isAnonymous() && !is<RenderView>(*cb)) { 3146 cb = cb->containingBlock(); 3147 downcast<RenderBlock>(*cb).addPercentHeightDescendant(const_cast<RenderBox&>(*this)); 3144 auto* container = isOutOfFlowPositioned() ? this->container() : containingBlock(); 3145 while (container && container->isAnonymous()) { 3146 // Stop at rendering context root. 3147 if (is<RenderView>(*container) || is<RenderNamedFlowThread>(*container)) 3148 break; 3149 container = container->containingBlock(); 3150 downcast<RenderBlock>(*container).addPercentHeightDescendant(const_cast<RenderBox&>(*this)); 3148 3151 } 3149 3152 3150 3153 // FIXME: This calculation is not patched for block-flow yet. 3151 3154 // https://bugs.webkit.org/show_bug.cgi?id=46500 3152 if (cb->isOutOfFlowPositioned() && cb->style().height().isAuto() && !(cb->style().top().isAuto() || cb->style().bottom().isAuto())) { 3153 ASSERT_WITH_SECURITY_IMPLICATION(cb->isRenderBlock()); 3154 RenderBlock& block = downcast<RenderBlock>(*cb); 3155 if (container->isOutOfFlowPositioned() 3156 && container->style().height().isAuto() 3157 && !(container->style().top().isAuto() || container->style().bottom().isAuto())) { 3158 ASSERT_WITH_SECURITY_IMPLICATION(container->isRenderBlock()); 3159 auto& block = downcast<RenderBlock>(*container); 3155 3160 LogicalExtentComputedValues computedValues; 3156 3161 block.computeLogicalHeight(block.logicalHeight(), 0, computedValues); … … 3165 3170 LayoutUnit availableHeight; 3166 3171 if (isOutOfFlowPositioned()) 3167 availableHeight = containingBlockLogicalHeightForPositioned(downcast<RenderBoxModelObject>(*c b));3172 availableHeight = containingBlockLogicalHeightForPositioned(downcast<RenderBoxModelObject>(*container)); 3168 3173 else { 3169 3174 availableHeight = containingBlockLogicalHeightForContent(IncludeMarginBorderPadding); … … 3173 3178 // FIXME: This needs to be made block-flow-aware. If the cell and image are perpendicular block-flows, this isn't right. 3174 3179 // https://bugs.webkit.org/show_bug.cgi?id=46997 3175 while (cb && !is<RenderView>(*cb) && (cb->style().logicalHeight().isAuto() || cb->style().logicalHeight().isPercentOrCalculated())) { 3176 if (cb->isTableCell()) { 3180 while (container && !is<RenderView>(*container) 3181 && (container->style().logicalHeight().isAuto() || container->style().logicalHeight().isPercentOrCalculated())) { 3182 if (container->isTableCell()) { 3177 3183 // Don't let table cells squeeze percent-height replaced elements 3178 3184 // <http://bugs.webkit.org/show_bug.cgi?id=15359> … … 3180 3186 return valueForLength(logicalHeight, availableHeight - borderAndPaddingLogicalHeight()); 3181 3187 } 3182 downcast<RenderBlock>(*c b).addPercentHeightDescendant(const_cast<RenderBox&>(*this));3183 c b = cb->containingBlock();3188 downcast<RenderBlock>(*container).addPercentHeightDescendant(const_cast<RenderBox&>(*this)); 3189 container = container->containingBlock(); 3184 3190 } 3185 3191 }
Note: See TracChangeset
for help on using the changeset viewer.