Commit graph

654 commits

Author SHA1 Message Date
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
Josh Matthews
14b0de30db Prevent JS execution and layout operations while DOM in inconsistent state. 2018-12-14 13:12:47 -05:00
Jan Andre Ikenmeyer
a1a14459c1
Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
Bastien Orivel
36c4208f22 Update uuid 2018-11-09 21:04:31 +01:00
Simon Sapin
2012be4a8b cargo fix --edition-idioms 2018-11-08 09:28:00 +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
Simon Sapin
76e59a46d3 Sort use statements 2018-11-06 15:26:02 +01:00
Simon Sapin
45f7199eee cargo fix --edition 2018-11-06 15:26:02 +01:00
bors-servo
e4657c1496
Auto merge of #21931 - jdm:reload-images, r=emilio
Make layout use available image data before querying the image cache.

These changes make layout more efficient for any page which contains images that have already loaded, since it does not require synchronously querying the image cache thread for each image present. It also makes reloading a page actually display the images that are already in the image cache.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21919
- [x] There are tests for these changes

<!-- 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/21931)
<!-- Reviewable:end -->
2018-10-13 07:56:11 -04:00
Josh Matthews
49d2ea4f74 Make layout use available image data before querying the image cache. 2018-10-12 21:55:09 -04:00
bors-servo
69e5243810
Auto merge of #21856 - zcorpan:zcorpan/remove-td-th-interfaces, r=jdm
Remove the HTMLTable{Header,Data}CellElement interfaces

Fixes #17222.

<!-- Please describe your changes on the following line: -->
This removes the `HTMLTableHeaderCellElement` and `HTMLTableDataCellElement` interfaces and uses the `HTMLTableCellElement` interface for both `th` and `td` elements, as per the spec.

---
<!-- 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 #17222.

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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. -->

<!-- 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/21856)
<!-- Reviewable:end -->
2018-10-12 09:30:41 -04:00
Fernando Jiménez Moreno
50582f1548 Rustfmt and make tidy happy 2018-10-08 16:12:03 +02:00
Fernando Jiménez Moreno
3fbeb398d4 Revert import style format 2018-10-08 16:12:02 +02:00