Bug 32936

Summary: HTML5 <section> element support
Product: WebKit Reporter: Kent Tamura <tkent>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: mjs, sam, webkit.review.bot, webmaster
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-section-element
Bug Depends on:    
Bug Blocks: 32934    
Attachments:
Description Flags
Proposed patch darin: review+

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.