Commit graph

98 commits

Author SHA1 Message Date
bors-servo
a5fe464e4a Auto merge of #16762 - upsuper:buildtime-pseudo, r=emilio
Generate atom files at build-time

The commits here basically do the following things:
1. move all generated files for gecko into "gecko/generated" so that we can copy all of them around
2. make regen_atoms.py generate file to the out dir rather than in-tree
3. make the build script invoke regen_atoms.py when bindgen feature is enabled

<!-- 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/16762)
<!-- Reviewable:end -->
2017-05-08 07:35:19 -05:00
Xidorn Quan
ff76ec8d2f Copy all generated files to dist dir for packaging. 2017-05-08 21:34:00 +10:00
Xidorn Quan
10b7001dd1 Make atom files generated at build-time. 2017-05-08 21:33:58 +10:00
Xidorn Quan
a60e5f0218 Move binding files into another directory.
So that we can copy them when not using bindgen altogether.
2017-05-08 21:26:58 +10:00
cku
ba8e33a30c stylo: Export mozilla::css::ImageValue to stylo. 2017-05-08 15:45:31 +08:00
Xidorn Quan
1d6ede3245 Expose a single function for bindings mod in build_gecko. 2017-05-08 10:52:23 +10:00
Anthony Ramine
3c68c28ff7 Implement grid-template-areas (fixes #16079) 2017-05-04 19:10:45 +02:00
Hiroyuki Ikezoe
83a4935b60 Pass AnimationValueMap raw pointer instead of Arc to Gecko_GetAnimationRule() 2017-05-01 19:23:34 +09:00
Emilio Cobos Álvarez
5cbc6a9b16
Bug 1360508: Adjust text-combine properly. r=jryans
Text style is always resolved via ServoStyleSet::ResolveStyleForText, either
from the frame constructor initially, or from
ServoRestyleManager::ProcessPostTraversalForText.

So text-only adjustments should go there instead. Since that doesn't call into
cascade(), all the code that passes `pseudo` there is dead code we can remove.

MozReview-Commit-ID: jpbBYpLlUL
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-28 17:21:10 +02:00
Boris Chiou
02fc1789e8 Bug 1357357 - Make the parser of transition-property match the spec.
1. We add a new arm to TransitionProperty, TransitionProperty::Unsupported,
   which contains an Atom, so it's better to remove the Copy trait from
   TransitionProperty.
2. TransitionProperty::Unsupported(Atom) represents any non-animatable, custom,
   or unrecognized property, and we use Atom to store the ident string for
   serialization.
2017-04-26 21:35:05 +08:00
Jeremy Chen
13f6cf6e3a Stylo: add -moz-border-*-colors support
In Gecko, we use double pointers to nsBorderColors to store -moz-border-*-colors.
We can simplify the implementation of computed value in Servo by using Option<Vec>.
As to passing computed values from Servo to Gecko, we might need to use some
binding functions (pre-added in the same Gecko bug, see Bug 1348173).

Note that we added -moz-border-*-colors as sub_properties of the 'border'
shorthand, so we can make the 'border' shorthand reset -moz-border-*-colors
(See Gecko Bug 482692). However, since they are Gecko only non-standard properties,
we should skip these sub_properties while doing unit testing in Servo. The test part
should be convered by Stylo/Gecko already.

A bit refactoring of replacing all ["top", "right", "bottom", "left"] with PHYSICAL_SIDES
is included in this patch, since we've already had PHYSICAL_SIDES for a while.
2017-04-25 09:52:19 +08:00
J. Ryan Stinnett
8144aa1163 Expose CSS length mode in Stylo glue
Add length mode args to Stylo glue functions so that Gecko can enable the
special SVG mode as needed.

MozReview-Commit-ID: 1luM13MFEXX
2017-04-14 17:22:16 +08:00
Cameron McCormack
fb26ae7df5 stylo: Generate eCSSPropertyID_all as a const rather than an enum value. 2017-04-14 13:33:21 +08:00
Manish Goregaokar
2e22a006db stylo: Support -moz-script-size-multiplier, -moz-script-level, -moz-math-display 2017-04-12 22:15:49 +08:00
bors-servo
a0a60ba61d Auto merge of #16328 - bradwerth:computedStyles, r=heycam
Stylo: Add FFI interfaces for exposing style sources.

https://bugzilla.mozilla.org/show_bug.cgi?id=1346256
https://reviewboard.mozilla.org/r/119044/

<!-- 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/16328)
<!-- Reviewable:end -->
2017-04-10 04:04:54 -05:00
Brad Werth
bfc7e84767 Stylo: Add FFI interfaces for exposing style sources.
MozReview-Commit-ID: BlAb8sQ5WYl
2017-04-10 16:40:46 +08:00
Manish Goregaokar
1154600dd4 stylo: Add bindings for fetching font metrics from Gecko 2017-04-10 14:16:02 +08:00
Manish Goregaokar
2febe7ccde stylo: Use font metrics provider as a cache for font size results 2017-04-09 19:15:37 +08:00
Manish Goregaokar
2ea8d61fbf stylo: Bypass cache when fetching font size prefs from Stylo 2017-04-09 17:44:00 +08:00
bors-servo
6020c2feeb Auto merge of #16314 - Wafflespeanut:bind, r=heycam
Include bindings for StyleGridTemplate

