OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |