mirror of
https://github.com/servo/servo.git
synced 2025-08-15 10:25:32 +01:00
style: @container(width:0) shouldn't match elements with no box
Depends on D163879 Differential Revision: https://phabricator.services.mozilla.com/D163844
This commit is contained in:
parent
6c02e9fdaa
commit
647d813c6b
3 changed files with 17 additions and 16 deletions
|
@ -1041,9 +1041,9 @@ impl<'le> TElement for GeckoElement<'le> {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
fn primary_content_box_size(&self) -> Size2D<Au> {
|
||||
fn primary_content_box_size(&self) -> Size2D<Option<Au>> {
|
||||
if !self.as_node().is_connected() {
|
||||
return Size2D::zero();
|
||||
return Size2D::new(None, None)
|
||||
}
|
||||
|
||||
unsafe {
|
||||
|
@ -1056,12 +1056,13 @@ impl<'le> TElement for GeckoElement<'le> {
|
|||
.mPrimaryFrame
|
||||
.as_ref();
|
||||
if frame.is_null() {
|
||||
return Size2D::zero();
|
||||
return Size2D::new(None, None)
|
||||
}
|
||||
let mut width = 0;
|
||||
let mut height = 0;
|
||||
bindings::Gecko_ContentSize(*frame, &mut width, &mut height);
|
||||
Size2D::new(Au(width), Au(height))
|
||||
// FIXME: Should use None if there isn't size containment.
|
||||
Size2D::new(Some(Au(width)), Some(Au(height)))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue