Bug 72508 - [Qt][WK2] Do not apply new viewport properties until after the first visually non-empty layout.
Summary: [Qt][WK2] Do not apply new viewport properties until after the first visually...
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
Depends on:
Reported: 2011-11-16 08:05 PST by zalan
Modified: 2011-11-17 02:56 PST (History)
6 users (show)

See Also:

Patch (16.04 KB, patch)
2011-11-16 08:12 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (16.07 KB, patch)
2011-11-17 02:31 PST, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2011-11-16 08:05:51 PST
[Qt][WK2] Do not apply new viewport properties until after the first visually non-empty layout.
Comment 1 zalan 2011-11-16 08:12:56 PST
Created attachment 115381 [details]
Comment 2 Kenneth Rohde Christiansen 2011-11-16 08:24:29 PST
Comment on attachment 115381 [details]

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

> Source/WebKit2/ChangeLog:6
> +        Delay applying viewport properties on the new document until after the first visually

not on the new document but on our viewport item

> Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp:109
>  void QQuickWebViewPrivate::loadDidCommit()
>  {
> -    if (!useTraditionalDesktopBehaviour)
> -        interactionEngine->reset();
> +    transitioningToNewPage = true;
>  }

Maybe we should set this to true on crash as well.

> Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp:126
> +    // Do not apply the new content size, until after the first visually non-empty layout finished.

I dont think the comment is needed

> Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp:143
> +    // Make sure, the new viewport values are not applied to the old content.

same here

> Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp:190
>      _q_viewportUpdated();

I hate callbacks like this here... have to look what it does... not your fault though :-) and not part of this patch

> Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h:88
> +    class PostTransitionState {

A comment here would make sense, linking to the wiki page for instance

> Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h:97
> +            p->interactionEngine->applyConstraints(p->computeViewportConstraints());

future: Maybe those constraints shouldnt be in the interaction engine itself

> Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h:111
> +    bool isTransitioningToNewPage() const {return transitioningToNewPage; }

missing space

> Source/WebKit2/UIProcess/qt/ClientImpl.cpp:157
> +    if (!WKFrameIsMainFrame(frame))
> +        return;

I prefer a newline after this
Comment 3 zalan 2011-11-17 02:31:11 PST
Created attachment 115546 [details]
Comment 4 WebKit Review Bot 2011-11-17 02:56:42 PST
Comment on attachment 115546 [details]

Clearing flags on attachment: 115546

Committed r100590: <http://trac.webkit.org/changeset/100590>
Comment 5 WebKit Review Bot 2011-11-17 02:56:46 PST
All reviewed patches have been landed.  Closing bug.