Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: Source/core/paint/InlineTextBoxPainter.cpp

Issue 627773002: Move painting code from SVGInlineTextBox to SVGInlineTextBoxPainter. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix debug build. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/paint/SVGInlineTextBoxPainter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/paint/SVGInlineTextBoxPainter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698