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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/FontDescription.cpp

Issue 2797423005: Always use original ascent/descent for FontMetrics::floatAscent|floatDescent (Closed)
Patch Set: Created 3 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) 2007 Nicholas Shanks <contact@nickshanks.com> 2 * Copyright (C) 2007 Nicholas Shanks <contact@nickshanks.com>
3 * Copyright (C) 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2008 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 m_fields.m_historicalLigaturesState = NormalLigaturesState; 77 m_fields.m_historicalLigaturesState = NormalLigaturesState;
78 m_fields.m_contextualLigaturesState = NormalLigaturesState; 78 m_fields.m_contextualLigaturesState = NormalLigaturesState;
79 m_fields.m_keywordSize = 0; 79 m_fields.m_keywordSize = 0;
80 m_fields.m_fontSmoothing = AutoSmoothing; 80 m_fields.m_fontSmoothing = AutoSmoothing;
81 m_fields.m_textRendering = AutoTextRendering; 81 m_fields.m_textRendering = AutoTextRendering;
82 m_fields.m_syntheticBold = false; 82 m_fields.m_syntheticBold = false;
83 m_fields.m_syntheticItalic = false; 83 m_fields.m_syntheticItalic = false;
84 m_fields.m_subpixelTextPosition = s_useSubpixelTextPositioning; 84 m_fields.m_subpixelTextPosition = s_useSubpixelTextPositioning;
85 m_fields.m_typesettingFeatures = s_defaultTypesettingFeatures; 85 m_fields.m_typesettingFeatures = s_defaultTypesettingFeatures;
86 m_fields.m_variantNumeric = FontVariantNumeric().m_fieldsAsUnsigned; 86 m_fields.m_variantNumeric = FontVariantNumeric().m_fieldsAsUnsigned;
87 m_fields.m_subpixelAscentDescent = false;
88 } 87 }
89 88
90 FontDescription::FontDescription(const FontDescription&) = default; 89 FontDescription::FontDescription(const FontDescription&) = default;
91 90
92 FontDescription& FontDescription::operator=(const FontDescription&) = default; 91 FontDescription& FontDescription::operator=(const FontDescription&) = default;
93 92
94 bool FontDescription::operator==(const FontDescription& other) const { 93 bool FontDescription::operator==(const FontDescription& other) const {
95 return m_familyList == other.m_familyList && m_locale == other.m_locale && 94 return m_familyList == other.m_familyList && m_locale == other.m_locale &&
96 m_specifiedSize == other.m_specifiedSize && 95 m_specifiedSize == other.m_specifiedSize &&
97 m_computedSize == other.m_computedSize && 96 m_computedSize == other.m_computedSize &&
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 "FontStretchUltraCondensed should map to kUltraCondensed_Width"); 358 "FontStretchUltraCondensed should map to kUltraCondensed_Width");
360 static_assert(static_cast<int>(FontStretchNormal) == 359 static_assert(static_cast<int>(FontStretchNormal) ==
361 static_cast<int>(SkFontStyle::kNormal_Width), 360 static_cast<int>(SkFontStyle::kNormal_Width),
362 "FontStretchNormal should map to kNormal_Width"); 361 "FontStretchNormal should map to kNormal_Width");
363 static_assert(static_cast<int>(FontStretchUltraExpanded) == 362 static_assert(static_cast<int>(FontStretchUltraExpanded) ==
364 static_cast<int>(SkFontStyle::kUltraExpanded_Width), 363 static_cast<int>(SkFontStyle::kUltraExpanded_Width),
365 "FontStretchUltraExpanded should map to kUltraExpanded_Width"); 364 "FontStretchUltraExpanded should map to kUltraExpanded_Width");
366 } 365 }
367 366
368 } // namespace blink 367 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/fonts/FontDescription.h ('k') | third_party/WebKit/Source/platform/fonts/FontMetrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698