Commit graph

409 commits

Author SHA1 Message Date
Anthony Ramine
cb5cd8d881 Say farewell to in-tree HeapSizeOf 2016-02-04 22:03:32 +01:00
Emilio Cobos Álvarez
a1c830f1c1 Update rust-selectors
This commits updates rust-selectors to use the generic parser, and as
such it moves the element state into the style crate.
2016-02-03 02:11:31 +01:00
Mathieu Hordesseaux
322b120f8a Implement SetNamedItem, SetNamedItemNS, SetAttributeNode and SetAttributeNodeNS 2016-01-28 12:35:44 +01:00
Bobby Holley
384cdfcfff Hoist ParseErrorReporter into style and remove the dependency on msg.
The pipeline id stuff is currently unused. If someone needs it, they can add
an additional trait bound on their css error reporter to get the pipeline id.
2016-01-11 18:01:48 -08:00
bors-servo
099beee85c Auto merge of #8983 - Manishearth:cursors, r=jdm
Various textinput fixes

 - Currently the cursor sticks around if you click elsewhere. Now the text inputs are relayout-ed on blur.
 - Currently whitespace gets collapsed in text input (https://github.com/servo/servo/issues/8772). Not anymore.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8983)
<!-- Reviewable:end -->
2016-01-11 23:21:03 +05:30
Manish Goregaokar
f67e208630 Remove virtual call and unconditionally dirty node on set_focus_state 2016-01-07 13:38:05 +05:30
Ying-Ruei Liang (KK)
74905f0f3c Invalid type attribute for HTMLInputElement now fallback as text type (fixes #8773) 2016-01-06 10:56:00 +08:00
Guillaume Gomez
99ac1a81cc Generate PartialEq automatically 2016-01-03 18:07:09 +01:00
bors-servo
4a141fb63f Auto merge of #9137 - iszak:issue-9135, r=nox
Fixes https://github.com/servo/servo/issues/9135

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9137)
<!-- Reviewable:end -->
2016-01-03 11:33:00 +05:30
Iszak Bryan
c02a56c01a Optimise get_root_element for elements in documents 2016-01-03 01:07:00 +00:00
Johannes Linke
6b215f38ee Fix a bunch of clippy lints 2016-01-02 23:27:15 +01:00
bors-servo
5e497cf311 Auto merge of #9099 - frewsxcv:rm-parsed-attr, r=nox
Remove fields with parsed attribute values on HTMLTextAreaElement

https://github.com/servo/servo/issues/7863

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9099)
<!-- Reviewable:end -->
2016-01-01 01:15:13 +05:30
bors-servo
66c8aa8cda Auto merge of #8420 - craftytrickster:8371/generic-font-family, r=glennw
Enabled use of FontFamily enum type

https://github.com/servo/servo/issues/8371

In addition to replacing loose strings with the FontFamily enum in `font_cache_task.rs`, I also centralized the add_generic_font calls into one single function. If centralizing into one function is not desired or if anything else needs to be changed, please let me know.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8420)
<!-- Reviewable:end -->
2015-12-31 16:49:48 +05:30
David Raifaizen
d942bfb474 Enabled use of FontFamily enum type and replaced plain string parameters with enum 2015-12-30 18:21:37 -05:00
Corey Farwell
3eb585f547 Remove fields with parsed attribute values on HTMLTextAreaElement
https://github.com/servo/servo/issues/7863
2015-12-30 12:27:13 -08:00
Josh Matthews
7693b03468 Make button elements activatable. Fixes #4837. Fixes #8101. 2015-12-29 10:45:04 -05:00
bors-servo
89ab368258 Auto merge of #8506 - nox:finish-ranges, r=dzbarsky
Properly propagate changes when range or trees are mutated

Does the same thing as #6817, but storing Range instances directly in their start and end containers.

Cc @dzbarsky

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8506)
<!-- Reviewable:end -->
2015-12-26 04:08:15 +05:30
Mathieu Agopian
11234f5370 Use Url.join instead of UrlParser.base_url(...).parse (#9002) 2015-12-18 17:02:41 +01:00
Alan Jeffrey
348a68fe2c Bump string_cache version to 0.2.5.
Atom::to_lower_case() now returns an Atom rather than a String,
so there are a few asserts that need a different collection of &s and *s.
2015-12-15 17:00:36 -06:00
GauriGNaik
fc81276c8e Add pipeline information to CSS error reporting. 2015-12-14 11:18:30 -05:00
Anthony Ramine
8f01790f06 Introduce UnbindContext
This holds the context that describes the original node that was removed from a tree
when unbinding from a tree.
2015-12-13 21:14:31 +01:00
Simon Sapin
0a8a2c299e Add link to issue for :visited 2015-12-05 21:36:13 +01:00
bors-servo
63762d2b52 Auto merge of #8786 - eefriedman:localname-atom, r=jdm
Remove unnecessary conversion to/from DOMString for localName.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8786)
<!-- Reviewable:end -->
2015-12-03 15:05:22 +05:30
Sam Gibson
9668500e97 Makes setting negative values to maxLength throw an IndexSize exception 2015-12-03 14:00:59 +11:00
Sam Gibson
2ba1750c40 Resolves long-running merge conflicts 2015-12-03 14:00:53 +11:00
Sam Gibson
eecdfdf6c1 Makes int_getter macro, and uses -1 as default maxlength instead of maxint 2015-12-03 14:00:52 +11:00
Eli Friedman
e42dcb3712 Remove unnecessary conversion to/from DOMString for localName. 2015-12-02 13:42:45 -08:00
bors-servo
99223656fb Auto merge of #8675 - GuillaumeGomez:master, r=nox
Add XMLDocument object

Fixes #8000

(Still working on it)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8675)
<!-- Reviewable:end -->
2015-11-27 19:29:04 +05:30
Guillaume Gomez
adf8b359bb Add XMLDocument object 2015-11-27 14:55:41 +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
Ms2ger
0c61be7a57 Rustfmt some of script. 2015-11-18 11:14:05 +01:00
bors-servo
b6f519cd0a Auto merge of #8533 - Ms2ger:legacy, r=nox
Remove the `legacy` module.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8533)
<!-- Reviewable:end -->
2015-11-15 19:13:13 +05:30
Ms2ger
f2be9eb735 Move the from_declaration to its only caller and remove the empty legacy module. 2015-11-15 13:57:22 +01:00
Ms2ger
9c1d678b1b Remove get_unsigned_integer_attribute. 2015-11-15 11:24:03 +01:00
Ms2ger
5417df6397 Introduce a get_colspan method on LayoutJS<Element>. 2015-11-15 11:16:17 +01:00
Corey Farwell
02a8e8dd16 Implement <hr> element 'width' attribute 2015-11-14 16:46:59 -05:00
Alan Jeffrey
84bde75b42 Replaced DOMString constructor by conversion functions.
Replaced DOMString(...) by DOMString::from(...).
Replaced ....0 by String::from(...).
Removed any uses of .to_owner() in DOMString::from("...").
2015-11-12 17:52:59 -06:00
bors-servo
5e6efd62c1 Auto merge of #8459 - frewsxcv:namednodemap-iter, r=Ms2ger
Simplify iterating over Element attributes

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8459)
<!-- Reviewable:end -->
2015-11-11 20:19:49 +05:30
Corey Farwell
a7c470de09 Simplify iterating over Element attributes 2015-11-10 21:42:48 -05:00
bors-servo
fd5540df62 Auto merge of #8453 - frewsxcv:atoms, r=jdm
Prefer Atoms over strs for comparison

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8453)
<!-- Reviewable:end -->
2015-11-11 06:55:39 +05:30
Bobby Holley
7fa7936657 Implement attribute restyle hints.
Fixes #6942.
2015-11-10 11:57:24 -08:00
Corey Farwell
55477eb618 Prefer Atoms over strs for comparison 2015-11-10 08:58:57 -05:00
Eli Friedman
4b68fc18c3 Move storage of bgcolor for <tr> and <tbody>. 2015-11-09 12:27:16 -08:00
Eli Friedman
af78173243 Move more unsafe layout calls onto LayoutJS. 2015-11-09 10:47:38 -08:00
Eli Friedman
5293afc122 Move unsafe layout calls onto LayoutJS. 2015-11-09 10:47:37 -08:00
Corey Farwell
ee0800abe9 Implement <hr> 'color' attribute 2015-11-08 18:34:27 -05:00
Bobby Holley
7dba4447f1 Store pristine element state rather than a set of changes.
This is the strategy we'll need to take for attributes, and so this change
puts us in a position to handle attributes and state the same way.

This does mean that we stop taking care to track the situations where our
state has reverted to the original state, with no net change. I think that's
probably of negligible value though.
2015-11-04 19:09:58 -08: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
Ms2ger
e6aa976462 Use DOMString::new() somewhat consistently. 2015-11-04 12:09:10 +01:00