-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can we remove the HTMLTableDataCellElement/HTMLTableHeaderCellElement fiction? #1115
Comments
I thought we did this as part of removing table sorting. Yes, we should fix this. |
We discussed that as part of that, but decided not to since it would be more complicated than just removing table sorting. E.g., if we want to keep the current conformance requirements, we cannot really make this change, since |
Do browsers have those distinct obsolete members? |
I think @annevk is saying that it will just take a bit of work to spec since we'll want to say something like "This attribute only has meaning for |
Ever since table sorting was introduced, HTMLTableCellElement was split into two descendant interfaces, HTMLTableDataCellElement for <td>, and HTMLTableHeaderCellElement for <th>. No browser ever implemented this split. Although table sorting was removed in 59b7e24, the split remained; we now remove it, fixing #1115.
Ah, I see. I guess Gecko reflects abbr and scope as strings (on both th and td) but does absolutely nothing else with them. Haven't checked other impls. |
Need to update WPT too. |
Filed web-platform-tests/wpt#2908 to track that. |
FYI, we had implemented this in WebKit: I think IE had this as well but I am not 100% sure. Anyway, I am now rolling out the change via: Next time, I'll wait for Firefox and Chrome to follow the spec before implementing :/ |
Oh my goodness, we're so sorry! We'll try to be better about testing in nightlies and giving everyone a heads-up in the future :(. This should not happen again. |
It is a good thing you guys updated the web-platform-tests so we noticed the change before actually shipping HTMLTableDataCellElement / HTMLTableHeaderCellElement. |
In the future, checking Safari Technology Preview [1], rather than shipping Safari would be nice. We have been making an effort aligning our implementation with the spec. |
Yep. I specifically ordered a Mac for testing Safari Tech Preview after opening a couple conformance bugs and learning they were fixed. It is sitting on my desk. That's part of why I'm more confident we won't let this kind of thing happen again. It's also a lesson to us to make a greater effort to get sign-off from all implementers, even on changes that seem like they're just aligning with reality. It's already risky enough for implementers to go first in implementing something; we should not be making it more risky in this way. Being willing to go first should be celebrated, not punished. |
Unfortunately, Safari Technology Preview requires the most recent Mac OS version, which not everyone may have available. Amusingly, WebKit nightlies are less strict about that. For the rest, I agree that people making changes first should not be punished, having been in that position myself. But I also think implementors should be very wary of making changes that move from "everyone is interoperable" to "now we follow the spec and are no longer doing the same thing as everyone else". In particular, there's a very good chance that a spec that is not matching something that every implementation does is just wrong. |
Oh, and I guess my point was that implementors should actually talk to each other about making such breaking changes. Chrome and Firefox both have public intent-to-implement/intent-to-ship processes that allow other implementors and spec editors to have an idea of what's going on and have a built-in "what do other UAs do?" sanity-check step. I wish other implementors would adopt something similar... |
FYI, WebKit nightlies still exist as well if your system does not support Safari Technology preview. Also, the reason we made the change in WebKit was because I believe IE/Edge already had implemented it (At least this is what my changelog says). So not everyone was interoperable unless I incorrectly tested IE / Edge at the time. |
I've just tested Edge, and it's true: they implemented this. We should have caught that as well. Given that, with Edge + Safari TP on one side vs. Chrome and Firefox on the other, should we revert the removal? I think the separate classes is a better model... |
FYI, W3C version has these two classes separate: https://w3c.github.io/html/tabular-data.html#the-th-element |
Yes, they haven't managed to copy over this change yet, although it's in their list |
I think we should revert the change and keep two classes separate given |
In WebKit, th.scope only returns known values while td.scope does simple reflection. |
I don't have a strong opinion on this. I had been told that in IE these used the same interface, but if Edge is not matching IE here, I guess I don't feel too strongly about changing the behavior. I should note that the behavior of scope/abbr in the spec still does not match the WebKit implementation described above, so the spec needed some sort of change here no matter what... |
@bzbarsky: Well, iirc the spec has scope / abbr on HTMLTableHeaderCellElement but not on HTMLTableDataCellElement. We merely had them on both in WebKit for backward compatibility. |
@bzbarsky: As far as I can tell, our implementation of th.scope / th.abbr matched the spec:
The only difference was that we had them on td as well for backward compatibility, unless I am missing something? |
@cdumez The point is, the spec needs to have them on whatever it is |
@bzbarsky: I see. I agree with you then. And no, I have have data saying they not needed on td for web-compatibility, which is why I kept them on td in WebKit. |
This gets worse and worse. Edge has scope on TableCell (the base class) and TableHeaderCell (th) but not on TableDataCell (td). It has abbr on the base class but not on the two derived classes. Test at http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=4306 So we have four mutually-incompatible models here:
With this in mind two proposals make sense to me:
Given that every browser has scope and abbr on tds either directly or indirectly, I don't think we should try to go down the route of the old spec and remove them from there. |
I personally don't mind going with the Firefox / Chrome behavior at this point given that:
|
OK. I think we should probably do that then, although this still stands out as a particularly bad oversight by us spec editors. You aren't planning to implement XMLDocument.prototype.load, are you? :) #1478 |
Ok, WebKit agrees with the spec again: http://trac.webkit.org/changeset/202937. |
The old spec had abbr on td as well. (In the obsolete section.) https://github.com/whatwg/html/pull/1125/files#diff-36cd38f49b9afa08222c0dc9ebfe35ebL113151 |
HTMLTableDataCellElement never actually existed in browsers; instead it existed only in the HTML spec — before being removed in whatwg/html@e383ae2: > Ever since the dawn of HTML > (whatwg/html@2ac31bb) there have been two > table cell interfaces, HTMLTableDataCellElement for <td>, and > HTMLTableHeaderCellElement for <th>. No browser ever implemented this > split, instead using the single HTMLTableCellElement interface. This > aligns the spec with browser reality. See also whatwg/html#1115 > Can we remove the HTMLTableDataCellElement/HTMLTableHeaderCellElement > fiction? UAs just have HTMLTableCellElement.
HTMLTableDataCellElement and HTMLTableHeaderCellElement never actually existed in browsers; instead they existed only in the HTML spec — before being removed in whatwg/html@e383ae2: > Ever since the dawn of HTML > (whatwg/html@2ac31bb) there have been two > table cell interfaces, HTMLTableDataCellElement for <td>, and > HTMLTableHeaderCellElement for <th>. No browser ever implemented this > split, instead using the single HTMLTableCellElement interface. This > aligns the spec with browser reality. See also whatwg/html#1115: > Can we remove the HTMLTableDataCellElement/HTMLTableHeaderCellElement > fiction? UAs just have HTMLTableCellElement.
HTMLTableDataCellElement and HTMLTableHeaderCellElement never actually existed in browsers; instead they existed only in the HTML spec — before being removed in whatwg/html@e383ae2: > Ever since the dawn of HTML > (whatwg/html@2ac31bb) there have been two > table cell interfaces, HTMLTableDataCellElement for <td>, and > HTMLTableHeaderCellElement for <th>. No browser ever implemented this > split, instead using the single HTMLTableCellElement interface. This > aligns the spec with browser reality. See also whatwg/html#1115: > Can we remove the HTMLTableDataCellElement/HTMLTableHeaderCellElement > fiction? UAs just have HTMLTableCellElement.
UAs just have HTMLTableCellElement.
The text was updated successfully, but these errors were encountered: