Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Unified Diff: third_party/WebKit/WebCore/editing/EditorCommand.cpp

Issue 21184: WebKit merge 40722:40785 (part 1) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/WebCore/editing/EditorCommand.cpp
===================================================================
--- third_party/WebKit/WebCore/editing/EditorCommand.cpp (revision 9391)
+++ third_party/WebKit/WebCore/editing/EditorCommand.cpp (working copy)
@@ -186,13 +186,13 @@
{
Selection selection = frame->selection()->selection();
selection.expandUsingGranularity(granularity);
- RefPtr<Range> newRange = selection.toRange();
+ RefPtr<Range> newRange = selection.toNormalizedRange();
if (!newRange)
return false;
ExceptionCode ec = 0;
if (newRange->collapsed(ec))
return false;
- RefPtr<Range> oldRange = frame->selection()->selection().toRange();
+ RefPtr<Range> oldRange = frame->selection()->selection().toNormalizedRange();
EAffinity affinity = frame->selection()->affinity();
if (!frame->editor()->client()->shouldChangeSelectedRange(oldRange.get(), newRange.get(), affinity, false))
return false;
@@ -342,7 +342,7 @@
static bool executeDeleteToMark(Frame* frame, Event*, EditorCommandSource, const String&)
{
- RefPtr<Range> mark = frame->mark().toRange();
+ RefPtr<Range> mark = frame->mark().toNormalizedRange();
if (mark) {
SelectionController* selection = frame->selection();
bool selected = selection->setSelectedRange(unionDOMRanges(mark.get(), frame->editor()->selectedRange().get()).get(), DOWNSTREAM, true);
@@ -888,7 +888,7 @@
static bool executeSelectToMark(Frame* frame, Event*, EditorCommandSource, const String&)
{
- RefPtr<Range> mark = frame->mark().toRange();
+ RefPtr<Range> mark = frame->mark().toNormalizedRange();
RefPtr<Range> selection = frame->editor()->selectedRange();
if (!mark || !selection) {
systemBeep();
« no previous file with comments | « third_party/WebKit/WebCore/editing/Editor.cpp ('k') | third_party/WebKit/WebCore/editing/RemoveFormatCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698