mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
style: Remove PseudoElement::inherits_all.
I plan to change servo to use all: inherit on its UA sheet. I hope the patch below should make it good enough performance-wise. And also, it's probably broken so I don't think it's worth supporting it specially. Differential Revision: https://phabricator.services.mozilla.com/D8686
This commit is contained in:
parent
8a47c8b2e6
commit
2c52210ba7
4 changed files with 0 additions and 31 deletions
|
@ -3298,15 +3298,6 @@ impl<'a> StyleBuilder<'a> {
|
|||
let reset_style = device.default_computed_values();
|
||||
let inherited_style = parent_style.unwrap_or(reset_style);
|
||||
let inherited_style_ignoring_first_line = parent_style_ignoring_first_line.unwrap_or(reset_style);
|
||||
// FIXME(bz): inherits_all seems like a fundamentally broken idea. I'm
|
||||
// 99% sure it should give incorrect behavior for table anonymous box
|
||||
// backgrounds, for example. This code doesn't attempt to make it play
|
||||
// nice with inherited_style_ignoring_first_line.
|
||||
let reset_style = if pseudo.map_or(false, |p| p.inherits_all()) {
|
||||
inherited_style
|
||||
} else {
|
||||
reset_style
|
||||
};
|
||||
|
||||
let flags = inherited_style.flags.inherited();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue