[webkit-reviews] review granted: [Bug 110183] [chromium] Fix races in double-tap zoom minimum scale policy : [Attachment 188997] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 19 10:07:57 PST 2013


Adam Barth <abarth at webkit.org> has granted Alexandre Elias
<aelias at chromium.org>'s request for review:
Bug 110183: [chromium] Fix races in double-tap zoom minimum scale policy
https://bugs.webkit.org/show_bug.cgi?id=110183

Attachment 188997: Patch
https://bugs.webkit.org/attachment.cgi?id=188997&action=review

------- Additional Comments from Adam Barth <abarth at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=188997&action=review


This code really needs to be refactored.  All the page scaling state should be
moved into a separate object that can be unit tested without introducing a
bunch of "for testing" state.  One way to do that is to have the object call
back through a virtual interface that actually operators on the WebView.  For
testing, we can supply a mock implementation of the interface (e.g., so we
don't need a "for testing" branch to avoid
m_layerTreeView->startPageScaleAnimation).

We can land this patch as-is, but please consider a followup patch to refactor
this code.

> Source/WebKit/chromium/src/WebViewImpl.cpp:406
> +    , m_doubleTapZoomPageScaleFactor(0)
> +    , m_doubleTapZoomPending(false)
> +    , m_enableFakeDoubleTapAnimationForTesting(false)
> +    , m_fakeDoubleTapPageScaleFactor(0)
> +    , m_fakeDoubleTapUseAnchor(false)

So much state!	We really should move all this viewport related state out into
its own object.


More information about the webkit-reviews mailing list