mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #23048 - c410-f3r:image-url, r=jdm
Add url for LayoutImageContext - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #23043 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23048) <!-- Reviewable:end -->
This commit is contained in:
commit
db7bb2a510
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