Closed
Bug 668819
Opened 13 years ago
Closed 11 years ago
HTMLTableColElement span should be unsigned long
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
DUPLICATE
of bug 824907
People
(Reporter: dzbarsky, Assigned: atulagrwl)
References
Details
Attachments
(1 file, 1 obsolete file)
5.03 KB,
patch
|
Details | Diff | Splinter Review |
See http://www.whatwg.org/specs/web-apps/current-work/multipage/tabular-data.html#htmltablecolelement
Comment 1•13 years ago
|
||
I assume that as you file these you're checking what browsers actually implement right now (that is, whether the spec is sane)?
Updated•13 years ago
|
Assignee: nobody → atulagrwl
Assignee | ||
Comment 2•13 years ago
|
||
Attachment #558068 -
Flags: review?(Olli.Pettay)
Assignee | ||
Updated•13 years ago
|
Status: NEW → ASSIGNED
Comment 3•13 years ago
|
||
Comment on attachment 558068 [details] [diff] [review] Patch v1 >--- /dev/null >+++ b/content/html/content/test/test_bug668819.html Please rename the test "test_colgroup_attributes_reflection.html" and add a "test_col_attributes_reflection.html" that does the same for "col" elements. >+reflectUnsignedInt({ >+ element: colgroup, >+ attribute: "span", >+ nonZero: true, >+ defaultValue: 1, >+}); And drop the defaultValue, it's not necessary.
Assignee | ||
Comment 4•13 years ago
|
||
Accommodating changes suggested by Ms2ger.
Attachment #558068 -
Attachment is obsolete: true
Attachment #558068 -
Flags: review?(Olli.Pettay)
Comment 5•13 years ago
|
||
Comment on attachment 558070 [details] [diff] [review] Patch v2 Review of attachment 558070 [details] [diff] [review]: ----------------------------------------------------------------- ::: content/html/content/src/nsHTMLTableColElement.cpp @@ +113,5 @@ > > NS_IMPL_STRING_ATTR(nsHTMLTableColElement, Align, align) > NS_IMPL_STRING_ATTR(nsHTMLTableColElement, Ch, _char) > NS_IMPL_STRING_ATTR(nsHTMLTableColElement, ChOff, charoff) > +NS_IMPL_UINT_ATTR_NON_ZERO_DEFAULT_VALUE(nsHTMLTableColElement, Span, span, 1) Could you update the ::ParseAttribute() method? There is a max value for span and I wonder why and if we can remove it. This is unlikely following the specs.
Comment 6•13 years ago
|
||
The max value is there to prevent accidental DoS via huge colspan values, because on the layout side CSS requires storing information in tables on a per-logical-cell basis, so the amount of information stored is O(N^M) where N is number of logical rows and M is number of columns. If you have <td rowspan="1000000" colspan="1000000"> then layout needs to store 1e12 pieces of data. Needless to say, this does not work well. Furthermore, last I checked there was some cross-browser compat on the exact caps for rowspan and colspan, or at least we and WebKit and maybe Presto had coordinated ours. So if that's not what the spec says, the spec probably needs changing.
Comment 7•13 years ago
|
||
Do we really want this limitation to be part of the attribute reflection? it could be part of the layout code too.
Comment 8•13 years ago
|
||
I'm fine either way; what do other UAs do?
Comment 9•13 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #8) > I'm fine either way; what do other UAs do? Webkit and Gecko seems to have the same behavior that isn't the one the spec requires. Presto and IE9 reflects the value as expected (with a few bugs not related to this specific attribute). It would be interesting to know what IE6 does. The specs might request that for retro-compatibility.
Reporter | ||
Updated•11 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•