Commit graph

16155 commits

Author SHA1 Message Date
Hiroyuki Ikezoe
07421a8e9c Make replace_rules_internal return true only if important rules changed. 2017-08-03 07:18:32 +09:00
bors-servo
e07beacd4d Auto merge of #17944 - hiikezoe:display-property-animation, r=emilio
Display property animation for SMIL

<!-- Please describe your changes on the following line: -->
https://bugzilla.mozilla.org/show_bug.cgi?id=1385089

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

<!-- 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/17944)
<!-- Reviewable:end -->
2017-08-02 16:27:58 -05:00
DarkDrek
53476f2397 Replace downcast with is 2017-08-02 21:51:17 +02:00
bors-servo
3ef182ca36 Auto merge of #17945 - ferjm:typedef.dom.binding, r=jdm
Generate DOM bindings imports for webidl typedefs

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- 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/17945)
<!-- Reviewable:end -->
2017-08-02 13:22:32 -05:00
Manish Goregaokar
0e3f7d782b stylo: Disable text-zoom for <svg:text> 2017-08-02 10:25:55 -07:00
Manish Goregaokar
fb107d8cd5 stylo: Handle text-zoom for line-height 2017-08-02 10:25:43 -07:00
Manish Goregaokar
613012d9fb stylo: Handle text-zoom for scriptminsize 2017-08-02 10:25:27 -07:00
Manish Goregaokar
16d46eaf7a stylo: Handle text-zoom for font-size 2017-08-02 10:25:14 -07:00
Fernando Jiménez Moreno
354d94059b Generate DOM bindings imports for webidl typedefs 2017-08-02 13:15:45 +02:00
Hiroyuki Ikezoe
0841db70ee Set restyle subtree restyle hint if the element animates display style from 'none' to other.
When display style is changed from 'none' to other in animation-only restyle
we need to resolve descendant elements' style that were in the display:none
subtree.

Three possible ways to resolve the descendant elements' style;

1) Traversing unstyled elements in animation-only restyle
   We can't simply traverse unstyled elements in the animation-only restyle
   since when we decided to traverse the unstyled elements we don't know yet
   the elements will be initially styled or are in display:none subtree. It
   will result that the new elements are styled in animation-only restyle,
   it's undesirable.

2) Creating a SequentialTask and resolve the descendants' style with
   ServoStyleSet::StyleNewSubtree()
   We can't resolve the descendants' styles with ServoStyleSet::StyleNewSubtree()
   in SequentialTask since at the moment we are still in servo traversal (i.e.
   sInServoTraversal is true). That means AutoSetInServoTraversal fails
   in PrepareAndTraverseSubtree().

3) Creating a SequentialTask and set restyle subtree hint and defer descendants'
   restyle in a subsequent normal traversal
   Note that, when we process throttled animations flush, we don't process
   normal traversal so the descendants will not be traversed until normal
   restyle happens but it will not be a big problem since it's really rare
   that user clicks display animation element just at the right moment when
   display property changes from none to other.  Also, if it will be really
   a problem, we should process *only* transform animations on the compositor,
   it's ideally right thing to do. Display property never runs on the
   compositor.

This patch takes the third approach.
2017-08-02 18:35:01 +09:00
Hiroyuki Ikezoe
ffc01687e4 Move the logic for Servo_NoteExplicitHints into wrapper.rs.
In a subsequent patch in this series, we will call it from servo side.
2017-08-02 18:34:56 +09:00
bors-servo
de5f6f19bd Auto merge of #17943 - Manishearth:bump-au, r=emilio
Bump app units to 0.5.2

Prerequisite for landing text zoom stuff.

<!-- 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/17943)
<!-- Reviewable:end -->
2017-08-02 04:10:08 -05:00
Manish Goregaokar
507c20e2d9 Bump app units to 0.5.2 2017-08-02 01:24:37 -07:00
bors-servo
5fff90c73f Auto merge of #17883 - frewsxcv:frewsxcxv-lowercase, r=SimonSapin
Audit usages of unicode case-changing methods.

Part of https://github.com/servo/servo/issues/17777.

<!-- 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/17883)
<!-- Reviewable:end -->
2017-08-02 03:01:26 -05:00
Xidorn Quan
7a642dc952 Update binding files. 2017-08-02 10:35:20 +10:00
Xidorn Quan
ef4352d2a5 Add context-{fill,stroke}-opacity support to {fill,stroke}-opacity. 2017-08-02 10:35:18 +10:00
Xidorn Quan
7827ca6bb5 Make stroke-dasharray accept context-value. 2017-08-02 10:35:17 +10:00
Xidorn Quan
aa80859a71 Add SVGLength which accepts context-value, and use it for stroke-{width,dashoffset}. 2017-08-02 10:03:15 +10:00
Xidorn Quan
3991e7d344 Have CoordDataValue derive Debug and PartialEq. 2017-08-02 10:03:09 +10:00
Xidorn Quan
0071c7663f Add svg mods and move SVG-related types into them. 2017-08-02 10:03:08 +10:00
bors-servo
4d71eed898 Auto merge of #17929 - dadaa:make-grid-template-XX-animatable, r=hiro,waffles
Make grid-template-areas/columns/rows animatable

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

---
<!-- 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 test code is patch 4 in https://bugzilla.mozilla.org/show_bug.cgi?id=1379922

<!-- 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/17929)
<!-- Reviewable:end -->
2017-08-01 16:34:50 -05:00
Boris Zbarsky
2e02487526 Don't start kicking off work units during parallel stylo traversal until they're actually full.
This improves style sharing at the cost of a bit less parallelism.  Fixes Gecko
bug 1385982.  r=bholley
2017-08-01 15:59:31 -04:00
Manish Goregaokar
38ce1d96b1 Remove doc comment on statement
rustc warns about these now
2017-08-01 10:48:17 -07:00
Emilio Cobos Álvarez
8eef60ae1f
stylo: Fix restyle hint conversion to handle eRestyle_ForceDescendants correcty. 2017-08-01 17:13:01 +01:00
Daisuke Akatsuka
f4bd93ea38 Make grid-template-columns/rows animatable 2017-08-01 17:13:42 +09:00
Daisuke Akatsuka
2250e79976 Support calc for fit-content() 2017-08-01 17:13:01 +09:00
Daisuke Akatsuka
4dcc2d1c9d Make grid-template-areas animatable 2017-08-01 17:12:23 +09:00
Josh Matthews
4b736354c4 Report an error for invalid CSS color values (bug 1381143). 2017-07-31 16:49:53 -04:00
Alan Jeffrey
936dd3ef63 Speculatively evaluate paint functions during style. 2017-07-31 13:02:28 -05:00
Emilio Cobos Álvarez
eb08145b17
style: Update bindings. 2017-07-31 12:26:46 +02:00
Emilio Cobos Álvarez
c0922dabb6
style: Fix dynamic change handling of justify-items legacy values.
Bug: 1384542
Reviewed-by: heycam
MozReview-Commit-ID: NEPGlL4ri7
2017-07-31 11:55:06 +02:00
Emilio Cobos Álvarez
0e4c7c3722
style: Standardize different methods to inherit and reset properties.
This avoids special-casing justify-items.

MozReview-Commit-ID: FoEs2IHC1t6
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-07-31 11:55:05 +02:00
Emilio Cobos Álvarez
2d9255bff1
style: Get rid of GetParentAllowServo in implementation of CSS 'justify-items' property.
Bug: 1384542
Reviewed-by: heycam
MozReview-Commit-ID: 4qydjqSoVXs
2017-07-31 11:55:04 +02:00
Xidorn Quan
fbb569b0f2 Update binding files. 2017-07-31 14:32:08 +10:00
Xidorn Quan
a59fceeefc Handle device-pixel-ratio-webkit pref correctly. 2017-07-31 14:06:45 +10:00
Xidorn Quan
d34d662b82 Replace IsFramesTimingEnabled FFI function with direct pref cache access. 2017-07-31 14:06:37 +10:00
Xidorn Quan
e580b8acd8 Update binding files. 2017-07-30 20:15:42 +10:00
Cameron McCormack
4f525f6fa0 style: Preserve font-family identifier sequence when serializing. 2017-07-30 13:53:34 +08:00
Alan Jeffrey
d101f9c945 Implemented paint worklet arguments. 2017-07-29 15:32:13 -05:00
bors-servo
d859734702 Auto merge of #17918 - heycam:rule-hierarchy, r=emilio
style: Don't remain in an invalid state when encountering an at-rule in the wrong place.