Servo-side changes for [Bug 1354775](https://bugzilla.mozilla.org/show_bug.cgi?id=1354775)

<!-- 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/16314)
<!-- Reviewable:end -->
2017-04-09 02:29:32 -05:00
Ravi Shankar
00bb0d6a12 Include bindings for StyleGridTemplate 2017-04-09 12:38:44 +05:30
Cameron McCormack
3f71c80e2f style: Handle TraversalRestyleBehavior::ForReconstruct in the Servo restyle. 2017-04-08 23:09:00 +08:00
bors-servo
d7fb2cc27f Auto merge of #16280 - hiikezoe:handle-base-style, r=heycam,birtles
Handle base style

<!-- Please describe your changes on the following line: -->
This is a PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1311257

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

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

<!-- 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/16280)
<!-- Reviewable:end -->
2017-04-05 22:53:30 -05:00
Xidorn Quan
ed5c49c102 Add std::atomic to opaque_types in build_gecko
Recent change in bug 1277709 makes ThreadSafeAutoRefCnt start using std::atomic, which somehow doesn't not have #[derive(Debug)] on Windows, which makes all objects which includes ThreadSafeAutoRefCnt to stop having #[derive(Debug)]. This breaks stylo build on Windows.

By adding it as an opaque type, std::atomic would derive Debug again.
2017-04-06 13:06:51 +10:00
Hiroyuki Ikezoe
56dc7294e5 Add FFI functions to get progress value and current position in a segment.
Two functions added in this patch get progress value from ComputedTiming
or get the position in a given AnimationPropertySegment.
Without these FFIs, we need to expose Maybe<> and Nullable<> and handle
them in Rust.
2017-04-06 10:30:39 +09:00
Hiroyuki Ikezoe
f1d3f23bfa Expose ComputedTiming to FFI.
This will be also used for animation value composition in Rust.
2017-04-06 10:30:38 +09:00
Hiroyuki Ikezoe
68be131165 Move AnimationPropertySegment in a separate header and expose it in FFI.
This will be used for animation value composition in Rust.
2017-04-06 10:30:37 +09:00
Xidorn Quan
0a97a0df0c Create URLExtraData for holding base uri, referrer, and principal. 2017-04-03 14:30:33 +10:00
bors-servo
54e2b7b2d5 Auto merge of #16192 - upsuper:bug1350810, r=emilio
Output binding files to dist dir in addition

https://bugzilla.mozilla.org/show_bug.cgi?id=1350810
2017-03-30 08:23:31 -05:00
Xidorn Quan
f3a5e28949 Output binding files to dist dir in addition. 2017-03-31 00:22:15 +11:00
Xidorn Quan
0a57dbc110 Provide @font-face rules for stylo backend. 2017-03-30 11:41:13 +11:00
Xidorn Quan
e0c9a3fa12 Add function for sugar of nsCSSValue. 2017-03-30 11:41:08 +11:00
Xidorn Quan
e36b92507e Add FFI for nsCSSFontFaceRule. 2017-03-30 10:46:46 +11:00
Xidorn Quan
83badaa718 Lots of fixup for the next patch. 2017-03-30 10:46:32 +11:00
Hiroyuki Ikezoe
4183b0dff2 Introduce UpdateAnimationTasks to perform a bunch of animation's tasks in a SequentialTask.
The UpdateAnimationsTasks is a bitflags and each bit is generated from
Gecko's UpdateAnimationsTasks (enum class) values for matching values
between C++ and Rust. For this reason, the bitflags is annotated as
(feature = "gecko"), as a result update_animations() which uses this bitflags
also became gecko-only function.
2017-03-27 17:38:09 +09:00
Manish Goregaokar
fddddc9711 stylo: Calculate font-size keywords based on base size
MozReview-Commit-ID: Ff6kt8RLChI
2017-03-24 10:54:06 -07:00
Bobby Holley
63e8367eee Don't resolve URLs at parse time for Stylo.
It's a bit unfortunate the use separate implementations of SpecifiedUrl for Servo
and Gecko, but they're different enough at this point that I don't think it really
makes sense to try to share everything. Splitting them out has some nice
simplifications as well.

I recognize that there's still some potential correctness issues for Servo using
the resolved URI in various places where the original URI may be the right thing,
but I've got too much on my plate to look into that for now.

MozReview-Commit-ID: BeDu93TQ4Ow
2017-03-22 19:11:30 -07:00
Boris Chiou
708f446364 Bug 1343153 - Support Servo_ParseEasing. 2017-03-21 16:34:58 +08:00
Emilio Cobos Álvarez
e348940296
stylo: Sequentialize binding generation if logging is enabled.
Otherwise the log is useless, and it's even slower than in parallel mode due to
the high lock contention.
2017-03-20 11:42:41 +01:00
Emilio Cobos Álvarez
a1930fc554
stylo: Add a build log mechanism.
MozReview-Commit-ID: 4Zo1EveUYkK
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-03-18 13:21:10 +01:00
Hiroyuki Ikezoe
254d5f6229 Drop Servo_AnimationValues_Uncompute. 2017-03-17 17:57:22 +09:00
Hiroyuki Ikezoe
52bee9a4cf Add AnimationValueMap and expose it in FFI.
Current Gecko composes all of effects in the composite order at once.
We can put each computed value into this AnimationValueMap every time composing
an effect.
2017-03-17 12:29:34 +09:00
Manish Goregaokar
6b9a6806b8 stylo: Support system colors
MozReview-Commit-ID: HUfTdcMRoEx
2017-03-15 22:33:45 -07:00
Manish Goregaokar
07723eba7a stylo: Implement remaining content values
MozReview-Commit-ID: 9fLM5bdR8hr
2017-03-14 09:24:58 -07:00
Xidorn Quan
3cbc1aa279 Add char_traits to blacklist 2017-03-14 15:54:19 +11:00
Hiroyuki Ikezoe
d8f08b80e0 Implement Gecko_StyleAnimationsEquals for checking nsStyleAutoArray<StyleAnimation> equality in servo side.
Later we update CSS animations if this function returns false.
2017-03-10 11:07:18 +09:00
Manish Goregaokar
eda6a4fc4f stylo: Pass parser URL data in Servo_DeclarationBlock_SetProperty*
MozReview-Commit-ID: EVk4aEoyiXv
2017-03-09 14:44:17 -08:00
Hiroyuki Ikezoe
b45e3f1011 Add RawGeckoComputedKeyframeValuesList in build_gecko.rs. 2017-02-24 19:13:04 +09:00
bors-servo
07debf5dc0 Auto merge of #15669 - upsuper:bindgen-arc-type, r=heycam
Read ServoArcTypeList.h for list of arc types

r? @heycam

<!-- 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/15669)
<!-- Reviewable:end -->
2017-02-21 18:56:41 -08:00
Xidorn Quan
c2de28de1a Read ServoArcTypeList.h for list of arc types 2017-02-22 11:51:44 +11:00