[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 18:17:25 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit ea4caf4e46f04ed5861266e832c6d8aa26f5e75d
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 9 16:40:53 2010 +0000

    2010-12-09  Peter Beverloo  <peter at lvp-media.com>
    
            Reviewed by Maciej Stachowiak.
    
            Default CSS definitions for the figure and figcaption elements.
    
            * fast/html/figcaption-element-expected.txt: Added.
            * fast/html/figcaption-element.html: Added.
            * fast/html/figure-element-expected.txt: Added.
            * fast/html/figure-element.html: Added.
            * fast/html/script-tests/figcaption-element.js: Added.
            * fast/html/script-tests/figure-element.js: Added.
    2010-12-09  Peter Beverloo  <peter at lvp-media.com>
    
            Reviewed by Maciej Stachowiak.
    
            Default CSS definitions for the figure and figcaption elements.
    
            Tests: fast/html/figcaption-element.html
                   fast/html/figure-element.html
    
            * css/html.css:
            (figure): The default figure-style equals a blockquote
            (figcaption): A non-sectioning block-level element
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73613 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 00407d0..a510336 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2010-12-09  Peter Beverloo  <peter at lvp-media.com>
+
+        Reviewed by Maciej Stachowiak.
+
+        Default CSS definitions for the figure and figcaption elements.
+
+        * fast/html/figcaption-element-expected.txt: Added.
+        * fast/html/figcaption-element.html: Added.
+        * fast/html/figure-element-expected.txt: Added.
+        * fast/html/figure-element.html: Added.
+        * fast/html/script-tests/figcaption-element.js: Added.
+        * fast/html/script-tests/figure-element.js: Added.
+
 2010-12-09  Yael Aharon  <yael.aharon at nokia.com>
 
         Reviewed by Antonio Gomes.
diff --git a/LayoutTests/fast/html/figcaption-element-expected.txt b/LayoutTests/fast/html/figcaption-element-expected.txt
new file mode 100644
index 0000000..07d615b
--- /dev/null
+++ b/LayoutTests/fast/html/figcaption-element-expected.txt
@@ -0,0 +1,21 @@
+Various tests for the figcaption element.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+<figcaption> default styling:
+PASS getStyleValue("figcaption0","display") is "block"
+<figcaption> closes <p>:
+PASS figcaption1.parentNode.nodeName == "p" is false
+<p> does not close <figcaption>:
+PASS p1.parentNode.nodeName is "FIGCAPTION"
+<figcaption> can be nested inside <figcaption> or <footer>:
+PASS figcaption3.parentNode.id is "figcaption2"
+PASS figcaption5.parentNode.id is "footer1"
+Residual style:
+PASS getStyleValue("figcaption4","font-weight") is "bold"
+PASS getStyleValue("span1","font-weight") is "bold"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/html/figcaption-element.html b/LayoutTests/fast/html/figcaption-element.html
new file mode 100644
index 0000000..d1e82e7
--- /dev/null
+++ b/LayoutTests/fast/html/figcaption-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/figcaption-element.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/html/figure-element-expected.txt b/LayoutTests/fast/html/figure-element-expected.txt
new file mode 100644
index 0000000..28f383f
--- /dev/null
+++ b/LayoutTests/fast/html/figure-element-expected.txt
@@ -0,0 +1,25 @@
+Various tests for the figure element.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+<figure> default styling:
+PASS getStyleValue("figure0","display") is "block"
+PASS getStyleValue("figure0","margin-top") is emSize
+PASS getStyleValue("figure0","margin-right") is "40px"
+PASS getStyleValue("figure0","margin-bottom") is emSize
+PASS getStyleValue("figure0","margin-left") is "40px"
+<figure> closes <p>:
+PASS figure1.parentNode.nodeName == "p" is false
+<p> does not close <figure>:
+PASS p1.parentNode.nodeName is "FIGURE"
+<figure> can be nested inside <figure> or <footer>:
+PASS figure3.parentNode.id is "figure2"
+PASS figure5.parentNode.id is "footer1"
+Residual style:
+PASS getStyleValue("figure4","font-weight") is "bold"
+PASS getStyleValue("span1","font-weight") is "bold"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/html/figure-element.html b/LayoutTests/fast/html/figure-element.html
new file mode 100644
index 0000000..669237a
--- /dev/null
+++ b/LayoutTests/fast/html/figure-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/figure-element.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/html/script-tests/figcaption-element.js b/LayoutTests/fast/html/script-tests/figcaption-element.js
new file mode 100644
index 0000000..505a58a
--- /dev/null
+++ b/LayoutTests/fast/html/script-tests/figcaption-element.js
@@ -0,0 +1,40 @@
+description('Various tests for the figcaption element.');
+
+function getStyleValue(id, propertyName) {
+    return document.defaultView.getComputedStyle(document.getElementById(id), null).getPropertyValue(propertyName);
+}
+
+var testParent = document.createElement('div');
+document.body.appendChild(testParent);
+
+debug('&lt;figcaption> default styling:');
+testParent.innerHTML = '<figcaption id="figcaption0">element</figure>';
+var emSize = getStyleValue("figcaption0","font-size");
+shouldBe('getStyleValue("figcaption0","display")', '"block"');
+
+debug('&lt;figcaption> closes &lt;p>:');
+testParent.innerHTML = '<p>Test that <figcaption id="figcaption1">a figcaption element</figcaption> closes &lt;p>.</p>';
+var figcaption1 = document.getElementById('figcaption1');
+shouldBeFalse('figcaption1.parentNode.nodeName == "p"');
+
+debug('&lt;p> does not close &lt;figcaption>:');
+testParent.innerHTML = '<figcaption>Test that <p id="p1">a p element</p> does not close a figcaption element.</figcaption>';
+var p1 = document.getElementById('p1');
+shouldBe('p1.parentNode.nodeName', '"FIGCAPTION"');
+
+debug('&lt;figcaption> can be nested inside &lt;figcaption> or &lt;footer>:');
+testParent.innerHTML = '<figcaption id="figcaption2">Test that <figcaption id="figcaption3">a figcaption element</figcaption> can be nested inside another figcaption element.</figcaption>';
+var figcaption3 = document.getElementById('figcaption3');
+shouldBe('figcaption3.parentNode.id', '"figcaption2"');
+testParent.innerHTML = '<footer id="footer1">Test that <figcaption id="figcaption5">a figcaption element</figcaption> can be nested inside a footer element.</footer>';
+var figcaption5 = document.getElementById('figcaption5');
+shouldBe('figcaption5.parentNode.id', '"footer1"');
+
+debug('Residual style:');
+testParent.innerHTML = '<b><figcaption id="figcaption4">This text should be bold.</figcaption> <span id="span1">This is also bold.</span></b>';
+shouldBe('getStyleValue("figcaption4","font-weight")', '"bold"');
+shouldBe('getStyleValue("span1","font-weight")', '"bold"');
+document.body.removeChild(testParent);
+
+var successfullyParsed = true;
+
diff --git a/LayoutTests/fast/html/script-tests/figure-element.js b/LayoutTests/fast/html/script-tests/figure-element.js
new file mode 100644
index 0000000..0fcb419
--- /dev/null
+++ b/LayoutTests/fast/html/script-tests/figure-element.js
@@ -0,0 +1,44 @@
+description('Various tests for the figure element.');
+
+function getStyleValue(id, propertyName) {
+    return document.defaultView.getComputedStyle(document.getElementById(id), null).getPropertyValue(propertyName);
+}
+
+var testParent = document.createElement('div');
+document.body.appendChild(testParent);
+
+debug('&lt;figure> default styling:');
+testParent.innerHTML = '<figure id="figure0">element</figure>';
+var emSize = getStyleValue("figure0","font-size");
+shouldBe('getStyleValue("figure0","display")', '"block"');
+shouldBe('getStyleValue("figure0","margin-top")', 'emSize');
+shouldBe('getStyleValue("figure0","margin-right")', '"40px"');
+shouldBe('getStyleValue("figure0","margin-bottom")', 'emSize');
+shouldBe('getStyleValue("figure0","margin-left")', '"40px"');
+
+debug('&lt;figure> closes &lt;p>:');
+testParent.innerHTML = '<p>Test that <figure id="figure1">a figure element</figure> closes &lt;p>.</p>';
+var figure1 = document.getElementById('figure1');
+shouldBeFalse('figure1.parentNode.nodeName == "p"');
+
+debug('&lt;p> does not close &lt;figure>:');
+testParent.innerHTML = '<figure>Test that <p id="p1">a p element</p> does not close a figure element.</figure>';
+var p1 = document.getElementById('p1');
+shouldBe('p1.parentNode.nodeName', '"FIGURE"');
+
+debug('&lt;figure> can be nested inside &lt;figure> or &lt;footer>:');
+testParent.innerHTML = '<figure id="figure2">Test that <figure id="figure3">a figure element</figure> can be nested inside another figure element.</figure>';
+var figure3 = document.getElementById('figure3');
+shouldBe('figure3.parentNode.id', '"figure2"');
+testParent.innerHTML = '<footer id="footer1">Test that <figure id="figure5">a figure element</figure> can be nested inside a footer element.</footer>';
+var figure5 = document.getElementById('figure5');
+shouldBe('figure5.parentNode.id', '"footer1"');
+
+debug('Residual style:');
+testParent.innerHTML = '<b><figure id="figure4">This text should be bold.</figure> <span id="span1">This is also bold.</span></b>';
+shouldBe('getStyleValue("figure4","font-weight")', '"bold"');
+shouldBe('getStyleValue("span1","font-weight")', '"bold"');
+document.body.removeChild(testParent);
+
+var successfullyParsed = true;
+
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index ad0f5e3..306927d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-12-09  Peter Beverloo  <peter at lvp-media.com>
+
+        Reviewed by Maciej Stachowiak.
+
+        Default CSS definitions for the figure and figcaption elements.
+
+        Tests: fast/html/figcaption-element.html
+               fast/html/figure-element.html
+
+        * css/html.css:
+        (figure): The default figure-style equals a blockquote
+        (figcaption): A non-sectioning block-level element
+
 2010-12-09  Yury Semikhatsky  <yurys at chromium.org>
 
         Reviewed by Pavel Feldman.
diff --git a/WebCore/css/html.css b/WebCore/css/html.css
index c9ca58b..823f5f3 100644
--- a/WebCore/css/html.css
+++ b/WebCore/css/html.css
@@ -90,6 +90,15 @@ blockquote {
     margin: 1__qem 40px 1em 40px
 }
 
+figcaption {
+    display: block
+}
+
+figure {
+    display: block;
+    margin: 1em 40px 1em 40px
+}
+
 q {
     display: inline
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list