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" | 7 #include "core/layout/LayoutBlock.h" |
8 #include "core/layout/LayoutInline.h" | 8 #include "core/layout/LayoutInline.h" |
9 #include "core/layout/LayoutTheme.h" | 9 #include "core/layout/LayoutTheme.h" |
10 #include "core/layout/line/RootInlineBox.h" | 10 #include "core/layout/line/RootInlineBox.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 // LayoutObjectDrawingRecorder updates its previousPaintOffset. | 29 // LayoutObjectDrawingRecorder updates its previousPaintOffset. |
30 // TODO(wangxianzhu): Integrate paint offset checking into new paint inv
alidation. | 30 // TODO(wangxianzhu): Integrate paint offset checking into new paint inv
alidation. |
31 m_layoutInline.mutableForPainting().setPreviousPaintOffset(paintOffset); | 31 m_layoutInline.mutableForPainting().setPreviousPaintOffset(paintOffset); |
32 } | 32 } |
33 | 33 |
34 // FIXME: When Skia supports annotation rect covering (https://code.google.c
om/p/skia/issues/detail?id=3872), | 34 // FIXME: When Skia supports annotation rect covering (https://code.google.c
om/p/skia/issues/detail?id=3872), |
35 // this rect may be covered by foreground and descendant drawings. Then we m
ay need a dedicated paint phase. | 35 // this rect may be covered by foreground and descendant drawings. Then we m
ay need a dedicated paint phase. |
36 if (paintInfo.phase == PaintPhaseForeground && paintInfo.isPrinting()) | 36 if (paintInfo.phase == PaintPhaseForeground && paintInfo.isPrinting()) |
37 ObjectPainter(m_layoutInline).addPDFURLRectIfNeeded(paintInfo, paintOffs
et); | 37 ObjectPainter(m_layoutInline).addPDFURLRectIfNeeded(paintInfo, paintOffs
et); |
38 | 38 |
39 if (paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSel
fOutline || paintInfo.phase == PaintPhaseDescendantOutlines) { | 39 if (shouldPaintSelfOutline(paintInfo.phase) || shouldPaintDescendantOutlines
(paintInfo.phase)) { |
40 ObjectPainter painter(m_layoutInline); | 40 ObjectPainter painter(m_layoutInline); |
41 if (paintInfo.phase != PaintPhaseSelfOutline) | 41 if (shouldPaintDescendantOutlines(paintInfo.phase)) |
42 painter.paintInlineChildrenOutlines(paintInfo, paintOffset); | 42 painter.paintInlineChildrenOutlines(paintInfo, paintOffset); |
43 if (paintInfo.phase != PaintPhaseDescendantOutlines && !m_layoutInline.i
sElementContinuation()) | 43 if (shouldPaintSelfOutline(paintInfo.phase) && !m_layoutInline.isElement
Continuation()) |
44 painter.paintOutline(paintInfo, paintOffset); | 44 painter.paintOutline(paintInfo, paintOffset); |
45 return; | 45 return; |
46 } | 46 } |
47 | 47 |
48 LineBoxListPainter(*m_layoutInline.lineBoxes()).paint(m_layoutInline, paintI
nfo, paintOffset); | 48 LineBoxListPainter(*m_layoutInline.lineBoxes()).paint(m_layoutInline, paintI
nfo, paintOffset); |
49 } | 49 } |
50 | 50 |
51 } // namespace blink | 51 } // namespace blink |
OLD | NEW |