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

Unified Diff: third_party/WebKit/Source/core/html/HTMLTableElement.cpp

Issue 2338013007: Adapt to changes in html5 spec related to tfoot (Closed)
Patch Set: Patch for landing Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/platform/linux/tables/mozilla/bugs/bug30418-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLTableElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLTableElement.cpp b/third_party/WebKit/Source/core/html/HTMLTableElement.cpp
index adf27d2dc03c471bac97c74918be42694919ff18..481cb8c5939787ec52e462469940a9361da19555 100644
--- a/third_party/WebKit/Source/core/html/HTMLTableElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLTableElement.cpp
@@ -108,15 +108,15 @@ HTMLTableSectionElement* HTMLTableElement::tFoot() const
void HTMLTableElement::setTFoot(HTMLTableSectionElement* newFoot, ExceptionState& exceptionState)
{
- deleteTFoot();
-
- HTMLElement* child;
- for (child = Traversal<HTMLElement>::firstChild(*this); child; child = Traversal<HTMLElement>::nextSibling(*child)) {
- if (!child->hasTagName(captionTag) && !child->hasTagName(colgroupTag) && !child->hasTagName(theadTag))
- break;
+ if (newFoot && !newFoot->hasTagName(tfootTag)) {
+ exceptionState.throwDOMException(HierarchyRequestError, "Not a tfoot element.");
+ return;
}
- insertBefore(newFoot, child, exceptionState);
+ deleteTFoot();
+
+ if (newFoot)
+ appendChild(newFoot, exceptionState);
}
HTMLTableSectionElement* HTMLTableElement::createTHead()
« no previous file with comments | « third_party/WebKit/LayoutTests/platform/linux/tables/mozilla/bugs/bug30418-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698