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

Side by Side Diff: sky/engine/core/css/MediaQueryExp.cpp

Issue 788883005: Remove REM units. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « sky/engine/core/css/CSSToLengthConversionData.cpp ('k') | sky/engine/core/css/MediaValues.cpp » ('j') | 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 * CSS Media Query 2 * CSS Media Query
3 * 3 *
4 * Copyright (C) 2006 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>. 4 * Copyright (C) 2006 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>.
5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
6 * Copyright (C) 2013 Apple Inc. All rights reserved. 6 * Copyright (C) 2013 Apple Inc. All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 { 79 {
80 switch (unit) { 80 switch (unit) {
81 case CSSPrimitiveValue::CSS_EMS: 81 case CSSPrimitiveValue::CSS_EMS:
82 case CSSPrimitiveValue::CSS_EXS: 82 case CSSPrimitiveValue::CSS_EXS:
83 case CSSPrimitiveValue::CSS_PX: 83 case CSSPrimitiveValue::CSS_PX:
84 case CSSPrimitiveValue::CSS_CM: 84 case CSSPrimitiveValue::CSS_CM:
85 case CSSPrimitiveValue::CSS_MM: 85 case CSSPrimitiveValue::CSS_MM:
86 case CSSPrimitiveValue::CSS_IN: 86 case CSSPrimitiveValue::CSS_IN:
87 case CSSPrimitiveValue::CSS_PT: 87 case CSSPrimitiveValue::CSS_PT:
88 case CSSPrimitiveValue::CSS_PC: 88 case CSSPrimitiveValue::CSS_PC:
89 case CSSPrimitiveValue::CSS_REMS:
90 case CSSPrimitiveValue::CSS_CHS: 89 case CSSPrimitiveValue::CSS_CHS:
91 return true; 90 return true;
92 } 91 }
93 return false; 92 return false;
94 } 93 }
95 94
96 static inline bool featureWithValidPositiveLength(const String& mediaFeature, co nst CSSParserValue* value) 95 static inline bool featureWithValidPositiveLength(const String& mediaFeature, co nst CSSParserValue* value)
97 { 96 {
98 if (!(positiveLengthUnit(value->unit) || (value->unit == CSSPrimitiveValue:: CSS_NUMBER && value->fValue == 0)) || value->fValue < 0) 97 if (!(positiveLengthUnit(value->unit) || (value->unit == CSSPrimitiveValue:: CSS_NUMBER && value->fValue == 0)) || value->fValue < 0)
99 return false; 98 return false;
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 output.append('/'); 337 output.append('/');
339 output.append(printNumber(denominator)); 338 output.append(printNumber(denominator));
340 } else if (isID) { 339 } else if (isID) {
341 output.append(getValueName(id)); 340 output.append(getValueName(id));
342 } 341 }
343 342
344 return output.toString(); 343 return output.toString();
345 } 344 }
346 345
347 } // namespace 346 } // namespace
OLDNEW
« no previous file with comments | « sky/engine/core/css/CSSToLengthConversionData.cpp ('k') | sky/engine/core/css/MediaValues.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698