Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1348)

Issue 2863693003: Unify TouchAction classes (Closed)

Created:
3 years, 7 months ago by xidachen
Modified:
3 years, 7 months ago
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-layout_chromium.org, blink-reviews-platform-graphics_chromium.org, blink-reviews-style_chromium.org, Rik, cc-bugs_chromium.org, chromium-reviews, dglazkov+blink, dshwang, drott+blinkwatch_chromium.org, krit, dtapuska+blinkwatch_chromium.org, eae+blinkwatch, fmalita+watch_chromium.org, jchaffraix+rendering, Justin Novosad, kinuko+watch, leviw+renderwatch, Navid Zolghadr, pdr+graphicswatchlist_chromium.org, pdr+renderingwatchlist_chromium.org, rwlbuis, Stephen Chennney, sunxd, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Unify TouchAction classes There are three TouchAction classes in chromium codebase and they look and function exact the same. This CL unifies them into one. We put a canonical one under cc/input/, and then the one in blink is placed under platform/graphics, the one in blink is just using cc's TouchAction. We also create a WebTouchAction enum under public/platform/ which directly uses the TouchAction in platform/graphics/. The reason of adding WebTouchAction is that there are methods in WebWidgetClient.h that is overridden by class under content/. This CL does pure refactor, it causes no behavior change at all. BUG=718525 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2863693003 Cr-Commit-Position: refs/heads/master@{#470919} Committed: https://chromium.googlesource.com/chromium/src/+/fa0199e7e18ee33c28356449b6ba48ab41c879e7

Patch Set 1 #

Patch Set 2 : almost done #

Patch Set 3 : needs more work #

Total comments: 2

Patch Set 4 : Unfortunately doesn't work #

Total comments: 4

Patch Set 5 : can build #

Patch Set 6 : add comment in WebTouchAction #

Patch Set 7 : fix unit test #

Patch Set 8 : fix browser_tests #

Patch Set 9 : more tests #

Total comments: 5

Patch Set 10 : comments #

Patch Set 11 : rebase #

Patch Set 12 : change gn file #

Patch Set 13 : add cc/input/touch_action.h to BUILD.gn #

Total comments: 1

Patch Set 14 : link crbug for rework enum to enum class #

Patch Set 15 : add cstdlib #

