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

Issue 7942004: Consolidate/cleanup event cracking code; single out GdkEvents. (Closed)

Created:
9 years, 3 months ago by msw
Modified:
9 years, 2 months ago
CC:
chromium-reviews, dhollowa
Visibility:
Public.

Description

Consolidate/cleanup event cracking code; single out GdkEvents; saves ~850 lines. Move ui::NativeEvent typdefs and common functions to ui/base/events.h. Remove NativeEvent2 typedef, single out GdkEvent* uses that should be removed. Implement platform specific ui/base/[platform]/events_[platform].cc. Revise views::NativeEvent definitions (to support Aura abstraction). Consolidate Event[Type/Flags/Location]FromNative(), GetMouseWheelOffset(), etc. Remove GetRepeatCount(), GetWindowsFlags(), IsExtendedKey(), etc. Add IsMouseEvent(), KeyboardCodeFromNative(), EF_EXTENDED flag, etc. Localize GetFlagsFromGdkEvent(), move some file locals to new helpers files. Move views/touchui/touch_factory.h|cc to ui/base/touch. Stop mixing Windows mouse events' MK_*BUTTON into their wParams. BUG=93945 TEST=No build breaks (many configs...), no mouse/key behavior changes. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=102815

Patch Set 1 : Windows event code consolidation. #

Total comments: 1

Patch Set 2 : Bring similar X and GTK code to UI; supporting changes. #

Patch Set 3 : Fixup gtk and x impl signatures, gyp rules, etc. #

Patch Set 4 : KeyboardCodeFromNative, Wayland, cleanup and consolidate. #

Total comments: 2

Patch Set 5 : File permissions and aura fix. #

Total comments: 2

Patch Set 6 : Move XEvent to NativeEvent, make GdkEvent a special case, merge touch_factory.cc changes. #

Patch Set 7 : Fix GdkEvent init, NativeWidgetGtk casting, and Get[Unmodified]Character checks. #

Total comments: 6

Patch Set 8 : Address comments. #

Patch Set 9 : Merge changes from r102668. #

Patch Set 10 : Merge changes from r102668. #

