aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_layout_interface/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
* Move `*_traits` and other shared types to `shared`Martin Robinson2023-11-031-164/+0
| | | | | | | | | | | | This is the start of the organization of types that are in their own crates in order to break dependency cycles between other crates. The idea here is that putting these packages into their own directory is the first step toward cleaning them up. They have grown organically and it is difficult to explain to new folks where to put new shared types. Many of these crates contain more than traits or don't contain traits at all. Notably, `script_traits` isn't touched because it is vendored from Gecko. Eventually this will move to `third_party`.
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-2/+3
| | | | | * strict imports formatting * Reformat all imports
* remove `extern crate` (#30311)Samson2023-09-081-5/+1
| | | | | | | | | | | * remove extern crate * Update components/script_plugins/lib.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Try to `use` WebRender types moreMartin Robinson2023-07-101-3/+4
| | | | | The newer versions of WebRender move types around between `webrender` and `webrender_api` and this will reduce the churn during the upgrade.
* Implement GPUSwapChain and GPUCanvasContext and interface with WebrenderKunal Mohan2020-06-131-0/+1
|
* Correctly paint the CSS canvas’ backgroundSimon Sapin2020-05-151-0/+2
| | | | | | | https://drafts.csswg.org/css-backgrounds/#special-backgrounds Fixes https://github.com/servo/servo/issues/25559 Closes https://github.com/servo/servo/pull/26121, as it is an alternative.
* Remove unused `#![feature(…)]` attributesSimon Sapin2020-04-151-1/+0
|
* Replace OpaqueStyleAndLayoutData by StyleAndOpaqueLayoutDataAnthony Ramine2020-04-061-21/+18
|
* Make DOM own the style and layout data, in an UnsafeCellAnthony Ramine2020-04-041-14/+6
| | | | The previous Cell was a lie.
* Make OpaqueLayoutAndStyleData just a bit less opaqueAnthony Ramine2020-04-041-1/+30
| | | | It now stores a NonNull<dyn Any>.
* Take origin from window instead of creating a new one in case of reflowKunal Mohan2020-02-151-1/+2
| | | | | | | | | | Everytime a new LayoutContext was created, it created a new origin which caused endless stream of image loads to occur in case of reflow. The reason for this was that the existing image, although cached successfully, was not used because the entry in hashmap did not match because of different(new) origin. This is solved by storing the origin of a window in enum ScriptReflow and used in creating new LayoutContext in case of reflow.
* Move CSSReporter from script_layout_interface to scriptAnthony Ramine2019-01-141-3/+0
|
* Move is_image_data to the layout crateAnthony Ramine2019-01-091-6/+0
| | | | It's only used there.
* Remove unstable unused feature in script_layout_interfaceAnthony Ramine2019-01-091-1/+0
|
* Update MPL license to https (part 4)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Remove useless `use crate_name;` imports.Simon Sapin2018-11-081-1/+0
| | | | A `crate_name::foo` path always works in 2018
* `cargo fix --edition-idioms`Simon Sapin2018-11-081-22/+1
|
* Reorder importsPyfisch2018-11-061-1/+1
|
* Do not share entire FrameRenderer with layout, only current frameFernando Jiménez Moreno2018-10-081-7/+1
|
* layout: add HTMLMediaFrameSource trait and HTMLMediaData structVíctor Manuel Jáquez Leal2018-10-081-0/+11
|
* Auto merge of #21687 - AnshulMalik:format-script_layout, r=jdmbors-servo2018-09-131-5/+7
|\ | | | | | | | | | | | | | | | | | | | | format script_layout_interface - [x] `./mach test-tidy` does not report any errors <!-- 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/21687) <!-- Reviewable:end -->
| * format script_layout_interfaceAnshul Malik2018-09-121-5/+7
| |
* | Replace mpsc with crossbeam/servo channel, update ipc-channelSimon Sapin2018-09-121-0/+1
|/ | | | Co-authored-by: Gregory Terzian <gterzian@users.noreply.github.com>
* Add unique canvas IDs to all canvas operations.Brody Eastwood2018-04-021-1/+2
|
* Implement element.innerText getterFernando Jiménez Moreno2018-02-131-0/+2
|
* style: Make the TElement type arrive to the `cascade` function.Emilio Cobos Álvarez2018-01-231-0/+1
| | | | | | | | | | | | | | | | | Not super-proud of this one, but it's the easiest way I could think of. The changeset looks bigger than what it is, because while at it I've rewrapped a fair amount of functions around to use proper block indentation. Alternatives are parameterizing Stylist by <E>, which is not fun, or moving the concrete element from layout_thread to layout, but that implies layout depending on script, which isn't fun either. Other alternative is implementing an empty enum and making anon boxes work on it. It has the advantage of removing the annoying type parameter, but the disadvantage of instantiating `cascade` twice, which isn't great, and having to maintain all the boilerplate of a `TElement` implementation that just does nothing.
* Replace NonZero<*{const,mut} _> with std::ptr::NonNullSimon Sapin2018-01-221-3/+2
|
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`. `malloc_size_of` is better -- it handles various cases that `heapsize` does not -- so this patch changes Servo to use `malloc_size_of`. This patch makes the following changes to the `malloc_size_of` crate. - Adds `MallocSizeOf` trait implementations for numerous types, some built-in (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`). - Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't support that operation. - For `HashSet`/`HashMap`, falls back to a computed estimate when `enclosing_size_of_op` isn't available. - Adds an extern "C" `malloc_size_of` function that does the actual heap measurement; this is based on the same functions from the `heapsize` crate. This patch makes the following changes elsewhere. - Converts all the uses of `heapsize` to instead use `malloc_size_of`. - Disables the "heapsize"/"heap_size" feature for the external crates that provide it. - Removes the `HeapSizeOf` implementation from `hashglobe`. - Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of` doesn't derive those types, unlike `heapsize`.
* Replace NonZeroU32 and NonZeroUsize with a generic NonZeroSimon Sapin2017-10-161-4/+2
| | | | The API is identical to core::nonzero::NonZero
* Use wrappers in the nonzero crate so users don’t need unstable featuresSimon Sapin2017-10-131-1/+0
|
* Use NonZeroUsize in script_layout_interfaceSimon Sapin2017-10-131-4/+6
|
* Remove usage of unstable box syntax, except in the script crateSimon Sapin2017-10-121-1/+0
| | | | | … because there’s a lot of it, and script still uses any other unstable features anyway.
* order derivable traits listsClément DAVID2017-08-231-4/+4
| | | | | | Ignoring : - **generated**.rs - python/tidy/servo_tidy_tests/rust_tidy.rs
* Revert "Auto merge of #18114 - emilio:revert-webgl-refactor, r=nox"Anthony Ramine2017-08-161-2/+7
| | | | | This reverts commit 4d10d39e8fe841c5fe2ac58da2daaa13c10c140e, reversing changes made to ee94e2b7c0bd327abe8f9545b2a1f792f67a2bdd.
* Revert "Auto merge of #17891 - MortimerGoro:webgl_move, r=glennw,emilio"Emilio Cobos Álvarez2017-08-161-7/+2
| | | | | This reverts commit 90f55ea4580e2a15f7d70d0491444f18b972d450, reversing changes made to 2e60b27a2186a8cba4b952960155dfcf3f47d7db.
* Improve WebGL architecture.Imanol Fernandez2017-08-151-2/+7
|
* Implement basic Time To First Paint and First Contentful Paint PWMsFernando Jiménez Moreno2017-07-201-0/+1
|
* Replace all uses of the style::stylearc alias with servo_arc.Michael Partheil2017-07-191-0/+1
| | | | | | The alias is left there temporarilly and will be removed completely in a later commit where also components/style/gecko/generated/structs_{debug|release}.rs are re-generated (they still use the old alias).
* Upgrade to the latest version of WebRenderMartin Robinson2017-07-131-1/+1
|
* Implemented paint worklet properties.Alan Jeffrey2017-07-111-0/+1
|
* Move match and cascade temporaries to CurrentElementInfoJ. Ryan Stinnett2017-06-221-1/+1
| | | | | | | | | | | | | | | | | Before this change, the `ComputedStyle` struct that is part of permanent style data per element holds 2 `StrongRuleNode`s (unvisited and visited) and 2 `Arc<ComputedValues>` (unvisited and visited). Both rule nodes and the visited values don't actually need to be here. This patch moves these 3 to new temporary storage in `CascadeInputs` on `CurrentElementInfo` during the match and cascade process. Rule nodes are pushed down inside the `ComputedValues` for later access after the cascade. (Visited values were already available there.) The permanent style data per element now has just the `Arc<ComputedValues>` for itself and eager pseudo-elements (plus the `RestyleHint`). MozReview-Commit-ID: 3wq52ERMpdi
* layout: Stop doing unsafe transmutes between refcell references.Emilio Cobos Álvarez2017-05-251-10/+7
| | | | | | | | | This commit splits the style and layout data in two separate refcells. These transmutes have been a source of trouble (for example on Android), and they feel like a hack anyway. Fixes #16982
* Fix unsafe AtomicRefCell<PersistentLayoutData> transmute due to memory ↵Imanol Fernandez2017-05-121-0/+5
| | | | alignment differences
* Upgrade to html5ever 0.16Simon Sapin2017-05-021-1/+1
|
* Eliminate ScrollRootIdMartin Robinson2017-04-201-0/+1
| | | | | | | Just use WebRender's ClipId directly. This will allow us to create and use ReferenceFrames in the future, if we need to do that. It will also make it easier to have Servo responsible for creating the root scrolling area, which will allow removing some old hacks in the future.
* Make image cache per-document rather than globalFernando Jiménez Moreno2017-03-271-1/+1
|
* Make script thread initiate requests for images needed by layout.Josh Matthews2017-02-221-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In support of this goal, the layout thread collects information about CSS images that are missing image data and hands it off to the script thread after layout completes. The script thread stores a list of nodes that will need to be reflowed after the associated network request is complete. The script thread ensures that the nodes are not GCed while a request is ongoing, which the layout thread is incapable of guaranteeing. The image cache's API has also been redesigned in support of this work. No network requests are made by the new image cache, since it does not possess the document-specific information necessary to initiate them. Instead, there is now a single, synchronous query operation that optionally reserves a slot when a cache entry for a URL cannot be found. This reserved slot is then the responsibility of the queryer to populate with the contents of the network response for the URL once it is complete. Any subsequent queries for the same URL will be informed that the response is pending until that occurs. The changes to layout also remove the synchronous image loading code path, which means that reftests now test the same code that non-test binaries execute. The decision to take a screenshot now considers whether there are any outstanding image requests for layout in order to avoid intermittent failures in reftests that use CSS images.
* Kill the plugins crate and its clippy supportAnthony Ramine2017-02-211-2/+0
| | | | | | Sometimes clippy gets outdated by months, and its current support setup means that each Servo component need to opt into it by depending on the plugins crate manually, and not all components do that.
* Update rustc to 1.16.0-nightly (7821a9b99 2017-01-23).Ms2ger2017-01-241-4/+0
|
* Upgrade to rustc 1.16.0-nightly (6f1ae663e 2017-01-06)Simon Sapin2017-01-061-1/+0
|