Commit 538ce8bc authored by justing's avatar justing

LayoutTests:

        Reviewed by john

        * editing/execCommand/create-list-with-hr-expected.checksum: Added.
        * editing/execCommand/create-list-with-hr-expected.png: Added.
        * editing/execCommand/create-list-with-hr-expected.txt: Added.
        * editing/execCommand/create-list-with-hr.html: Added.

WebCore:

        Reviewed by john
        
        <rdar://problem/4755287>
        Writely Editor: Crash occurs at WebCore::maxDeepOffset(WebCore::Node const*) when attempting to create a OL/UL following a HR element

        * editing/markup.cpp:
        (WebCore::createMarkup): Migrate to isBlock (isBlockFlow is true for inline replaced 
        elements).  Don't skip blocks that aren't containers (like horizontal rules).



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e64e1d7b
2006-10-02 Justin Garcia <justin.garcia@apple.com>
Reviewed by john
* editing/execCommand/create-list-with-hr-expected.checksum: Added.
* editing/execCommand/create-list-with-hr-expected.png: Added.
* editing/execCommand/create-list-with-hr-expected.txt: Added.
* editing/execCommand/create-list-with-hr.html: Added.
2006-10-02 Beth Dakin <bdakin@apple.com>
Minor harassment followed by abject surrender provided by ggggaren.
d0c9c527856faa16407edf5a05f9ec01
\ No newline at end of file
EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document
EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 49 of #text > B > P > BODY > HTML > #document to 49 of #text > B > P > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x576
RenderBlock {P} at (0,0) size 784x54
RenderText {#text} at (0,0) size 514x18
text run at (0,0) width 514: "This test pushes a horizontal rule into an unordered list with InsertUnorderedList. "
RenderInline {B} at (0,0) size 771x36
RenderText {#text} at (514,0) size 771x36
text run at (514,0) width 257: "The fact that the horizontal rule is put"
text run at (0,18) width 550: "into ans unnecessary div when it's pushed into the list might be considered a bug. "
RenderInline {B} at (0,0) size 732x36
RenderText {#text} at (550,18) size 732x36
text run at (550,18) width 182: "The fact that the caret isn't"
text run at (0,36) width 127: "preserved is a bug."
RenderBlock {DIV} at (0,70) size 784x28
RenderBlock {UL} at (0,0) size 784x28
RenderListItem {LI} at (40,0) size 744x28
RenderBlock (anonymous) at (0,0) size 744x18
RenderListMarker at (-17,0) size 7x18
RenderBlock {DIV} at (0,26) size 744x2
RenderBlock {HR} at (0,0) size 744x2 [border: (1px inset #000000)]
RenderBlock (anonymous) at (0,36) size 744x0
RenderBlock (anonymous) at (0,44) size 784x0
caret: position 49 of child 0 {#text} of child 2 {B} of child 0 {P} of child 0 {BODY} of child 0 {HTML} of document
<p>This test pushes a horizontal rule into an unordered list with InsertUnorderedList. <b>The fact that the horizontal rule is put into an unnecessary div when it's pushed into the list might be considered a bug. </b><b>The fact that the caret isn't preserved is a bug.</b></p>
<div contenteditable="true" id="div"><hr></div>
<script>
var div = document.getElementById("div");
var sel = window.getSelection();
sel.setPosition(div, 0);
document.execCommand("InsertUnorderedList");
</script>
\ No newline at end of file
2006-10-02 Justin Garcia <justin.garcia@apple.com>
Reviewed by john
<rdar://problem/4755287>
Writely Editor: Crash occurs at WebCore::maxDeepOffset(WebCore::Node const*) when attempting to create a OL/UL following a HR element
* editing/markup.cpp:
(WebCore::createMarkup): Migrate to isBlock (isBlockFlow is true for inline replaced
elements). Don't skip blocks that aren't containers (like horizontal rules).
2006-10-03 Darin Adler <darin@apple.com>
Reviewed by Justin Garcia.
......@@ -353,8 +353,8 @@ DeprecatedString createMarkup(const Range *range, Vector<Node*>* nodes, EAnnotat
for (Node *n = startNode; n != pastEnd; n = next) {
next = n->traverseNextNode();
if (n->isBlockFlow() && next == pastEnd)
// Don't write out an empty block.
if (isBlock(n) && canHaveChildrenForEditing(n) && next == pastEnd)
// Don't write out empty block containers that aren't fully selected.
continue;
// Add the node to the markup.
......
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