mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Code review comments and upstream merge conflicts
Incorporated code review comments in components/net/http_loader.rs Resolved merge conflicts in cargo.lock file. Updated ReferrerPolicy in lib.rs
This commit is contained in:
commit
26dac98546
340 changed files with 9134 additions and 452 deletions
|
@ -96,9 +96,8 @@ use ipc_channel::ipc::{self, IpcSender};
|
|||
use js::jsapi::{JSContext, JSObject, JSRuntime};
|
||||
use js::jsapi::JS_GetRuntime;
|
||||
use msg::constellation_msg::{ALT, CONTROL, SHIFT, SUPER};
|
||||
use msg::constellation_msg::{Key, KeyModifiers, KeyState};
|
||||
use msg::constellation_msg::{PipelineId, ReferrerPolicy};
|
||||
use net_traits::{FetchResponseMsg, IpcSend};
|
||||
use msg::constellation_msg::{FrameId, Key, KeyModifiers, KeyState};
|
||||
use net_traits::{FetchResponseMsg, IpcSend, ReferrerPolicy};
|
||||
use net_traits::CookieSource::NonHTTP;
|
||||
use net_traits::CoreResourceMsg::{GetCookiesForUrl, SetCookiesForUrl};
|
||||
use net_traits::request::RequestInit;
|
||||
|
@ -606,7 +605,7 @@ impl Document {
|
|||
|
||||
self.ready_state.set(state);
|
||||
|
||||
self.upcast::<EventTarget>().fire_simple_event("readystatechange");
|
||||
self.upcast::<EventTarget>().fire_event(atom!("readystatechange"));
|
||||
}
|
||||
|
||||
/// Return whether scripting is enabled or not
|
||||
|
@ -1400,7 +1399,7 @@ impl Document {
|
|||
if let Some((parent_pipeline_id, _)) = self.window.parent_info() {
|
||||
let global_scope = self.window.upcast::<GlobalScope>();
|
||||
let event = ConstellationMsg::MozBrowserEvent(parent_pipeline_id,
|
||||
Some(global_scope.pipeline_id()),
|
||||
global_scope.pipeline_id(),
|
||||
event);
|
||||
global_scope.constellation_chan().send(event).unwrap();
|
||||
}
|
||||
|
@ -1513,8 +1512,10 @@ impl Document {
|
|||
}
|
||||
}
|
||||
|
||||
let loader = self.loader.borrow();
|
||||
if !loader.is_blocked() && !loader.events_inhibited() {
|
||||
if !self.loader.borrow().is_blocked() && !self.loader.borrow().events_inhibited() {
|
||||
// Schedule a task to fire a "load" event (if no blocking loads have arrived in the mean time)
|
||||
// NOTE: we can end up executing this code more than once, in case more blocking loads arrive.
|
||||
debug!("Document loads are complete.");
|
||||
let win = self.window();
|
||||
let msg = MainThreadScriptMsg::DocumentLoadsComplete(
|
||||
win.upcast::<GlobalScope>().pipeline_id());
|
||||
|
@ -1630,11 +1631,11 @@ impl Document {
|
|||
}
|
||||
|
||||
/// Find an iframe element in the document.
|
||||
pub fn find_iframe(&self, pipeline: PipelineId) -> Option<Root<HTMLIFrameElement>> {
|
||||
pub fn find_iframe(&self, frame_id: FrameId) -> Option<Root<HTMLIFrameElement>> {
|
||||
self.upcast::<Node>()
|
||||
.traverse_preorder()
|
||||
.filter_map(Root::downcast::<HTMLIFrameElement>)
|
||||
.find(|node| node.pipeline_id() == Some(pipeline))
|
||||
.find(|node| node.frame_id() == frame_id)
|
||||
}
|
||||
|
||||
pub fn get_dom_loading(&self) -> u64 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue