Changeset 224561 in webkit
- Timestamp:
- Nov 7, 2017 5:02:32 PM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r224559 r224561 1 2017-11-07 Antti Koivisto <antti@apple.com> 2 3 There is no such thing as block element continuation 4 https://bugs.webkit.org/show_bug.cgi?id=179400 5 6 Reviewed by Zalan Bujtas. 7 8 There are no non-anonymous block continuations. This is dead code. 9 10 * rendering/RenderBlock.cpp: 11 (WebCore::borderOrPaddingLogicalWidthChanged): 12 (WebCore::RenderBlock::styleDidChange): 13 (WebCore::RenderBlock::blockElementContinuation const): Deleted. 14 15 This would always return null. 16 17 * rendering/RenderBlock.h: 18 1 19 2017-11-07 Zalan Bujtas <zalan@apple.com> 2 20 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r224546 r224561 416 416 } 417 417 418 static bool borderOrPaddingLogicalWidthChanged(const RenderStyle* oldStyle, const RenderStyle* newStyle) 419 { 420 if (newStyle->isHorizontalWritingMode()) 421 return oldStyle->borderLeftWidth() != newStyle->borderLeftWidth() 422 || oldStyle->borderRightWidth() != newStyle->borderRightWidth() 423 || oldStyle->paddingLeft() != newStyle->paddingLeft() 424 || oldStyle->paddingRight() != newStyle->paddingRight(); 425 426 return oldStyle->borderTopWidth() != newStyle->borderTopWidth() 427 || oldStyle->borderBottomWidth() != newStyle->borderBottomWidth() 428 || oldStyle->paddingTop() != newStyle->paddingTop() 429 || oldStyle->paddingBottom() != newStyle->paddingBottom(); 418 static bool borderOrPaddingLogicalWidthChanged(const RenderStyle& oldStyle, const RenderStyle& newStyle) 419 { 420 if (newStyle.isHorizontalWritingMode()) { 421 return oldStyle.borderLeftWidth() != newStyle.borderLeftWidth() 422 || oldStyle.borderRightWidth() != newStyle.borderRightWidth() 423 || oldStyle.paddingLeft() != newStyle.paddingLeft() 424 || oldStyle.paddingRight() != newStyle.paddingRight(); 425 } 426 427 return oldStyle.borderTopWidth() != newStyle.borderTopWidth() 428 || oldStyle.borderBottomWidth() != newStyle.borderBottomWidth() 429 || oldStyle.paddingTop() != newStyle.paddingTop() 430 || oldStyle.paddingBottom() != newStyle.paddingBottom(); 430 431 } 431 432 … … 438 439 adjustFragmentedFlowStateOnContainingBlockChangeIfNeeded(); 439 440 440 auto& newStyle = style();441 if (!isAnonymousBlock() && !isContinuation()) {442 // Ensure that all of our continuation blocks pick up the new style.443 for (RenderBlock* currCont = blockElementContinuation(); currCont; currCont = currCont->blockElementContinuation())444 currCont->setStyle(RenderStyle::clone(newStyle));445 }446 447 441 propagateStyleToAnonymousChildren(PropagateToBlockChildrenOnly); 448 442 449 443 // It's possible for our border/padding to change, but for the overall logical width of the block to 450 444 // end up being the same. We keep track of this change so in layoutBlock, we can know to set relayoutChildren=true. 451 setShouldForceRelayoutChildren(oldStyle && diff == StyleDifferenceLayout && needsLayout() && borderOrPaddingLogicalWidthChanged( oldStyle, &newStyle));445 setShouldForceRelayoutChildren(oldStyle && diff == StyleDifferenceLayout && needsLayout() && borderOrPaddingLogicalWidthChanged(*oldStyle, style())); 452 446 } 453 447 … … 1743 1737 } 1744 1738 1745 RenderBlock* RenderBlock::blockElementContinuation() const1746 {1747 RenderBoxModelObject* currentContinuation = continuation();1748 if (!currentContinuation || currentContinuation->isInline())1749 return nullptr;1750 RenderBlock& nextContinuation = downcast<RenderBlock>(*currentContinuation);1751 if (nextContinuation.isAnonymousBlock())1752 return nextContinuation.blockElementContinuation();1753 return &nextContinuation;1754 }1755 1756 1739 static ContinuationOutlineTableMap* continuationOutlineTable() 1757 1740 { -
trunk/Source/WebCore/rendering/RenderBlock.h
r224537 r224561 192 192 bool isAnonymousBlockContinuation() const { return isAnonymousBlock() && continuation(); } 193 193 WEBCORE_EXPORT RenderInline* inlineElementContinuation() const; 194 RenderBlock* blockElementContinuation() const;195 194 196 195 static RenderPtr<RenderBlock> createAnonymousWithParentRendererAndDisplay(const RenderBox& parent, EDisplay = BLOCK);
Note: See TracChangeset
for help on using the changeset viewer.