Bug 65541

Summary: [Qt][WK2] Prevent fractional positions for unscaled tiles with QTouchWebPage.
Product: WebKit Reporter: Jocelyn Turcotte <jturcotte>
Component: New BugsAssignee: Jocelyn Turcotte <jturcotte>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: benjamin, jturcotte, ostap73
Priority: P2 Keywords: Qt
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 65528    
Bug Blocks:    
Attachments:
Description Flags
Patch none

Description Jocelyn Turcotte 2011-08-02 08:08:12 PDT
[Qt][WK2] Prevent fractional positions for unscaled tiles with QTouchWebPage.
Comment 1 Jocelyn Turcotte 2011-08-02 08:43:18 PDT
Created attachment 102657 [details]
Patch
Comment 2 Benjamin Poulain 2011-08-02 10:07:06 PDT
Comment on attachment 102657 [details]
Patch

Why is this only for pinch?
I would think TouchViewInterface::pinchGestureRequestUpdate() can be in float coordinate. Then TouchViewInterface::pinchGestureEnded() would reset the coordinate to int.
And the scroll() should have the same treatment.

I don't really like the idea of doing this but if that is the only way to get something looking nice...no choice :(
Comment 3 Jocelyn Turcotte 2011-08-02 10:37:02 PDT
(In reply to comment #2)
> Why is this only for pinch?
> I would think TouchViewInterface::pinchGestureRequestUpdate() can be in float coordinate. Then TouchViewInterface::pinchGestureEnded() would reset the coordinate to int.
> And the scroll() should have the same treatment.

panGestureRequestScroll always gets us int-aligned deltas since the touch events come from the viewport's coordinates which is the page's parent. I'll change scroll to take int parameters and do the same conversion to make it clearer.

I tried to do the alignment in pinchGestureEnded like you say, but this would not make the pinching feel any smoother and you would get this glitch-looking frame just after releasing the finger and moving the page by 0.345px.

> I don't really like the idea of doing this but if that is the only way to get something looking nice...no choice :(

Samuel told me that QGraphicsView did the int-alignment itself in similar conditions, tell me if you think of a better way.
Comment 4 Benjamin Poulain 2011-08-02 18:52:54 PDT
Comment on attachment 102657 [details]
Patch

Clearing the review flag for now. Jocelyn will see if we can simply get the feature in the framework.
Comment 5 Jocelyn Turcotte 2013-03-19 11:35:26 PDT
Fixed using QQuickFlickable::setPixelAligned instead.

*** This bug has been marked as a duplicate of bug 83770 ***