Changeset 282215 in webkit
- Timestamp:
- Sep 9, 2021, 8:53:49 AM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.mm (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r282210 r282215 1 2021-09-09 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Unreviewed, fix the Mac Catalyst build after r282191 4 https://bugs.webkit.org/show_bug.cgi?id=230037 5 6 * WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.mm: 7 8 Update some logic that's guarded by ENABLE(PLATFORM_DRIVEN_TEXT_CHECKING) to use "->" for accessing methods on 9 Ref and CheckedRef, rather than ".". 10 11 (WebKit::TextCheckingControllerProxy::rangeAndOffsetRelativeToSelection): 12 (WebKit::TextCheckingControllerProxy::replaceRelativeToSelection): 13 (WebKit::TextCheckingControllerProxy::removeAnnotationRelativeToSelection): 14 1 15 2021-09-09 Youenn Fablet <youenn@apple.com> 2 16 -
trunk/Source/WebKit/WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.mm
r282191 r282215 74 74 std::optional<TextCheckingControllerProxy::RangeAndOffset> TextCheckingControllerProxy::rangeAndOffsetRelativeToSelection(int64_t offset, uint64_t length) 75 75 { 76 auto& frameSelection = CheckedRef(m_page.corePage()->focusController()) .focusedOrMainFrame().selection();76 auto& frameSelection = CheckedRef(m_page.corePage()->focusController())->focusedOrMainFrame().selection(); 77 77 auto selection = frameSelection.selection(); 78 78 … … 98 98 { 99 99 Ref frame = CheckedRef(m_page.corePage()->focusController())->focusedOrMainFrame(); 100 FrameSelection frameSelection = frame.selection();100 auto& frameSelection = frame->selection(); 101 101 RefPtr root = frameSelection.rootEditableElementOrDocumentElement(); 102 102 if (!root) … … 108 108 auto locationInRoot = rangeAndOffset->locationInRoot; 109 109 110 auto& markers = frame .document()->markers();110 auto& markers = frame->document()->markers(); 111 111 markers.removeMarkers(rangeAndOffset->range, relevantMarkerTypes()); 112 112 … … 115 115 bool restoreSelection = frameSelection.selection().isRange(); 116 116 117 frame .editor().replaceRangeForSpellChecking(rangeAndOffsetOfReplacement->range, [[annotatedString.string string] substringWithRange:NSMakeRange(relativeReplacementLocation, relativeReplacementLength + [annotatedString.string length] - length)]);117 frame->editor().replaceRangeForSpellChecking(rangeAndOffsetOfReplacement->range, [[annotatedString.string string] substringWithRange:NSMakeRange(relativeReplacementLocation, relativeReplacementLength + [annotatedString.string length] - length)]); 118 118 119 119 if (restoreSelection) { … … 156 156 auto removeCoreSpellingMarkers = annotation == "NSSpellingState"; 157 157 auto types = removeCoreSpellingMarkers ? relevantMarkerTypes() : WebCore::DocumentMarker::PlatformTextChecking; 158 RefPtr document = CheckedRef(m_page.corePage()->focusController()) .focusedOrMainFrame().document();158 RefPtr document = CheckedRef(m_page.corePage()->focusController())->focusedOrMainFrame().document(); 159 159 document->markers().filterMarkers(rangeAndOffset->range, [&] (const DocumentMarker& marker) { 160 160 if (!WTF::holds_alternative<WebCore::DocumentMarker::PlatformTextCheckingData>(marker.data()))
Note:
See TracChangeset
for help on using the changeset viewer.