mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Fix benchmark that was no longer building.
This commit is contained in:
parent
d5b49f14da
commit
e6a1e484c2
2 changed files with 10 additions and 5 deletions
|
@ -3,10 +3,12 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use cssparser::{Parser, ParserInput};
|
||||
use euclid::{Scale, Size2D};
|
||||
use servo_arc::Arc;
|
||||
use style::custom_properties::{
|
||||
CssEnvironment, CustomPropertiesBuilder, CustomPropertiesMap, Name, SpecifiedValue,
|
||||
CustomPropertiesBuilder, CustomPropertiesMap, Name, SpecifiedValue,
|
||||
};
|
||||
use style::media_queries::{Device, MediaType};
|
||||
use style::properties::{CustomDeclaration, CustomDeclarationValue};
|
||||
use style::stylesheets::Origin;
|
||||
use test::{self, Bencher};
|
||||
|
@ -26,8 +28,12 @@ fn cascade(
|
|||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let env = CssEnvironment;
|
||||
let mut builder = CustomPropertiesBuilder::new(inherited, &env);
|
||||
let device = Device::new(
|
||||
MediaType::screen(),
|
||||
Size2D::new(800., 600.),
|
||||
Scale::new(1.0),
|
||||
);
|
||||
let mut builder = CustomPropertiesBuilder::new(inherited, &device);
|
||||
|
||||
for declaration in &declarations {
|
||||
builder.cascade(declaration, Origin::Author);
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use cssparser::{Parser, ParserInput};
|
||||
use euclid::Scale;
|
||||
use euclid::Size2D;
|
||||
use euclid::{Scale, Size2D};
|
||||
use servo_arc::Arc;
|
||||
use servo_config::set_pref;
|
||||
use servo_url::ServoUrl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue