Chromium Code Reviews| Index: Source/core/editing/EditorCommand.cpp |
| diff --git a/Source/core/editing/EditorCommand.cpp b/Source/core/editing/EditorCommand.cpp |
| index 46c65f17dec2b533b99a94e3444d8400b2021701..9eda411ec7e35bfe0ddfe6b82892b29a274f97e9 100644 |
| --- a/Source/core/editing/EditorCommand.cpp |
| +++ b/Source/core/editing/EditorCommand.cpp |
| @@ -213,12 +213,12 @@ static bool expandSelectionToGranularity(LocalFrame& frame, TextGranularity gran |
| { |
| VisibleSelection selection = frame.selection().selection(); |
| selection.expandUsingGranularity(granularity); |
| - RefPtr<Range> newRange = selection.toNormalizedRange(); |
| + RefPtrWillBeRawPtr<Range> newRange = selection.toNormalizedRange(); |
| if (!newRange) |
| return false; |
| if (newRange->collapsed(IGNORE_EXCEPTION)) |
| return false; |
| - RefPtr<Range> oldRange = frame.selection().selection().toNormalizedRange(); |
| + RefPtrWillBeRawPtr<Range> ALLOW_UNUSED oldRange = frame.selection().selection().toNormalizedRange(); |
|
Yuta Kitamura
2014/04/04 02:37:25
This line can be removed, as well.
sof
2014/04/04 07:33:23
Done.
|
| EAffinity affinity = frame.selection().affinity(); |
| frame.selection().setSelectedRange(newRange.get(), affinity, FrameSelection::CloseTyping); |
| return true; |
| @@ -264,7 +264,7 @@ static unsigned verticalScrollDistance(LocalFrame& frame) |
| return static_cast<unsigned>(max(max<int>(height * ScrollableArea::minFractionToStepWhenPaging(), height - ScrollableArea::maxOverlapBetweenPages()), 1)); |
| } |
| -static RefPtr<Range> unionDOMRanges(Range* a, Range* b) |
| +static PassRefPtrWillBeRawPtr<Range> unionDOMRanges(Range* a, Range* b) |
| { |
| Range* start = a->compareBoundaryPoints(Range::START_TO_START, b, ASSERT_NO_EXCEPTION) <= 0 ? a : b; |
| Range* end = a->compareBoundaryPoints(Range::END_TO_END, b, ASSERT_NO_EXCEPTION) <= 0 ? b : a; |
| @@ -380,7 +380,7 @@ static bool executeDeleteToEndOfParagraph(LocalFrame& frame, Event*, EditorComma |
| static bool executeDeleteToMark(LocalFrame& frame, Event*, EditorCommandSource, const String&) |
| { |
| - RefPtr<Range> mark = frame.editor().mark().toNormalizedRange(); |
| + RefPtrWillBeRawPtr<Range> mark = frame.editor().mark().toNormalizedRange(); |
| if (mark) { |
| bool selected = frame.selection().setSelectedRange(unionDOMRanges(mark.get(), frame.editor().selectedRange().get()).get(), DOWNSTREAM, FrameSelection::CloseTyping); |
| ASSERT(selected); |
| @@ -1028,8 +1028,8 @@ static bool executeSelectSentence(LocalFrame& frame, Event*, EditorCommandSource |
| static bool executeSelectToMark(LocalFrame& frame, Event*, EditorCommandSource, const String&) |
| { |
| - RefPtr<Range> mark = frame.editor().mark().toNormalizedRange(); |
| - RefPtr<Range> selection = frame.editor().selectedRange(); |
| + RefPtrWillBeRawPtr<Range> mark = frame.editor().mark().toNormalizedRange(); |
| + RefPtrWillBeRawPtr<Range> selection = frame.editor().selectedRange(); |
| if (!mark || !selection) |
| return false; |
| frame.selection().setSelectedRange(unionDOMRanges(mark.get(), selection.get()).get(), DOWNSTREAM, FrameSelection::CloseTyping); |