RESOLVED FIXED 102534
[chromium] Add flag to enable/disable touch adjustment at runtime.
https://bugs.webkit.org/show_bug.cgi?id=102534
Summary [chromium] Add flag to enable/disable touch adjustment at runtime.
Kevin Ellis
Reported 2012-11-16 10:12:29 PST
[chromium] Add flag to enable/disable touch adjustment at runtime.
Attachments
Patch (7.30 KB, patch)
2012-11-16 10:16 PST, Kevin Ellis
no flags
Patch (9.94 KB, patch)
2012-11-20 09:54 PST, Kevin Ellis
no flags
Patch (9.95 KB, patch)
2012-11-20 11:58 PST, Kevin Ellis
no flags
Patch (8.60 KB, patch)
2012-11-20 13:25 PST, Kevin Ellis
no flags
Patch (8.60 KB, patch)
2012-11-20 14:04 PST, Kevin Ellis
no flags
Patch (9.31 KB, patch)
2012-11-21 06:19 PST, Kevin Ellis
no flags
Kevin Ellis
Comment 1 2012-11-16 10:16:36 PST
WebKit Review Bot
Comment 2 2012-11-16 10:20:42 PST
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
James Robinson
Comment 3 2012-11-16 10:32:22 PST
Comment on attachment 174717 [details] Patch I'm not terribly familiar with this feature - why does it make sense to adjust this on a per-process basis instead of something per WebView? When would an embedder want to toggle this behavior?
Kevin Ellis
Comment 4 2012-11-16 13:21:44 PST
(In reply to comment #3) > (From update of attachment 174717 [details]) > I'm not terribly familiar with this feature - why does it make sense to adjust this on a per-process basis instead of something per WebView? When would an embedder want to toggle this behavior? The primary use of this feature is for the chrome developer to diagnose problems with touch. To this end, following the same pattern used for enabling/disabling touch events.
Kevin Ellis
Comment 5 2012-11-20 09:54:15 PST
Allan Sandfeld Jensen
Comment 6 2012-11-20 10:59:52 PST
Comment on attachment 175237 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=175237&action=review Looks good overall. > Source/WebCore/page/EventHandler.cpp:2706 > +bool EventHandler::touchAdjustmentEnabled(const PlatformGestureEvent& event) > +{ > + if (m_frame->settings() && !m_frame->settings()->touchAdjustmentEnabled()) > + return false; > + return !event.area().isEmpty(); > +} With the combination of checking both the flag and if gesture events come with an area I am not sure touchAdjustmentEnabled is the right word. Perhaps shouldApplyTouchAdjustment, or something similar.
Adam Barth
Comment 7 2012-11-20 11:26:51 PST
Comment on attachment 175237 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=175237&action=review > Source/WebCore/page/Settings.h:295 > +#if ENABLE(TOUCH_ADJUSTMENT) > + void setEnableTouchAdjustment(bool flag) { m_touchAdjustmentEnabled = flag; } > + bool touchAdjustmentEnabled() const { return m_touchAdjustmentEnabled; } > +#endif Please use Settings.in rather than creating this setting manually.
Kevin Ellis
Comment 8 2012-11-20 11:58:10 PST
Kevin Ellis
Comment 9 2012-11-20 13:25:34 PST
Kevin Ellis
Comment 10 2012-11-20 13:26:09 PST
Comment on attachment 175237 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=175237&action=review >> Source/WebCore/page/EventHandler.cpp:2706 >> +} > > With the combination of checking both the flag and if gesture events come with an area I am not sure touchAdjustmentEnabled is the right word. Perhaps shouldApplyTouchAdjustment, or something similar. Done. >> Source/WebCore/page/Settings.h:295 >> +#endif > > Please use Settings.in rather than creating this setting manually. Done.
WebKit Review Bot
Comment 11 2012-11-20 13:27:52 PST
Attachment 175267 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/ChangeLog:21: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] Total errors found: 1 in 8 files If any of these errors are false positives, please file a bug against check-webkit-style.
Kevin Ellis
Comment 12 2012-11-20 14:04:57 PST
Allan Sandfeld Jensen
Comment 13 2012-11-20 14:17:26 PST
Comment on attachment 175274 [details] Patch LGTM, but not a reviewer.
Antonio Gomes
Comment 14 2012-11-20 16:40:13 PST
Comment on attachment 175274 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=175274&action=review Looks good. One minor issue, one request and one question. would like to see another round before it lands, then the r-. > Source/WebCore/ChangeLog:9 > + [chromium] Add flag to enable/disable touch adjustment at runtime. > + https://bugs.webkit.org/show_bug.cgi?id=102534 > + > + Reviewed by NOBODY (OOPS!). > + > + Add setting for enabling or disabling touch adjustment. > + You should mention here why the compile time only flag is not enough. Things like when compile-time would be enabled, but the run-time setting disable, etc. > Source/WebCore/page/EventHandler.cpp:2701 > +bool EventHandler::shouldApplyTouchAdjustment(const PlatformGestureEvent& event) const? > Source/WebCore/page/Settings.in:143 > +touchAdjustmentEnabled initial=true default true? How does it work when the compile flag is disabled? Do we care? Found it a bit odd ...
Kevin Ellis
Comment 15 2012-11-21 06:19:23 PST
Kevin Ellis
Comment 16 2012-11-21 06:22:45 PST
Comment on attachment 175274 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=175274&action=review >> Source/WebCore/ChangeLog:9 >> + > > You should mention here why the compile time only flag is not enough. Things like when compile-time would be enabled, but the run-time setting disable, etc. Done. >> Source/WebCore/page/EventHandler.cpp:2701 >> +bool EventHandler::shouldApplyTouchAdjustment(const PlatformGestureEvent& event) > > const? Done. >> Source/WebCore/page/Settings.in:143 >> +touchAdjustmentEnabled initial=true > > default true? How does it work when the compile flag is disabled? Do we care? Found it a bit odd ... Added comment to indicate that both the compile option is also required to enable touch adjustment. This option provides dynamic control to disable touch adjustment as required at run-time.
Antonio Gomes
Comment 17 2012-11-21 06:40:43 PST
Comment on attachment 175425 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=175425&action=review > Source/WebCore/page/EventHandler.cpp:2750 > bool EventHandler::adjustGesturePosition(const PlatformGestureEvent& gestureEvent, IntPoint& adjustedPoint) did not check all call sites, but this returned bool seems not too useful.
Adam Barth
Comment 18 2012-11-21 09:49:42 PST
Comment on attachment 175425 [details] Patch API change LGTM
WebKit Review Bot
Comment 19 2012-11-21 10:10:04 PST
Comment on attachment 175425 [details] Patch Clearing flags on attachment: 175425 Committed r135414: <http://trac.webkit.org/changeset/135414>
WebKit Review Bot
Comment 20 2012-11-21 10:10:09 PST
All reviewed patches have been landed. Closing bug.
Eric Seidel (no email)
Comment 21 2013-01-04 00:52:57 PST
Comment on attachment 175274 [details] Patch Cleared review? from obsolete attachment 175274 [details] so that this bug does not appear in http://webkit.org/pending-review. If you would like this patch reviewed, please attach it to a new bug (or re-open this bug before marking it for review again).
Note You need to log in before you can comment on or make changes to this bug.