Bug 32936 - HTML5 <section> element support
Summary: HTML5 <section> element support
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: http://www.whatwg.org/specs/web-apps/...
Keywords:
Depends on:
Blocks: 32934
  Show dependency treegraph
 
Reported: 2009-12-25 11:07 PST by Kent Tamura
Modified: 2010-04-05 05:34 PDT (History)
4 users (show)

See Also:


Attachments
Proposed patch (10.46 KB, patch)
2009-12-25 11:17 PST, Kent Tamura
darin: review+
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 11:07:26 PST
Implement <section> element. It should be very similar to <nav> we already have.
Comment 1 Kent Tamura 2009-12-25 11:17:21 PST
Created attachment 45494 [details]
Proposed patch

The patch is very similar to http://trac.webkit.org/changeset/47489 for <nav>.
Comment 2 WebKit Review Bot 2009-12-25 11:19:06 PST
style-queue ran check-webkit-style on attachment 45494 [details] without any errors.
Comment 3 Darin Adler 2009-12-25 20:18:17 PST
Comment on attachment 45494 [details]
Proposed patch

> +debug('&lt;section> can be nest nested inside &lt;section>:');

Looks like "nest" here is an extra word.
Comment 4 Kent Tamura 2009-12-25 21:30:15 PST
(In reply to comment #3)
> (From update of attachment 45494 [details])
> > +debug('&lt;section> can be nest nested inside &lt;section>:');
> 
> Looks like "nest" here is an extra word.

Right! Removed and reset the expected result.

Landed as r52564: <http://trac.webkit.org/changeset/52564>
Comment 5 Lars Gunther 2010-04-03 02:30:45 PDT
As far as I can tell, this bug did not include the actual sectioning behaviour? I.e.

<h1>foo</h1>
<p>Lorem</p>
<section>
  <h1>bar</h1>
  <p>Lorem</p>
</section>

Should be functionally equivalent to:

<h1>Foo</h1>
<p>Lorem</p>
<h2>Bar</h2>
<p>Lorem</p>

I see no open bug about sectioning. Should one be opened?
Comment 6 Kent Tamura 2010-04-03 03:09:23 PDT
(In reply to comment #5)
> As far as I can tell, this bug did not include the actual sectioning behaviour?

What part of the HTML5 spec are you talking about?
Comment 8 Kent Tamura 2010-04-05 02:28:18 PDT
(In reply to comment #7)

Two fragments in Comment #5 are equivalent in the outline algorithm, and they should not be equivalent as DOM trees.
I don't know we have reasons to implement the outline algorithm in WebKit.
Comment 9 Lars Gunther 2010-04-05 05:34:07 PDT
(In reply to comment #8)

> Two fragments in Comment #5 are equivalent in the outline algorithm, and they
> should not be equivalent as DOM trees.
> I don't know we have reasons to implement the outline algorithm in WebKit.

It's not about the DOM tree, since they should not be equivalent. But it is about semantics and thus about accessibility and default styling.

When users jump between headings in programs like JAWS, an H1 within a section is not equal to an H1 outside of it.

Also, H1 within a section should probably not have the same default styling as an H1 outside of it.