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/css/FontSize.h

Issue 1675463002: Correct FontFize typo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « no previous file | 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 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 11 matching lines...) Expand all
22 #ifndef FontSize_h 22 #ifndef FontSize_h
23 #define FontSize_h 23 #define FontSize_h
24 24
25 #include "core/CSSValueKeywords.h" 25 #include "core/CSSValueKeywords.h"
26 #include "wtf/Allocator.h" 26 #include "wtf/Allocator.h"
27 27
28 namespace blink { 28 namespace blink {
29 29
30 class Document; 30 class Document;
31 31
32 enum ESmartMinimumForFontSize { DoNotUseSmartMinimumForFontSize, UseSmartMinimum ForFontFize }; 32 enum ESmartMinimumForFontSize { DoNotUseSmartMinimumForFontSize, UseSmartMinimum ForFontSize };
33 33
34 class FontSize { 34 class FontSize {
35 STATIC_ONLY(FontSize); 35 STATIC_ONLY(FontSize);
36 public: 36 public:
37 static float getComputedSizeFromSpecifiedSize(const Document*, float zoomFac tor, bool isAbsoluteSize, float specifiedSize, ESmartMinimumForFontSize = UseSma rtMinimumForFontFize); 37 static float getComputedSizeFromSpecifiedSize(const Document*, float zoomFac tor, bool isAbsoluteSize, float specifiedSize, ESmartMinimumForFontSize = UseSma rtMinimumForFontSize);
38 38
39 // Given a CSS keyword in the range (xx-small to -webkit-xxx-large), this fu nction returns 39 // Given a CSS keyword in the range (xx-small to -webkit-xxx-large), this fu nction returns
40 // values from '1' to '8'. 40 // values from '1' to '8'.
41 static unsigned keywordSize(CSSValueID valueID) 41 static unsigned keywordSize(CSSValueID valueID)
42 { 42 {
43 ASSERT(valueID >= CSSValueXxSmall && valueID <= CSSValueWebkitXxxLarge); 43 ASSERT(valueID >= CSSValueXxSmall && valueID <= CSSValueWebkitXxxLarge);
44 return valueID - CSSValueXxSmall + 1; 44 return valueID - CSSValueXxSmall + 1;
45 } 45 }
46 46
47 static unsigned initialKeywordSize() { return 4; } // CSSValueMedium 47 static unsigned initialKeywordSize() { return 4; } // CSSValueMedium
48 48
49 // Given a keyword size in the range (1 to 8), this function will return 49 // Given a keyword size in the range (1 to 8), this function will return
50 // the correct font size scaled relative to the user's default (4). 50 // the correct font size scaled relative to the user's default (4).
51 static float fontSizeForKeyword(const Document*, unsigned keyword, bool isMo nospace); 51 static float fontSizeForKeyword(const Document*, unsigned keyword, bool isMo nospace);
52 52
53 // Given a font size in pixel, this function will return legacy font size be tween 1 and 7. 53 // Given a font size in pixel, this function will return legacy font size be tween 1 and 7.
54 static int legacyFontSize(const Document*, int pixelFontSize, bool isMonospa ce); 54 static int legacyFontSize(const Document*, int pixelFontSize, bool isMonospa ce);
55 }; 55 };
56 56
57 } // namespace blink 57 } // namespace blink
58 58
59 #endif // FontSize_h 59 #endif // FontSize_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698