Commit graph

136 commits

Author SHA1 Message Date
Ms2ger
2ddf1f2d91 Fix some build warnings. 2017-02-07 16:11:56 +01:00
Xidorn Quan
33a9c4383c Use -stdlib=libc++ on mac for stylo bindgen 2017-02-07 12:15:31 +11:00
Bobby Holley
e78f2404e1 Bug 1335863 - Inline Gecko_IsHTMLElementInHTMLDocument. r=emilio 2017-02-02 14:32:23 -08:00
Hiroyuki Ikezoe
a4cafe7106 Bug 1328787 - Part 6: Update build_gecko.rs and bindings. r=heycam
'RawServoDeclarationBlock' in structs_types in build_gecko.rs and the change in
conversion.rs are needed for using set_arc_leaky() for
PropertyValuePair.mServoDeclarationBlock. Without this change,
mServoDeclarationBlock.set_arc_leaky() is called against RawServoDeclarationBlockVoid.

MozReview-Commit-ID: FZkZ0OclXcP
2017-01-29 09:07:41 +09:00
Cameron McCormack
2f39b49e22 Regenerate bindings and tweak some geckolib code for it. 2017-01-26 17:32:08 +08:00
bors-servo
e4a1cb6f87 Auto merge of #15175 - BorisChiou:animation/interpolate_and_cascade, r=heycam
Interpolate servo animation values and add them to the cascade

These are the servo-side changes for [bug 1317209](https://bugzilla.mozilla.org/show_bug.cgi?id=1317209). @Manishearth, @emilio, and @heycam have already reviewed them there. Please merge these patches until the gecko-side changes for [bug 1317209](https://bugzilla.mozilla.org/show_bug.cgi?id=1317209) 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 1317209](https://bugzilla.mozilla.org/show_bug.cgi?id=1317209).
- [X] These changes do not require tests because there are existing tests for this in mozilla-central

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15175)
<!-- Reviewable:end -->
2017-01-25 23:36:33 -08:00
Emilio Cobos Álvarez
14692bd26e
Bindgenup.
MozReview-Commit-ID: 7s0GsWaEjwe
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-25 10:42:44 +01:00
Boris Chiou
4f0791a94b Bug 1317209 - Part 1: Implement uncompute FFI. r=manishearth 2017-01-24 15:47:35 +08:00
Manish Goregaokar
9c69b3d0a5 Regen bindings 2017-01-21 16:54:17 -08:00
bors-servo
1755ad7b75 Auto merge of #15077 - emilio:stylo-medialist, r=heycam,Manishearth,upsuper
Media query parsing and evaluation in stylo using nsMediaFeatures

<!-- Please describe your changes on the following line: -->

Reviewed in the bug.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15077)
<!-- Reviewable:end -->
2017-01-18 05:39:57 -08:00
Emilio Cobos Álvarez
646258e5a0
Bug 1331213: Don't make the pres context pointers opaque. r=heycam
I don't know why they were that way, but it makes no sense and tests still pass.

MozReview-Commit-ID: HAIuQhqlTtF
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-17 14:18:51 +01:00
Emilio Cobos Álvarez
5b5243b8af
Bug 1331213: Bootstrap a Gecko-side Device, and track it's dirtiness manually in the per-doc data. r=heycam
The setup is quite different to Servo-land, so add a comment about the different
setup.

Also, check viewport rules when flushing stylesheets. I believe that the
previous behavior is plain wrong, though I haven't taken the time to come up
with a test case.

In any case, it doesn't hurt any of both back-ends.

MozReview-Commit-ID: 46gtTkesOsr
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-17 14:05:23 +01:00
Emilio Cobos Álvarez
5d6ac65e04
Bug 1331213: Add an API to get nsMediaFeatures::features. r=heycam
We can't use the generated ones if we want a windows build.

MozReview-Commit-ID: 200LNgWl5Lm
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-17 13:59:00 +01:00
Emilio Cobos Álvarez
7d2f43df58
Bug 1331213: Generate nsMediaFeatures and nsMediaList, along with a bunch of other stuff in nsCSSProps. r=xidorn
MozReview-Commit-ID: 8ANuHlp886J
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-17 13:58:44 +01:00
Emilio Cobos Álvarez
4843fcad80
Bug 1331213: Add a descriptive error message when an include isn't found. r=xidorn
Kind of drive-by.

