mirror of
https://github.com/servo/servo
synced 2026-04-30 19:37:43 +02:00
Use fn pipeline_id consistently, not fn pipeline
Consistently use the name 'pipeline_id' to refer to a function that returns an (optional) PipelineId. This was prompted by discovering both fn pipeline and fn pipeline_id doing the same job in htmliframeelement.rs. Note that there is fn pipeline in components/compositing/compositor.rs, but that actually returns an Option<&CompositionPipeline>, not any kind of PipelineId.
This commit is contained in:
@@ -133,7 +133,7 @@ impl HTMLIFrameElement {
|
||||
|
||||
let load_info = IFrameLoadInfo {
|
||||
load_data: load_data,
|
||||
containing_pipeline_id: window.pipeline(),
|
||||
containing_pipeline_id: window.pipeline_id(),
|
||||
new_subpage_id: new_subpage_id,
|
||||
old_subpage_id: old_subpage_id,
|
||||
new_pipeline_id: new_pipeline_id,
|
||||
@@ -213,10 +213,6 @@ impl HTMLIFrameElement {
|
||||
self.subpage_id.get()
|
||||
}
|
||||
|
||||
pub fn pipeline(&self) -> Option<PipelineId> {
|
||||
self.pipeline_id.get()
|
||||
}
|
||||
|
||||
pub fn change_visibility_status(&self, visibility: bool) {
|
||||
if self.visibility.get() != visibility {
|
||||
self.visibility.set(visibility);
|
||||
@@ -241,7 +237,7 @@ impl HTMLIFrameElement {
|
||||
pub fn iframe_load_event_steps(&self, loaded_pipeline: PipelineId) {
|
||||
// TODO(#9592): assert that the load blocker is present at all times when we
|
||||
// can guarantee that it's created for the case of iframe.reload().
|
||||
assert_eq!(loaded_pipeline, self.pipeline().unwrap());
|
||||
assert_eq!(loaded_pipeline, self.pipeline_id().unwrap());
|
||||
|
||||
// TODO A cross-origin child document would not be easily accessible
|
||||
// from this script thread. It's unclear how to implement
|
||||
@@ -423,7 +419,7 @@ pub fn Navigate(iframe: &HTMLIFrameElement, direction: TraversalDirection) -> Er
|
||||
if iframe.Mozbrowser() {
|
||||
if iframe.upcast::<Node>().is_in_doc() {
|
||||
let window = window_from_node(iframe);
|
||||
let msg = ConstellationMsg::TraverseHistory(iframe.pipeline(), direction);
|
||||
let msg = ConstellationMsg::TraverseHistory(iframe.pipeline_id(), direction);
|
||||
window.constellation_chan().send(msg).unwrap();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user