Changeset 166259 in webkit


Ignore:
Timestamp:
Mar 25, 2014 3:01:25 PM (10 years ago)
Author:
stavila@adobe.com
Message:

[CSS Regions] The background of children of scrollable elements flowed into regions is not properly scrolled
https://bugs.webkit.org/show_bug.cgi?id=130574

Reviewed by David Hyatt.

Source/WebCore:

When computing the clip rect for painting the box decorations, the scrolled content offset
must be computed by going up the containing block tree, up to the region.

Tests: fast/regions/scrollable-region-scrollable-absolute-content-background.html

fast/regions/scrollable-region-scrollable-content-background.html

  • rendering/RenderNamedFlowThread.cpp:

(WebCore::RenderNamedFlowThread::decorationsClipRectForBoxInNamedFlowFragment):

LayoutTests:

Added tests for properly painting background of children of scrollable elements flowed into regions.

  • fast/regions/scrollable-region-scrollable-absolute-content-background-expected.html: Added.
  • fast/regions/scrollable-region-scrollable-absolute-content-background.html: Added.
  • fast/regions/scrollable-region-scrollable-content-background-expected.html: Added.
  • fast/regions/scrollable-region-scrollable-content-background.html: Added.
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r166248 r166259  
     12014-03-25  Radu Stavila  <stavila@adobe.com>
     2
     3        [CSS Regions] The background of children of scrollable elements flowed into regions is not properly scrolled
     4        https://bugs.webkit.org/show_bug.cgi?id=130574
     5
     6        Reviewed by David Hyatt.
     7
     8        Added tests for properly painting background of children of scrollable elements flowed into regions.
     9
     10        * fast/regions/scrollable-region-scrollable-absolute-content-background-expected.html: Added.
     11        * fast/regions/scrollable-region-scrollable-absolute-content-background.html: Added.
     12        * fast/regions/scrollable-region-scrollable-content-background-expected.html: Added.
     13        * fast/regions/scrollable-region-scrollable-content-background.html: Added.
     14
    1152014-03-25  Michael Saboff  <msaboff@apple.com>
    216
  • trunk/Source/WebCore/ChangeLog

    r166257 r166259  
     12014-03-25  Radu Stavila  <stavila@adobe.com>
     2
     3        [CSS Regions] The background of children of scrollable elements flowed into regions is not properly scrolled
     4        https://bugs.webkit.org/show_bug.cgi?id=130574
     5
     6        Reviewed by David Hyatt.
     7
     8        When computing the clip rect for painting the box decorations, the scrolled content offset
     9        must be computed by going up the containing block tree, up to the region.
     10
     11        Tests: fast/regions/scrollable-region-scrollable-absolute-content-background.html
     12               fast/regions/scrollable-region-scrollable-content-background.html
     13
     14        * rendering/RenderNamedFlowThread.cpp:
     15        (WebCore::RenderNamedFlowThread::decorationsClipRectForBoxInNamedFlowFragment):
     16
    1172014-03-25  Joseph Pecoraro  <pecoraro@apple.com>
    218
  • trunk/Source/WebCore/rendering/RenderNamedFlowThread.cpp

    r165890 r166259  
    298298    // Now flip it again.
    299299    flipForWritingModeLocalCoordinates(visualOverflowRect);
    300    
    301     // Take the scrolled offset of the region into consideration.
    302     IntSize scrolledContentOffset = fragment.fragmentContainer().scrolledContentOffset();
     300
     301    // Take the scrolled offset of this object's parents into consideration.
     302    IntSize scrolledContentOffset;
     303    RenderBlock* containingBlock = box.containingBlock();
     304    while (containingBlock) {
     305        if (containingBlock->isRenderNamedFlowThread()) {
     306            // We've reached the flow thread, take the scrolled offset of the region into consideration.
     307            ASSERT(containingBlock == this);
     308            scrolledContentOffset += fragment.fragmentContainer().scrolledContentOffset();
     309            break;
     310        }
     311       
     312        scrolledContentOffset += containingBlock->scrolledContentOffset();
     313        containingBlock = containingBlock->containingBlock();
     314    }
     315
    303316    if (!scrolledContentOffset.isZero()) {
    304317        if (style().isFlippedBlocksWritingMode())
Note: See TracChangeset for help on using the changeset viewer.