Commit graph

465 commits

Author SHA1 Message Date
Boris Chiou
22d04e1a16 Bug 1335942 - Part 2: Support GetOpacity FFI. r=manishearth 2017-02-08 12:32:19 +08:00
Boris Chiou
c7dc3e4008 Bug 1335942 - Part 1: Introduce mozilla::AnimationValue. r=manishearth
Use AnimationValue to wrap StyleAnimationValue and RawServoAnimationValue.
2017-02-08 12:32:09 +08:00
Manish Goregaokar
34ba00e6d9 Basic handling framework for presentation attributes in Stylo, with handling for font-size and color
This introduces a basic framework for servo's style system to be able
to query the style of presentation attributes which it can then insert
into the cascade. It uses that framework to implement the size and
color attributes on <font>.

There are a number of improvements that can be done on top of this:

 - Implement all other properties
 - Abstractify the ruledata parameter of the mappers using templates or virtual dispatch so that it can be a Servo decl block instead
 - Implement aforementiond abstraction over Servo decl blocks (this obsoletes the code in the first item above, so it might just be better to skip that and directly do this)
 - Replace uses of nsHTMLStyleSheet with an abstract base class containing common elements between Servo and Gecko

I'd prefer for these to be done in separate steps.
2017-02-03 17:35:44 -08:00
Hiroyuki Ikezoe
d588427c2c Update bindings. 2017-02-04 08:54:37 +09:00
Hiroyuki Ikezoe
10b6c1bb4f Implement clone_transform.
The implementation of clone_transform is an adaptation of set_transform.

MozReview-Commit-ID: ESE1ha0x666
2017-02-04 08:54:00 +09:00
Emilio Cobos Álvarez
79d9e2bd51
BindgenUp 2017-02-03 21:31:55 +01:00
Bobby Holley
ae88d22399 Update bindings. 2017-02-02 14:32:22 -08:00
bors-servo
0459e1a6dd Auto merge of #15287 - hiikezoe:css-animation, r=heycam
Counter part of bug 1328787 - Stylo: Convert Servo's animation keyframes and store them into Gecko's keyframes

<!-- Please describe your changes on the following line: -->
Reviewed by @heycam, An exception is auto-generated bindgen stuff, I did not include it in patches on bugzilla.  The bindgen diff included in this PR was generated with  b5c94bad37.  It might be bit-rotted.

---
<!-- 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 gecko has test cases.

<!-- 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/15287)
<!-- Reviewable:end -->
2017-01-28 21:24:04 -08:00
Hiroyuki Ikezoe
51faa53ee2 Bug 1328787 - Part 7: Implement From for specified TransitionTimingFunction. r=heycam
Now animation-timing-function in keyframe is stored as specified
TransitionTimingFunction.  We need a way to convert it to nsTimingFunction too.

MozReview-Commit-ID: C8j5PmJFm2i
2017-01-29 09:07:41 +09:00
Hiroyuki Ikezoe
b7d7ec233b Update bindgen.
MozReview-Commit-ID: FDASu6yG306
2017-01-29 09:07:41 +09:00
Emilio Cobos Álvarez
a5bc898c21
Bug 1334579: Ensure constructors for nsStyleContentData run. r=bholley
MozReview-Commit-ID: 9Y6tQ6BD2c8
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-28 14:40:49 +01: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
ec19f7c7cc
Regenerate in-tree bindings.
MozReview-Commit-ID: 4mnAh9y7SY4
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-25 10:42:45 +01:00
Boris Chiou
19aea7ea78 Bug 1317209 - Part 5: Support transition cascade level. r=emilio
Support a new enum, EffectCompositor_CascadeLevel, which is an equivalent of
EffectCompositor::CascadeLevel in Gecko.
2017-01-24 18:44:07 +08:00
Boris Chiou
c09b204d5d Bug 1317209 - Part 3: Add TElement::get_animation_rule. r=heycam
We use TElement::get_animation_rule to get the animation rules from
Gecko side, which contain the interpolated values of the specific
element and the pseudo type.
2017-01-24 16:11:01 +08:00
Boris Chiou
1f1c67f485 Bug 1317209 - Part 2: Implement interpolate FFI. r=manishearth 2017-01-24 16:10:52 +08: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
Emilio Cobos Álvarez
182e0758f7
Regenerate bindings.
MozReview-Commit-ID: 4XEaLnhGSqT
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-18 14:39:26 +01: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
2dceb4502f
Bug 1331213: Add sugar for nsCSSValue and nsCSSValue::Array. r=heycam r=Manishearth
I will use this soon to implement the media query evaluation code.

Please review carefully.

MozReview-Commit-ID: HXelawXBfH8
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-17 14:05:34 +01:00
Emilio Cobos Álvarez
ad32f40e13
Bug 1331213: Add an API to drop a nsCSSValue in the stack. r=heycam
The getter function may create an nsCSSValue with allocated stuff, and we don't
want to leak it.

MozReview-Commit-ID: DYkUD8CW88E
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-17 14:05:32 +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
bors-servo
b9c6f9f76e Auto merge of #15040 - Manishearth:stylo-supports, r=heycam
stylo: support 1-arg CSS.supports()

r=heycam in https://bugzilla.mozilla.org/show_bug.cgi?id=1331316

<!-- 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/15040)
<!-- Reviewable:end -->
2017-01-16 13:56:51 -08:00
Manish Goregaokar
98fd42df17 stylo: support 1-arg CSS.supports() 2017-01-16 00:42:52 -08:00
Cameron McCormack
6ca0c10e79 stylo: Regenerate bindings. 2017-01-16 16:22:55 +08:00
bors-servo
4c401e47dc Auto merge of #14999 - Manishearth:stylo-prefs, r=heycam
stylo: Hook property parsing into Gecko prefs

r=heycam, https://bugzilla.mozilla.org/show_bug.cgi?id=1297322

This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14999)
<!-- Reviewable:end -->

<!-- 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/14999)
<!-- Reviewable:end -->
2017-01-14 09:23:05 -08:00
Hiroyuki Ikezoe
2d19e67fc4 Bug 1330824 - Add IndexMut for nsStyleAutoArray. r=heycam
MozReview-Commit-ID: 9EU8g4SLoHp
2017-01-14 11:42:23 +09:00
Hiroyuki Ikezoe
ce59a7e9ee Bug 1330824 - Add truncate for nsAString and nsACString. r=mystor
MozReview-Commit-ID: 2ND5ra3buxI
2017-01-14 11:42:22 +09:00
Manish Goregaokar
05728839f1 stylo: Hook property parsing into Gecko prefs
MozReview-Commit-ID: 7evWOUFwa3K
2017-01-13 14:22:16 -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
Hiroyuki Ikezoe
ff0819b2d4 Add impl From<nsTimingFunction> for TransitionTimingFunction and impl From<TransitionTimingFunction> for nsTimingFunction. r=heycam 2017-01-10 12:24:59 +09:00
Hiroyuki Ikezoe
98ed440597 Implement nsStyleAutoArray.ensure_len(). r=heycam 2017-01-10 12:24:59 +09:00
Hiroyuki Ikezoe
dc3b4803d1 Implement Index for nsStyleAutoArray. r=heycam 2017-01-10 12:24:59 +09: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
252766b76b stylo: Regenerate bindings. 2017-01-09 11:12:21 +08:00
Cameron McCormack
8f1f94d42b stylo: Regenerate bindings. 2017-01-07 09:46:34 +08:00
Xidorn Quan
e7e3889422 Add :-moz-browser-frame pseudo-class 2017-01-06 21:26:12 +11:00
Xidorn Quan
fa27ac0544 Add function to convert NonTSPseudoClass to CSSPseudoClassType 2017-01-06 21:25:45 +11:00
Xidorn Quan
0c913d5918 Make Gecko_ElementState return u16 2017-01-06 10:05:10 +11:00
Boris Zbarsky
dd80b5c0e7 Bug 1298588 part 15, servo piece. Rip out the initial() methods on style structs in stylo. r=bholley 2017-01-04 23:13:55 -05:00
Boris Zbarsky
c826b18f87 Bug 1298588 part 10, servo piece. Pass through useful default styles to apply_declarations(). r=bholley 2017-01-04 23:13:48 -05:00
Boris Zbarsky
d3e34db508 Bug 1298588 part 7, servo piece. Stop using initial_values in general in Gecko glue code. r=bholley 2017-01-04 23:13:43 -05:00
Boris Zbarsky
c313c8d17e Bug 1298588 part 6, servo piece. Stop using initial_values when doing inheritance in Gecko glue code. r=bholley 2017-01-04 23:13:42 -05:00
Boris Zbarsky
a5ac55c8ff Bug 1298588 part 4, servo piece. Recreate the default computed values for a document as needed. r=bholley 2017-01-04 23:13:39 -05:00
Boris Zbarsky
34bb2f1e6c Bug 1298588 part 3, servo piece. Add a default ComputedValues member to PerDocumentStyleData. r=bholley 2017-01-04 23:13:31 -05: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