Unified diffs Side-by-side diffs Delta from patch set Stats (+295 lines, -374 lines) Patch
M cc/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
A cc/input/touch_action.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +56 lines, -0 lines 0 comments Download
M content/browser/renderer_host/input/input_router_impl.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/input/input_router_impl.cc View 1 4 chunks +4 lines, -5 lines 0 comments Download
M content/browser/renderer_host/input/input_router_impl_unittest.cc View 1 2 3 4 5 6 7 8 12 chunks +13 lines, -13 lines 0 comments Download
M content/browser/renderer_host/input/touch_action_filter.h View 1 4 chunks +4 lines, -4 lines 0 comments Download
M content/browser/renderer_host/input/touch_action_filter.cc View 1 8 chunks +16 lines, -16 lines 0 comments Download
M content/browser/renderer_host/input/touch_action_filter_unittest.cc View 1 2 3 4 5 6 7 8 35 chunks +64 lines, -63 lines 0 comments Download
M content/browser/site_per_process_browsertest.cc View 1 2 3 4 5 6 7 8 9 6 chunks +11 lines, -11 lines 0 comments Download
M content/child/assert_matching_enums.cc View 1 2 chunks +0 lines, -18 lines 0 comments Download
M content/common/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -1 line 0 comments Download
D content/common/input/touch_action.h View 1 1 chunk +0 lines, -62 lines 0 comments Download
M content/common/input_messages.h View 1 4 chunks +3 lines, -3 lines 0 comments Download
M content/renderer/render_view_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_widget.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +2 lines, -2 lines 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h View 1 2 chunks +12 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp View 1 1 chunk +13 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/core/events/TouchEvent.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/events/TouchEvent.cpp View 1 4 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/events/TouchEventTest.cpp View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/input/TouchActionUtil.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/input/TouchActionUtil.cpp View 1 3 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/input/TouchEventManager.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/input/TouchEventManager.cpp View 1 2 3 4 5 6 7 8 9 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutObject.cpp View 1 3 chunks +6 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTheme.cpp View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/loader/EmptyClients.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/page/ChromeClient.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.h View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyleConstants.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -28 lines 0 comments Download
M third_party/WebKit/Source/core/style/StyleRareNonInheritedData.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/graphics/TouchAction.h View 1 1 chunk +17 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/AssertMatchingEnums.cpp View 1 2 chunks +0 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/web/ChromeClientImpl.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/ChromeClientImpl.cpp View 1 2 3 4 5 6 7 8 9 3 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/TouchActionTest.cpp View 1 2 3 4 5 6 5 chunks +13 lines, -12 lines 0 comments Download
M third_party/WebKit/public/BUILD.gn View 1 2 3 4 5 6 2 chunks +1 line, -1 line 0 comments Download
A third_party/WebKit/public/platform/WebTouchAction.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +19 lines, -0 lines 0 comments Download
D third_party/WebKit/public/web/WebTouchAction.h View 1 4 1 chunk +0 lines, -68 lines 0 comments Download
M third_party/WebKit/public/web/WebWidgetClient.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 64 (23 generated)
xidachen
https://codereview.chromium.org/2863693003/diff/40001/third_party/WebKit/public/web/WebWidgetClient.h File third_party/WebKit/public/web/WebWidgetClient.h (right): https://codereview.chromium.org/2863693003/diff/40001/third_party/WebKit/public/web/WebWidgetClient.h#newcode145 third_party/WebKit/public/web/WebWidgetClient.h:145: virtual void SetTouchAction(blink::TouchAction touch_action) {} wkorman@, pdr@: I am ...
3 years, 7 months ago (2017-05-05 15:17:52 UTC) #4
wkorman
https://codereview.chromium.org/2863693003/diff/40001/third_party/WebKit/public/web/WebWidgetClient.h File third_party/WebKit/public/web/WebWidgetClient.h (right): https://codereview.chromium.org/2863693003/diff/40001/third_party/WebKit/public/web/WebWidgetClient.h#newcode145 third_party/WebKit/public/web/WebWidgetClient.h:145: virtual void SetTouchAction(blink::TouchAction touch_action) {} On 2017/05/05 15:17:52, xidachen ...
3 years, 7 months ago (2017-05-05 20:25:47 UTC) #5
xidachen
https://codereview.chromium.org/2863693003/diff/60001/third_party/WebKit/public/web/WebWidgetClient.h File third_party/WebKit/public/web/WebWidgetClient.h (right): https://codereview.chromium.org/2863693003/diff/60001/third_party/WebKit/public/web/WebWidgetClient.h#newcode142 third_party/WebKit/public/web/WebWidgetClient.h:142: virtual void SetTouchAction(blink::WebTouchAction touch_action) {} So I tried this, ...
3 years, 7 months ago (2017-05-05 20:32:46 UTC) #6
wkorman
https://codereview.chromium.org/2863693003/diff/60001/third_party/WebKit/public/web/WebTouchAction.h File third_party/WebKit/public/web/WebTouchAction.h (right): https://codereview.chromium.org/2863693003/diff/60001/third_party/WebKit/public/web/WebTouchAction.h#newcode9 third_party/WebKit/public/web/WebTouchAction.h:9: #include "platform/graphics/TouchAction.h" What if we move WebTouchAction to public/platform? ...
3 years, 7 months ago (2017-05-05 20:39:15 UTC) #7
wkorman
https://codereview.chromium.org/2863693003/diff/60001/third_party/WebKit/public/web/WebTouchAction.h File third_party/WebKit/public/web/WebTouchAction.h (right): https://codereview.chromium.org/2863693003/diff/60001/third_party/WebKit/public/web/WebTouchAction.h#newcode9 third_party/WebKit/public/web/WebTouchAction.h:9: #include "platform/graphics/TouchAction.h" On 2017/05/05 20:39:15, wkorman wrote: > What ...
3 years, 7 months ago (2017-05-05 20:40:52 UTC) #8
xidachen
https://codereview.chromium.org/2863693003/diff/60001/third_party/WebKit/public/web/WebTouchAction.h File third_party/WebKit/public/web/WebTouchAction.h (right): https://codereview.chromium.org/2863693003/diff/60001/third_party/WebKit/public/web/WebTouchAction.h#newcode9 third_party/WebKit/public/web/WebTouchAction.h:9: #include "platform/graphics/TouchAction.h" On 2017/05/05 20:40:52, wkorman wrote: > On ...
3 years, 7 months ago (2017-05-05 20:41:47 UTC) #9
xidachen
danakj@: cc/ pfeldman@: content/ esprehn@, pdr@: WebKit/ PTAL.
3 years, 7 months ago (2017-05-08 00:11:05 UTC) #13
xidachen
sunxd@: FYI
3 years, 7 months ago (2017-05-08 15:58:57 UTC) #15
wkorman
lgtm https://codereview.chromium.org/2863693003/diff/160001/cc/input/touch_action.h File cc/input/touch_action.h (right): https://codereview.chromium.org/2863693003/diff/160001/cc/input/touch_action.h#newcode10 cc/input/touch_action.h:10: // The current touch action specifies what accelerated ...
3 years, 7 months ago (2017-05-08 19:03:01 UTC) #16
xidachen
-esprehn@ +jbroman@: Please take a look at core/ and platform/, thanks.
3 years, 7 months ago (2017-05-09 12:11:51 UTC) #18
danakj
cc LGTM % wkorman https://codereview.chromium.org/2863693003/diff/160001/cc/input/touch_action.h File cc/input/touch_action.h (right): https://codereview.chromium.org/2863693003/diff/160001/cc/input/touch_action.h#newcode13 cc/input/touch_action.h:13: const size_t kTouchActionBits = 6; ...
3 years, 7 months ago (2017-05-09 14:29:46 UTC) #19
jbroman
cc seems slightly odd given there are apparently no uses in cc at all, but ...
3 years, 7 months ago (2017-05-09 14:40:26 UTC) #20
danakj
On Tue, May 9, 2017 at 10:40 AM, <jbroman@chromium.org> wrote: > cc seems slightly odd ...
3 years, 7 months ago (2017-05-09 14:56:06 UTC) #21
xidachen
Sorry that I forgot to mention the whole story. We are trying to pass the ...
3 years, 7 months ago (2017-05-09 15:00:48 UTC) #22
danakj
On Tue, May 9, 2017 at 10:40 AM, <jbroman@chromium.org> wrote: > cc seems slightly odd ...
3 years, 7 months ago (2017-05-09 15:03:33 UTC) #23
danakj
On Tue, May 9, 2017 at 11:00 AM, <xidachen@chromium.org> wrote: > Sorry that I forgot ...
3 years, 7 months ago (2017-05-09 15:08:22 UTC) #24
danakj
On Tue, May 9, 2017 at 11:00 AM, <xidachen@chromium.org> wrote: > Sorry that I forgot ...
3 years, 7 months ago (2017-05-09 15:08:23 UTC) #25
xidachen
So besides changing TouchAction::kTouchActionNone to TouchAction::kNone, I should probably change what the TouchAction looks like. ...
3 years, 7 months ago (2017-05-09 15:37:19 UTC) #26
danakj
On Tue, May 9, 2017 at 11:37 AM, <xidachen@chromium.org> wrote: > So besides changing TouchAction::kTouchActionNone ...
3 years, 7 months ago (2017-05-09 15:52:12 UTC) #27
danakj
On Tue, May 9, 2017 at 11:37 AM, <xidachen@chromium.org> wrote: > So besides changing TouchAction::kTouchActionNone ...
3 years, 7 months ago (2017-05-09 15:53:27 UTC) #28
blink-reviews
On Tue, May 9, 2017 at 11:45 AM <danakj@chromium.org> wrote: > On Tue, May 9, ...
3 years, 7 months ago (2017-05-09 16:06:20 UTC) #29
chromium-reviews
On Tue, May 9, 2017 at 11:45 AM <danakj@chromium.org> wrote: > On Tue, May 9, ...
3 years, 7 months ago (2017-05-09 16:06:21 UTC) #30
wkorman
I had a comment re: 'enum class' in draft but I removed it. I think ...
3 years, 7 months ago (2017-05-09 20:11:35 UTC) #31
danakj
On Tue, May 9, 2017 at 12:06 PM, Xida Chen <xidachen@google.com> wrote: > > > ...
3 years, 7 months ago (2017-05-09 21:30:21 UTC) #32
danakj
On Tue, May 9, 2017 at 12:06 PM, Xida Chen <xidachen@google.com> wrote: > > > ...
3 years, 7 months ago (2017-05-09 21:30:23 UTC) #33
wkorman
On 2017/05/09 21:30:23, danakj wrote: > On Tue, May 9, 2017 at 12:06 PM, Xida ...
3 years, 7 months ago (2017-05-09 22:19:22 UTC) #34
danakj
On Tue, May 9, 2017 at 6:19 PM, <wkorman@chromium.org> wrote: > On 2017/05/09 21:30:23, danakj ...
3 years, 7 months ago (2017-05-09 22:30:38 UTC) #35
danakj
On Tue, May 9, 2017 at 6:19 PM, <wkorman@chromium.org> wrote: > On 2017/05/09 21:30:23, danakj ...
3 years, 7 months ago (2017-05-09 22:35:51 UTC) #36
xidachen
Based on the comments, I only made some small changes to cc/input/touch_action.h (adding more comments ...
3 years, 7 months ago (2017-05-10 14:43:19 UTC) #37
xidachen
+tsepez@: content/common/. PTAL.
3 years, 7 months ago (2017-05-10 15:43:15 UTC) #39
Tom Sepez
lgtm
3 years, 7 months ago (2017-05-10 16:31:16 UTC) #40
pdr.
On 2017/05/10 at 16:31:16, tsepez wrote: > lgtm Lgtm
3 years, 7 months ago (2017-05-10 17:08:19 UTC) #41
wkorman
https://codereview.chromium.org/2863693003/diff/240001/cc/input/touch_action.h File cc/input/touch_action.h (right): https://codereview.chromium.org/2863693003/diff/240001/cc/input/touch_action.h#newcode15 cc/input/touch_action.h:15: // subsystems. Suggest adding TODO, filing P3 bug and ...
3 years, 7 months ago (2017-05-10 17:56:56 UTC) #42
xidachen
+piman@: content/ PTAL, thank you.
3 years, 7 months ago (2017-05-10 18:31:08 UTC) #44
piman
lgtm
3 years, 7 months ago (2017-05-10 18:33:52 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2863693003/260001
3 years, 7 months ago (2017-05-10 18:40:06 UTC) #48
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_android on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_android/builds/265001) mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 7 months ago (2017-05-10 18:59:21 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2863693003/280001
3 years, 7 months ago (2017-05-10 19:31:23 UTC) #53
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/450602)
3 years, 7 months ago (2017-05-10 22:19:52 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2863693003/280001
3 years, 7 months ago (2017-05-11 11:25:58 UTC) #61
commit-bot: I haz the power
3 years, 7 months ago (2017-05-11 11:34:45 UTC) #64
Message was sent while issue was closed.
Committed patchset #15 (id:280001) as
https://chromium.googlesource.com/chromium/src/+/fa0199e7e18ee33c28356449b6ba...

Powered by Google App Engine
This is Rietveld 408576698