Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: ui/views/bubble/tray_bubble_view.cc

Issue 2908073003: Ensure that mask layer is of the same size as the owning layer. (Closed)
Patch Set: Compiling failure Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/bubble/tray_bubble_view.h" 5 #include "ui/views/bubble/tray_bubble_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "cc/paint/paint_flags.h" 10 #include "cc/paint/paint_flags.h"
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 } 376 }
377 377
378 void TrayBubbleView::ViewHierarchyChanged( 378 void TrayBubbleView::ViewHierarchyChanged(
379 const ViewHierarchyChangedDetails& details) { 379 const ViewHierarchyChangedDetails& details) {
380 if (details.is_add && details.child == this) { 380 if (details.is_add && details.child == this) {
381 details.parent->SetPaintToLayer(); 381 details.parent->SetPaintToLayer();
382 details.parent->layer()->SetMasksToBounds(true); 382 details.parent->layer()->SetMasksToBounds(true);
383 } 383 }
384 } 384 }
385 385
386 void TrayBubbleView::SizeToContents() {
James Cook 2017/06/13 20:43:45 nit: move this up to match new header order
sunxd 2017/06/13 22:13:46 Done.
387 GetWidget()->SetBounds(GetBubbleBounds());
James Cook 2017/06/13 20:43:46 This should call the base class, BubbleDialogDeleg
sunxd 2017/06/13 22:13:46 Done.
388 bubble_content_mask_->layer()->SetBounds(layer()->bounds());
389 }
390
386 } // namespace views 391 } // namespace views
OLDNEW
« ui/views/bubble/tray_bubble_view.h ('K') | « ui/views/bubble/tray_bubble_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698