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 "config.h" | 5 #include "config.h" |
6 #include "core/paint/InlineFlowBoxPainter.h" | 6 #include "core/paint/InlineFlowBoxPainter.h" |
7 | 7 |
8 #include "core/paint/BoxPainter.h" | 8 #include "core/paint/BoxPainter.h" |
9 #include "core/paint/DrawingRecorder.h" | 9 #include "core/paint/DrawingRecorder.h" |
10 #include "core/rendering/InlineFlowBox.h" | 10 #include "core/rendering/InlineFlowBox.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 if (containingBlockPaintsContinuationOutline) { | 55 if (containingBlockPaintsContinuationOutline) { |
56 // Add ourselves to the containing block of the entire continuat
ion so that it can | 56 // Add ourselves to the containing block of the entire continuat
ion so that it can |
57 // paint us atomically. | 57 // paint us atomically. |
58 cb->addContinuationWithOutline(toRenderInline(m_inlineFlowBox.re
nderer().node()->renderer())); | 58 cb->addContinuationWithOutline(toRenderInline(m_inlineFlowBox.re
nderer().node()->renderer())); |
59 } else if (!inlineFlow.isInlineElementContinuation()) { | 59 } else if (!inlineFlow.isInlineElementContinuation()) { |
60 paintInfo.outlineObjects()->add(&inlineFlow); | 60 paintInfo.outlineObjects()->add(&inlineFlow); |
61 } | 61 } |
62 } | 62 } |
63 } else if (paintInfo.phase == PaintPhaseMask) { | 63 } else if (paintInfo.phase == PaintPhaseMask) { |
| 64 DrawingRecorder recorder(paintInfo.context, &m_inlineFlowBox.renderer(),
paintInfo.phase, pixelSnappedIntRect(overflowRect)); |
64 paintMask(paintInfo, paintOffset); | 65 paintMask(paintInfo, paintOffset); |
65 return; | 66 return; |
66 } else if (paintInfo.phase == PaintPhaseForeground) { | 67 } else if (paintInfo.phase == PaintPhaseForeground) { |
67 // Paint our background, border and box-shadow. | 68 // Paint our background, border and box-shadow. |
68 paintBoxDecorationBackground(paintInfo, paintOffset); | 69 paintBoxDecorationBackground(paintInfo, paintOffset); |
69 } | 70 } |
70 | 71 |
71 // Paint our children. | 72 // Paint our children. |
72 if (paintInfo.phase != PaintPhaseSelfOutline) { | 73 if (paintInfo.phase != PaintPhaseSelfOutline) { |
73 PaintInfo childInfo(paintInfo); | 74 PaintInfo childInfo(paintInfo); |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 rect.setHeight(logicalHeight); | 343 rect.setHeight(logicalHeight); |
343 } else { | 344 } else { |
344 rect.setX(logicalTop); | 345 rect.setX(logicalTop); |
345 rect.setWidth(logicalHeight); | 346 rect.setWidth(logicalHeight); |
346 } | 347 } |
347 } | 348 } |
348 return rect; | 349 return rect; |
349 } | 350 } |
350 | 351 |
351 } // namespace blink | 352 } // namespace blink |
OLD | NEW |