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

Side by Side Diff: third_party/WebKit/Source/core/paint/FramePainter.cpp

Issue 2857333004: Don't paint empty scroll corner (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/FramePainter.h" 5 #include "core/paint/FramePainter.h"
6 6
7 #include "core/editing/markers/DocumentMarkerController.h" 7 #include "core/editing/markers/DocumentMarkerController.h"
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/inspector/InspectorTraceEvents.h" 9 #include "core/inspector/InspectorTraceEvents.h"
10 #include "core/layout/LayoutView.h" 10 #include "core/layout/LayoutView.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 199
200 void FramePainter::PaintScrollbars(GraphicsContext& context, 200 void FramePainter::PaintScrollbars(GraphicsContext& context,
201 const IntRect& rect) { 201 const IntRect& rect) {
202 if (GetFrameView().HorizontalScrollbar() && 202 if (GetFrameView().HorizontalScrollbar() &&
203 !GetFrameView().LayerForHorizontalScrollbar()) 203 !GetFrameView().LayerForHorizontalScrollbar())
204 PaintScrollbar(context, *GetFrameView().HorizontalScrollbar(), rect); 204 PaintScrollbar(context, *GetFrameView().HorizontalScrollbar(), rect);
205 if (GetFrameView().VerticalScrollbar() && 205 if (GetFrameView().VerticalScrollbar() &&
206 !GetFrameView().LayerForVerticalScrollbar()) 206 !GetFrameView().LayerForVerticalScrollbar())
207 PaintScrollbar(context, *GetFrameView().VerticalScrollbar(), rect); 207 PaintScrollbar(context, *GetFrameView().VerticalScrollbar(), rect);
208 208
209 if (GetFrameView().LayerForScrollCorner()) 209 if (GetFrameView().LayerForScrollCorner() ||
210 !GetFrameView().IsScrollCornerVisible()) {
210 return; 211 return;
212 }
211 213
212 PaintScrollCorner(context, GetFrameView().ScrollCornerRect()); 214 PaintScrollCorner(context, GetFrameView().ScrollCornerRect());
213 } 215 }
214 216
215 void FramePainter::PaintScrollCorner(GraphicsContext& context, 217 void FramePainter::PaintScrollCorner(GraphicsContext& context,
216 const IntRect& corner_rect) { 218 const IntRect& corner_rect) {
217 if (GetFrameView().ScrollCorner()) { 219 if (GetFrameView().ScrollCorner()) {
218 bool needs_background = GetFrameView().GetFrame().IsMainFrame(); 220 bool needs_background = GetFrameView().GetFrame().IsMainFrame();
219 if (needs_background && 221 if (needs_background &&
220 !LayoutObjectDrawingRecorder::UseCachedDrawingIfPossible( 222 !LayoutObjectDrawingRecorder::UseCachedDrawingIfPossible(
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 260
259 bar.Paint(context, CullRect(rect)); 261 bar.Paint(context, CullRect(rect));
260 } 262 }
261 263
262 const FrameView& FramePainter::GetFrameView() { 264 const FrameView& FramePainter::GetFrameView() {
263 DCHECK(frame_view_); 265 DCHECK(frame_view_);
264 return *frame_view_; 266 return *frame_view_;
265 } 267 }
266 268
267 } // namespace blink 269 } // namespace blink
OLDNEW
« 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