Changeset 89492 in webkit
- Timestamp:
- Jun 22, 2011 4:18:57 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r89491 r89492 1 2011-06-22 Annie Sullivan <sullivan@chromium.org> 2 3 Reviewed by Ryosuke Niwa. 4 5 REGRESSION: Hitting enter in the middle of this span causes the cursor to go to the end of the span 6 https://bugs.webkit.org/show_bug.cgi?id=61594 7 8 Adds two layout tests to verify that hitting enter in the middle of the span splits the span correctly 9 and places the cursor in the correct position. 10 11 * editing/inserting/return-key-before-br-in-span-expected.txt: Added. 12 * editing/inserting/return-key-before-br-in-span.html: Added. 13 * editing/inserting/return-key-middle-of-span-expected.txt: Added. 14 * editing/inserting/return-key-middle-of-span.html: Added. 15 1 16 2011-06-22 Jessie Berlin <jberlin@apple.com> 2 17 -
trunk/Source/WebCore/ChangeLog
r89490 r89492 1 2011-06-22 Annie Sullivan <sullivan@chromium.org> 2 3 Reviewed by Ryosuke Niwa. 4 5 REGRESSION: Hitting enter in the middle of this span causes the cursor to go to the end of the span 6 https://bugs.webkit.org/show_bug.cgi?id=61594 7 8 When the tree is split at the cursor in InsertParagraphSeparatorCommand, it is possible for the position 9 split at to be at the end of a text node. The code assumes the position is at the start of the node, so 10 pass the correct node into splitTreeToNode() in that case. 11 12 Tests: editing/inserting/return-key-before-br-in-span.html 13 editing/inserting/return-key-middle-of-span.html 14 15 * editing/InsertParagraphSeparatorCommand.cpp: 16 (WebCore::InsertParagraphSeparatorCommand::doApply): 17 1 18 2011-06-22 Rob Buis <rbuis@rim.com> 2 19 -
trunk/Source/WebCore/editing/InsertParagraphSeparatorCommand.cpp
r89145 r89492 357 357 n = insertionPosition.computeNodeAfterPosition(); 358 358 else { 359 splitTreeToNode(insertionPosition.containerNode(), startBlock); 359 Node* splitTo = insertionPosition.containerNode(); 360 if (splitTo->isTextNode() && insertionPosition.offsetInContainerNode() >= caretMaxOffset(splitTo)) 361 splitTo = splitTo->traverseNextNode(startBlock); 362 ASSERT(splitTo); 363 splitTreeToNode(splitTo, startBlock); 360 364 361 365 for (n = startBlock->firstChild(); n; n = n->nextSibling()) {
Note: See TracChangeset
for help on using the changeset viewer.