WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
93738
table cell.cellIndex should return -1 if there is no parent table
https://bugs.webkit.org/show_bug.cgi?id=93738
Summary
table cell.cellIndex should return -1 if there is no parent table
Ms2ger (he/him; ⌚ UTC+1/+2)
Reported
2012-08-10 13:05:39 PDT
See <
http://w3c-test.org/html/tests/submission/Ms2ger/the-elements-of-html/tabular-data/attributes-common-to-td-and-th-elements/cellIndex.html
>; spec was changed in <
http://html5.org/tools/web-apps-tracker?from=7242&to=7243
>.
Attachments
Patch
(6.32 KB, patch)
2012-08-11 09:09 PDT
,
Pravin D
no flags
Details
Formatted Diff
Diff
Patch
(7.55 KB, patch)
2012-08-12 05:57 PDT
,
Pravin D
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Pravin D
Comment 1
2012-08-11 09:09:40 PDT
Created
attachment 157874
[details]
Patch
Pravin D
Comment 2
2012-08-11 09:13:17 PDT
A little off the topic... We have functions // FIXME: need to implement cellIndex int cellIndex() const { return 0; } void setCellIndex(int) { } in RenderTableCell.h ... Is this still required ? It does seem to be used anywhere... It was added in
http://trac.webkit.org/browser/trunk/WebCore/khtml/dom/html_table.h?annotate=blame&rev=4
Eric Seidel (no email)
Comment 3
2012-08-12 02:55:34 PDT
Comment on
attachment 157874
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=157874&action=review
It also appears we have a RenderTableCell::cellIndex() function which does nothing and probably shoudl be removed.
> Source/WebCore/html/HTMLTableCellElement.cpp:73 > + int index = -1; > + if (!parentElement() || !parentElement()->hasTagName(trTag)) > + return index; > + > + index = 0;
I would have jsut used "return -1" here, and left int index = 0; as it was. It saves you a line of typing.
Eric Seidel (no email)
Comment 4
2012-08-12 02:56:25 PDT
Comment on
attachment 157874
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=157874&action=review
> LayoutTests/fast/table/cellIndex-of-cell-with-different-parents.html:33 > +shouldBeTrue('th_with_tbody_parent.cellIndex == -1');
This could read shouldBe("th_with_tbody_parent.cellIndex", "-1");
Pravin D
Comment 5
2012-08-12 05:57:30 PDT
Created
attachment 157894
[details]
Patch
Eric Seidel (no email)
Comment 6
2012-08-12 11:01:54 PDT
Comment on
attachment 157894
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=157894&action=review
Thanks!
> Source/WebCore/html/HTMLTableCellElement.cpp:69 > int index = 0;
We don't do K&R style anymore. This declaration could be inline, right before the for() below, but the patch overall is fine, and clearly the rest of this file needs a style cleanup some day anyway.
WebKit Review Bot
Comment 7
2012-08-12 11:14:46 PDT
Comment on
attachment 157894
[details]
Patch Clearing flags on attachment: 157894 Committed
r125380
: <
http://trac.webkit.org/changeset/125380
>
WebKit Review Bot
Comment 8
2012-08-12 11:14:50 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug