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

Unified Diff: ui/native_theme/native_theme_aura.cc

Issue 2473163002: Fix tests to ship Aura overlay scrollbars for ChromeOS (Closed)
Patch Set: Flag Off - Removed DCHECKs in painting - Should pass all tests 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
« no previous file with comments | « third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/native_theme/native_theme_aura.cc
diff --git a/ui/native_theme/native_theme_aura.cc b/ui/native_theme/native_theme_aura.cc
index dc7166e6c491181340db32218f2f768dc48c7bab..144bc98a22f32ac5dc15dec0fdda553dfeb8e1bd 100644
--- a/ui/native_theme/native_theme_aura.cc
+++ b/ui/native_theme/native_theme_aura.cc
@@ -174,7 +174,10 @@ void NativeThemeAura::PaintScrollbarTrack(
const ScrollbarTrackExtraParams& extra_params,
const gfx::Rect& rect) const {
// Overlay Scrollbar should never paint a scrollbar track.
- DCHECK(!IsOverlayScrollbarEnabled());
+ // TODO(bokan/estade): Overlay scrollbars shouldn't be painting a scroll
+ // corner but Views code currently is unaware of Overlays. crbug.com/657159.
Evan Stade 2016/11/05 01:13:09 I don't think this is right. Native scrollbars sho
+ if (IsOverlayScrollbarEnabled())
+ return;
SkPaint paint;
paint.setColor(kTrackColor);
canvas->drawIRect(gfx::RectToSkIRect(rect), paint);
@@ -237,7 +240,10 @@ void NativeThemeAura::PaintScrollbarCorner(SkCanvas* canvas,
State state,
const gfx::Rect& rect) const {
// Overlay Scrollbar should never paint a scrollbar corner.
- DCHECK(!IsOverlayScrollbarEnabled());
+ // TODO(bokan/estade): Overlay scrollbars shouldn't be painting a scroll
+ // corner but Views code currently is unaware of Overlays. crbug.com/657159.
+ if (IsOverlayScrollbarEnabled())
+ return;
SkPaint paint;
paint.setColor(SkColorSetRGB(0xDC, 0xDC, 0xDC));
canvas->drawIRect(RectToSkIRect(rect), paint);
« no previous file with comments | « third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698