Changeset 281136 in webkit
- Timestamp:
- Aug 17, 2021 7:11:22 AM (11 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/repaint/line-layout-block-shrink-expected.txt (added)
-
LayoutTests/fast/repaint/line-layout-block-shrink.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderBlockFlow.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r281134 r281136 1 2021-08-17 Antti Koivisto <antti@apple.com> 2 3 Incorrect repaint when inline level box style change triggers line height change 4 https://bugs.webkit.org/show_bug.cgi?id=229140 5 <rdar://problem/81980863> 6 7 Reviewed by Alan Bujtas. 8 9 * fast/repaint/line-layout-block-shrink-expected.txt: Added. 10 * fast/repaint/line-layout-block-shrink.html: Added. 11 1 12 2021-08-17 Jean-Yves Avenard <jya@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r281135 r281136 1 2021-08-17 Antti Koivisto <antti@apple.com> 2 3 Incorrect repaint when inline level box style change triggers line height change 4 https://bugs.webkit.org/show_bug.cgi?id=229140 5 <rdar://problem/81980863> 6 7 Reviewed by Alan Bujtas. 8 9 If an existing block shrinks vertically as a result of layout we fail to invalidate the 10 old content area for repaint, thus potentially leaving painting artefacts behind. 11 This is often hidden by the content shift triggering other repaints. 12 13 Test: fast/repaint/line-layout-block-shrink.html 14 15 * rendering/RenderBlockFlow.cpp: 16 (WebCore::RenderBlockFlow::layoutModernLines): 17 18 Adjust the repaint area to include the content size before the layout. 19 1 20 2021-08-17 Philippe Normand <pnormand@igalia.com> 2 21 -
trunk/Source/WebCore/rendering/RenderBlockFlow.cpp
r279918 r281136 3732 3732 } 3733 3733 3734 auto contentBoxTop = borderAndPaddingBefore(); 3735 3736 auto computeContentHeight = [&] { 3737 if (!hasLines() && hasLineIfEmpty()) 3738 return lineHeight(true, isHorizontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes); 3739 3740 return layoutFormattingContextLineLayout.contentLogicalHeight(); 3741 }; 3742 3743 auto computeBorderBoxBottom = [&] { 3744 auto contentBoxBottom = contentBoxTop + computeContentHeight(); 3745 return contentBoxBottom + borderAndPaddingAfter(); 3746 }; 3747 3748 auto oldBorderBoxBottom = computeBorderBoxBottom(); 3749 3734 3750 layoutFormattingContextLineLayout.layout(); 3735 3751 … … 3737 3753 layoutFormattingContextLineLayout.adjustForPagination(); 3738 3754 3739 auto contentHeight = [&] { 3740 if (!hasLines() && hasLineIfEmpty()) 3741 return lineHeight(true, isHorizontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes); 3742 3743 return layoutFormattingContextLineLayout.contentLogicalHeight(); 3744 }(); 3745 auto contentBoxTop = borderAndPaddingBefore(); 3746 auto contentBoxBottom = contentBoxTop + contentHeight; 3747 auto borderBoxBottom = contentBoxBottom + borderAndPaddingAfter(); 3755 auto newBorderBoxBottom = computeBorderBoxBottom(); 3748 3756 3749 3757 repaintLogicalTop = contentBoxTop; 3750 repaintLogicalBottom = borderBoxBottom; 3751 setLogicalHeight(borderBoxBottom); 3758 repaintLogicalBottom = std::max(oldBorderBoxBottom, newBorderBoxBottom); 3759 3760 setLogicalHeight(newBorderBoxBottom); 3752 3761 } 3753 3762 #endif
Note: See TracChangeset
for help on using the changeset viewer.