aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/screen.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2018-01-23 06:30:51 -0600
committerGitHub <noreply@github.com>2018-01-23 06:30:51 -0600
commit02331617b9bd7a379b05f7daa7ad09a44c27504c (patch)
tree770c0de0d3c1f87cd87b5f0933ed21d3b55903c4 /components/script/dom/screen.rs
parentbda560d01b6a9452a9124957f39b99a701aac25c (diff)
parentcd04664fb987ebfab063cbbff1a2516bd16b8cd4 (diff)
downloadservo-02331617b9bd7a379b05f7daa7ad09a44c27504c.tar.gz
servo-02331617b9bd7a379b05f7daa7ad09a44c27504c.zip
Auto merge of #19842 - emilio:cascade-cleanup, r=nox,jryans
style: Cleanup a bit the cascade. This makes an element available in StyleAdjuster, and uses it to replace some of our CascadeFlags (the ones that don't represent restrictions on what's actually cascaded, actually). 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. See each commit for details. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19842) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/screen.rs')
0 files changed, 0 insertions, 0 deletions