Commit graph

7986 commits

Author SHA1 Message Date
bors-servo
d98062e2d4 auto merge of #4491 : yodalee/servo/update-ORGANIZATION-description, r=jdm
This is a short update to ORGANIZATION.md. Since I just join this project, and cannot find the entry point described in this doc, so I search git log to figure out the description of each file and directory.
Any comment is welcome.
2014-12-29 18:21:45 -07:00
yodalee
5912704458 add ` around path 2014-12-30 08:34:23 +08:00
bors-servo
b3059ee85b auto merge of #4455 : servo/servo/to_css, r=jdm
See https://github.com/servo/rust-cssparser/pull/67 and https://github.com/servo/servo/issues/4440.

r? @jdm
2014-12-29 16:33:41 -07:00
yodalee
1d0bc45704 update description in ORGANIZATION.md 2014-12-30 06:30:19 +08:00
Simon Sapin
a29cb0e5d0 Move the define_css_keyword_enum macro to the style crate. 2014-12-29 21:52:12 +01:00
bors-servo
2c259f477c auto merge of #4057 : jdm/servo/refcountdom, r=Ms2ger
This replaces the specialized TrustedXHRAddress and TrustedWorkerAddress code that was used for the same purpose. A non-zero refcount pins the given DOM object's reflector and prevents it from being GCed even when there are no other outstanding references visible to SpiderMonkey. This will enable us to implement asynchronous operations that refer to particular DOM objects (such as "queue a task to fire a simple event named load at the iframe element" from the spec) safely and conveniently, and paves the way for things like asynchronous network responses.

Some concerns about the resulting size of XHR progress messages have been expressed, but I believe optimizations to reduce that can be implemented in subsequent PRs.

r? @Ms2ger - note in particular the changes to the worker lifetime code. I couldn't figure out how to achieve an identical lifetime to the previous addref/release pairing, and I also was having trouble figuring out why the existing setup was safe. The new implementation now holds the main script task Worker object alive via the TrustedWorkerAddress field in the dedicated worker global scope, which is a significant difference.
2014-12-29 11:57:45 -07:00
Josh Matthews
9a7cd31134 Force all messages to worker tasks to send a TrustedWorkerAddress along with the ScriptMsg. This ensures that the main-thread Worker object is rooted for as long as there are events in flight or being processed. 2014-12-29 13:53:49 -05:00
Josh Matthews
2f059c15e7 Allow refcounting arbitrary DOM objects in concert with the GC to enable safe, asynchronous/cross-task references to pinned objects. 2014-12-29 13:53:48 -05:00
bors-servo
f76a460c53 auto merge of #4483 : brunoabinader/servo/named-deleter, r=Ms2ger
Closes #4469.
2014-12-29 10:21:51 -07:00
Bruno de Oliveira Abinader
ab618dd9c7 Add support for named deleter
Closes #4469.
2014-12-29 12:58:48 -04:00
bors-servo
1539051896 auto merge of #4501 : Ms2ger/servo/script_task, r=jdm 2014-12-29 09:54:45 -07:00
Simon Sapin
5e08e96e38 Fix typo in a cursor keyword. Thanks @nuss-justin! 2014-12-29 16:19:10 +01:00
Simon Sapin
2e35d4e987 Add a match_ignore_ascii_case! macro that does not allocate.
It should replace `match foo.to_ascii_lower().as_slice() { ...}`

@Manishearth I changed map.get to map.find in the lint to work around an ICE:

    task 'rustc' panicked at 'couldn't find node id 0 in the AST map'

Does this look OK?
2014-12-29 16:19:10 +01:00
Simon Sapin
540d218885 Declare dependencies on text_writer.
Transitive dependencies being available is considered a bug:
https://github.com/rust-lang/cargo/issues/1037
2014-12-29 16:19:10 +01:00
Simon Sapin
b9a57531ea Remove some tabs
@jdm, can you configure your editor to not insert them in the first
place?
2014-12-29 16:19:09 +01:00
Simon Sapin
8be85c5e6b Implement ToCss for Cursor and de-duplicate variants and string values. 2014-12-29 16:19:09 +01:00
Simon Sapin
45a08c94a4 Implement ToCss for types in style::properties::common_values::specified 2014-12-29 16:19:09 +01:00
Simon Sapin
4a9d5b1130 Upgrade cssparser to a version with the new ToCss trait. 2014-12-29 16:19:09 +01:00
Ms2ger
a1d21d4c5e Simplify some code in handle_click_event. 2014-12-29 09:51:01 +01:00
bors-servo
366ea4fe79 auto merge of #4486 : ProgramFOX/servo/readonly-csssd, r=jdm 2014-12-28 10:27:44 -07:00
ProgramFOX
18d8ee6ce0 Added readonly flag for CSSStyleDeclaration 2014-12-28 17:39:07 +01:00
bors-servo
c4b93d30e4 auto merge of #4494 : Ms2ger/servo/wpt_20141228, r=Manishearth 2014-12-28 03:30:43 -07:00
Ms2ger
139e91e398 Update web-platform-tests. 2014-12-28 10:39:11 +01:00
bors-servo
56d1b16d1b auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister
Now `#[dom_struct]` also generates Reflectable impls, and there's another lint to ensure that a DOM struct only contains one bare DOM field (as the first field) or a Reflector.

