Changeset 206979 in webkit
- Timestamp:
- Oct 9, 2016 8:11:20 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 10 added
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r206978 r206979 1 2016-10-09 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Support InputEvent.inputType for the new InputEvent spec 4 https://bugs.webkit.org/show_bug.cgi?id=163025 5 <rdar://problem/28658092> 6 7 Reviewed by Darin Adler. 8 9 Adds new layout tests to check that various actions, such as cutting, pasting and undoing can 10 be prevented via the InputEvent fired in a `beforechange` handler. 11 12 * fast/events/before-input-prevent-biu-expected.txt: Added. 13 * fast/events/before-input-prevent-biu.html: Added. 14 * fast/events/before-input-prevent-cut-expected.txt: Added. 15 * fast/events/before-input-prevent-cut.html: Added. 16 * fast/events/before-input-prevent-paste-expected.txt: Added. 17 * fast/events/before-input-prevent-paste.html: Added. 18 * fast/events/before-input-prevent-typing-expected.txt: Added. 19 * fast/events/before-input-prevent-typing.html: Added. 20 * fast/events/before-input-prevent-undo-expected.txt: Added. 21 * fast/events/before-input-prevent-undo.html: Added. 22 * platform/ios-simulator/TestExpectations: 23 1 24 2016-10-09 Gyuyoung Kim <gyuyoung.kim@navercorp.com> 2 25 -
trunk/LayoutTests/platform/ios-simulator/TestExpectations
r206946 r206979 1202 1202 fast/events/before-input-events-prevent-default-in-textfield.html [ Failure ] 1203 1203 fast/events/before-input-events-different-start-end-elements.html [ Failure ] 1204 fast/events/before-input-prevent-biu.html [ Failure ] 1205 fast/events/before-input-prevent-cut.html [ Failure ] 1206 fast/events/before-input-prevent-paste.html [ Failure ] 1207 fast/events/before-input-prevent-undo.html [ Failure ] 1208 fast/events/before-input-prevent-typing.html [ Failure ] 1204 1209 fast/events/key-events-in-input-button.html [ Failure ] 1205 1210 fast/events/keydown-1.html [ Failure ] -
trunk/Source/WebCore/ChangeLog
r206977 r206979 1 2016-10-09 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Support InputEvent.inputType for the new InputEvent spec 4 https://bugs.webkit.org/show_bug.cgi?id=163025 5 <rdar://problem/28658092> 6 7 Reviewed by Darin Adler. 8 9 Adds support for the inputType attribute of InputEvent. To do this, we introduce a helper to 10 map EditActions to inputType names, and also split out ambiguous EditActions (such as 11 EditActionTyping) into more specific subtypes (such as EditActionTypingDeleteBackward, 12 EditActionTypingInsertParagraph, etc.), each of which corresponds to an inputType. 13 14 In places where we create CompositeEditCommands, we now pass in these specific EditActions 15 where appropriate, and when dispatching `beforeinput` and `input` events, we ask the 16 CompositeEditCommand for its input type name, which it derives from its editingAction. 17 18 Tests: fast/events/before-input-prevent-biu.html 19 fast/events/before-input-prevent-cut.html 20 fast/events/before-input-prevent-paste.html 21 fast/events/before-input-prevent-typing.html 22 fast/events/before-input-prevent-undo.html 23 24 * dom/InputEvent.h: 25 * dom/Node.cpp: 26 (WebCore::Node::dispatchInputEvent): 27 * dom/Node.h: 28 * editing/CompositeEditCommand.cpp: 29 (WebCore::CompositeEditCommand::apply): 30 (WebCore::CompositeEditCommand::inputEventTypeName): 31 32 Allows a CompositeEditCommand to specify the inputType its corresponding `beforeinput` and `input` events 33 should have. 34 35 * editing/CompositeEditCommand.h: 36 (WebCore::CompositeEditCommand::shouldStopCaretBlinking): Deleted. 37 * editing/EditAction.h: 38 * editing/EditCommand.cpp: 39 (WebCore::inputTypeNameForEditingAction): 40 * editing/EditCommand.h: 41 * editing/Editor.cpp: 42 (WebCore::Editor::willApplyEditing): 43 (WebCore::Editor::appliedEditing): 44 (WebCore::Editor::willUnapplyEditing): 45 (WebCore::Editor::unappliedEditing): 46 (WebCore::Editor::willReapplyEditing): 47 (WebCore::Editor::reappliedEditing): 48 (WebCore::Editor::computeAndSetTypingStyle): 49 * editing/InsertListCommand.cpp: 50 (WebCore::InsertListCommand::editingAction): 51 * editing/InsertListCommand.h: 52 (WebCore::InsertListCommand::preservesTypingStyle): Deleted. 53 (WebCore::InsertListCommand::editingAction): Deleted. 54 * editing/ReplaceRangeWithTextCommand.cpp: 55 (WebCore::ReplaceRangeWithTextCommand::ReplaceRangeWithTextCommand): 56 * editing/SpellingCorrectionCommand.cpp: 57 (WebCore::SpellingCorrectionCommand::SpellingCorrectionCommand): 58 * editing/TypingCommand.cpp: 59 (WebCore::editActionForTypingCommand): 60 (WebCore::TypingCommand::TypingCommand): 61 (WebCore::TypingCommand::inputEventTypeName): 62 63 The editingAction() of a TypingCommand is the first editing action the TypingCommand was initialized using. 64 Since subsequent typing commands update the last open typing command, we override inputEventTypeName here to 65 use the last updated editing action rather than the default (initial) editing action. 66 67 (WebCore::TypingCommand::willAddTypingToOpenCommand): 68 (WebCore::TypingCommand::insertTextRunWithoutNewlines): 69 (WebCore::TypingCommand::insertParagraphSeparator): 70 * editing/TypingCommand.h: 71 1 72 2016-10-09 Darin Adler <darin@apple.com> 2 73 -
trunk/Source/WebCore/dom/InputEvent.h
r206843 r206979 56 56 bool isInputEvent() const override { return true; } 57 57 EventInterface eventInterface() const final { return InputEventInterfaceType; } 58 String inputType() const { return m_inputType .string(); }58 String inputType() const { return m_inputType; } 59 59 60 60 private: 61 AtomicString m_inputType;61 String m_inputType; 62 62 }; 63 63 -
trunk/Source/WebCore/dom/Node.cpp
r206975 r206979 2199 2199 } 2200 2200 2201 void Node::dispatchInputEvent(const AtomicString& inputType)2201 void Node::dispatchInputEvent(const String& inputType) 2202 2202 { 2203 2203 auto* settings = document().settings(); -
trunk/Source/WebCore/dom/Node.h
r206956 r206979 526 526 bool dispatchBeforeLoadEvent(const String& sourceURL); 527 527 528 virtual void dispatchInputEvent(const AtomicString& inputType);528 virtual void dispatchInputEvent(const String& inputType); 529 529 530 530 // Perform the default action for an event. -
trunk/Source/WebCore/editing/CompositeEditCommand.cpp
r206944 r206979 327 327 if (!endingSelection().isContentRichlyEditable()) { 328 328 switch (editingAction()) { 329 case EditActionTyping: 329 case EditActionTypingDeleteSelection: 330 case EditActionTypingDeleteBackward: 331 case EditActionTypingDeleteForward: 332 case EditActionTypingDeleteWordBackward: 333 case EditActionTypingDeleteWordForward: 334 case EditActionTypingDeleteLineBackward: 335 case EditActionTypingDeleteLineForward: 336 case EditActionTypingInsertText: 337 case EditActionTypingInsertLineBreak: 338 case EditActionTypingInsertParagraph: 330 339 case EditActionPaste: 331 340 case EditActionDrag: … … 334 343 case EditActionUnspecified: 335 344 case EditActionInsert: 345 case EditActionInsertReplacement: 336 346 case EditActionDelete: 337 347 case EditActionDictation: … … 398 408 void CompositeEditCommand::setShouldRetainAutocorrectionIndicator(bool) 399 409 { 410 } 411 412 String CompositeEditCommand::inputEventTypeName() const 413 { 414 return inputTypeNameForEditingAction(editingAction()); 400 415 } 401 416 -
trunk/Source/WebCore/editing/CompositeEditCommand.h
r206944 r206979 114 114 virtual void setShouldRetainAutocorrectionIndicator(bool); 115 115 virtual bool shouldStopCaretBlinking() const { return false; } 116 virtual String inputEventTypeName() const; 116 117 117 118 protected: -
trunk/Source/WebCore/editing/EditAction.h
r183368 r206979 31 31 EditActionUnspecified, 32 32 EditActionInsert, 33 EditActionInsertReplacement, 33 34 EditActionSetColor, 34 35 EditActionSetBackgroundColor, … … 64 65 EditActionPasteFont, 65 66 EditActionPasteRuler, 66 EditActionTyping, 67 EditActionTypingDeleteSelection, 68 EditActionTypingDeleteBackward, 69 EditActionTypingDeleteForward, 70 EditActionTypingDeleteWordBackward, 71 EditActionTypingDeleteWordForward, 72 EditActionTypingDeleteLineBackward, 73 EditActionTypingDeleteLineForward, 74 EditActionTypingInsertText, 75 EditActionTypingInsertLineBreak, 76 EditActionTypingInsertParagraph, 67 77 EditActionCreateLink, 68 78 EditActionUnlink, 69 79 EditActionFormatBlock, 70 EditActionInsertList, 80 EditActionInsertOrderedList, 81 EditActionInsertUnorderedList, 71 82 EditActionIndent, 72 83 EditActionOutdent -
trunk/Source/WebCore/editing/EditCommand.cpp
r200922 r206979 39 39 namespace WebCore { 40 40 41 String inputTypeNameForEditingAction(EditAction action) 42 { 43 switch (action) { 44 case EditActionJustify: 45 case EditActionAlignLeft: 46 return ASCIILiteral("formatJustifyLeft"); 47 case EditActionAlignRight: 48 return ASCIILiteral("formatJustifyRight"); 49 case EditActionCenter: 50 return ASCIILiteral("formatJustifyCenter"); 51 case EditActionSubscript: 52 return ASCIILiteral("formatSubscript"); 53 case EditActionSuperscript: 54 return ASCIILiteral("formatSuperscript"); 55 case EditActionUnderline: 56 return ASCIILiteral("formatUnderline"); 57 case EditActionDrag: 58 return ASCIILiteral("deleteByDrag"); 59 case EditActionCut: 60 return ASCIILiteral("deleteByCut"); 61 case EditActionBold: 62 return ASCIILiteral("formatBold"); 63 case EditActionItalics: 64 return ASCIILiteral("formatItalic"); 65 case EditActionPaste: 66 return ASCIILiteral("insertFromPaste"); 67 case EditActionDelete: 68 case EditActionTypingDeleteSelection: 69 return ASCIILiteral("deleteContent"); 70 case EditActionTypingDeleteBackward: 71 return ASCIILiteral("deleteContentBackward"); 72 case EditActionTypingDeleteForward: 73 return ASCIILiteral("deleteContentForward"); 74 case EditActionTypingDeleteWordBackward: 75 return ASCIILiteral("deleteWordBackward"); 76 case EditActionTypingDeleteWordForward: 77 return ASCIILiteral("deleteWordForward"); 78 case EditActionTypingDeleteLineBackward: 79 return ASCIILiteral("deleteHardLineBackward"); 80 case EditActionTypingDeleteLineForward: 81 return ASCIILiteral("deleteHardLineForward"); 82 case EditActionInsert: 83 case EditActionTypingInsertText: 84 return ASCIILiteral("insertText"); 85 case EditActionInsertReplacement: 86 return ASCIILiteral("insertReplacementText"); 87 case EditActionTypingInsertLineBreak: 88 return ASCIILiteral("insertLineBreak"); 89 case EditActionTypingInsertParagraph: 90 return ASCIILiteral("insertParagraph"); 91 case EditActionInsertOrderedList: 92 return ASCIILiteral("insertOrderedList"); 93 case EditActionInsertUnorderedList: 94 return ASCIILiteral("insertUnorderedList"); 95 case EditActionIndent: 96 return ASCIILiteral("formatIndent"); 97 case EditActionOutdent: 98 return ASCIILiteral("formatOutdent"); 99 default: 100 return emptyString(); 101 } 102 } 103 41 104 EditCommand::EditCommand(Document& document, EditAction editingAction) 42 105 : m_document(document) -
trunk/Source/WebCore/editing/EditCommand.h
r199030 r206979 42 42 class Frame; 43 43 44 String inputTypeNameForEditingAction(EditAction); 45 44 46 class EditCommand : public RefCounted<EditCommand> { 45 47 public: … … 48 50 void setParent(CompositeEditCommand*); 49 51 50 EditAction editingAction() const;52 virtual EditAction editingAction() const; 51 53 52 54 const VisibleSelection& startingSelection() const { return m_startingSelection; } -
trunk/Source/WebCore/editing/Editor.cpp
r206974 r206979 1068 1068 return true; 1069 1069 1070 return dispatchBeforeInputEvents(composition->startingRootEditableElement(), composition->endingRootEditableElement(), emptyString());1070 return dispatchBeforeInputEvents(composition->startingRootEditableElement(), composition->endingRootEditableElement(), command.inputEventTypeName()); 1071 1071 } 1072 1072 … … 1087 1087 1088 1088 changeSelectionAfterCommand(newSelection, options); 1089 dispatchInputEvents(composition->startingRootEditableElement(), composition->endingRootEditableElement(), emptyString());1089 dispatchInputEvents(composition->startingRootEditableElement(), composition->endingRootEditableElement(), cmd->inputEventTypeName()); 1090 1090 1091 1091 updateEditorUINowIfScheduled(); … … 1112 1112 bool Editor::willUnapplyEditing(const EditCommandComposition& composition) const 1113 1113 { 1114 return dispatchBeforeInputEvents(composition.startingRootEditableElement(), composition.endingRootEditableElement(), emptyString());1114 return dispatchBeforeInputEvents(composition.startingRootEditableElement(), composition.endingRootEditableElement(), "historyUndo"); 1115 1115 } 1116 1116 … … 1123 1123 VisibleSelection newSelection(cmd->startingSelection()); 1124 1124 changeSelectionAfterCommand(newSelection, FrameSelection::defaultSetSelectionOptions()); 1125 dispatchInputEvents(cmd->startingRootEditableElement(), cmd->endingRootEditableElement(), emptyString());1125 dispatchInputEvents(cmd->startingRootEditableElement(), cmd->endingRootEditableElement(), "historyUndo"); 1126 1126 1127 1127 updateEditorUINowIfScheduled(); … … 1137 1137 bool Editor::willReapplyEditing(const EditCommandComposition& composition) const 1138 1138 { 1139 return dispatchBeforeInputEvents(composition.startingRootEditableElement(), composition.endingRootEditableElement(), emptyString());1139 return dispatchBeforeInputEvents(composition.startingRootEditableElement(), composition.endingRootEditableElement(), "historyRedo"); 1140 1140 } 1141 1141 … … 1148 1148 VisibleSelection newSelection(cmd->endingSelection()); 1149 1149 changeSelectionAfterCommand(newSelection, FrameSelection::defaultSetSelectionOptions()); 1150 dispatchInputEvents(cmd->startingRootEditableElement(), cmd->endingRootEditableElement(), emptyString());1150 dispatchInputEvents(cmd->startingRootEditableElement(), cmd->endingRootEditableElement(), "historyRedo"); 1151 1151 1152 1152 updateEditorUINowIfScheduled(); … … 3098 3098 } 3099 3099 3100 String inputTypeName = inputTypeNameForEditingAction(editingAction); 3100 3101 auto* element = m_frame.selection().selection().rootEditableElement(); 3101 if (element && !dispatchBeforeInputEvent(*element, emptyString()))3102 if (element && !dispatchBeforeInputEvent(*element, inputTypeName)) 3102 3103 return; 3103 3104 … … 3116 3117 3117 3118 if (element) 3118 element->dispatchInputEvent( emptyString());3119 element->dispatchInputEvent(inputTypeName); 3119 3120 3120 3121 // Set the remaining style as the typing style. -
trunk/Source/WebCore/editing/InsertListCommand.cpp
r201823 r206979 194 194 } 195 195 196 EditAction InsertListCommand::editingAction() const 197 { 198 return m_type == OrderedList ? EditActionInsertOrderedList : EditActionInsertUnorderedList; 199 } 200 196 201 void InsertListCommand::doApplyForSingleParagraph(bool forceCreateList, const HTMLQualifiedName& listTag, Range* currentSelection) 197 202 { -
trunk/Source/WebCore/editing/InsertListCommand.h
r184709 r206979 34 34 class HTMLQualifiedName; 35 35 36 class InsertListCommand : public CompositeEditCommand {36 class InsertListCommand final : public CompositeEditCommand { 37 37 public: 38 38 enum Type { OrderedList, UnorderedList }; … … 45 45 static RefPtr<HTMLElement> insertList(Document&, Type); 46 46 47 virtual bool preservesTypingStyle() const{ return true; }47 bool preservesTypingStyle() const final { return true; } 48 48 49 49 private: 50 50 InsertListCommand(Document&, Type); 51 51 52 v irtual void doApply();53 virtual EditAction editingAction() const { return EditActionInsertList; }52 void doApply() final; 53 EditAction editingAction() const final; 54 54 55 55 HTMLElement* fixOrphanedListChild(Node*); -
trunk/Source/WebCore/editing/ReplaceRangeWithTextCommand.cpp
r205870 r206979 40 40 41 41 ReplaceRangeWithTextCommand::ReplaceRangeWithTextCommand(RefPtr<Range> rangeToBeReplaced, const String& text) 42 : CompositeEditCommand(rangeToBeReplaced->startContainer().document() )42 : CompositeEditCommand(rangeToBeReplaced->startContainer().document(), EditActionInsertReplacement) 43 43 , m_rangeToBeReplaced(rangeToBeReplaced) 44 44 , m_text(text) -
trunk/Source/WebCore/editing/SpellingCorrectionCommand.cpp
r200626 r206979 83 83 84 84 SpellingCorrectionCommand::SpellingCorrectionCommand(PassRefPtr<Range> rangeToBeCorrected, const String& correction) 85 : CompositeEditCommand(rangeToBeCorrected->startContainer().document() )85 : CompositeEditCommand(rangeToBeCorrected->startContainer().document(), EditActionInsertReplacement) 86 86 , m_rangeToBeCorrected(rangeToBeCorrected) 87 87 , m_selectionToBeCorrected(*m_rangeToBeCorrected) -
trunk/Source/WebCore/editing/TypingCommand.cpp
r206944 r206979 77 77 }; 78 78 79 static inline EditAction editActionForTypingCommand(TypingCommand::ETypingCommand command, TextGranularity granularity) 80 { 81 switch (command) { 82 case TypingCommand::DeleteSelection: 83 return EditActionTypingDeleteSelection; 84 case TypingCommand::DeleteKey: { 85 if (granularity == WordGranularity) 86 return EditActionTypingDeleteWordBackward; 87 if (granularity == LineBoundary) 88 return EditActionTypingDeleteLineBackward; 89 return EditActionTypingDeleteBackward; 90 } 91 case TypingCommand::ForwardDeleteKey: 92 if (granularity == WordGranularity) 93 return EditActionTypingDeleteWordForward; 94 if (granularity == LineBoundary) 95 return EditActionTypingDeleteLineForward; 96 return EditActionTypingDeleteForward; 97 case TypingCommand::InsertText: 98 return EditActionTypingInsertText; 99 case TypingCommand::InsertLineBreak: 100 return EditActionTypingInsertLineBreak; 101 case TypingCommand::InsertParagraphSeparator: 102 case TypingCommand::InsertParagraphSeparatorInQuotedContent: 103 return EditActionTypingInsertParagraph; 104 default: 105 return EditActionUnspecified; 106 } 107 } 108 79 109 TypingCommand::TypingCommand(Document& document, ETypingCommand commandType, const String &textToInsert, Options options, TextGranularity granularity, TextCompositionType compositionType) 80 : TextInsertionBaseCommand(document, EditActionTyping)110 : TextInsertionBaseCommand(document, editActionForTypingCommand(commandType, granularity)) 81 111 , m_commandType(commandType) 82 112 , m_textToInsert(textToInsert) … … 91 121 , m_shouldPreventSpellChecking(options & PreventSpellChecking) 92 122 { 123 m_currentTypingEditAction = editingAction(); 93 124 updatePreservesTypingStyle(m_commandType); 94 125 } … … 307 338 308 339 ASSERT_NOT_REACHED(); 340 } 341 342 String TypingCommand::inputEventTypeName() const 343 { 344 return inputTypeNameForEditingAction(m_currentTypingEditAction); 309 345 } 310 346 … … 369 405 } 370 406 371 bool TypingCommand::willAddTypingToOpenCommand(ETypingCommand , TextGranularity)407 bool TypingCommand::willAddTypingToOpenCommand(ETypingCommand commandType, TextGranularity granularity) 372 408 { 373 409 if (m_isHandlingInitialTypingCommand) … … 376 412 // FIXME: Use the newly added typing command and granularity to ensure that an InputEvent with the 377 413 // correct inputType is dispatched. 414 m_currentTypingEditAction = editActionForTypingCommand(commandType, granularity); 378 415 return frame().editor().willApplyEditing(*this); 379 416 } … … 424 461 425 462 RefPtr<InsertTextCommand> command = InsertTextCommand::create(document(), text, selectInsertedText, 426 m_compositionType == TextCompositionNone ? InsertTextCommand::RebalanceLeadingAndTrailingWhitespaces : InsertTextCommand::RebalanceAllWhitespaces, EditActionTyping );463 m_compositionType == TextCompositionNone ? InsertTextCommand::RebalanceLeadingAndTrailingWhitespaces : InsertTextCommand::RebalanceAllWhitespaces, EditActionTypingInsertText); 427 464 428 465 applyCommandToComposite(command, endingSelection()); … … 459 496 return; 460 497 461 applyCommandToComposite(InsertParagraphSeparatorCommand::create(document(), false, false, EditActionTyping ));498 applyCommandToComposite(InsertParagraphSeparatorCommand::create(document(), false, false, EditActionTypingInsertParagraph)); 462 499 typingAddedToOpenCommand(InsertParagraphSeparator); 463 500 } -
trunk/Source/WebCore/editing/TypingCommand.h
r206944 r206979 117 117 void setShouldPreventSpellChecking(bool prevent) { m_shouldPreventSpellChecking = prevent; } 118 118 119 String inputEventTypeName() const final; 120 119 121 static void updateSelectionIfDifferentFromCurrentSelection(TypingCommand*, Frame*); 120 122 … … 135 137 136 138 ETypingCommand m_commandType; 139 EditAction m_currentTypingEditAction; 137 140 String m_textToInsert; 138 141 bool m_openForMoreTyping; -
trunk/Source/WebKit/mac/ChangeLog
r206960 r206979 1 2016-10-09 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Support InputEvent.inputType for the new InputEvent spec 4 https://bugs.webkit.org/show_bug.cgi?id=163025 5 <rdar://problem/28658092> 6 7 Reviewed by Darin Adler. 8 9 Accounts for some changes to the EditAction enum in nameForEditAction. See WebCore ChangeLog 10 entry for more details. 11 12 * WebCoreSupport/WebEditorClient.mm: 13 (undoNameForEditAction): 14 1 15 2016-10-06 Darin Adler <darin@apple.com> 2 16 -
trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm
r205858 r206979 564 564 case EditActionUnspecified: return nil; 565 565 case EditActionInsert: return nil; 566 case EditActionInsertReplacement: return nil; 566 567 case EditActionSetColor: return UI_STRING_KEY_INTERNAL("Set Color", "Set Color (Undo action name)", "Undo action name"); 567 568 case EditActionSetBackgroundColor: return UI_STRING_KEY_INTERNAL("Set Background Color", "Set Background Color (Undo action name)", "Undo action name"); … … 593 594 case EditActionPasteFont: return UI_STRING_KEY_INTERNAL("Paste Font", "Paste Font (Undo action name)", "Undo action name"); 594 595 case EditActionPasteRuler: return UI_STRING_KEY_INTERNAL("Paste Ruler", "Paste Ruler (Undo action name)", "Undo action name"); 595 case EditActionTyping: return UI_STRING_KEY_INTERNAL("Typing", "Typing (Undo action name)", "Undo action name"); 596 case EditActionTypingDeleteSelection: 597 case EditActionTypingDeleteBackward: 598 case EditActionTypingDeleteForward: 599 case EditActionTypingDeleteWordBackward: 600 case EditActionTypingDeleteWordForward: 601 case EditActionTypingDeleteLineBackward: 602 case EditActionTypingDeleteLineForward: 603 case EditActionTypingInsertText: 604 case EditActionTypingInsertLineBreak: 605 case EditActionTypingInsertParagraph: 606 return UI_STRING_KEY_INTERNAL("Typing", "Typing (Undo action name)", "Undo action name"); 596 607 case EditActionCreateLink: return UI_STRING_KEY_INTERNAL("Create Link", "Create Link (Undo action name)", "Undo action name"); 597 608 case EditActionUnlink: return UI_STRING_KEY_INTERNAL("Unlink", "Unlink (Undo action name)", "Undo action name"); 598 case EditActionInsertList: return UI_STRING_KEY_INTERNAL("Insert List", "Insert List (Undo action name)", "Undo action name"); 609 case EditActionInsertOrderedList: 610 case EditActionInsertUnorderedList: 611 return UI_STRING_KEY_INTERNAL("Insert List", "Insert List (Undo action name)", "Undo action name"); 599 612 case EditActionFormatBlock: return UI_STRING_KEY_INTERNAL("Formatting", "Format Block (Undo action name)", "Undo action name"); 600 613 case EditActionIndent: return UI_STRING_KEY_INTERNAL("Indent", "Indent (Undo action name)", "Undo action name"); -
trunk/Source/WebKit/win/ChangeLog
r206816 r206979 1 2016-10-09 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Support InputEvent.inputType for the new InputEvent spec 4 https://bugs.webkit.org/show_bug.cgi?id=163025 5 <rdar://problem/28658092> 6 7 Reviewed by Darin Adler. 8 9 * WebCoreSupport/WebEditorClient.cpp: 10 (undoNameForEditAction): 11 1 12 2016-10-04 Brent Fulgham <bfulgham@apple.com> 2 13 -
trunk/Source/WebKit/win/WebCoreSupport/WebEditorClient.cpp
r201905 r206979 564 564 { 565 565 switch (editAction) { 566 case EditActionUnspecified: return String(); 566 case EditActionUnspecified: 567 case EditActionInsertReplacement: 568 return String(); 567 569 case EditActionSetColor: return WEB_UI_STRING_KEY("Set Color", "Set Color (Undo action name)", "Undo action name"); 568 570 case EditActionSetBackgroundColor: return WEB_UI_STRING_KEY("Set Background Color", "Set Background Color (Undo action name)", "Undo action name"); … … 596 598 case EditActionPasteFont: return WEB_UI_STRING_KEY("Paste Font", "Paste Font (Undo action name)", "Undo action name"); 597 599 case EditActionPasteRuler: return WEB_UI_STRING_KEY("Paste Ruler", "Paste Ruler (Undo action name)", "Undo action name"); 598 case EditActionTyping: return WEB_UI_STRING_KEY("Typing", "Typing (Undo action name)", "Undo action name"); 600 case EditActionTypingDeleteSelection: 601 case EditActionTypingDeleteBackward: 602 case EditActionTypingDeleteForward: 603 case EditActionTypingDeleteWordBackward: 604 case EditActionTypingDeleteWordForward: 605 case EditActionTypingDeleteLineBackward: 606 case EditActionTypingDeleteLineForward: 607 case EditActionTypingInsertText: 608 case EditActionTypingInsertLineBreak: 609 case EditActionTypingInsertParagraph: 610 return WEB_UI_STRING_KEY("Typing", "Typing (Undo action name)", "Undo action name"); 599 611 case EditActionCreateLink: return WEB_UI_STRING_KEY("Create Link", "Create Link (Undo action name)", "Undo action name"); 600 612 case EditActionUnlink: return WEB_UI_STRING_KEY("Unlink", "Unlink (Undo action name)", "Undo action name"); 601 case EditActionInsertList: return WEB_UI_STRING_KEY("Insert List", "Insert List (Undo action name)", "Undo action name"); 613 case EditActionInsertUnorderedList: 614 case EditActionInsertOrderedList: 615 return WEB_UI_STRING_KEY("Insert List", "Insert List (Undo action name)", "Undo action name"); 602 616 case EditActionFormatBlock: return WEB_UI_STRING_KEY("Formatting", "Format Block (Undo action name)", "Undo action name"); 603 617 case EditActionIndent: return WEB_UI_STRING_KEY("Indent", "Indent (Undo action name)", "Undo action name"); -
trunk/Source/WebKit2/ChangeLog
r206961 r206979 1 2016-10-09 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Support InputEvent.inputType for the new InputEvent spec 4 https://bugs.webkit.org/show_bug.cgi?id=163025 5 <rdar://problem/28658092> 6 7 Reviewed by Darin Adler. 8 9 Accounts for some changes to the EditAction enum in nameForEditAction. Some former edit 10 actions, such as EditActionTyping, have been split out into its more specific subtypes, 11 so we preserve shipping behavior by treating all of the new subtypes the same way as the 12 original type. 13 14 * UIProcess/WebEditCommandProxy.cpp: 15 (WebKit::WebEditCommandProxy::nameForEditAction): 16 1 17 2016-10-08 Emanuele Aina <emanuele.aina@collabora.com> 2 18 -
trunk/Source/WebKit2/UIProcess/WebEditCommandProxy.cpp
r204996 r206979 77 77 case EditActionInsert: 78 78 return String(); 79 case EditActionInsertReplacement: 80 return String(); 79 81 case EditActionSetColor: 80 82 return WEB_UI_STRING_KEY("Set Color", "Set Color (Undo action name)", "Undo action name"); … … 143 145 case EditActionPasteRuler: 144 146 return WEB_UI_STRING_KEY("Paste Ruler", "Paste Ruler (Undo action name)", "Undo action name"); 145 case EditActionTyping: 147 case EditActionTypingDeleteSelection: 148 case EditActionTypingDeleteBackward: 149 case EditActionTypingDeleteForward: 150 case EditActionTypingDeleteWordBackward: 151 case EditActionTypingDeleteWordForward: 152 case EditActionTypingDeleteLineBackward: 153 case EditActionTypingDeleteLineForward: 154 case EditActionTypingInsertText: 155 case EditActionTypingInsertLineBreak: 156 case EditActionTypingInsertParagraph: 146 157 return WEB_UI_STRING_KEY("Typing", "Typing (Undo action name)", "Undo action name"); 147 158 case EditActionCreateLink: … … 149 160 case EditActionUnlink: 150 161 return WEB_UI_STRING_KEY("Unlink", "Unlink (Undo action name)", "Undo action name"); 151 case EditActionInsertList: 162 case EditActionInsertUnorderedList: 163 case EditActionInsertOrderedList: 152 164 return WEB_UI_STRING_KEY("Insert List", "Insert List (Undo action name)", "Undo action name"); 153 165 case EditActionFormatBlock:
Note: See TracChangeset
for help on using the changeset viewer.