Corey Farwell
83333e972c
Add/update spec links for SupportedPropertyNames methods
2015-09-20 11:48:14 -04: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
João Oliveira
832cfac747
rewrite uses of map as if let
...
closes #7580
2015-09-15 02:51:59 +01:00
bors-servo
5a0be12e43
Auto merge of #7531 - nox:template, r=Ms2ger
...
Implement <template>
All tests using iframes can't currently pass, same for innerHTML-related tests with <template> elements. The latter contradicts the spec, see the links below.
Apart from this, they work, AFAICT.
https://github.com/servo/html5ever/issues/164
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27314
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7531 )
<!-- Reviewable:end -->
2015-09-08 02:29:00 -06:00
Anthony Ramine
a7476a758e
Bump html5ever to 0.2.4, <template> support!
...
The failing <img> test comes from the now-correct parsing of <font face> elements
in SVG.
2015-09-08 10:28:21 +02:00
Tetsuharu OHZEKI
63627405d9
script: change requestAnimationFrame returns the unsigned long type.
2015-09-04 15:40:30 +09:00
Prabhjyot Singh Sodhi
105ea0d690
renaming tokens(), atom() and uint() and rewriting to return or panic
2015-09-02 22:20:33 +05:30
bors-servo
eaf90c0b1c
Auto merge of #7452 - nox:cleanup-attributes, r=nox
...
Introduce VirtualMethods::attribute_mutated()
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7452 )
<!-- Reviewable:end -->
2015-09-02 08:14:33 -06:00
Anthony Ramine
58e1bd0e57
Introduce VirtualMethods::attribute_mutated()
...
This replaces before_remove_attr(), after_remove_attr() and after_set_attr().
The virtual method takes the mutated attribute and an AttributeMutation value
to disambiguate between "attribute is changed", "attribute is added" and
"attribute is removed".
In the case of "attribute is changed", the mutation value contains a reference
to the old value of the mutated attribute, which is used to unregister outdated
named elements when the "id" attribute is changed on an element.
This greatly simplifies the handling of attributes, which in many cases don't
have any specific behaviour whether they are removed or changed or added. It
also fixes a few bugs where things were put in before_remove_attr() instead of
after_remove_attr() (e.g. when removing an href attribute from a base element).
A few helper functions in Element were also renamed and made private.
2015-09-02 15:45:38 +02:00
Corey Farwell
3a1d140ab5
Enforce linking to spec for method implementations via macros
2015-08-31 21:02:23 -04:00
Anthony Ramine
105d990845
Replace many uses of to_ascii_lowercase() by make_ascii_lowercase()
2015-08-30 15:30:00 +02:00
bors-servo
72125f070d
Auto merge of #7391 - jdm:prefs, r=Ms2ger
...
Replace catch-all experimental flag with fine-grained boolean prefere…
…nces initialized from a JSON document.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7391 )
<!-- Reviewable:end -->
2015-08-28 10:08:32 -06:00
Corey Farwell
5ccb0d43ef
Merge adjacent identical impl
sections
...
Prior to #7416 and #7401 , many of these `impl` sections were not
identical
2015-08-28 10:30:42 -04:00
Josh Matthews
a3ee9b5dd9
Replace catch-all experimental flag with fine-grained boolean preferences initialized from a JSON document.
2015-08-28 10:30:04 -04:00
Anthony Ramine
709d347872
Make the traits for the IDL interfaces take &self
2015-08-27 22:27:43 +02:00
bors-servo
8c301c291a
Auto merge of #7389 - frewsxcv:implement-nihilistic-methods, r=nox
...
Implement 'do nothing' methods on Window and Document
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7389 )
<!-- Reviewable:end -->
2015-08-27 12:30:28 -06:00
Corey Farwell
bf50145fbd
Implement 'do nothing' methods on Window and Document
2015-08-27 13:13:10 -04:00
Anthony Ramine
2a028f66a2
Remove AttributeHandlers
...
On components/script/*.rs:
# Remove imports.
/^ *use dom::element::\{.*AttributeHandlers/ {
s/\{AttributeHandlers, /\{/
s/, AttributeHandlers//g
s/\{([a-zA-Z]+)\}/\1/
/\{\}/d
s/::self;$/;/
}
/^ *use dom::element::\{?AttributeHandlers\}?;$/d
# Remove AttributeHandlers.
/^pub trait AttributeHandlers \{$/,/^\}$/D
# Patch AttributeHandlers methods.
/^impl<'a> AttributeHandlers for &'a Element \{/,/^\}$/ {
s/^impl<'a> AttributeHandlers for &'a Element \{/impl Element {/
/^ *fn /s/\(self([,)])/\(\&self\1/
/^ *fn.*\(&self/s/fn/pub fn/
}
The few error cases were then fixed by hand.
2015-08-27 16:59:04 +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
Corey Farwell
b11be4d253
Initial implementation of ownPropertyKeys proxy handler
...
Generates `SupportedPropertyNames` on DOM structs that should implement
it. Most of them are unimplemented now (which can be implemented in
later PRs), with the exception of `HTMLCollection`. Also added a couple
relevant WPT tests.
Closes #6390
Closes #2215
2015-08-20 11:58:42 -04:00
Johann Tuffe
ec07178b6f
sort all uses
2015-08-20 20:47:12 +08:00
bors-servo
70b9922eb0
Auto merge of #7260 - notriddle:issue_7169, r=Ms2ger
...
Navigate to a new page even when there's a fragment.
Closes #7169
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7260 )
<!-- Reviewable:end -->
2015-08-19 01:40:28 -06:00
Michael Howell
af31e8ed0f
Navigate to a new page even when there's a fragment.
...
Closes #7169
2015-08-18 17:35:09 -07:00
João Oliveira
067a22a868
Replace uses of for foo in bar.iter()
,
...
and `for foo in bar.iter_mut(), and for foo in bar.into_iter()
(continuation of #7197 )
2015-08-18 01:46:11 +01:00
vectorijk
14ac1ef75a
remove ScriptListener
...
ref #7175
2015-08-16 01:34:55 -07:00
João Oliveira
0038580abf
Replace uses of for foo in bar.iter()
and for foo in bar.iter_mut()
...
closes #7197
2015-08-15 02:27:39 +01:00
João Oliveira
9c11781880
replace .len() == 0 with is_empty()
...
closes #7198
2015-08-14 04:00:33 +01:00
bors-servo
a03616f379
Auto merge of #7097 - boghison:memtypes, r=jdm
...
Measure heap memory usage for more types. Fixes #6951
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 :)
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7097 )
<!-- Reviewable:end -->
2015-08-13 13:16:14 -06:00
Bogdan Cuza
45145108da
Measure heap memory usage for more types. Fixes #6951
2015-08-13 21:44:41 +03:00
bors-servo
f3b7c5cb4b
Auto merge of #7132 - jdm:docenum, r=ms2ger
...
Document the use and meaning of the devtools control messages. Fixes …
…#6922.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7132 )
<!-- Reviewable:end -->
2015-08-13 12:41:48 -06:00
Josh Matthews
e59de75608
Simplify devtools frame marker notification. Record each frame tick based on a single message sent from the script task that ticked.
2015-08-12 00:59:58 -04:00
bors-servo
0c5158587d
Auto merge of #6757 - mskrzypkows:document_hasFocus, r=jdm
...
Implementing document.hasFocus method, needs tests. #6475
I'm not sure if I have to implement some test for a new document method. As I remember there were tests for document methods, is it changed now? Where should I add tests?
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6757 )
<!-- Reviewable:end -->
2015-08-11 15:35:21 -06:00
Maciej Skrzypkowski
07c0cd8a18
Implementing document.hasFocus method. #6475
2015-08-10 21:23:09 +02:00
bors-servo
530d4547c9
Auto merge of #7046 - Ms2ger:base-url, r=dzbarsky
...
Implement a base_url getter and use it for style attributes.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7046 )
<!-- Reviewable:end -->
2015-08-08 06:53:32 -06:00
Ms2ger
6951119f5e
Cache the first base element with an href attribute on the Document.
2015-08-08 14:10:35 +02:00
bors-servo
a0af7a1581
Auto merge of #7075 - Ms2ger:load_url, r=dzbarsky
...
Improve code around Window::load_url.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7075 )
<!-- Reviewable:end -->
2015-08-08 06:09:13 -06:00
Ms2ger
7f2b21c06e
Implement base_url and fallback_base_url methods.
2015-08-08 11:26:33 +02:00
Harrison G
e40b141409
Fix requestAnimationFrame timestamps in queue
...
This resolves #7044 which involved callbacks
in a queue not receiving the same timestamp despite
the specification saying they should. An extra test
was added to verify the correct behavior.
2015-08-07 19:02:52 -04:00
James Graham
36da7e2270
Add DOMLoad message to constellation that is sent after the DOM Load event is dispatched.
2015-08-07 16:55:13 +01:00
Ms2ger
da88e9ad9f
Inline Document::load_anchor_href into its only caller.
2015-08-07 15:24:13 +02:00
Ms2ger
40b5c4586e
Push the url parsing out of Window::load_url.
...
This will allow the two callers to decide on the base url independently.
2015-08-07 15:19:16 +02:00
Ms2ger
d2077dd245
Update Animation Timing links and terminology to the HTML specification.
2015-08-05 09:21:08 +02:00
Josh Matthews
8620fe5995
Start reporting memory usage for Window and all nodes in all DOM trees for frame treese in script tasks.
2015-08-03 23:05:00 -04:00
Patrick Walton
2aa5174246
script: Make the resource task communication use IPC channels.
2015-07-31 11:28:09 -07:00
Patrick Walton
44d13f7fd4
net: Use a thread for each AsyncResponseTarget
to avoid having to send
...
trait objects across process boundaries.
2015-07-31 11:27:49 -07:00
Patrick Walton
9c9d7dc93b
net: Make most of the resource task messages serializable.
2015-07-31 11:27:49 -07:00
bors-servo
4837dd9a1c
Auto merge of #6850 - servo:rustup_2015-07-30, r=SimonSapin
...
Upgrade to rustc 1.3.0-dev (87055a68c 2015-07-30)
This builds and passes unit tests.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6850 )
<!-- Reviewable:end -->
2015-07-30 14:46:13 -06:00
Bogdan Cuza
233a769c67
Add spec links
2015-07-28 13:28:41 +02:00
Simon Sapin
a3c0366bd6
Fix deprecation warnings
2015-07-24 22:16:35 +02:00