MozReview-Commit-ID: CHLYcrLhyRq
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-17 13:58:34 +01:00
Cameron McCormack
d4023a32d4 Update geckolib build-time bindgen build script for recent regex changes. 2017-01-17 16:59:30 +08:00
Manish Goregaokar
296b468801 stylo: Expose property-pref mappings
MozReview-Commit-ID: 7evWOUFwa3K
2017-01-13 14:22:04 -08:00
Manish Goregaokar
d87b710fdd stylo: Store servo computed values for animation properties
MozReview-Commit-ID: IoQLN5tdIBw
2017-01-11 15:24:53 -08:00
Bobby Holley
3fcfc9c5fc Bug 1325734 - Simplify ElementData and eliminate the concept of consuming styles. r=emilio 2017-01-09 11:51:37 -08:00
Cameron McCormack
f24e4543fe stylo: Update glue for recent changes. 2017-01-09 11:11:55 +08:00
Xidorn Quan
fa27ac0544 Add function to convert NonTSPseudoClass to CSSPseudoClassType 2017-01-06 21:25:45 +11:00
Boris Zbarsky
8908743719 Bug 1298588 part 2, servo piece. Pass through an nsPresContext to the PerDocumentStyleData constructor. r=bholley 2017-01-04 14:42:15 -05:00
Emilio Cobos Álvarez
a5f5e48c68
Bug 1304792: stylo: Implement @import. r=heycam
MozReview-Commit-ID: Hw1V66JxIBD
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2016-12-30 13:00:44 +01:00
bors-servo
9e0d269353 Auto merge of #14754 - upsuper:skip-bindgen, r=emilio
Skip invoking bindgen if no header changes

This can avoid doing bindgen when build script is called for updating other files, e.g. properties.

This uses a global modified time, so there is a chance that some of the files which can be skipped but not skipped. But given that we do all three files in parallel, that would unlikely affect the actual runtime.

Using lots of `Mutex` could be an issue, but it doesn't seem to be in practice. Since only one thread would hold the lock of `ADDED_PATHS`, there is never a competitor for the lock of `LAST_MODIFIED`.

r? @emilio

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14754)
<!-- Reviewable:end -->
2016-12-28 04:51:53 -08:00
Xidorn Quan
b6ea9976ba Skip invoking bindgen if no header changes
This can avoid doing bindgen when build script is called for updating
other files, e.g. properties.
2016-12-28 18:10:27 +11:00
Bobby Holley
ab71b29959 style: Add a special, explicit path for lazy style resolution and use it for GetComputedStyle.
MozReview-Commit-ID: KAM9mVoxCHE
2016-12-28 11:52:46 +08:00
Cameron McCormack
fc808d9030 Update bindings build script and glue for recent changes. 2016-12-27 10:30:24 +08:00
Emilio Cobos Álvarez
f08e851f81
style: Update bindings because of bug 1325006 2016-12-25 01:31:08 +01:00
Manish Goregaokar
211682ab49 Regen bindings 2016-12-22 23:26:21 -08:00
Xidorn Quan
e73bb054c5 Update CSSOM FFI to use string and nsCSSProperty 2016-12-16 18:09:12 +11:00
Xidorn Quan
cbfe1832c5 Parallelize build-time bindgen 2016-12-15 18:25:08 +11:00
bors-servo
a6cfec972f Auto merge of #14563 - upsuper:buildtime-bindgen, r=emilio
Add asserts to make failure clearer

Gecko currently doesn't pass absolute path for `MOZ_DIST`, which leads to obscure panic when running the build script. This patch adds some assertions so that failures around this would be clearer.

r? @emilio

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14563)
<!-- Reviewable:end -->
2016-12-13 01:40:23 -08:00
Xidorn Quan
ac5c09c929 Add asserts to make failure clearer 2016-12-13 17:22:45 +11:00
Cameron McCormack
d0a8958edd Bindings update for latest mozilla-central. 2016-12-13 13:55:21 +08:00
Bobby Holley
3a56954069 Bug 1322945 - Change skip_root to unstyled_children_only and use StyleNewChildren in more places. r=heycam
I noticed that our current behavior in ContentRangeInserted is incorrect. Unlike
ContentInserted (where this code lived originally), ContentRangeInserted takes a
start and end element. I'm not sure if we ever take that path for new content that
needs style, but it seemed sketchy. And generally, it seems nice to just always
style new content the same way (though we still need to style NAC by the subtree
root, since it hasn't been attached to the parent yet).

For situations where there is indeed only one unstyled child, the traversal
overhead should be neglible, since we special-case the single-element in
parallel.rs to avoid calling into rayon.

Being more explicit about what we want here also makes us more robust against
the other handful of callpaths that can take us into
nsCSSFrameConstructor::{ContentRangeInserted,ContentAppended}. Currently we
can call StyleNewSubtree on an already-styled element via RecreateFramesForContent,
which triggers an assertion in the servo traversal.

MozReview-Commit-ID: DqCGh90deHH
2016-12-12 18:50:33 -08:00
Xidorn Quan
1cefd1bef0 Do build-time bindgen
Majority of build_gecko.rs is just the straightforward conversion from
regen.py. There are two differences that:
1. Side in whitelist is changed to mozilla::Side
2. std::atomic__My_base is added to opaque types for Windows
2016-12-10 00:33:41 -10:00