Changeset 19441 in webkit
- Timestamp:
- Feb 6, 2007 2:17:20 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r19437 r19441 1 2007-02-06 Justin Garcia <justin.garcia@apple.com> 2 3 Reviewed by john 4 5 <rdar://problem/4959067> 6 Bullets get erased or moved down to another line 7 <rdar://problem/4912529> 8 Seed: Bulleted list in Note in Mail.app does not work with Japanese input mode 9 10 * editing/inserting/4959067-expected.checksum: Added. 11 * editing/inserting/4959067-expected.png: Added. 12 * editing/inserting/4959067-expected.txt: Added. 13 * editing/inserting/4959067.html: Added. 14 1 15 2007-02-06 Geoffrey Garen <ggaren@apple.com> 2 16 -
trunk/WebCore/ChangeLog
r19436 r19441 1 2007-02-05 Justin Garcia <justin.garcia@apple.com> 2 3 Reviewed by john 4 5 <rdar://problem/4959067> 6 Bullets get erased or moved down to another line 7 <rdar://problem/4912529> 8 Seed: Bulleted list in Note in Mail.app does not work with Japanese input mode 9 10 Do not expand the selection to include fully selected 11 special elements when insering text over a selection. 12 13 * editing/CompositeEditCommand.cpp: 14 (WebCore::CompositeEditCommand::deleteSelection): Pass 15 expandForSpecialElements through to DeleteSelectionCommand's constructor. 16 (WebCore::CompositeEditCommand::moveParagraphs): Use the 17 convenience function. 18 * editing/CompositeEditCommand.h: 19 * editing/DeleteSelectionCommand.h: 20 * editing/InsertTextCommand.cpp: 21 (WebCore::InsertTextCommand::input): Do not expand the selection 22 to be deleted for special elements. 23 * editing/ReplaceSelectionCommand.cpp: 24 (WebCore::ReplaceSelectionCommand::doApply): Added a FIXME about 25 when we should expand the selection. 26 1 27 2007-02-06 Geoffrey Garen <ggaren@apple.com> 2 28 -
trunk/WebCore/editing/CompositeEditCommand.cpp
r19088 r19441 300 300 } 301 301 302 void CompositeEditCommand::deleteSelection(bool smartDelete, bool mergeBlocksAfterDelete, bool replace )302 void CompositeEditCommand::deleteSelection(bool smartDelete, bool mergeBlocksAfterDelete, bool replace, bool expandForSpecialElements) 303 303 { 304 304 if (endingSelection().isRange()) 305 applyCommandToComposite(new DeleteSelectionCommand(document(), smartDelete, mergeBlocksAfterDelete, replace ));306 } 307 308 void CompositeEditCommand::deleteSelection(const Selection &selection, bool smartDelete, bool mergeBlocksAfterDelete, bool replace )305 applyCommandToComposite(new DeleteSelectionCommand(document(), smartDelete, mergeBlocksAfterDelete, replace, expandForSpecialElements)); 306 } 307 308 void CompositeEditCommand::deleteSelection(const Selection &selection, bool smartDelete, bool mergeBlocksAfterDelete, bool replace, bool expandForSpecialElements) 309 309 { 310 310 if (selection.isRange()) 311 applyCommandToComposite(new DeleteSelectionCommand(selection, smartDelete, mergeBlocksAfterDelete, replace ));311 applyCommandToComposite(new DeleteSelectionCommand(selection, smartDelete, mergeBlocksAfterDelete, replace, expandForSpecialElements)); 312 312 } 313 313 … … 746 746 747 747 setEndingSelection(Selection(start, end, DOWNSTREAM)); 748 applyCommandToComposite(new DeleteSelectionCommand(document(), false, false, false, false));748 deleteSelection(false, false, false, false); 749 749 750 750 ASSERT(destination.deepEquivalent().node()->inDocument()); -
trunk/WebCore/editing/CompositeEditCommand.h
r18874 r19441 52 52 void removeStyledElement(Element*); 53 53 void deleteKeyPressed(); 54 void deleteSelection(bool smartDelete = false, bool mergeBlocksAfterDelete = true, bool replace = false );55 void deleteSelection(const Selection&, bool smartDelete = false, bool mergeBlocksAfterDelete = true, bool replace = false );54 void deleteSelection(bool smartDelete = false, bool mergeBlocksAfterDelete = true, bool replace = false, bool expandForSpecialElements = true); 55 void deleteSelection(const Selection&, bool smartDelete = false, bool mergeBlocksAfterDelete = true, bool replace = false, bool expandForSpecialElements = true); 56 56 virtual void deleteTextFromNode(Text* node, int offset, int count); 57 57 void inputText(const String&, bool selectInsertedText = false); -
trunk/WebCore/editing/DeleteSelectionCommand.h
r19088 r19441 33 33 class DeleteSelectionCommand : public CompositeEditCommand { 34 34 public: 35 DeleteSelectionCommand(Document*, bool smartDelete = false, bool mergeBlocksAfterDelete = true, bool replace = false, bool expandForSpecialElements = true);36 DeleteSelectionCommand(const Selection&, bool smartDelete = false, bool mergeBlocksAfterDelete = true, bool replace = false, bool expandForSpecialElements = true);35 DeleteSelectionCommand(Document*, bool smartDelete = false, bool mergeBlocksAfterDelete = true, bool replace = false, bool expandForSpecialElements = false); 36 DeleteSelectionCommand(const Selection&, bool smartDelete = false, bool mergeBlocksAfterDelete = true, bool replace = false, bool expandForSpecialElements = false); 37 37 38 38 virtual void doApply(); -
trunk/WebCore/editing/InsertTextCommand.cpp
r18221 r19441 102 102 // Delete the current selection. 103 103 if (endingSelection().isRange()) 104 deleteSelection(false, true, true );104 deleteSelection(false, true, true, false); 105 105 106 106 // Insert the character at the leftmost candidate. -
trunk/WebCore/editing/ReplaceSelectionCommand.cpp
r19036 r19441 509 509 // will leave hanging block(s). 510 510 bool mergeBlocksAfterDelete = isEndOfParagraph(visibleEnd) || isStartOfBlock(visibleStart); 511 // FIXME: We should only expand to include fully selected special elements if we are copying a 512 // selection and pasting it on top of itself. 511 513 deleteSelection(false, mergeBlocksAfterDelete, true); 512 514 visibleStart = endingSelection().visibleStart(); -
trunk/WebCore/editing/htmlediting.cpp
r18968 r19441 305 305 306 306 if (pos.offset() <= 0) { 307 if (node->parentNode() && (node->hasTagName(brTag) || editingIgnoresContent(node)) )307 if (node->parentNode() && (node->hasTagName(brTag) || editingIgnoresContent(node)) || isTableElement(node)) 308 308 return positionBeforeNode(node); 309 309 return Position(node, 0); … … 328 328 return node->parentNode() ? positionBeforeNode(node) : Position(node, 0); 329 329 } 330 331 if (pos.offset() == maxCompliantOffset && (editingIgnoresContent(node) || isTableElement(node))) 332 return positionAfterNode(node); 330 333 331 334 return Position(pos);
Note: See TracChangeset
for help on using the changeset viewer.