mirror of
https://github.com/servo/servo.git
synced 2025-07-02 21:13:39 +01:00
Now that we have an Element around on cascade, we can stop using the cascade flags mechanism to pass various element-related state, like "is this element the root", or "should it use the item-based display fixup". That fixes handwaviness in the handling of those flags from style reparenting, and code duplication to handle tricky stuff like :visited. There are a number of other changes that are worth noticing: * skip_root_and_item_based_display_fixup is renamed to skip_item_display_fixup: TElement::is_root() already implies being the document element, which by definition is not native anonymous and not a pseudo-element. Thus, you never get fixed-up if your NAC or a pseudo, which is what the code tried to avoid, so the only fixup with a point is the item one, which is necessary. * The pseudo-element probing code was refactored to return early a Option::<CascadeInputs>::None, which is nicer than what it was doing. * The visited_links_enabled check has moved to selector-matching time. The rest of the checks aren't based on whether the element is a link, or are properly guarded by parent_style.visited_style().is_some() or visited_rules.is_some(). Thus you can transitively infer that no element will end up with a :visited style, not even from style reparenting. Anyway, the underlying reason why I want the element in StyleAdjuster is because we're going to implement an adjustment in there depending on the tag of the element (converting display: contents to display: none depending on the tag), so computing that information eagerly, including a hash lookup, wouldn't be nice. |
||
---|---|---|
.. | ||
counter_style | ||
gecko | ||
gecko_bindings | ||
gecko_string_cache | ||
invalidation | ||
properties | ||
rule_tree | ||
servo | ||
sharing | ||
stylesheets | ||
values | ||
animation.rs | ||
applicable_declarations.rs | ||
attr.rs | ||
bezier.rs | ||
bloom.rs | ||
build.rs | ||
build_gecko.rs | ||
Cargo.toml | ||
context.rs | ||
custom_properties.rs | ||
data.rs | ||
dom.rs | ||
dom_apis.rs | ||
driver.rs | ||
element_state.rs | ||
encoding_support.rs | ||
error_reporting.rs | ||
font_face.rs | ||
font_metrics.rs | ||
hash.rs | ||
lib.rs | ||
logical_geometry.rs | ||
macros.rs | ||
matching.rs | ||
media_queries.rs | ||
parallel.rs | ||
parser.rs | ||
README.md | ||
rule_cache.rs | ||
scoped_tls.rs | ||
selector_map.rs | ||
selector_parser.rs | ||
shared_lock.rs | ||
str.rs | ||
style_adjuster.rs | ||
style_resolver.rs | ||
stylesheet_set.rs | ||
stylist.rs | ||
thread_state.rs | ||
timer.rs | ||
traversal.rs | ||
traversal_flags.rs |