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

Unified Diff: third_party/WebKit/Source/core/layout/svg/SVGTextMetrics.h

Issue 2888623008: Remove SVGTextMetrics Width/Height getters (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/svg/SVGTextMetrics.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/svg/SVGTextMetrics.h
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGTextMetrics.h b/third_party/WebKit/Source/core/layout/svg/SVGTextMetrics.h
index abc81b2b141aadae42acf9e36afbbfb9ee37b020..5ddd94dc7c793344ddcc35e820831cb762c17b44 100644
--- a/third_party/WebKit/Source/core/layout/svg/SVGTextMetrics.h
+++ b/third_party/WebKit/Source/core/layout/svg/SVGTextMetrics.h
@@ -24,6 +24,7 @@
namespace blink {
+class FloatSize;
enum class FontOrientation;
class SVGTextMetrics {
@@ -37,12 +38,14 @@ class SVGTextMetrics {
bool IsEmpty() const { return !width_ && !height_ && length_ <= 1; }
- float Width() const { return width_; }
- float Height() const { return height_; }
+ FloatSize Extents() const;
// TODO(kojii): We should store logical width (advance) and height instead
// of storing physical and calculate logical. crbug.com/544767
float Advance(FontOrientation) const;
+ float Advance(bool is_vertical) const {
+ return is_vertical ? height_ : width_;
+ }
unsigned length() const { return length_; }
private:
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/svg/SVGTextMetrics.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698