Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCheck if HTMLImageElement.naturalWidth/naturalHeight respect the device pixel ratio #6769
Labels
Comments
|
Specifically, this requires creating a webpage that contains an image, waiting until the image is loaded and using JS to display the values of the naturalWidth/naturalHeight properties of that image element. |
|
Should this go into the test suite, or do you just want an informational report? |
|
I don't believe there's a convenient way to test this automatically, since the DPR is not something that can be set programmatically in a cross-browser fashion (which is what the web-platform-tests are designed to be). |
bors-servo
pushed a commit
that referenced
this issue
Jul 27, 2015
Check if naturalWidth / naturalHeight works w/ DPR
$ ./mach run --device-pixel-ratio=1 tests/html/get-natural-height.html
ALERT: width: 600, height: 254
$ ./mach run --device-pixel-ratio=2 tests/html/get-natural-height.html
ALERT: width: 600, height: 254
$ ./mach run --device-pixel-ratio=.5 tests/html/get-natural-height.html
ALERT: width: 600, height: 254
It doesn't. Answers #6769.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6774)
<!-- Reviewable:end -->
aweinstock314
added a commit
to aweinstock314/servo
that referenced
this issue
Jul 28, 2015
$ ./mach run --device-pixel-ratio=1 tests/html/get-natural-height.html
ALERT: width: 600, height: 254
$ ./mach run --device-pixel-ratio=2 tests/html/get-natural-height.html
ALERT: width: 600, height: 254
$ ./mach run --device-pixel-ratio=.5 tests/html/get-natural-height.html
ALERT: width: 600, height: 254
It doesn't. Answers servo#6769.
huonw
added a commit
to huonw/servo
that referenced
this issue
Jul 30, 2015
$ ./mach run --device-pixel-ratio=1 tests/html/get-natural-height.html
ALERT: width: 600, height: 254
$ ./mach run --device-pixel-ratio=2 tests/html/get-natural-height.html
ALERT: width: 600, height: 254
$ ./mach run --device-pixel-ratio=.5 tests/html/get-natural-height.html
ALERT: width: 600, height: 254
It doesn't. Answers servo#6769.
josiahdaniels
added a commit
to josiahdaniels/servo
that referenced
this issue
Sep 28, 2015
$ ./mach run --device-pixel-ratio=1 tests/html/get-natural-height.html
ALERT: width: 600, height: 254
$ ./mach run --device-pixel-ratio=2 tests/html/get-natural-height.html
ALERT: width: 600, height: 254
$ ./mach run --device-pixel-ratio=.5 tests/html/get-natural-height.html
ALERT: width: 600, height: 254
It doesn't. Answers servo#6769.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This should be easy to figure out by using the "device-pixels-ratio" commandline argument: http://mxr.mozilla.org/servo/source/components/util/opts.rs#278 . If the values for a fully loaded image are not different using two different DPRs, we don't support it yet.