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

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

Issue 180143003: Have LiveNodeListBase::ownerNode() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 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/core/html/HTMLTableRowsCollection.h ('k') | Source/core/html/LabelsNodeList.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLTableRowsCollection.cpp
diff --git a/Source/core/html/HTMLTableRowsCollection.cpp b/Source/core/html/HTMLTableRowsCollection.cpp
index 5dbaeddc23f71d10e9e074579bfdadc11a3eb904..21efc2cb3945bcc7c270e51f37c3832656d863f8 100644
--- a/Source/core/html/HTMLTableRowsCollection.cpp
+++ b/Source/core/html/HTMLTableRowsCollection.cpp
@@ -62,7 +62,7 @@ static inline HTMLTableRowElement* findTableRowElementInChildren(Element& curren
return 0;
}
-HTMLTableRowElement* HTMLTableRowsCollection::rowAfter(HTMLTableElement* table, HTMLTableRowElement* previous)
+HTMLTableRowElement* HTMLTableRowsCollection::rowAfter(HTMLTableElement& table, HTMLTableRowElement* previous)
{
Element* child = 0;
@@ -77,7 +77,7 @@ HTMLTableRowElement* HTMLTableRowsCollection::rowAfter(HTMLTableElement* table,
// If still looking at head sections, find the first row in the next head section.
if (!previous)
- child = ElementTraversal::firstWithin(*table);
+ child = ElementTraversal::firstWithin(table);
else if (isInHead(previous))
child = ElementTraversal::nextSibling(*previous->parentNode());
for (; child; child = ElementTraversal::nextSibling(*child)) {
@@ -89,7 +89,7 @@ HTMLTableRowElement* HTMLTableRowsCollection::rowAfter(HTMLTableElement* table,
// If still looking at top level and bodies, find the next row in top level or the first in the next body section.
if (!previous || isInHead(previous))
- child = ElementTraversal::firstWithin(*table);
+ child = ElementTraversal::firstWithin(table);
else if (previous->parentNode() == table)
child = ElementTraversal::nextSibling(*previous);
else if (isInBody(previous))
@@ -105,7 +105,7 @@ HTMLTableRowElement* HTMLTableRowsCollection::rowAfter(HTMLTableElement* table,
// Find the first row in the next foot section.
if (!previous || !isInFoot(previous))
- child = ElementTraversal::firstWithin(*table);
+ child = ElementTraversal::firstWithin(table);
else
child = ElementTraversal::nextSibling(*previous->parentNode());
for (; child; child = ElementTraversal::nextSibling(*child)) {
@@ -118,9 +118,9 @@ HTMLTableRowElement* HTMLTableRowsCollection::rowAfter(HTMLTableElement* table,
return 0;
}
-HTMLTableRowElement* HTMLTableRowsCollection::lastRow(HTMLTableElement* table)
+HTMLTableRowElement* HTMLTableRowsCollection::lastRow(HTMLTableElement& table)
{
- for (Node* child = table->lastChild(); child; child = child->previousSibling()) {
+ for (Node* child = table.lastChild(); child; child = child->previousSibling()) {
if (child->hasTagName(tfootTag)) {
for (Node* grandchild = child->lastChild(); grandchild; grandchild = grandchild->previousSibling()) {
if (isHTMLTableRowElement(grandchild))
@@ -129,7 +129,7 @@ HTMLTableRowElement* HTMLTableRowsCollection::lastRow(HTMLTableElement* table)
}
}
- for (Node* child = table->lastChild(); child; child = child->previousSibling()) {
+ for (Node* child = table.lastChild(); child; child = child->previousSibling()) {
if (isHTMLTableRowElement(child))
return toHTMLTableRowElement(child);
if (child->hasTagName(tbodyTag)) {
@@ -140,7 +140,7 @@ HTMLTableRowElement* HTMLTableRowsCollection::lastRow(HTMLTableElement* table)
}
}
- for (Node* child = table->lastChild(); child; child = child->previousSibling()) {
+ for (Node* child = table.lastChild(); child; child = child->previousSibling()) {
if (child->hasTagName(theadTag)) {
for (Node* grandchild = child->lastChild(); grandchild; grandchild = grandchild->previousSibling()) {
if (isHTMLTableRowElement(grandchild))
« no previous file with comments | « Source/core/html/HTMLTableRowsCollection.h ('k') | Source/core/html/LabelsNodeList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698