Commit graph

32 commits

Author SHA1 Message Date
Arthur Skobara
5eeb6aaa02 servo: Merge #8949 - Remove from Trusted::new an unnecessary argument (from askobara:refactoring-trusted-new); r=jdm
Fixes #8779

Source-Repo: https://github.com/servo/servo
Source-Revision: e493a0655e69c1472a53708d213fd102decc59cb
2015-12-13 03:24:40 +05:01
Corey Farwell
8c454ce7ad servo: Merge #8930 - Pass around event types as Atoms instead of Strings (from frewsxcv:event-type-atom); r=nox
`Event` internally stores the `type` as an `Atom`, and we're `String`s
everywhere, which can cause unnecessary allocations to occur since
they'll end up as `Atom`s anyways.

Source-Repo: https://github.com/servo/servo
Source-Revision: 99fd946130c9f06433b47c7f60241d5f7ad14a5b
2015-12-11 20:43:35 +05:01
Keith Yeung
59f2bc1dcd servo: Merge #8853 - Split fn script_chan into 5 different task channel fn (from KiChjang:generic-task-sources); r=jdm
Partial #7959.

Source-Repo: https://github.com/servo/servo
Source-Revision: ef000a458a52051b55b65e254ff9fe1a55835d04
2015-12-07 07:17:10 +05:01
Alan Jeffrey
f8093754b7 servo: Merge #8477 - Opaque DOMString (from asajeffrey:opaque-domstring); r=asajeffrey
This patch makes DOMString an opaque wrapper round String (currently it's a transparent wrapper).

The changes are:

* Replacing DOMString(foo) by DOMString::from(foo).
* Replacing foo.0 by String::from(foo).
* Adding functions clear, push_str and extend for in-place mutation of DOMStrings.
* Replacing DOMString by String in other threads (devtools, storage and filereader).
* Making DOMString implement !Send.
* Removing the pub attribute from the contents of DOMString.

This enables experimenting with other string representations in the DOM.

Source-Repo: https://github.com/servo/servo
Source-Revision: 62acdd303b78951885c2c90747b31f318907d6c9
2015-11-13 06:48:30 +05:01
Ms2ger
7cb2a13f43 servo: Merge #8312 - Make DOMString a newtype around String, rather than a typedef (from Ms2ger:DOMString); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: abfd1fb1bf071961bc8a581927eaa96a2d3e2cba
2015-11-04 16:18:41 +05:01
rohan.prinja
e8b504412b servo: Merge #8221 - move modules around (from ajnirp:8130-reorganise); r=jdm
for #8130

Source-Repo: https://github.com/servo/servo
Source-Revision: daad09d44245228fba9118316937add71bec7c58
2015-11-04 02:27:02 +05:01
Eli Friedman
3d84958c1f servo: Merge #8056 - Fix the implementation of JSTraceable for RefCell (from eefriedman:trace-refcell); r=jdm
The existing implementation could panic; make sure that doesn't
happen by requiring that the contents of a RefCell are trivially
traceable (i.e. the value don't contain any traceable objects).

I'm not sure whether the TriviallyJSTraceable trait is actually
worthwhile; maybe we should just never use RefCell in the DOM.

Source-Repo: https://github.com/servo/servo
Source-Revision: 4f51710ed387baa1ad0a6e4cdb0fc5eee44093d5
2015-11-03 06:38:40 +05:01
rohan.prinja
258086b9fa servo: Merge #8250 - remove get_rooted() and replace all references to it with references … (from ajnirp:8246-remove-get-rooted); r=Ms2ger
…to get()

for #8246

Source-Repo: https://github.com/servo/servo
Source-Revision: 00b60b93860d32e1c5aaf0f9b4a2ce5110880652
2015-10-30 06:08:44 +05:01
Anthony Ramine
bb8125a3da servo: Merge #8041 - Introduce trait Castable (from nox:castable); r=jdm
Removes all those messy FooCast structures in InheritTypes.rs.

Source-Repo: https://github.com/servo/servo
Source-Revision: 674589c370d978f543e71f995d58c5b28e6e9842
2015-10-21 07:57:32 -06:00
Eli Friedman
7cf10cb041 servo: Merge #8026 - Fix uses of JS<T> as a type on the stack (from eefriedman:js-rooting); r=nox
`JS<T>` belongs on the heap, and only on the heap.  This is a collection of fixes so that code uses either `Root<T>` or `&T` to pass around garbage-collected pointers.

Ideally, we could completely ban constructing a `JS<T>` outside of constructor functions, but we aren't quite there yet.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7c7dbde0f4372037aac3635b8d81531ca9cdced3
2015-10-16 08:05:59 -06:00
Pierre Chevalier
abc6fc4ff8 servo: Merge #7932 - Refactor away duplication of get_rooted functionality (from pierrechevalier83:fix_issue_7929); r=jdm
Refactor .get().map(Root::from_rooted)
and .get().map(|foo| foo.root())
to .get_rooted() on MutNullableHeap objects.

First part done mechanically with the following comand:
sed -i s/"get().map(Root::from_rooted)"/"get_rooted()"/g *.rs

Second part done manually after finding them with
git grep ".get().map("

Fixes #7929.

Source-Repo: https://github.com/servo/servo
Source-Revision: 96356a4b339af07831dec79e0084079328b43b53
2015-10-09 05:23:25 -06:00
Anthony Urena
1481b17cee servo: Merge #7882 - Refactor Error enum usage to consistently be qualified (from anthgur:consistent-enum-use); r=Ms2ger
Closes #7869

Source-Repo: https://github.com/servo/servo
Source-Revision: f5cd90805ec67fb52f73ec4cef9cef881a67522d
2015-10-06 04:58:17 -06:00
Ravi Shankar
7d512d50d1 servo: Merge #7698 - sorted the declarations in various files (from Wafflespeanut:sorting); r=frewsxcv
This is a direct extract from my abandoned PR for a lint (#7546), along with some rather clumsy modifications (only on `components/script/dom/mod.rs` and `components/style/lib.rs`), because I had to sort some of the files again to make peace with tidy, which hasn't been educated about sorting yet!

Source-Repo: https://github.com/servo/servo
Source-Revision: a7208869f2903e36f9b2f540b55b50283d7df466
2015-09-23 15:02:56 -06:00
Anthony Ramine
6953aa403a servo: Merge #7606 - Move the type_id fields to DOMClass (from nox:move-typeid); r=jdm
Cc @michaelwu.

Source-Repo: https://github.com/servo/servo
Source-Revision: d5ee58caf269779e86b2efc50ddf37d3e4eba9b9
2015-09-13 11:53:42 -06:00
Corey Farwell
de4ce06ffa servo: Merge #7483 - Enforce linking to spec for method implementations via macros (from frewsxcv:macro-spec-links); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 4984aaf8bfca0698a132e10e9f48cef42d1b8302
2015-08-31 21:17:54 -06:00
benshu
0d2fab2fb7 servo: Merge #7341 - Add profiling to the script event loop (#5331) (from benschulz:script-profiling); r=Manishearth
I fear the category names are unimaginative; in some cases they may even be misleading or downright incorrect. Requests to rename categories as well as any other feedback are highly appreciated.

Source-Repo: https://github.com/servo/servo
Source-Revision: 6431e8da43817e8a6b1e4757afbcf45c1a629707
2015-08-27 17:00:15 -06:00
Anthony Ramine
c327bc7867 servo: Merge #7416 - Make the traits for the IDL interfaces take &self (from nox:methods-ref); r=frewsxcv
Source-Repo: https://github.com/servo/servo
Source-Revision: 71b277d5675556e61a82ae9dbf3105449c3a8275
2015-08-27 15:08:41 -06:00
Anthony Ramine
d2ee701ee9 servo: Merge #7401 - Remove helper traits (from nox:rm-helpers); r=Manishearth
Now that `JSRef<T>` is gone, there is no need to have helper traits.

Source-Repo: https://github.com/servo/servo
Source-Revision: 909429702972d53bf02dfe9a4aa93ea0cb588cf4
2015-08-27 09:38:48 -06:00
João Oliveira
d39bd47b08 servo: Merge #7361 - make dom_struct derive HeapSizeOf (from jxs:master); r=Ms2ger
closes #7357

Source-Repo: https://github.com/servo/servo
Source-Revision: 532fd19d69fd11d06bca7539c722a46fab2c4419
2015-08-27 02:35:45 -06:00
Johann Tuffe
5c3a5a67f5 servo: Merge #7265 - Add alphabetical order check for use statements (from tafia:tidy-use); r=Ms2ger
close #7112

Source-Repo: https://github.com/servo/servo
Source-Revision: a5fbb2f2a6fa79755f975feff2435abb6a5dd0e9
2015-08-20 07:43:56 -06:00
Josh Matthews
6a81d499fc servo: Merge #7203 - Add automated style nit checks to test-tidy (from jdm:style); r=Ms2ger
Expands on the work by @wilmoz and cleans up the existing errors. Closes #7180. Closes #7111.

Source-Repo: https://github.com/servo/servo
Source-Revision: e74825f9fde8e222f4ba9bb24b2c2a3864c73e5f
2015-08-16 08:37:40 -06:00
Ravi Shankar
35668fd5a5 servo: Merge #7006 - Splitting ScriptMsg into various enums (from Wafflespeanut:script_cleanup); r=jdm
... for #3734, which is also one of the oldest issues. (/cc @jdm)

Source-Repo: https://github.com/servo/servo
Source-Revision: 6a52ec94840fbaf43a29d76879e2b59542a9963d
2015-08-15 03:48:47 -06:00
Bogdan Cuza
b3e4dcef5f servo: Merge #7097 - Measure heap memory usage for more types. Fixes #6951 (from boghison:memtypes); r=jdm
Also adds HeapSizeOf implementations/derive for some types. I've used "Cannot calculate Heap size" as a reason everywhere, because my imagination is rather limited. If you'd like me to change this message for specific types, please write something like this: "Trusted - Cannot calculate Heap size for Trusted" so that it would be easier for me to replace them through a script :)

Source-Repo: https://github.com/servo/servo
Source-Revision: a03616f379c255cc6c9b6e1d04dd7d98bd9926ce
2015-08-13 13:16:14 -06:00
farodin91
104d12b7cd servo: Merge #7001 - Remove Unnecessary Code in FileReader #6753 (from farodin91:filereader); r=Ms2ger
@jdm r?

Source-Repo: https://github.com/servo/servo
Source-Revision: ddd2840eed6a9c119b188c7c3aa7258f25702697
2015-08-06 06:13:56 -06:00
r0e
f1ca75c83b servo: Merge #6944 - Fix for issue #6768. Refactor ReadData and BlobBody (from r0e:testing); r=jdm
Fix for issue #6768.

Merge common fields of ReadData and BlobBody to avoid passing redundant information to functions.

Source-Repo: https://github.com/servo/servo
Source-Revision: ac533b146660922d7d4e6f1836f189a63334df65
2015-08-04 20:21:35 -06:00
farodin91
1507d19112 servo: Merge #6807 - Refactor FileReader #6762 #6763 #6750 #6751 (from farodin91:filereader); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 52c2049f2a47c814888e98c509eac83dc071e829
2015-07-29 07:07:22 -06:00
farodin91
63c07ae335 servo: Merge #6803 - Adding for support Blob.{close,isClose} #6723 (from farodin91:blob); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 96b0f96ce2829cc38457ace22be4f731f8ca9d77
2015-07-29 04:41:19 -06:00
Bogdan Cuza
e9c4da1e57 servo: Merge #6699 - Tidy check for FooMethods in components/script/dom/*.rs and color for tidy (from boghison:tidyspec); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 14ccb22e679722ed3374c8facec21adcf0f2b247
2015-07-28 08:56:39 -06:00
Michael Howell
8ff7eb2d9f servo: Merge #6782 - Use empty Vec instead of None (from notriddle:empty-vec); r=jdm
Closes #6764

Source-Repo: https://github.com/servo/servo
Source-Revision: 2672f2bbe46fd833c6a84b70edaa99dcaf092b5c
2015-07-27 19:45:09 -06:00
Michael Howell
777bd4217c servo: Merge #6776 - Remove unnecessarily verbose matches (from notriddle:filereader-matches); r=jdm
Fixes #6766.

Source-Repo: https://github.com/servo/servo
Source-Revision: fd1bf1900d876be2da4743c65ea0956be1057453
2015-07-26 00:18:10 -06:00
Ravi Shankar
55353ec7ad servo: Merge #6761 - Combining FileReaderEvent and Process into an enum; r=jdm (from Wafflespeanut:filereader); r=jdm
This one's for #6752. The build was successful for this change. I'll commit the next one for `perform_annotated_read_operation` in a moment...

Source-Repo: https://github.com/servo/servo
Source-Revision: 3af6992151b087412b2dd460d20b34fb9fc2f28f
2015-07-25 13:58:34 -06:00
farodin91
f8348d597e servo: Merge #6716 - Implement FileReader.{readAsText,readAsDataUrl}. Fixes #6172 (from farodin91:filereader); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: e32068d17bdf6a87a63bea97b6364caa22b37e79
2015-07-23 14:37:00 -06:00