Chromium Code Reviews| Index: Source/core/dom/Element.cpp |
| diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp |
| index eb460333e5b95235ed2704f3e89e9b50ffecbc31..9138ab1f1020591a699e07fab941893d7b8c73c5 100644 |
| --- a/Source/core/dom/Element.cpp |
| +++ b/Source/core/dom/Element.cpp |
| @@ -2752,8 +2752,7 @@ int Element::getIntegralAttribute(const QualifiedName& attributeName) const |
| void Element::setIntegralAttribute(const QualifiedName& attributeName, int value) |
| { |
| - // FIXME: Need an AtomicString version of String::number. |
| - setAttribute(attributeName, String::number(value)); |
| + setAttribute(attributeName, AtomicString::number(value)); |
| } |
| unsigned Element::getUnsignedIntegralAttribute(const QualifiedName& attributeName) const |
| @@ -2763,8 +2762,22 @@ unsigned Element::getUnsignedIntegralAttribute(const QualifiedName& attributeNam |
| void Element::setUnsignedIntegralAttribute(const QualifiedName& attributeName, unsigned value) |
| { |
| - // FIXME: Need an AtomicString version of String::number. |
| - setAttribute(attributeName, String::number(value)); |
| + setAttribute(attributeName, AtomicString::number(value)); |
| +} |
| + |
| +double Element::getFloatingPointAttribute(const QualifiedName& attributeName, double fallbackValue) const |
|
eseidel
2013/11/25 00:46:43
This is the same as the next function. We just ne
Inactive
2013/11/25 01:19:38
parseToDoubleForNumberType() uses std::numeric_lim
Inactive
2013/11/25 01:28:13
Done.
|
| +{ |
| + return parseToDoubleForNumberType(getAttribute(attributeName), fallbackValue); |
| +} |
| + |
| +double Element::getFloatingPointAttribute(const QualifiedName& attributeName) const |
| +{ |
| + return parseToDoubleForNumberType(getAttribute(attributeName)); |
| +} |
| + |
| +void Element::setFloatingPointAttribute(const QualifiedName& attributeName, double value) |
| +{ |
| + setAttribute(attributeName, AtomicString::number(value)); |
| } |
| bool Element::childShouldCreateRenderer(const Node& child) const |