Commit graph

1012 commits

Author SHA1 Message Date
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
Utsav Oza
ab672577e8 Add creator URL, creator base URL and creator origin in browsing context 2020-05-18 19:07:57 +05:30
Josh Matthews
19f4be38d2 dom: Implement stub queryCommandSupported. 2020-05-13 14:36:32 -04:00
Martin Robinson
3b0619aedd Move most animation processing to script
This is preparation for sharing this code with layout_2020 and
implementing selective off-the-main-thread animations.

We still look for nodes not in the flow tree in the layout thread.
2020-05-12 10:22:14 +02:00
Martin Robinson
3a74013abc Start having animations conform to the HTML spec
This is a small step toward fixing #19242. The main idea is that the
clock for animations should advance as the event loop ticks. We
accomplish this by moving the clock from layout and naming it the
"animation timeline" which is the spec language. This should fix
flakiness with animations and transitions tests where a reflow could
move animations forward while script was running.

This change also starts to break out transition and animation events
into their own data structure, because it's quite likely that the next
step in fixing #19242 is to no longer send these events through a
channel.
2020-05-05 20:08:44 +02:00
Utsav Oza
86a5cf75aa Update window.open() to return fallible result 2020-05-04 19:02:38 +05:30
Josh Matthews
02ce6188aa Update devtools page titles. 2020-04-28 15:40:38 -04:00
Anthony Ramine
8a0775fc89 Kill ServoLayoutElement::note_dirty_descendant
There is no need to set the dirty descendants flag unsafely from the layout side
for elements with pending restyles, we can do that on the DOM side when draining
the restyles from the Document.
2020-04-04 15:00:04 +02:00
bors-servo
af1ebe79ef
Auto merge of #26083 - servo:layout-2020-more-cleanups, r=jdm
More layout cleanups from the introduction of a lifetime in LayoutDom<T>

What can I say, the follow-up fixes just kept coming to my door one by one, I couldn't just tell them to go away.
2020-04-01 12:05:16 -04:00
Anthony Ramine
0c0027ecfd Make LayoutDocumentHelpers::style_shared_lock be safe
StyleSharedRwLock is Sync.
2020-04-01 11:40:55 +02:00
Josh Matthews
6ab7a50b31 Cache the result of retrieving an element's client rectangle from layout. 2020-03-31 17:15:44 -04:00
Anthony Ramine
72c0771299 Make a bunch of LayoutDocumentHelpers be safe
The other methods are actually unsafe.
2020-03-31 21:39:45 +02:00
Anthony Ramine
9b2debe678 Give a lifetime parameter to LayoutDocumentHelpers 2020-03-29 19:29:02 +02:00
Anthony Ramine
dba6a635e5 Give a lifetime parameter to LayoutDom 2020-03-28 15:37:57 +01:00
Anthony Ramine
60ca98b753 Pass pending restyles instead of draining them from layout 2020-03-28 15:37:56 +01:00
Anthony Ramine
df0118dd10 Move PendingRestyle to the style_layout_interface crate 2020-03-28 14:00:53 +01:00