Commit graph

10997 commits

Author SHA1 Message Date
Robert Knight
658df60477 Use a faster scroll speed under X11
Platforms may report scroll deltas either in
chunks/lines/rows or pixels, depending on the
platform API and device capabilities.

If the platform reports a line/chunk-based delta
then the application needs to convert the delta
into a suitable number of pixels.

This commit just hardcodes it to 57 as
a starting point which matches the value that
Firefox calculates as the max char height
for the root frame on my system.

Fixes #5660
2015-06-22 20:09:52 +01:00
bors-servo
c6ca389d54 Auto merge of #6444 - Ms2ger:clone, r=saneyuki
Remove some unnecessary clones.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6444)
<!-- Reviewable:end -->
2015-06-22 05:05:08 -06:00
Ms2ger
a146d4c9f7 Remove some unnecessary clones. 2015-06-22 11:38:07 +02:00
Ms2ger
a42e11a95f Replace the LayoutDataAccess trait by inherent methods. 2015-06-22 11:34:31 +02:00
Ms2ger
167a396293 Replace TLayoutNode by inherent methods.
There is no reason for this trait to exist.
2015-06-22 11:04:43 +02:00
Ms2ger
50d4084e9a Remove TLayoutNode::first_child.
It is replaced by the TNode implementation for LayoutNode and an inherent
implementation for ThreadSafeLayoutNode.
2015-06-22 11:04:41 +02:00
Ms2ger
dc167ca343 Implement type_id as inherent methods.
This implies LayoutNode no longer needs to return an Option, as it never
represents a pseudo-element.

Also, fixes lies in the documentation.
2015-06-22 10:47:52 +02:00
Ms2ger
f0034b4ac9 Remove some dead code from ThreadSafeLayoutNode::first_child.
self.pseudo is always PseudoElementType::Normal at this point.
2015-06-22 10:47:44 +02:00
Ms2ger
13a07a4ed2 Move some TLayoutNode methods to ThreadSafeLayoutNode.
They are unused on LayoutNode.
2015-06-22 10:47:38 +02:00
Ms2ger
8f58dafbd6 Inline node_is_element and node_is_document into their only callers. 2015-06-22 10:47:35 +02:00
Ms2ger
54b9dc6563 Inline LayoutNode::text_content into its only caller, ThreadSafeLayoutNode::text_content. 2015-06-22 10:47:31 +02:00
Ms2ger
1398616ec1 Remove incorrect claim from a comment. 2015-06-22 10:47:27 +02:00
Ms2ger
ae5191275a Remove TLayoutNode::get.
It is highly unsafe and unused.
2015-06-22 10:47:23 +02:00
Ms2ger
eb2c508df0 Implement the LayoutData getters on LayoutJS<Node> rather than Node itself. 2015-06-22 10:47:21 +02:00
Ms2ger
a217ffb00a Add assertions to LayoutDataRef accessors. 2015-06-22 10:47:19 +02:00
Ms2ger
ebd0a62eec Remove an unused import from layout_task. 2015-06-22 10:47:18 +02:00
bors-servo
d85afb744a Auto merge of #6440 - Ms2ger:finalizeInBackground, r=metajack
Update rust-mozjs.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6440)
<!-- Reviewable:end -->
2015-06-21 23:40:46 -06:00
bors-servo
c119b59e82 Auto merge of #6427 - servo:selector-traits-refactor, r=Ms2ger
Update rust-selectors

https://github.com/servo/rust-selectors/pull/30

r? @Ms2ger

This conflicts with the SpiderMonkey upgrade #6150. I’m happy to wait until that lands and rebase.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6427)
<!-- Reviewable:end -->
2015-06-21 11:12:07 -06:00
bors-servo
8c784ceeea Auto merge of #6371 - nox:url, r=Ms2ger
Implement URL and trivially missing URLUtils members

Fixes #6322.

Still no mutation whatsoever in URLUtils.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6371)
<!-- Reviewable:end -->
2015-06-21 10:22:06 -06:00
bors-servo
8d2d41c97e Auto merge of #6441 - Ms2ger:fix-test, r=nox
Use hostname rather than host when appending a port manually.

