W3C home > Mailing lists > Public > public-html@w3.org > June 2009

The formatblock command

From: Simon Pieters <simonp@opera.com>
Date: Wed, 03 Jun 2009 11:20:20 +0200
To: "public-html@w3.org" <public-html@w3.org>
Message-ID: <op.uuxyv6whidj3kv@zcorpandell.linkoping.osa>
Step 3 of the formatblock command http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#command-formatblock says:

   If value is (now) an ASCII case-insensitive match for the tag name of an
   element defined by this specification that is defined to be a
   formatBlock candidate, then, for every position in the selection, take

Not clear to me what every position in the selection means.


   the furthest formatBlock candidate ancestor element of that position

Mozilla, WebKit and Opera seem to use the nearest instead of the furthest. IE seems to replace all formatblock ancestors and copies attributes from the removed elements to the remaining (and the new) formatblock elements. http://software.hixie.ch/utilities/js/live-dom-viewer/saved/126

Please specify what IE does or change to nearest ancestor.


   that contains only phrasing content, and, if that element is editable

...and is not an editing host. http://software.hixie.ch/utilities/js/live-dom-viewer/saved/127


   and has a parent element whose content model allows that parent to
   contain any flow content,

This doesn't seem to match what browsers do.


   replace it with an element in the HTML
   namespace whose name is value, and move all the children that were in it
   to the new element.

Please specify that if no elements were changed in an editing host, insert a new element as child of the editing host. http://software.hixie.ch/utilities/js/live-dom-viewer/saved/130

Also specify that new elements are inserted for <div contenteditable>x<p>y</p>x<p>y</p>x</div>.

Please specify whether attributes survive in http://software.hixie.ch/utilities/js/live-dom-viewer/saved/128 and http://software.hixie.ch/utilities/js/live-dom-viewer/saved/129


   If there is no selection, then, where in the description above refers to
   the selection, the user agent must act as if the selection was an empty
   range (with just one position) at the caret position.

(This part is fine.)

-- 
Simon Pieters
Opera Software
Received on Wednesday, 3 June 2009 09:20:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:38 GMT