Changeset 213711 in webkit


Ignore:
Timestamp:
Mar 10, 2017 7:38:40 AM (7 years ago)
Author:
Antti Koivisto
Message:

imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute.html is unreliable
https://bugs.webkit.org/show_bug.cgi?id=169465

Reviewed by Zalan Bujtas.

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-expected.txt:

Source/WebCore:

It shows all subtests 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.

  • css/parser/SizesAttributeParser.cpp:

(WebCore::SizesAttributeParser::SizesAttributeParser):

Ensure we have correct size for the iframe before parsing 'sizes' attribute values. The interpretation of
these may depend on the iframe dimensions.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r213671 r213711  
     12017-03-10  Antti Koivisto  <antti@apple.com>
     2
     3        imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute.html is unreliable
     4        https://bugs.webkit.org/show_bug.cgi?id=169465
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        * web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-expected.txt:
     9
    1102017-03-09  Jiewen Tan  <jiewen_tan@apple.com>
    211
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-expected.txt

    r204090 r213711  
    1919PASS <img srcset="/images/green-1x1.png?e15 50w, /images/green-16x16.png?e15 51w" sizes="0.1cm"> ref sizes="1px" (standards mode)
    2020PASS <img srcset="/images/green-1x1.png?e16 50w, /images/green-16x16.png?e16 51w" sizes="1mm"> ref sizes="1px" (standards mode)
    21 PASS <img srcset="/images/green-1x1.png?e17 50w, /images/green-16x16.png?e17 51w" sizes="1q"> ref sizes="1px" (standards mode)
     21FAIL <img srcset="/images/green-1x1.png?e17 50w, /images/green-16x16.png?e17 51w" sizes="1q"> ref sizes="1px" (standards mode) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
    2222PASS <img srcset="/images/green-1x1.png?e18 50w, /images/green-16x16.png?e18 51w" sizes="0.01in"> ref sizes="1px" (standards mode)
    2323PASS <img srcset="/images/green-1x1.png?e19 50w, /images/green-16x16.png?e19 51w" sizes="0.1pc"> ref sizes="1px" (standards mode)
     
    4040PASS <img srcset="/images/green-1x1.png?e36 50w, /images/green-16x16.png?e36 51w" sizes="calc(1px)"> ref sizes="1px" (standards mode)
    4141PASS <img srcset="/images/green-1x1.png?e37 50w, /images/green-16x16.png?e37 51w" sizes="(min-width:0) calc(1px)"> ref sizes="1px" (standards mode)
    42 PASS <img srcset="/images/green-1x1.png?e38 50w, /images/green-16x16.png?e38 51w" sizes="(min-width:calc(0)) 1px"> ref sizes="1px" (standards mode)
     42FAIL <img srcset="/images/green-1x1.png?e38 50w, /images/green-16x16.png?e38 51w" sizes="(min-width:calc(0)) 1px"> ref sizes="1px" (standards mode) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
    4343PASS <img srcset="/images/green-1x1.png?e39 50w, /images/green-16x16.png?e39 51w" sizes="(min-width:0) 1px, 100vw"> ref sizes="1px" (standards mode)
    4444PASS <img srcset="/images/green-1x1.png?e40 50w, /images/green-16x16.png?e40 51w" sizes="(min-width:0) 1px, (min-width:0) 100vw, 100vw"> ref sizes="1px" (standards mode)
     
    5959PASS <img srcset="/images/green-1x1.png?e55 50w, /images/green-16x16.png?e55 51w" sizes="unknown-media-type 100vw, 1px"> ref sizes="1px" (standards mode)
    6060PASS <img srcset="/images/green-1x1.png?e56 50w, /images/green-16x16.png?e56 51w" sizes="not unknown-media-type 100vw, 1px"> ref sizes="1px" (standards mode)
    61 PASS <img srcset="/images/green-1x1.png?e57 50w, /images/green-16x16.png?e57 51w" sizes="(min-width:0) or (min-width:0) 1px"> ref sizes="1px" (standards mode)
    62 PASS <img srcset="/images/green-1x1.png?e58 50w, /images/green-16x16.png?e58 51w" sizes="(min-width:0) or (unknown-mf-name) 1px"> ref sizes="1px" (standards mode)
    63 PASS <img srcset="/images/green-1x1.png?e59 50w, /images/green-16x16.png?e59 51w" sizes="(min-width:0) or (min-width:unknown-mf-value) 1px"> ref sizes="1px" (standards mode)
    64 PASS <img srcset="/images/green-1x1.png?e60 50w, /images/green-16x16.png?e60 51w" sizes="(min-width:0) or (min-width:-1px) 1px"> ref sizes="1px" (standards mode)
    65 PASS <img srcset="/images/green-1x1.png?e61 50w, /images/green-16x16.png?e61 51w" sizes="(min-width:0) or (unknown &quot;general-enclosed&quot;) 1px"> ref sizes="1px" (standards mode)
    66 PASS <img srcset="/images/green-1x1.png?e62 50w, /images/green-16x16.png?e62 51w" sizes="(min-width:0) or unknown-general-enclosed(foo) 1px"> ref sizes="1px" (standards mode)
     61FAIL <img srcset="/images/green-1x1.png?e57 50w, /images/green-16x16.png?e57 51w" sizes="(min-width:0) or (min-width:0) 1px"> ref sizes="1px" (standards mode) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
     62FAIL <img srcset="/images/green-1x1.png?e58 50w, /images/green-16x16.png?e58 51w" sizes="(min-width:0) or (unknown-mf-name) 1px"> ref sizes="1px" (standards mode) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
     63FAIL <img srcset="/images/green-1x1.png?e59 50w, /images/green-16x16.png?e59 51w" sizes="(min-width:0) or (min-width:unknown-mf-value) 1px"> ref sizes="1px" (standards mode) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
     64FAIL <img srcset="/images/green-1x1.png?e60 50w, /images/green-16x16.png?e60 51w" sizes="(min-width:0) or (min-width:-1px) 1px"> ref sizes="1px" (standards mode) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
     65FAIL <img srcset="/images/green-1x1.png?e61 50w, /images/green-16x16.png?e61 51w" sizes="(min-width:0) or (unknown &quot;general-enclosed&quot;) 1px"> ref sizes="1px" (standards mode) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
     66FAIL <img srcset="/images/green-1x1.png?e62 50w, /images/green-16x16.png?e62 51w" sizes="(min-width:0) or unknown-general-enclosed(foo) 1px"> ref sizes="1px" (standards mode) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
    6767PASS <img srcset="/images/green-1x1.png?e63 50w, /images/green-16x16.png?e63 51w" sizes="(min-width:0) or (!) 100vw, 1px"> ref sizes="1px" (standards mode)
    6868PASS <img srcset="/images/green-1x1.png?e64 50w, /images/green-16x16.png?e64 51w" sizes="(min-width:0) or unknown-media-type 100vw, 1px"> ref sizes="1px" (standards mode)
     
    108108PASS <img srcset="/images/green-1x1.png?e104 50w, /images/green-16x16.png?e104 51w" sizes="(unknown-general-enclosed !) 100vw, 1px"> ref sizes="1px" (standards mode)
    109109PASS <img srcset="/images/green-1x1.png?e105 50w, /images/green-16x16.png?e105 51w" sizes="not (unknown-general-enclosed !) 100vw, 1px"> ref sizes="1px" (standards mode)
    110 PASS <img srcset="/images/green-1x1.png?e106 50w, /images/green-16x16.png?e106 51w" sizes="(min-width:0) or (unknown-general-enclosed !) 1px"> ref sizes="1px" (standards mode)
     110FAIL <img srcset="/images/green-1x1.png?e106 50w, /images/green-16x16.png?e106 51w" sizes="(min-width:0) or (unknown-general-enclosed !) 1px"> ref sizes="1px" (standards mode) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
    111111PASS <img srcset="/images/green-1x1.png?e107 50w, /images/green-16x16.png?e107 51w" sizes="not ((min-width:0) or (unknown &quot;general-enclosed&quot;)) 100vw, 1px"> ref sizes="1px" (standards mode)
    112112PASS <img srcset="/images/green-1x1.png?e108 50w, /images/green-16x16.png?e108 51w" sizes="(max-width:0) or (unknown-general-enclosed !) 100vw, 1px"> ref sizes="1px" (standards mode)
    113113PASS <img srcset="/images/green-1x1.png?e109 50w, /images/green-16x16.png?e109 51w" sizes="not ((max-width:0) or (unknown &quot;general-enclosed&quot;)) 100vw, 1px"> ref sizes="1px" (standards mode)
    114 PASS <img srcset="/images/green-1x1.png?f48 50w, /images/green-16x16.png?f48 51w" sizes="calc(1px"> ref sizes="1px" (standards mode)
    115 PASS <img srcset="/images/green-1x1.png?f49 50w, /images/green-16x16.png?f49 51w" sizes="(min-width:0) calc(1px"> ref sizes="1px" (standards mode)
     114FAIL <img srcset="/images/green-1x1.png?f48 50w, /images/green-16x16.png?f48 51w" sizes="calc(1px"> ref sizes="1px" (standards mode) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
     115FAIL <img srcset="/images/green-1x1.png?f49 50w, /images/green-16x16.png?f49 51w" sizes="(min-width:0) calc(1px"> ref sizes="1px" (standards mode) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
    116116PASS <img srcset="/images/green-1x1.png?f2 50w, /images/green-16x16.png?f2 51w" sizes=""> ref sizes="100vw" (standards mode)
    117117PASS <img srcset="/images/green-1x1.png?f3 50w, /images/green-16x16.png?f3 51w" sizes=","> ref sizes="100vw" (standards mode)
     
    179179PASS <img srcset="/images/green-1x1.png?e15 50w, /images/green-16x16.png?e15 51w" sizes="0.1cm"> ref sizes="1px" (quirks mode)
    180180PASS <img srcset="/images/green-1x1.png?e16 50w, /images/green-16x16.png?e16 51w" sizes="1mm"> ref sizes="1px" (quirks mode)
    181 PASS <img srcset="/images/green-1x1.png?e17 50w, /images/green-16x16.png?e17 51w" sizes="1q"> ref sizes="1px" (quirks mode)
     181FAIL <img srcset="/images/green-1x1.png?e17 50w, /images/green-16x16.png?e17 51w" sizes="1q"> ref sizes="1px" (quirks mode) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
    182182PASS <img srcset="/images/green-1x1.png?e18 50w, /images/green-16x16.png?e18 51w" sizes="0.01in"> ref sizes="1px" (quirks mode)
    183183PASS <img srcset="/images/green-1x1.png?e19 50w, /images/green-16x16.png?e19 51w" sizes="0.1pc"> ref sizes="1px" (quirks mode)
     
    200200PASS <img srcset="/images/green-1x1.png?e36 50w, /images/green-16x16.png?e36 51w" sizes="calc(1px)"> ref sizes="1px" (quirks mode)
    201201PASS <img srcset="/images/green-1x1.png?e37 50w, /images/green-16x16.png?e37 51w" sizes="(min-width:0) calc(1px)"> ref sizes="1px" (quirks mode)
    202 PASS <img srcset="/images/green-1x1.png?e38 50w, /images/green-16x16.png?e38 51w" sizes="(min-width:calc(0)) 1px"> ref sizes="1px" (quirks mode)
     202FAIL <img srcset="/images/green-1x1.png?e38 50w, /images/green-16x16.png?e38 51w" sizes="(min-width:calc(0)) 1px"> ref sizes="1px" (quirks mode) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
    203203PASS <img srcset="/images/green-1x1.png?e39 50w, /images/green-16x16.png?e39 51w" sizes="(min-width:0) 1px, 100vw"> ref sizes="1px" (quirks mode)
    204204PASS <img srcset="/images/green-1x1.png?e40 50w, /images/green-16x16.png?e40 51w" sizes="(min-width:0) 1px, (min-width:0) 100vw, 100vw"> ref sizes="1px" (quirks mode)
     
    219219PASS <img srcset="/images/green-1x1.png?e55 50w, /images/green-16x16.png?e55 51w" sizes="unknown-media-type 100vw, 1px"> ref sizes="1px" (quirks mode)
    220220PASS <img srcset="/images/green-1x1.png?e56 50w, /images/green-16x16.png?e56 51w" sizes="not unknown-media-type 100vw, 1px"> ref sizes="1px" (quirks mode)
    221 PASS <img srcset="/images/green-1x1.png?e57 50w, /images/green-16x16.png?e57 51w" sizes="(min-width:0) or (min-width:0) 1px"> ref sizes="1px" (quirks mode)
    222 PASS <img srcset="/images/green-1x1.png?e58 50w, /images/green-16x16.png?e58 51w" sizes="(min-width:0) or (unknown-mf-name) 1px"> ref sizes="1px" (quirks mode)
    223 PASS <img srcset="/images/green-1x1.png?e59 50w, /images/green-16x16.png?e59 51w" sizes="(min-width:0) or (min-width:unknown-mf-value) 1px"> ref sizes="1px" (quirks mode)
    224 PASS <img srcset="/images/green-1x1.png?e60 50w, /images/green-16x16.png?e60 51w" sizes="(min-width:0) or (min-width:-1px) 1px"> ref sizes="1px" (quirks mode)
    225 PASS <img srcset="/images/green-1x1.png?e61 50w, /images/green-16x16.png?e61 51w" sizes="(min-width:0) or (unknown &quot;general-enclosed&quot;) 1px"> ref sizes="1px" (quirks mode)
    226 PASS <img srcset="/images/green-1x1.png?e62 50w, /images/green-16x16.png?e62 51w" sizes="(min-width:0) or unknown-general-enclosed(foo) 1px"> ref sizes="1px" (quirks mode)
     221FAIL <img srcset="/images/green-1x1.png?e57 50w, /images/green-16x16.png?e57 51w" sizes="(min-width:0) or (min-width:0) 1px"> ref sizes="1px" (quirks mode) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
     222FAIL <img srcset="/images/green-1x1.png?e58 50w, /images/green-16x16.png?e58 51w" sizes="(min-width:0) or (unknown-mf-name) 1px"> ref sizes="1px" (quirks mode) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
     223FAIL <img srcset="/images/green-1x1.png?e59 50w, /images/green-16x16.png?e59 51w" sizes="(min-width:0) or (min-width:unknown-mf-value) 1px"> ref sizes="1px" (quirks mode) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
     224FAIL <img srcset="/images/green-1x1.png?e60 50w, /images/green-16x16.png?e60 51w" sizes="(min-width:0) or (min-width:-1px) 1px"> ref sizes="1px" (quirks mode) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
     225FAIL <img srcset="/images/green-1x1.png?e61 50w, /images/green-16x16.png?e61 51w" sizes="(min-width:0) or (unknown &quot;general-enclosed&quot;) 1px"> ref sizes="1px" (quirks mode) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
     226FAIL <img srcset="/images/green-1x1.png?e62 50w, /images/green-16x16.png?e62 51w" sizes="(min-width:0) or unknown-general-enclosed(foo) 1px"> ref sizes="1px" (quirks mode) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
    227227PASS <img srcset="/images/green-1x1.png?e63 50w, /images/green-16x16.png?e63 51w" sizes="(min-width:0) or (!) 100vw, 1px"> ref sizes="1px" (quirks mode)
    228228PASS <img srcset="/images/green-1x1.png?e64 50w, /images/green-16x16.png?e64 51w" sizes="(min-width:0) or unknown-media-type 100vw, 1px"> ref sizes="1px" (quirks mode)
     
    268268PASS <img srcset="/images/green-1x1.png?e104 50w, /images/green-16x16.png?e104 51w" sizes="(unknown-general-enclosed !) 100vw, 1px"> ref sizes="1px" (quirks mode)
    269269PASS <img srcset="/images/green-1x1.png?e105 50w, /images/green-16x16.png?e105 51w" sizes="not (unknown-general-enclosed !) 100vw, 1px"> ref sizes="1px" (quirks mode)
    270 PASS <img srcset="/images/green-1x1.png?e106 50w, /images/green-16x16.png?e106 51w" sizes="(min-width:0) or (unknown-general-enclosed !) 1px"> ref sizes="1px" (quirks mode)
     270FAIL <img srcset="/images/green-1x1.png?e106 50w, /images/green-16x16.png?e106 51w" sizes="(min-width:0) or (unknown-general-enclosed !) 1px"> ref sizes="1px" (quirks mode) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
    271271PASS <img srcset="/images/green-1x1.png?e107 50w, /images/green-16x16.png?e107 51w" sizes="not ((min-width:0) or (unknown &quot;general-enclosed&quot;)) 100vw, 1px"> ref sizes="1px" (quirks mode)
    272272PASS <img srcset="/images/green-1x1.png?e108 50w, /images/green-16x16.png?e108 51w" sizes="(max-width:0) or (unknown-general-enclosed !) 100vw, 1px"> ref sizes="1px" (quirks mode)
    273273PASS <img srcset="/images/green-1x1.png?e109 50w, /images/green-16x16.png?e109 51w" sizes="not ((max-width:0) or (unknown &quot;general-enclosed&quot;)) 100vw, 1px"> ref sizes="1px" (quirks mode)
    274 PASS <img srcset="/images/green-1x1.png?f48 50w, /images/green-16x16.png?f48 51w" sizes="calc(1px"> ref sizes="1px" (quirks mode)
    275 PASS <img srcset="/images/green-1x1.png?f49 50w, /images/green-16x16.png?f49 51w" sizes="(min-width:0) calc(1px"> ref sizes="1px" (quirks mode)
     274FAIL <img srcset="/images/green-1x1.png?f48 50w, /images/green-16x16.png?f48 51w" sizes="calc(1px"> ref sizes="1px" (quirks mode) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
     275FAIL <img srcset="/images/green-1x1.png?f49 50w, /images/green-16x16.png?f49 51w" sizes="(min-width:0) calc(1px"> ref sizes="1px" (quirks mode) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
    276276PASS <img srcset="/images/green-1x1.png?f2 50w, /images/green-16x16.png?f2 51w" sizes=""> ref sizes="100vw" (quirks mode)
    277277PASS <img srcset="/images/green-1x1.png?f3 50w, /images/green-16x16.png?f3 51w" sizes=","> ref sizes="100vw" (quirks mode)
     
    339339PASS <img srcset="/images/green-1x1.png?e15 50w, /images/green-16x16.png?e15 51w" sizes="0.1cm"> ref sizes="1px" (display:none)
    340340PASS <img srcset="/images/green-1x1.png?e16 50w, /images/green-16x16.png?e16 51w" sizes="1mm"> ref sizes="1px" (display:none)
    341 PASS <img srcset="/images/green-1x1.png?e17 50w, /images/green-16x16.png?e17 51w" sizes="1q"> ref sizes="1px" (display:none)
     341FAIL <img srcset="/images/green-1x1.png?e17 50w, /images/green-16x16.png?e17 51w" sizes="1q"> ref sizes="1px" (display:none) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
    342342PASS <img srcset="/images/green-1x1.png?e18 50w, /images/green-16x16.png?e18 51w" sizes="0.01in"> ref sizes="1px" (display:none)
    343343PASS <img srcset="/images/green-1x1.png?e19 50w, /images/green-16x16.png?e19 51w" sizes="0.1pc"> ref sizes="1px" (display:none)
     
    360360PASS <img srcset="/images/green-1x1.png?e36 50w, /images/green-16x16.png?e36 51w" sizes="calc(1px)"> ref sizes="1px" (display:none)
    361361PASS <img srcset="/images/green-1x1.png?e37 50w, /images/green-16x16.png?e37 51w" sizes="(min-width:0) calc(1px)"> ref sizes="1px" (display:none)
    362 PASS <img srcset="/images/green-1x1.png?e38 50w, /images/green-16x16.png?e38 51w" sizes="(min-width:calc(0)) 1px"> ref sizes="1px" (display:none)
     362FAIL <img srcset="/images/green-1x1.png?e38 50w, /images/green-16x16.png?e38 51w" sizes="(min-width:calc(0)) 1px"> ref sizes="1px" (display:none) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
    363363PASS <img srcset="/images/green-1x1.png?e39 50w, /images/green-16x16.png?e39 51w" sizes="(min-width:0) 1px, 100vw"> ref sizes="1px" (display:none)
    364364PASS <img srcset="/images/green-1x1.png?e40 50w, /images/green-16x16.png?e40 51w" sizes="(min-width:0) 1px, (min-width:0) 100vw, 100vw"> ref sizes="1px" (display:none)
     
    379379PASS <img srcset="/images/green-1x1.png?e55 50w, /images/green-16x16.png?e55 51w" sizes="unknown-media-type 100vw, 1px"> ref sizes="1px" (display:none)
    380380PASS <img srcset="/images/green-1x1.png?e56 50w, /images/green-16x16.png?e56 51w" sizes="not unknown-media-type 100vw, 1px"> ref sizes="1px" (display:none)
    381 PASS <img srcset="/images/green-1x1.png?e57 50w, /images/green-16x16.png?e57 51w" sizes="(min-width:0) or (min-width:0) 1px"> ref sizes="1px" (display:none)
    382 PASS <img srcset="/images/green-1x1.png?e58 50w, /images/green-16x16.png?e58 51w" sizes="(min-width:0) or (unknown-mf-name) 1px"> ref sizes="1px" (display:none)
    383 PASS <img srcset="/images/green-1x1.png?e59 50w, /images/green-16x16.png?e59 51w" sizes="(min-width:0) or (min-width:unknown-mf-value) 1px"> ref sizes="1px" (display:none)
    384 PASS <img srcset="/images/green-1x1.png?e60 50w, /images/green-16x16.png?e60 51w" sizes="(min-width:0) or (min-width:-1px) 1px"> ref sizes="1px" (display:none)
    385 PASS <img srcset="/images/green-1x1.png?e61 50w, /images/green-16x16.png?e61 51w" sizes="(min-width:0) or (unknown &quot;general-enclosed&quot;) 1px"> ref sizes="1px" (display:none)
    386 PASS <img srcset="/images/green-1x1.png?e62 50w, /images/green-16x16.png?e62 51w" sizes="(min-width:0) or unknown-general-enclosed(foo) 1px"> ref sizes="1px" (display:none)
     381FAIL <img srcset="/images/green-1x1.png?e57 50w, /images/green-16x16.png?e57 51w" sizes="(min-width:0) or (min-width:0) 1px"> ref sizes="1px" (display:none) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
     382FAIL <img srcset="/images/green-1x1.png?e58 50w, /images/green-16x16.png?e58 51w" sizes="(min-width:0) or (unknown-mf-name) 1px"> ref sizes="1px" (display:none) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
     383FAIL <img srcset="/images/green-1x1.png?e59 50w, /images/green-16x16.png?e59 51w" sizes="(min-width:0) or (min-width:unknown-mf-value) 1px"> ref sizes="1px" (display:none) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
     384FAIL <img srcset="/images/green-1x1.png?e60 50w, /images/green-16x16.png?e60 51w" sizes="(min-width:0) or (min-width:-1px) 1px"> ref sizes="1px" (display:none) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
     385FAIL <img srcset="/images/green-1x1.png?e61 50w, /images/green-16x16.png?e61 51w" sizes="(min-width:0) or (unknown &quot;general-enclosed&quot;) 1px"> ref sizes="1px" (display:none) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
     386FAIL <img srcset="/images/green-1x1.png?e62 50w, /images/green-16x16.png?e62 51w" sizes="(min-width:0) or unknown-general-enclosed(foo) 1px"> ref sizes="1px" (display:none) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
    387387PASS <img srcset="/images/green-1x1.png?e63 50w, /images/green-16x16.png?e63 51w" sizes="(min-width:0) or (!) 100vw, 1px"> ref sizes="1px" (display:none)
    388388PASS <img srcset="/images/green-1x1.png?e64 50w, /images/green-16x16.png?e64 51w" sizes="(min-width:0) or unknown-media-type 100vw, 1px"> ref sizes="1px" (display:none)
     
    428428PASS <img srcset="/images/green-1x1.png?e104 50w, /images/green-16x16.png?e104 51w" sizes="(unknown-general-enclosed !) 100vw, 1px"> ref sizes="1px" (display:none)
    429429PASS <img srcset="/images/green-1x1.png?e105 50w, /images/green-16x16.png?e105 51w" sizes="not (unknown-general-enclosed !) 100vw, 1px"> ref sizes="1px" (display:none)
    430 PASS <img srcset="/images/green-1x1.png?e106 50w, /images/green-16x16.png?e106 51w" sizes="(min-width:0) or (unknown-general-enclosed !) 1px"> ref sizes="1px" (display:none)
     430FAIL <img srcset="/images/green-1x1.png?e106 50w, /images/green-16x16.png?e106 51w" sizes="(min-width:0) or (unknown-general-enclosed !) 1px"> ref sizes="1px" (display:none) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
    431431PASS <img srcset="/images/green-1x1.png?e107 50w, /images/green-16x16.png?e107 51w" sizes="not ((min-width:0) or (unknown &quot;general-enclosed&quot;)) 100vw, 1px"> ref sizes="1px" (display:none)
    432432PASS <img srcset="/images/green-1x1.png?e108 50w, /images/green-16x16.png?e108 51w" sizes="(max-width:0) or (unknown-general-enclosed !) 100vw, 1px"> ref sizes="1px" (display:none)
    433433PASS <img srcset="/images/green-1x1.png?e109 50w, /images/green-16x16.png?e109 51w" sizes="not ((max-width:0) or (unknown &quot;general-enclosed&quot;)) 100vw, 1px"> ref sizes="1px" (display:none)
    434 PASS <img srcset="/images/green-1x1.png?f48 50w, /images/green-16x16.png?f48 51w" sizes="calc(1px"> ref sizes="1px" (display:none)
    435 PASS <img srcset="/images/green-1x1.png?f49 50w, /images/green-16x16.png?f49 51w" sizes="(min-width:0) calc(1px"> ref sizes="1px" (display:none)
     434FAIL <img srcset="/images/green-1x1.png?f48 50w, /images/green-16x16.png?f48 51w" sizes="calc(1px"> ref sizes="1px" (display:none) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
     435FAIL <img srcset="/images/green-1x1.png?f49 50w, /images/green-16x16.png?f49 51w" sizes="(min-width:0) calc(1px"> ref sizes="1px" (display:none) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
    436436PASS <img srcset="/images/green-1x1.png?f2 50w, /images/green-16x16.png?f2 51w" sizes=""> ref sizes="100vw" (display:none)
    437437PASS <img srcset="/images/green-1x1.png?f3 50w, /images/green-16x16.png?f3 51w" sizes=","> ref sizes="100vw" (display:none)
     
    499499PASS <img srcset="/images/green-1x1.png?e15 50w, /images/green-16x16.png?e15 51w" sizes="0.1cm"> ref sizes="1px" (width:1000px)
    500500PASS <img srcset="/images/green-1x1.png?e16 50w, /images/green-16x16.png?e16 51w" sizes="1mm"> ref sizes="1px" (width:1000px)
    501 PASS <img srcset="/images/green-1x1.png?e17 50w, /images/green-16x16.png?e17 51w" sizes="1q"> ref sizes="1px" (width:1000px)
     501FAIL <img srcset="/images/green-1x1.png?e17 50w, /images/green-16x16.png?e17 51w" sizes="1q"> ref sizes="1px" (width:1000px) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
    502502PASS <img srcset="/images/green-1x1.png?e18 50w, /images/green-16x16.png?e18 51w" sizes="0.01in"> ref sizes="1px" (width:1000px)
    503503PASS <img srcset="/images/green-1x1.png?e19 50w, /images/green-16x16.png?e19 51w" sizes="0.1pc"> ref sizes="1px" (width:1000px)
     
    520520PASS <img srcset="/images/green-1x1.png?e36 50w, /images/green-16x16.png?e36 51w" sizes="calc(1px)"> ref sizes="1px" (width:1000px)
    521521PASS <img srcset="/images/green-1x1.png?e37 50w, /images/green-16x16.png?e37 51w" sizes="(min-width:0) calc(1px)"> ref sizes="1px" (width:1000px)
    522 PASS <img srcset="/images/green-1x1.png?e38 50w, /images/green-16x16.png?e38 51w" sizes="(min-width:calc(0)) 1px"> ref sizes="1px" (width:1000px)
     522FAIL <img srcset="/images/green-1x1.png?e38 50w, /images/green-16x16.png?e38 51w" sizes="(min-width:calc(0)) 1px"> ref sizes="1px" (width:1000px) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
    523523PASS <img srcset="/images/green-1x1.png?e39 50w, /images/green-16x16.png?e39 51w" sizes="(min-width:0) 1px, 100vw"> ref sizes="1px" (width:1000px)
    524524PASS <img srcset="/images/green-1x1.png?e40 50w, /images/green-16x16.png?e40 51w" sizes="(min-width:0) 1px, (min-width:0) 100vw, 100vw"> ref sizes="1px" (width:1000px)
     
    539539PASS <img srcset="/images/green-1x1.png?e55 50w, /images/green-16x16.png?e55 51w" sizes="unknown-media-type 100vw, 1px"> ref sizes="1px" (width:1000px)
    540540PASS <img srcset="/images/green-1x1.png?e56 50w, /images/green-16x16.png?e56 51w" sizes="not unknown-media-type 100vw, 1px"> ref sizes="1px" (width:1000px)
    541 PASS <img srcset="/images/green-1x1.png?e57 50w, /images/green-16x16.png?e57 51w" sizes="(min-width:0) or (min-width:0) 1px"> ref sizes="1px" (width:1000px)
    542 PASS <img srcset="/images/green-1x1.png?e58 50w, /images/green-16x16.png?e58 51w" sizes="(min-width:0) or (unknown-mf-name) 1px"> ref sizes="1px" (width:1000px)
    543 PASS <img srcset="/images/green-1x1.png?e59 50w, /images/green-16x16.png?e59 51w" sizes="(min-width:0) or (min-width:unknown-mf-value) 1px"> ref sizes="1px" (width:1000px)
    544 PASS <img srcset="/images/green-1x1.png?e60 50w, /images/green-16x16.png?e60 51w" sizes="(min-width:0) or (min-width:-1px) 1px"> ref sizes="1px" (width:1000px)
    545 PASS <img srcset="/images/green-1x1.png?e61 50w, /images/green-16x16.png?e61 51w" sizes="(min-width:0) or (unknown &quot;general-enclosed&quot;) 1px"> ref sizes="1px" (width:1000px)
    546 PASS <img srcset="/images/green-1x1.png?e62 50w, /images/green-16x16.png?e62 51w" sizes="(min-width:0) or unknown-general-enclosed(foo) 1px"> ref sizes="1px" (width:1000px)
     541FAIL <img srcset="/images/green-1x1.png?e57 50w, /images/green-16x16.png?e57 51w" sizes="(min-width:0) or (min-width:0) 1px"> ref sizes="1px" (width:1000px) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
     542FAIL <img srcset="/images/green-1x1.png?e58 50w, /images/green-16x16.png?e58 51w" sizes="(min-width:0) or (unknown-mf-name) 1px"> ref sizes="1px" (width:1000px) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
     543FAIL <img srcset="/images/green-1x1.png?e59 50w, /images/green-16x16.png?e59 51w" sizes="(min-width:0) or (min-width:unknown-mf-value) 1px"> ref sizes="1px" (width:1000px) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
     544FAIL <img srcset="/images/green-1x1.png?e60 50w, /images/green-16x16.png?e60 51w" sizes="(min-width:0) or (min-width:-1px) 1px"> ref sizes="1px" (width:1000px) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
     545FAIL <img srcset="/images/green-1x1.png?e61 50w, /images/green-16x16.png?e61 51w" sizes="(min-width:0) or (unknown &quot;general-enclosed&quot;) 1px"> ref sizes="1px" (width:1000px) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
     546FAIL <img srcset="/images/green-1x1.png?e62 50w, /images/green-16x16.png?e62 51w" sizes="(min-width:0) or unknown-general-enclosed(foo) 1px"> ref sizes="1px" (width:1000px) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
    547547PASS <img srcset="/images/green-1x1.png?e63 50w, /images/green-16x16.png?e63 51w" sizes="(min-width:0) or (!) 100vw, 1px"> ref sizes="1px" (width:1000px)
    548548PASS <img srcset="/images/green-1x1.png?e64 50w, /images/green-16x16.png?e64 51w" sizes="(min-width:0) or unknown-media-type 100vw, 1px"> ref sizes="1px" (width:1000px)
     
    588588PASS <img srcset="/images/green-1x1.png?e104 50w, /images/green-16x16.png?e104 51w" sizes="(unknown-general-enclosed !) 100vw, 1px"> ref sizes="1px" (width:1000px)
    589589PASS <img srcset="/images/green-1x1.png?e105 50w, /images/green-16x16.png?e105 51w" sizes="not (unknown-general-enclosed !) 100vw, 1px"> ref sizes="1px" (width:1000px)
    590 PASS <img srcset="/images/green-1x1.png?e106 50w, /images/green-16x16.png?e106 51w" sizes="(min-width:0) or (unknown-general-enclosed !) 1px"> ref sizes="1px" (width:1000px)
     590FAIL <img srcset="/images/green-1x1.png?e106 50w, /images/green-16x16.png?e106 51w" sizes="(min-width:0) or (unknown-general-enclosed !) 1px"> ref sizes="1px" (width:1000px) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
    591591PASS <img srcset="/images/green-1x1.png?e107 50w, /images/green-16x16.png?e107 51w" sizes="not ((min-width:0) or (unknown &quot;general-enclosed&quot;)) 100vw, 1px"> ref sizes="1px" (width:1000px)
    592592PASS <img srcset="/images/green-1x1.png?e108 50w, /images/green-16x16.png?e108 51w" sizes="(max-width:0) or (unknown-general-enclosed !) 100vw, 1px"> ref sizes="1px" (width:1000px)
    593593PASS <img srcset="/images/green-1x1.png?e109 50w, /images/green-16x16.png?e109 51w" sizes="not ((max-width:0) or (unknown &quot;general-enclosed&quot;)) 100vw, 1px"> ref sizes="1px" (width:1000px)
    594 PASS <img srcset="/images/green-1x1.png?f48 50w, /images/green-16x16.png?f48 51w" sizes="calc(1px"> ref sizes="1px" (width:1000px)
    595 PASS <img srcset="/images/green-1x1.png?f49 50w, /images/green-16x16.png?f49 51w" sizes="(min-width:0) calc(1px"> ref sizes="1px" (width:1000px)
     594FAIL <img srcset="/images/green-1x1.png?f48 50w, /images/green-16x16.png?f48 51w" sizes="calc(1px"> ref sizes="1px" (width:1000px) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
     595FAIL <img srcset="/images/green-1x1.png?f49 50w, /images/green-16x16.png?f49 51w" sizes="(min-width:0) calc(1px"> ref sizes="1px" (width:1000px) assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "http://localhost:8800/images/green-16x16.png"
    596596PASS <img srcset="/images/green-1x1.png?f2 50w, /images/green-16x16.png?f2 51w" sizes=""> ref sizes="100vw" (width:1000px)
    597597PASS <img srcset="/images/green-1x1.png?f3 50w, /images/green-16x16.png?f3 51w" sizes=","> ref sizes="100vw" (width:1000px)
  • trunk/Source/WebCore/ChangeLog

    r213706 r213711  
     12017-03-10  Antti Koivisto  <antti@apple.com>
     2
     3        imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute.html is unreliable
     4        https://bugs.webkit.org/show_bug.cgi?id=169465
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        It shows all subtests passing but that is a bug. We don't even support all the unit types.
     9        The test occasionally fails when reloading, that failing results are actually the correct ones.
     10
     11        * css/parser/SizesAttributeParser.cpp:
     12        (WebCore::SizesAttributeParser::SizesAttributeParser):
     13
     14            Ensure we have correct size for the iframe before parsing 'sizes' attribute values. The interpretation of
     15            these may depend on the iframe dimensions.
     16
    1172017-03-10  Antoine Quint  <graouts@apple.com>
    218
  • trunk/Source/WebCore/css/parser/SizesAttributeParser.cpp

    r209758 r213711  
    7171    , m_lengthWasSet(false)
    7272{
     73    // Ensure iframes have correct view size.
     74    if (m_document.ownerElement())
     75        m_document.ownerElement()->document().updateLayoutIgnorePendingStylesheets();
     76
    7377    m_isValid = parse(CSSTokenizer(attribute).tokenRange());
    7478}
Note: See TracChangeset for help on using the changeset viewer.