Changeset 106380 in webkit


Ignore:
Timestamp:
Jan 31, 2012 12:41:05 PM (12 years ago)
Author:
rniwa@webkit.org
Message:

Source/WebCore: Crash in DeleteSelectionCommand::handleGeneralDelete when attempting to delete the start block
https://bugs.webkit.org/show_bug.cgi?id=77077

Reviewed by Enrica Casucci.

The crash was caused by a missing null check after removing the position out of the start block.
Fixed the bug by adding an early return.

Tests: editing/deleting/delete-start-block.html

editing/selection/move-into-empty-root-inline-box.html

  • editing/DeleteSelectionCommand.cpp:

(WebCore::DeleteSelectionCommand::handleGeneralDelete):

LayoutTests: Crash in previousLinePosition when moving into a root inline box without leaves
https://bugs.webkit.org/show_bug.cgi?id=76812

Reviewed by Enrica Casucci.

Add a regression test for the crash. Unfortunately, we can only test previousLinePosition.

  • editing/selection/move-into-empty-root-inline-box-expected.txt: Added.
  • editing/selection/move-into-empty-root-inline-box.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r106378 r106380  
     12012-01-31  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Crash in previousLinePosition when moving into a root inline box without leaves
     4        https://bugs.webkit.org/show_bug.cgi?id=76812
     5
     6        Reviewed by Enrica Casucci.
     7
     8        Add a regression test for the crash. Unfortunately, we can only test previousLinePosition.
     9
     10        * editing/selection/move-into-empty-root-inline-box-expected.txt: Added.
     11        * editing/selection/move-into-empty-root-inline-box.html: Added.
     12
    1132012-01-31  Tony Chang  <tony@chromium.org>
    214
  • trunk/Source/WebCore/ChangeLog

    r106377 r106380  
     12012-01-31  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Crash in DeleteSelectionCommand::handleGeneralDelete when attempting to delete the start block
     4        https://bugs.webkit.org/show_bug.cgi?id=77077
     5
     6        Reviewed by Enrica Casucci.
     7
     8        The crash was caused by a missing null check after removing the position out of the start block.
     9        Fixed the bug by adding an early return.
     10
     11        Tests: editing/deleting/delete-start-block.html
     12               editing/selection/move-into-empty-root-inline-box.html
     13
     14        * editing/DeleteSelectionCommand.cpp:
     15        (WebCore::DeleteSelectionCommand::handleGeneralDelete):
     16
    1172012-01-31  Rafael Brandao  <rafael.lobo@openbossa.org>
    218
  • trunk/Source/WebCore/editing/DeleteSelectionCommand.cpp

    r102846 r106380  
    419419        startOffset = 0;
    420420        startNode = startNode->traverseNextNode();
     421        if (!startNode)
     422            return;
    421423    }
    422424
Note: See TracChangeset for help on using the changeset viewer.