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

Unified Diff: Source/WebCore/html/HTMLTableElement.cpp

Issue 9567036: Merge 109362 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 10 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/WebCore/html/HTMLScriptElement.cpp ('k') | Source/WebCore/html/HTMLTextAreaElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/html/HTMLTableElement.cpp
===================================================================
--- Source/WebCore/html/HTMLTableElement.cpp (revision 109466)
+++ Source/WebCore/html/HTMLTableElement.cpp (working copy)
@@ -185,13 +185,15 @@
return 0;
}
- HTMLTableRowElement* lastRow = 0;
- HTMLTableRowElement* row = 0;
+ RefPtr<Node> protectFromMutationEvents(this);
+
+ RefPtr<HTMLTableRowElement> lastRow = 0;
+ RefPtr<HTMLTableRowElement> row = 0;
if (index == -1)
lastRow = HTMLTableRowsCollection::lastRow(this);
else {
for (int i = 0; i <= index; ++i) {
- row = HTMLTableRowsCollection::rowAfter(this, lastRow);
+ row = HTMLTableRowsCollection::rowAfter(this, lastRow.get());
if (!row) {
if (i != index) {
ec = INDEX_SIZE_ERR;
@@ -203,7 +205,7 @@
}
}
- ContainerNode* parent;
+ RefPtr<ContainerNode> parent;
if (lastRow)
parent = row ? row->parentNode() : lastRow->parentNode();
else {
@@ -218,7 +220,7 @@
}
RefPtr<HTMLTableRowElement> newRow = HTMLTableRowElement::create(document());
- parent->insertBefore(newRow, row, ec);
+ parent->insertBefore(newRow, row.get(), ec);
return newRow.release();
}
« no previous file with comments | « Source/WebCore/html/HTMLScriptElement.cpp ('k') | Source/WebCore/html/HTMLTextAreaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698