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

Unified Diff: chrome/browser/ui/views/frame/opaque_browser_frame_view.cc

Issue 2741603002: Fix opaque frame popup titlebar not being painted. (Closed)
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
index a9692e2119cfb976d2cea5a1a40d3a214d806fc1..52ac32e857887fcffa686367791d89bfb0a30b3e 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
@@ -510,7 +510,9 @@ bool OpaqueBrowserFrameView::ShouldShowWindowTitleBar() const {
int OpaqueBrowserFrameView::GetTopAreaHeight() const {
const gfx::ImageSkia frame_image = GetFrameImage();
- int top_area_height = frame_image.height(); // Returns 0 if isNull().
+ int top_area_height = frame_image.isNull()
+ ? layout_->NonClientTopHeight(false)
Bret 2017/03/09 01:18:26 this "false" is "calculate for restored"... it loo
Peter Kasting 2017/03/09 05:27:06 I think maybe this should be std::max(frame_image.
Bret 2017/03/09 21:47:49 You're right, that's probably safer. Done.
+ : frame_image.height();
if (browser_view()->IsTabStripVisible()) {
top_area_height =
std::max(top_area_height,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698