W3C home > Mailing lists > Public > public-html@w3.org > August 2011

[Bug 13880] New: Something has to be fixed in the outline algorithm. It works fine if the root is a sectioning (root/content) element, although steps 5 and 6 are vacuous in this case. If on the other hand the root is an arbitrary element, this algorithm only produces an o

From: <bugzilla@jessica.w3.org>
Date: Tue, 23 Aug 2011 22:34:19 +0000
To: public-html@w3.org
Message-ID: <bug-13880-2495@http.www.w3.org/Bugs/Public/>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=13880

           Summary: Something has to be fixed in the outline algorithm. It
                    works fine if the root is a sectioning (root/content)
                    element, although steps 5 and 6 are vacuous in this
                    case. If on the other hand the root is an arbitrary
                    element, this algorithm only produces an o
           Product: HTML WG
           Version: unspecified
          Platform: Other
               URL: http://www.whatwg.org/specs/web-apps/current-work/#out
                    lines
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P3
         Component: HTML5 spec (editor: Ian Hickson)
        AssignedTo: ian@hixie.ch
        ReportedBy: contributor@whatwg.org
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org


Specification:
http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html
Multipage: http://www.whatwg.org/C#outlines
Complete: http://www.whatwg.org/c#outlines

Comment:
Something has to be fixed in the outline algorithm. It works fine if the root
is a sectioning (root/content) element, although steps 5 and 6 are vacuous in
this case. If on the other hand the root is an arbitrary element, this
algorithm only produces an outline for the first sectioning descendent and, in
step 6, associates all remaining nodes with the first section of that outline,
which doesn't make sense. I suggest the following modifications: 1) The part
in step 4 which says "The walk is over" should instead reset the
currentOutlinee and currentSection to null, and allow the walk to continue; 2)
remove steps 5, 6, and 8 completely (nodes that are not associated in step 4
simply do not belong to any section, e.g., a <head> element). That produces
the same result as the current algorithm if the root is a sectioning element,
but it also produces the expected result if root is an arbitary node (e.g. a
document). (Also, the DOM walk implementation suggested at the end is wrong if
the root has a nextSibling…)

Posted from: 98.220.236.126
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_1) AppleWebKit/534.48.3
(KHTML, like Gecko) Version/5.1 Safari/534.48.3

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Tuesday, 23 August 2011 22:34:24 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:39:27 UTC