Commit graph

95 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
226c9807df
style: Fix servo build. 2019-11-30 20:45:08 +01:00
Fernando Jiménez Moreno
a3d0d95b61 Moar detach shadow improvements 2019-07-22 17:40:17 +02:00
Fernando Jiménez Moreno
1f3c879a85 Detach shadow clean up 2019-07-22 17:40:16 +02:00
Fernando Jiménez Moreno
e344203c11 Only allow UA widgets as children of media elements
Do not allow pseudo-elements for replaced elements
2019-07-22 17:40:15 +02:00
Emilio Cobos Álvarez
add08518cd
Fix style system build with recent changes. 2019-06-25 13:11:32 +02:00
Evgeniy Reizner
6f1df517e0 style: Do not use borrowed types in the selectors::Element trait.
Closes #22972
Closes #23463
2019-06-04 01:04:03 -04:00
Emilio Cobos Álvarez
66056bd4d5 script: Fix Servo build. 2019-05-29 16:14:36 +02:00
Emilio Cobos Álvarez
0000e4cec2 layout: fix Servo build. 2019-05-07 12:56:10 +02:00
Fernando Jiménez Moreno
68bee1c771 Final nits; fix custom elements rare data usage; s/owner_s_r/containing_s_r
Clarify special case for containing_shadow_root and add it to layout
accessor
2019-04-29 12:02:04 +02:00
Fernando Jiménez Moreno
59c634b259 Set dirty descendants if node is connected 2019-04-26 12:00:26 +02:00
Fernando Jiménez Moreno
5a165c6bd8 Move is_connected function from style to layout, where it is used 2019-04-26 11:42:38 +02:00
Fernando Jiménez Moreno
bdd2f32c0f Minor tweaks: rename composed_parent_node_ref, remove or update outdated comments... 2019-04-26 11:42:37 +02:00
Fernando Jiménez Moreno
0313e38074 Tweak list of shadow roots attached to doc 2019-04-26 11:42:37 +02:00
Fernando Jiménez Moreno
3e63655018 Make ServoShadowRoot.flush_stylesheets unsafe 2019-04-26 11:31:18 +02:00
Fernando Jiménez Moreno
2674a3e717 Flush shadow roots stylesheets only if they changed 2019-04-26 11:31:17 +02:00
Fernando Jiménez Moreno
a841c713d6 Minor layout thread cleanups:
- lifetime naming
- unrequired reference removal
- containing_shadow_host getter simplification
- use stylist.device getter where possible
2019-04-26 11:31:17 +02:00
Fernando Jiménez Moreno
00178aff4d Derive PartialEq for ServoShadowRoot 2019-04-26 11:31:17 +02:00
Fernando Jiménez Moreno
d7b6a6f509 Do not set dirty out-of-doc nodes 2019-04-26 11:31:16 +02:00
Fernando Jiménez Moreno
519cc2c317 Invalidate and flush shadow tree stylesheets where needed 2019-04-26 10:17:47 +02:00
Fernando Jiménez Moreno
cd07574235 Expose a way to flush shadow root stylesheets from layout 2019-04-26 10:17:47 +02:00
Fernando Jiménez Moreno
e9f0e76d3c Implement TShadowRoot::style_data 2019-04-26 10:17:47 +02:00
Fernando Jiménez Moreno
d2e1a3ab33 Adapt traversals for shadow dom 2019-04-26 10:17:46 +02:00
Fernando Jiménez Moreno
7c9e8aa4cc First bits of shadow dom layout 2019-04-26 10:17:46 +02:00
Fernando Jiménez Moreno
441357b74e Add is_connected flag to node and use it to replace most uses of is_in_doc 2019-04-26 10:17:45 +02:00
Ian Moody
8d7fe68ac3 Remove :-servo-case-sensitive-type-attr()
No longer needed now that the case-sensitive flag for attributes selectors is
supported.
Update user-agent CSS sheet to use the standard flag.

