Commit graph

684 commits

Author SHA1 Message Date
Ms2ger
04ffeea3c5 Rewrite test_redirect_from_x_to_y_provides_y_cookies_from_y. 2016-11-23 17:51:04 +01:00
Simon Sapin
f044659b7c Use selectors::SelectorList 2016-11-22 14:50:23 +01:00
Simon Sapin
81a3de3299 Remove SelectorImpl aliases 2016-11-22 14:50:22 +01:00
Simon Sapin
82b13d50e3 Update to selectors 0.15 2016-11-22 14:50:21 +01:00
bors-servo
30867001d1 Auto merge of #14232 - servo:moar-locks, r=upsuper
CSSOM: Make Stylesheet fields have their own synchronization

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

r? @upsuper

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

<!-- 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/14232)
<!-- Reviewable:end -->
2016-11-21 19:33:57 -06:00
bors-servo
d287f58d3f Auto merge of #14275 - servo:fm-ui, r=jdm
Remove the dependency of fetch on filemanager_thread::UIProvider.

<!-- 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/14275)
<!-- Reviewable:end -->
2016-11-21 18:28:19 -06:00
bors-servo
95bc7ece47 Auto merge of #14268 - Manishearth:regen, r=bholley
Regenerate bindings

Don't merge yet

<!-- 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/14268)
<!-- Reviewable:end -->
2016-11-21 12:19:39 -06:00
Ms2ger
ae1340bf50 Pass the UIProvider to FileManager::handle() as needed. 2016-11-21 10:37:26 +01:00
Ms2ger
f672bf9eab Factor out FileManager::promote_memory(). 2016-11-21 10:37:25 +01:00
Simon Sapin
b203ab2419 Rename selector_impl.rs to selector_parser.rs
This makes it consistent with an upcoming update of the selectors crate.
2016-11-20 15:30:37 +01:00
Simon Sapin
08066800cd Rename selector_matching.rs to stylist.rs 2016-11-20 15:29:09 +01:00
Manish Goregaokar
3d5b26ac26 Uplift bitfield fix for nsChangeHint 2016-11-18 21:45:12 -08:00
Lin Clark
9f49da9f55 Add tests for background shorthand parsing. 2016-11-18 14:03:53 -05:00
Simon Sapin
cf7adcdca5 Make Stylesheet.dirty_on_viewport_size_change an AtomicBool 2016-11-18 17:13:30 +01:00
Simon Sapin
236c575c50 Replace Stylesheet::set_media with a constructor argument 2016-11-18 17:12:44 +01:00
Emilio Cobos Álvarez
913c874cb5
Urlmageddon: Use refcounted urls more often. 2016-11-17 18:34:23 +01:00
bors-servo
afc60bee28 Auto merge of #14190 - Manishearth:cssom, r=SimonSapin
Immutable CSSOM

This PR is intended to add basic support for all CSSOM interfaces, with the ability to index `document.styleSheets` and css rule lists, and serializing individual css rules. Handling individual interface methods for CSSRule subclasses can probably be done with easy/medium bugs.

Mutation safety isn't dealt with here; if the css rule list is mutated the CSSOM will be in an inconsistent state. I intend to deal with this via zero sized tokens, see https://groups.google.com/forum/#!topic/mozilla.dev.servo/AnxJoVmtMXQ .  I'll handle that when I start making the CSSOM mutable. (Getting the immutable bit landed first opens this up for easy bugs)

This doesn't really change style aside from adding an extra arc in the CSS rule list as discussed in the linked thread. So far this same design can be used by stylo as well when the time comes.

f? @SimonSapin @emilio

cc @upsuper

part of #11420
Todo:

 - [x] Stubs for rest of the CSSRule subclasses
 - [x] <s>ToCSS impls for CSSRules.</s> May make into easy bugs and stub out in this PR https://github.com/servo/servo/issues/14195
 - [x] Cache CSSStyleSheet on the relevant node

<!-- 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/14190)
<!-- Reviewable:end -->
2016-11-16 15:05:59 -06:00
bors-servo
00f229d615 Auto merge of #14188 - AgostonSzepessy:text-emphasis-position, r=SimonSapin
Added parsing/serialization for text-emphasis-position

Implemented parsing/serialization for text-emphasis-position

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #13850
- [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/14188)
<!-- Reviewable:end -->
2016-11-16 07:59:55 -06:00
Agoston Szepessy
c4a9f72fc5 Added parsing/serialization for text-emphasis-position 2016-11-15 23:34:47 -05:00
Manish Goregaokar
2fe390e237 Allow mutation of CssRules 2016-11-15 08:49:58 -08:00
Manish Goregaokar
177d6fa4ee Support basic immutable CSSOM 2016-11-15 06:56:18 -08:00
bors-servo
e9fa69bb2d Auto merge of #14189 - canaltinova:border-image-shorthand, r=Manishearth
Implement border-image shorthand

<!-- Please describe your changes on the following line: -->
Implementation of border-image shorthand.
r? Manishearth

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

<!-- 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/14189)
<!-- Reviewable:end -->
2016-11-14 11:17:54 -06:00
Ms2ger
56dd6417e6 Remove the network.http.redirection-limit preference.
The Fetch standard defines this value as twenty; there is no good reason to
allow changing that at runtime.
2016-11-14 14:44:08 +01:00
bors-servo
b63c85c31b Auto merge of #14199 - 11Takanori:CSSRule_to_CssRule, r=nox
Update CSSRule naming from 'CSSRule' to 'CssRule'

