Commit graph

48 commits

Author SHA1 Message Date
Matt Brubeck
f511a77ec5 Stop using the unstable optin_builtin_traits feature 2017-06-28 15:00:21 -07:00
Simon Sapin
b83afdedc8 Upgrade cssparser to 0.15 2017-06-16 15:05:46 +02:00
Cameron McCormack
524794c09a script: Move extended_filtering to the style crate.
We'll need to call it from the style crate in later patches, when matching
:lang() against element snapshots.
2017-06-08 09:37:09 +08:00
Simon Sapin
6c518c89b9 Upgrade to html5ever 0.16 2017-05-02 19:24:28 +02:00
SendilKumar N
b6e6e84bcf ext. filtering for lang matching 2017-03-07 10:20:16 +08:00
Anthony Ramine
ac254046e4 Implement document.open and document.close (fixes #14591) 2017-02-03 16:50:12 +01:00
Simon Sapin
137e30b825 Introduce enums for identifying CSS properties.
* `LonghandId` and `ShorthandId` are C-like enums
* `Atom` is used for the name of custom properties.
* `PropertyDeclarationId` is the identifier for `PropertyDeclaration`,
  after parsing and shorthand expansion. (Longhand or custom property.)
* `PropertyId` represents any CSS property, e.g. in CSSOM.
  (Longhand, shorthand, or custom.)

Using these instead of strings avoids some memory allocations and copies.
2016-12-09 10:56:22 -10:00
Simon Sapin
53b638c0e2 Update to string-cache 0.3 2016-11-03 16:23:05 +01:00
Anthony Ramine
20b131af17 Implement Borrow<str> for DOMString
Useful to use DOMString as a HashMap key type.
2016-09-07 15:47:36 +02:00
bors-servo
03fa7f0ba5 Auto merge of #12467 - jeenalee:jeena-headersAPI, r=jdm
Add the append method for the Headers API

<!-- Please describe your changes on the following line: -->
This commit adds the append method for the Headers API. @malisas and I are both contributors.

There are a few TODOs related:
- The script needs to parse the header value for certain header names to decide the header group it belongs
- There are possible spec bugs that could change what a valid header value looks like (related: [issue page](https://github.com/whatwg/fetch/issues/332))

There are WPT tests already written for the Headers API, but they will fail as the Headers API is not fully implemented.

---
<!-- 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 tests for the Headers API already exists, but this commit does not implement the interface fully. The tests will fail.

<!-- 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/12467)
<!-- Reviewable:end -->
2016-07-20 16:24:48 -05:00
Jeena Lee
530b02790b Add the append method for the Headers API for the Fetch API
This commit will add the append method and associated helper functions, and introduce any necessary changes for it.
2016-07-19 13:40:31 -07:00
Ms2ger
94fabbc366 Expand the documentation for DOMString.
There was some confusion on IRC about its purpose; hopefully this will clarify
the situation.
2016-07-19 09:57:51 +02:00
Josh Matthews
04ce86c08c Associate logical and physical keypresses together to support non-QWERTY keyboards. 2016-07-05 18:06:42 -04:00
Ms2ger
aea03b2f92 Remove unused ByteString::bytes() and its unit test. 2016-06-07 14:20:44 +02:00
Rahul Sharma
15a2064c0d implement related sw interface and register method 2016-06-02 04:09:39 +05:30
Anthony Ramine
cdc7bca944 Move DOMString back to script
This entirely removes the 'non-geckolib' feature of the util crate.
2016-05-24 10:54:57 +02:00
faineance
418842faf9 use self.0 instead of destructing single item tuple structs 2016-03-27 11:50:08 +01:00
Tim Neumann
746f7dd29e move method from ByteString to module where it was used 2016-02-23 15:21:35 +01:00
Tim Neumann
3af3926d63 remove rarely used is_token method from ByteString 2016-02-23 15:21:35 +01:00
Daniel Robertson
72f74c27ef Convert unwrapping of ByteString to self.0
Convert traditional unwrapping of the tuple struct ByteString to
self.0
2016-02-18 19:41:03 +00:00
Daniel Robertson
d23774d3d7 Add methods to move ByteStrings underlying bytes
Add methods to move the underlying Vec<u8> for ByteString.
2016-02-18 19:40:24 +00:00
Peter
f374e8f420 #9640 Refactor: Move util::str::is_token to script::dom::bindings::str 2016-02-14 22:47:52 +00:00
Anthony Ramine
cb5cd8d881 Say farewell to in-tree HeapSizeOf 2016-02-04 22:03:32 +01:00
jmr0
3846cf52f2 fix websocket header validation, ensure it meets token requirements, add
testing
2016-01-24 18:31:21 -05:00
Ms2ger
0c61be7a57 Rustfmt some of script. 2015-11-18 11:14:05 +01:00
Brandon Fairchild
de3547e401 Fix reported test-tidy errors for unmerged import blocks
This merges import blocks that were reported by tidy as unmerged.
2015-09-19 12:50:14 -04:00
Manish Goregaokar
54c036cd66 Elide most 'a lifetimes 2015-09-04 08:55:51 +05:30
João Oliveira
9c11781880 replace .len() == 0 with is_empty()
closes #7198
2015-08-14 04:00:33 +01:00
Bogdan Cuza
45145108da Measure heap memory usage for more types. Fixes #6951 2015-08-13 21:44:41 +03:00
David Winslow
4cf46bff2d Refactor #[jstraceable] to #[derive(JSTraceable)]
fixes #6524
2015-07-01 18:27:06 -04:00
Ms2ger
bd77acfbb8 Use AsciiExt in ByteString implementations. 2015-05-01 21:20:16 +02:00
Ms2ger
84b1b52682 Replace ByteString::as_slice() by a Deref implementation. 2015-05-01 21:19:11 +02:00
Ms2ger
a862479ca8 Remove as_slice() calls from script. 2015-04-26 10:52:55 +02:00
Corey Farwell
d838fcce30 Remove some unnecessary uses of as_slice
For the majority of these cases, `as_slice` can be removed due to
`Deref`. In particular, `Deref` for:

* `String` -> `str`
* `Atom` -> `str`

The latter of those two requires, a bump of the locked `string-cache`
library
2015-03-29 14:42:19 -04:00
Ms2ger
5f15eb5fbf Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev. 2015-03-18 13:18:31 -04:00
Ms2ger
bbbdb98897 Implement USVString. 2015-03-13 21:27:58 +01:00
Ms2ger
6d30ec77c8 Replace uint/int by usize/isize in various places. 2015-02-20 14:45:47 +01:00
Simon Sapin
d5dd1d658e Upgrade to rustc ba2f13ef0 2015-02-04 2015-02-11 14:48:34 -08:00
bors-servo
1a2a08aa50 auto merge of #4717 : Ms2ger/servo/doc-proxy, r=saneyuki 2015-01-28 01:48:52 -07:00
Josh Matthews
95fc29fa0d Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev. 2015-01-28 10:16:49 +10:00
Ms2ger
238f3e2d91 Require documentation for all code in dom::bindings (excluding dom::bindings::codegen). 2015-01-25 22:01:04 +01:00
Ms2ger
01ed338746 Move to to_owned rather than into_string.
into_string has been removed from Rust.
2015-01-20 14:49:07 +01:00
Manish Goregaokar
e9d1740e19 script: to_string() -> into_string() 2014-12-27 14:48:36 +01:00
Ms2ger
ca2ce8e5b8 Require documentation for ByteString. 2014-12-20 16:12:13 +01:00
Ms2ger
466faac2a5 Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d. 2014-12-17 15:19:45 -05:00
Jack Moffitt
d1b433a3b3 Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
Manish Goregaokar
cc44a3b064 Use JSTraceable everywhere 2014-09-24 05:44:49 +05:30
Jack Moffitt
c6ab60dbfc Cargoify servo 2014-09-08 20:21:42 -06:00
Renamed from src/components/script/dom/bindings/str.rs (Browse further)