wrong display of a web page
Categories
(Core :: Layout: Images, Video, and HTML Frames, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr102 | --- | unaffected |
firefox106 | --- | wontfix |
firefox107 | --- | verified |
firefox108 | --- | verified |
People
(Reporter: kbrosnan, Assigned: emilio)
References
(Regression, )
Details
(Keywords: regression)
Attachments
(3 files)
2.67 KB,
text/html
|
Details | |
463 bytes,
text/html
|
Details | |
48 bytes,
text/x-phabricator-request
|
dmeehan
:
approval-mozilla-beta+
|
Details | Review |
From github: https://github.com/mozilla-mobile/fenix/issues/27565.
Hello, there is a problem viewing a web page in firefox for android.
The page is faccard.free.fr/newtab.html
I test it on firefox beta and also firefox nightly: it's the same problem: it shows a black page instead of a picture.
It works fine in Opera browser.
It works also fine in Firefox on my iPhone.
Thanks in advance
faccard@free.fr
My firefox version :
106.1.0 (Build #2015909131), 71ca6c1f7+
AC: 106.0.5, 5f06485fc3
GV: 106.0-20221010181815
AS: 94.2.1┆Issue is synchronized with this Jira Task
Change performed by the Move to Bugzilla add-on.
Reporter | ||
Comment 1•3 years ago
|
||
I think this is invalid but would like someone with more knowledge to have a look the page has the following HTML.
<img id="img1" src="./desktopbg/cur_wallpaper.jpg" data-src="./desktopbg/cur_wallpaper.jpg" alt="" width="NaN" height="0">
From my quick look this is caused by setting height="0" which Chrome seems to ignore.
There is the html code of the page.
If anyone can help.
<html>
<head>
<meta charset="utf-8">
<title>Home page</title>
<style>
body {
background-color: #000000;
visibility:hidden;
</style>
</head>
<body id="m_body">
<div id="myDiv"><img id="img1" src="" data-src="./desktopbg/cur_wallpaper.jpg" alt="" /></div>
<script>
function addEvent(a,b,c,d){
d = !d && false;
(a.addEventListener)?a.addEventListener(b,c,d):a.attachEvent('on'+b,c);
}
imgToLoad = document.querySelector("img[data-src]");
dataImgCt = "";
srcTarget = "";
dataImgCt = imgToLoad.getAttribute("data-src");
srcTarget = dataImgCt;
function loadImages(){
imgTemp="";
imgTemp = document.createElement("img");
imgTemp.src = srcTarget;
imgTemp.onload = function(){
imgToLoad.src = srcTarget;//this.src;
m_height = imgToLoad.height;
m_width = imgToLoad.width;
redimimageac();
}
}
addEvent(window, 'load', loadImages, false);
window.onresize = redimimageac;
function redimimageac() {
if (document.getElementById('img1')) {
l_coord=new Array(4);
l_coord=redimimage(85);
val_top=l_coord[2] + "px";
val_gauche=l_coord[3] + "px";
document.getElementById('img1').setAttribute("width",l_coord[0]);
document.getElementById('img1').setAttribute("height",l_coord[1]);
document.getElementById('myDiv').style.paddingTop = val_top;
document.getElementById('myDiv').style.paddingLeft = val_gauche;
document.getElementById('m_body').style.visibility = "visible";
}
}
/* Redimensionnement d'une image
* pourcentc : la carré, dans lequel doit être contenue l'image, est calculé en pourcentage par rapport à la taille de la fenêtre
* l'image est agrandie ou rétrécie sans dépasser la taille ooriginale de l'image)).
*/
function redimimage(pourcentc) {
largeurw=window.innerWidth; /*largeur de la zone*/
hauteurw=window.innerHeight; /* hauteur de la zone*/
largeurc=Math.min(window.innerWidth*pourcentc/100, m_width); /* largeur du carré devant contenir l'image*/
hauteurc=Math.min(window.innerHeight*pourcentc/100, m_height);/* hauteur du carré devant contenir l'image*/
coord=new Array(4); /* tableau qui contiendra largeur, hauteur , top, gauche*/
ratio=m_height / m_width; /* proportion de l'image */
hauteur=hauteurc;
largeur=hauteur / ratio ;
if (largeurc<largeur) {
largeur=largeurc;
hauteur=largeur * ratio;
}
letop=Math.floor((hauteurw - hauteur)/2);
legauche=Math.floor((largeurw - largeur)/2);
coord[0]=largeur;
coord[1]=hauteur;
coord[2]=letop;
coord[3]=legauche;
return(coord);
}
</script>
</body>
</html>
Just to say that i uninstall the latest version of firefox for android 106.1.0, and i install version 105.2.0 and it works fine with this old version.
Assignee | ||
Comment 4•3 years ago
|
||
This regressed by bug 1787072.
Updated•3 years ago
|
Assignee | ||
Comment 5•3 years ago
|
||
Comment 6•3 years ago
|
||
Set release status flags based on info from the regressing bug 1787072
Assignee | ||
Comment 7•3 years ago
|
||
For information, the issue has been reported at https://github.com/webcompat/web-bugs/issues/112826
Assignee | ||
Comment 9•3 years ago
|
||
Otherwise the image frame doesn't get the image until the OnImageLoaded
notification arrives. See the test-case on why does this matter.
Comment 10•3 years ago
|
||
Comment 12•3 years ago
|
||
bugherder |
Comment 14•3 years ago
|
||
The patch landed in nightly and beta is affected.
:emilio, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox107
towontfix
.
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 15•3 years ago
|
||
Comment on attachment 9300813 [details]
Bug 1797798 - Make sync load of images when there's no existing image work too. r=edgar,tnikkel
Beta/Release Uplift Approval Request
- User impact if declined: Relatively simple change that restores previous behavior.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: Visit the url mentioned in comment 0 or the test-case above.
- List of other uplifts needed: none
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Fairly trivial fix to make loaded image updates sync to match other browsers.
- String changes made/needed: none
- Is Android affected?: Yes
Assignee | ||
Updated•3 years ago
|
Comment 16•3 years ago
|
||
Comment on attachment 9300813 [details]
Bug 1797798 - Make sync load of images when there's no existing image work too. r=edgar,tnikkel
Approved for 107.0b8.
Comment 17•3 years ago
|
||
bugherder uplift |
Updated•3 years ago
|
Updated•3 years ago
|
Comment 18•3 years ago
|
||
Verified as fixed on Nightly 108.0a1 from 07/11 and Firefox Beta 107.0b6 with Motorola Moto G9 Plus (Android 11). The picture from faccard.free.fr/newtab.html is displayed correctly.
Updated•3 years ago
|
Description
•