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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
209 if (GetFrameView().LayerForScrollCorner() || | 209 if (GetFrameView().LayerForScrollCorner() || |
210 !GetFrameView().IsScrollCornerVisible()) { | 210 !GetFrameView().IsScrollCornerVisible()) { |
211 return; | 211 return; |
212 } | 212 } |
213 | 213 |
214 PaintScrollCorner(context, GetFrameView().ScrollCornerRect()); | 214 PaintScrollCorner(context, GetFrameView().ScrollCornerRect()); |
215 } | 215 } |
216 | 216 |
217 void FramePainter::PaintScrollCorner(GraphicsContext& context, | 217 void FramePainter::PaintScrollCorner(GraphicsContext& context, |
218 const IntRect& corner_rect) { | 218 const IntRect& corner_rect) { |
219 if (corner_rect.IsEmpty()) | |
cbiesinger
2017/05/05 18:20:01
This seems fine but why is that necessary as part
szager1
2017/05/08 16:27:06
This is a mistake, I had another CL to fix this is
| |
220 return; | |
221 | |
219 if (GetFrameView().ScrollCorner()) { | 222 if (GetFrameView().ScrollCorner()) { |
220 bool needs_background = GetFrameView().GetFrame().IsMainFrame(); | 223 bool needs_background = GetFrameView().GetFrame().IsMainFrame(); |
221 if (needs_background && | 224 if (needs_background && |
222 !LayoutObjectDrawingRecorder::UseCachedDrawingIfPossible( | 225 !LayoutObjectDrawingRecorder::UseCachedDrawingIfPossible( |
223 context, *GetFrameView().GetLayoutView(), | 226 context, *GetFrameView().GetLayoutView(), |
224 DisplayItem::kScrollbarCorner)) { | 227 DisplayItem::kScrollbarCorner)) { |
225 LayoutObjectDrawingRecorder drawing_recorder( | 228 LayoutObjectDrawingRecorder drawing_recorder( |
226 context, *GetFrameView().GetLayoutView(), | 229 context, *GetFrameView().GetLayoutView(), |
227 DisplayItem::kScrollbarCorner, FloatRect(corner_rect)); | 230 DisplayItem::kScrollbarCorner, FloatRect(corner_rect)); |
228 context.FillRect(corner_rect, GetFrameView().BaseBackgroundColor()); | 231 context.FillRect(corner_rect, GetFrameView().BaseBackgroundColor()); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
260 | 263 |
261 bar.Paint(context, CullRect(rect)); | 264 bar.Paint(context, CullRect(rect)); |
262 } | 265 } |
263 | 266 |
264 const FrameView& FramePainter::GetFrameView() { | 267 const FrameView& FramePainter::GetFrameView() { |
265 DCHECK(frame_view_); | 268 DCHECK(frame_view_); |
266 return *frame_view_; | 269 return *frame_view_; |
267 } | 270 } |
268 | 271 |
269 } // namespace blink | 272 } // namespace blink |
OLD | NEW |