mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Top layer elements that are display:contents should be display: block
As per https://fullscreen.spec.whatwg.org/#new-stacking-layer: If its specified display property is contents, it computes to block. Differential Revision: https://phabricator.services.mozilla.com/D131585
This commit is contained in:
parent
2dbc89d1f5
commit
88b82f569b
1 changed files with 7 additions and 1 deletions
|
@ -136,9 +136,15 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
|
|||
/// computed to 'absolute' if the element is in a top layer.
|
||||
///
|
||||
fn adjust_for_top_layer(&mut self) {
|
||||
if !self.style.is_absolutely_positioned() && self.style.in_top_layer() {
|
||||
if !self.style.in_top_layer() {
|
||||
return;
|
||||
}
|
||||
if !self.style.is_absolutely_positioned() {
|
||||
self.style.mutate_box().set_position(Position::Absolute);
|
||||
}
|
||||
if self.style.get_box().clone_display().is_contents() {
|
||||
self.style.mutate_box().set_display(Display::Block);
|
||||
}
|
||||
}
|
||||
|
||||
/// CSS 2.1 section 9.7:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue