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

Side by Side Diff: Source/core/css/CSSToLengthConversionData.h

Issue 1181023004: Move rem handling out of CSSParserValues.cpp (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Another attempt Created 5 years, 4 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 double m_height; 74 double m_height;
75 }; 75 };
76 76
77 CSSToLengthConversionData() { } 77 CSSToLengthConversionData() { }
78 CSSToLengthConversionData(const ComputedStyle*, const FontSizes&, const View portSize&, float zoom); 78 CSSToLengthConversionData(const ComputedStyle*, const FontSizes&, const View portSize&, float zoom);
79 CSSToLengthConversionData(const ComputedStyle* currStyle, const ComputedStyl e* rootStyle, const LayoutView*, float zoom); 79 CSSToLengthConversionData(const ComputedStyle* currStyle, const ComputedStyl e* rootStyle, const LayoutView*, float zoom);
80 80
81 float zoom() const { return m_zoom; } 81 float zoom() const { return m_zoom; }
82 82
83 float emFontSize() const { return m_fontSizes.em(); } 83 float emFontSize() const { return m_fontSizes.em(); }
84 float remFontSize() const { return m_fontSizes.rem(); } 84 float remFontSize() const;
85 float exFontSize() const { return m_fontSizes.ex(); } 85 float exFontSize() const { return m_fontSizes.ex(); }
86 float chFontSize() const { return m_fontSizes.ch(); } 86 float chFontSize() const { return m_fontSizes.ch(); }
87 87
88 // Accessing these marks the style as having viewport units 88 // Accessing these marks the style as having viewport units
89 double viewportWidthPercent() const; 89 double viewportWidthPercent() const;
90 double viewportHeightPercent() const; 90 double viewportHeightPercent() const;
91 double viewportMinPercent() const; 91 double viewportMinPercent() const;
92 double viewportMaxPercent() const; 92 double viewportMaxPercent() const;
93 93
94 void setFontSizes(const FontSizes& fontSizes) { m_fontSizes = fontSizes; } 94 void setFontSizes(const FontSizes& fontSizes) { m_fontSizes = fontSizes; }
(...skipping 11 matching lines...) Expand all
106 private: 106 private:
107 const ComputedStyle* m_style; 107 const ComputedStyle* m_style;
108 FontSizes m_fontSizes; 108 FontSizes m_fontSizes;
109 ViewportSize m_viewportSize; 109 ViewportSize m_viewportSize;
110 float m_zoom; 110 float m_zoom;
111 }; 111 };
112 112
113 } // namespace blink 113 } // namespace blink
114 114
115 #endif 115 #endif
OLDNEW
« no previous file with comments | « LayoutTests/platform/win/fast/css/rem-calc-dynamic-scaling-expected.txt ('k') | Source/core/css/CSSToLengthConversionData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698