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:
Aneesh Agrawal 2016-06-09 07:01:24 -04:00
parent bb53da6957
commit 9d097e7d15
20 changed files with 50 additions and 51 deletions

View file

@ -641,7 +641,7 @@ impl Document {
// Update the focus state for all elements in the focus chain.
// https://html.spec.whatwg.org/multipage/#focus-chain
if focus_type == FocusType::Element {
let event = ConstellationMsg::Focus(self.window.pipeline());
let event = ConstellationMsg::Focus(self.window.pipeline_id());
self.window.constellation_chan().send(event).unwrap();
}
}
@ -661,7 +661,7 @@ impl Document {
pub fn send_title_to_compositor(&self) {
let window = self.window();
window.constellation_chan()
.send(ConstellationMsg::SetTitle(window.pipeline(),
.send(ConstellationMsg::SetTitle(window.pipeline_id(),
Some(String::from(self.Title()))))
.unwrap();
}
@ -1367,7 +1367,7 @@ impl Document {
// TODO: Should tick animation only when document is visible
if !self.running_animation_callbacks.get() {
let event = ConstellationMsg::ChangeRunningAnimationsState(
self.window.pipeline(),
self.window.pipeline_id(),
AnimationState::AnimationCallbacksPresent);
self.window.constellation_chan().send(event).unwrap();
}
@ -1405,7 +1405,7 @@ impl Document {
if self.animation_frame_list.borrow().is_empty() {
mem::swap(&mut *self.animation_frame_list.borrow_mut(),
&mut animation_frame_list);
let event = ConstellationMsg::ChangeRunningAnimationsState(self.window.pipeline(),
let event = ConstellationMsg::ChangeRunningAnimationsState(self.window.pipeline_id(),
AnimationState::NoAnimationCallbacksPresent);
self.window.constellation_chan().send(event).unwrap();
}
@ -1469,7 +1469,7 @@ impl Document {
let loader = self.loader.borrow();
if !loader.is_blocked() && !loader.events_inhibited() {
let win = self.window();
let msg = MainThreadScriptMsg::DocumentLoadsComplete(win.pipeline());
let msg = MainThreadScriptMsg::DocumentLoadsComplete(win.pipeline_id());
win.main_thread_script_chan().send(msg).unwrap();
}
}
@ -1567,7 +1567,7 @@ impl Document {
}
pub fn notify_constellation_load(&self) {
let pipeline_id = self.window.pipeline();
let pipeline_id = self.window.pipeline_id();
let load_event = ConstellationMsg::LoadComplete(pipeline_id);
self.window.constellation_chan().send(load_event).unwrap();
}
@ -1593,7 +1593,7 @@ impl Document {
self.upcast::<Node>()
.traverse_preorder()
.filter_map(Root::downcast::<HTMLIFrameElement>)
.find(|node| node.pipeline() == Some(pipeline))
.find(|node| node.pipeline_id() == Some(pipeline))
}
pub fn get_dom_loading(&self) -> u64 {