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
Simon Sapin
85de5ec743
Correctly initialize URL.searchParams
2016-04-23 20:27:59 +02:00
Simon Sapin
7932ab6ac2
Upgrade to rust-url 1.0 and hyper 0.9
2016-04-23 20:27:58 +02:00
Stjepan Glavina
7b38f289b0
Implement URL.searchParams
...
Spec: https://url.spec.whatwg.org/#dom-url-searchparams
2016-04-05 16:10:05 +02:00
Alexander Lopatin
2be49404be
Fix #9508 : Beautify our union enums constructors
2016-02-07 02:55:21 +03:00
Florian Strübe
e65d7251f7
Improved .find().map()
2016-01-27 23:24:32 +01:00
Florian Strübe
6fef891ab8
Use .find().map() instead of .filter_map().next() in URLSearchParams::Get
2016-01-26 21:50:31 +01:00
Fernando Martins
29b14d4b3d
Implement URLSearchParams::getAll
2016-01-15 22:40:55 +00:00
Alan Jeffrey
84bde75b42
Replaced DOMString constructor by conversion functions.
...
Replaced DOMString(...) by DOMString::from(...).
Replaced ....0 by String::from(...).
Removed any uses of .to_owner() in DOMString::from("...").
2015-11-12 17:52:59 -06:00
Ms2ger
6b75078503
Make DOMString a newtype around String, rather than a typedef.
...
This should make it somewhat easier to experiment with alternative
representations in the future. To reduce churn, this commit leaves the String
field public, though.
Also, this will allow us to use the default String type to represent the IDL
USVString type, which explicitly forbids unpaired surrogates, ans as such is
a better match to the Rust String type.
2015-11-04 12:09:11 +01:00
David Zbarsky
722aa86c89
Get rid of a bunch of explicit derefs
2015-11-03 19:51:46 -08:00
rohan.prinja
425c0b85d9
make test-tidy happy + fix some merge errors
2015-11-03 19:11:01 +09:00
rohan.prinja
6e774ea6eb
merge from master
2015-11-03 19:01:23 +09:00
Ms2ger
e8914cd829
Update URLSearchParams to use USVString and String.
...
This matches the specification.
2015-10-30 16:33:29 +01:00
rohan.prinja
45224028db
more refactoring
2015-10-30 20:26:29 +09:00
Ravi Shankar
889eec364b
sorted the extern crate, mod & use declarations
2015-09-24 02:12:45 +05:30
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
Anthony Ramine
709d347872
Make the traits for the IDL interfaces take &self
2015-08-27 22:27:43 +02:00
Anthony Ramine
c831c2c0a5
Remove helper traits
...
Now that JSRef<T> is gone, there is no need to have helper traits.
On components/script/*.rs:
# Remove imports.
/^ *use dom::[a-z]+::\{.*Helpers/ {
s/\{(Raw[^L]|[^L][^a])[a-zA-Z]+Helpers, /\{/
s/, (Raw[^L]|[^L][^a])[a-zA-Z]+Helpers([,}])/\2/g
s/\{([a-zA-Z]+)\}/\1/
/\{\}/d
s/::self;$/;/
}
/^ *use dom::[a-z]+::\{?(Raw[^L]|[^L][^a])[a-zA-Z]+Helpers\}?;$/d
On components/script/dom/*.rs:
# Ignore layout things.
/^(pub )?(impl|trait).*Layout.* \{/,/^}$/ { P; D; }
# Delete helpers traits.
/^(pub )?trait ([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? \{$/,/^\}$/D
# Patch private helpers.
/^impl.*Private.*Helpers/,/^\}$/ {
s/^impl<'a> Private([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? for &'a ([^ ]+) \{$/impl \3 {/
/^ *(unsafe )?fn .*\(self.*[<&]'a/ {
s/&'a /\&/g
s/<'a, /</g
}
/^ *(unsafe )?fn /s/\(self([,)])/\(\&self\1/
}
# Patch public helpers.
/^impl.*Helpers/,/^\}$/ {
s/^impl(<'a>)? ([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? for (&'a )?([^ ]+) \{$/impl \5 {/
/^ *(unsafe )?fn .*\(self.*[<&]'a/ {
s/&'a /\&/g
s/<'a, /</g
}
/^ *(unsafe )?fn .*\(&?self[,)]/s/(unsafe )?fn/pub &/
/^ *pub (unsafe )?fn /s/\(self([,)])/\(\&self\1/
}
The few error cases were then fixed by hand.
2015-08-27 16:59:02 +02:00
João Oliveira
fd87c8cb3e
make dom_struct derive HeapSizeOf,
...
closes #7357
2015-08-27 01:17:48 +01:00
Bogdan Cuza
45145108da
Measure heap memory usage for more types. Fixes #6951
2015-08-13 21:44:41 +03:00
David Zbarsky
bc1eb97671
Remove some more unnecessary let bindings
2015-07-14 14:48:16 -04:00
Michael Wu
675267b782
Upgrade to SM 39
2015-06-19 18:42:48 -04:00
Anthony Ramine
6802bafc39
Cleanup URLSearchParams
...
It now uses rust-url for its serializer.
2015-05-27 12:19:16 +02:00
Anthony Ramine
3b82cba011
Implement trivial stringifiers
2015-04-29 19:07:09 +02:00
Anthony Ramine
7197052c0d
Uniformise root() methods
...
They now live in traits Rootable, OptionalOptionalRootable, OptionalRootable
and ResultRootable.
2015-04-28 09:22:45 +02:00
Ms2ger
a862479ca8
Remove as_slice() calls from script.
2015-04-26 10:52:55 +02:00
Ms2ger
9df501afd9
Fix URLSearchParams formatting.
2015-04-16 19:36:31 +02:00
Corey Farwell
5eaa922045
Update WHATWG links to use HTTPS
...
Extracted this out of #5649
This commit was created with the following commands:
```
find . -iname "*.webidl" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```
```
find . -iname "*.rs" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```
2015-04-13 21:34:27 -07:00
Corey Farwell
46f14449d0
Add links to spec for script::dom structs/methods
2015-03-28 20:04:30 -04:00
Ms2ger
e106ad84bf
Remove some unused imports.
...
These became unused in f45db7714c
; I don't know
why I didn't notice that.
2015-03-28 17:23:48 +01:00
Ms2ger
f45db7714c
Simplify URLSearchParams::serialize's percent-encoding.
2015-03-27 15:35:13 +01:00
Corey Farwell
5697095298
dom::urlsearchparams cleanup and documentation
2015-03-22 20:51:48 -04:00
Ms2ger
5f15eb5fbf
Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev.
2015-03-18 13:18:31 -04:00
Ms2ger
d8c2c88bbd
Replace Root::deref by a custom get_unsound_ref_forever method.
...
This will hopefully make it clearer that this is not the correct function
to call.
2015-02-05 18:45:20 +01:00
Ms2ger
505159a464
Import the util crate as util rather than servo_util.
...
This used to conflict with the util crate from the standard library, which
has long since been removed.
The import in layout has not been changed because of a conflict with the
util mod there.
2015-01-29 12:16:41 +01:00
Josh Matthews
95fc29fa0d
Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev.
2015-01-28 10:16:49 +10:00
bors-servo
0793137631
auto merge of #4575 : mttr/servo/warnings, r=jdm
...
Notes:
* This adds `#![allow(missing_copy_implementations)]` to components/*/lib.rs. I'm not sure how to approach the missing Copy warnings (are there things for which Copy should NOT be implemented, and how can I tell?) so I stuck this in to make life easier when looking through the warnings. I can easily remove this if necessary.
* This leaves the following type of warnings, which I couldn't figure out how to approach (I'll investigate it later if no one else wants to).
```
css/matching.rs:72:23: 72:35 warning: use of deprecated item: Use overloaded core::cmp::PartialEq, #[warn(deprecated)] on by default
css/matching.rs:72 this_as_query.equiv(other)
^~~~~~~~~~~~
css/matching.rs:95:10: 95:49 warning: use of deprecated item: Use overloaded core::cmp::PartialEq, #[warn(deprecated)] on by default
css/matching.rs:95 impl<'a> Equiv<ApplicableDeclarationsCacheEntry> for ApplicableDeclarationsCacheQuery<'a> {
```
2015-01-08 16:03:55 -07:00
Matthew Rasmus
020a767849
Fix Equiv related deprecation warnings
...
...except where we have our own implementations of Equiv.
2015-01-08 08:51:11 -08:00
Matt McCoy
85df7f0d6f
Fixes #4164 Make Constructor and new functions take GlobalRef by value
2015-01-07 18:52:41 -05:00
Ms2ger
1dad710063
Replace Root::deref() calls by Root::r() calls where possible.
...
This changes those calls that were already sound.
2015-01-01 20:36:43 +01:00
Manish Goregaokar
21a888341d
Ensure that Reflectors are the first field
2014-12-27 02:53:36 +05:30
Manish Goregaokar
7d65673561
Remove extra spaces
...
Command: `find . -maxdepth 1 -type f -print0 | xargs -0 sed -z -i "s/}\\n\\n\\n/}\\n\\n/"`
2014-12-27 02:53:35 +05:30
Manish Goregaokar
552db382d6
Remove manual impls of Reflectors (autogen)
...
Obtained via:
`find . -maxdepth 1 -type f -print0 | xargs -0 sed -z -i "s/\\nimpl Reflectable for[^{]*{[^}]*}[^}]*}\\n//"`
`find . -maxdepth 1 -type f -print0 |xargs -0 grep -lZ dom_struct | xargs -0 grep -LZ "reflector()\\|Reflector::new" |xargs -0 sed -z -i "s/use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};/use dom::bindings::utils::reflect_dom_object;/"`
followed by semi-automated removal of leftover imports
2014-12-27 02:52:33 +05:30
Ms2ger
466faac2a5
Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d.
2014-12-17 15:19:45 -05:00
Michael Booth
2cbf5a3671
Updated reflect_dom_object to be passed by value
2014-11-30 19:47:52 +00:00
Jack Moffitt
d1b433a3b3
Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a
2014-11-13 11:17:43 +10:00
Tetsuharu OHZEKI
6d089a87d5
Use DOMRefCell for URLSearchParams.
2014-10-22 10:01:01 +09:00
Manish Goregaokar
3f2cbb275b
Use #[dom_struct] everywhere
2014-10-16 10:20:18 +05:30
Tim Taubert
acd98a73a4
Simple privatizations
2014-10-13 11:13:12 +02:00