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

Unified Diff: ash/common/system/web_notification/ash_popup_alignment_delegate.cc

Issue 2472233002: Fix a bug of PopupAlignmentDelegate on non-primary display (Closed)
Patch Set: Addressed comment: returning a rect instead of top Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: ash/common/system/web_notification/ash_popup_alignment_delegate.cc
diff --git a/ash/common/system/web_notification/ash_popup_alignment_delegate.cc b/ash/common/system/web_notification/ash_popup_alignment_delegate.cc
index d2ab95a41e7b44b239d21595832231590e27a730..200c806d3118ebf0caf42c79f9cb76add7690e88 100644
--- a/ash/common/system/web_notification/ash_popup_alignment_delegate.cc
+++ b/ash/common/system/web_notification/ash_popup_alignment_delegate.cc
@@ -90,8 +90,11 @@ int AshPopupAlignmentDelegate::GetBaseLine() const {
tray_bubble_height_;
}
-int AshPopupAlignmentDelegate::GetWorkAreaBottom() const {
- return work_area_.bottom() - tray_bubble_height_;
+gfx::Rect AshPopupAlignmentDelegate::GetWorkArea() const {
+ gfx::Rect work_area_without_tray_bubble = work_area_;
+ work_area_without_tray_bubble.set_height(
+ work_area_without_tray_bubble.height() - tray_bubble_height_);
+ return work_area_without_tray_bubble;
}
bool AshPopupAlignmentDelegate::IsTopDown() const {

Powered by Google App Engine
This is Rietveld 408576698