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

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

Issue 2409773002: Implement a parent check in sectionRowIndex (Closed)
Patch Set: Created 4 years, 2 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/imported/wpt/html/semantics/tabular-data/the-tr-element/sectionRowIndex-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/HTMLTableRowElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLTableRowElement.cpp b/third_party/WebKit/Source/core/html/HTMLTableRowElement.cpp
index 189ed69fcb9275e61213562f6403c7a4c839e53d..3a86b11717625760f3789adeb987a9e283a7ca37 100644
--- a/third_party/WebKit/Source/core/html/HTMLTableRowElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLTableRowElement.cpp
@@ -75,6 +75,10 @@ int HTMLTableRowElement::rowIndex() const {
}
int HTMLTableRowElement::sectionRowIndex() const {
+ ContainerNode* maybeTable = parentNode();
+ if (!(maybeTable && (isHTMLTableSectionElement(maybeTable) ||
+ isHTMLTableElement(maybeTable))))
+ return -1;
int rIndex = 0;
const Node* n = this;
do {
« no previous file with comments | « third_party/WebKit/LayoutTests/imported/wpt/html/semantics/tabular-data/the-tr-element/sectionRowIndex-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698