Commit Graph

89 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
6609a2b21d servo: Merge #14540 - style: Basic @import support (from servo:at-import); r=SimonSapin,Ms2ger
r? @SimonSapin or @mbrubeck

cc @heycam and @bholley

Source-Repo: https://github.com/servo/servo
Source-Revision: 38f136175e15acb6472466d141dedb6a253b0330
2016-12-16 09:43:19 -08:00
Cameron McCormack
15cb579f8e servo: Merge #14599 - stylo: Don't keep around cached style after one-off style resolutions (from heycam:one-shot-clear-cache); r=bholley
<!-- Please describe your changes on the following line: -->

r? @bholley

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 6c952e12df34e5fe313bed624ac94192cd2e9e67
2016-12-15 13:10:29 -08:00
Bobby Holley
8f8a339677 servo: Merge #14581 - stylo: Avoid traversing children of XBL-bound elements during initial styling (from bholley:dont_traverse_xbl); r=heycam
Corresponding Gecko bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1294572

CC @heycam @emilio

Source-Repo: https://github.com/servo/servo
Source-Revision: 535563be313d2766267872a822642e68b686a4a9
2016-12-14 19:41:12 -08:00
Bobby Holley
0124e8b7ab servo: Merge #14560 - stylo: Fix some crashes on incubator (from bholley:fix_crashes); r=heycam
Corresponding gecko bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1322945

Source-Repo: https://github.com/servo/servo
Source-Revision: 855358866640605fe055d792832db2f5e74fe197
2016-12-12 19:13:03 -08:00
Simon Sapin
b176e4d08e servo: Merge #14535 - Introduce a PropertyId enum and use it instead of strings of property names (from servo:property-id); r=mbrubeck
<!-- Please describe your changes on the following line: -->

* `LonghandId` and `ShorthandId` are C-like enums
* `Atom` is used for the name of custom properties.
* `PropertyDeclarationId` is the identifier for `PropertyDeclaration`,
  after parsing and shorthand expansion. (Longhand or custom property.)
* `PropertyId` represents any CSS property, e.g. in CSSOM.
  (Longhand, shorthand, or custom.)

CC @upsuper

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 6dd4b4822fa788694153ee61a04dd9a5dfb748ec
2016-12-10 01:16:26 -08:00
Bobby Holley
637f6af4d6 servo: Merge #14436 - Make restyle tracking more granular (from bholley:granular_restyle); r=emilio
The primary idea of this patch is to ditch the rigid enum of Previous/Current
styles, and replace it with a series of indicators for the various types of
work that needs to be performed (expanding snapshots, rematching, recascading,
and damage processing). This loses us a little bit of sanity checking (since
the up-to-date-ness of our style is no longer baked into the type system), but
gives us a lot more flexibility that we'll need going forward (especially when
we separate matching from cascading). We also eliminate get_styling_mode in
favor of a method on the traversal.

This patch does a few other things as ridealongs:
* Temporarily eliminates the handling for transfering ownership of styles to the
  frame. We'll need this again at some point, but for now it's causing too much
  complexity for a half-implemented feature.
* Ditches TRestyleDamage, which is no longer necessary post-crate-merge, and is
  a constant source of compilation failures from either needing to be imported
  or being unnecessarily imported (which varies between gecko and servo).
* Expands Snapshots for the traversal root, which was missing before.
* Fixes up the skip_root stuff to avoid visiting the skipped root.
* Unifies parallel traversal and avoids spawning for a single work item.
* Adds an explicit pre_traverse step do any pre-processing and determine whether
      we need to traverse at all.

Source-Repo: https://github.com/servo/servo
Source-Revision: b9a8ccd775c3192e3810a1730b1d0bc2b5c9dfb6
2016-12-09 17:01:05 -08:00
Emilio Cobos Álvarez
89cb8d3586 servo: Merge #14460 - stylo: Use master bindgen again (from emilio:stylo-bindgenup); r=heycam
<!-- Please describe your changes on the following line: -->

To be fair, this is master bindgen with https://github.com/servo/rust-bindgen/pull/318.

Source-Repo: https://github.com/servo/servo
Source-Revision: 6c3e94805f74e78b091b37fe374af12ad2249528
2016-12-05 03:52:16 -08:00
Cameron McCormack
21f64cc257 servo: Merge #14446 - stylo: Add FFI function to check if a node is dirty (from heycam:should-traverse); r=bholley
<!-- Please describe your changes on the following line: -->

This is the Servo-side change from https://bugzilla.mozilla.org/show_bug.cgi?id=1321284, which has already been reviewed by bholley.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

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

Source-Repo: https://github.com/servo/servo
Source-Revision: c974b61d7fe3b63dc6ec81e52b7a4894f537e7a0
2016-12-02 22:58:49 -08:00
Xidorn Quan
351b329516 servo: Merge #14406 - Add insertRule/deleteRule support for stylo (from upsuper:bug1313293); r=heycam
<!-- Please describe your changes on the following line: -->
This is the servo part of [bug 1313293](https://bugzilla.mozilla.org/show_bug.cgi?id=1313293), reviewed by @heycam.

r? @heycam

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 87f5b877d8c1d670e55516c6e6ec2cf303b9692e
2016-11-30 21:54:46 -08:00
Boris Chiou
5877be3c21 servo: Merge #14404 - Use XPCOM string bindings instead of Gecko_Utf8SliceToString (from BorisChiou:Bug1317179); r=Manishearth
These are the servo-side changes for [bug 1317179](https://bugzilla.mozilla.org/show_bug.cgi?id=1317179). @Manishearth has already reviewed them there. I'd like to merge these patches until the gecko-side changes for [bug 1317179](https://bugzilla.mozilla.org/show_bug.cgi?id=1317179) is landed.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [bug 1317179](https://bugzilla.mozilla.org/show_bug.cgi?id=1317179).
- [X] These changes do not require tests because there are existing tests for this in mozilla-central

Source-Repo: https://github.com/servo/servo
Source-Revision: 22c8df150af341064abac25a26768c8c1517df1f
2016-11-30 20:12:28 -08:00
Xidorn Quan
fca01e20b5 servo: Merge #14384 - Move Arc<RwLock<_>> out from CssRules tuple (from upsuper:cssrules-struct); r=Manishearth
<!-- Please describe your changes on the following line: -->
Otherwise it would be hard for Gecko to hold `CssRules`.

r? @manishearth

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 39845faf261672b795af59602b45e7ce096b9f33
2016-11-29 03:26:46 -08:00
Emilio Cobos Álvarez
cca73fbfd1 servo: Merge #14353 - Fix the bloom filter stuff (from emilio:fix-bloom); r=SimonSapin
<!-- Please describe your changes on the following line: -->

I think I got the numbers right, want to do a try run before just in case.

r? @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: 2289ad53dd9a2666645b1f7eef07636e21c1607e
2016-11-28 10:30:19 -08:00
Bobby Holley
62e95664e4 servo: Merge #14300 - stylo: Basic infrastructure for RestyleHint-driven traversal (from bholley:restyle_driven_traversal); r=emilio
Gecko Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=131701

(Don't review yet, will flag on the gecko bug when the time comes)

Source-Repo: https://github.com/servo/servo
Source-Revision: d98abaec20e624aa89a3abddf4cf2a6399951ef1
2016-11-25 09:00:44 -08:00
Boris Chiou
4f250b729e servo: Merge #14357 - Use single_value_to_css in Servo_DeclarationBlock_SerializeOneValue (from BorisChiou:Bug1317178); r=emilio
These are the servo-side changes for [bug 1317178](https://bugzilla.mozilla.org/show_bug.cgi?id=1317178). @Manishearth has already reviewed them there. Please merge these patches until the gecko-side changes for [bug 1317178](https://bugzilla.mozilla.org/show_bug.cgi?id=1317178) is landed.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [bug 1317178](https://bugzilla.mozilla.org/show_bug.cgi?id=1317178).
- [X] These changes do not require tests because there are existing tests for this in mozilla-central

Source-Repo: https://github.com/servo/servo
Source-Revision: 67a4ecd68ec782fd661c0095df1e7f75e79a5d84
2016-11-25 02:39:52 -08:00
Xidorn Quan
b6124e6d1e servo: Merge #14330 - Implement access to CSSStyleRule for stylo (from upsuper:bug1307357); r=heycam
<!-- Please describe your changes on the following line: -->
This is the servo part of [bug 1307357](https://bugzilla.mozilla.org/show_bug.cgi?id=1307357) which has been reviewed by @heycam, @Manishearth and @SimonSapin.

r? @heycam

(`./mach test-tidy` reports several issues on bindings.rs... which I don't think is introduced by my patch... so I have no idea what to do here...)

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

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

Source-Repo: https://github.com/servo/servo
Source-Revision: c8e39dcdf6fbdc36bed42d3f0d46ad78133d83cf
2016-11-23 15:47:18 -08:00
Simon Sapin
ce87984b66 servo: Merge #14320 - Update to selectors 0.15 (from servo:selectorsup); r=nox
<!-- Please describe your changes on the following line: -->

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because _____

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

Source-Repo: https://github.com/servo/servo
Source-Revision: f37fc5ea5ef3335ebc0a754dce93872dd5fd85a1
2016-11-22 10:44:03 -06:00
Simon Sapin
174dbcace7 servo: Merge #14232 - CSSOM: Make Stylesheet fields have their own synchronization (from servo:moar-locks); r=upsuper
<!-- Please describe your changes on the following line: -->

r? @upsuper

---
<!-- 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 bug 1314208.

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 30867001d17222cc5d0b18086dca9f5d9bcb3934
2016-11-21 19:33:57 -06:00
Cameron McCormack
2b1a7dd8de servo: Merge #14273 - ensure RuleNodes are dropped when Gecko drops the Stylist (from heycam:rule-tree-stylo); r=bholley,emilio
<!-- Please describe your changes on the following line: -->

These are the Servo-side patches from https://bugzilla.mozilla.org/show_bug.cgi?id=1318238, which already have been reviewed by @bholley and @emilio there.

Source-Repo: https://github.com/servo/servo
Source-Revision: 385e59e0f124d02b36a66e4d4a4a073a6612a20b
2016-11-21 08:16:36 -06:00
Simon Sapin
c839f3f401 servo: Merge #14294 - Rename a few source files (from servo:renames); r=Wafflespeanut
<!-- Please describe your changes on the following line: -->

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because _____

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 68b1d1d2860ac6c6e8c1c0dfe46af6790ca01dc8

--HG--
rename : servo/components/style/gecko/selector_impl.rs => servo/components/style/gecko/selector_parser.rs
rename : servo/components/style/selector_impl.rs => servo/components/style/selector_parser.rs
rename : servo/components/style/servo/selector_impl.rs => servo/components/style/servo/selector_parser.rs
rename : servo/components/style/selector_matching.rs => servo/components/style/stylist.rs
rename : servo/tests/unit/style/selector_matching.rs => servo/tests/unit/style/stylist.rs
2016-11-20 09:21:52 -06:00
Emilio Cobos Álvarez
9747761479 servo: Merge #14246 - Urlmageddon (from emilio:servo-url); r=SimonSapin
<!-- Please describe your changes on the following line: -->

Still needs a bunch of code in net to be converted in order to get more
advantage of this for images and stuff, but meanwhile this should help quite a
bit with #13778.

Still wanted to get this in.

r? @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: 22aebdf5d41a3509cd6515ccf5edcdf33715a76d
2016-11-17 15:34:47 -06:00
Manish Goregaokar
d8a79aa1af servo: Merge #14190 - Immutable CSSOM (from Manishearth:cssom); r=SimonSapin
This PR is intended to add basic support for all CSSOM interfaces, with the ability to index `document.styleSheets` and css rule lists, and serializing individual css rules. Handling individual interface methods for CSSRule subclasses can probably be done with easy/medium bugs.

Mutation safety isn't dealt with here; if the css rule list is mutated the CSSOM will be in an inconsistent state. I intend to deal with this via zero sized tokens, see https://groups.google.com/forum/#!topic/mozilla.dev.servo/AnxJoVmtMXQ .  I'll handle that when I start making the CSSOM mutable. (Getting the immutable bit landed first opens this up for easy bugs)

This doesn't really change style aside from adding an extra arc in the CSS rule list as discussed in the linked thread. So far this same design can be used by stylo as well when the time comes.

f? @SimonSapin @emilio

cc @upsuper

part of #11420
Todo:

 - [x] Stubs for rest of the CSSRule subclasses
 - [x] <s>ToCSS impls for CSSRules.</s> May make into easy bugs and stub out in this PR https://github.com/servo/servo/issues/14195
 - [x] Cache CSSStyleSheet on the relevant node

Source-Repo: https://github.com/servo/servo
Source-Revision: afc60bee2809059b8b754a1c6d6d10c1d36326fb
2016-11-16 15:05:59 -06:00
Emilio Cobos Álvarez
f6b347dc05 servo: Merge #14174 - style: Refactor and add infrastructure for font metrics in style (from emilio:font-provider); r=Manishearth
<!-- Please describe your changes on the following line: -->

---
<!-- 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

<!-- Either: -->
- [x] These changes do not require tests because moves stuff around without adding functionality.

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

This commit itself only moves things around and adds an extra parameter to the
`apply_declarations` function to eventually handle #14079 correctly.

Probably needs a more granular API to query fonts, á la nsFontMetrics, but
that's trivial to do once this is landed.

Then we should make the font provider mandatory, and implement the missing stylo
bits.

Source-Repo: https://github.com/servo/servo
Source-Revision: 57c4db7c670f34fffbee0c179077e8afdadf09f8
2016-11-13 04:55:02 -06:00
Matt Brubeck
b7a0b94d2d servo: Merge #14142 - Bug 1292275 - Stylo: Fix crash after failed stylesheet load (from mbrubeck:bug-1292275); r=heycam
This is the Servo part of [bug 1292275](https://bugzilla.mozilla.org/show_bug.cgi?id=1292275), already reviewed there by @heycam.

Source-Repo: https://github.com/servo/servo
Source-Revision: 86a56822470af14c184a2d3cc8f58d3633c9d28a
2016-11-10 12:56:48 -06:00
Ravi Shankar
fec4250721 servo: Merge #14089 - Make use of Servo-specific ToCss everywhere! (from Wafflespeanut:tocss); r=SimonSapin
<!-- Please describe your changes on the following line: -->

This will allow types to be generic over our local `ToCss`

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [x] These changes do not require tests because it's a refactor

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

Source-Repo: https://github.com/servo/servo
Source-Revision: f48b3fe2197a59b29bc711fb1b5496cbb97bd330
2016-11-06 23:26:08 -06:00
Simon Sapin
9c206a6cf3 servo: Merge #13202 - Rule tree, v1 (from emilio:rule-tree); r=SimonSapin,Manishearth,emilio
<!-- Please describe your changes on the following line: -->
---

<!-- 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

<!-- Either: -->
- [x] There are tests for these changes OR

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

This patch introduces infrastructure for the rule tree, and constructs it.

We don't use it yet, nor have good heuristics for GC'ing it, but this should not
happen anymore once we store the rule node reference in the node.

I haven't messed up with memory orders because I want to do a try run with it,
then mess with them.

Source-Repo: https://github.com/servo/servo
Source-Revision: ac0475971bb24a63ca5d36d1d17e3036ddb99049
2016-11-05 17:11:24 -05:00
Xidorn Quan
ecea052b04 servo: Merge #14038 - Add Element.style support for stylo (from upsuper:bug1294299); r=heycam
<!-- Please describe your changes on the following line: -->
This is the Servo side change of [bug 1294299](https://bugzilla.mozilla.org/show_bug.cgi?id=1294299) which has been reviewed by @heycam, @emilio, and @SimonSapin.

This should not be merged until the Gecko side change gets merged into mozilla-central.

r? @heycam

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 23905037728e6eb434808f2fa6e2af5db9191688
2016-11-03 23:42:06 -05:00
Bobby Holley
91213da5fc servo: Merge #13956 - incremental restyle: Hoist most styling functionality from TNode to TElement (from bholley:more_telement); r=emilio
This is a continuation of the work in #13951. I'm separating it out into a separate PR since the aforementioned patch has a green try run and this one doesn't yet.

Source-Repo: https://github.com/servo/servo
Source-Revision: b611e5c3b219e8f6aa9a7937aa7f5ea552762cd4
2016-10-29 17:14:10 -05:00
Patrick Walton
dff6bf022d servo: Merge #13870 - layout: Rewrite anonymous table code, simplify and fix table intrinsic width calculation, and improve safety of flexbox code (from pcwalton:anonymous-table-rewrite); r=mbrubeck
Closes #13782.

Source-Repo: https://github.com/servo/servo
Source-Revision: 6b40f97289c4c5a20b539992c3d511b3bf470f28
2016-10-26 20:14:04 -05:00
Bobby Holley
aab7b04925 servo: Merge #13913 - incremental restyle: Introduce StylingMode and deprecate explicit dirtiness (from bholley:styling_mode); r=emilio
This is another chunk of work to move us toward the new incremental restyle architecture.

Eventually, we'll make a fine-grained decision at each node about what style to recompute based on the RestyleHint on the node data (along with other things). For now, we use the existence of RestyleData as a coarse-grained approximation of this.

Source-Repo: https://github.com/servo/servo
Source-Revision: c8b6ece97b6eec8ac4e16a7a79a605356279cfb6
2016-10-26 06:36:06 -05:00
Xidorn Quan
51b0292865 servo: Merge #13911 - Use nsACString to pass string params for bindings (from upsuper:bug1312338); r=Manishearth
Use nsACString to pass string params for bindings

This is the Servo side change of [bug 1312338](https://bugzilla.mozilla.org/show_bug.cgi?id=1312338) which has been reviewed by @Manishearth.

r? @Manishearth

(This should not be merged before the Gecko side code lands in m-c)

Source-Repo: https://github.com/servo/servo
Source-Revision: a9715c1f02ee63d9e96aed620e5289e8ae9cee7b
2016-10-25 04:09:19 -05:00
Bobby Holley
35dc905f5c servo: Merge #13863 - stylo: Rearrange some data structures in preparation for the new incremental restyle algorithm (from bholley:shuffle_data_structures); r=emilio
Source-Repo: https://github.com/servo/servo
Source-Revision: 9cbac40f618a5d87bd883e81a70e233e0ea3a87f
2016-10-21 15:50:48 -05:00
Xidorn Quan
47fef3aac4 servo: Merge #13809 - Servo side change for bug 1309868 and bug 1309109 (from upsuper:bug1309868-bug1309109); r=heycam
This is the Servo side change for [bug 1309868](https://bugzilla.mozilla.org/show_bug.cgi?id=1309868) and [bug 1309109](https://bugzilla.mozilla.org/show_bug.cgi?id=1309109)

The changes has been reviewed on Bugzilla.

Source-Repo: https://github.com/servo/servo
Source-Revision: d1e218d2f3d5c2cacccc025de838ca1768e6676a
2016-10-18 00:51:14 -05:00
Manish Goregaokar
90b3c4bcd6 servo: Merge #13754 - Add sugar for RefPtr<T>; use for quotes property (from Manishearth:refptr); r=emilio,mystor
Carry-over from https://bugzilla.mozilla.org/show_bug.cgi?id=1309848

r=mystor,emilio

Source-Repo: https://github.com/servo/servo
Source-Revision: 41df7056610e474a9a2efe4c807f480e976d0c1d
2016-10-13 22:31:20 -05:00
Bobby Holley
c37f6a192d servo: Merge #13688 - stylo: Use AtomicRefCell for PerDocumentStyleData (from bholley:styleset_refcell); r=Manishearth
Gecko bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1309090

Source-Repo: https://github.com/servo/servo
Source-Revision: 3916d1d61305bd27338cac4a9e9f9c110182582b
2016-10-11 12:03:29 -05:00
Bobby Holley
bdf0d364f9 servo: Merge #13656 - Refactor style logic to avoid direct access to the node data during the cascade (from bholley:existing_style); r=emilio
The new restyle architecture doesn't store these things in consistent places, so we need a more abstract API.

Source-Repo: https://github.com/servo/servo
Source-Revision: abcc4aeaf212fc5fc5f9e15e46feba11e3e9284f
2016-10-10 23:22:05 -05:00
Brian Birtles
13fe5b429d servo: Merge #13553 - Support creating StyleAnimationValue objects from Servo (from birtles:animvalues); r=Manishearth
These are the servo-side changes for [bug 1302949](https://bugzilla.mozilla.org/show_bug.cgi?id=1302949#c59). @Manishearth has already reviewed them there.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [bug 1302949](https://bugzilla.mozilla.org/show_bug.cgi?id=1302949#c59)
- [X] These changes do not require tests because there are existing tests for this in mozilla-central

Source-Repo: https://github.com/servo/servo
Source-Revision: 804317c8858a096eb99e1ff0baf860dbdfcbb04d
2016-10-09 08:53:28 -05:00
Manish Goregaokar
8e15060578 servo: Merge #13620 - Test that Servo_* functions have the right signatures (from Manishearth:type-assert); r=emilio
Fixes #12992

Needs #13617

Not very happy with this solution (and perhaps it should be done in pure Rust, though that can be split out as another easy bug).

But it works. The bindings changes are from running a regen on [bug 1308234](https://bugzilla.mozilla.org/show_bug.cgi?id=1308234)

r? @emilio

Source-Repo: https://github.com/servo/servo
Source-Revision: a0e404c79e100917d5c7512f500b488fe87c12dc
2016-10-09 03:56:34 -05:00
Manish Goregaokar
4ac5186489 servo: Merge #13569 - Start simplifying FFI ownership sugar (from Manishearth:simpliffi); r=emilio
This is step one of a series of changes planned to make the ownership sugar easier to use. This was blocked on #13038

*very* unsure about second commit. Don't like the thought of accepting types with destructors over FFI. Probably will revert it. Leaving it in for now in case you have some insight.

Eventually at least for the borrowed stuff I want to use T directly (because the crates are merged now), instead of the fake void types. Perhaps for the others too. I might include those changes in this PR -- was originally planning to but I realized that these steps could be split out.

Tentative plan for `Owned` (assuming it's not removed) is to have `Owned<T> <-> Box<T>` (same `T`, no "FFI type") conversions. We will only use ownership wrapper types for things with destructors, and try to keep the conversion simple. I'm envisioning a couple methods for arc/strong and a few more for box/owned. We may need to introduce new wrapper types for gecko-side managed objects (`RefPtr<T>`, `UniquePtr<T>`) but that should be all the wrapper types we have in the ownership sugar.

This PR relies on the guarantee that `Option<&T>` and `Option<Box<T>>` are pointer-sized via the `NonZero` optimization. I am now less unconvinced that this is a good idea 😉.

r? @emilio

cc @mystor

Source-Repo: https://github.com/servo/servo
Source-Revision: cbc857bb78fdc5e9221ecdec25c82be7172bab36
2016-10-05 00:59:56 -05:00
Simon Sapin
da3297354f servo: Merge #13459 - Use parking_lot::RwLock for PropertyDeclarationBlock (from servo:no-arc-heapsize); r=emilio
<!-- Please describe your changes on the following line: -->

As discussed in https://bugzilla.mozilla.org/show_bug.cgi?id=1305141

Closes #13176

---

Original PR title: Stop relying on `impl<T: HeapSizeOf> HeapSizeOf for Arc<T>`
https://github.com/servo/heapsize/issues/37#issuecomment-249861171

This builds on top of that.

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because refactor

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

Source-Repo: https://github.com/servo/servo
Source-Revision: aea9545e16fd6ea4a6b1234d1b969457313a5fa7

--HG--
rename : servo/components/style/domrefcell.rs => servo/components/script/dom/bindings/cell.rs
2016-10-04 11:58:56 -05:00
Emilio Cobos Álvarez
d234b05859 servo: Merge #13440 - stylo: Remove a bunch of unneeded ool-calls (from emilio:no-ool); r=bholley
---
<!-- 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

<!-- Either: -->
- [x] These changes do not require tests because stylo

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

Source-Repo: https://github.com/servo/servo
Source-Revision: c4021a6765661335080b05f713d3571a8286ef3a
2016-10-02 10:59:25 -05:00
Ravi Shankar
7fd7e68d3e servo: Merge #13456 - Silence some warnings in geckolib (from Wafflespeanut:warnings); r=emilio
<!-- Please describe your changes on the following line: -->

---
<!-- 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

<!-- Either: -->
- [x] These changes do not require tests because it's a cleanup

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

We'll be silencing thousands of warnings this way, which would probably help with Travis.

Source-Repo: https://github.com/servo/servo
Source-Revision: 37c8892b87f0656271a760479105e4b6d8a712a3
2016-09-29 22:46:38 -05:00
Manish Goregaokar
30bfdcfd16 servo: Merge #13372 - Merge most of geckolib into style (from Manishearth:merge-stylo); r=emilio
Fixes #13038

r? @emilio

Source-Repo: https://github.com/servo/servo
Source-Revision: f763eca344fa6a49f2467d9baa25044bebc41ff2

--HG--
rename : servo/ports/geckolib/binding_tools/.gitignore => servo/components/style/binding_tools/.gitignore
rename : servo/ports/geckolib/binding_tools/README.md => servo/components/style/binding_tools/README.md
rename : servo/ports/geckolib/binding_tools/regen.py => servo/components/style/binding_tools/regen.py
rename : servo/ports/geckolib/binding_tools/regen.sh => servo/components/style/binding_tools/regen.sh
rename : servo/ports/geckolib/binding_tools/regen_atoms.py => servo/components/style/binding_tools/regen_atoms.py
rename : servo/ports/geckolib/binding_tools/setup_bindgen.sh => servo/components/style/binding_tools/setup_bindgen.sh
rename : servo/ports/geckolib/context.rs => servo/components/style/gecko/context.rs
rename : servo/components/style/gecko_conversions.rs => servo/components/style/gecko/conversions.rs
rename : servo/ports/geckolib/data.rs => servo/components/style/gecko/data.rs
rename : servo/components/style/generated/gecko_pseudo_element_helper.rs => servo/components/style/gecko/generated/gecko_pseudo_element_helper.rs
rename : servo/components/style/gecko_selector_impl.rs => servo/components/style/gecko/selector_impl.rs
rename : servo/ports/geckolib/snapshot.rs => servo/components/style/gecko/snapshot.rs
rename : servo/ports/geckolib/snapshot_helpers.rs => servo/components/style/gecko/snapshot_helpers.rs
rename : servo/ports/geckolib/traversal.rs => servo/components/style/gecko/traversal.rs
rename : servo/components/style/gecko_values.rs => servo/components/style/gecko/values.rs
rename : servo/ports/geckolib/wrapper.rs => servo/components/style/gecko/wrapper.rs
rename : servo/ports/geckolib/gecko_bindings/bindings.rs => servo/components/style/gecko_bindings/bindings.rs
rename : servo/ports/geckolib/gecko_bindings/lib.rs => servo/components/style/gecko_bindings/mod.rs
rename : servo/ports/geckolib/gecko_bindings/ptr.rs => servo/components/style/gecko_bindings/ptr.rs
rename : servo/ports/geckolib/gecko_bindings/structs_debug.rs => servo/components/style/gecko_bindings/structs_debug.rs
rename : servo/ports/geckolib/gecko_bindings/structs_release.rs => servo/components/style/gecko_bindings/structs_release.rs
rename : servo/ports/geckolib/gecko_bindings/sugar/mod.rs => servo/components/style/gecko_bindings/sugar/mod.rs
rename : servo/ports/geckolib/gecko_bindings/sugar/ns_css_shadow_array.rs => servo/components/style/gecko_bindings/sugar/ns_css_shadow_array.rs
rename : servo/ports/geckolib/gecko_bindings/sugar/ns_style_auto_array.rs => servo/components/style/gecko_bindings/sugar/ns_style_auto_array.rs
rename : servo/ports/geckolib/gecko_bindings/sugar/ns_style_coord.rs => servo/components/style/gecko_bindings/sugar/ns_style_coord.rs
rename : servo/ports/geckolib/gecko_bindings/sugar/ns_t_array.rs => servo/components/style/gecko_bindings/sugar/ns_t_array.rs
rename : servo/ports/geckolib/gecko_bindings/sugar/ownership.rs => servo/components/style/gecko_bindings/sugar/ownership.rs
rename : servo/ports/geckolib/string_cache/lib.rs => servo/components/style/gecko_string_cache/mod.rs
rename : servo/ports/geckolib/string_cache/namespace.rs => servo/components/style/gecko_string_cache/namespace.rs
2016-09-26 02:36:05 -05:00
Bobby Holley
afe25394d8 servo: Merge #13404 - stylo: Manage servo node data directly from Servo (from bholley:manage_node_data); r=Manishearth
Servo-side changes for: https://bugzilla.mozilla.org/show_bug.cgi?id=1304913

Source-Repo: https://github.com/servo/servo
Source-Revision: 0dd005eacc975ed1e7781ce8bdb5175f81a75418
2016-09-24 05:17:29 -05:00
Cameron McCormack
9420ede0c1 servo: Merge #13367 - Remove unused Servo_RestyleDocument function (from heycam:rm-restyle-document); r=Manishearth
This is no longer used from Gecko.

r? @Manishearth

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it's just geckolib unused code removal

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

Source-Repo: https://github.com/servo/servo
Source-Revision: ca30ad776b1de5dd53d0f729628c28b41a97484d
2016-09-22 16:38:20 -05:00
Bobby Holley
ddeb986794 servo: Merge #13172 - stylo: avoid traversing non element/text nodes in style and layout (from bholley:display_enum); r=emilio
r? @emilio

Source-Repo: https://github.com/servo/servo
Source-Revision: 614e9ca840baacfa427ec78db99258a83b75e135
2016-09-21 19:59:52 -05:00
Manish Goregaokar
c9241b77b0 servo: Merge #13200 - Resync bindings (from Manishearth:resync); r=bholley
StyleClear and StyleDisplay are now enums, updating bindings for them.

r? @bholley

Source-Repo: https://github.com/servo/servo
Source-Revision: 957893bdc2132cf39a505b6ca681ca56c427c049
2016-09-09 02:00:13 -05:00
UK992
f8cb9971b7 servo: Merge #13205 - Tidy: Fix ordering use statements with braces (from UK992:tidy-sort); r=Wafflespeanut
This hack fixes https://github.com/servo/servo/issues/7412 and matches behavior with rustfmt.

Source-Repo: https://github.com/servo/servo
Source-Revision: 3117787fd2a8b7748cfde1e9b8c5be3c00f2c599
2016-09-08 22:19:19 -05:00
Manish Goregaokar
be8e7e8548 servo: Merge #12991 - Add sugar for handling borrowed and owned types (from Manishearth:more-arc-safety); r=mystor,emilio
Implements the changes outlined in https://github.com/servo/servo/pull/12826#discussion_r75074985

<s>Also gets things ready for the Unique/Borrowed bindings</s>

WIP for borrowed and unique in the same PR. Still need to convert all the rest of the gecko types to use the new wrappers.

r? @emilio

Source-Repo: https://github.com/servo/servo
Source-Revision: 927cd8ebf762d1c2db5a5de710a2ebcbfd6bab22
2016-09-02 22:42:21 -05:00
Simon Sapin
ec40d2a379 servo: Merge #13134 - Add lots of Arc’s in style, and prepare for using DOMRefCell (from servo:archery); r=emilio
<!-- Please describe your changes on the following line: -->

`DOMRefCell` usage is not there year because of thread-safety questions, but I have this much already that I’d like to land before it bitrots.

r? @emilio

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require new tests because refactor

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

Source-Repo: https://github.com/servo/servo
Source-Revision: bbfe38e35f3f6a51009c0411647c89c8b5616357

--HG--
rename : servo/components/script/dom/bindings/cell.rs => servo/components/style/domrefcell.rs
2016-08-31 16:30:56 -05:00
Emilio Cobos Álvarez
836eded2f7 servo: Merge #13041 - style: Make WorkQueue creation fallible (from emilio:fallible-threadpool); r=bholley
<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [x] These changes do not require tests.

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

Fixes bug 1290205 in bugzilla.

Source-Repo: https://github.com/servo/servo
Source-Revision: 911bc94848f7cd3f3446546abdd085da5c468a4a
2016-08-26 01:46:16 -05:00