A lot of this was generated by sed -- each autogenerated change has its own commit for easy review; these will be squashed later.
2014-12-27 22:12:45 -07:00
bors-servo
dbb1074782 auto merge of #4490 : Ms2ger/servo/transmutes, r=jdm 2014-12-27 12:27:46 -07:00
bors-servo
b139574cdc auto merge of #4489 : Manishearth/servo/transmute-lint-fix, r=Ms2ger 2014-12-27 09:10:02 -07:00
Ms2ger
0031498e6b Remove some transmute calls. 2014-12-27 17:07:32 +01:00
Manish Goregaokar
93c350e6e3 plugins: Fix transmute lint message 2014-12-27 21:35:49 +05:30
bors-servo
9857ea26cb auto merge of #4485 : servo/servo/into_string, r=Ms2ger
`str::to_string()` goes through a `Formatter`, `str::into_string()` is a direct copy and is apparently 5× faster.

This is a rebase of the boring and bitrot-prone parts of #4366.
2014-12-27 06:51:44 -07:00
Manish Goregaokar
e0b88a9ca2 servo: to_string() -> into_string() 2014-12-27 14:48:36 +01:00
Manish Goregaokar
c7dfb1d24b layout: to_string() -> into_string() 2014-12-27 14:48:36 +01:00
Manish Goregaokar
e9d1740e19 script: to_string() -> into_string() 2014-12-27 14:48:36 +01:00
Manish Goregaokar
475ff4dcb7 style: to_string() -> into_string() 2014-12-27 14:48:35 +01:00
Manish Goregaokar
e973213606 gfx: to_string() -> into_string() 2014-12-27 14:48:35 +01:00
Manish Goregaokar
50c246bdc5 Fix warnings post-upgrade 2014-12-27 03:28:35 +05:30
Manish Goregaokar
21a888341d Ensure that Reflectors are the first field 2014-12-27 02:53:36 +05:30
Manish Goregaokar
d761877ef6 Add inheritance-checking lint 2014-12-27 02:53:35 +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
Manish Goregaokar
21607f066c Add internal plugin for creating Reflectable implementations 2014-12-27 02:43:13 +05:30
Manish Goregaokar
dd8360fb10 Use inline(always) for trace() 2014-12-27 02:43:12 +05:30
bors-servo
3af73e9962 auto merge of #4353 : brunoabinader/servo/domtokenlist, r=Ms2ger
Specs:
https://dom.spec.whatwg.org/#dom-domtokenlist-add
https://dom.spec.whatwg.org/#dom-domtokenlist-remove
https://dom.spec.whatwg.org/#dom-domtokenlist-toggle
https://dom.spec.whatwg.org/#concept-dtl-update
https://dom.spec.whatwg.org/#concept-ordered-set-serializer

Closes #3138.
2014-12-26 13:18:45 -07:00
Bruno de Oliveira Abinader
3624673d2f Updated web-platform-tests results 2014-12-26 14:55:27 -04:00
Bruno de Oliveira Abinader
5afcf3ef65 Implement DOMTokenList.toggle 2014-12-26 14:55:27 -04:00
Bruno de Oliveira Abinader
2cfb4648ce Implement DOMTokenList.remove 2014-12-26 14:55:27 -04:00
Bruno de Oliveira Abinader
aa29dc195d Implement DOMTokenList.add 2014-12-26 14:55:27 -04:00
Bruno de Oliveira Abinader
08e7cf24cd DOMTokenList::check_token_exceptions now returns an Atom 2014-12-26 14:55:26 -04:00
Bruno de Oliveira Abinader
51fac3d2cc Added Element::get_tokenlist_attribute 2014-12-26 14:55:26 -04:00
Bruno de Oliveira Abinader
8859286a99 Added AttrValue::from_atomic_tokens & Element::set_atomic_tokenlist_attribute 2014-12-26 14:55:26 -04:00
Bruno de Oliveira Abinader
c5f7e553e4 Avoid duplicated tokens in AttrValue::from_serialized_tokenlist 2014-12-26 13:08:20 -04:00