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/rendering/TextPainter.h" | 6 #include "core/rendering/TextPainter.h" |
7 | 7 |
8 #include "core/CSSPropertyNames.h" | 8 #include "core/CSSPropertyNames.h" |
9 #include "core/frame/Settings.h" | 9 #include "core/frame/Settings.h" |
10 #include "core/rendering/InlineTextBox.h" | 10 #include "core/rendering/InlineTextBox.h" |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 if (endOffset > 0) | 216 if (endOffset > 0) |
217 paintInternalRun<Step>(textRunPaintInfo, 0, endOffset); | 217 paintInternalRun<Step>(textRunPaintInfo, 0, endOffset); |
218 if (startOffset < truncationPoint) | 218 if (startOffset < truncationPoint) |
219 paintInternalRun<Step>(textRunPaintInfo, startOffset, truncationPoin
t); | 219 paintInternalRun<Step>(textRunPaintInfo, startOffset, truncationPoin
t); |
220 } | 220 } |
221 } | 221 } |
222 | 222 |
223 void TextPainter::paintEmphasisMarkForCombinedText() | 223 void TextPainter::paintEmphasisMarkForCombinedText() |
224 { | 224 { |
225 ASSERT(m_combinedText); | 225 ASSERT(m_combinedText); |
226 DEFINE_STATIC_LOCAL(TextRun, objectReplacementCharacterTextRun, (&objectRepl
acementCharacter, 1)); | 226 DEFINE_STATIC_LOCAL(TextRun, placeholderTextRun, (&ideographicFullStop, 1)); |
227 FloatPoint emphasisMarkTextOrigin(m_textBounds.x() + m_textBounds.width() /
2, m_textBounds.y() + m_font.fontMetrics().ascent() + m_emphasisMarkOffset); | 227 FloatPoint emphasisMarkTextOrigin(m_textBounds.x(), m_textBounds.y() + m_fon
t.fontMetrics().ascent() + m_emphasisMarkOffset); |
228 TextRunPaintInfo textRunPaintInfo(objectReplacementCharacterTextRun); | 228 TextRunPaintInfo textRunPaintInfo(placeholderTextRun); |
229 textRunPaintInfo.bounds = m_textBounds; | 229 textRunPaintInfo.bounds = m_textBounds; |
230 m_graphicsContext->concatCTM(InlineTextBox::rotation(m_textBounds, InlineTex
tBox::Clockwise)); | 230 m_graphicsContext->concatCTM(InlineTextBox::rotation(m_textBounds, InlineTex
tBox::Clockwise)); |
231 m_graphicsContext->drawEmphasisMarks(m_combinedText->originalFont(), textRun
PaintInfo, m_emphasisMark, emphasisMarkTextOrigin); | 231 m_graphicsContext->drawEmphasisMarks(m_combinedText->originalFont(), textRun
PaintInfo, m_emphasisMark, emphasisMarkTextOrigin); |
232 m_graphicsContext->concatCTM(InlineTextBox::rotation(m_textBounds, InlineTex
tBox::Counterclockwise)); | 232 m_graphicsContext->concatCTM(InlineTextBox::rotation(m_textBounds, InlineTex
tBox::Counterclockwise)); |
233 } | 233 } |
234 | 234 |
235 } // namespace blink | 235 } // namespace blink |
OLD | NEW |