Currently, attempting to parse an at-rule that is out of place, such as
an @import rule after a regular style rule, will cause the parser state
to be set to Invalid.  This will cause any following at-rule to be
rejected until we encounter a regular style rule, at which point we'll
go back to the Body state.  There's nothing in the CSS specs about
needing to reject all following at-rules (or, as the comment above
Invalid says, ignoring the entire rest of the style sheet).

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

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./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
- [ ] 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/17918)
<!-- Reviewable:end -->
2017-07-29 11:16:33 -05:00
bors-servo
e87d8af056 Auto merge of #17914 - cynicaldevil:new-parser-thread, r=emilio
Run the async HTML Tokenizer on a new thread

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

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

Follow up for #17565

<!-- 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/17914)
<!-- Reviewable:end -->
2017-07-29 10:08:11 -05:00
Nikhil Shagrithaya
6534b27495 Run the async HTML Tokenizer on a new thread 2017-07-29 19:32:35 +05:30
bors-servo
0337ebb5a9 Auto merge of #17916 - DarkDrek:Use_AntialiasMode_in_CanvasPaintThread_new, r=emilio
Use AntialiasMode in CanvasPaintThread::new

Change suggested in #17661

<!-- Please describe your changes on the following line: -->
I only changed `canvas_paint_thread.rs` since `CanvasPaintThread::start` is used outside of the current crate and `azure::azure_hl::AntialiasMode` isn't available there.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because @jdm said so

<!-- 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/17916)
<!-- Reviewable:end -->
2017-07-29 09:01:09 -05:00
Cameron McCormack
9c0ce7847f style: Don't remain in an invalid state when encountering an at-rule in the wrong place.
Currently, attempting to parse an at-rule that is out of place, such as
an @import rule after a regular style rule, will cause the parser state
to be set to Invalid.  This will cause any following at-rule to be
rejected until we encounter a regular style rule, at which point we'll
go back to the Body state.  There's nothing in the CSS specs about
needing to reject all following at-rules (or, as the comment above
Invalid says, ignoring the entire rest of the style sheet).
2017-07-29 21:01:35 +08:00
bors-servo
e5527362f7 Auto merge of #17908 - kvark:wr, r=emilio
WR multi-document update - try 2

<!-- Please describe your changes on the following line: -->
Combines #17892 with the patch to detach style_traits from webrender_api

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix  #17907

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

<!-- 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/17908)
<!-- Reviewable:end -->
2017-07-29 07:38:23 -05:00
bors-servo
6b320eaad3 Auto merge of #17906 - emilio:calc-bgsize, r=hiro,birtles
style: Don't unconditionally generate Calc values when converting background-size from Gecko.

Bug: 1385140
MozReview-Commit-ID: ERwq50WSvLV

<!-- 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/17906)
<!-- Reviewable:end -->
2017-07-29 06:41:27 -05:00
DarkDrek
67ceebbcb0 Use AntialiasMode in CanvasPaintThread::new
Change suggested in #17661
2017-07-29 13:22:40 +02:00
Xidorn Quan
dd2b851f93 Remove Gecko_GetMediaFeatures and access nsMediaFeatures::features directly. 2017-07-29 20:20:33 +10:00
Corey Farwell
befe538472 Utilize match_ignore_ascii_case! in more places. 2017-07-29 09:58:09 +00:00
Corey Farwell
6238035612 Minor refactorings for 'data-' attribute logic. 2017-07-29 09:58:03 +00:00