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

rniwa at webkit.org rniwa at webkit.org
Wed Dec 22 18:43:53 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 52d6c2db448a6bf6c35c62f3bc887563c129c492
Author: rniwa at webkit.org <rniwa at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 16 20:01:57 2010 +0000

    2010-12-16  Ryosuke Niwa  <rniwa at webkit.org>
    
            Reviewed by Darin Adler.
    
            execCommand('styleWithCSS') is ignored when selection isn't inside a contenteditable area
            https://bugs.webkit.org/show_bug.cgi?id=51164
    
            Fixed the bug by always enabling the StyleWithCSS command.
    
            Test: editing/style/stylewithcss-without-selection.html
    
            * editing/EditorCommand.cpp:
            (WebCore::createCommandMap): StyleWithCSS is enabled rather than enabledInRichlyEditableText.
    2010-12-16  Ryosuke Niwa  <rniwa at webkit.org>
    
            Reviewed by Darin Adler.
    
            execCommand('styleWithCSS') is ignored when selection isn't inside a contenteditable area
            https://bugs.webkit.org/show_bug.cgi?id=51164
    
            Added a test to ensure WebKit accepts StyleWithCSS command even if the current selection
            isn't inside a contenteditable region.
    
            * editing/style/stylewithcss-without-selection-expected.txt: Added.
            * editing/style/stylewithcss-without-selection.html: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74204 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index f47998b..830e9cc 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2010-12-16  Ryosuke Niwa  <rniwa at webkit.org>
+
+        Reviewed by Darin Adler.
+
+        execCommand('styleWithCSS') is ignored when selection isn't inside a contenteditable area
+        https://bugs.webkit.org/show_bug.cgi?id=51164
+
+        Added a test to ensure WebKit accepts StyleWithCSS command even if the current selection
+        isn't inside a contenteditable region.
+
+        * editing/style/stylewithcss-without-selection-expected.txt: Added.
+        * editing/style/stylewithcss-without-selection.html: Added.
+
 2010-12-16  Andrew Scherkus  <scherkus at chromium.org>
 
         Unreviewed.  Updating Chromium media test expectations.
diff --git a/LayoutTests/editing/style/stylewithcss-without-selection-expected.txt b/LayoutTests/editing/style/stylewithcss-without-selection-expected.txt
new file mode 100644
index 0000000..42e316b
--- /dev/null
+++ b/LayoutTests/editing/style/stylewithcss-without-selection-expected.txt
@@ -0,0 +1,4 @@
+This is a test of styleWithCSS.
+
+hello
+PASS
diff --git a/LayoutTests/editing/style/stylewithcss-without-selection.html b/LayoutTests/editing/style/stylewithcss-without-selection.html
new file mode 100644
index 0000000..27af7fe
--- /dev/null
+++ b/LayoutTests/editing/style/stylewithcss-without-selection.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<body>
+<p>This is a test of styleWithCSS.</p>
+<div id="test" contenteditable>
+hello
+</div>
+<script>
+
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+
+var test = document.getElementById('test');
+document.execCommand('styleWithCSS', false, true);
+window.getSelection().selectAllChildren(test);
+document.execCommand('bold', false, null);
+var firstInnerHTML = test.innerHTML;
+
+document.execCommand('undo', false, null);
+document.execCommand('styleWithCSS', false, true);
+document.execCommand('bold', false, null);
+
+var result = 'PASS';
+if (firstInnerHTML != test.innerHTML)
+    result = 'FAIL: ' + firstResult + ' does not match ' + test.innerHTML;
+document.body.appendChild(document.createTextNode(result));
+
+</script>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2fb75e0..20eae98 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-12-16  Ryosuke Niwa  <rniwa at webkit.org>
+
+        Reviewed by Darin Adler.
+
+        execCommand('styleWithCSS') is ignored when selection isn't inside a contenteditable area
+        https://bugs.webkit.org/show_bug.cgi?id=51164
+
+        Fixed the bug by always enabling the StyleWithCSS command.
+
+        Test: editing/style/stylewithcss-without-selection.html
+
+        * editing/EditorCommand.cpp:
+        (WebCore::createCommandMap): StyleWithCSS is enabled rather than enabledInRichlyEditableText.
+
 2010-12-16  Anders Carlsson  <andersca at apple.com>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/editing/EditorCommand.cpp b/WebCore/editing/EditorCommand.cpp
index fb5a9d6..7b7ec7b 100644
--- a/WebCore/editing/EditorCommand.cpp
+++ b/WebCore/editing/EditorCommand.cpp
@@ -1502,7 +1502,7 @@ static const CommandMap& createCommandMap()
         { "SelectWord", { executeSelectWord, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
         { "SetMark", { executeSetMark, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
         { "Strikethrough", { executeStrikethrough, supported, enabledInRichlyEditableText, stateStrikethrough, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
-        { "StyleWithCSS", { executeStyleWithCSS, supported, enabledInRichlyEditableText, stateStyleWithCSS, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
+        { "StyleWithCSS", { executeStyleWithCSS, supported, enabled, stateStyleWithCSS, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
         { "Subscript", { executeSubscript, supported, enabledInRichlyEditableText, stateSubscript, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
         { "Superscript", { executeSuperscript, supported, enabledInRichlyEditableText, stateSuperscript, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
         { "SwapWithMark", { executeSwapWithMark, supportedFromMenuOrKeyBinding, enabledVisibleSelectionAndMark, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list