mirror of
https://github.com/servo/servo.git
synced 2025-06-21 15:49:04 +01:00
Add some comments to may_generate_pseudo; no real behavior changes for now.
Gecko bug 1324618 part 2: https://bugzilla.mozilla.org/show_bug.cgi?id=1324618
This commit is contained in:
parent
acb27de71c
commit
18ab0087ae
1 changed files with 11 additions and 1 deletions
|
@ -426,9 +426,19 @@ pub trait TElement : Eq + PartialEq + Debug + Hash + Sized + Copy + Clone +
|
|||
/// TODO(emilio, bz): actually implement the logic for it.
|
||||
fn may_generate_pseudo(
|
||||
&self,
|
||||
_pseudo: &PseudoElement,
|
||||
pseudo: &PseudoElement,
|
||||
_primary_style: &ComputedValues,
|
||||
) -> bool {
|
||||
// ::before/::after are always supported for now, though we could try to
|
||||
// optimize out leaf elements.
|
||||
|
||||
// ::first-letter and ::first-line are only supported for block-inside
|
||||
// things, and only in Gecko, not Servo. Unfortunately, Gecko has
|
||||
// block-inside things that might have any computed display value due to
|
||||
// things like fieldsets, legends, etc. Need to figure out how this
|
||||
// should work.
|
||||
debug_assert!(pseudo.is_eager(),
|
||||
"Someone called may_generate_pseudo with a non-eager pseudo.");
|
||||
true
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue