Bug 123832 - Use srcset's pixel density to determine intrinsic size
Summary: Use srcset's pixel density to determine intrinsic size
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
: 126934 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-11-05 14:51 PST by Yoav Weiss
Modified: 2014-02-04 16:04 PST (History)
18 users (show)

See Also:


Attachments
Patch (104.83 KB, patch)
2013-11-05 15:11 PST, Yoav Weiss
no flags Details | Formatted Diff | Diff
Patch (104.92 KB, patch)
2013-11-05 22:54 PST, Yoav Weiss
no flags Details | Formatted Diff | Diff
Patch (104.87 KB, patch)
2013-11-05 23:44 PST, Yoav Weiss
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2 (927.15 KB, application/zip)
2013-11-06 00:47 PST, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion (961.75 KB, application/zip)
2013-11-06 01:17 PST, Build Bot
no flags Details
Patch (112.02 KB, patch)
2013-11-14 16:22 PST, Yoav Weiss
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion (676.39 KB, application/zip)
2013-11-14 17:55 PST, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion (666.70 KB, application/zip)
2013-11-14 18:46 PST, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2 (624.66 KB, application/zip)
2013-11-14 20:25 PST, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2 (622.82 KB, application/zip)
2013-11-14 21:17 PST, Build Bot
no flags Details
Patch (113.41 KB, patch)
2013-11-15 01:41 PST, Yoav Weiss
no flags Details | Formatted Diff | Diff
Patch (113.52 KB, patch)
2013-11-18 01:31 PST, Yoav Weiss
no flags Details | Formatted Diff | Diff
Patch (116.16 KB, patch)
2014-01-29 23:59 PST, Yoav Weiss
no flags Details | Formatted Diff | Diff
Patch (115.14 KB, patch)
2014-01-30 01:41 PST, Yoav Weiss
no flags Details | Formatted Diff | Diff
Patch (115.14 KB, patch)
2014-01-30 04:09 PST, Yoav Weiss
no flags Details | Formatted Diff | Diff
Patch (115.78 KB, patch)
2014-02-04 08:15 PST, Yoav Weiss
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion (666.53 KB, application/zip)
2014-02-04 09:13 PST, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-15 for mac-mountainlion-wk2 (581.09 KB, application/zip)
2014-02-04 10:16 PST, Build Bot
no flags Details
Patch (178.50 KB, patch)
2014-02-04 11:27 PST, Yoav Weiss
no flags Details | Formatted Diff | Diff
Patch (178.51 KB, patch)
2014-02-04 13:41 PST, 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 2013-11-05 14:51:41 PST
Use srcset's pixel density to determine intrinsic size
Comment 1 Yoav Weiss 2013-11-05 15:11:33 PST
Created attachment 216088 [details]
Patch
Comment 2 Yoav Weiss 2013-11-05 15:16:02 PST
The patch is a port of a similar Blink patch: https://codereview.chromium.org/25105004

According to the spec "When an img element has a current pixel density that is not 1.0, the element's image data must be treated as if its resolution, in device pixels per CSS pixels, was the current pixel density."
Comment 3 Yoav Weiss 2013-11-05 22:54:49 PST
Created attachment 216137 [details]
Patch
Comment 4 EFL EWS Bot 2013-11-05 23:03:33 PST
Comment on attachment 216137 [details]
Patch

Attachment 216137 [details] did not pass efl-ews (efl):
Output: http://webkit-queues.appspot.com/results/21748014
Comment 5 EFL EWS Bot 2013-11-05 23:07:10 PST
Comment on attachment 216137 [details]
Patch

Attachment 216137 [details] did not pass efl-wk2-ews (efl-wk2):
Output: http://webkit-queues.appspot.com/results/21818007
Comment 6 kov's GTK+ EWS bot 2013-11-05 23:07:59 PST
Comment on attachment 216137 [details]
Patch

Attachment 216137 [details] did not pass gtk-ews (gtk):
Output: http://webkit-queues.appspot.com/results/21308119
Comment 7 Build Bot 2013-11-05 23:25:47 PST
Comment on attachment 216137 [details]
Patch

Attachment 216137 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/21778009
Comment 8 Build Bot 2013-11-05 23:36:52 PST
Comment on attachment 216137 [details]
Patch

Attachment 216137 [details] did not pass win-ews (win):
Output: http://webkit-queues.appspot.com/results/21858019
Comment 9 Yoav Weiss 2013-11-05 23:44:52 PST
Created attachment 216141 [details]
Patch
Comment 10 Build Bot 2013-11-06 00:47:25 PST
Comment on attachment 216141 [details]
Patch

Attachment 216141 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/21858033

New failing tests:
fast/hidpi/image-srcset-simple-2x.html
fast/hidpi/image-srcset-invalid-inputs-except-one.html
fast/hidpi/image-srcset-fraction.html
fast/hidpi/image-srcset-change-dynamically-from-js-2x.html
fast/hidpi/image-srcset-png-canvas.html
fast/hidpi/image-srcset-src-selection-2x.html
fast/hidpi/image-srcset-invalid-inputs-correct-src.html
fast/hidpi/image-srcset-fraction-1.5x.html
fast/hidpi/image-srcset-relative-svg-canvas-2x.html
fast/hidpi/image-srcset-svg-canvas.html
Comment 11 Build Bot 2013-11-06 00:47:27 PST
Created attachment 216146 [details]
Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-10  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 12 Build Bot 2013-11-06 01:17:14 PST
Comment on attachment 216141 [details]
Patch

Attachment 216141 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/21808039

New failing tests:
fast/hidpi/image-srcset-simple-2x.html
fast/hidpi/image-srcset-invalid-inputs-except-one.html
fast/hidpi/image-srcset-fraction.html
fast/hidpi/image-srcset-change-dynamically-from-js-2x.html
fast/hidpi/image-srcset-png-canvas.html
fast/hidpi/image-srcset-src-selection-2x.html
fast/hidpi/image-srcset-invalid-inputs-correct-src.html
fast/hidpi/image-srcset-fraction-1.5x.html
fast/hidpi/image-srcset-relative-svg-canvas-2x.html
fast/hidpi/image-srcset-svg-canvas.html
Comment 13 Build Bot 2013-11-06 01:17:17 PST
Created attachment 216152 [details]
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-08  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 14 Yoav Weiss 2013-11-14 16:22:25 PST
Created attachment 216996 [details]
Patch
Comment 15 Build Bot 2013-11-14 17:55:07 PST
Comment on attachment 216996 [details]
Patch

Attachment 216996 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/23688089

New failing tests:
fast/hidpi/image-srcset-change-dynamically-from-js-2x.html
fast/hidpi/image-srcset-png-canvas.html
Comment 16 Build Bot 2013-11-14 17:55:09 PST
Created attachment 217002 [details]
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-08  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 17 Build Bot 2013-11-14 18:46:33 PST
Comment on attachment 216996 [details]
Patch

Attachment 216996 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/23638127

New failing tests:
fast/hidpi/image-srcset-change-dynamically-from-js-2x.html
fast/hidpi/image-srcset-png-canvas.html
Comment 18 Build Bot 2013-11-14 18:46:36 PST
Created attachment 217005 [details]
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-07  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 19 Build Bot 2013-11-14 20:25:14 PST
Comment on attachment 216996 [details]
Patch

Attachment 216996 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/23688120

New failing tests:
fast/hidpi/image-srcset-change-dynamically-from-js-2x.html
fast/hidpi/image-srcset-png-canvas.html
Comment 20 Build Bot 2013-11-14 20:25:17 PST
Created attachment 217009 [details]
Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-10  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 21 Build Bot 2013-11-14 21:17:28 PST
Comment on attachment 216996 [details]
Patch

Attachment 216996 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/21718250

New failing tests:
fast/hidpi/image-srcset-change-dynamically-from-js-2x.html
fast/hidpi/image-srcset-png-canvas.html
Comment 22 Build Bot 2013-11-14 21:17:31 PST
Created attachment 217012 [details]
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-12  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 23 Yoav Weiss 2013-11-15 01:41:44 PST
Created attachment 217024 [details]
Patch
Comment 24 Ryosuke Niwa 2013-11-17 23:32:41 PST
Comment on attachment 217024 [details]
Patch

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

> Source/WebCore/ChangeLog:10
> +        Reviewed by NOBODY (OOPS!).

This line should appear before the long description but after the bug url.
Comment 25 Yoav Weiss 2013-11-18 01:31:57 PST
Created attachment 217178 [details]
Patch
Comment 26 Radar WebKit Bug Importer 2014-01-29 13:41:11 PST
<rdar://problem/15939819>
Comment 27 Theresa O'Connor 2014-01-29 13:47:14 PST
*** Bug 126934 has been marked as a duplicate of this bug. ***
Comment 28 Yoav Weiss 2014-01-29 23:59:13 PST
Created attachment 222633 [details]
Patch
Comment 29 Yoav Weiss 2014-01-30 01:41:45 PST
Created attachment 222645 [details]
Patch
Comment 30 Yoav Weiss 2014-01-30 04:09:16 PST
Created attachment 222659 [details]
Patch
Comment 31 Dean Jackson 2014-02-03 14:40:43 PST
Comment on attachment 222659 [details]
Patch

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

