aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/layout_wrapper.rs
Commit message (Collapse)AuthorAgeFilesLines
* Remove SelectorImpl aliasesSimon Sapin2016-11-221-5/+5
|
* Rename selector_impl.rs to selector_parser.rsSimon Sapin2016-11-201-1/+1
| | | | This makes it consistent with an upcoming update of the selectors crate.
* Rename selector_matching.rs to stylist.rsSimon Sapin2016-11-201-1/+1
|
* Auto merge of #14246 - emilio:servo-url, r=SimonSapinbors-servo2016-11-171-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Urlmageddon <!-- Please describe your changes on the following line: --> Still needs a bunch of code in net to be converted in order to get more advantage of this for images and stuff, but meanwhile this should help quite a bit with #13778. Still wanted to get this in. r? @SimonSapin <!-- 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/14246) <!-- Reviewable:end -->
| * Urlmageddon: Use refcounted urls more often.Emilio Cobos Álvarez2016-11-171-2/+2
| |
* | Eliminate HAS_CHANGED in favor of explicit RestyleDamage.Bobby Holley2016-11-161-13/+6
| |
* | Track all node damage with PendingRestyles.Bobby Holley2016-11-161-0/+29
| |
* | Expand the role of modified_elements to include explicit restyle hints and ↵Bobby Holley2016-11-151-4/+4
| | | | | | | | | | | | damage. This will take the place of setting IS_DIRTY and HAS_CHANGED.
* | Remove TDocument from the style and layout crates.Bobby Holley2016-11-141-21/+12
|/ | | | | | The style system never actually does anything with the document. This allows us to remove a bunch of stubbing on the Gecko side and streamline some things on the Servo side in future patches.
* Stop using associated types for the concrete TRestyleDamage implementation.Bobby Holley2016-11-071-3/+1
| | | | MozReview-Commit-ID: LfaZFCVlIb1
* Stop using associated types for the concrete ElementSnapshot implementation.Bobby Holley2016-11-071-2/+2
| | | | MozReview-Commit-ID: LS23s2RbMBg
* Update to string-cache 0.3Simon Sapin2016-11-031-11/+12
|
* Drop style data from descendants on display:none.Bobby Holley2016-11-011-0/+4
| | | | MozReview-Commit-ID: 8ls43oAGWRg
* Replace begin_styling with a centralized mechanism to set a node up for ↵Bobby Holley2016-11-011-36/+11
| | | | | | | | | either styling or restyling. We also make sure that an element never has an ElementData with ElementDataStyles::Uninitialized, and eagerly call prepare_for_styling whenever an ElementData is instantiated. MozReview-Commit-ID: 9YP6eSmdMt0
* Rename NodeData and associated data structures to Element*.Bobby Holley2016-10-291-10/+8
| | | | MozReview-Commit-ID: 96VsmsoZtjZ
* Hoist most styling functionality from TNode to TElement.Bobby Holley2016-10-291-88/+95
| | | | MozReview-Commit-ID: DZ8ZrsZIiAU
* Move core pseudo-element handling to ThreadSafeLayoutElement.Bobby Holley2016-10-281-59/+82
|
* Move all *MatchMethods to TElement.Bobby Holley2016-10-271-1/+1
| | | | MozReview-Commit-ID: 3V6JIlOVVhw
* Don't traverse text nodes during styling.Bobby Holley2016-10-271-2/+12
| | | | MozReview-Commit-ID: 6CtQMxbcLnF
* Hoist RestyleDamage onto TElement.Bobby Holley2016-10-271-40/+27
| | | | | | | | Instead of maintaining a dummy restyle damage field for text nodes, we can just perform the necessary parent inheritance and is_changed adjustments on the fly in ThreadSafeLayoutNode, simplifying the requirements on the style system. MozReview-Commit-ID: DCqiCRLsLUF
* Teach Servo to compute text node style from layout.Bobby Holley2016-10-271-0/+8
| | | | MozReview-Commit-ID: IolVN5puF1i
* Eliminate untraversed node types from LayoutNodeType.Bobby Holley2016-10-271-3/+4
| | | | MozReview-Commit-ID: 926ReI1BSsf
* Introduce StylingMode and deprecate explicit dirtiness.Bobby Holley2016-10-261-6/+26
| | | | MozReview-Commit-ID: 5tF075EJKBa
* Rearrange some data structures in preparation for the new incremental ↵Bobby Holley2016-10-211-31/+16
| | | | | | restyle algorithm. MozReview-Commit-ID: 8iOALQylOuK
* 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.