[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Thu Apr 8 00:51:32 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit a4d36d2f5b193493799179bea535b1a62d0759f8
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Dec 29 14:28:58 2009 +0000

    2009-12-29  Kent Tamura  <tkent at chromium.org>
    
            Reviewed by Maciej Stachowiak.
    
            Implement HTML5 <aside> element.
            https://bugs.webkit.org/show_bug.cgi?id=32943
    
            <aside> should behave the same as <nav>, <section>, and <article>.
    
            Test: fast/html/aside-element.html
    
            * css/html.css: Add aside as a block element.
            * editing/htmlediting.cpp:
            (WebCore::validBlockTag): Add asideTag.
            * html/HTMLElement.cpp:
            (WebCore::HTMLElement::tagPriority): Returns 5 for asideTag.
            (WebCore::blockTagList): Add asideTag.
            * html/HTMLParser.cpp:
            (WebCore::HTMLParser::getNode): Add asideTag.
            * html/HTMLTagNames.in: Add aside.
    2009-12-29  Kent Tamura  <tkent at chromium.org>
    
            Reviewed by Maciej Stachowiak.
    
            Implement HTML5 <aside> element.
            https://bugs.webkit.org/show_bug.cgi?id=32943
    
            The new test file tests:
            - <p> closing,
            - Residual style, and
            - FormatBlock.
    
            * fast/html/aside-element-expected.txt: Added.
            * fast/html/aside-element.html: Added.
            * fast/html/script-tests/aside-element.js: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52620 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index c0bd449..004f97a 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2009-12-29  Kent Tamura  <tkent at chromium.org>
+
+        Reviewed by Maciej Stachowiak.
+
+        Implement HTML5 <aside> element.
+        https://bugs.webkit.org/show_bug.cgi?id=32943
+
+        The new test file tests:
+        - <p> closing,
+        - Residual style, and
+        - FormatBlock.
+
+        * fast/html/aside-element-expected.txt: Added.
+        * fast/html/aside-element.html: Added.
+        * fast/html/script-tests/aside-element.js: Added.
+
 2009-12-29  Gustavo Noronha Silva  <gustavo.noronha at collabora.co.uk>
 
         [GTK] Failing media/video-seek-past-end-playing.html
diff --git a/LayoutTests/fast/html/aside-element-expected.txt b/LayoutTests/fast/html/aside-element-expected.txt
new file mode 100644
index 0000000..5022e63
--- /dev/null
+++ b/LayoutTests/fast/html/aside-element-expected.txt
@@ -0,0 +1,20 @@
+Various tests for the aside element.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+<aside> closes <p>:
+PASS aside1.parentNode.nodeName == "p" is false
+<p> does not close <aside>:
+PASS p1.parentNode.nodeName is "ASIDE"
+<aside> can be nested inside <aside>:
+PASS aside3.parentNode.id is "aside2"
+Residual style:
+PASS getWeight("aside4") is "bold"
+PASS getWeight("span1") is "bold"
+FormatBlock:
+PASS document.getElementById("span2").parentNode.nodeName is "ASIDE"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/html/aside-element.html b/LayoutTests/fast/html/aside-element.html
new file mode 100644
index 0000000..b03acdc
--- /dev/null
+++ b/LayoutTests/fast/html/aside-element.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/aside-element.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/html/script-tests/aside-element.js b/LayoutTests/fast/html/script-tests/aside-element.js
new file mode 100644
index 0000000..e708153
--- /dev/null
+++ b/LayoutTests/fast/html/script-tests/aside-element.js
@@ -0,0 +1,43 @@
+description('Various tests for the aside element.');
+
+var testParent = document.createElement('div');
+document.body.appendChild(testParent);
+
+debug('&lt;aside> closes &lt;p>:');
+testParent.innerHTML = '<p>Test that <aside id="aside1">an aside element</nav> closes &lt;p>.</p>';
+var aside1 = document.getElementById('aside1');
+shouldBeFalse('aside1.parentNode.nodeName == "p"');
+
+debug('&lt;p> does not close &lt;aside>:');
+testParent.innerHTML = '<aside>Test that <p id="p1">a p element</p> does not close an aside element.</aside>';
+var p1 = document.getElementById('p1');
+shouldBe('p1.parentNode.nodeName', '"ASIDE"');
+
+debug('&lt;aside> can be nested inside &lt;aside>:');
+testParent.innerHTML = '<aside id="aside2">Test that <aside id="aside3">an aside element</aside> can be nested inside another.</aside>';
+var aside3 = document.getElementById('aside3');
+shouldBe('aside3.parentNode.id', '"aside2"');
+
+debug('Residual style:');
+testParent.innerHTML = '<b><aside id="aside4">This text should be bold.</aside> <span id="span1">This is also bold.</span></b>';
+function getWeight(id) {
+    return document.defaultView.getComputedStyle(document.getElementById(id), null).getPropertyValue('font-weight');
+}
+shouldBe('getWeight("aside4")', '"bold"');
+shouldBe('getWeight("span1")', '"bold"');
+document.body.removeChild(testParent);
+
+debug('FormatBlock:');
+var editable = document.createElement('div');
+editable.innerHTML = '[<span id="span2">The text will be a child of &lt;aside>.</span>]';
+document.body.appendChild(editable);
+editable.contentEditable = true;
+var selection = window.getSelection();
+selection.selectAllChildren(editable);
+document.execCommand('FormatBlock', false, 'aside');
+selection.collapse();
+shouldBe('document.getElementById("span2").parentNode.nodeName', '"ASIDE"');
+document.body.removeChild(editable);
+
+var successfullyParsed = true;
+
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 67a16d6..1968af0 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,24 @@
+2009-12-29  Kent Tamura  <tkent at chromium.org>
+
+        Reviewed by Maciej Stachowiak.
+
+        Implement HTML5 <aside> element.
+        https://bugs.webkit.org/show_bug.cgi?id=32943
+
+        <aside> should behave the same as <nav>, <section>, and <article>.
+
+        Test: fast/html/aside-element.html
+
+        * css/html.css: Add aside as a block element.
+        * editing/htmlediting.cpp:
+        (WebCore::validBlockTag): Add asideTag.
+        * html/HTMLElement.cpp:
+        (WebCore::HTMLElement::tagPriority): Returns 5 for asideTag.
+        (WebCore::blockTagList): Add asideTag.
+        * html/HTMLParser.cpp:
+        (WebCore::HTMLParser::getNode): Add asideTag.
+        * html/HTMLTagNames.in: Add aside.
+
 2009-12-29  Laszlo Gombos  <laszlo.1.gombos at nokia.com>
 
         Reviewed by Eric Seidel.
diff --git a/WebCore/css/html.css b/WebCore/css/html.css
index 7b17739..4e6bdd6 100644
--- a/WebCore/css/html.css
+++ b/WebCore/css/html.css
@@ -72,7 +72,7 @@ layer {
     display: block
 }
 
-article, nav, section {
+article, aside, nav, section {
     display: block
 }
 
diff --git a/WebCore/editing/htmlediting.cpp b/WebCore/editing/htmlediting.cpp
index 02c8010..b2e67c3 100644
--- a/WebCore/editing/htmlediting.cpp
+++ b/WebCore/editing/htmlediting.cpp
@@ -475,6 +475,7 @@ bool validBlockTag(const AtomicString& blockTag)
     if (blockTags.isEmpty()) {
         blockTags.add(addressTag.localName());
         blockTags.add(articleTag.localName());
+        blockTags.add(asideTag.localName());
         blockTags.add(blockquoteTag.localName());
         blockTags.add(ddTag.localName());
         blockTags.add(divTag.localName());
diff --git a/WebCore/html/HTMLElement.cpp b/WebCore/html/HTMLElement.cpp
index 53577e6..41f3a43 100644
--- a/WebCore/html/HTMLElement.cpp
+++ b/WebCore/html/HTMLElement.cpp
@@ -88,7 +88,7 @@ int HTMLElement::tagPriority() const
         return 0;
     if (hasLocalName(addressTag) || hasLocalName(ddTag) || hasLocalName(dtTag) || hasLocalName(noscriptTag) || hasLocalName(rpTag) || hasLocalName(rtTag))
         return 3;
-    if (hasLocalName(articleTag) || hasLocalName(centerTag) || hasLocalName(nobrTag) || hasLocalName(rubyTag) || hasLocalName(navTag) || hasLocalName(sectionTag))
+    if (hasLocalName(articleTag) || hasLocalName(asideTag) || hasLocalName(centerTag) || hasLocalName(nobrTag) || hasLocalName(rubyTag) || hasLocalName(navTag) || hasLocalName(sectionTag))
         return 5; // Same as <div>.
     if (hasLocalName(noembedTag) || hasLocalName(noframesTag))
         return 10;
@@ -865,6 +865,7 @@ static HashSet<AtomicStringImpl*>* blockTagList()
     if (tagList.isEmpty()) {
         tagList.add(addressTag.localName().impl());
         tagList.add(articleTag.localName().impl());
+        tagList.add(asideTag.localName().impl());
         tagList.add(blockquoteTag.localName().impl());
         tagList.add(centerTag.localName().impl());
         tagList.add(ddTag.localName().impl());
diff --git a/WebCore/html/HTMLParser.cpp b/WebCore/html/HTMLParser.cpp
index 4b4833f..9993b7a 100644
--- a/WebCore/html/HTMLParser.cpp
+++ b/WebCore/html/HTMLParser.cpp
@@ -909,6 +909,7 @@ PassRefPtr<Node> HTMLParser::getNode(Token* t)
         gFunctionMap.set(aTag.localName().impl(), &HTMLParser::nestedCreateErrorCheck);
         gFunctionMap.set(addressTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
         gFunctionMap.set(articleTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
+        gFunctionMap.set(asideTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
         gFunctionMap.set(bTag.localName().impl(), &HTMLParser::nestedStyleCreateErrorCheck);
         gFunctionMap.set(bigTag.localName().impl(), &HTMLParser::nestedStyleCreateErrorCheck);
         gFunctionMap.set(blockquoteTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
diff --git a/WebCore/html/HTMLTagNames.in b/WebCore/html/HTMLTagNames.in
index d1d2715..f7007e9 100644
--- a/WebCore/html/HTMLTagNames.in
+++ b/WebCore/html/HTMLTagNames.in
@@ -9,6 +9,7 @@ address interfaceName=HTMLElement
 applet
 area
 article interfaceName=HTMLElement
+aside interfaceName=HTMLElement
 audio wrapperOnlyIfMediaIsAvailable, conditional=VIDEO, createWithNew
 b interfaceName=HTMLElement
 base createWithNew

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list