| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
border box positions and transforms into account.
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
10.8, and implement `vertical-align: middle` per CSS 2.1 § 10.8.1.
`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
|
|
|
|
|
|
|
|
| |
fragment position assignment.
Improves Rust documentation.
Closes #13471.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Implement sequential fallback to float speculation
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
<!-- 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/13401)
<!-- Reviewable:end -->
|
| |
| |
| |
| |
| | |
Fixes #13284
Fixes #13223
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Simplify stacking context collection
<!-- 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.
<!-- 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/13417)
<!-- Reviewable:end -->
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
r=notriddle
layout: Improve the interaction between baseline-offset-of-last-line-in-flow logic and inline absolute hypothetical boxes.
See commits for details. These changes place the heart icon on Twitter in the right place.
r? @notriddle
<!-- 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/13470)
<!-- Reviewable:end -->
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
determining the baseline offset of the last line.
Improves Twitter by placing the favorite icon in the right place
vertically.
|
|/
|
|
|
|
| |
Separating out `REPOSITION` from `REPAINT` allows us to compute
stacking-context-relative positions without rebuilding the display list.
This saves a lot of time when responding to script-to-layout queries.
|
| |
|
| |
|
| |
|
|
|
|
| |
reset *_FRAGMENT_OF_ELEMENT flag for splitted fragments
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
REQUIRES_LINE_BREAK_AFTERWARD_IF_WRAPPING_ON_NEWLINES if the fragment can wrap text.
This was making us fall in a loop where the start split was empty, but we didn't
ignore it because the current fragment had this flag, but then we treated it
differently depending on the white_space property.
Not totally sure this is the proper fix, but it makes sense to me. In case it
is:
Fixes #12369.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Previously, the code that called this function was responsible for this.
Some code paths neglected to do it. This moves the damage removal to one
central location.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
This makes the line breaker determine the final block positions of each
line rather than doing it in a separate pass afterward. Not only does
this simplify the code, it makes `vertical-align` and float placement
interact properly.
|
|
|
|
| |
baselines when aligning inline fragments per CSS 2.1 § 10.8.1.
|
|
|
|
| |
between floats.
|
|
|
|
|
| |
Types generated by `bitflags!` are now private by default. This PR marks them
`pub` where necessary.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Rename imm_child_iter() and child_iter().
Fixes #10286
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10320)
<!-- Reviewable:end -->
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Move some CSS properties to match Gecko's representation
Fixes #10403. Animation had an extra transition-delay property, which was also moved to Box. Let me know if I should squash the commits.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10407)
<!-- Reviewable:end -->
|
| |/ |
|
|/ |
|
| |
|
|
|
|
| |
This is a followup to #10210, and a continuation of #10185.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
r=SimonSapin
ComputedValues is now ServoComputedValues
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.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10210)
<!-- Reviewable:end -->
|
| |
| |
| |
| | |
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.
|
|/
|
|
| |
Fixes #10200.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Highlight selected text in input fields
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
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10176)
<!-- Reviewable:end -->
|
| | |
|
| |
| |
| |
| |
| | |
Fixes #9993. This does not yet allow stylesheets to set the selection colors;
instead it uses a hard-coded orange background and white foreground.
|
|/ |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Don't re-resolve already-resolved generated content
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
<!-- 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/9969)
<!-- Reviewable:end -->
|