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

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

Issue 1236183003: Add 'printing' flag to PaintInfo (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: PrintAdaption -> Printing; printing -> isPrinting; Comment fixups. Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/paint/EllipsisBoxPainter.cpp ('k') | Source/core/paint/ImagePainter.cpp » ('j') | 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 "config.h" 5 #include "config.h"
6 #include "core/paint/FramePainter.h" 6 #include "core/paint/FramePainter.h"
7 7
8 #include "core/dom/DocumentMarkerController.h" 8 #include "core/dom/DocumentMarkerController.h"
9 #include "core/fetch/MemoryCache.h" 9 #include "core/fetch/MemoryCache.h"
10 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 FontCachePurgePreventer fontCachePurgePreventer; 103 FontCachePurgePreventer fontCachePurgePreventer;
104 104
105 PaintBehavior oldPaintBehavior = m_frameView.paintBehavior(); 105 PaintBehavior oldPaintBehavior = m_frameView.paintBehavior();
106 106
107 if (FrameView* parentView = m_frameView.parentFrameView()) { 107 if (FrameView* parentView = m_frameView.parentFrameView()) {
108 if (parentView->paintBehavior() & PaintBehaviorFlattenCompositingLayers) 108 if (parentView->paintBehavior() & PaintBehaviorFlattenCompositingLayers)
109 m_frameView.setPaintBehavior(m_frameView.paintBehavior() | PaintBeha viorFlattenCompositingLayers); 109 m_frameView.setPaintBehavior(m_frameView.paintBehavior() | PaintBeha viorFlattenCompositingLayers);
110 } 110 }
111 111
112 if (document->printing()) 112 if (document->printing())
113 m_frameView.setPaintBehavior(m_frameView.paintBehavior() | PaintBehavior FlattenCompositingLayers); 113 m_frameView.setPaintBehavior(m_frameView.paintBehavior() | PaintBehavior FlattenCompositingLayers | PaintBehaviorPrinting);
114 114
115 ASSERT(!m_frameView.isPainting()); 115 ASSERT(!m_frameView.isPainting());
116 m_frameView.setIsPainting(true); 116 m_frameView.setIsPainting(true);
117 117
118 // m_frameView.nodeToDraw() is used to draw only one element (and its descen dants) 118 // m_frameView.nodeToDraw() is used to draw only one element (and its descen dants)
119 LayoutObject* layoutObject = m_frameView.nodeToDraw() ? m_frameView.nodeToDr aw()->layoutObject() : 0; 119 LayoutObject* layoutObject = m_frameView.nodeToDraw() ? m_frameView.nodeToDr aw()->layoutObject() : 0;
120 DeprecatedPaintLayer* rootLayer = layoutView->layer(); 120 DeprecatedPaintLayer* rootLayer = layoutView->layer();
121 121
122 #if ENABLE(ASSERT) 122 #if ENABLE(ASSERT)
123 layoutView->assertSubtreeIsLaidOut(); 123 layoutView->assertSubtreeIsLaidOut();
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 if (needsBackground) { 189 if (needsBackground) {
190 IntRect toFill = bar->frameRect(); 190 IntRect toFill = bar->frameRect();
191 toFill.intersect(rect); 191 toFill.intersect(rect);
192 context->fillRect(toFill, m_frameView.baseBackgroundColor()); 192 context->fillRect(toFill, m_frameView.baseBackgroundColor());
193 } 193 }
194 194
195 bar->paint(context, rect); 195 bar->paint(context, rect);
196 } 196 }
197 197
198 } // namespace blink 198 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/EllipsisBoxPainter.cpp ('k') | Source/core/paint/ImagePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698