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

Side by Side Diff: third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp

Issue 2575863002: Ignore minimum font-size for SVG text (Closed)
Patch Set: Created 4 years 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 | « third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp ('k') | no next file » | 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 "core/paint/SVGInlineTextBoxPainter.h" 5 #include "core/paint/SVGInlineTextBoxPainter.h"
6 6
7 #include "core/editing/Editor.h" 7 #include "core/editing/Editor.h"
8 #include "core/editing/markers/DocumentMarkerController.h" 8 #include "core/editing/markers/DocumentMarkerController.h"
9 #include "core/editing/markers/RenderedDocumentMarker.h" 9 #include "core/editing/markers/RenderedDocumentMarker.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 // properties have to be used for drawing instead of ours. 315 // properties have to be used for drawing instead of ours.
316 LayoutObject* decorationLayoutObject = 316 LayoutObject* decorationLayoutObject =
317 findLayoutObjectDefininingTextDecoration(m_svgInlineTextBox.parent()); 317 findLayoutObjectDefininingTextDecoration(m_svgInlineTextBox.parent());
318 const ComputedStyle& decorationStyle = decorationLayoutObject->styleRef(); 318 const ComputedStyle& decorationStyle = decorationLayoutObject->styleRef();
319 319
320 if (decorationStyle.visibility() != EVisibility::Visible) 320 if (decorationStyle.visibility() != EVisibility::Visible)
321 return; 321 return;
322 322
323 float scalingFactor = 1; 323 float scalingFactor = 1;
324 Font scaledFont; 324 Font scaledFont;
325 LayoutSVGInlineText::computeNewScaledFontForStyle(decorationLayoutObject, 325 LayoutSVGInlineText::computeNewScaledFontForStyle(*decorationLayoutObject,
326 scalingFactor, scaledFont); 326 scalingFactor, scaledFont);
327 DCHECK(scalingFactor); 327 DCHECK(scalingFactor);
328 328
329 float thickness = thicknessForDecoration(decoration, scaledFont); 329 float thickness = thicknessForDecoration(decoration, scaledFont);
330 if (thickness <= 0) 330 if (thickness <= 0)
331 return; 331 return;
332 332
333 const SimpleFontData* fontData = scaledFont.primaryFont(); 333 const SimpleFontData* fontData = scaledFont.primaryFont();
334 DCHECK(fontData); 334 DCHECK(fontData);
335 if (!fontData) 335 if (!fontData)
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 } 645 }
646 FloatRect fragmentRect = m_svgInlineTextBox.selectionRectForTextFragment( 646 FloatRect fragmentRect = m_svgInlineTextBox.selectionRectForTextFragment(
647 fragment, textMatchInfo.startPosition, textMatchInfo.endPosition, 647 fragment, textMatchInfo.startPosition, textMatchInfo.endPosition,
648 style); 648 style);
649 paintInfo.context.setFillColor(color); 649 paintInfo.context.setFillColor(color);
650 paintInfo.context.fillRect(fragmentRect); 650 paintInfo.context.fillRect(fragmentRect);
651 } 651 }
652 } 652 }
653 653
654 } // namespace blink 654 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698