Skip to content
  • commit-queue@webkit.org's avatar
    contentEditable with "position:relative" paragraphs is buggy · c8932f89
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=33950
    
    Patch by Santosh Mahto <santosh.ma@samsung.com> on 2013-10-10
    Reviewed by Darin Adler.
    
    Source/WebCore:
    
    When paragraph is positioned(relative/absolute/fixed) then deleting
    that paragraph cause wrong merging of other(below) paragraphs. This is
    happening because positioned element is treated as special element and
    on deletion complete paragraph element is removed. The ranges become
    paragraph. This issue happens when all the content of special element
    are deleted. So the merging of paragraph is avoided in this scenario.
    
    Test: editing/deleting/deleting-relative-positioned-special-element.html
    
    * editing/DeleteSelectionCommand.cpp:
    (WebCore::DeleteSelectionCommand::initializeStartEnd):Avoid merging
    block when special candidate are included in deletion range
    
    LayoutTests:
    
    LayoutTests:
    
    Added a testcase to verify that when paragraph is relative positioned
    then deleting the all content of paragraph should not incorrectly collapse the
    others(below) paragraphs.
    And Rebaseline the test expectation.
    
    * editing/deleting/5546763-expected.txt: Updated.
    * editing/deleting/deleting-relative-positioned-special-element-expected.txt: Added.
    * editing/deleting/deleting-relative-positioned-special-element.html: Added.
    * editing/unsupported-content/table-delete-001.html: Adjusted to dump
    as markup.
    * editing/unsupported-content/table-delete-003.html: Adjusted to dump
    as markup.
    
    Below tests had wrong cursor position previously now corrected and
    both expected file has been changed to markup dump.
    * platform/mac/editing/unsupported-content/table-delete-001-expected.txt:
    * platform/mac/editing/unsupported-content/table-delete-003-expected.txt:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157292 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    c8932f89