Commit graph

782 commits

Author SHA1 Message Date
Ms2ger
94e1d4d34c Don't call mutate_layout_data in get_{before,after}_pseudo.
We don't mutate anything.
2015-07-21 22:58:16 +02:00
Ms2ger
093204a224 Replace get_{before,after}_display by get_{before,after}_pseudo. 2015-07-21 22:27:40 +02:00
Ms2ger
2e6a723970 Merge has_{before,after}_pseudo into get_{before,after}_display. 2015-07-21 22:27:38 +02:00
Ms2ger
cc356e58ae Remove unused ThreadSafeLayoutNode::get_normal_display. 2015-07-21 22:27:36 +02:00
Ms2ger
930e111713 Scope ThreadSafeLayoutNode::first_child to ThreadSafeLayoutNodeChildrenIterator::new.
It is only used there.
2015-07-21 19:53:34 +02:00
Ms2ger
b3892b74f7 Simplify ThreadSafeLayoutNodeChildrenIterator::next(). 2015-07-21 19:53:23 +02:00
Nicholas Nethercote
f6525b8009 Register/unregister memory reporters in a better place.
By doing this on either side of the call to the relevant tasks' start()
method, we don't need to store the mem::ProfilerChan or the reporter
name in the task itself.
2015-07-20 16:19:51 -07:00
bors-servo
5ac80bff8e Auto merge of #6666 - glennw:exit-flag, r=larsbergstrom
Restore exit after load command line flag.

Also updates glutin with a crash fix that was exposed by this patch.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6666)
<!-- Reviewable:end -->
2015-07-20 15:37:33 -06:00
Bogdan Cuza
0baa6b477c Replace astersisks with appropriate versions in deps 2015-07-20 20:08:08 +03:00
Glenn Watson
4f28c93f40 Restore exit after load command line flag.
Also updates glutin with a crash fix that was exposed by this patch.
2015-07-20 11:19:13 +10:00
Patrick Walton
b6485a9eaf compositing: Make the constellation messages serializable. 2015-07-18 12:43:08 -07: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
46b36242a3 Use Ref::map to make ThreadSafeLayoutNode::style safe. 2015-07-17 14:51:58 +02:00
Ms2ger
bb444df679 Remove unused ThreadSafeLayoutNode::traverse_postorder_mut. 2015-07-17 13:26:23 +02:00
Ms2ger
c018863201 Stop using Option in ThreadSafeLayoutNodeChildrenIterator::parent_node. 2015-07-17 11:41:57 +02:00
Ms2ger
4b08cea663 Scope the allowed unsafe code in traversal.rs. 2015-07-17 11:41:06 +02:00
Ms2ger
3e2c44114c Move the traversal traits into the traversal module. 2015-07-17 11:40:40 +02:00
Patrick Walton
6eacb0c995 gfx: Make display lists serializable using serde.
This commit introduces the `serde` dependency, which we will use to
serialize messages going between processes in multiprocess Servo.

This also adds a new debugging flag, `-Z print-display-list-json`,
allowing the output of display list serialization to be visualized.
This will be useful for our experiments with alternate rasterizers.
2015-07-15 19:04:17 -07:00
Patrick Walton
e5b1ec4078 script: Split Pipeline::create into chrome process and content
process parts.

This will make it easier to adapt to IPC.

The trickiest part here was to make script tasks spawn new layout tasks
directly instead of having the pipeline do it for them. The latter
approach will not work in multiprocess mode, because layout and script
must run in the same address space and the pipeline cannot inject tasks
into another process.
2015-07-14 15:09:16 -07:00
Patrick Walton
9ce65c08a5 layout: Make the LayoutControlChan use IPC. 2015-07-14 13:45:52 -07:00
Ms2ger
ce4d442941 Move away from the repeat().take().collect() pattern.
This was the preferred pattern between the deprecation of Vec::from_elem and
the addition of the count argument to the vec![] macro.
2015-07-14 16:19:30 +02:00
bors-servo
c70d53c9fe Auto merge of #6588 - Ms2ger:has_children, r=pcwalton
Remove unused has_children method.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6588)
<!-- Reviewable:end -->
2015-07-13 23:01:54 -06:00
Ms2ger
17888045bd Pass the WorkQueue to LayoutTask::solve_constraints_parallel.
This removes the possibility of a panic by checking a constraint at compile
time rather than at run time.
2015-07-12 14:14:15 +02:00
Ms2ger
928f843392 Remove unused has_children method. 2015-07-10 19:34:04 +02:00
bors-servo
805232a85e Auto merge of #6574 - Ms2ger:for_node, r=pcwalton
Remove ReplacedImageFragmentInfo::for_node and unsafe code it required.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6574)
<!-- Reviewable:end -->
2015-07-08 08:02:30 -06:00
bors-servo
ce81745a8e Auto merge of #6576 - Ms2ger:scope-unsafe-context, r=pcwalton
Reduce the scope of the allowed unsafe code in context.rs.

