Bug 215805 - Happens requests to the fallback image when the script detach and re-instert <source/> under <picture/> on document tree
Summary: Happens requests to the fallback image when the script detach and re-instert ...
Status: RESOLVED DUPLICATE of bug 159484
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-08-25 04:36 PDT by Tetsuharu Ohzeki [UTC+9]
Modified: 2020-09-01 09:27 PDT (History)
2 users (show)

See Also:


Attachments
testcase (11.83 KB, application/zip)
2020-08-25 04:36 PDT, Tetsuharu Ohzeki [UTC+9]
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tetsuharu Ohzeki [UTC+9] 2020-08-25 04:36:11 PDT
Created attachment 407183 [details]
testcase

## Environments
* Safari 14 on Big Sur beta 5
	* Safari TP 112 on that is also reproducible.

## Step to Reproduce
1. Extract testcase.zip.
2. Run `python -m SimpleHTTPServer`
3. Open Safari and open safari’s developer tools’ network pane.
4. Open index.html via launched in _step 2_.

## Expected Result
For images, Safari requests only `example_webp.webp`.

## Actual Result
For images Safari requests both of `example_webp.webp` and `example_png.png`

Sadly, today’s website use react or other view libraries to conceal an actual DOM manipluations. Their library are sometimes used to  “hydrates” web page on static html served by a server-side, then this kind of bugs causes multiple undesired image requests accidentally.

With webbev’s hat, the combination of `<picture/>` and `<source type="image/webp"/>` are used as progressive enhancement techniques to use WebP images for supported browsers to reduce network bandwidth.   So this kind of bugs are not desired behavior.
Comment 1 Tetsuharu Ohzeki [UTC+9] 2020-08-25 04:37:35 PDT
I seem bug 159484 and bug 177068 are similar but I'm not sure about they are duplicated of this.
Comment 2 Radar WebKit Bug Importer 2020-09-01 04:37:19 PDT
<rdar://problem/68135403>
Comment 3 Said Abou-Hallawa 2020-09-01 09:27:42 PDT
This is the same as bug 159484. They both address the issue of loading multiple resources for the same <picture> element although a single resource will be displayed at the end.

*** This bug has been marked as a duplicate of bug 159484 ***