RESOLVED FIXED 74216
[chromium] Add three small zoom gesture features
https://bugs.webkit.org/show_bug.cgi?id=74216
Summary [chromium] Add three small zoom gesture features
Alexandre Elias
Reported 2011-12-09 14:27:45 PST
[chromium] Add three small zoom gesture features
Attachments
Patch (7.38 KB, patch)
2011-12-09 14:44 PST, Alexandre Elias
no flags
Patch (12.17 KB, patch)
2012-01-30 16:14 PST, Alexandre Elias
no flags
Patch (12.21 KB, patch)
2012-01-30 18:43 PST, Alexandre Elias
no flags
Patch (12.17 KB, patch)
2012-01-30 18:49 PST, Alexandre Elias
no flags
Patch (12.29 KB, patch)
2012-02-02 21:26 PST, Alexandre Elias
no flags
Alexandre Elias
Comment 1 2011-12-09 14:44:08 PST
Alexandre Elias
Comment 2 2012-01-09 20:49:04 PST
Ping. We should submit this at some point to avoid diverging the branches.
Alexandre Elias
Comment 3 2012-01-30 16:14:23 PST
Alexandre Elias
Comment 4 2012-01-30 16:15:20 PST
Added a unit test.
James Robinson
Comment 5 2012-01-30 18:10:06 PST
Comment on attachment 124621 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=124621&action=review Not sure about the .95, everything else looks OK > Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:511 > + if (m_prevPinchAnchor == IntPoint()) IntPoint should probably have .isZero() like IntSize does > Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:550 > + if (m_pageScaleDelta > 0.95) this magic number feels really weird. why .95? why aren't we comparing to 1? > Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:553 > + // Cmpute where the scroll offset/page scale would be if fully pinch-zoomed typo "Cmpute"
Alexandre Elias
Comment 6 2012-01-30 18:42:40 PST
(In reply to comment #5) > (From update of attachment 124621 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=124621&action=review > > Not sure about the .95, everything else looks OK > > > Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:511 > > + if (m_prevPinchAnchor == IntPoint()) > > IntPoint should probably have .isZero() like IntSize does Changed to == IntPoint::zero(), which is the closest approximation I can see. > > > Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:550 > > + if (m_pageScaleDelta > 0.95) > > this magic number feels really weird. why .95? why aren't we comparing to 1? The idea is not to be too aggressive in triggering this until the gesture is big enough that we think it's going to turn into a substantial zoom out (it could be initial jitter on a zoom in gesture, or an accidental second finger touching the screen -- in those cases, everything going blurry would be distracting).
Alexandre Elias
Comment 7 2012-01-30 18:43:41 PST
Alexandre Elias
Comment 8 2012-01-30 18:49:13 PST
James Robinson
Comment 9 2012-02-02 17:02:39 PST
Comment on attachment 124658 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=124658&action=review OK > Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:551 > + if (m_pageScaleDelta > 0.95) i'd weakly prefer that this magic number be made a named constant and defined outside the statement that uses it. > Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:156 > + IntPoint m_prevPinchAnchor; naming nit: "previous" is better than "prev" > Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp:71 > + ASSERT_EQ(scrollDelta.width(), scrollInfo.scrolls[i].scrollDelta.width()); > + ASSERT_EQ(scrollDelta.height(), scrollInfo.scrolls[i].scrollDelta.height()); do we really need to crash the test immediately if these assertions fail, or could these be EXPECT_EQs?
Alexandre Elias
Comment 10 2012-02-02 21:26:18 PST
Alexandre Elias
Comment 11 2012-02-02 21:27:45 PST
OK, made those changes.
James Robinson
Comment 12 2012-02-21 21:08:55 PST
Comment on attachment 125255 [details] Patch R=me. Sorry this took so long, just kept forgetting about it.
WebKit Review Bot
Comment 13 2012-02-21 21:28:51 PST
Comment on attachment 125255 [details] Patch Clearing flags on attachment: 125255 Committed r108445: <http://trac.webkit.org/changeset/108445>
WebKit Review Bot
Comment 14 2012-02-21 21:28:56 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.