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. #22861

Merged
merged 9 commits into from Feb 10, 2019
Merged

Conversation

@emilio
Copy link
Member

emilio commented Feb 10, 2019

See each individual commit for details.


This change is Reviewable

emilio added 9 commits Jan 30, 2019
But enable it in all tests because a lot of them rely on using it in the
style="" attribute for example, or in inline stylesheets, which will no longer
parse this (even in chrome documents), and we don't want to rewrite all the XUL
and XBL tests.

Differential Revision: https://phabricator.services.mozilla.com/D18027
Which is the only property that uses LengthPercentage alone.

Differential Revision: https://phabricator.services.mozilla.com/D17737
This also makes us pass a few WPTs because we stop losing precision when
serializing the computed value.

Differential Revision: https://phabricator.services.mozilla.com/D17738
Also for the intersection observer root margin, since it was easier to fix it
up and clean it up than not doing it.

This is the first big step to get rid of nscoord. It duplicates a bit of logic
in nsLayoutUtils since for now max/min-width/height are still represented with
nsStyleCoord, but I think I prefer to land this incrementally.

I didn't add helpers for the physical accessors of the style rect sides that
nsStyleSides has (top/bottom/left/right) since I think we generally should
encourage the logical versions, but let me know if you want me to do that.

Differential Revision: https://phabricator.services.mozilla.com/D17739
…epr(C) representation.

This patch:

 * Makes LengthPercentageOrAuto generic, and removes a bunch of code fo
   LengthPercentageOrNone, which was used only for servo and now can use the
   normal MaxLength (with a cfg() guard for the ExtremumLength variant).

 * Shrinks MaxLength / MozLength's repr(C) reperesentation by reducing enum
   nesting. The shrinking is in preparation for using them from C++ too, though
   that'd be a different bug.

 * Moves NonNegative usage to the proper places so that stuff for them can be
   derived.

I did this on top of bug 1523071 to prove both that it could be possible and
that stuff wasn't too messy. It got a bit messy, but just because of a bug I
had fixed in bindgen long time ago already, so this updates bindgen's patch
version to grab a fix instead of ugly workarounds :)

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

highfive commented Feb 10, 2019

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/devtools.rs, components/script/lib.rs, components/script/dom/element.rs
  • @KiChjang: components/script/devtools.rs, components/script/lib.rs, components/script/dom/element.rs
@highfive
Copy link

highfive commented Feb 10, 2019

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
@emilio
Copy link
Member Author

emilio commented Feb 10, 2019

@bors-servo
Copy link
Contributor

bors-servo commented Feb 10, 2019

📌 Commit 6daebcc has been approved by emilio

@bors-servo
Copy link
Contributor

bors-servo commented Feb 10, 2019

Testing commit 6daebcc with merge aeeaf9d...

bors-servo added a commit that referenced this pull request Feb 10, 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/22861)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Feb 10, 2019

@bors-servo bors-servo merged commit 6daebcc into servo:master Feb 10, 2019
4 checks passed
4 checks passed
Taskcluster (pull_request) TaskGroup: success
Details
Travis CI - Pull Request Build Passed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details
@bors-servo bors-servo mentioned this pull request Feb 10, 2019
4 of 4 tasks complete
@emilio emilio deleted the emilio:gecko-sync branch Feb 11, 2019
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

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