mirror of
https://github.com/servo/servo.git
synced 2025-08-17 11:25:35 +01:00
Auto merge of #15700 - glennw:zoom-wip-2, r=mbrubeck
Introduce CSSPixel as a replacement for ViewportPx and PagePx. <!-- 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/15700) <!-- Reviewable:end -->
This commit is contained in:
commit
1d13e6a2df
16 changed files with 81 additions and 92 deletions
|
@ -3,7 +3,6 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use cssparser::Parser;
|
||||
use euclid::scale_factor::ScaleFactor;
|
||||
use euclid::size::TypedSize2D;
|
||||
use media_queries::CSSErrorReporterTest;
|
||||
use servo_config::prefs::{PREFS, PrefValue};
|
||||
|
@ -16,6 +15,7 @@ use style::values::specified::LengthOrPercentageOrAuto::{self, Auto};
|
|||
use style::values::specified::NoCalcLength::{self, ViewportPercentage};
|
||||
use style::values::specified::ViewportPercentageLength::Vw;
|
||||
use style::viewport::*;
|
||||
use style_traits::PinchZoomFactor;
|
||||
use style_traits::viewport::*;
|
||||
|
||||
macro_rules! stylesheet {
|
||||
|
@ -295,7 +295,7 @@ fn constrain_viewport() {
|
|||
Some(ViewportConstraints {
|
||||
size: initial_viewport,
|
||||
|
||||
initial_zoom: ScaleFactor::new(1.),
|
||||
initial_zoom: PinchZoomFactor::new(1.),
|
||||
min_zoom: None,
|
||||
max_zoom: None,
|
||||
|
||||
|
@ -307,7 +307,7 @@ fn constrain_viewport() {
|
|||
Some(ViewportConstraints {
|
||||
size: initial_viewport,
|
||||
|
||||
initial_zoom: ScaleFactor::new(1.),
|
||||
initial_zoom: PinchZoomFactor::new(1.),
|
||||
min_zoom: None,
|
||||
max_zoom: None,
|
||||
|
||||
|
@ -322,7 +322,7 @@ fn constrain_viewport() {
|
|||
Some(ViewportConstraints {
|
||||
size: initial_viewport,
|
||||
|
||||
initial_zoom: ScaleFactor::new(1.),
|
||||
initial_zoom: PinchZoomFactor::new(1.),
|
||||
min_zoom: None,
|
||||
max_zoom: None,
|
||||
|
||||
|
@ -336,7 +336,7 @@ fn constrain_viewport() {
|
|||
Some(ViewportConstraints {
|
||||
size: TypedSize2D::new(320., 240.),
|
||||
|
||||
initial_zoom: ScaleFactor::new(1.),
|
||||
initial_zoom: PinchZoomFactor::new(1.),
|
||||
min_zoom: None,
|
||||
max_zoom: None,
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue