-
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
Support rb and rtc elements in the parser (ruby) #101
Conversation
Light background reading: |
Can we get a bit more detail on the compatibility? I'm specifically wondering:
Happy to run e.g. live-dom-viewer test cases. |
Not sure why this is suddenly a problem. |
Maybe it only checks changed lines? |
No, |
Firefox uses |
Apart from the class question, there's also:
|
IMHO keeping ruby sane is a lost cause. We should just spec whatever the implementations implement and not bother trying to fight it. This includes letting authors do whatever the heck it is that the ruby community wants to let them do. I was going to spec what they implemented many months ago, I just never got around to it because of not having editing bandwidth in general. |
@Hixie I’d personally prefer that we at least figure out if/how to include language saying something like:
(Replace “Documents“ above with “Authors” if we want.) My rationale is around that is the fact that generally, if authors read the spec and see particular elements in the spec, the authors assume those elements are the “right” thing to use, and they tend to automatically think they should use those elements, and they want to use them. And in the case of Ruby, they’ll see So a “Documents should not use the |
I emailed folks from Apple https://lists.w3.org/Archives/Public/www-archive/2015Sep/0006.html and Microsoft https://lists.w3.org/Archives/Public/www-archive/2015Sep/0007.html since only Mozilla appears to have anything implemented beyond the parser changes: http://mxr.mozilla.org/mozilla-central/source/layout/style/html.css#791. |
cc. @kojiishi |
@nox discovered that the patch for WebKit (see #101 (comment)) is different from HTML51 and from what Chromium and Gecko implemented. In WebKit So based on Microsoft's reply and these findings about WebKit it seems ruby parsing is now three-way forked. Styling is two-way forked with only Mozilla making changes (though not matching the HTML51 rendering section, so three-way forked technically I suppose if you count the specification). Based on that I'm not entirely sure what to recommend. Everyone resetting to the pre-HTML51-inspired mess seems ideal, but perhaps a good middle ground would be to accept the parsing changes per Chromium and Gecko, and not adopt the styling changes per non-Gecko. |
This looks like an unintended bug in the WebKit commit:
|
I managed to get my hands on an Edge-having computer and confirmed they do not have any special parsing behavior. So regarding the parser, we have four separate behaviors for the four separate rendering engines:
@annevk has been trying to find the reasoning for the change between 5.0 and 5.1 (i.e. between (2) and (3)), without success. Regarding styling, only Gecko has UA style rules for rb and rtc. So we will probably remove those regardless. How are we going to achieve compatibility? What should we specify? To me the front-runners seem to be (1) and (2). (1) would require Gecko, WebKit and Blink to remove their parser changes. It is attractive in its simplicity. (2) would require Edge to implement the parser changes, and WebKit to change their parser, and Blink to update their mapping to use HTMLElement. Can implementers comment? Do either of those two options sound good to you? Tagging in some possibilities: @travisleithead from Edge, @rniwa from WebKit, @kojiishi from Blink, and @hsivonen from Gecko. |
I know Robin Berjon spent some time designing the W3C HTML5.1 model, and since he has better insight into the Ruby community than I, I figured it must be "better". So, I endorse that model ((2) above). The Edge browser has not updated our parser to reflect the W3C HTML5.1 model yet, but we are not opposed to doing so if it helps interoperability. |
I don't have a strong opinion for |
@nox:
Sorry slow to catch up, but yes. Actually, we found the spec issue after WebKit patch landed, so Gecko/Blink did in one patch, while WebKit needed two patches. |
Elliot already mentioned this is just a bug, I can fix it for Blink.
As @nox indicated in the following comments, my understanding is that WebKit is now interoperable with Gecko. |
@kojiishi I don't know where I said that they are interoperable. :) |
@nox:
Sorry, I re-read your comment and, yes, you only said "unintended bug" but didn't say it was fixed later. The mentioned unintended bug was fixed in this WebKit commit. |
I did just test on my iPad and It sounds like there is a pretty clear trend toward (2). Edge and Blink are willing to change. So yay, let's do that. We can deal with styling separately (#121). Assigning back to @annevk to update this PR to use HTMLElement instead of HTMLUnknownElement and remove the styling changes for now. |
nooope, I forgot to test |
We can fix our behavior to match (2) for rtc. Like I said earlier, rtc isn't that important for compatibility as long as rb is supported. |
So this LGTM. However, we do need to add definitions of rb and rtc to the elements section. At the very least we need to say that they use HTMLElement. I will leave it up to you @annevk to decide whether it is OK to merge the parser changes without that. I am not so sure it is though. |
They are defined as obsolete elements. See line 111990. And from line 113398 you can see I made sure |
Ah OK, I wasn't sure that obsolete elements didn't get their own element definition sections, but upon checking now I see that. Cool. Merging! |
Due to some local git snafus the commit got un-associated with this PR. For posterity, it landed as 8d1c8af. |
PR to fix interfaces for rb/rtc in web-platform-tests. |
…MLElement As per the discussion in whatwg/html#101.
…764e9c: imported csswg-test@2f07c989b36abb566ecfa3a2bf8a2f9192f948d1 imported web-platform-tests@959f1218a7d7c9828cda903c5cd27e1b547431ae css-writing-modes: - Added parsing tests in upstream in preparation of unprefixing (all fail because we're not unprefixed yet.) - sideways-left (no support in any UA) was removed from the spec. Tests were also removed in upstream, so no longer need to SKIP. - Fixed descriptions in orthogonal-parent-shrink-to-fit-001* html/semantics: - Fixed interfaces.js (see whatwg/html#101) - 1 new FAIL in pseudo-classes/disabled.html [email protected],[email protected],[email protected],[email protected],[email protected] BUG=490511, 492664 Review URL: https://codereview.chromium.org/1358453003 git-svn-id: svn://svn.chromium.org/blink/trunk@202524 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Apart from the specific error messages for end-of-file and “body” &
“html” end tags, this matches what WebKit and Blink have implemented.
Only Blink implements these as HTMLUnknownElement.