What quirks mode parsing differences (if any) are considered 'must have'?
As far as I can tell, Gecko has only three HTML parsing behaviors that differ between the quirks mode and the standards mode: 1) </br> 2) <!--> 3) <p><table>
Here are the behaviors in the top 4 implementations and HTML5 as drafted:
</br>: Gecko quirks: break WebKit quirks: break Opera quirks: break IE8 quirks: break Gecko standards: no break WebKit standards: no break Opera standards: break IE8 standards: break HTML5: break
Would it be safe to make </br> always cause a line break? My guess is yes.
Would it be safe to make <!--> always be a complete zero-length comment? My guess is yes.
<p><table> Gecko quirks: table child of p WebKit quirks: table child of p Opera quirks: table child of p IE8 quirks: table child of p Gecko standards: Implies </p> WebKit standards: Implies </p> Opera standards: Implies </p> IE8 standards: Implies </p> HTML5: Implies </p>
Would it be safe to make <table> always close the current <p>? My guess is no. Is there evidence either way?
I'm annoyed that the HTML4 spec-wise correct implied </p> behavior was pushed to the standards mode of each browser through Acid2. It looks a lot like that's going to be the single quirks vs. standards difference in HTML5 parsing. :-(
Henri Sivonen wrote: > Would it be safe to make </br> always cause a line break? My guess is > yes.
Probably yes, though this is getting pretty close to my "gah, we have to support that?" threshold... ;)
> Would it be safe to make <!--> always be a complete zero-length comment? > My guess is yes.
Probably, but sites might still break depending on what they do with conditional comments.... Worth testing carefully.
> Would it be safe to make <table> always close the current <p>? My guess > is no. Is there evidence either way?
My guess is also no. You could spin up a try-server build with this changed in the current parser and ask people to test, maybe?
> I'm annoyed that the HTML4 spec-wise correct implied </p> behavior was > pushed to the standards mode of each browser through Acid2. It looks a > lot like that's going to be the single quirks vs. standards difference > in HTML5 parsing. :-(
Henri Sivonen <hsivo...@iki.fi> wrote: > Would it be safe to make </br> always cause a line break? My guess is > yes.
That'd be my guess as well.
> Would it be safe to make <!--> always be a complete zero-length comment? > My guess is yes.
Yeah, Gecko's standards mode comment parsing does nothing but confuse authors, afaict.
> Would it be safe to make <table> always close the current <p>? My guess > is no. Is there evidence either way?
It'd be good for Hixie to weigh in here.
> Did I miss any Gecko parser-level quirks?
In Gecko, the document <script><!-- document.write("</script>") // --></script> In *quirks* mode results in script <!-- document.write("</script>") // -->
Boris Zbarsky wrote: > Jonas Sicking wrote: >> I would rather ask, would it be safe to make <table> always be a child >> of the <p>. My guess would be 'yes'.
> Make us fail ACID2, though. ;)
If we change HTML5, then indeed we'd need to get ACID2 fixed as well.
HTML5 specifies the Gecko quirks behavior in both of the above cases. I assume they is safe to adopt it for the standards mode as well, because IE8, WebKit and Opera already do in their standards modes what Gecko only does in the quirks mode.
> There's the comment quirk parsing in general, but I assume you're > removing that.
Is it more elaborate than <!-->?
In article <DeSdnZGWPtXfQU7UnZ2dnUVZ_u2dn...@mozilla.org>, Jonas Sicking <jo...@sicking.cc> wrote:
> Boris Zbarsky wrote: > >> Would it be safe to make <table> always close the current <p>? My > >> guess is no. Is there evidence either way?
> > My guess is also no. You could spin up a try-server build with this > > changed in the current parser and ask people to test, maybe?
> I would rather ask, would it be safe to make <table> always be a child > of the <p>. My guess would be 'yes'.
Mine too.
On the other hand, Philip Taylor put together a list of dmoz pages where closing the paragraph implicitly makes a difference (in terms of the parser stack). I tried 10 sites on the list, and I couldn't see any visual differences between the old Gecko parser and the HTML5 parser. All the pages I tried has designs that were in fashion circa 1995-1999.
Henri Sivonen wrote: >> There's the comment quirk parsing in general, but I assume you're >> removing that.
> Is it more elaborate than <!-->?
Yes. <!-- -- --> is a terminated comment in quirks but not standards mode at the moment. But the plan is to switch to that behavior in both modes, right?
> In article <DeSdnZGWPtXfQU7UnZ2dnUVZ_u2dn...@mozilla.org>, > Jonas Sicking <jo...@sicking.cc> wrote:
>> Boris Zbarsky wrote: >>>> Would it be safe to make <table> always close the current <p>? My >>>> guess is no. Is there evidence either way? >>> My guess is also no. You could spin up a try-server build with this >>> changed in the current parser and ask people to test, maybe? >> I would rather ask, would it be safe to make <table> always be a child >> of the <p>. My guess would be 'yes'.
> Mine too.
> On the other hand, Philip Taylor put together a list of dmoz pages where > closing the paragraph implicitly makes a difference (in terms of the > parser stack). I tried 10 sites on the list, and I couldn't see any > visual differences between the old Gecko parser and the HTML5 parser. > All the pages I tried has designs that were in fashion circa 1995-1999.
I'm all for trying to clean up HTML parsing if data indicates that it seems safe. We're going to have to do some extensive testing no matter what.
In article <aYedncMqoOFHQUnUnZ2dnUVZ_jgLA...@mozilla.org>, Boris Zbarsky <bzbar...@mit.edu> wrote:
> Henri Sivonen wrote: > >> There's the comment quirk parsing in general, but I assume you're > >> removing that.
> > Is it more elaborate than <!-->?
> Yes. <!-- -- --> is a terminated comment in quirks but not standards > mode at the moment. But the plan is to switch to that behavior in both > modes, right?