aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/query.rs
Commit message (Collapse)AuthorAgeFilesLines
* script/layout: Refactor mouse_over since it now basically uses hit_testEmilio Cobos Álvarez2016-03-021-28/+9
|
* script: Fix MouseOver handlingEmilio Cobos Álvarez2016-03-021-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now we only query for the topmost node, and apply the hover state to all of the parent elements. This fixes things like #9705, where the hover state was applied only to the children. This also makes us more conformant with other browsers in the case of taking in account margins and paddings. For example, prior to this PR, when your mouse was over the inner element, in the bottom part, `hover` styles didn't apply to the parent. ```html <style> div { padding: 10px; margin: 10px; height: 15px; background: blue; } div:hover { background: red; } </style> <div> <div></div> </div> ``` Fixes #9705
* Flatten display list structureMartin Robinson2016-03-011-30/+19
| | | | | | | | | | | | | | | | | | | | | | | Instead of producing a tree of stacking contexts, display list generation now produces a flat list of display items and a tree of stacking contexts. This will eventually allow display list construction to produce and modify WebRender vertex buffers directly, removing the overhead of display list conversion. This change also moves layerization of the display list to the paint thread, since it isn't currently useful for WebRender. To accomplish this, display list generation now takes three passes of the flow tree: 1. Calculation of absolute positions. 2. Collection of a tree of stacking contexts. 3. Creation of a list of display items. After collection of display items, they are sorted based upon the index of their parent stacking contexts and their position in CSS 2.1 Appendeix E stacking order. This is a big change, but it actually simplifies display list generation.
* Completed implementation of devtools' `getLayout`.benshu2016-02-241-1/+21
|
* Move util::logical_geometry to styleAnthony Ramine2016-02-181-1/+1
|
* Move util::cursor to style_traitsAnthony Ramine2016-02-161-1/+1
|
* Update rust-selectorsEmilio Cobos Álvarez2016-02-031-1/+1
| | | | | This commits updates rust-selectors to use the generic parser, and as such it moves the element state into the style crate.
* task -> threadrohan.prinja2016-01-101-3/+3
|
* Fix a bunch of clippy lintsJohannes Linke2016-01-021-2/+2
|
* Auto merge of #9051 - bholley:split_style_and_layout_wrappers, r=SimonSapinbors-servo2015-12-301-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | Split layout wrappers into style+layout and layout-only functionality This is a step towards removing the dependency of stylo on layout/. This PR depends on #9004. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9051) <!-- Reviewable:end -->
| * Separate style+layout and layout-specific wrapper functionality.Bobby Holley2015-12-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | This patch does a number of things, unfortunately all at once: * Hoists a large subset of the layout wrapper functionality into the style system. * Merges TElementAttributes into the newly-created TElement. * Reorganizes LayoutData by style vs layout, and removes LayoutDataShared. * Simplifies the API for borrowing style/layout data. There's still more to do to make the style system usable standalone, but this is a good start.
* | Separate script and layout messages, issue #8843Joe Kachmar2015-12-261-1/+1
|/
* Move ScriptMsg from msg crate into script_traitsTomas Cernaj2015-12-091-1/+1
|
* Replaced ZERO_POINT with Point2D::zero()Alexander Mankuta2015-12-031-3/+2
|
* Generalize the rest of layout to operate on generic Layout*.Bobby Holley2015-11-281-23/+18
| | | | | | | There wasn't a good way to split this up, unfortunately. With this change, the only remaining usage of the Servo-specific structures is in layout_task, where the root node is received from the script task. \o/
* Update string_cache to 0.2.Alan Jeffrey2015-11-251-1/+1
| | | | | | | | | | | Updated string_cache, html5ever, xml5ever and selectors in Cargo.toml files and Cargo.lock. Removed references to string_cache_plugin. Import atom! and ns! from string_cache. Replaced ns!("") by ns!(). Replaced ns!(XML) and co by ns!(xml) and co. Replaced atom!(foo) by atom!("foo"). Replaced Atom::from_slice by Atom::from. Replaced atom.as_slice() by &*atom.
* Auto merge of #8639 - bholley:generalize_wrappers2, r=pcwaltonbors-servo2015-11-241-3/+3
|\ | | | | | | | | | | | | | | Use associated types for layout wrapper trait, and generalized ThreadSafeLayoutFoo <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8639) <!-- Reviewable:end -->
| * Rename ThreadSafeLayoutFoo to ServoThreadSafeLayoutFoo and ↵Bobby Holley2015-11-211-3/+3
| | | | | | | | TThreadSafeLayoutFoo to ThreadSafeLayoutFoo.
| * Hoist exported ThreadSafeLayoutFoo functionality into traits.Bobby Holley2015-11-211-1/+1
| |
* | Auto merge of #8642 - jmr0:master, r=jdmbors-servo2015-11-221-17/+17
|\ \ | |/ |/| | | | | | | | | | | | | | | making internal pub enums, functions, and structs private Refactoring to fix #8620 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8642) <!-- Reviewable:end -->
| * making internal pub enums, functions, and structs privatejmr02015-11-211-17/+17
| |
* | Pass ServoLayoutNode to query functions.Ms2ger2015-11-201-27/+15
|/ | | | | | This means we only deal with TrustedNodeAddress in LayoutTask::handle_reflow, which is where the safety of this usage is guaranteed (by the ScriptReflow destructor).
* refactor(layout_task.rs): move some functions to query.rsRizky Luthfianto2015-11-191-1/+289
|
* Split ConstellationMsg into ScriptMsg and CompositorMsgKeith Yeung2015-11-161-1/+1
|
* Remove the unused arguments to hit_test and mouse_over.Ms2ger2015-11-161-3/+2
| | | | | I don't think this code is called when there is no document element, but I added assertions to make sure we notice in case I was wrong.
* Allow retrieving width/height for non-positioned elementsDavid Zbarsky2015-11-031-3/+4
|
* Return the result from process_content_box_request.Ms2ger2015-10-261-6/+6
|
* Return the result from process_content_boxes_request.Ms2ger2015-10-261-4/+4
|
* Split Au type into separate crate, with minimal dependencies.Glenn Watson2015-10-011-1/+1
|
* Fix reported test-tidy errors for unmerged import blocksBrandon Fairchild2015-09-191-3/+1
| | | | This merges import blocks that were reported by tidy as unmerged.
* sort all usesJohann Tuffe2015-08-201-2/+2
|
* Extract layout query code into query.rsNick Thompson2015-08-051-0/+309