mirror of
https://github.com/servo/servo.git
synced 2025-07-25 16:20:36 +01:00
stylo: Disable font metrics
This commit is contained in:
parent
31ea4208cf
commit
f506c6bcd1
1 changed files with 20 additions and 17 deletions
|
@ -22,7 +22,7 @@ use dom::{self, AnimationRules, DescendantsBit, LayoutIterator, NodeInfo, TEleme
|
||||||
use dom::{OpaqueNode, PresentationalHintsSynthetizer};
|
use dom::{OpaqueNode, PresentationalHintsSynthetizer};
|
||||||
use element_state::ElementState;
|
use element_state::ElementState;
|
||||||
use error_reporting::StdoutErrorReporter;
|
use error_reporting::StdoutErrorReporter;
|
||||||
use font_metrics::{FontMetrics, FontMetricsProvider, FontMetricsQueryResult};
|
use font_metrics::{FontMetricsProvider, FontMetricsQueryResult};
|
||||||
use gecko::global_style_data::GLOBAL_STYLE_DATA;
|
use gecko::global_style_data::GLOBAL_STYLE_DATA;
|
||||||
use gecko::selector_parser::{SelectorImpl, NonTSPseudoClass, PseudoElement};
|
use gecko::selector_parser::{SelectorImpl, NonTSPseudoClass, PseudoElement};
|
||||||
use gecko::snapshot_helpers;
|
use gecko::snapshot_helpers;
|
||||||
|
@ -472,22 +472,25 @@ impl FontMetricsProvider for GeckoFontMetricsProvider {
|
||||||
sizes.size_for_generic(font_family)
|
sizes.size_for_generic(font_family)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn query(&self, font: &Font, font_size: Au, wm: WritingMode,
|
fn query(&self, _font: &Font, _font_size: Au, _wm: WritingMode,
|
||||||
in_media_query: bool, device: &Device) -> FontMetricsQueryResult {
|
_in_media_query: bool, _device: &Device) -> FontMetricsQueryResult {
|
||||||
use gecko_bindings::bindings::Gecko_GetFontMetrics;
|
// Disabled until we can make font metrics thread safe (bug 1356105)
|
||||||
let gecko_metrics = unsafe {
|
//
|
||||||
Gecko_GetFontMetrics(&*device.pres_context,
|
// use gecko_bindings::bindings::Gecko_GetFontMetrics;
|
||||||
wm.is_vertical() && !wm.is_sideways(),
|
// let gecko_metrics = unsafe {
|
||||||
font.gecko(),
|
// Gecko_GetFontMetrics(&*device.pres_context,
|
||||||
font_size.0,
|
// wm.is_vertical() && !wm.is_sideways(),
|
||||||
// we don't use the user font set in a media query
|
// font.gecko(),
|
||||||
!in_media_query)
|
// font_size.0,
|
||||||
};
|
// // we don't use the user font set in a media query
|
||||||
let metrics = FontMetrics {
|
// !in_media_query)
|
||||||
x_height: Au(gecko_metrics.mXSize),
|
// };
|
||||||
zero_advance_measure: Au(gecko_metrics.mChSize),
|
// let metrics = FontMetrics {
|
||||||
};
|
// x_height: Au(gecko_metrics.mXSize),
|
||||||
FontMetricsQueryResult::Available(metrics)
|
// zero_advance_measure: Au(gecko_metrics.mChSize),
|
||||||
|
// };
|
||||||
|
// FontMetricsQueryResult::Available(metrics)
|
||||||
|
FontMetricsQueryResult::NotAvailable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue