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

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

Issue 899163003: Move rendering/RenderObject to layout/LayoutObject. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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/FloatClipRecorder.h ('k') | Source/core/paint/FrameSetPainter.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/frame/FrameView.h" 9 #include "core/frame/FrameView.h"
10 #include "core/inspector/InspectorInstrumentation.h" 10 #include "core/inspector/InspectorInstrumentation.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 if (m_frameView.paintBehavior() == PaintBehaviorNormal) 122 if (m_frameView.paintBehavior() == PaintBehaviorNormal)
123 document->markers().invalidateRenderedRectsForMarkersInRect(rect); 123 document->markers().invalidateRenderedRectsForMarkersInRect(rect);
124 124
125 if (document->printing()) 125 if (document->printing())
126 m_frameView.setPaintBehavior(m_frameView.paintBehavior() | PaintBehavior FlattenCompositingLayers); 126 m_frameView.setPaintBehavior(m_frameView.paintBehavior() | PaintBehavior FlattenCompositingLayers);
127 127
128 ASSERT(!m_frameView.isPainting()); 128 ASSERT(!m_frameView.isPainting());
129 m_frameView.setIsPainting(true); 129 m_frameView.setIsPainting(true);
130 130
131 // m_frameView.nodeToDraw() is used to draw only one element (and its descen dants) 131 // m_frameView.nodeToDraw() is used to draw only one element (and its descen dants)
132 RenderObject* renderer = m_frameView.nodeToDraw() ? m_frameView.nodeToDraw() ->renderer() : 0; 132 LayoutObject* renderer = m_frameView.nodeToDraw() ? m_frameView.nodeToDraw() ->renderer() : 0;
133 Layer* rootLayer = renderView->layer(); 133 Layer* rootLayer = renderView->layer();
134 134
135 #if ENABLE(ASSERT) 135 #if ENABLE(ASSERT)
136 renderView->assertSubtreeIsLaidOut(); 136 renderView->assertSubtreeIsLaidOut();
137 RenderObject::SetLayoutNeededForbiddenScope forbidSetNeedsLayout(*rootLayer- >renderer()); 137 LayoutObject::SetLayoutNeededForbiddenScope forbidSetNeedsLayout(*rootLayer- >renderer());
138 #endif 138 #endif
139 139
140 LayerPainter layerPainter(*rootLayer); 140 LayerPainter layerPainter(*rootLayer);
141 141
142 float deviceScaleFactor = blink::deviceScaleFactor(rootLayer->renderer()->fr ame()); 142 float deviceScaleFactor = blink::deviceScaleFactor(rootLayer->renderer()->fr ame());
143 context->setDeviceScaleFactor(deviceScaleFactor); 143 context->setDeviceScaleFactor(deviceScaleFactor);
144 144
145 layerPainter.paint(context, rect, m_frameView.paintBehavior(), renderer); 145 layerPainter.paint(context, rect, m_frameView.paintBehavior(), renderer);
146 146
147 if (rootLayer->containsDirtyOverlayScrollbars()) 147 if (rootLayer->containsDirtyOverlayScrollbars())
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 { 230 {
231 IntRect horizontalOverhangRect; 231 IntRect horizontalOverhangRect;
232 IntRect verticalOverhangRect; 232 IntRect verticalOverhangRect;
233 m_frameView.calculateOverhangAreasForPainting(horizontalOverhangRect, vertic alOverhangRect); 233 m_frameView.calculateOverhangAreasForPainting(horizontalOverhangRect, vertic alOverhangRect);
234 234
235 if (dirtyRect.intersects(horizontalOverhangRect) || dirtyRect.intersects(ver ticalOverhangRect)) 235 if (dirtyRect.intersects(horizontalOverhangRect) || dirtyRect.intersects(ver ticalOverhangRect))
236 paintOverhangAreas(context, horizontalOverhangRect, verticalOverhangRect , dirtyRect); 236 paintOverhangAreas(context, horizontalOverhangRect, verticalOverhangRect , dirtyRect);
237 } 237 }
238 238
239 } // namespace blink 239 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/FloatClipRecorder.h ('k') | Source/core/paint/FrameSetPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698