mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #5839 - nox:range, r=Manishearth
The actual boundary points are behind a Rc<_> value to let nodes be able to store weak references to them in the future. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5839) <!-- Reviewable:end -->
This commit is contained in:
commit
15c4372a8b
28 changed files with 13387 additions and 451 deletions
|
@ -9,76 +9,71 @@
|
|||
* http://dvcs.w3.org/hg/csswg/raw-file/tip/cssom-view/Overview.html#extensions-to-the-range-interface
|
||||
*/
|
||||
|
||||
[Constructor]
|
||||
[Constructor /*, Exposed=Window */]
|
||||
interface Range {
|
||||
// [Throws]
|
||||
// readonly attribute Node startContainer;
|
||||
// [Throws]
|
||||
// readonly attribute unsigned long startOffset;
|
||||
// [Throws]
|
||||
// readonly attribute Node endContainer;
|
||||
// [Throws]
|
||||
// readonly attribute unsigned long endOffset;
|
||||
// readonly attribute boolean collapsed;
|
||||
// [Throws]
|
||||
// readonly attribute Node commonAncestorContainer;
|
||||
readonly attribute Node startContainer;
|
||||
readonly attribute unsigned long startOffset;
|
||||
readonly attribute Node endContainer;
|
||||
readonly attribute unsigned long endOffset;
|
||||
readonly attribute boolean collapsed;
|
||||
readonly attribute Node commonAncestorContainer;
|
||||
|
||||
// [Throws]
|
||||
// void setStart(Node refNode, unsigned long offset);
|
||||
// [Throws]
|
||||
// void setEnd(Node refNode, unsigned long offset);
|
||||
// [Throws]
|
||||
// void setStartBefore(Node refNode);
|
||||
// [Throws]
|
||||
// void setStartAfter(Node refNode);
|
||||
// [Throws]
|
||||
// void setEndBefore(Node refNode);
|
||||
// [Throws]
|
||||
// void setEndAfter(Node refNode);
|
||||
// void collapse(optional boolean toStart = false);
|
||||
// [Throws]
|
||||
// void selectNode(Node refNode);
|
||||
// [Throws]
|
||||
// void selectNodeContents(Node refNode);
|
||||
[Throws]
|
||||
void setStart(Node refNode, unsigned long offset);
|
||||
[Throws]
|
||||
void setEnd(Node refNode, unsigned long offset);
|
||||
[Throws]
|
||||
void setStartBefore(Node refNode);
|
||||
[Throws]
|
||||
void setStartAfter(Node refNode);
|
||||
[Throws]
|
||||
void setEndBefore(Node refNode);
|
||||
[Throws]
|
||||
void setEndAfter(Node refNode);
|
||||
void collapse(optional boolean toStart = false);
|
||||
[Throws]
|
||||
void selectNode(Node refNode);
|
||||
[Throws]
|
||||
void selectNodeContents(Node refNode);
|
||||
|
||||
// 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;
|
||||
// [Throws]
|
||||
// short compareBoundaryPoints(unsigned short how, Range sourceRange);
|
||||
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;
|
||||
[Throws]
|
||||
short compareBoundaryPoints(unsigned short how, Range sourceRange);
|
||||
// [Throws]
|
||||
// void deleteContents();
|
||||
// [Throws]
|
||||
// [NewObject, Throws]
|
||||
// DocumentFragment extractContents();
|
||||
// [Throws]
|
||||
// [NewObject, Throws]
|
||||
// DocumentFragment cloneContents();
|
||||
// [Throws]
|
||||
// void insertNode(Node node);
|
||||
// [Throws]
|
||||
// void surroundContents(Node newParent);
|
||||
|
||||
// Range cloneRange();
|
||||
[NewObject]
|
||||
Range cloneRange();
|
||||
void detach();
|
||||
|
||||
// [Throws]
|
||||
// boolean isPointInRange(Node node, unsigned long offset);
|
||||
// [Throws]
|
||||
// short comparePoint(Node node, unsigned long offset);
|
||||
[Throws]
|
||||
boolean isPointInRange(Node node, unsigned long offset);
|
||||
[Throws]
|
||||
short comparePoint(Node node, unsigned long offset);
|
||||
|
||||
// [Throws]
|
||||
// boolean intersectsNode(Node node);
|
||||
boolean intersectsNode(Node node);
|
||||
|
||||
// stringifier;
|
||||
};
|
||||
|
||||
// https://domparsing.spec.whatwg.org/#dom-range-createcontextualfragment
|
||||
// https://dvcs.w3.org/hg/innerhtml/raw-file/tip/index.html#extensions-to-the-range-interface
|
||||
partial interface Range {
|
||||
// [Throws]
|
||||
// [NewObject, Throws]
|
||||
// DocumentFragment createContextualFragment(DOMString fragment);
|
||||
};//
|
||||
|
||||
//// http://dvcs.w3.org/hg/csswg/raw-file/tip/cssom-view/Overview.html#extensions-to-the-range-interface
|
||||
// http://dev.w3.org/csswg/cssom-view/#extensions-to-the-range-interface
|
||||
partial interface Range {
|
||||
// DOMRectList? getClientRects();
|
||||
// DOMRect getBoundingClientRect();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue