Commit graph

12710 commits

Author SHA1 Message Date
Xidorn Quan
a304b5bfac Fix -moz-user-select: tri-state 2017-03-15 20:23:09 +11:00
bors-servo
de421216ad Auto merge of #15598 - abhiQmar:master, r=canaltinova
text-overflow accepts only valid values for the second part of value

… value #15491

<!-- 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 #15491.

<!-- Either: -->
- [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/15598)
<!-- Reviewable:end -->
2017-03-14 16:03:27 -07:00
Hiroyuki Ikezoe
60fadb2d2c Use computed styles of the pseudo and its parent when calling Gecko_UpdateAnimations to update CSS Animations on pseudo-elements. 2017-03-15 06:35:32 +09:00
bors-servo
94a2262821 Auto merge of #15820 - snehasi:master, r=KiChjang
border-image no more accepting shorthand values

Fixes #15770

Added a check in border.mako.rs, if `w` and `o` are not none before returning Ok status

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

- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they fix the previous errors reported in #15770

<!-- 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/15820)
<!-- Reviewable:end -->
2017-03-14 13:20:08 -07:00
bors-servo
569d51dc30 Auto merge of #15878 - asajeffrey:constellation-frames-store-loaddata, r=cbrewster
Frames in the constellation store LoadData rather than just URLs.

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

Include LoadData in each session history entry, so that when we reload discarded documents we can include POST data etc.

---
<!-- 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 #14888
- [X] These changes do not require tests because we don't test document discarding.

<!-- 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/15878)
<!-- Reviewable:end -->
2017-03-14 12:30:20 -07:00
Alan Jeffrey
1a44a76b57 Frames in the constellation store LoadData rather than just URLs. 2017-03-14 14:28:21 -05:00
Manish Goregaokar
2ae317f526 stylo: Support counter-increment and counter-reset
MozReview-Commit-ID: DnSd8xAkidM
2017-03-14 09:25:02 -07:00
Manish Goregaokar
07723eba7a stylo: Implement remaining content values
MozReview-Commit-ID: 9fLM5bdR8hr
2017-03-14 09:24:58 -07:00
Manish Goregaokar
77d7490d59 stylo: Use ServoBundledURI everywhere else, fix from_ffi to handle the error case
MozReview-Commit-ID: DHNKLm3y5Gv
2017-03-14 09:16:30 -07:00
Sneha Sinha
30028959b8 border-image no more accepting shorthand values
Fixes #15770

Added a check in border.mako.rs, if w and o are not none before
returning Ok status
2017-03-14 21:38:41 +05:30
bors-servo
808ffffd1e Auto merge of #15795 - paulrouget:follow-link, r=asajeffrey
Let the embedder decide if servo should follow a link or not

We want to give a chance to the embedder to handle a link itself.
Is it a problem that this will add a round trip to the main thread every time `load_url` is called?

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because I'm not sure how to test that

<!-- 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/15795)
<!-- Reviewable:end -->
2017-03-14 07:22:23 -07:00
Xidorn Quan
b02c786a42 Update bindings 2017-03-14 15:54:33 +11:00
Xidorn Quan
3cbc1aa279 Add char_traits to blacklist 2017-03-14 15:54:19 +11:00
Emilio Cobos Álvarez
b4de69e3eb
style: Avoid cloning all over the error reporter. 2017-03-14 00:49:18 +01:00
Emilio Cobos Álvarez
eaf27ccfa0
style: Kill SharedStyleContext::default_computed_values.
Now that cascade() gets a Device, we can use the default computed values from
there to avoid propagating that state all over the place.

Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-03-14 00:49:16 +01:00
Matt Brubeck
16e318d055
Add support for non-standard -moz color keyword values.
Closes #15928
2017-03-14 00:49:08 +01:00
Emilio Cobos Álvarez
9c0424cca4
style: Remove unneeded indirection in default_computed_values. 2017-03-13 21:57:57 +01:00
bors-servo
7db36abf67 Auto merge of #15611 - karan1276:karan_box_shadow, r=upsuper
In {box,text}-shadow so blur-radius does not accept negative values

 Change code for serialization for {box,text}-shadow so blur-radius can be parsed as non-negavite

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

<!-- Either: -->
- [x] Write tests

<!-- 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/15611)
<!-- Reviewable:end -->
2017-03-13 11:36:02 -07:00
bors-servo
e648ebd161 Auto merge of #15910 - bzbarsky:anon-box-nofixup, r=emilio
Add support for skipping display fixup for pseudos.

This is needed for https://bugzilla.mozilla.org/show_bug.cgi?id=1346481

<!-- 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
- [X] These changes do not require tests because will be tested on the Gecko side

<!-- 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/15910)
<!-- Reviewable:end -->
2017-03-13 10:47:05 -07:00
Boris Zbarsky
275865486e Add support for skipping display fixup for pseudos.
This is needed for https://bugzilla.mozilla.org/show_bug.cgi?id=1346481
2017-03-13 13:11:53 -04:00
lucantrop
d6568e608b removed instances of -> () in existing code 2017-03-13 17:38:33 +01:00
bors-servo
94c344a014 Auto merge of #15882 - ak1t0:clean-up-htmlimageelement, r=Ms2ger
Clean up HTMLImageElement::areas

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because github issue says no tests needed.

