<!-- Please describe your changes on the following line: --> Support screen.width/height/availWidth/availHeight using information from glutin. r?@paulrouget Since glutin don't have `availWidth` and `availHeight` information, I let them fallback to `width` and `height`. If that's not acceptable in terms of webcompat, I can remove that part. There are some test failures on wpt css about mutating screen.width/height should throw exception, but I can't reproduce that behavior on other major browser, so I keep them disabled. Also there are some media query issues, but I believe that's due to some test harness problem on my test machine. --- <!-- 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 - [x] These changes fix #18062 (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes in wpt cssom-view - [ ] 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. --> Source-Repo: https://github.com/servo/servo Source-Revision: 504ad4de2a426c2bc70161a9190fddaa8728ead2
15 lines
551 B
Plaintext
15 lines
551 B
Plaintext
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
// http://dev.w3.org/csswg/cssom-view/#the-screen-interface
|
|
[Exposed=Window]
|
|
interface Screen {
|
|
readonly attribute double availWidth;
|
|
readonly attribute double availHeight;
|
|
readonly attribute double width;
|
|
readonly attribute double height;
|
|
readonly attribute unsigned long colorDepth;
|
|
readonly attribute unsigned long pixelDepth;
|
|
};
|