mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +01:00
stylo: Disable text-zoom for <svg:text>
This commit is contained in:
parent
fb107d8cd5
commit
0e3f7d782b
5 changed files with 94 additions and 1 deletions
|
@ -2057,7 +2057,7 @@ fn static_assert() {
|
|||
font-variant-east-asian font-variant-ligatures
|
||||
font-variant-numeric font-language-override
|
||||
font-feature-settings font-variation-settings
|
||||
-moz-min-font-size-ratio"""
|
||||
-moz-min-font-size-ratio -x-text-zoom"""
|
||||
%>
|
||||
<%self:impl_trait style_struct_name="Font"
|
||||
skip_longhands="${skip_font_longhands}"
|
||||
|
@ -2231,6 +2231,12 @@ fn static_assert() {
|
|||
)
|
||||
}
|
||||
|
||||
pub fn unzoom_fonts(&mut self, device: &Device) {
|
||||
self.gecko.mSize = device.unzoom_text(Au(self.gecko.mSize)).0;
|
||||
self.gecko.mScriptUnconstrainedSize = device.unzoom_text(Au(self.gecko.mScriptUnconstrainedSize)).0;
|
||||
self.gecko.mFont.size = device.unzoom_text(Au(self.gecko.mFont.size)).0;
|
||||
}
|
||||
|
||||
pub fn set_font_size(&mut self, v: longhands::font_size::computed_value::T) {
|
||||
self.gecko.mSize = v.0;
|
||||
self.gecko.mScriptUnconstrainedSize = v.0;
|
||||
|
@ -2465,6 +2471,21 @@ fn static_assert() {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
pub fn set__x_text_zoom(&mut self, v: longhands::_x_text_zoom::computed_value::T) {
|
||||
self.gecko.mAllowZoom = v.0;
|
||||
}
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
pub fn copy__x_text_zoom_from(&mut self, other: &Self) {
|
||||
self.gecko.mAllowZoom = other.gecko.mAllowZoom;
|
||||
}
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
pub fn reset__x_text_zoom(&mut self, other: &Self) {
|
||||
self.copy__x_text_zoom_from(other)
|
||||
}
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
pub fn reset__x_lang(&mut self, other: &Self) {
|
||||
self.copy__x_lang_from(other)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue