Changeset 52596 in webkit


Ignore:
Timestamp:
Dec 28, 2009 5:48:53 AM (14 years ago)
Author:
tkent@chromium.org
Message:

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

Reviewed by Maciej Stachowiak.

Implement HTML5 <article> element.
https://bugs.webkit.org/show_bug.cgi?id=32942

The new test file tests:

  • <p> closing,
  • Residual style, and
  • FormatBlock.
  • fast/html/article-element-expected.txt: Added.
  • fast/html/article-element.html: Added.
  • fast/html/script-tests/article-element.js: Added.

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

Reviewed by Maciej Stachowiak.

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

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

Test: fast/html/article-element.html

  • css/html.css: Add article as a block element.
  • editing/htmlediting.cpp: (WebCore::validBlockTag): Add articleTag.
  • html/HTMLElement.cpp: (WebCore::HTMLElement::tagPriority): Returns 5 for articleTag. (WebCore::blockTagList): Add articleTag.
  • html/HTMLParser.cpp: (WebCore::HTMLParser::getNode): Add articleTag.
  • html/HTMLTagNames.in: Add article.
Location:
trunk
Files:
3 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r52591 r52596  
     12009-12-28  Kent Tamura  <tkent@chromium.org>
     2
     3        Reviewed by Maciej Stachowiak.
     4
     5        Implement HTML5 <article> element.
     6        https://bugs.webkit.org/show_bug.cgi?id=32942
     7
     8        The new test file tests:
     9        - <p> closing,
     10        - Residual style, and
     11        - FormatBlock.
     12
     13        * fast/html/article-element-expected.txt: Added.
     14        * fast/html/article-element.html: Added.
     15        * fast/html/script-tests/article-element.js: Added.
     16
    1172009-12-27  Maciej Stachowiak  <mjs@apple.com>
    218
  • trunk/WebCore/ChangeLog

    r52590 r52596  
     12009-12-28  Kent Tamura  <tkent@chromium.org>
     2
     3        Reviewed by Maciej Stachowiak.
     4
     5        Implement HTML5 <article> element.
     6        https://bugs.webkit.org/show_bug.cgi?id=32936
     7
     8        <article> should behave the same as <nav> and <section>.
     9
     10        Test: fast/html/article-element.html
     11
     12        * css/html.css: Add article as a block element.
     13        * editing/htmlediting.cpp:
     14        (WebCore::validBlockTag): Add articleTag.
     15        * html/HTMLElement.cpp:
     16        (WebCore::HTMLElement::tagPriority): Returns 5 for articleTag.
     17        (WebCore::blockTagList): Add articleTag.
     18        * html/HTMLParser.cpp:
     19        (WebCore::HTMLParser::getNode): Add articleTag.
     20        * html/HTMLTagNames.in: Add article.
     21
    1222009-12-27  Jakub Wieczorek  <faw217@gmail.com>
    223
  • trunk/WebCore/css/html.css

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

    r52564 r52596  
    475475    if (blockTags.isEmpty()) {
    476476        blockTags.add(addressTag.localName());
     477        blockTags.add(articleTag.localName());
    477478        blockTags.add(blockquoteTag.localName());
    478479        blockTags.add(ddTag.localName());
  • trunk/WebCore/html/HTMLElement.cpp

    r52564 r52596  
    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) || hasLocalName(sectionTag))
     91    if (hasLocalName(articleTag) || hasLocalName(centerTag) || hasLocalName(nobrTag) || hasLocalName(rubyTag) || hasLocalName(navTag) || hasLocalName(sectionTag))
    9292        return 5; // Same as <div>.
    9393    if (hasLocalName(noembedTag) || hasLocalName(noframesTag))
     
    865865    if (tagList.isEmpty()) {
    866866        tagList.add(addressTag.localName().impl());
     867        tagList.add(articleTag.localName().impl());
    867868        tagList.add(blockquoteTag.localName().impl());
    868869        tagList.add(centerTag.localName().impl());
  • trunk/WebCore/html/HTMLParser.cpp

    r52564 r52596  
    909909        gFunctionMap.set(aTag.localName().impl(), &HTMLParser::nestedCreateErrorCheck);
    910910        gFunctionMap.set(addressTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
     911        gFunctionMap.set(articleTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
    911912        gFunctionMap.set(bTag.localName().impl(), &HTMLParser::nestedStyleCreateErrorCheck);
    912913        gFunctionMap.set(bigTag.localName().impl(), &HTMLParser::nestedStyleCreateErrorCheck);
  • trunk/WebCore/html/HTMLTagNames.in

    r52564 r52596  
    99applet
    1010area
     11article interfaceName=HTMLElement
    1112audio wrapperOnlyIfMediaIsAvailable, conditional=VIDEO, createWithNew
    1213b interfaceName=HTMLElement
Note: See TracChangeset for help on using the changeset viewer.