mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #13965 - asajeffrey:script-iframe-check-document-browsing-context, r=Ms2ger
Check that an iframe is in a document with a browsing context before processing src <!-- Please describe your changes on the following line: --> Check that an iframe is in a document with a browsing context before processing src. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #13964. - [X] These changes do not require tests because this is already tested by https://github.com/servo/servo/blob/master/tests/wpt/web-platform-tests/old-tests/submission/Opera/script_scheduling/034.html <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/13965) <!-- Reviewable:end -->
This commit is contained in:
commit
4984a83f67
2 changed files with 24 additions and 4 deletions
|
@ -771,6 +771,10 @@ impl Node {
|
|||
self.owner_doc().is_html_document()
|
||||
}
|
||||
|
||||
pub fn is_in_doc_with_browsing_context(&self) -> bool {
|
||||
self.is_in_doc() && self.owner_doc().browsing_context().is_some()
|
||||
}
|
||||
|
||||
pub fn children(&self) -> NodeSiblingIterator {
|
||||
NodeSiblingIterator {
|
||||
current: self.GetFirstChild(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue