aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/context.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Move LayerKind and ScrollPolicy enums to gfx_traitsBrandon Fairchild2015-12-201-1/+1
| | | | | | This also moves LayerId and LayerProperties to gfx_traits. Fixes #8836.
* Add pipeline information to CSS error reporting.GauriGNaik2015-12-141-1/+1
|
* Defined new trait ParseErrorReporter and added error_reporter member to ↵GauriGNaik2015-11-251-0/+4
| | | | ParserContext
* Write animated values into the `ComputedValues` structures whenPatrick Walton2015-11-241-2/+5
| | | | | | | | | | 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.
* Remove the unsafe Sync implementation for SharedLayoutContext.Ms2ger2015-11-071-5/+0
|
* Wrap SharedLayoutContext::stylist in a wrapper to make it Sync.Ms2ger2015-11-071-2/+7
|
* Wrap SharedLayoutContext::canvas_layers_sender in a Mutex.Ms2ger2015-11-071-2/+1
|
* Wrap SharedLayoutContext::new_animations_sender in a Mutex.Ms2ger2015-11-071-2/+1
|
* Wrap SharedLayoutContext::font_cache_task in a Mutex.Ms2ger2015-11-071-3/+3
|
* Remove unused SharedLayoutContext::constellation_chan.Ms2ger2015-11-071-5/+0
|
* Wrap SharedLayoutContext::image_cache_sender in a Mutex.Ms2ger2015-11-071-5/+4
|
* Remove unused SharedLayoutContext::layout_chan.Ms2ger2015-11-071-5/+1
|
* layout: Store viewport and screen size separately.Patrick Walton2015-11-031-2/+2
| | | | | Fixes a bug whereby all nodes would get unconditionally reflowed on every layout event if the page set a viewport.
* Remove the reflow root from SharedLayoutContext.Ms2ger2015-10-261-3/+0
|
* Split Au type into separate crate, with minimal dependencies.Glenn Watson2015-10-011-1/+1
|
* sorted the extern crate, mod & use declarationsRavi Shankar2015-09-241-2/+1
|
* Fix reported test-tidy errors for unmerged import blocksBrandon Fairchild2015-09-191-2/+1
| | | | This merges import blocks that were reported by tidy as unmerged.
* layout: Reformat some long lines and fix some whitespace issues.Patrick Walton2015-09-171-3/+3
|
* Remove 'get_*' on getters as per RFC 0344 on various componentsMathieu Rheaume2015-09-121-2/+2
|
* sort all usesJohann Tuffe2015-08-201-2/+2
|
* Fix existing syntactics nits.Josh Matthews2015-08-161-1/+1
|
* layout: Remove the now-useless `dirty` field from the layout context.Patrick Walton2015-08-101-3/+0
| | | | | | | 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).
* layout: Tie transitions to the DOM node and finish them instantly whenPatrick Walton2015-08-011-0/+3
| | | | | | | | | | 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.
* script: Make the `ImageCacheTask` use IPC.Patrick Walton2015-07-261-2/+2
| | | | | This necessitated getting rid of the boxed trait object that was being be passed between the script task and the image cache task.
* script: Make most of 2D canvas and WebGL run over IPC.Patrick Walton2015-07-251-2/+3
| | | | | | 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.
* Restore exit after load command line flag.Glenn Watson2015-07-201-1/+2
| | | | Also updates glutin with a crash fix that was exposed by this patch.
* Reduce the scope of the allowed unsafe code in context.rs.Ms2ger2015-07-081-1/+2
| | | | | | 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.
* Require that WorkQueue's QueueData is Sync rather than Send.Ms2ger2015-07-071-1/+10
|
* Borrow the QueueData for WorkQueue::run.Ms2ger2015-07-041-3/+1
| | | | | This allows us to get rid of the raw pointers and unsafe dereferencing in the parallel layout implementation.
* Use euclid from crates.ioecoal952015-06-191-1/+1
|
* Measure LocalLayoutContexts in LayoutTask and LayoutWorkers.Nicholas Nethercote2015-06-101-0/+14
| | | | | | | | | | | | | | | | | | | | | | 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.
* Remove fnv & smallvec crate reexports from utilCorey Farwell2015-06-101-1/+1
| | | | | | | | | | | | | | 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.
* Make LOCAL_CONTEXT_KEY safe and non-leaky.Nicholas Nethercote2015-06-041-37/+28
| | | | | | | | | | | | | | | | `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.)
* Fix a rustup warning. `std::box::into_raw` is now safe.Simon Sapin2015-06-021-1/+1
|
* Auto merge of #5586 - pcwalton:no-broken-background-image-redux, r=glennwbors-servo2015-05-201-4/+11
|\ | | | | | | | | | | | | | | 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 -->
| * net: Don't load the placeholder image for background images, only forPatrick Walton2015-05-201-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Layerize canvasecoal952015-05-201-2/+6
|/ | | | | | | Note that this keeps using readback right now, `NativeSurface` painting will be implemented soon. Also see https://github.com/servo/servo/issues/6142
* compositing: Implement display ports and avoid creating display listsPatrick Walton2015-05-191-0/+7
| | | | | | for items outside it. This improves Servo's performance on large pages.
* Various fixes to getClientBoundingRect()Glenn Watson2015-05-011-1/+4
| | | | | | | | | * 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.
* Refactored image cache task - details below.Glenn Watson2015-04-231-6/+48
| | | | | | | | | | | | | | | | | | | | * 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.
* Split out shared networking code into net_traits crateGilles Leblanc2015-04-031-1/+1
| | | | Fixes #4476
* layout: Implement CSS transitions per CSS-TRANSITIONS § 2.Patrick Walton2015-03-311-6/+14
| | | | | | | | 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.
* Use u32 for generation numbers.Ms2ger2015-03-281-1/+1
|
* Replace unsafe_blocks by unsafe_code.Manish Goregaokar2015-03-211-1/+1
|
* Fix broken viewport percentage length units after a viewport resize.James Gilbertson2015-03-081-0/+7
| | | | | | 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.
* Get rid of servo_utilDan Fox2015-03-051-1/+1
|
* Use boxed::into_raw in create_or_get_local_context.Ms2ger2015-02-121-2/+2
|
* Import net as net rather than servo_net.Ms2ger2015-02-101-1/+1
|
* Import msg as msg rather than servo_msg.Ms2ger2015-02-101-1/+1
|
* Opt-in rather than opt-out to unsafe blocks in layout.Ms2ger2015-02-081-0/+2
|