| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) | 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) |
| 3 * (C) 1997 Torben Weis (weis@kde.org) | 3 * (C) 1997 Torben Weis (weis@kde.org) |
| 4 * (C) 1998 Waldo Bastian (bastian@kde.org) | 4 * (C) 1998 Waldo Bastian (bastian@kde.org) |
| 5 * (C) 1999 Lars Knoll (knoll@kde.org) | 5 * (C) 1999 Lars Knoll (knoll@kde.org) |
| 6 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 6 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2010, 2011 Apple Inc. All rights
reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2010, 2011 Apple Inc. All rights
reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 insertBefore(newHead, child, exceptionState); | 101 insertBefore(newHead, child, exceptionState); |
| 102 } | 102 } |
| 103 | 103 |
| 104 HTMLTableSectionElement* HTMLTableElement::tFoot() const | 104 HTMLTableSectionElement* HTMLTableElement::tFoot() const |
| 105 { | 105 { |
| 106 return toHTMLTableSectionElement(Traversal<HTMLElement>::firstChild(*this, H
asHTMLTagName(tfootTag))); | 106 return toHTMLTableSectionElement(Traversal<HTMLElement>::firstChild(*this, H
asHTMLTagName(tfootTag))); |
| 107 } | 107 } |
| 108 | 108 |
| 109 void HTMLTableElement::setTFoot(HTMLTableSectionElement* newFoot, ExceptionState
& exceptionState) | 109 void HTMLTableElement::setTFoot(HTMLTableSectionElement* newFoot, ExceptionState
& exceptionState) |
| 110 { | 110 { |
| 111 if (newFoot && !newFoot->hasTagName(tfootTag)) { |
| 112 exceptionState.throwDOMException(HierarchyRequestError, "Not a tfoot ele
ment."); |
| 113 return; |
| 114 } |
| 115 |
| 111 deleteTFoot(); | 116 deleteTFoot(); |
| 112 | 117 |
| 113 HTMLElement* child; | 118 if (newFoot) |
| 114 for (child = Traversal<HTMLElement>::firstChild(*this); child; child = Trave
rsal<HTMLElement>::nextSibling(*child)) { | 119 appendChild(newFoot, exceptionState); |
| 115 if (!child->hasTagName(captionTag) && !child->hasTagName(colgroupTag) &&
!child->hasTagName(theadTag)) | |
| 116 break; | |
| 117 } | |
| 118 | |
| 119 insertBefore(newFoot, child, exceptionState); | |
| 120 } | 120 } |
| 121 | 121 |
| 122 HTMLTableSectionElement* HTMLTableElement::createTHead() | 122 HTMLTableSectionElement* HTMLTableElement::createTHead() |
| 123 { | 123 { |
| 124 if (HTMLTableSectionElement* existingHead = tHead()) | 124 if (HTMLTableSectionElement* existingHead = tHead()) |
| 125 return existingHead; | 125 return existingHead; |
| 126 HTMLTableSectionElement* head = HTMLTableSectionElement::create(theadTag, do
cument()); | 126 HTMLTableSectionElement* head = HTMLTableSectionElement::create(theadTag, do
cument()); |
| 127 setTHead(head, IGNORE_EXCEPTION); | 127 setTHead(head, IGNORE_EXCEPTION); |
| 128 return head; | 128 return head; |
| 129 } | 129 } |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 return getAttribute(summaryAttr); | 559 return getAttribute(summaryAttr); |
| 560 } | 560 } |
| 561 | 561 |
| 562 DEFINE_TRACE(HTMLTableElement) | 562 DEFINE_TRACE(HTMLTableElement) |
| 563 { | 563 { |
| 564 visitor->trace(m_sharedCellStyle); | 564 visitor->trace(m_sharedCellStyle); |
| 565 HTMLElement::trace(visitor); | 565 HTMLElement::trace(visitor); |
| 566 } | 566 } |
| 567 | 567 |
| 568 } // namespace blink | 568 } // namespace blink |
| OLD | NEW |