207 Commits

Autor SHA1 Mensagem Data
pfeldman@chromium.org 4592a2f3d8 Add 'resize_leading_on_bounds_change' property into the SingleSplitView.
When it is turned on, leading component is resized when split view gets new bounds.

Review URL: http://codereview.chromium.org/155214

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20258 0039d316-1c4b-4281-b951-d872f2087c98
2009-07-09 14:13:08 +00:00
chrome-bot 8a56a54f9f Fix: Position always off-screen when starting up
Fixed the offset-by-taskbar logic.

Tested with dual monitors, trying left-right and up-down monitor layouts.

TEST=Use dual monitors (first:left, second:right) and open, close, and reopen Chromium in the second (right) window. Without this change, the window appears far to the right from the last location.

BUG=15199

Review URL: http://codereview.chromium.org/155201

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20246 0039d316-1c4b-4281-b951-d872f2087c98
2009-07-09 05:00:01 +00:00
brettw@chromium.org df09ff7eb6 Replace instances of LINUX2 with OS_CHROMEOS and linux2 with chromeos.
Review URL: http://codereview.chromium.org/149367

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20210 0039d316-1c4b-4281-b951-d872f2087c98
2009-07-08 23:45:29 +00:00
thestig@chromium.org 05fe2add74 Remove svn:executable property from files that don't need it.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/155199

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20161 0039d316-1c4b-4281-b951-d872f2087c98
2009-07-08 17:39:27 +00:00
pfeldman@chromium.org 3ea021068f Use different cursors for horizontal and vertical splits. (cursor was static local).
Review URL: http://codereview.chromium.org/149317

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20138 0039d316-1c4b-4281-b951-d872f2087c98
2009-07-08 08:31:08 +00:00
mirandac@chromium.org b4abbb0496 Fix memory leak in ImageButton exposed by r20028.
BUG= none.
TEST= none.

Review URL: http://codereview.chromium.org/149313

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20134 0039d316-1c4b-4281-b951-d872f2087c98
2009-07-08 05:22:10 +00:00
ben@chromium.org bd1c5346b5 Add the keys used by the back/forward menu items to the accelerator map so that we can locate sensible shortcut text for them rather than asking Windows.
http://crbug.com/14070
TEST=see bug

Review URL: http://codereview.chromium.org/149302

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20121 0039d316-1c4b-4281-b951-d872f2087c98
2009-07-08 02:03:11 +00:00
ben@chromium.org 2cdd163017 Inverted logic in UseNativeFrame meant all constrained windows were opened with double-window frames.
http://crbug.com/14476
TEST=see bug, or visit any page with HTTP basic auth

Review URL: http://codereview.chromium.org/149294

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20105 0039d316-1c4b-4281-b951-d872f2087c98
2009-07-08 00:20:36 +00:00
brettw@chromium.org 841794523c Fix the Views GTK build.
I mvoed the implementation of the previously-inline amimate function to the .cc file so we don't have to depend on STL includes in the header.

Review URL: http://codereview.chromium.org/155170

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20091 0039d316-1c4b-4281-b951-d872f2087c98
2009-07-07 21:57:39 +00:00
ben@chromium.org 4b70c87a37 Basics of a new TabStrip.It's very, very rough, but I wanted to check it in so I don't have to keep typing svn pset as I pass patches back and forth between machines.Behind a command line flag --enable-tabtastic2.I'm trying to split the TabContents specific stuff off of the TabStrip so it's more generic (and more easily mocked for unit testing of various layout conditions). Hence TabStrip vs. BrowserTabStrip. TabStrip may move into views/ once this process is complete.Animator is a utility that can be associated with a View that (at this point) animates that View's bounds from wherever it is now to somewhere else. The TabStrip uses this to do animations for individual Tabs that are independent of each other - a limitation of the old TabStrip is that only one animation is ever active at a time so its animations are a little jumpy compared to other products.Also, detached tab dragging shows the live contents, with all animations/video/etc.Like I said, this is really rough, but I didn't want it to grow any bigger. I will write up a design doc later.http://crbug.com/9032TEST=TBD... will finally be doing some for TabStrip layout!
Review URL: http://codereview.chromium.org/42490

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20053 0039d316-1c4b-4281-b951-d872f2087c98
2009-07-07 18:44:31 +00:00
brettw@chromium.org c9628846f9 Fix the current remaining Views-GTK compile and linker errors.
Chrome still doesn't run.

Review URL: http://codereview.chromium.org/155026

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19977 0039d316-1c4b-4281-b951-d872f2087c98
2009-07-06 20:17:35 +00:00
brettw@chromium.org 0248f269f5 Convert menu strings to UTF16, fix some views-GTK build errors.
Review URL: http://codereview.chromium.org/150171

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19820 0039d316-1c4b-4281-b951-d872f2087c98
2009-07-02 16:21:17 +00:00
pfeldman@chromium.org eec1121289 Add layout support for invisible SingleSplitView children.
Review URL: http://codereview.chromium.org/150120

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19737 0039d316-1c4b-4281-b951-d872f2087c98
2009-07-01 16:08:35 +00:00
sky@chromium.org 6f709bbf65 Fixes crash in ~WidgetGtk. This was caused by your change to no longer
set RootView::widget_ = NULL in RootView::OnWidgetDestroyed.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/150137

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19684 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-30 23:58:17 +00:00
sky@chromium.org 0be17483da Makes WidgetGtk specify a size before realizing the window. Without
this we might not end up with the correct size.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/149111

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19657 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-30 21:07:03 +00:00
sky@chromium.org 34f44a2be3 Fixes compile bugs for views on gtk.
TBR=jcampan
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/151099

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19656 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-30 21:01:00 +00:00
jcampan@chromium.org 961e523ba4 Fixing a breakage in the GTK toolkit build that my last check-in caused.
BUG=None
TEST=None
TBR=brettw
Review URL: http://codereview.chromium.org/150133

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19650 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-30 20:33:51 +00:00
brettw@chromium.org 87002e9dec Fix compilation error in the focus manager by returning NULL from unimplemented function.
Review URL: http://codereview.chromium.org/152001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19649 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-30 20:27:30 +00:00
brettw@chromium.org 18b2d991c9 Fix the Views combobox on GTK by adding a new function.
Review URL: http://codereview.chromium.org/150127

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19631 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-30 19:45:38 +00:00
jcampan@chromium.org e29b47dae1 This CL removes the last (major) Windows specific part out of the focus manager.
It was previously landed and reverted because it broke the reliability tests.
http://codereview.chromium.org/125148

The breakage was caused by constrained windows not getting a hold of the FocusManager when in unparented tabs.
The fix is to ensure unparented tab still have a way to access their FocusManager for proper closure.
Files changed from the previous patch that need reviewing:
native_tab_contents_container_win.cc
tab_contents_view_win.h
tab_contents_view_win.cc

BUG=None
TEST=Run all tests (unit, ui, interactive). Extensively test the focus in Chrome.



Review URL: http://codereview.chromium.org/146093

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19617 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-30 18:48:00 +00:00
jcampan@chromium.org 9137082814 Review URL: http://codereview.chromium.org/150051
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19582 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-30 15:06:10 +00:00
ben@chromium.org 2bc0ffd998 Rework a loop in the native menu code to iterate over the vector of items we have, rather than the actual system menu.
I believe this may fix a crash where the code indexes out of bounds in the vector. The trouble is the assumption that the native menu index matches the index into the vector. If someone has installed a windows addon this may not be true. It's safer to restrict the iteration to the bounds of the vector and index into the menu based on that.

http://crbug.com/14600
TEST=none

Review URL: http://codereview.chromium.org/150061

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19558 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-29 23:39:25 +00:00
ben@chromium.org ed95add9cb Fix a menu crash.
The menu's host window, the message window that receives notifications from the native menu about selection changes, is destroyed, however if the menu is still active it will continue to send messages to it. SDK docs say properties set with SetProp should be removed with RemoveProp before a window is finally NCDESTROYed. The code wasn't doing this, so it was still theoretically possible for the code in the message window's window procedure to locate "something" on that property.

