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

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: Rebase Created 4 years, 6 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..95dc7b50921f3e8563b96b76fdf118ff09d76186 100644
--- a/third_party/WebKit/Source/core/events/InputEvent.cpp
+++ b/third_party/WebKit/Source/core/events/InputEvent.cpp
@@ -90,6 +90,14 @@ String InputEvent::inputType() const
return convertInputTypeToString(m_inputType);
}
+StaticRangeVector InputEvent::getRanges() const
+{
+ StaticRangeVector staticRanges;
+ for (const auto& range : m_ranges)
+ staticRanges.append(StaticRange::create(range->ownerDocument(), range->startContainer(), range->startOffset(), range->endContainer(), range->endOffset()));
+ return staticRanges;
+}
+
bool InputEvent::isInputEvent() const
{
return true;
« no previous file with comments | « third_party/WebKit/Source/core/events/InputEvent.h ('k') | third_party/WebKit/Source/core/events/InputEvent.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698