W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2013

Re: [whatwg] Question on Limits in Adaption Agency Algorithm

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 31 Jul 2013 20:16:37 +0000 (UTC)
To: Yasuhiko Minamide <minamide@cs.tsukuba.ac.jp>, Adam Barth <w3c@adambarth.com>, James Graham <jgraham@opera.com>
Message-ID: <alpine.DEB.2.00.1307311823390.9685@ps20323.dreamhostps.com>
Cc: whatwg@whatwg.org, uezato@score.cs.tsukuba.ac.jp, Henri Sivonen <hsivonen@iki.fi>
On Mon, 1 Jul 2013, Ian Hickson wrote:
> 
> One option would be to remove from the stack of open elements any 
> elements that we are skipping when we bail out of the AAA.
> 
> Can anyone see a problem with doing that?

Since nobody raised any problems with this, I've now done this.

For background, this solves this case:

   <div><b><i><s><u><tt><p></b>123</p></tt></u></s>456

Before this fix, the output is "456 123", with the "123" covered by <s>, 
<u>, <tt>, and <b>, and the "123" covered by <b> and <i>. After the fix, 
the output is "123 456", with the "123" covered by <s>, <u>, and <b>, and 
the "456" covered by no formatting elements.

I could see an argument for leaving the elements in the list of formatting 
elements (so the output would be "123 456", with the "123" covered by <s>, 
<u>, and <b>, and the "456" covered by nothing, but with an <i> being 
reintroduced if you ended the whole thing with "<div>789"). Let me know if 
you think that's better.

This being a change to the parser, it's risky; in fact it could change the 
styles of nodes. However, I think getting the output of the parser to be 
in the same order as the input is something that is far more important 
than getting the exact formatting styles correct. This is not just moving 
nodes out of a <table>; the old parser rules here moved nodes way off into 
earlier parts of the DOM with no intuitive logic.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 31 July 2013 20:17:02 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:03 UTC