Closed Bug 1290228 Opened 9 years ago Closed 8 years ago

stylo: Media Query support

Categories

(Core :: CSS Parsing and Computation, defect, P5)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: bholley, Unassigned)

References

Details

(Whiteboard: [stylo:m3])

This probably a medium-large task, though it depends on how easily the gecko and servo pieces can be integrated, and how mature servo media query support is. When we do implement this, we'll need Servo handling for methods like nsPresContext::MediaFeatureValuesChanged and similar.
This is a feature that we should track somewhere.
Priority: -- → P3
Whiteboard: [stylo:m3]
I've taken a quick look at this as part of https://github.com/servo/servo/pull/13075. Some notes: * Servo currently only support width expressions, and only with min and max constraints, not equality (should be easy to add though). * Servo resolves percentages with the viewport size, which doesn't make too much sense to me. Also, it uses the initial font size value for relative font units, while in gecko it depends on the zoom if I'm not wrong (this is one of the reasons why the style struct constructors take a presShell dependent value, so this is related to bug 1298588). In general, I
from https://public.etherpad-mozilla.org/p/stylo-taipei : The main difference between how Gecko and Servo handle media feature updates seems to be that Servo traverses the style sheets to find the @media rules to re-run, whereas Gecko only re-evaluates the media queries on the cache result key. We might be able to expose the nsMediaFeatures::features array with bindgen for Rust to look up and call the getters.
Emilio, how much work is remaining here?
Flags: needinfo?(emilio+bugs)
I believe bug 1325878 should be most of the remaining work. Shouldn't be extremely hard, I might have time for poking at it next week.
Flags: needinfo?(emilio+bugs)
(In reply to Emilio Cobos Álvarez [:emilio] from comment #5) > I believe bug 1325878 should be most of the remaining work. Shouldn't be > extremely hard, I might have time for poking at it next week. Sounds good! Thanks for the update.
Priority: P3 → P5
Blocks: 1357296
This should be pretty much fixed now with bug 1357461... Any remaining bits should go in new bugs.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.