Commit graph

2732 commits

Author SHA1 Message Date
zombiefungus
9591d1eda5 Remove obsolete paint threads option #16716 2017-05-07 14:00:25 -05:00
Boris Chiou
a46960dbfa Bug 1346052 - Add Servo_AnimationValue_Compute for AnimationValue::FromString.
We need this FFI to compute the AnimationValue from a property id and a
string.
2017-05-03 11:59:55 +08:00
Bobby Holley
d78ca4c4f9 Use StyleArc in the style system.
MozReview-Commit-ID: flF0fv9E9M
2017-05-02 17:35:44 -07:00
Brad Werth
2b6c494f85 Change StyleSet to track stylesheets by unique ID.
MozReview-Commit-ID: Ky3P53o4Euw
2017-05-02 13:38:13 -07:00
bors-servo
f779661392 Auto merge of #16690 - hiikezoe:multiple-properties-in-keyframe, r=birtles
Set multiple properties in a keyframe correctly.

This is a PR of https://bugzilla.mozilla.org/show_bug.cgi?id=1359669

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

<!-- 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/16690)
<!-- Reviewable:end -->
2017-05-02 06:03:40 -05:00
bors-servo
997a3e8374 Auto merge of #16691 - heycam:custom-prop-name, r=xidorn
style: Correctly serialize CSS Custom Property names.

From https://bugzilla.mozilla.org/show_bug.cgi?id=1361303, and reviewed by Xidorn over there.
2017-05-02 04:19:59 -05:00
Cameron McCormack
53eb1bb5c6 style: Correctly serialize CSS Custom Property names. 2017-05-02 17:18:37 +08:00
Hiroyuki Ikezoe
7ef036d120 Set multiple properties in a keyframe correctly. 2017-05-02 18:02:10 +09:00
bors-servo
f1ae547b9f Auto merge of #16688 - KuoE0:make-stylo-support-mozmm-unit, r=xidorn
Make stylo support mozmm unit

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

This issue is reported at https://bugzilla.mozilla.org/show_bug.cgi?id=1356104. Mozmm is defined at https://developer.mozilla.org/zh-TW/docs/Web/CSS/length.

---
<!-- 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 1356104](https://bugzilla.mozilla.org/show_bug.cgi?id=1356104)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because the tests already exist in Gecko.

<!-- 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/16688)
<!-- Reviewable:end -->
2017-05-02 02:27:39 -05:00
KuoE0
507c90d40b Make style system support mozmm unit and compute it correctly.
MozReview-Commit-ID: hCUs8xuNd1
2017-05-02 14:16:17 +08:00
Ting-Yu Lin
81fdd0bfc8 stylo: Parse eSafeAgentSheetFeatures as agent sheet
This was reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1321754

MozReview-Commit-ID: 7GdsOP8lBxk
2017-05-02 11:42:49 +08:00
Matt Brubeck
a239419cc0 Replace intrinsics::abort with process::abort 2017-05-01 13:47:31 -07: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
3b857f1c4e
style: Add a StyleBuilder struct to avoid refcount and atomic CAS during the cascade.
This should fix most of the complaints that caused
https://bugzilla.mozilla.org/show_bug.cgi?id=1360889 to be open, and also fix a
bunch of other FIXMEs across the style system.
2017-04-30 23:45:40 +02: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
bors-servo
22747e2763 Auto merge of #16642 - upsuper:bug1355394, r=heycam
stylo: Implement access to CSSSupportsRule

Servo side change of [bug 1355394](https://bugzilla.mozilla.org/show_bug.cgi?id=1355394).

<!-- 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/16642)
<!-- Reviewable:end -->
2017-04-28 05:11:04 -05:00
bors-servo
d8bcc0db1a Auto merge of #16609 - nox:quirks, r=Manishearth,emilio
Implement unitless length quirk

The Gecko side doesn't propagate its quirks mode yet.

<!-- 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/16609)
<!-- Reviewable:end -->
2017-04-27 22:32:24 -05:00
Xidorn Quan
767e10b29d Implement CSSOM support for @supports. 2017-04-28 09:11:01 +08:00
Xidorn Quan
f19b9763cf Move GetRules function into macro. 2017-04-28 09:10:52 +08:00
J. Ryan Stinnett
978239927d Port text-combine-upright writing mode fixup to Servo
Ports the Gecko fixup for text-combine-upright writing mode to Servo.  In
addition, this passes the current pseudo element (if any) down to the cascade
for use during the fixup process.

MozReview-Commit-ID: BkHd4AvSsOt
2017-04-27 11:39:59 -05:00
bors-servo
c633e291c9 Auto merge of #16630 - emilio:nac, r=bholley,hiro
Make stylo traverse Native Anonymous Content, fixing a bunch of restyle bugs.

<!-- 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/16630)
<!-- Reviewable:end -->
2017-04-27 07:39:42 -05:00
Emilio Cobos Álvarez
be0139ff3c
Bug 1331047: Implement the new traversal semantics for stylo. r=bholley,hiro
MozReview-Commit-ID: 4BXx9JpGZKX
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-27 14:26:48 +02:00
Emilio Cobos Álvarez
7a88ca284d
Bug 1336863: Ensure we don't restyle with outdated rules. 2017-04-27 13:08:27 +02:00
Anthony Ramine
37118e1e45 Implement the unitless length quirk for physical size extremums 2017-04-27 10:42:18 +02:00
Anthony Ramine
f68e2fded9 Propagate quirks mode all the way to ParserContext
The quirks mode is still not properly propagated in geckolib.
2017-04-27 10:41:55 +02:00
Brian Birtles
42cc886295 Make Servo_NoteExplicitHints allow multiple animation restyle hints, including SMIL
The existing code here appears to be wrong since we should allow *both*
animation and transition restyles to appear at the same time. This patch
fixes the assertion and subsequent check and also extends it to support
all animation restyle hints, including SMIL.
2017-04-27 13:20:39 +09: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
bors-servo
dc594face8 Auto merge of #15794 - paulrouget:head_parsed_url, r=asajeffrey
Notify embedder when history changes

`WindowMethods::set_page_url` is only called when the embedder set the URL. It is not called when the page url is updated. I believe that instead we should just pass the URL to `head_parsed`.

---
<!-- 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 #15439 #15643 and #15642 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because I'm not sure how to test that

<!-- 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/15794)
<!-- Reviewable:end -->
2017-04-25 14:14:31 -05:00
bors-servo
7aeed78eef Auto merge of #16570 - Manishearth:scriptmin-parent, r=heycam
Compute scriptminsize against the parent font base size

It's supposed to be, because it is used in the computation of the font size, so we can't have the current font size as a dependency.

http://searchfox.org/mozilla-central/rev/7aa21f3b531ddee90a353215bd86e97d6974e25b/layout/style/nsRuleNode.cpp#3842

<!-- 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/16570)
<!-- Reviewable:end -->
2017-04-25 13:06:23 -05:00
Aaron Cunningham
f03ddf6c6c Fix various build warnings
This should remove six separate warnings when building servo. One of
the warnings was an unused mut, and the other were various dead code
warnings
2017-04-24 22:54:06 -07:00
bors-servo
e3e10ada09 Auto merge of #16589 - servo:cssparserup, r=emilio
Update to cssparser 0.13

https://github.com/servo/rust-cssparser/pull/140

<!-- 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/16589)
<!-- Reviewable:end -->
2017-04-24 18:47:00 -05:00
Simon Sapin
11cef135e7 Update to cssparser 0.13 2017-04-25 01:45:33 +02:00
Simon Sapin
7fe57ecaea Rename StdoutErrorReporter to RustLogReporter. 2017-04-24 08:23:41 +02:00
bors-servo
dfe0f4c201 Auto merge of #16575 - emilio:cleanup-matching, r=Wafflespeanut
style: trivially cleanup the matching code.

I'm reworking this, and found this cleanup that I think is worth to land.

<!-- 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/16575)
<!-- Reviewable:end -->
2017-04-23 04:55:34 -05:00
Emilio Cobos Álvarez
7bdd614540
style: trivially cleanup the matching code.
I'm reworking this, and found this cleanup that I think is worth to land.
2017-04-23 01:52:22 +02:00
bors-servo
f795eb1a8b Auto merge of #16550 - froydnj:gecko-bindings-gecko-debug, r=froydnj
switch gecko_bindings over to the gecko_debug feature [DO NOT MERGE]

...so that they use the correct Gecko structs regardless of whether Rust
code is being compiled with debug assertions or not.

This is the second part of the Servo-side changes for https://bugzilla.mozilla.org/show_bug.cgi?id=1357556

- [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 building is a sufficient test.

<!-- 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/16550)
<!-- Reviewable:end -->
2017-04-22 18:40:47 -05:00
Nathan Froyd
7c6fda8ea9 switch gecko_bindings over to the gecko_debug feature
...so that they use the correct Gecko structs regardless of whether Rust
code is being compiled with debug assertions or not.
2017-04-22 17:00:24 -04:00
Manish Goregaokar
275e94d718 Compute scriptminsize against the parent font base size
MozReview-Commit-ID: Jf35S4GzkpN
2017-04-21 21:19:59 -07:00
Manish Goregaokar
8bfcc6992e tidy and test fixes 2017-04-21 14:53:27 -07:00
Manish Goregaokar
b0dcb72722 stylo: System font support for keyword font longhands 2017-04-21 14:53:18 -07:00
Manish Goregaokar
c1c4c8fa59 stylo: Add basic system font support, use for font-size and font-family 2017-04-21 14:53:09 -07:00
Imanol Fernandez
7a2a90959e Android life cycle improvements and Gradle integration 2017-04-21 18:24:10 +02:00
Boris Chiou
f8ac48b78d Bug 1332633 - Part 2: Implement the FFI for compute distance.
This FFI will be used by nsDOMWindowUtils::ComputeAnimationDistance,
which will be implemented in another bug.

MozReview-Commit-ID: 6KmMmRiYIew
2017-04-21 11:58:57 +08:00
Nathan Froyd
7249d5f4f1 add the gecko_debug feature
debug_assertions is not a reliable guide to whether Gecko C++ code is
being compiled with debugging assertions, since we can now compile Gecko
with --enable-optimize --disable-debug --enable-rust-debug: Gecko will
be compiled without debugging assertions (and debugging struct layouts)
and Rust code will be compiled with debug_assertions.  The struct
mismatches in the binding layer lead to startup crashes.

This feature is not presently used, but will be set by some Gecko-side
changes and then used by some Servo-side changes.  These changes need to
be made first so that CI on both sides works correctly at all
intermediate stages along the way.
2017-04-20 16:13:15 -04:00
bors-servo
5274991545 Auto merge of #16516 - emilio:stylesheet-handling, r=bholley
stylo: Centralize stylesheet handling.

This is needed for both bug 1357461 and bug 1273303, where I plan to add smarter
invalidations than what we have now.

Also, it's cleaner.

Ideally I'll move this onto stylist, though that may require extra work to make
it work fine for Servo, so for now let's just do the obvious thing.

<!-- 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/16516)
<!-- Reviewable:end -->
2017-04-19 03:41:08 -05:00
Emilio Cobos Álvarez
97235d0bf7
stylo: Centralize stylesheet handling.
This is needed for both bug 1357461 and bug 1273303, where I plan to add smarter
invalidations than what we have now.

Also, it's cleaner.

Ideally I'll move this onto stylist, though that may require extra work to make
it work fine for Servo, so for now let's just do the obvious thing.
2017-04-19 09:41:36 +02:00
coalman
fc34b9a14d Fix indentation errors in servo rust code that tidy now finds. 2017-04-18 14:56:13 -04:00
bors-servo
967fef15de Auto merge of #16390 - jonathandturner:real_win_keydown_fix, r=jdm
Add back in last keydown fixes

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

This is a follow-up PR to https://github.com/servo/servo/pull/16198

The approved patch included these changes as well, but I accidentally excluded them from the squash that landed.

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` 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 they are part of previously reviewed code

<!-- 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/16390)
<!-- Reviewable:end -->
2017-04-18 04:17:01 -05:00
Paul Rouget
e493548135 Notify embedder when history changes 2017-04-18 07:32:35 +02:00
bors-servo
a914409f5e Auto merge of #16498 - paulrouget:scroll_lock, r=jdm
Properly modify scroll_location

As described in #16442, scroll orientation is not locked. `delta` was copied.

<!-- 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/16498)
<!-- Reviewable:end -->
2017-04-17 10:54:23 -05:00