Ms2ger
8375e0914a
Simplify ThreadSafeLayoutNodeChildrenIterator::next a bit.
2015-06-25 08:28:03 +02:00
Ms2ger
51d0f51dd9
Use a while let loop in ThreadSafeLayoutNode::traverse_postorder_mut.
2015-06-25 08:27:56 +02:00
Ms2ger
c87c7f1d84
Simplify ThreadSafeLayoutNode::text_content.
2015-06-25 08:27:53 +02:00
Ms2ger
e1cee995b7
Make {ThreadSafe,}LayoutNode::get_jsmanaged private.
...
There are no longer any callers outside wrapper.rs, and this makes it harder
to introduce buggy callers.
2015-06-24 15:14:19 +02:00
Ms2ger
2ea32829af
Replace OpaqueNodeMethods::from_{threadsafe_,}layout_node by opaque methods.
2015-06-24 14:55:43 +02:00
bors-servo
469b9550f6
Auto merge of #6443 - Ms2ger:cleanup-layout, r=pcwalton
...
Various layout cleanup.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6443 )
<!-- Reviewable:end -->
2015-06-24 03:00:32 -06:00
Glenn Watson
39ddbbb0e1
Implement enough of 3d transforms spec to run the CSS FPS demo.
2015-06-23 14:10:44 +10:00
bors-servo
d86c587925
Auto merge of #6445 - mbrubeck:next_fragment, r=pcwalton
...
Simplify next_fragment and fix obsolete docs
r? @pcwalton
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6445 )
<!-- Reviewable:end -->
2015-06-22 16:23:27 -06:00
Matt Brubeck
a3b339c358
Simplify next_fragment and fix obsolete docs
2015-06-22 15:23:00 -07:00
Ms2ger
a42e11a95f
Replace the LayoutDataAccess trait by inherent methods.
2015-06-22 11:34:31 +02:00
Ms2ger
167a396293
Replace TLayoutNode by inherent methods.
...
There is no reason for this trait to exist.
2015-06-22 11:04:43 +02:00
Ms2ger
50d4084e9a
Remove TLayoutNode::first_child.
...
It is replaced by the TNode implementation for LayoutNode and an inherent
implementation for ThreadSafeLayoutNode.
2015-06-22 11:04:41 +02:00
Ms2ger
dc167ca343
Implement type_id as inherent methods.
...
This implies LayoutNode no longer needs to return an Option, as it never
represents a pseudo-element.
Also, fixes lies in the documentation.
2015-06-22 10:47:52 +02:00
Ms2ger
f0034b4ac9
Remove some dead code from ThreadSafeLayoutNode::first_child.
...
self.pseudo is always PseudoElementType::Normal at this point.
2015-06-22 10:47:44 +02:00
Ms2ger
13a07a4ed2
Move some TLayoutNode methods to ThreadSafeLayoutNode.
...
They are unused on LayoutNode.
2015-06-22 10:47:38 +02:00
Ms2ger
8f58dafbd6
Inline node_is_element and node_is_document into their only callers.
2015-06-22 10:47:35 +02:00
Ms2ger
54b9dc6563
Inline LayoutNode::text_content into its only caller, ThreadSafeLayoutNode::text_content.
2015-06-22 10:47:31 +02:00
Ms2ger
1398616ec1
Remove incorrect claim from a comment.
2015-06-22 10:47:27 +02:00
Ms2ger
ae5191275a
Remove TLayoutNode::get.
...
It is highly unsafe and unused.
2015-06-22 10:47:23 +02:00
Ms2ger
eb2c508df0
Implement the LayoutData getters on LayoutJS<Node> rather than Node itself.
2015-06-22 10:47:21 +02:00
Ms2ger
ebd0a62eec
Remove an unused import from layout_task.
2015-06-22 10:47:18 +02:00
Simon Sapin
fc25397c91
Update rust-selectors
...
https://github.com/servo/rust-selectors/pull/30
2015-06-20 07:05:43 +02:00
Michael Wu
675267b782
Upgrade to SM 39
2015-06-19 18:42:48 -04:00
ecoal95
8cbfb3482c
Use euclid from crates.io
2015-06-19 00:04:24 +02:00
Simon Sapin
0229de822b
Use string-cache from crates.io
2015-06-16 00:27:50 +02:00
Manish Goregaokar
94fa868d2b
Add unsafe blocks to make_unique
...
See #6376
2015-06-14 20:52:27 +05:30
bors-servo
db2eb36e19
Auto merge of #6325 - Ms2ger:from_str, r=nox
...
The former appears to be preferred.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6325 )
<!-- Reviewable:end -->
2015-06-14 03:55:56 -06:00
Corey Farwell
5c408d2be9
rust-geom API changes
...
https://github.com/servo/rust-geom/pull/81
2015-06-13 12:28:21 -07:00
Ms2ger
b49bd79625
Use str::parse() rather than FromStr::from_str.
...
The former appears to be preferred.
2015-06-13 17:58:16 +02:00
bors-servo
f03f584895
Auto merge of #6334 - nnethercote:report-local-contexts, r=pcwalton
...
Passing a function that measures TLS to WorkQueue is a bit weird, but I can't see how else to measure that data.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6334 )
<!-- Reviewable:end -->
2015-06-12 18:42:32 -06:00
Patrick Walton
732fd9e050
layout: Divide DOM nodes and flows into chunks, and perform work stealing over
...
those instead of working on nodes one-by-one.
This reduces the overhead of the work-stealing traversal function
significantly. It's especially important on ARM, where memory barriers are
expensive.
2015-06-12 16:07:39 -07:00
bors-servo
74ef31cfc4
Auto merge of #6335 - nnethercote:fix-layout-task-shutdown-panic, r=metajack
...
Prior to this change, a panic would occur if a CollectReport message was
received while the LayoutTask was shutting down. Now it just gets
ignored.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6335 )
<!-- Reviewable:end -->
2015-06-11 00:58:41 -06:00
Nicholas Nethercote
67e7436cb8
Ignore CollectReport messages when shutting down the LayoutTask.
...
Prior to this change, a panic would occur if a CollectReport message was
received while the LayoutTask was shutting down. Now it just gets
ignored.
2015-06-10 21:18:39 -07:00
Nicholas Nethercote
48a0725c01
Measure LocalLayoutContexts in LayoutTask and LayoutWorkers.
...
The FreeType instances in layout workers are reasonably large and worth
measuring. The one in LayoutTask is smaller but it's easy to measure at the
same time. Sample output:
```
| 8.33 MiB -- pages
| 8.33 MiB -- url(file:///home/njn/moz/servo/../servo-static-suite/wikipedia/Guardians%20of%20the%20Galaxy%20(film)%20-%20Wikipedia,%20the%20free%20encyclopedia.html)
| 1.32 MiB -- layout-worker-0-local-context
| 1.31 MiB -- layout-worker-1-local-context
| 1.24 MiB -- layout-worker-3-local-context
| 1.17 MiB -- layout-worker-4-local-context
| 1.08 MiB -- layout-worker-2-local-context
| 1.06 MiB -- layout-worker-5-local-context
| 0.78 MiB -- paint-task
| 0.78 MiB -- buffer-map
| 0.38 MiB -- layout-task
| 0.30 MiB -- display-list
| 0.07 MiB -- local-context
```
This required adding a mechanism to WorkQueue to measure worker TLSes.
2015-06-10 21:06:59 -07:00
bors-servo
a8b6632a5a
Auto merge of #6328 - mbrubeck:line-comment, r=pcwalton
...
r? @pcwalton
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6328 )
<!-- Reviewable:end -->
2015-06-10 17:44:55 -06:00
Glenn Watson
899ab226de
Updates for changes in rust-geom and rust-layers
2015-06-11 07:19:58 +10:00
Patrick Walton
e42011cd53
Revert "Updates for changes in rust-geom and rust-layers"
2015-06-10 14:14:51 -07:00
Patrick Walton
053296e131
Merge pull request #6329 from glennw/remove-generic
...
Updates for changes in rust-geom and rust-layers
2015-06-10 14:14:24 -07:00
Glenn Watson
8fb29c91e6
Updates for changes in rust-geom and rust-layers
2015-06-11 07:05:56 +10:00
Matt Brubeck
775953b11e
Fix indices in Line::range doc comment
2015-06-10 14:04:15 -07:00
Corey Farwell
4f47b41fa7
Remove fnv & smallvec crate reexports from util
...
The util component specified fnv and smallvec as dependencies and publicly
reexported both of them. Several other components utilized these reexports,
presumably because fnv and smallvec used to live in the tree so reexporting
made the transition easier.
These indirect dependencies through the util component are unnecessary.
This commit removes the fnv & smallvec crate reexports in the util component.
It exchange, it adds fnv & smallvec as dependencies to non-util components
wherever needed. Finally, it removes the fnv dependency from util as it is not
utilized anywhere in the util component.
2015-06-10 07:14:55 -07:00
bors-servo
8236221acf
Auto merge of #6280 - glennw:transform-transitions, r=nox
...
Also tidy up some of the ComputedMatrix code.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6280 )
<!-- Reviewable:end -->
2015-06-09 16:32:54 -06:00
bors-servo
0dec64caf0
Auto merge of #6289 - nnethercote:unleak-LOCAL_CONTEXT_KEY, r=pcwalton
...
`LOCAL_CONTEXT_KEY` is currently a `Cell<*mut LocalLayoutContext>`. The use
of the raw pointer means that the `LocalLayoutContext` is not dropped when
the thread dies; this leaks FreeType instances and probably other
things. There are also some unsafe getter functions in `LayoutContext`
(`font_context`, `applicable_declarations_cache` and
`style_sharing_candidate_cache`) that @eddyb says involve undefined
behaviour.
This changeset changes `LOCAL_CONTEXT_KEY` to
`RefCell<Option<Rc<LocalLayoutContext>>>`. This fixes the leak and also
results in safe getters.
(Fixes #6282.)
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6289 )
<!-- Reviewable:end -->
2015-06-09 15:52:45 -06:00
Glenn Watson
6dd082278d
Partial implementation of transform animations spec.
...
Also tidy up some of the ComputedMatrix code.
2015-06-10 07:07:28 +10:00
Manish Goregaokar
af364a412e
Audit and reduce unstable usage in layout
...
Reasons behind existing unstable features:
alloc:
- `make_unique()`
- direct calls into `heap::allocate()`, etc
- `boxed::into_raw()` (naming)
collections:
- `slice_chars()` (needs to prove its worth)
core:
- lots and lots of pointer manip
- `raw` stuff
std_misc:
- Handle stuff
- hasher stuff
str_char:
- CharRange
2015-06-10 00:54:14 +05:30
Eduard Burtescu
00e8e5f77d
Use the correct log crate and setup env_logger in main.
2015-06-06 23:20:40 +03:00
Nicholas Nethercote
9b4d39d6d1
Make LOCAL_CONTEXT_KEY safe and non-leaky.
...
`LOCAL_CONTEXT_KEY` is currently a `Cell<*mut LocalLayoutContext>`. The use
of the raw pointer means that the `LocalLayoutContext` is not dropped when
the thread dies; this leaks FreeType instances and probably other
things. There are also some unsafe getter functions in `LayoutContext`
(`font_context`, `applicable_declarations_cache` and
`style_sharing_candidate_cache`) that @eddyb says involve undefined
behaviour.
This changeset changes `LOCAL_CONTEXT_KEY` to
`RefCell<Option<Rc<LocalLayoutContext>>>`. This fixes the leak and also
results in safe getters.
(Fixes #6282.)
2015-06-04 20:57:34 -07:00
Corey Farwell
a14c745a6a
Bump rust-url version: 0.2.16 → 0.2.35
2015-06-04 16:45:15 -04:00
bors-servo
05212b702d
Auto merge of #6214 - glennw:parse-transforms, r=pcwalton
...
* Add parser support for 3d transforms.
* Change ComputedMatrix to a representation that suits interpolation.
* Switch stacking contexts to use 4x4 matrices.
The transforms themselves are still converted to 2d and handled by azure for now, but this is a small standalone part that can be landed now to make it easier to review.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6214 )
<!-- Reviewable:end -->
2015-06-02 19:56:17 -05:00
bors-servo
20f63459ef
Auto merge of #6254 - servo:rustup_20150601, r=SimonSapin
...
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6254 )
<!-- Reviewable:end -->
2015-06-02 12:53:37 -05:00