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

tkent at chromium.org tkent at chromium.org
Thu Apr 8 02:16:45 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 882fe113cd9b62caecc9c92fbd42b06df76a084d
Author: tkent at chromium.org <tkent at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Mar 9 06:24:57 2010 +0000

    2010-03-08  Kent Tamura  <tkent at chromium.org>
    
            Reviewed by Adam Barth.
    
            Implement HTML5 <hgroup> element.
            https://bugs.webkit.org/show_bug.cgi?id=32943
    
            The new test file tests:
            - <p> closing,
            - Residual style, and
            - FormatBlock.
    
            * fast/html/hgroup-element-expected.txt: Added.
            * fast/html/hgroup-element.html: Added.
            * fast/html/script-tests/hgroup-element.js: Added.
    2010-03-08  Kent Tamura  <tkent at chromium.org>
    
            Reviewed by Adam Barth.
    
            Implement HTML5 <hgroup> element.
            https://bugs.webkit.org/show_bug.cgi?id=33369
    
            <hgroup> should behave the same as <nav>, <section>, <article>, and <aside>.
            <hgroup> has no specific parsing rules.
    
            Test: fast/html/hgroup-element.html
    
            * css/html.css: Add hgroup as a block element.
            * editing/htmlediting.cpp:
            (WebCore::validBlockTag): Add hgroupTag.
            * html/HTMLElement.cpp:
            (WebCore::createTagPriorityMap): Returns 5 for hgroupTag.
            (WebCore::blockTagList): Add hgroupTag.
            * html/HTMLParser.cpp:
            (WebCore::HTMLParser::getNode): Add hgroupTag.
            * html/HTMLTagNames.in: Add hgroup.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55710 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 67f71a7..1d367ab 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2010-03-08  Kent Tamura  <tkent at chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Implement HTML5 <hgroup> element.
+        https://bugs.webkit.org/show_bug.cgi?id=32943
+
+        The new test file tests:
+        - <p> closing,
+        - Residual style, and
+        - FormatBlock.
+
+        * fast/html/hgroup-element-expected.txt: Added.
+        * fast/html/hgroup-element.html: Added.
+        * fast/html/script-tests/hgroup-element.js: Added.
+
 2010-03-08  Tony Chang  <tony at chromium.org>
 
         Reviewed by Adam Barth.
diff --git a/LayoutTests/fast/html/hgroup-element-expected.txt b/LayoutTests/fast/html/hgroup-element-expected.txt
new file mode 100644
index 0000000..9937f17
--- /dev/null
+++ b/LayoutTests/fast/html/hgroup-element-expected.txt
@@ -0,0 +1,20 @@
+Various tests for the hgroup element.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+<hgroup> closes <p>:
+PASS hgroup1.parentNode.nodeName == "p" is false
+<p> does not close <hgroup>:
+PASS p1.parentNode.nodeName is "HGROUP"
+<hgroup> can be nested inside <hgroup>:
+PASS hgroup3.parentNode.id is "hgroup2"
+Residual style:
+PASS getWeight("hgroup4") is "bold"
+PASS getWeight("span1") is "bold"
+FormatBlock:
+PASS document.getElementById("span2").parentNode.nodeName is "HGROUP"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/html/hgroup-element.html b/LayoutTests/fast/html/hgroup-element.html
new file mode 100644
index 0000000..78fcbc5
--- /dev/null
+++ b/LayoutTests/fast/html/hgroup-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/hgroup-element.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/html/script-tests/hgroup-element.js b/LayoutTests/fast/html/script-tests/hgroup-element.js
new file mode 100644
index 0000000..d7f3004
--- /dev/null
+++ b/LayoutTests/fast/html/script-tests/hgroup-element.js
@@ -0,0 +1,44 @@
+description('Various tests for the hgroup element.');
+
+var testParent = document.createElement('div');
+document.body.appendChild(testParent);
+
+debug('&lt;hgroup> closes &lt;p>:');
+testParent.innerHTML = '<p>Test that <hgroup id="hgroup1"><h1>a hgroup element</h1></hgroup> closes &lt;p>.</p>';
+var hgroup1 = document.getElementById('hgroup1');
+shouldBeFalse('hgroup1.parentNode.nodeName == "p"');
+
+debug('&lt;p> does not close &lt;hgroup>:');
+testParent.innerHTML = '<hgroup>Test that <p id="p1">a p element</p> does not close a hgroup element.</hgroup>';
+var p1 = document.getElementById('p1');
+shouldBe('p1.parentNode.nodeName', '"HGROUP"');
+
+// Note: hgroup *should* have only h1-h6 elements, but *can* have any elements.
+debug('&lt;hgroup> can be nested inside &lt;hgroup>:');
+testParent.innerHTML = '<hgroup id="hgroup2">Test that <hgroup id="hgroup3">a hgroup element</hgroup> can be nested inside another.</hgroup>';
+var hgroup3 = document.getElementById('hgroup3');
+shouldBe('hgroup3.parentNode.id', '"hgroup2"');
+
+debug('Residual style:');
+testParent.innerHTML = '<b><hgroup id="hgroup4"><h2>This text should be bold.</h2></hgroup> <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("hgroup4")', '"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;hgroup>.</span>]';
+document.body.appendChild(editable);
+editable.contentEditable = true;
+var selection = window.getSelection();
+selection.selectAllChildren(editable);
+document.execCommand('FormatBlock', false, 'hgroup');
+selection.collapse();
+shouldBe('document.getElementById("span2").parentNode.nodeName', '"HGROUP"');
+document.body.removeChild(editable);
+
+var successfullyParsed = true;
+
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d4c8f84..0e83ec0 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,25 @@
+2010-03-08  Kent Tamura  <tkent at chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Implement HTML5 <hgroup> element.
+        https://bugs.webkit.org/show_bug.cgi?id=33369
+
+        <hgroup> should behave the same as <nav>, <section>, <article>, and <aside>.
+        <hgroup> has no specific parsing rules.
+
+        Test: fast/html/hgroup-element.html
+
+        * css/html.css: Add hgroup as a block element.
+        * editing/htmlediting.cpp:
+        (WebCore::validBlockTag): Add hgroupTag.
+        * html/HTMLElement.cpp:
+        (WebCore::createTagPriorityMap): Returns 5 for hgroupTag.
+        (WebCore::blockTagList): Add hgroupTag.
+        * html/HTMLParser.cpp:
+        (WebCore::HTMLParser::getNode): Add hgroupTag.
+        * html/HTMLTagNames.in: Add hgroup.
+
 2010-03-08  Tony Chang  <tony at chromium.org>
 
         Reviewed by Adam Barth.
diff --git a/WebCore/css/html.css b/WebCore/css/html.css
index 9d9225c..be10d61 100644
--- a/WebCore/css/html.css
+++ b/WebCore/css/html.css
@@ -72,7 +72,7 @@ layer {
     display: block
 }
 
-article, aside, footer, header, nav, section {
+article, aside, footer, header, hgroup, nav, section {
     display: block
 }
 
diff --git a/WebCore/editing/htmlediting.cpp b/WebCore/editing/htmlediting.cpp
index c0a9b63..7127535 100644
--- a/WebCore/editing/htmlediting.cpp
+++ b/WebCore/editing/htmlediting.cpp
@@ -489,6 +489,7 @@ bool validBlockTag(const AtomicString& blockTag)
         blockTags.add(h5Tag.localName());
         blockTags.add(h6Tag.localName());
         blockTags.add(headerTag.localName());
+        blockTags.add(hgroupTag.localName());
         blockTags.add(navTag.localName());
         blockTags.add(pTag.localName());
         blockTags.add(preTag.localName());
diff --git a/WebCore/html/HTMLElement.cpp b/WebCore/html/HTMLElement.cpp
index 5f82195..3dec712 100644
--- a/WebCore/html/HTMLElement.cpp
+++ b/WebCore/html/HTMLElement.cpp
@@ -107,6 +107,7 @@ static const TagPriorityMap* createTagPriorityMap()
     map->add(centerTag.localName().impl(), 5);
     map->add(footerTag.localName().impl(), 5);
     map->add(headerTag.localName().impl(), 5);
+    map->add(hgroupTag.localName().impl(), 5);
     map->add(nobrTag.localName().impl(), 5);
     map->add(rubyTag.localName().impl(), 5);
     map->add(navTag.localName().impl(), 5);
@@ -881,6 +882,7 @@ static HashSet<AtomicStringImpl*>* blockTagList()
         tagList.add(h5Tag.localName().impl());
         tagList.add(h6Tag.localName().impl());
         tagList.add(headerTag.localName().impl());
+        tagList.add(hgroupTag.localName().impl());
         tagList.add(hrTag.localName().impl());
         tagList.add(isindexTag.localName().impl());
         tagList.add(layerTag.localName().impl());
diff --git a/WebCore/html/HTMLParser.cpp b/WebCore/html/HTMLParser.cpp
index 60ee7ae..ea32b1d 100644
--- a/WebCore/html/HTMLParser.cpp
+++ b/WebCore/html/HTMLParser.cpp
@@ -938,6 +938,7 @@ PassRefPtr<Node> HTMLParser::getNode(Token* t)
         gFunctionMap.set(h6Tag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
         gFunctionMap.set(headTag.localName().impl(), &HTMLParser::headCreateErrorCheck);
         gFunctionMap.set(headerTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
+        gFunctionMap.set(hgroupTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
         gFunctionMap.set(hrTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
         gFunctionMap.set(iTag.localName().impl(), &HTMLParser::nestedStyleCreateErrorCheck);
         gFunctionMap.set(isindexTag.localName().impl(), &HTMLParser::isindexCreateErrorCheck);
diff --git a/WebCore/html/HTMLTagNames.in b/WebCore/html/HTMLTagNames.in
index 430b8ea..87c7288 100644
--- a/WebCore/html/HTMLTagNames.in
+++ b/WebCore/html/HTMLTagNames.in
@@ -55,6 +55,7 @@ h5 interfaceName=HTMLHeadingElement, createWithNew
 h6 interfaceName=HTMLHeadingElement, createWithNew
 head createWithNew
 header interfaceName=HTMLElement
+hgroup interfaceName=HTMLElement
 hr interfaceName=HTMLHRElement, createWithNew
 html createWithNew
 i interfaceName=HTMLElement

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list