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

Issue 120503005: Merge NativeTextfieldViews into views::Textfield. (Closed)

Created:
6 years, 11 months ago by msw
Modified:
6 years, 11 months ago
Reviewers:
sky
CC:
chromium-reviews, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, tfarina, penghuang+watch_chromium.org, nona+watch_chromium.org, James Su, Evan Stade, Dan Beam, dmazzoni, oshima, Alexei Svitkine (slow), varunjain, yukawa, Peter Kasting, Yuki, ckocagil
Visibility:
Public.

Description

Merge NativeTextfieldViews into views::Textfield. Consolidate the split textfield code into Textfield. No behavior changes (except STYLE_LOWERCASE GetText nit). Use the underlying model's text and font_list storage. Remove unused code; rename TextfieldViewsModel::text(). Revise gesture and command handling. Skip NotifyAccessibilityEvent native behavior without widget. (No HWND for Views not yet added to view hierarchy) Make TouchEditable::GetNativeView const; avoids conflict. Fix includes, forward decls, Font[List] usage, tests. Ideas for followup cleanup and refactoring: -Cleanup View overrides decl/def order. -Refactor RemoveBorder, SetHorizontalMargins, etc. -Try to use composition instead of inheritance. -Remove textfield style ctor; refactor style code. -Remove STYLE_LOWERCASE functionality (one user). -Replace placeholder DrawStringRect with a Label view. -Cleanup CreateTouchSelectionControllerAndNotifyIt, etc. -Cleanup SetColor/SetTextColor, etc. BUG=131660 TEST=No textfield behavior/appearance regressions. R=sky@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=244377

Patch Set 1 #

Patch Set 2 : Merge additional code. #

Patch Set 3 : Significant additional merging; remove native classes. #

Patch Set 4 : Cleanup unit tests, examples, font functions, etc. #

Patch Set 5 : Fix CrOS; unit tests, override collision. #

Patch Set 6 : Fix build; fixing unit tests; remove vertical margins, etc. #

Patch Set 7 : Fix touch drag and drop unit test. #

Total comments: 4

Patch Set 8 : Rename GetText to text. #

Total comments: 8

Patch Set 9 : Address comments; fix gesture and command handling. #

Patch Set 10 : Fix timer reset, NotifyAccessibilityEvent, DecoratedTextfield. #

Patch Set 11 : Simplify Textfield border code. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2011 lines, -5003 lines) Patch
M chrome/browser/ui/views/autofill/autofill_dialog_views.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/autofill/decorated_textfield.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +7 lines, -18 lines 0 comments Download
M chrome/browser/ui/views/autofill/decorated_textfield.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +39 lines, -55 lines 0 comments Download
D chrome/browser/ui/views/autofill/decorated_textfield_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -23 lines 0 comments Download
M chrome/browser/ui/views/cookie_info_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/dropdown_bar_host.h View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/views/find_bar_view.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/find_bar_view.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +5 lines, -8 lines 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.h View 1 2 1 chunk +1 line, -0 lines 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 +3 lines, -1 line 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_view_views.h View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_view_views.cc View 1 2 3 4 5 6 7 8 9 10 8 chunks +56 lines, -56 lines 0 comments Download
M chrome/browser/ui/views/password_generation_bubble_view.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -1 line 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/web_contents/touch_editable_impl_aura.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/browser/web_contents/touch_editable_impl_aura.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M ui/app_list/views/folder_header_view.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -2 lines 0 comments Download
M ui/app_list/views/search_box_view.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M ui/base/touch/touch_editing_controller.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
D ui/views/controls/textfield/native_textfield_views.h View 1 2 1 chunk +0 lines, -397 lines 0 comments Download
D ui/views/controls/textfield/native_textfield_views.cc View 1 2 1 chunk +0 lines, -1528 lines 0 comments Download
D ui/views/controls/textfield/native_textfield_views_unittest.cc View 1 2 1 chunk +0 lines, -2000 lines 0 comments Download
M ui/views/controls/textfield/textfield.h View 1 2 3 4 5 6 7 8 9 10 9 chunks +209 lines, -110 lines 0 comments Download
M ui/views/controls/textfield/textfield.cc View 1 2 3 4 5 6 7 8 9 10 14 chunks +1202 lines, -223 lines 0 comments Download
M ui/views/controls/textfield/textfield_controller.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -20 lines 0 comments Download
M ui/views/controls/textfield/textfield_controller.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -16 lines 0 comments Download
A + ui/views/controls/textfield/textfield_unittest.cc View 1 2 3 4 5 6 7 62 chunks +188 lines, -222 lines 0 comments Download
M ui/views/controls/textfield/textfield_views_model.h View 1 2 3 4 5 6 7 7 chunks +26 lines, -30 lines 0 comments Download
M ui/views/controls/textfield/textfield_views_model.cc View 1 2 3 4 5 6 7 20 chunks +46 lines, -49 lines 0 comments Download
M ui/views/controls/textfield/textfield_views_model_unittest.cc View 1 2 3 4 5 6 7 31 chunks +181 lines, -187 lines 0 comments Download
M ui/views/ime/input_method_bridge.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M ui/views/touchui/touch_selection_controller_impl_unittest.cc View 1 2 3 18 chunks +28 lines, -33 lines 0 comments Download
M ui/views/view.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M ui/views/views.gyp View 1 2 2 chunks +1 line, -3 lines 0 comments Download
M ui/views/widget/widget.h View 1 2 5 6 7 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 10 (0 generated)
msw
Hey Scott, please take a look; thanks! I can split this up a little, mostly ...
6 years, 11 months ago (2014-01-09 00:27:04 UTC) #1
sky
I assume you're just moving code around here, so I didn't look in the greatest ...
6 years, 11 months ago (2014-01-09 15:56:39 UTC) #2
msw
It's not so straightforward as just moving the code, evidenced by the test failures that ...
6 years, 11 months ago (2014-01-09 20:41:55 UTC) #3
sky
https://codereview.chromium.org/120503005/diff/790001/ui/views/controls/textfield/textfield.cc File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/120503005/diff/790001/ui/views/controls/textfield/textfield.cc#newcode135 ui/views/controls/textfield/textfield.cc:135: set_border(text_border_); Caching the Border is a bad pattern. In ...
6 years, 11 months ago (2014-01-09 21:43:10 UTC) #4
msw
Please take another look; I've made some additional fixes. https://codereview.chromium.org/120503005/diff/790001/ui/views/controls/textfield/textfield.cc File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/120503005/diff/790001/ui/views/controls/textfield/textfield.cc#newcode135 ui/views/controls/textfield/textfield.cc:135: ...
6 years, 11 months ago (2014-01-10 20:34:54 UTC) #5
sky
LGTM
6 years, 11 months ago (2014-01-10 22:02:41 UTC) #6
msw
I made non-trivial changes since patch set 10, simplifying the border code and its users ...
6 years, 11 months ago (2014-01-11 02:56:54 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/120503005/1200002
6 years, 11 months ago (2014-01-11 03:12:57 UTC) #8
commit-bot: I haz the power
Change committed as 244377
6 years, 11 months ago (2014-01-11 22:50:59 UTC) #9
msw
6 years, 11 months ago (2014-01-12 00:52:31 UTC) #10
Message was sent while issue was closed.
A revert of this CL has been created in
https://codereview.chromium.org/135813002/ by msw@chromium.org.

The reason for reverting is: views_unittest failures... :-(.

Powered by Google App Engine
This is Rietveld 408576698