Bug 132726 - [iOS][WK2] Set up the resize events
Summary: [iOS][WK2] Set up the resize events
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Benjamin Poulain
Depends on:
Reported: 2014-05-08 21:51 PDT by Benjamin Poulain
Modified: 2014-05-09 16:09 PDT (History)
1 user (show)

See Also:

Patch (18.64 KB, patch)
2014-05-08 22:33 PDT, Benjamin Poulain
no flags Details | Formatted Diff | Diff
Patch (27.23 KB, patch)
2014-05-09 15:41 PDT, Benjamin Poulain
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Poulain 2014-05-08 21:51:38 PDT
[iOS][WK2] Set up the resize events
Comment 1 Benjamin Poulain 2014-05-08 22:33:22 PDT
Created attachment 231131 [details]
Comment 2 Darin Adler 2014-05-09 10:56:58 PDT
Comment on attachment 231131 [details]

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

This is so tricky that it really demands test coverage; we need to figure out how to test this in an automated way. I’m really concerned that we will break this in the future.

> Source/WebCore/WebCore.exp.in:2451
> +__ZN7WebCore9FrameView27setCustomSizeForResizeEventENS_7IntSizeE

Should run the sort-export-file script. I’m pretty sure that this will sort lower in the file, because it’s a literal ASCII sort, so 9F will come after 10.

> Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h:54
> +        , m_isChangingObscuredInsetsInteractively(isChangingObscuredInsetsInteractively)

We want to initialize this to false above in the default constructor too.

> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:2039
> +    frameView.setCustomSizeForResizeEvent(roundedIntSize(unobscuredContentRectSizeInContentCoordinates));

I worry about the use of rounded in all the various cases like this, but I suppose it’s not new. Is rounding correct as opposed to ceiling or floor?
Comment 3 Benjamin Poulain 2014-05-09 15:41:31 PDT
Created attachment 231189 [details]
Comment 4 Simon Fraser (smfr) 2014-05-09 15:46:21 PDT
Comment on attachment 231189 [details]

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

> Source/WebKit2/ChangeLog:8
> +        Wire the UI Process updates to frameview to send the resize events appropriately.


> Source/WebKit2/ChangeLog:29
> +        Since JavaScript now gets two chances to change the content, we query the actual scroll offset

Can you explain the "now gets two chances" here in the change log?

> Source/WebCore/page/FrameView.h:701
> +    bool m_useCustomSizeForResizeEvent;

You forgot to initialize this in the constructor.
Comment 5 Benjamin Poulain 2014-05-09 16:09:09 PDT
Committed r168556: <http://trac.webkit.org/changeset/168556>