summaryrefslogtreecommitdiffstats
path: root/views/view.h
Commit message (Collapse)AuthorAgeFilesLines
* First pass for eliminating double paintingpkotwicz@chromium.org2011-07-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | 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
* Create views.dll / libviews.sodarin@chromium.org2011-07-281-1/+1
| | | | | | | R=sky@chromium.org,rvargas@chromium.org Review URL: http://codereview.chromium.org/7493017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94428 0039d316-1c4b-4281-b951-d872f2087c98
* views: Have the non-const version of child_at call the constant one.tfarina@chromium.org2011-07-261-3/+6
| | | | | | | | | | | BUG=72040 TEST=views_unittests, views_examples, views_desktop R=sky@chromium.org Review URL: http://codereview.chromium.org/7471048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94092 0039d316-1c4b-4281-b951-d872f2087c98
* Convert some more view methods to the ui/views style.ben@chromium.org2011-07-151-5/+13
| | | | | | | | 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
* views: Add unittests for View::GetViewsWithGroup() method.tfarina@chromium.org2011-07-131-5/+5
| | | | | | | | | | | | | 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
* Remove unused ContainsNativeView methods.ben@chromium.org2011-07-131-5/+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
* Gets compositor working for embedded widgets.sky@chromium.org2011-07-011-27/+31
| | | | | | | | | | 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-0/+4
| | | | | | | | | 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-6/+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
* Moves acclerated painting related fields from View to LayerHelper.sky@chromium.org2011-06-271-23/+15
| | | | | | | | | | 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/+14
| | | | | | | | | | | 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
* Adds the ability to animate transforms/bounds to View.sky@chromium.org2011-06-231-2/+9
| | | | | | | | | | 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-31/+5
| | | | | | | | | | | 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-31/+5
| | | | | | | | | | | 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-28/+78
| | | | | | | | | | 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
* Add View::ReorderChildView and Widget::MoveToTop.sadrul@chromium.org2011-06-161-0/+4
| | | | | | | | | | | | | | | | | | | | | 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
* Add NativeWidgetDelegate::OnTouchEvent and move views::View::TouchStatus to ↵sadrul@chromium.org2011-06-141-19/+5
| | | | | | | | | | | 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
* Make the web content accessibility tree a descendant of the main window'sdmazzoni@chromium.org2011-06-131-10/+3
| | | | | | | | | | | | | | | | | | | 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
* views: Drop the prefix "is_" from View::is_visible_ member variable.tfarina@chromium.org2011-06-111-1/+1
| | | | | | | | | | | | | | 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-19/+0
| | | | | | | | | 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
* First draft to enable turning off compositor for unit tests.wjmaclean@chromium.org2011-06-091-0/+1
| | | | | | | | | | | Tests will be re-enabled when appropriate changes are made to support GL compositor testing. BUG=unit tests not ready for GL compositor at this time. TEST=unit tests run to completion. Review URL: http://codereview.chromium.org/7104039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88521 0039d316-1c4b-4281-b951-d872f2087c98
* Move more from Window onto Widget.ben@chromium.org2011-06-081-8/+0
| | | | | | | | BUG=72040 TEST=none Review URL: http://codereview.chromium.org/7054052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88356 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup:pkasting@chromium.org2011-06-071-0/+1
| | | | | | | | | | | * Remove TextButton::has_normal_border(). Replaced it with some more generic functionality on TextButtonBorder to allow specifying a normal border. * Simplify InfoBarButtonBorder by making it a subclass of TextButtonBorder so it could avoid overriding anything unnecessary. This also required changing TextButtonBorder's Paint() function to stretch rather than tile, which I don't think should produce a visual difference for any buttons using that base class. BUG=none TEST=none Review URL: http://codereview.chromium.org/7065073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88149 0039d316-1c4b-4281-b951-d872f2087c98
* Adds View::OnWillCompositeTexture that is invoked before a texture issky@chromium.org2011-06-061-0/+5
| | | | | | | | | | | | | | | | | | drawn by the compositor and Compositor::Blur to blur a region. If you want to blur a region, then you have to override OnWillCompositeTexture and invoke Blur. I considered adding an Effect enum that allows you to set BLUR on any view. I shied away from that as we may need blur to take a region, and I wasn't too happy about adding more to view. I can easily change it though. BUG=none TEST=none R=ben@chromium.org,wjmaclean@chromium.org Review URL: http://codereview.chromium.org/7056046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87989 0039d316-1c4b-4281-b951-d872f2087c98
* views: Take transforms into account when computing visible bounds.sadrul@chromium.org2011-06-061-3/+3
| | | | | | | | | BUG=none TEST=ViewTest.TransformVisibleBound, ViewTest.OnVisibleBoundsChanged Review URL: http://codereview.chromium.org/6993045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87984 0039d316-1c4b-4281-b951-d872f2087c98
* views: Don't include the container type "vector" in the typedef ViewVector.tfarina@chromium.org2011-06-061-4/+4
| | | | | | | | | | | | | | | | - Rename ViewVector to simply Views. - Users generally should not know or care what the container is. - This makes reading easier as the code is not constantly pointing out to you, "hey! I'm a vector!" - Also it's less verbose, allows condensing a lot of loop declarations onto one line. BUG=72040 TEST=None R=pkasting@chromium.org,sky@chromium.org Review URL: http://codereview.chromium.org/7024023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87983 0039d316-1c4b-4281-b951-d872f2087c98
* First draft of patch for setting texture_needs_updating_.wjmaclean@chromium.org2011-06-031-0/+13
| | | | | | | | | BUG= TEST= Review URL: http://codereview.chromium.org/7058019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87865 0039d316-1c4b-4281-b951-d872f2087c98
* views: Use ViewVector typedef instead of std::vector<View*> in view.*tfarina@chromium.org2011-06-031-2/+3
| | | | | | | | | | | BUG=72040,68682 TEST=None R=sky@chromium.org Review URL: http://codereview.chromium.org/7111008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87823 0039d316-1c4b-4281-b951-d872f2087c98
* views: Convert View::GetID/SetID functions to unix_hacker style.tfarina@chromium.org2011-06-031-4/+4
| | | | | | | | | | | BUG=72040 TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/6969087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87791 0039d316-1c4b-4281-b951-d872f2087c98
* views: Fix some comments of the Tree View API.tfarina@chromium.org2011-06-031-13/+12
| | | | | | | | | | | BUG=None TEST=None R=sky@chromium.org Review URL: http://codereview.chromium.org/7088023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87731 0039d316-1c4b-4281-b951-d872f2087c98
* Adds ability for a view to paint to a texture even it if doesn't havesky@chromium.org2011-06-021-0/+9
| | | | | | | | | | | | a transform. BUG=none TEST=none R=ben@chromium.org,wjmaclean@chromium.org Review URL: http://codereview.chromium.org/7074048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87701 0039d316-1c4b-4281-b951-d872f2087c98
* views: Make |focusable_| a private data member instead of a protected one.tfarina@chromium.org2011-06-021-3/+3
| | | | | | | | | | | BUG=72040 TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/7020040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87555 0039d316-1c4b-4281-b951-d872f2087c98
* views: Make View::SetFocusable() a simple setter accessor.tfarina@chromium.org2011-06-011-1/+1
| | | | | | | | | | | BUG=72040 TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/7096015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87501 0039d316-1c4b-4281-b951-d872f2087c98
* views: Make View::GetVisibleBounds() a const method.tfarina@chromium.org2011-05-311-2/+1
| | | | | | | | | | | | | Note: This was a TODO for beng. BUG=72040 TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/7083013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87312 0039d316-1c4b-4281-b951-d872f2087c98
* views: Make View::GetBaseline() a const method.tfarina@chromium.org2011-05-271-1/+1
| | | | | | | | | | | BUG=72040 TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/7086008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87107 0039d316-1c4b-4281-b951-d872f2087c98
* views: Add OnEnabledChanged() method to View class.tfarina@chromium.org2011-05-271-6/+9
| | | | | | | | | | | | | | | | | | | Changes done here: - Override OnEnabledChanged() in the derived classes from View instead of SetEnable(). - Make SetEnable() a member function not a virtual one. - Make |enabled_| a private data member variable not a protected one. - Some other misc cleanups. Note: The third item was a TODO for beng. BUG=72040 TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/6976048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87080 0039d316-1c4b-4281-b951-d872f2087c98
* views: Make |accessibility_focusable_| a private data member instead of a ↵tfarina@chromium.org2011-05-271-11/+11
| | | | | | | | | | | | | protected one. BUG=72040 TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/7077016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86955 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move some protected data member variables to the private section instead.tfarina@chromium.org2011-05-261-12/+10
| | | | | | | | | | | | | Note: This was a TODO for beng. BUG=72040 TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/7074014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86884 0039d316-1c4b-4281-b951-d872f2087c98
* views: Cleanup parent_owned getter/setter accessors.tfarina@chromium.org2011-05-261-13/+7
| | | | | | | | | | | BUG=72040 TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/6962004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86848 0039d316-1c4b-4281-b951-d872f2087c98
* views: Get rid of View::SetParent() method.tfarina@chromium.org2011-05-261-4/+0
| | | | | | | | | | | | | This method is private to View class, and thus can be removed. BUG=72040 TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/7076002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86775 0039d316-1c4b-4281-b951-d872f2087c98
* views: Rename child_widget() to GetChildWidget().tfarina@chromium.org2011-05-211-3/+1
| | | | | | | | | | | | | | | This is a virtual method, so it shouldn't use the unix_hacker style. Note: This was a TODO for ben. BUG=None TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/7056027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86189 0039d316-1c4b-4281-b951-d872f2087c98
* Move RootView to the internal namespace.ben@chromium.org2011-05-201-8/+8
| | | | | | | | | | | Most people should not be using the RootView type. The few cases that do should static_cast for now, until I can find a way to expose the functionality they need on Widget. BUG=72040 TEST=none TBR=sky Review URL: http://codereview.chromium.org/7040018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86084 0039d316-1c4b-4281-b951-d872f2087c98
* Makes Transform concrete. Fixes bug in coordinate conversion and makes all ↵sky@chromium.org2011-05-171-24/+7
| | | | | | | | | | | | conversion routines calculate the transform in the same way. Lastly fixes bug in touch_factory.cc that was causing crashes on my machine when running views_unittests. Oh, and adds some tests of conversion methods. BUG=none TEST=none R=ben@chromium.org,sadrul@chromium.org Review URL: http://codereview.chromium.org/7033002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85635 0039d316-1c4b-4281-b951-d872f2087c98
* Tweaks Compositor API. To make it possible to land this I've ifdef'dsky@chromium.org2011-05-101-1/+43
| | | | | | | | | | | | the code in a couple of places. BUG=none TEST=none R=ben@chromium.org,wjmaclean@chromium.org,rjkroege@chromium.org Review URL: http://codereview.chromium.org/6999005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84823 0039d316-1c4b-4281-b951-d872f2087c98
* Add a status-type for a mouse-event triggered by a touch event.sadrul@chromium.org2011-05-091-1/+4
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6981007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84703 0039d316-1c4b-4281-b951-d872f2087c98
* Delete Obsolete PaintNow methodoshima@google.com2011-05-091-3/+0
| | | | | | | | | | | This seems to be doing nothing now. BUG=none TEST=none Review URL: http://codereview.chromium.org/6969005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84683 0039d316-1c4b-4281-b951-d872f2087c98
* Add method to print view tree in graphViz format.wjmaclean@chromium.org2011-05-061-0/+10
| | | | | | | | | BUG=none TEST=none [Debug code, user assumes own risks.] Review URL: http://codereview.chromium.org/6930044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84434 0039d316-1c4b-4281-b951-d872f2087c98
* Rename View::GetCursor and simplify arguments.msw@chromium.org2011-05-031-3/+2
| | | | | | | | | | | | | | | | Simplify RootView::UpdateCursor with MouseEvent ctor support. Restore pre-r83123 WigetWin::SetCursor(NULL) behavior. Cleanup (function ordering, OVERRIDEs, unnecessary "views::"). This originates from changes and comments of Patch Set 3 at: http://codereview.chromium.org/6893096/ BUG=72040 TEST=Mouse cursors. Review URL: http://codereview.chromium.org/6910032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83970 0039d316-1c4b-4281-b951-d872f2087c98
* Scrap WNDCLASSEX.hCursor, update GetCursorForPoint.msw@chromium.org2011-04-271-6/+5
| | | | | | | | | | | | | | | | | Default to Win arrow in View::GetCursorForPoint & RootView::UpdateCursor. Simplify WidgetWin::SetCursor, avoid sending NULL. Only SetCuror on client events (DWM handles non-client). RIP TextButtonWithHandCursorOver (r57652 through r64531). RIP WindowWin::InitClass & |resize_cursors_|. Add OVERRIDE specifiers liberally. BUG=35356 TEST=Cursor styles shown in Win & Linux toolkit_views. Review URL: http://codereview.chromium.org/6880201 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83123 0039d316-1c4b-4281-b951-d872f2087c98