Commit graph

630 commits

Author SHA1 Message Date
rohan.prinja
337066063a fix impl of parse_length() 2015-11-14 10:02:26 -05:00
Alan Jeffrey
0da1623788 Made DOMString opaque.
Removed the "pub" attribute from the String field of DOMString.
This enables experimenting with other string representations.
2015-11-12 17:53:01 -06:00
Alan Jeffrey
5db67b5981 Added in-place mutation to DOMString.
The methods which are currently implemented are the ones on String that are currently being used:
string.push_str(...), string.clear() and string.extend(...). We may want to revisit this API.
2015-11-12 17:53:01 -06:00
Alan Jeffrey
736323a779 Made DOMString implement HeapSizeOf.
We have to do this by hand because DOMString is defined in util.
2015-11-12 17:52:59 -06:00
Alan Jeffrey
c8af5b68fa Made DOMString implement !Send.
This change makes DOMStrings only accessible from the main JS thread.
2015-11-12 17:52:59 -06:00
Alan Jeffrey
9cbc4393eb Added conversion functions between DOMString and String.
Implemented From<String> and From<&str> for DOMString,
and From<DOMString> for String.
2015-11-12 17:51:18 -06:00
bors-servo
1720595a85 Auto merge of #8479 - frewsxcv:domstring-default, r=Ms2ger
Implement Default trait for DOMString

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8479)
<!-- Reviewable:end -->
2015-11-13 04:51:32 +05:30
Ms2ger
6d2ae85c1f Use the conversion traits from js. 2015-11-12 10:48:58 +01:00
Corey Farwell
00fa3b2f85 Implement Default trait for DOMString 2015-11-11 22:12:56 -05:00
bors-servo
4ec96963f8 Auto merge of #8440 - mbrubeck:range-unused, r=Manishearth
Remove unused method from Range

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8440)
<!-- Reviewable:end -->
2015-11-10 08:43:59 +05:30
Matt Brubeck
603fb5e1c2 Remove unused method from Range 2015-11-09 17:47:08 -08:00
Corey Farwell
73314ab10c Add Dimension member to AttrValue
Fixes #8417
2015-11-09 20:32:56 -05:00
bors-servo
f39faaf994 Auto merge of #8227 - asajeffrey:versioned_dom, r=eefriedman
Versioned dom

This PR adds versioning to the DOM. There are now node.get_version and node.get_descendent_version methods that return a counter that is bumped when the node is dirtied. This is used to implement cache invalidation for caching HTMLCollection state. Caching HTMCollections gets a 1000x speedup in the Dromaeo DOM query tests.

Addresses https://github.com/servo/servo/issues/6901, https://github.com/servo/servo/issues/3381 and https://github.com/servo/servo/issues/1916.

Replaces PR https://github.com/servo/servo/pull/6927.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8227)
<!-- Reviewable:end -->
2015-11-10 01:11:23 +05:30
bors-servo
65c3185b20 Auto merge of #8341 - bholley:state_hint_selector_ordering, r=pcwalton
Fix restyle hints to handle non-last psuedo-selectors, and track pristine state values rather than changesets

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8341)
<!-- Reviewable:end -->
2015-11-07 09:53:19 +05:30
bors-servo
faf2f34772 Auto merge of #8343 - servo:custom-properties, r=mbrubeck
Fix some custom properties bugs

Fix #7767.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8343)
<!-- Reviewable:end -->
2015-11-07 06:02:36 +05:30
Alan Jeffrey
4aa6a76f57 Made QualName traceable by JS. 2015-11-06 17:23:15 -06:00
Benjamin Herr
b84087c2f4 Make desktop UA string depend on build target.
This implements #7158 by conditionally choosing a UA string by
`#[cfg()]`-checking for `target_os = linux` and whether `target_arch` is
`x86_64` or not. Matching the behavior of Firefox, either "X11; Linux
x86_64" or "X11; Linux i686" is included.

`target_os = windows` is also checked; again as in Firefox "Windows NT
6.1; Win64; x64" or just "Windows NT 6.1" is included. The UA string
pretends to be non-WoW64 Windows 7, since there's only so much we can
detect at build time.

The existing desktop UA string that lists OS X is chosen if `target_os`
is neither `linux` nor `windows`.
2015-11-05 15:28:13 +01:00
Simon Sapin
69d398f29a Update to rust-cssparser 0.4.0 2015-11-05 08:57:01 +01:00
Bobby Holley
77c253fd43 Load web fonts synchronously during wpt. 2015-11-04 19:01:49 -08:00
bors-servo
c78da15abb Auto merge of #8314 - jdm:timeoutinvestigations, r=metajack
Investigations for #7787

I'm just going to keep throwing stuff at try, because running directly on the builders isn't yielding results.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8314)
<!-- Reviewable:end -->
2015-11-05 04:08:30 +05:30
Josh Matthews
19a1e57c90 Add debugging information when running tests that timeout on build machines. 2015-11-04 12:26:41 -05:00
Ms2ger
6b75078503 Make DOMString a newtype around String, rather than a typedef.
This should make it somewhat easier to experiment with alternative
representations in the future. To reduce churn, this commit leaves the String
field public, though.

