mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Urlmageddon: Use refcounted urls more often.
This commit is contained in:
parent
f14e7339b5
commit
913c874cb5
161 changed files with 1044 additions and 718 deletions
|
@ -35,11 +35,11 @@ use net_traits::request::{CredentialsMode, Destination, RequestInit, Type as Req
|
|||
use network_listener::{NetworkListener, PreInvoke};
|
||||
use script_thread::{Runnable, ScriptThread};
|
||||
use servo_atoms::Atom;
|
||||
use servo_url::ServoUrl;
|
||||
use std::cell::Cell;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use task_source::TaskSource;
|
||||
use time::{self, Timespec, Duration};
|
||||
use url::Url;
|
||||
|
||||
struct HTMLMediaElementContext {
|
||||
/// The element that initiated the request.
|
||||
|
@ -53,7 +53,7 @@ struct HTMLMediaElementContext {
|
|||
/// Time of last progress notification.
|
||||
next_progress_event: Timespec,
|
||||
/// Url of resource requested.
|
||||
url: Url,
|
||||
url: ServoUrl,
|
||||
/// Whether the media metadata has been completely received.
|
||||
have_metadata: bool,
|
||||
/// True if this response is invalid and should be ignored.
|
||||
|
@ -164,7 +164,7 @@ impl PreInvoke for HTMLMediaElementContext {
|
|||
}
|
||||
|
||||
impl HTMLMediaElementContext {
|
||||
fn new(elem: &HTMLMediaElement, url: Url) -> HTMLMediaElementContext {
|
||||
fn new(elem: &HTMLMediaElement, url: ServoUrl) -> HTMLMediaElementContext {
|
||||
HTMLMediaElementContext {
|
||||
elem: Trusted::new(elem),
|
||||
data: vec![],
|
||||
|
@ -437,7 +437,7 @@ impl HTMLMediaElement {
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#concept-media-load-algorithm
|
||||
fn resource_selection_algorithm_sync(&self, base_url: Url) {
|
||||
fn resource_selection_algorithm_sync(&self, base_url: ServoUrl) {
|
||||
// TODO step 5 (populate pending text tracks)
|
||||
|
||||
// Step 6
|
||||
|
@ -814,11 +814,11 @@ impl Runnable for FireSimpleEventTask {
|
|||
|
||||
struct ResourceSelectionTask {
|
||||
elem: Trusted<HTMLMediaElement>,
|
||||
base_url: Url,
|
||||
base_url: ServoUrl,
|
||||
}
|
||||
|
||||
impl ResourceSelectionTask {
|
||||
fn new(elem: &HTMLMediaElement, url: Url) -> ResourceSelectionTask {
|
||||
fn new(elem: &HTMLMediaElement, url: ServoUrl) -> ResourceSelectionTask {
|
||||
ResourceSelectionTask {
|
||||
elem: Trusted::new(elem),
|
||||
base_url: url,
|
||||
|
@ -885,5 +885,5 @@ enum ResourceSelectionMode {
|
|||
|
||||
enum Resource {
|
||||
Object,
|
||||
Url(Url),
|
||||
Url(ServoUrl),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue