Hiroyuki Ikezoe
33e16fe630
Support currentColor for fill and stroke.
2017-05-30 15:44:05 +09:00
Cameron McCormack
d0d43707fb
style: Support a restyle hint that indicates all descendants must be recascaded.
...
This also moves the result of deciding whether to recascade from the
RestyleData into the RestyleHint.
2017-05-30 09:14:23 +08:00
bors-servo
085743560c
Auto merge of #17086 - upsuper:bug1352968, r=heycam
...
Add CSSOM support of @import rule for stylo
This is the Servo side change of [bug 1352968](https://bugzilla.mozilla.org/show_bug.cgi?id=1352968 ).
<!-- 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/17086 )
<!-- Reviewable:end -->
2017-05-29 18:51:45 -05:00
Xidorn Quan
571d4c272b
Update binding files.
2017-05-30 09:41:31 +10:00
Xidorn Quan
33deafba12
Add basic CSSOM support for @import rule.
2017-05-30 09:41:30 +10:00
bors-servo
76daf46295
Auto merge of #17073 - upsuper:flex-basis-zero, r=emilio
...
Set flex-basis to 0% when omitted in flex shorthand.
This should fix [bug 1331530](https://bugzilla.mozilla.org/show_bug.cgi?id=1331530 ).
<!-- 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/17073 )
<!-- Reviewable:end -->
2017-05-29 17:58:44 -05:00
Xidorn Quan
acb7242304
Set flex-basis to 0% when omitted in flex shorthand.
2017-05-30 08:58:11 +10:00
Emilio Cobos Álvarez
0adc02a317
style: Avoid some cfg checks in context.rs
2017-05-29 23:24:06 +02:00
Emilio Cobos Álvarez
10bd5636dc
style: Allow sharing style for elements with presentational hints.
2017-05-29 23:12:44 +02:00
Emilio Cobos Álvarez
03952a0c27
style: Also cache the class list in the CurrentElementInfo.
...
This patch also removes all notion of style sharing from matching.rs, which is
nice.
2017-05-29 22:54:17 +02:00
Emilio Cobos Álvarez
abcc9b301c
style: Add a CachedStyleSharingData to hold the candidate class list and revalidation results.
2017-05-29 21:56:21 +02:00
Emilio Cobos Álvarez
fb6339bbf9
style: rewrap some comments to 80 columns for consistency with the rest of the code.
2017-05-29 21:39:41 +02:00
Emilio Cobos Álvarez
544e0f4cd6
style: Allow ApplicableDeclarationBlocks to be compared.
...
We'll need this to cache pres hints, which generate these.
2017-05-29 21:38:21 +02:00
Emilio Cobos Álvarez
3ebd48039e
style: Allow StyleSource to be compared.
2017-05-29 21:31:04 +02:00
bors-servo
939716a7bc
Auto merge of #17078 - emilio:stylesheet-invalidation-scopes, r=heycam
...
stylo: Avoid restyling the whole document when adding stylesheets.
This is for bug 1357583.
<!-- 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/17078 )
<!-- Reviewable:end -->
2017-05-29 14:19:16 -05:00
Emilio Cobos Álvarez
9c77dd8de6
style: Sync bindings.
2017-05-29 20:27:47 +02:00
Emilio Cobos Álvarez
7c5fabaf83
Bug 1357583: Avoid unconditionally popping under RulesIterator. r=heycam
...
Not sure it's worth it, really, but seemed like it could be.
Feel free to r- if it doesn't feel like it.
MozReview-Commit-ID: HTsBNfEqQy4
2017-05-29 20:27:45 +02:00
Emilio Cobos Álvarez
ac5872b48c
Bug 1357583: style: Make effective_rules return an iterator, stop refcounting the Device. r=heycam
...
This makes the code cleaner, and also documents the fact that effective_rules
recurses into imports.
No we're not adding the imported stylesheets twice, and we share code with the
invalidation analysis.
MozReview-Commit-ID: DOF2AViTlmR
2017-05-29 20:27:43 +02:00
Emilio Cobos Álvarez
ebd6f47be3
Bug 1357583: style: Recurse into @import rules when looking at the added rules. r=heycam
...
Apparently my whole conception of how the list of sheets in the styleset looked
like was flawled, and we only ever get one append_sheet for the topmost
stylesheet, instead of one for each.
MozReview-Commit-ID: FMClygMJkTc
2017-05-29 20:27:41 +02:00
Emilio Cobos Álvarez
f569274cca
Bug 1357583: Add a bunch of logging, shortcuts, and look also at the rightmost selector while invalidating sheets. r=heycam
...
MozReview-Commit-ID: 2XGcOCTa7MV
2017-05-29 20:27:38 +02:00
Emilio Cobos Álvarez
39e836966e
Bug 1357583: style: Hook up the invalidator in the StyleSheetSet. r=heycam
...
MozReview-Commit-ID: IhgKAovTJMX
2017-05-29 20:27:36 +02:00
Emilio Cobos Álvarez
658075af32
Bug 1357583: style: Add an initial version of the stylesheet invalidation code. r=heycam
...
MozReview-Commit-ID: 4jLxPYNF07U
2017-05-29 20:15:35 +02:00
bors-servo
63533ce72a
Auto merge of #17075 - dadaa:bug1367283, r=hiikezoe
...
Bug1367283
<!-- Please describe your changes on the following line: -->
This PR is to fix https://bugzilla.mozilla.org/show_bug.cgi?id=1367283
---
- [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. The tests will land in dom/animation/test of m-c. Test code is patch 9 of https://bugzilla.mozilla.org/show_bug.cgi?id=1367283
<!-- 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/17075 )
<!-- Reviewable:end -->
2017-05-29 12:44:38 -05:00
daisuke
8a5c7a50d1
Implements box related discrete animatable properties
2017-05-29 23:10:04 +09:00
daisuke
f46678cea8
Implements position related discrete animatable properties
2017-05-29 23:10:02 +09:00
daisuke
545a7420c8
Implements xul related discrete animatable properties
2017-05-29 23:10:00 +09:00
daisuke
1a915fa07c
Implements svg related discrete animatable properties
2017-05-29 23:09:58 +09:00
daisuke
23e673f2a2
Implements ui related discrete animatable properties
2017-05-29 23:09:30 +09:00
Matthew
c26fb34108
Using stack-allocated variable for font feature setting
2017-05-29 08:39:39 -04:00
daisuke
3e37278d9e
Implements pointing related discrete animatable properties
2017-05-29 16:09:57 +09:00
daisuke
d0cf7d65f0
Implements background related discrete animatable properties
2017-05-29 16:09:20 +09:00
daisuke
917dbdfdbd
Implements simple discrete animatable properties
2017-05-29 16:08:09 +09:00
Nicholas Nethercote
6d5b1242db
Introduce and start using the MallocSizeOf trait.
...
MallocSizeOf is similar to the existing HeapSizeOf trait from the
heapsize crate. The only difference is that MallocSizeOf's
malloc_size_of_children() function takes an additional MallocSizeOfFn
argument, which is used to measure heap blocks. This extra argument
makes MallocSizeOf match how Gecko's memory measurements work, and is
required for Stylo to integrate with DMD.
The patch also introduces a second trait, MallocSizeOfWithGuard, which
is much the same as MallocSizeOf, but with a |guard| argument for the
global style lock.
Finally, the patch uses the new traits to measure a small amount of
Stylo's memory usage.
2017-05-29 10:16:55 +10:00
Anthony Ramine
862fc4f88d
Rename BorderRadiusSize to BorderCornerSize
2017-05-29 00:58:53 +02:00
Anthony Ramine
af3ede418b
Refactor BorderRadius and move it to the border modules
...
BorderRadius now parses itself reusing Rect<T>.
2017-05-28 14:36:37 +02:00
Anthony Ramine
4144dc74db
Make Rect<T> a struct tuple
...
It makes no sense to have named fields in some cases, notably to reuse
Rect<T> in BorderRadius<T>.
2017-05-28 14:36:36 +02:00
bors-servo
369d5cf124
Auto merge of #17058 - Manishearth:stylo-randomprops, r=emilio
...
stylo: Support remaning longhands
r=xidorn https://bugzilla.mozilla.org/show_bug.cgi?id=1367275
<!-- 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/17058 )
<!-- Reviewable:end -->
2017-05-27 13:37:59 -05:00
Manish Goregaokar
ccccfb988a
stylo: Support -moz-min-font-size-ratio
2017-05-27 11:37:36 -07:00
Manish Goregaokar
de269b6b36
stylo: Support -moz-context-properties
2017-05-27 10:47:44 -07:00
Manish Goregaokar
9ed5a7a05e
stylo: Support font-variation-settings
2017-05-27 10:47:43 -07:00
bors-servo
6b1f039205
Auto merge of #17060 - upsuper:bug1363596, r=heycam
...
Support symbols() function and string value for list-style-type for stylo
This is the Servo side change of [bug 1363596](https://bugzilla.mozilla.org/show_bug.cgi?id=1363596 ).
<!-- 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/17060 )
<!-- Reviewable:end -->
2017-05-27 07:09:30 -05:00
Xidorn Quan
a4674554e7
Update binding files.
2017-05-27 21:52:00 +10:00
Xidorn Quan
505809528c
Add string support for list-style-type.
2017-05-27 21:51:58 +10:00
Xidorn Quan
1df685dc40
Add support for symbols() function.
2017-05-27 20:45:58 +10:00
Xidorn Quan
9f4a78c2d0
Merge nsCOMPtr<nsIAtom> into CounterStylePtr.
2017-05-27 20:45:51 +10:00
bors-servo
7275f65981
Auto merge of #17036 - servo:derive-all-the-things, r=emilio
...
Use values::generics::rect::Rect some more
<!-- 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/17036 )
<!-- Reviewable:end -->
2017-05-27 05:41:12 -05:00
Xidorn Quan
856c296304
Update binding files from autoland.
2017-05-27 20:39:54 +10:00
Simon Sapin
4e4b5ab5c8
Decode UTF-8 code points across network packets
2017-05-27 09:01:45 +02:00
Manish Goregaokar
dd1cc6bb45
stylo: Support -moz-window-shadow
2017-05-26 22:34:03 -07:00
Manish Goregaokar
fae851b995
stylo: Support column-span
2017-05-26 22:33:05 -07:00