Since I made unsafe code opt-in in layout, the unsafe code in this module has
been reduced to a single unsafe impl, so there is no reason to allow it in
the entire module.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6576)
<!-- Reviewable:end -->
2015-07-08 05:59:00 -06:00
Ms2ger
270f0aafed Reduce the scope of the allowed unsafe code in context.rs.
Since I made unsafe code opt-in in layout, the unsafe code in this module has
been reduced to a single unsafe impl, so there is no reason to allow it in
the entire module.
2015-07-08 11:28:59 +02:00
Ms2ger
fd944f7765 Remove the manual Send/Sync implementations for Fragment.
It was Send already, and ReplacedImageFragmentInfo::for_node was the only
member that wasn't Sync.
2015-07-08 10:52:34 +02:00
Ms2ger
7ca3dfb43f Remove ReplacedImageFragmentInfo::for_node.
It became unused in d8aef7208e.
2015-07-08 10:50:24 +02:00
bors-servo
effe569e32 Auto merge of #6573 - Ms2ger:warnings, r=jdm
Don't lose a possible error in <SpecificFragmentInfo as fmt::Debug>::fmt.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6573)
<!-- Reviewable:end -->
2015-07-08 00:35:38 -06:00
Ms2ger
f71ca62522 Don't lose a possible error in <SpecificFragmentInfo as fmt::Debug>::fmt. 2015-07-08 10:23:55 +02:00
Ms2ger
0302244709 Remove the unused unrooted_must_root permission from layout. 2015-07-08 11:36:52 +02:00
bors-servo
c76720d67c Auto merge of #6570 - Ms2ger:workqueue-sync, r=pcwalton
Require that WorkQueue's QueueData is Sync rather than Send.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6570)
<!-- Reviewable:end -->
2015-07-07 13:07:31 -06:00
Patrick Walton
c84368b703 layout: Make the output of flow tree dumping easier to read when there
are many fragments.
2015-07-07 15:01:18 -07:00
Patrick Walton
24f10df436 layout: Modify styles for replaced content as appropriate during
incremental flow construction.

Fixes jumpiness on lots of Web sites.
2015-07-07 15:00:52 -07:00
bors-servo
0688488a7f Auto merge of #6565 - dwins:issue_6452_image_padding, r=pcwalton
Fix for #6542 - <img> top-padding adds margin

I wrote this patch that makes the test from #6542 render as expected but I am not confident it is actually the right fix.  Should the padding be included in the 'ascent' metric for images, or am I just introducing a bug that happens to offset the one I'm trying to fix?

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6565)
<!-- Reviewable:end -->
2015-07-07 06:27:13 -06:00
Ms2ger
028484526d Require that WorkQueue's QueueData is Sync rather than Send. 2015-07-07 11:11:46 +02:00
Glenn Watson
83301ebb75 Add servo Image type. Remove rust-png dependency from script, gfx, layout. 2015-07-07 08:45:01 +10:00
David Winslow
261711d51a Include padding in ascent reported for <img>
fixes #6452
2015-07-06 15:28:13 -04:00
bors-servo
a3821bf240 Auto merge of #6547 - Ms2ger:workqueue-reference, r=pcwalton
Borrow the QueueData for WorkQueue::run.

This allows us to get rid of the raw pointers and unsafe dereferencing in
the parallel layout implementation.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6547)
<!-- Reviewable:end -->
2015-07-06 08:29:17 -06:00
bors-servo
b876a54dce Auto merge of #6365 - pcwalton:sequential-display-list-construction, r=larsbergstrom
layout: Disable parallel display list building by default.

I've never see it result in a speedup. Actually, I don't think I've seen
it result in anything better than a 50% slowdown. The arithmetic
intensity is just too low, at least with the current algorithm.

Parallel DL building can still be enabled with a debug flag if the
algorithm is improved.

r? @metajack

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6365)
<!-- Reviewable:end -->
2015-07-06 07:08:58 -06:00
bors-servo
cc73aad447 Auto merge of #6546 - michaelwu:slim-layoutdatawrapper, r=Ms2ger
Remove LayoutChan from LayoutDataWrapper

Saves 32 bytes in Node.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6546)
<!-- Reviewable:end -->
2015-07-05 21:39:12 -06:00
Ms2ger
58a7c81530 Store a LayoutJS<Element> in LayoutElement. 2015-07-04 17:38:42 +02:00
Michael Wu
1a014beb08 Remove LayoutChan from LayoutDataWrapper 2015-07-04 03:54:40 -04:00
Ms2ger
d4888dbd4d Fix build warnings. 2015-07-04 14:33:18 +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
bors-servo
0298c92670 Auto merge of #6549 - Ms2ger:from_actual, r=nox
Remove *Cast::from_actual.

Since JSRef was removed, from_actual duplicates from_ref.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6549)
<!-- Reviewable:end -->
2015-07-03 22:56:17 -06:00
Ms2ger
2f88b84e07 Remove *Cast::from_actual.
Since JSRef was removed, from_actual duplicates from_ref.
2015-07-04 12:55:01 +02:00
Simon Sapin
75e3e787f6 Upgrade to rustc 1.3.0-dev (f3b97a74a 2015-07-03) 2015-07-04 11:32:41 +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