Changeset 223708 in webkit
- Timestamp:
- Oct 19, 2017 1:43:41 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r223704 r223708 1 2017-10-19 Tim Horton <timothy_horton@apple.com> 2 3 Expand r209943 to suppress paste during provisional navigation as well 4 https://bugs.webkit.org/show_bug.cgi?id=178429 5 <rdar://problem/33952830> 6 7 Reviewed by Dean Jackson. 8 9 * http/tests/navigation/keyboard-events-during-provisional-navigation-expected.txt: 10 * http/tests/navigation/keyboard-events-during-provisional-navigation.html: 11 * http/tests/navigation/keyboard-events-during-provisional-subframe-navigation-expected.txt: 12 * http/tests/navigation/keyboard-events-during-provisional-subframe-navigation.html: 13 * http/tests/navigation/resources/keyboard-events-after-navigation.html: 14 * http/tests/navigation/resources/keyboard-events-test.js: 15 (runBeforeTest): 16 (runTest): 17 Copy a "d" to the clipboard before running the test, and paste it while running. 18 I put the copy before running the test so that if someone comes along and 19 blacklists copy during provisional load as well, the test for this behavior 20 still actually tests the paste portion. 21 Also ensure that paste events are not triggered during provisional navigation. 22 1 23 2017-10-19 Daniel Bates <dabates@apple.com> 2 24 -
trunk/LayoutTests/http/tests/navigation/keyboard-events-during-provisional-navigation-expected.txt
r216643 r223708 1 CONSOLE MESSAGE: line 14: Provisional navigation started. 2 CONSOLE MESSAGE: line 15: No trusted events should be logged and the input element should have the value "". 3 CONSOLE MESSAGE: line 20: Dispatching untrusted keypress event. 4 CONSOLE MESSAGE: line 5: keypressevent dispatched (isTrusted: false). 5 CONSOLE MESSAGE: line 28: Pressing tab. 6 CONSOLE MESSAGE: line 30: Active element after pressing tab: [object HTMLInputElement]. 7 CONSOLE MESSAGE: line 32: Pressing "a". 8 CONSOLE MESSAGE: line 35: Setting marked text to "b". 9 CONSOLE MESSAGE: line 38: Inserting text "c". 10 CONSOLE MESSAGE: line 41: Input element value after text input events: "". 11 CONSOLE MESSAGE: line 18: Pressing "z" with access key modifiers should navigate to resources/keyboard-events-after-navigation.html. 1 CONSOLE MESSAGE: line 16: Provisional navigation started. 2 CONSOLE MESSAGE: line 17: No trusted events should be logged and the input element should have the value "". 3 CONSOLE MESSAGE: line 34: Dispatching untrusted keypress event. 4 CONSOLE MESSAGE: line 18: keypressevent dispatched (isTrusted: false). 5 CONSOLE MESSAGE: line 42: Pressing tab. 6 CONSOLE MESSAGE: line 44: Active element after pressing tab: [object HTMLInputElement]. 7 CONSOLE MESSAGE: line 46: Pressing "a". 8 CONSOLE MESSAGE: line 49: Setting marked text to "b". 9 CONSOLE MESSAGE: line 52: Inserting text "c". 10 CONSOLE MESSAGE: line 55: Pasting text "d". 11 CONSOLE MESSAGE: line 58: Input element value after text input events: "". 12 CONSOLE MESSAGE: line 20: Pressing "z" with access key modifiers should navigate to resources/keyboard-events-after-navigation.html. 12 13 CONSOLE MESSAGE: line 6: Finished navigating to resources/keyboard-events-after-navigation.html. 13 CONSOLE MESSAGE: line 7: Trusted events should be logged and the input element should have the value "ac". 14 CONSOLE MESSAGE: line 20: Dispatching untrusted keypress event. 15 CONSOLE MESSAGE: line 5: keypressevent dispatched (isTrusted: false). 16 CONSOLE MESSAGE: line 28: Pressing tab. 17 CONSOLE MESSAGE: line 5: keydownevent dispatched (isTrusted: true). 18 CONSOLE MESSAGE: line 5: keyupevent dispatched (isTrusted: true). 19 CONSOLE MESSAGE: line 30: Active element after pressing tab: [object HTMLInputElement]. 20 CONSOLE MESSAGE: line 32: Pressing "a". 21 CONSOLE MESSAGE: line 5: keydownevent dispatched (isTrusted: true). 22 CONSOLE MESSAGE: line 5: keypressevent dispatched (isTrusted: true). 23 CONSOLE MESSAGE: line 5: textInputevent dispatched (isTrusted: true). 24 CONSOLE MESSAGE: line 5: beforeinputevent dispatched (isTrusted: true). 25 CONSOLE MESSAGE: line 5: inputevent dispatched (isTrusted: true). 26 CONSOLE MESSAGE: line 5: keyupevent dispatched (isTrusted: true). 27 CONSOLE MESSAGE: line 35: Setting marked text to "b". 28 CONSOLE MESSAGE: line 5: compositionstartevent dispatched (isTrusted: true). 29 CONSOLE MESSAGE: line 5: compositionupdateevent dispatched (isTrusted: true). 30 CONSOLE MESSAGE: line 5: beforeinputevent dispatched (isTrusted: true). 31 CONSOLE MESSAGE: line 5: inputevent dispatched (isTrusted: true). 32 CONSOLE MESSAGE: line 38: Inserting text "c". 33 CONSOLE MESSAGE: line 5: beforeinputevent dispatched (isTrusted: true). 34 CONSOLE MESSAGE: line 5: inputevent dispatched (isTrusted: true). 35 CONSOLE MESSAGE: line 5: textInputevent dispatched (isTrusted: true). 36 CONSOLE MESSAGE: line 5: beforeinputevent dispatched (isTrusted: true). 37 CONSOLE MESSAGE: line 5: inputevent dispatched (isTrusted: true). 38 CONSOLE MESSAGE: line 5: compositionendevent dispatched (isTrusted: true). 39 CONSOLE MESSAGE: line 41: Input element value after text input events: "ac". 14 CONSOLE MESSAGE: line 7: Trusted events should be logged and the input element should have the value "acd". 15 CONSOLE MESSAGE: line 34: Dispatching untrusted keypress event. 16 CONSOLE MESSAGE: line 18: keypressevent dispatched (isTrusted: false). 17 CONSOLE MESSAGE: line 42: Pressing tab. 18 CONSOLE MESSAGE: line 18: keydownevent dispatched (isTrusted: true). 19 CONSOLE MESSAGE: line 18: keyupevent dispatched (isTrusted: true). 20 CONSOLE MESSAGE: line 44: Active element after pressing tab: [object HTMLInputElement]. 21 CONSOLE MESSAGE: line 46: Pressing "a". 22 CONSOLE MESSAGE: line 18: keydownevent dispatched (isTrusted: true). 23 CONSOLE MESSAGE: line 18: keypressevent dispatched (isTrusted: true). 24 CONSOLE MESSAGE: line 18: textInputevent dispatched (isTrusted: true). 25 CONSOLE MESSAGE: line 18: beforeinputevent dispatched (isTrusted: true). 26 CONSOLE MESSAGE: line 18: inputevent dispatched (isTrusted: true). 27 CONSOLE MESSAGE: line 18: keyupevent dispatched (isTrusted: true). 28 CONSOLE MESSAGE: line 49: Setting marked text to "b". 29 CONSOLE MESSAGE: line 18: compositionstartevent dispatched (isTrusted: true). 30 CONSOLE MESSAGE: line 18: compositionupdateevent dispatched (isTrusted: true). 31 CONSOLE MESSAGE: line 18: beforeinputevent dispatched (isTrusted: true). 32 CONSOLE MESSAGE: line 18: inputevent dispatched (isTrusted: true). 33 CONSOLE MESSAGE: line 52: Inserting text "c". 34 CONSOLE MESSAGE: line 18: beforeinputevent dispatched (isTrusted: true). 35 CONSOLE MESSAGE: line 18: inputevent dispatched (isTrusted: true). 36 CONSOLE MESSAGE: line 18: textInputevent dispatched (isTrusted: true). 37 CONSOLE MESSAGE: line 18: beforeinputevent dispatched (isTrusted: true). 38 CONSOLE MESSAGE: line 18: inputevent dispatched (isTrusted: true). 39 CONSOLE MESSAGE: line 18: compositionendevent dispatched (isTrusted: true). 40 CONSOLE MESSAGE: line 55: Pasting text "d". 41 CONSOLE MESSAGE: line 18: pasteevent dispatched (isTrusted: true). 42 CONSOLE MESSAGE: line 18: textInputevent dispatched (isTrusted: true). 43 CONSOLE MESSAGE: line 18: beforeinputevent dispatched (isTrusted: true). 44 CONSOLE MESSAGE: line 18: inputevent dispatched (isTrusted: true). 45 CONSOLE MESSAGE: line 58: Input element value after text input events: "acd". 40 46 -
trunk/LayoutTests/http/tests/navigation/keyboard-events-during-provisional-navigation.html
r216599 r223708 8 8 testRunner.dumpAsText(); 9 9 testRunner.waitUntilDone(); 10 internals.settings.setShouldSuppress KeyboardInputDuringProvisionalNavigation(true);10 internals.settings.setShouldSuppressTextInputFromEditingDuringProvisionalNavigation(true); 11 11 } 12 13 runBeforeTest(window); 12 14 13 15 waitForProvisionalNavigation(function() { -
trunk/LayoutTests/http/tests/navigation/keyboard-events-during-provisional-subframe-navigation-expected.txt
r216643 r223708 1 CONSOLE MESSAGE: line 16: Provisional navigation started. 2 CONSOLE MESSAGE: line 17: No trusted events should be logged and the input element should have the value "". 3 CONSOLE MESSAGE: line 20: Dispatching untrusted keypress event. 4 CONSOLE MESSAGE: line 5: keypressevent dispatched (isTrusted: false). 5 CONSOLE MESSAGE: line 28: Pressing tab. 6 CONSOLE MESSAGE: line 30: Active element after pressing tab: [object HTMLInputElement]. 7 CONSOLE MESSAGE: line 32: Pressing "a". 8 CONSOLE MESSAGE: line 35: Setting marked text to "b". 9 CONSOLE MESSAGE: line 38: Inserting text "c". 10 CONSOLE MESSAGE: line 41: Input element value after text input events: "". 11 CONSOLE MESSAGE: line 20: Pressing "z" with access key modifiers should navigate to resources/keyboard-events-after-navigation.html. 1 CONSOLE MESSAGE: line 18: Provisional navigation started. 2 CONSOLE MESSAGE: line 19: No trusted events should be logged and the input element should have the value "". 3 CONSOLE MESSAGE: line 34: Dispatching untrusted keypress event. 4 CONSOLE MESSAGE: line 18: keypressevent dispatched (isTrusted: false). 5 CONSOLE MESSAGE: line 42: Pressing tab. 6 CONSOLE MESSAGE: line 44: Active element after pressing tab: [object HTMLInputElement]. 7 CONSOLE MESSAGE: line 46: Pressing "a". 8 CONSOLE MESSAGE: line 49: Setting marked text to "b". 9 CONSOLE MESSAGE: line 52: Inserting text "c". 10 CONSOLE MESSAGE: line 55: Pasting text "d". 11 CONSOLE MESSAGE: line 58: Input element value after text input events: "". 12 CONSOLE MESSAGE: line 22: Pressing "z" with access key modifiers should navigate to resources/keyboard-events-after-navigation.html. 12 13 CONSOLE MESSAGE: line 6: Finished navigating to resources/keyboard-events-after-navigation.html. 13 CONSOLE MESSAGE: line 7: Trusted events should be logged and the input element should have the value "ac". 14 CONSOLE MESSAGE: line 20: Dispatching untrusted keypress event. 15 CONSOLE MESSAGE: line 5: keypressevent dispatched (isTrusted: false). 16 CONSOLE MESSAGE: line 28: Pressing tab. 17 CONSOLE MESSAGE: line 5: keydownevent dispatched (isTrusted: true). 18 CONSOLE MESSAGE: line 5: keyupevent dispatched (isTrusted: true). 19 CONSOLE MESSAGE: line 30: Active element after pressing tab: [object HTMLInputElement]. 20 CONSOLE MESSAGE: line 32: Pressing "a". 21 CONSOLE MESSAGE: line 5: keydownevent dispatched (isTrusted: true). 22 CONSOLE MESSAGE: line 5: keypressevent dispatched (isTrusted: true). 23 CONSOLE MESSAGE: line 5: textInputevent dispatched (isTrusted: true). 24 CONSOLE MESSAGE: line 5: beforeinputevent dispatched (isTrusted: true). 25 CONSOLE MESSAGE: line 5: inputevent dispatched (isTrusted: true). 26 CONSOLE MESSAGE: line 5: keyupevent dispatched (isTrusted: true). 27 CONSOLE MESSAGE: line 35: Setting marked text to "b". 28 CONSOLE MESSAGE: line 5: compositionstartevent dispatched (isTrusted: true). 29 CONSOLE MESSAGE: line 5: compositionupdateevent dispatched (isTrusted: true). 30 CONSOLE MESSAGE: line 5: beforeinputevent dispatched (isTrusted: true). 31 CONSOLE MESSAGE: line 5: inputevent dispatched (isTrusted: true). 32 CONSOLE MESSAGE: line 38: Inserting text "c". 33 CONSOLE MESSAGE: line 5: beforeinputevent dispatched (isTrusted: true). 34 CONSOLE MESSAGE: line 5: inputevent dispatched (isTrusted: true). 35 CONSOLE MESSAGE: line 5: textInputevent dispatched (isTrusted: true). 36 CONSOLE MESSAGE: line 5: beforeinputevent dispatched (isTrusted: true). 37 CONSOLE MESSAGE: line 5: inputevent dispatched (isTrusted: true). 38 CONSOLE MESSAGE: line 5: compositionendevent dispatched (isTrusted: true). 39 CONSOLE MESSAGE: line 41: Input element value after text input events: "ac". 14 CONSOLE MESSAGE: line 7: Trusted events should be logged and the input element should have the value "acd". 15 CONSOLE MESSAGE: line 34: Dispatching untrusted keypress event. 16 CONSOLE MESSAGE: line 18: keypressevent dispatched (isTrusted: false). 17 CONSOLE MESSAGE: line 42: Pressing tab. 18 CONSOLE MESSAGE: line 18: keydownevent dispatched (isTrusted: true). 19 CONSOLE MESSAGE: line 18: keyupevent dispatched (isTrusted: true). 20 CONSOLE MESSAGE: line 44: Active element after pressing tab: [object HTMLInputElement]. 21 CONSOLE MESSAGE: line 46: Pressing "a". 22 CONSOLE MESSAGE: line 18: keydownevent dispatched (isTrusted: true). 23 CONSOLE MESSAGE: line 18: keypressevent dispatched (isTrusted: true). 24 CONSOLE MESSAGE: line 18: textInputevent dispatched (isTrusted: true). 25 CONSOLE MESSAGE: line 18: beforeinputevent dispatched (isTrusted: true). 26 CONSOLE MESSAGE: line 18: inputevent dispatched (isTrusted: true). 27 CONSOLE MESSAGE: line 18: keyupevent dispatched (isTrusted: true). 28 CONSOLE MESSAGE: line 49: Setting marked text to "b". 29 CONSOLE MESSAGE: line 18: compositionstartevent dispatched (isTrusted: true). 30 CONSOLE MESSAGE: line 18: compositionupdateevent dispatched (isTrusted: true). 31 CONSOLE MESSAGE: line 18: beforeinputevent dispatched (isTrusted: true). 32 CONSOLE MESSAGE: line 18: inputevent dispatched (isTrusted: true). 33 CONSOLE MESSAGE: line 52: Inserting text "c". 34 CONSOLE MESSAGE: line 18: beforeinputevent dispatched (isTrusted: true). 35 CONSOLE MESSAGE: line 18: inputevent dispatched (isTrusted: true). 36 CONSOLE MESSAGE: line 18: textInputevent dispatched (isTrusted: true). 37 CONSOLE MESSAGE: line 18: beforeinputevent dispatched (isTrusted: true). 38 CONSOLE MESSAGE: line 18: inputevent dispatched (isTrusted: true). 39 CONSOLE MESSAGE: line 18: compositionendevent dispatched (isTrusted: true). 40 CONSOLE MESSAGE: line 55: Pasting text "d". 41 CONSOLE MESSAGE: line 18: pasteevent dispatched (isTrusted: true). 42 CONSOLE MESSAGE: line 18: textInputevent dispatched (isTrusted: true). 43 CONSOLE MESSAGE: line 18: beforeinputevent dispatched (isTrusted: true). 44 CONSOLE MESSAGE: line 18: inputevent dispatched (isTrusted: true). 45 CONSOLE MESSAGE: line 58: Input element value after text input events: "acd". 40 46 -
trunk/LayoutTests/http/tests/navigation/keyboard-events-during-provisional-subframe-navigation.html
r216614 r223708 10 10 testRunner.dumpChildFramesAsText(); 11 11 testRunner.waitUntilDone(); 12 internals.settings.setShouldSuppress KeyboardInputDuringProvisionalNavigation(true);12 internals.settings.setShouldSuppressTextInputFromEditingDuringProvisionalNavigation(true); 13 13 } 14 15 runBeforeTest(window); 14 16 15 17 waitForProvisionalNavigation(function () { -
trunk/LayoutTests/http/tests/navigation/resources/keyboard-events-after-navigation.html
r216599 r223708 5 5 <script> 6 6 console.log("Finished navigating to resources/keyboard-events-after-navigation.html."); 7 console.log("Trusted events should be logged and the input element should have the value \"ac \".");7 console.log("Trusted events should be logged and the input element should have the value \"acd\"."); 8 8 runTest(window); 9 9 testRunner.notifyDone(); -
trunk/LayoutTests/http/tests/navigation/resources/keyboard-events-test.js
r216643 r223708 1 function runBeforeTest(window) 2 { 3 var document = window.document; 4 5 document.body.addEventListener("beforecopy", function (e) { e.preventDefault(); }); 6 document.body.addEventListener("copy", function (e) { 7 e.clipboardData.setData("text/plain", "d"); 8 e.preventDefault(); 9 }); 10 11 document.execCommand("copy"); 12 } 13 1 14 function runTest(window) 2 15 { … … 15 28 window.addEventListener("beforeinput", eventHandler, true); 16 29 window.addEventListener("input", eventHandler, true); 30 window.addEventListener("paste", eventHandler, true); 17 31 18 32 var document = window.document; … … 39 53 textInputController.insertText("c"); 40 54 55 console.log("Pasting text \"d\"."); 56 document.execCommand("Paste"); 57 41 58 console.log("Input element value after text input events: \"" + textInput.value + "\"."); 42 59 } -
trunk/Source/WebCore/ChangeLog
r223707 r223708 1 2017-10-19 Tim Horton <timothy_horton@apple.com> 2 3 Expand r209943 to suppress paste during provisional navigation as well 4 https://bugs.webkit.org/show_bug.cgi?id=178429 5 <rdar://problem/33952830> 6 7 Reviewed by Dean Jackson. 8 9 No new tests; adjusted an existing test to cover this case. 10 11 * editing/Editor.cpp: 12 (WebCore::Editor::canPaste const): 13 Disable pasting during provisional navigation, like r209943 did for 14 various other forms of text input. 15 16 (WebCore::Editor::shouldInsertText const): 17 * dom/EventDispatcher.cpp: 18 (WebCore::shouldSuppressEventDispatchInDOM): 19 * loader/FrameLoader.cpp: 20 (WebCore::FrameLoader::shouldSuppressTextInputFromEditing const): 21 (WebCore::FrameLoader::shouldSuppressKeyboardInput const): Deleted. 22 * loader/FrameLoader.h: 23 * page/Settings.in: 24 Rename the setting to be about editing-related text input, not "keyboard" input. 25 26 * editing/EditorCommand.cpp: 27 (WebCore::allowExecutionWhenDisabled): 28 (WebCore::doNotAllowExecutionWhenDisabled): 29 (WebCore::allowExecutionWhenDisabledCopyCut): 30 (WebCore::allowExecutionWhenDisabledPaste): 31 (WebCore::createCommandMap): 32 (WebCore::Editor::Command::allowExecutionWhenDisabled const): 33 Completely disable execution of paste events when in no-text-input-from-editing mode. 34 Otherwise, even though canPaste was false and we wouldn't do a default paste action, 35 we would still dispatch the paste event to the DOM. 36 1 37 2017-10-19 Dean Jackson <dino@apple.com> 2 38 -
trunk/Source/WebCore/dom/EventDispatcher.cpp
r219051 r223708 118 118 return false; 119 119 120 if (!frame->mainFrame().loader().shouldSuppress KeyboardInput())120 if (!frame->mainFrame().loader().shouldSuppressTextInputFromEditing()) 121 121 return false; 122 122 -
trunk/Source/WebCore/editing/Editor.cpp
r223644 r223708 457 457 bool Editor::canPaste() const 458 458 { 459 if (m_frame.mainFrame().loader().shouldSuppressTextInputFromEditing()) 460 return false; 461 459 462 return canEdit(); 460 463 } … … 705 708 bool Editor::shouldInsertText(const String& text, Range* range, EditorInsertAction action) const 706 709 { 707 if (m_frame.mainFrame().loader().shouldSuppress KeyboardInput() && action == EditorInsertAction::Typed)710 if (m_frame.mainFrame().loader().shouldSuppressTextInputFromEditing() && action == EditorInsertAction::Typed) 708 711 return false; 709 712 -
trunk/Source/WebCore/editing/EditorCommand.cpp
r223644 r223708 40 40 #include "FormatBlockCommand.h" 41 41 #include "Frame.h" 42 #include "FrameLoader.h" 42 43 #include "FrameView.h" 43 44 #include "HTMLFontElement.h" … … 47 48 #include "IndentOutdentCommand.h" 48 49 #include "InsertListCommand.h" 50 #include "MainFrame.h" 49 51 #include "Page.h" 50 52 #include "Pasteboard.h" … … 75 77 String (*value)(Frame&, Event*); 76 78 bool isTextInsertion; 77 bool (*allowExecutionWhenDisabled)( EditorCommandSource);79 bool (*allowExecutionWhenDisabled)(Frame&, EditorCommandSource); 78 80 }; 79 81 … … 1491 1493 // allowExecutionWhenDisabled functions 1492 1494 1493 static bool allowExecutionWhenDisabled( EditorCommandSource)1494 { 1495 return true; 1496 } 1497 1498 static bool doNotAllowExecutionWhenDisabled( EditorCommandSource)1495 static bool allowExecutionWhenDisabled(Frame&, EditorCommandSource) 1496 { 1497 return true; 1498 } 1499 1500 static bool doNotAllowExecutionWhenDisabled(Frame&, EditorCommandSource) 1499 1501 { 1500 1502 return false; 1501 1503 } 1502 1504 1503 static bool allowExecutionWhenDisabledCopyCut( EditorCommandSource source)1505 static bool allowExecutionWhenDisabledCopyCut(Frame&, EditorCommandSource source) 1504 1506 { 1505 1507 switch (source) { … … 1513 1515 ASSERT_NOT_REACHED(); 1514 1516 return false; 1517 } 1518 1519 static bool allowExecutionWhenDisabledPaste(Frame& frame, EditorCommandSource) 1520 { 1521 if (frame.mainFrame().loader().shouldSuppressTextInputFromEditing()) 1522 return false; 1523 return true; 1515 1524 } 1516 1525 … … 1626 1635 { "Outdent", { executeOutdent, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 1627 1636 { "OverWrite", { executeToggleOverwrite, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 1628 { "Paste", { executePaste, supportedPaste, enabledPaste, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabled } },1629 { "PasteAndMatchStyle", { executePasteAndMatchStyle, supportedPaste, enabledPaste, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabled } },1630 { "PasteAsPlainText", { executePasteAsPlainText, supportedPaste, enabledPaste, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabled } },1637 { "Paste", { executePaste, supportedPaste, enabledPaste, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabledPaste } }, 1638 { "PasteAndMatchStyle", { executePasteAndMatchStyle, supportedPaste, enabledPaste, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabledPaste } }, 1639 { "PasteAsPlainText", { executePasteAsPlainText, supportedPaste, enabledPaste, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabledPaste } }, 1631 1640 { "Print", { executePrint, supported, enabled, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 1632 1641 { "Redo", { executeRedo, supported, enabledRedo, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, … … 1828 1837 if (!isSupported() || !m_frame) 1829 1838 return false; 1830 return m_command->allowExecutionWhenDisabled( m_source);1839 return m_command->allowExecutionWhenDisabled(*m_frame, m_source); 1831 1840 } 1832 1841 -
trunk/Source/WebCore/loader/FrameLoader.cpp
r223697 r223708 3821 3821 } 3822 3822 3823 bool FrameLoader::shouldSuppress KeyboardInput() const3824 { 3825 return m_frame.settings().shouldSuppress KeyboardInputDuringProvisionalNavigation() && m_state == FrameStateProvisional;3823 bool FrameLoader::shouldSuppressTextInputFromEditing() const 3824 { 3825 return m_frame.settings().shouldSuppressTextInputFromEditingDuringProvisionalNavigation() && m_state == FrameStateProvisional; 3826 3826 } 3827 3827 -
trunk/Source/WebCore/loader/FrameLoader.h
r223697 r223708 300 300 301 301 bool isAlwaysOnLoggingAllowed() const; 302 bool shouldSuppress KeyboardInput() const;302 bool shouldSuppressTextInputFromEditing() const; 303 303 304 304 private: -
trunk/Source/WebCore/page/Settings.in
r223653 r223708 289 289 webkitImageReadyEventEnabled initial=false 290 290 291 shouldSuppress KeyboardInputDuringProvisionalNavigation initial=false291 shouldSuppressTextInputFromEditingDuringProvisionalNavigation initial=false 292 292 293 293 langAttributeAwareFormControlUIEnabled initial=false -
trunk/Source/WebKit/ChangeLog
r223702 r223708 1 2017-10-19 Tim Horton <timothy_horton@apple.com> 2 3 Expand r209943 to suppress paste during provisional navigation as well 4 https://bugs.webkit.org/show_bug.cgi?id=178429 5 <rdar://problem/33952830> 6 7 Reviewed by Dean Jackson. 8 9 * Shared/WebPreferencesDefinitions.h: 10 * UIProcess/API/C/WKPreferences.cpp: 11 (WKPreferencesSetShouldSuppressKeyboardInputDuringProvisionalNavigation): 12 (WKPreferencesGetShouldSuppressKeyboardInputDuringProvisionalNavigation): 13 * UIProcess/API/Cocoa/WKPreferences.mm: 14 (-[WKPreferences _shouldSuppressKeyboardInputDuringProvisionalNavigation]): 15 (-[WKPreferences _setShouldSuppressKeyboardInputDuringProvisionalNavigation:]): 16 * WebProcess/WebPage/WebPage.cpp: 17 (WebKit::WebPage::updatePreferences): 18 Adjust to the changed preference name, except at the SPI level. 19 1 20 2017-10-19 Youenn Fablet <youenn@apple.com> 2 21 -
trunk/Source/WebKit/Shared/WebPreferencesDefinitions.h
r223433 r223708 290 290 macro(IntersectionObserverEnabled, intersectionObserverEnabled, Bool, bool, false, "Intersection Observer", "Enable Intersection Observer support") \ 291 291 macro(InteractiveFormValidationEnabled, interactiveFormValidationEnabled, Bool, bool, true, "HTML Interactive Form Validation", "HTML interactive form validation") \ 292 macro(ShouldSuppress KeyboardInputDuringProvisionalNavigation, shouldSuppressKeyboardInputDuringProvisionalNavigation, Bool, bool, false, "", "") \292 macro(ShouldSuppressTextInputFromEditingDuringProvisionalNavigation, shouldSuppressTextInputFromEditingDuringProvisionalNavigation, Bool, bool, false, "", "") \ 293 293 macro(CSSGridLayoutEnabled, cssGridLayoutEnabled, Bool, bool, true, "CSS Grid", "CSS Grid Layout Module support") \ 294 294 macro(GamepadsEnabled, gamepadsEnabled, Bool, bool, true, "Gamepads", "Web Gamepad API support") \ -
trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp
r223432 r223708 1813 1813 void WKPreferencesSetShouldSuppressKeyboardInputDuringProvisionalNavigation(WKPreferencesRef preferencesRef, bool flag) 1814 1814 { 1815 toImpl(preferencesRef)->setShouldSuppress KeyboardInputDuringProvisionalNavigation(flag);1815 toImpl(preferencesRef)->setShouldSuppressTextInputFromEditingDuringProvisionalNavigation(flag); 1816 1816 } 1817 1817 1818 1818 bool WKPreferencesGetShouldSuppressKeyboardInputDuringProvisionalNavigation(WKPreferencesRef preferencesRef) 1819 1819 { 1820 return toImpl(preferencesRef)->shouldSuppress KeyboardInputDuringProvisionalNavigation();1820 return toImpl(preferencesRef)->shouldSuppressTextInputFromEditingDuringProvisionalNavigation(); 1821 1821 } 1822 1822 -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
r222715 r223708 545 545 - (BOOL)_shouldSuppressKeyboardInputDuringProvisionalNavigation 546 546 { 547 return _preferences->shouldSuppress KeyboardInputDuringProvisionalNavigation();547 return _preferences->shouldSuppressTextInputFromEditingDuringProvisionalNavigation(); 548 548 } 549 549 550 550 - (void)_setShouldSuppressKeyboardInputDuringProvisionalNavigation:(BOOL)shouldSuppress 551 551 { 552 _preferences->setShouldSuppress KeyboardInputDuringProvisionalNavigation(shouldSuppress);552 _preferences->setShouldSuppressTextInputFromEditingDuringProvisionalNavigation(shouldSuppress); 553 553 } 554 554 -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r223644 r223708 3412 3412 settings.setLargeImageAsyncDecodingEnabled(store.getBoolValueForKey(WebPreferencesKey::largeImageAsyncDecodingEnabledKey())); 3413 3413 settings.setAnimatedImageAsyncDecodingEnabled(store.getBoolValueForKey(WebPreferencesKey::animatedImageAsyncDecodingEnabledKey())); 3414 settings.setShouldSuppress KeyboardInputDuringProvisionalNavigation(store.getBoolValueForKey(WebPreferencesKey::shouldSuppressKeyboardInputDuringProvisionalNavigationKey()));3414 settings.setShouldSuppressTextInputFromEditingDuringProvisionalNavigation(store.getBoolValueForKey(WebPreferencesKey::shouldSuppressTextInputFromEditingDuringProvisionalNavigationKey())); 3415 3415 settings.setMediaContentTypesRequiringHardwareSupport(store.getStringValueForKey(WebPreferencesKey::mediaContentTypesRequiringHardwareSupportKey())); 3416 3416 settings.setAllowMediaContentTypesRequiringHardwareSupportAsFallback(store.getBoolValueForKey(WebPreferencesKey::allowMediaContentTypesRequiringHardwareSupportAsFallbackKey()));
Note: See TracChangeset
for help on using the changeset viewer.