mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Auto merge of #13470 - pcwalton:inline-absolute-hypothetical-baseline, r=notriddle
layout: Improve the interaction between baseline-offset-of-last-line-in-flow logic and inline absolute hypothetical boxes. See commits for details. These changes place the heart icon on Twitter in the right place. r? @notriddle <!-- 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/13470) <!-- Reviewable:end -->
This commit is contained in:
commit
ccfc60161b
5 changed files with 49 additions and 7 deletions
|
@ -1404,7 +1404,9 @@ impl<'a> ImmutableFlowUtils for &'a Flow {
|
|||
fn baseline_offset_of_last_line_box_in_flow(self) -> Option<Au> {
|
||||
for kid in base(self).children.iter().rev() {
|
||||
if kid.is_inline_flow() {
|
||||
return kid.as_inline().baseline_offset_of_last_line()
|
||||
if let Some(baseline_offset) = kid.as_inline().baseline_offset_of_last_line() {
|
||||
return Some(baseline_offset)
|
||||
}
|
||||
}
|
||||
if kid.is_block_like() &&
|
||||
kid.as_block().formatting_context_type() == FormattingContextType::None &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue