[Webkit-unassigned] [Bug 172224] New: Incorrect dimensions of images with srcset when adopted from document without browsing context
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed May 17 09:13:01 PDT 2017
https://bugs.webkit.org/show_bug.cgi?id=172224
Bug ID: 172224
Summary: Incorrect dimensions of images with srcset when
adopted from document without browsing context
Product: WebKit
Version: Safari 10
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Images
Assignee: webkit-unassigned at lists.webkit.org
Reporter: memmie at lenglet.name
Created attachment 310397
--> https://bugs.webkit.org/attachment.cgi?id=310397&action=review
Test cases: nodes from documents with and without browsing context
Overview:
Images created from document without browsing context have incorrect dimension (width=0 and height=0) if not forced (defined with CSS). These images are loaded but not visible.
NaturalHeight and naturalWidth are correctly provided (the images are loaded).
This issue doesn't happend if the node is imported (Document#importNode) instead of adopted (Document#adoptNode).
Steps to Reproduce, with JavaScript:
1. Create a document without browsing context (createHTMLDocument, DOMParser, removed iframe)
2. create image with srcset nodes with innerHTML or write() or createElement(), etc.
3. adopt the image node to the current document
4. append the image node
Actual Results:
Images are loaded (see web dev tools, load event) but the width and the height are equals 0.
If with CSS, dimensions are defined (forced), the image is visible
Expected Results:
If dimensions are not forced, the image should have dimension match its natural width and height.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170517/42cc407a/attachment.html>
More information about the webkit-unassigned
mailing list