Commit graph

14661 commits

Author SHA1 Message Date
Anthony Ramine
fe19c3810c Derive ToCss for MozImageRect 2017-06-13 11:29:25 +02:00
Anthony Ramine
f658215f12 Fix Animatable impl for LengthOrPercentageOrNone 2017-06-13 10:19:23 +02:00
Anthony Ramine
43a5257a0c Introduce #[css(function)] for #[derive(ToCss)]
Any variant with this attribute gets serialised as a CSS function,
using the variant name as the function name.
2017-06-13 10:19:23 +02:00
Anthony Ramine
fd1ab75af9 Derive ToCss for ShapeRadius<L> 2017-06-13 10:19:23 +02:00
bors-servo
8449eb4a62 Auto merge of #17285 - heycam:newly-bound, r=bholley
geckolib: Don't panic when attempting to restyle an element with newly applied XBL bindings.

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

<!-- 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/17285)
<!-- Reviewable:end -->
2017-06-12 18:46:41 -07:00
Cameron McCormack
f989a2c21c style: Update Gecko bindings. 2017-06-13 08:30:45 +08:00
Xidorn Quan
cdc537f23e Bug 1331291 part 1 - Set stylesheet url_data correctly for import rule. 2017-06-13 10:07:06 +10:00
Simon Sapin
138c03b24d Stylo: avoid atom refcount traffic in ID selector matching 2017-06-13 00:51:41 +02:00
Simon Sapin
b82713924c Pre-compute classes and IDs case-sensitivity 2017-06-13 00:36:12 +02:00
Simon Sapin
9316c41bf7 Make MatchingContext::quirks_mode field private, add read-only accessor. 2017-06-13 00:35:56 +02:00
Simon Sapin
700aaf2bd6 Move MatchingContext to a new module 2017-06-13 00:31:29 +02:00
Simon Sapin
c5c1c1b350 Classes/IDs case-sensitivity: get quirks mode from matching context. 2017-06-13 00:27:41 +02:00
Simon Sapin
5bccf98aa4 ID and class selectors are ASCII case-insensitive in quirks mode.
https://bugzilla.mozilla.org/show_bug.cgi?id=1363778
2017-06-12 23:33:53 +02:00
Simon Sapin
524fcac191 Add Atom::to_ascii_lowercase 2017-06-12 23:33:15 +02:00
bors-servo
75d6796cbd Auto merge of #17281 - bholley:shrink_rule_again, r=emilio
Pack bloom filter hashes better and save a word on Rule

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

<!-- 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/17281)
<!-- Reviewable:end -->
2017-06-12 12:41:39 -07:00
Bobby Holley
a98fff1af8 Hoist ApplicableDeclaration{Block,List} into a separate file.
MozReview-Commit-ID: EXnAzfyoZ1e
2017-06-12 12:13:21 -07:00
Bobby Holley
0caad2ffdc Use even fewer bits for source order and shrink ApplicableDeclarationsBlock by another word.
MozReview-Commit-ID: 7B1i1g0HLTj
2017-06-12 12:13:16 -07:00
Bobby Holley
3afab1400a Make source_order u32 and shrink Rule.
MozReview-Commit-ID: AKNTZZqke1O
2017-06-12 12:13:10 -07:00
Bobby Holley
6e3e7b282c Pack the fourth ancestor hash into the upper byte of the first three hashes.
MozReview-Commit-ID: KbtKQzLmwVO
2017-06-12 12:13:04 -07:00
Bobby Holley
cf982d17b9 Shift by KEY_SIZE instead of something larger.
Currently all Gecko and Servo do the KEY_SHIFT thing, but there's no reason
we need to follow that here.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1371949#c10

MozReview-Commit-ID: CqNi7r9e5s0
2017-06-12 12:12:39 -07:00
bors-servo
dfffc72691 Auto merge of #17279 - emilio:no-viewport, r=bholley
style: Don't try to compute @viewport unnecessarily.

If the viewport rule is not enabled, there's just no point in computing it.

Bug: 1372058
2017-06-12 11:37:47 -07:00
Emilio Cobos Álvarez
f8755d6cf0
style: Don't try to compute @viewport unnecessarily.
If the viewport rule is not enabled, there's just no point in computing it.

Bug: 1372058
2017-06-12 20:36:37 +02:00
bors-servo
0c929ad3fd Auto merge of #17254 - servo:webidl, r=jdm
Update the WebIDL parser

<!-- 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/17254)
<!-- Reviewable:end -->
2017-06-12 07:37:49 -07:00
Fernando Jiménez Moreno
2cc940384d stylo: Implement GetSpecificity for ServoStyleRule 2017-06-12 14:40:16 +02:00
bors-servo
87140641a4 Auto merge of #16477 - sadmansk:url_param_browser, r=paulrouget
Pass URL to Browser::new(), delegate url checking logic to 3rd party

<!-- Please describe your changes on the following line: -->
1. Move the logic of computing the initial url from `opts.rs` to `/ports/servo/main.rs`
2. Add a `ServoUrl` argument to `Browser::new`

Based on the requested changes by @paulrouget:
>We can read the pref in main() instead. shell.homepage would be used if the url is not passed as an argument. I'm trying to decouple the "app" logic and the "web engine" logic. I think it's up to the app to set the initial URL, and I'm not sure the initial url should be part of opts.

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

<!-- Either: -->
- [ ] There are tests for these changes

<!-- 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/16477)
<!-- Reviewable:end -->
2017-06-11 21:16:06 -07:00
bors-servo
03074f4b0e Auto merge of #17270 - emilio:bindgen-does-bitfields-sort-of, r=wafflespeanut
stylo: Use bitfield accessors in string-cache.

<!-- 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/17270)
<!-- Reviewable:end -->
2017-06-11 10:31:00 -07:00
Emilio Cobos Álvarez
cb04ef933b
stylo: Use bitfield accessors in string-cache. 2017-06-11 18:39:25 +02:00
Emilio Cobos Álvarez
e3c4d03bde
style: Reduce some code duplication and ugliness when parsing identifiers. 2017-06-11 03:12:02 +02:00
Nazım Can Altınova
309531e5b3
stylo: Fix propagation of quirks mode information to servo side
It was getting inial value from gecko side before and that was always
eCompatibility_NavQuirks. Created an FFI to fetch quirks mode.
2017-06-10 22:18:49 +03:00
Nazım Can Altınova
15fe48f3f6
stylo: Support :hover and :active quirk 2017-06-10 22:18:32 +03:00
bors-servo
ff17af064b Auto merge of #17262 - Manishearth:bindings, r=Manishearth
Update bindings for StyleImageLayerRepeat

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

<!-- 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/17262)
<!-- Reviewable:end -->
2017-06-09 15:56:10 -07:00
bors-servo
061cb5f48e Auto merge of #16752 - jdm:css-parse-error, r=SimonSapin
Report more informative CSS errors

This requires https://github.com/servo/rust-cssparser/pull/143 for the final commit. There's no better way to split that work up, unfortunately, and it's extremely easy to bitrot. I would appreciate if we could expedite reviewing this work.

This is the work necessary to enable https://bugzilla.mozilla.org/show_bug.cgi?id=1352669. It makes sense to merge it separately because it's so much effort to keep it up to date with the ongoing Stylo work.

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

<!-- 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/16752)
<!-- Reviewable:end -->
2017-06-09 14:31:48 -07:00
Josh Matthews
27ae1ef2e7 Thread ParseError return values through CSS parsing. 2017-06-09 16:46:25 -04:00
Manish Goregaokar
fd0ac4f31e Update bindings for StyleImageLayerRepeat 2017-06-09 13:26:16 -07:00
bors-servo
1e1b7f6ac2 Auto merge of #17258 - jkl445:issue-17249, r=cbrewster
Reduce code duplication when adding a SessionHistoryChange

<!-- Please describe your changes on the following line: -->
Implemented add_pending_change method and refactored code to use this new method

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/17258)
<!-- Reviewable:end -->
2017-06-09 11:41:53 -07:00
Jeroen Kleijn
bca052e7b3 Reduce code duplication when adding a SessionHistoryChange 2017-06-09 19:50:40 +02:00
Josh Matthews
58e39bfffa The ParseErrorReporter trait no longer needs to be Send. 2017-06-09 13:16:39 -04:00
Josh Matthews
3773a4d499 Encapsulate CSS error reporter creation for stylo. 2017-06-09 13:16:38 -04:00
Josh Matthews
fd6e54d9e3 Report CSS parse errors via enum instead of strings. 2017-06-09 13:16:32 -04:00
bors-servo
88b47b0154 Auto merge of #17253 - dadaa:bug1368610, r=hiikezoe,nox,emilio
Bug1368610 - stylo: implement primitive (bit, uXX) type of discrete animatable properties

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

---
<!-- 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] There are tests for these changes. The tests will land in dom/animation/test of m-c. Test code is patch 6 of https://bugzilla.mozilla.org/show_bug.cgi?id=1368610

<!-- 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/17253)
<!-- Reviewable:end -->
2017-06-09 10:01:35 -07:00
bors-servo
e46aa87b4c Auto merge of #17255 - jdm:rmcssparser, r=metajack
Remove cssparser dependency from msg.

This applies the change from #17111 once more since it was reverted by an incorrect rebase.

<!-- 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/17255)
<!-- Reviewable:end -->
2017-06-09 07:51:33 -07:00
Daisuke Akatsuka
a3d2b67cd5 Implements properties that need to change only the animation type animatable 2017-06-09 23:47:07 +09:00
Daisuke Akatsuka
367c0a4b43 Implements numeric field type properties animatable 2017-06-09 23:46:51 +09:00
Josh Matthews
cf8cda1b23 Remove cssparser dependency from msg. 2017-06-09 10:46:47 -04:00
Daisuke Akatsuka
9751fb9358 Implements other bit type properties animatable 2017-06-09 23:46:37 +09:00
Daisuke Akatsuka
f358ec069c Implements gecko keyword bit type properties animatable 2017-06-09 23:46:28 +09:00
Daisuke Akatsuka
21b7b256c2 Implements bitflags properties animatable 2017-06-09 23:46:11 +09:00
bors-servo
1555f0fc41 Auto merge of #17215 - servo:derive-all-the-things, r=emilio
Derive more ToCss impls

<!-- 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/17215)
<!-- Reviewable:end -->
2017-06-09 05:00:45 -07:00
Anthony Ramine
e566bc7b1c Update the WebIDL parser 2017-06-09 13:57:30 +02:00
bors-servo
969047bb7c Auto merge of #17252 - heycam:flattened-tree, r=emilio
style: don't perform selector matching on the flattened tree

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

<!-- 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/17252)
<!-- Reviewable:end -->
2017-06-09 03:57:36 -07:00