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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.h

Issue 1879453003: Move SVGTextMetricsCalculator to LayoutSVGInlineText.cpp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> 2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz>
3 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
4 * Copyright (C) 2008 Rob Buis <buis@kde.org> 4 * Copyright (C) 2008 Rob Buis <buis@kde.org>
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 19 matching lines...) Expand all
30 namespace blink { 30 namespace blink {
31 31
32 class LayoutSVGInlineText final : public LayoutText { 32 class LayoutSVGInlineText final : public LayoutText {
33 public: 33 public:
34 LayoutSVGInlineText(Node*, PassRefPtr<StringImpl>); 34 LayoutSVGInlineText(Node*, PassRefPtr<StringImpl>);
35 35
36 bool characterStartsNewTextChunk(int position) const; 36 bool characterStartsNewTextChunk(int position) const;
37 SVGTextLayoutAttributes* layoutAttributes() { return &m_layoutAttributes; } 37 SVGTextLayoutAttributes* layoutAttributes() { return &m_layoutAttributes; }
38 const SVGTextLayoutAttributes* layoutAttributes() const { return &m_layoutAt tributes; } 38 const SVGTextLayoutAttributes* layoutAttributes() const { return &m_layoutAt tributes; }
39 39
40 Vector<SVGTextMetrics>& metricsList() { return m_metrics; }
41 const Vector<SVGTextMetrics>& metricsList() const { return m_metrics; } 40 const Vector<SVGTextMetrics>& metricsList() const { return m_metrics; }
42 41
43 float scalingFactor() const { return m_scalingFactor; } 42 float scalingFactor() const { return m_scalingFactor; }
44 const Font& scaledFont() const { return m_scaledFont; } 43 const Font& scaledFont() const { return m_scaledFont; }
45 void updateScaledFont(); 44 void updateScaledFont();
46 void updateMetricsList(bool& lastCharacterWasWhiteSpace); 45 void updateMetricsList(bool& lastCharacterWasWhiteSpace);
47 static void computeNewScaledFontForStyle(LayoutObject*, float& scalingFactor , Font& scaledFont); 46 static void computeNewScaledFontForStyle(LayoutObject*, float& scalingFactor , Font& scaledFont);
48 47
49 // Preserves floating point precision for the use in DRT. It knows how to ro und and does a better job than enclosingIntRect. 48 // Preserves floating point precision for the use in DRT. It knows how to ro und and does a better job than enclosingIntRect.
50 FloatRect floatLinesBoundingBox() const; 49 FloatRect floatLinesBoundingBox() const;
(...skipping 22 matching lines...) Expand all
73 Font m_scaledFont; 72 Font m_scaledFont;
74 SVGTextLayoutAttributes m_layoutAttributes; 73 SVGTextLayoutAttributes m_layoutAttributes;
75 Vector<SVGTextMetrics> m_metrics; 74 Vector<SVGTextMetrics> m_metrics;
76 }; 75 };
77 76
78 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGInlineText, isSVGInlineText()); 77 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGInlineText, isSVGInlineText());
79 78
80 } // namespace blink 79 } // namespace blink
81 80
82 #endif // LayoutSVGInlineText_h 81 #endif // LayoutSVGInlineText_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698