summaryrefslogtreecommitdiffstats
path: root/views/view_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* views: Move view.h to ui/views/.tfarina@chromium.org2011-11-301-3068/+0
| | | | | | | | | | BUG=104039 R=ben@chromium.org TBR=stevenjb@chromium.org Review URL: http://codereview.chromium.org/8742030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112333 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move the remaining files to ui/views/controls/.tfarina@chromium.org2011-11-291-1/+1
| | | | | | | | | | BUG=104039 R=ben@chromium.org TBR=stevenjb@chromium.org Review URL: http://codereview.chromium.org/8687031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112014 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move button directory to ui/views/controls/.tfarina@chromium.org2011-11-281-2/+2
| | | | | | | | | | BUG=104039 R=maruel@chromium.org TBR=ben@chromium.org Review URL: http://codereview.chromium.org/8716001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111669 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move textfield directory to ui/views/controls/.tfarina@chromium.org2011-11-271-1/+1
| | | | | | | | | | BUG=104039 R=maruel@chromium.org TBR=ben@chromium.org Review URL: http://codereview.chromium.org/8713004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111660 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move scrollbar and native directories to ui/views/controls/.tfarina@chromium.org2011-11-271-1/+1
| | | | | | | | | | BUG=104039 R=maruel@chromium.org TBR=ben@chromium.org Review URL: http://codereview.chromium.org/8658010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111655 0039d316-1c4b-4281-b951-d872f2087c98
* Move accelerator related files to ui/base/acceleratorstfarina@chromium.org2011-11-251-1/+1
| | | | | | | | | BUG=104599 R=mazda@chromium.org Review URL: http://codereview.chromium.org/8695005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111597 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move widget/ directory to ui/views.tfarina@chromium.org2011-11-221-2/+2
| | | | | | | | | | | BUG=104039 R=ben@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=110949 Review URL: http://codereview.chromium.org/8598031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111077 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 110949 - views: Move widget/ directory to ui/views.wez@chromium.org2011-11-211-2/+2
| | | | | | | | | | | | BUG=104039 R=ben@chromium.org Review URL: http://codereview.chromium.org/8598031 TBR=tfarina@chromium.org Review URL: http://codereview.chromium.org/8547015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110953 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move widget/ directory to ui/views.tfarina@chromium.org2011-11-211-2/+2
| | | | | | | | | BUG=104039 R=ben@chromium.org Review URL: http://codereview.chromium.org/8598031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110949 0039d316-1c4b-4281-b951-d872f2087c98
* Now that we are doing a hard-cut-over to Aura, remove a bunch of *Views ↵ben@chromium.org2011-11-191-48/+0
| | | | | | | | | | | | | | | | | based classes that are obsoleted by Aura. Also remove a bunch of Wayland stuff, since any future Wayland integration is likely done as an implementation detail of Aura, not Views. Specifically: - views-desktop (classes and NativeWidgetView[s]) - NativeWidgetViews subclasses in Chrome (Constrained Windows, NTCVV, NTCCV, BrowserFrameViews et al). - RWHVV, NWKEV - NativeViewHostViews BUG=none TEST=none Review URL: http://codereview.chromium.org/8598024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110832 0039d316-1c4b-4281-b951-d872f2087c98
* views: Delete bubble, events, focus, layout directories and its stubbed files.tfarina@chromium.org2011-11-181-3/+3
| | | | | | | | | BUG=104039 R=ben@chromium.org Review URL: http://codereview.chromium.org/8566052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110787 0039d316-1c4b-4281-b951-d872f2087c98
* Adds a couple of pixel-based compositor unittests. One to test that opacity ↵vollick@chromium.org2011-11-181-2/+2
| | | | | | | | | | | | | | | is handled correctly, and one to check that MoveToFront and MoveAbove really do change the compositor output as expected. Noteworthy changes are in layer_unittest.cc. Most of the changes below are due to moving compositor testing code into ui/gfx/compositor/test. Depends on http://codereview.chromium.org/8463024/ and http://codereview.chromium.org/8590019/ BUG=None TEST=compositor_unittests Review URL: http://codereview.chromium.org/8533019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110657 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move ime and test directories to ui/views.tfarina@chromium.org2011-11-171-2/+2
| | | | | | | | | BUG=104039 R=ben@chromium.org Review URL: http://codereview.chromium.org/8581003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110399 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move desktop and touchui directories to ui/views/.tfarina@chromium.org2011-11-161-2/+2
| | | | | | | | | BUG=104039 R=ben@chromium.org Review URL: http://codereview.chromium.org/8568022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110316 0039d316-1c4b-4281-b951-d872f2087c98
* Fix stale compositor references from ui::Layerpiman@chromium.org2011-11-161-1/+1
| | | | | | | | | | | | | | | | | | | This is needed to fix some issues in tests exposed by the WebKit compositor. The problem is that sometimes during the teardown paths, some layers have stale a pointer to the compositor that has already been destroyed. The WebKit layer (rightfully) calls ScheduleDraw when the layer hierarchy is changed, exposing the issue. We now always walk back to the root layer to find the compositor, and reset the pointer when the compositor's root changes (or it gets destroyed). BUG=99524 TEST=views_unittest, aura_unittest, compositor_unittests with (and without) use_webkit_compositor=1 Review URL: http://codereview.chromium.org/8510076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110223 0039d316-1c4b-4281-b951-d872f2087c98
* This patch lets the browser window punch a hole in the DesktopBackgroundView,pkotwicz@chromium.org2011-11-151-0/+10
| | | | | | | | | | | | | | | | | | | | | | thus eliminating overdraw. To do this, the hole punching logic was changed to look at the entire tree. Drawing the screen is a preorder traversal through all the layers. Thus, to compute the hole, we have to look at all of the layers after a particular layer in the preorder traversal. This is not an efficient algorithm, but it is simplest I could come up with. Plus we will be moving to the WebKit compositor soon. Hopefully this will improve the frame rate for the Aura demos Note: I will put the changes to Transform into another patch. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=107360 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=107440 Review URL: http://codereview.chromium.org/8368013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110107 0039d316-1c4b-4281-b951-d872f2087c98
* views: Remove the old views/window/ directory and its stubbed files.tfarina@chromium.org2011-11-141-1/+1
| | | | | | | | | BUG=104039 R=ben@chromium.org Review URL: http://codereview.chromium.org/8497067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109887 0039d316-1c4b-4281-b951-d872f2087c98
* Move views::Accelerator to ui in order to use it from aura code.mazda@chromium.org2011-11-141-7/+8
| | | | | | | | | | | This is the first preliminary change for the support of global keyboard shortcut. BUG=97255 TEST=None Review URL: http://codereview.chromium.org/8508055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109872 0039d316-1c4b-4281-b951-d872f2087c98
* Add DidChangeFocus to FocusChangeListener.alicet@chromium.org2011-11-101-7/+7
| | | | | | | | | | | | | | | Rename FocusChangeListener interface to OnWillChangeFocus and OnDidChangeFocus Move location bar focus interaction from AccessibilityPaneView to ToolBarView. BUG=101940 TEST=None Review URL: http://codereview.chromium.org/8416058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109482 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move DialogButton enum into ui/base/ and put it into the ui namespace.tfarina@chromium.org2011-11-041-1/+1
| | | | | | | | R=sky@chromium.org Review URL: http://codereview.chromium.org/8334041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108692 0039d316-1c4b-4281-b951-d872f2087c98
* views: Remove using declaration from dialog_delegate.h header file.tfarina@chromium.org2011-11-031-1/+1
| | | | | | | | R=sky@chromium.org Review URL: http://codereview.chromium.org/8450001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108554 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r107440 because this causes a crash on touchui on page load.sadrul@chromium.org2011-11-021-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | The CL being reverted: This patch lets the browser window punch a hole in the DesktopBackgroundView, thus eliminating overdraw. To do this, the hole punching logic was changed to look at the entire tree. Drawing the screen is a preorder traversal through all the layers. Thus, to compute the hole, we have to look at all of the layers after a particular layer in the preorder traversal. This is not an efficient algorithm, but it is simplest I could come up with. Plus we will be moving to the WebKit compositor soon. Hopefully this will improve the frame rate for the Aura demos Note: I will put the changes to Transform into another patch. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=107360 Review URL: http://codereview.chromium.org/8368013 TBR=pkotwicz@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108347 0039d316-1c4b-4281-b951-d872f2087c98
* Create constrained windows in a hidden state.asanka@chromium.org2011-11-011-0/+36
| | | | | | | | | | BUG=97411 TEST=interactive_ui_tests --gtest_filter=ConstrainedWindowViewTest.FocusTest Review URL: http://codereview.chromium.org/8052019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108136 0039d316-1c4b-4281-b951-d872f2087c98
* Reland r107720 - Enable the new layer animation framework.vollick@chromium.org2011-10-281-39/+16
| | | | | | | | | | | | | Depends on http://codereview.chromium.org/8247009/ BUG=None TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=107715 Review URL: http://codereview.chromium.org/8362006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107736 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 107715 - Enable the new layer animation framework.vollick@chromium.org2011-10-281-16/+39
| | | | | | | | | | | | | | Depends on http://codereview.chromium.org/8247009/ BUG=None TEST=None Review URL: http://codereview.chromium.org/8362006 TBR=sky@chromium.org Review URL: http://codereview.chromium.org/8400059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107720 0039d316-1c4b-4281-b951-d872f2087c98
* Enable the new layer animation framework.vollick@chromium.org2011-10-281-39/+16
| | | | | | | | | | | Depends on http://codereview.chromium.org/8247009/ BUG=None TEST=None Review URL: http://codereview.chromium.org/8362006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107715 0039d316-1c4b-4281-b951-d872f2087c98
* This patch lets the browser window punch a hole in the DesktopBackgroundView,pkotwicz@chromium.org2011-10-261-0/+11
| | | | | | | | | | | | | | | | | | | | thus eliminating overdraw. To do this, the hole punching logic was changed to look at the entire tree. Drawing the screen is a preorder traversal through all the layers. Thus, to compute the hole, we have to look at all of the layers after a particular layer in the preorder traversal. This is not an efficient algorithm, but it is simplest I could come up with. Plus we will be moving to the WebKit compositor soon. Hopefully this will improve the frame rate for the Aura demos Note: I will put the changes to Transform into another patch. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=107360 Review URL: http://codereview.chromium.org/8368013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107440 0039d316-1c4b-4281-b951-d872f2087c98
* views: Change the remaining std::wstring entries to string16.tfarina@chromium.org2011-10-241-6/+6
| | | | | | | | | BUG=68267 R=sky@chromium.org Review URL: http://codereview.chromium.org/8373016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106920 0039d316-1c4b-4281-b951-d872f2087c98
* Use WebKit compositor in ui::Layerpiman@chromium.org2011-10-221-0/+22
| | | | | | | | | | BUG=99524 TEST=compositor_unittests Review URL: http://codereview.chromium.org/8222028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106814 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 106606 - Use WebKit compositor in ui::Layerlipalani@chromium.org2011-10-201-22/+0
| | | | | | | | | | | | | BUG=99524 TEST=compositor_unittests Review URL: http://codereview.chromium.org/8222028 TBR=piman@chromium.org Review URL: http://codereview.chromium.org/8360018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106615 0039d316-1c4b-4281-b951-d872f2087c98
* Use WebKit compositor in ui::Layerpiman@chromium.org2011-10-201-0/+22
| | | | | | | | | | BUG=99524 TEST=compositor_unittests Review URL: http://codereview.chromium.org/8222028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106606 0039d316-1c4b-4281-b951-d872f2087c98
* views: Change TextButton API to string16.tfarina@chromium.org2011-10-191-3/+3
| | | | | | | | | BUG=68267 R=sky@chromium.org Review URL: http://codereview.chromium.org/8346013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106302 0039d316-1c4b-4281-b951-d872f2087c98
* views: Change Checkbox API to string16.tfarina@chromium.org2011-10-121-1/+1
| | | | | | | | | BUG=68267 R=sky@chromium.org Review URL: http://codereview.chromium.org/8245006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105088 0039d316-1c4b-4281-b951-d872f2087c98
* views: Make sure layer visibility is updated properly.sadrul@chromium.org2011-10-121-0/+199
| | | | | | | | | | | If a View without a layer is hidden, and one of its descendant views has a layer, then the layer also needs to be hidden. This also needs to be reversed when such a View is redisplayed. BUG=none TEST=ViewLayerTreesInSync, VisibilityChildLayers Review URL: http://codereview.chromium.org/8216027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105080 0039d316-1c4b-4281-b951-d872f2087c98
* views: Some more layer change, and add/update some tests for layers.sadrul@chromium.org2011-10-111-6/+68
| | | | | | | | | | | | | | | | Hide the RootView's layer when a Widget is hidden. Call OnNativeWidgetVisibilityChanged on NativeWidgetGtk's hide/show callbacks. The tests: . Make sure Layer bounds change with a View even if it's not visible. . Make sure Layer visibility is updated with a View's visibility. . Make sure Layers get unparented properly when a View is removed from the parent view. BUG=none TEST=views_unittests Review URL: http://codereview.chromium.org/8202026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104846 0039d316-1c4b-4281-b951-d872f2087c98
* Allow CanvasSkia to bind to an existing SkCanvas.piman@chromium.org2011-10-051-1/+1
| | | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/8122013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104146 0039d316-1c4b-4281-b951-d872f2087c98
* Makes visbility inherited. That is, in order for a window to besky@chromium.org2011-10-051-0/+1
| | | | | | | | | | | | visible all of its ancestor must be visible too. BUG=none TEST=covered by unit tests. R=ben@chromium.org Review URL: http://codereview.chromium.org/8136005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104097 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes touch buildsky@chromium.org2011-10-041-4/+0
| | | | | | | | | | | R=ben@chromium.org BUG=none TEST=none TBR=ben@chromium.org Review URL: http://codereview.chromium.org/8140001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103906 0039d316-1c4b-4281-b951-d872f2087c98
* Couple of tweaks to get more views tests passing:sky@chromium.org2011-10-041-15/+8
| | | | | | | | | | | | | | | | | . Make TestCompositor the default for all views unit tests. . Implement NativeWidgetPrivate::GetAllChildWidgets for aura. . Tweak expected texture count for layer toggling test. . Implement View::HitTest for aura. . Changes NativeWidgetAura::Init not to show (matches other platforms). BUG=none TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/8118026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103901 0039d316-1c4b-4281-b951-d872f2087c98
* Reland the layer creation change since the touchui issues will be resolved ↵sadrul@chromium.org2011-10-031-13/+4
| | | | | | | | | | | | in a follow up CL. This reverts 103580 - Revert the layer creation change r103338 due to some issues with the keyboard on touch. I'll re-land later once I can get a working linux build.TBR=skyBUG=noneTEST=none Review URL: http://codereview.chromium.org/8100015 TBR=ben@chromium.org Review URL: http://codereview.chromium.org/8115010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103777 0039d316-1c4b-4281-b951-d872f2087c98
* Revert the layer creation change r103338 due to some issues with the ↵ben@chromium.org2011-09-301-4/+13
| | | | | | | | keyboard on touch. I'll re-land later once I can get a working linux build.TBR=skyBUG=noneTEST=none Review URL: http://codereview.chromium.org/8100015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103580 0039d316-1c4b-4281-b951-d872f2087c98
* Construct a View's layer immediately when SetPaintToLayer(true) is called or ↵ben@chromium.org2011-09-291-13/+4
| | | | | | | | when a transform is set.This eliminates the need for LayerHelper since it basically just served as a middle-man for caching layer state when a layer did not exist (which occurred when a view was invisible or not part of a view hierarchy).Also includes a fix to reorder layer children properly without crashing due to dropped textures.BUG=noneTEST=existing unittests Review URL: http://codereview.chromium.org/8054023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103338 0039d316-1c4b-4281-b951-d872f2087c98
* Setting fills bounds opaquely as the default.pkotwicz@chromium.org2011-09-291-0/+1
| | | | | | | | | | | | | Computes set fills bounds opaquely inside widget based on transparency value Depends on 7976040 for correctness BUG=None TEST=None Review URL: http://codereview.chromium.org/8038047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103322 0039d316-1c4b-4281-b951-d872f2087c98
* Refactors TestCompositor out of views_unittests into a place it can besky@chromium.org2011-09-281-90/+20
| | | | | | | | | | | | | | used by both the layer tests and the views test. Also fixes a bug that was causing test to fail and fixes up defines. I've disabled a portion of the compositor unit tests on linux as they don't compile. BUG=none TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/8072010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103208 0039d316-1c4b-4281-b951-d872f2087c98
* Gets views_unittests to work when aura is defined, and adds coveragesky@chromium.org2011-09-271-21/+111
| | | | | | | | | | | | | for recent painting bug. To get views_unittests to compile I had to convert BaseScrollBar to use MenuItemView (was still using native, which doesn't exist on windows). BUG=none TEST=none Review URL: http://codereview.chromium.org/8028027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102935 0039d316-1c4b-4281-b951-d872f2087c98
* These are the changes necessary for views to be able to build w/ use_aura ↵davemoore@chromium.org2011-09-221-1/+1
| | | | | | | | | | | implying no gtk. BUG=97131 TEST=views_unittests Review URL: http://codereview.chromium.org/7996008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102335 0039d316-1c4b-4281-b951-d872f2087c98
* Adds some features to the shell:ben@chromium.org2011-09-161-1/+1
| | | | | | | | | | | | - desktop background - stub launcher - clicking the background opens test windows BUG=none TEST=none Review URL: http://codereview.chromium.org/7903018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101496 0039d316-1c4b-4281-b951-d872f2087c98
* Rework View Layer Draw() to use the Layer::DrawTree() method and the ↵ben@chromium.org2011-09-131-8/+7
| | | | | | | | | | LayerDelegate. http://crbug.com/93947 TEST=none Review URL: http://codereview.chromium.org/7845033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100961 0039d316-1c4b-4281-b951-d872f2087c98
* Removed ActivatedAtWithDisposition from menu handler, and introduced ↵shinyak@google.com2011-09-051-2/+1
| | | | | | | | | | | | | | | | ActivatedAt(int id, int event_flags) instead. After this patch is landed, I will upload cleanup patch. See also http://codereview.chromium.org/6893046/ BUG=93700 TEST=None Review URL: http://codereview.chromium.org/7778041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99651 0039d316-1c4b-4281-b951-d872f2087c98
* Changes to port holey layer changes into windows compositorpkotwicz@chromium.org2011-09-021-2/+0
| | | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/7582029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99368 0039d316-1c4b-4281-b951-d872f2087c98