Changeset 206140 in webkit


Ignore:
Timestamp:
Sep 19, 2016 9:22:31 PM (8 years ago)
Author:
Chris Dumez
Message:

Add support for HTMLSourceElement.prototype.sizes / HTMLSourceElement.prototype.srcset
https://bugs.webkit.org/show_bug.cgi?id=162244

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline now that more checks are passing.

  • web-platform-tests/html/dom/interfaces-expected.txt:

Source/WebCore:

Add support for HTMLPrototype.prototype.sizes / HTMLPrototype.prototype.srcset:

We already support the corresponding content attributes internally. However, we
are missing the corresponding IDL attributes that are supposed to reflect them.

Chrome and Firefox support them. We already had those IDL attributes on
HTMLImageElement.

No new tests, rebaselined existing test.

  • html/HTMLSourceElement.idl:
Location:
trunk
Files:
4 edited

Legend:

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

    r206131 r206140  
     12016-09-19  Chris Dumez  <cdumez@apple.com>
     2
     3        Add support for HTMLSourceElement.prototype.sizes / HTMLSourceElement.prototype.srcset
     4        https://bugs.webkit.org/show_bug.cgi?id=162244
     5
     6        Reviewed by Alex Christensen.
     7
     8        Rebaseline now that more checks are passing.
     9
     10        * web-platform-tests/html/dom/interfaces-expected.txt:
     11
    1122016-09-19  Chris Dumez  <cdumez@apple.com>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt

    r205743 r206140  
    14061406PASS HTMLHRElement interface: existence and properties of interface prototype object's "constructor" property
    14071407PASS HTMLHRElement interface: attribute align
    1408 FAIL HTMLHRElement interface: attribute color assert_true: The prototype object must have a property "color" expected true got false
     1408PASS HTMLHRElement interface: attribute color
    14091409PASS HTMLHRElement interface: attribute noShade
    14101410PASS HTMLHRElement interface: attribute size
     
    14131413PASS Stringification of document.createElement("hr")
    14141414PASS HTMLHRElement interface: document.createElement("hr") must inherit property "align" with the proper type (0)
    1415 FAIL HTMLHRElement interface: document.createElement("hr") must inherit property "color" with the proper type (1) assert_inherits: property "color" not found in prototype chain
     1415PASS HTMLHRElement interface: document.createElement("hr") must inherit property "color" with the proper type (1)
    14161416PASS HTMLHRElement interface: document.createElement("hr") must inherit property "noShade" with the proper type (2)
    14171417PASS HTMLHRElement interface: document.createElement("hr") must inherit property "size" with the proper type (3)
     
    19511951PASS HTMLSourceElement interface: attribute src
    19521952PASS HTMLSourceElement interface: attribute type
    1953 FAIL HTMLSourceElement interface: attribute srcset assert_true: The prototype object must have a property "srcset" expected true got false
    1954 FAIL HTMLSourceElement interface: attribute sizes assert_true: The prototype object must have a property "sizes" expected true got false
     1953PASS HTMLSourceElement interface: attribute srcset
     1954PASS HTMLSourceElement interface: attribute sizes
    19551955PASS HTMLSourceElement interface: attribute media
    19561956PASS HTMLSourceElement must be primary interface of document.createElement("source")
     
    19581958PASS HTMLSourceElement interface: document.createElement("source") must inherit property "src" with the proper type (0)
    19591959PASS HTMLSourceElement interface: document.createElement("source") must inherit property "type" with the proper type (1)
    1960 FAIL HTMLSourceElement interface: document.createElement("source") must inherit property "srcset" with the proper type (2) assert_inherits: property "srcset" not found in prototype chain
    1961 FAIL HTMLSourceElement interface: document.createElement("source") must inherit property "sizes" with the proper type (3) assert_inherits: property "sizes" not found in prototype chain
     1960PASS HTMLSourceElement interface: document.createElement("source") must inherit property "srcset" with the proper type (2)
     1961PASS HTMLSourceElement interface: document.createElement("source") must inherit property "sizes" with the proper type (3)
    19621962PASS HTMLSourceElement interface: document.createElement("source") must inherit property "media" with the proper type (4)
    19631963PASS HTMLTrackElement interface: existence and properties of interface object
  • trunk/Source/WebCore/ChangeLog

    r206132 r206140  
     12016-09-19  Chris Dumez  <cdumez@apple.com>
     2
     3        Add support for HTMLSourceElement.prototype.sizes / HTMLSourceElement.prototype.srcset
     4        https://bugs.webkit.org/show_bug.cgi?id=162244
     5
     6        Reviewed by Alex Christensen.
     7
     8        Add support for HTMLPrototype.prototype.sizes / HTMLPrototype.prototype.srcset:
     9        - https://html.spec.whatwg.org/#the-source-element
     10
     11        We already support the corresponding content attributes internally. However, we
     12        are missing the corresponding IDL attributes that are supposed to reflect them.
     13
     14        Chrome and Firefox support them. We already had those IDL attributes on
     15        HTMLImageElement.
     16
     17        No new tests, rebaselined existing test.
     18
     19        * html/HTMLSourceElement.idl:
     20
    1212016-09-19  Anders Carlsson  <andersca@apple.com>
    222
  • trunk/Source/WebCore/html/HTMLSourceElement.idl

    r204215 r206140  
    2525
    2626interface HTMLSourceElement : HTMLElement {
    27 [Reflect, URL] attribute USVString src;
    28 attribute DOMString type;
    29 attribute DOMString media;
     27    [Reflect, URL] attribute USVString src;
     28    attribute DOMString type;
     29    [Reflect] attribute USVString srcset;
     30    [Reflect] attribute DOMString sizes;
     31    attribute DOMString media;
    3032};
Note: See TracChangeset for help on using the changeset viewer.