Commit graph

16155 commits

Author SHA1 Message Date
bors-servo
31ea4208cf Auto merge of #16396 - hiikezoe:animation-restyle-propagate-fix, r=heycam
Preserve restyle hints other than animation hints in propagate() duri…

…ng animation-only restyle.

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

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

---
<!-- 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] These changes do not require tests because for stylo.

<!-- 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/16396)
<!-- Reviewable:end -->
2017-04-12 23:57:19 -05:00
bors-servo
9c0d8e44a0 Auto merge of #16258 - jdm:panic-at-the-ellipsis, r=pcwalton,stshine
Overwrite default RunInfo values with the first real ones encountered.

TextRunScanner::flush_clump_to_list compares the values in the RunInfo object against the ones determined from the current fragment, but these values can be arbitrary defaults that don't mean anything useful.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14783
- [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/16258)
<!-- Reviewable:end -->
2017-04-12 23:09:53 -05:00
Hiroyuki Ikezoe
69efaa09c9 Preserve restyle hints other than animation hints in propagate() during animation-only restyle. 2017-04-13 11:57:53 +09:00
bors-servo
53c47acfc4 Auto merge of #16364 - emilio:dynamic-not, r=bholley
style: Fix dynamic changes of attributes when combined with :not.

This makes the dependency tracker properly recurse into simple selectors inside the current complex selector to find the appropriate dependencies.

We can't still remove the outer visitor because we need it for stuff like `:not(.foo + bar)`, but I plan to get rid of it in a followup as long as try comes back green.

<!-- 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/16364)
<!-- Reviewable:end -->
2017-04-12 21:39:15 -05:00
Emilio Cobos Álvarez
fcce61ee10
stylo: Fix restyle hints check.
It's clearly wrong to use intersects() there, since the coming check may be a
bigger hint.

MozReview-Commit-ID: 1YZ8OD0ajSz
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-13 09:37:02 +08:00
Emilio Cobos Álvarez
a0c2bdf775
style: Smoke-test the dependency tracking logic.
MozReview-Commit-ID: J5HWdS1H49s
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-13 09:37:01 +08:00
bors-servo
9d5dde2604 Auto merge of #16384 - canaltinova:shape-outside, r=Manishearth
stylo: Implement shape-outside property

shape-outside property implemented.
r=Manishearth in bugzilla

---
<!-- 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 #15958 and [Bug 1355003](https://bugzilla.mozilla.org/show_bug.cgi?id=1355003)

<!-- 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/16384)
<!-- Reviewable:end -->
2017-04-12 19:04:28 -05:00
Josh Matthews
a20d0bccef Overwrite default RunInfo values with the first real ones encountered. 2017-04-13 09:56:48 +10:00
Dominik Boehi
ecab3cd796 Fix panic when font face name is not available 2017-04-12 20:36:27 +02:00
bors-servo
294f44eca0 Auto merge of #16382 - nox:calc-clamping, r=emilio
Don't reject out of bound calc() values at parsing-time

<!-- 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/16382)
<!-- Reviewable:end -->
2017-04-12 13:31:21 -05:00
bors-servo
43bd0cae0d Auto merge of #16360 - glennw:update-wr-borders, r=jdm
Update WR (gradients, batching, text run, border changes).

- Tidy and optimize the batching code.
- Support tiling / repeat for linear and radial gradients.
- Fix some edge cases of subpixel text AA.
- Add clip mask support to border shaders.
- Optimization to text run creation on CPU.
- Handle more box-shadow clipping cases.
- Fix a panic that could occur when window size is 0.
- Clip / scroll API improvements.

<!-- 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/16360)
<!-- Reviewable:end -->
2017-04-12 12:03:10 -05:00
Emilio Cobos Álvarez
9e33cd5643
style: Simplify dependency visitor, avoid tracking dependencies of nested complex selectors separately. 2017-04-13 01:01:00 +08:00
Emilio Cobos Álvarez
568fa4cc0d
style: Fix dynamic changes of attributes when combined with :not. 2017-04-13 01:00:59 +08:00
bors-servo
bc9d7863b6 Auto merge of #16348 - ferjm:issue-14824-unminify-js, r=jdm
Unminify JS and dump it to a file before executing it

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14824

<!-- 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/16348)
<!-- Reviewable:end -->
2017-04-12 11:11:23 -05:00
bors-servo
0912bd06d7 Auto merge of #16322 - tamamu:place-shorthand, r=upsuper
Implement alignment shorthand properties

<!-- Please describe your changes on the following line: -->
I implemented the shorthand properties, but it may includes some bugs.

Currently, `mach test-unit -p style` caught some errors (see #15954). I already tried `mach build-geckolib`, though there is no improvement. Please check my code.

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

<!-- Either: -->
- [x] 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/16322)
<!-- Reviewable:end -->
2017-04-12 10:35:54 -05:00
bors-servo
bb66bf81d5 Auto merge of #16378 - emilio:media-fixes, r=upsuper
stylo: A bunch of media query fixes.

<!-- 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/16378)
<!-- Reviewable:end -->
2017-04-12 10:00:26 -05:00
Emilio Cobos Álvarez
733be9a679
stylo: Update bindings. 2017-04-12 22:27:47 +08:00
Emilio Cobos Álvarez
ac7bc414d9
Bug 1325878: Pass the MediaList down to Servo, making <style media> work. r=xidorn
MozReview-Commit-ID: BUCSQJs2CNI
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-12 22:27:45 +08:00
Manish Goregaokar
6e842c373c stylo: Support mathsize, width, and scriptminsize presentation attributes in MathML 2017-04-12 22:16:01 +08:00
Manish Goregaokar
1ea8175163 stylo: Support most MathML presentation attributes 2017-04-12 22:15:57 +08:00
Manish Goregaokar
2e22a006db stylo: Support -moz-script-size-multiplier, -moz-script-level, -moz-math-display 2017-04-12 22:15:49 +08:00
Imanol Fernandez
0158b5b2af Implement Gamepad API 2017-04-12 15:43:14 +02:00
Emilio Cobos Álvarez
482740bb11
Bug 1325878: Rewrite insert_rule to avoid lock re-entrancy problems. r=xidorn
In particular, you can insertRule("@import url(\"already-loaded.css\");") and we
would try to clone the stylesheet, which without this change would borrow the
lock for reading.

MozReview-Commit-ID: 4jdNL5rngh7
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-12 21:24:53 +08:00
Emilio Cobos Álvarez
27ca9e0a46
Bug 1325878: Support deep-cloning of ServoMediaLists. r=xidorn
MozReview-Commit-ID: K7NFe1tKrAZ
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-12 21:24:52 +08:00
Emilio Cobos Álvarez
2999222436
Bug 1325878: Don't use nsMediaList for loading imports. r=xidorn
MozReview-Commit-ID: HR23bqZcmcA
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-12 21:24:51 +08:00
Nazım Can Altınova
d0619a7c5c
stylo: Implement shape-outside property 2017-04-12 16:06:03 +03:00
bors-servo
69eda6a60c Auto merge of #16063 - methyl:image-usemap-panics, r=nox
Avoid panics for empty or multibyte image usemap

<!-- Please describe your changes on the following line: -->
Some check were added to make sure we can call `split_at` with no risk of panics (when value is empty or the first char is multibyte).

---
<!-- 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 #15883 (github issue number if applicable).
- [x] There are tests for these changes

<!-- 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/16063)
<!-- Reviewable:end -->
2017-04-12 07:34:27 -05:00
Anthony Ramine
dfbd89860a Don't reject out of bound calc() values at parsing-time
https://bugzilla.mozilla.org/show_bug.cgi?id=1355014
2017-04-12 14:07:38 +02:00
bors-servo
e817666859 Auto merge of #16381 - BorisChiou:stylo/transition/use_computed_values, r=manishearth
stylo: Bug 1343753 - Use ComputedValues while updating transitions in Gecko

These are interdependent patches of Bug 1343753. We want to use ComputedValues and AnimationValues to start/update/stop the transitions.

---
<!-- 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 1343753.
- [X] These changes do not require tests because we have tests in Gecko already.

<!-- 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/16381)
<!-- Reviewable:end -->
2017-04-12 07:00:20 -05:00
Anthony Ramine
12d46e7d01 Rename AllowedNumericType to AllowedLengthType 2017-04-12 13:58:38 +02:00
bors-servo
528302a300 Auto merge of #16380 - upsuper:small-fixes, r=Manishearth
Some small fixes 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/16380)
<!-- Reviewable:end -->
2017-04-12 06:24:47 -05:00
bors-servo
5f6c27bb94 Auto merge of #16373 - jryans:at-page-viewport-units, r=emilio
Stylo: Disable viewport units for @page

Reviewed by @emilio in [bug 1353191](https://bugzilla.mozilla.org/show_bug.cgi?id=1353191).

---
- [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/16373)
<!-- Reviewable:end -->
2017-04-12 05:38:50 -05:00
Boris Chiou
51ad646c96 Bug 1343753 - Add Servo_Property_IsAnimatable.
MozReview-Commit-ID: 343Md43bpij
2017-04-12 18:32:53 +08:00
Boris Chiou
9a3905f834 Bug 1343753 - Pass None before change style to Gecko_UpdateAnimations.
CSS Transition is not supported yet, so use None as the parameter.

MozReview-Commit-ID: Kv77lN92ny5
2017-04-12 18:32:51 +08:00
Boris Chiou
28db6788b1 Bug 1343753 - Add Servo_Property_IsDiscreteAnimatable.
MozReview-Commit-ID: 5pMw7Wynv2q
2017-04-12 18:32:50 +08:00
Boris Chiou
2867bbcacc Bug 1343753 - Add Servo_Animationvalues_IsInterpolable.
MozReview-Commit-ID: gaj9lJ7NYV
2017-04-12 18:32:41 +08:00
Xidorn Quan
0df16cb22c Support stroke-dasharray: none
This should fix #16374.
2017-04-12 17:49:34 +08:00
Fernando Jiménez Moreno
11f227b4ff Inform about unminify errors and store unmodified version if js-beautify fails 2017-04-12 11:43:07 +02:00
Xidorn Quan
0da416f243 Add white-space: -moz-pre-space for geckolib 2017-04-12 17:42:46 +08:00
bors-servo
805b29cd53 Auto merge of #16371 - Manishearth:stylo-rel-base-size, r=heycam
stylo: Cascade relative font-sizes applied to keyword sizes

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

<!-- 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/16371)
<!-- Reviewable:end -->
2017-04-12 04:33:10 -05:00
Xidorn Quan
8fa0d37b1d Add prefix to middle-with-baseline 2017-04-12 17:11:22 +08:00
Manish Goregaokar
8b9163900d stylo: Cascade relative font-sizes applied to keyword sizes 2017-04-12 16:59:14 +08:00
Boris Chiou
4a1b812ee4 Bug 1343753 - Add Servo_AnimationValue_Uncompute.
MozReview-Commit-ID: KJnVbXmXlug
2017-04-12 16:50:23 +08:00
J. Ryan Stinnett
925af6c3f8 Disable viewport units in @page rules
Gecko disables viewport units in @page rules (bug 811391).  This makes the same
change in Servo.

MozReview-Commit-ID: 3KGiLGn619G
2017-04-12 16:40:57 +08:00
J. Ryan Stinnett
1a31b87c22 Pass ParserContext down to lengths
To make it possible to check the rule type when parsing lengths, we need to pass
the `ParserContext` down through many layers to the place where length units are
parsed.

This change leaves it unused, so it's only to prepare for the next change.

MozReview-Commit-ID: 70YwtcCxnWw
2017-04-12 16:40:48 +08:00
J. Ryan Stinnett
1ae1d370f2 Check context to test keyframe rule_type
Now that the `context` contains the `rule_type`, we can remove the `in_keyframe`
arg and check the `rule_type` to achieve the same thing.

MozReview-Commit-ID: oXrFBPuKMz
2017-04-12 16:40:37 +08:00
J. Ryan Stinnett
997015a4f7 Set rule_type in context when descending into any rule
Before, we only passed `rule_type` in specific cases where it was needed.  Now
that it's in `ParserContext`, it seems good to set it at each rule boundary, in
case we start to depend on the value in new places.

MozReview-Commit-ID: 7ZGD7NGZLR4
2017-04-12 16:40:28 +08:00
J. Ryan Stinnett
4574cd8ea6 Pull rule_type into ParserContext
Absorb `rule_type` into the `ParserContext` so that it's easier to pass down to
deeper levels of the parser.

MozReview-Commit-ID: DjBNytLxGKX
2017-04-12 16:40:17 +08:00
bors-servo
45f20f0bd6 Auto merge of #15666 - clementmiao:keyboard_shortcuts, r=asajeffrey
added keyboard shortcuts for navigation inside text box

PR to implement keyboard shortcuts per issue #12278, r? jdm

Thanks for letting me help!
---
<!-- 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 #12278 (github issue number if applicable).

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

<!-- 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/15666)
<!-- Reviewable:end -->
2017-04-12 03:01:16 -05:00
bors-servo
54ecfb155d Auto merge of #16369 - bholley:style_system_options, r=SimonSapin
Store style system options in the global style data and shared style context.

I wanted to add an environmental variable to disable the style sharing
cache for gecko, but the current pattern involves lazy_static!, which
involves an atomic operation on lookup, which is a bit hot to do each
time we try to share styles. This makes that work happen once per
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/16369)
<!-- Reviewable:end -->
2017-04-12 02:27:02 -05:00