Bug 102764 - Use m_webView->size() for viewport update
Summary: Use m_webView->size() for viewport update
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-19 20:56 PST by Tien-Ren Chen
Modified: 2012-11-21 15:10 PST (History)
3 users (show)

See Also:


Attachments
Patch (2.50 KB, patch)
2012-11-19 21:01 PST, Tien-Ren Chen
no flags Details | Formatted Diff | Diff
Patch (2.47 KB, patch)
2012-11-19 21:11 PST, Tien-Ren Chen
no flags Details | Formatted Diff | Diff
Patch (8.39 KB, patch)
2012-11-20 17:55 PST, Tien-Ren Chen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tien-Ren Chen 2012-11-19 20:56:42 PST
Use m_webView->size() for viewport update
Comment 1 Tien-Ren Chen 2012-11-19 21:01:27 PST
Created attachment 175128 [details]
Patch
Comment 2 Tien-Ren Chen 2012-11-19 21:11:59 PST
Created attachment 175130 [details]
Patch
Comment 3 Brent Fulgham 2012-11-19 21:35:57 PST
Comment on attachment 175130 [details]
Patch

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

I think the general concept here is good, but I think there is relatively weak evidence that this won't have unexpected changes in behavior.

> Source/WebKit/chromium/ChangeLog:12
> +        rendering purpose.

While the intent of this change seems good, it seems scary to apply such a modification without at least identifying some test cases that cover this behavior. From the sound of the bug, it should be possible to construct a test case illustrating the case of a pending resize that should not be used for the current rendering.
Comment 4 Tien-Ren Chen 2012-11-19 21:40:16 PST
(In reply to comment #3)
> (From update of attachment 175130 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=175130&action=review
> 
> I think the general concept here is good, but I think there is relatively weak evidence that this won't have unexpected changes in behavior.
> 
> > Source/WebKit/chromium/ChangeLog:12
> > +        rendering purpose.
> 
> While the intent of this change seems good, it seems scary to apply such a modification without at least identifying some test cases that cover this behavior. From the sound of the bug, it should be possible to construct a test case illustrating the case of a pending resize that should not be used for the current rendering.

Makes sense. The real life bug I have is this one: https://code.google.com/p/chromium/issues/detail?id=160619
That windowRect will be one frame behind when rotating an Android device.

I think I can probably do a WebFrameTest for that. I'll try tomorrow.
Comment 5 Adam Barth 2012-11-19 23:46:07 PST
"Your client does not have permission to get URL /p/chromium/issues/detail?id=160619 from this server."
Comment 6 Adam Barth 2012-11-19 23:46:47 PST
Comment on attachment 175130 [details]
Patch

Can you add a test?
Comment 7 Tien-Ren Chen 2012-11-20 17:24:59 PST
(In reply to comment #3)
> (From update of attachment 175130 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=175130&action=review
> 
> I think the general concept here is good, but I think there is relatively weak evidence that this won't have unexpected changes in behavior.
> 
> > Source/WebKit/chromium/ChangeLog:12
> > +        rendering purpose.
> 
> While the intent of this change seems good, it seems scary to apply such a modification without at least identifying some test cases that cover this behavior. From the sound of the bug, it should be possible to construct a test case illustrating the case of a pending resize that should not be used for the current rendering.

I just added some debug output to RenderWidget::setWindowRect and RenderWidget::OnResize. I think it is very wrong to use windowRect in the first place.

The semantics of windowRect is the outer rect of the window, that is, including all decorations like the title bar, status bar, navigation buttons and such. I don't think it makes any sense to use it for layout purpose.

(In reply to comment #6)
> (From update of attachment 175130 [details])
> Can you add a test?

Instead of adding tests, I think we should modify all tests in WebFrameTest to remove the windowRect() override in WebViewClient implementations. The tests should still work without windowRect().
Comment 8 Adam Barth 2012-11-20 17:34:50 PST
> Instead of adding tests, I think we should modify all tests in WebFrameTest to remove the windowRect() override in WebViewClient implementations. The tests should still work without windowRect().

That sounds worth trying.
Comment 9 Tien-Ren Chen 2012-11-20 17:55:32 PST
Created attachment 175313 [details]
Patch
Comment 10 Adam Barth 2012-11-21 14:59:21 PST
Comment on attachment 175313 [details]
Patch

Thanks for updating the tests.
Comment 11 WebKit Review Bot 2012-11-21 15:10:06 PST
Comment on attachment 175313 [details]
Patch

Clearing flags on attachment: 175313

Committed r135442: <http://trac.webkit.org/changeset/135442>
Comment 12 WebKit Review Bot 2012-11-21 15:10:10 PST
All reviewed patches have been landed.  Closing bug.