Commit Graph

126 Commits

Author SHA1 Message Date
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
Xidorn Quan
e9f8809c62 servo: Merge #12986 - Use new name convention for Servo binding functions (from upsuper:stylo-renaming); r=bholley
<!-- Please describe your changes on the following line: -->
This is the Servo part of [bug 1296173](https://bugzilla.mozilla.org/show_bug.cgi?id=1296173).

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
- [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 renaming

<!-- 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: 49d483590e2e1b070271927132413e2078afe27f
2016-08-24 08:16:05 -05:00
Xidorn Quan
c4f54e9276 servo: Merge #12933 - Make GeckoDeclarationBlock refcounted (from upsuper:cssom-for-stylo); r=upsuper
<!-- Please describe your changes on the following line: -->
This makes GeckoDeclarationBlock refcounted, so that it can share most of the logic Gecko currently uses for its existing `css::Declaration`. Although this is almost only useful for Gecko side, doing this in Servo side eliminates additional object allocation for holding it in the Gecko side.

Its Gecko side code change is in [bug 1296186](https://bugzilla.mozilla.org/show_bug.cgi?id=1296186). We may not want to land this before that part also gets reviewed.

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
- [x] These changes do not require tests because for Gecko binding only

<!-- 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: 27f59cc250156892583782597f16a347c3807523
2016-08-22 21:12:23 -05:00
Manish Goregaokar
7ec499f8ed servo: Merge #12826 - Add safer bindings for dealing with owned Arcs over FFI (from Manishearth:addref); r=emilio,bholley
Not yet ready to land, since I need to implement the logic for borrowed refs too. Ready for review for the first part.

The corresponding gecko changes are at https://github.com/servo/gecko-dev/compare/crashfix...Manishearth:addref-borrow

(I'll upload them to the bug once the borrow stuff is done)
r? @bholley

Source-Repo: https://github.com/servo/servo
Source-Revision: fc7053e030999ed118c9cf2cac0835286d6dde06
2016-08-17 07:35:43 -05:00
Emilio Cobos Álvarez
15293a7b1a servo: Merge #12815 - stylo: Use atoms as the pseudo-element back-end (from emilio:stylo-atoms); r=bholley
<!-- Please describe your changes on the following line: -->

A bit of work left, and we can uber-optimize this (left comments, will fill follow-ups), but this is a decent refactor so I thought I'd rather get some feedback on it.

r? @bholley (not formally yet, maybe, but some feedback is appreciated).

---
<!-- 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 geckolib only...

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

--HG--
rename : servo/ports/geckolib/gecko_bindings/tools/.gitignore => servo/ports/geckolib/binding_tools/.gitignore
rename : servo/ports/geckolib/gecko_bindings/tools/README.md => servo/ports/geckolib/binding_tools/README.md
rename : servo/ports/geckolib/gecko_bindings/tools/regen.py => servo/ports/geckolib/binding_tools/regen.py
rename : servo/ports/geckolib/gecko_bindings/tools/regen.sh => servo/ports/geckolib/binding_tools/regen.sh
rename : servo/ports/geckolib/gecko_bindings/tools/setup_bindgen.sh => servo/ports/geckolib/binding_tools/setup_bindgen.sh
2016-08-16 12:50:29 -05:00
Simon Sapin
e12aef3aeb servo: Merge #12571 - Update to selectors 0.8.2 (generic over atoms) (from servo:selectors-generic-atom_); r=bholley
This removes the `[replace]` override in geckolib and therefore unblocks https://github.com/servo/servo/pull/12391.

This includes the `gecko_string_cache` redesign discussed in https://github.com/servo/servo/pull/12548.

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
- [x] These changes fix #12548 (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: 5e83b3f83bfcf48d0096442bdf5c9bf753623970
2016-08-09 12:02:55 -05:00
Bobby Holley
0eaf43e608 servo: Merge #12725 - stylo: fix leaks, and accept null in Servo_InheritComputedValues (from bholley:fix_leaks); r=emilio
This corresponds to changes in:

https://bugzilla.mozilla.org/show_bug.cgi?id=1291885
and
https://bugzilla.mozilla.org/show_bug.cgi?id=1291891

Source-Repo: https://github.com/servo/servo
Source-Revision: 939e0a5f89d675de4a347e413ab4eda3ac163862
2016-08-03 20:20:21 -05:00
Cameron McCormack
517b17ce6d servo: Merge #12691 - Parse style sheets with a real base URL in geckolib (from heycam:style-sheet-base); r=bholley
<!-- Please describe your changes on the following line: -->

Corresponding Gecko change is [bug 1291207](https://bugzilla.mozilla.org/show_bug.cgi?id=1291207).

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
- [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: 7807895d5839ddd8e042b7e741961a75b70c37d8
2016-08-02 12:56:11 -05:00
Bobby Holley
c710d7db26 servo: Merge #12643 - Flush stylist before manually querying style via Geckolib (from bholley:flush_stylist); r=emilio
Source-Repo: https://github.com/servo/servo
Source-Revision: 93eb35d358cc0e6c215a5d93e588a7921a5edb04
2016-07-28 21:56:20 -05:00
Emilio Cobos Álvarez
e6192bfc52 servo: Merge #12563 - stylo: Improve restyling performance (from emilio:stylo); r=bholley,jdm,pcwalton
This commit adds hooks to the Servo style traversal to avoid traversing all the
DOM for every restyle. Additionally it changes the behavior of the dirty flag to
be propagated top down, to prevent extra overhead when an element is dirtied.

This commit doesn't aim to change the behavior on Servo just yet, since Servo does extra job when dirtying the node related with DOM revision counters that might be necessary.

CC @asajeffrey for the DOM revision counters stuff. When a node is dirty, do all its descendants really need to increment the revision counter, or is this an unintended effect? My intuition is that this is hurting performance quite a lot for servo.

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: -->
- [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 no geckolib tests yet.

<!-- 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: 944d371b8f0e72f6aa5465be38c0c8daeab66127
2016-07-27 17:56:26 -05:00
Emilio Cobos Álvarez
634c096b10 servo: Merge #12469 - style: Rewrite the restyle hints code to allow different kinds of element snapshots (from emilio:stylo); 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: -->
- [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 refactoring.

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

This is a rewrite for how style interfaces with its consumers in order to allow
different representations for an element snapshot.

This also changes the requirements of an element snapshot, requiring them to
only implement MatchAttr, instead of MatchAttrGeneric. This is important for
stylo since implementing MatchAttrGeneric is way more difficult for us given the
atom limitations. This also allows for more performant implementations in the
Gecko side of things.

I don't want to get this merged just yet, mainly because the stylo part is not
implemented, but I'd like early feedback from @bholley and/or @heycam: How do
you see this approach? I don't think we'll have much problem to implement
MatchAttr for our element snapshots, but... worth checking.

r? @heycam

Source-Repo: https://github.com/servo/servo
Source-Revision: 1e0321f7dde5f33f7d26bbd4f088622fa3660477
2016-07-21 16:54:34 -05:00
Emilio Cobos Álvarez
4853fe4b89 servo: Merge #12392 - style: Add support to test animations programatically (from emilio:test-animations); r=SimonSapin
<!-- 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
- [x] These changes fix #12120

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

r? @SimonSapin for the style changes, @Ms2ger or @jdm for the dom and test changes

Source-Repo: https://github.com/servo/servo
Source-Revision: 14aeccc33ab44d706df86fbce67339218efe710c
2016-07-20 13:38:31 -05:00
Simon Sapin
c710b104be servo: Merge #12515 - Make the style crate more concrete (from servo:concrete-style); r=bholley
Background:

The changes to Servo code to support Stylo began in the `selectors` crate with making pseudo-elements generic, defined be the user, so that different users (such as Servo and Gecko/Stylo) could have a different set of pseudo-elements supported and parsed. Adding a trait makes sense there since `selectors` is in its own repository and has others users (or at least [one](https://github.com/SimonSapin/kuchiki)).

Then we kind of kept going with the same pattern and added a bunch of traits in the `style` crate to make everything generic, allowing Servo and Gecko/Stylo to do things differently. But we’ve also added a `gecko` Cargo feature to do conditional compilation, at first to enable or disable some CSS properties and values in the Mako templates. Since we’re doing conditional compilation anyway, it’s often easier and simpler to do it more (with `#[cfg(feature = "gecko")]` and `#[cfg(feature = "servo")]`) that to keep adding traits and making everything generic. When a type is generic, any method that we want to call on it needs to be part of some trait.

----

The first several commits move some code around, mostly from `geckolib` to `style` (with `#[cfg(feature = "gecko")]`) but otherwise don’t change much.

The following commits remove some traits and many type parameters through the `style` crate, replacing them with pairs of conditionally-compiled API-compatible items (types, methods, …).

Simplifying code is nice to make it more maintainable, but this is motivated by another change described in https://github.com/servo/servo/pull/12391#issuecomment-232183942. (Porting Servo for that change proved difficult because some code in the `style` crate was becoming generic over `String` vs `Atom`, and this PR will help make that concrete. That change, in turn, is motivated by removing geckolib’s `[replace]` override for string-cache, in order to enable using a single Cargo "workspace" in this repository.)

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
- [x] 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 refactoring

<!-- 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: 2d01d41a506bcbc7f26a2284b9f42390d6ef96ab

--HG--
rename : servo/ports/geckolib/selector_impl.rs => servo/components/style/gecko_selector_impl.rs
rename : servo/ports/geckolib/values.rs => servo/components/style/gecko_values.rs
rename : servo/ports/geckolib/properties.mako.rs => servo/components/style/properties/gecko.mako.rs
2016-07-20 02:58:34 -05:00
Cameron McCormack
b4e35e0e34 servo: Merge #12487 - Add FFI glue for Gecko to implement 1-arg CSS.supports() with stylo (from heycam:supports-ffi); r=emilio
<!-- Please describe your changes on the following line: -->

This adds an FFI function for Gecko to call to implement the 1-arg version of `CSS.supports()`.  This will be useful for producing an automated analysis of CSS properties we lack support for in geckolib.  Corresponding Gecko bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1287382

r? @emilio

---
<!-- 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
- [X] These changes do not require tests because this is a geckolib-only change, and we don't have testing for that yet :(

<!-- 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: f88ecda3628ec2af3a4e4c7fdebeda47b4008d6f
2016-07-18 21:25:31 -07:00
Ms2ger
013bec0ca2 servo: Merge #12385 - Move arc_ptr_eq to style (from Ms2ger:arc_ptr_eq); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: c3a8cbbd38570d4a9095ca94ee4a970956691051
2016-07-11 05:11:48 -07:00
Bobby Holley
ba2f2c1399 servo: Merge #11886 - Refactor attribute handling to avoid marshalling attributes from Gecko into Servo (from bholley:attr_refactor); r=SimonSapin
This marshaling is slow, because Gecko stores attributes as UTF-16 and does not atomize them in all cases, and it turns out that the need for them in Servo is pretty minimal. With some refactoring across servo and rust-selectors we can fix this.

Source-Repo: https://github.com/servo/servo
Source-Revision: abdf2f28a0bd25a76a31b4fd2410c7a87448ed54
2016-07-05 18:55:36 -07:00
Emilio Cobos Álvarez
b3b8f4ed55 servo: Merge #11946 - style: Remove the Mutex from new_animations_sender by moving it to the local StyleContext (from emilio:animations-sender); 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: -->
- [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 refactoring.

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

As a follow-up, we could move all the data living under a mutex in the
SharedLayoutContext only in order to create the local context to the same place.

This should increase animation performance when there are multiple animations in
one page that happen to be on different threads.

r? @SimonSapin/@mbrubeck for the style/layout, @bholley for the geckolib changes

Source-Repo: https://github.com/servo/servo
Source-Revision: ec0d3e084dbaecf749a67ba52e5f680262960a29
2016-07-01 14:12:54 -07:00
Cameron McCormack
e9b215b857 servo: Merge #11787 - Stop parsing style attributes during restyle in geckolib (from heycam:style-attr); r=bholley
<!-- Please describe your changes on the following line: -->

This allows `PropertyDeclarationBlock`s parsed for `style=""` attributes to be stored on a Gecko node so that we don't have to re-parse it each time we compute style for an element.  Works with [Gecko bug 1280772](https://bugzilla.mozilla.org/show_bug.cgi?id=1280772).

r? @bholley
CC @emilio

---

<!-- 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
- [ ] 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: 581c8ba1c867ad378dee79b05b11648726ce5efb
2016-06-23 21:46:25 -05:00
Cameron McCormack
46d23041f1 servo: Merge #11784 - Look at nsIAtom.mHash directly rather than call Gecko_HashAtom (from heycam:atom); r=bholley
<!-- Please describe your changes on the following line: -->

We hash Gecko-backed atoms pretty often.  Using bindgen to access to the stored hash in nsIAtom helps with perf a little.

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: bc5a52b32886e82ec35c4cada9db38c031cf969c
2016-06-21 16:33:44 -05:00
Josh Matthews
7f10c47c0a servo: Merge #11472 - Report blank lines that follow an open brace (from jdm:wip); r=mbrubeck
This automates something that I find myself frequently commenting on in PRs.

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 3ec20d9cf517c67f4d280e8958cc58c4c2b4fbb2
2016-05-27 18:14:25 -05:00
Cullen Rhodes
2bd22f97ce servo: Merge #11329 - Report use statements that use {} with only one entry (from c-rhodes:11320); r=jdm
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 --faster` does not report any errors
- [X ] These changes fix #11320  (github issue number if applicable).

Either:
- [X] 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: 2f9796fa696e9514280777398467696dd4f004b3
2016-05-27 07:11:17 -05:00
Cameron McCormack
ef3928087b servo: Merge #11404 - Add Servo_RestyleSubtree (from heycam:restyle-subtree); 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 --faster` 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 geckolib-only

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

----

See also: https://bugzilla.mozilla.org/show_bug.cgi?id=1275452

r? @bholley

Source-Repo: https://github.com/servo/servo
Source-Revision: 0293a3df16384b84ecbfee2838ffd87ca6ed4a01
2016-05-25 16:26:11 -05:00
Cameron McCormack
723cf0f5c4 servo: Merge #11287 - Support -moz-binding in geckolib (from heycam:moz-binding); 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 --faster` 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 changes target 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: 2a2b88f42c55614f949f218b0444778e8e2bfc78
2016-05-24 14:41:04 -07:00
Bobby Holley
dad21c2a95 servo: Merge #11121 - Hoist gecko bindings into their own crate (from bholley:hoist_bindings); r=mbrubeck
This will be helpful for leveraging the bindings with our nsIAtom-backed
string_cache replacement.

Source-Repo: https://github.com/servo/servo
Source-Revision: 49fd06089de8357c0d139f6aa623cde55ccd9ef0

--HG--
rename : servo/ports/geckolib/bindings.rs => servo/ports/geckolib/gecko_bindings/bindings.rs
rename : servo/ports/geckolib/gecko_style_structs.rs => servo/ports/geckolib/gecko_bindings/structs.rs
rename : servo/ports/geckolib/tools/.gitignore => servo/ports/geckolib/gecko_bindings/tools/.gitignore
rename : servo/ports/geckolib/tools/README.md => servo/ports/geckolib/gecko_bindings/tools/README.md
rename : servo/ports/geckolib/tools/regen_style_structs.sh => servo/ports/geckolib/gecko_bindings/tools/regen_style_structs.sh
rename : servo/ports/geckolib/tools/setup_bindgen.sh => servo/ports/geckolib/gecko_bindings/tools/setup_bindgen.sh
2016-05-11 14:59:04 -07:00
Bobby Holley
3fb5bcc6cc servo: Merge #11058 - Geckolib: minor robustness fixes (from bholley:minor_wikipedia_fixes); r=mbrubeck,bholley
Source-Repo: https://github.com/servo/servo
Source-Revision: aa62a1466e86482822f4b4325f232fabdc12c0ca
2016-05-07 04:25:31 -07:00
Cameron McCormack
8e6b901b3f servo: Merge #11045 - Add Servo_GetComputedValuesForOtherNonElement (from heycam:non-element); r=bholley
Source-Repo: https://github.com/servo/servo
Source-Revision: 50f2349551228f5773c431a3cc3f42e2018ba454
2016-05-06 04:30:47 -07:00
Bobby Holley
0b3556454c servo: Merge #10998 - Geckolib: implement font-weight and logging support (from bholley:font_weight_and_logging); r=mbrubeck
Source-Repo: https://github.com/servo/servo
Source-Revision: ec5f826d18adabbb0cf8d07b879b616dc5caa1aa
2016-05-04 18:37:26 -07:00
Emilio Cobos Álvarez
d72fd6f4ec servo: Merge #10934 - style: Add infrastructure to support lazy pseudo-elements (from emilio:other-gecko-pseudos); r=bholley,mbrubeck
This builds on top of #10815, so it's really just the last commit the one that should be reviewed.

I tried to apply the new infrastructure to servo, but failed (for now?).

The problem with it is that it'd require `ThreadSafeLayoutElement` to implement `selectors::Element`, which is a lot of work and might be racy (not totally sure about it though). Thus, I prefered to keep selectors eager until knowing that it's safe to do it.

r? @mbrubeck for style changes, @bholley for the geckolib changes (minimal for now, glue + a list of lazy PEs must be added)

Source-Repo: https://github.com/servo/servo
Source-Revision: 29823cb378ad0b05a82cfdd133c401a678a19007
2016-05-04 03:42:23 -07:00
Emilio Cobos Álvarez
18f790ca50 servo: Merge #10815 - style: Support anonymous box pseudo-elements (from emilio:anonbox-gcs); r=SimonSapin,bholley
This is a work-in-progress that:

 * Adds support for some pseudo-elements to skip the cascade entirely, in an analogous way to Gecko's anonymous box pseudo-elements.
 * Takes rid of `StylistWrapper`, and uses `Arc::get_mut` instead.
 * Uses the first bullet to precompute the `-servo-details-content` pseudo's style.

I'd like @bholley to take a look before following, do you think that the aproach is the correct?
Also, @SimonSapin could want to put some eyes on it.

Depends on https://github.com/servo/rust-selectors/pull/81

Source-Repo: https://github.com/servo/servo
Source-Revision: 407f991c8aba5dcf5312bb2c34a3dd4fe12e5471
2016-04-29 14:27:16 -07:00
Cameron McCormack
e19590ff39 servo: Merge #10889 - Add Servo_InsertStyleSheetBefore (from heycam:insert-sheet); r=bholley
r? @bholley
Will be used by https://bugzilla.mozilla.org/show_bug.cgi?id=1268390.

Source-Repo: https://github.com/servo/servo
Source-Revision: 78ae9a5da0f8f3dc67c2d0a76507a54bd08b9fba
2016-04-28 22:37:40 -07:00
Cameron McCormack
e92750ab6b servo: Merge #10888 - Make Servo_GetComputedValues take a node rather than an element (from heycam:computed-node); r=bholley
r? @bholley
https://bugzilla.mozilla.org/show_bug.cgi?id=1268392 is the Gecko side

Source-Repo: https://github.com/servo/servo
Source-Revision: 0b2c24804208069c22ca7edb9b63ff74e8383fbe
2016-04-28 15:25:00 -07:00
Cameron McCormack
55fc6c831d servo: Merge #10848 - Add Servo_GetStyleFoo functions to get style structs from GeckoComputedValues (from heycam:struct-accessor); r=bholley
r?@bholley

Source-Repo: https://github.com/servo/servo
Source-Revision: e079e01320cf4b0f80c7d6307cf6d53fe7703ec4
2016-04-27 02:20:17 -07:00
Bobby Holley
ce0dac1c89 servo: Merge #10865 - Remove the need for custom clang to generate stylo bindings, plus misc other fixes (from bholley:simplify_bindgen); r=emilio
Source-Repo: https://github.com/servo/servo
Source-Revision: 77553ab42cb4f49d38be030a3c6852550c9f2a1b
2016-04-26 19:51:13 -07:00
Bobby Holley
4d37b3664d servo: Merge #10359 - Implement construction, destruction, and copying of gecko style structs (from bholley:style_struct_management); r=SimonSapin
This requires some new machinery on the gecko side, which I'll get up in bugzilla shortly.

Source-Repo: https://github.com/servo/servo
Source-Revision: a3b55d68a84dac301b3bc40d2444934b7df8e167
2016-04-04 19:42:29 +05:01
Bobby Holley
35b85ab9ed servo: Merge #10293 - Tweak gecko bindings (from bholley:tweak_bindings); r=emilio
A few changes as discussed.

Source-Repo: https://github.com/servo/servo
Source-Revision: 95819a4334526751168de0b9868dbd76e27b0d57
2016-04-01 16:23:30 +05:01
Bobby Holley
6e1def963d servo: Merge #10155 - Generalize the style structs (from bholley:generalize_style_structs); r=SimonSapin
This allows geckolib to pass gecko style structs and have the style system write to them directly, provided we implement all the traits.

Source-Repo: https://github.com/servo/servo
Source-Revision: 605842f193aedc1151ab38a99c49f693c76e5cf3
2016-03-25 02:58:33 +05:01
Bobby Holley
e191536d43 servo: Merge #9852 - Stylo uplifts 3 (from bholley:stylo_uplifts_3); r=bholley
Source-Repo: https://github.com/servo/servo
Source-Revision: 49e9594fb97d396f909cf367f70dec6c1ac32fc3
2016-03-05 01:19:35 +05:01
Emilio Cobos Álvarez
b1dd4fcd79 servo: Merge #9567 - style: Make the whole style crate independent of the implementation (from emilio:general-pseudo-element-parsing); r=bholley,SimonSapin
This allows, among other things, having different implementations for parsing pseudo{elements, classes} in both `ports/geckolib` and in servo.

Source-Repo: https://github.com/servo/servo
Source-Revision: c11844cbf28054784c8d65781cff20045d8ee48b
2016-02-14 03:30:59 +05:01
Bobby Holley
7d75623720 servo: Merge #9515 - Stylo uplifts Part 2 (from bholley:stylo_uplifts_2); r=SimonSapin
A bunch of random things that we might as well merge into the tree.

Source-Repo: https://github.com/servo/servo
Source-Revision: 629b1d33d5d6153da87d1ae176ea6c9b9298c650
2016-02-04 22:56:09 +05:01
Bobby Holley
2379681f6b servo: Merge #9284 - Add Partial Implementation of style DOM traits for Gecko, and some basic glue to let Gecko call into Servo (from bholley:bootstrap_stylo); r=SimonSapin
The wrapper stuff is partially-complete, modulo some unimplemented methods. The glue code is just a toy for now. Regardless, I think it's worth getting some of this stuff in-tree to minimize breakage.

Source-Repo: https://github.com/servo/servo
Source-Revision: 77d3fbcca3c6f7e8b4068f89e25b090977fe5672
2016-01-19 13:50:10 +05:01