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

Side by Side Diff: third_party/WebKit/Source/core/css/FontSize.h

Issue 2392343005: Reflow comments in core/css (Closed)
Patch Set: Revert clang-format 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 unified diff | Download patch
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.
4 * All rights reserved.
4 * 5 *
5 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
8 * 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.
9 * 10 *
10 * This library is distributed in the hope that it will be useful, 11 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 14 * Library General Public License for more details.
(...skipping 24 matching lines...) Expand all
38 STATIC_ONLY(FontSize); 39 STATIC_ONLY(FontSize);
39 40
40 public: 41 public:
41 static float getComputedSizeFromSpecifiedSize( 42 static float getComputedSizeFromSpecifiedSize(
42 const Document*, 43 const Document*,
43 float zoomFactor, 44 float zoomFactor,
44 bool isAbsoluteSize, 45 bool isAbsoluteSize,
45 float specifiedSize, 46 float specifiedSize,
46 ESmartMinimumForFontSize = UseSmartMinimumForFontSize); 47 ESmartMinimumForFontSize = UseSmartMinimumForFontSize);
47 48
48 // Given a CSS keyword in the range (xx-small to -webkit-xxx-large), this func tion returns 49 // Given a CSS keyword in the range (xx-small to -webkit-xxx-large), this
50 // function returns
49 // values from '1' to '8'. 51 // values from '1' to '8'.
50 static unsigned keywordSize(CSSValueID valueID) { 52 static unsigned keywordSize(CSSValueID valueID) {
51 ASSERT(isValidValueID(valueID)); 53 ASSERT(isValidValueID(valueID));
52 return valueID - CSSValueXxSmall + 1; 54 return valueID - CSSValueXxSmall + 1;
53 } 55 }
54 56
55 static bool isValidValueID(CSSValueID valueID) { 57 static bool isValidValueID(CSSValueID valueID) {
56 return valueID >= CSSValueXxSmall && valueID <= CSSValueWebkitXxxLarge; 58 return valueID >= CSSValueXxSmall && valueID <= CSSValueWebkitXxxLarge;
57 } 59 }
58 60
59 static CSSValueID initialValueID() { return CSSValueMedium; } 61 static CSSValueID initialValueID() { return CSSValueMedium; }
60 static unsigned initialKeywordSize() { return keywordSize(initialValueID()); } 62 static unsigned initialKeywordSize() { return keywordSize(initialValueID()); }
61 63
62 // Given a keyword size in the range (1 to 8), this function will return 64 // Given a keyword size in the range (1 to 8), this function will return
63 // the correct font size scaled relative to the user's default (4). 65 // the correct font size scaled relative to the user's default (4).
64 static float fontSizeForKeyword(const Document*, 66 static float fontSizeForKeyword(const Document*,
65 unsigned keyword, 67 unsigned keyword,
66 bool isMonospace); 68 bool isMonospace);
67 69
68 // Given a font size in pixel, this function will return legacy font size betw een 1 and 7. 70 // Given a font size in pixel, this function will return legacy font size
71 // between 1 and 7.
69 static int legacyFontSize(const Document*, 72 static int legacyFontSize(const Document*,
70 int pixelFontSize, 73 int pixelFontSize,
71 bool isMonospace); 74 bool isMonospace);
72 }; 75 };
73 76
74 } // namespace blink 77 } // namespace blink
75 78
76 #endif // FontSize_h 79 #endif // FontSize_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/FontFaceSet.cpp ('k') | third_party/WebKit/Source/core/css/FontSize.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698