Changeset 177502 in webkit


Ignore:
Timestamp:
Dec 18, 2014 10:23:18 AM (9 years ago)
Author:
dbates@webkit.org
Message:

Attempt to fix the iOS build after <http://trac.webkit.org/changeset/177486>
(https://bugs.webkit.org/show_bug.cgi?id=139755)

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::selectWithGesture): Wrap return value of Range::create() in RefPtr<Range>()
to make the the compiler happy since it wants clauses of the ternary operator to have the same data type
and Ref<Range> object does not support nullptr.
(WebKit::WebPage::selectWordBackward): Substitute Ref::ptr() for PassRefPtr::get().
(WebKit::WebPage::moveSelectionByOffset): Ditto.
(WebKit::WebPage::selectPositionAtPoint): Ditto.
(WebKit::WebPage::selectPositionAtBoundaryWithDirection): Ditto.
(WebKit::WebPage::requestDictationContext): Ditto.
(WebKit::computeAutocorrectionContext): Ditto.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r177498 r177502  
     12014-12-18  Daniel Bates  <dabates@apple.com>
     2
     3        Attempt to fix the iOS build after <http://trac.webkit.org/changeset/177486>
     4        (https://bugs.webkit.org/show_bug.cgi?id=139755)
     5
     6        * WebProcess/WebPage/ios/WebPageIOS.mm:
     7        (WebKit::WebPage::selectWithGesture): Wrap return value of Range::create() in RefPtr<Range>()
     8        to make the the compiler happy since it wants clauses of the ternary operator to have the same data type
     9        and Ref<Range> object does not support nullptr.
     10        (WebKit::WebPage::selectWordBackward): Substitute Ref::ptr() for PassRefPtr::get().
     11        (WebKit::WebPage::moveSelectionByOffset): Ditto.
     12        (WebKit::WebPage::selectPositionAtPoint): Ditto.
     13        (WebKit::WebPage::selectPositionAtBoundaryWithDirection): Ditto.
     14        (WebKit::WebPage::requestDictationContext): Ditto.
     15        (WebKit::computeAutocorrectionContext): Ditto.
     16
    1172014-12-18  Antti Koivisto  <antti@apple.com>
    218
  • trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm

    r177246 r177502  
    890890        case GestureRecognizerState::Began:
    891891            range = wordRangeFromPosition(position);
    892             m_currentWordRange = range ? Range::create(*frame.document(), range->startPosition(), range->endPosition()) : nullptr;
     892            m_currentWordRange = range ? RefPtr<Range>(Range::create(*frame.document(), range->startPosition(), range->endPosition())) : nullptr;
    893893            break;
    894894        case GestureRecognizerState::Changed:
     
    15341534    VisiblePosition startPosition = positionOfNextBoundaryOfGranularity(position, WordGranularity, DirectionBackward);
    15351535    if (startPosition.isNotNull() && startPosition != position)
    1536         frame.selection().setSelectedRange(Range::create(*frame.document(), startPosition, position).get(), position.affinity(), true);
     1536        frame.selection().setSelectedRange(Range::create(*frame.document(), startPosition, position).ptr(), position.affinity(), true);
    15371537}
    15381538
     
    15521552    }
    15531553    if (position.isNotNull() && startPosition != position)
    1554         frame.selection().setSelectedRange(Range::create(*frame.document(), position, position).get(), position.affinity(), true);
     1554        frame.selection().setSelectedRange(Range::create(*frame.document(), position, position).ptr(), position.affinity(), true);
    15551555    send(Messages::WebPageProxy::VoidCallback(callbackID));
    15561556}
     
    15691569   
    15701570    if (position.isNotNull())
    1571         frame.selection().setSelectedRange(Range::create(*frame.document(), position, position).get(), position.affinity(), true);
     1571        frame.selection().setSelectedRange(Range::create(*frame.document(), position, position).ptr(), position.affinity(), true);
    15721572    send(Messages::WebPageProxy::VoidCallback(callbackID));
    15731573}
     
    15811581        position = positionOfNextBoundaryOfGranularity(position, static_cast<WebCore::TextGranularity>(granularity), static_cast<SelectionDirection>(direction));
    15821582        if (position.isNotNull())
    1583             frame.selection().setSelectedRange(Range::create(*frame.document(), position, position).get(), UPSTREAM, true);
     1583            frame.selection().setSelectedRange(Range::create(*frame.document(), position, position).ptr(), UPSTREAM, true);
    15841584    }
    15851585    send(Messages::WebPageProxy::VoidCallback(callbackID));
     
    16921692        }
    16931693        if (lastPosition.isNotNull() && lastPosition != startPosition)
    1694             contextBefore = plainTextReplacingNoBreakSpace(Range::create(*frame.document(), lastPosition, startPosition).get());
     1694            contextBefore = plainTextReplacingNoBreakSpace(Range::create(*frame.document(), lastPosition, startPosition).ptr());
    16951695    }
    16961696
     
    17061706        }
    17071707        if (lastPosition.isNotNull() && lastPosition != endPosition)
    1708             contextAfter = plainTextReplacingNoBreakSpace(Range::create(*frame.document(), endPosition, lastPosition).get());
     1708            contextAfter = plainTextReplacingNoBreakSpace(Range::create(*frame.document(), endPosition, lastPosition).ptr());
    17091709    }
    17101710
     
    19061906                if (previousPosition.isNull())
    19071907                    break;
    1908                 String currentWord = plainTextReplacingNoBreakSpace(Range::create(*frame.document(), previousPosition, currentPosition).get());
     1908                String currentWord = plainTextReplacingNoBreakSpace(Range::create(*frame.document(), previousPosition, currentPosition).ptr());
    19091909                totalContextLength += currentWord.length();
    19101910                if (totalContextLength >= maxContextLength)
     
    19131913            }
    19141914            if (currentPosition.isNotNull() && currentPosition != startPosition) {
    1915                 contextBefore = plainTextReplacingNoBreakSpace(Range::create(*frame.document(), currentPosition, startPosition).get());
     1915                contextBefore = plainTextReplacingNoBreakSpace(Range::create(*frame.document(), currentPosition, startPosition).ptr());
    19161916                if (atBoundaryOfGranularity(currentPosition, ParagraphGranularity, DirectionBackward))
    19171917                    contextBefore = ASCIILiteral("\n ") + contextBefore;
     
    19241924                nextPosition = positionOfNextBoundaryOfGranularity(endPosition, WordGranularity, DirectionForward);
    19251925            if (nextPosition.isNotNull())
    1926                 contextAfter = plainTextReplacingNoBreakSpace(Range::create(*frame.document(), endPosition, nextPosition).get());
     1926                contextAfter = plainTextReplacingNoBreakSpace(Range::create(*frame.document(), endPosition, nextPosition).ptr());
    19271927        }
    19281928    }
Note: See TracChangeset for help on using the changeset viewer.