Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: Sync changes from mozilla-central. #22641

Merged
merged 27 commits into from Jan 7, 2019
Merged

Conversation

@emilio
Copy link
Member

emilio commented Jan 6, 2019

See each individual commit for details.


This change is Reviewable

dholbert and others added 25 commits Dec 15, 2018
Since it allows to animate display, which is not good.

This is a regression from:

  https://hg.mozilla.org/mozilla-central/rev/6884ba750aa3

Actually I wonder if the logic shouldn't be the other way around, i.e., a
shorthand is animatable if all the longhands are, not if just one.

In any case this rolls back to the previous behavior, should we do that, it
should be another bug.

Differential Revision: https://phabricator.services.mozilla.com/D14632
I'm about to introduce another use of it and I don't want to repeat the same
copy-pasta again.

Differential Revision: https://phabricator.services.mozilla.com/D14672
This ended up not being so small of a patch as I'd have thought, since it
propagated a bit. But most of it is mechanical. Interesting part is
NonNegativeNumberOrPercentage and the actual uses of the NonNegative stuff and
during parsing.

This looks like it'd fix a few correctness issues during interpolation for all
the types except for BorderRadius and co (which handled it manually).

I should write tests for those in a different patch.

Differential Revision: https://phabricator.services.mozilla.com/D14673
ExtremumLength is the keyword type for css sizing properties, so we
could use cbindgen.

In Gecko, we use nsStyleCoord to store the sizing properties, and use
integer values to check the enum values, so I keep the macros in nsStyleConsts.
Even though we need to convert the enum type into integer, we still have
benefits to reduce the complexity of converting Rust into C++, and leave
the simplified mappings in C++ for better readability.

Differential Revision: https://phabricator.services.mozilla.com/D7535
Support unprefixed min-content and max-content and treat the prefixed
version as aliases for
1. width, min-width, max-width if inline-axis is horizontal, and
2. height, min-height, max-height if inline-axis is vertical, and
3. inline-size, min-inline-size, max-inline-size, and
4. flex-basis.

Besides, update the test cases to use unprefixed max-content and
min-content.

Differential Revision: https://phabricator.services.mozilla.com/D7536
We should let block-size/min-block-size/max-block-size accept keywords as the
initial value, just like width in vertical writing mode or height in horizontal
writing mode.

Differential Revision: https://phabricator.services.mozilla.com/D14320
…le(), ellipse(), and inset().

Replace LengthOrPercentage with NonNegativeLengthOrPercentage on
ShapeRadius, Circle, Ellipse. And derive ToAnimatedValue for ShapeSource and
its related types, so we clamp its interpolated results into non-negative
values. (i.e. The radius of circle()/ellipse() and the border-radius of
inset().)

Note: We may get negative values when using a negative easing function, so the
clamp is necessary to avoid the incorrect result or any undefined behavior.

Differential Revision: https://phabricator.services.mozilla.com/D14654
This brings us alignas support and also associated constants for bitfield enums.

Differential Revision: https://phabricator.services.mozilla.com/D15334
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.

Bug: 1517241
Reviewed-by: smaug
It was enabled by default in bug 1209273.

Depends on D15702

Differential Revision: https://phabricator.services.mozilla.com/D15703
It was enabled by default in bug 1091885.

Differential Revision: https://phabricator.services.mozilla.com/D15705
It was enabled by default in bug 952643.

Differential Revision: https://phabricator.services.mozilla.com/D15706
It was enabled by default in bug 1041833 (for desktops) and
bug 1087562 (for Fennec).

Differential Revision: https://phabricator.services.mozilla.com/D15707
@highfive
Copy link

highfive commented Jan 6, 2019

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
  • These commits modify style code, but no tests are modified. Please consider adding a test!
@emilio
Copy link
Member Author

emilio commented Jan 6, 2019

@bors-servo
Copy link
Contributor

bors-servo commented Jan 6, 2019

📌 Commit 4c1076a has been approved by emilio

@emilio
Copy link
Member Author

emilio commented Jan 6, 2019

@bors-servo
Copy link
Contributor

bors-servo commented Jan 6, 2019

📌 Commit 97bd8fc has been approved by emilio

@bors-servo
Copy link
Contributor

bors-servo commented Jan 6, 2019

Testing commit 97bd8fc with merge 3bf5091...

bors-servo added a commit that referenced this pull request Jan 6, 2019
style: Sync changes from mozilla-central.

See each individual commit for details.

<!-- 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/22641)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jan 7, 2019

💔 Test failed - linux-rel-wpt

And no longer compile. This is fairly well tested in WPT and Gecko tests.
@emilio
Copy link
Member Author

emilio commented Jan 7, 2019

@bors-servo r+

  • Unit tests.
@bors-servo
Copy link
Contributor

bors-servo commented Jan 7, 2019

📌 Commit ecd9794 has been approved by emilio

@bors-servo
Copy link
Contributor

bors-servo commented Jan 7, 2019

Testing commit ecd9794 with merge bffe2a6...

bors-servo added a commit that referenced this pull request Jan 7, 2019
style: Sync changes from mozilla-central.

See each individual commit for details.

<!-- 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/22641)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jan 7, 2019

@bors-servo bors-servo merged commit ecd9794 into servo:master Jan 7, 2019
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@bors-servo bors-servo mentioned this pull request Jan 7, 2019
Copy link
Contributor

mbrubeck left a comment

83f0286 looks good to me.

@emilio
Copy link
Member Author

emilio commented Jan 8, 2019

I guess that meant to go to #22645 :)

@emilio
Copy link
Member Author

emilio commented Jan 8, 2019

(Also, thanks!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

10 participants
You can’t perform that action at this time.