Changeset 89145 in webkit


Ignore:
Timestamp:
Jun 17, 2011 11:01:00 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-06-17 Annie Sullivan <sullivan@chromium.org>

Reviewed by Ryosuke Niwa.

div can be a child of span on InsertParagraph
https://bugs.webkit.org/show_bug.cgi?id=62687

Update layout test results with new code to prevent div inside of span.

  • editing/inserting/return-key-span-start-expected.txt: The new result is the correct behavior.
  • editing/inserting/return-with-object-element-expected.txt: An extra space has been added before the newline.

2011-06-17 Annie Sullivan <sullivan@chromium.org>

Reviewed by Ryosuke Niwa.

div can be a child of span on InsertParagraph
https://bugs.webkit.org/show_bug.cgi?id=62687

Handle the special case where the insertion point is the first position in the enclosing block node.
The div for the new paragraph should be inserted as a child of the enclosing block node, otherwise
it could be inserted as a child of a span or other inline element.

  • editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply):
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r89134 r89145  
     12011-06-17  Annie Sullivan  <sullivan@chromium.org>
     2
     3        Reviewed by Ryosuke Niwa.
     4
     5        div can be a child of span on InsertParagraph
     6        https://bugs.webkit.org/show_bug.cgi?id=62687
     7
     8        Update layout test results with new code to prevent div inside of span.
     9
     10        * editing/inserting/return-key-span-start-expected.txt: The new result is the correct behavior.
     11        * editing/inserting/return-with-object-element-expected.txt: An extra space has been added before the newline.
     12
    1132011-06-17  Yuta Kitamura  <yutak@chromium.org>
    214
  • trunk/LayoutTests/editing/inserting/return-key-span-start-expected.txt

    r88890 r89145  
    11This sets the selection to the start of a span, and hits the enter key.
    22Expected behavior: when the span is split, its ID should not be duplicated. See bug 62621.
     3| <div>
     4|   <span>
     5|     <br>
    36| <span>
    47|   id="dupe"
    5 |   <div>
    6 |     <span>
    7 |       <br>
    88|   "<#selection-caret>hello"
  • trunk/LayoutTests/editing/inserting/return-with-object-element-expected.txt

    r45009 r89145  
    11
    2 
     2 
    33
    44
  • trunk/Source/WebCore/ChangeLog

    r89143 r89145  
     12011-06-17  Annie Sullivan  <sullivan@chromium.org>
     2
     3        Reviewed by Ryosuke Niwa.
     4
     5        div can be a child of span on InsertParagraph
     6        https://bugs.webkit.org/show_bug.cgi?id=62687
     7
     8        Handle the special case where the insertion point is the first position in the enclosing block node.
     9        The div for the new paragraph should be inserted as a child of the enclosing block node, otherwise
     10        it could be inserted as a child of a span or other inline element.
     11
     12        * editing/InsertParagraphSeparatorCommand.cpp:
     13        (WebCore::InsertParagraphSeparatorCommand::doApply):
     14
    1152011-06-17  Eric Uhrhane  <ericu@chromium.org>
    216
  • trunk/Source/WebCore/editing/InsertParagraphSeparatorCommand.cpp

    r88890 r89145  
    264264        if (isFirstInBlock && !nestNewBlock)
    265265            refNode = startBlock;
     266        else if (isFirstInBlock && nestNewBlock) {
     267            // startBlock should always have children, otherwise isLastInBlock would be true and it's handled above.
     268            ASSERT(startBlock->firstChild());
     269            refNode = startBlock->firstChild();
     270        }
    266271        else if (insertionPosition.deprecatedNode() == startBlock && nestNewBlock) {
    267272            refNode = startBlock->childNode(insertionPosition.deprecatedEditingOffset());
Note: See TracChangeset for help on using the changeset viewer.