Commit graph

6718 commits

Author SHA1 Message Date
Nazım Can Altınova
458b7682e6
Stylo: Add support for "font-family: -moz-fixed" 2017-03-12 00:57:20 +03:00
Manish Goregaokar
4deae33ab1 stylo: Make URLs work in inline style
MozReview-Commit-ID: 6Tc0kBw4V8c
2017-03-11 11:54:18 -08:00
bors-servo
06f99c13f2 Auto merge of #15913 - emilio:viewport-size, r=heycam,hiro
Use the proper viewport size for stylo

Reviewed upstream at [bug 1303229](https://bugzil.la/1303229).

<!-- 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/15913)
<!-- Reviewable:end -->
2017-03-11 04:40:31 -08:00
Emilio Cobos Álvarez
396fb62ca8
Bug 1303229: Get the proper viewport size for animations. r=hiro,heycam
While we're here, don't re-recompute the default computed values, just grab them
from the device.

MozReview-Commit-ID: GqqnPLIwN2F
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-03-11 11:54:14 +01:00
Emilio Cobos Álvarez
95ccfa748e
Bug 1303229: Get the proper viewport size for stylo. r=heycam
At least until we support scrollbars properly, this size is going to be the
correct one. I've left a TODO to grab the proper one once we support it.

This allows to trivially test viewport units for now.

MozReview-Commit-ID: JdaZ6WlZ2C6
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-03-11 11:54:12 +01:00
Emilio Cobos Álvarez
58c6aad1f0
style: Add the traversal kind to the style stats. 2017-03-11 11:31:11 +01:00
Emilio Cobos Álvarez
d3e7f1f0f4
style: Iterate the LRU cache contents from back to front.
We put the more recently used item last, so iterating then from left to right is
pointless.
2017-03-11 11:31:10 +01:00
Cameron McCormack
c0996c6536 stylo: Align eRestyle_Subtree value with RESTYLE_DESCENDANTS.
Handle the translation of eRestyle_Subtree into
(RESTYLE_SELF | RESTYLE_DESCENDANTS) in the From impl, too.
2017-03-11 09:33:55 +08:00
Nazım Can Altınova
bae7c50ef7
Fix wrong initial values in various single keyword properties 2017-03-10 17:18:22 +03:00
bors-servo
72128de681 Auto merge of #15901 - upsuper:text-align-last, r=Manishearth
Restore text-align-last removed in #15839 by mistake

<!-- 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/15901)
<!-- Reviewable:end -->
2017-03-09 21:03:10 -08:00
Xidorn Quan
4a897b25dc Restore text-align-last removed in #15839 by mistake 2017-03-10 15:35:24 +11:00
bors-servo
63bed27073 Auto merge of #15900 - hiikezoe:process-css-animations, r=heycam
Process css animations for gecko

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

---
<!-- 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 it's for stylo

<!-- 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/15900)
<!-- Reviewable:end -->
2017-03-09 20:23:21 -08:00
bors-servo
8b8eb5e192 Auto merge of #15896 - canaltinova:flex-basis, r=Manishearth
Change the predefined type of flex-basis and make gecko glue auto-generate

Gecko [doesn't support](https://bugzilla.mozilla.org/show_bug.cgi?id=1105111) content value in flex-basis yet. We had to change the predefined type to `LengthOrPercentageOrAuto` in stylo build.

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

<!-- Either: -->
- [X] These changes do not require tests because it's stylo glue change.

<!-- 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/15896)
<!-- Reviewable:end -->
2017-03-09 18:46:37 -08:00
Hiroyuki Ikezoe
f2c547aaaf Call UpdateAnimations even if the element has no computed values. 2017-03-10 11:37:06 +09:00
Hiroyuki Ikezoe
c32ba98031 Skip update_animations if we have no running animations and the element becomes display:none. 2017-03-10 11:37:05 +09:00
Hiroyuki Ikezoe
9ff99d4608 Update CSS animations in a SequentialTask.
We create the SequentialTask only if:

* We have no old computed values and we have animation name style in the new
  computed values.
* Any animation properties is changed.
* display property is changed from 'none' and we have animation name style.
* display property is changed to 'none'.

In a subsequent patch we skip the SequentialTask if we have no running
animations and the display propery is changed to 'none'.
2017-03-10 11:36:58 +09:00
Hiroyuki Ikezoe
fdb8c48094 Split off animation related process in a function. 2017-03-10 11:09:18 +09:00
Hiroyuki Ikezoe
22de4dc7a6 Add a utility function to convert PseudoElement to nsIAtom*.
MozReview-Commit-ID: 14qYFpiW0iG
2017-03-10 11:08:58 +09:00
Hiroyuki Ikezoe
d8f08b80e0 Implement Gecko_StyleAnimationsEquals for checking nsStyleAutoArray<StyleAnimation> equality in servo side.
Later we update CSS animations if this function returns false.
2017-03-10 11:07:18 +09:00
bors-servo
d124297456 Auto merge of #15839 - chenpighead:stylo-text-justify, r=upsuper
Stylo - gecko glue code for text-justify

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

Implement gecko glue for text-justify property.

Gecko has supported text-justify in [Bug 276079](https://bugzilla.mozilla.org/show_bug.cgi?id=276079), and going to pref-on on Nightly very soon in [Bug 1343512](https://bugzilla.mozilla.org/show_bug.cgi?id=1343512). Let's make it work for stylo.

---
<!-- 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
- [ ] 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/15839)
<!-- Reviewable:end -->
2017-03-09 17:57:15 -08:00
Hiroyuki Ikezoe
2892071ce7 Update bindings. 2017-03-10 10:55:00 +09:00
Jeremy Chen
6ff62b1c36 Stylo - gecko glue code for text-justify 2017-03-10 09:34:47 +08:00
Nazım Can Altınova
aa5477bd34
Change predefined type of flex-basis / make gecko glue auto-generate
Gecko doesn't support content value in flex-basis yet.
2017-03-10 03:14:06 +03:00
bors-servo
ee223798cc Auto merge of #15893 - Manishearth:stylo-svg-pres, r=bz
Support SVG presentation attributes

r=bz from https://bugzilla.mozilla.org/show_bug.cgi?id=1329093

<!-- 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/15893)
<!-- Reviewable:end -->
2017-03-09 15:02:06 -08:00
Manish Goregaokar
eda6a4fc4f stylo: Pass parser URL data in Servo_DeclarationBlock_SetProperty*
MozReview-Commit-ID: EVk4aEoyiXv
2017-03-09 14:44:17 -08:00
Manish Goregaokar
14d8eb93ba stylo: Handle SVG presentation attributes 2017-03-09 12:23:30 -08:00
bors-servo
5c46e86546 Auto merge of #15888 - emilio:caching, r=Ms2ger
style: Simplify style sharing code.

No functional changes, just some code cleanup.

<!-- 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/15888)
<!-- Reviewable:end -->
2017-03-09 11:33:33 -08:00
Emilio Cobos Álvarez
727be58b4a
style: Simplify style sharing code. 2017-03-09 19:31:03 +01:00
bors-servo
e7efdfc655 Auto merge of #15869 - Iakis:NegBordRad, r=Wafflespeanut
Reject negative border radius

Replacerd Parse in parse_one_set_of_border_values with parse_non_negative and added tests for it
---
<!-- 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 #15345 (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/15869)
<!-- Reviewable:end -->
2017-03-09 04:52:35 -08:00
#
f5253c9f09 Fix and tests for negative border radius 2017-03-09 07:48:51 -05:00
bors-servo
dc3b32c853 Auto merge of #15861 - projektir:make-text-decoration-testable, r=Wafflespeanut
Make text decoration testable and do not serialize initial text-decoration-style

Servo now uses the same name for the text-decoration-line longhand property as Gecko. This was done to enable testing of the text-decoration shorthand.

The text-decoration shorthand has been fixed to not serialize initial text-decoration-style.

---

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

---

- [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/15861)
<!-- Reviewable:end -->
2017-03-08 21:39:30 -08:00
projektir
b4c50de31e Don't serialize initial text-decoration-style #15790 2017-03-09 00:33:17 -05:00
bors-servo
2565242665 Auto merge of #15872 - servo:dedup, r=emilio
Fix debug assertion failure in gecko CI

<!-- 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/15872)
<!-- Reviewable:end -->
2017-03-08 13:35:40 -08:00
Simon Sapin
765be69780 Fix debug assertion failure https://bugzilla.mozilla.org/show_bug.cgi?id=1345483 2017-03-08 13:35:18 -08:00
Emilio Cobos Álvarez
1eb24f1adc
style: Allow trailing whitespace in a calc expression. 2017-03-08 17:07:54 +01:00
Emilio Cobos Álvarez
dae17dcaf3
style: Fix indentation in calc parsing code. 2017-03-08 16:54:10 +01:00
bors-servo
c11d398010 Auto merge of #15866 - servo:whitespace, r=nox
Require spaces around operators in calc() (fixes #15486)

<!-- 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/15866)
<!-- Reviewable:end -->
2017-03-08 06:12:54 -08:00
radhika2896
0138bbcdd1 Require spaces around operators in calc() (fixes #15486) 2017-03-08 14:32:25 +01:00
bors-servo
1f2e1e8b84 Auto merge of #15867 - servo:negative, r=nox
Reject negative factors in filter functions (fixes #15494)

<!-- 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/15867)
<!-- Reviewable:end -->
2017-03-08 05:28:59 -08:00
bors-servo
4fc7034370 Auto merge of #15856 - servo:dedup, r=Manishearth
Deduplicate declarations on insertion, not at the end of parsing a block

<!-- 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
- [x] These changes fix #15558 (github issue number if applicable).

<!-- Either: -->
- [ ] 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/15856)
<!-- Reviewable:end -->
2017-03-08 03:07:04 -08:00
Simon Sapin
446aaa5845 Better variable name, remove obsolete comment 2017-03-08 12:03:47 +01:00
Jason Tran
b7edf34c8c Reject negative factors in filter functions (fixes #15494) 2017-03-08 11:54:12 +01:00
bors-servo
ee3af09a8c Auto merge of #15863 - BorisChiou:animation/ns_timing_function, r=heycam
stylo: update ns_timing_function

This is an interdependent binding fix for [Bug 1248340](https://bugzilla.mozilla.org/show_bug.cgi?id=1248340).

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1248340](https://bugzilla.mozilla.org/show_bug.cgi?id=1248340)
- [X] These changes do not require tests because Bug 1248340 will merge some wpt tests for frames timing function.

<!-- 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/15863)
<!-- Reviewable:end -->
2017-03-07 23:03:21 -08:00
bors-servo
8ed29f4a96 Auto merge of #15843 - bzbarsky:split-anon-box-atoms, r=bzbarsky
Servo side of gecko bug 1343078: update bindinggen bits for the changes I'm making to Gecko atoms.

<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because they will get tested by Firefox CI.

<!-- 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/15843)
<!-- Reviewable:end -->
2017-03-07 22:28:02 -08:00
Boris Zbarsky
9a5a26078a Update bindinggen bits for gecko bug 1343078.
Both the set of atoms and the way they are represented in the atom list
is changing a bit.
2017-03-08 00:13:29 -05:00
Boris Chiou
0e97f07290 Bug 1248340 - Update bindgen. 2017-03-08 11:37:58 +08:00
Boris Chiou
510a4d05ba Bug 1248340 - Update the step data member in ns_timing_function.rs.
Replace mStep with mStepsOrFrames, and panic in From trait for frames timing
function.
2017-03-08 11:37:52 +08:00
Simon Sapin
60f454d7c4 Use a bitmap to optimize adding to a PropertyDeclarationBlock. 2017-03-07 23:37:32 +01:00
Simon Sapin
f70a49974a Make PropertyDeclarationBlock fields private 2017-03-07 23:37:32 +01:00
Simon Sapin
da4e5146e9 Make PropertyDeclarationBlock::important_count private. 2017-03-07 23:37:31 +01:00