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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.cpp

Issue 2416033003: Remove unsafe getFontMetrics methods (Closed)
Patch Set: Address wkroman suggestions Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/style/ComputedStyle.cpp
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
index dbacac5b12c7f790255a4a1c7157b368bc8bec37..860ae322c8a5ebbdad10cdc4f9b2e4d0a159ca23 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -1648,9 +1648,6 @@ CSSTransitionData& ComputedStyle::accessTransitions() {
const Font& ComputedStyle::font() const {
return m_styleInheritedData->font;
}
-const FontMetrics& ComputedStyle::getFontMetrics() const {
- return m_styleInheritedData->font.getFontMetrics();
-}
const FontDescription& ComputedStyle::getFontDescription() const {
return m_styleInheritedData->font.getFontDescription();
}
@@ -1838,7 +1835,7 @@ int ComputedStyle::computedLineHeight() const {
// Negative value means the line height is not set. Use the font's built-in
// spacing, if avalible.
if (lh.isNegative() && font().primaryFont())
- return getFontMetrics().lineSpacing();
+ return font().primaryFont()->getFontMetrics().lineSpacing();
if (lh.isPercentOrCalc())
return minimumValueForLength(lh, LayoutUnit(computedFontSize())).toInt();
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | third_party/WebKit/Source/core/svg/SVGLengthContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698