Patch Set 11 : Merge removal of compact nav. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1062 lines, -2642 lines) Patch
M chrome/browser/chrome_browser_main.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/frame/panel_controller.cc View 1 2 3 4 5 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/dropdown_bar_host_gtk.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_view_win.cc View 1 2 3 3 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/tab_contents/tab_contents_container_native.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/native_web_keyboard_event_views.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M ui/aura/aura.gyp View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M ui/aura/event.h View 1 2 5 chunks +7 lines, -17 lines 0 comments Download
M ui/aura/event.cc View 1 2 3 4 chunks +27 lines, -1 line 0 comments Download
D ui/aura/event_win.cc View 1 2 3 1 chunk +0 lines, -222 lines 0 comments Download
D ui/aura/event_x.cc View 1 2 3 1 chunk +0 lines, -193 lines 0 comments Download
M ui/base/events.h View 1 2 3 4 5 3 chunks +45 lines, -1 line 0 comments Download
A ui/base/touch/OWNERS View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
A + ui/base/touch/touch_factory.h View 1 2 3 4 5 6 7 8 3 chunks +7 lines, -7 lines 0 comments Download
A + ui/base/touch/touch_factory.cc View 1 2 3 4 5 6 7 8 6 chunks +14 lines, -14 lines 0 comments Download
A ui/base/wayland/events_wayland.cc View 1 2 3 4 1 chunk +133 lines, -0 lines 0 comments Download
A ui/base/win/events_win.cc View 1 2 3 4 1 chunk +210 lines, -0 lines 0 comments Download
A ui/base/x/events_x.cc View 1 2 3 4 5 6 7 8 9 1 chunk +241 lines, -0 lines 0 comments Download
M ui/ui.gyp View 1 2 3 4 5 6 7 8 7 chunks +15 lines, -4 lines 0 comments Download
M ui/ui_views.gypi View 1 2 3 2 chunks +0 lines, -2 lines 0 comments Download
M ui/views/events/event.h View 1 2 3 4 chunks +4 lines, -9 lines 0 comments Download
M ui/views/events/event.cc View 1 2 3 1 chunk +19 lines, -0 lines 0 comments Download
D ui/views/events/event_win.cc View 1 2 3 1 chunk +0 lines, -187 lines 0 comments Download
D ui/views/native_types.h View 1 1 chunk +0 lines, -20 lines 0 comments Download
M ui/views/widget/native_widget.h View 1 1 chunk +1 line, -1 line 0 comments Download
M ui/views/widget/widget.h View 1 1 chunk +1 line, -1 line 0 comments Download
views/controls/menu/menu_controller.cc View 1 chunk +1 line, -1 line 0 comments Download
M views/controls/textfield/textfield.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M views/events/event.h View 1 2 3 4 5 13 chunks +48 lines, -51 lines 0 comments Download
M views/events/event.cc View 1 2 3 4 5 6 4 chunks +52 lines, -18 lines 0 comments Download
M views/events/event_aura.cc View 1 2 3 4 5 6 2 chunks +4 lines, -87 lines 0 comments Download
M views/events/event_gtk.cc View 1 2 3 4 5 3 chunks +111 lines, -104 lines 0 comments Download
D views/events/event_utils_win.h View 1 chunk +0 lines, -34 lines 0 comments Download
D views/events/event_utils_win.cc View 1 chunk +0 lines, -31 lines 0 comments Download
M views/events/event_wayland.cc View 1 2 3 4 5 2 chunks +0 lines, -193 lines 0 comments Download
M views/events/event_win.cc View 1 2 3 4 5 2 chunks +0 lines, -288 lines 0 comments Download
M views/events/event_x.cc View 1 2 3 4 5 6 7 8 5 chunks +67 lines, -320 lines 0 comments Download
M views/focus/accelerator_handler_touch.cc View 1 2 3 4 5 6 7 8 10 chunks +14 lines, -16 lines 0 comments Download
views/ime/input_method_gtk.cc View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M views/ime/input_method_ibus.cc View 1 2 3 4 5 4 chunks +7 lines, -8 lines 0 comments Download
D views/native_types.h View 1 2 3 4 5 1 chunk +0 lines, -66 lines 0 comments Download
M views/touchui/gesture_manager.cc View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
D views/touchui/touch_factory.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -206 lines 0 comments Download
views/touchui/touch_factory.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -502 lines 0 comments Download
M views/views.gyp View 1 2 3 4 5 6 7 8 9 10 5 chunks +5 lines, -7 lines 0 comments Download
M views/widget/native_widget_gtk.cc View 1 2 3 4 5 6 7 8 chunks +9 lines, -9 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
msw
PTAL, thanks!
9 years, 3 months ago (2011-09-19 23:27:25 UTC) #1
Ben Goodger (Google)
http://codereview.chromium.org/7942004/diff/5001/ui/base/win/event_util.h File ui/base/win/event_util.h (right): http://codereview.chromium.org/7942004/diff/5001/ui/base/win/event_util.h#newcode5 ui/base/win/event_util.h:5: #ifndef UI_BASE_WIN_EVENT_UTIL_H_ This looks very similar to the Gtk/X ...
9 years, 3 months ago (2011-09-19 23:49:20 UTC) #2
msw
On 2011/09/19 23:49:20, Ben Goodger (Google) wrote: > http://codereview.chromium.org/7942004/diff/5001/ui/base/win/event_util.h > File ui/base/win/event_util.h (right): > > ...
9 years, 3 months ago (2011-09-19 23:56:27 UTC) #3
msw
I've started making your requested change; it isn't polished, but please make sure I'm going ...
9 years, 3 months ago (2011-09-21 00:16:55 UTC) #4
msw
Ping, I'm fixing errors, but some early high-level feedback is appreciated. (new file locations/names, general ...
9 years, 3 months ago (2011-09-21 18:04:50 UTC) #5
Ben Goodger (Google)
Looks good. Let me know when done. -Ben On Wed, Sep 21, 2011 at 11:04 ...
9 years, 3 months ago (2011-09-21 18:08:04 UTC) #6
msw
This is ready for review; PTAL, thanks! I'll be building and testing some configs in ...
9 years, 3 months ago (2011-09-22 12:22:40 UTC) #7
Ben Goodger (Google)
This is an awesome cleanup! Thanks for doing it. sadrul can comment on the x/touch/wayland ...
9 years, 3 months ago (2011-09-22 15:40:26 UTC) #8
msw
event_aura.cc signatures updated (for const refs) and file permissions set. Please take a look, thanks! ...
9 years, 3 months ago (2011-09-22 19:17:48 UTC) #9
Ben Goodger (Google)
SG LGTM otherwise. On Thu, Sep 22, 2011 at 12:17 PM, <msw@chromium.org> wrote: > event_aura.cc ...
9 years, 3 months ago (2011-09-22 19:31:33 UTC) #10
sadrul
LGTM with the following nits http://codereview.chromium.org/7942004/diff/27001/ui/base/events.h File ui/base/events.h (right): http://codereview.chromium.org/7942004/diff/27001/ui/base/events.h#newcode16 ui/base/events.h:16: #if defined(OS_LINUX) #if defined(TOOLKIT_USES_GTK) ...
9 years, 3 months ago (2011-09-22 20:15:33 UTC) #11
msw
Ben: After talking with Sadrul, I'm going to try to further ostracize GdkEvents (move what's ...
9 years, 3 months ago (2011-09-22 21:41:42 UTC) #12
Ben Goodger (Google)
Nope please proceed! On Thu, Sep 22, 2011 at 2:41 PM, <msw@chromium.org> wrote: > Ben: ...
9 years, 3 months ago (2011-09-23 20:30:07 UTC) #13
msw
Ben, Sadrul: PTAL, the updated approach is working. I'm just checking the unexpected Mac webkit_unit_test ...
9 years, 3 months ago (2011-09-23 21:56:01 UTC) #14
Ben Goodger (Google)
LGTM with one comment and one change requested: http://codereview.chromium.org/7942004/diff/34049/chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.cc File chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.cc (right): http://codereview.chromium.org/7942004/diff/34049/chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.cc#newcode78 chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.cc:78: #elif ...
9 years, 3 months ago (2011-09-24 16:39:04 UTC) #15
sadrul
LGTM http://codereview.chromium.org/7942004/diff/34049/chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.cc File chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.cc (right): http://codereview.chromium.org/7942004/diff/34049/chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.cc#newcode79 chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.cc:79: bool IsMouseEvent(GdkEvent* gdk_event); Are IsMouseEvent/IsSameTopLevelWindow not used/necessary when ...
9 years, 3 months ago (2011-09-24 16:56:08 UTC) #16
msw
Done; landing. http://codereview.chromium.org/7942004/diff/34049/chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.cc File chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.cc (right): http://codereview.chromium.org/7942004/diff/34049/chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.cc#newcode78 chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.cc:78: #elif defined(OS_LINUX) On 2011/09/24 16:39:04, Ben Goodger ...
9 years, 3 months ago (2011-09-26 05:07:59 UTC) #17
commit-bot: I haz the power
CQ is trying tha patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/7942004/39007
9 years, 3 months ago (2011-09-26 05:08:25 UTC) #18
commit-bot: I haz the power
9 years, 3 months ago (2011-09-26 05:08:37 UTC) #19
Can't apply patch for file ui/base/touch/touch_factory.cc.
While running patch -p1 --forward --force;
patching file ui/base/touch/touch_factory.cc
Hunk #1 FAILED at 2.
Hunk #2 FAILED at 29.
Hunk #3 FAILED at 82.
Hunk #4 FAILED at 101.
Hunk #5 FAILED at 122.
Hunk #6 FAILED at 499.
6 out of 6 hunks FAILED -- saving rejects to file
ui/base/touch/touch_factory.cc.rej

Powered by Google App Engine
This is Rietveld 408576698