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

Unified Diff: third_party/WebKit/Source/core/dom/StaticRange.h

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/dom/StaticRange.h
diff --git a/third_party/WebKit/Source/core/dom/StaticRange.h b/third_party/WebKit/Source/core/dom/StaticRange.h
index 880bb916aca0a812b386cce8788f5493cf43eab6..551efd9afb53f7dea7ef2ac9f880cdbc998ee6f6 100644
--- a/third_party/WebKit/Source/core/dom/StaticRange.h
+++ b/third_party/WebKit/Source/core/dom/StaticRange.h
@@ -9,13 +9,13 @@
#include "bindings/core/v8/ScriptWrappable.h"
#include "core/CoreExport.h"
+#include "core/dom/Range.h"
#include "platform/heap/Handle.h"
namespace blink {
class Document;
class ExceptionState;
-class Range;
class CORE_EXPORT StaticRange final : public GarbageCollected<StaticRange>,
public ScriptWrappable {
@@ -33,6 +33,11 @@ class CORE_EXPORT StaticRange final : public GarbageCollected<StaticRange>,
return new StaticRange(document, startContainer, startOffset, endContainer,
endOffset);
}
+ static StaticRange* create(const Range* range) {
+ return new StaticRange(range->ownerDocument(), range->startContainer(),
+ range->startOffset(), range->endContainer(),
+ range->endOffset());
+ }
Node* startContainer() const { return m_startContainer.get(); }
void setStartContainer(Node* startContainer) {
@@ -55,7 +60,7 @@ class CORE_EXPORT StaticRange final : public GarbageCollected<StaticRange>,
void setStart(Node* container, int offset);
void setEnd(Node* container, int offset);
- Range* toRange(ExceptionState&) const;
+ Range* toRange(ExceptionState& = ASSERT_NO_EXCEPTION) const;
DECLARE_TRACE();

Powered by Google App Engine
This is Rietveld 408576698