Bug 66672 - [Qt][WK2] ViewportInteractionEngine: the position of the content is not corrected when scaling the page manually
Summary: [Qt][WK2] ViewportInteractionEngine: the position of the content is not corre...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Benjamin Poulain
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2011-08-22 07:10 PDT by Benjamin Poulain
Modified: 2011-11-26 11:52 PST (History)
1 user (show)

See Also:


Attachments
Patch (4.37 KB, patch)
2011-08-22 07:16 PDT, Benjamin Poulain
kenneth: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Poulain 2011-08-22 07:10:54 PDT
When zooming, both the position and the scale needs to come back to the boundary.
Comment 1 Benjamin Poulain 2011-08-22 07:16:13 PDT
Created attachment 104674 [details]
Patch
Comment 2 Kenneth Rohde Christiansen 2011-08-22 07:21:29 PDT
Comment on attachment 104674 [details]
Patch

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

> Source/WebKit2/ChangeLog:9
> +        This method is now used as the entry point for animations in order to avoid bugs of scale or position.

s/of/regarding

> Source/WebKit2/UIProcess/qt/ViewportInteractionEngine.cpp:254
> +    animateContentScaleIntoBoundariesIfNeeded();
> +    animateContentPositionIntoBoundariesIfNeeded();

Shouldn't they be animated together?
Comment 3 Benjamin Poulain 2011-08-22 07:36:57 PDT
(In reply to comment #2)
> s/of/regarding
> 
> > Source/WebKit2/UIProcess/qt/ViewportInteractionEngine.cpp:254
> > +    animateContentScaleIntoBoundariesIfNeeded();
> > +    animateContentPositionIntoBoundariesIfNeeded();
> 
> Shouldn't they be animated together?

I think QParallelAnimationGroup will do the trick. I will try to keep the methods separated even if they must have a common animation, just for the sake of keeping the code clean.
Comment 4 Benjamin Poulain 2011-08-23 05:39:40 PDT
Committed r93592: <http://trac.webkit.org/changeset/93592>