Changeset 62889 in webkit


Ignore:
Timestamp:
Jul 8, 2010 9:35:21 PM (14 years ago)
Author:
tony@chromium.org
Message:

2010-07-08 Tony Chang <tony@chromium.org>

Reviewed by Ojan Vafai.

WebCore::InsertLineBreakCommand::shouldUseBreakElement ReadAV@NULL
https://bugs.webkit.org/show_bug.cgi?id=30116

  • editing/inserting/return-key-in-hidden-textarea-expected.txt: Added.
  • editing/inserting/return-key-in-hidden-textarea.html: Added.

2010-07-08 Tony Chang <tony@chromium.org>

Reviewed by Ojan Vafai.

WebCore::InsertLineBreakCommand::shouldUseBreakElement ReadAV@NULL
https://bugs.webkit.org/show_bug.cgi?id=30116
Fixing the crash causes text insertions on hidden elements to get ignored
(not a new bug). This is https://bugs.webkit.org/show_bug.cgi?id=40342

Test: editing/inserting/return-key-in-hidden-textarea.html

  • editing/InsertLineBreakCommand.cpp: (WebCore::InsertLineBreakCommand::doApply):
  • editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply):
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r62887 r62889  
     12010-07-08  Tony Chang  <tony@chromium.org>
     2
     3        Reviewed by Ojan Vafai.
     4
     5        WebCore::InsertLineBreakCommand::shouldUseBreakElement ReadAV@NULL
     6        https://bugs.webkit.org/show_bug.cgi?id=30116
     7
     8        * editing/inserting/return-key-in-hidden-textarea-expected.txt: Added.
     9        * editing/inserting/return-key-in-hidden-textarea.html: Added.
     10
    1112010-07-08  Adam Barth  <abarth@webkit.org>
    212
  • trunk/WebCore/ChangeLog

    r62880 r62889  
     12010-07-08  Tony Chang  <tony@chromium.org>
     2
     3        Reviewed by Ojan Vafai.
     4
     5        WebCore::InsertLineBreakCommand::shouldUseBreakElement ReadAV@NULL
     6        https://bugs.webkit.org/show_bug.cgi?id=30116
     7        Fixing the crash causes text insertions on hidden elements to get ignored
     8        (not a new bug).  This is https://bugs.webkit.org/show_bug.cgi?id=40342
     9
     10        Test: editing/inserting/return-key-in-hidden-textarea.html
     11
     12        * editing/InsertLineBreakCommand.cpp:
     13        (WebCore::InsertLineBreakCommand::doApply):
     14        * editing/InsertParagraphSeparatorCommand.cpp:
     15        (WebCore::InsertParagraphSeparatorCommand::doApply):
     16
    1172010-07-08  Sam Weinig  <sam@webkit.org>
    218
  • trunk/WebCore/editing/InsertLineBreakCommand.cpp

    r48234 r62889  
    9595   
    9696    VisiblePosition caret(selection.visibleStart());
     97    // FIXME: If the node is hidden, we should still be able to insert text.
     98    // For now, we return to avoid a crash.  https://bugs.webkit.org/show_bug.cgi?id=40342
     99    if (caret.isNull())
     100        return;
     101
    97102    Position pos(caret.deepEquivalent());
    98103
  • trunk/WebCore/editing/InsertParagraphSeparatorCommand.cpp

    r60408 r62889  
    173173            || isTableCell(startBlock)
    174174            || startBlock->hasTagName(formTag)
    175             || (canonicalPos.node()->renderer() && canonicalPos.node()->renderer()->isTable())
    176             || canonicalPos.node()->hasTagName(hrTag)) {
     175            // FIXME: If the node is hidden, we don't have a canonical position so we will do the wrong thing for tables and <hr>. https://bugs.webkit.org/show_bug.cgi?id=40342
     176            || (!canonicalPos.isNull() && canonicalPos.node()->renderer() && canonicalPos.node()->renderer()->isTable())
     177            || (!canonicalPos.isNull() && canonicalPos.node()->hasTagName(hrTag))) {
    177178        applyCommandToComposite(InsertLineBreakCommand::create(document()));
    178179        return;
Note: See TracChangeset for help on using the changeset viewer.