Anthony Ramine
7f54d14904
Make the rule tree actually threadsafe
...
RuleTree::gc is now a safe method that any thread can call
at any time, and StrongRuleNode values can all be dropped
whenever their owner want to, on any thread.
2020-04-20 17:39:19 +02:00
Anthony Ramine
c10e839924
Don't go through the layout thread to retrieve a node's primary style
2020-04-07 14:34:47 +02:00
bors-servo
57fe27a4ef
Auto merge of #26110 - servo:layout-2020-rm-note-dirty-descendant, r=emilio
...
Kill ServoLayoutElement::note_dirty_descendant
2020-04-04 09:51:19 -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
Anthony Ramine
185a402d9c
Make DOM own the style and layout data, in an UnsafeCell
...
The previous Cell was a lie.
2020-04-04 13:10:19 +02:00
Anthony Ramine
516e8e0aa6
Don't expose any AtomicRefCell directly from style traits
...
This lets us experiment with how we store this data on the DOM side.
2020-04-04 13:08:51 +02:00
Anthony Ramine
60ca98b753
Pass pending restyles instead of draining them from layout
2020-03-28 15:37:56 +01:00
Anthony Ramine
9996e48500
Remove syn 0.15 from our crate graph ( fixes #24421 )
...
This required bumps of:
* gleam
* image
* rust-webvr
* webrender
* webxr
2020-03-05 13:01:13 +01:00
bors-servo
2d1ec68d31
Auto merge of #25803 - ferjm:layout_debug, r=SimonSapin
...
Layout viewer for layout 2020
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
This PR makes layout 2020 dump the box and fragment tree states into json files that can be visualized with the layout viewer tool. This tool has not much functionality other than displaying these trees and allowing to inspect each node additional data, so there is a lot of room for improvements. Some ideas for follow-ups:
- Make the tool create and display diffs between tree states.
- Actually allow creating new debug scopes during box tree and fragment tree construction. Right now there is a single scope created after constructing both trees, which is not ideal as it only allows looking at the reflow result.
- Right now an independent JSON file is created per reflow. It would be nice to unify the data obtained on each reflow on a single JSON, so diffs between reflows can be displayed as well.
- Dump and display the DOM tree. Link boxes to DOM nodes.
- #23339
2020-02-24 01:12:15 -05:00
Kunal Mohan
a05553f188
Make Background Hang Monitor Optional
...
This is done by wrapping all channels of communication
and related objects inside Option which are configured
using flag inside servo_config.
2020-02-23 01:45:52 +05:30
Fernando Jiménez Moreno
c4276aa27e
Fix rebase issues and run Prettier on layout viewer code
2020-02-21 11:11:00 +01:00
Fernando Jiménez Moreno
a042f85083
Dump box tree state into json files and display it on layout 2020 viewer
2020-02-21 11:11:00 +01:00
Fernando Jiménez Moreno
5cbe05366b
Add layout debugger support to layout_2020
2020-02-21 11:11:00 +01:00
Kunal Mohan
4a3bf52a7c
remove option for origin and mirror changes to layout_thread_2020
2020-02-18 00:57:33 +05:30
Martin Robinson
fa7839270d
Add layout_2020 support for NodeGeometryQuery and ContentBoxQuery
2020-02-11 14:02:19 +01:00
Martin Robinson
740211d191
Improve the name the NodeGeometryQuery
...
This query is used to get the clientTop, clientWidth, clientHeight,
clientLeft properties of DOM objects. "NodeGeometry" doesn't really
capture what these properties do as they often are returning the width
of element border.
2020-02-05 15:25:52 +01:00
Martin Robinson
1cd772fe5f
Answer content box queries for layout_2020 for the root element
...
This isn't correct yet, but it is necessary to give a value in order for
scrolling from script to work. Later this should give an accurate
content box response as well as work for non-root elements.
2020-01-21 15:29:23 +01:00
Martin Robinson
8825d588c1
Add initial support for scrollable overflow in layout_2020
...
This still isn't totally correct and non-root scrolling is not handled
at all, but the root frame now scrolls.
2020-01-21 15:29:23 +01:00
Simon Sapin
c6ba6c40b9
Initial rendering of background-image
2020-01-13 21:59:46 +01:00
Simon Sapin
d332dfdb41
Add support for some -Z dump-*
options
2020-01-13 21:59:45 +01:00
Simon Sapin
40453ad7e1
Pass LayoutContext to DisplayListBuilder
2020-01-13 21:59:45 +01:00
Simon Sapin
c8cbc57b76
Copy image-fetching code from Layout 2013
2020-01-13 21:59:45 +01:00
Martin Robinson
ea8c635344
Allow dumping the fragment tree in layout_2020
...
This is done when the dump-flow-tree debug option is passed.
2020-01-13 13:12:52 +01:00
Simon Sapin
53fc6143dc
Use the is_contentful field of DisplayListBuilder
2020-01-09 15:21:58 +01:00
Simon Sapin
c895e3d236
Disable use of rayon with --layout-threads 1
instead of panicking
2019-12-10 18:41:24 +01:00
Simon Sapin
aade603025
Support STYLO_THREADS=1
2019-12-10 18:41:14 +01:00
Simon Sapin
cfdd23ac16
Add a request_content_sizes
parameter to IndependentFormattingContext::construct
2019-12-03 15:11:35 +01:00
Simon Sapin
4e6e31a76c
Pass a LayoutContext through box construction
2019-12-02 22:26:49 +01:00
Simon Sapin
aa925a5984
Un-allow and fix warnings in components/layout_2020
2019-12-02 16:32:34 +01:00
bors-servo
5f1681ad25
Auto merge of #24875 - jdm:wr-no-ipc, r=asajeffrey
...
Extract IPC out of webrender
Fixes #20172 . Fixes #13480 .
2019-11-27 20:48:13 -05:00
Josh Matthews
564c16d754
Use non-IPC webrender API over explicit IPC channels.
2019-11-27 20:47:53 -05:00
Anthony Ramine
9b4baf2efa
Use the rayon pool when computing styles in layout 2020
2019-11-27 11:09:35 +01:00
Anthony Ramine
6f49dc2356
Properly use STYLE_THREAD_POOL in layout 2020
2019-11-25 10:54:46 +01:00
Anthony Ramine
1446756774
Pass a LayoutContext to TextRun::layout in 2020
2019-11-25 10:54:46 +01:00
Josh Matthews
edcdcf7c13
layout: Inform webrender about new pipeline as early as possible.
2019-11-13 11:54:51 -05:00
Josh Matthews
91dfa354b1
Ensure layout/script always have a correct viewport size when a new pipeline is created.
2019-11-06 16:13:55 -05:00
Josh Matthews
fd260f78c8
dom: Calculate the viewport size of iframes when they are first added to the tree.
2019-11-06 16:13:55 -05:00
Simon Sapin
cfc3ffcd54
2020: paint background-color
2019-10-24 10:44:31 +02:00
Simon Sapin
4e8eeda976
2020: add and call Fragment::build_display_list
2019-10-24 10:43:08 +02:00
Simon Sapin
e38cc1a549
2020: run layout after box construction
2019-10-24 10:43:08 +02:00
Anthony Ramine
ec74204fa0
Call BoxTreeRoot::construct from layout_thread_2020
2019-10-04 10:03:42 +02:00
Anthony Ramine
4444c5a2ad
Import victor's layout system 🍷
2019-09-11 10:36:30 +02:00
Anthony Ramine
be0e84b30f
Rename RecalcStyleAndConstructFlows to RecalcStyle
...
It doesn't construct flows anymore.
2019-09-11 10:06:35 +02:00
Anthony Ramine
eaf08ef517
Remove some more code
2019-09-11 10:06:35 +02:00
Simon Sapin
3e6489f543
Remove layout_2020::display_list, use WebRender display lists instead
2019-09-07 19:38:44 +02:00
Simon Sapin
e9f7079c70
Replace DisplayList::is_contentful with tracking during conversion to WR display lists
2019-09-06 17:15:53 +02:00
Simon Sapin
526619a78a
Replace the WebRenderDisplayItemConverter trait with an inherent method
2019-09-06 16:59:11 +02:00
Gregory Terzian
8482d2e781
restructure content process shutdown ack with threaded sender, without layout
2019-08-17 16:03:07 +02:00
Anthony Ramine
053e361e2f
Remove more stuff from layout_2020
2019-08-13 13:45:05 +02:00
Anthony Ramine
6876245858
Always send epochs to webrender in layout 2020
2019-08-10 13:18:10 +02:00