[webkit-reviews] review granted: [Bug 85332] Add css3-images image-resolution (dppx only) : [Attachment 146448] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 8 09:29:32 PDT 2012


Tony Chang <tony at chromium.org> has granted David Barr
<davidbarr at chromium.org>'s request for review:
Bug 85332: Add css3-images image-resolution (dppx only)
https://bugs.webkit.org/show_bug.cgi?id=85332

Attachment 146448: Patch
https://bugs.webkit.org/attachment.cgi?id=146448&action=review

------- Additional Comments from Tony Chang <tony at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=146448&action=review


The code looks fine, just some questions/comments about the test.

> LayoutTests/fast/css/image-resolution/image-resolution-expected.txt:3
> +On success, you will see a series of "PASS" messages, followed by "TEST
COMPLETE".

Why don't I see TEST COMPLETE in the output?

> LayoutTests/fast/css/image-resolution/resources/image-resolution.js:1
> +if (window.layoutTestController) {

Is the plan is to use this js file in multiple tests?  If not, we should just
inline it in the .html file.

> LayoutTests/fast/css/image-resolution/resources/image-resolution.js:2
> +    layoutTestController.dumpAsText();

Nit: This is called by js-test-pre.js.

> LayoutTests/fast/css/image-resolution/resources/image-resolution.js:26
> +	   var cssPxPerIn = 96;
> +	   if (unit === 'dpi')
> +	       dppx = value / cssPxPerIn;
> +	   var cmPerIn = 2.54;
> +	   if (unit === 'dpcm')
> +	       dppx = value / (cssPxPerIn / cmPerIn);

Nit: I would use 'else if' since these are multually exclusive.

> LayoutTests/fast/css/image-resolution/resources/image-resolution.js:59
> +    Array.prototype.forEach.call(resolutions, function(test) {

Nit: resolutions.forEach(function(test) {


More information about the webkit-reviews mailing list