Bug 36652 - Fixed, transformed elements are not repainted while scrolling or update
Summary: Fixed, transformed elements are not repainted while scrolling or update
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Benjamin Poulain
URL:
Keywords:
Depends on: 36686 31283 33150 37637
Blocks:
  Show dependency treegraph
 
Reported: 2010-03-26 04:05 PDT by Benjamin Poulain
Modified: 2010-07-23 22:13 PDT (History)
5 users (show)

See Also:


Attachments
Patch (4.26 KB, patch)
2010-03-26 04:14 PDT, Benjamin Poulain
no flags Details | Formatted Diff | Diff
Test case for Safari (317 bytes, text/html)
2010-03-26 08:51 PDT, Benjamin Poulain
no flags Details
Test case for Safari (899 bytes, text/html)
2010-03-26 09:33 PDT, Benjamin Poulain
no flags Details
Patch (22.50 KB, patch)
2010-03-26 10:26 PDT, Benjamin Poulain
simon.fraser: review-
simon.fraser: commit-queue-
Details | Formatted Diff | Diff
First half of the patch, fix FrameView (3.31 KB, patch)
2010-03-29 08:33 PDT, Benjamin Poulain
hyatt: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Poulain 2010-03-26 04:05:13 PDT
Fixed, transformed elements are not repainted correctly because the update rect we sent to ChromeClient does not correspond to the area where the element really is.

It seems there are two patches causing this issue:
-31283: update the way fixed, transformed element are handled, but did not update RenderBox::computeRectForRepaint() accordingly.
-33150: paintingRootRect() is used to find the repaint rect. This method does not (and should not) take into account the transformation of the current element.
Comment 1 Benjamin Poulain 2010-03-26 04:14:00 PDT
Created attachment 51725 [details]
Patch

I could not make an layouttest because:
1) We don't have pixel tests in Qt
1) Apple's port don't use FrameView.

Any idea is welcome on how to test the repaint rect after scrolling.
Comment 2 Simon Fraser (smfr) 2010-03-26 07:39:50 PDT
Does the bug reproduce on Mac?
Comment 3 Benjamin Poulain 2010-03-26 08:44:46 PDT
(In reply to comment #2)
> Does the bug reproduce on Mac?

The change in RenderBox::computeRectForRepaint() is a problem for Mac. I just found a way to reproduce it:
-scroll the page
-update the transformed-fixed block
-enjoy :)

So I guess I have now a way to do the pixel test :)
Comment 4 Benjamin Poulain 2010-03-26 08:51:59 PDT
Created attachment 51743 [details]
Test case for Safari

A test page to test the problem easily on Safari trunk:
-scroll the page
-open the inspector
-change the color of the transformed rect
-> the color does not change
Comment 5 Benjamin Poulain 2010-03-26 09:33:39 PDT
Created attachment 51750 [details]
Test case for Safari

Test case with Javascript, the one I plan to use for the pixel test.
Comment 6 Benjamin Poulain 2010-03-26 10:26:24 PDT
Created attachment 51757 [details]
Patch

