Changeset 167489 in webkit


Ignore:
Timestamp:
Apr 18, 2014 6:07:48 AM (10 years ago)
Author:
stavila@adobe.com
Message:

[CSSRegions] Incorrect background paint on positioned element hover
https://bugs.webkit.org/show_bug.cgi?id=131617

Reviewed by Andrei Bucur.

Source/WebCore:
When computing the repaint rect for absolute elements flowed into regions, the Y location of the
region within the flow thread must no longer be added to the repaint rect's location because absolute
positioned elements get pushed down through the regions by their absolute top. So adding the region's
position in the flow thread and then adding the element's absolute top would cause us to add
something twice.

Tests: fast/regions/repaint/repaint-absolute-pushed-to-next-region.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeRectForRepaint):

LayoutTests:
Added test for the proper repainting of absolute positioned elements in regions when the
absolute top of the elements causes it to be pushed to the next region.

  • fast/regions/repaint/repaint-absolute-pushed-to-next-region-expected.txt: Added.
  • fast/regions/repaint/repaint-absolute-pushed-to-next-region.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r167488 r167489  
     12014-04-18  Radu Stavila  <stavila@adobe.com>
     2
     3        [CSSRegions] Incorrect background paint on positioned element hover
     4        https://bugs.webkit.org/show_bug.cgi?id=131617
     5
     6        Reviewed by Andrei Bucur.
     7
     8        Added test for the proper repainting of absolute positioned elements in regions when the
     9        absolute top of the elements causes it to be pushed to the next region.
     10
     11        * fast/regions/repaint/repaint-absolute-pushed-to-next-region-expected.txt: Added.
     12        * fast/regions/repaint/repaint-absolute-pushed-to-next-region.html: Added.
     13
    1142014-04-18  Philippe Normand  <pnormand@igalia.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r167488 r167489  
     12014-04-18  Radu Stavila  <stavila@adobe.com>
     2
     3        [CSSRegions] Incorrect background paint on positioned element hover
     4        https://bugs.webkit.org/show_bug.cgi?id=131617
     5
     6        Reviewed by Andrei Bucur.
     7
     8        When computing the repaint rect for absolute elements flowed into regions, the Y location of the
     9        region within the flow thread must no longer be added to the repaint rect's location because absolute
     10        positioned elements get pushed down through the regions by their absolute top. So adding the region's
     11        position in the flow thread and then adding the element's absolute top would cause us to add
     12        something twice.
     13
     14        Tests: fast/regions/repaint/repaint-absolute-pushed-to-next-region.html
     15
     16        * rendering/RenderBox.cpp:
     17        (WebCore::RenderBox::computeRectForRepaint):
     18
    1192014-04-18  Philippe Normand  <pnormand@igalia.com>
    220
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r167439 r167489  
    21092109        return;
    21102110   
     2111    EPosition position = styleToUse.position();
     2112
    21112113    // This code isn't necessary for in-flow RenderFlowThreads.
    2112     if (o->isOutOfFlowRenderFlowThread()) {
     2114    // Don't add the location of the region in the flow thread for absolute positioned
     2115    // elements because their absolute position already pushes them down through
     2116    // the regions so adding this here and then adding the topLeft again would cause
     2117    // us to add the height twice.
     2118    if (o->isOutOfFlowRenderFlowThread() && position != AbsolutePosition) {
    21132119        RenderRegion* firstRegion = nullptr;
    21142120        RenderRegion* lastRegion = nullptr;
     
    21222128    LayoutPoint topLeft = rect.location();
    21232129    topLeft.move(locationOffset());
    2124 
    2125     EPosition position = styleToUse.position();
    21262130
    21272131    // We are now in our parent container's coordinate space.  Apply our transform to obtain a bounding box
Note: See TracChangeset for help on using the changeset viewer.