Changeset 155546 in webkit


Ignore:
Timestamp:
Sep 11, 2013 11:33:05 AM (11 years ago)
Author:
Simon Fraser
Message:

REGRESSION (143483): overflow:hidden doesn't quash big repaints from text-indent: -9999px
https://bugs.webkit.org/show_bug.cgi?id=121137

Source/WebCore:

Reviewed by Ryosuke Niwa.

The change in r143483 made it so that negative text-indent gets added
to visual oveflow even when we have overflow:hidden, which is really bad
because it causes large repaints (and large layers) for a common-on-the-web
pattern.

Revert the change, and add a new test to make sure it doesn't regress.

I can't reproduce the bug it was trying to fix with the change reverted.

Tests: compositing/geometry/negative-text-indent-with-overflow-hidden-layer.html

fast/repaint/negative-text-indent-with-overflow-hidden.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::computeOverflow):

LayoutTests:

Reviewed by Ryosuke Niwa.

Text-based repaint test, and test for compositing layer geometry.

  • compositing/geometry/negative-text-indent-with-overflow-hidden-layer-expected.txt: Added.
  • compositing/geometry/negative-text-indent-with-overflow-hidden-layer.html: Added.
  • fast/repaint/negative-text-indent-with-overflow-hidden-expected.txt: Added.
  • fast/repaint/negative-text-indent-with-overflow-hidden.html: Added.
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r155543 r155546  
     12013-09-10  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION (143483): overflow:hidden doesn't quash big repaints from text-indent: -9999px
     4        https://bugs.webkit.org/show_bug.cgi?id=121137
     5
     6        Reviewed by Ryosuke Niwa.
     7       
     8        Text-based repaint test, and test for compositing layer geometry.
     9
     10        * compositing/geometry/negative-text-indent-with-overflow-hidden-layer-expected.txt: Added.
     11        * compositing/geometry/negative-text-indent-with-overflow-hidden-layer.html: Added.
     12        * fast/repaint/negative-text-indent-with-overflow-hidden-expected.txt: Added.
     13        * fast/repaint/negative-text-indent-with-overflow-hidden.html: Added.
     14
    1152013-09-11  Chris Fleizach  <cfleizach@apple.com>
    216
  • trunk/Source/WebCore/ChangeLog

    r155545 r155546  
     12013-09-10  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION (143483): overflow:hidden doesn't quash big repaints from text-indent: -9999px
     4        https://bugs.webkit.org/show_bug.cgi?id=121137
     5
     6        Reviewed by Ryosuke Niwa.
     7       
     8        The change in r143483 made it so that negative text-indent gets added
     9        to visual oveflow even when we have overflow:hidden, which is really bad
     10        because it causes large repaints (and large layers) for a common-on-the-web
     11        pattern.
     12       
     13        Revert the change, and add a new test to make sure it doesn't regress.
     14       
     15        I can't reproduce the bug it was trying to fix with the change reverted.
     16
     17        Tests: compositing/geometry/negative-text-indent-with-overflow-hidden-layer.html
     18               fast/repaint/negative-text-indent-with-overflow-hidden.html
     19
     20        * rendering/RenderBlock.cpp:
     21        (WebCore::RenderBlock::computeOverflow):
     22
    1232013-09-10  Simon Fraser  <simon.fraser@apple.com>
    224
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r155496 r155546  
    16831683    }
    16841684       
    1685     // Allow our overflow to catch cases where the caret in an empty editable element with negative text indent needs to get painted.
    1686     LayoutUnit textIndent = textIndentOffset();
    1687     if (textIndent < 0) {
    1688         LayoutRect clientRect(clientBoxRect());
    1689         LayoutRect rectToApply = LayoutRect(clientRect.x() + textIndent, clientRect.y(), clientRect.width() - min<LayoutUnit>(0, textIndent), clientRect.height());
    1690         addVisualOverflow(rectToApply);
    1691     }
    1692 
    16931685    // Add visual overflow from box-shadow and border-image-outset.
    16941686    addVisualEffectOverflow();
Note: See TracChangeset for help on using the changeset viewer.