Bug 72682

Summary: iframe fails to scroll in composited page
Product: WebKit Reporter: Vangelis Kokkevis <vangelis>
Component: Layout and RenderingAssignee: Adrienne Walker <enne>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarrin, enne, simon.fraser, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Add a transform to the test
none
Greatly simplify none

Description Vangelis Kokkevis 2011-11-17 17:30:48 PST
This was reported in:http://code.google.com/p/chromium/issues/detail?id=103250

To reproduce:
1. Go to http://dl.dropbox.com/u/671766/chromecanvasbug/testcanvas.html
2. Try to scroll the inner scrollable iframe. It should scroll fine.
3. Open the inspector and find the canvas element. Add a -webkit-transform:translateZ(0) to it.
4. Try to scroll the inner scrollable iframe again.  The scrollbar moves but the contents won't update.


This repros in Chrome 17, Safari 5 and WebKit nightly r100547
Comment 1 Adrienne Walker 2011-12-12 14:50:15 PST
Created attachment 118860 [details]
Patch
Comment 2 Simon Fraser (smfr) 2011-12-12 14:53:17 PST
Comment on attachment 118860 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=118860&action=review

> Source/WebCore/page/FrameView.cpp:1548
> +        LayoutRect rect(frameRenderer->borderLeft() + frameRenderer->paddingLeft(),
> +                        frameRenderer->borderTop() + frameRenderer->paddingTop(),
> +                        frameView->visibleWidth(), frameView->visibleHeight());
> +        frameRenderer->repaintRectangle(rect);

It's not clear that this rect math works correctly if there's a CSS transform between this frame view and the one doing the repainting.
Comment 3 Adrienne Walker 2011-12-12 17:11:25 PST
Created attachment 118915 [details]
Add a transform to the test
Comment 4 Adrienne Walker 2011-12-12 17:14:25 PST
Comment on attachment 118915 [details]
Add a transform to the test

Er, ignore this patch.  Sorry.
Comment 5 Simon Fraser (smfr) 2011-12-12 17:18:05 PST
Comment on attachment 118915 [details]
Add a transform to the test

View in context: https://bugs.webkit.org/attachment.cgi?id=118915&action=review

> Source/WebCore/page/FrameView.cpp:1550
> +            FloatPoint absoluteLocation = thisOwnerRenderer->localToAbsolute(rect.location(), false, true);
> +            rect.setLocation(roundedIntPoint(frameRenderer->absoluteToLocal(absoluteLocation, false, true)));

I think you should use Widget::convertToContainingView() here.
Comment 6 Adrienne Walker 2011-12-12 17:23:05 PST
Created attachment 118922 [details]
Greatly simplify
Comment 7 Adrienne Walker 2011-12-12 17:24:33 PST
(In reply to comment #6)
> Created an attachment (id=118922) [details]
> Greatly simplify

It looks like repaintRectangle on the inner iframe renderer ends up converting to the right space.  That seems simpler than doing the conversion manually.
Comment 8 WebKit Review Bot 2011-12-12 18:32:37 PST
Comment on attachment 118922 [details]
Greatly simplify

Clearing flags on attachment: 118922

Committed r102649: <http://trac.webkit.org/changeset/102649>
Comment 9 WebKit Review Bot 2011-12-12 18:32:42 PST
All reviewed patches have been landed.  Closing bug.