bors-servo
852223b08a
Auto merge of #23253 - BartGitHub:refactor-promise-compartment, r=jdm
...
Refactor promise compartment
<!-- Please describe your changes on the following line: -->
This PR adds a mechanism to verify that certain code is executed inside a ```JSAutoCompartment```, and applies this to the ```Promise::new_in_current_compartment``` constructor.
r? @jdm
---
<!-- 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 #23167
<!-- Either: -->
- [x] These changes do not require tests because they do not change existing functionality.
<!-- 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/23253 )
<!-- Reviewable:end -->
2019-04-29 13:59:04 -04:00
Fernando Jiménez Moreno
d0b2e826ef
Move StylesheetSetRef to script
2019-04-26 12:00:26 +02:00
Fernando Jiménez Moreno
e4f34fde1b
Rename StylesheetSet to StylesheetSetRef
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
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
0313e38074
Tweak list of shadow roots attached to doc
2019-04-26 11:42:37 +02:00
Fernando Jiménez Moreno
740aae06ba
Register named elements in either the document or shadow tree
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
8b353ee3ce
Make StylesheetSet an enum instead of a trait object
2019-04-26 11:31:18 +02:00
Fernando Jiménez Moreno
3e53962b25
Do not send RemoveStyleSheet message for shadow roots
2019-04-26 11:31:18 +02:00
Fernando Jiménez Moreno
d77b9c6775
Add invalidate_stylesheets to StyleSheetsListOwner trait
2019-04-26 11:31:17 +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
2674a3e717
Flush shadow roots stylesheets only if they changed
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
47872cdaa3
Do not add shadow tree styles to stylist
2019-04-26 10:17:47 +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
18c1b8f690
Register/unregister shadow roots in documents when they are connected
2019-04-26 10:17:47 +02:00
Fernando Jiménez Moreno
23b92d54d4
Remove stylesheets ownership from DocumentOrShadowRoot
2019-04-26 10:17:47 +02:00
Fernando Jiménez Moreno
3bb50cc479
ShadowRoot stylesheet list
2019-04-26 10:17:47 +02:00
Fernando Jiménez Moreno
0d6bd24245
Move stylesheets related code to DocumentOrShadowRoot
2019-04-26 10:17:47 +02:00
Fernando Jiménez Moreno
be06f1e9b3
Always get browsing context from document
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
f6ba165882
Throw when trying to import or adopt a shadow root
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
Fernando Jiménez Moreno
48975840dd
Unify DocumentOrShadowRoot implementation
2019-04-26 10:17:45 +02:00
Fernando Jiménez Moreno
4304ee28dc
Partial ShadowRoot implementation of DocumentOrShadowRoot
2019-04-26 10:17:44 +02:00
Fernando Jiménez Moreno
cbcf21c248
DocumentOrShadowRoot mixin
2019-04-26 10:17:44 +02:00
Aron Zwaan
e2e6e2ac94
Pass InCompartment by value
2019-04-25 11:37:35 +02:00
Aron Zwaan
1b6949d4cf
Add proof parameter to Promise::new_in_current_compartment
2019-04-24 19:46:10 +02:00
Lucas Fantacuci
6b2be9b31d
Implementing the builder pattern for RequestInit
2019-04-10 14:01:30 -03:00
Aron Zwaan
782b58587a
Rename Promise::new to Promise::new_in_current_compartment
2019-04-03 20:45:30 +02:00
Kamal Umudlu
a8995fbf1a
Bug: #22853 - Make Window::set_fullscreen pass a non-None value when entering fullscreen is fixed and SetFullscreenState in exit_fullscreen changed to False
...
Added patch for bug:22853
Added implementation to exit from fullscreen mode by pressing ESC button
Added patch that supports to exit from fullscreen mode by pressing ESC
Deleted patch files
Added all requested changes on project
Removed the loop over self.pending_changes in switch_fullscreen_mode function
Bug #22853 - Make Window::set_fullscreen pass a non-None value when entering fullscreen is fixed and SetFullscreenState in exit_fullscreen changed to False
Added missing bracket in constellation.rs file to fix build issue
Bug: #22853 --> Make Window::set_fullscreen pass a non-None value when entering fullscreen is fixed and SetFullscreenState in exit_fullscreen changed to False
2019-04-01 18:29:02 -04:00
hundredeir
1a5e7b7cfb
Defer update of dom_content_loaded_event_end
...
Set it's value only after the "DOMContentLoaded" event is really fired
2019-03-26 14:54:37 +05:30
Peter Hall
8bfd4dc1e2
#8539 Config preferences backend restructure
2019-03-20 15:01:26 +00: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
Josh Matthews
a8683bc3d8
Remove an unnecessary synchronous full reflow.
2019-03-07 10:42:36 -05:00
Alan Jeffrey
d2862094ec
Add reftests for fullscreen mode
2019-02-05 10:04:38 -06:00
Manish Goregaokar
611dc4bc70
Remove now-unnecessary must_root and allow(unrooted_must_root) annotations
2019-01-04 15:05:07 -08:00
Simon Sapin
be69f9c3e6
Rustfmt has changed its default style :/
2018-12-28 13:17:47 +01:00
Gregory Terzian
7530faa4ea
check for a document being "fully-active" before reflows
2018-12-23 17:39:20 +08:00
Gregory Terzian
eb82e781a3
implement windowproxy "delay-load-event-mode", and partially document "completely-loaded"
2018-12-23 17:39:13 +08:00
Josh Matthews
fc2d810bce
Delay iframe and script element processing until the DOM is stable.
2018-12-14 13:12:49 -05:00
Josh Matthews
14b0de30db
Prevent JS execution and layout operations while DOM in inconsistent state.
2018-12-14 13:12:47 -05:00
Josh Matthews
231a37be24
Initial window sizes are mandatory.
2018-12-14 13:12:46 -05:00
Anthony Ramine
a2abfc6301
Make the parser decode input from document's encoding
...
The document's encoding is only computed from the Content-Type header for now,
with no sniffing at all.
2018-12-12 13:50:27 +01:00
Anthony Ramine
d1d79bf947
Remove an argument to ServoParser::parse_html_script_input
...
Since the spec of document.open was updated, this argument became useless.
2018-12-12 11:29:14 +01:00
George Roman
6c458b04d2
Remove unused recycle argument from Document::unload
2018-11-30 18:08:08 +02:00