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

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

Issue 2653963002: [Experimental] Supporting OOPIF printing
Patch Set: Rename service, fix for webview, and connect to DiscardableMemoryManager Created 3 years, 8 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
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/InspectorInstrumentation.h" 9 #include "core/inspector/InspectorInstrumentation.h"
10 #include "core/inspector/InspectorTraceEvents.h" 10 #include "core/inspector/InspectorTraceEvents.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 } 109 }
110 } 110 }
111 111
112 TransformRecorder transformRecorder( 112 TransformRecorder transformRecorder(
113 context, *frameView().layoutView(), 113 context, *frameView().layoutView(),
114 AffineTransform::translation(frameView().x(), frameView().y())); 114 AffineTransform::translation(frameView().x(), frameView().y()));
115 115
116 ClipRecorder recorder( 116 ClipRecorder recorder(
117 context, *frameView().layoutView(), DisplayItem::kClipFrameScrollbars, 117 context, *frameView().layoutView(), DisplayItem::kClipFrameScrollbars,
118 IntRect(IntPoint(), visibleAreaWithScrollbars.size())); 118 IntRect(IntPoint(), visibleAreaWithScrollbars.size()));
119
120 paintScrollbars(context, scrollViewDirtyRect); 119 paintScrollbars(context, scrollViewDirtyRect);
121 } 120 }
122 } 121 }
123 122
124 void FramePainter::paintContents(GraphicsContext& context, 123 void FramePainter::paintContents(GraphicsContext& context,
125 const GlobalPaintFlags globalPaintFlags, 124 const GlobalPaintFlags globalPaintFlags,
126 const IntRect& rect) { 125 const IntRect& rect) {
127 Document* document = frameView().frame().document(); 126 Document* document = frameView().frame().document();
128 127
129 if (frameView().shouldThrottleRendering() || !document->isActive()) 128 if (frameView().shouldThrottleRendering() || !document->isActive())
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 s_inPaintContents = false; 190 s_inPaintContents = false;
192 } 191 }
193 192
194 InspectorInstrumentation::didPaint(layoutView->frame(), 0, context, 193 InspectorInstrumentation::didPaint(layoutView->frame(), 0, context,
195 LayoutRect(rect)); 194 LayoutRect(rect));
196 } 195 }
197 196
198 void FramePainter::paintScrollbars(GraphicsContext& context, 197 void FramePainter::paintScrollbars(GraphicsContext& context,
199 const IntRect& rect) { 198 const IntRect& rect) {
200 if (frameView().horizontalScrollbar() && 199 if (frameView().horizontalScrollbar() &&
201 !frameView().layerForHorizontalScrollbar()) 200 (frameView().frame().document()->printing() ||
201 !frameView().layerForHorizontalScrollbar()))
202 paintScrollbar(context, *frameView().horizontalScrollbar(), rect); 202 paintScrollbar(context, *frameView().horizontalScrollbar(), rect);
203 if (frameView().verticalScrollbar() && 203 if (frameView().verticalScrollbar() &&
204 !frameView().layerForVerticalScrollbar()) 204 (frameView().frame().document()->printing() ||
205 !frameView().layerForVerticalScrollbar()))
205 paintScrollbar(context, *frameView().verticalScrollbar(), rect); 206 paintScrollbar(context, *frameView().verticalScrollbar(), rect);
206 207
207 if (frameView().layerForScrollCorner()) 208 if (frameView().layerForScrollCorner())
208 return; 209 return;
209 210
210 paintScrollCorner(context, frameView().scrollCornerRect()); 211 paintScrollCorner(context, frameView().scrollCornerRect());
211 } 212 }
212 213
213 void FramePainter::paintScrollCorner(GraphicsContext& context, 214 void FramePainter::paintScrollCorner(GraphicsContext& context,
214 const IntRect& cornerRect) { 215 const IntRect& cornerRect) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 247
247 bar.paint(context, CullRect(rect)); 248 bar.paint(context, CullRect(rect));
248 } 249 }
249 250
250 const FrameView& FramePainter::frameView() { 251 const FrameView& FramePainter::frameView() {
251 DCHECK(m_frameView); 252 DCHECK(m_frameView);
252 return *m_frameView; 253 return *m_frameView;
253 } 254 }
254 255
255 } // namespace blink 256 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/BUILD.gn ('k') | third_party/WebKit/Source/core/paint/RemoteFramePainter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698