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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 // true. | 424 // true. |
425 toSVGElement(this)->synchronizeAnimatedSVGAttribute(QualifiedName(nullAt
om, localName, nullAtom)); | 425 toSVGElement(this)->synchronizeAnimatedSVGAttribute(QualifiedName(nullAt
om, localName, nullAtom)); |
426 } | 426 } |
427 } | 427 } |
428 | 428 |
429 const AtomicString& Element::getAttribute(const QualifiedName& name) const | 429 const AtomicString& Element::getAttribute(const QualifiedName& name) const |
430 { | 430 { |
431 if (!elementData()) | 431 if (!elementData()) |
432 return nullAtom; | 432 return nullAtom; |
433 synchronizeAttribute(name); | 433 synchronizeAttribute(name); |
434 if (const Attribute* attribute = findAttributeByName(name)) | 434 if (const Attribute* attribute = attributes().find(name)) |
435 return attribute->value(); | 435 return attribute->value(); |
436 return nullAtom; | 436 return nullAtom; |
437 } | 437 } |
438 | 438 |
439 bool Element::shouldIgnoreAttributeCase() const | 439 bool Element::shouldIgnoreAttributeCase() const |
440 { | 440 { |
441 return isHTMLElement() && document().isHTMLDocument(); | 441 return isHTMLElement() && document().isHTMLDocument(); |
442 } | 442 } |
443 | 443 |
444 void Element::scrollIntoView(bool alignToTop) | 444 void Element::scrollIntoView(bool alignToTop) |
(...skipping 2179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2624 ElementRareData& rareData = ensureElementRareData(); | 2624 ElementRareData& rareData = ensureElementRareData(); |
2625 if (!rareData.dataset()) | 2625 if (!rareData.dataset()) |
2626 rareData.setDataset(DatasetDOMStringMap::create(this)); | 2626 rareData.setDataset(DatasetDOMStringMap::create(this)); |
2627 return *rareData.dataset(); | 2627 return *rareData.dataset(); |
2628 } | 2628 } |
2629 | 2629 |
2630 KURL Element::getURLAttribute(const QualifiedName& name) const | 2630 KURL Element::getURLAttribute(const QualifiedName& name) const |
2631 { | 2631 { |
2632 #if ASSERT_ENABLED | 2632 #if ASSERT_ENABLED |
2633 if (elementData()) { | 2633 if (elementData()) { |
2634 if (const Attribute* attribute = findAttributeByName(name)) | 2634 if (const Attribute* attribute = attributes().find(name)) |
2635 ASSERT(isURLAttribute(*attribute)); | 2635 ASSERT(isURLAttribute(*attribute)); |
2636 } | 2636 } |
2637 #endif | 2637 #endif |
2638 return document().completeURL(stripLeadingAndTrailingHTMLSpaces(getAttribute
(name))); | 2638 return document().completeURL(stripLeadingAndTrailingHTMLSpaces(getAttribute
(name))); |
2639 } | 2639 } |
2640 | 2640 |
2641 KURL Element::getNonEmptyURLAttribute(const QualifiedName& name) const | 2641 KURL Element::getNonEmptyURLAttribute(const QualifiedName& name) const |
2642 { | 2642 { |
2643 #if ASSERT_ENABLED | 2643 #if ASSERT_ENABLED |
2644 if (elementData()) { | 2644 if (elementData()) { |
2645 if (const Attribute* attribute = findAttributeByName(name)) | 2645 if (const Attribute* attribute = attributes().find(name)) |
2646 ASSERT(isURLAttribute(*attribute)); | 2646 ASSERT(isURLAttribute(*attribute)); |
2647 } | 2647 } |
2648 #endif | 2648 #endif |
2649 String value = stripLeadingAndTrailingHTMLSpaces(getAttribute(name)); | 2649 String value = stripLeadingAndTrailingHTMLSpaces(getAttribute(name)); |
2650 if (value.isEmpty()) | 2650 if (value.isEmpty()) |
2651 return KURL(); | 2651 return KURL(); |
2652 return document().completeURL(value); | 2652 return document().completeURL(value); |
2653 } | 2653 } |
2654 | 2654 |
2655 int Element::getIntegralAttribute(const QualifiedName& attributeName) const | 2655 int Element::getIntegralAttribute(const QualifiedName& attributeName) const |
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3353 | 3353 |
3354 void Element::trace(Visitor* visitor) | 3354 void Element::trace(Visitor* visitor) |
3355 { | 3355 { |
3356 if (hasRareData()) | 3356 if (hasRareData()) |
3357 visitor->trace(elementRareData()); | 3357 visitor->trace(elementRareData()); |
3358 visitor->trace(m_elementData); | 3358 visitor->trace(m_elementData); |
3359 ContainerNode::trace(visitor); | 3359 ContainerNode::trace(visitor); |
3360 } | 3360 } |
3361 | 3361 |
3362 } // namespace WebCore | 3362 } // namespace WebCore |
OLD | NEW |