mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #12642 - notriddle:textarea_height, r=asajeffrey
Use explicit height of inline-block fragments When an explicit height is used for inline-block fragments, the line spacing algorithm should use that for the height above the baseline, instead of the intrinsic one. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #12492 (github issue number if applicable). - [X] There are tests for these changes <!-- 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/12642) <!-- Reviewable:end -->
This commit is contained in:
commit
8a09a0369f
4 changed files with 67 additions and 2 deletions
|
@ -2005,9 +2005,10 @@ impl Fragment {
|
|||
// See CSS 2.1 § 10.8.1.
|
||||
let flow = &info.flow_ref;
|
||||
let block_flow = flow.as_block();
|
||||
let is_auto = self.style.get_position().height == LengthOrPercentageOrAuto::Auto;
|
||||
let baseline_offset = match flow.baseline_offset_of_last_line_box_in_flow() {
|
||||
Some(baseline_offset) => baseline_offset,
|
||||
None => block_flow.fragment.border_box.size.block,
|
||||
Some(baseline_offset) if is_auto => baseline_offset,
|
||||
_ => block_flow.fragment.border_box.size.block,
|
||||
};
|
||||
let start_margin = block_flow.fragment.margin.block_start;
|
||||
let end_margin = block_flow.fragment.margin.block_end;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue