mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
layout: Implement z-index
.
This commit is contained in:
parent
eff0de0ce1
commit
01c90d8d6a
9 changed files with 81 additions and 18 deletions
|
@ -943,7 +943,14 @@ impl InlineFlow {
|
|||
/// `style` is the style of the block.
|
||||
pub fn compute_minimum_ascent_and_descent(&self,
|
||||
font_context: &mut FontContext,
|
||||
style: &ComputedValues) -> (Au, Au) {
|
||||
style: &ComputedValues)
|
||||
-> (Au, Au) {
|
||||
// As a special case, if this flow contains only hypothetical fragments, then the entire
|
||||
// flow is hypothetical and takes up no space. See CSS 2.1 § 10.3.7.
|
||||
if self.fragments.fragments.iter().all(|fragment| fragment.is_hypothetical()) {
|
||||
return (Au(0), Au(0))
|
||||
}
|
||||
|
||||
let font_style = text::computed_style_to_font_style(style);
|
||||
let font_metrics = text::font_metrics_for_style(font_context, &font_style);
|
||||
let line_height = text::line_height_from_style(style, &font_metrics);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue