summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-09 02:32:42 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-09 02:32:42 +0000
commit0cde55895ade17764ae100c28e9bd7112458333b (patch)
tree29964641ee4514a93163b2a804207e5493052578
parentd5c409747ee1f24ee1eae50d4869922c38cf5a12 (diff)
downloadchromium_src-0cde55895ade17764ae100c28e9bd7112458333b.zip
chromium_src-0cde55895ade17764ae100c28e9bd7112458333b.tar.gz
chromium_src-0cde55895ade17764ae100c28e9bd7112458333b.tar.bz2
It turns out I had the sense of the GetLocalBounds bool wrong everywhere, so invert everything.
This fixes the painting bugs in the omnibox and bookmark bar, and probably countless other glitches in rendering. BUG=none TEST=omnibox popup should render properly TBR=sky Review URL: http://codereview.chromium.org/6462022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74231 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/automation/testing_automation_provider_views.cc2
-rw-r--r--chrome/browser/chromeos/frame/bubble_frame_view.cc2
-rw-r--r--chrome/browser/chromeos/login/eula_view.cc2
-rw-r--r--chrome/browser/chromeos/login/oobe_progress_bar.cc2
-rw-r--r--chrome/browser/chromeos/login/username_view.cc2
-rw-r--r--chrome/browser/chromeos/login/web_page_view.cc2
-rw-r--r--chrome/browser/ui/views/about_chrome_view.cc2
-rw-r--r--chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc8
-rw-r--r--chrome/browser/ui/views/bookmark_editor_view.cc2
-rw-r--r--chrome/browser/ui/views/bubble_border.cc2
-rw-r--r--chrome/browser/ui/views/create_application_shortcut_view.cc2
-rw-r--r--chrome/browser/ui/views/frame/browser_view_layout.cc4
-rw-r--r--chrome/browser/ui/views/info_bubble.cc2
-rw-r--r--chrome/browser/ui/views/list_background.h2
-rw-r--r--chrome/browser/ui/views/location_bar/location_bar_view.cc2
-rw-r--r--chrome/browser/ui/views/notifications/balloon_view.cc2
-rw-r--r--chrome/browser/ui/views/options/cookies_view.cc2
-rw-r--r--chrome/browser/ui/views/options/exceptions_view.cc2
-rw-r--r--chrome/browser/ui/views/options/simple_content_exceptions_view.cc2
-rw-r--r--chrome/browser/ui/views/status_bubble_views.cc2
-rw-r--r--chrome/browser/ui/views/tabs/dragged_tab_controller.cc2
-rw-r--r--chrome/browser/ui/views/tabs/side_tab_strip.cc2
-rw-r--r--chrome/browser/ui/views/tabs/tab.cc2
-rw-r--r--chrome/browser/ui/views/task_manager_view.cc2
-rw-r--r--chrome/chrome_browser.gypi6
-rw-r--r--views/controls/button/button_dropdown.cc2
-rw-r--r--views/controls/button/checkbox.cc2
-rw-r--r--views/controls/button/menu_button.cc2
-rw-r--r--views/controls/label_unittest.cc6
-rw-r--r--views/controls/native/native_view_host.cc2
-rw-r--r--views/controls/scroll_view.cc2
-rw-r--r--views/controls/scrollbar/native_scroll_bar_gtk.cc2
-rw-r--r--views/controls/scrollbar/native_scroll_bar_win.cc2
-rw-r--r--views/controls/slider/slider.cc2
-rw-r--r--views/controls/tabbed_pane/native_tabbed_pane_win.cc4
-rw-r--r--views/controls/textfield/textfield.cc2
-rw-r--r--views/mouse_watcher.cc2
-rw-r--r--views/view.cc2
-rw-r--r--views/widget/root_view.cc2
-rw-r--r--views/window/dialog_client_view.cc2
40 files changed, 49 insertions, 49 deletions
diff --git a/chrome/browser/automation/testing_automation_provider_views.cc b/chrome/browser/automation/testing_automation_provider_views.cc
index 11ce53c..99b4065 100644
--- a/chrome/browser/automation/testing_automation_provider_views.cc
+++ b/chrome/browser/automation/testing_automation_provider_views.cc
@@ -131,7 +131,7 @@ void TestingAutomationProvider::WindowGetViewBounds(int handle,
views::View::ConvertPointToScreen(view, &point);
else
views::View::ConvertPointToView(view, root_view, &point);
- *bounds = view->GetLocalBounds();
+ *bounds = view->GetContentsBounds();
bounds->set_origin(point);
}
}
diff --git a/chrome/browser/chromeos/frame/bubble_frame_view.cc b/chrome/browser/chromeos/frame/bubble_frame_view.cc
index 2af3b11..8dc0f7f 100644
--- a/chrome/browser/chromeos/frame/bubble_frame_view.cc
+++ b/chrome/browser/chromeos/frame/bubble_frame_view.cc
@@ -210,7 +210,7 @@ void BubbleFrameView::Paint(gfx::Canvas* canvas) {
paint.setStyle(SkPaint::kFill_Style);
paint.setColor(BubbleWindow::kBackgroundColor);
gfx::Path path;
- gfx::Rect bounds(GetLocalBounds());
+ gfx::Rect bounds(GetContentsBounds());
SkRect rect;
rect.set(SkIntToScalar(bounds.x()), SkIntToScalar(bounds.y()),
SkIntToScalar(bounds.right()), SkIntToScalar(bounds.bottom()));
diff --git a/chrome/browser/chromeos/login/eula_view.cc b/chrome/browser/chromeos/login/eula_view.cc
index bdee1a8..31b2ffb 100644
--- a/chrome/browser/chromeos/login/eula_view.cc
+++ b/chrome/browser/chromeos/login/eula_view.cc
@@ -76,7 +76,7 @@ struct FillLayoutWithBorder : public views::LayoutManager {
// Overridden from LayoutManager:
virtual void Layout(views::View* host) {
DCHECK(host->GetChildViewCount());
- host->GetChildViewAt(0)->SetBoundsRect(host->GetLocalBounds());
+ host->GetChildViewAt(0)->SetBoundsRect(host->GetContentsBounds());
}
virtual gfx::Size GetPreferredSize(views::View* host) {
return gfx::Size(host->width(), host->height());
diff --git a/chrome/browser/chromeos/login/oobe_progress_bar.cc b/chrome/browser/chromeos/login/oobe_progress_bar.cc
index 0e30267..1f0c482 100644
--- a/chrome/browser/chromeos/login/oobe_progress_bar.cc
+++ b/chrome/browser/chromeos/login/oobe_progress_bar.cc
@@ -53,7 +53,7 @@ void OobeProgressBar::InitClass() {
}
void OobeProgressBar::Paint(gfx::Canvas* canvas) {
- gfx::Rect bounds = GetLocalBounds();
+ gfx::Rect bounds = GetContentsBounds();
int x = bounds.x();
int y = bounds.y();
diff --git a/chrome/browser/chromeos/login/username_view.cc b/chrome/browser/chromeos/login/username_view.cc
index a8f1fb4..fedf340 100644
--- a/chrome/browser/chromeos/login/username_view.cc
+++ b/chrome/browser/chromeos/login/username_view.cc
@@ -81,7 +81,7 @@ UsernameView::UsernameView(const std::wstring& username, bool use_small_shape)
}
void UsernameView::Paint(gfx::Canvas* canvas) {
- gfx::Rect bounds = GetLocalBounds();
+ gfx::Rect bounds = GetContentsBounds();
if (text_image_ == NULL)
PaintUsername(bounds);
DCHECK(text_image_ != NULL);
diff --git a/chrome/browser/chromeos/login/web_page_view.cc b/chrome/browser/chromeos/login/web_page_view.cc
index 3e16241..4bd0c0e 100644
--- a/chrome/browser/chromeos/login/web_page_view.cc
+++ b/chrome/browser/chromeos/login/web_page_view.cc
@@ -175,7 +175,7 @@ void WebPageView::ShowWaitingControls() {
// WebPageView, views::View implementation:
void WebPageView::Layout() {
- dom_view()->SetBoundsRect(GetLocalBounds());
+ dom_view()->SetBoundsRect(GetContentsBounds());
int y = height() / 2 - throbber_->GetPreferredSize().height() / 2;
throbber_->SetBounds(
width() / 2 - throbber_->GetPreferredSize().width() / 2,
diff --git a/chrome/browser/ui/views/about_chrome_view.cc b/chrome/browser/ui/views/about_chrome_view.cc
index 807d050..7a04958 100644
--- a/chrome/browser/ui/views/about_chrome_view.cc
+++ b/chrome/browser/ui/views/about_chrome_view.cc
@@ -391,7 +391,7 @@ void AboutChromeView::Layout() {
// Get the y-coordinate of our parent so we can position the text left of the
// buttons at the bottom.
- gfx::Rect parent_bounds = GetParent()->GetLocalBounds();
+ gfx::Rect parent_bounds = GetParent()->GetContentsBounds();
sz = throbber_->GetPreferredSize();
int throbber_topleft_x = kPanelHorizMargin;
diff --git a/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc b/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc
index 0934bbd..18a1566 100644
--- a/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc
+++ b/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc
@@ -977,7 +977,7 @@ void AutocompletePopupContentsView::Paint(gfx::Canvas* canvas) {
shader->unref();
gfx::Path path;
- MakeContentsPath(&path, GetLocalBounds());
+ MakeContentsPath(&path, GetContentsBounds());
canvas->AsCanvasSkia()->drawPath(path, paint);
// Now we paint the border, so it will be alpha-blended atop the contents.
@@ -990,7 +990,7 @@ void AutocompletePopupContentsView::Layout() {
UpdateBlurRegion();
// Size our children to the available content area.
- gfx::Rect contents_rect = GetLocalBounds();
+ gfx::Rect contents_rect = GetContentsBounds();
int child_count = GetChildViewCount();
int top = contents_rect.y();
for (int i = 0; i < child_count; ++i) {
@@ -1115,7 +1115,7 @@ void AutocompletePopupContentsView::UpdateBlurRegion() {
// Translate the contents rect into widget coordinates, since that's what
// DwmEnableBlurBehindWindow expects a region in.
- gfx::Rect contents_rect = GetLocalBounds();
+ gfx::Rect contents_rect = GetContentsBounds();
gfx::Point origin(contents_rect.origin());
views::View::ConvertPointToWidget(this, &origin);
contents_rect.set_origin(origin);
@@ -1174,7 +1174,7 @@ size_t AutocompletePopupContentsView::GetIndexForPoint(
}
gfx::Rect AutocompletePopupContentsView::CalculateTargetBounds(int h) {
- gfx::Rect location_bar_bounds(location_bar_->GetLocalBounds());
+ gfx::Rect location_bar_bounds(location_bar_->GetContentsBounds());
const views::Border* border = location_bar_->border();
if (border) {
// Adjust for the border so that the bubble and location bar borders are
diff --git a/chrome/browser/ui/views/bookmark_editor_view.cc b/chrome/browser/ui/views/bookmark_editor_view.cc
index 2fedf37..ba4c5a9 100644
--- a/chrome/browser/ui/views/bookmark_editor_view.cc
+++ b/chrome/browser/ui/views/bookmark_editor_view.cc
@@ -139,7 +139,7 @@ void BookmarkEditorView::Layout() {
// Manually lay out the New Folder button in the same row as the OK/Cancel
// buttons...
- gfx::Rect parent_bounds = GetParent()->GetLocalBounds();
+ gfx::Rect parent_bounds = GetParent()->GetContentsBounds();
gfx::Size prefsize = new_group_button_->GetPreferredSize();
int button_y =
parent_bounds.bottom() - prefsize.height() - views::kButtonVEdgeMargin;
diff --git a/chrome/browser/ui/views/bubble_border.cc b/chrome/browser/ui/views/bubble_border.cc
index e5d7764..17c5933 100644
--- a/chrome/browser/ui/views/bubble_border.cc
+++ b/chrome/browser/ui/views/bubble_border.cc
@@ -433,7 +433,7 @@ void BubbleBackground::Paint(gfx::Canvas* canvas, views::View* view) const {
paint.setStyle(SkPaint::kFill_Style);
paint.setColor(border_->background_color());
gfx::Path path;
- gfx::Rect bounds(view->GetLocalBounds());
+ gfx::Rect bounds(view->GetContentsBounds());
SkRect rect;
rect.set(SkIntToScalar(bounds.x()), SkIntToScalar(bounds.y()),
SkIntToScalar(bounds.right()), SkIntToScalar(bounds.bottom()));
diff --git a/chrome/browser/ui/views/create_application_shortcut_view.cc b/chrome/browser/ui/views/create_application_shortcut_view.cc
index 064b1cd..a998365 100644
--- a/chrome/browser/ui/views/create_application_shortcut_view.cc
+++ b/chrome/browser/ui/views/create_application_shortcut_view.cc
@@ -156,7 +156,7 @@ void AppInfoView::UpdateIcon(const SkBitmap& new_icon) {
}
void AppInfoView::Paint(gfx::Canvas* canvas) {
- gfx::Rect bounds = GetContentsBounds();
+ gfx::Rect bounds = GetLocalBounds();
SkRect border_rect = {
SkIntToScalar(bounds.x()),
diff --git a/chrome/browser/ui/views/frame/browser_view_layout.cc b/chrome/browser/ui/views/frame/browser_view_layout.cc
index c58e264..5a4405f 100644
--- a/chrome/browser/ui/views/frame/browser_view_layout.cc
+++ b/chrome/browser/ui/views/frame/browser_view_layout.cc
@@ -248,7 +248,7 @@ void BrowserViewLayout::ViewRemoved(views::View* host, views::View* view) {
}
void BrowserViewLayout::Layout(views::View* host) {
- vertical_layout_rect_ = browser_view_->GetContentsBounds();
+ vertical_layout_rect_ = browser_view_->GetLocalBounds();
int top = LayoutTabStrip();
if (browser_view_->IsTabStripVisible() && !browser_view_->UseVerticalTabs()) {
tabstrip_->SetBackgroundOffset(gfx::Point(
@@ -448,7 +448,7 @@ void BrowserViewLayout::LayoutTabContents(int top, int bottom) {
!browser_view_->frame_->GetWindow()->IsFullscreen()) {
gfx::Size resize_corner_size = browser_view_->GetResizeCornerSize();
if (!resize_corner_size.IsEmpty()) {
- gfx::Rect bounds = browser_view_->GetLocalBounds();
+ gfx::Rect bounds = browser_view_->GetContentsBounds();
gfx::Point resize_corner_origin(
bounds.right() - resize_corner_size.width(),
bounds.bottom() - resize_corner_size.height());
diff --git a/chrome/browser/ui/views/info_bubble.cc b/chrome/browser/ui/views/info_bubble.cc
index 1e1bf04..32fe0c1 100644
--- a/chrome/browser/ui/views/info_bubble.cc
+++ b/chrome/browser/ui/views/info_bubble.cc
@@ -113,7 +113,7 @@ void BorderContents::Paint(gfx::Canvas* canvas) {
paint.setStyle(SkPaint::kFill_Style);
paint.setColor(InfoBubble::kBackgroundColor);
gfx::Path path;
- gfx::Rect bounds(GetLocalBounds());
+ gfx::Rect bounds(GetContentsBounds());
SkRect rect;
rect.set(SkIntToScalar(bounds.x()), SkIntToScalar(bounds.y()),
SkIntToScalar(bounds.right()), SkIntToScalar(bounds.bottom()));
diff --git a/chrome/browser/ui/views/list_background.h b/chrome/browser/ui/views/list_background.h
index 6f7b1ce..233910d 100644
--- a/chrome/browser/ui/views/list_background.h
+++ b/chrome/browser/ui/views/list_background.h
@@ -24,7 +24,7 @@ class ListBackground : public views::Background {
virtual void Paint(gfx::Canvas* canvas, views::View* view) const {
HDC dc = canvas->BeginPlatformPaint();
- RECT native_lb = view->GetContentsBounds().ToRECT();
+ RECT native_lb = view->GetLocalBounds().ToRECT();
gfx::NativeTheme::instance()->PaintListBackground(dc, true, &native_lb);
canvas->EndPlatformPaint();
}
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index f8f7ca5..9597e22 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -651,7 +651,7 @@ void LocationBarView::Paint(gfx::Canvas* canvas) {
// can draw the border images over the background color instead of the
// reverse; this antialiases better (see comments in
// AutocompletePopupContentsView::Paint()).
- gfx::Rect bounds(GetLocalBounds());
+ gfx::Rect bounds(GetContentsBounds());
bounds.Inset(0, kVerticalEdgeThickness);
SkColor color(GetColor(ToolbarModel::NONE, BACKGROUND));
if (mode_ == NORMAL) {
diff --git a/chrome/browser/ui/views/notifications/balloon_view.cc b/chrome/browser/ui/views/notifications/balloon_view.cc
index d3b58ed..69859cb 100644
--- a/chrome/browser/ui/views/notifications/balloon_view.cc
+++ b/chrome/browser/ui/views/notifications/balloon_view.cc
@@ -476,7 +476,7 @@ void BalloonViewImpl::Paint(gfx::Canvas* canvas) {
DCHECK(canvas);
// Paint the menu bar area white, with proper rounded corners.
gfx::Path path;
- gfx::Rect rect = GetLocalBounds();
+ gfx::Rect rect = GetContentsBounds();
rect.set_height(GetShelfHeight());
GetFrameMask(rect, &path);
diff --git a/chrome/browser/ui/views/options/cookies_view.cc b/chrome/browser/ui/views/options/cookies_view.cc
index 8454922..278e964 100644
--- a/chrome/browser/ui/views/options/cookies_view.cc
+++ b/chrome/browser/ui/views/options/cookies_view.cc
@@ -177,7 +177,7 @@ views::View* CookiesView::GetContentsView() {
void CookiesView::Layout() {
// Lay out the Remove/Remove All buttons in the parent view.
gfx::Size ps = remove_button_->GetPreferredSize();
- gfx::Rect parent_bounds = GetParent()->GetLocalBounds();
+ gfx::Rect parent_bounds = GetParent()->GetContentsBounds();
int y_buttons =
parent_bounds.bottom() - ps.height() - views::kButtonVEdgeMargin;
diff --git a/chrome/browser/ui/views/options/exceptions_view.cc b/chrome/browser/ui/views/options/exceptions_view.cc
index e770a3d..54c9770 100644
--- a/chrome/browser/ui/views/options/exceptions_view.cc
+++ b/chrome/browser/ui/views/options/exceptions_view.cc
@@ -84,7 +84,7 @@ void ExceptionsView::Layout() {
// The buttons are placed in the parent, but we need to lay them out.
int max_y =
- GetParent()->GetLocalBounds().bottom() - views::kButtonVEdgeMargin;
+ GetParent()->GetContentsBounds().bottom() - views::kButtonVEdgeMargin;
int x = kPanelHorizMargin;
for (size_t i = 0; i < arraysize(buttons); ++i) {
diff --git a/chrome/browser/ui/views/options/simple_content_exceptions_view.cc b/chrome/browser/ui/views/options/simple_content_exceptions_view.cc
index 68c0d3f..607bfde 100644
--- a/chrome/browser/ui/views/options/simple_content_exceptions_view.cc
+++ b/chrome/browser/ui/views/options/simple_content_exceptions_view.cc
@@ -70,7 +70,7 @@ void SimpleContentExceptionsView::Layout() {
// The buttons are placed in the parent, but we need to lay them out.
int max_y =
- GetParent()->GetLocalBounds().bottom() - views::kButtonVEdgeMargin;
+ GetParent()->GetContentsBounds().bottom() - views::kButtonVEdgeMargin;
int x = kPanelHorizMargin;
for (size_t i = 0; i < arraysize(buttons); ++i) {
diff --git a/chrome/browser/ui/views/status_bubble_views.cc b/chrome/browser/ui/views/status_bubble_views.cc
index a0eb68d..022ea11 100644
--- a/chrome/browser/ui/views/status_bubble_views.cc
+++ b/chrome/browser/ui/views/status_bubble_views.cc
@@ -707,7 +707,7 @@ void StatusBubbleViews::AvoidMouse(const gfx::Point& location) {
gfx::Point top_left;
views::View::ConvertPointToScreen(base_view_, &top_left);
// Border included.
- int window_width = base_view_->GetContentsBounds().width();
+ int window_width = base_view_->GetLocalBounds().width();
// Get the cursor position relative to the popup.
gfx::Point relative_location = location;
diff --git a/chrome/browser/ui/views/tabs/dragged_tab_controller.cc b/chrome/browser/ui/views/tabs/dragged_tab_controller.cc
index 58f10e1c..4a8f158 100644
--- a/chrome/browser/ui/views/tabs/dragged_tab_controller.cc
+++ b/chrome/browser/ui/views/tabs/dragged_tab_controller.cc
@@ -1268,7 +1268,7 @@ gfx::Point DraggedTabController::GetCursorScreenPoint() const {
gfx::Rect DraggedTabController::GetViewScreenBounds(views::View* view) const {
gfx::Point view_topleft;
views::View::ConvertPointToScreen(view, &view_topleft);
- gfx::Rect view_screen_bounds = view->GetContentsBounds();
+ gfx::Rect view_screen_bounds = view->GetLocalBounds();
view_screen_bounds.Offset(view_topleft.x(), view_topleft.y());
return view_screen_bounds;
}
diff --git a/chrome/browser/ui/views/tabs/side_tab_strip.cc b/chrome/browser/ui/views/tabs/side_tab_strip.cc
index b831cba..847d329 100644
--- a/chrome/browser/ui/views/tabs/side_tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/side_tab_strip.cc
@@ -155,7 +155,7 @@ BaseTab* SideTabStrip::CreateTab() {
}
void SideTabStrip::GenerateIdealBounds() {
- gfx::Rect layout_rect = GetLocalBounds();
+ gfx::Rect layout_rect = GetContentsBounds();
layout_rect.Inset(kTabStripInset, kTabStripInset);
int y = layout_rect.y();
diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc
index 6805bf7..8230b89 100644
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -212,7 +212,7 @@ void Tab::Paint(gfx::Canvas* canvas) {
}
void Tab::Layout() {
- gfx::Rect lb = GetLocalBounds();
+ gfx::Rect lb = GetContentsBounds();
if (lb.IsEmpty())
return;
lb.Inset(kLeftPadding, kTopPadding, kRightPadding, kBottomPadding);
diff --git a/chrome/browser/ui/views/task_manager_view.cc b/chrome/browser/ui/views/task_manager_view.cc
index 104dee4..1e2339a 100644
--- a/chrome/browser/ui/views/task_manager_view.cc
+++ b/chrome/browser/ui/views/task_manager_view.cc
@@ -518,7 +518,7 @@ void TaskManagerView::Layout() {
height() - 2 * kPanelVertMargin - prefered_height);
// y-coordinate of button top left.
- gfx::Rect parent_bounds = GetParent()->GetLocalBounds();
+ gfx::Rect parent_bounds = GetParent()->GetContentsBounds();
int y_buttons =
parent_bounds.bottom() - prefered_height - views::kButtonVEdgeMargin;
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 6c5f61c..0f32820 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -3931,11 +3931,11 @@
'../google_update/google_update.gyp:google_update',
'../third_party/iaccessible2/iaccessible2.gyp:iaccessible2',
'../third_party/isimpledom/isimpledom.gyp:isimpledom',
- '../views/views.gyp:views',
+ '../views/views.gyp:*',
'../rlz/rlz.gyp:rlz_lib',
],
'export_dependent_settings': [
- '../views/views.gyp:views',
+ '../views/views.gyp:*',
],
'direct_dependent_settings': {
'link_settings': {
@@ -3986,7 +3986,7 @@
'conditions': [
['OS=="linux" and toolkit_views==1',{
'dependencies': [
- '../views/views.gyp:views',
+ '../views/views.gyp:*',
],
'include_dirs': [
'<(INTERMEDIATE_DIR)',
diff --git a/views/controls/button/button_dropdown.cc b/views/controls/button/button_dropdown.cc
index 8d3ce74..16f424f 100644
--- a/views/controls/button/button_dropdown.cc
+++ b/views/controls/button/button_dropdown.cc
@@ -129,7 +129,7 @@ bool ButtonDropDown::ShouldEnterPushedState(const MouseEvent& e) {
void ButtonDropDown::ShowDropDownMenu(gfx::NativeView window) {
if (model_) {
- gfx::Rect lb = GetContentsBounds();
+ gfx::Rect lb = GetLocalBounds();
// Both the menu position and the menu anchor type change if the UI layout
// is right-to-left.
diff --git a/views/controls/button/checkbox.cc b/views/controls/button/checkbox.cc
index 36825b9..b89058f 100644
--- a/views/controls/button/checkbox.cc
+++ b/views/controls/button/checkbox.cc
@@ -127,7 +127,7 @@ View* Checkbox::GetViewForPoint(const gfx::Point& point) {
View* Checkbox::GetViewForPoint(const gfx::Point& point,
bool can_create_floating) {
- return GetContentsBounds().Contains(point) ? this : NULL;
+ return GetLocalBounds().Contains(point) ? this : NULL;
}
void Checkbox::OnMouseEntered(const MouseEvent& e) {
diff --git a/views/controls/button/menu_button.cc b/views/controls/button/menu_button.cc
index ae34749..5d08fa0 100644
--- a/views/controls/button/menu_button.cc
+++ b/views/controls/button/menu_button.cc
@@ -126,7 +126,7 @@ bool MenuButton::Activate() {
// after the menu closes.
PaintNow();
if (menu_delegate_) {
- gfx::Rect lb = GetContentsBounds();
+ gfx::Rect lb = GetLocalBounds();
// The position of the menu depends on whether or not the locale is
// right-to-left.
diff --git a/views/controls/label_unittest.cc b/views/controls/label_unittest.cc
index d556512..6d2ba91 100644
--- a/views/controls/label_unittest.cc
+++ b/views/controls/label_unittest.cc
@@ -208,12 +208,12 @@ TEST(LabelTest, MultiLineSizing) {
// SizeToFit with unlimited width.
label.SizeToFit(0);
- int required_width = label.GetContentsBounds().width();
+ int required_width = label.GetLocalBounds().width();
EXPECT_GT(required_width, kMinTextDimension);
// SizeToFit with limited width.
label.SizeToFit(required_width - 1);
- int constrained_width = label.GetContentsBounds().width();
+ int constrained_width = label.GetLocalBounds().width();
#if defined(OS_WIN)
// Canvas::SizeStringInt (in app/gfx/canvas_linux.cc)
// has to be fixed to return the size that fits to given width/height.
@@ -223,7 +223,7 @@ TEST(LabelTest, MultiLineSizing) {
// Change the width back to the desire width.
label.SizeToFit(required_width);
- EXPECT_EQ(required_width, label.GetContentsBounds().width());
+ EXPECT_EQ(required_width, label.GetLocalBounds().width());
// General tests for GetHeightForWidth.
int required_height = label.GetHeightForWidth(required_width);
diff --git a/views/controls/native/native_view_host.cc b/views/controls/native/native_view_host.cc
index 2ccd207..b443ac9 100644
--- a/views/controls/native/native_view_host.cc
+++ b/views/controls/native/native_view_host.cc
@@ -121,7 +121,7 @@ void NativeViewHost::Layout() {
gfx::Insets insets = GetInsets();
gfx::Point top_left(insets.left(), insets.top());
ConvertPointToWidget(this, &top_left);
- gfx::Rect local_bounds = GetLocalBounds();
+ gfx::Rect local_bounds = GetContentsBounds();
native_wrapper_->ShowWidget(top_left.x(), top_left.y(),
local_bounds.width(),
local_bounds.height());
diff --git a/views/controls/scroll_view.cc b/views/controls/scroll_view.cc
index ecaf3e2..79183da 100644
--- a/views/controls/scroll_view.cc
+++ b/views/controls/scroll_view.cc
@@ -147,7 +147,7 @@ void ScrollView::Layout() {
// override this default behavior, the inner view has to calculate the
// available space, used ComputeScrollBarsVisibility() to use the same
// calculation that is done here and sets its bound to fit within.
- gfx::Rect viewport_bounds = GetContentsBounds();
+ gfx::Rect viewport_bounds = GetLocalBounds();
// Realign it to 0 so it can be used as-is for SetBounds().
viewport_bounds.set_origin(gfx::Point(0, 0));
// viewport_size is the total client space available.
diff --git a/views/controls/scrollbar/native_scroll_bar_gtk.cc b/views/controls/scrollbar/native_scroll_bar_gtk.cc
index 4a57779a..73bb109 100644
--- a/views/controls/scrollbar/native_scroll_bar_gtk.cc
+++ b/views/controls/scrollbar/native_scroll_bar_gtk.cc
@@ -28,7 +28,7 @@ NativeScrollBarGtk::~NativeScrollBarGtk() {
// NativeScrollBarGtk, View overrides:
void NativeScrollBarGtk::Layout() {
- SetBoundsRect(native_scroll_bar_->GetContentsBounds());
+ SetBoundsRect(native_scroll_bar_->GetLocalBounds());
NativeControlGtk::Layout();
}
diff --git a/views/controls/scrollbar/native_scroll_bar_win.cc b/views/controls/scrollbar/native_scroll_bar_win.cc
index 70cf432..44d8bf6 100644
--- a/views/controls/scrollbar/native_scroll_bar_win.cc
+++ b/views/controls/scrollbar/native_scroll_bar_win.cc
@@ -216,7 +216,7 @@ NativeScrollBarWin::~NativeScrollBarWin() {
// NativeScrollBarWin, View overrides:
void NativeScrollBarWin::Layout() {
- SetBoundsRect(native_scroll_bar_->GetContentsBounds());
+ SetBoundsRect(native_scroll_bar_->GetLocalBounds());
NativeControlWin::Layout();
}
diff --git a/views/controls/slider/slider.cc b/views/controls/slider/slider.cc
index 66615fd..e4a3a76 100644
--- a/views/controls/slider/slider.cc
+++ b/views/controls/slider/slider.cc
@@ -57,7 +57,7 @@ void Slider::SetValue(double value) {
void Slider::Layout() {
if (native_wrapper_) {
- native_wrapper_->GetView()->SetBoundsRect(GetContentsBounds());
+ native_wrapper_->GetView()->SetBoundsRect(GetLocalBounds());
native_wrapper_->GetView()->Layout();
}
}
diff --git a/views/controls/tabbed_pane/native_tabbed_pane_win.cc b/views/controls/tabbed_pane/native_tabbed_pane_win.cc
index 1b64f61..c727437 100644
--- a/views/controls/tabbed_pane/native_tabbed_pane_win.cc
+++ b/views/controls/tabbed_pane/native_tabbed_pane_win.cc
@@ -57,7 +57,7 @@ class TabLayout : public LayoutManager {
View* child = host->GetChildViewAt(i);
// The child might not have been laid out yet.
if (child == page)
- child->SetBoundsRect(host->GetLocalBounds());
+ child->SetBoundsRect(host->GetContentsBounds());
child->SetVisible(child == page);
}
@@ -72,7 +72,7 @@ class TabLayout : public LayoutManager {
private:
// LayoutManager overrides:
virtual void Layout(View* host) {
- gfx::Rect bounds(host->GetLocalBounds());
+ gfx::Rect bounds(host->GetContentsBounds());
for (int i = 0; i < host->GetChildViewCount(); ++i) {
View* child = host->GetChildViewAt(i);
// We only layout visible children, since it may be expensive.
diff --git a/views/controls/textfield/textfield.cc b/views/controls/textfield/textfield.cc
index 09ac2f7..1b4461c 100644
--- a/views/controls/textfield/textfield.cc
+++ b/views/controls/textfield/textfield.cc
@@ -284,7 +284,7 @@ size_t Textfield::GetCursorPosition() const {
void Textfield::Layout() {
if (native_wrapper_) {
- native_wrapper_->GetView()->SetBoundsRect(GetContentsBounds());
+ native_wrapper_->GetView()->SetBoundsRect(GetLocalBounds());
native_wrapper_->GetView()->Layout();
}
}
diff --git a/views/mouse_watcher.cc b/views/mouse_watcher.cc
index b4c76d8..c535f14 100644
--- a/views/mouse_watcher.cc
+++ b/views/mouse_watcher.cc
@@ -80,7 +80,7 @@ class MouseWatcher::Observer : public MessageLoopForUI::Observer {
// Returns whether or not the cursor is currently in the view's "zone" which
// is defined as a slightly larger region than the view.
bool IsCursorInViewZone() {
- gfx::Rect bounds = view()->GetContentsBounds();
+ gfx::Rect bounds = view()->GetLocalBounds();
gfx::Point view_topleft(bounds.origin());
View::ConvertPointToScreen(view(), &view_topleft);
bounds.set_origin(view_topleft);
diff --git a/views/view.cc b/views/view.cc
index a2e883c..0770aafe 100644
--- a/views/view.cc
+++ b/views/view.cc
@@ -575,7 +575,7 @@ void View::SchedulePaint(const gfx::Rect& r, bool urgent) {
}
void View::SchedulePaint() {
- SchedulePaint(GetContentsBounds(), false);
+ SchedulePaint(GetLocalBounds(), false);
}
void View::Paint(gfx::Canvas* canvas) {
diff --git a/views/widget/root_view.cc b/views/widget/root_view.cc
index 68f1639..e6c11b1 100644
--- a/views/widget/root_view.cc
+++ b/views/widget/root_view.cc
@@ -243,7 +243,7 @@ gfx::Rect RootView::GetScheduledPaintRectConstrainedToSize() {
if (invalid_rect_.IsEmpty())
return invalid_rect_;
- return invalid_rect_.Intersect(GetContentsBounds());
+ return invalid_rect_.Intersect(GetLocalBounds());
}
/////////////////////////////////////////////////////////////////////////////
diff --git a/views/window/dialog_client_view.cc b/views/window/dialog_client_view.cc
index 86b3d01..a7f9078 100644
--- a/views/window/dialog_client_view.cc
+++ b/views/window/dialog_client_view.cc
@@ -434,7 +434,7 @@ void DialogClientView::PaintSizeBox(gfx::Canvas* canvas) {
// a theme-supplied gripper. We should probably improvise
// something, which would also require changing |gripper_size|
// to have different default values, too...
- size_box_bounds_ = GetLocalBounds();
+ size_box_bounds_ = GetContentsBounds();
size_box_bounds_.set_x(size_box_bounds_.right() - gripper_size.cx);
size_box_bounds_.set_y(size_box_bounds_.bottom() - gripper_size.cy);
RECT native_bounds = size_box_bounds_.ToRECT();