Stop using global initial styles for stylo; the initial styles need to be per-document #14848

Merged
merged 14 commits into from Jan 5, 2017

Projects

None yet

6 participants

@bzbarsky
Contributor
bzbarsky commented Jan 4, 2017 edited
  • There are tests for these changes OR
  • These changes do not require tests on the servo side because behavior is unchanged. Gecko-side tests probably exist.

This change is Reviewable

@metajack metajack was assigned by highfive Jan 4, 2017
@highfive
highfive commented Jan 4, 2017

Heads up! This PR modifies the following files:

  • @bholley: components/style/gecko_bindings/bindings.rs, components/style/gecko/data.rs, components/style/gecko_bindings/structs_debug.rs, components/style/build_gecko.rs, components/style/gecko_bindings/structs_release.rs, components/style/media_queries.rs, components/style/properties/gecko.mako.rs, components/style/values/computed/mod.rs, components/style/properties/properties.mako.rs, components/style/properties/helpers.mako.rs, components/style/viewport.rs, components/style/stylist.rs, components/style/animation.rs, components/style/context.rs, components/style/matching.rs
  • @kichjang: components/script_layout_interface/wrapper_traits.rs
  • @fitzgen: components/script_layout_interface/wrapper_traits.rs
  • @emilio: components/style/gecko_bindings/bindings.rs, components/style/gecko/data.rs, components/style/gecko_bindings/structs_debug.rs, ports/geckolib/glue.rs, components/style/build_gecko.rs, components/style/gecko_bindings/structs_release.rs, components/style/media_queries.rs, components/style/properties/gecko.mako.rs, components/style/values/computed/mod.rs, components/style/properties/properties.mako.rs, components/layout/construct.rs, components/style/properties/helpers.mako.rs, components/style/viewport.rs, components/style/stylist.rs, components/style/animation.rs, components/style/context.rs, components/style/matching.rs
@highfive
highfive commented Jan 4, 2017

warning Warning warning

  • These commits modify style and layout code, but no tests are modified. Please consider adding a test!
@bholley
Contributor
bholley commented Jan 4, 2017

@bors-servo delegate+

@bors-servo
Contributor

✌️ @bzbarsky can now approve this pull request

@Manishearth
Member

@bors-servo r=bholley

@bors-servo
Contributor

📌 Commit 3e899da has been approved by bholley

@highfive highfive assigned bholley and unassigned metajack Jan 5, 2017
@bors-servo
Contributor

⌛️ Testing commit 3e899da with merge bb5110e...

@bors-servo bors-servo added a commit that referenced this pull request Jan 5, 2017
@bors-servo bors-servo Auto merge of #14848 - bzbarsky:initial-styles, r=bholley
Stop using global initial styles for stylo; the initial styles need to be per-document

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix https://bugzilla.mozilla.org/show_bug.cgi?id=1298588

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests on the servo side because behavior is unchanged.  Gecko-side tests probably exist.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/14848)
<!-- Reviewable:end -->
bb5110e
@bors-servo
Contributor

💔 Test failed - linux-dev

@bzbarsky
Contributor
bzbarsky commented Jan 5, 2017

I'm seeing the following test failures, repeated a few times:

  1. test_3 build failure due to using Context::initial, which no longer exists. Fixed.
  2. build-geckolib failure. This is a merge issue: we started requiring comments on things, but my comment (which I did have!) started with only two '/', which is apparently not good enough. Fixed.
bzbarsky added some commits Jan 4, 2017
@bzbarsky bzbarsky Bug 1298588 part 3, servo piece. Add a default ComputedValues member …
…to PerDocumentStyleData. r=bholley
34bb2f1
@bzbarsky bzbarsky Bug 1298588 part 4, servo piece. Recreate the default computed values…
… for a document as needed. r=bholley
a5ac55c
@bzbarsky bzbarsky Bug 1298588 part 5. Store a ComputedValues on SharedStyleContext. r=b…
…holley
56941d6
@bzbarsky bzbarsky Bug 1298588 part 6, servo piece. Stop using initial_values when doing…
… inheritance in Gecko glue code. r=bholley
c313c8d
@bzbarsky bzbarsky Bug 1298588 part 7, servo piece. Stop using initial_values in general…
… in Gecko glue code. r=bholley
d3e34db
@bzbarsky bzbarsky Bug 1298588 part 8. Pass a SharedStyleContext, not a Stylist, to Lega…
…lizer methods. r=bholley
09c7419
@bzbarsky bzbarsky Bug 1298588 part 9, servo piece. Pass through useful default styles t…
…o cascade(). r=bholley
61f6025
@bzbarsky bzbarsky Bug 1298588 part 10, servo piece. Pass through useful default styles …
…to apply_declarations(). r=bholley
c826b18
@bzbarsky bzbarsky Bug 1298588 part 11. Pass through useful default styles to CascadePro…
…pertyFn. r=bholley
8367c96
@bzbarsky bzbarsky Bug 1298588 part 12. Compile some bits that call ComputedValues::init…
…ial_values only for servo, not stylo. r=bholley

Stylist::set_device seems to only be used in servo code, and is the only consumer of ViewportConstraints::maybe_new.
6296137
@bzbarsky bzbarsky Bug 1298588 part 13. Make sure Device has a ComputedValues for stylo.…
… r=bholley
369fddd
@bzbarsky bzbarsky Bug 1298588 part 14. Remove ComputedValues::initial_values for stylo.…
… r=bholley
8e2acee
@bzbarsky bzbarsky Bug 1298588 part 15, servo piece. Rip out the initial() methods on st…
…yle structs in stylo. r=bholley
dd80b5c
@bzbarsky
Contributor
bzbarsky commented Jan 5, 2017

@bors-servo r=bholley

@bors-servo
Contributor

📌 Commit dd80b5c has been approved by bholley

@bors-servo
Contributor

⌛️ Testing commit dd80b5c with merge 143dfc8...

@bors-servo bors-servo added a commit that referenced this pull request Jan 5, 2017
@bors-servo bors-servo Auto merge of #14848 - bzbarsky:initial-styles, r=bholley
Stop using global initial styles for stylo; the initial styles need to be per-document

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix https://bugzilla.mozilla.org/show_bug.cgi?id=1298588

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests on the servo side because behavior is unchanged.  Gecko-side tests probably exist.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/14848)
<!-- Reviewable:end -->
143dfc8
@bors-servo bors-servo merged commit dd80b5c into servo:master Jan 5, 2017

2 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment