mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #22121 - gterzian:remove_constellation_block_in_navigation, r=paulrouget
Remove sync constellation -> embedder communication <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #22042 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- 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/22121) <!-- Reviewable:end -->
This commit is contained in:
commit
66223ee105
16 changed files with 265 additions and 61 deletions
|
@ -93,6 +93,9 @@ pub struct WindowProxy {
|
|||
|
||||
/// The parent browsing context's window proxy, if this is a nested browsing context
|
||||
parent: Option<Dom<WindowProxy>>,
|
||||
|
||||
/// https://html.spec.whatwg.org/multipage/#delaying-load-events-mode
|
||||
delaying_load_events_mode: Cell<bool>,
|
||||
}
|
||||
|
||||
impl WindowProxy {
|
||||
|
@ -117,6 +120,7 @@ impl WindowProxy {
|
|||
disowned: Cell::new(false),
|
||||
frame_element: frame_element.map(Dom::from_ref),
|
||||
parent: parent.map(Dom::from_ref),
|
||||
delaying_load_events_mode: Cell::new(false),
|
||||
opener,
|
||||
}
|
||||
}
|
||||
|
@ -312,6 +316,26 @@ impl WindowProxy {
|
|||
None
|
||||
}
|
||||
|
||||
/// https://html.spec.whatwg.org/multipage/#delaying-load-events-mode
|
||||
pub fn is_delaying_load_events_mode(&self) -> bool {
|
||||
self.delaying_load_events_mode.get()
|
||||
}
|
||||
|
||||
/// https://html.spec.whatwg.org/multipage/#delaying-load-events-mode
|
||||
pub fn start_delaying_load_events_mode(&self) {
|
||||
self.delaying_load_events_mode.set(true);
|
||||
}
|
||||
|
||||
/// https://html.spec.whatwg.org/multipage/#delaying-load-events-mode
|
||||
pub fn stop_delaying_load_events_mode(&self) {
|
||||
self.delaying_load_events_mode.set(false);
|
||||
if let Some(document) = self.document() {
|
||||
if !document.loader().events_inhibited() {
|
||||
ScriptThread::mark_document_with_no_blocked_loads(&document);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#disowned-its-opener
|
||||
pub fn disown(&self) {
|
||||
self.disowned.set(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue