aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/layout_wrapper.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Simplify TNode a bit.Bobby Holley2016-10-201-15/+30
| | | | | | | | A couple of changes here: * Remove the option to unset with the dirty bit setters. * Add an explicit API for setting text node style. * Hoist has_changed handling into the restyle damage setter and text node style setter. * Make set_style take a non-Option.
* Auto merge of #13691 - servo:mem-replace, r=emiliobors-servo2016-10-121-5/+2
|\ | | | | | | | | | | | | | | Use mem::replace in take_pseudo_styles. <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13691) <!-- Reviewable:end -->
| * Use mem::replace in take_pseudo_styles.Ms2ger2016-10-121-5/+2
| |
* | Emit TransitionEnd events in the layout thread and process it in the script ↵Keith Yeung2016-10-111-1/+1
|/ | | | thread
* Remove borrow_data and mutate_data from TNode.Bobby Holley2016-10-101-5/+25
| | | | | The new restyle architecture doesn't store these things in consistent places, so we need a more abstract API.
* Move children_to_process to layout.Bobby Holley2016-10-081-0/+13
| | | | | | | | | | | We don't need this for Gecko, and it's hard to implement in that case because there's nowhere obvious to put it (we don't plan to create TSDs for non-dirty nodes, and non-dirty nodes can have dirty children which require the children_to_process atomic). There are various solutions here, but punting is the easiest. We'll need to rethink this if/when we need to do a bottom-up traversal for Gecko.
* add SVGElement, SVGGraphicsElement interfaces and SVGSVGElement elementAlexandrov Sergey2016-10-061-1/+6
|
* Use parking_lot::RwLock instead of DOMRefCell for PropertyDeclarationBlockSimon Sapin2016-10-041-2/+2
|
* Use PropertyDeclarationBlock in a DOMRefCell everywhere.Simon Sapin2016-10-041-1/+2
|
* Rename PrivateStyleData to PersistentStyleData and use AtomicRefCell instead ↵Bobby Holley2016-10-021-22/+22
| | | | | | | | of RefCell as a container. This allows us to eliminate the unsafe borrows. \o/ MozReview-Commit-ID: 29hpGaWUFQz
* Filter non-element / non-text nodes in LayoutIterator.Bobby Holley2016-09-211-0/+5
|
* Introduce the LayoutIterator newtype and return it for all children() ↵Bobby Holley2016-09-201-6/+7
| | | | methods in style and layout.
* Split out is_element and is_text_node into a helper trait.Bobby Holley2016-09-201-11/+22
|
* Reorder `use` statementsUK9922016-09-091-6/+6
|
* Rename DeclarationBlock to ApplicableDeclarationBlockSimon Sapin2016-09-061-3/+3
| | | | Make it more different from PropertyDeclarationBlock
* Stop using mem::transmute_copy.Ms2ger2016-09-051-3/+2
|
* Auto merge of #13134 - servo:archery, r=emiliobors-servo2016-08-311-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add lots of Arc’s in style, and prepare for using DOMRefCell <!-- Please describe your changes on the following line: --> `DOMRefCell` usage is not there year because of thread-safety questions, but I have this much already that I’d like to land before it bitrots. r? @emilio --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require new tests because refactor <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13134) <!-- Reviewable:end -->
| * Use Arc<PropertyDeclarationBlock> everwhere it’s appropriate.Simon Sapin2016-08-311-2/+2
| |
* | layout: Keep track of whether we've deferred the painting of the document due toEmilio Cobos Álvarez2016-08-301-0/+8
|/ | | | | | | | | | a script query. This will, rather unfortunately, mean that we might repaint two times if we've deferred a paint, then get an out-of-band reflow. Still seemed better than not suppressing paints at all. Fixes #13131
* Remove unused children_count method from TNode.Bobby Holley2016-08-261-4/+0
| | | | | The semantics of this method with respect to anonymous children are unclear. Thankfully it's unused, so we can remove it.
* Make ChildrenIterator concrete.Bobby Holley2016-08-261-0/+20
| | | | | This will allow us to specialize ChildrenIterator in the Gecko case to do something more interesting in some cases.
* Import SelectorMap back from the selectors crate.Simon Sapin2016-08-211-4/+5
| | | | Nobody else uses it, and I want to make breaking changes to it.
* Add some fmt::Debug implementationsSimon Sapin2016-08-211-1/+12
|
* Update selectors to 0.10, with ToCss serialization.Simon Sapin2016-08-181-2/+2
|
* Rewrite the style sharing candidate cache.Emilio Cobos Álvarez2016-08-171-0/+5
| | | | | | | | | | | | | | | | | | | | | The style candidate cache had regressed a few times (see #12534), and my intuition is that being able to disable all style sharing with a single rule in the page is really unfortunate. This commit redesigns the style sharing cache in order to be a optimistic cache, but then reject candidates if they match different sibling-affecting selectors in the page, for example. So far the numbers have improved, but not so much as I'd wanted (~10%/20% of non-incremental restyling time in general). The current implementation is really dumb though (we recompute and re-match a lot of stuff), so we should be able to optimise it quite a bit. I have different ideas for improving it (that may or may not work), apart of the low-hanging fruit like don't re-matching candidates all the time but I have to measure the real impact. Also, I need to verify it against try.
* Add a flag to dump the computed style valuesMichael Howell2016-08-121-0/+32
| | | | I used this to trace #11818 to a style bug, rather than a layout bug.
* style: Fix pseudo-element restyling.Emilio Cobos Álvarez2016-08-101-2/+3
|
* Update to selectors 0.8.2Simon Sapin2016-08-091-21/+22
|
* Auto merge of #12645 - emilio:stylo, r=bholleybors-servo2016-08-031-1/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stylo: Allow computing change hints during the traversal. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors <!-- Either: --> - [x] These changes do not require tests because geckolib :-( <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> r? @bholley cc @heycam <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12645) <!-- Reviewable:end -->
| * style: Refactor TRestyleDamage and TNode to accept/provide a "style source"Emilio Cobos Álvarez2016-08-031-1/+9
| | | | | | | | | | | | | | | | | | | | In the Gecko case, this style source would be the style context. In the servo case, it will be always the computed values. We could optimise this further in the case of stylo (from three FFI calls to one) if we use an API of the form CalcAndStore(node, new_cv). But that would imply borrowing the data twice from Servo (we also have borrow_data_unchecked fwiw, but...).
* | Issue 7720: Add target selector and update when scrolling to fragmentSteve Melia2016-08-031-1/+2
|/
* style: Remove a few more unuseful traversals now we can.Emilio Cobos Álvarez2016-07-271-9/+0
|
* style: Rewrite the restyle hints code to allow different kinds of element ↵Emilio Cobos Álvarez2016-07-211-2/+1
| | | | | | | | | | | | | snapshots, and use it for Gecko. This is a rewrite for how style interfaces with its consumers in order to allow different representations for an element snapshot. This also changes the requirements of an element snapshot, requiring them to only implement MatchAttr, instead of MatchAttrGeneric. This is important for stylo since implementing MatchAttrGeneric is way more difficult for us given the atom limitations. This also allows for more performant implementations in the Gecko side of things.
* Remove some type aliases that are now just re-exports.Simon Sapin2016-07-201-1/+2
|
* Remove the ComputedValue traits and style_struct_traitsSimon Sapin2016-07-201-2/+0
|
* Only restyle viewport-relative nodes on viewport size changeShing Lyu2016-07-181-1/+18
|
* Remove get_attr from TElement. \o/Bobby Holley2016-07-051-7/+7
|
* Upgrade rust-selectors.Bobby Holley2016-07-051-35/+39
|
* Add attr_equals to TElement.Bobby Holley2016-07-051-0/+5
| | | | Same reasons as the previous patch.
* Add has_attr method to TElement.Bobby Holley2016-07-051-0/+5
| | | | | If this is all the information the caller needs, we can get it from gecko without worrying about atomization and string conversions.
* Remove get_attrs from TElement.Bobby Holley2016-07-051-8/+4
| | | | This should just be a helper.
* Move util::str to styleAnthony Ramine2016-07-051-1/+1
|
* Move util::vec::ForgetfulSink to style::sink and simplify itAnthony Ramine2016-07-041-3/+3
|
* Use our copy of RefCell for style data.Simon Sapin2016-06-231-1/+1
| | | | | This allows removing `#![feature(as_unsafe_cell)]` in geckolib and make progress towards #11815.
* Remove unused re-exports from layout_interface.Ms2ger2016-06-201-6/+9
|
* Move TrustedNodeAddress to script_layout_interface.Ms2ger2016-06-201-2/+2
|
* Move ServoLayoutNode and related structs to script.Ms2ger2016-06-201-0/+996