⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 282215 in webkit


Ignore:
Timestamp:
Sep 9, 2021, 8:53:49 AM (5 years ago)
Author:
Wenson Hsieh
Message:

Unreviewed, fix the Mac Catalyst build after r282191
​https://bugs.webkit.org/show_bug.cgi?id=230037

  • WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.mm:

Update some logic that's guarded by ENABLE(PLATFORM_DRIVEN_TEXT_CHECKING) to use "->" for accessing methods on
Ref and CheckedRef, rather than ".".

(WebKit::TextCheckingControllerProxy::rangeAndOffsetRelativeToSelection):
(WebKit::TextCheckingControllerProxy::replaceRelativeToSelection):
(WebKit::TextCheckingControllerProxy::removeAnnotationRelativeToSelection):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r282210 r282215  
     12021-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
    1152021-09-09  Youenn Fablet  <youenn@apple.com>
    216
  • trunk/Source/WebKit/WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.mm

    r282191 r282215  
    7474std::optional<TextCheckingControllerProxy::RangeAndOffset> TextCheckingControllerProxy::rangeAndOffsetRelativeToSelection(int64_t offset, uint64_t length)
    7575{
    76     auto& frameSelection = CheckedRef(m_page.corePage()->focusController()).focusedOrMainFrame().selection();
     76    auto& frameSelection = CheckedRef(m_page.corePage()->focusController())->focusedOrMainFrame().selection();
    7777    auto selection = frameSelection.selection();
    7878
    … …  
    9898{
    9999    Ref frame = CheckedRef(m_page.corePage()->focusController())->focusedOrMainFrame();
    100     FrameSelection frameSelection = frame.selection();
     100    auto& frameSelection = frame->selection();
    101101    RefPtr root = frameSelection.rootEditableElementOrDocumentElement();
    102102    if (!root)
    … …  
    108108    auto locationInRoot = rangeAndOffset->locationInRoot;
    109109
    110     auto& markers = frame.document()->markers();
     110    auto& markers = frame->document()->markers();
    111111    markers.removeMarkers(rangeAndOffset->range, relevantMarkerTypes());
    112112
    … …  
    115115            bool restoreSelection = frameSelection.selection().isRange();
    116116
    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)]);
    118118
    119119            if (restoreSelection) {
    … …  
    156156    auto removeCoreSpellingMarkers = annotation == "NSSpellingState";
    157157    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();
    159159    document->markers().filterMarkers(rangeAndOffset->range, [&] (const DocumentMarker& marker) {
    160160        if (!WTF::holds_alternative<WebCore::DocumentMarker::PlatformTextCheckingData>(marker.data()))
Note: See TracChangeset for help on using the changeset viewer.