Changeset 52564 in webkit


Ignore:
Timestamp:
Dec 25, 2009 9:26:59 PM (14 years ago)
Author:
tkent@chromium.org
Message:

2009-12-25 Kent Tamura <tkent@chromium.org>

Reviewed by Darin Adler.

Implement HTML5 section element.
https://bugs.webkit.org/show_bug.cgi?id=32936

<section> should behave the same as <nav>.

Test: fast/html/section-element.html

  • css/html.css: Add section as a block element.
  • editing/htmlediting.cpp: (WebCore::validBlockTag): Add sectionTag.
  • html/HTMLElement.cpp: (WebCore::HTMLElement::tagPriority): Returns 5 for sectionTag. (WebCore::blockTagList): Add sectionTag.
  • html/HTMLParser.cpp: (WebCore::HTMLParser::getNode): Add sectionTag.
  • html/HTMLTagNames.in: Add section.

2009-12-25 Kent Tamura <tkent@chromium.org>

Reviewed by Darin Adler.

Implement HTML5 section element.
https://bugs.webkit.org/show_bug.cgi?id=32936

The new test file tests:

  • <p> closing,
  • Residual style, and
  • FormatBlock.
  • fast/html/script-tests/TEMPLATE.html: Added.
  • fast/html/script-tests/section-element.js: Added.
  • fast/html/section-element-expected.txt: Added.
  • fast/html/section-element.html: Added.
Location:
trunk
Files:
5 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r52560 r52564  
     12009-12-25  Kent Tamura  <tkent@chromium.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        Implement HTML5 section element.
     6        https://bugs.webkit.org/show_bug.cgi?id=32936
     7
     8        The new test file tests:
     9        - <p> closing,
     10        - Residual style, and
     11        - FormatBlock.
     12
     13        * fast/html/script-tests/TEMPLATE.html: Added.
     14        * fast/html/script-tests/section-element.js: Added.
     15        * fast/html/section-element-expected.txt: Added.
     16        * fast/html/section-element.html: Added.
     17
    1182009-12-25  Csaba Osztrogonác  <ossy@webkit.org>
    219
  • trunk/WebCore/ChangeLog

    r52561 r52564  
     12009-12-25  Kent Tamura  <tkent@chromium.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        Implement HTML5 section element.
     6        https://bugs.webkit.org/show_bug.cgi?id=32936
     7
     8        <section> should behave the same as <nav>.
     9
     10        Test: fast/html/section-element.html
     11
     12        * css/html.css: Add section as a block element.
     13        * editing/htmlediting.cpp:
     14        (WebCore::validBlockTag): Add sectionTag.
     15        * html/HTMLElement.cpp:
     16        (WebCore::HTMLElement::tagPriority): Returns 5 for sectionTag.
     17        (WebCore::blockTagList): Add sectionTag.
     18        * html/HTMLParser.cpp:
     19        (WebCore::HTMLParser::getNode): Add sectionTag.
     20        * html/HTMLTagNames.in: Add section.
     21
    1222009-12-25  Daniel Bates  <dbates@webkit.org>
    223
  • trunk/WebCore/css/html.css

    r52432 r52564  
    7373}
    7474
    75 nav {
     75nav, section {
    7676    display: block
    7777}
  • trunk/WebCore/editing/htmlediting.cpp

    r52220 r52564  
    489489        blockTags.add(pTag.localName());
    490490        blockTags.add(preTag.localName());
     491        blockTags.add(sectionTag.localName());
    491492    }
    492493    return blockTags.contains(blockTag);
  • trunk/WebCore/html/HTMLElement.cpp

    r52312 r52564  
    8989    if (hasLocalName(addressTag) || hasLocalName(ddTag) || hasLocalName(dtTag) || hasLocalName(noscriptTag) || hasLocalName(rpTag) || hasLocalName(rtTag))
    9090        return 3;
    91     if (hasLocalName(centerTag) || hasLocalName(nobrTag) || hasLocalName(rubyTag) || hasLocalName(navTag))
    92         return 5;
     91    if (hasLocalName(centerTag) || hasLocalName(nobrTag) || hasLocalName(rubyTag) || hasLocalName(navTag) || hasLocalName(sectionTag))
     92        return 5; // Same as <div>.
    9393    if (hasLocalName(noembedTag) || hasLocalName(noframesTag))
    9494        return 10;
     
    896896        tagList.add(plaintextTag.localName().impl());
    897897        tagList.add(preTag.localName().impl());
     898        tagList.add(sectionTag.localName().impl());
    898899        tagList.add(tableTag.localName().impl());
    899900        tagList.add(ulTag.localName().impl());
  • trunk/WebCore/html/HTMLParser.cpp

    r52314 r52564  
    952952        gFunctionMap.set(rtTag.localName().impl(), &HTMLParser::rtCreateErrorCheck);
    953953        gFunctionMap.set(sTag.localName().impl(), &HTMLParser::nestedStyleCreateErrorCheck);
     954        gFunctionMap.set(sectionTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
    954955        gFunctionMap.set(selectTag.localName().impl(), &HTMLParser::selectCreateErrorCheck);
    955956        gFunctionMap.set(smallTag.localName().impl(), &HTMLParser::nestedStyleCreateErrorCheck);
  • trunk/WebCore/html/HTMLTagNames.in

    r47688 r52564  
    9393samp interfaceName=HTMLElement
    9494script constructorNeedsCreatedByParser, createWithNew
     95section interfaceName=HTMLElement
    9596select constructorNeedsFormElement, createWithNew
    9697small interfaceName=HTMLElement
Note: See TracChangeset for help on using the changeset viewer.