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