Changeset 211471 in webkit
- Timestamp:
- Jan 31, 2017 11:46:31 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r211465 r211471 1 2017-01-31 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Regression (Safari 10.1): Pressing Return in a contenteditable no longer inserts a line break under certain conditions 4 https://bugs.webkit.org/show_bug.cgi?id=167525 5 <rdar://problem/30270210> 6 7 Reviewed by Ryosuke Niwa. 8 9 Adds a new test covering newline insertion with mutation observers and an input event handler. Also rebaselines 10 a drag and drop test to account for dispatching input events on the scoped queue. 11 12 * fast/events/input-events-drag-and-drop-expected.txt: 13 * fast/events/input-events-insert-newlines-after-mutation-expected.txt: Added. 14 * fast/events/input-events-insert-newlines-after-mutation.html: Added. 15 * platform/ios-simulator/TestExpectations: 16 1 17 2017-01-31 Ryan Haddad <ryanhaddad@apple.com> 2 18 -
trunk/LayoutTests/fast/events/input-events-drag-and-drop-expected.txt
r208014 r211471 4 4 Performing drag and drop 5 5 (source): type=beforeinput, inputType=deleteByDrag, data=`null` 6 (destination): type=beforeinput, inputType=insertFromDrop, data=`Input events!` 6 7 (source): type=input, inputType=deleteByDrag, data=`null` 7 (destination): type=beforeinput, inputType=insertFromDrop, data=`Input events!`8 8 (destination): type=input, inputType=insertFromDrop, data=`Input events!` 9 9 -
trunk/LayoutTests/platform/ios-simulator/TestExpectations
r211339 r211471 1234 1234 fast/events/input-events-spell-checking-datatransfer.html [ Failure ] 1235 1235 fast/events/input-events-selection-forecolor-data.html [ Failure ] 1236 fast/events/input-events-insert-newlines-after-mutation.html [ Failure ] 1236 1237 fast/events/before-input-events-prevent-default.html [ Failure ] 1237 1238 fast/events/before-input-events-prevent-default-in-textfield.html [ Failure ] -
trunk/Source/WebCore/ChangeLog
r211466 r211471 1 2017-01-31 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Regression (Safari 10.1): Pressing Return in a contenteditable no longer inserts a line break under certain conditions 4 https://bugs.webkit.org/show_bug.cgi?id=167525 5 <rdar://problem/30270210> 6 7 Reviewed by Ryosuke Niwa. 8 9 Test: fast/events/input-events-insert-newlines-after-mutation.html 10 11 Reverts an unintended change made while refactoring code for input events that caused input events to be 12 dispatched immediately rather than on the scoped queue. Normally, input events are dispatched in 13 CompositeEditCommand::apply after the end of the scope, but TypingCommands may fire input events *from within* 14 the scope by calling typingAddedToOpenCommand. 15 16 Instead, TypingCommands should always dispatch events 17 synchronously after the end of the scoped queue in CompositeEditCommand::apply, but this is a riskier change 18 than we should currently allow, so we should revert to our old behavior for the time being. 19 20 * editing/Editor.cpp: 21 1 22 2017-01-31 Zalan Bujtas <zalan@apple.com> 2 23 -
trunk/Source/WebCore/editing/Editor.cpp
r211092 r211471 118 118 { 119 119 auto* settings = element.document().settings(); 120 if (settings && settings->inputEventsEnabled()) 121 element.dispatchEvent(InputEvent::create(eventNames().inputEvent, inputType, true, false, element.document().defaultView(), data, WTFMove(dataTransfer), targetRanges, 0)); 122 else 120 if (settings && settings->inputEventsEnabled()) { 121 // FIXME: We should not be dispatching to the scoped queue here. Normally, input events are dispatched in CompositeEditCommand::apply after the end of the scope, 122 // but TypingCommands are special in that existing TypingCommands that are applied again fire input events *from within* the scope by calling typingAddedToOpenCommand. 123 // Instead, TypingCommands should always dispatch events synchronously after the end of the scoped queue in CompositeEditCommand::apply. To work around this for the 124 // time being, just revert back to calling dispatchScopedEvent. 125 element.dispatchScopedEvent(InputEvent::create(eventNames().inputEvent, inputType, true, false, element.document().defaultView(), data, WTFMove(dataTransfer), targetRanges, 0)); 126 } else 123 127 element.dispatchInputEvent(); 124 128 }
Note: See TracChangeset
for help on using the changeset viewer.