Commit 95c86a6c authored by Tom Anderson's avatar Tom Anderson Committed by Commit Bot

Fix DCHECK when entering fullscreen on Linux with the GTK theme

Also fixes a logic error in opaque_browser_frame_view_layout.cc introduced by
e831694a.

BUG=882854,887598
R=pkasting
CC=​iclelland

Change-Id: I5b1b6eb4d737ecbed3102d046b06cacdef7cddaa
Reviewed-on: https://chromium-review.googlesource.com/1236267
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Reviewed-by: default avatarIan Clelland <iclelland@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593041}
parent 1688203b
......@@ -210,6 +210,9 @@ class NavButtonImageSource : public gfx::ImageSkiaSource {
// RenderNavButton() is called at most once for each needed scale
// factor. Additionally, buttons in the HOVERED or PRESSED states
// are not actually rendered until they are needed.
if (button_size_.IsEmpty())
return gfx::ImageSkiaRep();
auto button_context = AppendCssNodeToStyleContext(
CreateHeaderContext(maximized_), "GtkButton#button.titlebutton");
gtk_style_context_add_class(button_context,
......
......@@ -191,7 +191,7 @@ int OpaqueBrowserFrameViewLayout::NonClientTopHeight(bool restored) const {
int OpaqueBrowserFrameViewLayout::GetTabStripInsetsTop(bool restored) const {
const int top = NonClientTopHeight(restored);
return !restored || !delegate_->IsFrameCondensed()
return !restored && delegate_->IsFrameCondensed()
? top
: (top + GetNonClientRestoredExtraThickness());
}
......
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