Commit graph

12532 commits

Author SHA1 Message Date
Sam Gibson
c8c36f4490 Injects the network connector as a dependency into http_loader::load
servo/servo#6727
2015-08-30 12:13:30 +10:00
Sam Gibson
610ef40105 Refactors http_loader::load to be synchronous w/ an async wrapper
This simplifies the arguments that are passed in and should make testing
errors/responses easier once they're mocked

servo/servo#6727
2015-08-30 12:13:29 +10:00
bors-servo
67cbda4be3 Auto merge of #7439 - frewsxcv:jsfalse-jstrue, r=jdm
Prefer JSTrue/JSFalse to 1/0



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7439)
<!-- Reviewable:end -->
2015-08-28 22:15:21 -06:00
Corey Farwell
8f876a179a Prefer JSTrue/JSFalse to 1/0 2015-08-28 22:03:01 -04:00
Corey Farwell
b0d2194a4a Cleanup, refactor FormDataMethods::Get 2015-08-28 16:29:11 -04:00
bors-servo
b68b31a062 Auto merge of #7435 - Ms2ger:markers, r=jdm
Send the start and end half of a TimelineMarker to the devtools …

…PullTimelineMarkers thread together.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7435)
<!-- Reviewable:end -->
2015-08-28 13:51:32 -06:00
bors-servo
645dd7ba03 Auto merge of #7436 - jdm:netthreadname, r=Manishearth
Improve debuggability of http_loader panics.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7436)
<!-- Reviewable:end -->
2015-08-28 13:14:28 -06:00
Josh Matthews
2360db68b1 Improve debuggability of http_loader panics. 2015-08-28 15:11:30 -04:00
Ms2ger
cf55d3191d Send the start and end half of a TimelineMarker to the devtools PullTimelineMarkers thread together. 2015-08-28 20:48:07 +02:00
Matt Brubeck
5f126ff301 Remove unnecessary adapt_character_flags call 2015-08-28 11:14:52 -07:00
Matt Brubeck
4d32e8b20e Rearrange remaining bits of GlyphEntry 2015-08-28 11:14:50 -07:00
Matt Brubeck
9d4f5880d3 Remove unused glyph flags 2015-08-28 11:14:49 -07:00
Matt Brubeck
998bec30cf Remove no-op Drop implementation from FontTable
This is no longer necessary for opting out of the Copy trait.
2015-08-28 10:43:04 -07:00
bors-servo
064b72ac97 Auto merge of #7417 - glennw:headless-raf, r=pcwalton
Fix requestAnimationFrame in headless mode. Fixes #7296.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7417)
<!-- Reviewable:end -->
2015-08-28 11:26:09 -06:00
Josh Matthews
b62d1a1c43 Add dashed CSS properties to CSSStyleDeclaration. 2015-08-28 13:15:17 -04:00
Josh Matthews
40806977b5 Add infrastructure for supporting dashed CSS property names on CSSStyleDeclaration. 2015-08-28 13:15:16 -04: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
bors-servo
9708c63b9c Auto merge of #7227 - tafia:tafia-mime_classifier, r=jdm
rewrite of mime_classifier.rs to use more iterators

Rewrite few parts of the file to use more iterators.

Note that I have **no idea** what the code is actually doing functionally, I just tried to mimic exactly what was being done. All tests are ok

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7227)
<!-- Reviewable:end -->
2015-08-28 09:35:47 -06:00
Josh Matthews
6e26fefad1 Allow setting preferences from the reftest manifest. Add a command-line arg to enable a given preference. 2015-08-28 10:50:55 -04:00
bors-servo
2f227a034a Auto merge of #7431 - frewsxcv:dom-methods-cleanup, r=Ms2ger
Merge adjacent identical `impl` sections

Prior to #7416 and #7401, many of these `impl` sections were not
identical

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7431)
<!-- Reviewable:end -->
2015-08-28 08:49:00 -06:00
Johann Tuffe
dd1c8c826e Refactor mime_classifier
Use more iterators in particular.
2015-08-28 22:47:41 +08: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
bors-servo
2ca48ca404 Auto merge of #6854 - servo:slice_chars, r=jdm+Ms2ger
Remove usage of slice_chars in script

It’s deprecated in the #6850 rustup.

The first commit changes some behavior which was previously incorrect: the spec says indices in DOM strings are UTF-16 code units, not `char` code points.

The second commit should not change behavior, unless I made a mistake.

r? @jdm

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6854)
<!-- Reviewable:end -->
2015-08-28 05:16:03 -06:00
Simon Sapin
dcc8f63d52 Add tests for CharacterDataMethods with non-BMP code points 2015-08-28 12:23:27 +02:00
Simon Sapin
006dd1002f Fix CharacterDataMethods to count UTF-16 code units, not code points. 2015-08-28 11:58:38 +02:00
Simon Sapin
95a252a650 Refactor script::textinput to count UTF-8 bytes rather than code points. 2015-08-28 11:57:40 +02:00
bors-servo
18de1f2357 Auto merge of #7428 - Wafflespeanut:tidy, r=Ms2ger
tidy will now show its expectation of uses!

closes #7427

(pretty errors "inherited" from rust's type checker) :P

![screenshot](https://cloud.githubusercontent.com/assets/6691262/9543298/8cabfdaa-4d95-11e5-9101-14e62781e74e.png)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7428)
<!-- Reviewable:end -->
2015-08-28 03:35:53 -06:00
Ravi Shankar
6ef5c8eec2 tidy will now show its expectation of uses 2015-08-28 13:14:45 +05:30
bors-servo
6431e8da43 Auto merge of #7341 - benschulz:script-profiling, r=Manishearth
Add profiling to the script event loop (#5331)

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.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7341)
<!-- Reviewable:end -->
2015-08-27 17:00:15 -06:00
benshu
1e6a2f08fc Time distribution across script event categories. 2015-08-28 00:52:41 +02:00
Glenn Watson
103feca08b Fix requestAnimationFrame in headless mode. Fixes #7296. 2015-08-28 07:55:18 +10:00
bors-servo
71b277d567 Auto merge of #7416 - nox:methods-ref, r=frewsxcv
Make the traits for the IDL interfaces take &self



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7416)
<!-- Reviewable:end -->
2015-08-27 15:08:41 -06:00
Anthony Ramine
709d347872 Make the traits for the IDL interfaces take &self 2015-08-27 22:27:43 +02:00
bors-servo
856fda7f2e Auto merge of #7411 - servo:update-css, r=Ms2ger
Update CSS tests to revision accc6c63beb15671e7e97f812cd11ba2ac34a447



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7411)
<!-- Reviewable:end -->
2015-08-27 13:16:15 -06: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
Ms2ger
346fb4cb35 Update CSS tests to revision accc6c63beb15671e7e97f812cd11ba2ac34a447 2015-08-27 18:58:07 +02:00
bors-servo
ae55b31a7f Auto merge of #7394 - dhananjay92:Issue#6670, r=Manishearth
Exclude minified js files and tests/jquery from 'mach grep'.

Solves Issue #6670.
Now `./mach grep` will not grep from minified js files or from `tests/jquery` directory.

Works only with git >= 1.9.0.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7394)
<!-- Reviewable:end -->
2015-08-27 10:51:15 -06:00
bors-servo
9094297029 Auto merge of #7401 - nox:rm-helpers, r=Manishearth
Remove helper traits

Now that `JSRef<T>` is gone, there is no need to have helper traits.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7401)
<!-- Reviewable:end -->
2015-08-27 09:38:48 -06: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
aa83643507 Remove reference to helper traits from documentation 2015-08-27 16:59:04 +02:00
Anthony Ramine
c0cff59df8 Remove SinkHelpers
Method get_or_create() is now directly on servohtmlparser::Sink.
2015-08-27 16:59:03 +02:00
Anthony Ramine
275907f256 Remove dead code that surfaced when moved outside helper trait 2015-08-27 16:59:03 +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
bors-servo
2d70431268 Auto merge of #7405 - Ms2ger:quota, r=jdm
Disable storage_session_setitem_quotaexceedederr.html.

It fails intermittently due to OOM because we don't implement the quota check.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7405)
<!-- Reviewable:end -->
2015-08-27 08:47:23 -06:00
Anthony Ramine
faa581be86 Optimise most basic case of .replaceChild() when updating childNodes 2015-08-27 13:47:25 +02:00
bors-servo
1384ff5e9f Auto merge of #7406 - servo:update-css, r=Ms2ger
Update CSS tests to revision 2a5740eaf7fa99181681a89bc6789dbf5b839995



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7406)
<!-- Reviewable:end -->
2015-08-27 05:36:24 -06:00
Ms2ger
5fb39b2af9 Update CSS tests to revision 2a5740eaf7fa99181681a89bc6789dbf5b839995 2015-08-27 13:35:08 +02:00
bors-servo
532fd19d69 Auto merge of #7361 - jxs:master, r=Ms2ger
make dom_struct derive HeapSizeOf

closes #7357

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7361)
<!-- Reviewable:end -->
2015-08-27 02:35:45 -06:00