Some small things to fix up.

> Source/WebCore/ChangeLog:39543
>  2013-11-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
> -
>          Introduce FILTER_TYPE_CASTS for child filter class

What?

> Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:1209
> +    CachedImage* cachedImage = image->cachedImage();
> +    if (cachedImage) {

I think this should go back to being if (CachedImage* cachedImage = ....)

> LayoutTests/ChangeLog:14
> +        Layout test changes include modifications of existing tests to accomodate the new image dimensions, as well as new tests for this
> +        specific functionality

Nit, missing .

> LayoutTests/ChangeLog:27
> +        * fast/hidpi/image-srcset-invalid-inputs-expected.txt: Added.

I'm confused here - I don't see the actual test, just the expected results. And it's a DRT dump, so probably should be in platform.

> LayoutTests/TestExpectations:62
> +webkit.org/b/124342 fast/hidpi/image-srcset-svg-canvas.html [ Skip ]
> +webkit.org/b/124342 fast/hidpi/image-srcset-svg-canvas-2x.html [ Skip ]
> +webkit.org/b/124349 fast/hidpi/image-srcset-relative-svg-canvas-2x.html [ Skip ]
> +webkit.org/b/124349 fast/hidpi/image-srcset-relative-svg-canvas.html [ Skip ]
> +

Why are you skipping these? Your changelog doesn't mention it. Why skip tests that you're adding in this patch? It might be better to check in failing results.

> LayoutTests/fast/hidpi/image-srcset-invalid-inputs-expected.txt:11
> +layer at (0,0) size 800x600
> +  RenderView at (0,0) size 800x600
> +layer at (0,0) size 800x600
> +  RenderBlock {HTML} at (0,0) size 800x600
> +    RenderBody {BODY} at (8,8) size 784x584
> +      RenderBlock {DIV} at (0,0) size 784x17
> +        RenderText {#text} at (0,0) size 779x17
> +          text run at (0,0) width 779: "This test passes if this img tag below is empty and displays nothing. It ensures that the srcset attribute supports invalid inputs"
> +      RenderBlock (anonymous) at (0,17) size 784x100
> +        RenderImage {IMG} at (0,0) size 100x100
> +        RenderText {#text} at (0,0) size 0x0

See above for comment.
Comment 32 Yoav Weiss 2014-02-04 08:15:19 PST
Created attachment 223120 [details]
Patch
Comment 33 Build Bot 2014-02-04 09:13:46 PST
Comment on attachment 223120 [details]
Patch

Attachment 223120 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/5695200588464128

New failing tests:
fast/hidpi/image-srcset-invalid-inputs.html
Comment 34 Build Bot 2014-02-04 09:13:51 PST
Created attachment 223124 [details]
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-05  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 35 Dean Jackson 2014-02-04 09:27:52 PST
Comment on attachment 223120 [details]
Patch

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

Go for it, once you've fixed the failure. Thanks Yoav!

> LayoutTests/TestExpectations:64
> +webkit.org/b/124342 fast/hidpi/image-srcset-svg-canvas.html [ Skip ]
> +webkit.org/b/124342 fast/hidpi/image-srcset-svg-canvas-2x.html [ Skip ]
> +webkit.org/b/124349 fast/hidpi/image-srcset-relative-svg-canvas-2x.html [ Skip ]
> +webkit.org/b/124349 fast/hidpi/image-srcset-relative-svg-canvas.html [ Skip ]

Maybe we should mark these as failing rather than skipping. That way we won't forget them when we fix the other bugs.
Comment 36 Build Bot 2014-02-04 10:16:17 PST
Comment on attachment 223120 [details]
Patch

Attachment 223120 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/5398243663937536

New failing tests:
fast/hidpi/image-srcset-invalid-inputs.html
Comment 37 Build Bot 2014-02-04 10:16:26 PST
Created attachment 223136 [details]
Archive of layout-test-results from webkit-ews-15 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-15  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 38 Yoav Weiss 2014-02-04 11:27:09 PST
Created attachment 223146 [details]
Patch
Comment 39 Yoav Weiss 2014-02-04 13:41:30 PST
Created attachment 223157 [details]
Patch
Comment 40 WebKit Commit Bot 2014-02-04 16:04:31 PST
Comment on attachment 223157 [details]
Patch

Clearing flags on attachment: 223157

Committed r163415: <http://trac.webkit.org/changeset/163415>
Comment 41 WebKit Commit Bot 2014-02-04 16:04:39 PST
All reviewed patches have been landed.  Closing bug.