Skip to content

Commit

Permalink
Bug 1725721 - Top layer elements that are display:contents should be …
Browse files Browse the repository at this point in the history
…display: block. r=hiro

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
  • Loading branch information
emilio committed Nov 19, 2021
1 parent abda66d commit 62a30e3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 7 additions & 1 deletion servo/components/style/style_adjuster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,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:
Expand Down

This file was deleted.

0 comments on commit 62a30e3

Please sign in to comment.