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 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
6 * (C) 2007 David Smith (catfish.man@gmail.com) | 6 * (C) 2007 David Smith (catfish.man@gmail.com) |
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. |
8 * (C) 2007 Eric Seidel (eric@webkit.org) | 8 * (C) 2007 Eric Seidel (eric@webkit.org) |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 2734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2745 return document().completeURL(value); | 2745 return document().completeURL(value); |
2746 } | 2746 } |
2747 | 2747 |
2748 int Element::getIntegralAttribute(const QualifiedName& attributeName) const | 2748 int Element::getIntegralAttribute(const QualifiedName& attributeName) const |
2749 { | 2749 { |
2750 return getAttribute(attributeName).string().toInt(); | 2750 return getAttribute(attributeName).string().toInt(); |
2751 } | 2751 } |
2752 | 2752 |
2753 void Element::setIntegralAttribute(const QualifiedName& attributeName, int value
) | 2753 void Element::setIntegralAttribute(const QualifiedName& attributeName, int value
) |
2754 { | 2754 { |
2755 // FIXME: Need an AtomicString version of String::number. | 2755 setAttribute(attributeName, AtomicString::number(value)); |
2756 setAttribute(attributeName, String::number(value)); | |
2757 } | 2756 } |
2758 | 2757 |
2759 unsigned Element::getUnsignedIntegralAttribute(const QualifiedName& attributeNam
e) const | 2758 unsigned Element::getUnsignedIntegralAttribute(const QualifiedName& attributeNam
e) const |
2760 { | 2759 { |
2761 return getAttribute(attributeName).string().toUInt(); | 2760 return getAttribute(attributeName).string().toUInt(); |
2762 } | 2761 } |
2763 | 2762 |
2764 void Element::setUnsignedIntegralAttribute(const QualifiedName& attributeName, u
nsigned value) | 2763 void Element::setUnsignedIntegralAttribute(const QualifiedName& attributeName, u
nsigned value) |
2765 { | 2764 { |
2766 // FIXME: Need an AtomicString version of String::number. | 2765 setAttribute(attributeName, AtomicString::number(value)); |
2767 setAttribute(attributeName, String::number(value)); | 2766 } |
| 2767 |
| 2768 double Element::getFloatingPointAttribute(const QualifiedName& attributeName, do
uble fallbackValue) const |
| 2769 { |
| 2770 return parseToDoubleForNumberType(getAttribute(attributeName), fallbackValue
); |
| 2771 } |
| 2772 |
| 2773 void Element::setFloatingPointAttribute(const QualifiedName& attributeName, doub
le value) |
| 2774 { |
| 2775 setAttribute(attributeName, AtomicString::number(value)); |
2768 } | 2776 } |
2769 | 2777 |
2770 bool Element::childShouldCreateRenderer(const Node& child) const | 2778 bool Element::childShouldCreateRenderer(const Node& child) const |
2771 { | 2779 { |
2772 // Only create renderers for SVG elements whose parents are SVG elements, or
for proper <svg xmlns="svgNS"> subdocuments. | 2780 // Only create renderers for SVG elements whose parents are SVG elements, or
for proper <svg xmlns="svgNS"> subdocuments. |
2773 if (child.isSVGElement()) | 2781 if (child.isSVGElement()) |
2774 return child.hasTagName(SVGNames::svgTag) || isSVGElement(); | 2782 return child.hasTagName(SVGNames::svgTag) || isSVGElement(); |
2775 | 2783 |
2776 return ContainerNode::childShouldCreateRenderer(child); | 2784 return ContainerNode::childShouldCreateRenderer(child); |
2777 } | 2785 } |
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3529 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi
stItems | 3537 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi
stItems |
3530 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg
i?id=88405 | 3538 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg
i?id=88405 |
3531 if (hasTagName(optionTag) || hasTagName(optgroupTag)) | 3539 if (hasTagName(optionTag) || hasTagName(optgroupTag)) |
3532 return false; | 3540 return false; |
3533 if (FullscreenElementStack::isActiveFullScreenElement(this)) | 3541 if (FullscreenElementStack::isActiveFullScreenElement(this)) |
3534 return false; | 3542 return false; |
3535 return true; | 3543 return true; |
3536 } | 3544 } |
3537 | 3545 |
3538 } // namespace WebCore | 3546 } // namespace WebCore |
OLD | NEW |