mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #24316 - tokarzkj:set-body-is-too-strict, r=jdm
Change setBody to be less strict when getting the immediate child Step four of the dom document body calls for throwing an exception if no document element was found. The current setBody implementation was looking for a document element that is also an html element. It has been updated to use GetDocumentElement which returns any document element. - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #24291 <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24316) <!-- Reviewable:end -->
This commit is contained in:
commit
45b68ecbfc
2 changed files with 1 additions and 5 deletions
|
@ -3996,7 +3996,7 @@ impl DocumentMethods for Document {
|
|||
return Ok(());
|
||||
}
|
||||
|
||||
match (self.get_html_element(), &old_body) {
|
||||
match (self.GetDocumentElement(), &old_body) {
|
||||
// Step 3.
|
||||
(Some(ref root), &Some(ref child)) => {
|
||||
let root = root.upcast::<Node>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue