summaryrefslogtreecommitdiffstats
path: root/ui/views/touchui/touch_selection_controller_impl_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* views: Move resources used by views into views_resources.sadrul2015-06-241-0/+1
| | | | | | | | | | | | | | Instead of bunching up all resources used by the default views controls into the common ui_resources pack, move them into views_resources, so that it is possible for a component to depend on views and pull in the necessary resources without building ui_resources with |toolkit_views| flag on. BUG=500004, 503224 TBR=jam@ for content/shell/BUILD.gn and content/browser/webui changes. Review URL: https://codereview.chromium.org/1199143002 Cr-Commit-Position: refs/heads/master@{#335938}
* Refactor touch selection quick menumohsen2015-05-291-69/+1
| | | | | | | | | | | | | | To use the touch selection quick menu in the upcoming unified touch selection, a new interface is added to ui/touch_selection with an implementation for Views. The implementation mostly copied code from the old implementation. COLLABORATOR=mfomitchev BUG=399721 Review URL: https://codereview.chromium.org/1019353003 Cr-Commit-Position: refs/heads/master@{#331924}
* Add time_stamp parameter to MouseEvent constructorrobert.bradford2015-02-181-3/+4
| | | | | | | | | | | | | | | | | | In order to allow the use of accurate kernel timestamps in the events from Ozone it is necessary to add a parameter to the constructor for MouseEvent. This CL was partially generated from using a clang tool with some manual changes for files not included in my build and to add header files as necessary. This change fills in all users of the newly added time_stamp parameter with a call into ui::EventTimeForNow() which was the original behaviour used by the constructor. BUG=450341 TEST=Build on all try bots and all unit tests pass. Review URL: https://codereview.chromium.org/934653002 Cr-Commit-Position: refs/heads/master@{#316869}
* Cleanup: Update the path to gfx rect headers.tfarina2014-12-311-1/+1
| | | | | | | | | | | | | The geometry headers were moved from /ui/gfx/ to ui/gfx/geometry, so we are updating the include paths to fix this. BUG=395370 TEST=compiles TBR=sky@chromium.org,danakj@chromium.org Review URL: https://codereview.chromium.org/823133004 Cr-Commit-Position: refs/heads/master@{#309814}
* Make callers of CommandLine use it via the base:: namespace.avi2014-12-231-1/+1
| | | | | | | | | | | | Covers testing/, tools/, ui/, and win8/. BUG=422426 TEST=none TBR=ben@chromium.org Review URL: https://codereview.chromium.org/819223002 Cr-Commit-Position: refs/heads/master@{#309538}
* Cleanup: Update the path to insets and point headers.tfarina2014-12-231-1/+1
| | | | | | | | | | | | | The geometry headers were moved from /ui/gfx/ to ui/gfx/geometry, so we are updating the include paths to fix this. BUG=395370 TEST=unit_tests, content_unittests, extensions_unittests ... TBR=sky@chromium.org,danakj@chromium.org Review URL: https://codereview.chromium.org/823703003 Cr-Commit-Position: refs/heads/master@{#309523}
* Rename old Aura TouchSelectionControllermohsen2014-12-121-7/+7
| | | | | | | | | | | | | | Renamed old Aura TouchSelectionController in ui/base to TouchEditingControllerDeprecated and also the corresponding factory class to TouchEditingControllerFactory. In addition to preventing name conflict with the new unified TouchSelectionController, the names match better with the file name (touch_editing_controller). BUG=399721 Review URL: https://codereview.chromium.org/798683003 Cr-Commit-Position: refs/heads/master@{#308154}
* Reland: Move TouchSelectionController from content to uimohsen2014-12-091-13/+13
| | | | | | | | | | | | | | | | | | | | | | This patch is only moving new unified touch selection files from content/ to ui/touch_selection/. This is the first step to allow Aura use the new unified TouchSelectionController. The only change to TouchSelectionController needed for this move is replacing use of cc::ViewportSelectionBound with ui::SelectionBound. The actual use of the new touch selection for Aura will happen in future CL(s). After that, we can remove current touch selection code from ui/base/touch/. BUG=399721 Committed: https://crrev.com/29fd405ca491a6fcf0dde6277d92d44300cb2926 Cr-Commit-Position: refs/heads/master@{#307336} Review URL: https://codereview.chromium.org/759433002 Cr-Commit-Position: refs/heads/master@{#307514}
* Revert of Move TouchSelectionController from content to ui (patchset #12 ↵rsleevi2014-12-081-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:600001 of https://codereview.chromium.org/759433002/) Reason for revert: Suspected of causing Win8 GN failure http://build.chromium.org/p/chromium.win/builders/Win8%20GN/builds/1552/steps/compile/logs/stdio#error1 FAILED: ninja -t msvc -e environment.x86 -- "C:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64_x86/cl.exe" /nologo /showIncludes /FC @obj/ui/base/dragdrop/ui_base_unittests.os_exchange_data_provider_aurax11_unittest.obj.rsp /c ../../ui/base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc /Foobj/ui/base/dragdrop/ui_base_unittests.os_exchange_data_provider_aurax11_unittest.obj /Fdobj/ui/base/ui_base_unittests_cc.pdb c:\b\build\slave\win8_gn\build\src\ui\base\dragdrop\os_exchange_data_provider_aurax11.h(8) : fatalerror C1083: Cannot open include file: 'X11/Xlib.h': No such file or directory Original issue's description: > Move TouchSelectionController from content to ui > > This patch is only moving new unified touch selection files from > content/ to ui/touch_selection/. This is the first step to allow Aura > use the new unified TouchSelectionController. > > The only change to TouchSelectionController needed for this move is > replacing use of cc::ViewportSelectionBound with ui::SelectionBound. > > The actual use of the new touch selection for Aura will happen in future > CL(s). After that, we can remove current touch selection code from > ui/base/touch/. > > BUG=399721 > > Committed: https://crrev.com/29fd405ca491a6fcf0dde6277d92d44300cb2926 > Cr-Commit-Position: refs/heads/master@{#307336} TBR=jdduke@chromium.org,mfomitchev@chromium.org,sadrul@chromium.org,boliu@chromium.org,jam@chromium.org,mohsen@chromium.org NOTREECHECKS=true NOTRY=true BUG=399721 Review URL: https://codereview.chromium.org/754963007 Cr-Commit-Position: refs/heads/master@{#307344}
* Move TouchSelectionController from content to uimohsen2014-12-081-13/+13
| | | | | | | | | | | | | | | | | | | This patch is only moving new unified touch selection files from content/ to ui/touch_selection/. This is the first step to allow Aura use the new unified TouchSelectionController. The only change to TouchSelectionController needed for this move is replacing use of cc::ViewportSelectionBound with ui::SelectionBound. The actual use of the new touch selection for Aura will happen in future CL(s). After that, we can remove current touch selection code from ui/base/touch/. BUG=399721 Review URL: https://codereview.chromium.org/759433002 Cr-Commit-Position: refs/heads/master@{#307336}
* Move DefaultScreenPositionClient setup to ViewsTestHelperAuratapted2014-12-011-12/+1
| | | | | | | | | | | | | | | | | | views_unittests doesn't currently link on a MacViews build. This is because of incorrect USE_AURA guards in a recent change to textfield_unittest.cc. Likely the same arrangement copied from widget_interactive_uitest.cc This consolidates the setup, so that all users of ViewsTestBase get a screen position client on Aura by default. Tests can still set or replace their own client (and some do). BUG=378134 Review URL: https://codereview.chromium.org/759333004 Cr-Commit-Position: refs/heads/master@{#306284}
* This change implements support for directional selection handles, i.e. ↵mfomitchev2014-11-181-143/+204
| | | | | | | | | | | | | | | | handles that look differently depending if they are located at the left or right edge of the selection, or at the cursor. For web contents, the type of the handle is determined based on the information passed up from Blink in ViewHostMsg_SelectionBounds_Params. For Aura Textfield, it is calculated directly. New image assets (submitted in https://codereview.chromium.org/694873002) are used. New struct ui::SelectionBound is introduced to encapsulate the information about a selection bound. This struct is purposefully made similar to cc::ViewportSelectionBound which is used by TouchSelectionController, and which we'll likely be using for RenderWidgetHostViewAura once we switch to the unified touch selection implementation between Android and Aura. Depends on: https://codereview.chromium.org/686513004/ https://codereview.chromium.org/694873002/ BUG=398053, 419898 Review URL: https://codereview.chromium.org/700563002 Cr-Commit-Position: refs/heads/master@{#304524}
* Standardize usage of virtual/override/final specifiers.dcheng2014-10-271-39/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Google C++ style guide states: Explicitly annotate overrides of virtual functions or virtual destructors with an override or (less frequently) final specifier. Older (pre-C++11) code will use the virtual keyword as an inferior alternative annotation. For clarity, use exactly one of override, final, or virtual when declaring an override. To better conform to these guidelines, the following constructs have been rewritten: - if a base class has a virtual destructor, then: virtual ~Foo(); -> ~Foo() override; - virtual void Foo() override; -> void Foo() override; - virtual void Foo() override final; -> void Foo() final; This patch was automatically generated. The clang plugin can generate fixit hints, which are suggested edits when it is 100% sure it knows how to fix a problem. The hints from the clang plugin were applied to the source tree using the tool in https://codereview.chromium.org/598073004. BUG=417463 R=sky@chromium.org Review URL: https://codereview.chromium.org/679233002 Cr-Commit-Position: refs/heads/master@{#301449}
* replace OVERRIDE and FINAL with override and final in ui/mostynb2014-10-091-18/+18
| | | | | | | | BUG=417463 Review URL: https://codereview.chromium.org/623293004 Cr-Commit-Position: refs/heads/master@{#298839}
* Clean up GestureEventDetails constructors and fix unit tests.lanwei2014-09-191-25/+15
| | | | | | | | | | | | | | | Reland the code change for Issue 573963005: Clean up GestureEventDetails constructors and fix unit tests: https://codereview.chromium.org/573963005/. The code does not change, just merge two commits into one. BUG=350942 TBR=tdresser@chromium.org,jdduke@chromium.org,sadrul@chromium.org,sky@chromium.org Review URL: https://codereview.chromium.org/581963004 Cr-Commit-Position: refs/heads/master@{#295706}
* Revert "Clean up GestureEventDetails constructors and fix unit tests."Dirk Pranke2014-09-171-15/+25
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit b44589c531098bbe739ccc7066f41e17fc5b9287. > Clean up GestureEventDetails constructors and fix unit tests. > > A new version of Issue 565583005: Clean up GestureEventDetails > constructors > https://codereview.chromium.org/565583005/ > BUG=350942 > TBR=tdresser@chromium.org, jdduke@chromium.org, sadrul@chromium.org Patch set 9ec877c2d256a538b1c9af2fbed736aad8406e66 was reverted recently, but without that fix, this change doesn't work right (i.e., both patches needed to be reverted). TBR=dbeam@chromium.org, erg@chromium.org, lanwei@chromium.org BUG=350954 Review URL: https://codereview.chromium.org/576373002 Cr-Commit-Position: refs/heads/master@{#295370}
* Clean up GestureEventDetails constructors and fix unit tests.lanwei2014-09-171-25/+15
| | | | | | | | | | | | | | | | | A new version of Issue 565583005: Clean up GestureEventDetails constructors https://codereview.chromium.org/565583005/ BUG=350942 TBR=tdresser@chromium.org, jdduke@chromium.org, sadrul@chromium.org Committed: https://crrev.com/874611d5ab5b879648682c1ea41062bebc9c95e5 Cr-Commit-Position: refs/heads/master@{#295144} Review URL: https://codereview.chromium.org/573963005 Cr-Commit-Position: refs/heads/master@{#295296}
* Revert of Clean up GestureEventDetails constructors and fix unit tests ↵horo2014-09-171-15/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #1 id:20001 of https://codereview.chromium.org/573963005/) Reason for revert: This broke TouchEditableImplAuraTest.TouchSelectionOnLongPressTest. [24874:24874:0916/151803:584385367:FATAL:gesture_event_details.cc(54)] Check failed: false. Invalid event type for constructor: 32 http://test-results.appspot.com/dashboards/flakiness_dashboard.html#group=undefined&tests=TouchEditableImplAuraTest.TouchSelectionOnLongPressTest&testType=content_browsertests http://test-results.appspot.com/dashboards/flakiness_dashboard.html#group=undefined&tests=TouchEditableImplAuraTest.TouchSelectionOnLongPressTest&testType=content_browsertests Original issue's description: > Clean up GestureEventDetails constructors and fix unit tests. > > A new version of Issue 565583005: Clean up GestureEventDetails > constructors > https://codereview.chromium.org/565583005/ > > BUG=350942 > > TBR=tdresser@chromium.org, jdduke@chromium.org, sadrul@chromium.org > > Committed: https://crrev.com/874611d5ab5b879648682c1ea41062bebc9c95e5 > Cr-Commit-Position: refs/heads/master@{#295144} TBR=sky@chromium.org,lanwei@chromium.org NOTREECHECKS=true NOTRY=true BUG=350942 Review URL: https://codereview.chromium.org/577833003 Cr-Commit-Position: refs/heads/master@{#295223}
* Clean up GestureEventDetails constructors and fix unit tests.lanwei2014-09-161-25/+15
| | | | | | | | | | | | | | A new version of Issue 565583005: Clean up GestureEventDetails constructors https://codereview.chromium.org/565583005/ BUG=350942 TBR=tdresser@chromium.org, jdduke@chromium.org, sadrul@chromium.org Review URL: https://codereview.chromium.org/573963005 Cr-Commit-Position: refs/heads/master@{#295144}
* Revert of Clean up GestureEventDetails constructors (patchset #4 id:100001 ↵nhiroki2014-09-151-15/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of https://codereview.chromium.org/565583005/) Reason for revert: This seems to fail the following tests in "athena_unittests" on "Linux ChromiumOS Tests (dbg)(3)" - HomeCardGestureManagerTest.Basic - HomeCardGestureManagerTest.StartCentered http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20%28dbg%29%283%29/builds/36778 Original issue's description: > Clean up GestureEventDetails' constructors. > > In one of the GestureEventDetails' constructors, the arguments > delta_x, delta_y sometime are not used, so we should make a new > constructor which only takes one argument EventType. > > BUG=350942 > > Committed: https://crrev.com/b5e408e7bffd3d1e6b60612f65c0538a90329c59 > Cr-Commit-Position: refs/heads/master@{#294760} TBR=tdresser@chromium.org,jdduke@chromium.org,sadrul@chromium.org,sky@chromium.org,lanwei@chromium.org NOTREECHECKS=true NOTRY=true BUG=350942 Review URL: https://codereview.chromium.org/572593002 Cr-Commit-Position: refs/heads/master@{#294776}
* Clean up GestureEventDetails' constructors.lanwei2014-09-141-25/+15
| | | | | | | | | | | | In one of the GestureEventDetails' constructors, the arguments delta_x, delta_y sometime are not used, so we should make a new constructor which only takes one argument EventType. BUG=350942 Review URL: https://codereview.chromium.org/565583005 Cr-Commit-Position: refs/heads/master@{#294760}
* Use a qualified path for ui_resources.h grit includes.tfarina@chromium.org2014-08-171-1/+1
| | | | | | | | | | | | BUG=401588 TEST=None R=thestig@chromium.org,thakis@chromium.org TBR=ben@chromium.org Review URL: https://codereview.chromium.org/480693002 Cr-Commit-Position: refs/heads/master@{#290178} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290178 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanups for aura/test/event_generator.h (resolve TODOs)tapted@chromium.org2014-07-281-4/+4
| | | | | | | | | | | | | | | | | | Some purely mechanical changes left over from r283694, now that aura::test::EventGenerator has moved to ui::test in src/ui/events. Moves aura/test/event_generator.* to event_generator_delegate_aura.* Removes `using ui::test::EventGenerator;` declaration and redirects includes that don't extend the delegate to include the ui/test event_generator.h directly BUG=378134 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=285209 Review URL: https://codereview.chromium.org/406413004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285857 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 285209 "Cleanups for aura/test/event_generator.h (resolve..."markusheintz@chromium.org2014-07-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | > Cleanups for aura/test/event_generator.h (resolve TODOs) > > Some purely mechanical changes left over from r283694, now that > aura::test::EventGenerator has moved to ui::test in src/ui/events. > > Moves aura/test/event_generator.* to event_generator_delegate_aura.* > Removes `using ui::test::EventGenerator;` declaration and redirects > includes that don't extend the delegate to include the ui/test > event_generator.h directly > > BUG=378134 > > Review URL: https://codereview.chromium.org/406413004 TBR=tapted@chromium.org Review URL: https://codereview.chromium.org/413983006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285222 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanups for aura/test/event_generator.h (resolve TODOs)tapted@chromium.org2014-07-241-4/+4
| | | | | | | | | | | | | | | | Some purely mechanical changes left over from r283694, now that aura::test::EventGenerator has moved to ui::test in src/ui/events. Moves aura/test/event_generator.* to event_generator_delegate_aura.* Removes `using ui::test::EventGenerator;` declaration and redirects includes that don't extend the delegate to include the ui/test event_generator.h directly BUG=378134 Review URL: https://codereview.chromium.org/406413004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285209 0039d316-1c4b-4281-b951-d872f2087c98
* Replace touch_ids_bitfield_ with first_touch_id_.tdresser@chromium.org2014-07-141-10/+25
| | | | | | | | | | | | touch_ids_bitfield was overcomplicated, and we never used anything except for the lowest touch id. BUG=366707 TEST=GestureRecognizerTest Review URL: https://codereview.chromium.org/344763003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283070 0039d316-1c4b-4281-b951-d872f2087c98
* Do not activate touch text selection on double-tapmohsen@chromium.org2014-06-241-2/+1
| | | | | | | | | | Touch text selection should only be activated on long-press. BUG=382317 Review URL: https://codereview.chromium.org/353523004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279430 0039d316-1c4b-4281-b951-d872f2087c98
* Deactivate omnibox touch editing on command executionmohsen@chromium.org2014-05-231-5/+9
| | | | | | | | | | | | | | | A Views textfield hides touch text selection handles on command execution. Omnibox overrides command execution for some commands without calling textfield's implementation; so, it needs to hide the handles for those commands. Also, introduced TextfieldTestApi class for accessing private members of Textfield class in tests. BUG=373532 Review URL: https://codereview.chromium.org/297733002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272569 0039d316-1c4b-4281-b951-d872f2087c98
* End touch editing on mouse and keyboard eventsmohsen@chromium.org2014-05-021-1/+63
| | | | | | | | | | | | | Whenever a mouse or keyboard event happens anywhere in any display, touch text seleciton should be deactivated. We do not want to deactivate if mouse event is due to a touch action, therefore we check if mouse events are not disabled (because of a touch action). BUG=286030 Review URL: https://codereview.chromium.org/257573003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267813 0039d316-1c4b-4281-b951-d872f2087c98
* Move down quick menu if it overlaps touch selection handlesmohsen@chromium.org2014-05-021-2/+73
| | | | | | | | | | | | | | In some cases, the touch selection quick menu is needed to be shown under the selected text. If touch selection handles are not far enough, the quick menu might cover them and make it impossible to drag them. For such cases, we move the quick menu down a bit to prevent the overlap. BUG=366320 Review URL: https://codereview.chromium.org/251143004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267747 0039d316-1c4b-4281-b951-d872f2087c98
* MacViews: Better layering for the touch selection controllertapted@chromium.org2014-04-241-0/+1
| | | | | | | | | | | | | | | | | | | This CL moves ViewsTouchSelectionControllerFactory out of views/touchui/touch_selection_controller_impl.cc and into its own file one level higher. Result: the single touchui dependency moves from views_delegate.cc to a file that can be controlled on a per-platform basis. The touchui subfolder assumes aura is available. This allows touchui to be excluded from a build that doesn't need it. BUG=366007 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=265814 Review URL: https://codereview.chromium.org/248763003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265882 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 265814 "MacViews: Better layering for the touch selection..."vadimsh@chromium.org2014-04-241-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Failed to compile on ChromiumOS Linux: ./../ui/views/touchui/touch_selection_controller_impl_unittest.cc:20:57: fatal error: ui/views/touch_selection_controller_factory.h: No such file or directory See http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Builder/builds/2921 > MacViews: Better layering for the touch selection controller > > This CL moves ViewsTouchSelectionControllerFactory out of > views/touchui/touch_selection_controller_impl.cc and into its own file > one level higher. > > Result: the single touchui dependency moves from views_delegate.cc to a > file that can be controlled on a per-platform basis. The touchui > subfolder assumes aura is available. This allows touchui to be excluded > from a build that doesn't need it. > > BUG=366007 > > Review URL: https://codereview.chromium.org/248763003 TBR=tapted@chromium.org Review URL: https://codereview.chromium.org/250403002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265818 0039d316-1c4b-4281-b951-d872f2087c98
* MacViews: Better layering for the touch selection controllertapted@chromium.org2014-04-241-0/+1
| | | | | | | | | | | | | | | | | This CL moves ViewsTouchSelectionControllerFactory out of views/touchui/touch_selection_controller_impl.cc and into its own file one level higher. Result: the single touchui dependency moves from views_delegate.cc to a file that can be controlled on a per-platform basis. The touchui subfolder assumes aura is available. This allows touchui to be excluded from a build that doesn't need it. BUG=366007 Review URL: https://codereview.chromium.org/248763003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265814 0039d316-1c4b-4281-b951-d872f2087c98
* Change type of touch selection handles to POPUPmohsen@chromium.org2014-04-121-4/+67
| | | | | | | | | | | | | | | | Previously, touch selection handles were of type TOOLTIP which in Chrome OS would put them above almost everything else (e.g. menus and shelf; see associated bugs). With this patch they are changed to type POPUP and made transient children of their top-level parent, so they are positioned correctly above their parent window, but below menus and shelf. Also, they are not clipped to their parent window in Windows Aura anymore, as now they have their own HWND. BUG=303870,316286 Review URL: https://codereview.chromium.org/177173007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263539 0039d316-1c4b-4281-b951-d872f2087c98
* Clip touch selection handles to top of client view's boundariesmohsen@chromium.org2014-04-111-7/+164
| | | | | | | | | | | | | To hide touch selection handles in fewer situations, we allow top of the handles to go out of client view's boundaries and instead clip it to top of the boundaries. For the bottom, we allow it to stick out of the client view for a few pixels. BUG=345473 Review URL: https://codereview.chromium.org/208473003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263384 0039d316-1c4b-4281-b951-d872f2087c98
* Nukes USE_AURA ifdefs from viewssky@chromium.org2014-03-101-7/+2
| | | | | | | | | | | | No longer needed. BUG=none TEST=none R=ben@chromium.org Review URL: https://codereview.chromium.org/191723003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255976 0039d316-1c4b-4281-b951-d872f2087c98
* Reland Merge NativeTextfieldViews into views::Textfield.msw@chromium.org2014-01-121-33/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reverted in r244402 for Linux-Aura test failures. I fixed Ctrl+Shift+Delete/Backspace behavior on Linux here. 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. TBR=sky@chromium.org Review URL: https://codereview.chromium.org/135863002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244436 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of https://codereview.chromium.org/120503005/msw@chromium.org2014-01-121-28/+33
| | | | | | | | | | | | | Reason for revert: views_unittest failures... :-( TBR=sky@chromium.org NOTREECHECKS=true NOTRY=true BUG=131660 Review URL: https://codereview.chromium.org/135813002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244402 0039d316-1c4b-4281-b951-d872f2087c98
* Merge NativeTextfieldViews into views::Textfield.msw@chromium.org2014-01-111-33/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Review URL: https://codereview.chromium.org/120503005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244377 0039d316-1c4b-4281-b951-d872f2087c98
* Remove UTF string conversion functions from the global namespace.avi@chromium.org2013-12-261-0/+1
| | | | | | | | | | BUG=330556 TEST=no change TBR=ben@chromium.org Review URL: https://codereview.chromium.org/102993018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242519 0039d316-1c4b-4281-b951-d872f2087c98
* Update uses of UTF conversions in ui/ to use the base:: namespace.avi@chromium.org2013-12-251-0/+3
| | | | | | | | | | BUG=330556 TEST=no change TBR=ben@chromium.org Review URL: https://codereview.chromium.org/106383004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242504 0039d316-1c4b-4281-b951-d872f2087c98
* Remove views::NativeTextfieldWrapper, start class cleanup.msw@chromium.org2013-12-191-2/+1
| | | | | | | | | | | | | | | A first step towards combining views::Textfield and views::NativeTextfieldViews. Remove NativeTextfieldWrapper, use NativeTextfieldViews directly. Remove, inline, and simplify some minimal functionality. Cleanup some related code/comments/tests. BUG=131660 TEST=No build breaks, no behavior changes, no regressions. R=sky@chromium.org Review URL: https://codereview.chromium.org/105713004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241783 0039d316-1c4b-4281-b951-d872f2087c98
* Move Range code to gfx.ben@chromium.org2013-09-061-20/+20
| | | | | | | | | | | Part of a set of changes to fix the circular dependency between ui/base and ui/gfx, with the aim of making gfx its own component. R=jam@chromium.org, jschuh@chromium.org, rsesek@chromium.org BUG=285385,103304 Review URL: https://codereview.chromium.org/24012002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221762 0039d316-1c4b-4281-b951-d872f2087c98
* Supports FontList in Textfield.yukishiino@chromium.org2013-08-011-15/+17
| | | | | | | | | | | | | | | | | | | The current interface of Textfield does not support FontList while RenderText supports FontList. This CL supports FontList in Textfield. The direct cause of crbug.com/263169 was that RenderText always uses the IDS_UI_FONT_FAMILY_CROS font set ignoring what font is specified for Textfield on ChromeOS. (See https://code.google.com/p/chromium/codesearch#chromium/src/ui/views/controls/textfield/native_textfield_views.cc&q=IDS_UI_FONT_FAMILY_CROS&sq=package:chromium&type=cs&l=88 ) The Omnibox font size is carefully calculated, but the font is ignored right now. This CL changes the following: - Supports FontList in Textfield so Omnibox layer can specify the font set, such as IDS_UI_FONT_FAMILY_CROS, for the underlying Textfield. - Makes NativeTextfieldViews follow the specified font set via Textfield on ChromeOS. BUG=263169,263196 TEST=Test manually. Review URL: https://chromiumcodereview.appspot.com/19666006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215055 0039d316-1c4b-4281-b951-d872f2087c98
* c++11 ud suffix fixes for ash/views/ui filesthakis@chromium.org2013-07-291-3/+3
| | | | | | | | | | | No behavior change. BUG=263960 R=sky@chromium.org Review URL: https://codereview.chromium.org/21082004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214258 0039d316-1c4b-4281-b951-d872f2087c98
* Minor fix to logic that selects whether two selection handles or one is shown.varunjain@chromium.org2013-07-131-0/+35
| | | | | | | | BUG=256761,259453 Review URL: https://chromiumcodereview.appspot.com/19054010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211536 0039d316-1c4b-4281-b951-d872f2087c98
* Change touch selection handles to images given by UX.varunjain@chromium.org2013-06-091-4/+25
| | | | | | | | BUG=239097 Review URL: https://chromiumcodereview.appspot.com/16580009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205119 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of utf_string_conversions.h in ui/.avi@chromium.org2013-06-071-1/+1
| | | | | | | | | | BUG=none TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/16175008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204885 0039d316-1c4b-4281-b951-d872f2087c98
* Touch selection: The touch selection handle widget should only hit test on thevarunjain@chromium.org2013-05-011-0/+33
| | | | | | | | | | | touchable part so that the event fall through when touching on the cursor line. BUG=236396 R=sadrul@chromium.org Review URL: https://codereview.chromium.org/14553002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197555 0039d316-1c4b-4281-b951-d872f2087c98
* Add method to TouchSelectionController to check if a handle is currently beingvarunjain@chromium.org2013-04-191-0/+3
| | | | | | | | | | dragged. Also fixes some handle positioning bugs. BUG=none Review URL: https://chromiumcodereview.appspot.com/13817012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195110 0039d316-1c4b-4281-b951-d872f2087c98