Bug 118457

Summary: DeleteSelectionCommand does not handle correctly deletion with two consecutive BR element.
Product: WebKit Reporter: Enrica Casucci <enrica>
Component: HTML EditingAssignee: Enrica Casucci <enrica>
Status: RESOLVED FIXED    
Severity: Normal CC: rniwa, sam
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: Unspecified   
Attachments:
Description Flags
Test case
none
Patch simon.fraser: review+

Enrica Casucci
Reported 2013-07-07 23:49:35 PDT
Created attachment 206220 [details] Test case Repro steps: Open the attached test case (test2br.html). Click on the empty line below the empty image box Press backspace. Expected: the empty line is removed and the caret moves after the image. Actual: Nothing happens. The line is not removed and the caret remains in the same position. <rdar://problem/14160912>
Attachments
Test case (147 bytes, text/html)
2013-07-07 23:49 PDT, Enrica Casucci
no flags
Patch (6.44 KB, patch)
2013-07-08 02:01 PDT, Enrica Casucci
simon.fraser: review+
Enrica Casucci
Comment 1 2013-07-08 02:01:51 PDT
Simon Fraser (smfr)
Comment 2 2013-07-08 19:25:03 PDT
Comment on attachment 206224 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=206224&action=review > Source/WebCore/editing/DeleteSelectionCommand.cpp:312 > + // when the two elements are sibling and should be false in a case like <div><br></div><br>. …are siblings... > LayoutTests/editing/deleting/delete-image-followed-by-two-br-expected.txt:1 > +CONSOLE MESSAGE: line 16: TypeError: 'undefined' is not a function (evaluating 'document.getElementsById("test")') Should this be here?
Enrica Casucci
Comment 3 2013-07-08 19:32:23 PDT
(In reply to comment #2) > (From update of attachment 206224 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=206224&action=review > > > Source/WebCore/editing/DeleteSelectionCommand.cpp:312 > > + // when the two elements are sibling and should be false in a case like <div><br></div><br>. > > …are siblings... Fixed. > > > LayoutTests/editing/deleting/delete-image-followed-by-two-br-expected.txt:1 > > +CONSOLE MESSAGE: line 16: TypeError: 'undefined' is not a function (evaluating 'document.getElementsById("test")') > > Should this be here? No, it is a syntax error. Extra s in getElementById. thanks for catching it.
Enrica Casucci
Comment 4 2013-07-08 19:49:37 PDT
Committed revision 152478.
Note You need to log in before you can comment on or make changes to this bug.