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

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

Issue 2163113002: Remove DebugRedFill (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ChunkId
Patch Set: Created 4 years, 5 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/fetch/MemoryCache.h" 8 #include "core/fetch/MemoryCache.h"
9 #include "core/frame/FrameView.h" 9 #include "core/frame/FrameView.h"
10 #include "core/inspector/InspectorInstrumentation.h" 10 #include "core/inspector/InspectorInstrumentation.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 91 }
92 } 92 }
93 93
94 void FramePainter::paintContents(GraphicsContext& context, const GlobalPaintFlag s globalPaintFlags, const IntRect& rect) 94 void FramePainter::paintContents(GraphicsContext& context, const GlobalPaintFlag s globalPaintFlags, const IntRect& rect)
95 { 95 {
96 Document* document = frameView().frame().document(); 96 Document* document = frameView().frame().document();
97 97
98 if (frameView().shouldThrottleRendering() || !document->isActive()) 98 if (frameView().shouldThrottleRendering() || !document->isActive())
99 return; 99 return;
100 100
101 #ifndef NDEBUG
102 bool fillWithRed;
103 if (document->printing())
104 fillWithRed = false; // Printing, don't fill with red (can't remember wh y).
105 else if (frameView().frame().owner())
106 fillWithRed = false; // Subframe, don't fill with red.
107 else if (frameView().isTransparent())
108 fillWithRed = false; // Transparent, don't fill with red.
109 else if (globalPaintFlags & GlobalPaintSelectionOnly)
110 fillWithRed = false; // Selections are transparent, don't fill with red.
111 else
112 fillWithRed = true;
113
114 if (fillWithRed && !LayoutObjectDrawingRecorder::useCachedDrawingIfPossible( context, *frameView().layoutView(), DisplayItem::DebugRedFill)) {
115 IntRect contentRect(IntPoint(), frameView().contentsSize());
116 LayoutObjectDrawingRecorder drawingRecorder(context, *frameView().layout View(), DisplayItem::DebugRedFill, contentRect);
117 }
118 #endif
119
120 LayoutView* layoutView = frameView().layoutView(); 101 LayoutView* layoutView = frameView().layoutView();
121 if (!layoutView) { 102 if (!layoutView) {
122 DLOG(ERROR) << "called FramePainter::paint with nil layoutObject"; 103 DLOG(ERROR) << "called FramePainter::paint with nil layoutObject";
123 return; 104 return;
124 } 105 }
125 106
126 frameView().checkDoesNotNeedLayout(); 107 frameView().checkDoesNotNeedLayout();
127 // TODO(wangxianzhu): The following check should be stricter, but currently this is blocked 108 // TODO(wangxianzhu): The following check should be stricter, but currently this is blocked
128 // by the svg root issue (crbug.com/442939). 109 // by the svg root issue (crbug.com/442939).
129 ASSERT(document->lifecycle().state() >= DocumentLifecycle::CompositingClean) ; 110 ASSERT(document->lifecycle().state() >= DocumentLifecycle::CompositingClean) ;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 bar.paint(context, CullRect(rect)); 194 bar.paint(context, CullRect(rect));
214 } 195 }
215 196
216 const FrameView& FramePainter::frameView() 197 const FrameView& FramePainter::frameView()
217 { 198 {
218 ASSERT(m_frameView); 199 ASSERT(m_frameView);
219 return *m_frameView; 200 return *m_frameView;
220 } 201 }
221 202
222 } // namespace blink 203 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698