Commit graph

1077 commits

Author SHA1 Message Date
Samson
aad2dccc9c
Strict import formatting (grouping and granularity) (#30325)
* strict imports formatting

* Reformat all imports
2023-09-11 19:16:54 +00:00
Samson
711dbbd4af
remove extern crate (#30311)
* remove extern crate

* Update components/script_plugins/lib.rs

Co-authored-by: Martin Robinson <mrobinson@igalia.com>

---------

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2023-09-08 12:11:31 +00:00
Samson
450f8193a5
Use mozjs tracing infrastructure (#29918)
* Update mozjs

64711ec2e6 also fixes https://github.com/servo/servo/issues/30043

* Move to mozjs Traceable and introduce CustomTraceable
2023-08-10 21:46:06 +00:00
Samson
9514f670d1
No tracing of nop traceable fields (#29926)
* Add `no_trace` option to JSTraceable derive

* NoTrace wrapper

* Port some types to no_trace schematics

* Fixing my unsafe mistakes (not tracing traceables)

* Add docs & safety guards for no_trace

Safety guards (trait shenanigans) guarantees safety usage of `no_trace`

* Port canvas_traits to no_trace

* Port servo_media to no_trace

* Port net_traits to no_trace

* Port style to no_trace

* Port webgpu to no_trace

* Port script_traits to no_trace

* Port canvas_traits, devtools_traits, embedder_traits, profile_traits to no_trace

* unrooted_must_root lint in seperate file

* Add trace_in_no_trace_lint as script_plugin

* Composable types in must_not_have_traceable

* Introduced HashMapTracedValues wrapper

* `HashMap<NoTrace<K>,V>`->`HashMapTracedValues<K,V>`

* Port rest of servo's types to no_trace

* Port html5ever, euclid, mime and http to no_trace

* Port remaining externals to no_trace

* Port webxr and Arc<Mutex<_>>

* Fix spelling in notrace doc
2023-08-04 10:17:43 +00:00
Gregory Terzian
cf9ec700de
make the concept of has_listeners_for follow other implementations (#21044)
Co-authored-by: Gregory Terzian <gterzian@users.noreply.github.com>
2023-07-19 15:27:32 +00:00
Josh Matthews
cc07e27864 Rename reflect_dom_object2. 2023-05-31 23:03:32 -04:00
Josh Matthews
0e8ac3fdac Formatting. 2023-05-28 23:54:02 -04:00
Josh Matthews
dbff26bce0 Support arbitrary protos when wrapping DOM objects with constructors. 2023-05-28 23:23:12 -04:00
Josh Matthews
9ea1399c30 Fix formatting. 2023-05-20 11:05:10 -04:00
Josh Matthews
5e5669b945 Remove unused argument from AlreadyInRealm::assert. 2023-05-20 11:05:09 -04:00
Josh Matthews
fca5833e21 Remove global argument from Promise::new_in_current_realm. 2023-05-20 11:05:09 -04:00
Martin Robinson
17e3f34e65 Fix flakiness in animation tests
1. When updating the animation timeline, ensure that nodes that are
   animating are marked dirty, if necessary, so any style queries will
   force an layout flush.
2. Disable the problematic transition test suites, as they are in Gecko.
   These suites often fail when Servo is so overloaded that it cannot
   deliver frames fast enough to get more than two samples during the
   animation lifecycle.

Fixes #28334.
Fixes #26435.
Fixes #21486.
2023-05-02 08:37:15 +02:00
Delan Azabani
fb2acb0b02 clarify todos about exposed objects 2023-03-23 18:07:46 +08:00
Delan Azabani
fd1de05592 apply pylbrecht/servo/named.window.getter (closes #27952) 2023-03-23 18:01:26 +08:00
Adrian Willenbücher
0917dc4e87 Replaced ref_slice::ref_slice with std::slice::from_ref
ref_slice::ref_slice is deprecated in ref_slice-1.2.1,
because it's redundant with std since rust 1.28.

Signed-off-by: Adrian Willenbücher <willenbuecher@xq-tec.com>
2021-06-10 21:17:04 +02:00
Philip Lamb
b8a74e89cf Improve IME messaging to embedder with insertion point index and multiline flag. 2021-03-29 17:55:54 +13:00
Emilio Cobos Álvarez
31e8e418ea Miscellaneous build / tidy fixes. 2021-02-26 17:53:55 +01:00
teymour-aldridge
217147b2e4 fmt 2021-02-05 14:46:09 +00:00
teymour-aldridge
ff767b13a9 Remove unused arguments from methods. 2021-02-05 14:29:45 +00:00
teymour-aldridge
466e895cdf Fix errors 2021-02-05 14:29:30 +00:00
teymour-aldridge
0854953e35 Mark methods as unsafe. 2021-02-05 14:29:30 +00:00
YUAN LYU
e15bc7516c Fix mouse button handling 2020-12-06 00:21:21 -05:00
Vincent Ricard
66f80fbf4f Implement ParentNode#replaceChildren 2020-09-25 08:21:10 +02:00
Josh Matthews
fd9be5097d devtools: Treat session history traversal like a navigation. 2020-08-10 17:52:22 -04:00
Utsav Oza
962e620529 Do not panic on navigating across documents 2020-07-30 16:34:30 +05:30
Utsav Oza
da45522085 Fix comments for handle_mouse_move_event method 2020-07-30 16:34:30 +05:30
Utsav Oza
c235e1ee43 Fire mouseenter and mouseleave events 2020-07-30 16:34:29 +05:30
Utsav Oza
5fe54b8003 Fix ordering of mousemove event 2020-07-30 16:34:29 +05:30
Paul Rouget
6252d36a14 Unfocus input when virtual keyboard is dismissed 2020-07-13 14:04:06 +02:00
Alan Jeffrey
63663fada9 Add a sessionavailable event that allows content to enter an XR session without a user gesture 2020-07-10 14:09:18 -05:00
bors-servo
8916a42180
Auto merge of #27163 - alarsyo:23053-layout-queries-disconnected-frames-panic, r=jdm
Return Option for Window's layout channel

<!-- Please describe your changes on the following line: -->

`Window::layout_chan()` now returns an `Option<Sender<Msg>>`, returning `None` if the window is dead.

FIX #26969
FIX #26429
FIX #21208
FIX #19092
FIX #22559
FIX #22584
FIX #22652

---
<!-- 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 #23053

<!-- Either: -->
- [x] There are tests for these changes

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

This is my first contribution, I'm trying to figure things out!

This fix passes the test case shown in #23053, however I don't know what the behavior should be in `Document` and `ScriptThread` if `Window::is_alive()` is false : simply ignore it, don't do anything ? Or is this something that should not happen now that we return false in `Window::force_reflow()` ?

I'm not sure about the directory where the test case should go, any advice?
2020-07-04 01:30:27 -04:00
Antoine Martin
36fbbea2b5 Return Option for Window's layout channel 2020-07-03 20:00:26 +02:00
Paul Rouget
34265c872e UWP: support virtual keyboard 2020-07-02 10:57:34 +02:00
Alan Jeffrey
349619ed2d Support for webxr layer management 2020-06-28 16:37:45 -05:00
bors-servo
f35f671f45
Auto merge of #26953 - mrobinson:cancel-reparent, r=nox
Cancel animations for nodes which are removed from the DOM

This includes nodes which are being reparented.

---
<!-- 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] There are tests for these changes

<!-- 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-06-22 10:28:19 -04:00
Paul Rouget
b5b8d462f2 Send LoadStart event when the actual pipeline is loading 2020-06-22 07:20:15 +02:00
Martin Robinson
e901fa2c39 Cancel animations for nodes which are removed from the DOM
This includes nodes which are being reparented.
2020-06-17 16:35:06 +02:00
bors-servo
abc3ed40c9
Auto merge of #26872 - kunalmohan:gpu-canvas-context, r=kvark,jdm
Implement GPUSwapChain and GPUCanvasContext and interface with Webrender

<!-- Please describe your changes on the following line: -->
r?@kvark

---
<!-- 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
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] 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. -->
2020-06-15 14:22:21 -04:00
Josh Matthews
d55424e88f Update document focus when element focusability changes. 2020-06-15 11:22:28 -04:00
Josh Matthews
757371f4f0 Make clicking on an element request focus for focusable elements. 2020-06-15 11:22:28 -04:00
Kunal Mohan
71401e0855 Implement GPUSwapChain and GPUCanvasContext and interface with Webrender 2020-06-13 17:46:12 +05:30
Emilio Cobos Álvarez
332aec212c style: Miscellaneous servo build fixes. 2020-06-04 01:50:36 +02:00
Martin Robinson
47642e0eee Have Animations struct handle rooting nodes
Instead of having `ScriptThread` handle rooting nodes, do this in
`Animations`. This makes it easier to know when it is appropriate to
root and unroot nodes instead of relying on a certain order of events.
This also allows reducing quite a bit the amount of unsafe code.
2020-05-26 20:24:28 +02:00
Martin Robinson
873cdd1336 Implement animationiteration event
This event is triggered when an animation iterates. This change also
moves iteration out of style calculation to an "update animations" which
is the next part of having animation event handling match the HTML spec.
2020-05-21 15:19:34 +02:00
bors-servo
e17b53eba5
Auto merge of #26546 - splav:tls-protected-checks, r=jdm
check http_state in determine_request_referrer

<!-- Please describe your changes on the following line: -->
Check https status inside determine_request_referrer.
---
<!-- 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 #14506 (GitHub issue number if applicable)

<!-- Either: -->
- [ ] 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. -->
2020-05-19 18:03:35 -04:00
Alexandrov Sergey
a7c5c97616 check http_state in determine_request_referrer 2020-05-19 20:06:59 +03:00
bors-servo
cab9104d92
Auto merge of #26499 - utsavoza:ugo/issue-26287/10-05-2020, r=jdm
Add creator URL, creator base URL and creator origin to browsing context

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24944 and fix (partially) #26287
- [x] There are tests for these changes
2020-05-19 12:45:11 -04:00
Anthony Ramine
036f123c4e Implement concept of dirty root 2020-05-19 16:26:36 +02:00
Utsav Oza
9b0b03a432 Update wpt-tests metadata 2020-05-19 16:32:10 +05:30
Utsav Oza
4c637e0601 Update wpt-tests metadata 2020-05-18 19:07:57 +05:30