http://crbug.com/14594
TEST=none

Review URL: http://codereview.chromium.org/147230

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19411 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-26 20:29:41 +00:00
sky@chromium.org b7ce2fe606 Fixes bug in RootViewGtk where we we might not paint correctly if
SchedulePaint is invoked consecutively with different regions. Windows
has similar code.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/147170

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19338 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-26 04:36:11 +00:00
amanda@chromium.org 37aad78033 Update Skia transfer modes to match changes in Skia as of r239
Review URL: http://codereview.chromium.org/146131

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19213 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-25 01:24:40 +00:00
pfeldman@chromium.org 7a9c91c45a Add support for vertical split into SingleSplitView.
Review URL: http://codereview.chromium.org/146036

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19107 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-24 09:40:35 +00:00
jcampan@chromium.org 9fdc1c098f Fix ifdef that was triggering a NOTIMPLEMENTED in browser tests.
BUG=None
TEST=Run the browser tests
Review URL: http://codereview.chromium.org/146049

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19068 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-23 22:01:22 +00:00
brettw@chromium.org 770f0862e1 Add Linux support for getting the thumbnail and wire into the switcher.
Review URL: http://codereview.chromium.org/144006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19064 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-23 21:36:47 +00:00
yuzo@chromium.org 35947279ea For consistency, stop using the workarea coordinate in
saving/retrieving/adjusting window positions.

TEST=Open Chrome windows and see if they are placed properly.
TESTED=gcl try, manually
BUG=none


Review URL: http://codereview.chromium.org/141039

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19012 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-23 08:11:28 +00:00
glen@chromium.org 01df37be99 Fix dialog edges - error was because we made the top edges the same height but didn't update the code that compensated for their previously-different heights.
BUG=13812

Review URL: http://codereview.chromium.org/145017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18993 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-23 00:24:01 +00:00
nsylvain@chromium.org 73c277b9af Revert :
Changed by: jcampan@chromium.org
Changed at: Fri 19 Jun 2009 21:22:47
Branch: src
Revision: 18889
Comments:
Relanding focus manager refactoring with build fix, see:http://codereview.chromium.org/125148BUG=NoneTEST=NoneTBR=ben
Review URL: http://codereview.chromium.org/141013

Because it creates hundreds of new reliability crashes.

TBR:jcampan

Review URL: http://codereview.chromium.org/140064

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18904 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-22 15:27:45 +00:00
jcampan@chromium.org 99ea7b7205 Relanding focus manager refactoring with build fix, see:http://codereview.chromium.org/125148BUG=NoneTEST=NoneTBR=ben
Review URL: http://codereview.chromium.org/141013

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18889 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-20 04:22:44 +00:00
jcampan@chromium.org f079daea71 Reverting 18872.
Broke the Windows build.

BUG=None
TEST=None
TBR=ben

Review URL: http://codereview.chromium.org/140023

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18873 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-19 23:08:41 +00:00
jcampan@chromium.org a4ba6dd13e Removed the last Windows specific part out of the focus manager. HWNDs are not subclassed anymore.The FocusManager is now created and owned by top-level WidgetWins.BUG=NoneTEST=Run the unit tests, UI tests, interactive UI tests. Fully test the focus behavior in the browser: activate/deactivate the browser windows, make sure focus is remembered. Switch tabs, make sure focus is remembered for each tab. make sure accelerators work as expected. Test focus traversal in a web page, in the option dialog.
Review URL: http://codereview.chromium.org/125148

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18872 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-19 22:57:54 +00:00
sky@chromium.org 148e585fb4 Lands http://codereview.chromium.org/131064 for tedoc2000.
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/132041

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18771 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-18 23:46:51 +00:00
ben@chromium.org ff592d5e00 Call Layout directly from SetContentsView. In the case where the Widget is created with bounds, SetContentsView never causes a subsequent Layout because the bounds won't have changed.
Fixes interactive UI tests.

TBR=sky
BUG=none
TEST=interactive ui tests don't crash.