Same patch with a pixel test for Mac.
Comment 7 Benjamin Poulain 2010-03-26 10:28:43 PDT
(In reply to comment #3)
> (In reply to comment #2)
> > Does the bug reproduce on Mac?
> 
> The change in RenderBox::computeRectForRepaint() is a problem for Mac.

I meant the change in RenderBox::computeRectForRepaint() also fix a problem for Mac...
Comment 8 Simon Fraser (smfr) 2010-03-26 11:57:11 PDT
I plan to review this but I'll have to think about it for a bit. Please don't r+ it yet.
Comment 9 Simon Fraser (smfr) 2010-03-26 18:00:08 PDT
Comment on attachment 51757 [details]
Patch

> From 99851c34f49d4e81dc4fff9f21d37b30688a260a Mon Sep 17 00:00:00 2001
> From: Benjamin Poulain <benjamin.poulain@nokia.com>
> Date: Fri, 26 Mar 2010 18:24:34 +0100
> Subject: [PATCH] Patch
> 
> ---
>  LayoutTests/ChangeLog                              |   12 ++++++++
>  .../fixed-transformed-update-after-scroll.html     |   28 ++++++++++++++++++++
>  ...ansformed-update-after-scroll-expected.checksum |    1 +
>  ...ed-transformed-update-after-scroll-expected.png |  Bin 0 -> 18398 bytes
>  ...ed-transformed-update-after-scroll-expected.txt |   10 +++++++
>  WebCore/ChangeLog                                  |   27 +++++++++++++++++++
>  WebCore/page/FrameView.cpp                         |    3 +-
>  WebCore/rendering/RenderBox.cpp                    |    1 -
>  WebCore/rendering/RenderObject.cpp                 |    8 +++++
>  WebCore/rendering/RenderObject.h                   |    4 ++-
>  10 files changed, 90 insertions(+), 4 deletions(-)
>  create mode 100644 LayoutTests/fast/repaint/fixed-transformed-update-after-scroll.html
>  create mode 100644 LayoutTests/platform/mac/fast/repaint/fixed-transformed-update-after-scroll-expected.checksum
>  create mode 100644 LayoutTests/platform/mac/fast/repaint/fixed-transformed-update-after-scroll-expected.png
>  create mode 100644 LayoutTests/platform/mac/fast/repaint/fixed-transformed-update-after-scroll-expected.txt
> 
> diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
> index b4bdacc..051db0f 100644
> --- a/LayoutTests/ChangeLog
> +++ b/LayoutTests/ChangeLog
> @@ -1,3 +1,15 @@
> +2010-03-26  Benjamin Poulain  <benjamin.poulain@nokia.com>
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        Fixed, transformed elements are not repainted while scrolling or update
> +        https://bugs.webkit.org/show_bug.cgi?id=36652
> +
> +        * fast/repaint/fixed-transformed-update-after-scroll.html: Added.
> +        * platform/mac/fast/repaint/fixed-transformed-update-after-scroll-expected.checksum: Added.
> +        * platform/mac/fast/repaint/fixed-transformed-update-after-scroll-expected.png: Added.
> +        * platform/mac/fast/repaint/fixed-transformed-update-after-scroll-expected.txt: Added.
> +
>  2010-03-26  Yael Aharon  <yael.aharon@nokia.com>
>  
>          Reviewed by Antti Koivisto.
> diff --git a/LayoutTests/fast/repaint/fixed-transformed-update-after-scroll.html b/LayoutTests/fast/repaint/fixed-transformed-update-after-scroll.html
> new file mode 100644
> index 0000000..78709cb
> --- /dev/null
> +++ b/LayoutTests/fast/repaint/fixed-transformed-update-after-scroll.html
> @@ -0,0 +1,28 @@
> +<html>
> +</head>
> +    <script type="text/javascript">
> +        function scrollAndRepaint()
> +        {
> +            scrollBy(0, 100);
> +            if (window.layoutTestController) {
> +                document.body.offsetTop;
> +                layoutTestController.display();
> +                repaintTest();
> +            } else {
> +                setTimeout(repaintTest, 100);
> +            }
> +       }
> +       function repaintTest()
> +       {
> +           document.getElementById('transformed').style.backgroundColor = "blue";
> +       }
> +    </script>
> +</head>
> +<body onload="scrollAndRepaint()">
> +
> +<body style="height: 5000px;">
> + <div style="width: 100px; height: 100px; background-color: red; position: fixed; top: 60px; left: 60px;"></div>
> + <div id="transformed" style="width: 100px; height: 100px; background-color: green; position: fixed; top: 70px; left: 170px; -webkit-transform:
> +rotate(30deg);"></div>
> +</body>
> +</html>
> diff --git a/LayoutTests/platform/mac/fast/repaint/fixed-transformed-update-after-scroll-expected.checksum b/LayoutTests/platform/mac/fast/repaint/fixed-transformed-update-after-scroll-expected.checksum
> new file mode 100644
> index 0000000..527f090
> --- /dev/null
> +++ b/LayoutTests/platform/mac/fast/repaint/fixed-transformed-update-after-scroll-expected.checksum
> @@ -0,0 +1 @@
> +08b405fcf3bf7631cd6a1d4fb9fa6e6b
> \ No newline at end of file
> diff --git a/LayoutTests/platform/mac/fast/repaint/fixed-transformed-update-after-scroll-expected.png b/LayoutTests/platform/mac/fast/repaint/fixed-transformed-update-after-scroll-expected.png
> new file mode 100644
> index 0000000000000000000000000000000000000000..944fb098d46505bf1ddfa360e440a42c5180ee09
> GIT binary patch
> literal 18398
> zcmeHv`9GB3`~R41Sz=Nl*^3uhqHNiwtflCcLSYCY`<AhcWl{`cXrb&<sq9PEv1Ke-
> zqZo{>v9Dv_m(MLT<@Nsl1>eUbzv0~HzRq=?*YjG=x$fW_+8T^>C+R>S5aSh1)teyD
> zAs!G2Y(Ps5{3XWykrVLC>;n~*8&_0Rcy72jT0XG54+42mJh|0s%W~=1j<mzaZ+x_O
> zZI9%7MDSg?lV+{<LwXxxX3K!*E>MfGIDe(nL3(Od;PX4wFriJjUu`CtX4jv~YtBOa
> z>XW-_|MaK*W0uS+I^XPYt>E2cWsC1(zYNjG(R~2K=+b^+*`IQlvF_#@$OAjXWt%M&
> zDE!UgOBc@E#!qXXroI&5y6!#J<;8?F)T{R1gy+IDV%iI0XdZ7v2Q^~4g|msQ&UAN<
> zf>8<s$wGB*v;#w33)5&hZBLJ?&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--git a/LayoutTests/platform/mac/fast/repaint/fixed-transformed-update-after-scroll-expected.txt b/LayoutTests/platform/mac/fast/repaint/fixed-transformed-update-after-scroll-expected.txt
> new file mode 100644
> index 0000000..f089252
> --- /dev/null
> +++ b/LayoutTests/platform/mac/fast/repaint/fixed-transformed-update-after-scroll-expected.txt
> @@ -0,0 +1,10 @@
> +layer at (0,0) size 785x5016
> +  RenderView at (0,0) size 785x600
> +layer at (0,0) size 785x5016
> +  RenderBlock {HTML} at (0,0) size 785x5016
> +    RenderBody {BODY} at (8,8) size 769x5000
> +layer at (60,160) size 100x100
> +  RenderBlock (positioned) {DIV} at (60,60) size 100x100 [bgcolor=#FF0000]
> +layer at (170,170) size 100x100
> +  RenderBlock (positioned) {DIV} at (170,70) size 100x100 [bgcolor=#0000FF]
> +scrolled to 0,100
> diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
> index 685dd1b..ad7221a 100644
> --- a/WebCore/ChangeLog
> +++ b/WebCore/ChangeLog
> @@ -1,3 +1,30 @@
> +2010-03-26  Benjamin Poulain  <benjamin.poulain@nokia.com>
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        Fixed, transformed elements are not repainted while scrolling or update
> +        https://bugs.webkit.org/show_bug.cgi?id=36652
> +
> +        FrameViewWebCore::scrollContentsFastPath() now use the new
> +        function RenderObject::clippedOverflowRectIncludingDescendants() so
> +        the returned rect take into account the transformations of the current
> +        and child elements.
> +
> +        RenderBox::computeRectForRepaint() is updated to take into account
> +        if an element is fixed whe computing the repaint rect,
> +        even if there is a transformation.
> +
> +
> +        Test: fast/repaint/fixed-transformed-update-after-scroll.html
> +
> +        * page/FrameView.cpp:
> +        (WebCore::FrameView::scrollContentsFastPath):
> +        * rendering/RenderBox.cpp:
> +        (WebCore::RenderBox::computeRectForRepaint):
> +        * rendering/RenderObject.cpp:
> +        (WebCore::RenderObject::clippedOverflowRectIncludingDescendants):
> +        * rendering/RenderObject.h:
> +
>  2010-03-26  Yael Aharon  <yael.aharon@nokia.com>
>  
>          Reviewed by Antti Koivisto.
> diff --git a/WebCore/page/FrameView.cpp b/WebCore/page/FrameView.cpp
> index 32127e3..d911a00 100644
> --- a/WebCore/page/FrameView.cpp
> +++ b/WebCore/page/FrameView.cpp
> @@ -881,8 +881,7 @@ bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta, const IntRect
>          RenderBox* renderBox = *it;
>          if (renderBox->style()->position() != FixedPosition)
>              continue;
> -        IntRect topLevelRect;
> -        IntRect updateRect = renderBox->paintingRootRect(topLevelRect);
> +        IntRect updateRect = renderBox->clippedOverflowRectIncludingDescendants(renderBox->containerForRepaint());
>          updateRect.move(-scrollX(), -scrollY());
>          updateRect.intersect(rectToScroll);
>          if (!updateRect.isEmpty()) {


> diff --git a/WebCore/rendering/RenderBox.cpp b/WebCore/rendering/RenderBox.cpp
> index 1c0e837..de9d779 100644
> --- a/WebCore/rendering/RenderBox.cpp
> +++ b/WebCore/rendering/RenderBox.cpp
> @@ -1195,7 +1195,6 @@ void RenderBox::computeRectForRepaint(RenderBoxModelObject* repaintContainer, In
>      // We are now in our parent container's coordinate space.  Apply our transform to obtain a bounding box
>      // in the parent's coordinate space that encloses us.
>      if (layer() && layer()->transform()) {
> -        fixed = false;

This method should have similar code to mapLocalToContainer(), but now that I look at that code, it seems wrong, and I'm not convinced that this change makes computeRectForRepaint() do the right thing in call cases. It seems that it may break a repaint of a fixed pos element inside a transformed element; please test that.

mapAbsoluteToLocalPoint()'s looks right (it's going down, not up the hierarchy).


> +IntRect RenderObject::clippedOverflowRectIncludingDescendants(RenderBoxModelObject* repaintContainer)
> +{
> +    IntRect repaintRect = clippedOverflowRectForRepaint(repaintContainer);
> +    for (RenderObject* child = firstChild(); child; child = child->nextSibling())
> +        repaintRect.unite(child->clippedOverflowRectIncludingDescendants(repaintContainer));
> +    return repaintRect;
> +}

It's sad that you have to add this, but I guess you need it for the fast scrolling code.
Comment 10 Simon Fraser (smfr) 2010-03-26 18:13:32 PDT
I filed bug 36686 to look into mapLocalToContainer. I think it's mostly correct, but assumes that 'fixed' has been set to 'true' when called directly on a fixed element.

computeRectForRepaint() should have similar code.
Comment 11 Benjamin Poulain 2010-03-29 08:33:15 PDT
Created attachment 51913 [details]
First half of the patch, fix FrameView

I split the patch in two, so the part that does not depends on transformations can already be reviewed.

The other half need to be fixed with 36686.
Comment 12 Benjamin Poulain 2010-03-29 12:13:43 PDT
(In reply to comment #11)
> Created an attachment (id=51913) [details]
> First half of the patch, fix FrameView
> 
> I split the patch in two, so the part that does not depends on transformations
> can already be reviewed.
> 
> The other half need to be fixed with 36686.

For info, I did not submitted a test on this half because a pixel test is the only way to reproduce the issue, but:
-the pixel tests are not run for Qt
-the patch cannot be reproduced on Mac because the port does not use FrameView.
Comment 13 James Robinson 2010-03-31 16:29:07 PDT
Does this handle outlines correctly?  They're handled separately from overflow.

It seems really unfortunate that clippedOverflowRectIncludingDescendants() is an O(N^2) pass through all the fixed position's descendants in the fast path scrolling code.  I'm worried that this might be slower than just going through the slowpath if a large part of the DOM is inside a position:fixed element.
Comment 14 Benjamin Poulain 2010-04-01 06:46:18 PDT
(In reply to comment #13)
> Does this handle outlines correctly?  They're handled separately from overflow.

I think it should, we already use clippedOverflowRect() to compute repaint rects elsewhere in Webkit.
I can test that on Tuesday though.

> It seems really unfortunate that clippedOverflowRectIncludingDescendants() is
> an O(N^2) pass through all the fixed position's descendants in the fast path
> scrolling code.  I'm worried that this might be slower than just going through
> the slowpath if a large part of the DOM is inside a position:fixed element.

O(N^2)?
I would say N*M where N is the number of fixed element but capped to 5, and M the number of child.
It is marginally slower than paintingRootRect() which almost do the same thing.

If you think this will be a performance problem, I can have a look at using the repaint rect of RenderLayer. If https://bugs.webkit.org/show_bug.cgi?id=36783 is correct, the repaintrect of the layers becomes meaningful for fixed elements.
Comment 15 James Robinson 2010-04-01 11:05:10 PDT
> > It seems really unfortunate that clippedOverflowRectIncludingDescendants() is
> > an O(N^2) pass through all the fixed position's descendants in the fast path
> > scrolling code.  I'm worried that this might be slower than just going through
> > the slowpath if a large part of the DOM is inside a position:fixed element.
> 
> O(N^2)?
> I would say N*M where N is the number of fixed element but capped to 5, and M
> the number of child.

RenderObject::clippedOverflowRectForRepaint() does a recursive walk up its containers, so calling it on an element that is D levels deep in the render tree takes O(D) time.  Thus, calling it on an element and all its descendants takes O(N*M) time where N is the number of elements and M is the average number of containers, and in the worst case N =~ M.

> It is marginally slower than paintingRootRect() which almost do the same thing.
> 
> If you think this will be a performance problem, I can have a look at using the
> repaint rect of RenderLayer. If https://bugs.webkit.org/show_bug.cgi?id=36783
> is correct, the repaintrect of the layers becomes meaningful for fixed
> elements.
Comment 16 Dave Hyatt 2010-04-06 13:09:24 PDT
repaintIncludingDescendants on RenderLayer is kind of what you want here (rather than crawling the whole render tree, which is way slower).  I don't know if you need to get the rects out to do your heuristics with them, but in terms of repainting, conceptually you just want to repaint the layer tree.
Comment 17 Dave Hyatt 2010-04-06 13:09:50 PDT
Comment on attachment 51913 [details]
First half of the patch, fix FrameView

Minusing the patch since a render tree grovel is too slow.
Comment 18 Benjamin Poulain 2010-05-20 06:16:53 PDT
Closing. This is not relevant anymore.
Comment 19 Daniel Bates 2010-07-23 22:13:14 PDT
Comment on attachment 51913 [details]
First half of the patch, fix FrameView

Clearing commit-queue flag to get this out of the commit-queue.