Commit graph

617 commits

Author SHA1 Message Date
Simon Sapin
c38c964f1b Upgrade to rustc 1.38.0-nightly (dddb7fca0 2019-07-30) 2019-07-31 13:34:01 +02:00
marmeladema
35dc5320ab Wrap(Global)Method now takes a SafeJSContext instead of a JSContext
as first argument.
2019-07-24 08:18:21 +01:00
Emilio Cobos Álvarez
3d57c22e9c Update euclid.
There are a few canvas2d-related dependencies that haven't updated, but they
only use euclid internally so that's not blocking landing the rest of the
changes.

Given the size of this patch, I think it's useful to get this landed as-is.
2019-07-23 23:09:55 +02: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
gatowololo
3df8d6891e Split getter for mutation_observers() into two methods.
registered_mutation_observers() returns immutable references and does
not init mutation observers.

registered_mutation_observers_mut() lazily initializes raredata if it
does not exist.

Updated code that uses this methods to call appropriate method when
mutation is not necessary.
2019-06-06 11:30:37 -07:00
Fernando Jiménez Moreno
37e88e77cd Set self as containing_shadow_root for shadow roots 2019-04-29 12:15:16 +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
9b2eb77530 Do not lazy initialize RareData on its getters 2019-04-26 12:00:26 +02:00
Fernando Jiménez Moreno
9d52feffbb Rename shadow_root_from_node to containing_shadow_root 2019-04-26 12:00:26 +02:00
Fernando Jiménez Moreno
3f312f7915 Set dirty descendants flag only for elements 2019-04-26 12:00:26 +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
6bf1ca20a2 Make Node and Element rare_data an Option 2019-04-26 12:00:25 +02:00
Fernando Jiménez Moreno
890297ef0a Optimize Node::GetRootNode 2019-04-26 11:42:38 +02:00
Fernando Jiménez Moreno
8eba587547 Merge Node::shadow_including_inclusive_ancestors into inclusive_ancestors 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
a9019da39d Move mutation observers list to NodeRareData 2019-04-26 11:31:19 +02:00
Fernando Jiménez Moreno
6af4729f42 Introduce NodeRareData and ElementRareData 2019-04-26 11:31:19 +02:00
Fernando Jiménez Moreno
813b242419 Introduce BindContext with in_doc and connected flags
Fix some is_in_doc -> is_connected mistakes
2019-04-26 11:31:18 +02:00
Fernando Jiménez Moreno
ccf8a43649 Document owner_shadow_root 2019-04-26 11:31:18 +02:00
Fernando Jiménez Moreno
ea1fe15dfe Do not store composed parent node 2019-04-26 11:31:18 +02:00
Fernando Jiménez Moreno
2350f0e3d1 Make StyleSheetListOwner an enum instead of a trait object 2019-04-26 11:31:18 +02:00
Fernando Jiménez Moreno
3ccd622c9b Introduce ShadowIncluding enum for tree traversals 2019-04-26 11:31:17 +02:00
Fernando Jiménez Moreno
39c96acbbe Remove IS_CONNECTED flag when node is removed from the doc 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
e66438de48 Fix the way the IS_CONNECTED flag is set 2019-04-26 11:31:16 +02:00
Fernando Jiménez Moreno
2515966db6 Fix formatting issues 2019-04-26 11:31:16 +02:00
Fernando Jiménez Moreno
efce2825b9 Return composed parent node. Fixes style sharing panics 2019-04-26 10:17:48 +02:00
Fernando Jiménez Moreno
07e2f41c34 Retarget result of shadowRoot.element(s)FromPoint 2019-04-26 10:17:48 +02:00
Fernando Jiménez Moreno
3bb50cc479 ShadowRoot stylesheet list 2019-04-26 10:17:47 +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
2e5c058463 Implement concept of shadow including tree order 2019-04-26 10:17:46 +02:00
Fernando Jiménez Moreno
6a85409ffe Throw NotSupported when trying to deep clone a shadow root 2019-04-26 10:17:46 +02:00
Fernando Jiménez Moreno
c48ad0ff7e Introduce concept of composed parent node 2019-04-26 10:17:46 +02:00
Fernando Jiménez Moreno
1b036355ce Bind/unbind shadow host children to/from tree 2019-04-26 10:17:45 +02:00
Fernando Jiménez Moreno
df81debffc Set connected flag not only on elements 2019-04-26 10:17:45 +02:00
Fernando Jiménez Moreno
4740ce53a0 Make note_dirty_descendants jump around shadow roots 2019-04-26 10:17:45 +02:00
Fernando Jiménez Moreno
ea69bbc75b Node retargeting algorithm 2019-04-26 10:17:45 +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
Fernando Jiménez Moreno
640fc04743 Implement shadow-including root, set node as in doc when connected. Makes JS work in shadow trees 2019-04-26 10:17:45 +02:00
Fernando Jiménez Moreno
ffdc9d255f Expose Element.AttachShadow under dom.shadowdom.enabled pref 2019-04-26 10:17:44 +02:00
Fernando Jiménez Moreno
091fcbecd1 Node shadow root owner 2019-04-26 10:17:44 +02:00
Fernando Jiménez Moreno
9022bd3d11 IS_IN_SHADOW_TREE flag 2019-04-26 10:17:44 +02:00
Fernando Jiménez Moreno
4304ee28dc Partial ShadowRoot implementation of DocumentOrShadowRoot 2019-04-26 10:17:44 +02:00
Fernando Jiménez Moreno
18ae0fcbd6 ShadowRoot interface 2019-04-26 10:17:44 +02:00
George Roman
4b8282b3b1 Implement CDATASection interface and createCDATASection method 2019-03-14 21:41:02 +02:00
Anthony Ramine
4d527b20ee Simplify RootedReference and make it specifically about slicesIt's now called DomSlice<T>. 2019-03-11 16:25:39 +01:00
Anthony Ramine
5fe5e5d6de Remove most RootedReference uses
We can replace all uses of RootedReference for Option<T> by Option::deref calls.
2019-03-10 17:51:35 +01:00
Anthony Ramine
3ccda7f90c Make a bunch of layout queries morally safer 2019-01-09 14:12:54 +01:00
Simon Sapin
be69f9c3e6 Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00