<!-- 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/15882)
<!-- Reviewable:end -->
2017-03-13 07:47:56 -07:00
bors-servo
d70c1e53ae Auto merge of #15874 - sendilkumarn:user-script, r=nox
apply user scripts correctly

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

<!-- 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/15874)
<!-- Reviewable:end -->
2017-03-13 07:01:52 -07:00
SendilKumar N
5b25cb3345 apply user scripts correctly
replace to utf8_lossy
2017-03-13 21:57:50 +08:00
ak1t0
ad1e4475af Clean up HTMLImageElement::areas 2017-03-13 21:52:04 +09:00
karan sharma
f30537ba2b Change code for serialization of {box,text}-shadow so blur-radius
can be parsed as non-negavite
2017-03-13 12:26:59 +05:30
bors-servo
cc9fb0ba59 Auto merge of #15924 - upsuper:bug1315601, r=heycam,Manishearth
Implement access to CSSMediaRule for stylo

This is the Servo part of [bug 1315601](https://bugzilla.mozilla.org/show_bug.cgi?id=1315601).

<!-- 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/15924)
<!-- Reviewable:end -->
2017-03-12 23:55:46 -07:00
Xidorn Quan
52c9f4b527 Implement MediaList for Stylo. 2017-03-13 17:55:25 +11:00
Xidorn Quan
2175785ca6 Add raw Servo types for MediaList and MediaRule. 2017-03-13 17:55:24 +11:00
Hiroyuki Ikezoe
1c607dcc2a Fill shortage values for animation/transition properties. 2017-03-13 12:42:38 +09:00
Hiroyuki Ikezoe
448b74ba18 Cascade animation-name property earlier than other animation properties.
As per the CSS Animations spec, in the case when multiple values for an
animation property are set, if the value length is less than the length
of animation-name property, then shortage values are filled up. Because
of this we need to know the length of animation-name proper before we
set other animation properties, so we need to cascade animation-name property
earlier than other animation properties.
We do the same thing for transition-property.
2017-03-13 12:42:18 +09:00
Hiroyuki Ikezoe
c9b0ea314f Don't set transition properties to mAnimations array. 2017-03-13 12:42:01 +09:00
Emilio Cobos Álvarez
89f0eedcfb
Simplify some -moz-fixed handling code.
This was introduced in #15916, but most of it is actually unreachable.
2017-03-11 23:57:39 +01:00
Abhishek Kumar
c7ed931276 text-overflow accepts only valid values for the second part of value
Fixes: https://github.com/servo/servo/issues/15491
2017-03-12 03:58:51 +05:30
bors-servo
e6af6a8f48 Auto merge of #15916 - canaltinova:moz-fixed, r=Manishearth
Stylo: Add support for "font-family: -moz-fixed"

Added support for "font-family: -moz-fixed" 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
- [X] These changes fix [Bug 1341637](https://bugzilla.mozilla.org/show_bug.cgi?id=1341637)

<!-- Either: -->
- [X] These changes do not require tests because it's stylo 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/15916)
<!-- Reviewable:end -->
2017-03-11 14:03:40 -08:00
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
4bafdedf64
layout: Merge inline nodes based on node address, not node style. 2017-03-11 11:31:12 +01:00
Emilio Cobos Álvarez
6f134892da
layout: Reflow some code and comments in layout/inline.rs 2017-03-11 11:31:11 +01:00
Emilio Cobos Álvarez
ebdc6f69b1
gfx: Show the text in the display item when debugging. 2017-03-11 11:31:11 +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
bors-servo
c90d3d2f06 Auto merge of #15889 - ferjm:issue-14519-cors-preflight, r=avadacatavra
Allow for redirects after a CORS-preflight

~Continue the work done in #14811 and #15547~. And applies the Fetch [spec change](0d9a4db8bc) about [allowing redirects after CORS preflights](https://github.com/whatwg/fetch/issues/204).

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix ~#14787 and~ #14519
- [X] There are tests for these changes. Several WPTs go from FAIL to SUCCESS. The new expected FAILs for the cors/redirect-preflight.htm tests are caused by the spec change done [here](0d9a4db8bc), as suggested in the associated [issue](https://github.com/servo/servo/issues/14519#issuecomment-284384667).

<!-- 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/15889)
<!-- Reviewable:end -->
2017-03-10 07:49:35 -08:00
Fernando Jiménez Moreno
469eb192c5 Allow for redirects after a CORS-preflight 2017-03-10 16:39:33 +01:00
bors-servo
7af2f819be Auto merge of #15908 - canaltinova:single-keywords, r=emilio
Fix wrong initial values in various single keyword properties

In `single_properties` helper, first values set as initial value. But it seems like a problem here because it's not clear to anyone who don't know the working mechanism of this helper or it can be easily forgotten. Maybe we should make it explicit. I was fixing Bug 1331516 but expanded to cover all single keyword properties.

Also discovered that mask-repeat's initial value is [wrong](https://bugzilla.mozilla.org/show_bug.cgi?id=1346193) in gecko.

---
<!-- 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] This PR started to fix [Bug 1331516](https://bugzilla.mozilla.org/show_bug.cgi?id=1331516) but expanded to cover all single keyword properties afterwards.

<!-- 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/15908)
<!-- Reviewable:end -->
2017-03-10 06:52:51 -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