Changeset 177128 in webkit
- Timestamp:
- Dec 10, 2014, 7:29:29 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 6 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/repaint/implicitly-positioned-block-repaint-complex-line-layout-expected.txt (added)
-
LayoutTests/fast/repaint/implicitly-positioned-block-repaint-complex-line-layout.html (added)
-
LayoutTests/fast/repaint/implicitly-positioned-block-repaint-simple-line-layout-expected.txt (added)
-
LayoutTests/fast/repaint/implicitly-positioned-block-repaint-simple-line-layout.html (added)
-
LayoutTests/platform/mac/fast/line-grid/line-align-right-edges-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderBlockFlow.cpp (modified) (2 diffs)
-
Source/WebCore/rendering/RenderBlockFlow.h (modified) (1 diff)
-
Source/WebCore/rendering/RenderBlockLineLayout.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r177122 r177128 1 2014-12-10 Zalan Bujtas <zalan@apple.com> 2 3 Continuously repainting large parts of Huffington Post. 4 https://bugs.webkit.org/show_bug.cgi?id=139468 5 6 Reviewed by Antti Koivisto. 7 8 This patch eliminates redundant repaint requests for inlines when neither the parent 9 block flow nor any of the inline children are dirty. 10 Previously, 11 1. simple line layout always recalculated inline content positions regardless of whether 12 the content needed relayout at all; as a result, it always triggered full repaint. 13 2. inline tree layout ignored the needslayout flag on the last line and treated it dirty 14 (unless it broke cleanly (<div>foo<br></div>)). 15 This was an ancient workaround for an editing/insert use case, but it seems not to be the case anymore. 16 17 * fast/repaint/implicitly-positioned-block-repaint-complex-line-layout-expected.txt: Added. 18 * fast/repaint/implicitly-positioned-block-repaint-complex-line-layout.html: Added. 19 * fast/repaint/implicitly-positioned-block-repaint-simple-line-layout-expected.txt: Added. 20 * fast/repaint/implicitly-positioned-block-repaint-simple-line-layout.html: Added. 21 * platform/mac/fast/line-grid/line-align-right-edges-expected.txt: 22 1 23 2014-12-10 Alexey Proskuryakov <ap@apple.com> 2 24 -
trunk/LayoutTests/platform/mac/fast/line-grid/line-align-right-edges-expected.txt
r109267 r177128 22 22 layer at (342,308) size 300x30 23 23 RenderBlock (positioned) {DIV} at (334,300) size 300x30 [bgcolor=#DDDDDD] 24 RenderText {#text} at (1 70,3) size 120x2425 text run at (1 70,3) width 120: "X X X"24 RenderText {#text} at (161,3) size 120x24 25 text run at (161,3) width 120: "X X X" -
trunk/Source/WebCore/ChangeLog
r177126 r177128 1 2014-12-10 Zalan Bujtas <zalan@apple.com> 2 3 Continuously repainting large parts of Huffington Post. 4 https://bugs.webkit.org/show_bug.cgi?id=139468 5 6 Reviewed by Antti Koivisto. 7 8 This patch eliminates redundant repaint requests for inlines when neither the parent 9 block flow nor any of the inline children are dirty. 10 Previously, 11 1. simple line layout always recalculated inline content positions regardless of whether 12 the content needed relayout at all; as a result, it always triggered full repaint. 13 2. inline tree layout ignored the needslayout flag on the last line and treated it dirty 14 (unless it broke cleanly (<div>foo<br></div>)). 15 This was an ancient workaround for an editing/insert use case, but it seems not to be the case anymore. 16 17 Tests: fast/repaint/implicitly-positioned-block-repaint-complex-line-layout.html 18 fast/repaint/implicitly-positioned-block-repaint-simple-line-layout.html 19 20 * rendering/RenderBlockFlow.cpp: 21 (WebCore::RenderBlockFlow::layoutInlineChildren): 22 (WebCore::RenderBlockFlow::layoutSimpleLines): Check if we need to trigger layout at all. 23 * rendering/RenderBlockFlow.h: 24 * rendering/RenderBlockLineLayout.cpp: 25 (WebCore::RenderBlockFlow::determineStartPosition): Remove the last line dirty hack. If it 26 happens to introduce regression, we should fix it at the caller site to make the line dirty. 27 1 28 2014-12-10 Anders Carlsson <andersca@apple.com> 2 29 -
trunk/Source/WebCore/rendering/RenderBlockFlow.cpp
r177049 r177128 638 638 639 639 if (m_lineLayoutPath == SimpleLinesPath) { 640 deleteLineBoxesBeforeSimpleLineLayout(); 641 layoutSimpleLines(repaintLogicalTop, repaintLogicalBottom); 640 layoutSimpleLines(relayoutChildren, repaintLogicalTop, repaintLogicalBottom); 642 641 return; 643 642 } … … 3488 3487 } 3489 3488 3490 void RenderBlockFlow::layoutSimpleLines(LayoutUnit& repaintLogicalTop, LayoutUnit& repaintLogicalBottom) 3491 { 3489 void RenderBlockFlow::layoutSimpleLines(bool relayoutChildren, LayoutUnit& repaintLogicalTop, LayoutUnit& repaintLogicalBottom) 3490 { 3491 bool needsLayout = selfNeedsLayout() || relayoutChildren || !m_simpleLineLayout; 3492 if (needsLayout) { 3493 deleteLineBoxesBeforeSimpleLineLayout(); 3494 m_simpleLineLayout = SimpleLineLayout::create(*this); 3495 } 3492 3496 ASSERT(!m_lineBoxes.firstLineBox()); 3493 3494 m_simpleLineLayout = SimpleLineLayout::create(*this);3495 3497 3496 3498 LayoutUnit lineLayoutHeight = SimpleLineLayout::computeFlowHeight(*this, *m_simpleLineLayout); 3497 3499 LayoutUnit lineLayoutTop = borderAndPaddingBefore(); 3498 3499 3500 repaintLogicalTop = lineLayoutTop; 3500 repaintLogicalBottom = lineLayoutTop + lineLayoutHeight; 3501 3501 repaintLogicalBottom = needsLayout ? repaintLogicalTop + lineLayoutHeight : repaintLogicalTop; 3502 3502 setLogicalHeight(lineLayoutTop + lineLayoutHeight + borderAndPaddingAfter()); 3503 3503 } -
trunk/Source/WebCore/rendering/RenderBlockFlow.h
r177021 r177128 543 543 544 544 void layoutLineBoxes(bool relayoutChildren, LayoutUnit& repaintLogicalTop, LayoutUnit& repaintLogicalBottom); 545 void layoutSimpleLines( LayoutUnit& repaintLogicalTop, LayoutUnit& repaintLogicalBottom);545 void layoutSimpleLines(bool relayoutChildren, LayoutUnit& repaintLogicalTop, LayoutUnit& repaintLogicalBottom); 546 546 547 547 virtual std::unique_ptr<RootInlineBox> createRootInlineBox(); // Subclassed by RenderSVGText. -
trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp
r174875 r177128 1626 1626 } 1627 1627 } 1628 } else { 1629 // No dirty lines were found. 1630 // If the last line didn't break cleanly, treat it as dirty. 1631 if (lastRootBox() && !lastRootBox()->endsWithBreak()) 1632 curr = lastRootBox(); 1633 } 1634 1628 } 1635 1629 // If we have no dirty lines, then last is just the last root box. 1636 1630 last = curr ? curr->prevRootBox() : lastRootBox();
Note:
See TracChangeset
for help on using the changeset viewer.