The host attribute returns the port as well as the hostname.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6441)
<!-- Reviewable:end -->
2015-06-21 09:06:48 -06:00
Ms2ger
4a90f21e42 Use hostname rather than host when appending a port manually.
The host attribute returns the port as well as the hostname.
2015-06-21 16:52:17 +02:00
bors-servo
bf64e2765a Auto merge of #6437 - Ms2ger:AttrHelpersForLayout, r=nox
Implement AttrHelpersForLayout for LayoutJS<Attr> rather than Attr itself.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6437)
<!-- Reviewable:end -->
2015-06-21 08:31:04 -06:00
bors-servo
d2d51d4776 Auto merge of #6436 - Ms2ger:ws-test, r=nox
Don't try to connect to a non-existent WebSocket server on location.host:80.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6436)
<!-- Reviewable:end -->
2015-06-21 06:17:42 -06:00
bors-servo
b8c7f49ce8 Auto merge of #6417 - servo:profile-docs, r=SimonSapin
Require documentation for the memory profiling module.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6417)
<!-- Reviewable:end -->
2015-06-21 03:54:21 -06:00
Ms2ger
2afbf7f5ed Update rust-mozjs. 2015-06-21 11:46:34 +02:00
bors-servo
6e04c12bce Auto merge of #6435 - Ms2ger:cef, r=zmike
Various CEF refactoring.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6435)
<!-- Reviewable:end -->
2015-06-20 11:17:49 -06:00
Ms2ger
da53a9c301 Return the result of cef_string_utf16_set in string_map. 2015-06-20 19:13:42 +02:00
Ms2ger
c019897a50 Implement AttrHelpersForLayout for LayoutJS<Attr> rather than Attr itself. 2015-06-20 18:51:25 +02:00
Ms2ger
deef342ed8 Don't try to connect to a non-existent WebSocket server on location.host:80. 2015-06-20 17:10:47 +02:00
bors-servo
fa45688191 Auto merge of #6421 - mmatyas:arm_build2, r=larsbergstrom
Fix ARM linker

By default, `cc` is used for the final linking of servo, which points to the host's compiler. This patch ensures that the correct linker is used for cross-compiling to ARM.

Part of #6327

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6421)
<!-- Reviewable:end -->
2015-06-20 09:00:55 -06:00
Anthony Ramine
a8e4558e82 Implement URL and trivially missing URLUtils members
Fixes #6322.
2015-06-20 15:17:55 +02:00
bors-servo
02303941be Auto merge of #6413 - hyowon:invalid_shadow_attrs, r=Ms2ger
Check invalid values for the shadow attributes.

I left out checking invalid values when setting the shadows attributes.
r? @nox @pcwalton 
cc @yichoi

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6413)
<!-- Reviewable:end -->
2015-06-20 06:44:08 -06:00
Ms2ger
49e0442459 Use slice::from_raw_parts to convert cef_string_t to &[u16]. 2015-06-20 14:04:32 +02:00
Ms2ger
26964ff087 Use nth rather than enumerating in cef_string_map_{key,value}. 2015-06-20 14:04:29 +02:00
Ms2ger
01df802fb2 Remove the no-op string_map_to_treemap function. 2015-06-20 14:04:27 +02:00
Ms2ger
0f65c04fe9 Use Box and boxed functions to manage cef_string_map_t memory. 2015-06-20 14:04:25 +02:00
Ms2ger
577407fe68 Improve indentation in CEF strings. 2015-06-20 14:04:24 +02:00
Ms2ger
893fc18c71 Remove unnecessary transmutes from CEF strings. 2015-06-20 14:04:22 +02:00
Ms2ger
2c032edc16 Remove unnecessary transmute in cef_string_list_value. 2015-06-20 14:04:20 +02:00
Ms2ger
4a7c5c8042 Remove no-op string_list_to_vec function. 2015-06-20 14:04:18 +02:00
Ms2ger
2248e1710a Use Box and boxed functions to manage cef_string_list_t memory. 2015-06-20 14:04:16 +02:00
Ms2ger
611a0cd117 Assign None into CEF string drop fields rather than transmuting a null pointer. 2015-06-20 14:04:14 +02:00
Ms2ger
d7dc85d80e Use slice::from_raw_parts to simplify command_line_init. 2015-06-20 13:33:25 +02:00
Simon Sapin
fc25397c91 Update rust-selectors
https://github.com/servo/rust-selectors/pull/30
2015-06-20 07:05:43 +02:00
bors-servo
72ead882c0 Auto merge of #6433 - michaelwu:fix-smup-warnings, r=metajack
Fix some warnings caused by the SM upgrade



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6433)
<!-- Reviewable:end -->
2015-06-19 20:56:29 -06:00
Michael Wu
b7301ca06c Fix some warnings caused by the SM upgrade 2015-06-19 22:07:08 -04:00
bors-servo
de251795c3 Auto merge of #6429 - ecoal95:patch-1, r=metajack
Update jQuery tests usage message

