| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove packages that were moved to external repo
* Add workspace dependencies pointing to 2023-06-14 branch
* Fix servo-tidy.toml errors
* Update commit to include #31346
* Update commit to include servo/stylo#2
* Move css-properties.json lookup to target/doc/stylo
* Remove dependency on vendored mako in favour of pypi dependency
This also removes etc/ci/generate_workflow.py, which has been unused
since at least 9e71bd6a7010d6e5723831696ae0ebe26b47682f.
* Add temporary code to debug Windows test failures
* Fix failures on Windows due to custom target dir
* Update commit to include servo/stylo#3
* Fix license in tests/unit/style/build.rs
* Document how to build with local Stylo in Cargo.toml
|
|
|
|
|
|
|
|
| |
$ find servo -name '*.rs' | xargs rustup run nightly rustfmt
Depends on D179380
Differential Revision: https://phabricator.services.mozilla.com/D179381
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added WebIDL interfaces as per spec, added some necessary changes to support maplike and setlike structures to be accessed from C++.
Added `::highlight(foo)` pseudo element to CSS engine.
Implemented Highlight as new kind of `Selection` using `HighlightType::eHighlight`. This implies Selections being added/removed during runtime (one `Selection` object per highlight identifier), therefore a dynamic container for highlight `Selection` objects was added to `nsFrameSelection`. Also, the painting code queries the highlight style for highlight Selections.
Implementation is currently hidden behind a pref `dom.customHighlightAPI.enabled`.
Differential Revision: https://phabricator.services.mozilla.com/D164203
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The only remaining consumers are ::-moz-tree pseudo-elements (we used to
use ThinBoxedSlice for other data structures in the past).
Those are not particularly performance sensitive so I think just
double-boxing is fine. In the future, if we wanted to avoid the double
indirection, we could probably use the "thin" crate
(https://docs.rs/thin) or similar, which stores the length of the slice
along with the allocation, making the pointer thin in all
configurations, much like "ThinArc" does:
https://searchfox.org/mozilla-central/rev/1ce2eea39442190a71a1f8f650d098f286bf4a01/servo/components/servo_arc/lib.rs#891
In practice though, I don't think it's particularly worth it for this
specific case.
Differential Revision: https://phabricator.services.mozilla.com/D134672
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
stored in the parent element
We allow animating pseudo-elements like ::-moz-progress-bar (and we
treat them like regular elements).
Ideally we should store animations for these in the parent element as
well, so they survive reframes and such. But treating them as regular
elements right now means that we do animate them, but we never update
animations for them correctly because wrapper.rs assumed them to be
non-animatable.
Since it seems reasonable to keep allowing the animations to happen,
let's just correct the update code and add a test.
Differential Revision: https://phabricator.services.mozilla.com/D131794
|
|
|
|
|
|
|
|
| |
On by default since bug 1662478 (Firefox 82)
Depends on D101289
Differential Revision: https://phabricator.services.mozilla.com/D101290
|
|
|
|
|
|
|
| |
This pseudo does nothing and we successfully removed it in bug 1655859
(firefox 81).
Differential Revision: https://phabricator.services.mozilla.com/D101289
|
|
|
|
|
|
|
|
| |
in all channels.
See https://github.com/w3c/csswg-drafts/issues/5049
Differential Revision: https://phabricator.services.mozilla.com/D88995
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
As per https://github.com/w3c/csswg-drafts/issues/5049.
Don't enable it unconditionally just yet, as the name may change.
I had to move some rules in forms.css because otherwise you get
specificity conflicts.
Differential Revision: https://phabricator.services.mozilla.com/D76214
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See https://bugzilla.mozilla.org/show_bug.cgi?id=932410#c2 for the
context for which this pseudo-element was added.
In the previous patch, I had to special-case range appearance because of
this pseudo-class, but that patch makes this pseudo-class completely
redundant, as now all form controls, themed and unthemed, display
outlines, unless the native theme displays a focus indicator on its own.
Remove the special case, and make ranges use outlines like everything
else rather than this bespoke pseudo-element.
Differential Revision: https://phabricator.services.mozilla.com/D74734
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When unhidding a ::marker element, we construct its generated item, and
then call StyleNewSubtree() on this generated item. During traversal, we
may update any animation related values in Gecko_UpdateAnimations(), which
may update the base styles for animation properties.
The test case is an animation segment from "null" to "inital" value. We
replace the "null" value with the base style value for the specific animation
property, so we can do interpolation properly.
(e.g. opacity: "null => initial" becomes "1.0 => initial")
If we don't update the animation related values in
Gecko_UpdateAnimations after generating ::marker, we may do
interpolation from "null" to "initial", which causes a panic.
Differential Revision: https://phabricator.services.mozilla.com/D73408
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This never worked, but it's more visible with the new form controls which have
more padding.
Make the anonymous div and co a pseudo-element, so that they inherit from the
<input> properly in all cases. This works for non-number inputs because the
editor root is a direct child of the <input>, but it doesn't for number inputs
because there's a flex wrapper in between.
This way overflow-clip-box: inherit does what we want. Reset the padding in the
inline direction, as the padding for <input type=number> applies to the arrow
boxes as well, and thus we'd double-apply it.
Differential Revision: https://phabricator.services.mozilla.com/D65271
|
|
|
|
|
|
|
| |
This moves the shadow cascade order into the cascade level, and refactors the
code a bit for that.
Differential Revision: https://phabricator.services.mozilla.com/D49988
|
| |
|
|
|
|
|
|
|
|
|
|
| |
It's much nicer.
One nice thing about this is that the new code is subject to the existing
threadedness checking, which identified that several of these should be atomic
because they're accessed off the main thread.
Differential Revision: https://phabricator.services.mozilla.com/D40792
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D31680
|
|
|
|
|
|
|
|
| |
According to the spec [1], only those CSS properties listed on the spec can be applied on the `::cue`.
[1] https://www.w3.org/TR/webvtt1/#the-cue-pseudo-element
Differential Revision: https://phabricator.services.mozilla.com/D34262
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch invalidates the style for `::selection`, which will restore the
behavior before the regression.
However, it's still not quite correct, because repaint is not triggered. Given
that `::selection` requires some major change to implement
https://github.com/w3c/csswg-drafts/issues/2474, we can address this problem
later.
Differential Revision: https://phabricator.services.mozilla.com/D35305
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
::slotted() is already weird in the sense that it supports a pseudo-element
afterwards (so ::slotted(*)::before is valid for example).
::part() is weirder because you are supposed to allow stuff like
::part(foo):hover, ::part(foo):hover::before, etc.
In order to avoid making the already-complex parse_compound_selector more
complex, shuffle stuff so that we pass the progress of our current compound
selector around, and is the parsing code for each selector which decides whether
it's ok to parse at the given point.
Differential Revision: https://phabricator.services.mozilla.com/D27158
|
| |
|
|
|
|
|
|
|
| |
:-moz-list-bullet/number to that in the parser.
Bug: 205202
Reviewed-by: emilio
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ComputedStyle::mPseudoTag.
This is more consistent with what the Rust bits of the style system do, and
removes a pointer from ComputedStyle which is always nice.
This also aligns the Rust bits with the C++ bits re. not treating xul pseudos as
anonymous boxes. See the comment in nsTreeStyleCache.cpp regarding those.
Can't wait for XUL trees to die.
Differential Revision: https://phabricator.services.mozilla.com/D19002
|
| |
|
| |
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D11132
|
| |
|
| |
|
|
|
|
|
|
|
| |
See https://github.com/w3c/csswg-drafts/issues/3150 for the issue that would
expand this to all pseudos.
Differential Revision: https://phabricator.services.mozilla.com/D9994
|
|
|
|
|
|
|
|
|
| |
I plan to change servo to use all: inherit on its UA sheet.
I hope the patch below should make it good enough performance-wise. And also,
it's probably broken so I don't think it's worth supporting it specially.
Differential Revision: https://phabricator.services.mozilla.com/D8686
|
| |
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D4186
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D4185
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We only have this so that ::-moz-placeholder keeps serializing as
::-moz-placeholder, but I don't think anybody really cares.
Edge aliases ::-webkit-input-placeholder to ::-ms-input-placeholder at parse
time as well, as can be seen in:
```
let s = document.createElement('style');
s.innerHTML = `input::-webkit-input-placeholder { color: red };`;
document.body.appendChild(s);
document.body.innerHTML = s.sheet.cssRules[0].cssText;
```
And I think this is more consistent with what we do for CSS properties that are
aliases.
Differential Revision: https://phabricator.services.mozilla.com/D2595
|
|
|
|
|
|
|
| |
This saves about 37 KiB of memory across the UA style sheets.
Bug: 1475197
Reviewed-by: emilio
|
|
|
|
|
|
| |
Bug: 1474959
Reviewed-by: xidorn
MozReview-Commit-ID: 1DILenWIw4D
|
|
|
|
|
|
|
|
|
|
| |
This was generated with:
./mach cargo fmt --package selectors &&
./mach cargo fmt --package servo_arc &&
./mach cargo fmt --package style
Using rustfmt 0.4.1-nightly (a4462d1 2018-03-26)
|
|
|
|
|
|
|
| |
Much like we optimize to_ascii_lowercase.
This also fixes a bug in Servo where attr() rules with an unknown namespace
prefix are parsed, which is wrong.
|
|
|
|
|
|
| |
Bug: 1433389
Reviewed-by: jwatt
MozReview-Commit-ID: 2ycajPYd3CV
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that we have an Element around on cascade, we can stop using the cascade
flags mechanism to pass various element-related state, like "is this element the
root", or "should it use the item-based display fixup".
That fixes handwaviness in the handling of those flags from style reparenting,
and code duplication to handle tricky stuff like :visited.
There are a number of other changes that are worth noticing:
* skip_root_and_item_based_display_fixup is renamed to skip_item_display_fixup:
TElement::is_root() already implies being the document element, which by
definition is not native anonymous and not a pseudo-element.
Thus, you never get fixed-up if your NAC or a pseudo, which is what the code
tried to avoid, so the only fixup with a point is the item one, which is
necessary.
* The pseudo-element probing code was refactored to return early a
Option::<CascadeInputs>::None, which is nicer than what it was doing.
* The visited_links_enabled check has moved to selector-matching time. The rest
of the checks aren't based on whether the element is a link, or are properly
guarded by parent_style.visited_style().is_some() or visited_rules.is_some().
Thus you can transitively infer that no element will end up with a :visited
style, not even from style reparenting.
Anyway, the underlying reason why I want the element in StyleAdjuster is because
we're going to implement an adjustment in there depending on the tag of the
element (converting display: contents to display: none depending on the tag), so
computing that information eagerly, including a hash lookup, wouldn't be nice.
|
|
|
|
| |
This prevents confusion and paves the ground for derive(Parse) of them.
|
|
|
|
| |
MozReview-Commit-ID: Enr1NHONmtp
|
| |
|
| |
|
|
|
|
|
|
| |
failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE
Backs out https://github.com/servo/servo/pull/18809
|
|
|
|
|
| |
It still needs dependencies update to remove all the other bitflags
versions.
|
|
|
|
|
|
|
|
|
|
| |
The only reason why we had the `existing_style_for_style_damage` bit is to apply
some optimizations that we don't have anymore.
I still want to reintroduce a few of them, at least for the non-eager
pseudo-element case... But I think I won't need this at all.
This allows us to remove a fair amount of Gecko code too.
|
| |
|
|
|
|
| |
Servo part of part 5 of the fix for Gecko bug 1324619. r=emilio
|
|
|
|
|
|
| |
no content for ::before and ::after.
Fixes Gecko bug 1376073. r=emilio
|