Bug 32944 - HTML5 <header> and <footer> elements support
: HTML5 <header> and <footer> elements support
Status: RESOLVED FIXED
: WebKit
HTML DOM
: 528+ (Nightly build)
: All All
: P2 Normal
Assigned To:
: http://www.whatwg.org/specs/web-apps/...
: HTML5
:
: 32934
  Show dependency treegraph
 
Reported: 2009-12-25 22:09 PST by
Modified: 2010-01-05 18:57 PST (History)


Attachments
Proposed patch (21.49 KB, patch)
2009-12-28 08:28 PST, Kent Tamura
mjs: review-
Review Patch | Details | Formatted Diff | Diff
Proposed patch (19.08 KB, patch)
2009-12-29 10:04 PST, Kent Tamura
no flags Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-12-25 22:09:38 PST
Implement <header> and <footer>.  They have nesting restrictions unlike <nav>, <section>, <article> and <aside>.
------- Comment #1 From 2009-12-28 08:28:12 PST -------
Created an attachment (id=45553) [details]
Proposed patch
------- Comment #2 From 2009-12-28 08:31:44 PST -------
style-queue ran check-webkit-style on attachment 45553 [details] without any errors.
------- Comment #3 From 2009-12-29 05:32:26 PST -------
(From update of attachment 45553 [details])
Nesting <footer> inside <header> or <footer> (or vive versa) is an authoring conformance error, but I don't believe it is supposed to result in any parser error fixup. I do not see any such requirement in the HTML5 parsing algorithm anyway. r- for now but please resubmit if you can cite a source for that requirement.
------- Comment #4 From 2009-12-29 06:22:17 PST -------
(In reply to comment #3)
> (From update of attachment 45553 [details] [details])
> Nesting <footer> inside <header> or <footer> (or vive versa) is an authoring
> conformance error, but I don't believe it is supposed to result in any parser
> error fixup. I do not see any such requirement in the HTML5 parsing algorithm
> anyway. r- for now but please resubmit if you can cite a source for that
> requirement.

http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-header-element
  4.4.8 The header element
  ...
  Content model:
  Flow content, but with no header or footer element descendants.

http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-footer-element
  4.4.9 The footer element
  ...
  Content model:
  Flow content, but with no header or footer element descendants.
------- Comment #5 From 2009-12-29 07:41:32 PST -------
(From update of attachment 45553 [details])
(In reply to comment #4)
> (In reply to comment #3)
> > (From update of attachment 45553 [details] [details] [details])
> > Nesting <footer> inside <header> or <footer> (or vive versa) is an authoring
> > conformance error, but I don't believe it is supposed to result in any parser
> > error fixup. I do not see any such requirement in the HTML5 parsing algorithm
> > anyway. r- for now but please resubmit if you can cite a source for that
> > requirement.
> 
> http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-header-element
>   4.4.8 The header element
>   ...
>   Content model:
>   Flow content, but with no header or footer element descendants.
> 
> http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-footer-element
>   4.4.9 The footer element
>   ...
>   Content model:
>   Flow content, but with no header or footer element descendants.

Those are authoring requirements (i.e. a document violating these is nonconforming), not implementation requirements (there is no requirement to enforce these conditions at parse time or otherwise.

The only error corrections that should be done are those required by section 9.2:
http://dev.w3.org/html5/spec/Overview.html#parsing

Please keep this in mind when implementing additional new HTML elements. The content models in general do *not* result in parser behavior changes.

Please resubmit with the parser changes removed and with correct tests.
------- Comment #6 From 2009-12-29 08:09:32 PST -------
Oh, I have just understood "Content model" is an author requirement. Thank you!
I'll update the patch.
------- Comment #7 From 2009-12-29 10:04:38 PST -------
Created an attachment (id=45610) [details]
Proposed patch

This updated patch is almost equivalent the patches for <section>, <article> and <aside>.
The tests check we *can* nest <header> and <footer> elements.
------- Comment #8 From 2009-12-29 10:12:43 PST -------
style-queue ran check-webkit-style on attachment 45610 [details] without any errors.
------- Comment #9 From 2010-01-05 14:07:44 PST -------
(From update of attachment 45610 [details])
r=me
------- Comment #10 From 2010-01-05 18:57:11 PST -------
(From update of attachment 45610 [details])
Clearing flags on attachment: 45610

Committed r52846: <http://trac.webkit.org/changeset/52846>
------- Comment #11 From 2010-01-05 18:57:17 PST -------
All reviewed patches have been landed.  Closing bug.