aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/layout_task.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Move generation from LayoutTaskData to LayoutTask.Ms2ger2015-11-091-7/+7
|
* Remove LayoutTaskData::image_cache_task.Ms2ger2015-11-091-6/+2
|
* Remove unused RwData arguments from LayoutTask::exit_now and ↵Ms2ger2015-11-091-7/+5
| | | | LayoutTask::prepare_to_exit.
* Move parallel_traversal from LayoutTaskData to LayoutTask.Ms2ger2015-11-091-23/+20
|
* Make LayoutTask::solve_constraints_parallel a static method.Ms2ger2015-11-091-7/+10
| | | | | This matches LayoutTask::solve_constraints, and will be necessary when we borrow parallel_traversal directly from the LayoutTask.
* Make LayoutTask::solve_constraints a static method.Ms2ger2015-11-091-3/+2
| | | | It does not use self.
* Move LayoutTask::first_reflow out of its Cell.Ms2ger2015-11-091-16/+15
| | | | | As the LayoutTask is uniquely owned, and we no longer have borrows of its fields hanging around, we can use mutable references to simplify some code.
* Introduce a RwData struct.Ms2ger2015-11-091-82/+78
|
* Disentangle the message handling from the receiver selection in ↵Ms2ger2015-11-091-33/+51
| | | | | | | LayoutTask::handle_request. This ensures no fields of the LayoutTask are borrowed when calling repaint or handle_request_helper, which I'll need later.
* Consolidate ProfilerMetadata and TimerMetadata.Ms2ger2015-11-091-9/+11
| | | | | | | 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.
* Auto merge of #8039 - tschneidereit:script-owns-stylesheets, r=jdmbors-servo2015-11-081-81/+22
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move Stylesheet loading and ownership from the layout task into HTML elements Stylesheets for `HTMLLinkElement`s are now loaded by the resource task, triggered by the element in question. Stylesheets are owned by the elements they're associated with, which can be `HTMLStyleElement`, `HTMLLinkElement`, and `HTMLMetaElement` (for `<meta name="viewport">). Additionally, the quirks mode stylesheet (just as the user and user agent stylesheets a couple of commits ago), is implemented as a lazy static, loaded once per process and shared between all documents. This all has various nice consequences: - Stylesheet loading becomes a non-blocking operation. - Stylesheets are removed when the element they're associated with is removed from the document. - It'll be possible to implement the CSSOM APIs that require direct access to the stylesheets (i.e., ~ all of them). - Various subtle correctness issues are fixed. One piece of interesting follow-up work would be to move parsing of external stylesheets to the resource task, too. Right now, it happens in the link element once loading is complete, so blocks the script task. Moving it to the resource task would probably be fairly straight-forward as it doesn't require access to any external state. Depends on #7979 because without that loading stylesheets asynchronously breaks lots of content. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8039) <!-- Reviewable:end -->
| * Move Stylesheet loading and ownership from the layout task into HTML elementsTill Schneidereit2015-11-071-78/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Stylesheets for `HTMLLinkElement`s are now loaded by the resource task, triggered by the element in question. Stylesheets are owned by the elements they're associated with, which can be `HTMLStyleElement`, `HTMLLinkElement`, and `HTMLMetaElement` (for `<meta name="viewport">). Additionally, the quirks mode stylesheet (just as the user and user agent stylesheets a couple of commits ago), is implemented as a lazy static, loaded once per process and shared between all documents. This all has various nice consequences: - Stylesheet loading becomes a non-blocking operation. - Stylesheets are removed when the element they're associated with is removed from the document. - It'll be possible to implement the CSSOM APIs that require direct access to the stylesheets (i.e., ~ all of them). - Various subtle correctness issues are fixed. One piece of interesting follow-up work would be to move parsing of external stylesheets to the resource task, too. Right now, it happens in the link element once loading is complete, so blocks the script task. Moving it to the resource task would probably be fairly straight-forward as it doesn't require access to any external state.
| * Let Stylist compute and store viewport constraints when setting the deviceTill Schneidereit2015-11-071-2/+2
| |
| * Make UA and user stylesheets static and shared by all Stylist instancesTill Schneidereit2015-11-071-3/+3
| |
* | Auto merge of #8355 - Ms2ger:Exit, r=noxbors-servo2015-11-071-12/+10
|\ \ | | | | | | | | | | | | | | | | | | | | | Cleanup exit messages and related code. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8355) <!-- Reviewable:end -->
| * | Remove the unused PipelineExitType field from LayoutControlMsg::ExitNow.Ms2ger2015-11-051-1/+1
| | |
| * | Remove the unused PipelineExitType field from layout_interface::Msg::ExitNow.Ms2ger2015-11-051-4/+4
| | |
| * | Remove the unused PipelineExitType argument to LayoutTask::exit_now.Ms2ger2015-11-051-7/+6
| | |
| * | Remove the unused PipelineExitType from LayoutToPaintMsg::Exit.Ms2ger2015-11-051-2/+2
| | |
| * | Remove the unused Option around the IpcSender from LayoutToPaintMsg::Exit.Ms2ger2015-11-051-1/+1
| | |
| * | Reorder LayoutTask::exit_now for clarity.Ms2ger2015-11-051-2/+1
| | |
* | | Wrap SharedLayoutContext::stylist in a wrapper to make it Sync.Ms2ger2015-11-071-2/+2
| | |
* | | Wrap SharedLayoutContext::canvas_layers_sender in a Mutex.Ms2ger2015-11-071-1/+1
| | |
* | | Wrap SharedLayoutContext::new_animations_sender in a Mutex.Ms2ger2015-11-071-1/+1
| | |
* | | Wrap SharedLayoutContext::font_cache_task in a Mutex.Ms2ger2015-11-071-1/+1
| | |
* | | Remove unused SharedLayoutContext::constellation_chan.Ms2ger2015-11-071-1/+0
| | |
* | | Wrap SharedLayoutContext::image_cache_sender in a Mutex.Ms2ger2015-11-071-1/+1
| | |
* | | Remove unused SharedLayoutContext::layout_chan.Ms2ger2015-11-071-1/+0
| | |
* | | Auto merge of #8341 - bholley:state_hint_selector_ordering, r=pcwaltonbors-servo2015-11-071-8/+15
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix restyle hints to handle non-last psuedo-selectors, and track pristine state values rather than changesets <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8341) <!-- Reviewable:end -->
| * | | Store pristine element state rather than a set of changes.Bobby Holley2015-11-041-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the strategy we'll need to take for attributes, and so this change puts us in a position to handle attributes and state the same way. This does mean that we stop taking care to track the situations where our state has reverted to the original state, with no net change. I think that's probably of negligible value though.
| * | | Load web fonts synchronously during wpt.Bobby Holley2015-11-041-4/+12
| |/ /
* | | Auto merge of #8330 - Ms2ger:rm-screen_size, r=larsbergstrombors-servo2015-11-071-7/+1
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | Remove unused LayoutTaskData::screen_size. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8330) <!-- Reviewable:end -->
| * | Remove unused LayoutTaskData::screen_size.Ms2ger2015-11-041-7/+1
| |/
* / Remove DisplayListBuildingResultMartin Robinson2015-11-041-3/+2
|/ | | | | | | | | Always produce a DisplayList when processing nodes for display list construction. StackingContexts are now added to the positioned content section of DisplayLists. This makes the code a bit simpler and opens up the possibility of producing a StackingContext in another section of the DisplayList. This doesn't change behavior, but is a cleanup prerequisite for proper inline stacking context support.
* Allow retrieving width/height for non-positioned elementsDavid Zbarsky2015-11-031-29/+42
|
* layout: Minor whitespace cleanup.Patrick Walton2015-11-031-1/+3
|
* layout: Store viewport and screen size separately.Patrick Walton2015-11-031-17/+29
| | | | | Fixes a bug whereby all nodes would get unconditionally reflowed on every layout event if the page set a viewport.
* Auto merge of #8290 - itsmeolivia:store-script-reflow, r=Ms2gerbors-servo2015-11-011-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | Un-boxed ScriptReflow As per #8238 I changed `layout_interface::Msg::Reflow` to store `ScriptReflow` rather than `Box<ScriptReflow>` I ran the tests and believe everything passed but this is my first commit to the project so sorry if I messed up the protocol! <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8290) <!-- Reviewable:end -->
| * Un-boxed ScriptReflowOlivia Nordquist2015-10-311-1/+1
| |
* | Implement restyle hints for state changes.Bobby Holley2015-10-311-3/+4
| |
* | Move EventState to rust-selectors.Bobby Holley2015-10-301-3/+3
|/
* Auto merge of #8187 - Ms2ger:layoutnode-new, r=pcwaltonbors-servo2015-10-301-27/+11
|\ | | | | | | | | | | | | | | | | | | Introduce a Layoutnode::new function and use it. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8187) <!-- Reviewable:end -->
| * Use LayoutNode::new to avoid transmute calls in LayoutTask.Ms2ger2015-10-291-25/+9
| |
| * Pass a LayoutNode to LayoutTask::dirty_all_nodes.Ms2ger2015-10-291-3/+3
| | | | | | | | | | There is no point in passing a mutable reference to what is essentially already a pointer.
* | Auto merge of #8212 - Ms2ger:reflow-root, r=pcwaltonbors-servo2015-10-301-7/+0
|\ \ | |/ |/| | | | | | | | | | | | | | | Remove SharedLayoutContext::reflow_root. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8212) <!-- Reviewable:end -->
| * Remove the reflow root from SharedLayoutContext.Ms2ger2015-10-261-7/+0
| |
* | Check modified event state from layout and dirty it there.Bobby Holley2015-10-271-0/+8
| | | | | | | | | | | | | | | | | | This adds some overhead, but also provides the small performance benefit of avoiding dirtying in the case where an event state is toggled an even number of times between reflows. The main benefit here though is that it sets us up to be smarter about what we mark as dirty using restyle hints.
* | Pass the document instead of the documentElement to reflow.Bobby Holley2015-10-271-13/+16
| |
* | Use an RAII guard to join the script task.Bobby Holley2015-10-271-4/+12
|/
* Return the result from process_content_box_request.Ms2ger2015-10-261-1/+1
|