Commit b8bb9369 authored by rniwa@webkit.org's avatar rniwa@webkit.org
Browse files

2010-10-25 Ryosuke Niwa <rniwa@webkit.org>

        Reviewed by Tony Chang.

        execCommand removeFormat is blowing away text outside the selection
        https://bugs.webkit.org/show_bug.cgi?id=21843

        Added a test to ensure executing RemoveFormant command on an orphaned list item
        does not remove non-orphaned list items preceding the orphaned item.

        * editing/execCommand/remove-format-orphaned-list-item-expected.txt: Added.
        * editing/execCommand/remove-format-orphaned-list-item.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70500 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 631cf2e5
2010-10-25 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Tony Chang.
execCommand removeFormat is blowing away text outside the selection
https://bugs.webkit.org/show_bug.cgi?id=21843
Added a test to ensure executing RemoveFormant command on an orphaned list item
does not remove non-orphaned list items preceding the orphaned item.
* editing/execCommand/remove-format-orphaned-list-item-expected.txt: Added.
* editing/execCommand/remove-format-orphaned-list-item.html: Added.
2010-10-25 Csaba Osztrogonác <ossy@webkit.org>
 
Unreviewed.
This tests RemoveFormant command on an orphaned list item following non-orphaned list items. WebKit used to remove non-orphaned list items ("hello world"). You should see "hello world WebKit" below.
| <ul>
| <li>
| "hello"
| <li>
| "world"
| "<#selection-anchor>WebKit<#selection-focus>"
<!DOCTYPE html>
<html>
<body>
<script src="../../resources/dump-as-markup.js"></script>
<div id="test" contenteditable><ul><li>hello</li><li>world</li>WebKit</ul></div>
<script>
Markup.description('This tests RemoveFormant command on an orphaned list item following non-orphaned list items. WebKit used to remove non-orphaned list items ("hello world"). You should see "hello world WebKit" below.');
var text = document.getElementById('test').lastChild.lastChild;
var range = document.createRange();
range.setStart(text, 0);
range.setEnd(text, 6);
window.getSelection().removeAllRanges();
window.getSelection().addRange(range);
document.execCommand('RemoveFormat', false, null);
Markup.dump('test');
</script>
</body>
</html>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment