Bug 1951011 Comment 3 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Two questions/bits-of-complexity I see here:
(1) One thing I'm hazy on: once we've given the inner document the `effective_zoom` (and stored it somewhere that makes sense, e.g. on the PresContext or wherever), I'm not where would be the most-sensible-spot to communicate that into the style system.  Maybe you can speak to that and point at a particular spot where we might shove the passed-down `effective_zoom` into style, or reach out to get it from style.

Presumably somewhere in/around here, or somewhere upstream of this:
https://searchfox.org/mozilla-central/rev/81b1c51a6b1cfe1dc2a5c8b39f3346bc1d167790/servo/components/style/properties/properties.mako.rs#2775-2801

(2) It looks like we've got a special `document` keyword which we check for in that^ linked Rust snippet (with `is_document`), which we use to keep scrollbars from being zoomed [here](https://searchfox.org/mozilla-central/rev/81b1c51a6b1cfe1dc2a5c8b39f3346bc1d167790/layout/style/res/scrollbars.css#26-27).  It looks like we need to make sure that keyword keeps resolving to `1` (or more specifically, we need to be sure that scrollbars in the inner document don't get scaled by the passed-down `zoom` from the outer document).
Two questions/bits-of-complexity I see here:
(1) One thing I'm hazy on: once we've somehow given the inner document the `effective_zoom` (and stored it somewhere that makes sense, e.g. on the PresContext or wherever), I'm not where would be the most-sensible-spot to communicate that into the style system.  Maybe you can speak to that and point at a particular spot where we might shove the passed-down `effective_zoom` into style, or reach out to get it from style.

Presumably somewhere in/around here, or somewhere upstream of this:
https://searchfox.org/mozilla-central/rev/81b1c51a6b1cfe1dc2a5c8b39f3346bc1d167790/servo/components/style/properties/properties.mako.rs#2775-2801

(2) It looks like we've got a special `document` keyword which we check for in that^ linked Rust snippet (with `is_document`), which we use to keep scrollbars from being zoomed [here](https://searchfox.org/mozilla-central/rev/81b1c51a6b1cfe1dc2a5c8b39f3346bc1d167790/layout/style/res/scrollbars.css#26-27).  It looks like we need to make sure that keyword keeps resolving to `1` (or more specifically, we need to be sure that scrollbars in the inner document don't get scaled by the passed-down `zoom` from the outer document).
Two questions/bits-of-complexity I see here:
(1) One thing I'm hazy on: once we've somehow given the inner document the `effective_zoom` from the iframe (and stored it somewhere that makes sense, e.g. on the PresContext or wherever), I'm not where would be the most-sensible-spot to communicate that into the style system.  Maybe you can speak to that and point at a particular spot where we might shove the passed-down `effective_zoom` into style, or reach out to get it from style.

Presumably somewhere in/around here, or somewhere upstream of this:
https://searchfox.org/mozilla-central/rev/81b1c51a6b1cfe1dc2a5c8b39f3346bc1d167790/servo/components/style/properties/properties.mako.rs#2775-2801

(2) It looks like we've got a special `document` keyword which we check for in that^ linked Rust snippet (with `is_document`), which we use to keep scrollbars from being zoomed [here](https://searchfox.org/mozilla-central/rev/81b1c51a6b1cfe1dc2a5c8b39f3346bc1d167790/layout/style/res/scrollbars.css#26-27).  It looks like we need to make sure that keyword keeps resolving to `1` (or more specifically, we need to be sure that scrollbars in the inner document don't get scaled by the passed-down `zoom` from the outer document).
Two questions/bits-of-complexity I see here:
(1) One thing I'm hazy on: once we've somehow given the inner document the `effective_zoom` from the iframe (and stored it somewhere that makes sense, e.g. on the PresContext or wherever), I'm not where would be the most-sensible-spot to communicate that into the style system.  Maybe you can speak to that and point at a particular spot where we might shove the passed-down `effective_zoom` into style, or reach out to get it from style.

Presumably somewhere in/around here, or somewhere upstream of this:
https://searchfox.org/mozilla-central/rev/81b1c51a6b1cfe1dc2a5c8b39f3346bc1d167790/servo/components/style/properties/properties.mako.rs#2775-2801

(2) It looks like we've got a special `document` keyword (from [here](https://hg.mozilla.org/mozilla-central/rev/3203468939abba2f75ed2c29203b6caa1b50e9ad)) which we check for in that^ linked Rust snippet (with `is_document`), which we use to keep scrollbars from being zoomed [here](https://searchfox.org/mozilla-central/rev/81b1c51a6b1cfe1dc2a5c8b39f3346bc1d167790/layout/style/res/scrollbars.css#26-27).  It looks like we need to make sure that keyword keeps resolving to `1` (or more specifically, we need to be sure that scrollbars in the inner document don't get scaled by the passed-down `zoom` from the outer document).  (We also might want to rename that keyword for clarity given that it's internal-only, since it won't be "the default zoom for our document" anymore, once we implement this special mechanism for subdocuments to take on a passed-down non-1 default zoom value.)

Back to Bug 1951011 Comment 3