Changeset 103631 in webkit


Ignore:
Timestamp:
Dec 23, 2011, 9:01:47 AM (14 years ago)
Author:
Simon Fraser
Message:

Blur filter doesn't invalidate enough
https://bugs.webkit.org/show_bug.cgi?id=74891

Source/WebCore:

Reviewed by Darin Adler.

Take the effects of filters into account for repainting; we need
to inflate the repaint rect by the outsets provided by the filter.

Test: css3/filters/filter-repaint.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeRectForRepaint):

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::computeRectForRepaint):

LayoutTests:

Reviewed by Darin Adler.

Repaint test for the effects of a blur filter.

  • css3/filters/filter-repaint-expected.txt: Added.
  • css3/filters/filter-repaint-expected.png: Added.
  • css3/filters/filter-repaint.html: Added.
Location:
trunk
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r103630 r103631  
     12011-12-23  Simon Fraser  <[email protected]>
     2
     3        Blur filter doesn't invalidate enough
     4        https://bugs.webkit.org/show_bug.cgi?id=74891
     5
     6        Reviewed by Darin Adler.
     7       
     8        Repaint test for the effects of a blur filter.
     9
     10        * css3/filters/filter-repaint-expected.txt: Added.
     11        * css3/filters/filter-repaint-expected.png: Added.
     12        * css3/filters/filter-repaint.html: Added.
     13
    1142011-12-23  Simon Fraser  <[email protected]>
    215
  • trunk/Source/WebCore/ChangeLog

    r103630 r103631  
     12011-12-23  Simon Fraser  <[email protected]>
     2
     3        Blur filter doesn't invalidate enough
     4        https://bugs.webkit.org/show_bug.cgi?id=74891
     5
     6        Reviewed by Darin Adler.
     7       
     8        Take the effects of filters into account for repainting; we need
     9        to inflate the repaint rect by the outsets provided by the filter.
     10       
     11        Test: css3/filters/filter-repaint.html
     12
     13        * rendering/RenderBox.cpp:
     14        (WebCore::RenderBox::computeRectForRepaint):
     15        * rendering/RenderInline.cpp:
     16        (WebCore::RenderInline::computeRectForRepaint):
     17
    1182011-12-23  Simon Fraser  <[email protected]>
    219
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r103593 r103631  
    15681568    if (isWritingModeRoot() && !isPositioned())
    15691569        flipForWritingMode(rect);
     1570
     1571#if ENABLE(CSS_FILTERS)
     1572    if (style()->hasFilterOutsets()) {
     1573        LayoutUnit topOutset;
     1574        LayoutUnit rightOutset;
     1575        LayoutUnit bottomOutset;
     1576        LayoutUnit leftOutset;
     1577        style()->filter().getOutsets(topOutset, rightOutset, bottomOutset, leftOutset);
     1578        rect.move(-leftOutset, -topOutset);
     1579        rect.expand(leftOutset + rightOutset, topOutset + bottomOutset);
     1580    }
     1581#endif
     1582
    15701583    LayoutPoint topLeft = rect.location();
    15711584    topLeft.move(x(), y());
  • trunk/Source/WebCore/rendering/RenderInline.cpp

    r101755 r103631  
    10641064    }
    10651065
     1066#if ENABLE(CSS_FILTERS)
     1067    if (style()->hasFilterOutsets()) {
     1068        LayoutUnit topOutset;
     1069        LayoutUnit rightOutset;
     1070        LayoutUnit bottomOutset;
     1071        LayoutUnit leftOutset;
     1072        style()->filter().getOutsets(topOutset, rightOutset, bottomOutset, leftOutset);
     1073        rect.move(-leftOutset, -topOutset);
     1074        rect.expand(leftOutset + rightOutset, topOutset + bottomOutset);
     1075    }
     1076#endif
     1077
    10661078    if (style()->position() == RelativePosition && layer()) {
    10671079        // Apply the relative position offset when invalidating a rectangle.  The layer
Note: See TracChangeset for help on using the changeset viewer.