summaryrefslogtreecommitdiffstats
path: root/views/view.cc
Commit message (Collapse)AuthorAgeFilesLines
* views: Move view.h to ui/views/.tfarina@chromium.org2011-11-301-2061/+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 some random files from views/ to ui/views/.tfarina@chromium.org2011-11-301-2/+2
| | | | | | | | | BUG=104039 R=ben@chromium.org Review URL: http://codereview.chromium.org/8735009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112208 0039d316-1c4b-4281-b951-d872f2087c98
* s/Move/Stack/ in names of stacking-related methods.derat@chromium.org2011-11-221-1/+1
| | | | | | | | | | | | | This renames methods in aura::Window, views::Widget, and gfx::Layer. "MoveAbove" becomes "StackAbove" and "MoveToFront" becomes "StackAtTop". BUG=none TEST=built it Review URL: http://codereview.chromium.org/8620002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111168 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of Widget::ConvertPointFromAncestor.ben@chromium.org2011-11-221-47/+30
| | | | | | | | | | | | We don't need it now that NativeWidgetViews is dead. Also simplify View::ConvertPointToView() to look (mostly) like Layer::ConvertPointToLayer(). http://crbug.com/102573 TEST=existing unittests Review URL: http://codereview.chromium.org/8620008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111108 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move widget/ directory to ui/views.tfarina@chromium.org2011-11-221-4/+4
| | | | | | | | | | | 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-8/+4
| | | | | | | | | | | | 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-4/+8
| | | | | | | | | 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-1/+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-1/+1
| | | | | | | | | 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
* Added some debugging code to print layer tree.pkotwicz@chromium.org2011-11-171-0/+3
| | | | | | | | | | | | | | Also added a name attribute to the layer. IF !NDEBUG is defined, layer takes on the name of the view/window which created it Please comment as to where the debug_utils.cc should be located, it feels like the wrong place. I have another patch to print the window tree which I'll submit for review once I get this one in. I think this is a bit simpler and more useful than http://codereview.chromium.org/8366008/ Review URL: http://codereview.chromium.org/8508009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110528 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
* views: Move accessibility/ directory to ui/views/.tfarina@chromium.org2011-11-141-1/+1
| | | | | | | | | BUG=104039 R=ben@chromium.org Review URL: http://codereview.chromium.org/8533010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109894 0039d316-1c4b-4281-b951-d872f2087c98
* Move views::Accelerator to ui in order to use it from aura code.mazda@chromium.org2011-11-141-6/+6
| | | | | | | | | | | 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
* Move views/ime/text_input_client.h to ui/base/ime/.yusukes@chromium.org2011-11-111-1/+1
| | | | | | | | | | | | | | | | - Remove Views dependencies from text_input_client.h. - Change namespace from views:: to ui::. This change is necessary for RenderWidgetHostViewAura to support IME since RWHVA is Views agnostic and cannot directly use classes under views/ime/. BUG=chromium:97261 TEST=try Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=109583 Review URL: http://codereview.chromium.org/8509034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109608 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 109583 - Move views/ime/text_input_client.h to ui/base/ime/.yusukes@google.com2011-11-111-1/+1
| | | | | | | | | | | | | | | | | - Remove Views dependencies from text_input_client.h. - Change namespace from views:: to ui::. This change is necessary for RenderWidgetHostViewAura to support IME since RWHVA is Views agnostic and cannot directly use classes under views/ime/. BUG=chromium:97261 TEST=try Review URL: http://codereview.chromium.org/8509034 TBR=yusukes@google.com Review URL: http://codereview.chromium.org/8491035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109586 0039d316-1c4b-4281-b951-d872f2087c98
* Move views/ime/text_input_client.h to ui/base/ime/.yusukes@google.com2011-11-111-1/+1
| | | | | | | | | | | | | | - Remove Views dependencies from text_input_client.h. - Change namespace from views:: to ui::. This change is necessary for RenderWidgetHostViewAura to support IME since RWHVA is Views agnostic and cannot directly use classes under views/ime/. BUG=chromium:97261 TEST=try Review URL: http://codereview.chromium.org/8509034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109583 0039d316-1c4b-4281-b951-d872f2087c98
* views: Constantify two kViewClassName strings.tfarina@chromium.org2011-11-081-1/+1
| | | | | | | | R=sky@chromium.org Review URL: http://codereview.chromium.org/8495014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109056 0039d316-1c4b-4281-b951-d872f2087c98
* Allows observers to be notified when layer animations complete.vollick@chromium.org2011-11-021-3/+0
| | | | | | | | | | | Depends on http://codereview.chromium.org/8362006/ BUG=101595 TEST=None Review URL: http://codereview.chromium.org/8395046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108307 0039d316-1c4b-4281-b951-d872f2087c98
* Add traces in compositor, views and skiapiman@chromium.org2011-11-011-4/+18
| | | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/8440008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108174 0039d316-1c4b-4281-b951-d872f2087c98
* Create constrained windows in a hidden state.asanka@chromium.org2011-11-011-1/+1
| | | | | | | | | | 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-29/+7
| | | | | | | | | | | | | 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-7/+29
| | | | | | | | | | | | | | 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-29/+7
| | | | | | | | | | | 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
* ui/gfx: Change Canvas::ScaleInt() to just Canvas::Scale().tfarina@chromium.org2011-10-271-1/+1
| | | | | | | | | BUG=100898 R=pkasting@chromium.org Review URL: http://codereview.chromium.org/8363036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107559 0039d316-1c4b-4281-b951-d872f2087c98
* ui/gfx: Convert Canvas::TranslateInt() to use gfx::Point.tfarina@chromium.org2011-10-271-6/+5
| | | | | | | | | BUG=100898 R=pkasting@chromium.org Review URL: http://codereview.chromium.org/8390037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107483 0039d316-1c4b-4281-b951-d872f2087c98
* Convert View::HasFocus() to be const. Required adding const versions of ↵pkasting@chromium.org2011-10-261-7/+10
| | | | | | | | | | some accessors which in turn prompted me to make some uses of these accessors be a bit more const-correct. BUG=none TEST=none Review URL: http://codereview.chromium.org/8393024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107403 0039d316-1c4b-4281-b951-d872f2087c98
* Refactors some 'Clear to transparent code'pkotwicz@chromium.org2011-10-261-1/+2
| | | | | | | | | | | | Don't clear to transparent when we fills bounds opaquely given that we are not drawing the parent layer. This makes the code a bit less confusing and will probably bring a slight speed benefit. BUG= None TEST= None Review URL: http://codereview.chromium.org/8318008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107352 0039d316-1c4b-4281-b951-d872f2087c98
* ui/gfx: Convert Canvas::ClipRectInt() to use gfx::Rect.tfarina@chromium.org2011-10-261-3/+3
| | | | | | | | | BUG=100898 R=pkasting@chromium.org Review URL: http://codereview.chromium.org/8383028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107276 0039d316-1c4b-4281-b951-d872f2087c98
* ui/gfx: Convert Canvas::DrawFocusRect() to use gfx::Rect.tfarina@chromium.org2011-10-251-2/+2
| | | | | | | | | BUG=100898 R=pkasting@chromium.org Review URL: http://codereview.chromium.org/8359029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107050 0039d316-1c4b-4281-b951-d872f2087c98
* Animate desktop rotations.ben@chromium.org2011-10-211-0/+3
| | | | | | | | | | . Adds a LayerDelegate method to notify of the end of an animation. BUG=none TEST=none Review URL: http://codereview.chromium.org/8364030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106658 0039d316-1c4b-4281-b951-d872f2087c98
* Aura: Combine cursor support for Linux and Windowsjamescook@chromium.org2011-10-171-1/+1
| | | | | | | | | | | | | | + Change gfx::NativeCursor to an int id on Aura. + Fix several cursor-related TODOs in GetCursor() methods. + Move X11 cursor cache into x11_util + Set platform-specific cursors in aura::DesktopHostWin and DesktopHostLinux BUG=99871 TEST=manual Review URL: http://codereview.chromium.org/8256001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105850 0039d316-1c4b-4281-b951-d872f2087c98
* views: Make sure layer visibility is updated properly.sadrul@chromium.org2011-10-121-3/+33
| | | | | | | | | | | 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
* ScheduleDraw() in View::SchedulePaintBoundsChanged() when a child view is ↵danakj@chromium.org2011-10-121-0/+6
| | | | | | | | | | | | moved so that its parent can be redrawn by the compositor with the child in its new position. R=sadrul,sky BUG= TEST=Drag and move chromium window around when no on-screen animation is occuring (such as cursor blink). Review URL: http://codereview.chromium.org/8177010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105062 0039d316-1c4b-4281-b951-d872f2087c98
* Add gfx::kNullCursor to refer to "no cursor"oshima@chromium.org2011-10-111-1/+1
| | | | | | | | | | | | | linux/aura build uses unsigned long as NativeCursor which requires cast to use NULL. Define constants instead. BUG=none TEST=none Review URL: http://codereview.chromium.org/8216016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104848 0039d316-1c4b-4281-b951-d872f2087c98
* Reorder Layers with NativeWidgetViews.backer@chromium.org2011-10-081-23/+27
| | | | | | | | | | | The presence of NativeWidgetViews complicates the process of keeping the Layer tree in sync with the View tree. Specifically, when walking up the View tree to find a View with a Layer, we may have to walk up through a NativeWidgetViews to a NativeWidgetView in a different View tree. Similarly, when walking down the tree to find Views with Layers, we may have to walk down through a NativeWidgetView to a NativeWidgetViews. BUG=none TEST=none Review URL: http://codereview.chromium.org/8201008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104654 0039d316-1c4b-4281-b951-d872f2087c98
* Keep the Layer tree in sync with View tree.backer@chromium.org2011-10-071-0/+38
| | | | | | | | | | | The View tree represents draw order, so it is imperative that order of the Layer tree reflect the order of the View tree. Whenever the order of the View tree changes, we now fix up the order of the Layer tree. BUG=none TEST=can change the stack order of windows on the views_desktop Review URL: http://codereview.chromium.org/8202001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104496 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
* Couple of tweaks to get more views tests passing:sky@chromium.org2011-10-041-2/+6
| | | | | | | | | | | | | | | | | . 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
* layer: Resize a View's layer when the View is resized, even if it's not visible.sadrul@chromium.org2011-10-031-25/+49
| | | | | | | | | BUG=none TEST=manually Review URL: http://codereview.chromium.org/8102018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103788 0039d316-1c4b-4281-b951-d872f2087c98
* Reland the layer creation change since the touchui issues will be resolved ↵sadrul@chromium.org2011-10-031-171/+103
| | | | | | | | | | | | 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-103/+171
| | | | | | | | 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
* Add a new method to Layer that schedules a redraw in the compositor.Rename ↵ben@chromium.org2011-09-301-2/+1
| | | | | | | | Compositor::SchedulePaint to Compositor::ScheduleDraw and CompositorDelegate::ScheduleCompositorPaint to CompositorDelegate::ScheduleDraw.BUG=noneTEST=none Review URL: http://codereview.chromium.org/8083028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103502 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bustage again. This time with correct ifdefs.ben@chromium.org2011-09-301-1/+3
| | | | | | | | | TBR=saintlou BUG=none TEST=none Review URL: http://codereview.chromium.org/8103002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103500 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 103483 - Fix windows Aura bustage.TBR=saintlouBUG=noneTEST=noneReview ↵ben@chromium.org2011-09-301-3/+1
| | | | | | | | URL: http://codereview.chromium.org/8098004TBR=ben@chromium.org Review URL: http://codereview.chromium.org/8101002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103484 0039d316-1c4b-4281-b951-d872f2087c98
* Fix windows Aura bustage.TBR=saintlouBUG=noneTEST=noneben@chromium.org2011-09-301-1/+3
| | | | | | Review URL: http://codereview.chromium.org/8098004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103483 0039d316-1c4b-4281-b951-d872f2087c98
* Fix regression showing layers for nested child views.ben@chromium.org2011-09-291-1/+1
| | | | | | | | | | | When a view hierarchy is added to a layer, child==this was preventing nested child views from having their layers reparented. TBR=sky BUG=none TEST=none Review URL: http://codereview.chromium.org/8086013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103373 0039d316-1c4b-4281-b951-d872f2087c98
* Construct a View's layer immediately when SetPaintToLayer(true) is called or ↵ben@chromium.org2011-09-291-171/+104
| | | | | | | | 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
* Refactors TestCompositor out of views_unittests into a place it can besky@chromium.org2011-09-281-1/+1
| | | | | | | | | | | | | | 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
* Fixes painting issue with bookmarks barpkotwicz@chromium.org2011-09-281-1/+2
| | | | | | | | | | | | | When the bookmarks bar was showing, opening a dialog which paints on top of the bookmark bar in touch_ui and dismissing it would leave ghosts where the dialog used to be. The reason is that the root view has a layer. It would paint the entire view tree into the root view including content which is contained by child layers BUG=none TEST=none Review URL: http://codereview.chromium.org/8046019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103111 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