Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cssom-view] Return real values for colorDepth and pixelDepth (closes #993) #994

Merged
merged 1 commit into from Mar 13, 2017

Conversation

mounirlamouri
Copy link
Member

@mounirlamouri mounirlamouri commented Jan 31, 2017

Fixes #993

@mounirlamouri
Copy link
Member Author

@zcorpan PTAL

@mounirlamouri
Copy link
Member Author

Thank you for the comments @dbaron. I have applied them apart from the example one: do you have recommendations for a better, less misleading, example? In practices, I would be surprised if the non-comforming implementations also implement the css color gamut which hopefully makes the example not insane in practice but I would be happy to put something else in the spec :)

@dbaron
Copy link
Member

dbaron commented Mar 9, 2017

While that example itself is fine because such implementations wouldn't match the p3 media query, people might start from that code and modify it to do other things.

Would the high-gamut devices report 48? If so, maybe it's better to test >= 48?

@mounirlamouri
Copy link
Member Author

I've updated the example to use >= 48. It actually makes a lot of sense :)

I've also removed the 24 clamping following discussion with @dbaron and @zcorpan on IRC.

output device, it should return the closest estimation such as, for example, the
number of bits used by the frame buffer sent to the display or any internal
representation that would be the closest to the value the output device would
use. The user agent must return the same value for these attributes and the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same value seems wrong. The color media query is per component, whereas here is all components together. There's also this complication:

If different color components are represented by different number of bits, the smallest number is used.

I suppose an integer-divide by 3 should give the same value as the color media query?

@mounirlamouri
Copy link
Member Author

@zcorpan, I've rephrased. WDYT?

@zcorpan
Copy link
Member

zcorpan commented Mar 10, 2017

Looks good to me.

@mounirlamouri
Copy link
Member Author

@zcorpan I assume we need @dbaron's lgtm now? :) Is there someone else who should have a look?

@zcorpan
Copy link
Member

zcorpan commented Mar 10, 2017

Final review from @dbaron would be nice.

@zcorpan zcorpan requested a review from dbaron March 10, 2017 10:41
@dbaron dbaron merged commit f165859 into w3c:master Mar 13, 2017
@mounirlamouri mounirlamouri deleted the colorpixeldepth branch March 13, 2017 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants