Commit graph

626 commits

Author SHA1 Message Date
Patrick Shaughnessy
01aba1fcc4 Event dispatch rewritten to resemble spec more often, activate on clicks better 2020-02-12 15:57:37 -05:00
Patrick Shaughnessy
4ea0a7061b Remove outdated comment about #4105 2020-02-05 15:43:03 -05:00
Kunal Mohan
02c1612cb0
Add accountable-refcell as optional build time feature 2020-01-08 09:44:41 +05:30
bors-servo
e185423fc7
Auto merge of #25310 - pshaughn:attr_node, r=Manishearth
Attr is a Node, with consequences for many Node methods

<!-- Please describe your changes on the following line: -->
Attr is now a Node, as current WHATWG specs require. I think I did some unidiomatic things to make compareDocumentPosition work and it could use a look by someone more familiar with how to write concise Rust code. I also think the new cases in compareDocumentPosition lack tests; it is possible to compare the position of two attributes, or of an attribute and an element, and I don't think any tests are exercising that functionality.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #25124

<!-- Either: -->
- [ ] There are tests for these changes (existing cases of Node methods are well-tested, and there is a WPT test specifically for whether Attr is Node, but I'm not sure about new Node method cases)

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2020-01-07 18:13:40 -05:00
Patrick Shaughnessy
a322c6079b Now passing output tests as well as anyone 2020-01-06 15:28:55 -05:00
Patrick Shaughnessy
67e9fc8c0a Attr is a Node, with consequences for many Node methods 2019-12-23 19:10:16 -05:00
Patrick Shaughnessy
0231a0a712 adding .isConnected DOM attribute 2019-12-11 10:08:05 -05:00
Thomas Delacour
d0c64d347d
ISSUE-23995: lazily generate unique_id for node 2019-09-24 09:25:09 -04:00
George Roman
d7b9fede99 Return ErrorStatus from webdriver_handlers 2019-08-18 15:30:55 +03:00
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