mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #10643 - mbrubeck:empty-span-border, r=pcwalton
Fix handling of borders and padding for empty/stripped inline flows This forces fragment generation for empty inline flows, if they have borders or padding. Fixes #10533 and #2001. Also includes fixes for other bugs that were uncovered by this change; see the individual commit messages for detailed explanations. r? @pcwalton <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10643) <!-- Reviewable:end -->
This commit is contained in:
commit
15e76eb6e2
6 changed files with 142 additions and 53 deletions
|
@ -1662,9 +1662,22 @@ pub mod computed {
|
|||
}
|
||||
|
||||
impl LengthOrPercentage {
|
||||
#[inline]
|
||||
pub fn zero() -> LengthOrPercentage {
|
||||
LengthOrPercentage::Length(Au(0))
|
||||
}
|
||||
|
||||
/// Returns true if the computed value is absolute 0 or 0%.
|
||||
///
|
||||
/// (Returns false for calc() values, even if ones that may resolve to zero.)
|
||||
#[inline]
|
||||
pub fn is_definitely_zero(&self) -> bool {
|
||||
use self::LengthOrPercentage::*;
|
||||
match *self {
|
||||
Length(Au(0)) | Percentage(0.0) => true,
|
||||
Length(_) | Percentage(_) | Calc(_) => false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Debug for LengthOrPercentage {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue