Commit graph

3204 commits

Author SHA1 Message Date
Manish Goregaokar
b25d9de03d Spec says 'ContextMenu', not 'Menu' 2016-03-22 21:09:43 +05:30
Manish Goregaokar
2f982e668c Update spec links for keyboardevent 2016-03-22 21:09:08 +05:30
Manish Goregaokar
f3162cd316 Add support for navigation keys 2016-03-22 21:03:56 +05:30
bors-servo
767b11cd67 Auto merge of #10106 - Ms2ger:renderer-id, r=ecoal95
Remove renderer ids.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10106)
<!-- Reviewable:end -->
2016-03-22 08:50:28 +05:30
bors-servo
db63aa423f Auto merge of #10100 - paulrouget:historyOnLocationChange, r=paulrouget
Add history information to mozbrowserlocationchange event

This is a change in the Browser API itself.

Before, on `mozbrowserlocationchange`, we would call `getCanGoBack()` and `getCanGoForward()`. Two asynchronous methods called on an event, which doesn't make much sense, especially because we already know on `mozbrowserlocationchange` if we can go back/forward. So here I'm adding 2 new properties to the event to tell if the iframe can go back/forward.

The way `event.detail` is defined also changed. Before, `event.detail` was a string (the new uri), now it's an object (`{uri:String,canGoBack:bool,canGoForward:bool}`).

This is one of the design flaw of the early Browser API: not using objects for the detail property, making it hard to extend the event payload.

So that makes this event not backward compatible. We can:
1. just don't care. It's up to the client to test if event.detail is a string or not if it needs to be compatible with Gecko
2. fix it in Gecko. The client will still have to test `event.detail` to make it compatible with older version of gecko
3. rename `mozbrowserlocationchange` to something else (`mozbrowserlocationchange2` ?)

Please advise.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10100)
<!-- Reviewable:end -->
2016-03-22 07:51:19 +05:30
bors-servo
9813d11f86 Auto merge of #10021 - pcwalton:skip-layout-traversals, r=mbrubeck
layout: Skip layout traversals that obviously won't do anything.

This reduces CPU usage when mousing over simple pages (example.com). More complex pages (Wikipedia) still reflow a lot due to other bugs.

Additionally, this change causes Servo to stop painting the results of hit test queries. This is also a win for CPU usage.

This significantly improves #9999, though there's more that can be done. I'll leave it open in case @paulrouget thinks this PR isn't enough.

r? @mbrubeck

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10021)
<!-- Reviewable:end -->
2016-03-22 03:37:49 +05:30
Ms2ger
63a00f4dbf Stop sending the renderer id to script. 2016-03-21 17:55:08 +01:00
Ms2ger
7e2e54326f Remove renderer_id fields. 2016-03-21 17:49:47 +01:00
Ms2ger
3c04bca0f4 Remove get_renderer_id functions. 2016-03-21 17:45:42 +01:00
Ms2ger
036b789377 Remove HTMLCanvasData::renderer_id. 2016-03-21 17:41:46 +01:00
bors-servo
95de8b2b03 Auto merge of #10094 - KiChjang:remove-extra-iter, r=asajeffrey
Remove HTMLCollectionElementsRevIter

It's almost a duplicate of HTMLCollectionElementsIter, aside from that its node_iter is a PrecedingNodeIter. We can simply use dynamic dispatch for node_iter instead of making it a concrete type.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10094)
<!-- Reviewable:end -->
2016-03-21 22:09:47 +05:30
Patrick Walton
ed6ee29951 script: Don't paint layouts induced by hit test queries.
Reduces CPU usage when mousing over simple pages.

Part of #9999.
2016-03-21 08:39:46 -07:00
bors-servo
e95368df62 Auto merge of #10096 - GuillaumeGomez:fun_to_string, r=nox
Make all interface objects share the same funToString

