<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[183158] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/183158">183158</a></dd>
<dt>Author</dt> <dd>bfulgham@apple.com</dd>
<dt>Date</dt> <dd>2015-04-22 19:14:45 -0700 (Wed, 22 Apr 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>VisibleSelection should only accept Range by reference
https://bugs.webkit.org/show_bug.cgi?id=144047
Reviewed by Tim Horton.
Source/WebCore:
Update VisibleSelection to expect a Range reference argument, rather than a
Range*. Also update all uses of VisibleSelection to pass a reference instead
of a pointer.
No change in behavior, so new tests.
* editing/Editor.cpp:
(WebCore::Editor::selectionForCommand):
(WebCore::Editor::advanceToNextMisspelling):
(WebCore::Editor::markMisspellingsAfterTypingToWord):
(WebCore::Editor::markAndReplaceFor):
(WebCore::Editor::transpose):
(WebCore::Editor::findString):
(WebCore::Editor::rangeOfString):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::setSelectedRange):
* editing/SpellingCorrectionCommand.cpp:
(WebCore::SpellingCorrectionCommand::SpellingCorrectionCommand):
* editing/VisibleSelection.cpp:
(WebCore::VisibleSelection::VisibleSelection):
* editing/VisibleSelection.h:
* editing/mac/EditorMac.mm:
(WebCore::Editor::replaceNodeFromPasteboard):
* page/DragController.cpp:
(WebCore::selectElement):
* page/TextIndicator.cpp:
(WebCore::TextIndicator::createWithRange):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::selectClosestWordFromHitTestResultBasedOnLookup):
* rendering/SelectionSubtreeRoot.cpp:
(WebCore::SelectionSubtreeRoot::adjustForVisibleSelection):
Source/WebKit/mac:
Update all uses of VisibleSelection to pass a Range reference instead
of a Range pointer.
* WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::imageForCurrentSharingServicePickerItem):
* WebView/WebFrame.mm:
(-[WebFrame _selectNSRange:]):
Source/WebKit2:
Update all uses of VisibleSelection to pass a Range reference instead
of a Range pointer.
* WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
(WebKit::InjectedBundleRangeHandle::renderedImage):
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::getImageForFindMatch):
(WebKit::FindController::selectFindMatch):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::insertTextAsync):
(WebKit::WebPage::setCompositionAsync):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::insertDictatedTextAsync):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityiosWebAccessibilityObjectWrapperIOSmm">trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm</a></li>
<li><a href="#trunkSourceWebCoreeditingEditorcpp">trunk/Source/WebCore/editing/Editor.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingFrameSelectioncpp">trunk/Source/WebCore/editing/FrameSelection.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingSpellingCorrectionCommandcpp">trunk/Source/WebCore/editing/SpellingCorrectionCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingVisibleSelectioncpp">trunk/Source/WebCore/editing/VisibleSelection.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingVisibleSelectionh">trunk/Source/WebCore/editing/VisibleSelection.h</a></li>
<li><a href="#trunkSourceWebCoreeditingmacEditorMacmm">trunk/Source/WebCore/editing/mac/EditorMac.mm</a></li>
<li><a href="#trunkSourceWebCorepageDragControllercpp">trunk/Source/WebCore/page/DragController.cpp</a></li>
<li><a href="#trunkSourceWebCorepageTextIndicatorcpp">trunk/Source/WebCore/page/TextIndicator.cpp</a></li>
<li><a href="#trunkSourceWebCorepagemacEventHandlerMacmm">trunk/Source/WebCore/page/mac/EventHandlerMac.mm</a></li>
<li><a href="#trunkSourceWebCorerenderingSelectionSubtreeRootcpp">trunk/Source/WebCore/rendering/SelectionSubtreeRoot.cpp</a></li>
<li><a href="#trunkSourceWebKitiosWebCoreSupportWebFrameIOSmm">trunk/Source/WebKit/ios/WebCoreSupport/WebFrameIOS.mm</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebContextMenuClientmm">trunk/Source/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebFramemm">trunk/Source/WebKit/mac/WebView/WebFrame.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleDOMInjectedBundleRangeHandlecpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageFindControllercpp">trunk/Source/WebKit2/WebProcess/WebPage/FindController.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacWebPageMacmm">trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (183157 => 183158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-04-23 02:12:44 UTC (rev 183157)
+++ trunk/Source/WebCore/ChangeLog        2015-04-23 02:14:45 UTC (rev 183158)
</span><span class="lines">@@ -1,3 +1,42 @@
</span><ins>+2015-04-22 Brent Fulgham <bfulgham@apple.com>
+
+ VisibleSelection should only accept Range by reference
+ https://bugs.webkit.org/show_bug.cgi?id=144047
+
+ Reviewed by Tim Horton.
+
+ Update VisibleSelection to expect a Range reference argument, rather than a
+ Range*. Also update all uses of VisibleSelection to pass a reference instead
+ of a pointer.
+
+ No change in behavior, so new tests.
+
+ * editing/Editor.cpp:
+ (WebCore::Editor::selectionForCommand):
+ (WebCore::Editor::advanceToNextMisspelling):
+ (WebCore::Editor::markMisspellingsAfterTypingToWord):
+ (WebCore::Editor::markAndReplaceFor):
+ (WebCore::Editor::transpose):
+ (WebCore::Editor::findString):
+ (WebCore::Editor::rangeOfString):
+ * editing/FrameSelection.cpp:
+ (WebCore::FrameSelection::setSelectedRange):
+ * editing/SpellingCorrectionCommand.cpp:
+ (WebCore::SpellingCorrectionCommand::SpellingCorrectionCommand):
+ * editing/VisibleSelection.cpp:
+ (WebCore::VisibleSelection::VisibleSelection):
+ * editing/VisibleSelection.h:
+ * editing/mac/EditorMac.mm:
+ (WebCore::Editor::replaceNodeFromPasteboard):
+ * page/DragController.cpp:
+ (WebCore::selectElement):
+ * page/TextIndicator.cpp:
+ (WebCore::TextIndicator::createWithRange):
+ * page/mac/EventHandlerMac.mm:
+ (WebCore::EventHandler::selectClosestWordFromHitTestResultBasedOnLookup):
+ * rendering/SelectionSubtreeRoot.cpp:
+ (WebCore::SelectionSubtreeRoot::adjustForVisibleSelection):
+
</ins><span class="cx"> 2015-04-22 Roger Fong <roger_fong@apple.com>
</span><span class="cx">
</span><span class="cx"> Audio controls should render with a black background.
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityiosWebAccessibilityObjectWrapperIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (183157 => 183158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm        2015-04-23 02:12:44 UTC (rev 183157)
+++ trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm        2015-04-23 02:14:45 UTC (rev 183158)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2008, Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2008, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -2029,7 +2029,7 @@
</span><span class="cx"> if (!range)
</span><span class="cx"> return nil;
</span><span class="cx">
</span><del>- VisibleSelection selection = VisibleSelection(range.get(), DOWNSTREAM);
</del><ins>+ VisibleSelection selection = VisibleSelection(*range, DOWNSTREAM);
</ins><span class="cx">
</span><span class="cx"> VisiblePosition visiblePosition = selection.visibleStart();
</span><span class="cx"> return [WebAccessibilityTextMarker textMarkerWithVisiblePosition:visiblePosition cache:m_object->axObjectCache()];
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/Editor.cpp (183157 => 183158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/Editor.cpp        2015-04-23 02:12:44 UTC (rev 183157)
+++ trunk/Source/WebCore/editing/Editor.cpp        2015-04-23 02:14:45 UTC (rev 183158)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2006, 2007, 2008, 2011, 2013, 2014 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2006, 2007, 2008, 2011, 2013-2015 Apple Inc. All rights reserved.
</ins><span class="cx"> * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
</span><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="lines">@@ -157,7 +157,7 @@
</span><span class="cx"> HTMLTextFormControlElement* textFromControlOfTarget = is<HTMLTextFormControlElement>(*event->target()->toNode()) ? downcast<HTMLTextFormControlElement>(event->target()->toNode()) : nullptr;
</span><span class="cx"> if (textFromControlOfTarget && (selection.start().isNull() || textFromControlOfTarget != textFormControlOfSelectionStart)) {
</span><span class="cx"> if (RefPtr<Range> range = textFromControlOfTarget->selection())
</span><del>- return VisibleSelection(range.get(), DOWNSTREAM, selection.isDirectional());
</del><ins>+ return VisibleSelection(*range, DOWNSTREAM, selection.isDirectional());
</ins><span class="cx"> }
</span><span class="cx"> return selection;
</span><span class="cx"> }
</span><span class="lines">@@ -2000,7 +2000,7 @@
</span><span class="cx">
</span><span class="cx"> // FIXME 4859190: This gets confused with doubled punctuation at the end of a paragraph
</span><span class="cx"> RefPtr<Range> badGrammarRange = TextIterator::subrange(grammarSearchRange.get(), grammarPhraseOffset + grammarDetail.location, grammarDetail.length);
</span><del>- m_frame.selection().setSelection(VisibleSelection(badGrammarRange.get(), SEL_DEFAULT_AFFINITY));
</del><ins>+ m_frame.selection().setSelection(VisibleSelection(*badGrammarRange, SEL_DEFAULT_AFFINITY));
</ins><span class="cx"> m_frame.selection().revealSelection();
</span><span class="cx">
</span><span class="cx"> client()->updateSpellingUIWithGrammarString(badGrammarPhrase, grammarDetail);
</span><span class="lines">@@ -2012,7 +2012,7 @@
</span><span class="cx"> // a marker so we draw the red squiggle later.
</span><span class="cx">
</span><span class="cx"> RefPtr<Range> misspellingRange = TextIterator::subrange(spellingSearchRange.get(), misspellingOffset, misspelledWord.length());
</span><del>- m_frame.selection().setSelection(VisibleSelection(misspellingRange.get(), DOWNSTREAM));
</del><ins>+ m_frame.selection().setSelection(VisibleSelection(*misspellingRange, DOWNSTREAM));
</ins><span class="cx"> m_frame.selection().revealSelection();
</span><span class="cx">
</span><span class="cx"> client()->updateSpellingUIWithMisspelledWord(misspelledWord);
</span><span class="lines">@@ -2229,7 +2229,7 @@
</span><span class="cx">
</span><span class="cx"> // If autocorrected word is non empty, replace the misspelled word by this word.
</span><span class="cx"> if (!autocorrectedString.isEmpty()) {
</span><del>- VisibleSelection newSelection(misspellingRange.get(), DOWNSTREAM);
</del><ins>+ VisibleSelection newSelection(*misspellingRange, DOWNSTREAM);
</ins><span class="cx"> if (newSelection != m_frame.selection().selection()) {
</span><span class="cx"> if (!m_frame.selection().shouldChangeSelection(newSelection))
</span><span class="cx"> return;
</span><span class="lines">@@ -2517,7 +2517,7 @@
</span><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- VisibleSelection selectionToReplace(rangeToReplace.get(), DOWNSTREAM);
</del><ins>+ VisibleSelection selectionToReplace(*rangeToReplace, DOWNSTREAM);
</ins><span class="cx"> if (selectionToReplace != m_frame.selection().selection()) {
</span><span class="cx"> if (!m_frame.selection().shouldChangeSelection(selectionToReplace))
</span><span class="cx"> continue;
</span><span class="lines">@@ -2800,7 +2800,7 @@
</span><span class="cx"> RefPtr<Range> range = makeRange(previous, next);
</span><span class="cx"> if (!range)
</span><span class="cx"> return;
</span><del>- VisibleSelection newSelection(range.get(), DOWNSTREAM);
</del><ins>+ VisibleSelection newSelection(*range, DOWNSTREAM);
</ins><span class="cx">
</span><span class="cx"> // Transpose the two characters.
</span><span class="cx"> String text = plainText(range.get());
</span><span class="lines">@@ -3049,7 +3049,7 @@
</span><span class="cx"> if (!resultRange)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- m_frame.selection().setSelection(VisibleSelection(resultRange.get(), DOWNSTREAM));
</del><ins>+ m_frame.selection().setSelection(VisibleSelection(*resultRange, DOWNSTREAM));
</ins><span class="cx">
</span><span class="cx"> if (!(options & DoNotRevealSelection))
</span><span class="cx"> m_frame.selection().revealSelection();
</span><span class="lines">@@ -3099,7 +3099,7 @@
</span><span class="cx"> // If we started in the reference range and the found range exactly matches the reference range, find again.
</span><span class="cx"> // Build a selection with the found range to remove collapsed whitespace.
</span><span class="cx"> // Compare ranges instead of selection objects to ignore the way that the current selection was made.
</span><del>- if (startInReferenceRange && areRangesEqual(VisibleSelection(resultRange.get()).toNormalizedRange().get(), referenceRange)) {
</del><ins>+ if (startInReferenceRange && areRangesEqual(VisibleSelection(*resultRange).toNormalizedRange().get(), referenceRange)) {
</ins><span class="cx"> searchRange = rangeOfContents(document());
</span><span class="cx"> if (forward)
</span><span class="cx"> searchRange->setStart(referenceRange->endPosition());
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingFrameSelectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/FrameSelection.cpp (183157 => 183158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/FrameSelection.cpp        2015-04-23 02:12:44 UTC (rev 183157)
+++ trunk/Source/WebCore/editing/FrameSelection.cpp        2015-04-23 02:14:45 UTC (rev 183158)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2004, 2008, 2009, 2010, 2014 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2004, 2008, 2009, 2010, 2014-2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -1720,7 +1720,7 @@
</span><span class="cx"> return false;
</span><span class="cx"> ASSERT(&range->startContainer()->document() == &range->endContainer()->document());
</span><span class="cx">
</span><del>- VisibleSelection newSelection(range, affinity);
</del><ins>+ VisibleSelection newSelection(*range, affinity);
</ins><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> // FIXME: Why do we need this check only in iOS?
</span><span class="lines">@@ -2169,7 +2169,7 @@
</span><span class="cx"> RefPtr<Range> range = elementRangeContainingCaretSelection();
</span><span class="cx"> if (!range)
</span><span class="cx"> return;
</span><del>- VisibleSelection selection(range.get(), DOWNSTREAM);
</del><ins>+ VisibleSelection selection(*range, DOWNSTREAM);
</ins><span class="cx"> setSelection(selection);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2387,7 +2387,7 @@
</span><span class="cx"> ASSERT(!ec);
</span><span class="cx"> resultRange->setEnd(node, location + length, ec);
</span><span class="cx"> ASSERT(!ec);
</span><del>- VisibleSelection selection = VisibleSelection(resultRange.get(), SEL_DEFAULT_AFFINITY);
</del><ins>+ VisibleSelection selection = VisibleSelection(*resultRange, SEL_DEFAULT_AFFINITY);
</ins><span class="cx"> setSelection(selection, true);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingSpellingCorrectionCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/SpellingCorrectionCommand.cpp (183157 => 183158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/SpellingCorrectionCommand.cpp        2015-04-23 02:12:44 UTC (rev 183157)
+++ trunk/Source/WebCore/editing/SpellingCorrectionCommand.cpp        2015-04-23 02:14:45 UTC (rev 183158)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2011 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2011, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx"> SpellingCorrectionCommand::SpellingCorrectionCommand(PassRefPtr<Range> rangeToBeCorrected, const String& correction)
</span><span class="cx"> : CompositeEditCommand(rangeToBeCorrected->startContainer()->document())
</span><span class="cx"> , m_rangeToBeCorrected(rangeToBeCorrected)
</span><del>- , m_selectionToBeCorrected(m_rangeToBeCorrected.get())
</del><ins>+ , m_selectionToBeCorrected(*m_rangeToBeCorrected)
</ins><span class="cx"> , m_correction(correction)
</span><span class="cx"> {
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingVisibleSelectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/VisibleSelection.cpp (183157 => 183158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/VisibleSelection.cpp        2015-04-23 02:12:44 UTC (rev 183157)
+++ trunk/Source/WebCore/editing/VisibleSelection.cpp        2015-04-23 02:14:45 UTC (rev 183158)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2004, 2005, 2006 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2004, 2005, 2006, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -84,9 +84,9 @@
</span><span class="cx"> validate();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-VisibleSelection::VisibleSelection(const Range* range, EAffinity affinity, bool isDirectional)
- : m_base(range->startPosition())
- , m_extent(range->endPosition())
</del><ins>+VisibleSelection::VisibleSelection(const Range& range, EAffinity affinity, bool isDirectional)
+ : m_base(range.startPosition())
+ , m_extent(range.endPosition())
</ins><span class="cx"> , m_affinity(affinity)
</span><span class="cx"> , m_isDirectional(isDirectional)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingVisibleSelectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/VisibleSelection.h (183157 => 183158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/VisibleSelection.h        2015-04-23 02:12:44 UTC (rev 183157)
+++ trunk/Source/WebCore/editing/VisibleSelection.h        2015-04-23 02:14:45 UTC (rev 183158)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2004 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2004, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> VisibleSelection(const Position&, EAffinity, bool isDirectional = false);
</span><span class="cx"> VisibleSelection(const Position&, const Position&, EAffinity = SEL_DEFAULT_AFFINITY, bool isDirectional = false);
</span><span class="cx">
</span><del>- WEBCORE_EXPORT VisibleSelection(const Range*, EAffinity = SEL_DEFAULT_AFFINITY, bool isDirectional = false);
</del><ins>+ WEBCORE_EXPORT VisibleSelection(const Range&, EAffinity = SEL_DEFAULT_AFFINITY, bool isDirectional = false);
</ins><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT VisibleSelection(const VisiblePosition&, bool isDirectional = false);
</span><span class="cx"> WEBCORE_EXPORT VisibleSelection(const VisiblePosition&, const VisiblePosition&, bool isDirectional = false);
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingmacEditorMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/mac/EditorMac.mm (183157 => 183158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/mac/EditorMac.mm        2015-04-23 02:12:44 UTC (rev 183157)
+++ trunk/Source/WebCore/editing/mac/EditorMac.mm        2015-04-23 02:14:45 UTC (rev 183158)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2006, 2007, 2008, 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2006, 2007, 2008, 2013, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -273,7 +273,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> RefPtr<Range> range = Range::create(node->document(), Position(node, Position::PositionIsBeforeAnchor), Position(node, Position::PositionIsAfterAnchor));
</span><del>- m_frame.selection().setSelection(VisibleSelection(range.get()), FrameSelection::DoNotSetFocus);
</del><ins>+ m_frame.selection().setSelection(VisibleSelection(*range), FrameSelection::DoNotSetFocus);
</ins><span class="cx">
</span><span class="cx"> Pasteboard pasteboard(pasteboardName);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepageDragControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DragController.cpp (183157 => 183158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DragController.cpp        2015-04-23 02:12:44 UTC (rev 183157)
+++ trunk/Source/WebCore/page/DragController.cpp        2015-04-23 02:14:45 UTC (rev 183158)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2007, 2009, 2010, 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2007, 2009, 2010, 2013, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -706,7 +706,7 @@
</span><span class="cx"> {
</span><span class="cx"> RefPtr<Range> range = element.document().createRange();
</span><span class="cx"> range->selectNode(&element);
</span><del>- element.document().frame()->selection().setSelection(VisibleSelection(range.get(), DOWNSTREAM));
</del><ins>+ element.document().frame()->selection().setSelection(VisibleSelection(*range, DOWNSTREAM));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static IntPoint dragLocForDHTMLDrag(const IntPoint& mouseDraggedPoint, const IntPoint& dragOrigin, const IntPoint& dragImageOffset, bool isLinkImage)
</span></span></pre></div>
<a id="trunkSourceWebCorepageTextIndicatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/TextIndicator.cpp (183157 => 183158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/TextIndicator.cpp        2015-04-23 02:12:44 UTC (rev 183157)
+++ trunk/Source/WebCore/page/TextIndicator.cpp        2015-04-23 02:14:45 UTC (rev 183158)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2010, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -98,7 +98,7 @@
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> VisibleSelection oldSelection = frame->selection().selection();
</span><del>- frame->selection().setSelection(&range);
</del><ins>+ frame->selection().setSelection(range);
</ins><span class="cx">
</span><span class="cx"> RefPtr<TextIndicator> indicator = TextIndicator::createWithSelectionInFrame(*frame, presentationTransition);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepagemacEventHandlerMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/mac/EventHandlerMac.mm (183157 => 183158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/mac/EventHandlerMac.mm        2015-04-23 02:12:44 UTC (rev 183157)
+++ trunk/Source/WebCore/page/mac/EventHandlerMac.mm        2015-04-23 02:14:45 UTC (rev 183158)
</span><span class="lines">@@ -1017,7 +1017,7 @@
</span><span class="cx">
</span><span class="cx"> NSDictionary *options = nil;
</span><span class="cx"> if (RefPtr<Range> range = rangeForDictionaryLookupAtHitTestResult(result, &options))
</span><del>- return VisibleSelection(range.get());
</del><ins>+ return VisibleSelection(*range);
</ins><span class="cx">
</span><span class="cx"> return VisibleSelection();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingSelectionSubtreeRootcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/SelectionSubtreeRoot.cpp (183157 => 183158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/SelectionSubtreeRoot.cpp        2015-04-23 02:12:44 UTC (rev 183157)
+++ trunk/Source/WebCore/rendering/SelectionSubtreeRoot.cpp        2015-04-23 02:14:45 UTC (rev 183158)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx"> * Copyright (C) 2014 Igalia S.L.
</span><ins>+ * Copyright (C) 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -56,7 +57,7 @@
</span><span class="cx"> Position endPosition = createLegacyEditingPosition(m_selectionSubtreeData.selectionEnd()->node(), m_selectionSubtreeData.selectionEndPos());
</span><span class="cx">
</span><span class="cx"> RefPtr<Range> range = Range::create(document, startPosition.parentAnchoredEquivalent(), endPosition.parentAnchoredEquivalent());
</span><del>- VisibleSelection selection(range.get());
</del><ins>+ VisibleSelection selection(*range);
</ins><span class="cx"> Position startPos = selection.start();
</span><span class="cx"> Position candidate = startPos.downstream();
</span><span class="cx"> if (candidate.isCandidate())
</span></span></pre></div>
<a id="trunkSourceWebKitiosWebCoreSupportWebFrameIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ios/WebCoreSupport/WebFrameIOS.mm (183157 => 183158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ios/WebCoreSupport/WebFrameIOS.mm        2015-04-23 02:12:44 UTC (rev 183157)
+++ trunk/Source/WebKit/ios/WebCoreSupport/WebFrameIOS.mm        2015-04-23 02:14:45 UTC (rev 183158)
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx"> {
</span><span class="cx"> Frame *frame = [self coreFrame];
</span><span class="cx"> Range *markedTextRange = frame->editor().compositionRange().get();
</span><del>- VisibleSelection markedTextRangeSelection = VisibleSelection(markedTextRange);
</del><ins>+ VisibleSelection markedTextRangeSelection = markedTextRange ? VisibleSelection(*markedTextRange) : VisibleSelection();
</ins><span class="cx">
</span><span class="cx"> IntRect result;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (183157 => 183158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2015-04-23 02:12:44 UTC (rev 183157)
+++ trunk/Source/WebKit/mac/ChangeLog        2015-04-23 02:14:45 UTC (rev 183158)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2015-04-22 Brent Fulgham <bfulgham@apple.com>
+
+ VisibleSelection should only accept Range by reference
+ https://bugs.webkit.org/show_bug.cgi?id=144047
+
+ Reviewed by Tim Horton.
+
+ Update all uses of VisibleSelection to pass a Range reference instead
+ of a Range pointer.
+
+ * WebCoreSupport/WebContextMenuClient.mm:
+ (WebContextMenuClient::imageForCurrentSharingServicePickerItem):
+ * WebView/WebFrame.mm:
+ (-[WebFrame _selectNSRange:]):
+
</ins><span class="cx"> 2015-04-22 Eric Carlson <eric.carlson@apple.com>
</span><span class="cx">
</span><span class="cx"> [Mac] Device picker menu is positioned incorrectly in WK1
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebContextMenuClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm (183157 => 183158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm        2015-04-23 02:12:44 UTC (rev 183157)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm        2015-04-23 02:14:45 UTC (rev 183158)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2006, 2007, 2008, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -471,7 +471,7 @@
</span><span class="cx">
</span><span class="cx"> VisibleSelection oldSelection = frameView->frame().selection().selection();
</span><span class="cx"> RefPtr<Range> range = Range::create(node->document(), Position(node, Position::PositionIsBeforeAnchor), Position(node, Position::PositionIsAfterAnchor));
</span><del>- frameView->frame().selection().setSelection(VisibleSelection(range.get()), FrameSelection::DoNotSetFocus);
</del><ins>+ frameView->frame().selection().setSelection(VisibleSelection(*range), FrameSelection::DoNotSetFocus);
</ins><span class="cx">
</span><span class="cx"> PaintBehavior oldPaintBehavior = frameView->paintBehavior();
</span><span class="cx"> frameView->setPaintBehavior(PaintBehaviorSelectionOnly);
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebFramemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebFrame.mm (183157 => 183158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebFrame.mm        2015-04-23 02:12:44 UTC (rev 183157)
+++ trunk/Source/WebKit/mac/WebView/WebFrame.mm        2015-04-23 02:14:45 UTC (rev 183158)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2005, 2006, 2007, 2008, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -1154,7 +1154,7 @@
</span><span class="cx"> {
</span><span class="cx"> RefPtr<Range> domRange = [self _convertToDOMRange:range];
</span><span class="cx"> if (domRange)
</span><del>- _private->coreFrame->selection().setSelection(VisibleSelection(domRange.get(), SEL_DEFAULT_AFFINITY));
</del><ins>+ _private->coreFrame->selection().setSelection(VisibleSelection(*domRange, SEL_DEFAULT_AFFINITY));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (BOOL)_isDisplayingStandaloneImage
</span><span class="lines">@@ -1245,7 +1245,7 @@
</span><span class="cx"> {
</span><span class="cx"> RefPtr<Range> domRange = [self _convertToDOMRange:range];
</span><span class="cx"> if (domRange) {
</span><del>- const VisibleSelection& newSelection = VisibleSelection(domRange.get(), SEL_DEFAULT_AFFINITY);
</del><ins>+ const VisibleSelection& newSelection = VisibleSelection(*domRange, SEL_DEFAULT_AFFINITY);
</ins><span class="cx"> _private->coreFrame->selection().setSelection(newSelection, 0);
</span><span class="cx">
</span><span class="cx"> _private->coreFrame->editor().ensureLastEditCommandHasCurrentSelectionIfOpenForMoreTyping();
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (183157 => 183158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-04-23 02:12:44 UTC (rev 183157)
+++ trunk/Source/WebKit2/ChangeLog        2015-04-23 02:14:45 UTC (rev 183158)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2015-04-22 Brent Fulgham <bfulgham@apple.com>
+
+ VisibleSelection should only accept Range by reference
+ https://bugs.webkit.org/show_bug.cgi?id=144047
+
+ Reviewed by Tim Horton.
+
+ Update all uses of VisibleSelection to pass a Range reference instead
+ of a Range pointer.
+
+ * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
+ (WebKit::InjectedBundleRangeHandle::renderedImage):
+ * WebProcess/WebPage/FindController.cpp:
+ (WebKit::FindController::getImageForFindMatch):
+ (WebKit::FindController::selectFindMatch):
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::insertTextAsync):
+ (WebKit::WebPage::setCompositionAsync):
+ * WebProcess/WebPage/mac/WebPageMac.mm:
+ (WebKit::WebPage::insertDictatedTextAsync):
+
</ins><span class="cx"> 2015-04-22 Anders Carlsson <andersca@apple.com>
</span><span class="cx">
</span><span class="cx"> Add WK_ARRAY and WK_SET annotations
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleDOMInjectedBundleRangeHandlecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp (183157 => 183158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp        2015-04-23 02:12:44 UTC (rev 183157)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp        2015-04-23 02:14:45 UTC (rev 183158)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2010, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -114,7 +114,7 @@
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> VisibleSelection oldSelection = frame->selection().selection();
</span><del>- frame->selection().setSelection(VisibleSelection(m_range.get()));
</del><ins>+ frame->selection().setSelection(VisibleSelection(*m_range));
</ins><span class="cx">
</span><span class="cx"> float scaleFactor = (options & SnapshotOptionsExcludeDeviceScaleFactor) ? 1 : frame->page()->deviceScaleFactor();
</span><span class="cx"> IntRect paintRect = enclosingIntRect(m_range->boundingRect());
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageFindControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/FindController.cpp (183157 => 183158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/FindController.cpp        2015-04-23 02:12:44 UTC (rev 183157)
+++ trunk/Source/WebKit2/WebProcess/WebPage/FindController.cpp        2015-04-23 02:14:45 UTC (rev 183158)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2010, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -270,7 +270,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> VisibleSelection oldSelection = frame->selection().selection();
</span><del>- frame->selection().setSelection(VisibleSelection(m_findMatches[matchIndex].get()));
</del><ins>+ frame->selection().setSelection(VisibleSelection(*m_findMatches[matchIndex]));
</ins><span class="cx">
</span><span class="cx"> RefPtr<ShareableBitmap> selectionSnapshot = WebFrame::fromCoreFrame(*frame)->createSelectionSnapshot();
</span><span class="cx">
</span><span class="lines">@@ -295,7 +295,7 @@
</span><span class="cx"> Frame* frame = m_findMatches[matchIndex]->startContainer()->document().frame();
</span><span class="cx"> if (!frame)
</span><span class="cx"> return;
</span><del>- frame->selection().setSelection(VisibleSelection(m_findMatches[matchIndex].get()));
</del><ins>+ frame->selection().setSelection(VisibleSelection(*m_findMatches[matchIndex]));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void FindController::hideFindUI()
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (183157 => 183158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-04-23 02:12:44 UTC (rev 183157)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-04-23 02:14:45 UTC (rev 183158)
</span><span class="lines">@@ -4211,7 +4211,7 @@
</span><span class="cx"> if (replacementEditingRange.location != notFound) {
</span><span class="cx"> RefPtr<Range> replacementRange = rangeFromEditingRange(frame, replacementEditingRange);
</span><span class="cx"> if (replacementRange)
</span><del>- frame.selection().setSelection(VisibleSelection(replacementRange.get(), SEL_DEFAULT_AFFINITY));
</del><ins>+ frame.selection().setSelection(VisibleSelection(*replacementRange, SEL_DEFAULT_AFFINITY));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (registerUndoGroup)
</span><span class="lines">@@ -4301,7 +4301,8 @@
</span><span class="cx"> RefPtr<Range> replacementRange;
</span><span class="cx"> if (replacementEditingRange.location != notFound) {
</span><span class="cx"> replacementRange = rangeFromEditingRange(frame, replacementEditingRange);
</span><del>- frame.selection().setSelection(VisibleSelection(replacementRange.get(), SEL_DEFAULT_AFFINITY));
</del><ins>+ if (replacementRange)
+ frame.selection().setSelection(VisibleSelection(*replacementRange, SEL_DEFAULT_AFFINITY));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> frame.editor().setComposition(text, underlines, selection.location, selection.location + selection.length);
</span><span class="lines">@@ -4359,7 +4360,7 @@
</span><span class="cx"> ASSERT_WITH_MESSAGE(selectionRange, "Invalid selection: [%lld:%lld] in text of length %d", static_cast<long long>(selectionStart), static_cast<long long>(selectionLength), scope->innerText().length());
</span><span class="cx">
</span><span class="cx"> if (selectionRange) {
</span><del>- VisibleSelection selection(selectionRange.get(), SEL_DEFAULT_AFFINITY);
</del><ins>+ VisibleSelection selection(*selectionRange, SEL_DEFAULT_AFFINITY);
</ins><span class="cx"> targetFrame->selection().setSelection(selection);
</span><span class="cx"> }
</span><span class="cx"> send(Messages::WebPageProxy::EditorStateChanged(editorState()));
</span><span class="lines">@@ -4380,7 +4381,7 @@
</span><span class="cx"> Element* scope = targetFrame->selection().selection().rootEditableElement();
</span><span class="cx"> RefPtr<Range> replacementRange = TextIterator::rangeFromLocationAndLength(scope, replacementStart, replacementLength);
</span><span class="cx"> targetFrame->editor().setIgnoreCompositionSelectionChange(true);
</span><del>- targetFrame->selection().setSelection(VisibleSelection(replacementRange.get(), SEL_DEFAULT_AFFINITY));
</del><ins>+ targetFrame->selection().setSelection(VisibleSelection(*replacementRange, SEL_DEFAULT_AFFINITY));
</ins><span class="cx"> targetFrame->editor().setIgnoreCompositionSelectionChange(false);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacWebPageMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm (183157 => 183158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm        2015-04-23 02:12:44 UTC (rev 183157)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm        2015-04-23 02:14:45 UTC (rev 183158)
</span><span class="lines">@@ -284,7 +284,8 @@
</span><span class="cx"> RefPtr<Range> replacementRange;
</span><span class="cx"> if (replacementEditingRange.location != notFound) {
</span><span class="cx"> replacementRange = rangeFromEditingRange(frame, replacementEditingRange);
</span><del>- frame.selection().setSelection(VisibleSelection(replacementRange.get(), SEL_DEFAULT_AFFINITY));
</del><ins>+ if (replacementRange)
+ frame.selection().setSelection(VisibleSelection(*replacementRange, SEL_DEFAULT_AFFINITY));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> frame.editor().setComposition(text, underlines, selectionRange.location, selectionRange.location + selectionRange.length);
</span><span class="lines">@@ -307,7 +308,7 @@
</span><span class="cx"> if (replacementEditingRange.location != notFound) {
</span><span class="cx"> RefPtr<Range> replacementRange = rangeFromEditingRange(frame, replacementEditingRange);
</span><span class="cx"> if (replacementRange)
</span><del>- frame.selection().setSelection(VisibleSelection(replacementRange.get(), SEL_DEFAULT_AFFINITY));
</del><ins>+ frame.selection().setSelection(VisibleSelection(*replacementRange, SEL_DEFAULT_AFFINITY));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!frame.editor().hasComposition()) {
</span><span class="lines">@@ -329,7 +330,7 @@
</span><span class="cx"> if (replacementEditingRange.location != notFound) {
</span><span class="cx"> RefPtr<Range> replacementRange = rangeFromEditingRange(frame, replacementEditingRange);
</span><span class="cx"> if (replacementRange)
</span><del>- frame.selection().setSelection(VisibleSelection(replacementRange.get(), SEL_DEFAULT_AFFINITY));
</del><ins>+ frame.selection().setSelection(VisibleSelection(*replacementRange, SEL_DEFAULT_AFFINITY));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ASSERT(!frame.editor().hasComposition());
</span><span class="lines">@@ -444,7 +445,7 @@
</span><span class="cx"> if (replacementEditingRange.location != notFound) {
</span><span class="cx"> RefPtr<Range> replacementRange = rangeFromEditingRange(frame, replacementEditingRange);
</span><span class="cx"> if (replacementRange)
</span><del>- frame.selection().setSelection(VisibleSelection(replacementRange.get(), SEL_DEFAULT_AFFINITY));
</del><ins>+ frame.selection().setSelection(VisibleSelection(*replacementRange, SEL_DEFAULT_AFFINITY));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (registerUndoGroup)
</span></span></pre>
</div>
</div>
</body>
</html>