Bug 179468
| Summary: | Image rendered in smaller size and reports wrong dimension on iPad Pro | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Roland Soos <roland> |
| Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
| Status: | REOPENED | ||
| Severity: | Normal | CC: | ap, bfulgham, sabouhallawa, simon.fraser, thorton, webkit-bug-importer, zalan |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 13 | ||
| Hardware: | iPhone / iPad | ||
| OS: | iOS 13 | ||
| URL: | https://smartslider3.com/bugs/webkit/reimink/index.htm | ||
Roland Soos
Currently I can reproduce this issue on the latest iPad pro and in XCode simulator iPad PRO 2nd gen IOS 11.1
When you click on the imag ein the slider, it opens up a lightbox where you can change images with the next and previous arrow. After you change, the image size is very very small and there is no way to make it bigger. I have create a video which shows what is wrong: https://www.youtube.com/watch?v=y5GdbTpnz1A
On the console it also prints out the size of the image.
In normal browser it prints:
5 times 1920 1080
2 times 1600 1200
3 times 1920 1080
2 times 1600 1200
On iPad pro:
1920 1080
4 times 223 125
2 times 210 157
3 times 223 125
2 times 1600 1200
I have tried several different codes for image loading. In this example I use this one:
var $img = $('<img>', {'src': href, 'class': 'litebox-content'});
$this.transitionContent('image', $currentContent, $img);
$('img.litebox-content').n2imagesLoaded(function () {
console.log($img[0].naturalWidth, $img[0].naturalHeight);
$loader.remove();
});
If I change the code to the following it prints out the right image dimensions, but after the image appended into the DOM, then it renders incorrectly again.
var img = new Image();
img.onload = function () {
console.log($img[0].src);
console.log(this.width + 'x' + this.height);
$(img).appendTo($img);
$loader.remove();
}
img.src = href;
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/35441123>
Simon Fraser (smfr)
Please provide a URL where we can reproduce the issue.
Roland Soos
Ahh, sorry, I forgot it: https://smartslider3.com/bugs/webkit/reimink/index.htm
Simon Fraser (smfr)
Did this happen in iOS 10?
Roland Soos
(In reply to Simon Fraser (smfr) from comment #4)
> Did this happen in iOS 10?
I'm sorry, but I do not have IOS 10 device to try.
Simulator IOS 11.1:
iPad 5th gen -> works
iPad Air -> works
Iphone X -> works
iPad Pro 12.9 -> works
iPad Air 2 -> fails
iPad Pro 9.7i -> fails
iPad Pro 10.5 -> fails
iPad Pro 10.5 -> fails
iPad Pro 12.9 2nd -> fails
Roland Soos
I have just tried and it works fine in IOS 10.3 simulator's iPad PRO 12.9 2nd gen, so this bug probably came with IOS 11.
Simon Fraser (smfr)
I can reproduce on iPad Pro.
Alexey Proskuryakov
Roland, we cannot reproduce with current iOS any more. Can you please confirm?
Roland Soos
It still happens on iPad Pro 3nd gen IOS 12.1 simulator. See: https://youtu.be/lkgQw9zNkqI
Roland Soos
Still happens on iPhone X IOS: 13.3.1
My assumption that it only happens on Retina 3x screens.