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

Unified Diff: core/dom/Range.idl

Issue 1660113002: Updated to Chrome 45 (2454) moved from SVN to git. Base URL: https://github.com/dart-lang/webcore.git@roll_45
Patch Set: Created 4 years, 11 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 | « core/dom/ProcessingInstruction.idl ('k') | core/dom/RequestAnimationFrameCallback.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/dom/Range.idl
diff --git a/core/dom/Range.idl b/core/dom/Range.idl
index 51a9da4aa63b10ecf1b8a173618cfce55785e53e..5452b4541b0cf6b25257f951e6eadc85d609cfbc 100644
--- a/core/dom/Range.idl
+++ b/core/dom/Range.idl
@@ -18,13 +18,15 @@
* Boston, MA 02110-1301, USA.
*/
-// Introduced in DOM Level 2:
+// https://dom.spec.whatwg.org/#interface-range
+
+// FIXME: All long types in this interface should be unsigned long.
[
Constructor,
ConstructorCallWith=Document,
WillBeGarbageCollected,
+ TypeChecking=Interface,
] interface Range {
-
readonly attribute Node startContainer;
readonly attribute long startOffset;
readonly attribute Node endContainer;
@@ -32,58 +34,49 @@
readonly attribute boolean collapsed;
readonly attribute Node commonAncestorContainer;
- [RaisesException] void setStart(Node refNode, long offset);
- [RaisesException] void setEnd(Node refNode, long offset);
- [RaisesException] void setStartBefore(Node refNode);
- [RaisesException] void setStartAfter(Node refNode);
- [RaisesException] void setEndBefore(Node refNode);
- [RaisesException] void setEndAfter(Node refNode);
+ [RaisesException] void setStart(Node node, long offset);
+ [RaisesException] void setEnd(Node node, long offset);
+ [RaisesException] void setStartBefore(Node node);
+ [RaisesException] void setStartAfter(Node node);
+ [RaisesException] void setEndBefore(Node node);
+ [RaisesException] void setEndAfter(Node node);
void collapse(optional boolean toStart = false);
- [RaisesException] void selectNode(Node refNode);
- [RaisesException] void selectNodeContents(Node refNode);
+ [RaisesException] void selectNode(Node node);
+ [RaisesException] void selectNodeContents(Node node);
- // CompareHow
const unsigned short START_TO_START = 0;
- const unsigned short START_TO_END = 1;
- const unsigned short END_TO_END = 2;
- const unsigned short END_TO_START = 3;
-
- [RaisesException, TypeChecking=Interface] short compareBoundaryPoints(unsigned short how, Range sourceRange);
+ const unsigned short START_TO_END = 1;
+ const unsigned short END_TO_END = 2;
+ const unsigned short END_TO_START = 3;
+ [RaisesException] short compareBoundaryPoints(unsigned short how, Range sourceRange);
[RaisesException, CustomElementCallbacks] void deleteContents();
- [RaisesException, CustomElementCallbacks] DocumentFragment extractContents();
- [RaisesException, CustomElementCallbacks] DocumentFragment cloneContents();
- [RaisesException, CustomElementCallbacks] void insertNode(Node newNode);
+ [NewObject, RaisesException, CustomElementCallbacks] DocumentFragment extractContents();
+ [NewObject, RaisesException, CustomElementCallbacks] DocumentFragment cloneContents();
+ [RaisesException, CustomElementCallbacks] void insertNode(Node node);
[RaisesException, CustomElementCallbacks] void surroundContents(Node newParent);
- Range cloneRange();
-
- stringifier;
+ [NewObject] Range cloneRange();
[DeprecateAs=RangeDetach] void detach();
- [RaisesException] boolean isPointInRange(Node refNode, long offset);
- [RaisesException, TypeChecking=Interface] short comparePoint(Node refNode, long offset);
+ [RaisesException] boolean isPointInRange(Node node, long offset);
+ [RaisesException] short comparePoint(Node node, long offset);
- [RaisesException] boolean intersectsNode(Node refNode);
+ [RaisesException] boolean intersectsNode(Node node);
- // CSSOM View Module API extensions
+ stringifier;
+ // CSSOM View Module
+ // http://dev.w3.org/csswg/cssom-view/#extensions-to-the-range-interface
+ // FIXME: getClientRect() and getBoundingClientRect() should
+ // return DOMRectList and DOMRect respectively.
ClientRectList getClientRects();
ClientRect getBoundingClientRect();
// DOM Parsing and Serialization
+ // https://dvcs.w3.org/hg/innerhtml/raw-file/tip/index.html#extensions-to-the-range-interface
+ [NewObject, RaisesException, CustomElementCallbacks] DocumentFragment createContextualFragment(DOMString fragment);
- [RaisesException, CustomElementCallbacks] DocumentFragment createContextualFragment(DOMString html);
-
- // WebKit extensions
-
- // CompareResults
- const unsigned short NODE_BEFORE = 0;
- const unsigned short NODE_AFTER = 1;
- const unsigned short NODE_BEFORE_AND_AFTER = 2;
- const unsigned short NODE_INSIDE = 3;
-
- [RaisesException, MeasureAs=RangeCompareNode] short compareNode([Default=Undefined] optional Node refNode);
-
- [RaisesException, MeasureAs=RangeExpand] void expand([Default=Undefined] optional DOMString unit);
+ // Non-standard API
+ [RaisesException, DeprecateAs=RangeExpand] void expand([Default=Undefined] optional DOMString unit);
};
« no previous file with comments | « core/dom/ProcessingInstruction.idl ('k') | core/dom/RequestAnimationFrameCallback.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698