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: paint-order serialization fixes. #18627

Merged
merged 3 commits into from Sep 25, 2017
Merged

Conversation

emilio
Copy link
Member

@emilio emilio commented Sep 25, 2017

See each commit for details.


This change is Reviewable

MozReview-Commit-ID: 8hDAKZANOro
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
We share value representation, so there's no reason to do this in a more complex
way.

MozReview-Commit-ID: BITfCPqTkal
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This matches Gecko, and fixes the last reported case in bug 1397619.

MozReview-Commit-ID: 4Z7GeaokKE1
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
@highfive
Copy link

Heads up! This PR modifies the following files:

  • @bholley: components/style/properties/gecko.mako.rs, components/style/properties/longhand/inherited_svg.mako.rs
  • @canaltinova: components/style/properties/gecko.mako.rs, components/style/properties/longhand/inherited_svg.mako.rs

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Sep 25, 2017
@highfive
Copy link

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 Sep 25, 2017

r? @nox

@highfive highfive assigned nox and unassigned KiChjang Sep 25, 2017
(self.0 >> pos * SHIFT) & MASK
fn order_at(&self, pos: u8) -> PaintOrder {
// Safe because PaintOrder covers all possible patterns.
unsafe { ::std::mem::transmute((self.0 >> pos * SHIFT) & MASK) }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just store a PaintOrder in SpecifiedValue?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(There are three packed values, so it's not clear to me how could I do that)

@nox
Copy link
Contributor

nox commented Sep 25, 2017

Nice.

@bors-servo r+

@bors-servo
Copy link
Contributor

📌 Commit 638ba2c has been approved by nox

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Sep 25, 2017
@bors-servo
Copy link
Contributor

⌛ Testing commit 638ba2c with merge bbb5c84...

bors-servo pushed a commit that referenced this pull request Sep 25, 2017
style: paint-order serialization fixes.

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

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev
Approved by: nox
Pushing bbb5c84 to master...

@bors-servo bors-servo merged commit 638ba2c into servo:master Sep 25, 2017
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Sep 25, 2017
@emilio emilio deleted the paint-order branch September 25, 2017 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants