Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WPE][GTK] Expose availability of certain editing commands in WebKitE…
…ditorState https://bugs.webkit.org/show_bug.cgi?id=168219 Reviewed by Ryosuke Niwa. Source/WebCore: Make Editor::canUndo and Editor::canRedo const. Also, remove unused allowsCopy from HitTestResult. * editing/Editor.cpp: (WebCore::Editor::canUndo const): (WebCore::Editor::canRedo const): (WebCore::Editor::canUndo): Deleted. (WebCore::Editor::canRedo): Deleted. * editing/Editor.h: * rendering/HitTestResult.cpp: (WebCore::HitTestResult::allowsCopy const): Deleted. * rendering/HitTestResult.h: * rendering/SelectionRangeData.cpp: Source/WebKit: Expose canCut, canCopy, canPaste, canUndo, and canRedo in EditorState::PostLayouData. Add corresponding new WPE/GTK API. Remove allowsCopy from WebKitTestResultData. It's unused, does not work correctly in all circumstances, and irritates Ryosuke. Also, remove a bunch of #ifs guarding post layout data, since it's now used on all ports. * Shared/EditorState.cpp: (WebKit::EditorState::encode const): (WebKit::EditorState::decode): (WebKit::EditorState::PostLayoutData::encode const): (WebKit::EditorState::PostLayoutData::decode): * Shared/EditorState.h: (WebKit::EditorState::postLayoutData const const): * Shared/WebHitTestResultData.cpp: (WebKit::WebHitTestResultData::WebHitTestResultData): (WebKit::WebHitTestResultData::encode const): (WebKit::WebHitTestResultData::decode): * Shared/WebHitTestResultData.h: * UIProcess/API/APIHitTestResult.h: (API::HitTestResult::allowsCopy const): Deleted. * UIProcess/API/glib/WebKitEditorState.cpp: (webkitEditorStateChanged): (webkit_editor_state_is_cut_available): (webkit_editor_state_is_copy_available): (webkit_editor_state_is_paste_available): (webkit_editor_state_is_undo_available): (webkit_editor_state_is_redo_available): * UIProcess/API/glib/WebKitWebView.cpp: (webkit_web_view_can_execute_editing_command): * UIProcess/API/gtk/WebKitEditorState.h: * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: * UIProcess/API/wpe/WebKitEditorState.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::editorState const): * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::performImmediateActionHitTestAtLocation): Tools: Test it. * TestWebKitAPI/Tests/WebKitGtk/TestWebViewEditor.cpp: (testWebViewEditorCutCopyPasteNonEditable): (testWebViewEditorCutCopyPasteEditable): (testWebViewEditorSelectAllNonEditable): (testWebViewEditorSelectAllEditable): (loadContentsAndTryToCutSelection): (testWebViewEditorNonEditable): (testWebViewEditorEditorStateTypingAttributes): (testWebViewEditorInsertImage): (testWebViewEditorCreateLink): Canonical link: https://commits.webkit.org/195144@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224179 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
e031392
commit 95719c3
Showing
20 changed files
with
325 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.