| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Scroll roots are no longer nested containers holding items, so instead
we need to track the offsets of each, carefully handling fixed position
items and stacking contexts that create new reference frames.
Additionally, we remove the complexity of the pre-computed page scroll
offset, instead opting to send script scrolls to the layout task in
order to more quickly have a ScrollState there that matches the
script's idea of the scroll world.
Fixes #16405.
|
|
|
|
|
|
|
| |
This avoids the need for multiple layout RPC operations immediately
following return of control to script. This means that layout and
script can continue to operate in parallel at this point, rather
than one potentially waiting on the shared mutex to be unlocked.
|
|
|
|
|
|
|
|
| |
This ensures that we can pass a node address as part of the asynchronous
transition end notification, making it safe to fire the corresponding
DOM event on the node from the script thread. Without explicitly rooting
this node when the transition starts, we risk the node being GCed before
the transition is complete.
|
|
|
|
|
|
|
|
|
|
|
| |
This slims down SharedStyleContext, in preparation for a few things.
First, I would like to eventually move the stylist to the document in Servo, in
order for it to hold the StyleSheetSet.
Also, this gets rid of a fair amount of overhead while creating it in stylo.
Fixes bug 1363245.
|
| |
|
|
|
|
| |
MozReview-Commit-ID: 1iQdUDsb6u9
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
regular test checking only the fixed crash
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Remove cached thread local context from LayoutContext, use LayoutContext for
assign_inline_sizes(), and simplify the parallel flow traversal code.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make offset parent queries less buggy.
<!-- Please describe your changes on the following line: -->
Offset parent queries, which are used in the getters for HTMLElement's `offsetParent`, `offsetTop`, `offsetLeft`, `offsetWidth`, and `offsetHeight`, are pretty busted. The most egregious bug is that, as reported in #12939, inline elements are treated as if they're not present in the document. This PR fixes that and all of the other bugs I could trace directly to the offset parent query code, but `offsetTop` and `offsetLeft` are still unreliable in certain circumstances for reasons I haven't looked into (#13708). Inline elements with no content are still treated as not present due to #13982, so #13944 isn't fixed with this PR, either.
---
<!-- 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 #12939 and fix #12595
<!-- 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. -->
<!-- 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/14839)
<!-- Reviewable:end -->
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
This is why you shouldn't make assumptions about what you'll need later!
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
But don't change the API yet.
|
|/
|
|
|
|
| |
other stacking context space.
I don't know how neither review or a test caught this.
|
| |
|
|
|
|
|
|
| |
GetComputedStyle.
MozReview-Commit-ID: KAM9mVoxCHE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It turns out that it's problematic to embed ThreadLocalStyleContext within
LayoutContext, because parameterizing the former on TElement (which we do
in the next patch) infects all the traversal stuff with the trait parameters,
which we don't really want.
In general, it probably makes sense to use separate scoped TLS types for
the separate DOM and Flow tree passes, so we can add a different ScopedTLS
type for the Flow pass if we ever need it.
We also reorder the |scope| and |shared| parameters in parallel.rs, because
it aligns more with the order in style/parallel.rs. I did this when I was
adding a TLS parameter to all these functions, which I realized we don't need
for now.
|
|
|
|
|
|
|
|
|
|
| |
immutably across the traversal.
This allows us to get rid of a bunch of lifetimes and simplify a lot of code. It
also lets us get rid of that nasty lifetime transmute, which is awesome.
The situation with thread-local contexts is still suboptimal, but we fix that in
subsequent patches.
|
| |
|
|
|
|
|
|
|
|
| |
This reimplemntation of the feature uses ScrollRootIds to scroll
particular scrollable areas of the page.
Fixes #13736.
Fixes #10753.
|
|
|
|
| |
MozReview-Commit-ID: 7wH5XcILVmX
|
|
|
|
| |
This makes it consistent with an upcoming update of the selectors crate.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
MozReview-Commit-ID: 3V6JIlOVVhw
|
|
|
|
|
|
|
|
| |
Layers were a feature of the legacy drawing path. If we re-add them at
some point, it probably makes more sense to make them a product of
display list inspection.
This change also remove a bunch of dead painting code.
|
|
|
|
|
| |
The new restyle architecture doesn't store these things in consistent
places, so we need a more abstract API.
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
dom: getElementsFromPoint does the hit testing on viewport coordinates.
<!-- 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
<!-- 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. -->
We got this wrong (I think it wasn't my fault actually), I was just writing a test for #12777 when I found this.
<!-- 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/12813)
<!-- Reviewable:end -->
|