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

Unified Diff: Source/core/html/HTMLTableSectionElement.cpp

Issue 262163008: HTMLTableSectionElement.insertRow(0) / HTMLTableRowElement.insertCell(0) do not behave correctly (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix nits 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLTableRowElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLTableSectionElement.cpp
diff --git a/Source/core/html/HTMLTableSectionElement.cpp b/Source/core/html/HTMLTableSectionElement.cpp
index 30af275fb286ad5abe094adbc35317c2e21e542d..43de272ad0c7ffdf663b9137083a9f6e81568f05 100644
--- a/Source/core/html/HTMLTableSectionElement.cpp
+++ b/Source/core/html/HTMLTableSectionElement.cpp
@@ -73,12 +73,10 @@ PassRefPtr<HTMLElement> HTMLTableSectionElement::insertRow(int index, ExceptionS
}
RefPtr<HTMLTableRowElement> row = HTMLTableRowElement::create(document());
- if (numRows == index || index == -1) {
+ if (numRows == index || index == -1)
appendChild(row, exceptionState);
- } else {
- Node* n = index ? children->item(index) : firstChild();
- insertBefore(row, n, exceptionState);
- }
+ else
+ insertBefore(row, children->item(index), exceptionState);
return row.release();
}
« no previous file with comments | « Source/core/html/HTMLTableRowElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698