diff options
author | estade <estade@chromium.org> | 2016-03-07 12:03:02 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-07 20:07:37 +0000 |
commit | 122489a4d392a61928ff9498aefa05fbe20b176f (patch) | |
tree | 81008effd696da2ea6817c2349e05fd9167e8916 /ash | |
parent | b893546e827452182fb06264641359965cdcd340 (diff) | |
download | chromium_src-122489a4d392a61928ff9498aefa05fbe20b176f.zip chromium_src-122489a4d392a61928ff9498aefa05fbe20b176f.tar.gz chromium_src-122489a4d392a61928ff9498aefa05fbe20b176f.tar.bz2 |
Fix misuses of View::SetFillsBoundsOpaquely and remove the API to make
layers less likely to be misused in the same way in the future.
Also fix some unnecessary calls to aura::Window::SetTransparent().
BUG=none
TBR=avi@chromium.org
Review URL: https://codereview.chromium.org/1732173002
Cr-Commit-Position: refs/heads/master@{#379619}
Diffstat (limited to 'ash')
-rw-r--r-- | ash/frame/custom_frame_view_ash.cc | 2 | ||||
-rw-r--r-- | ash/shelf/overflow_bubble_view.cc | 2 | ||||
-rw-r--r-- | ash/shelf/shelf_button.cc | 2 | ||||
-rw-r--r-- | ash/system/status_area_widget_delegate.cc | 2 | ||||
-rw-r--r-- | ash/system/tray/tray_background_view.cc | 2 | ||||
-rw-r--r-- | ash/system/tray/tray_empty.cc | 2 | ||||
-rw-r--r-- | ash/system/tray/tray_item_view.cc | 2 | ||||
-rw-r--r-- | ash/system/tray/tray_popup_item_container.cc | 7 | ||||
-rw-r--r-- | ash/touch/touch_hud_debug.cc | 2 | ||||
-rw-r--r-- | ash/touch/touch_hud_projection.cc | 2 |
10 files changed, 13 insertions, 12 deletions
diff --git a/ash/frame/custom_frame_view_ash.cc b/ash/frame/custom_frame_view_ash.cc index 90d5c6a..a38845d 100644 --- a/ash/frame/custom_frame_view_ash.cc +++ b/ash/frame/custom_frame_view_ash.cc @@ -322,7 +322,7 @@ void CustomFrameViewAsh::HeaderView::OnMaximizeModeEnded() { void CustomFrameViewAsh::HeaderView::OnImmersiveRevealStarted() { fullscreen_visible_fraction_ = 0; SetPaintToLayer(true); - SetFillsBoundsOpaquely(false); + layer()->SetFillsBoundsOpaquely(false); parent()->Layout(); } diff --git a/ash/shelf/overflow_bubble_view.cc b/ash/shelf/overflow_bubble_view.cc index d982820..ff0f2c3 100644 --- a/ash/shelf/overflow_bubble_view.cc +++ b/ash/shelf/overflow_bubble_view.cc @@ -49,7 +49,7 @@ void OverflowBubbleView::InitOverflowBubble(views::View* anchor, // Makes bubble view has a layer and clip its children layers. SetPaintToLayer(true); - SetFillsBoundsOpaquely(false); + layer()->SetFillsBoundsOpaquely(false); layer()->SetMasksToBounds(true); shelf_view_ = shelf_view; diff --git a/ash/shelf/shelf_button.cc b/ash/shelf/shelf_button.cc index 43d98c5..5d44aa5 100644 --- a/ash/shelf/shelf_button.cc +++ b/ash/shelf/shelf_button.cc @@ -506,7 +506,7 @@ void ShelfButton::Init() { // TODO: refactor the layers so each button doesn't require 2. icon_view_->SetPaintToLayer(true); - icon_view_->SetFillsBoundsOpaquely(false); + icon_view_->layer()->SetFillsBoundsOpaquely(false); icon_view_->SetHorizontalAlignment(views::ImageView::CENTER); icon_view_->SetVerticalAlignment(views::ImageView::LEADING); diff --git a/ash/system/status_area_widget_delegate.cc b/ash/system/status_area_widget_delegate.cc index bf0dfc0..c58649b 100644 --- a/ash/system/status_area_widget_delegate.cc +++ b/ash/system/status_area_widget_delegate.cc @@ -55,7 +55,7 @@ StatusAreaWidgetDelegate::StatusAreaWidgetDelegate() // navigation completion by the user. set_allow_deactivate_on_esc(true); SetPaintToLayer(true); - SetFillsBoundsOpaquely(false); + layer()->SetFillsBoundsOpaquely(false); } StatusAreaWidgetDelegate::~StatusAreaWidgetDelegate() { diff --git a/ash/system/tray/tray_background_view.cc b/ash/system/tray/tray_background_view.cc index 936917e..0c125bf 100644 --- a/ash/system/tray/tray_background_view.cc +++ b/ash/system/tray/tray_background_view.cc @@ -247,7 +247,7 @@ TrayBackgroundView::TrayBackgroundView(StatusAreaWidget* status_area_widget) tray_event_filter_.reset(new TrayEventFilter); SetPaintToLayer(true); - SetFillsBoundsOpaquely(false); + layer()->SetFillsBoundsOpaquely(false); // Start the tray items not visible, because visibility changes are animated. views::View::SetVisible(false); } diff --git a/ash/system/tray/tray_empty.cc b/ash/system/tray/tray_empty.cc index 8216322..ceb2209 100644 --- a/ash/system/tray/tray_empty.cc +++ b/ash/system/tray/tray_empty.cc @@ -46,7 +46,7 @@ views::View* TrayEmpty::CreateDefaultView(user::LoginStatus status) { view->SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0)); view->SetPaintToLayer(true); - view->SetFillsBoundsOpaquely(false); + view->layer()->SetFillsBoundsOpaquely(false); return view; } diff --git a/ash/system/tray/tray_item_view.cc b/ash/system/tray/tray_item_view.cc index ea2262dd..b338358 100644 --- a/ash/system/tray/tray_item_view.cc +++ b/ash/system/tray/tray_item_view.cc @@ -30,7 +30,7 @@ TrayItemView::TrayItemView(SystemTrayItem* owner) label_(NULL), image_view_(NULL) { SetPaintToLayer(true); - SetFillsBoundsOpaquely(false); + layer()->SetFillsBoundsOpaquely(false); SetLayoutManager( new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0)); } diff --git a/ash/system/tray/tray_popup_item_container.cc b/ash/system/tray/tray_popup_item_container.cc index 9a21399..7fa3814 100644 --- a/ash/system/tray/tray_popup_item_container.cc +++ b/ash/system/tray/tray_popup_item_container.cc @@ -27,9 +27,10 @@ TrayPopupItemContainer::TrayPopupItemContainer(views::View* view, views::BoxLayout::kVertical, 0, 0, 0); layout->SetDefaultFlex(1); SetLayoutManager(layout); - SetPaintToLayer(view->layer() != NULL); - if (view->layer()) - SetFillsBoundsOpaquely(view->layer()->fills_bounds_opaquely()); + if (view->layer()) { + SetPaintToLayer(true); + layer()->SetFillsBoundsOpaquely(view->layer()->fills_bounds_opaquely()); + } AddChildView(view); SetVisible(view->visible()); } diff --git a/ash/touch/touch_hud_debug.cc b/ash/touch/touch_hud_debug.cc index 099233b..68441382 100644 --- a/ash/touch/touch_hud_debug.cc +++ b/ash/touch/touch_hud_debug.cc @@ -242,7 +242,7 @@ class TouchHudCanvas : public views::View { : touch_log_(touch_log), scale_(1) { SetPaintToLayer(true); - SetFillsBoundsOpaquely(false); + layer()->SetFillsBoundsOpaquely(false); paint_.setStyle(SkPaint::kFill_Style); } diff --git a/ash/touch/touch_hud_projection.cc b/ash/touch/touch_hud_projection.cc index 30312af..af38df2 100644 --- a/ash/touch/touch_hud_projection.cc +++ b/ash/touch/touch_hud_projection.cc @@ -36,7 +36,7 @@ class TouchPointView : public views::View, gradient_center_(SkPoint::Make(kPointRadius + 1, kPointRadius + 1)) { SetPaintToLayer(true); - SetFillsBoundsOpaquely(false); + layer()->SetFillsBoundsOpaquely(false); SetSize(gfx::Size(2 * kPointRadius + 2, 2 * kPointRadius + 2)); |