Title: [117483] trunk/Source/WebKit/blackberry
- Revision
- 117483
- Author
- mifen...@rim.com
- Date
- 2012-05-17 12:58:35 -0700 (Thu, 17 May 2012)
Log Message
[BlackBerry] expandSelectionToGranularity should only use VisibleSelection and not range.
https://bugs.webkit.org/show_bug.cgi?id=86759
Reviewed by Antonio Gomes.
expandSelectionToGranularity unnecesarily converted the
selection to range and back. Using the selection
directly is preferred.
* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::expandSelectionToGranularity):
Modified Paths
Diff
Modified: trunk/Source/WebKit/blackberry/ChangeLog (117482 => 117483)
--- trunk/Source/WebKit/blackberry/ChangeLog 2012-05-17 19:43:26 UTC (rev 117482)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2012-05-17 19:58:35 UTC (rev 117483)
@@ -1,3 +1,17 @@
+2012-05-17 Mike Fenton <mifen...@rim.com>
+
+ [BlackBerry] expandSelectionToGranularity should only use VisibleSelection and not range.
+ https://bugs.webkit.org/show_bug.cgi?id=86759
+
+ Reviewed by Antonio Gomes.
+
+ expandSelectionToGranularity unnecesarily converted the
+ selection to range and back. Using the selection
+ directly is preferred.
+
+ * WebKitSupport/SelectionHandler.cpp:
+ (BlackBerry::WebKit::expandSelectionToGranularity):
+
2012-05-17 Hironori Bono <hb...@chromium.org>
[Refactoring] Move platform-specific code in Editor::respondToChangedSelection to the WebKit layer
Modified: trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp (117482 => 117483)
--- trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp 2012-05-17 19:43:26 UTC (rev 117482)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp 2012-05-17 19:58:35 UTC (rev 117483)
@@ -598,14 +598,13 @@
selection = DOMSupport::visibleSelectionForClosestActualWordStart(selection);
selection.expandUsingGranularity(granularity);
- RefPtr<Range> newRange = selection.toNormalizedRange();
- RefPtr<Range> oldRange = frame->selection()->selection().toNormalizedRange();
- EAffinity affinity = frame->selection()->affinity();
+ selection.setAffinity(frame->selection()->affinity());
- if (isInputMode && !frame->editor()->client()->shouldChangeSelectedRange(oldRange.get(), newRange.get(), affinity, false))
+ if (isInputMode && !frame->selection()->shouldChangeSelection(selection))
return false;
- return frame->selection()->setSelectedRange(newRange.get(), affinity, true);
+ frame->selection()->setSelection(selection);
+ return true;
}
void SelectionHandler::selectObject(const WebCore::IntPoint& location, TextGranularity granularity)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes