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(); |
} |