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 upIndexed getter for readonly CSSStyleDeclaration is broken #26178
Comments
|
This should be less work than I initially thought, since c10e839 made it easier to access style data for a node. We'll need the following:
It probably makes sense to generate this map in the same way that we generate CSSStyleDeclaration.webidl, based on the output of the style crate's CSS property generation. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
window.getComputedStyle(document.documentElement)[0]returnsalign-contentin Firefox, butundefinedin Servo.get_property_valuecorrectly has a different codepath for readonly (ie. computed) style declarations, but IndexedGetter (and Length) do not. It shouldn't be too hard to reuse the get_computed_style code path for the indexed getter as long as we can figure out how to map the array indices to property names, but it's not totally clear how to get the length of the computed styles.This also has the effect that
Object.getOwnPropertyNames(window.getComputedStyle(document.documentElement))returns an empty object, and this ends up breaking the MotionMark benchmark's browser detection.