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

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

Issue 2614883007: Change computed style enums to be prefixed with 'k'. (Closed)
Patch Set: Rebase on ToT. Created 3 years, 11 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/ReplacedPainter.h" 5 #include "core/paint/ReplacedPainter.h"
6 6
7 #include "core/layout/LayoutReplaced.h" 7 #include "core/layout/LayoutReplaced.h"
8 #include "core/layout/api/SelectionState.h" 8 #include "core/layout/api/SelectionState.h"
9 #include "core/layout/svg/LayoutSVGRoot.h" 9 #include "core/layout/svg/LayoutSVGRoot.h"
10 #include "core/paint/BoxPainter.h" 10 #include "core/paint/BoxPainter.h"
(...skipping 13 matching lines...) Expand all
24 24
25 void ReplacedPainter::paint(const PaintInfo& paintInfo, 25 void ReplacedPainter::paint(const PaintInfo& paintInfo,
26 const LayoutPoint& paintOffset) { 26 const LayoutPoint& paintOffset) {
27 ObjectPainter(m_layoutReplaced).checkPaintOffset(paintInfo, paintOffset); 27 ObjectPainter(m_layoutReplaced).checkPaintOffset(paintInfo, paintOffset);
28 LayoutPoint adjustedPaintOffset = paintOffset + m_layoutReplaced.location(); 28 LayoutPoint adjustedPaintOffset = paintOffset + m_layoutReplaced.location();
29 if (!shouldPaint(paintInfo, adjustedPaintOffset)) 29 if (!shouldPaint(paintInfo, adjustedPaintOffset))
30 return; 30 return;
31 31
32 LayoutRect borderRect(adjustedPaintOffset, m_layoutReplaced.size()); 32 LayoutRect borderRect(adjustedPaintOffset, m_layoutReplaced.size());
33 33
34 if (m_layoutReplaced.style()->visibility() == EVisibility::Visible && 34 if (m_layoutReplaced.style()->visibility() == EVisibility::kVisible &&
35 m_layoutReplaced.hasBoxDecorationBackground() && 35 m_layoutReplaced.hasBoxDecorationBackground() &&
36 (paintInfo.phase == PaintPhaseForeground || 36 (paintInfo.phase == PaintPhaseForeground ||
37 paintInfo.phase == PaintPhaseSelection)) 37 paintInfo.phase == PaintPhaseSelection))
38 m_layoutReplaced.paintBoxDecorationBackground(paintInfo, 38 m_layoutReplaced.paintBoxDecorationBackground(paintInfo,
39 adjustedPaintOffset); 39 adjustedPaintOffset);
40 40
41 if (paintInfo.phase == PaintPhaseMask) { 41 if (paintInfo.phase == PaintPhaseMask) {
42 m_layoutReplaced.paintMask(paintInfo, adjustedPaintOffset); 42 m_layoutReplaced.paintMask(paintInfo, adjustedPaintOffset);
43 return; 43 return;
44 } 44 }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 !shouldPaintSelfOutline(paintInfo.phase) && 130 !shouldPaintSelfOutline(paintInfo.phase) &&
131 paintInfo.phase != PaintPhaseSelection && 131 paintInfo.phase != PaintPhaseSelection &&
132 paintInfo.phase != PaintPhaseMask && 132 paintInfo.phase != PaintPhaseMask &&
133 paintInfo.phase != PaintPhaseClippingMask) 133 paintInfo.phase != PaintPhaseClippingMask)
134 return false; 134 return false;
135 135
136 // If we're invisible or haven't received a layout yet, just bail. 136 // If we're invisible or haven't received a layout yet, just bail.
137 // But if it's an SVG root, there can be children, so we'll check visibility 137 // But if it's an SVG root, there can be children, so we'll check visibility
138 // later. 138 // later.
139 if (!m_layoutReplaced.isSVGRoot() && 139 if (!m_layoutReplaced.isSVGRoot() &&
140 m_layoutReplaced.style()->visibility() != EVisibility::Visible) 140 m_layoutReplaced.style()->visibility() != EVisibility::kVisible)
141 return false; 141 return false;
142 142
143 LayoutRect paintRect(m_layoutReplaced.visualOverflowRect()); 143 LayoutRect paintRect(m_layoutReplaced.visualOverflowRect());
144 paintRect.unite(m_layoutReplaced.localSelectionRect()); 144 paintRect.unite(m_layoutReplaced.localSelectionRect());
145 paintRect.moveBy(adjustedPaintOffset); 145 paintRect.moveBy(adjustedPaintOffset);
146 146
147 if (!paintInfo.cullRect().intersectsCullRect(paintRect)) 147 if (!paintInfo.cullRect().intersectsCullRect(paintRect))
148 return false; 148 return false;
149 149
150 return true; 150 return true;
151 } 151 }
152 152
153 } // namespace blink 153 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.cpp ('k') | third_party/WebKit/Source/core/paint/RootInlineBoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698