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 "core/paint/InlinePainter.h" | 5 #include "core/paint/InlinePainter.h" |
6 | 6 |
7 #include "core/layout/LayoutBlock.h" | |
8 #include "core/layout/LayoutInline.h" | 7 #include "core/layout/LayoutInline.h" |
9 #include "core/layout/LayoutTheme.h" | |
10 #include "core/layout/line/RootInlineBox.h" | |
11 #include "core/paint/BoxPainter.h" | |
12 #include "core/paint/LayoutObjectDrawingRecorder.h" | |
13 #include "core/paint/LineBoxListPainter.h" | 8 #include "core/paint/LineBoxListPainter.h" |
14 #include "core/paint/ObjectPainter.h" | 9 #include "core/paint/ObjectPainter.h" |
15 #include "core/paint/PaintInfo.h" | 10 #include "core/paint/PaintInfo.h" |
16 #include "platform/geometry/LayoutPoint.h" | 11 #include "platform/geometry/LayoutPoint.h" |
17 #include <limits> | |
18 | 12 |
19 namespace blink { | 13 namespace blink { |
20 | 14 |
21 void InlinePainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOf
fset) | 15 void InlinePainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOf
fset) |
22 { | 16 { |
23 if (paintInfo.phase == PaintPhaseForeground && paintInfo.isPrinting()) | 17 if (paintInfo.phase == PaintPhaseForeground && paintInfo.isPrinting()) |
24 ObjectPainter(m_layoutInline).addPDFURLRectIfNeeded(paintInfo, paintOffs
et); | 18 ObjectPainter(m_layoutInline).addPDFURLRectIfNeeded(paintInfo, paintOffs
et); |
25 | 19 |
26 if (shouldPaintSelfOutline(paintInfo.phase) || shouldPaintDescendantOutlines
(paintInfo.phase)) { | 20 if (shouldPaintSelfOutline(paintInfo.phase) || shouldPaintDescendantOutlines
(paintInfo.phase)) { |
27 ObjectPainter painter(m_layoutInline); | 21 ObjectPainter painter(m_layoutInline); |
28 if (shouldPaintDescendantOutlines(paintInfo.phase)) | 22 if (shouldPaintDescendantOutlines(paintInfo.phase)) |
29 painter.paintInlineChildrenOutlines(paintInfo, paintOffset); | 23 painter.paintInlineChildrenOutlines(paintInfo, paintOffset); |
30 if (shouldPaintSelfOutline(paintInfo.phase) && !m_layoutInline.isElement
Continuation()) | 24 if (shouldPaintSelfOutline(paintInfo.phase) && !m_layoutInline.isElement
Continuation()) |
31 painter.paintOutline(paintInfo, paintOffset); | 25 painter.paintOutline(paintInfo, paintOffset); |
32 return; | 26 return; |
33 } | 27 } |
34 | 28 |
35 LineBoxListPainter(*m_layoutInline.lineBoxes()).paint(m_layoutInline, paintI
nfo, paintOffset); | 29 LineBoxListPainter(*m_layoutInline.lineBoxes()).paint(m_layoutInline, paintI
nfo, paintOffset); |
36 } | 30 } |
37 | 31 |
38 } // namespace blink | 32 } // namespace blink |
OLD | NEW |