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

Side by Side Diff: Source/core/css/CSSPrimitiveValue.cpp

Issue 427683002: Bug fix - rem & ch in MQs/sizes treated as unknown units (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix ch as well Created 6 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
« no previous file with comments | « no previous file | Source/core/css/MediaQueryExp.cpp » ('j') | Source/core/css/MediaQueryExp.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2012 Apple Inc. All rights reserv ed. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2012 Apple Inc. All rights reserv ed.
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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 table.set(String("s"), CSSPrimitiveValue::CSS_S); 133 table.set(String("s"), CSSPrimitiveValue::CSS_S);
134 table.set(String("hz"), CSSPrimitiveValue::CSS_HZ); 134 table.set(String("hz"), CSSPrimitiveValue::CSS_HZ);
135 table.set(String("khz"), CSSPrimitiveValue::CSS_KHZ); 135 table.set(String("khz"), CSSPrimitiveValue::CSS_KHZ);
136 table.set(String("dpi"), CSSPrimitiveValue::CSS_DPI); 136 table.set(String("dpi"), CSSPrimitiveValue::CSS_DPI);
137 table.set(String("dpcm"), CSSPrimitiveValue::CSS_DPCM); 137 table.set(String("dpcm"), CSSPrimitiveValue::CSS_DPCM);
138 table.set(String("dppx"), CSSPrimitiveValue::CSS_DPPX); 138 table.set(String("dppx"), CSSPrimitiveValue::CSS_DPPX);
139 table.set(String("vw"), CSSPrimitiveValue::CSS_VW); 139 table.set(String("vw"), CSSPrimitiveValue::CSS_VW);
140 table.set(String("vh"), CSSPrimitiveValue::CSS_VH); 140 table.set(String("vh"), CSSPrimitiveValue::CSS_VH);
141 table.set(String("vmax"), CSSPrimitiveValue::CSS_VMIN); 141 table.set(String("vmax"), CSSPrimitiveValue::CSS_VMIN);
142 table.set(String("vmin"), CSSPrimitiveValue::CSS_VMAX); 142 table.set(String("vmin"), CSSPrimitiveValue::CSS_VMAX);
143 table.set(String("rem"), CSSPrimitiveValue::CSS_REMS);
144 table.set(String("fr"), CSSPrimitiveValue::CSS_FR);
145 table.set(String("turn"), CSSPrimitiveValue::CSS_TURN);
146 table.set(String("ch"), CSSPrimitiveValue::CSS_CHS);
143 return table; 147 return table;
144 } 148 }
145 149
146 150
147 CSSPrimitiveValue::UnitType CSSPrimitiveValue::fromName(const String& unit) 151 CSSPrimitiveValue::UnitType CSSPrimitiveValue::fromName(const String& unit)
148 { 152 {
149 DEFINE_STATIC_LOCAL(StringToUnitTable, unitTable, (createStringToUnitTable() )); 153 DEFINE_STATIC_LOCAL(StringToUnitTable, unitTable, (createStringToUnitTable() ));
150 return unitTable.get(unit.lower()); 154 return unitTable.get(unit.lower());
151 } 155 }
152 156
(...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1435 visitor->trace(m_value.shape); 1439 visitor->trace(m_value.shape);
1436 break; 1440 break;
1437 default: 1441 default:
1438 break; 1442 break;
1439 } 1443 }
1440 #endif 1444 #endif
1441 CSSValue::traceAfterDispatch(visitor); 1445 CSSValue::traceAfterDispatch(visitor);
1442 } 1446 }
1443 1447
1444 } // namespace blink 1448 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/MediaQueryExp.cpp » ('j') | Source/core/css/MediaQueryExp.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698