aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/element.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/element.rs')
-rw-r--r--components/script/dom/element.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs
index 30ac45802a8..c6224e7dc87 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -89,7 +89,6 @@ use script_layout_interface::message::ReflowGoal;
use script_thread::ScriptThread;
use selectors::Element as SelectorsElement;
use selectors::attr::{AttrSelectorOperation, NamespaceConstraint, CaseSensitivity};
-use selectors::context::VisitedHandlingMode;
use selectors::matching::{ElementSelectorFlags, MatchingContext};
use selectors::sink::Push;
use servo_arc::Arc;
@@ -349,11 +348,12 @@ impl Element {
}
// https://drafts.csswg.org/cssom-view/#css-layout-box
- // Elements that have a computed value of the display property
- // that is table-column or table-column-group
- // FIXME: Currently, it is assumed to be true always
+ //
+ // We'll have no content box if there's no fragment for the node, and we use
+ // bounding_content_box, for simplicity, to detect this (rather than making a more specific
+ // query to the layout thread).
fn has_css_layout_box(&self) -> bool {
- true
+ self.upcast::<Node>().bounding_content_box().is_some()
}
// https://drafts.csswg.org/cssom-view/#potentially-scrollable
@@ -2636,7 +2636,6 @@ impl<'a> SelectorsElement for DomRoot<Element> {
&self,
pseudo_class: &NonTSPseudoClass,
_: &mut MatchingContext<Self::Impl>,
- _: VisitedHandlingMode,
_: &mut F,
) -> bool
where