| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Based on a link's active state and the visited handling mode, pull in link,
vlink, and alink preshint declaration blocks from Gecko as needed.
MozReview-Commit-ID: A6udMYbzQnK
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
script/layout: Stop doing unsafe transmutes between refcell references.
This commit splits the style and layout data in two separate refcells.
These transmutes have been a source of trouble (for example on Android), and
they feel like a hack anyway.
Fixes #16982
<!-- 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/17025)
<!-- Reviewable:end -->
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit splits the style and layout data in two separate refcells.
These transmutes have been a source of trouble (for example on Android), and
they feel like a hack anyway.
Fixes #16982
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adjust the matching process to look for a "relevant link" while matching. A
"relevant link" is the element being matched if it is a link or the nearest
ancestor link.
Matching for links now depends on the `VisitedHandlingMode`, which determines
whether all links match as if they are unvisited (the default) or if the
relevant link matches as visited (and all others remain unvisited).
If a relevant link is ever found for any selector, track this as part of the
`MatchingContext` object. This is used in the next patch to determine if an
additional match and cascade should be performed to compute the styles when
visited.
MozReview-Commit-ID: 3xUbRo7vpuD
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is part of #16982.
Right now we have some code that tries to cache stuff in the style data during
layout.
This code is extremely rarely executed, only for `<details>` and `<summary>`.
I think if we really really want to cache these, we should find a place in the
layout data for it.
For now, let's move it away (and all the other layout code) from mutating the
style data from layout.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we add/remove important rules, we may need to update a list of all important
rules (in Gecko) which overrides animation properties. Therefore, we need to
set a flag if we update the primary rules which includes important ones.
If we have animations on this element, we update its effect properties, and
also send a task to update cascade results.
Calling get_properties_overriding_animations() might cases some impact
on performance because we need to walk the rule tree, so if possible, we could
just store this set into TNode to avoid finding the properties for both old
and new rules each time. This could be a future work if necessary.
|
| |
|
| |
|
|
|
|
|
| |
* https://bugzilla.mozilla.org/show_bug.cgi?id=1364148
* https://bugzilla.mozilla.org/show_bug.cgi?id=1364162
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
style: Refactor the cascade function.
The `cascade_primary_or_pseudo` function was nice when we shared more code, but
right now I think it just makes it harder to understand what's going on.
<!-- 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/16909)
<!-- Reviewable:end -->
|
| |
| |
| |
| |
| | |
The `cascade_primary_or_pseudo` function was nice when we shared more code, but
right now I think it just makes it harder to understand what's going on.
|
|/
|
|
|
|
|
| |
r=bholley
MozReview-Commit-ID: 8OoOIodkKJ5
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Renamed constellation::Frame to constellation::BrowsingContext
<!-- Please describe your changes on the following line: -->
Now that script has `WindowProxy` rather than `BrowsingContext` objects, we can rename `Frame` in the constellation to `BrowsingContext`. In particular, this means that `FrameId`s are now `BrowsingContextid`s, which better captures their purpose (and they are used in a lot of places, not just the constellation).
---
<!-- 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 renaming
<!-- 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/16876)
<!-- Reviewable:end -->
|
| | |
|
|/
|
|
| |
MozReview-Commit-ID: 7XZTn7HDXrm
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make non-initial about:blank loads async
<!-- 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 #14856 (github issue number if applicable).
<!-- Either: -->
- [ ] 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. -->
<!-- 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/16506)
<!-- Reviewable:end -->
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Don't update iframe pipeline until load completes
To preserve the previous functionality of delaying load events when a
new navigation is triggered, pending pipeline id represents the
current pending load. The load event is only fired if the load message's
pipeline id matches the pending pipeline id.
Track frame size on Frame instead of Pipeline
Disabled matchMedia test
Track creator pipeline id
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix typo and simplify for PresentationalHintsSynthesizer
<!-- 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 it only affects build.
<!-- 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/16785)
<!-- Reviewable:end -->
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I've chosen this approach mainly because there's no other good way to guarantee
the model is correct than holding the snapshots alive until a style refresh.
What I tried before this (storing them in a sort of "immutable element data") is
a pain, since we call into style from the frame constructor and other content
notifications, which makes keeping track of which snapshots should be cleared an
which shouldn't an insane task.
Ideally we'd have a single entry-point for style, but that's not the case right
now, and changing that requires pretty non-trivial changes to the frame
constructor.
MozReview-Commit-ID: FF1KWZv2iBM
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
Upgrade to html5ever 0.16
<!-- 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/16689)
<!-- Reviewable:end -->
|
| | |
|
|/ |
|
|
|
|
|
| |
MozReview-Commit-ID: 4BXx9JpGZKX
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
|
|
|
|
|
|
|
|
| |
Add one FFI to check if there is any transition in CSSTransitionCollection.
This will be used to check if we need to update transition and if we
should compute the after-change style.
MozReview-Commit-ID: 6HpVAtrx6Rc
|
|
|
|
|
| |
This reduces the flag setting overhead on a pessimal testcase from over a
second to ~20ms.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use Servo-specific pseudo elements for anonymous box and text
<!-- Please describe your changes on the following line: -->
Use some fake pseudo elements to style servo-specific boxes in servo. Also, Since for nested inline elements non-inheritable properties are properly stored in the inline context of an inline fragment, so get
rid of them on the style using empty pseudo to do cascading.
---
<!-- 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 #5625 (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require 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. -->
<!-- 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/16096)
<!-- Reviewable:end -->
|
| |
| |
| |
| |
| |
| | |
Since for nested inline elements non-inheritable properties are
properly stored in the inline context of an inline fragment, so get
rid of them on the style.
|
|/
|
|
| |
equivalent.
|
|
|
|
|
|
|
|
|
| |
dirty_descendants in resolve_style.
The current code can leave the tree in an inconsistent state, with the dirty
descendants bit not fully propagated.
MozReview-Commit-ID: ALI6etmlrDa
|
|
|
|
|
|
|
|
|
|
| |
SequentialTask.
The UpdateAnimationsTasks is a bitflags and each bit is generated from
Gecko's UpdateAnimationsTasks (enum class) values for matching values
between C++ and Rust. For this reason, the bitflags is annotated as
(feature = "gecko"), as a result update_animations() which uses this bitflags
also became gecko-only function.
|
|
|
|
|
|
|
| |
animations or not.
If an element has any type of animations in match_elements(), we need to call
UpdateEffectProperties() to update KeyframeEffectReadOnly::mProperties.
|
|
|
|
|
| |
MozReview-Commit-ID: QwuSxulNG0
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
becomes display:none.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We create the SequentialTask only if:
* We have no old computed values and we have animation name style in the new
computed values.
* Any animation properties is changed.
* display property is changed from 'none' and we have animation name style.
* display property is changed to 'none'.
In a subsequent patch we skip the SequentialTask if we have no running
animations and the display propery is changed to 'none'.
|
| |
|
|
|
|
|
| |
or_else in more idiomatic rust construction than
match, where Some(x) => Some(x)
|
| |
|
| |
|
|
|
|
|
| |
This is necessary to start synthesizing the styles in match_element and avoid
round-tripping them through the caller.
|
| |
|
| |
|
|
|
|
| |
style. r=emilio
|