OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2003, 2010 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2010 Apple Inc. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 { | 170 { |
171 // 1) Non-negative number values are translated to px lengths. | 171 // 1) Non-negative number values are translated to px lengths. |
172 // 2) Negative number values are translated to auto. | 172 // 2) Negative number values are translated to auto. |
173 // 3) device-width and device-height are used as keywords. | 173 // 3) device-width and device-height are used as keywords. |
174 // 4) Other keywords and unknown values translate to 0.0. | 174 // 4) Other keywords and unknown values translate to 0.0. |
175 | 175 |
176 unsigned length = valueString.length(); | 176 unsigned length = valueString.length(); |
177 DEFINE_ARRAY_FOR_MATCHING(characters, valueString, 13); | 177 DEFINE_ARRAY_FOR_MATCHING(characters, valueString, 13); |
178 SWITCH(characters, length) { | 178 SWITCH(characters, length) { |
179 CASE("device-width") { | 179 CASE("device-width") { |
180 return Length(100, ViewportPercentageWidth); | 180 return Length(DeviceWidth); |
181 } | 181 } |
182 CASE("device-height") { | 182 CASE("device-height") { |
183 return Length(100, ViewportPercentageHeight); | 183 return Length(DeviceHeight); |
184 } | 184 } |
185 } | 185 } |
186 | 186 |
187 float value = parsePositiveNumber(keyString, valueString); | 187 float value = parsePositiveNumber(keyString, valueString); |
188 | 188 |
189 if (value < 0) | 189 if (value < 0) |
190 return Length(); // auto | 190 return Length(); // auto |
191 | 191 |
192 return Length(clampLengthValue(value), Fixed); | 192 return Length(clampLengthValue(value), Fixed); |
193 } | 193 } |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 { | 480 { |
481 return getAttribute(http_equivAttr); | 481 return getAttribute(http_equivAttr); |
482 } | 482 } |
483 | 483 |
484 const AtomicString& HTMLMetaElement::name() const | 484 const AtomicString& HTMLMetaElement::name() const |
485 { | 485 { |
486 return getNameAttribute(); | 486 return getNameAttribute(); |
487 } | 487 } |
488 | 488 |
489 } | 489 } |
OLD | NEW |