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

Unified Diff: third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp

Issue 2709883004: [InputEvent] Change |InputEventInit::sequence<Range> ranges| to |sequence<StaticRange> targetRanges| (Closed)
Patch Set: yosin's review: Use early return Created 3 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
« no previous file with comments | « third_party/WebKit/Source/core/editing/Editor.h ('k') | third_party/WebKit/Source/core/events/InputEvent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
index e20f2f31072b80190bd0d16f09134fdb303ee0e9..62b2bc875a9fbd4663177623b82926b9da02b8fc 100644
--- a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
@@ -191,7 +191,7 @@ InputEvent::InputType InputTypeFromCommandType(
}
}
-RangeVector* RangesFromCurrentSelectionOrExtendCaret(
+StaticRangeVector* RangesFromCurrentSelectionOrExtendCaret(
const LocalFrame& frame,
SelectionDirection direction,
TextGranularity granularity) {
@@ -201,11 +201,12 @@ RangeVector* RangesFromCurrentSelectionOrExtendCaret(
if (selectionModifier.selection().isCaret())
selectionModifier.modify(FrameSelection::AlterationExtend, direction,
granularity);
- RangeVector* ranges = new RangeVector;
+ StaticRangeVector* ranges = new StaticRangeVector;
// We only supports single selections.
if (selectionModifier.selection().isNone())
return ranges;
- ranges->push_back(firstRangeOf(selectionModifier.selection()));
+ ranges->push_back(
+ StaticRange::create(firstRangeOf(selectionModifier.selection())));
return ranges;
}
@@ -2727,7 +2728,7 @@ int Editor::Command::idForHistogram() const {
return isSupported() ? static_cast<int>(m_command->commandType) : 0;
}
-const RangeVector* Editor::Command::getTargetRanges() const {
+const StaticRangeVector* Editor::Command::getTargetRanges() const {
const Node* target = eventTargetNodeForDocument(m_frame->document());
if (!isSupported() || !m_frame || !target || !hasRichlyEditableStyle(*target))
return nullptr;
« no previous file with comments | « third_party/WebKit/Source/core/editing/Editor.h ('k') | third_party/WebKit/Source/core/events/InputEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698