Changeset 206944 in webkit
- Timestamp:
- Oct 7, 2016 4:47:18 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r206943 r206944 1 2016-10-07 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Support onbeforeinput event handling for the new InputEvent spec 4 https://bugs.webkit.org/show_bug.cgi?id=163021 5 <rdar://problem/28658073> 6 7 Reviewed by Darin Adler. 8 9 Tweak an existing test to hook into the 'input' event instead of 'webkitEditableContentChanged', as well as 10 tests added in r206843 to verify that `onbeforeinput` handlers are invoked with InputEvents. Also introduces 11 new unit tests verifying that calling preventDefault on InputEvents fired by `onbeforeinput` correctly prevent 12 text from being inserted or deleted. 13 14 * editing/undo/undo-after-event-edited.html: 15 * fast/events/before-input-events-different-start-end-elements-expected.txt: Added. 16 * fast/events/before-input-events-different-start-end-elements.html: Added. 17 * fast/events/before-input-events-prevent-default-expected.txt: Added. 18 * fast/events/before-input-events-prevent-default-in-textfield-expected.txt: Added. 19 * fast/events/before-input-events-prevent-default-in-textfield.html: Added. 20 * fast/events/before-input-events-prevent-default.html: Added. 21 * fast/events/input-events-fired-when-typing-expected.txt: 22 * fast/events/input-events-fired-when-typing.html: 23 * platform/ios-simulator/TestExpectations: 24 1 25 2016-10-07 Nan Wang <n_wang@apple.com> 2 26 -
trunk/LayoutTests/editing/undo/undo-after-event-edited.html
r163560 r206944 18 18 var eventHandlerActive = false; 19 19 20 document.addEventListener(" webkitEditableContentChanged", function () {20 document.addEventListener("input", function () { 21 21 if (eventHandlerActive) 22 22 return; -
trunk/LayoutTests/fast/events/input-events-fired-when-typing-expected.txt
r206843 r206944 2 2 3 3 TEST COMPLETE 4 Fired `onbeforeinput`! 5 PASS event.__lookupGetter__('inputType') is defined. 6 PASS Object.getPrototypeOf(event) is InputEvent.prototype 7 PASS event.target.id is expectedTargetID 8 PASS event.bubbles is true 9 PASS event.cancelable is true 10 PASS event.composed is true 11 Fired `oninput`! 4 12 PASS event.__lookupGetter__('inputType') is defined. 5 13 PASS Object.getPrototypeOf(event) is InputEvent.prototype … … 8 16 PASS event.cancelable is false 9 17 PASS event.composed is true 18 Fired `onbeforeinput`! 19 PASS event.__lookupGetter__('inputType') is defined. 20 PASS Object.getPrototypeOf(event) is InputEvent.prototype 21 PASS event.target.id is expectedTargetID 22 PASS event.bubbles is true 23 PASS event.cancelable is true 24 PASS event.composed is true 25 Fired `oninput`! 10 26 PASS event.__lookupGetter__('inputType') is defined. 11 27 PASS Object.getPrototypeOf(event) is InputEvent.prototype -
trunk/LayoutTests/fast/events/input-events-fired-when-typing.html
r206843 r206944 34 34 function checkInputEvent(event) 35 35 { 36 debug("Fired `oninput`!"); 36 37 shouldBeDefined("event.__lookupGetter__('inputType')"); 37 38 shouldBe("Object.getPrototypeOf(event)", "InputEvent.prototype"); … … 41 42 shouldBe("event.composed", "true"); 42 43 } 44 45 function checkBeforeInputEvent(event) 46 { 47 debug("Fired `onbeforeinput`!"); 48 shouldBeDefined("event.__lookupGetter__('inputType')"); 49 shouldBe("Object.getPrototypeOf(event)", "InputEvent.prototype"); 50 shouldBe("event.target.id", "expectedTargetID"); 51 shouldBe("event.bubbles", "true"); 52 shouldBe("event.cancelable", "true"); 53 shouldBe("event.composed", "true"); 54 } 43 55 </script> 44 56 </head> 45 57 46 58 <body onload=beginTest()> 47 <div id="foo" contenteditable oninput=checkInputEvent(event) ></div>48 <input id="bar" oninput=checkInputEvent(event) ></input>59 <div id="foo" contenteditable oninput=checkInputEvent(event) onbeforeinput=checkBeforeInputEvent(event)></div> 60 <input id="bar" oninput=checkInputEvent(event) onbeforeinput=checkBeforeInputEvent(event)></input> 49 61 <script src="../../resources/js-test-post.js"></script> 50 62 </body> -
trunk/LayoutTests/platform/ios-simulator/TestExpectations
r206896 r206944 1199 1199 fast/events/inputText-never-fired-on-keydown-cancel.html [ Failure ] 1200 1200 fast/events/input-events-fired-when-typing.html [ Failure ] 1201 fast/events/before-input-events-prevent-default.html [ Failure ] 1202 fast/events/before-input-events-prevent-default-in-textfield.html [ Failure ] 1201 1203 fast/events/key-events-in-input-button.html [ Failure ] 1202 1204 fast/events/keydown-1.html [ Failure ] -
trunk/Source/WebCore/ChangeLog
r206943 r206944 1 2016-10-07 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Support onbeforeinput event handling for the new InputEvent spec 4 https://bugs.webkit.org/show_bug.cgi?id=163021 5 <rdar://problem/28658073> 6 7 Reviewed by Darin Adler. 8 9 Adds support for parsing the onbeforeinput attribute, and for sending default-preventable 10 `beforeinput` InputEvents to the page. To do this, we introduce two new virtual methods: 11 willApplyCommand and didApplyCommand on the CompositeEditCommand that are called before and 12 after CompositeEditCommand::doApply, respectively. willApplyCommand indicates whether or not 13 the composite editor command should proceed with applying the command. 14 15 Tweaks existing layout tests and adds new tests. 16 17 Tests: fast/events/before-input-events-different-start-end-elements.html 18 fast/events/before-input-events-prevent-default-in-textfield.html 19 fast/events/before-input-events-prevent-default.html 20 21 * dom/Document.idl: 22 * dom/Element.idl: 23 * dom/EventNames.h: 24 * dom/Node.cpp: 25 (WebCore::Node::dispatchInputEvent): 26 (WebCore::Node::defaultEventHandler): 27 28 Currently, we fire input events in Node in response to dispatching a webkitEditableContentChangedEvent. After 29 some discussion, Ryosuke and I believe that it will be ok to instead directly dispatch the input event where we 30 would normally dispatch a webkitEditableContentChangedEvent. 31 32 * editing/CompositeEditCommand.cpp: 33 (WebCore::EditCommandComposition::unapply): 34 (WebCore::EditCommandComposition::reapply): 35 36 Added calls to Editor::willUnapplyEditing and Editor::willReapplyEditing. 37 38 (WebCore::CompositeEditCommand::willApplyCommand): 39 (WebCore::CompositeEditCommand::apply): 40 (WebCore::CompositeEditCommand::didApplyCommand): 41 42 Added new virtual functions, willApplyCommand and didApplyCommand, that surround a call to 43 CompositeEditCommand::doApply. By default, they call willApplyEditing and appliedEditing on the editor, but may 44 be overridden in special cases, such as in TypingCommand, where we invoke appliedEditing after adding a new 45 typing command to the last open command. 46 47 If willApplyCommand returns false, CompositeEditCommand::apply will bail and not proceed with the command. 48 49 * editing/CompositeEditCommand.h: 50 * editing/Editor.cpp: 51 (WebCore::dispatchBeforeInputEvent): 52 (WebCore::dispatchBeforeInputEvents): 53 (WebCore::dispatchInputEvents): 54 (WebCore::Editor::willApplyEditing): 55 (WebCore::Editor::appliedEditing): 56 (WebCore::Editor::willUnapplyEditing): 57 (WebCore::Editor::unappliedEditing): 58 (WebCore::Editor::willReapplyEditing): 59 (WebCore::Editor::reappliedEditing): 60 (WebCore::Editor::computeAndSetTypingStyle): 61 (WebCore::dispatchEditableContentChangedEvents): Deleted. 62 * editing/Editor.h: 63 * editing/TypingCommand.cpp: 64 (WebCore::TypingCommand::willApplyCommand): 65 (WebCore::TypingCommand::didApplyCommand): 66 (WebCore::TypingCommand::willAddTypingToOpenCommand): 67 (WebCore::TypingCommand::insertTextRunWithoutNewlines): 68 (WebCore::TypingCommand::insertLineBreak): 69 (WebCore::TypingCommand::insertParagraphSeparator): 70 (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent): 71 (WebCore::TypingCommand::deleteKeyPressed): 72 (WebCore::TypingCommand::forwardDeleteKeyPressed): 73 (WebCore::TypingCommand::deleteSelection): 74 75 These now invoke willAddTypingToOpenCommand before proceeding with creating the command and applying it. The 76 flow is now: 77 - willAddTypingToOpenCommand 78 - create and apply a new command 79 - typingAddedToOpenCommand 80 81 * editing/TypingCommand.h: 82 (WebCore::TypingCommand::preservesTypingStyle): Deleted. 83 (WebCore::TypingCommand::shouldRetainAutocorrectionIndicator): Deleted. 84 (WebCore::TypingCommand::setShouldRetainAutocorrectionIndicator): Deleted. 85 (WebCore::TypingCommand::shouldStopCaretBlinking): Deleted. 86 * html/HTMLAttributeNames.in: 87 * html/HTMLElement.cpp: 88 (WebCore::HTMLElement::createEventHandlerNameMap): 89 1 90 2016-10-07 Nan Wang <n_wang@apple.com> 2 91 -
trunk/Source/WebCore/dom/Document.idl
r206795 r206944 193 193 [NotEnumerable] attribute EventHandler onbeforecopy; 194 194 [NotEnumerable] attribute EventHandler onbeforecut; 195 [NotEnumerable] attribute EventHandler onbeforeinput; 195 196 [NotEnumerable] attribute EventHandler onbeforepaste; 196 197 [NotEnumerable] attribute EventHandler oncopy; -
trunk/Source/WebCore/dom/Element.idl
r206877 r206944 146 146 [NotEnumerable] attribute EventHandler onbeforecopy; 147 147 [NotEnumerable] attribute EventHandler onbeforecut; 148 [NotEnumerable] attribute EventHandler onbeforeinput; 148 149 [NotEnumerable] attribute EventHandler onbeforepaste; 149 150 [NotEnumerable] attribute EventHandler oncopy; -
trunk/Source/WebCore/dom/EventNames.h
r202298 r206944 61 61 macro(beforecopy) \ 62 62 macro(beforecut) \ 63 macro(beforeinput) \ 63 64 macro(beforeload) \ 64 65 macro(beforepaste) \ -
trunk/Source/WebCore/dom/Node.cpp
r206843 r206944 2205 2205 void Node::dispatchInputEvent(const AtomicString& inputType) 2206 2206 { 2207 if (document().settings()->inputEventsEnabled()) 2207 auto* settings = document().settings(); 2208 if (settings && settings->inputEventsEnabled()) 2208 2209 dispatchScopedEvent(InputEvent::create(eventNames().inputEvent, inputType, true, false, document().defaultView(), 0)); 2209 2210 else … … 2273 2274 } 2274 2275 #endif 2275 } else if (event.type() == eventNames().webkitEditableContentChangedEvent) {2276 dispatchInputEvent(emptyString());2277 2276 } 2278 2277 } -
trunk/Source/WebCore/editing/CompositeEditCommand.cpp
r203660 r206944 232 232 #endif 233 233 234 if (!frame->editor().willUnapplyEditing(*this)) 235 return; 236 234 237 size_t size = m_commands.size(); 235 238 for (size_t i = size; i; --i) … … 256 259 m_document->updateLayoutIgnorePendingStylesheets(); 257 260 261 if (!frame->editor().willReapplyEditing(*this)) 262 return; 263 258 264 for (auto& command : m_commands) 259 265 command->doReapply(); … … 310 316 { 311 317 ASSERT(isTopLevelCommand() || !m_composition); 318 } 319 320 bool CompositeEditCommand::willApplyCommand() 321 { 322 return frame().editor().willApplyEditing(*this); 312 323 } 313 324 … … 338 349 document().updateLayoutIgnorePendingStylesheets(); 339 350 351 if (!willApplyCommand()) 352 return; 353 340 354 { 341 355 EventQueueScope eventQueueScope; … … 343 357 } 344 358 345 // Only need to call appliedEditing for top-level commands, 346 // and TypingCommands do it on their own (see TypingCommand::typingAddedToOpenCommand). 347 if (!isTypingCommand()) 348 frame().editor().appliedEditing(this); 359 didApplyCommand(); 349 360 setShouldRetainAutocorrectionIndicator(false); 361 } 362 363 void CompositeEditCommand::didApplyCommand() 364 { 365 frame().editor().appliedEditing(this); 350 366 } 351 367 -
trunk/Source/WebCore/editing/CompositeEditCommand.h
r200876 r206944 117 117 protected: 118 118 explicit CompositeEditCommand(Document&, EditAction = EditActionUnspecified); 119 120 // If willApplyCommand returns false, we won't proceed with applying the command. 121 virtual bool willApplyCommand(); 122 virtual void didApplyCommand(); 119 123 120 124 // -
trunk/Source/WebCore/editing/Editor.cpp
r206843 r206944 60 60 #include "HitTestResult.h" 61 61 #include "IndentOutdentCommand.h" 62 #include "InputEvent.h" 62 63 #include "InsertListCommand.h" 64 #include "InsertTextCommand.h" 63 65 #include "KeyboardEvent.h" 64 66 #include "KillRing.h" … … 110 112 namespace WebCore { 111 113 114 static bool dispatchBeforeInputEvent(Element& element, const AtomicString& inputType) 115 { 116 auto* settings = element.document().settings(); 117 if (!settings || !settings->inputEventsEnabled()) 118 return true; 119 120 auto event = InputEvent::create(eventNames().beforeinputEvent, inputType, true, true, element.document().defaultView(), 0); 121 element.dispatchScopedEvent(event); 122 123 return !event->defaultPrevented(); 124 } 125 112 126 class ClearTextCommand : public DeleteSelectionCommand { 113 127 public: … … 1026 1040 } 1027 1041 1028 static void dispatchEditableContentChangedEvents(PassRefPtr<Element> prpStartRoot, PassRefPtr<Element> prpEndRoot) 1029 { 1030 RefPtr<Element> startRoot = prpStartRoot; 1031 RefPtr<Element> endRoot = prpEndRoot; 1042 static bool dispatchBeforeInputEvents(RefPtr<Element> startRoot, RefPtr<Element> endRoot, const AtomicString& inputTypeName) 1043 { 1044 bool continueWithDefaultBehavior = true; 1032 1045 if (startRoot) 1033 startRoot->dispatchEvent(Event::create(eventNames().webkitEditableContentChangedEvent, false, false));1046 continueWithDefaultBehavior &= dispatchBeforeInputEvent(*startRoot, inputTypeName); 1034 1047 if (endRoot && endRoot != startRoot) 1035 endRoot->dispatchEvent(Event::create(eventNames().webkitEditableContentChangedEvent, false, false)); 1048 continueWithDefaultBehavior &= dispatchBeforeInputEvent(*endRoot, inputTypeName); 1049 return continueWithDefaultBehavior; 1050 } 1051 1052 static void dispatchInputEvents(RefPtr<Element> startRoot, RefPtr<Element> endRoot, const AtomicString& inputTypeName) 1053 { 1054 if (startRoot) 1055 startRoot->dispatchInputEvent(inputTypeName); 1056 if (endRoot && endRoot != startRoot) 1057 endRoot->dispatchInputEvent(inputTypeName); 1058 } 1059 1060 bool Editor::willApplyEditing(CompositeEditCommand& command) const 1061 { 1062 auto* composition = command.composition(); 1063 if (!composition) 1064 return true; 1065 1066 return dispatchBeforeInputEvents(composition->startingRootEditableElement(), composition->endingRootEditableElement(), emptyString()); 1036 1067 } 1037 1068 … … 1052 1083 1053 1084 changeSelectionAfterCommand(newSelection, options); 1054 dispatch EditableContentChangedEvents(composition->startingRootEditableElement(), composition->endingRootEditableElement());1085 dispatchInputEvents(composition->startingRootEditableElement(), composition->endingRootEditableElement(), emptyString()); 1055 1086 1056 1087 updateEditorUINowIfScheduled(); … … 1075 1106 } 1076 1107 1108 bool Editor::willUnapplyEditing(const EditCommandComposition& composition) const 1109 { 1110 return dispatchBeforeInputEvents(composition.startingRootEditableElement(), composition.endingRootEditableElement(), emptyString()); 1111 } 1112 1077 1113 void Editor::unappliedEditing(PassRefPtr<EditCommandComposition> cmd) 1078 1114 { … … 1083 1119 VisibleSelection newSelection(cmd->startingSelection()); 1084 1120 changeSelectionAfterCommand(newSelection, FrameSelection::defaultSetSelectionOptions()); 1085 dispatch EditableContentChangedEvents(cmd->startingRootEditableElement(), cmd->endingRootEditableElement());1121 dispatchInputEvents(cmd->startingRootEditableElement(), cmd->endingRootEditableElement(), emptyString()); 1086 1122 1087 1123 updateEditorUINowIfScheduled(); … … 1095 1131 } 1096 1132 1133 bool Editor::willReapplyEditing(const EditCommandComposition& composition) const 1134 { 1135 return dispatchBeforeInputEvents(composition.startingRootEditableElement(), composition.endingRootEditableElement(), emptyString()); 1136 } 1137 1097 1138 void Editor::reappliedEditing(PassRefPtr<EditCommandComposition> cmd) 1098 1139 { … … 1103 1144 VisibleSelection newSelection(cmd->endingSelection()); 1104 1145 changeSelectionAfterCommand(newSelection, FrameSelection::defaultSetSelectionOptions()); 1105 dispatch EditableContentChangedEvents(cmd->startingRootEditableElement(), cmd->endingRootEditableElement());1146 dispatchInputEvents(cmd->startingRootEditableElement(), cmd->endingRootEditableElement(), emptyString()); 1106 1147 1107 1148 updateEditorUINowIfScheduled(); … … 3053 3094 } 3054 3095 3096 auto* element = m_frame.selection().selection().rootEditableElement(); 3097 if (element && !dispatchBeforeInputEvent(*element, emptyString())) 3098 return; 3099 3055 3100 // Calculate the current typing style. 3056 3101 RefPtr<EditingStyle> typingStyle; … … 3065 3110 if (!blockStyle->isEmpty()) 3066 3111 applyCommand(ApplyStyleCommand::create(document(), blockStyle.get(), editingAction)); 3112 3113 if (element) 3114 element->dispatchInputEvent(emptyString()); 3067 3115 3068 3116 // Set the remaining style as the typing style. -
trunk/Source/WebCore/editing/Editor.h
r206629 r206944 199 199 void applyParagraphStyleToSelection(StyleProperties*, EditAction); 200 200 201 // Returns whether or not we should proceed with editing. 202 bool willApplyEditing(CompositeEditCommand&) const; 203 bool willUnapplyEditing(const EditCommandComposition&) const; 204 bool willReapplyEditing(const EditCommandComposition&) const; 205 201 206 void appliedEditing(PassRefPtr<CompositeEditCommand>); 202 207 void unappliedEditing(PassRefPtr<EditCommandComposition>); -
trunk/Source/WebCore/editing/TypingCommand.cpp
r205092 r206944 263 263 } 264 264 265 bool TypingCommand::willApplyCommand() 266 { 267 if (!m_isHandlingInitialTypingCommand) { 268 // The TypingCommand will handle the willApplyCommand logic separately in TypingCommand::willAddTypingToOpenCommand. 269 return true; 270 } 271 272 return CompositeEditCommand::willApplyCommand(); 273 } 274 265 275 void TypingCommand::doApply() 266 276 { … … 297 307 298 308 ASSERT_NOT_REACHED(); 309 } 310 311 void TypingCommand::didApplyCommand() 312 { 313 // TypingCommands handle applied editing separately (see TypingCommand::typingAddedToOpenCommand). 314 m_isHandlingInitialTypingCommand = false; 299 315 } 300 316 … … 353 369 } 354 370 371 bool TypingCommand::willAddTypingToOpenCommand(ETypingCommand, TextGranularity) 372 { 373 if (m_isHandlingInitialTypingCommand) 374 return true; 375 376 // FIXME: Use the newly added typing command and granularity to ensure that an InputEvent with the 377 // correct inputType is dispatched. 378 return frame().editor().willApplyEditing(*this); 379 } 380 355 381 void TypingCommand::typingAddedToOpenCommand(ETypingCommand commandTypeForAddedTyping) 356 382 { … … 394 420 void TypingCommand::insertTextRunWithoutNewlines(const String &text, bool selectInsertedText) 395 421 { 422 if (!willAddTypingToOpenCommand(InsertText, CharacterGranularity)) 423 return; 424 396 425 RefPtr<InsertTextCommand> command = InsertTextCommand::create(document(), text, selectInsertedText, 397 426 m_compositionType == TextCompositionNone ? InsertTextCommand::RebalanceLeadingAndTrailingWhitespaces : InsertTextCommand::RebalanceAllWhitespaces, EditActionTyping); … … 405 434 { 406 435 if (!canAppendNewLineFeedToSelection(endingSelection())) 436 return; 437 438 if (!willAddTypingToOpenCommand(InsertLineBreak, LineGranularity)) 407 439 return; 408 440 … … 424 456 return; 425 457 458 if (!willAddTypingToOpenCommand(InsertParagraphSeparator, ParagraphGranularity)) 459 return; 460 426 461 applyCommandToComposite(InsertParagraphSeparatorCommand::create(document(), false, false, EditActionTyping)); 427 462 typingAddedToOpenCommand(InsertParagraphSeparator); … … 438 473 void TypingCommand::insertParagraphSeparatorInQuotedContent() 439 474 { 475 if (!willAddTypingToOpenCommand(InsertParagraphSeparatorInQuotedContent, ParagraphGranularity)) 476 return; 477 440 478 // If the selection starts inside a table, just insert the paragraph separator normally 441 479 // Breaking the blockquote would also break apart the table, which is unecessary when inserting a newline … … 480 518 void TypingCommand::deleteKeyPressed(TextGranularity granularity, bool shouldAddToKillRing) 481 519 { 520 if (!willAddTypingToOpenCommand(DeleteKey, granularity)) 521 return; 522 482 523 Frame& frame = this->frame(); 483 524 … … 593 634 void TypingCommand::forwardDeleteKeyPressed(TextGranularity granularity, bool shouldAddToKillRing) 594 635 { 636 if (!willAddTypingToOpenCommand(ForwardDeleteKey, granularity)) 637 return; 638 595 639 Frame& frame = this->frame(); 596 640 … … 691 735 void TypingCommand::deleteSelection(bool smartDelete) 692 736 { 737 if (!willAddTypingToOpenCommand(DeleteSelection, CharacterGranularity)) 738 return; 739 693 740 CompositeEditCommand::deleteSelection(smartDelete); 694 741 typingAddedToOpenCommand(DeleteSelection); -
trunk/Source/WebCore/editing/TypingCommand.h
r203250 r206944 31 31 namespace WebCore { 32 32 33 class TypingCommand : public TextInsertionBaseCommand {33 class TypingCommand final : public TextInsertionBaseCommand { 34 34 public: 35 35 enum ETypingCommand { … … 105 105 static RefPtr<TypingCommand> lastTypingCommandIfStillOpenForTyping(Frame&); 106 106 107 v irtual void doApply();108 virtualbool isTypingCommand() const;109 virtualbool preservesTypingStyle() const { return m_preservesTypingStyle; }110 virtualbool shouldRetainAutocorrectionIndicator() const107 void doApply(); 108 bool isTypingCommand() const; 109 bool preservesTypingStyle() const { return m_preservesTypingStyle; } 110 bool shouldRetainAutocorrectionIndicator() const 111 111 { 112 112 ASSERT(isTopLevelCommand()); 113 113 return m_shouldRetainAutocorrectionIndicator; 114 114 } 115 v irtual void setShouldRetainAutocorrectionIndicator(bool retain) { m_shouldRetainAutocorrectionIndicator = retain; }116 virtualbool shouldStopCaretBlinking() const { return true; }115 void setShouldRetainAutocorrectionIndicator(bool retain) { m_shouldRetainAutocorrectionIndicator = retain; } 116 bool shouldStopCaretBlinking() const { return true; } 117 117 void setShouldPreventSpellChecking(bool prevent) { m_shouldPreventSpellChecking = prevent; } 118 118 … … 120 120 121 121 void updatePreservesTypingStyle(ETypingCommand); 122 bool willAddTypingToOpenCommand(ETypingCommand, TextGranularity); 122 123 void markMisspellingsAfterTyping(ETypingCommand); 123 124 void typingAddedToOpenCommand(ETypingCommand); … … 130 131 void insertParagraphSeparatorAndNotifyAccessibility(); 131 132 133 bool willApplyCommand(); 134 void didApplyCommand(); 135 132 136 ETypingCommand m_commandType; 133 137 String m_textToInsert; … … 135 139 bool m_selectInsertedText; 136 140 bool m_smartDelete; 141 bool m_isHandlingInitialTypingCommand { true }; 137 142 TextGranularity m_granularity; 138 143 TextCompositionType m_compositionType; -
trunk/Source/WebCore/html/HTMLAttributeNames.in
r205524 r206944 189 189 onbeforecopy 190 190 onbeforecut 191 onbeforeinput 191 192 onbeforeload 192 193 onbeforepaste -
trunk/Source/WebCore/html/HTMLElement.cpp
r205663 r206944 232 232 &onbeforecopyAttr, 233 233 &onbeforecutAttr, 234 &onbeforeinputAttr, 234 235 &onbeforeloadAttr, 235 236 &onbeforepasteAttr,
Note: See TracChangeset
for help on using the changeset viewer.