Boris Chiou
1e29e64000
Implement the Servo parser for font descriptors Web API.
...
According to the spec, this parser should follow what we do for
@font_face rule, so we use the same type to parse the input, instead of
using the parser of their specified values.
2017-12-05 21:33:07 +08:00
bors-servo
8f30880d36
Auto merge of #19493 - emilio:chrome-perf, r=xidorn,Manishearth
...
style: Some stylo-chrome perf tweaks.
<!-- 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/19493 )
<!-- Reviewable:end -->
2017-12-05 06:05:25 -06:00
Emilio Cobos Álvarez
bd890cc9bc
style: Sharing formatting nits.
...
MozReview-Commit-ID: 3tSiyBquR1v
2017-12-05 11:21:32 +01:00
Emilio Cobos Álvarez
720b88b028
style: Inline Gecko_GetSMILOverrideDeclarationBlock.
...
Bug: 1422641
Reviewed-by: xidorn, Manishearth
MozReview-Commit-ID: E8cM7zRZHn1
2017-12-05 11:21:31 +01:00
Emilio Cobos Álvarez
ecb92065d3
style: Inline Gecko_Namespace.
...
Bug: 1422636
Reviewed-by: xidorn
MozReview-Commit-ID: FFdmaYCDxnv
2017-12-05 11:13:10 +01:00
Emilio Cobos Álvarez
026bacafb3
style: Inline the Rust bits of GetDocumentState.
...
Bug: 1422633
Reviewed-by: xidorn
MozReview-Commit-ID: 9zvZF72ljS
2017-12-05 11:12:54 +01:00
Emilio Cobos Álvarez
dcd81b92e0
style: Update bindings.
2017-12-05 11:07:37 +01:00
Emilio Cobos Álvarez
23d69ea77d
style: Support calc() in color functions.
2017-12-05 10:06:24 +01:00
Emilio Cobos Álvarez
e91c9ec7fe
style: Formatting nits in color parsing.
2017-12-05 10:01:37 +01:00
Emilio Cobos Álvarez
ea5efd9e2f
style: Update cssparser to 0.23.
2017-12-05 10:01:37 +01:00
Cameron McCormack
64c5a8a6e8
style: Regenerate Gecko bindings.
2017-12-05 13:22:22 +08:00
Cameron McCormack
7015d5b22e
style: Add a new CSS error type for lone value parsing errors.
...
This allows us to report errors in functions that want to just parse a
single CSS value, rather than a value for a particular property declaration.
The one value type that we need to support for now is <color> value parsing
errors, so just add formatting/support for that.
2017-12-05 13:22:22 +08:00
bors-servo
5bfab782ec
Auto merge of #19489 - heycam:counter-parse-2, r=upsuper
...
add FFI functions for Gecko @counter-style value parsing
Trying to land #19441 again.
<!-- 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/19489 )
<!-- Reviewable:end -->
2017-12-04 21:22:50 -06:00
Cameron McCormack
c5a3d752b8
style: Regenerate Gecko bindings.
2017-12-05 10:11:48 +08:00
Cameron McCormack
c49554d4c4
style: Add FFI function to parse a @counter-style descriptor.
2017-12-05 10:04:52 +08:00
Cameron McCormack
374f0091c1
geckolib: Add FFI function to parse a @counter-style name.
2017-12-05 10:04:52 +08:00
bors-servo
68cefb1b00
Auto merge of #19385 - tigercosmos:b1, r=KiChjang
...
implement "Date type inputs", "Month type inputs"
<!-- Please describe your changes on the following line: -->
implement "Date type inputs", "Month type inputs"
---
<!-- 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] `./mach test-unit` 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/19385 )
<!-- Reviewable:end -->
2017-12-04 19:58:08 -06:00
tigercosmos
927fd1d044
implement "Date type inputs", "Month type inputs"
2017-12-05 09:44:51 +08:00
Gecko Backout
25436276ae
Backed out 1 changesets because the gecko part (bug 1420117) has to be backed out for the mochitests r=backout on a CLOSED TREE
...
Backed out changeset baada68cad47
Backs out https://github.com/servo/servo/pull/19441
2017-12-05 00:18:35 +00:00
bors-servo
eed3adc957
Auto merge of #19379 - SWW13:htmlinput_sanitize_time, r=KiChjang
...
Implemented sanitize_value for time input
Implemented value sanitization for `<input type=time/>`.
The value has the be valid time string (https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-time-string ) or set to empty string.
---
The following test results look expected to me, but I'm not sure:
```
▶ Unexpected subtest result in /html/semantics/forms/the-input-element/type-change-state.html:
│ FAIL [expected PASS] change state from time to text
│ → assert_equals: input.value should be foobar after change of state expected " foobar " but got ""
│ FAIL [expected PASS] change state from time to search
│ → assert_equals: input.value should be foobar after change of state expected " foobar " but got ""
│ FAIL [expected PASS] change state from time to tel
│ → assert_equals: input.value should be foobar after change of state expected " foobar " but got ""
│ FAIL [expected PASS] change state from time to url
│ → assert_equals: input.value should be foobar after change of state expected "foobar" but got ""
│ FAIL [expected PASS] change state from time to password
│ → assert_equals: input.value should be foobar after change of state expected " foobar " but got ""
│
│ @http://web-platform.test:8000/html/semantics/forms/the-input-element/type-change-state.html:53:15
│ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1489:20
│ test@http://web-platform.test:8000/resources/testharness.js:511:9
└ @http://web-platform.test:8000/html/semantics/forms/the-input-element/type-change-state.html:37:9
▶ Unexpected subtest result in /html/semantics/forms/the-input-element/type-change-state.html:
│ FAIL [expected PASS] change state from color to time
│ → assert_equals: input.value should be #000000 after change of state expected "#000000 " but got ""
│
│ @http://web-platform.test:8000/html/semantics/forms/the-input-element/type-change-state.html:55:15
│ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1489:20
│ test@http://web-platform.test:8000/resources/testharness.js:511:9
└ @http://web-platform.test:8000/html/semantics/forms/the-input-element/type-change-state.html:37:9
```
All other tests do now `PASS` instead of `FAIL`.
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix *part of* #19172
- [x] There are tests for these changes
- [x] All tests `PASS`
<!-- 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/19379 )
<!-- Reviewable:end -->
2017-12-04 15:44:58 -06:00
Simon Wörner
a999239f28
Added time input sanitization:
...
- Implemented is_valid_time_string for DOMString.
- Use is_valid_time_string for sanitize_value with time input.
- Improved input type change test
2017-12-04 11:21:28 +01:00
Cameron McCormack
ec4f9a5f3b
style: Update Gecko bindings.
2017-12-04 09:21:54 +08:00
Cameron McCormack
3513b31091
style: Add FFI function to parse a @counter-style descriptor.
2017-12-04 08:57:46 +08:00
bors-servo
e4dba3abef
Auto merge of #19462 - emilio:angle-parsing, r=nox
...
style: Cleanup Angle parsing.
This PR also contains a functional change, allowing to parse unitless zero angles in hue-rotate().
See the links and the comments for why.
<!-- 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/19462 )
<!-- Reviewable:end -->
2017-12-03 09:14:59 -06:00
bors-servo
14f757817e
Auto merge of #19463 - emilio:bye-parse-functions, r=jdm
...
style: Remove free parsing functions, use Integer::parse and Number::parse instead.
<!-- 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/19463 )
<!-- Reviewable:end -->
2017-12-03 06:02:12 -06:00
bors-servo
d198caa9ff
Auto merge of #19436 - aethanyc:shape-image-threshold, r=heycam
...
style: Support 'shape-image-threshold' property
This has been reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1265343
<!-- 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/19436 )
<!-- Reviewable:end -->
2017-12-02 10:03:16 -06:00
Emilio Cobos Álvarez
93fc9ab63a
style: Remove free parsing functions, use Integer::parse and Number::parse instead.
2017-12-02 16:15:11 +01:00
Emilio Cobos Álvarez
3631b1e197
style: Deduplicate Angle parsing code.
2017-12-02 15:39:06 +01:00
Emilio Cobos Álvarez
55439e6222
style: Allow parsing unitless zero angles in hue-rotate().
...
Per https://github.com/w3c/fxtf-drafts/issues/228
2017-12-02 15:39:05 +01:00
Emilio Cobos Álvarez
25ae329156
style: Formatting nits in gradient parsing.
2017-12-02 15:20:01 +01:00
bors-servo
45bbbac9d9
Auto merge of #19454 - emilio:has-class-is-stupid, r=upsuper
...
style: Add a missing fast-path in GeckoElement::each_class.
This shows up when inserting elements in the bloom filter.
<!-- 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/19454 )
<!-- Reviewable:end -->
2017-12-02 01:40:00 -06:00
Emilio Cobos Álvarez
d570fc8164
style: Remove pretty useless layer of abstraction.
2017-12-02 03:23:22 +01:00
bors-servo
49e6594bc9
Auto merge of #19455 - emilio:color-does-stupid-things-too, r=upsuper
...
style: Don't waste an allocation when failing to parse a CSSParserColor.
I see that allocation show up in the profiles, and it makes sense, because
system colors and such are common in Firefox, and they're just wasting it.
Note that the clone() added is refcounted.
<!-- 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/19455 )
<!-- Reviewable:end -->
2017-12-01 18:03:11 -06:00
bors-servo
f7aa22a87e
Auto merge of #19451 - emilio:inlining-is-fun, r=upsuper
...
style: Inline some things that should never ever appear in a profile.
<!-- 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/19451 )
<!-- Reviewable:end -->
2017-12-01 16:52:34 -06:00
bors-servo
bca8951182
Auto merge of #19453 - emilio:is-root-is-slow, r=upsuper
...
style: Add a fast-path for GeckoElement::is_root.
<!-- 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/19453 )
<!-- Reviewable:end -->
2017-12-01 15:14:13 -06:00
Emilio Cobos Álvarez
848a8581ac
style: Don't waste an allocation when failing to parse a color.
...
I see that allocation show up in the profiles, and it makes sense, because
system colors and such are common in Firefox, and they're just wasting it.
Note that the clone() added is refcounted.
2017-12-01 20:55:24 +01:00
Emilio Cobos Álvarez
a4cb6b8f09
style: Formatting nits in snapshot_helpers-related code.
2017-12-01 20:37:45 +01:00
Emilio Cobos Álvarez
bea7b31445
style: Add a missing fast-path in GeckoElement::each_class.
...
This shows up when inserting elements in the bloom filter.
2017-12-01 20:37:28 +01:00
Emilio Cobos Álvarez
382a89511a
style: Add a fast-path for GeckoElement::is_root.
2017-12-01 20:17:53 +01:00
Emilio Cobos Álvarez
2bbeda97d3
style: Inline some things that should never ever appear in a profile.
2017-12-01 20:04:33 +01:00
bors-servo
210d0ab30a
Auto merge of #19447 - emilio:arc-soundness, r=jdm
...
servo_arc: Add some #[inline] and repr(C) annotations.
inline is probably unnecessary, but anyway... We rely on those being repr(C), so
they rather have some.
<!-- 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/19447 )
<!-- Reviewable:end -->
2017-12-01 12:58:11 -06:00
bors-servo
712d75af01
Auto merge of #19307 - avadacatavra:domrefcellpanic, r=jdm
...
change parse_own_css to queue event not fire synchronously
<!-- Please describe your changes on the following line: -->
fixes a panic and aligns with spec
I've also added checks around each mutable borrow of the tokenizer to see if we can catch any other panics
---
<!-- 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 #18930 (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/19307 )
<!-- Reviewable:end -->
2017-12-01 11:41:47 -06:00
Emilio Cobos Álvarez
0f12380db3
style: Make -moz-border-colors chrome only.
...
This also makes the `border` shorthand not reset them.
Bug: 1417200
Reviewed-by: xidorn
MozReview-Commit-ID: KNais1e5FnE
2017-12-01 16:49:55 +01:00
Emilio Cobos Álvarez
a1521d9d4d
servo_arc: Add some #[inline] and repr(C) annotations.
...
inline is probably unnecessary, but anyway... We rely on those being repr(C), so
they rather have some.
2017-12-01 14:34:38 +01:00
Ting-Yu Lin
668795ad16
style: Update gecko bindings
...
MozReview-Commit-ID: CBPdp0e1k6h
2017-12-01 15:01:15 +08:00
Ting-Yu Lin
1b14ca3a9d
style: Support 'shape-image-threshold' property
...
MozReview-Commit-ID: 14lzl3ln3Rg
2017-12-01 11:18:54 +08:00
Emilio Cobos Álvarez
0bcd36838d
style: Remove redundant style sharing check.
...
We check that a few lines before calling test_candidate.
2017-11-30 17:26:45 +01:00
ddh
79d896d474
queue event instead of immediately fire
...
created checks to see if parser is in use before event dispatch
changed tests to expect crash and added async style test
2017-11-30 16:18:57 +00:00
bors-servo
fce44a2e13
Auto merge of #19429 - upsuper:sharing-quirks-id, r=emilio
...
Don't try to share style on quirks mode whenever two elements have different id
This fixes [bug 1420946](https://bugzilla.mozilla.org/show_bug.cgi?id=1420946 ).
<!-- 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/19429 )
<!-- Reviewable:end -->
2017-11-30 08:23:07 -06:00
Emilio Cobos Álvarez
1168305e93
style: Update bindings.
2017-11-30 14:23:49 +01:00