summaryrefslogtreecommitdiffstats
path: root/views/view.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* Improvements to debugging code which prints the views hierarchy.vollick@chromium.org2011-09-201-57/+131
| | | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/7906015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102011 0039d316-1c4b-4281-b951-d872f2087c98
* Make specifying a texture optional on a Layer.ben@chromium.org2011-09-191-5/+4
| | | | | | | | | | | | This is for Layers that participate in Draw() ordering, transforming and clipping, but do not themselves actually render anything. Also changes LayerTest to use RunAllPending() rather than using the weird QuitOnComposited test type I had. BUG=none TEST=see unittest Review URL: http://codereview.chromium.org/7941016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101829 0039d316-1c4b-4281-b951-d872f2087c98
* External textures outlive layers.backer@chromium.org2011-09-151-13/+4
| | | | | | | | | | | | | | | When the View is hidden, we destroy the associated Layer, but the external texture should persist. Similarly, if a View is made visible, we create a Layer and the Layer should have that external texture. The solution is to push the external texture logic and state up into the LayerHelper, which persists. BUG=none TEST=none Review URL: http://codereview.chromium.org/7904024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101388 0039d316-1c4b-4281-b951-d872f2087c98
* wstring: remove wstrings from all tooltip-related codeevan@chromium.org2011-09-151-1/+1
| | | | | | | | | This is a nearly-mechanical translation of wstring to string16. Removes a *ton* of string conversions. Review URL: http://codereview.chromium.org/7886023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101329 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for SetExternalTexture.backer@chromium.org2011-09-141-9/+4
| | | | | | | | | | | We don't want to SetCanvas (or prepare a canvas to be set), if the Layer is being updated externally. BUG=none TEST=TOUCH_UI build displays google.com Review URL: http://codereview.chromium.org/7889035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101080 0039d316-1c4b-4281-b951-d872f2087c98
* Rework View Layer Draw() to use the Layer::DrawTree() method and the ↵ben@chromium.org2011-09-131-172/+78
| | | | | | | | | | 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
* Allow Chrome-in-Aura to start.ben@chromium.org2011-09-121-1/+1
| | | | | | | | | | Nothing (much) renders. WIP. http://crbug.com/93947 TEST=none Review URL: http://codereview.chromium.org/7849004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100773 0039d316-1c4b-4281-b951-d872f2087c98
* With this CL animated rotations can be triggered by visiting URLs like ↵vollick@chromium.org2011-09-081-3/+6
| | | | | | | | | | | about:rotate?right. The about handler fires orientation events that the TouchBrowserFrameView is listening for. When notified, the TBFV either rotates itself, or the views desktop (if it is active). The animation code lives in views/animation and knows nothing about sensors. BUG=none TEST=none Review URL: http://codereview.chromium.org/7273073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100148 0039d316-1c4b-4281-b951-d872f2087c98
* Reverts debugging code added @ 97412 as it uncovered reason for crash.sky@chromium.org2011-08-221-9/+1
| | | | | | | | | | | R=ben@chromium.org TBR=ben@chromium.org BUG=89439 TEST=none Review URL: http://codereview.chromium.org/7710003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97777 0039d316-1c4b-4281-b951-d872f2087c98
* Simple WindowManager that can move/resize window.oshima@google.com2011-08-191-3/+20
| | | | | | | | | | | | | | Fixes TouchFrame's NonClientHitTest to ignore VirtualKeyboard area. Move mouse capture logic to Window Manager so that nested mouse capture with nested NWVs works correctly. Note1: This is a tentative WM that allows us to move/resize window in views desktop until we have real window manager based on aura/layer API. Note2: There is an compositor related issue and doesn't work well when compositor is enabled. I'll look into it after this CL. Review URL: http://codereview.chromium.org/7530017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97492 0039d316-1c4b-4281-b951-d872f2087c98
* Adds some debugging code to track crash. It seems as thoughsky@chromium.org2011-08-191-1/+9
| | | | | | | | | | | | | | | ClearNativeFocus in View::OnFocus is triggering 'this' to be deleted. I couldn't readily find any views that do anything interesting when the native focus changes, but this should help us find out if that's true. BUG=89439 TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/7670077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97412 0039d316-1c4b-4281-b951-d872f2087c98
* views: Force child views to paint into their own texture when the parent has ↵sadrul@chromium.org2011-08-101-5/+10
| | | | | | | | | | | an external texture. BUG=none TEST=none Review URL: http://codereview.chromium.org/7605024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96177 0039d316-1c4b-4281-b951-d872f2087c98
* First pass for eliminating double paintingpkotwicz@chromium.org2011-07-291-4/+17
| | | | | | | | | | | | | | | | | | | | | | | A simple 3D CSS benchmark shows a 20% improvement in framerate on T25 hardware: an increase from about 30 fps to 36 fps. This is a first pass to getting rid of double painting by introducing a hole in layers Currently a layer which wants its parent not to paint under it will call SetParentLayerHoley There are a number of questions in terms of implementation: 1) We are doing this with layers. We are currently setting all layers to be holey if the touch_ui flag is enabled. Another option is to merge the holey functionality into regular layers. (Get rid of the holey layer subclass) 2) We are always generating vertices matrix, even in the ui::Layer case, is this ok? 3) We are wasting video memory. We are still uploading a full bitmap. I wasn't able to find a function call which would be able to efficiently slice the bigger bitmap, notably changing the origin of where the painting starts (texture upload) git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91848 0039d316-1c4b-4281-b951-d872f2087c98 BUG= TEST= Review URL: http://codereview.chromium.org/7330025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94677 0039d316-1c4b-4281-b951-d872f2087c98
* Update Texture/Layer SetCanvas, callsites, and comments.msw@chromium.org2011-07-271-3/+1
| | | | | | | | | | | Fix TestTexture and ViewLayerTest compile. BUG=90548 TEST=none Review URL: http://codereview.chromium.org/7470030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94241 0039d316-1c4b-4281-b951-d872f2087c98
* Enable browser compositor on all TOUCH_UI builds.backer@chromium.org2011-07-191-1/+1
| | | | | | | | | | | Even Chrome OS builds of chromium. BUG=none TEST=build with GYP_DEFINES="chromeos=1 touchui=1 use_ibus=0" on the desktop Review URL: http://codereview.chromium.org/7396028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93001 0039d316-1c4b-4281-b951-d872f2087c98
* Don't schedule paint if one of view in parent chain is invisibleoshima@google.com2011-07-151-1/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/7374007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92711 0039d316-1c4b-4281-b951-d872f2087c98
* Convert some more view methods to the ui/views style.ben@chromium.org2011-07-151-37/+22
| | | | | | | | BUG=72040 TEST=none Review URL: http://codereview.chromium.org/7349021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92705 0039d316-1c4b-4281-b951-d872f2087c98
* Fix context sharing in CompositorGL.backer@chromium.org2011-07-151-1/+1
| | | | | | | | | | | We use context sharing in CompositorGL to avoid compiling the same shaders for different compositors. Previously, we kept the shaders around until the program exited. With this change, we keep the shaders around until there are no more compositors. BUG=89239 TEST=ui_tests on linux_views pass Review URL: http://codereview.chromium.org/7367005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92683 0039d316-1c4b-4281-b951-d872f2087c98
* views: Add unittests for View::GetViewsWithGroup() method.tfarina@chromium.org2011-07-131-6/+6
| | | | | | | | | | | | | Also, rename it to GetViewsInGroup(). BUG=72040 TEST=views_unittests --gtest_filter=ViewTest.GetViewByID R=ben@chromium.org,sky@chromium.org Review URL: http://codereview.chromium.org/7328031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92430 0039d316-1c4b-4281-b951-d872f2087c98
* Disable compositor on non-touch buildoshima@google.com2011-07-131-1/+1
| | | | | | | | | BUG=89239 TEST=linux_view trybot cycles green Review URL: http://codereview.chromium.org/7362002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92422 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unused ContainsNativeView methods.ben@chromium.org2011-07-131-9/+0
| | | | | | | | | | BUG=none TEST=none TBR=sky Review URL: http://codereview.chromium.org/7352001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92305 0039d316-1c4b-4281-b951-d872f2087c98
* Use SkMatrix44 for the underlying implementation of ui::Transformbacker@chromium.org2011-07-081-2/+7
| | | | | | | | | | BUG= TEST=ui_unittest Review URL: http://codereview.chromium.org/7044062 Patch from Ian Vollick <vollick@chromium.org>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91855 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed issue with layers being deleted upon SetVisible with an argument of truebacker@chromium.org2011-07-061-2/+6
| | | | | | | | | | | | | | | Steps for Repro. From a touch build 1) Goto google.com 2) Type into text field 3) Typed text does not show up BUG=87840 TEST=views_unittest (ToggleVisibilityWithLayer) Review URL: http://codereview.chromium.org/7273067 Patch from Peter Kotwicz <pkotwicz@chromium.org>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91563 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes bug where transform wasn't reset on layer correctly.sky@chromium.org2011-07-011-0/+1
| | | | | | | | | | BUG=none TEST=covered by unit test. R=wjmaclean@chromium.org Review URL: http://codereview.chromium.org/7210048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91317 0039d316-1c4b-4281-b951-d872f2087c98
* Gets compositor working for embedded widgets.sky@chromium.org2011-07-011-72/+79
| | | | | | | | | | BUG=none TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/7280002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91312 0039d316-1c4b-4281-b951-d872f2087c98
* Convert the rect to the widget's coordinates correctly.sadrul@chromium.org2011-06-291-7/+11
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/7276053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90952 0039d316-1c4b-4281-b951-d872f2087c98
* Remove ifdef's for touchui stuff from events code.sadrul@chromium.org2011-06-281-4/+0
| | | | | | | | | | | Also, make sure the touch_pressed_handler_ is the view being removed before resetting it to NULL. BUG=none TEST=things compile and existing tests continue to pass Review URL: http://codereview.chromium.org/7276002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90762 0039d316-1c4b-4281-b951-d872f2087c98
* Makes it so that if the size of a view with a layer changes or on creatingsky@chromium.org2011-06-281-1/+11
| | | | | | | | | | | | | | | the layer we force the complete bounds to be painted. This way the Compositors don't have to worry about partial update of a size they've never seen. This matches old logic I removed thinking it was no longer needed. BUG=none TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/7272013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90711 0039d316-1c4b-4281-b951-d872f2087c98
* Moves acclerated painting related fields from View to LayerHelper.sky@chromium.org2011-06-271-85/+95
| | | | | | | | | | BUG=none TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/7242025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90589 0039d316-1c4b-4281-b951-d872f2087c98
* Allow View to have a layer whose texture is updated externally.backer@chromium.org2011-06-241-0/+28
| | | | | | | | | | | This will be used to display texture produced by the GPU process for the RWHVV via the browser compositor. BUG=none TEST=none Review URL: http://codereview.chromium.org/7231012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90362 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes bug where layer bounds weren't correctly set when views was setsky@chromium.org2011-06-241-11/+18
| | | | | | | | | | | | in a couple of cases. BUG=none TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/7247020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90333 0039d316-1c4b-4281-b951-d872f2087c98
* Adds the ability to animate transforms/bounds to View.sky@chromium.org2011-06-231-7/+29
| | | | | | | | | | BUG=none TEST=none R=ben@chromium.org,wjmaclean@chromium.org Review URL: http://codereview.chromium.org/7242005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90254 0039d316-1c4b-4281-b951-d872f2087c98
* views: Pull out ContextMenuController class into its own header file.tfarina@chromium.org2011-06-231-4/+1
| | | | | | | | | | | BUG=72040 TEST=None R=ben@chromium.org,sky@chromium.org Review URL: http://codereview.chromium.org/7238006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90224 0039d316-1c4b-4281-b951-d872f2087c98
* views: Pull out DragController class into its own header file.tfarina@chromium.org2011-06-211-8/+1
| | | | | | | | | | | BUG=72040 TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/7202015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89921 0039d316-1c4b-4281-b951-d872f2087c98
* Adds Layer as a class between View and the Texture.sky@chromium.org2011-06-211-98/+202
| | | | | | | | | | BUG=none TEST=none R=ben@chromium.org,wjmaclean@chromium.org Review URL: http://codereview.chromium.org/7189067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89880 0039d316-1c4b-4281-b951-d872f2087c98
* Take transforms into consideration when deciding the dirty region for child ↵sadrul@chromium.org2011-06-171-2/+7
| | | | | | | | | | | views. BUG=none TEST=the close button of the rotated window highlights on hover. Review URL: http://codereview.chromium.org/7193025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89501 0039d316-1c4b-4281-b951-d872f2087c98
* views: Change the check in View::AddChildViewAt() to CHECK_NE.tfarina@chromium.org2011-06-161-1/+1
| | | | | | | | | | | BUG=None TEST=views_unittests R=sky@chromium.org Review URL: http://codereview.chromium.org/7191028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89422 0039d316-1c4b-4281-b951-d872f2087c98
* Mark the parent texture dirty when a child view starts using its own texture.sadrul@chromium.org2011-06-161-0/+5
| | | | | | | | | BUG=86343 TEST=none Review URL: http://codereview.chromium.org/7184024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89403 0039d316-1c4b-4281-b951-d872f2087c98
* Add View::ReorderChildView and Widget::MoveToTop.sadrul@chromium.org2011-06-161-0/+26
| | | | | | | | | | | | | | | | | | | | | The z-ordering of child views is currently maintained (implicitly?) by the order they are added to the parent view. It may often be necessary to change the z-order of views, and View::ReorderChildView can be used to do that. I changed views_desktop to have the two pure-views windows to have overlapping regions, and View::ReorderChildView is used to change the z-ordering of the two windows. So it is possible to click a window to activate it and bring it on top of the other. It could have been done without adding Widget::MoveToTop, but given Widget::MoveAbove and MoveAboveWidget, it sounded like a good idea to have Widget::MoveToTop (MoveToFront?). I do now know what the implementation for windows should be, though. So left it as NOTIMPLEMENTED. BUG=none TEST=none Review URL: http://codereview.chromium.org/7185005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89363 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land:ben@chromium.org2011-06-161-5/+7
| | | | | | | | | | | | | | Move private NativeWidget methods to new internal interface NativeWidgetPrivate. This should make it harder to abuse accidentally. BUG=72040 TEST=none Review URL: http://codereview.chromium.org/7170019 Review URL: http://codereview.chromium.org/7189012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89357 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 89216 - Move private NativeWidget methods to new internal interface ↵ben@chromium.org2011-06-151-7/+5
| | | | | | | | | | | | | | | NativeWidgetPrivate. This should make it harder to abuse accidentally. BUG=72040 TEST=none Review URL: http://codereview.chromium.org/7170019 TBR=ben@chromium.org Review URL: http://codereview.chromium.org/7097016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89232 0039d316-1c4b-4281-b951-d872f2087c98
* Move private NativeWidget methods to new internal interface NativeWidgetPrivate.ben@chromium.org2011-06-151-5/+7
| | | | | | | | | | This should make it harder to abuse accidentally. BUG=72040 TEST=none Review URL: http://codereview.chromium.org/7170019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89216 0039d316-1c4b-4281-b951-d872f2087c98
* Add NativeWidgetDelegate::OnTouchEvent and move views::View::TouchStatus to ↵sadrul@chromium.org2011-06-141-3/+3
| | | | | | | | | | | ui::TouchStatus. BUG=none TEST=none Review URL: http://codereview.chromium.org/7147005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89079 0039d316-1c4b-4281-b951-d872f2087c98
* views: Use data member View::parent_ where possible instead of calling ↵tfarina@chromium.org2011-06-141-27/+23
| | | | | | | | | | | | | | | | View::parent() function. While I'm here: - Rewrite some while loops into for loops, since that is what they are doing anyway. BUG=72040 TEST=None R=sky@chromium.org Review URL: http://codereview.chromium.org/7046102 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89000 0039d316-1c4b-4281-b951-d872f2087c98
* Make the web content accessibility tree a descendant of the main window'sdmazzoni@chromium.org2011-06-131-6/+0
| | | | | | | | | | | | | | | | | | | accessibility tree again, which makes it possible to debug Chrome accessibility on Windows using tools like AccExplorer32 or AccProbe. This change refactors the code that retrieves the Windows IAccessible interface from a View that wraps a native HWND. The previous code was brittle, using ViewProps and hardcoded View classname tests. This change moves that logic directly to the classes that wrap native views. BUG=54220 BUG=85673 TEST=Updated AccessibilityWinBrowserTest.ContainsRendererAccessibilityTree Review URL: http://codereview.chromium.org/6995126 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88913 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate Window completely.ben@chromium.org2011-06-131-1/+0
| | | | | | | | BUG=72040 TEST=none Review URL: http://codereview.chromium.org/7108047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88905 0039d316-1c4b-4281-b951-d872f2087c98
* Disables tooltips if we can't create the tooltip window. I still don'tsky@chromium.org2011-06-131-1/+2
| | | | | | | | | | | | | understand why we can't create tooltips for some folks, but this should at least keep us from crashing. BUG=82193 TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/6995157 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88897 0039d316-1c4b-4281-b951-d872f2087c98
* Turn browser off by default on ChromeOS.wjmaclean@chromium.org2011-06-131-0/+4
| | | | | | | | | BUG=Browser compositor is on by default, not wanted at this time. TEST=None. Review URL: http://codereview.chromium.org/7046108 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88831 0039d316-1c4b-4281-b951-d872f2087c98
* views: Drop the prefix "is_" from View::is_visible_ member variable.tfarina@chromium.org2011-06-111-7/+7
| | | | | | | | | | | | | | No other boolean variable in the View class has the "is_" prefix and this is making me nervous for a while now :) BUG=72040 TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/7104098 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88748 0039d316-1c4b-4281-b951-d872f2087c98
* Remove COMPOSITOR_2 flag, old compositor code.wjmaclean@chromium.org2011-06-101-70/+3
| | | | | | | | | BUG=none TEST=compiles, run manually Review URL: http://codereview.chromium.org/6975051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88671 0039d316-1c4b-4281-b951-d872f2087c98