<!-- 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 fix#14685 (github issue number if applicable).
<!-- Either: -->
- [x] There are tests for these changes
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Source-Repo: https://github.com/servo/servo
Source-Revision: c75946c3ed52d262aae585055023becd5a2e9769
This patch allows Servo to incrementally reflow truncated fragments correctly.
* The untruncated version of a fragment is preserved, and when incrementally reflowing, the untruncated version is what gets reflowed. If it needs truncated, it will get truncated again.
* The ellipsis fragments are skipped when incrementally reflowing a line. If it is still needed, it will be recreated.
---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix#14952
- [X] There are tests for these changes OR
Source-Repo: https://github.com/servo/servo
Source-Revision: 6a04aea4a5a0da583e8cc7fc0f76c9bfea857538
<!-- 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 should not change behavior.
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Collect scroll roots during the collect_stacking_context phase instead
of during display list construction. This will be useful in order to
collect containing block scroll roots as well as to give scroll roots
sequential ids in the future. This change also pulls stacking context
children out of the StackingContext struct itself, which should reduce
very slightly the memory used by the finished display list. This also
simplifies the DisplayListBuilder because it no longer has to maintain
a stack of ScrollRootIds and StackingContextIds and can instead just
rely on the program stack.
Source-Repo: https://github.com/servo/servo
Source-Revision: dabb79c7878fce31b8b979dd5fcfdfb8713a9d80
Style no forced docs for the properties code and similar, but I ran out of time, and I think it's a nice improvement.
I'd appreciate a fast-ish turn-around time because this is pretty much prone to bitrot.
Source-Repo: https://github.com/servo/servo
Source-Revision: bd67163438317daa711b2411ce302aaf5bf4136a
<!-- 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: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Source-Repo: https://github.com/servo/servo
Source-Revision: 1993b6e812de30de06100e7d52c1d90af929f24f
<!-- 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 fix#13709
<!-- Either: -->
- [x] There are tests for these changes
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
cc @Manishearth
The lorem-ipsum example from MDN works as expected.
Source-Repo: https://github.com/servo/servo
Source-Revision: a91f48ee05933784630fdf918fc4b66037dba9f1
We need to hang both snapshots and restyle damage off of ElementData, and so we need them to be concrete to avoid infecting ElementData with the trait hierarchy.
Source-Repo: https://github.com/servo/servo
Source-Revision: d8ac5100e81ccbad4b5131688b96bedb9b5e279d
--HG--
rename : servo/resources/shaders/debug_color.fs.glsl => servo/components/style/servo/mod.rs
rename : servo/components/script_layout_interface/restyle_damage.rs => servo/components/style/servo/restyle_damage.rs
rename : servo/components/style/servo_selector_impl.rs => servo/components/style/servo/selector_impl.rs
<!-- Please describe your changes on the following line: -->
Migrated the trace-layout code from old `rustc-serialize` to `serde_json`. This will help us iterate faster on the layout viewer (#13432), #13436, #12675 and fix#12936.
---
<!-- 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#12936 (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it's a relatively low risk debug tool
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Source-Repo: https://github.com/servo/servo
Source-Revision: 1c26f44cbb23e7da3b9d63f0223c8d5d43eec958
This creates a sharp distinction between `Arc<Flow>`s, which may be
owned by anyone, and `FlowRef`s, which may only be owned by the
traversal code. By checking the reference count, we ensure that a `Flow`
cannot be pointed to by `Arc`s and `FlowRef`s simultaneously.
This is not a complete fix for #6503, though it is a necessary start
(enforcing the no-aliasing rule of `FlowRef::deref_mut` will require far
more work).
---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix#14014 (github issue number if applicable).
- [X] These changes do not require tests because the existing tests, plus the added assertions, should be sufficient
Source-Repo: https://github.com/servo/servo
Source-Revision: 2b4a7b0b7ad9dd568dfde15ab47dc634ec561d70
<!-- 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 this PR should not change behavior.
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Source-Repo: https://github.com/servo/servo
Source-Revision: 3a3f3192a87dbcd5d05efb82a1f4dde23f9c4cf7
--HG--
rename : servo/resources/shaders/box_shadow.fs.glsl => servo/resources/shaders/cs_box_shadow.fs.glsl
rename : servo/resources/shaders/ps_box_shadow.glsl => servo/resources/shaders/cs_box_shadow.glsl
This removes paint threads, rust-layers dependency, and changes
optional webrender types to be required.
The use_webrender option has been removed, however I've left
the "-w" command line option in place for now so that wpt
runner can continue to pass that. Once it's removed from there
we can also remove the -w option.
Once this stage is complete, it should be fine to change the
display list building code to generate webrender display
lists directly and avoid the conversion step.
Source-Repo: https://github.com/servo/servo
Source-Revision: f96718d03da969510dc992699cb6f25c2e21ae1e
Clipping region computation now follows a simple process: (1) in the
parent's coordinate system, parents store appropriate clipping regions
into children; (2) each child moves its clipping region to its own
coordinate system if necessary.
Because clipping region computation is now based on stacking-relative
border box positions and the `transform_rect` method, it can handle
`position: relative` offsets and more types of transforms, such as
scaling.
Improves etsy.com.
Closes#13753.
Source-Repo: https://github.com/servo/servo
Source-Revision: c1abd8797c5b257c9339fbaf6ca4b7480c43a755
`InlineMetrics` has been split into `InlineMetrics` for fragments and
`LineMetrics` for lines. Both structures' fields have been renamed in
order to more clearly delineate the difference between *space* and
*content*. Vertical positioning of fragments has been reworked to take
margins and borders into account only for replaced content.
This patch fixes the `vertical_align_super_a.html` reftest. Servo now
matches the rendering that Gecko and WebKit produce.
Additionally, this includes a test for the popular inline-block
centering technique described here:
https://s.codepen.io/shshaw/fullpage/gEiDt?#Inline-Block
r? @mbrubeck
Source-Repo: https://github.com/servo/servo
Source-Revision: 768a699fa5d822173b2247d6348413d09951a8bb
This shouldn't impact any pages that are already rendering correctly, but it is a very naive implementation of this pass.
---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix#13284 and fix#13223
- [X] There are tests for these changes
Source-Repo: https://github.com/servo/servo
Source-Revision: 4ebecc915a13cd944b25738dd5859f1a6072a4ff
<!-- 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 _____
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Simplify the way that stacking contexts are collected. Instead of
passing the StackingContextId down the tree, pass the parent
StackingContext itself. This will allow future patches to get more
information about the parent stacking context (such as location).
Also remove the return value of collect_stacking_contexts, which was
unused.
Source-Repo: https://github.com/servo/servo
Source-Revision: 81dfa6a96b99eae8a7232eab39de96edf663ba99
See commits for details. These changes place the heart icon on Twitter in the right place.
r? @notriddle
Source-Repo: https://github.com/servo/servo
Source-Revision: ccfc60161b8d92217b9f77040d6928d429bcbe9d
CNN is still too slow to be usable, but this is a partial solution.
r? @notriddle (feel free to reassign if you like)
Source-Repo: https://github.com/servo/servo
Source-Revision: cbe54582727e3d756aa084e94520f2f29f9d7c86
<!-- Please describe your changes on the following line: -->
This PR fixes ignored paddings and margins for inline pseudo elements.
---
<!-- 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#12367 (github issue number if applicable).
<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Source-Repo: https://github.com/servo/servo
Source-Revision: 9ffda4c7b33f14c291404655bd137b544969fff9
<!-- Please describe your changes on the following line: -->
Fix fragment splitting algorithm to set FIRST/LAST_FRAGMENT_OF_ELEMENT flag correctly, account for border_padding for border_box and set zero border_padding between for new fragments.
---
<!-- 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#12699 (github issue number if applicable).
<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Source-Repo: https://github.com/servo/servo
Source-Revision: 2420dc4a3e9338977e6f24184e65abff9749afb4
Background:
The changes to Servo code to support Stylo began in the `selectors` crate with making pseudo-elements generic, defined be the user, so that different users (such as Servo and Gecko/Stylo) could have a different set of pseudo-elements supported and parsed. Adding a trait makes sense there since `selectors` is in its own repository and has others users (or at least [one](https://github.com/SimonSapin/kuchiki)).
Then we kind of kept going with the same pattern and added a bunch of traits in the `style` crate to make everything generic, allowing Servo and Gecko/Stylo to do things differently. But we’ve also added a `gecko` Cargo feature to do conditional compilation, at first to enable or disable some CSS properties and values in the Mako templates. Since we’re doing conditional compilation anyway, it’s often easier and simpler to do it more (with `#[cfg(feature = "gecko")]` and `#[cfg(feature = "servo")]`) that to keep adding traits and making everything generic. When a type is generic, any method that we want to call on it needs to be part of some trait.
----
The first several commits move some code around, mostly from `geckolib` to `style` (with `#[cfg(feature = "gecko")]`) but otherwise don’t change much.
The following commits remove some traits and many type parameters through the `style` crate, replacing them with pairs of conditionally-compiled API-compatible items (types, methods, …).
Simplifying code is nice to make it more maintainable, but this is motivated by another change described in https://github.com/servo/servo/pull/12391#issuecomment-232183942. (Porting Servo for that change proved difficult because some code in the `style` crate was becoming generic over `String` vs `Atom`, and this PR will help make that concrete. That change, in turn, is motivated by removing geckolib’s `[replace]` override for string-cache, in order to enable using a single Cargo "workspace" in this repository.)
r? @bholley
---
<!-- 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 #__ (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require new tests because refactoring
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Source-Repo: https://github.com/servo/servo
Source-Revision: 2d01d41a506bcbc7f26a2284b9f42390d6ef96ab
--HG--
rename : servo/ports/geckolib/selector_impl.rs => servo/components/style/gecko_selector_impl.rs
rename : servo/ports/geckolib/values.rs => servo/components/style/gecko_values.rs
rename : servo/ports/geckolib/properties.mako.rs => servo/components/style/properties/gecko.mako.rs
Fix line-breaking with white-space: pre-wrap/pre-line;
<!-- Please describe your changes on the following line: -->
Not sure if this is the appropriate fix, but we'll know soon.
---
<!-- 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#12369
<!-- Either: -->
- [x] There are tests for these changes OR
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
r? @mbrubeck
Source-Repo: https://github.com/servo/servo
Source-Revision: 8ded106186aa0855a2bd991d573e7095590efca1
<!-- Please describe your changes on the following line: -->
Checked the html in the github issue and the image looks like it is resized properly in Servo.
Fixed image resizing when height is specified in percentages.
---
<!-- 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#11723 (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because this issue is marked with has-test?
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Source-Repo: https://github.com/servo/servo
Source-Revision: d2db39634e6e39f4cb054e0b443339409ae69350
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.
r? @glennw
Source-Repo: https://github.com/servo/servo
Source-Revision: 27d1f182713077395426a53a9c91ec35c95887ee
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 --faster` does not report any errors
- [X ] These changes fix#11320 (github issue number if applicable).
Either:
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____
Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.
Source-Repo: https://github.com/servo/servo
Source-Revision: 2f9796fa696e9514280777398467696dd4f004b3
LineBreaker calls Fragment::strip_trailing_whitespace_if_necessary and then recalculates the fragment's inline size. But this isn't necessary because strip_trailing_whitespace_if_necessary already recalculates the size.
r? @pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: f80641e7a16b832ce755cf936ed9ea6a9289fda9
Fixes#10403. Animation had an extra transition-delay property, which was also moved to Box. Let me know if I should squash the commits.
Source-Repo: https://github.com/servo/servo
Source-Revision: 256b865055c10082731b218f41373d47ad632062
It only supports `color` and `background`, for now, but it shouldn't be hard to add more properties (like text-shadow).
r? @mbrubeck
Source-Repo: https://github.com/servo/servo
Source-Revision: 723989b9dddeb9bcdc28dc7d640fd6fd7247a27f
This is the first part of #10185. More to follow. I have built this locally with both servo and geckolib without errors; let's see if it succeeds on all platforms as well.
Source-Repo: https://github.com/servo/servo
Source-Revision: 639fdd6b128e0cfd418e4ae0dd78de3f5aecac4c
Fixes#10200. r? @pcwalton
Note: The reftest uses a transition of non-zero duration, because I couldn't find any other way to reproduce the bug. Unfortunately this makes it unreliable in debug builds. I tried to fix this using reftest-wait with setTimeout and requestAnimationFrame, but it still wouldn't complete the animation consistently. To make the test work in debug builds we may need `transitionend` events (#10245) or a different way to reproduce the bug.
Source-Repo: https://github.com/servo/servo
Source-Revision: 159be44193ef7d60a5c35629d791323e5357e7db
Fixes#9993. This does not yet allow stylesheets to set the selection colors; instead it uses a hard-coded orange background and white foreground.
r? @pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: bed91b3334786970c91a47c3bc95889d8675b4d5
This allows geckolib to pass gecko style structs and have the style system write to them directly, provided we implement all the traits.
Source-Repo: https://github.com/servo/servo
Source-Revision: 605842f193aedc1151ab38a99c49f693c76e5cf3
This fixes#7846, a failure in the "quotes-036.htm" test. Servo lays out this test correctly in its initial layout, but then messes it up in any relayout (whether it's an incremental or full layout).
The problem is that the ResolveGeneratedContent traversal is not safe to run more than once on the same flow. It mutates some GeneratedContent fragments into ScannedText fragments, but leaves others unmodified (in particular, those that generate empty content). The next time layout runs, these remaining GeneratedContent fragments are processed *again* but with an incorrect correct quote nesting level (because some of the surrounding GeneratedContent fragments are gone).
This patch ensures that each GeneratedContent fragment is resolved only once.
r? @pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: 71b1122e97303c51bac73d03d8af617069a75d21
This fixes a bug in line splitting caused by the following actions when `LineBreaker::split_line_at_last_known_good_position` is called:
1. Push some number of previous fragments onto the front of the work list.
2. Push the current fragment back onto the front work list.
This resulted in the work list being out of order. The correct order is action 2 followed by action 1. Fixes#9830. r? @pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: 059edc3287909ce705ba90804c778ee50f1e157e
Flat display lists were a 2x regression on the spheres demo. This patch series fixes that.
See the individual commits for more details.
r? @mrobinson
Source-Repo: https://github.com/servo/servo
Source-Revision: 55fc48e4c46917a0f036d0054fac296bb5719434