Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upstyle: Sync changes from mozilla-central. #21357
Merged
Conversation
and others
added 23 commits
Jul 24, 2018
The values in the boolean context depend on its feature. For examples, in the case of prefers-reduced-motion 'no-preference' means false and 'reduced' mean true in the boolean context, whereas in the case of prefers-contrast 'no-preference' means false and other two values, 'high' and 'low' means true in the boolean context. To support it we introduce a child struct of nsCSSKTableEntry that has an additional field representing the value in the boolean context and use it when we have no specified value in the media feature (i.e. in the boolean context). Bug: 1365045 Reviewed-by: heycam MozReview-Commit-ID: 79HiW8l5ous
We use the same setup WR uses, which is checking-in the files. But I think it's much better than keeping the two things in sync manually :) When you add a new value, you need to add it to the rust source, then run the command, but since it doesn't need to build the style crate (it uses the Rust AST, doesn't build) there's no problem. Differential Revision: https://phabricator.services.mozilla.com/D2354
This builds on bug 1428676 and introduces StyleAppearance, which replaces the NS_THEME_* constants. Really sorry for the size of the patch. There's a non-trivial change in the gtk theme, which I submitted separately as bug 1478385. Differential Revision: https://phabricator.services.mozilla.com/D2361
Bug: 1477628 Reviewed-by: heycam
The patch at bug 1478391 comment 6 changed the way the math in Scrollbarbutton* worked, which pretty surely caused this. Restore the original order and math to be the same as before bug 1478391. Bug: 1479216 Reviewed-by: xidorn MozReview-Commit-ID: CK3iOqeX2NW
We have a different order in nsCSSPropertyId for no good reason. The only invariant there is that longhands come before shorthands, and shorthands before aliases. Luckily that's also an invariant that NonCustomPropertyId has, so we can reuse them. Differential Revision: https://phabricator.services.mozilla.com/D2463 MozReview-Commit-ID: 1hsQu6hmqiN
:root can't change without getting unbound from the tree so no fancy stuff other than that needed. This removes a lot of revalidation and attribute invalidation matching from the Chrome, and looks like it should be a good idea in general. Differential Revision: https://phabricator.services.mozilla.com/D2462
And general Element logging. We now print all the attributes for comparison. If this turns out to be too verbose we can change it to diff them or something. Differential Revision: https://phabricator.services.mozilla.com/D2471
Always assume allowed-for-all-content. There are a couple callers which weren't doing that: * A unit test -> removed. * ComputeAnimationDistance: Used for testing (in transitions_per_property), and for the animation inspector. The animation inspector shouldn't show non-enabled properties. The transitions_per_property test already relies on getComputedStyle stuff which only uses eForAllContent. * GetCSSImageURLs: I added this API for the context menu page and such. It doesn't rely on non-enabled-everywhere properties, it was only using eInChrome because it was a ChromeOnly API, but it doesn't really need this. Differential Revision: https://phabricator.services.mozilla.com/D2514
And remove gPropertyTable / kCSSRawProperties while at it. Differential Revision: https://phabricator.services.mozilla.com/D2516
…mmon case. We can discard the common case of an element having another element or document fragment parent, which is the common case. Then we can discard detached subtrees looking at is_in_document(). The only case where we have a non-content parent is the document case: https://searchfox.org/mozilla-central/rev/033d45ca70ff32acf04286244644d19308c359d5/dom/base/Element.cpp#1683 Differential Revision: https://phabricator.services.mozilla.com/D2505
The '-moz-menulist-button' value currently behavies identically to the 'menulist-button' value. This is not implemented as an alias because later patches in this patch series will change the behavior of our pre-existing 'menulist-button' value to more closely match what Chrome does. Bug: 1428676 Reviewed-by: emilio
This saves about 37 KiB of memory across the UA style sheets. Bug: 1475197 Reviewed-by: emilio
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
Differential Revision: https://phabricator.services.mozilla.com/D2598
…s succeeded. Otherwise they may clobber useful output. Differential Revision: https://phabricator.services.mozilla.com/D2783
Differential Revision: https://phabricator.services.mozilla.com/D2767
It used to be this way because of lifetime issues (plus the shadow datas were in RwLocks at some point IIRC). Now we guarantee that as long as the element is away the cascade data is as well, so we don't need to thread it around. Differential Revision: https://phabricator.services.mozilla.com/D2768
highfive
commented
Aug 7, 2018
|
Heads up! This PR modifies the following files:
|
highfive
commented
Aug 7, 2018
|
@bors-servo r+ |
|
|
bors-servo
added a commit
that referenced
this pull request
Aug 7, 2018
style: Sync changes from mozilla-central. See each individual commit. <!-- 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/21357) <!-- Reviewable:end -->
|
|
|
@bors-servo retry |
bors-servo
added a commit
that referenced
this pull request
Aug 8, 2018
style: Sync changes from mozilla-central. See each individual commit. <!-- 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/21357) <!-- Reviewable:end -->
|
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
emilio commentedAug 7, 2018
•
edited by SimonSapin
See each individual commit.
This change is