aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_thread_2020
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Upgrade WebRender to e491e1ae637b2eed1e7195855d88357e5eb3ddf9 (#30323)"revert-webrenderMukilan Thiyagarajan2023-09-141-4/+7
| | | | This reverts commit a9d37cb85ac2c55fc630fccffe1ba60ff00f555b.
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-29/+25
| | | | | * strict imports formatting * Reformat all imports
* Upgrade WebRender to e491e1ae637b2eed1e7195855d88357e5eb3ddf9 (#30323)Martin Robinson2023-09-101-7/+4
| | | | | | | | | | | | | | | | | | * Upgrade vendored version of WebRender * Patch WebRender: upgrade version of gleam * Restore hit testing implementation * Fix WebRender warnings * Adapt Servo to new WebRender * Update results * Add a workaround for #30313 This slightly expands text boundaries in order to take into account the fact that layout isn't measuring glyph boundaries.
* remove `extern crate` (#30311)Samson2023-09-081-9/+4
| | | | | | | | | | | * 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>
* build(deps): bump parking_lot from 0.11.2 to 0.12.0 (#30199)dependabot[bot]2023-08-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * build(deps): bump parking_lot from 0.11.2 to 0.12.0 Bumps [parking_lot](https://github.com/Amanieu/parking_lot) from 0.11.2 to 0.12.0. - [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md) - [Commits](https://github.com/Amanieu/parking_lot/compare/0.11.2...0.12.0) --- updated-dependencies: - dependency-name: parking_lot dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Upgrade parking-log in style and layout_thread* as well --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Try to `use` WebRender types moreMartin Robinson2023-07-101-7/+8
| | | | | The newer versions of WebRender move types around between `webrender` and `webrender_api` and this will reduce the churn during the upgrade.
* Make the choice of layout runtime settingMartin Robinson2023-07-061-1/+1
| | | | Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
* Vendor the current version of WebRenderMartin Robinson2023-07-031-1/+1
| | | | | | | | This is a step toward upgrading WebRender, which will be upgraded and patched in the `third_party` directory. This change vendors the current private branch of WebRender that we use and adds a `patches` directory which tracks the changes on top of the upstream WebRender commit described by third_party/webrender/patches/head.
* Remove unused variableOriol Brufau2023-07-011-1/+0
| | | | Just a remnant from #29850, it was causing a build warning.
* It was removed from the spec and it's disabled everywhere.Emilio Cobos Álvarez2023-06-301-23/+1
| | | | This also removes the meta viewport support (which was implemented on top), but that also had a single test and is disabled everywhere, so I'm not too concerned, it can be implemented again if / when needed.
* Layout-2020: Serialize access to stylo thread pool.Mukilan Thiyagarajan2023-05-261-4/+7
| | | | | | | | | | | | | | | | | | | | When rendering a page containing an iframe, layout 2020 creates parallel 'Layout' threads which share workers in the stylo thread pool. Because of the way the 'StyleSharingCache' is designed using TLS for storage of the LRU cache, this leads to a double borrow of the cache when both layout threads run concurrently. More details about the issue can be found here: https://gist.github.com/mukilan/ed57eb61b83237a05fbf6360ec5e33b0 This PR is a workaround until we find a more elegant/optimal design that also can work for gecko. The fix for now is simply to not allow multiple layouts in parallel. Signed-off-by: Mukilan Thiyagarajan <me@mukilan.in>
* Clean up and document the `send_display_list` interfaceMartin Robinson2023-05-241-10/+7
| | | | | | This moves more members to the CompositorDisplayListInfo struct, which now holds all miscellaneous, non-WebRender data when sending display lists. It also documents what each things sent with a display list does.
* Auto merge of #29748 - Loirooriol:sync, r=mrobinsonbors-servo2023-05-191-6/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport several style changes from Gecko <!-- 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 - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| * Further changes required by ServoOriol Brufau2023-05-161-6/+2
| |
* | Auto merge of #29747 - mrobinson:workspace-dependencies, r=mukilanbors-servo2023-05-181-11/+11
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Start the transition to workspace dependencies This will ultimately make it simpler to update crate dependencies and reduce duplication when specifying requirements. Generally, this change does not touch dependencies that are only used by a single crate. We could consider moving them to workspace dependencies in the future. <!-- 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 - [x] These changes do not require tests because they do not change behavior. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| * | Start the transition to workspace dependenciesMartin Robinson2023-05-171-11/+11
| |/ | | | | | | | | | | | | This will ultimately make it simpler to update crate dependencies and reduce duplicate when specifying requirements. Generally, this change does not touch dependencies that are only used by a single crate. We could consider moving them to workspace dependencies in the future.
* / Refactor Layout 2020 layout for a compositor-side scroll treeMartin Robinson2023-05-171-10/+20
|/ | | | | | | | | | | | | | | | | | | | This change refactors how layout is done in Layout 2020 in preparation for a compositor-side scroll tree: 1. Now the SpatialId and ClipId of each fragment is stored separately. This will allow storing a scroll node id instead of only the handle to the WebRender spatial node. 2. Separate out stacking context tree construction and display list building. This change will make it possible to eventually build the stacking context tree without the full display list if we find that necessary. For instance, this might be useful to cache containing block boundaries. 3. Add a `DisplayList` struct that stores both the WebRender display list builder and the compositor info. This exposes the API to the layout thread for display list building. In addition, this change adds a lot of missing documentation. This should not change behavior.
* Combine DOM-related concepts in Layout 2020 into dom.rsMartin Robinson2023-05-131-14/+13
|
* Eliminate duplicate Layout DOM wrappersMartin Robinson2023-05-052-1553/+24
| | | | | | | | | | There are duplicate sets of Layout DOM wrappers: one for Layout 2013 and one for Layout 2020. As part of cleaning up and simplifying the wrappers, this change parameterizes them on the specific layout data they contain. This allows them to be shared again. In addition, various small cleanups are included. Fixes #29691.
* Detect body elements during layoutMartin Robinson2023-05-041-17/+41
| | | | | | | | | | | | | | | | | During layout it is often useful, for various specification reasons, to know if an element is the `<body>` element of an `<html>` element root. There are a couple places where a brittle heuristic is used to detect `<body>` elements. This information is going to be even more important to properly handle `<html>` elements that inherit their overflow property from their `<body>` children. Implementing this properly requires updating the DOM wrapper interface. This check does reach up to the parent of thread-safe nodes, but this is essentially the same kind of operation that `parent_style()` does, so is ostensibly safe. This change should not change any behavior and is just a preparation step for properly handle `<body>` overflow.
* Clean up arguments passed to and stored in LayoutThreadMartin Robinson2023-05-011-82/+20
|
* Fix scrolling from script in Layout 2020Martin Robinson2023-04-251-1/+2
| | | | | | | | | Script will only scroll if it detects that an element has a scrolling box, so this change adds an implementation of the scroll area query to Layout 2020. This allows some scrolling tests to start passing. This change also updates all expected results in css-backgrounds and cssom-view.
* Scroll from script should trigger a reflowMartin Robinson2023-04-251-17/+19
| | | | | | | | | Scrolling from script should flow layout and send a display list to WebRender. This allows all of the scroll nodes to exist in WebRender before asking it to move the node. See https://gist.github.com/paulirish/5d52fb081b3570c81e3a. Fixes #29659.
* Add support for <iframe> elements for Layout 2020Martin Robinson2023-04-041-12/+68
| | | | | | This change adds support for the <iframe> element to Layout 2020. In addition, certain aspects of the implementation are made the same between both layout systems.
* Fix some build warningsMartin Robinson2023-03-271-1/+0
|
* Fix test-tidy for Layout 2020Martin Robinson2023-03-211-1/+0
| | | | It seems this wasn't caught by CI when landing the build fix yesterday.
* Fix the Layout 2020 buildMartin Robinson2023-03-201-5/+3
|
* Move hit testing information out of WebRenderMartin Robinson2023-03-151-2/+6
| | | | | | | | | Store hit testing information in a data structure that sits alongside the display list in the compositor. This will allow the compositor to store more information per-node. The data structure also takes care of de-duplicating information between successive display list entries. In the future, the data structure can be even more aggressive in producing smaller side hit testing lists, if necessary.
* */Cargo.toml: use the shmem feature for the dependency on the selectors cratreFederico Mena Quintero2023-02-141-1/+1
|
* Bump euclid to 0.22Martin Robinson2023-01-261-1/+1
| | | | | | | | | | | | | - Also updates raqote to latest with an upgrade of font-kit to 0.11 applied on as a patch - Update lyon_geom to the latest version Major change: - All matrices are now stored in row major order. This means that parameters to rotation functions no longer should be negated. - `post_...()` functions are now named `then()`. `pre_transform()` is removed, so `then()` is used and the order of operations changed.
* fixup! Update parking_lot.Josh Matthews2022-04-011-1/+1
|
* Update html5ever/xml5ever.Josh Matthews2022-04-011-1/+1
|
* feat: shorten thread namesyvt2021-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Linux kernel imposes a 15-byte limit on thread names[1]. This means information that does not fit in this limit, e.g., the pipeline ID of layout and script threads, is lost in a debugger and profiler (see the first column of the table below). This commit shortens the thread names used in Servo to maximize the amount of information conveyed. It also rectifies some inconsistencies in the names. | Before | After | |-------------------|-------------------| | `BluetoothThread` | `Bluetooth` | | `CanvasThread` | `Canvas` | | `display alert d` | `AlertDialog` | | `FontCacheThread` | `FontCache` | | `GLPlayerThread` | `GLPlayer` | | `HTML Parser` | `Parse:www.examp` | | `LayoutThread Pi` | `Layout(1,1)` | | `Memory profiler` | `MemoryProfiler` | | `Memory profiler` | `MemoryProfTimer` | | `OfflineAudioCon` | `OfflineACResolv` | | `PullTimelineMar` | `PullTimelineDat` | | `ScriptThread Pi` | `Script(1,1)` | | `WebWorker for h` | `WW:www.example.` | | `ServiceWorker f` | `SW:www.example.` | | `ServiceWorkerMa` | `SvcWorkerManage` | | `Time profiler t` | `TimeProfTimer` | | `Time profiler` | `TimeProfiler` | | `WebGL thread` | `WebGL` | | `Choose a device` | `DevicePicker` | | `Pick a file` | `FilePicker` | | `Pick files` | `FilePicker` | [1]: https://stackoverflow.com/questions/5026531/thread-name-longer-than-15-chars
* feat(layout_2020): implement `offset{Parent, Top, Left, Width, Height}`yvt2021-06-191-1/+2
|
* Miscellaneous build / tidy fixes.Emilio Cobos Álvarez2021-02-262-21/+28
|
* Fix warnings introduced in newer Rust NightlySimon Sapin2021-02-251-5/+0
| | | | | | | | | | | | This does not (yet) upgrade ./rust-toolchain The warnings: * dead_code "field is never read" * redundant_semicolons "unnecessary trailing semicolon" * non_fmt_panic "panic message is not a string literal, this is no longer accepted in Rust 2021" * unstable_name_collisions "a method with this name may be added to the standard library in the future" * legacy_derive_helpers "derive helper attribute is used before it is introduced" https://github.com/rust-lang/rust/issues/79202
* ensure clean shutdown of all threads running JSGregory Terzian2020-06-301-15/+10
|
* Add animation and transition support for pseudo-elementsMartin Robinson2020-06-161-7/+17
| | | | | | | | | | This change extends the DocumentAnimationSet to hold animations for pseudo-elements. Since pseudo-elements in Servo are not in the DOM like in Gecko, they need to be handled a bit carefully in stylo. When a pseudo-element has an animation, recascade the style. Finally, this change passes the pseudo-element string properly to animation events. Fixes: #10316
* Add DocumentAnimationSet and AnimationSetKeyMartin Robinson2020-06-152-50/+25
| | | | | | | This will be used in order to hold animations for pseudo elements in the DocumentAnimationSet. Also no longer store the OpaqueNode in the animation and transition data structures. This is already part of the DocumentAnimationSet key.
* Auto merge of #26697 - utsavoza:ugo/issue-11681/22-05-2020, r=jdmbors-servo2020-06-121-1/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement CanvasRenderingContext2d.fillText The PR consists of broadly two main changes: - Implementation of Canvas2dRenderingContext.font - Basic implementation of Canvas2dRenderingContext.fillText Although I am not fully sure about the long term goals for the canvas backend in Servo, I assumed limited scope for font and text handling (should support simple text drawing with font selection) in the current implementation as I believe a more complete implementation would eventually be brought in as a part of #22957. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #11681 - [x] There are tests for these changes
| * Fix ./mach build --release --with-layout-2020Utsav Oza2020-06-101-2/+8
| |
| * Store resolved font style in canvas context stateUtsav Oza2020-06-101-2/+4
| |
| * Fix ./mach build --release --with-layout-2020Utsav Oza2020-06-101-1/+2
| |
| * Query layout to resolve canvas font property valueUtsav Oza2020-06-101-0/+1
| |
* | Auto merge of #26806 - mrobinson:animations-cascade, r=emiliobors-servo2020-06-101-7/+57
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Include animations and transitions in the cascade Instead of applying animations and transitions to styled elements, include them in the cascade. This allows them to interact properly with things like font-size and !important rules. <!-- 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 - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| * Include animations and transitions in the cascadeMartin Robinson2020-06-091-7/+57
| | | | | | | | | | | | Instead of applying animations and transitions to styled elements, include them in the cascade. This allows them to interact properly with things like font-size and !important rules.
* | Remove unecessary webrender document from layout.Josh Matthews2020-06-091-17/+3
|/
* Better computation of animation keyframesMartin Robinson2020-06-051-0/+4
| | | | | | | | | This begins to address #26625 by properly applying CSS variables during keyframe computation and no longer using `apply_declarations`. Instead, walk the declarations, combining them into IntermediateComputedKeyframe, maintaining declarations that modify CSS custom properties. Then compute a set of AnimationValues for each keyframe and use those to produce interpolated animation values.
* Cache animation computed values when animations changeMartin Robinson2020-06-052-3/+15
| | | | | | | | Instead of recalculating the animation style every tick of an animation, cache the computed values when animations change. In addition to being more efficient, this will allow us to return animation rules as property declarations because we don't need to consult the final style to produce them.
* Reconstruct the box tree incrementally in some caseAnthony Ramine2020-06-041-14/+18
|