Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(612)

Side by Side Diff: Source/core/html/HTMLTableElement.cpp

Issue 277863002: Oilpan: Prepare moving table related elements to oilpan. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLTableElement.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 PassRefPtrWillBeRawPtr<HTMLTableElement> HTMLTableElement::create(Document& docu ment) 64 PassRefPtrWillBeRawPtr<HTMLTableElement> HTMLTableElement::create(Document& docu ment)
65 { 65 {
66 return adoptRefWillBeRefCountedGarbageCollected(new HTMLTableElement(documen t)); 66 return adoptRefWillBeRefCountedGarbageCollected(new HTMLTableElement(documen t));
67 } 67 }
68 68
69 HTMLTableCaptionElement* HTMLTableElement::caption() const 69 HTMLTableCaptionElement* HTMLTableElement::caption() const
70 { 70 {
71 return Traversal<HTMLTableCaptionElement>::firstChild(*this); 71 return Traversal<HTMLTableCaptionElement>::firstChild(*this);
72 } 72 }
73 73
74 void HTMLTableElement::setCaption(PassRefPtr<HTMLTableCaptionElement> newCaption , ExceptionState& exceptionState) 74 void HTMLTableElement::setCaption(PassRefPtrWillBeRawPtr<HTMLTableCaptionElement > newCaption, ExceptionState& exceptionState)
75 { 75 {
76 deleteCaption(); 76 deleteCaption();
77 insertBefore(newCaption, firstChild(), exceptionState); 77 insertBefore(newCaption, firstChild(), exceptionState);
78 } 78 }
79 79
80 HTMLTableSectionElement* HTMLTableElement::tHead() const 80 HTMLTableSectionElement* HTMLTableElement::tHead() const
81 { 81 {
82 for (Element* child = ElementTraversal::firstWithin(*this); child; child = E lementTraversal::nextSibling(*child)) { 82 for (Element* child = ElementTraversal::firstWithin(*this); child; child = E lementTraversal::nextSibling(*child)) {
83 if (child->hasTagName(theadTag)) 83 if (child->hasTagName(theadTag))
84 return toHTMLTableSectionElement(child); 84 return toHTMLTableSectionElement(child);
85 } 85 }
86 return 0; 86 return 0;
87 } 87 }
88 88
89 void HTMLTableElement::setTHead(PassRefPtr<HTMLTableSectionElement> newHead, Exc eptionState& exceptionState) 89 void HTMLTableElement::setTHead(PassRefPtrWillBeRawPtr<HTMLTableSectionElement> newHead, ExceptionState& exceptionState)
90 { 90 {
91 deleteTHead(); 91 deleteTHead();
92 92
93 Element* child; 93 Element* child;
94 for (child = ElementTraversal::firstWithin(*this); child; child = ElementTra versal::nextSibling(*child)) { 94 for (child = ElementTraversal::firstWithin(*this); child; child = ElementTra versal::nextSibling(*child)) {
95 if (!child->hasTagName(captionTag) && !child->hasTagName(colgroupTag)) 95 if (!child->hasTagName(captionTag) && !child->hasTagName(colgroupTag))
96 break; 96 break;
97 } 97 }
98 98
99 insertBefore(newHead, child, exceptionState); 99 insertBefore(newHead, child, exceptionState);
100 } 100 }
101 101
102 HTMLTableSectionElement* HTMLTableElement::tFoot() const 102 HTMLTableSectionElement* HTMLTableElement::tFoot() const
103 { 103 {
104 for (Element* child = ElementTraversal::firstWithin(*this); child; child = E lementTraversal::nextSibling(*child)) { 104 for (Element* child = ElementTraversal::firstWithin(*this); child; child = E lementTraversal::nextSibling(*child)) {
105 if (child->hasTagName(tfootTag)) 105 if (child->hasTagName(tfootTag))
106 return toHTMLTableSectionElement(child); 106 return toHTMLTableSectionElement(child);
107 } 107 }
108 return 0; 108 return 0;
109 } 109 }
110 110
111 void HTMLTableElement::setTFoot(PassRefPtr<HTMLTableSectionElement> newFoot, Exc eptionState& exceptionState) 111 void HTMLTableElement::setTFoot(PassRefPtrWillBeRawPtr<HTMLTableSectionElement> newFoot, ExceptionState& exceptionState)
112 { 112 {
113 deleteTFoot(); 113 deleteTFoot();
114 114
115 Element* child; 115 Element* child;
116 for (child = ElementTraversal::firstWithin(*this); child; child = ElementTra versal::nextSibling(*child)) { 116 for (child = ElementTraversal::firstWithin(*this); child; child = ElementTra versal::nextSibling(*child)) {
117 if (!child->hasTagName(captionTag) && !child->hasTagName(colgroupTag) && !child->hasTagName(theadTag)) 117 if (!child->hasTagName(captionTag) && !child->hasTagName(colgroupTag) && !child->hasTagName(theadTag))
118 break; 118 break;
119 } 119 }
120 120
121 insertBefore(newFoot, child, exceptionState); 121 insertBefore(newFoot, child, exceptionState);
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 return getAttribute(summaryAttr); 578 return getAttribute(summaryAttr);
579 } 579 }
580 580
581 void HTMLTableElement::trace(Visitor* visitor) 581 void HTMLTableElement::trace(Visitor* visitor)
582 { 582 {
583 visitor->trace(m_sharedCellStyle); 583 visitor->trace(m_sharedCellStyle);
584 HTMLElement::trace(visitor); 584 HTMLElement::trace(visitor);
585 } 585 }
586 586
587 } 587 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLTableElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698