mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Auto merge of #16845 - asajeffrey:script-rename-browsing-contexts, r=jdm
Renamed BrowsingContext to WindowProxy in script. <!-- Please describe your changes on the following line: --> Renamed `script::dom::BrowsingContext` to `script::dom::WindowProxy`. The browsing context is mostly maintained in the constellation, not in script. It would be nice to rename `constellation::Frame` to `constellation::BrowsingContext`, but that will be very confusing if there are two `BrowsingContext` types. --- <!-- 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 do not require tests because renamings aren't externally visible <!-- 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/16845) <!-- Reviewable:end -->
This commit is contained in:
commit
34d0e59849
10 changed files with 150 additions and 157 deletions
|
@ -23,7 +23,6 @@ use dom::bindings::js::{LayoutJS, MutNullableJS, Root};
|
|||
use dom::bindings::refcounted::Trusted;
|
||||
use dom::bindings::reflector::DomObject;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::browsingcontext::BrowsingContext;
|
||||
use dom::customevent::CustomEvent;
|
||||
use dom::document::Document;
|
||||
use dom::domtokenlist::DOMTokenList;
|
||||
|
@ -35,6 +34,7 @@ use dom::htmlelement::HTMLElement;
|
|||
use dom::node::{Node, NodeDamage, UnbindContext, document_from_node, window_from_node};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom::window::{ReflowReason, Window};
|
||||
use dom::windowproxy::WindowProxy;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use ipc_channel::ipc;
|
||||
|
@ -540,8 +540,8 @@ impl HTMLIFrameElementMethods for HTMLIFrameElement {
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-iframe-contentwindow
|
||||
fn GetContentWindow(&self) -> Option<Root<BrowsingContext>> {
|
||||
self.pipeline_id.get().and_then(|_| ScriptThread::find_browsing_context(self.frame_id))
|
||||
fn GetContentWindow(&self) -> Option<Root<WindowProxy>> {
|
||||
self.pipeline_id.get().and_then(|_| ScriptThread::find_window_proxy(self.frame_id))
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-iframe-contentdocument
|
||||
|
@ -769,7 +769,7 @@ impl VirtualMethods for HTMLIFrameElement {
|
|||
// when the `PipelineExit` message arrives.
|
||||
for exited_pipeline_id in exited_pipeline_ids {
|
||||
if let Some(exited_document) = ScriptThread::find_document(exited_pipeline_id) {
|
||||
exited_document.window().browsing_context().discard();
|
||||
exited_document.window().window_proxy().discard_browsing_context();
|
||||
for exited_iframe in exited_document.iter_iframes() {
|
||||
exited_iframe.pipeline_id.set(None);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue