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

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

Issue 2755493004: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in core/css/ (Closed)
Patch Set: All windows error are Resolved now. 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) 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 float chFontSize() const { return m_fontSizes.ch(); } 101 float chFontSize() const { return m_fontSizes.ch(); }
102 102
103 // Accessing these marks the style as having viewport units 103 // Accessing these marks the style as having viewport units
104 double viewportWidthPercent() const; 104 double viewportWidthPercent() const;
105 double viewportHeightPercent() const; 105 double viewportHeightPercent() const;
106 double viewportMinPercent() const; 106 double viewportMinPercent() const;
107 double viewportMaxPercent() const; 107 double viewportMaxPercent() const;
108 108
109 void setFontSizes(const FontSizes& fontSizes) { m_fontSizes = fontSizes; } 109 void setFontSizes(const FontSizes& fontSizes) { m_fontSizes = fontSizes; }
110 void setZoom(float zoom) { 110 void setZoom(float zoom) {
111 ASSERT(std::isfinite(zoom) && zoom > 0); 111 DCHECK(std::isfinite(zoom));
112 DCHECK_GT(zoom, 0);
112 m_zoom = zoom; 113 m_zoom = zoom;
113 } 114 }
114 115
115 CSSToLengthConversionData copyWithAdjustedZoom(float newZoom) const { 116 CSSToLengthConversionData copyWithAdjustedZoom(float newZoom) const {
116 return CSSToLengthConversionData(m_style, m_fontSizes, m_viewportSize, 117 return CSSToLengthConversionData(m_style, m_fontSizes, m_viewportSize,
117 newZoom); 118 newZoom);
118 } 119 }
119 120
120 double zoomedComputedPixels(double value, CSSPrimitiveValue::UnitType) const; 121 double zoomedComputedPixels(double value, CSSPrimitiveValue::UnitType) const;
121 122
122 private: 123 private:
123 const ComputedStyle* m_style; 124 const ComputedStyle* m_style;
124 FontSizes m_fontSizes; 125 FontSizes m_fontSizes;
125 ViewportSize m_viewportSize; 126 ViewportSize m_viewportSize;
126 float m_zoom; 127 float m_zoom;
127 }; 128 };
128 129
129 } // namespace blink 130 } // namespace blink
130 131
131 #endif 132 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSStyleRule.cpp ('k') | third_party/WebKit/Source/core/css/CSSToLengthConversionData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698