Fixes #9280

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10096)
<!-- Reviewable:end -->
2016-03-21 16:50:44 +05:30
Paul Rouget
6577409b95 Add history information to mozbrowserlocationchange event 2016-03-21 19:19:48 +08:00
Guillaume Gomez
b6feab97e0 Make all interface objects share the same funToString 2016-03-21 11:57:48 +01:00
Ms2ger
6f679c124c Update to Rust 2016-03-18. 2016-03-20 10:05:45 +01:00
bors-servo
98a1b17cec Auto merge of #10090 - servo:tracking-nav-langs, r=ecoal95
Add link to tracking issue for NavigatorLanguage::Languages.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10090)
<!-- Reviewable:end -->
2016-03-20 09:30:10 +05:30
bors-servo
8e95f54501 Auto merge of #10079 - servo:script-encoding, r=jdm
Implement encoding determination for external scripts.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10079)
<!-- Reviewable:end -->
2016-03-20 06:28:25 +05:30
Keith Yeung
4e81fd36b0 Remove HTMLCollectionElementsRevIter 2016-03-19 20:28:40 -04:00
Matt Brubeck
25c1bce9f6 Recompute viewport-dependent styles on viewport size change
Fixes #8754.
2016-03-19 13:23:39 -07:00
bors-servo
4df7975ed3 Auto merge of #10066 - apopiak:fromBool, r=asajeffrey
implement and use From<bool> for enum and back

as discussed in the #servo channel on IRC:

implement and use  `From<bool>` for `EventBubbles` (and back direction)
implement and use `From<bool>` for `EventCancelable` (and back direction)

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10066)
<!-- Reviewable:end -->
2016-03-19 22:58:21 +05:30
Corey Farwell
deefa8907a Add link to tracking issue for NavigatorLanguage::Languages. 2016-03-19 11:09:24 -04:00
Ms2ger
f1f53468a0 Use a Cell for HTMLScriptElement::block_character_encoding. 2016-03-18 16:51:29 +01:00
askalski
89b8499df8 Implement encoding determination for external scripts. 2016-03-18 16:51:25 +01:00
Ms2ger
b1cd28e9c6 Store the encoding in the Document rather than its name. 2016-03-18 16:22:52 +01:00
bors-servo
20eb81c00a Auto merge of #10009 - creativcoder:impl-navigator-language, r=Ms2ger
implements NavigatorLanguage

Fixes #9992

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10009)
<!-- Reviewable:end -->
2016-03-18 15:29:46 +05:30
Alexander Popiak
0a5ac3b207 implement and use From<bool> for enum and back
implement and use  From<bool> for EventBubbles (and back direction)
implement and use From<bool> for EventCancelable (and back direction)
2016-03-17 22:50:22 +01:00
bors-servo
0008c07dc3 Auto merge of #10014 - saurvs:pr1, r=KiChjang
Update WebSocket blocked ports to match the Fetch spec

Adresses #9949.

This adds a function that tests whether a request should be blocked or not based on it's url's scheme and port. It also adds testing for port restriction to the `main_fetch` method. More info in eb07418c83.

@Ms2ger In https://github.com/whatwg/html/issues/841, @annevk proposes to remove port restrictions from websockets. Should we go ahead do that, given that the spec hasn't been changed yet?

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10014)
<!-- Reviewable:end -->
2016-03-18 00:31:24 +05:30
Saurav Sachidanand
4ddf4e7bdc Update WebSocket blocked ports to match the Fetch spec 2016-03-17 18:21:20 +05:30
Rahul Sharma
facf59177c implements NavigatorLanguage 2016-03-17 16:13:37 +05:30
bors-servo
37574065e0 Auto merge of #9838 - szeged:webbluetooth, r=jdm
WebBluetooth API classes

Basic implementation of WebBluetooth API
API spec.: https://webbluetoothcg.github.io/web-bluetooth/

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9838)
<!-- Reviewable:end -->
2016-03-16 21:01:18 +05:30
Attila Dusnoki
e7d70cfabf WebBluetooth API classes 2016-03-16 10:34:48 +01:00
bors-servo
00ab2e9f9e Auto merge of #9967 - saurvs:master, r=Ms2ger
Convert directly from DOMString to Vec<u8>

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9967)
<!-- Reviewable:end -->
2016-03-12 01:19:04 +05:30
bors-servo
7ff7932a8c Auto merge of #9824 - danlrobertson:element1, r=asajeffrey
Add the scrollWidth and scrollHeight extensions to the element interface

Add the `scrollWidth` and `scrollHeight` extensions to the element interface. My goal was to create a method that encompassed getting `scrollWidth`, `scrollHeight`, `scrollTop`, and `scrollLeft`.

I also noted that `clientHeight` and `clientWidth` to not handle the root element and the body element correctly.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9824)
<!-- Reviewable:end -->
2016-03-12 00:19:24 +05:30
Daniel Robertson
16d2778ece Add scrollWidth/Height to element interface
Add the scrollWidth and scrollHeight extensions to the element
interface.
2016-03-11 18:22:16 +00:00
Saurav Sachidanand
663e42bdbd Convert directly from DOMString to Vec<u8> 2016-03-11 23:38:16 +05:30
bors-servo
f2f6787189 Auto merge of #9930 - rebstar6:htmlclick, r=jdm
Remove activatable element filter within HTMLElement#click()

Address https://github.com/servo/servo/issues/6542

Ensure that click() calls are not limited to activatable elements. Also makes the isTrusted attribute false when synthetic click activation are called from a click() method (as per spec).

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9930)
<!-- Reviewable:end -->
2016-03-11 10:06:24 +05:30
bors-servo
eac68c523b Auto merge of #9905 - saurvs:master, r=ecoal95
Implement input.setSelectionRange

Fixes https://github.com/servo/servo/issues/9862.

Passes all tests for `input` in `tests/wpt/web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html`.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9905)
<!-- Reviewable:end -->
2016-03-11 06:13:51 +05:30
Rebecca
d6678a184b Call synthetic_click_activation for all clicks
Moved synthetic_click_actiavtion out of Activatable trait so it can be
called by all elements (not just activatable). Calls appropriately
from click. Also updates the isdisabled check in click to check for all
types of elements
2016-03-10 14:43:33 -05:00
Saurav Sachidanand
a3d77790a6 Implement input.setSelectionRange 2016-03-10 19:54:21 +05:30
Keith Yeung
3f2cbf0025 Add task_source directory
Use DOMManipulationTaskSource whenever possible
2016-03-10 01:05:53 -05:00
bors-servo
fa93d3f467 Auto merge of #9796 - KiChjang:range-stringifier, r=jdm
Implement Stringifier for Range

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9796)
<!-- Reviewable:end -->
2016-03-10 07:35:06 +05:30
Keith Yeung
b32e859c3a Implement Stringifier for Range 2016-03-09 15:27:37 -05:00
bors-servo
b6e469cbde Auto merge of #9903 - servo:ref-filter-map, r=nox
Replace usage of deprecated std::cell::Ref::filter_map

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9903)
<!-- Reviewable:end -->
2016-03-08 08:52:45 +05:30
Simon Sapin
62034b956e Replace usage of deprecated std::cell::Ref::filter_map 2016-03-07 18:53:38 +01:00
Arpad Borsos
c880c97b1b rename deprecated utf16_units to encode_utf16 2016-03-07 16:14:04 +01:00
bors-servo
64fb09ca2d Auto merge of #9800 - Wafflespeanut:node_attrs, r=nox
fixed the last failing test in dom/nodes/attributes.html

r? @nox

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9800)
<!-- Reviewable:end -->
2016-03-05 21:32:46 +05:30
Ravi Shankar
aaf2888d0b Updated SupportedPropertyNames in NamedNodeMap to match spec 2016-03-05 17:21:01 +05:30
bors-servo
c37a086660 Auto merge of #9786 - peterjoel:fix_codegen_is_array_like, r=jdm
Fixed compile error in generated code, when webidl constructors have same number of args

One of the ways that generated code differentiates constructors is by comparing if the args are array-like. The generated code was calling a function `IsArrayLike` that no longer exists. I re-implemented it with a more rust-like naming scheme.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9786)
<!-- Reviewable:end -->
2016-03-04 15:14:20 +05:30
Jack Moffitt
2507bfb2cf Suppress reflows before RefreshTick or FirstLoad
This fixes a bug where partially loaded content is displayed to the user
before it should be, usually before stylesheets have loaded. This commit
supresses reflows until either FirstLoad or RefreshTick, whichever comes
first.

Unfortunately, hit_test and mouse_over did not do reflows if they were
necessary, and so by suppressing the initial spurious reflows, these
methods started to panic without a display list to query. This patch
also transforms these into queries similar to the other existing
queries.
2016-03-03 15:17:46 -07:00