| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
This also moves LayerId and LayerProperties to gfx_traits.
Fixes #8836.
|
| |
|
|
|
|
| |
ParserContext
|
|
|
|
|
|
|
|
|
|
| |
animations complete or are interrupted.
This adds a new pair of reader-writer locks. I measured the performance
of style recalculation on Wikipedia and the overhead of the locks was
not measurable.
Closes #7816.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Fixes a bug whereby all nodes would get unconditionally reflowed on
every layout event if the page set a viewport.
|
| |
|
| |
|
| |
|
|
|
|
| |
This merges import blocks that were reported by tidy as unmerged.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
At this point the only thing it does is to try to avoid adding display
items that are outside the root scrollable area, which is both wrong
(since it's incompatible with having scrollable areas outside the root)
and is useless (because we have displayports now).
|
|
|
|
|
|
|
|
|
|
| |
new styles are set.
Tying transitions to the DOM node avoids quadratic complexity when
updating them.
Finishing transitions instantly when styles are updated makes our
behavior more correct.
|
|
|
|
|
| |
This necessitated getting rid of the boxed trait object that was being
be passed between the script task and the image cache task.
|
|
|
|
|
|
| |
To actually make the multiprocess communication work, we'll need to
reroute the task creation to the pipeline or the compositor. But this
works as a first step.
|
|
|
|
| |
Also updates glutin with a crash fix that was exposed by this patch.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This allows us to get rid of the raw pointers and unsafe dereferencing in
the parallel layout implementation.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`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.)
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
r? @jdm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5586)
<!-- Reviewable:end -->
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
image fragments.
This also changes the way the placeholder is handled in the image cache
task to decode it up front instead of each time an image fails to load,
both because it was more convenient to implement that way and because
it saves CPU cycles to do so.
This matches the behavior of Gecko and WebKit. It improves the look of
our cached copy of Wikipedia.
|
|/
|
|
|
|
|
| |
Note that this keeps using readback right now, `NativeSurface` painting
will be implemented soon.
Also see https://github.com/servo/servo/issues/6142
|
|
|
|
|
|
| |
for items outside it.
This improves Servo's performance on large pages.
|
|
|
|
|
|
|
|
|
| |
* Fix queries involving stacking contexts
* The code was double accumulating stacking context origins.
* Handle queries of inline elements.
* The node addresses being compared were incorrect (CharacterData vs. Span)
* Handle ScriptQuery reflows correctly.
* The layout task was skipping the compute absolute positions traversal, so failed before window.onload.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Simpler image cache API for clients to use.
* Significantly fewer threads.
* One thread for image cache task (multiplexes commands, decoder threads and async resource requests).
* 4 threads for decoder worker tasks.
* Removed ReflowEvent hacks in script and layout tasks.
* Image elements pass a Trusted<T> to image cache, which is used to dirty nodes via script task. Previous use of Untrusted addresses was unsafe.
* Image requests such as background-image on layout / paint threads trigger repaint only rather than full reflow.
* Add reflow batching for when multiple images load quickly.
* Reduces the number of paints loading wikipedia from ~95 to ~35.
* Reasonably simple to add proper prefetch support in a follow up PR.
* Async loaded images always construct Image fragments now, instead of generic.
* Image fragments support the image not being present.
* Simpler implementation of synchronous image loading for reftests.
* Removed image holder.
* image.onload support.
* image NaturalWidth and NaturalHeight support.
* Updated WPT expectations.
|
|
|
|
| |
Fixes #4476
|
|
|
|
|
|
|
|
| |
Transition events are not yet supported, and the only animatable
properties are `top`, `right`, `bottom`, and `left`. However, all other
features of transitions are supported. There are no automated tests at
present because I'm not sure how best to test it, but three manual tests
are included.
|
| |
|
| |
|
|
|
|
|
|
| |
When a viewport is resized, the computed values for a style containing viewport percentage length units become stale. However, there's no way for those styles to be invalidated after a resize. As a solution, this commit invalidates the computed values cache after a resize has occurred, which is probably over-kill.
A better solution would probably be to track under what conditions computed values remain valid, and invalidate them as indicated.
|
| |
|
| |
|
| |
|
| |
|
| |
|