Also, this will allow us to use the default String type to represent the IDL
USVString type, which explicitly forbids unpaired surrogates, ans as such is
a better match to the Rust String type.
2015-11-04 12:09:11 +01:00
Matt Brubeck
ef93650db9 Handle multi-touch events from glutin 2015-11-03 08:56:34 -08:00
Bobby Holley
79ac365a68 Move EventState to rust-selectors. 2015-10-30 21:02:35 -07:00
bors-servo
f9d79600c9 Auto merge of #8253 - connorimes:android-energy-profiling, r=mbrubeck
Heartbeats and energy profiling support for Android



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8253)
<!-- Reviewable:end -->
2015-10-30 12:26:10 +05:30
Matt Brubeck
4dd48a7080 Remove some unused code on Android 2015-10-29 14:32:41 -07:00
Connor Imes
bb7e5375a0 Heartbeats support for Android.
Add debug option to enable heartbeats for all profiler categories.
2015-10-29 13:22:49 -05:00
Martin Robinson
a7a58e47a0 Expand DisplayList layer bounds to whole pixels
Before passing these layers to the paint task, expand them to pixel
boundaries. This ensures that subpixel edges of the layer will not be
clipped away and helps prevent rounding issues with layer contents.

Fixes #8166.
2015-10-28 18:11:59 -07:00
Manish Goregaokar
184b2bacf3 Fix serde_macros 2015-10-28 21:53:15 +05:30
Manish Goregaokar
ce5586f74a Update euclid to 0.3 2015-10-28 21:34:23 +05:30
Ms2ger
4297a44435 Remove a pointless closure from spawn_named. 2015-10-23 10:35:58 +02:00
Ms2ger
cfc80582c8 Associate documentation comments for LogicalPoint's fields with the correct field. 2015-10-23 10:35:35 +02:00
Ms2ger
d20ef3b6d8 Use a where clause for rect_contains_point to bring the line under 100 columns. 2015-10-23 10:35:11 +02:00
Matt Brubeck
817eed22d1 Add a "-Z convert-mouse-to-touch" debug argument.
This is enabled by default on Android, because Glutin currently sends mouse
events instead of touch events on Android.  It's also useful for testing on
non-touch platforms.
2015-10-22 10:37:04 -07:00
Florian Merz
80e8a674e2 display input caret for textarea. fixes #7758 2015-10-21 22:38:23 +02:00
Eli Friedman
fa606bf1c8 Link to the HTML multipage spec, not the single-page one. 2015-10-13 11:48:51 -07:00
Corey Farwell
20beaf5af3 Fix issues found by rust-clippy 2015-10-12 20:21:49 -04:00
Corey Farwell
81e034885b Cleanup code that was warned by rust-clippy 2015-10-11 20:47:45 -04:00
David Raifaizen
de2060e6a1 Making map+clone more succinct with cloned 2015-10-10 09:31:21 -04:00
Martin Robinson
1f2e1be2a3 Add the dump-layer-tree option to the -Z help text
I accidentally omitted this when I added the dump-layer-tree option
initially.

Fixes #7926.
2015-10-08 10:16:18 -07:00
Martin Robinson
8b5fe650c8 Improve layer tree debugging output
Add an option to dump the layer tree, which activates the previously
unused layer tree debugging code. Also improve the output using the
PrintTree struct.
2015-10-06 15:25:33 -07:00
bors-servo
7debfd1f4c Auto merge of #7683 - frewsxcv:html-font-element-size-attr, r=nox
Implement `size` attribute for <font> element



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7683)
<!-- Reviewable:end -->
2015-10-05 02:33:02 -06:00
bors-servo
0860be4c28 Auto merge of #7811 - glennw:use-crates-au, r=larsbergstrom
Update servo to use published app units crate



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7811)
<!-- Reviewable:end -->
2015-09-30 22:21:36 -06:00
Corey Farwell
74e4c4fdc7 Implement size attribute for <font> element 2015-09-30 22:51:30 -04:00
Glenn Watson
1999ea5e43 Update servo to use published app units crate 2015-10-01 11:45:35 +10:00
Corey Farwell
ea5e4e3ad0 Make util::str::str_join consistent with SliceConcatExt::join
Prior to this commit, `str_join` would skip empty items at the start of
the `Iterator` until it found a non-empty item. This contradicts
`SliceConcatExt::join` which doesn't skip anything.

Brought up in:

https://github.com/servo/servo/pull/7776#issuecomment-144317281
2015-09-30 19:23:18 -04:00
Glenn Watson
339a3f869b Split Au type into separate crate, with minimal dependencies. 2015-10-01 07:16:11 +10:00
bors-servo
4823ec947e Auto merge of #7776 - frewsxcv:str-join, r=mbrubeck
Avoid allocations when joining strings



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7776)
<!-- Reviewable:end -->
2015-09-29 16:59:14 -06:00
bors-servo
d92e781a87 Auto merge of #7778 - paulrouget:decorationLessOption, r=jdm
Add a command line option to disable native titlebar



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7778)
<!-- Reviewable:end -->
2015-09-29 13:45:57 -06:00
Paul Rouget
5be60f2c79 Add a command line option to disable native titlebar 2015-09-29 08:50:39 +02:00