<!-- Please describe your changes on the following line: -->
Update CSSRule naming from 'CSSRule' to 'CssRule'

---
<!-- 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 https://github.com/servo/servo/issues/14196 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because I just rename CSSRule to CssRule.

<!-- 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/14199)
<!-- Reviewable:end -->
2016-11-14 03:36:37 -06:00
bors-servo
3959817424 Auto merge of #14104 - iamrohit7:scroll-snap-type, r=Manishearth,waffles
Adds scroll-snap-type shorthand property

<!-- Please describe your changes on the following line: -->
Follow up to #14017

---
r=Manishearth
<!-- 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 `scroll_snap_type::should_serialize_to_single_value_if_sub_types_are_equal`, `scroll_snap_type::should_serialize_to_empty_string_if_sub_types_not_equal`

<!-- 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/14104)
<!-- Reviewable:end -->
2016-11-14 01:51:07 -06:00
Manish Goregaokar
c387eff065 Fix single_value_to_css 2016-11-13 23:50:50 -08:00
Takanori Ishibashi
72c83c9394 CSSRule -> CssRule 2016-11-14 16:41:25 +09:00
Rohit Burra
bdedcb9eb4 Adds scroll-snap-type shorthand property, tests 2016-11-14 12:08:49 +05:30
Nazım Can Altınova
e408b0e75c Add parsing tests for border-image shorthand 2016-11-13 19:25:05 +03:00
bors-servo
a2689f2a0e Auto merge of #14163 - servo:fetch-unit-http, r=metajack
Rewrite some http unit tests with fetch.

<!-- 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/14163)
<!-- Reviewable:end -->
2016-11-12 00:01:10 -06:00
Artem Biryukov
9564673b5a Fix related to #14101
Add Parse trait implementation for some structures
2016-11-12 05:26:15 +03:00
bors-servo
e3f07dfa16 Auto merge of #14156 - frewsxcv:cors-capitalization, r=KiChjang
Update CORS naming from 'CORS' to 'Cors'.

As per:

https://aturon.github.io/style/naming/README.html#general-conventions-[rfc-#430]

Acronyms should be considered one word and not all caps.

<!-- 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/14156)
<!-- Reviewable:end -->
2016-11-10 14:43:36 -06:00
bors-servo
d8a0a00032 Auto merge of #14127 - servo:response-new-url, r=nox
Make Response::url private.

<!-- 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/14127)
<!-- Reviewable:end -->
2016-11-10 09:19:52 -06:00
Ms2ger
15b55c3231 Make Response::url private. 2016-11-10 13:18:43 +01:00
Emilio Cobos Álvarez
5f2e7af864
style: Centralize specified url value handling, and refcount urls. 2016-11-10 13:15:21 +01:00
Ms2ger
65602de403 Add a successful test for a redirect loop. 2016-11-10 13:13:31 +01:00
Ms2ger
581c6dfe1b Rewrite test_load_errors_when_there_a_redirect_loop. 2016-11-10 12:57:19 +01:00
Ms2ger
bced313c47 Rewrite test_load_sets_default_accept_encoding_to_gzip_and_deflate. 2016-11-10 11:34:48 +01:00
Ms2ger
195774436b Rewrite test_load_uses_explicit_accept_encoding_from_load_data_headers. 2016-11-10 11:32:31 +01:00
Ms2ger
e12a6d7f4e Rewrite test_load_sets_default_accept_to_html_xhtml_xml_and_then_anything_else. 2016-11-10 11:26:54 +01:00
Ms2ger
6319d7cb99 Rewrite test_load_uses_explicit_accept_from_headers_in_load_data. 2016-11-10 11:22:23 +01:00
Ms2ger
5a02586341 Rewrite test_load_sets_content_length_to_length_of_request_body. 2016-11-10 11:18:22 +01:00
Ms2ger
c229a0116e Rewrite test_when_cookie_received_marked_secure_is_ignored_for_http. 2016-11-10 11:06:23 +01:00
Ms2ger
982c59662c Rewrite test_cookie_set_with_httponly_should_not_be_available_using_getcookiesforurl. 2016-11-10 11:06:22 +01:00
Ms2ger
52258e2282 Rewrite test_load_sends_cookie_if_nonhttp. 2016-11-10 11:01:08 +01:00
Ms2ger
f1f090ca81 Rewrite test_load_sets_requests_cookies_header_for_url_by_getting_cookies_from_the_resource_manager. 2016-11-10 11:01:07 +01:00
Ms2ger
5bf90c563c Rewrite test_load_sets_cookies_in_the_resource_manager_when_it_get_set_cookie_header_in_response. 2016-11-10 11:01:05 +01:00
bors-servo
89c46369a2 Auto merge of #14151 - servo:assert_cookie_for_domain, r=jdm
Clarify assert_cookie_for_domain.

<!-- 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/14151)
<!-- Reviewable:end -->
2016-11-10 02:29:44 -06:00
Xidorn Quan
5dfcb07f6a Allow empty media query list
And make empty list the default value of MediaList.

This commit also removes Option wrapper of Stylesheet.media because
a stylesheet should always have an associated media query list.
2016-11-10 17:42:16 +11:00
Corey Farwell
bf8752ac9e Update CORS naming from 'CORS' to 'Cors'.
As per:

https://aturon.github.io/style/naming/README.html#general-conventions-[rfc-#430]

Acronyms should be considered one word and not all caps.
2016-11-09 18:30:30 -05:00