Commit 5009cdb5 authored by justing's avatar justing

LayoutTests:

        Rolling the fix for 5310404 back in now that 5310404 has been fixed in Mail.

        * editing/deleting/4845371-expected.checksum:
        * editing/deleting/4845371-expected.txt:
        * editing/deleting/4845371.html:
        * editing/deleting/5126166-expected.txt:
        * editing/deleting/5290534.html: Added.
        * editing/deleting/5290534.html-disabled: Removed.

WebCore:

        Rolling the fix for 5290534 back in now that 5310404 has been fixed in Mail.

        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::handleGeneralDelete):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@24123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a57755c3
2007-07-09 Justin Garcia <justin.garcia@apple.com>
Rolling the fix for 5310404 back in now that 5310404 has been fixed in Mail.
* editing/deleting/4845371-expected.checksum:
* editing/deleting/4845371-expected.txt:
* editing/deleting/4845371.html:
* editing/deleting/5126166-expected.txt:
* editing/deleting/5290534.html: Added.
* editing/deleting/5290534.html-disabled: Removed.
2007-07-09 Justin Garcia <justin.garcia@apple.com>
Reviewed by John.
774af8ecc2ec6463f3c453f0044f6acd
\ No newline at end of file
fc01f7cdc3dcd8d9ec9d95add16456a2
\ No newline at end of file
......@@ -14,22 +14,16 @@ layer at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock {P} at (0,0) size 784x36
RenderText {#text} at (0,0) size 386x18
text run at (0,0) width 386: "This tests for a crasher when deleting contents of a table cell. "
RenderInline {B} at (0,0) size 741x36
RenderText {#text} at (386,0) size 741x36
text run at (386,0) width 105: "There is a bug. "
text run at (491,0) width 250: "A br is inserted in the table cell that's"
text run at (0,18) width 84: "emptied out."
RenderBlock {DIV} at (0,52) size 784x42
RenderTable {TABLE} at (0,0) size 32x42
RenderTableSection {TBODY} at (0,0) size 32x42
RenderTableRow {TR} at (0,2) size 32x38
RenderTableCell {TD} at (2,2) size 2x38 [r=0 c=0 rs=1 cs=1]
RenderBlock {P} at (0,0) size 784x18
RenderText {#text} at (0,0) size 382x18
text run at (0,0) width 382: "This tests for a crasher when deleting contents of a table cell."
RenderBlock {DIV} at (0,34) size 784x24
RenderTable {TABLE} at (0,0) size 32x24
RenderTableSection {TBODY} at (0,0) size 32x24
RenderTableRow {TR} at (0,2) size 32x20
RenderTableCell {TD} at (2,2) size 2x20 [r=0 c=0 rs=1 cs=1]
RenderBR {BR} at (1,1) size 0x18
RenderBR {BR} at (1,19) size 0x18
RenderTableCell {TD} at (6,11) size 24x20 [r=0 c=1 rs=1 cs=1]
RenderTableCell {TD} at (6,2) size 24x20 [r=0 c=1 rs=1 cs=1]
RenderText {#text} at (1,1) size 22x18
text run at (1,1) width 22: "baz"
caret: position 0 of child 0 {BR} of child 0 {TD} of child 0 {TR} of child 0 {TBODY} of child 0 {TABLE} of child 2 {DIV} of child 0 {BODY} of child 0 {HTML} of document
<p>This tests for a crasher when deleting contents of a table cell. <b>There is a bug. A br is inserted in the table cell that's emptied out.</b></p>
<p>This tests for a crasher when deleting contents of a table cell.</p>
<div id="div" contenteditable="true"><table><tr><td>foo <a href="http://www.google.com/">bar</a></td><td>baz</td></tr></table></div>
<script src="../editing.js"></script>
......
......@@ -18,8 +18,7 @@ layer at (0,0) size 800x600
RenderTable {TABLE} at (0,28) size 351x28 [border: (1px outset #808080)]
RenderTableSection {TBODY} at (1,1) size 349x26
RenderTableRow {TR} at (0,2) size 349x22
RenderTableCell {TD} at (2,2) size 4x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderBR {BR} at (2,2) size 0x18
RenderTableCell {TD} at (2,11) size 4x4 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderTableCell {TD} at (8,2) size 339x22 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
RenderText {#text} at (2,2) size 335x18
text run at (2,2) width 335: "There should be one empty cell to the left of this one."
......
2007-07-09 Justin Garcia <justin.garcia@apple.com>
Rolling the fix for 5290534 back in now that 5310404 has been fixed in Mail.
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::handleGeneralDelete):
2007-07-09 Geoffrey Garen <ggaren@apple.com>
Reviewed by Anders Carlsson.
......@@ -410,7 +410,7 @@ void DeleteSelectionCommand::handleGeneralDelete()
}
if (m_downstreamEnd.node() != startNode && !m_upstreamStart.node()->isDescendantOf(m_downstreamEnd.node()) && m_downstreamEnd.node()->inDocument() && m_downstreamEnd.offset() >= m_downstreamEnd.node()->caretMinOffset()) {
if (m_downstreamEnd.offset() >= maxDeepOffset(m_downstreamEnd.node())) {
if (m_downstreamEnd.offset() >= maxDeepOffset(m_downstreamEnd.node()) && !canHaveChildrenForEditing(m_downstreamEnd.node())) {
// FIXME: Shouldn't remove m_downstreamEnd.node() if its offsets refer to children.
// The node itself is fully selected, not just its contents. Delete it.
removeNode(m_downstreamEnd.node());
......
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