Bug 42771 - Composited layers don't scroll in WebKit2
: Composited layers don't scroll in WebKit2
Status: RESOLVED FIXED
: WebKit
WebKit2
: 528+ (Nightly build)
: Macintosh Mac OS X 10.5
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2010-07-21 10:52 PST by
Modified: 2010-08-16 16:48 PST (History)


Attachments
Patch for some prep work (4.22 KB, patch)
2010-07-21 12:20 PST, Simon Fraser (smfr)
no flags Review Patch | Details | Formatted Diff | Diff
More prep work: single bottleneck method (3.43 KB, patch)
2010-07-22 11:54 PST, Simon Fraser (smfr)
no flags Review Patch | Details | Formatted Diff | Diff
Patch (12.07 KB, patch)
2010-07-22 17:29 PST, Simon Fraser (smfr)
andersca: review+
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2010-07-21 10:52:39 PST
In WebKit2, composited layers don't scroll with the rest of the page.
------- Comment #1 From 2010-07-21 12:20:37 PST -------
Created an attachment (id=62217) [details]
Patch
------- Comment #2 From 2010-07-21 14:07:47 PST -------
(From update of attachment 62217 [details])
http://trac.webkit.org/changeset/63856
------- Comment #3 From 2010-07-21 21:54:26 PST -------
I tried the patch at http://pastie.org/1054420 in a Chromium mac build and it appears to work fine - the scrolling repaint pixel tests all pass and the scrolling behavior appears correct when manually tested as well.
------- Comment #4 From 2010-07-22 11:54:00 PST -------
Created an attachment (id=62322) [details]
Patch
------- Comment #5 From 2010-07-22 13:19:12 PST -------
(From update of attachment 62322 [details])
http://trac.webkit.org/changeset/63907
------- Comment #6 From 2010-07-22 17:29:06 PST -------
Created an attachment (id=62365) [details]
Patch
------- Comment #7 From 2010-07-22 18:41:28 PST -------
(From update of attachment 62217 [details])
Cleared Anders Carlsson's review+ from obsolete attachment 62217 [details] so that this bug does not appear in http://webkit.org/pending-commit.
------- Comment #8 From 2010-07-22 18:41:34 PST -------
(From update of attachment 62322 [details])
Cleared Darin Adler's review+ from obsolete attachment 62322 [details] so that this bug does not appear in http://webkit.org/pending-commit.
------- Comment #9 From 2010-07-26 10:18:09 PST -------
(From update of attachment 62365 [details])
> diff --git a/WebCore/rendering/RenderLayerCompositor.cpp b/WebCore/rendering/RenderLayerCompositor.cpp
> index 234ad7f270191ef8a7ba5870b072d875bf6f7423..14d45927b3ca31cce19bce537343bbd90ccf8553 100644
> --- a/WebCore/rendering/RenderLayerCompositor.cpp
> +++ b/WebCore/rendering/RenderLayerCompositor.cpp
> -void RenderLayerCompositor::updateContentLayerScrollPosition(const IntPoint& scrollPosition)
> +void RenderLayerCompositor::frameViewDidScroll(const IntPoint& scrollPosition)
>  {
>      if (m_scrollLayer)
>          m_scrollLayer->setPosition(FloatPoint(-scrollPosition.x(), -scrollPosition.y()));
> @@ -1039,6 +1039,9 @@ bool RenderLayerCompositor::shouldPropagateCompositingToEnclosingIFrame() const
>      // On non-Mac platforms, let compositing propagate for all iframes.
>      return true;
>  #else
> +    if (!m_renderView->frameView()->platformWidget())
> +        return true;
> +
Could you add a comment about why we check for a null platform widget here?

Looks fine otherwise!
------- Comment #10 From 2010-07-26 10:48:49 PST -------
http://trac.webkit.org/changeset/64054
------- Comment #11 From 2010-07-26 11:58:48 PST -------
http://trac.webkit.org/changeset/64054 might have broken Leopard Intel Debug (Tests)
The following changes are on the blame list:
http://trac.webkit.org/changeset/64053
http://trac.webkit.org/changeset/64054
------- Comment #12 From 2010-08-16 16:36:35 PST -------
This patch broke scrolling in Chromium when there is a fixed position element.

Chromium bug:
http://code.google.com/p/chromium/issues/detail?id=52332

It seems like we end up missing some invalidates after scrolling.
------- Comment #13 From 2010-08-16 16:48:56 PST -------
(In reply to comment #12)
> This patch broke scrolling in Chromium when there is a fixed position element.
> 
> Chromium bug:
> http://code.google.com/p/chromium/issues/detail?id=52332
> 
> It seems like we end up missing some invalidates after scrolling.

Sounds like bug 42949.