Review URL: http://codereview.chromium.org/132029

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18729 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-18 18:52:43 +00:00
ben@chromium.org f81a8bffc4 Hook up "clear browsing data" dialog. It looks like ass right now. The intent is to be able to debug problems with NativeControls under Gtk.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/131027

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18715 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-18 17:04:10 +00:00
ben@chromium.org 48fe2fe9f5 A long standing bug in views!
Every time a widget is resized, we call Layout on its view hierarchy TWICE!
A while ago, I added code to views::View's default implementation of DidChangeBounds to automatically call Layout. So, after calling SetBounds on a widget, it is not necessary to call Layout. However this is exactly what WidgetWin/WidgetGtk do o_O.

It turns out this doesn't matter on windows because size changes in child widgets never affect the sizes of their parents - they're just clipped to their parent's bounds.

However, on Gtk it seems like sizing a child causes a size-allocate signal to be sent to the parent widget, which means we end up in infinite resize loops.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/131026

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18714 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-18 17:03:12 +00:00
sky@chromium.org cd2f74e85c Adds a widget that when clicked creates a new browser window. It's not
wired up yet, but will be shortly.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/126235

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18653 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-17 20:46:10 +00:00
ben@chromium.org 75658aa8b8 Fix build bustage by removing another dependency on browser/gtk by creating a new TabContentsViewGtk specifically for views. This subclasses WidgetGtk similar to how TabContentsViewWin subclasses WidgetWin.
There was a bug in NativeViewHostGtk - reparenting needs to be done atomically using gtk_widget_reparent since GtkWidgets are refcounted and when removed from a container are released, causing a crash when a TabContents is reparented.

The code now compiles thanks to a stubbed BlockedPopupContainer, however there is one remaining issue - the browser window no longer paints and the app instantly hangs. However this is better than the current state so I figured I'd send the code review.
Review URL: http://codereview.chromium.org/126107

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18588 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-17 04:23:00 +00:00
sky@chromium.org b68e40bd17 Improved tab overview animations with better animation and wiring to
message loop.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/126185

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18523 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-16 20:23:58 +00:00
estade@chromium.org 3e10715b2c Move TableModel out of views/ and into app/.
Remove stub implementation in temp_scaffolding_stubs.h

Use l10n_util collator helper function in TableModel::Compare
Review URL: http://codereview.chromium.org/126184

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18518 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-16 19:57:31 +00:00
hamaji@chromium.org eba5eefd10 Add comments on magic number 0xbb. They are VK_OEM_PLUS. I guess the original author of this code considered the case where VK_OEM_PLUS isn't defined. For example, it seems that 0xbb is VK_EQUAL for embeded environments and VK_OEM_PLUS is never defined.
Review URL: http://codereview.chromium.org/119154

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18467 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-16 00:48:32 +00:00
ben@chromium.org 89d8035cbb Upgrade BackForwardMenuModelViews to use new menu API. Also adds accelerator to the "Show Full History" item.
This requires bringing the owner-draw system for native menus over from the old code. I haven't really changed anything in it other than the format of dwItemData. This code could be improved/simplified by using gfx::Canvas more, but don't want to do it here.

BUG=none
TEST=make sure BackForwardMenuModel tests still pass, test the menu functionality in the toolbar.
Review URL: http://codereview.chromium.org/126092

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18454 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-15 23:49:40 +00:00
yutak@chromium.org 5857d3db4f Fix focus traversal cycle.
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
2009-06-15 18:00:04 +00:00
sky@chromium.org 5a7f3f7615 Make WidgetGtk::SetBounds use a single call if it can.
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
2009-06-15 15:22:57 +00:00
brettw@chromium.org c40e89248c Refactor the PlatformContext layer to have only one class.
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
2009-06-14 15:14:53 +00:00
yutak@chromium.org 7f3cb5569e Fix reversed focus traversal order issue.
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
2009-06-12 23:52:20 +00:00
ben@chromium.org 8189de8090 Remove the Menu object, converting all the remaining callers to use Menu2. 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
2009-06-12 20:44:28 +00:00
jcampan@chromium.org 38cde2dfe6 Changing the focus manager to not subclass HWNDs (but for the 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
2009-06-12 19:14:54 +00:00