mirror of
https://github.com/servo/servo.git
synced 2025-07-23 23:33:43 +01:00
Add url for LayoutImageContext
This commit is contained in:
parent
3a33f99cad
commit
1cecb080b3
1 changed files with 3 additions and 4 deletions
|
@ -29,6 +29,7 @@ struct LayoutImageContext {
|
|||
cache: Arc<dyn ImageCache>,
|
||||
resource_timing: ResourceFetchTiming,
|
||||
doc: Trusted<Document>,
|
||||
url: ServoUrl,
|
||||
}
|
||||
|
||||
impl FetchResponseListener for LayoutImageContext {
|
||||
|
@ -64,10 +65,7 @@ impl FetchResponseListener for LayoutImageContext {
|
|||
|
||||
impl ResourceTimingListener for LayoutImageContext {
|
||||
fn resource_timing_information(&self) -> (InitiatorType, ServoUrl) {
|
||||
(
|
||||
InitiatorType::Other,
|
||||
self.resource_timing_global().get_url().clone(),
|
||||
)
|
||||
(InitiatorType::Other, self.url.clone())
|
||||
}
|
||||
|
||||
fn resource_timing_global(&self) -> DomRoot<GlobalScope> {
|
||||
|
@ -90,6 +88,7 @@ pub fn fetch_image_for_layout(
|
|||
cache: cache,
|
||||
resource_timing: ResourceFetchTiming::new(ResourceTimingType::Resource),
|
||||
doc: Trusted::new(&document),
|
||||
url: url.clone(),
|
||||
}));
|
||||
|
||||
let document = document_from_node(node);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue