summaryrefslogtreecommitdiffstats
path: root/views
Commit message (Collapse)AuthorAgeFilesLines
* Fix focus traversal cycle.yutak@chromium.org2009-06-153-40/+11
| | | | | | | | | | This change makes traversal order of focus cycle consistent between forward and backward traversal. This is a partial fix for issue 6785. BUG=http://crbug.com/6785 TEST=Move the focus to the find bar, and push [Shift]+[Tab]. The focus should not cycle inside the find bar, but go out to the omnibox (or somewhere outside the find bar). Review URL: http://codereview.chromium.org/125130 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18402 0039d316-1c4b-4281-b951-d872f2087c98
* Make WidgetGtk::SetBounds use a single call if it can.sky@chromium.org2009-06-151-0/+5
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/125087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18388 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor the PlatformContext layer to have only one class.brettw@chromium.org2009-06-144-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Previously we had three classes of PlatformCanvas*, one for each platform. Then we had a typedef of PlatformContext to PlatformCanvas[Mac|Win|Linux] for the specific platform. This means that it was almost impossible to forward-declare PlatformCanvas and there were a bunch of unnecessary includes of platform_canvas.h in header files. This change makes there be only one platform_canvas.h header with ifdefs, which removes a decent amount of duplicated code. There is a platform-independent file, and one platform-dependent file of platform_canvas for each platform. I also renamed PlatformDevice[Mac|Win|Linux] to PlatformDevice, althouth in this case I kept the separate headers since there was much less overlap. I also broke out CanvasPaint into separate headers so this template doesn't need to be included all over the project (only a couple of files actually need it). Review URL: http://codereview.chromium.org/125109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18363 0039d316-1c4b-4281-b951-d872f2087c98
* Fix reversed focus traversal order issue.yutak@chromium.org2009-06-127-95/+115
| | | | | | | | | | | | | | | | This change fixes several problems in handling focus traversal and resolves TabbedPane's traversal order issue. Reversed focus traversal is very tricky, and the original traversal code overlooked several things. (1) A focusable view may have a FocusTraverasble. (2) When we are going down, we have to check if the current view has a FocusTraversable. (3) When we are going up from a FocusTraversable, the parent view may gain the next focus. This change fixes these issues. BUG=6871 TEST=See issue 6871. Review URL: http://codereview.chromium.org/125062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18335 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the Menu object, converting all the remaining callers to use Menu2. ↵ben@chromium.org2009-06-125-32/+72
| | | | | | | | | | | I'll rename Menu2->Menu afterwards. TEST=none BUG=none Review URL: http://codereview.chromium.org/122027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18315 0039d316-1c4b-4281-b951-d872f2087c98
* Changing the focus manager to not subclass HWNDs (but for the ↵jcampan@chromium.org2009-06-1210-44/+73
| | | | | | | | top-windows).Components that have HWND now need to specifically let the FocusManager know when they get the native focus.This is the reason for the new GotFocus() notification on the RenderWidgetHostViewWin class.BUG=NoneTEST=Run the interactive tests, the unit-tests. Test that the focus is remembered correctly when switching windows, switching tabs. Test that focus traversal in the browser and in the option dialog works as expected. Review URL: http://codereview.chromium.org/122002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18301 0039d316-1c4b-4281-b951-d872f2087c98
* This CL fixes issue 6103 -- Individual download items on the download shelf ↵xji@chromium.org2009-06-121-0/+13
| | | | | | | | | | | | | | | | | are not mirrored on RTL locales, and issue 13217 -- Dangerous File warning on the shelf in RTL seems to misplace the buttons Enable UI mirroring for DownloadItemView. During painting each download items, for those items without corresponding mirrored images, flip the canvas to paint the mirrored image. And flip canvas back to normal to paint others. BUG=http://crbug.com/6103 BUG=http://crbug.com/13217 Test=Open Hebrew Chrome, go to "http://build.chromium.org/buildbot/continuous/LATEST/", download mini_installer.exe, the layout of the warning should be "cancel_button ok_button warning_message warning_icon" from left to right. Click "ok" to download, the layout of the download item in download shelf should be "drop_down_icon download_file_name(or download_file_name with download_status) download_progress_animation and download icon" from left to right. Review URL: http://codereview.chromium.org/118260 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18292 0039d316-1c4b-4281-b951-d872f2087c98
* Allow external hosts to handle the context menu and thus be able to ↵ananta@chromium.org2009-06-122-3/+12
| | | | | | | | | | | | | | | | | | | | customize it. Changes include 1. A HandleContextMenu function which can be implemented by a TabContentsDelegate. Currently only ExternalTabContainer implements this. 2. Removed InitMenu calls from the RenderViewContextMenu subclass constructors, We need the subclasses to be able to override individual AddMenuItem calls. The newly added RenderViewContextMenuExternalWin class derives from RenderViewContextMenuWin whose constructor calls InitMenu. This happens at a time when the vtable is not yet setup. To fix this we added an Init function to the RenderViewContextMenu base class which then calls a virtual function DoInit, which derived classes can override to perform specific initializations. 3. Added automation messages to send over context menu events to external hosts and back amit, please review everything. estade please review changes to tab_contents_view_gtk.cc and render_view_context_menu_gtk.cc. pinkerton please review changes to tab_contents_view_mac.mm and render_view_context_menu_mac.mm Review URL: http://codereview.chromium.org/119429 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18250 0039d316-1c4b-4281-b951-d872f2087c98
* Show caption area context menu on mouseup, not mousedown. Original patch by ↵pkasting@chromium.org2009-06-112-4/+44
| | | | | | | | | Yong Shin (see http://codereview.chromium.org/18095 ), r=me, modified by me. BUG=5695 TEST=Right-click the titlebar area; the menu should not appear until mouse up. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18170 0039d316-1c4b-4281-b951-d872f2087c98
* Add back 'WS_VSCROLL' flag when creating a combobox window. Without it, the ↵jshin@chromium.org2009-06-111-1/+5
| | | | | | | | | | | | | | | | dropdown list of a combobox longer than the 'default'(?) size gets truncated instead of getting a scrollbar. BUG=13438 (http://crbug.com/13438) TEST=In Options | Under the hood, click 'Fonts & languages' button. The default encoding menu should have a scrollbar. In languages tab, Chrome UI language list contains 49 languages instead of 20(?) or so languages. In a shorter dropdown list (e.g. spellcheck language dropdown), there should be no scrollbar. Review URL: http://codereview.chromium.org/120005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18121 0039d316-1c4b-4281-b951-d872f2087c98
* Restricts the creation of RadioButton to specify an group-id.jcampan@chromium.org2009-06-102-8/+6
| | | | | | | | | | The API is dangerous without one, has it will probably collide with other non radio-button views. BUG=None TEST=None Review URL: http://codereview.chromium.org/120002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18110 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the View cut/copy/paste tests for clipboard. The views delegate wasn't ↵ben@chromium.org2009-06-101-1/+42
| | | | | | | | | | attached so the textfield couldn't access the clipboard to write to it on copy. Create a mock views delegate for this test so that the textfield can get a clipboard. BUG=none TEST=duh. Review URL: http://codereview.chromium.org/118487 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18104 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes crash in menu. It's possible for the WM_MENUSELECT to pass insky@chromium.org2009-06-101-0/+3
| | | | | | | | | | | | NULL as the menu on XP. I believe this only happens when closing the menu, so that it doesn't really matter what we do here. BUG=13759 TEST=see bug Review URL: http://codereview.chromium.org/119441 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18084 0039d316-1c4b-4281-b951-d872f2087c98
* Gets linux2 to compile again.sky@chromium.org2009-06-102-1/+3
| | | | | | | | | | BUG=none TEST=none TBR=ben@chromium.org Review URL: http://codereview.chromium.org/118515 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18069 0039d316-1c4b-4281-b951-d872f2087c98
* Issue 8838: Close box not highlightedidanan@chromium.org2009-06-101-0/+8
| | | | | | | | | | | | | | | We optimize mouse-mouve event handling by ignoring two mouse-move events in a row which works in most cases except that when we animate tab-closing on windows we send a duplicate mouse-move event on purpose to highlight the button. Unfortunately our optimization kicks in. Fixed by reseting the flag to optimize this before sending the extra mouse-move. BUG=8838 Review URL: http://codereview.chromium.org/118454 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18052 0039d316-1c4b-4281-b951-d872f2087c98
* this test was supposed to be disabledben@chromium.org2009-06-101-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18014 0039d316-1c4b-4281-b951-d872f2087c98
* Remove Menu2Delegate interface and fold methods onto Menu2Model instead.ben@chromium.org2009-06-099-50/+137
| | | | | | | | | | | | | Enhance SimpleMenuModel::Delegate interface to support additional options required by the above. Make MenuHostWindow process WM_MENUCOMMAND and WM_MENUSELECT - the first so we can determine which index was selected, the second so we can track highlight changes within a menu. Convert Tab's context menu back to the windows native menu. This will make my life easier when I upgrade chrome_menu.cc to the new API if only the bookmarks menus/context menus are using it. BUG=none TEST=page, app menus again, context menu for tabs. open a bunch of tabs, open this page: http://bengoodger.dreamhosters.com/software/chrome/cxmenutest.html, close that tab then right click on the menu quickly. should not crash! Review URL: http://codereview.chromium.org/118426 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17996 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a memory leak in a focus manager unit-test.jcampan@chromium.org2009-06-091-2/+2
| | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/118461 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17986 0039d316-1c4b-4281-b951-d872f2087c98
* This CL adds some more FocusManager unit-tests.jcampan@chromium.org2009-06-097-224/+508
| | | | | | | | BUG=None TEST=Run the unit-tests. Review URL: http://codereview.chromium.org/118413 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17951 0039d316-1c4b-4281-b951-d872f2087c98
* Moving the Windows specific activation code in the FocusManager to the ↵jcampan@chromium.org2009-06-084-29/+26
| | | | | | | | | | widget_win. BUG=None TEST=Test that the focus in the browser works well: that windows remember which view had focus when deactivated/reactivated. Make sure focus traversal works as expected. Review URL: http://codereview.chromium.org/118406 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17911 0039d316-1c4b-4281-b951-d872f2087c98
* First part of tab overview. It isn't wired up, nor is it complete, butsky@chromium.org2009-06-085-0/+22
| | | | | | | | | | | it's a good enough stage that I want to check it in. BUG=none TEST=none Review URL: http://codereview.chromium.org/119329 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17906 0039d316-1c4b-4281-b951-d872f2087c98
* Removing some unused FocusManager related code from RootView.jcampan@chromium.org2009-06-082-25/+0
| | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/119312 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17899 0039d316-1c4b-4281-b951-d872f2087c98
* forgot this file in last CLben@chromium.org2009-06-081-0/+44
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17896 0039d316-1c4b-4281-b951-d872f2087c98
* A new menu system for views.ben@chromium.org2009-06-0811-2/+1221
| | | | | | | | This is all the functionality needed for the page, app menus and browser system menus. Review URL: http://codereview.chromium.org/119237 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17895 0039d316-1c4b-4281-b951-d872f2087c98
* Makes it possible for Widget's on GTK to have a transparentsky@chromium.org2009-06-085-9/+122
| | | | | | | | | | | | background. Additionally implements always on top and makes ImageView support borders. BUG=none TEST=none Review URL: http://codereview.chromium.org/119269 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17878 0039d316-1c4b-4281-b951-d872f2087c98
* Fix keyboard accelerator registration issue in views::View.yutak@chromium.org2009-06-064-18/+121
| | | | | | | | | | View should not register the same accelerator target multiple times. BUG=13275 TEST=None Review URL: http://codereview.chromium.org/118242 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17810 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crash in window shutdown by accessing the Widget via a more unique property.ben@chromium.org2009-06-051-4/+9
| | | | | | | | | http://crbug.com/12156 TEST=none Review URL: http://codereview.chromium.org/118196 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17789 0039d316-1c4b-4281-b951-d872f2087c98
* Implements View::GetXXXDragThreshold on Linux.sky@chromium.org2009-06-051-6/+17
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/118335 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17783 0039d316-1c4b-4281-b951-d872f2087c98
* More theme bits for the NTP and window frame.glen@chromium.org2009-06-052-0/+5
| | | | | | | | | BUG=12768,13352 TEST=Verify that a theme with attribution works on the NTP and a theme with an overlay shows up Review URL: http://codereview.chromium.org/119227 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17773 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes bug introduced during menu refactoring. Specifically thesky@chromium.org2009-06-053-4/+16
| | | | | | | | | | | | owner_draw_ was not getting set correctly in one case, resulting in no icons in some menus (like back/forward). BUG=http://crbug.com/12847 TEST=see bug Review URL: http://codereview.chromium.org/112096 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17760 0039d316-1c4b-4281-b951-d872f2087c98
* Implement some basic functionality in RootView and View.ben@chromium.org2009-06-056-52/+35
| | | | | | Review URL: http://codereview.chromium.org/119231 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17714 0039d316-1c4b-4281-b951-d872f2087c98
* Fix: Alt+Tab not sending FocusWillChange events.finnur@chromium.org2009-06-041-5/+4
| | | | | | | | | | | | | This causes a DCHECK in FindBarWin if the Find box is open when the user switches to another app with Alt+Tab. The Focus manager now calls ClearFocus everywhere it used to set focused_view_ = NULL, to make sure the event reaches all listeners for FocusWillChange. BUG=13350 TEST=Open Chrome, press Ctrl+F then Alt+Tab. Swith focus back to Chrome and press Esc multiple times and you should not see the Find box flash briefly. Review URL: http://codereview.chromium.org/118267 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17678 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crash 12519: in views::DialogClientView::AcceptWindow()finnur@chromium.org2009-06-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | We don't have repro steps for this crash so this is a blind fix. But looking at the function that crashes and the history of this file I see: Ben's r11070 and r11047: Which add this check. Ben's r11132: Which removes this check (according to the comments it is a test to see if we can get away with it). It looks to me like the check would prevent the crash and since this is still crashing, I am proposing we re-add it. BUG=12519 TEST=We'll need to verify this by checking the crash dumps sent from the field. Review URL: http://codereview.chromium.org/119183 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17651 0039d316-1c4b-4281-b951-d872f2087c98
* Implement window state restoration for the views-gtk window.ben@chromium.org2009-06-044-28/+60
| | | | | | | | | | | Allows the window to be resized smaller than its current size by setting a minimum size before initiating the drag. Fixes a crash in TabContentsViewGtk due to a NULL delegate deref. BUG=none TEST=none Review URL: http://codereview.chromium.org/118227 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17641 0039d316-1c4b-4281-b951-d872f2087c98
* Rephrase this code to be slightly less verbose.ben@chromium.org2009-06-041-5/+2
| | | | | | | | | TBR=glen BUG=none TEST=none Review URL: http://codereview.chromium.org/119157 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17615 0039d316-1c4b-4281-b951-d872f2087c98
* Replace HCURSOR usage in views::View with a new gfx::NativeCursor type that ↵ben@chromium.org2009-06-0410-46/+64
| | | | | | | | | | | | | also supports GdkCursor*, and wires this up with the existing implementors of the GetCursorForPoint method. This allows us to get rid of one of the most annoying NOTIMPLEMENTED()s in views-gtk. BUG=none TEST=none Review URL: http://codereview.chromium.org/119150 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17614 0039d316-1c4b-4281-b951-d872f2087c98
* Allow WindowGtks to be moved and sized when the mouse is over the caption or ↵ben@chromium.org2009-06-042-0/+111
| | | | | | | | | | sizing border. BUG=none TEST=none Review URL: http://codereview.chromium.org/118218 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17608 0039d316-1c4b-4281-b951-d872f2087c98
* Implement custom window shapes as provided by the NonClientView in WindowGtk.ben@chromium.org2009-06-043-1/+29
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/119145 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17597 0039d316-1c4b-4281-b951-d872f2087c98
* Reland of r17500:glen@chromium.org2009-06-042-3/+36
| | | | | | | | | | Theme our bookmark bar buttons. BUG=12467 TEST=Apply a theme and verify that bookmark bar text colors changes. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17587 0039d316-1c4b-4281-b951-d872f2087c98
* Add ability to theme our buttons.glen@chromium.org2009-06-042-1/+20
| | | | | | | | | BUG=12762 TEST=Verify that buttons can be themed. Review URL: http://codereview.chromium.org/119025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17586 0039d316-1c4b-4281-b951-d872f2087c98
* Fix broken separator sizing and positioning.ben@chromium.org2009-06-031-1/+2
| | | | | | | | | http://crbug.com/13273 TEST=open page info window for secure sites, see separators are correctly 2px tall. Review URL: http://codereview.chromium.org/118197 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17564 0039d316-1c4b-4281-b951-d872f2087c98
* Some previous refactoring I did of the accelerator code had introduced ↵jcampan@chromium.org2009-06-036-25/+11
| | | | | | | | regressions (pressing ESC would close the dialog instead of closing an opened combo-box, pressing enter on a dialog with a focused link would not open the link).Looking at fixing these I realized the method View::OvverideAccelerator was not needed anymore as View::SkipDefaultKeyEventProcessing supersedes it.So I removed View::OvverideAccelerator. As a result I also ended up moving some Windows specific code from LocationbarView to AutocompleteEditViewWin.BUG=6900TEST=Open the option dialog, click on a combo-box to open the drop-down list. Press ESC, the drop-down list should be closed. Move the focus to a link (by pressing Tab). Press Enter, the link should be opened and the option dialog should not be closed. Make sure that accelerators (ESC, tab, key up/down...) still work ok in the omnibox) Review URL: http://codereview.chromium.org/119016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17544 0039d316-1c4b-4281-b951-d872f2087c98
* FocusManager should accept multiple AcceleratorTargets for each accelerator.yutak@chromium.org2009-06-033-46/+221
| | | | | | | | | | Originally, FocusManager automatically unregisters an old target if multiple AcceleratorTargets are registered to the same accelerator. This behavior is somewhat troublesome, and actually ShelfItemDialog hits a run-time assertion due to the conflict of registrations (issue 12401). This change modifies the behavior of FocusManager to allow multiple targets to be registered for each accelerator. BUG=12401 TEST=See if issue 12401 is resolved. Review URL: http://codereview.chromium.org/114065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17533 0039d316-1c4b-4281-b951-d872f2087c98
* Recent refactoring of the combobox had broken focus.jcampan@chromium.org2009-06-033-21/+45
| | | | | | | | | BUG=13256 TEST=Open the option dialog. Move the focus around by pressing tab, make sure the combobox gets focused correctly. When the focus is on the combobox, activate another (non Chromium) window, then come back to the option dialog, the focus should still be on the combobox. Review URL: http://codereview.chromium.org/118175 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17526 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r17500glen@chromium.org2009-06-032-36/+3
| | | | | | | | | TBR=slightlyoff BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17508 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for crash when changing frame on non-DWM systems.glen@chromium.org2009-06-031-0/+7
| | | | | | | | | BUG=13075 TEST=Reset the theme on XP and verify that it doesn't crash. Review URL: http://codereview.chromium.org/118171 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17503 0039d316-1c4b-4281-b951-d872f2087c98
* Theme our bookmark bar buttons.glen@chromium.org2009-06-032-3/+36
| | | | | | | | | BUG=12467 TEST=Apply a theme and verify that bookmark bar text colors changes. Review URL: http://codereview.chromium.org/112092 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17500 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce header dependencies in base/phajdan.jr@chromium.org2009-06-031-0/+1
| | | | | | | | Also adds more explicit #includes for needed things. Review URL: http://codereview.chromium.org/118162 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17479 0039d316-1c4b-4281-b951-d872f2087c98
* Adds linux2 variable and change to WidgetGtk to make it compile.sky@chromium.org2009-06-021-0/+2
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/119057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17442 0039d316-1c4b-4281-b951-d872f2087c98
* Properly initialize the native wrapper to NULL to avoid a crash. Also ↵ben@chromium.org2009-06-021-1/+1
| | | | | | | | | | re-enables tests I disabled last night when trying to find this. http://crbug.com/13200 TEST=Start chrome with --first-run. Review URL: http://codereview.chromium.org/118136 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17440 0039d316-1c4b-4281-b951-d872f2087c98