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

rniwa at webkit.org rniwa at webkit.org
Wed Dec 22 12:59:08 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit d63b2d43f76347f4b6017e2bee48e7d64a342cd8
Author: rniwa at webkit.org <rniwa at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Sep 3 18:21:40 2010 +0000

    2010-09-03  Ryosuke Niwa  <rniwa at webkit.org>
    
            Reviewed by Kent Tamura.
    
            Can't unbold bolded list item when list is surrounded by <b> tag
            https://bugs.webkit.org/show_bug.cgi?id=25086
    
            Added a regression test for the bug because the bug has been fixed by http://trac.webkit.org/changeset/66324.
            The test ensures WebKit removes implicitly styled element such as b around list element
            when style is toggled inside the list.
    
            * editing/style/push-down-implicit-styles-around-list-expected.txt: Added.
            * editing/style/push-down-implicit-styles-around-list.html: Added.
            * editing/style/script-tests/push-down-implicit-styles-around-list.js: Added.
            (testSingleToggle):
            (selectAll):
            (selectTest):
            (selectFirstWord):
            (selectSecondWord):
            (selectLastTwoWords):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66743 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index acab3b3..c65b343 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,24 @@
+2010-09-03  Ryosuke Niwa  <rniwa at webkit.org>
+
+        Reviewed by Kent Tamura.
+
+        Can't unbold bolded list item when list is surrounded by <b> tag
+        https://bugs.webkit.org/show_bug.cgi?id=25086
+
+        Added a regression test for the bug because the bug has been fixed by http://trac.webkit.org/changeset/66324.
+        The test ensures WebKit removes implicitly styled element such as b around list element
+        when style is toggled inside the list.
+
+        * editing/style/push-down-implicit-styles-around-list-expected.txt: Added.
+        * editing/style/push-down-implicit-styles-around-list.html: Added.
+        * editing/style/script-tests/push-down-implicit-styles-around-list.js: Added.
+        (testSingleToggle):
+        (selectAll):
+        (selectTest):
+        (selectFirstWord):
+        (selectSecondWord):
+        (selectLastTwoWords):
+
 2010-09-03  Dan Bernstein  <mitz at apple.com>
 
         Reviewed by Anders Carlsson.
