Bug 150230 - Expose HTMLImageElement sizes attribute in IDL
Summary: Expose HTMLImageElement sizes attribute in IDL
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-16 03:45 PDT by Yoav Weiss
Modified: 2015-11-06 03:06 PST (History)
8 users (show)

See Also:


Attachments
Patch (1.45 KB, patch)
2015-10-16 03:48 PDT, Yoav Weiss
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-mavericks (766.91 KB, application/zip)
2015-10-16 04:23 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews105 for mac-mavericks-wk2 (811.63 KB, application/zip)
2015-10-16 04:27 PDT, Build Bot
no flags Details
Patch (5.48 KB, patch)
2015-10-16 06:36 PDT, Yoav Weiss
no flags Details | Formatted Diff | Diff
Patch (5.48 KB, patch)
2015-10-16 06:36 PDT, Yoav Weiss
no flags Details | Formatted Diff | Diff
Patch (52.76 KB, patch)
2015-10-16 17:28 PDT, Yoav Weiss
no flags Details | Formatted Diff | Diff
Patch (52.76 KB, patch)
2015-10-16 17:31 PDT, Yoav Weiss
no flags Details | Formatted Diff | Diff
Patch (5.53 KB, patch)
2015-10-20 06:15 PDT, Yoav Weiss
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yoav Weiss 2015-10-16 03:45:34 PDT
Fix idl error related to the sizes attribute
Comment 1 Yoav Weiss 2015-10-16 03:48:18 PDT
Created attachment 263258 [details]
Patch
Comment 2 Yoav Weiss 2015-10-16 03:49:58 PDT
This change makes sure that sizes support can be properly detected, to avoid polyfills from trying to "polyfill" sizes support when sizes is natively supported.
Comment 3 Build Bot 2015-10-16 04:22:58 PDT
Comment on attachment 263258 [details]
Patch

Attachment 263258 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/295232

New failing tests:
imported/w3c/web-platform-tests/html/dom/interfaces.html
Comment 4 Build Bot 2015-10-16 04:23:01 PDT
Created attachment 263261 [details]
Archive of layout-test-results from ews101 for mac-mavericks

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-mavericks  Platform: Mac OS X 10.9.5
Comment 5 Build Bot 2015-10-16 04:27:20 PDT
Comment on attachment 263258 [details]
Patch

Attachment 263258 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/295239

New failing tests:
imported/w3c/web-platform-tests/html/dom/interfaces.html
Comment 6 Build Bot 2015-10-16 04:27:22 PDT
Created attachment 263262 [details]
Archive of layout-test-results from ews105 for mac-mavericks-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-mavericks-wk2  Platform: Mac OS X 10.9.5
Comment 7 Yoav Weiss 2015-10-16 06:36:11 PDT
Created attachment 263264 [details]
Patch
Comment 8 Yoav Weiss 2015-10-16 06:36:39 PDT
Created attachment 263265 [details]
Patch
Comment 9 Chris Dumez 2015-10-16 09:11:05 PDT
Comment on attachment 263265 [details]
Patch

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

> Source/WebCore/html/HTMLImageElement.idl:-35
> -#if ENABLE_PICTURE_SIZES

If I look at FeatureList.pm, I see:
"""
{ option => "picture-sizes", desc => "Toggle sizes attribute support",
      define => "ENABLE_PICTURE_SIZES", default => 1, value => \$pictureSizesSupport },
"""

Therefore, it looks it is intended for the 'sizes' attributes to be behind the ENABLE_PICTURE_SIZES compile-time flag. Do we really want to expose HTMLImageElement.sizes to the Web for all ports?
Comment 10 Chris Dumez 2015-10-16 09:12:50 PDT
Also, the bug title is not very clear about the behavior change. This patch essentially causes the Mac port (at least) to start exposing HTMLImageElement.sizes by default to the Web. It may be worth starting a discussion on webkit-dev about this.
Comment 11 Benjamin Poulain 2015-10-16 16:12:01 PDT
Comment on attachment 263265 [details]
Patch

R- because of the misleading title.
Comment 12 Benjamin Poulain 2015-10-16 16:13:12 PDT
You need to poke Dean to get the authorization for this.
IIRC, he disabled the attribute because compatibility with some stupid libraries.
Comment 13 Yoav Weiss 2015-10-16 16:53:49 PDT
The `sizes` attribute wasn't supposed to be a part of Dean's patch that removed support for currentSrc, due to a bug in old picturefill libraries. The removal of this attribute from idl as part of that patch was an error, which this patch is fixing.

I'll fix up the title to reflect that.

Also, I think I'll change the flag's name since it's not really doing what its name says it does.
Comment 14 Yoav Weiss 2015-10-16 17:28:10 PDT
Created attachment 263351 [details]
Patch
Comment 15 Yoav Weiss 2015-10-16 17:31:18 PDT
Created attachment 263352 [details]
Patch
Comment 16 Yoav Weiss 2015-10-20 06:15:26 PDT
Created attachment 263576 [details]
Patch
Comment 17 WebKit Commit Bot 2015-11-06 03:06:50 PST
Comment on attachment 263576 [details]
Patch

Clearing flags on attachment: 263576

Committed r192098: <http://trac.webkit.org/changeset/192098>
Comment 18 WebKit Commit Bot 2015-11-06 03:06:57 PST
All reviewed patches have been landed.  Closing bug.