Commit graph

86 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
73917cce83
style: Use rayon instead of our custom work queue. 2016-11-14 21:24:19 +01:00
UK992
93a103ba73 Reorder use statements 2016-09-09 04:55:19 +02:00
Ms2ger
fa0e198c8f Pass a &mut Flow to traverse_flow_tree_preorder. 2016-08-25 09:21:35 +02:00
Anthony Ramine
bf34fdde1f Move util::workqueue to style 2016-07-04 21:56:09 +02:00
Ms2ger
577c2d2078 Store SharedStyleContext in AssignISizes. 2016-06-22 15:02:06 +02:00
Cullen Rhodes
40acd24e8f Report use statements that use {} with only one entry 2016-05-27 10:18:44 +01:00
Per Lundberg
2f7ed1d73e Removed unused imports
This fixes #11185.
2016-05-15 22:24:26 +03:00
malayaleecoder
d4dcaf3167 Rename imm_child_iter() and child_iter(). Fixes #10286 2016-04-09 01:18:00 +05:30
David Bonet
57df260f9d Removed overflow references on AssignBSizesAndStoreOverflow code 2016-03-17 21:14:50 +01:00
Martin Robinson
630a9d4255 Remove parallel display list construction
Parallel display list construction hasn't been shown to give any
performance gains. It is also incompatible with the current flat display
list implementation. Once flat display lists have landed, we can explore
possible benefits of parallel construction once again.
2016-02-19 15:53:12 -08:00
Bobby Holley
29987a6715 Bonus Fix - Rename traverse_dom_preorder to traverse_dom.
The incorrect naming here was bugging me - the dom traversal has both pre- and post-order
processing steps.
2016-01-06 19:21:13 -08:00
Bobby Holley
60b3c66b28 Hoist the style parts of parallel.rs into style/. 2016-01-06 19:21:07 -08:00
Bobby Holley
f9a02f0aba Hoist the style parts of traversal.rs into style/. 2016-01-06 18:50:16 -08:00
Bobby Holley
bf1a7d243f Remove the dependency of parallel DOM traversal and style calculation on LayoutContext. 2016-01-06 18:24:18 -08:00
Bobby Holley
ebc5eb1b98 Make parallel DOM traversal and style calculation operate on TNode instead of LayoutNode. 2016-01-06 17:58:53 -08:00
Bobby Holley
947134949a Refactor parallel dom traversal to be agnostic to the processing steps themselves. 2016-01-04 09:38:04 -08:00
Bobby Holley
47059d2d26 Separate style+layout and layout-specific wrapper functionality.
This patch does a number of things, unfortunately all at once:
* Hoists a large subset of the layout wrapper functionality into the style system.
* Merges TElementAttributes into the newly-created TElement.
* Reorganizes LayoutData by style vs layout, and removes LayoutDataShared.
* Simplifies the API for borrowing style/layout data.

There's still more to do to make the style system usable standalone, but
this is a good start.
2015-12-29 11:50:03 -08:00
Bobby Holley
cf33f00018 Generalize the rest of layout to operate on generic Layout*.
There wasn't a good way to split this up, unfortunately.

With this change, the only remaining usage of the Servo-specific structures is
in layout_task, where the root node is received from the script task. \o/
2015-11-28 18:01:02 -08:00
Bobby Holley
2f6e94943a Rename Layout*Trait to Layout*.
The next step will be to remote the Servo-specificity of the layout code we want
to share by making it operate generically on Layout*.
2015-11-18 17:24:36 -08:00
Bobby Holley
9dd45b9f2a Prefix concrete types with 'Servo'. 2015-11-18 17:23:46 -08:00
Bobby Holley
54f2700ba6 Hoist exported wrapper functionality into a family of traits.
All the existing code still uses the concrete implementations, so this
shouldn't impact the generated code at all.
2015-11-18 17:23:29 -08:00
Ms2ger
5ec1cdea9b Remove dead code from layout. 2015-11-18 15:00:58 +01:00
Ms2ger
ff0acccc06 Consolidate ProfilerMetadata and TimerMetadata.
There is no good reason to have the two types.

This also means that the result of LayoutTask::profiler_metadata no longer
borrows the LayoutTask, which I'll need later.
2015-11-09 09:03:50 +01:00
Glenn Watson
695b7491fe Change overflow calculation to be calculated after compute_absolute_position.
Also include absolutely positioned elements in the overflow rect calculation.

