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/InlineTextBoxPainter.h" | 6 #include "core/paint/InlineTextBoxPainter.h" |
7 | 7 |
8 #include "core/dom/DocumentMarkerController.h" | 8 #include "core/dom/DocumentMarkerController.h" |
9 #include "core/dom/RenderedDocumentMarker.h" | 9 #include "core/dom/RenderedDocumentMarker.h" |
10 #include "core/editing/CompositionUnderline.h" | 10 #include "core/editing/CompositionUnderline.h" |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 // paint only the text that is selected | 199 // paint only the text that is selected |
200 textPainter.paint(selectionStart, selectionEnd, length, selectionStyle); | 200 textPainter.paint(selectionStart, selectionEnd, length, selectionStyle); |
201 } | 201 } |
202 | 202 |
203 // Paint decorations | 203 // Paint decorations |
204 TextDecoration textDecorations = styleToUse->textDecorationsInEffect(); | 204 TextDecoration textDecorations = styleToUse->textDecorationsInEffect(); |
205 if (textDecorations != TextDecorationNone && !paintSelectedTextOnly) { | 205 if (textDecorations != TextDecorationNone && !paintSelectedTextOnly) { |
206 GraphicsContextStateSaver stateSaver(*context, false); | 206 GraphicsContextStateSaver stateSaver(*context, false); |
207 TextPainter::updateGraphicsContext(context, textStyle, m_inlineTextBox.i
sHorizontal(), stateSaver); | 207 TextPainter::updateGraphicsContext(context, textStyle, m_inlineTextBox.i
sHorizontal(), stateSaver); |
208 if (combinedText) | 208 if (combinedText) |
| 209 |
209 context->concatCTM(InlineTextBox::rotation(boxRect, InlineTextBox::C
lockwise)); | 210 context->concatCTM(InlineTextBox::rotation(boxRect, InlineTextBox::C
lockwise)); |
210 paintDecoration(context, boxOrigin, textDecorations); | 211 paintDecoration(context, boxOrigin, textDecorations); |
211 if (combinedText) | 212 if (combinedText) |
212 context->concatCTM(InlineTextBox::rotation(boxRect, InlineTextBox::C
ounterclockwise)); | 213 context->concatCTM(InlineTextBox::rotation(boxRect, InlineTextBox::C
ounterclockwise)); |
213 } | 214 } |
214 | 215 |
215 if (paintInfo.phase == PaintPhaseForeground) { | 216 if (paintInfo.phase == PaintPhaseForeground) { |
216 paintDocumentMarkers(context, boxOrigin, styleToUse, font, false); | 217 paintDocumentMarkers(context, boxOrigin, styleToUse, font, false); |
217 | 218 |
218 // Paint custom underlines for compositions. | 219 // Paint custom underlines for compositions. |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 RenderTheme::theme().platformActiveTextSearchHighlightColor() : | 783 RenderTheme::theme().platformActiveTextSearchHighlightColor() : |
783 RenderTheme::theme().platformInactiveTextSearchHighlightColor(); | 784 RenderTheme::theme().platformInactiveTextSearchHighlightColor(); |
784 GraphicsContextStateSaver stateSaver(*pt); | 785 GraphicsContextStateSaver stateSaver(*pt); |
785 pt->clip(FloatRect(boxOrigin.x(), boxOrigin.y() - deltaY, m_inlineTextBo
x.logicalWidth(), selHeight)); | 786 pt->clip(FloatRect(boxOrigin.x(), boxOrigin.y() - deltaY, m_inlineTextBo
x.logicalWidth(), selHeight)); |
786 pt->drawHighlightForText(font, run, FloatPoint(boxOrigin.x(), boxOrigin.
y() - deltaY), selHeight, color, sPos, ePos); | 787 pt->drawHighlightForText(font, run, FloatPoint(boxOrigin.x(), boxOrigin.
y() - deltaY), selHeight, color, sPos, ePos); |
787 } | 788 } |
788 } | 789 } |
789 | 790 |
790 | 791 |
791 } // namespace blink | 792 } // namespace blink |
OLD | NEW |