mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Auto merge of #6826 - dzbarsky:deletecontents, r=jdm
Implement Range#deleteContents Sadly calling ExtractContents and discarding the result doesn't do the right thing. It may be worth having a CutContents method that takes an `Option<DocumentFragment>` and switch the behavior based on it, to share the code between DeleteContents and ExtractContents, like what Gecko does. Maybe a followup. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6826) <!-- Reviewable:end -->
This commit is contained in:
commit
e7b1924948
6 changed files with 116 additions and 299 deletions
|
@ -48,8 +48,8 @@ interface Range {
|
|||
const unsigned short END_TO_START = 3;
|
||||
[Pure, Throws]
|
||||
short compareBoundaryPoints(unsigned short how, Range sourceRange);
|
||||
// [Throws]
|
||||
// void deleteContents();
|
||||
[Throws]
|
||||
void deleteContents();
|
||||
[NewObject, Throws]
|
||||
DocumentFragment extractContents();
|
||||
[NewObject, Throws]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue