aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout
Commit message (Collapse)AuthorAgeFilesLines
* Update nightly rustc.Josh Matthews2021-11-013-4/+4
|
* Fix compiler warningsBryce Wilson2021-08-141-1/+1
|
* Auto merge of #27865 - servo:github-actions-dev, r=jdmbors-servo2021-03-111-0/+3
|\ | | | | | | Add Github Actions workflow for mac/linux/windows builds
| * Adjust size test for debug/release differences.Josh Matthews2021-02-261-0/+3
| |
* | Miscellaneous build / tidy fixes.Emilio Cobos Álvarez2021-02-263-4/+16
| |
* | Fix warnings introduced in newer Rust NightlySimon Sapin2021-02-251-3/+5
|/ | | | | | | | | | | | 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
* Revert "Revert "Update font-kit and freetype and unicode-script.""Josh Matthews2020-08-101-2/+2
| | | | This reverts commit 10ae3bfbbb2383d349de6150434cc47c6ad1c8e9.
* Revert "Revert "Update harfbuzz, freetype, unicode-script.""Josh Matthews2020-08-101-1/+1
| | | | This reverts commit 6b520850f34d55e88678999ff85aa70ba949d10c.
* Revert "Update harfbuzz, freetype, unicode-script."Josh Matthews2020-08-041-1/+1
| | | | This reverts commit 327fed6084a99cfeede4752dc7b71416b5d83032.
* Revert "Update font-kit and freetype and unicode-script."Josh Matthews2020-08-041-2/+2
| | | | This reverts commit 5c0d7998bd28ceb383f553cd7af5a60f472a47ba.
* Update font-kit and freetype and unicode-script.Josh Matthews2020-07-311-2/+2
|
* Update harfbuzz, freetype, unicode-script.Josh Matthews2020-07-311-1/+1
|
* Move clip resolution code into styleManish Goregaokar2020-07-271-21/+2
|
* Implement GPUSwapChain and GPUCanvasContext and interface with WebrenderKunal Mohan2020-06-132-0/+3
|
* Store resolved font style in canvas context stateUtsav Oza2020-06-101-9/+12
|
* Add todos for missing steps while processing parse font queryUtsav Oza2020-06-101-37/+79
|
* Query layout to resolve canvas font property valueUtsav Oza2020-06-101-2/+79
|
* Auto merge of #26823 - jdm:single-renderapi, r=asajeffreybors-servo2020-06-091-3/+7
|\ | | | | | | | | | | | | | | | | Update webrender These changes reflect changes in webrender's API that make RenderApiSender and RenderApi objects more challenging to share. This PR moves us to a model where: * the compositor owns the main RenderApi object * other threads that need to create transactions or manipulate fonts proxy those operations to the compositor (script/layout use IPC, while other threads use non-IPC channels) * the webgl thread owns its own independent RenderApi
| * Proxy all WR interactions for layout/font/script/canvas threads to the ↵Josh Matthews2020-06-091-3/+7
| | | | | | | | | | | | | | compositor thread. There is now a single RenderApi that is used, and all transactions are serialized through the compositor.
* | Auto merge of #26758 - jdm:stacking-context-transform-zero, r=mrobinsonbors-servo2020-06-096-1/+50
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | Don't create empty stacking contexts in display lists A recent change to euclid exposed that our display lists can contain Rects that contain NaN values. These NaNs originate from creating stacking contexts with transforms that scale the horizontal or vertical dimensions to 0. WebRender isn't prepared to handle these, so we need to not produce these empty stacking contexts when building the display list. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #26592 and fix #26590 - [x] There are tests for these changes
| * layout: Don't built stacking contexts or display lists for empty blocks.Josh Matthews2020-06-096-1/+50
| |
* | Remove some unused dependency declarationsSimon Sapin2020-05-291-2/+0
|/ | | | | | This is based on compiling with `RUSTFLAGS="-W unused_crate_dependencies"` (CC https://github.com/rust-lang/rust/pull/72342) in a recent Nightly (more so than used in the tree as of this writing, CC https://github.com/servo/servo/issues/26661 for work-arounds). Only one crate is actually removed from the dependency graph, others are still dependended from other places.
* Remove use of nightly features in parking_lot. Update many uses from 0.9 to ↵Josh Matthews2020-05-261-1/+1
| | | | 0.10.
* Implement concept of dirty rootAnthony Ramine2020-05-192-2/+25
|
* More Cargo.toml cleanupsAlex Touchet2020-05-141-21/+21
|
* Auto merge of #26335 - jdm:wrup, r=SimonSapinbors-servo2020-05-125-111/+73
|\ | | | | | | Update webrender.
| * Use new webrender rounded clip API.Josh Matthews2020-05-123-99/+57
| |
| * Update webrender.Josh Matthews2020-05-115-12/+16
| |
* | Move most animation processing to scriptMartin Robinson2020-05-123-223/+0
|/ | | | | | | This is preparation for sharing this code with layout_2020 and implementing selective off-the-main-thread animations. We still look for nodes not in the flow tree in the layout thread.
* Don't send a load event when a loaded image is actually the placeholderBastien Orivel2020-05-082-3/+3
| | | | | | | | | | | | The image cache returns an `ImageCacheResult::ImageAvailable `the second time you try getting the placeholder. This means that in some cases, the loading of an image would fail, then the same image would get fetched from the cache, the placeholder would be loaded from that but would be seen as a normal image, firing a load event. This made the tests in `fetch/cross-origin-resource-policy/image-loads.html` fail depending on their order.
* Split animations and transitions into separate listsMartin Robinson2020-05-061-84/+83
| | | | | | | | | | | This change splits the list of animations and transitions, which are almost always handled differently. It also renames `ElementAnimationState` to `ElementAnimationSet` and establishes an `AnimationState` for every transition and animation. This allows us to stop continually reallocating lists every time a transition or animation needs to be canceled. Fixes #14419.
* Start having animations conform to the HTML specMartin Robinson2020-05-051-8/+10
| | | | | | | | | | | | | | This is a small step toward fixing #19242. The main idea is that the clock for animations should advance as the event loop ticks. We accomplish this by moving the clock from layout and naming it the "animation timeline" which is the spec language. This should fix flakiness with animations and transitions tests where a reflow could move animations forward while script was running. This change also starts to break out transition and animation events into their own data structure, because it's quite likely that the next step in fixing #19242 is to no longer send these events through a channel.
* Use a restyle for animation ticksMartin Robinson2020-05-052-146/+78
| | | | | | | | | | | | | | This change corrects synchronization issues with animations, by reworking the animation processing model to do a quick restyle and incremental layout when ticking animations. While this change adds overhead to animation ticks, the idea is that this will be the fallback when synchronous behavior is required to fulfill specification requirements. In the optimistic case, many animations could be updated and applied off-the-main-thread and then resynchronized when style information is queried by script. Fixes #13865.
* Auto merge of #26215 - dralley:fix-image-border, r=jdmbors-servo2020-05-021-2/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix combination of border and border-radius being drawn incorrectly fixes #20922 Manual testcase in the attached issue - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #20922 <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because ___
| * Fix combination of border and border-radius being drawn incorrectlyDaniel Alley2020-04-171-2/+12
| | | | | | | | fixes #20922
* | Add support for animationend eventMartin Robinson2020-05-012-32/+56
| | | | | | | | | | | | | | | | | | | | This is triggered when an animation finishes. This is a high priority because it allows us to start rooting nodes with animations in the script thread. This doesn't yet cause a lot of tests to pass because they rely on the existence of `Document.getAnimations()` and the presence of `animationstart` and animationiteration` events.
* | Split animation cancellation from update_style_for_animationMartin Robinson2020-04-301-14/+12
| | | | | | | | | | | | | | | | | | | | `update_style_for_animation` previously handled both canceling defunct animations and also updating style to reflect current animation state. This change splits those two concerns because we want to start handling replaced or canceled animations and finished animations in two different places. This is a refactor, so ideally it shouldn't change any behavior.
* | Restyle should reflect animations and transitionsMartin Robinson2020-04-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | When doing a restyle, we should apply animations and transitions to the new style so that it is reflected in `getComputedStyle()` and the new style information properly cascades. This is the first part of properly ticking animations and transitions. This causes a couple new animations tests failures (along with many new passes), but we currently don't have support for properly handling animations after they have completed, so this isn't totally unexpected.
* | Add support for transitionrun eventsMartin Robinson2020-04-241-55/+78
| | | | | | | | | | | | These events are triggered as soon as a transition is added to the list of running transitions. This will allow better test coverage while reworking the transitions and animations processing model.
* | Add ElementAnimationState and PossibleElementAnimationStateMartin Robinson2020-04-241-155/+121
| | | | | | | | | | | | | | | | | | | | | | | | This refactor is preparation for implementing a specification compliant transitions and animations processing model. These data structures hold all the animation information about a single node. Since adding, updating, and modifying animations for a single node are all interdependent, it makes sense to start encapsulating animation data and functionality into a single data structure. This also opens up the possibility for easier concurrency in the future by more easily allowing per-node mutexes.
* | Add support for canceling CSS transitionsMartin Robinson2020-04-221-6/+44
| | | | | | | | | | | | | | | | | | | | | | This change adds support for canceling CSS transitions when a property is no longer transitionable or when an element becomes styled with display:none. Support for canceling and replacing CSS transitions when the end value changes is still pending. This change also takes advantage of updating the constellation message to fix a bug where transition events could be sent for closed pipelines. Fixes #15079.
* | Auto merge of #26214 - mrobinson:animation-eliminate-animation-frame, r=emiliobors-servo2020-04-181-5/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminate `AnimationFrame` This intermediate data structure doesn't really buy us anything and is a bit confusing. <!-- 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: --> - [ ] There are tests for these changes OR - [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. -->
| * | Eliminate `AnimationFrame`Martin Robinson2020-04-181-5/+5
| |/ | | | | | | | | This intermediate data structure doesn't really buy us anything and is a bit confusing.
* | Auto merge of #23661 - julientregoat:i-21289, r=jdmbors-servo2020-04-171-25/+26
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor ImageCache::find_image_or_metadata -> ImageCache::{get_image, track_image} <!-- Please describe your changes on the following line: --> Updated the `ImageCache` trait to replace `find_image_or_metadata` with two new functions `track_image` and `get_image`, as well as a new enum (`ImageCacheResult`). As a result, I was able to refactor the functions that previously called `find_image_or_metadata` pretty cleanly. For a list of these functions, please see the commit information. --- <!-- 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 fix #21289 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because tests already exist for these components. I ran `cargo test` in `net`, `net_traits`, `layout`, and `script` successfully. <!-- 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. --> <!-- 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/23661) <!-- Reviewable:end -->
| * Refactor ImageCache::find_image_or_metadata API.Julien Tregoat2020-04-171-25/+26
| |
* | Some servo build fixes.Emilio Cobos Álvarez2020-04-162-53/+61
|/
* Don't go through the layout thread to retrieve a node's primary styleAnthony Ramine2020-04-071-17/+1
|
* Replace OpaqueStyleAndLayoutData by StyleAndOpaqueLayoutDataAnthony Ramine2020-04-063-38/+17
|
* Rename a bunch of style/layout data itemsAnthony Ramine2020-04-063-20/+25
| | | | | | | | | | | | | GetLayoutData::get_style_and_layout_data becomes GetOpaqueStyleAndLayoutData::get_opaque_style_and_layout_data. GetRawData::get_raw_data becomes GetStyleAndLayoutData::get_style_and_layout_data. LayoutNode::init_style_and_layout_data becomes LayoutNode::init_opaque_style_and_layout_data. LayoutNode::take_style_and_layout_data becomes LayoutNode::take_opaque_style_and_layout_data.
* Auto merge of #26105 - servo:layout-2020-less-opaque, r=emiliobors-servo2020-04-043-23/+23
|\ | | | | | | Make DOM own the style and layout data, in an UnsafeCell