Bug 72030 - [Qt] the QQuickWebView should support double-tap to zoom
Summary: [Qt] the QQuickWebView should support double-tap to zoom
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kenneth Rohde Christiansen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-10 08:47 PST by Kenneth Rohde Christiansen
Modified: 2011-11-14 04:15 PST (History)
5 users (show)

See Also:


Attachments
Patch (9.40 KB, patch)
2011-11-10 08:52 PST, Kenneth Rohde Christiansen
no flags Details | Formatted Diff | Diff
Rebased (9.40 KB, patch)
2011-11-10 09:03 PST, Kenneth Rohde Christiansen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Rohde Christiansen 2011-11-10 08:47:12 PST
SSIA
Comment 1 Kenneth Rohde Christiansen 2011-11-10 08:52:00 PST
Created attachment 114510 [details]
Patch
Comment 2 Zeno Albisser 2011-11-10 08:56:38 PST
Comment on attachment 114510 [details]
Patch

looks awesome to me :)
Comment 3 Kenneth Rohde Christiansen 2011-11-10 09:03:18 PST
Created attachment 114515 [details]
Rebased
Comment 4 Andreas Kling 2011-11-10 09:18:47 PST
Comment on attachment 114515 [details]
Rebased

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

r=me with some cool stories, bro.

> Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.cpp:251
> +    if (scrollAnimationActive() || scaleAnimationActive())
> +        return;
> +
> +    if (!targetArea.isValid())
> +        return;

Nit: I'd put the !targetArea.isValid() check first, since it's inline.

> Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.cpp:253
> +    int margin = 10; // We want at least a little bit or margin.

This variable should be const.

> Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.cpp:273
> +    QRectF endPosRange = computePosRangeForItemAtScale(endItemScale);

endPositionRange would be a better name I think.
Actually, thinking about it, I personally prefer "final" to "end" in this context, but maybe "end" is an existing QtQuick convention. Regardless, NABD.
Comment 5 Kenneth Rohde Christiansen 2011-11-10 12:56:45 PST
(In reply to comment #4)
> (From update of attachment 114515 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=114515&action=review
> 
> r=me with some cool stories, bro.
> 
> > Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.cpp:251
> > +    if (scrollAnimationActive() || scaleAnimationActive())
> > +        return;
> > +
> > +    if (!targetArea.isValid())
> > +        return;
> 
> Nit: I'd put the !targetArea.isValid() check first, since it's inline.

Good point

> > Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.cpp:253
> > +    int margin = 10; // We want at least a little bit or margin.
> 
> This variable should be const.

Sure
 
> > Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.cpp:273
> > +    QRectF endPosRange = computePosRangeForItemAtScale(endItemScale);
> 
> endPositionRange would be a better name I think.

It is, but Pos was choosed to be similar to the QQuick API :-) setPosRange() *hint*

> Actually, thinking about it, I personally prefer "final" to "end" in this context, but maybe "end" is an existing QtQuick convention. Regardless, NABD.

Yeah that is used all over in the API (and in our code)
Comment 6 Kenneth Rohde Christiansen 2011-11-14 04:15:45 PST
Comment on attachment 114515 [details]
Rebased

Landed in 100125