Commit 36e326fd authored by Tetsui Ohkubo's avatar Tetsui Ohkubo Committed by Commit Bot

Fix TrayBubbleView mask layer DCHECK.

A mask layer should always have the same bounds as its parent's.
TrayBubbleView sets a mask layer to layer()->parent(), but used
the bounds of layer() for its mask layer. It caused DCHECK.

Previously, https://crrev.com/c/663422 tried to fix this by using
GetBubbleBounds(), but it still doesn't return the correct bounds in
some cases e.g. |corner_radius| and |has_shadow| = false are set.

TEST=TrayEventFilterTest
BUG=847104,764428

Change-Id: I677a0df7fc5342e7f722c97c30fc0b87f25b23f4
Reviewed-on: https://chromium-review.googlesource.com/1084530Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: Tetsui Ohkubo <tetsui@chromium.org>
Cr-Commit-Position: refs/heads/master@{#564738}
parent 31af26ea
......@@ -274,7 +274,6 @@ void TrayBubbleView::InitializeAndShowBubble() {
void TrayBubbleView::UpdateBubble() {
if (GetWidget()) {
SizeToContents();
bubble_content_mask_->layer()->SetBounds(GetBubbleBounds());
GetWidget()->GetRootView()->SchedulePaint();
// When extra keyboard accessibility is enabled, focus the default item if
......@@ -326,7 +325,7 @@ ax::mojom::Role TrayBubbleView::GetAccessibleWindowRole() const {
void TrayBubbleView::SizeToContents() {
BubbleDialogDelegateView::SizeToContents();
bubble_content_mask_->layer()->SetBounds(GetBubbleBounds());
bubble_content_mask_->layer()->SetBounds(layer()->parent()->bounds());
}
void TrayBubbleView::OnBeforeBubbleWidgetInit(Widget::InitParams* params,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment