Commit graph

363 commits

Author SHA1 Message Date
Brandon Fairchild
637afecec9 Move LayerKind and ScrollPolicy enums to gfx_traits
This also moves LayerId and LayerProperties to gfx_traits.

Fixes #8836.
2015-12-20 20:43:31 -05:00
Tetsuharu OHZEKI
e8c12c1c6d Fix warnings: Use Vec.extend_from_slice instead of Vec.push_all 2015-12-10 16:49:29 -05:00
Alex Gaynor
fa694f5f4b Remove two "#![feature]" that are now stable 2015-12-09 19:25:04 -05:00
Ms2ger
cfa18bc2e6 Update rustc to the 2015-12-09 nightly. 2015-12-09 13:53:06 -05:00
jsharda
a840a23990 Prepare infrastructure for XML parser. 2015-12-04 16:32:53 -05:00
Jason Williams
1a8db9a07a now using external ref_slice instead of the std version 2015-12-03 07:32:07 +00:00
Guillaume Gomez
6e7de62b38 Add check up on extern crate order and sort extern crates alphabetically 2015-11-28 03:11:08 +01:00
GauriGNaik
996e9e06b2 Defined new trait ParseErrorReporter and added error_reporter member to ParserContext 2015-11-25 18:28:30 -05:00
Alan Jeffrey
3dec6edd10 Update string_cache to 0.2.
Updated string_cache, html5ever, xml5ever and selectors in Cargo.toml files and Cargo.lock.
Removed references to string_cache_plugin.
Import atom! and ns! from string_cache.
Replaced ns!("") by ns!().
Replaced ns!(XML) and co by ns!(xml) and co.
Replaced atom!(foo) by atom!("foo").
Replaced Atom::from_slice by Atom::from.
Replaced atom.as_slice() by &*atom.
2015-11-25 10:13:21 -06:00
Rizky Luthfianto
1c9ce04320 refactor(script): move SetDOMProxyInformation() call to lib.rs 2015-11-21 01:46:10 +07:00
Ms2ger
6d2ae85c1f Use the conversion traits from js. 2015-11-12 10:48:58 +01:00
Bobby Holley
79ac365a68 Move EventState to rust-selectors. 2015-10-30 21:02:35 -07:00
David Zbarsky
a63c98c24a Implement HTMLCanvasElement#toDataURL 2015-10-26 21:24:21 -07:00
bors-servo
9a34decec2 Auto merge of #8086 - froydnj:premultiply-tables, r=jdm
add (un)premultiply tables for canvas {Get,Put}ImageData operations

Pretty straightforward use of lookup tables to replace a bunch of expensive float operations.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8086)
<!-- Reviewable:end -->
2015-10-21 17:48:49 -06:00
benshu
553a0dbefd Timers are scheduled by a dedicated per-constellation thread. 2015-10-21 16:40:49 +02:00
Anthony Ramine
13ea3ac413 Introduce trait Castable
This trait is used to hold onto the downcast and upcast functions of all
castable IDL interfaces. A castable IDL interface is one which either derives
from or is derived by other interfaces.

The deriving relation is represented by implementations of marker trait
DerivedFrom<T: Castable> generated in InheritTypes.

/^[ ]*use dom::bindings::codegen::InheritTypes::.*(Base|Cast|Derived)/ {
    /::[a-zA-Z]+(Base|Cast|Derived);/d
    s/([{ ])[a-zA-Z]+(Base|Cast|Derived), /\1/g
    s/([{ ])[a-zA-Z]+(Base|Cast|Derived), /\1/g
    s/, [a-zA-Z]+(Base|Cast|Derived)([},])/\2/g
    s/, [a-zA-Z]+(Base|Cast|Derived)([},])/\2/g
    /\{([a-zA-Z]+(Base|Cast|Derived))?\};$/d
    s/\{([a-zA-Z_]+)\};$/\1;/
}

s/([a-zA-Z]+)Cast::from_ref\(\&?\**([a-zA-Z_]+)(\.r\(\))?\)/\2.upcast::<\1>()/g
s/([a-zA-Z]+)Cast::from_ref\(\&?\**([a-zA-Z_]+)(\.[a-zA-Z_]+\(\))?\)/\2\3.upcast::<\1>()/g
s/\(([a-zA-Z]+)Cast::from_ref\)/\(Castable::upcast::<\1>\)/g

s/([a-zA-Z]+)Cast::from_root/Root::upcast::<\1>/g

s/([a-zA-Z]+)Cast::from_layout_js\(\&([a-zA-Z_.]+)\)/\2.upcast::<\1>()/g

s/([a-zA-Z]+)Cast::to_ref\(\&?\**([a-zA-Z_]+)(\.r\(\))?\)/\2.downcast::<\1>()/g
s/([a-zA-Z]+)Cast::to_ref\(\&?\**([a-zA-Z_]+)(\.[a-zA-Z_]+\(\))?\)/\2\3.downcast::<\1>()/g
s/\(([a-zA-Z]+)Cast::to_ref\)/\(Castable::downcast::<\1>\)/g

s/([a-zA-Z]+)Cast::to_root/Root::downcast::<\1>/g

s/([a-zA-Z]+)Cast::to_layout_js\(&?([a-zA-Z_.]+(\(\))?)\)/\2.downcast::<\1>()/g

s/\.is_document\(\)/.is::<Document>()/g
s/\.is_htmlanchorelement\(\)/.is::<HTMLAnchorElement>()/g
s/\.is_htmlappletelement\(\)/.is::<HTMLAppletElement>()/g
s/\.is_htmlareaelement\(\)/.is::<HTMLAreaElement>()/g
s/\.is_htmlbodyelement\(\)/.is::<HTMLBodyElement>()/g
s/\.is_htmlembedelement\(\)/.is::<HTMLEmbedElement>()/g
s/\.is_htmlfieldsetelement\(\)/.is::<HTMLFieldSetElement>()/g
s/\.is_htmlformelement\(\)/.is::<HTMLFormElement>()/g
s/\.is_htmlframesetelement\(\)/.is::<HTMLFrameSetElement>()/g
s/\.is_htmlhtmlelement\(\)/.is::<HTMLHtmlElement>()/g
s/\.is_htmlimageelement\(\)/.is::<HTMLImageElement>()/g
s/\.is_htmllegendelement\(\)/.is::<HTMLLegendElement>()/g
s/\.is_htmloptgroupelement\(\)/.is::<HTMLOptGroupElement>()/g
s/\.is_htmloptionelement\(\)/.is::<HTMLOptionElement>()/g
s/\.is_htmlscriptelement\(\)/.is::<HTMLScriptElement>()/g
s/\.is_htmltabledatacellelement\(\)/.is::<HTMLTableDataCellElement>()/g
s/\.is_htmltableheadercellelement\(\)/.is::<HTMLTableHeaderCellElement>()/g
s/\.is_htmltablerowelement\(\)/.is::<HTMLTableRowElement>()/g
s/\.is_htmltablesectionelement\(\)/.is::<HTMLTableSectionElement>()/g
s/\.is_htmltitleelement\(\)/.is::<HTMLTitleElement>()/g
2015-10-21 11:37:16 +02:00
Nathan Froyd
50b14e6670 add un-premultiply table for GetImageData
Fixes #6969.
2015-10-20 04:51:29 -04:00
Michael Wu
e733a7c46a Support the updated spidermonkey bindings 2015-10-14 15:30:52 -04:00
Connor Imes
fd710eebc1 Set a reasonable max count on open files and don't panic if set fails 2015-10-13 09:04:40 -05:00
bors-servo
e9842b7db2 Auto merge of #7777 - KiChjang:caseless-group-name-match, r=jdm
Add support for caseless group name matching in HTML input elements

Fixes #7749

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7777)
<!-- Reviewable:end -->
2015-10-02 13:26:05 -06:00
Keith Yeung
5c9a25d46b Add support for caseless group name matching in HTML input elements 2015-10-02 10:41:02 -07:00
Glenn Watson
339a3f869b Split Au type into separate crate, with minimal dependencies. 2015-10-01 07:16:11 +10:00
Corey Farwell
f14f09e886 Use util::str::str_join in more places
Instead of intermediate allocations of `Vec`s, we should utilize
`str_join` which operates on iterators
2015-09-28 19:57:06 -04:00
Ravi Shankar
35d7ced89e fixed the 'as_slice' deprecated warning 2015-09-26 00:51:04 +05:30
Ravi Shankar
889eec364b sorted the extern crate, mod & use declarations 2015-09-24 02:12:45 +05:30
Manish Goregaokar
3c969b346a Upgrade rust to f93ab64d4a1a7ee91759a1594ab2a426b6cc657e/rustc-1.5.0-dev. 2015-09-23 14:44:59 +02:00
Hugo Thiessard
6565e7b02f Issue #7390 correct the order of mod declaration 2015-09-18 22:02:04 +02:00
Martin Tomasi
ccddc3c13e Fixed serialize_list to no longer append an additional space at the end of the string 2015-09-02 15:46:04 +02:00
Simon Sapin
40b4348824 Upgrade to rustc 1.4.0-dev (cb9323ec0 2015-09-01) 2015-09-02 09:22:17 +02:00
erneyja
17663315dd make test-tidy check that = have space after them 2015-09-01 07:18:19 -04:00
ecoal95
167885707d webgl: Add shader validation and translation
This commit adds angle-based validation and translation to WebGL
shaders.

The changes to the tex_image_2d test is neccessary (it was not valid
GLES 2.0 shader language).
2015-08-30 14:23:14 +02:00
Simon Sapin
006dd1002f Fix CharacterDataMethods to count UTF-16 code units, not code points. 2015-08-28 11:58:38 +02:00
João Oliveira
77e8d3071c Move RegisterBindings::RegisterProxyHandlers call into script::init
closes #7336
2015-08-24 18:41:39 +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
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
2b9590c5a5 Auto merge of #6778 - nox:childnodes, r=jdm
Optimise Node.childNodes



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6778)
<!-- Reviewable:end -->
2015-08-10 14:05:02 -06:00
Anthony Ramine
4e8922a53a Optimise Node.childNodes
We use the virtual method children_changed() to propagate changes in the children
list to the NodeList tied to Node.childNodes.
2015-08-09 00:10:21 +02:00
Lars Bergstrom
38286246df Update submodules and don't call setrlimit on Android 2015-08-07 15:08:07 -05: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
bors-servo
c6b043582b Auto merge of #6741 - servo:fix-setpropertypriority, r=pcwalton
Fix CSSStyleDeclaration::setPropertyPriority and some refactoring

r? @Ms2ger

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6741)
<!-- Reviewable:end -->
2015-08-01 15:00:06 -06:00
Ravi Shankar
79b65402d7 Persuading devtools to communicate with the workers; r=jdm 2015-08-01 21:25:49 +05:30
Jack Moffitt
dae1a398a4 Use local slice_chars
StrExt::slice_chars is deprecated and will be removed in Rust. This
lifts the implementation from Rust libstd and puts it in util::str.

This fixes a bunch of deprecation warnings in Servo.
2015-07-31 12:23:13 -06:00
Simon Sapin
06ba62b012 Remove some PropertyDeclaration cloning. 2015-07-31 08:09:25 +02: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
Simon Sapin
6737be1fb1 Remove usage of the deprecated OwnedAsciiExt 2015-07-30 18:01:41 +02:00
Matt Brubeck
e0eed0a48e Remove unused script -> layout_traits dependency 2015-07-28 10:27:08 -07:00
Anthony Ramine
7b40cc9fd7 Introduce VirtualMethods::children_changed()
This virtual method mimics the behaviour of mutation observers and make it more
viable than the older child_inserted(), which didn't cover removed nodes and
was called as many times as there were inserted nodes.

A few other shortcomings where remove_child() was called directly instead of
Node::remove() were also fixed while at it.
2015-07-25 19:09:40 +02:00
Patrick Walton
2c21c942da script: Increase our file descriptor limit on Linux.
We've had problems with this before, and I think it's starting to cause
problems again.
2015-07-23 00:17:58 -07:00
Josh Matthews
d385cb701b Reject websocket protocol requests that don't match https://tools.ietf.org/html/rfc6455#section-4.1 . 2015-07-22 09:35:07 -04:00