Ms2ger
e5ae267e80
Remove unsound Root::deref() call in Document::get_html_element.
2015-01-01 20:36:44 +01:00
Ms2ger
ff96d8ccd4
Remove unsound Root::deref() calls in CSSStyleDeclaration.
2015-01-01 20:36:44 +01:00
Ms2ger
740ee84809
Remove unsound Root::deref() call in BrowserContext::create_window_proxy.
2015-01-01 20:36:44 +01:00
Ms2ger
925058ef26
Remove unsound Root::deref() calls in XMLHttpRequest.
2015-01-01 20:36:44 +01:00
Ms2ger
a094c0a7f3
Remove unsound Root::deref() call in Attr::set_value.
...
This changes those calls whose unsoundness was not picked up by the type system
because of a lifetime constraint that cannot be expressed at this time.
2015-01-01 20:36:44 +01: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
Ms2ger
c9f26dfd59
Rename Root::root_ref() to Root::r().
...
As it will be used much more widely after the upcoming changes, this limits
the effort reading and writing the method calls.
2015-01-01 20:36:43 +01:00
Ms2ger
1290c18794
Remove the 'b lifetime from Root.
...
It does not add any safety, as the reference is constructed from a raw pointer
without limiting the lifetime in any way.
2015-01-01 20:36:43 +01:00
Ms2ger
95ec20bd97
Remove the 'a lifetime from Root.
...
It does not add any safety, as the reference is constructed from a raw pointer
without limiting the lifetime in any way.
2015-01-01 20:36:43 +01:00
bors-servo
111a196e9d
auto merge of #4470 : shinglyu/servo/contentType, r=jdm
...
A follow-up for issue #1820 , adds the optional "type" support.
2015-01-01 08:33:40 -07:00
bors-servo
fda38cf673
auto merge of #4496 : yodalee/servo/issue4484-ToJSValConvertible-for-str, r=jdm
...
#4484
Add ToJSValConvertible trait to str type.
2015-01-01 03:00:44 -07:00
bors-servo
685dec1abc
auto merge of #4521 : wenderen/servo/separate-lints, r=Manishearth
...
for #4509
2015-01-01 01:33:41 -07:00
Shing Lyu
6df9b7fd3a
Bug #1820 , add the optional "type" parameter to Blob
2015-01-01 16:23:21 +08:00
Rohan Prinja
7ac58f202f
break up lints.rs into separate files
2015-01-01 13:50:55 +05:30
yodalee
bb087c238b
use str to_jsval() now
...
xmlhttprequest.rs, CodegenRust.py
replace into_string().to_jsval() to to_jsval()
conversions.rs
DOMString to_jsval() use as_slice().tojsval() now
2015-01-01 02:17:33 +08:00
bors-servo
841f1b6f25
auto merge of #4520 : Ms2ger/servo/or_init, r=jdm
2014-12-31 07:33:46 -07:00
Ms2ger
2669dac312
Use or_init for HTMLCanvasElement::GetContext.
2014-12-31 14:49:25 +01:00
yodalee
6f569dee92
add str ToJSValConvertible for str type
2014-12-31 20:20:44 +08:00
bors-servo
0da57abec6
auto merge of #4488 : servo/servo/into_string-lint, r=jdm
...
This is a rebase of #4366 .
2014-12-31 05:00:52 -07:00
Manish Goregaokar
0410d3d9b2
plugins: Add seanmonstar's to_string() lint
2014-12-31 10:34:44 +01:00
Ms2ger
b6117a57aa
Replace the remaining to_string calls by into_string calls.
2014-12-31 10:34:44 +01:00
bors-servo
37a97f3273
auto merge of #4515 : brunoabinader/servo/codegen-cleanup, r=Ms2ger
...
Main changes:
- Whitespace (indent) fixes;
- CGIndent-related fixes;
- Removed consecutive empty lines;
- Removed empty lines before closing brackets;
- Codegen style fixes;
Tests:
We don't have a static code style analyzer yet, so I've checked using the following (together with manual lookup at some selected generated bindings):
1. Check for lines with wrong indentation (1 to 3 whitespaces at the beginning)
Command: ```$ pcregrep -r "^[ ]{1,3}[^ ]" components/script/dom/bindings/codegen/Bindings```
Expected: None
Actual: None
2. Check for lines with wrong indentation (5 to 7 whitespaces at the beginning)
Command: ```$ pcregrep -r "^[ ]{5,7}[^ ]" components/script/dom/bindings/codegen/Bindings```
Expected: None
Actual: None
3. Check for lonely semicolons
Command: ```$ pcregrep -r " \{0,\};" components/script/dom/bindings/codegen/Bindings```
Expected: None
Actual: None
4. Check for empty lines before closing brackets
Command: ```$ pcregrep -r -M "^$\n {0,}\}" components/script/dom/bindings/codegen/Bindings```
Expected: None
Actual: None
5. Check for consecutive empty lines
Command: ```$ pcregrep -r -M "^$\n^$\n" components/script/dom/bindings/codegen/Bindings```
Expected: None
Actual:
```components/script/dom/bindings/codegen/Bindings/ChildNodeBinding.rs
components/script/dom/bindings/codegen/Bindings/ElementCSSInlineStyleBinding.rs
components/script/dom/bindings/codegen/Bindings/ParentNodeBinding.rs
components/script/dom/bindings/codegen/Bindings/URLUtilsBinding.rs
components/script/dom/bindings/codegen/Bindings/URLUtilsReadOnlyBinding.rs
```
All of the above are ```[NoInterfaceObject]```, thus providing only imports. We shouldn’t, however, generate empty lines (investigate this later on).
2014-12-30 09:51:45 -07:00
Bruno de Oliveira Abinader
bb577968e5
Codegen style fix
2014-12-30 12:40:49 -04:00
Bruno de Oliveira Abinader
7cca51b3b4
Codegen empty lines fix
2014-12-30 12:40:48 -04:00
Bruno de Oliveira Abinader
0721c624d9
Codegen indent fixes
2014-12-30 12:40:48 -04:00
bors-servo
5d8ec54959
auto merge of #4487 : Ms2ger/servo/gfx-test, r=jdm
...
Note that I had to change some expectations to make them pass.
2014-12-30 09:03:45 -07:00
Bruno de Oliveira Abinader
c950e3d61e
Codegen whitespace fixes
2014-12-30 11:28:59 -04:00
Ms2ger
67eafea8ef
Reformat the transform_text tests.
2014-12-30 10:11:40 +01:00
bors-servo
de3cff0e08
auto merge of #4512 : gutworth/servo/zero-warning, r=jdm
...
This fixes the following warning:
```
display_list/mod.rs:735:20: 735:30 warning: use of deprecated item: Use `Int::zero()` or `Float::zero()`., #[warn(deprecated)] on by default
display_list/mod.rs:735 let zero = Zero::zero();
^~~~~~~~~~
```
2014-12-29 18:48:41 -07:00
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
Benjamin Peterson
28fa83e36b
use geom::num::Zero rather than the deprecated num::Zero trait in std
...
This fixes the following warning:
display_list/mod.rs:735:20: 735:30 warning: use of deprecated item: Use `Int::zero()` or `Float::zero()`., #[warn(deprecated)] on by default
display_list/mod.rs:735 let zero = Zero::zero();
^~~~~~~~~~
2014-12-29 18:30:16 -06: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