mirror of
https://github.com/servo/servo.git
synced 2025-09-01 02:28:21 +01:00
Only restyle viewport-relative nodes on viewport size change
This commit is contained in:
parent
e7a55ae55e
commit
f754cacbd5
28 changed files with 515 additions and 11 deletions
15
tests/unit/style/value.rs
Normal file
15
tests/unit/style/value.rs
Normal file
|
@ -0,0 +1,15 @@
|
|||
/* 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/. */
|
||||
|
||||
use app_units::Au;
|
||||
use style::values::HasViewportPercentage;
|
||||
use style::values::specified::{ViewportPercentageLength, Length};
|
||||
|
||||
#[test]
|
||||
fn length_has_viewport_percentage() {
|
||||
let l = Length::ViewportPercentage(ViewportPercentageLength::Vw(100.));
|
||||
assert!(l.has_viewport_percentage());
|
||||
let l = Length::Absolute(Au(100));
|
||||
assert!(!l.has_viewport_percentage());
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue