Changeset 94832 in webkit


Ignore:
Timestamp:
Sep 8, 2011 9:03:21 PM (13 years ago)
Author:
sullivan@chromium.org
Message:

Crashes in WebCore::InsertNodeBeforeCommand constructor.
https://bugs.webkit.org/show_bug.cgi?id=67763

Reviewed by Ryosuke Niwa.

Source/WebCore:

Changes editableRootForPosition() to use the position's containerNode instead of deprecatedNode so that
positions which are before or after a given node cannot return that node as the editable root.

Test: editing/inserting/insert-paragraph-selection-outside-contenteditable.html

  • editing/htmlediting.cpp:

(WebCore::editableRootForPosition): use containerNode instead of deprecatedNode.

LayoutTests:

Tests for crash when the selection is outside the contenteditable node.

  • editing/inserting/insert-paragraph-selection-outside-contenteditable-expected.txt: Added.
  • editing/inserting/insert-paragraph-selection-outside-contenteditable.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r94828 r94832  
     12011-09-08  Annie Sullivan  <sullivan@chromium.org>
     2
     3        Crashes in WebCore::InsertNodeBeforeCommand constructor.
     4        https://bugs.webkit.org/show_bug.cgi?id=67763
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Tests for crash when the selection is outside the contenteditable node.
     9
     10        * editing/inserting/insert-paragraph-selection-outside-contenteditable-expected.txt: Added.
     11        * editing/inserting/insert-paragraph-selection-outside-contenteditable.html: Added.
     12
    1132011-09-08  Daniel Bates  <dbates@webkit.org>
    214
  • trunk/Source/WebCore/ChangeLog

    r94831 r94832  
     12011-09-08  Annie Sullivan  <sullivan@chromium.org>
     2
     3        Crashes in WebCore::InsertNodeBeforeCommand constructor.
     4        https://bugs.webkit.org/show_bug.cgi?id=67763
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Changes editableRootForPosition() to use the position's containerNode instead of deprecatedNode so that
     9        positions which are before or after a given node cannot return that node as the editable root.
     10
     11        Test: editing/inserting/insert-paragraph-selection-outside-contenteditable.html
     12
     13        * editing/htmlediting.cpp:
     14        (WebCore::editableRootForPosition): use containerNode instead of deprecatedNode.
     15
    1162011-09-08  James Weatherall  <wez@chromium.org>
    217
  • trunk/Source/WebCore/editing/htmlediting.cpp

    r93935 r94832  
    177177Element* editableRootForPosition(const Position& p)
    178178{
    179     Node* node = p.deprecatedNode();
     179    Node* node = p.containerNode();
    180180    if (!node)
    181181        return 0;
Note: See TracChangeset for help on using the changeset viewer.