diff --git a/LayoutTests/editing/style/push-down-implicit-styles-around-list-expected.txt b/LayoutTests/editing/style/push-down-implicit-styles-around-list-expected.txt
new file mode 100644
index 0000000..f65303f
--- /dev/null
+++ b/LayoutTests/editing/style/push-down-implicit-styles-around-list-expected.txt
@@ -0,0 +1,25 @@
+Test to make sure we push down inline styles properly.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS bold on first word of <b><ul><li><b>a</b></li></ul></b> yields <ul><li>a</li></ul>
+PASS bold on first word of <b><ul><li>hello</li><li>world</li></ul></b> yields <ul><li>hello</li><li style="font-weight: bold; ">world</li></ul>
+PASS bold on second word of <ul><li>hello</li><li style="font-weight: bold; ">world</li></ul> yields <ul><li>hello</li><li>world</li></ul>
+PASS bold on first word of <b><ul><li>hello world</li><li>webkit</li></ul></b> yields <ul><li>hello<b> world</b></li><li style="font-weight: bold; ">webkit</li></ul>
+PASS italic on first word of <i><ul><li><i>a</i></li></ul></i> yields <ul><li>a</li></ul>
+PASS italic on first word of <i><ul><li>hello</li><li>world</li></ul></i> yields <ul><li>hello</li><li style="font-style: italic; ">world</li></ul>
+PASS italic on second word of <ul><li>hello</li><li style="font-style: italic; ">world</li></ul> yields <ul><li>hello</li><li>world</li></ul>
+PASS italic on first word of <i><ul><li>hello world</li><li>webkit</li></ul></i> yields <ul><li>hello<i> world</i></li><li style="font-style: italic; ">webkit</li></ul>
+PASS underline on first word of <u><ul><li><u>a</u></li></ul></u> yields <ul><li>a</li></ul>
+PASS underline on first word of <u><ul><li>hello</li><li>world</li></ul></u> yields <ul><li>hello</li><li style="text-decoration: underline; ">world</li></ul>
+PASS underline on second word of <ul><li>hello</li><li style="text-decoration: underline; ">world</li></ul> yields <ul><li>hello</li><li>world</li></ul>
+PASS underline on first word of <u><ul><li>hello world</li><li>webkit</li></ul></u> yields <ul><li>hello<u> world</u></li><li style="text-decoration: underline; ">webkit</li></ul>
+PASS strikethrough on first word of <s><ul><li><s>a</s></li></ul></s> yields <ul><li>a</li></ul>
+PASS strikethrough on first word of <s><ul><li>hello</li><li>world</li></ul></s> yields <ul><li>hello</li><li style="text-decoration: line-through; ">world</li></ul>
+PASS strikethrough on second word of <ul><li>hello</li><li style="text-decoration: line-through; ">world</li></ul> yields <ul><li>hello</li><li>world</li></ul>
+PASS strikethrough on first word of <s><ul><li>hello world</li><li>webkit</li></ul></s> yields <ul><li>hello<s> world</s></li><li style="text-decoration: line-through; ">webkit</li></ul>
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/editing/style/push-down-implicit-styles-around-list.html b/LayoutTests/editing/style/push-down-implicit-styles-around-list.html
new file mode 100644
index 0000000..4031ace
--- /dev/null
+++ b/LayoutTests/editing/style/push-down-implicit-styles-around-list.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/push-down-implicit-styles-around-list.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/editing/style/script-tests/push-down-implicit-styles-around-list.js b/LayoutTests/editing/style/script-tests/push-down-implicit-styles-around-list.js
new file mode 100644
index 0000000..475dc72
--- /dev/null
+++ b/LayoutTests/editing/style/script-tests/push-down-implicit-styles-around-list.js
@@ -0,0 +1,72 @@
+description('Test to make sure we push down inline styles properly.');
+
+var testContainer = document.createElement("div");
+testContainer.contentEditable = true;
+document.body.appendChild(testContainer);
+
+function testSingleToggle(toggleCommand, selector, initialContents, expectedContents)
+{
+    testContainer.innerHTML = initialContents;
+    var selected = selector(testContainer);
+    document.execCommand('styleWithCSS', false, 'false');
+    document.execCommand(toggleCommand, false, null);
+    var action = toggleCommand + ' on ' + selected + ' of ' + initialContents + " yields " + testContainer.innerHTML;
+    if (testContainer.innerHTML == expectedContents)
+        testPassed(action);
+    else
+        testFailed(action + ", expected " + expectedContents);
+}
+
+function selectAll(container) {
+    window.getSelection().selectAllChildren(container);
+    return 'all';
+}
+
+function selectTest(container) {
+    window.getSelection().selectAllChildren(document.getElementById('test'));
+    return 'test';
+}
+
+function selectFirstWord(container) {
+    window.getSelection().setPosition(container, 0);
+    window.getSelection().modify('extend', 'forward', 'word');
+    return 'first word';
+}
+
+function selectSecondWord(container) {
+    window.getSelection().setPosition(container, 0);
+    window.getSelection().modify('move', 'forward', 'word');
+    window.getSelection().modify('extend', 'forward', 'word');
+    return 'second word';
+}
+
+function selectLastTwoWords(container) {
+    window.getSelection().setPosition(container, container.childNodes.length);
+    window.getSelection().modify('extend', 'backward', 'word');
+    window.getSelection().modify('extend', 'backward', 'word');
+    return 'last two words';
+}
+
+testSingleToggle("bold", selectFirstWord, '<b><ul><li><b>a</b></li></ul></b>', '<ul><li>a</li></ul>');
+testSingleToggle("bold", selectFirstWord, '<b><ul><li>hello</li><li>world</li></ul></b>', '<ul><li>hello</li><li style="font-weight: bold; ">world</li></ul>');
+testSingleToggle("bold", selectSecondWord, '<ul><li>hello</li><li style="font-weight: bold; ">world</li></ul>', '<ul><li>hello</li><li>world</li></ul>');
+testSingleToggle("bold", selectFirstWord, '<b><ul><li>hello world</li><li>webkit</li></ul></b>', '<ul><li>hello<b> world</b></li><li style="font-weight: bold; ">webkit</li></ul>');
+
+testSingleToggle("italic", selectFirstWord, '<i><ul><li><i>a</i></li></ul></i>', '<ul><li>a</li></ul>');
+testSingleToggle("italic", selectFirstWord, '<i><ul><li>hello</li><li>world</li></ul></i>', '<ul><li>hello</li><li style="font-style: italic; ">world</li></ul>');
+testSingleToggle("italic", selectSecondWord, '<ul><li>hello</li><li style="font-style: italic; ">world</li></ul>', '<ul><li>hello</li><li>world</li></ul>');
+testSingleToggle("italic", selectFirstWord, '<i><ul><li>hello world</li><li>webkit</li></ul></i>', '<ul><li>hello<i> world</i></li><li style="font-style: italic; ">webkit</li></ul>');
+
+testSingleToggle("underline", selectFirstWord, '<u><ul><li><u>a</u></li></ul></u>', '<ul><li>a</li></ul>');
+testSingleToggle("underline", selectFirstWord, '<u><ul><li>hello</li><li>world</li></ul></u>', '<ul><li>hello</li><li style="text-decoration: underline; ">world</li></ul>');
+testSingleToggle("underline", selectSecondWord, '<ul><li>hello</li><li style="text-decoration: underline; ">world</li></ul>', '<ul><li>hello</li><li>world</li></ul>');
+testSingleToggle("underline", selectFirstWord, '<u><ul><li>hello world</li><li>webkit</li></ul></u>', '<ul><li>hello<u> world</u></li><li style="text-decoration: underline; ">webkit</li></ul>');
+
+testSingleToggle("strikethrough", selectFirstWord, '<s><ul><li><s>a</s></li></ul></s>', '<ul><li>a</li></ul>');
+testSingleToggle("strikethrough", selectFirstWord, '<s><ul><li>hello</li><li>world</li></ul></s>', '<ul><li>hello</li><li style="text-decoration: line-through; ">world</li></ul>');
+testSingleToggle("strikethrough", selectSecondWord, '<ul><li>hello</li><li style="text-decoration: line-through; ">world</li></ul>', '<ul><li>hello</li><li>world</li></ul>');
+testSingleToggle("strikethrough", selectFirstWord, '<s><ul><li>hello world</li><li>webkit</li></ul></s>', '<ul><li>hello<s> world</s></li><li style="text-decoration: line-through; ">webkit</li></ul>');
+
+document.body.removeChild(testContainer);
+
+var successfullyParsed = true;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list