mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #18024 - bradwerth:mediatypeAtom, r=emilio
Rework MediaType to be an atom-based struct instead of an enum. MozReview-Commit-ID: 1Tfrs9PBkhA <!-- Please describe your changes on the following line: --> https://bugzilla.mozilla.org/show_bug.cgi?id=1371395 https://reviewboard.mozilla.org/r/163194/ --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18024) <!-- Reviewable:end -->
This commit is contained in:
commit
faf5b1f797
9 changed files with 92 additions and 72 deletions
|
@ -77,7 +77,7 @@ impl MediaQueryList {
|
|||
if let Some(window_size) = self.document.window().window_size() {
|
||||
let viewport_size = window_size.initial_viewport;
|
||||
let device_pixel_ratio = window_size.device_pixel_ratio;
|
||||
let device = Device::new(MediaType::Screen, viewport_size, device_pixel_ratio);
|
||||
let device = Device::new(MediaType::screen(), viewport_size, device_pixel_ratio);
|
||||
self.media_query_list.evaluate(&device, self.document.quirks_mode())
|
||||
} else {
|
||||
false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue