Граф коммитов

60 Коммитов

Автор SHA1 Сообщение Дата
Boris Chiou 58ba6b888a Bug 1429305 - Use serde to serialize LengthPercentage and StyleRayFunction. r=emilio
We need to pass these two types into the compositor, so we need a better
way to serialize these rust types. We use serde and bincode to
serialize/deserialize them, and use ByteBuf to pass the &[u8] data
through IPC. We define StyleVecU8 for FFI usage only.

Differential Revision: https://phabricator.services.mozilla.com/D50688

--HG--
extra : moz-landing-system : lando
2019-10-31 21:35:05 +00:00
Cameron McCormack 3a08c03925 Bug 1474793 - Part 11: Add FFI API to use SharedMemoryBuilder. r=emilio
Depends on D17197

Differential Revision: https://phabricator.services.mozilla.com/D17198

--HG--
extra : moz-landing-system : lando
2019-03-30 00:16:27 +00:00
Emilio Cobos Álvarez 1f4fecfcd2 Bug 1511811 - Use https for the MPL license URL.
Cherry-picks https://github.com/servo/servo/pull/22198
2018-12-03 08:43:48 -05:00
shindli 6c6e4a960d Backed out 13 changesets (bug 1511811) for Btup bustages
Backed out changeset d71cde918f43 (bug 1511811)
Backed out changeset 0ae2634de8e1 (bug 1511811)
Backed out changeset 53d1f5ca4099 (bug 1511811)
Backed out changeset 5a08148928ef (bug 1511811)
Backed out changeset da7816ec50ef (bug 1511811)
Backed out changeset 5fe23889cccc (bug 1511811)
Backed out changeset 800bc60c75a7 (bug 1511811)
Backed out changeset 2392d8199cd0 (bug 1511811)
Backed out changeset 7bc486fbd195 (bug 1511811)
Backed out changeset d2c997426108 (bug 1511811)
Backed out changeset ddd573878432 (bug 1511811)
Backed out changeset 29c8ec1559a4 (bug 1511811)
Backed out changeset f5851346109d (bug 1511811)

--HG--
rename : third_party/rust/darling_core/src/macros_private.rs => third_party/rust/darling_core/src/macros.rs
2018-12-03 15:39:11 +02:00
Emilio Cobos Álvarez 6359ab5223 Bug 1511811 - Use https for the MPL license URL.
Cherry-picks https://github.com/servo/servo/pull/22198
2018-12-03 08:15:21 -05:00
Cameron McCormack 9c372819c4 Bug 1508013 - Run rustfmt on servo/ports/geckolib/ r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D12206

--HG--
extra : moz-landing-system : lando
2018-11-20 04:37:53 +00:00
Emilio Cobos Álvarez 3ef3f33868 Bug 1485044: Remove useless StyleDisplay conversion. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D3896
2018-08-22 11:25:58 +02:00
sotaro 666719aa81 Bug 1456350 - Forward webrender error log to gfxCriticalNote r=bholley 2018-04-27 16:48:39 +09:00
Bobby Holley 38a23e8931 Bug 1346988 - Parse sheets on the thread pool. r=bz,r=emilio
Note that we also drop the dead optional aReusableSheets argument from
the async parsing path, since it was always null.

MozReview-Commit-ID: KddpGFdaqEe
2018-04-18 13:52:57 -07:00
Xidorn Quan 5e807fd261 servo: Merge #19925 - Use cstr macro for ffi literal strings (from upsuper:cstr); r=emilio
Use `cstr!()` macro with `CStr` to ensure that literal strings used with FFI is properly nul-terminated to avoid cases like #19915.

Source-Repo: https://github.com/servo/servo
Source-Revision: 5af219e8188f2e657c5711eb5def4c8e8065e29d

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : fb6a22714c7b8ff534181e54c265fca24da7873b
2018-02-14 06:49:38 -05:00
Simon Sapin 235145b016 servo: Merge #19914 - Remove #![deny(warnings)] (from servo:dont-deny); r=nox
We already have https://github.com/servo/servo/pull/19612 to deny warnings at the time of landing into master. But it’s not useful to break the build when later compiler with a more recent Rust version that has introduced new warnings:

https://bugzilla.mozilla.org/show_bug.cgi?id=1434619

Source-Repo: https://github.com/servo/servo
Source-Revision: 7546c37f1e921a112fef5828c59c6738a98c3f30

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : ed5c34f72e321ce0051347bd5156389d1ef26bef
2018-01-31 11:01:26 -06:00
Bobby Holley ff4aa007bc servo: Merge #18732 - Revert #18668 - Add mprotect diagnostics for HashMap crash (except for round-up-to-page behavior) (from bholley:revert_mprotect_diagnostics); r=bholley
These diagnostics have served their purpose, time to remove them.

https://bugzilla.mozilla.org/show_bug.cgi?id=1403397

Source-Repo: https://github.com/servo/servo
Source-Revision: 0b69887387567d1bbaa93fe874014a925ef9fe05

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 048d7a45ecf6d963209a252d4dbde30a5e890489
2017-10-03 14:45:33 -05:00
Bobby Holley 32026a5fa7 servo: Merge #18668 - Add mprotect diagnostics for HashMap crash (from bholley:mprotect_diagnostics); r=Manishearth
https://bugzilla.mozilla.org/show_bug.cgi?id=1403397

Source-Repo: https://github.com/servo/servo
Source-Revision: 5d2ac4aa2e746daf312198278369686627360895

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 5f5fa574e740c8e60766c5c1220d3955dbef05ea
2017-09-28 19:10:46 -05:00
Hiroyuki Ikezoe 5a21ed8bf3 servo: Merge #18650 - Handle custom properties in keyframes (from hiikezoe:custom-properties-in-keyframes); r=<try>
<!-- Please describe your changes on the following line: -->
https://bugzilla.mozilla.org/show_bug.cgi?id=1402219

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 92eb88277f23d7358125e6d7462f9039e6242746

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : bb5bd1280858321aaf97d83cd54578feb8238ae9
2017-09-27 04:35:00 -05:00
Nicholas Nethercote 43983aa52e servo: Merge #18452 - Overhaul MallocSizeOf and related things (from nnethercote:bug-1398737); r=jdm
This patch makes the MallocSizeOf stuff in Stylo work more like the HeapSizeOf
stuff already in Servo, except better. In particular, it adds deriving support
for MallocSizeOf, which will make it easier to improve coverage.

The patch does the following.

- Combines servo/components/style/stylesheets/memory.rs and the heapsize crate
  into a new crate, malloc_size_of.

- Forks the heapsize_derive crate, calling it malloc_size_of, so that
  MallocSizeOf can be derived.

- Both the new crates have MIT/Apache licenses, like heapsize, in case they are
  incorporated into heapsize in the future.

- Renames the methods within MallocSizeOf and the related traits so they are
  more concise.

- Removes MallocSizeOfWithGuard.

- Adds `derive(MallocSizeOf)` to a lot of types, in some cases replacing an
  equivalent or almost-equivalent hand-written implementation.

- Adds stuff so that Rc/Arc can be handled properly.

<!-- 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 tested on Gecko side.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

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

--HG--
rename : servo/components/hashglobe/LICENSE-APACHE => servo/components/malloc_size_of/LICENSE-APACHE
rename : servo/components/hashglobe/LICENSE-MIT => servo/components/malloc_size_of/LICENSE-MIT
rename : servo/components/jstraceable_derive/Cargo.toml => servo/components/malloc_size_of_derive/Cargo.toml
rename : servo/components/hashglobe/LICENSE-APACHE => servo/components/malloc_size_of_derive/LICENSE-APACHE
rename : servo/components/hashglobe/LICENSE-MIT => servo/components/malloc_size_of_derive/LICENSE-MIT
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : a8254c4ae15901b764d918355e900a1e74d6eb03
2017-09-11 22:11:25 -05:00
Hiroyuki Ikezoe 8b0ea4a17c servo: Merge #17944 - Display property animation for SMIL (from hiikezoe:display-property-animation); r=emilio
<!-- Please describe your changes on the following line: -->
https://bugzilla.mozilla.org/show_bug.cgi?id=1385089

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

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

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 6faa293c2f45ea761850fcfd43689aca92d1c678
2017-08-02 16:27:58 -05:00
Michael Partheil 3ff096ba27 servo: Merge #17775 - Replace all uses of the style::stylearc alias with servo_arc (from michael-p:rename-stylearc-to-servo-arc); r=emilio
The `stylearc` alias is left there temporarilly and will be removed completely in a later commit/PR where also `components/style/gecko/generated/structs_{debug|release}.rs` are re-generated (they still use the old alias).

---
<!-- 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 #17768  (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because no new features / only refactoring

Source-Repo: https://github.com/servo/servo
Source-Revision: 31228c18499d1c7f68b6b64b559354c768e81215

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 4d7b64e8a000a80d9daf9b1a511682416f456ff5
2017-07-19 06:03:17 -07:00
Josh Matthews 37c0d145b4 servo: Merge #17655 - Hook up Stylo error reporter to Firefox devtools (from jdm:stylo-error-reporter); r=emilio
Reviewed by @emilio in https://bugzilla.mozilla.org/show_bug.cgi?id=1352669.

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 2ddbc92d90ec8df9e5bf4630cd3e93759da81649

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 87c38834194b9cb1d5fdfa4303c0754f866b6613
2017-07-10 18:13:44 -07:00
Hiroyuki Ikezoe c6f36404ea servo: Merge #16671 - Pass AnimationValueMap raw pointer (from hiikezoe:animation-values-map); r=emilio
This is a PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1360776
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because it's for stylo.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7088969c2814688cc331d0e1385e352f76a54b5f

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 5a20650597f8e274c14c060b48e57aeaef3650d3
2017-05-01 05:51:48 -05:00
Xidorn Quan 73064eb8b6 servo: Merge #16241 - Stop passing url as string into Servo side (from upsuper:bug1352763-bug1352025); r=Manishearth,emilio
This is the Servo side changes of [bug 1352763](https://bugzilla.mozilla.org/show_bug.cgi?id=1352763) and [bug 1352025](https://bugzilla.mozilla.org/show_bug.cgi?id=1352025) which have been reviewed on Bugzilla.

Source-Repo: https://github.com/servo/servo
Source-Revision: 679b41893782663f7a2294cdf94dcedcf1337f98

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 135f4003dbf47eab0842f02be2aa9f766e066721
2017-04-03 07:05:42 -05:00
Manish Goregaokar 43101703b6 servo: Merge #16072 - Fix geckolib breakage caused by 1.16 (from Manishearth:macro-use); r=upsuper
Source-Repo: https://github.com/servo/servo
Source-Revision: f90f7d6824a65eb0b6a266f5e8281f313c1ae1c0

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 53d6fdd5e0b604dfb64cf0cc05c2fe176d005a7b
2017-03-21 22:36:37 -07:00
Simon Sapin 33a9e6d050 servo: Merge #16014 - Per-process lock for CSSOM objects (from servo:style-ref); r=emilio
<!-- Please describe your changes on the following line: -->

Before this PR, every object reflected in CSSOM is in `Arc<RwLock<_>>` to enable safe (synchronized) mutable aliasing. Acquiring all these locks has significant cost during selector matching:

* https://bugzilla.mozilla.org/show_bug.cgi?id=1311469
* https://bugzilla.mozilla.org/show_bug.cgi?id=1335941
* https://bugzilla.mozilla.org/show_bug.cgi?id=1339703

This PR introduce a mechanism to protect many objects with the same `RwLock` that only needs to be acquired once.

In Stylo, there is one such lock per process (in a `lazy_static`), used for everything.

I non-Stylo Servo, I originally intended to have one such lock per document (for author-origin stylesheets, and one per process for user-agent and user sytlesheets since they’re shared across documents, and never mutated anyway). However I failed to have the same document-specific (or pipeline-specific) `Arc` reachable from both `Document` nodes and `LayoutThread`. Recursively following callers lead me to include this `Arc` in `UnprivilegedPipelineContent`, but that needs to be serializable. So there is a second process-wide lock.

This was previously #15998, closed accidentally.

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

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 851230e57ac8775707df5f0f103be5feac81fc41
2017-03-19 14:31:19 -07:00
Xidorn Quan 7cb13df498 servo: Merge #15961 - Implement access to CSSNamespaceRule for stylo (from upsuper:bug1345698); r=heycam
This is the Servo side changes of [bug 1345698](https://bugzilla.mozilla.org/show_bug.cgi?id=1345698).

Source-Repo: https://github.com/servo/servo
Source-Revision: 9986b42333a7438c02debd7fe8395a5c146a58df

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 87f42c038798f7cefd9b0bcdd83bf5f9c7a162c1
2017-03-15 03:58:06 -07:00
Emilio Cobos Álvarez c1ff312d84 servo: Merge #15913 - Use the proper viewport size for stylo (from emilio:viewport-size); r=heycam,hiro
Reviewed upstream at [bug 1303229](https://bugzil.la/1303229).

Source-Repo: https://github.com/servo/servo
Source-Revision: 06f99c13f233bad71a42affccb10c86295ff014b

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : fd7d711c75bf2d5e217d186ad875e4d8e1602c3a
2017-03-11 04:40:31 -08:00
Nathan Froyd 164d6cbbee servo: Merge #15535 - geckolib: use a global thread pool for styling (from froydnj:global-style-thread-pool); r=bholley
By having a single thread pool, rather than one per document, we use less memory.  This addresses https://bugzilla.mozilla.org/show_bug.cgi?id=1324250.

This may be obvious to an experienced Rust programmer, but I went with raw pointers because trying to use `Option` global variables resulted in complaints about turning on feature flags in nightly Rust.  Since this is for stylo, nightly features are not appropriate here.

---
<!-- 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: 56a99577b31a942e340624f97377980b0e612088

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 72e6b32e7662f3801e79c3894d89a0f9d25a861f
2017-02-23 10:15:41 -08:00
Emilio Cobos Álvarez 2b5029bc2a servo: Merge #15348 - stylo: Remove unused macro_use annotation that warns on nightly (from emilio:unused-macro-use); r=SimonSapin
r? anyone

Source-Repo: https://github.com/servo/servo
Source-Revision: df487197e85fae569ec4415609267f63f258ef55
2017-02-02 08:28:52 -08:00
Bobby Holley b830eea173 servo: Merge #14835 - Switch to crates.io for atomic_refcell (from bholley:external_atomic_refcell); r=Manishearth
r? @Manishearth

See #14828 for backstory.

Source-Repo: https://github.com/servo/servo
Source-Revision: 1e927ca88bf6622d5a87db75863f76976a1df56c
2017-01-03 19:20:59 -08:00
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
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
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
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
Bobby Holley 9069afb48d servo: Merge #13686 - Fix warnings and make style and geckolib #![deny(warnings)] (from bholley:fix_warnings); r=Manishearth
Warnings have been piling up in the style system, and making it harder to tell when new warnings are introduced. I think we should tighten up on them.

CC @emilio @Manishearth @SimonSapin @heycam @pcwalton @metajack @larsbergstrom

Source-Repo: https://github.com/servo/servo
Source-Revision: e597719b73ff4ed58fb6628b6f998cab4058583c
2016-10-11 06:17:44 -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
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
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
Manish Goregaokar 14fdf1572e servo: Merge #13335 - Add unit test crate for stylo (from Manishearth:stylo-tests); r=emilio
@canaltinova needs this for his mask work -- we need a way to test stylo code (or style code that's conditionally compiled out for gecko)

We can add this to the CI as well.

r? @emilio

Source-Repo: https://github.com/servo/servo
Source-Revision: 66c736194d1a6d3af1303a070aa96fec4534187c

--HG--
rename : servo/ports/geckolib/sanity_checks.rs => servo/tests/unit/stylo/sanity_checks.rs
2016-09-20 15:47:27 -05:00
Ms2ger 70b59db00f servo: Merge #12990 - Remove unused dependency on util from geckolib (from servo:geckolib-the-util-the); r=Wafflespeanut
Source-Repo: https://github.com/servo/servo
Source-Revision: f863a7c317c1f52cde690085b40c3441b6cd789f
2016-08-23 06:18:44 -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
Emilio Cobos Álvarez 923c16c719 servo: Merge #12645 - stylo: Allow computing change hints during the traversal (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 geckolib :-(

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

r? @bholley
cc @heycam

Source-Repo: https://github.com/servo/servo
Source-Revision: cbf71a2cf39e792f75309e68f7cabe862d4a70eb
2016-08-03 19:02: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
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
Emilio Cobos Álvarez 77d1e7f00d servo: Merge #12339 - stylo: Implement dirtyness tracking for stylo (from emilio:stylo-node-dirtying); r=heycam
<!-- 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 geckolib-only changes.

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

r? @bholley

Source-Repo: https://github.com/servo/servo
Source-Revision: 4a5a0a417bb55971fe70e7066c8d8c9a0ab36b3b
2016-07-13 19:48:54 -07:00
Simon Sapin ce39d5cda4 servo: Merge #12319 - Use a stable compiler for build-geckolib (from servo:stable-geckolib); r=larsbergstrom+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 #11815 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because CI already runs `./mach build-geckolib`

<!-- 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: e50e4f99bf4668d183226251d8ea55fa36f72fe0
2016-07-08 16:20:14 -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
Simon Sapin 7649cc9cad servo: Merge #11835 - Use our copy of RefCell for style data (from servo:diy-as-unsafe-cell); r=nox
<!-- Please describe your changes on the following line: -->

This allows removing `#![feature(as_unsafe_cell)]` in geckolib and make progress towards #11815.

---
<!-- 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 part of #11815.

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require new tests because they don’t introduce no functional changes.

<!-- 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: 3de14d9ca0cf54e6a2ae4eac5ff47e38e724b77b
2016-06-23 09:19:28 -05:00
Simon Sapin 993d896521 servo: Merge #11816 - Make the style crate (almost) build with a stable compiler (from servo:stable-style); r=nox
<!-- Please describe your changes on the following line: -->

The bulk of this is adding cargo features to make derived implementations of `heapsize` and `serde` traits optional.

"Almost" because `std::intrinsics::discriminant_value` is currently unstable and doesn’t have any stable replacement that I know of. For now, this PR conditionally replaces it with `unimplemented!()`.

r? @nox

---
<!-- 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 <s>fix</s> are part of #11815 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not <s>require tests</s> *have tests yet* because that requires https://github.com/servo/servo/issues/11806, but I still want to land this before it bitrots. (Tests should check that the build succeeds with a stable compiler.)

<!-- 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: 0fb5d634a007f3d0424f95569ac3f83d500d054c
2016-06-22 09:43:20 -05:00
Matt Brubeck db9cf80b67 servo: Merge #11688 - Support keyword values for 'cursor' in geckolib (from mbrubeck:cursor-master); r=emilio
This has a big hard-coded `match` instead of a generated one because Servo's Cursor enum is not generated by Mako code; instead it's in `style_traits` where it can be shared with Servo's gfx and windowing code.

We *could* move this mapping into the macro that generates the Cursor enum, but it would either involve the same amount of code duplication, or make style_traits depend on gecko_bindings. I'm not really sure which is best; open to suggestions.

r? @emilio

Source-Repo: https://github.com/servo/servo
Source-Revision: 2cfef1391f53723aadb3f5225e3eaf3d155002d4
2016-06-09 20:36:54 -05: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 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