Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Deploy Ref/RefPtr in Editor
https://bugs.webkit.org/show_bug.cgi?id=224708 Reviewed by Wenson Hsieh. Source/WebCore: Deployed smart pointers in WebCore::Editor. Also deployed ScriptDisallowedScope around the code which accesses the render tree. * dom/Position.cpp: (WebCore::Position::containerOrParentElement const): Added. * dom/Position.h: * editing/Editor.cpp: (WebCore::Editor::selectionForCommand): (WebCore::Editor::pasteAsPlainText): (WebCore::Editor::pasteAsFragment): (WebCore::Editor::shouldInsertFragment): (WebCore::Editor::replaceSelectionWithFragment): (WebCore::Editor::respondToChangedContents): (WebCore::Editor::hasBidiSelection const): (WebCore::Editor::selectionUnorderedListState const): (WebCore::Editor::selectionOrderedListState const): (WebCore::Editor::findEventTargetFrom const): (WebCore::Editor::findEventTargetFromSelection const): (WebCore::notifyTextFromControls): (WebCore::Editor::willApplyEditing const): (WebCore::Editor::appliedEditing): (WebCore::Editor::insertTextWithoutSendingTextEvent): (WebCore::Editor::performCutOrCopy): (WebCore::Editor::simplifyMarkup): Replaced the manual tree traversal by treeOrder(~). (WebCore::Editor::copyImage): (WebCore::Editor::setBaseWritingDirection): (WebCore::Editor::baseWritingDirectionForSelectionStart const): (WebCore::Editor::setComposition): (WebCore::Editor::advanceToNextMisspelling): (WebCore::Editor::markMisspellingsAfterTypingToWord): Use containerOrParentElement. (WebCore::Editor::isSpellCheckingEnabledFor const): (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): (WebCore::Editor::markAndReplaceFor): (WebCore::scanForTelephoneNumbers): (WebCore::Editor::scanSelectionForTelephoneNumbers): Restrucuted the code with makeScopeExit to exit early instead of nesting if's. (WebCore::findFirstMarkable): (WebCore::Editor::selectionStartHasMarkerFor const): (WebCore::Editor::resolveTextCheckingTypeMask): (WebCore::Editor::stringForCandidateRequest const): (WebCore::Editor::fontAttributesAtSelectionStart): (WebCore::Editor::promisedAttachmentInfo): (WebCore::Editor::styleForSelectionStart): (WebCore::Editor::fontForSelection): * editing/Editor.h: * page/DragController.cpp: (WebCore::DragController::dispatchTextInputEventFor): Source/WebKit: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::editorState const): * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::requestAutocorrectionData): * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::fontAtSelection): Source/WebKitLegacy/mac: * WebView/WebFrame.mm: (-[WebFrame fontForSelection:]): * WebView/WebHTMLView.mm: (-[WebHTMLView _updateFontPanel]): * WebView/WebView.mm: (-[WebView updateTextTouchBar]): Canonical link: https://commits.webkit.org/236673@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information