Fixes #23227
2019-04-18 13:46:59 +01:00
George Roman
4b8282b3b1 Implement CDATASection interface and createCDATASection method 2019-03-14 21:41:02 +02:00
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
Pyfisch
9e92eb205a Reorder imports 2018-11-06 22:35:07 +01:00
Pyfisch
cb07debcb6 Format remaining files 2018-11-06 22:30:31 +01:00
Josh Matthews
49d2ea4f74 Make layout use available image data before querying the image cache. 2018-10-12 21:55:09 -04:00
Fernando Jiménez Moreno
3fbeb398d4 Revert import style format 2018-10-08 16:12:02 +02:00
Víctor Manuel Jáquez Leal
e1a031e447 layout: add media_data() to ServoThreadSafeLayoutNode implementation 2018-10-08 16:12:00 +02:00
Emilio Cobos Álvarez
60e28c61e5
Fix Servo build. 2018-09-18 11:52:39 +02:00
paavininanda
25027e476c Current-pixel-density tests passing 2018-09-13 00:23:09 +05:30
bors-servo
d05cebdc6b
Auto merge of #21613 - pyfisch:layout_thread-fmt, r=Manishearth
Rustfmt layout_thread crate

Part of  #21373. Checked all changes looks good. 🎉 Manually removed two optional semicolons within unsafe so that it is formatted in one line.

<!-- 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/21613)
<!-- Reviewable:end -->
2018-09-05 06:33:16 -04:00
Pyfisch
840e696ad9 Rustfmt layout_thread crate 2018-09-05 10:11:10 +02:00
Emilio Cobos Álvarez
5d8545d2b4
Fix other parts of the Servo build. 2018-09-03 13:09:10 +02:00
Emilio Cobos Álvarez
689293e4fb
Fix Servo build. 2018-08-08 01:34:35 +02:00
Emilio Cobos Álvarez
895946bb18
layout: script: Fix build. 2018-06-23 20:34:10 +02:00
Emilio Cobos Álvarez
a82ed50257
style: Fix build after 1bc30a6732. 2018-04-17 20:03:55 +02:00
Emilio Cobos Álvarez
9fa2618197
style: Add infrastructure to match :host. 2018-03-14 15:10:05 +01:00
Emilio Cobos Álvarez
c338745b17
style: Allow to share style across elements with similar XBL bindings. 2018-03-12 21:47:46 +01:00
Emilio Cobos Álvarez
ef4ea7cc49
style: Separate the XBL and shadow dom styling bits.
Bug: 1441022
Reviewed-by: xidorn
MozReview-Commit-ID: 2W0BmZ8wWXg
2018-03-07 15:42:28 +01:00
Emilio Cobos Álvarez
a19219ec79
style: Add also a containing_shadow API. 2018-03-03 23:52:50 +01:00
Emilio Cobos Álvarez
2f0df1b421
style: Add bindings for ShadowRoot.
This adds TShadowRoot to the `dom` module.

Right now it barely adds uses of it, but this is a prerequisite to fix a bunch
of Shadow DOM bugs and separate it from the XBL mess.
2018-03-03 23:52:49 +01:00
Emilio Cobos Álvarez
f2efd04a5d
style: Make Element::id not clone the attribute. 2018-02-24 22:45:43 +01:00
Emilio Cobos Álvarez
98c9292ecb
style: Remove get_ prefix from get_state and get_id. 2018-02-24 22:45:42 +01:00
Emilio Cobos Álvarez
7ab4b21bc3
selectors: Remove the get_ prefix from get_local_name and get_namespace. 2018-02-24 22:45:38 +01:00
Emilio Cobos Álvarez
61e60a87e5
selectors: Never match ::slotted on <slot>s.
This fixes the test from https://github.com/w3c/web-platform-tests/pull/9212 in
Gecko.
2018-01-27 17:57:17 +01:00
Emilio Cobos Álvarez
cd04664fb9
style: Use CascadeFlags for what they're for.
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.
2018-01-23 13:18:54 +01:00