Fixes #7797.
2015-11-03 20:10:06 +10:00
Ms2ger
9f91984415 Use the passed-in reflow root rather than the one stored in the SharedLayoutContext. 2015-10-26 17:51:26 +01:00
Ms2ger
e6e514c89a Rewrite ParallelPostorderDomTraversal::run_parallel to avoid some unnecessary conversions between LayoutNode and UnsafeLayoutNode. 2015-10-19 15:01:28 +02:00
Ms2ger
3597c463b5 Don't create a LayoutContext in ParallelPostorderDomTraversal::run_parallel. 2015-10-19 15:01:27 +02:00
Ravi Shankar
889eec364b sorted the extern crate, mod & use declarations 2015-09-24 02:12:45 +05:30
Brandon Fairchild
de3547e401 Fix reported test-tidy errors for unmerged import blocks
This merges import blocks that were reported by tidy as unmerged.
2015-09-19 12:50:14 -04:00
Patrick Walton
99587cf105 layout: Allow the overflow area of the <body> to be scrolled.
Fixes scrolling on Twitter.
2015-09-10 18:07:21 -07:00
Simon Sapin
21d69314d4 Don’t mark flow_ref::deref_mut as unsafe.
See discussion in https://github.com/servo/servo/pull/7237
2015-08-21 21:16:25 +02:00
Simon Sapin
649250130b Replace FlowRef with Arc<Flow>, now that Arc supports DST.
… and WeakFlowRef with Weak<Flow>.
2015-08-20 16:49:48 +02:00
Simon Sapin
2d22aa8e7e Replace the unsound impl DerefMut for FlowRef with an unsafe function.
See #6503.
2015-08-20 16:24:26 +02:00
Johann Tuffe
ec07178b6f sort all uses 2015-08-20 20:47:12 +08:00
João Oliveira
067a22a868 Replace uses of for foo in bar.iter(),
and `for foo in bar.iter_mut(), and for foo in bar.into_iter()
(continuation of #7197)
2015-08-18 01:46:11 +01:00
Josh Matthews
8bb853f643 Fix existing syntactics nits. 2015-08-16 10:30:43 -04:00
Anthony Ramine
a49eb14615 Cache the number of children of each node 2015-07-31 23:32:30 +02:00
Ms2ger
14fbfa6aea Remove unused implementation of ParallelPostorderFlowTraversal for BubbleISizes. 2015-07-23 19:30:43 +02:00
Ms2ger
a18dea6578 Pass the SharedLayoutContext to FlowTraversalFunctions directly. 2015-07-23 19:30:26 +02:00
Ms2ger
17a9f8507e Remove the unused proxy argument to ParallelPostorderFlowTraversal::run_parallel. 2015-07-23 19:29:58 +02:00
Ms2ger
5d36fbca29 Reduce the amount of code in the unsafe block in ParallelPostorderFlowTraversal::run_parallel. 2015-07-17 14:52:00 +02:00
Ms2ger
3e2c44114c Move the traversal traits into the traversal module. 2015-07-17 11:40:40 +02:00
Ms2ger
24730f1078 Borrow the QueueData for WorkQueue::run.
This allows us to get rid of the raw pointers and unsafe dereferencing in
the parallel layout implementation.
2015-07-04 08:55:48 +02:00
Ms2ger
41da4fceee Remove the data field from WorkQueue.
It is only used in the run method.
2015-06-29 15:09:29 +02:00
Ms2ger
c214c03375 Pass shared_layout_context to run_queue_with_custom_work_data_type. 2015-06-29 15:07:50 +02:00
bors-servo
07a1e187f0 Auto merge of #6461 - Ms2ger:workqueuedata, r=pcwalton
Use a dedicated type for the opaque type parameter to WorkQueue in layout.

Currently, we use UnsafeFlow and UnsafeLayoutNode, both of which are aliases
for (usize, usize) and thus interconvertible. This change should make it
clearer that the WorkQueue is not limited to one particular type.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6461)
<!-- Reviewable:end -->
2015-06-26 14:10:07 -06:00
Ms2ger
b6e5f8e7b6 Reduce the scope of the unsafe block in ParallelPostorderDomTraversal. 2015-06-25 22:34:00 +02:00
Ms2ger
b98a7f27a9 Remove a no-op transmute in ParallelPostorderDomTraversal. 2015-06-25 22:31:33 +02:00
Ms2ger
d0a29c3951 Use a dedicated type for the opaque type parameter to WorkQueue in layout.
Currently, we use UnsafeFlow and UnsafeLayoutNode, both of which are aliases
for (usize, usize) and thus interconvertible. This change should make it
clearer that the WorkQueue is not limited to one particular type.
2015-06-25 21:20:41 +02:00
Ms2ger
a42e11a95f Replace the LayoutDataAccess trait by inherent methods. 2015-06-22 11:34:31 +02:00