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

See Also:


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

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Tamura 2009-12-25 22:09:38 PST
Implement <header> and <footer>.  They have nesting restrictions unlike <nav>, <section>, <article> and <aside>.
Comment 1 Kent Tamura 2009-12-28 08:28:12 PST
Created attachment 45553 [details]
Proposed patch
Comment 2 WebKit Review Bot 2009-12-28 08:31:44 PST
style-queue ran check-webkit-style on attachment 45553 [details] without any errors.
Comment 3 Maciej Stachowiak 2009-12-29 05:32:26 PST
Comment on attachment 45553 [details]
Proposed patch

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 Kent Tamura 2009-12-29 06:22:17 PST
(In reply to comment #3)
> (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.

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 Maciej Stachowiak 2009-12-29 07:41:32 PST
Comment on attachment 45553 [details]
Proposed patch

(In reply to comment #4)
> (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.

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 Kent Tamura 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 Kent Tamura 2009-12-29 10:04:38 PST
Created attachment 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 WebKit Review Bot 2009-12-29 10:12:43 PST
style-queue ran check-webkit-style on attachment 45610 [details] without any errors.
Comment 9 Maciej Stachowiak 2010-01-05 14:07:44 PST
Comment on attachment 45610 [details]
Proposed patch

r=me
Comment 10 WebKit Commit Bot 2010-01-05 18:57:11 PST
Comment on attachment 45610 [details]
Proposed patch

Clearing flags on attachment: 45610

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