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

Unified Diff: third_party/WebKit/Source/core/events/InputEvent.cpp

Issue 2022863002: [InputEvent] Introduce |StaticRange| and use in |InputEvent::getRanges()| (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Introduce |StaticRange| and add tests Created 4 years, 7 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/events/InputEvent.cpp
diff --git a/third_party/WebKit/Source/core/events/InputEvent.cpp b/third_party/WebKit/Source/core/events/InputEvent.cpp
index c485ea8057f2c7e1f1ab98def97e89f7c00d5be5..9154fc74b89a8d5dde3a1589d25ad883670f8d98 100644
--- a/third_party/WebKit/Source/core/events/InputEvent.cpp
+++ b/third_party/WebKit/Source/core/events/InputEvent.cpp
@@ -90,6 +90,15 @@ String InputEvent::inputType() const
return convertInputTypeToString(m_inputType);
}
+StaticRangeVector InputEvent::getRanges() const
+{
+ StaticRangeVector staticRanges;
+ for (const auto& range : m_ranges) {
dtapuska 2016/06/02 15:26:29 brackets not needed.
chongz 2016/06/06 19:43:44 Done.
+ staticRanges.append(StaticRange::create(range->startContainer(), range->startOffset(), range->endContainer(), range->endOffset()));
+ }
+ return staticRanges;
dtapuska 2016/06/02 15:26:29 Does this create a new object; or should std::move
chongz 2016/06/06 19:43:43 According to go/totw/11 I'd assume compiler is sma
+}
+
bool InputEvent::isInputEvent() const
{
return true;

Powered by Google App Engine
This is Rietveld 408576698