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

Side by Side Diff: Source/core/paint/ReplacedPainter.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
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/ReplacedPainter.h" 6 #include "core/paint/ReplacedPainter.h"
7 7
8 #include "core/layout/Layer.h" 8 #include "core/layout/Layer.h"
9 #include "core/paint/BoxPainter.h" 9 #include "core/paint/BoxPainter.h"
10 #include "core/paint/GraphicsContextAnnotator.h" 10 #include "core/paint/GraphicsContextAnnotator.h"
(...skipping 29 matching lines...) Expand all
40 40
41 if ((paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSe lfOutline) && m_renderReplaced.style()->outlineWidth()) 41 if ((paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSe lfOutline) && m_renderReplaced.style()->outlineWidth())
42 ObjectPainter(m_renderReplaced).paintOutline(paintInfo, paintRect); 42 ObjectPainter(m_renderReplaced).paintOutline(paintInfo, paintRect);
43 43
44 if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhase Selection && !m_renderReplaced.canHaveChildren() && paintInfo.phase != PaintPhas eClippingMask) 44 if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhase Selection && !m_renderReplaced.canHaveChildren() && paintInfo.phase != PaintPhas eClippingMask)
45 return; 45 return;
46 46
47 if (!paintInfo.shouldPaintWithinRoot(&m_renderReplaced)) 47 if (!paintInfo.shouldPaintWithinRoot(&m_renderReplaced))
48 return; 48 return;
49 49
50 bool drawSelectionTint = m_renderReplaced.selectionState() != RenderObject:: SelectionNone && !m_renderReplaced.document().printing(); 50 bool drawSelectionTint = m_renderReplaced.selectionState() != LayoutObject:: SelectionNone && !m_renderReplaced.document().printing();
51 if (paintInfo.phase == PaintPhaseSelection) { 51 if (paintInfo.phase == PaintPhaseSelection) {
52 if (m_renderReplaced.selectionState() == RenderObject::SelectionNone) 52 if (m_renderReplaced.selectionState() == LayoutObject::SelectionNone)
53 return; 53 return;
54 drawSelectionTint = false; 54 drawSelectionTint = false;
55 } 55 }
56 56
57 // FIXME(crbug.com/444591): Refactor this to not create a drawing recorder f or renderers with children. 57 // FIXME(crbug.com/444591): Refactor this to not create a drawing recorder f or renderers with children.
58 OwnPtr<RenderDrawingRecorder> renderDrawingRecorder; 58 OwnPtr<RenderDrawingRecorder> renderDrawingRecorder;
59 if (!m_renderReplaced.isSVGRoot()) 59 if (!m_renderReplaced.isSVGRoot())
60 renderDrawingRecorder = adoptPtr(new RenderDrawingRecorder(paintInfo.con text, m_renderReplaced, paintInfo.phase, paintRect)); 60 renderDrawingRecorder = adoptPtr(new RenderDrawingRecorder(paintInfo.con text, m_renderReplaced, paintInfo.phase, paintRect));
61 if (renderDrawingRecorder && renderDrawingRecorder->canUseCachedDrawing()) 61 if (renderDrawingRecorder && renderDrawingRecorder->canUseCachedDrawing())
62 return; 62 return;
(...skipping 27 matching lines...) Expand all
90 // The selection tint never gets clipped by border-radius rounding, since we want it to run right up to the edges of 90 // The selection tint never gets clipped by border-radius rounding, since we want it to run right up to the edges of
91 // surrounding content. 91 // surrounding content.
92 if (drawSelectionTint) { 92 if (drawSelectionTint) {
93 LayoutRect selectionPaintingRect = m_renderReplaced.localSelectionRect() ; 93 LayoutRect selectionPaintingRect = m_renderReplaced.localSelectionRect() ;
94 selectionPaintingRect.moveBy(adjustedPaintOffset); 94 selectionPaintingRect.moveBy(adjustedPaintOffset);
95 paintInfo.context->fillRect(pixelSnappedIntRect(selectionPaintingRect), m_renderReplaced.selectionBackgroundColor()); 95 paintInfo.context->fillRect(pixelSnappedIntRect(selectionPaintingRect), m_renderReplaced.selectionBackgroundColor());
96 } 96 }
97 } 97 }
98 98
99 } // namespace blink 99 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/RenderDrawingRecorder.cpp ('k') | Source/core/paint/RoundedInnerRectClipper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698