It was in the wrong order.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6429)
<!-- Reviewable:end -->
2015-06-19 19:31:57 -06:00
bors-servo
e7808c526c Auto merge of #6150 - servo:smupgrade3, r=mbrubeck
Upgrade to Spidermonkey 39

> Here it is.
> 
> ~~There's two major things that are unfinished here:~~
> - ~~Dealing with the unroot_must_root lint. I'm not sure about the value of this lint with the new rooting API.~~ Done.
> - ~~Updating the Cargo.locks to point to the new SM and SM binding.~~ Done.
> 
> I also included my fixes for the rust update, but these will disappear in a rebase. A rust update is necessary to support calling `Drop` on `Heap<T>` correctly when `Heap<T>` is inside a `Rc<T>`. Otherwise `&self` points to the wrong location.
> 
> Incremental GC is disabled here. I'm not sure how to deal with the incremental barriers so that's left for later.
> 
> Generational GC works. SM doesn't work without it.
> 
> The biggest change here is to the rooting API. `Root` was made movable, and `Temporary` and `JSRef` was removed. Movable `Root`s means there's no need for `Temporary`, and `JSRef`s aren't needed generally since it can be assumed that being able to obtain a reference to a dom object means it's already rooted. References have their lifetime bound to the Roots that provided them. DOM objects that haven't passed through `reflect_dom_object` don't need to be rooted, and DOM objects that have passed through `reflect_dom_object` can't be obtained without being rooted through `native_from_reflector_jsmanaged` or `JS::<T>::root()`.
> 
> Support for `Heap<T>` ended up messier than I expected. It's split into two commits, but only because it's a bit difficult to fold them together. Supporting `Heap<T>` properly requires that that `Heap::<T>::set()` be called on something that won't move. I removed the Copy and Clone trait from `Heap<T>` so `Cell` can't hold `Heap<T>` - only `UnsafeCell` can hold it.
> 
> `CallbackObject` is a bit tricky - I moved all callbacks into `Rc<T>` in order to make sure that the pointer inside to a `*mut JSObject` doesn't move. This is necessary for supporting `Heap<T>`.
> 
> `RootedCollectionSet` is very general purpose now. Anything with `JSTraceable` can be rooted by `RootedCollectionSet`/`RootedTraceable`. Right now, `RootedTraceable` is only used to hold down dom objects before they're fully attached to their reflector. I had to make a custom mechanism to dispatch the trace call - couldn't figure out how to get trait objects working for this case.
> 
> This has been tested with the following zeal settings:
> 
> GC after every allocation
> JS_GC_ZEAL=2,1
> 
> GC after every 100 allocations (important for catching use-after-free bugs)
> JS_GC_ZEAL=2,100
> 
> Verify pre barriers
> JS_GC_ZEAL=4,1
> 
> Verify post barriers
> JS_GC_ZEAL=11,1

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6150)
<!-- Reviewable:end -->
2015-06-19 16:46:55 -06:00
Michael Wu
675267b782 Upgrade to SM 39 2015-06-19 18:42:48 -04:00
Emilio Cobos Álvarez
4d84ad51f4 Update jQuery tests usage message 2015-06-19 16:42:17 +02:00