Changeset 192098 in webkit


Ignore:
Timestamp:
Nov 6, 2015 3:05:55 AM (8 years ago)
Author:
yoav@yoav.ws
Message:

Expose HTMLImageElement sizes attribute in IDL
https://bugs.webkit.org/show_bug.cgi?id=150230

Reviewed by Darin Adler.

No new tests, but fixed test expectations for exposed interfaces.

  • html/HTMLImageElement.idl: Make sure that sizes is exposed as an IDL attribute, to ensure proper feature detection of sizes support.
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt

    r191981 r192098  
    222222CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'src' on a non-HTMLImageElement object.
    223223CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'srcset' on a non-HTMLImageElement object.
     224CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'sizes' on a non-HTMLImageElement object.
    224225CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'crossOrigin' on a non-HTMLImageElement object.
    225226CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'useMap' on a non-HTMLImageElement object.
     
    27222723    [native code]
    27232724}" did not throw
    2724 FAIL HTMLImageElement interface: attribute sizes assert_true: The prototype object must have a property "sizes" expected true got false
     2725FAIL HTMLImageElement interface: attribute sizes assert_throws: getting property on prototype object must throw TypeError function "function () {
     2726    [native code]
     2727}" did not throw
    27252728FAIL HTMLImageElement interface: attribute crossOrigin assert_throws: getting property on prototype object must throw TypeError function "function () {
    27262729    [native code]
     
    27742777PASS HTMLImageElement interface: document.createElement("img") must inherit property "src" with the proper type (1)
    27752778PASS HTMLImageElement interface: document.createElement("img") must inherit property "srcset" with the proper type (2)
    2776 FAIL HTMLImageElement interface: document.createElement("img") must inherit property "sizes" with the proper type (3) assert_inherits: property "sizes" not found in prototype chain
     2779PASS HTMLImageElement interface: document.createElement("img") must inherit property "sizes" with the proper type (3)
    27772780PASS HTMLImageElement interface: document.createElement("img") must inherit property "crossOrigin" with the proper type (4)
    27782781PASS HTMLImageElement interface: document.createElement("img") must inherit property "useMap" with the proper type (5)
     
    27962799PASS HTMLImageElement interface: new Image() must inherit property "src" with the proper type (1)
    27972800PASS HTMLImageElement interface: new Image() must inherit property "srcset" with the proper type (2)
    2798 FAIL HTMLImageElement interface: new Image() must inherit property "sizes" with the proper type (3) assert_inherits: property "sizes" not found in prototype chain
     2801PASS HTMLImageElement interface: new Image() must inherit property "sizes" with the proper type (3)
    27992802PASS HTMLImageElement interface: new Image() must inherit property "crossOrigin" with the proper type (4)
    28002803PASS HTMLImageElement interface: new Image() must inherit property "useMap" with the proper type (5)
  • trunk/Source/WebCore/ChangeLog

    r192094 r192098  
     12015-11-06  Yoav Weiss  <yoav@yoav.ws>
     2
     3        Expose HTMLImageElement sizes attribute in IDL
     4        https://bugs.webkit.org/show_bug.cgi?id=150230
     5
     6        Reviewed by Darin Adler.
     7
     8        No new tests, but fixed test expectations for exposed interfaces.
     9
     10        * html/HTMLImageElement.idl: Make sure that `sizes` is exposed as an IDL attribute, to ensure proper feature detection of sizes support.
     11
    1122015-11-05  Carlos Garcia Campos  <cgarcia@igalia.com>
    213
  • trunk/Source/WebCore/html/HTMLImageElement.idl

    r191334 r192098  
    3333    [Reflect, URL] attribute DOMString src;
    3434    [Reflect] attribute DOMString srcset;
     35    [Reflect] attribute DOMString sizes;
    3536#if ENABLE_CURRENTSRC
    36     [Reflect] attribute DOMString sizes;
    3737    readonly attribute DOMString currentSrc;
    3838#endif
Note: See TracChangeset for help on using the changeset viewer.