aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/layout_interface.rs
Commit message (Collapse)AuthorAgeFilesLines
* Move the remainder of layout_interface into script_layout_interface.Ms2ger2016-06-201-152/+0
|
* Move is_image_data to script_layout_interface.Ms2ger2016-06-201-2/+0
|
* Remove unused re-exports from layout_interface.Ms2ger2016-06-201-11/+0
|
* Move LayoutRPC to script_layout_interface.Ms2ger2016-06-201-85/+3
|
* Move TrustedNodeAddress to script_layout_interface.Ms2ger2016-06-201-2/+1
|
* Move HTMLCanvasData to script_layout_interface.Ms2ger2016-06-201-1/+0
|
* Move OpaqueStyleAndLayoutData to script_layout_interface.Ms2ger2016-06-201-1/+1
|
* Make layout only depend on script::layout_interface.Ms2ger2016-06-071-1/+14
|
* Remove the layout shutdown channel.Ms2ger2016-06-041-1/+0
| | | | Nobody is listening.
* script: Keep the DOM-side viewport up to date when scrolling happens inPatrick Walton2016-05-311-1/+4
| | | | | | | | | | | | | | | WebRender. This happens asynchronously, just as it does in non-WebRender mode. This functionality is a prerequisite for doing proper display-list-based hit testing in WebRender, since it moves the scroll offsets into Servo (and, specifically, into the script thread, enabling iframe event forwarding) instead of keeping them private to WebRender. Requires servo/webrender_traits#55 and servo/webrender#277. Partially addresses #11108.
* Remove the LayoutChan type.Ms2ger2016-05-271-12/+1
| | | | It is a pointless abstraction.
* Report use statements that use {} with only one entryCullen Rhodes2016-05-271-1/+1
|
* Use associated types to improve LayoutThreadFactory and ScriptThreadFactory.Ms2ger2016-05-241-28/+2
|
* Remove ConstellationChan.Ms2ger2016-05-191-4/+3
| | | | | | It's a pointless abstraction that propagates the obsolete chan terminology, swaps the order in which the sender and receiver are returned, and hides a source of panics.
* Auto merge of #9968 - izgzhen:scroll, r=asajeffreybors-servo2016-04-201-1/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement scroll, scrollLeft, scrollTop and friends, addressing issue #9650 This is a work in progress to solve https://github.com/servo/servo/issues/9650. Thanks a lot for helping the review. - [x] scroll - [x] scrollTo - [x] scrollBy - [x] scrollTop (setter and getter) - [x] scrollLeft (setter and getter) The setters will be implemented in another PR after this is merged. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9968) <!-- Reviewable:end -->
| * Implement ScrollTop and ScrollLeft getters:Zhen Zhang2016-04-191-1/+14
| | | | | | | | | | | | | | | | Add new compositor message to get scroll_offset; Add new layout query for computed value of overflow-x/y; Implement layer_id method for ThreadSafeLayoutNode; Add new layout query for layer_id; Implement script interface for getting scrollTop and scrollLeft, as well as relavant helper functions.
* | Added a dedicated panic channel.Alan Jeffrey2016-04-191-2/+2
|/
* Implement Document#elementsFromPointRizky Luthfianto2016-04-031-0/+2
|
* Add scrollWidth/Height to element interfaceDaniel Robertson2016-03-111-0/+3
| | | | | Add the scrollWidth and scrollHeight extensions to the element interface.
* Suppress reflows before RefreshTick or FirstLoadJack Moffitt2016-03-031-2/+5
| | | | | | | | | | | | | This fixes a bug where partially loaded content is displayed to the user before it should be, usually before stylesheets have loaded. This commit supresses reflows until either FirstLoad or RefreshTick, whichever comes first. Unfortunately, hit_test and mouse_over did not do reflows if they were necessary, and so by suppressing the initial spurious reflows, these methods started to panic without a display list to query. This patch also transforms these into queries similar to the other existing queries.
* script/layout: Refactor mouse_over since it now basically uses hit_testEmilio Cobos Álvarez2016-03-021-4/+1
|
* script: Fix MouseOver handlingEmilio Cobos Álvarez2016-03-021-1/+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
* Completed implementation of devtools' `getLayout`.benshu2016-02-241-0/+22
|
* Refactor style to be completely backend-independentEmilio Cobos Álvarez2016-02-131-1/+1
| | | | | | | | | | | This commit refactors the style crate to be completely independent of the actual implementation and pseudo-elements supported. This also adds a gecko backend which introduces parsing for the anonymous box pseudo-elements[1], although there's still no way of querying them. https://mxr.mozilla.org/mozilla-central/source/layout/style/nsCSSAnonBoxList.h
* 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.
* Auto merge of #9245 - Ms2ger:reexports, r=noxbors-servo2016-01-111-2/+1
|\ | | | | | | | | | | | | | | Stop reexporting style types from layout_interface. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9245) <!-- Reviewable:end -->
| * Stop reexporting ReflowGoal from layout_interface.Ms2ger2016-01-111-1/+1
| |
| * Stop reexporting Animation from layout_interface.Ms2ger2016-01-111-1/+0
| |
* | Move Epoch to gfx_traitsJohn DeSilva2016-01-101-2/+1
|/ | | | | Resolves #9222. Moved Epoch from components/msg/compositor_msg to components/gfx_traits/lib. Updated use statements to reflect the move.
* task -> threadrohan.prinja2016-01-101-14/+14
|
* Auto merge of #9077 - bholley:split_layout_context_etc, r=SimonSapinbors-servo2015-12-301-35/+2
|\ | | | | | | | | | | | | | | Split the style-related bits out of LayoutContext and hoist more stuff into style/ <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9077) <!-- Reviewable:end -->
| * Hoist style-related context bits into style/.Bobby Holley2015-12-291-35/+2
| | | | | | | | | | | | | | | | We do a few things-here: * Hoist non-layout-dependent fields in SharedLayoutData and LocalLayoutData into style/. * Hoist parts of css/matching.rs into style/. * Hoist parts of layout/animation.rs into style/animation.rs. * Remove the duplicated-but-slightly-different definition of OpaqueNode.
* | Auto merge of #9051 - bholley:split_style_and_layout_wrappers, r=SimonSapinbors-servo2015-12-301-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | 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-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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-2/+2
|/
* Move LayerKind and ScrollPolicy enums to gfx_traitsBrandon Fairchild2015-12-201-1/+1
| | | | | | This also moves LayerId and LayerProperties to gfx_traits. Fixes #8836.
* Auto merge of #8903 - KiChjang:layout-reporter-redirect, r=noxbors-servo2015-12-161-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | fix for Layout memory reporter uses pre-redirect url Rebase of #7612. Fixes #6872. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8903) <!-- Reviewable:end -->
| * fix for Layout memory reporter uses pre-redirect url #6872Arnaud Marant2015-12-091-0/+3
| |
* | Move ScriptMsg from msg crate into script_traitsTomas Cernaj2015-12-091-3/+2
|/
* compositing: Split Servo up into multiple sandboxed processes.Patrick Walton2015-11-191-3/+6
| | | | | Multiprocess mode is enabled with the `-M` switch, and sandboxing is enabled with the `-S` switch.
* Split ConstellationMsg into ScriptMsg and CompositorMsgKeith Yeung2015-11-161-1/+2
|
* Auto merge of #8548 - Ms2ger:unused-tna, r=pcwaltonbors-servo2015-11-171-2/+2
|\ | | | | | | | | | | | | | | | | | | | | Remove the unused arguments to hit_test and mouse_over. 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. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8548) <!-- Reviewable:end -->
| * Remove the unused arguments to hit_test and mouse_over.Ms2ger2015-11-161-2/+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.
* | Remove AutoJoinScriptTask.Ms2ger2015-11-161-0/+6
|/ | | | | | | I don't believe there is a case where it would make sense to drop the ScriptReflow struct without joining the script thread. This approach should be somewhat more robust, and avoids the code smell of a RAII guard in an otherwise unused variable.
* Auto merge of #8039 - tschneidereit:script-owns-stylesheets, r=jdmbors-servo2015-11-081-11/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Remove the unused PipelineExitType field from layout_interface::Msg::ExitNow.Ms2ger2015-11-051-2/+2
|/
* Auto merge of #8239 - Ms2ger:ScriptReflow, r=pcwaltonbors-servo2015-11-031-4/+0
|\ | | | | | | | | | | | | | | Remove unused code around ScriptReflow. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8239) <!-- Reviewable:end -->
| * Remove unused fields from ScriptReflow.Ms2ger2015-10-311-4/+0
| |
* | Un-boxed ScriptReflowOlivia Nordquist2015-10-311-1/+1
|/