Bug 169465

Summary: imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute.html is unreliable
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: ImagesAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, rniwa
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=178712
Bug Depends on:    
Bug Blocks: 149157    
Attachments:
Description Flags
patch none

Description Antti Koivisto 2017-03-10 05:15:04 PST
It shows all tests passing but that is a bug. We don't even support all the unit types. The test occasionally fails when reloading, that failing results are actually the correct ones.
Comment 1 Antti Koivisto 2017-03-10 05:20:03 PST
Created attachment 304039 [details]
patch
Comment 2 WebKit Commit Bot 2017-03-10 07:38:44 PST
Comment on attachment 304039 [details]
patch

Clearing flags on attachment: 304039

Committed r213711: <http://trac.webkit.org/changeset/213711>
Comment 3 WebKit Commit Bot 2017-03-10 07:38:48 PST
All reviewed patches have been landed.  Closing bug.
Comment 4 Ryosuke Niwa 2017-10-23 23:00:23 PDT
Comment on attachment 304039 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=304039&action=review

> Source/WebCore/css/parser/SizesAttributeParser.cpp:75
> +    if (m_document.ownerElement())
> +        m_document.ownerElement()->document().updateLayoutIgnorePendingStylesheets();

It's not safe to update layout here because this function is getting called within Node::insertedInto,
and updating layout could run arbitrary author scripts :(