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

Unified Diff: third_party/WebKit/Source/core/editing/EditingUtilities.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
Index: third_party/WebKit/Source/core/editing/EditingUtilities.cpp
diff --git a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
index 319324f9f338448a2047f178008676bdbc58b08e..e388955bbfa19e09c7e02f5667195a74c7822c1e 100644
--- a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
+++ b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
@@ -2042,14 +2042,15 @@ bool isTextSecurityNode(const Node* node) {
node->layoutObject()->style()->textSecurity() != TSNONE;
}
-const RangeVector* targetRangesForInputEvent(const Node& node) {
+const StaticRangeVector* targetRangesForInputEvent(const Node& node) {
if (!hasRichlyEditableStyle(node))
return nullptr;
- return new RangeVector(
- 1, firstRangeOf(node.document()
- .frame()
- ->selection()
- .computeVisibleSelectionInDOMTreeDeprecated()));
+ return new StaticRangeVector(
+ 1, StaticRange::create(
+ firstRangeOf(node.document()
+ .frame()
+ ->selection()
+ .computeVisibleSelectionInDOMTreeDeprecated())));
}
DispatchEventResult dispatchBeforeInputInsertText(Node* target,
@@ -2071,7 +2072,7 @@ DispatchEventResult dispatchBeforeInputInsertText(Node* target,
DispatchEventResult dispatchBeforeInputEditorCommand(
Node* target,
InputEvent::InputType inputType,
- const RangeVector* ranges) {
+ const StaticRangeVector* ranges) {
if (!RuntimeEnabledFeatures::inputEventEnabled())
return DispatchEventResult::NotCanceled;
if (!target)
« no previous file with comments | « third_party/WebKit/Source/core/editing/EditingUtilities.h ('k') | third_party/WebKit/Source/core/editing/Editor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698