Commit graph

130 commits

Author SHA1 Message Date
Tomas Cernaj
18632570cd servo: Merge #8909 - Move ScriptMsg to script_traits crate, Fixes #8833 (from cnaj:msg_refactoring); r=jdm
Review of documentation that was missing needed.

Fixes #8833.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7438bc0425749989b8aab084a34ff3fff2ea6679
2015-12-10 10:55:44 +05:01
Eli Friedman
70ebd13eff servo: Merge #8786 - Remove unnecessary conversion to/from DOMString for localName (from eefriedman:localname-atom); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 63762d2b52ee6026216d304c8826bf8b4a5fdd20
2015-12-03 14:36:22 +05:01
Sam Gibson
8846f71259 servo: Merge #7323 - Adds support for input element's maxlength attr (from samfoo:input-maxlength); r=jdm
This implements maxlength [as described by whatwg](https://html.spec.whatwg.org/multipage/forms.html#dom-input-maxlength) for input elements.

Remaining work:
* WPT test - I have no idea how to write a WPT for simulating user input. Webdriver? Open to suggestions here.
* Support for textarea (should be trivial, probably worth filing another issue)

servo/servo#7320
servo/servo#7004

Source-Repo: https://github.com/servo/servo
Source-Revision: fc3e950052b6cc580dc32fc03d978fad97b49ba8
2015-12-03 09:59:24 +05:01
Eli Friedman
ab5455716f servo: Merge #8703 - Compute attribute name atoms at compile-time (from eefriedman:dom-getter-setter-atom); r=frewsxcv
Source-Repo: https://github.com/servo/servo
Source-Revision: eadaf30af396857535ad15b269bcba4f58e1ff9a
2015-11-28 20:11:07 +05:01
Alan Jeffrey
f4ab2bfdb5 servo: Merge #8667 - Update string cache (from asajeffrey:update-string-cache); r=SimonSapin
Updated string_cache to 0.2, and updated the dependencies that depend on string_cache.
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::from_slice by Atom::from.
Replaced atom.as_slice() by &*atom.

r? @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: 188fa9378c103093f1f8dac24bff0d9d237fd2bc
2015-11-25 23:41:39 +05:01
Keith Yeung
5b3f4b220a servo: Merge #8530 - Split ConstellationMsg into ScriptMsg and CompositorMsg (from KiChjang:split-constellation-msg); r=jdm
Fixes #8356.

Source-Repo: https://github.com/servo/servo
Source-Revision: acbe41305230a926458596444ca955eff063d9dd
2015-11-19 04:10:20 +05:01
Corey Farwell
0fcc30f78d servo: Merge #8504 - Prefer atoms over strs for string comparisons (from frewsxcv:more-atoms); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 1763a37e3be8be46dc86bf4bf76bcd7c892566da
2015-11-13 10:27:13 +05:01
Alan Jeffrey
f8093754b7 servo: Merge #8477 - Opaque DOMString (from asajeffrey:opaque-domstring); r=asajeffrey
This patch makes DOMString an opaque wrapper round String (currently it's a transparent wrapper).

The changes are:

* Replacing DOMString(foo) by DOMString::from(foo).
* Replacing foo.0 by String::from(foo).
* Adding functions clear, push_str and extend for in-place mutation of DOMStrings.
* Replacing DOMString by String in other threads (devtools, storage and filereader).
* Making DOMString implement !Send.
* Removing the pub attribute from the contents of DOMString.

This enables experimenting with other string representations in the DOM.

Source-Repo: https://github.com/servo/servo
Source-Revision: 62acdd303b78951885c2c90747b31f318907d6c9
2015-11-13 06:48:30 +05:01
Sylvester Willis
bc22eb435a servo: Merge #8400 - Added call to event.PreventDefault on html text inputs and textareas (from sylvesterwillis:arrow-key-scroll-on-input); r=jdm
This change should prevent page scrolling when up/down buttons are pressed within text inputs and textboxes which should resolve issue #8379.

Source-Repo: https://github.com/servo/servo
Source-Revision: f1565bdd82bdf9a7fc383d20fdb53d07adec55c1
2015-11-08 09:49:16 +05:01
Corey Farwell
75aebe6c02 servo: Merge #8249 - 'type' attribute on HTMLInputElement should be stored as an Atom (from servo:htmlinputelement-type-atom); r=nox
Fixes #8180

Source-Repo: https://github.com/servo/servo
Source-Revision: 7ace7bc09087b6bfa817047640ba15df997b4a91
2015-11-07 18:38:51 +05:01
Ms2ger
7cb2a13f43 servo: Merge #8312 - Make DOMString a newtype around String, rather than a typedef (from Ms2ger:DOMString); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: abfd1fb1bf071961bc8a581927eaa96a2d3e2cba
2015-11-04 16:18:41 +05:01
David Zbarsky
ed7fd17b12 servo: Merge #8305 - Get rid of a bunch of explicit derefs (from dzbarsky:roots); r=Ms2ger,
Source-Repo: https://github.com/servo/servo
Source-Revision: 4b9fa13f2f6a1aa38d180367426498f01f6414c9
2015-11-04 10:34:54 +05:01
Florian Merz
f4f9652bda servo: Merge #8265 - add get_raw_layout_value (HTMLInputElementHelpers) (from fiji-flo:password_caret); r=eefriedman
This resolves #8107
Previously the index of the insetion point for a password input was
calculated using the scrambled string based on the edit point in the
raw string. That could lead to a wrong position of the caret. This
commit changes this behavior to calculate the insertion point using
the raw string.

Source-Repo: https://github.com/servo/servo
Source-Revision: e91169c0e2cfe37b1a2d0feb3aab50b72c816ffc
2015-11-04 05:00:59 +05:01
rohan.prinja
e8b504412b servo: Merge #8221 - move modules around (from ajnirp:8130-reorganise); r=jdm
for #8130

Source-Repo: https://github.com/servo/servo
Source-Revision: daad09d44245228fba9118316937add71bec7c58
2015-11-04 02:27:02 +05:01
Ms2ger
2e551ff777 servo: Merge #8294 - Remove RawLayoutHTMLInputElementHelpers (from Ms2ger:layout-input); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 5c11c88e92ccbc3013501096d5625778774c9fee
2015-11-02 19:15:51 +05:01
David Zbarsky
625a98b708 servo: Merge #8193 - Use an Atom for Event.type (from dzbarsky:event_type); r=nox
Depends on https://github.com/servo/string-cache/pull/113

Source-Repo: https://github.com/servo/servo
Source-Revision: 35b452660bf0759d222e8f2ac4b8c57f75529443
2015-11-02 05:28:28 +05:01
Corey Farwell
26720ce882 servo: Merge #7965 - Implement 'labels' attribute on 'labelable elements' (from frewsxcv:labelable-elements-label-attribute); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 0e70a1f8a88fb1962e4ada447479b4228d09d724
2015-11-01 20:22:18 +05:01
Bobby Holley
5db6816cd0 servo: Merge #8162 - Centralize event states in rust-selectors (from bholley:centralize_event_states); r=pcwalton
This still needs a rev bump on rust-selectors once https://github.com/servo/rust-selectors/pull/55 gets merged.

Source-Repo: https://github.com/servo/servo
Source-Revision: 521a87180a85709f8f704df33537f79bd131bf71
2015-10-31 09:36:45 +05:01
Anthony Ramine
bb8125a3da servo: Merge #8041 - Introduce trait Castable (from nox:castable); r=jdm
Removes all those messy FooCast structures in InheritTypes.rs.

Source-Repo: https://github.com/servo/servo
Source-Revision: 674589c370d978f543e71f995d58c5b28e6e9842
2015-10-21 07:57:32 -06:00
Adam Szopa
7ecd87862f servo: Merge #8099 - Remove explicit lifetimes which can be elided (from Darktori:master); r=mbrubeck
Fixes https://github.com/servo/servo/issues/8069

Source-Repo: https://github.com/servo/servo
Source-Revision: 941c06eb99533c6c1d55b4ad3b51804badf48a23
2015-10-20 17:30:57 -06:00
Leo Lahti
0d91dd322d servo: Merge #8095 - Removed unsafe from 'query_selector_iter' (from TileHalo:foo); r=Ms2ger
Fixing #8078.

Source-Repo: https://github.com/servo/servo
Source-Revision: 25d3c2b655303cf3b858e49019c42254433056cf
2015-10-20 01:13:49 -06:00
Anthony Ramine
1c1210fbba servo: Merge #8060 - Implement Deref<Target=T> for JS<T> where T: Reflectable (from nox:deref-js); r=Ms2ger
We can only borrow `JS<T>` from rooted things, so it's safe to deref it.
The only types that provide mutable `JS<T>` things are `MutHeap<JS<T>>` and
`MutNullableHeap<JS<T>>`, which don't actually expose that they contain
`JS<T>` values.

Source-Repo: https://github.com/servo/servo
Source-Revision: 1a376aa75d5de8781b17a673850860f8afd2c28f
2015-10-19 06:32:05 -06:00
Bobby Holley
ad33b14737 servo: Merge #7935 - Move event state from Node to Element (from bholley:eventstate_element); r=nox
Just getting my feet wet with Rust here. Please feel free to nit the hell out of it stylistically and idiomatically. :-)

Source-Repo: https://github.com/servo/servo
Source-Revision: ff2151b8bbc62fa29c90a429b7a4f12520420b6e
2015-10-19 02:47:21 -06:00
Eli Friedman
7cf10cb041 servo: Merge #8026 - Fix uses of JS<T> as a type on the stack (from eefriedman:js-rooting); r=nox
`JS<T>` belongs on the heap, and only on the heap.  This is a collection of fixes so that code uses either `Root<T>` or `&T` to pass around garbage-collected pointers.

Ideally, we could completely ban constructing a `JS<T>` outside of constructor functions, but we aren't quite there yet.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7c7dbde0f4372037aac3635b8d81531ca9cdced3
2015-10-16 08:05:59 -06:00
Anthony Ramine
06fd534a1b servo: Merge #8020 - Generate all Derived implementations in codegen (from nox:codegen-derived); r=Ms2ger
Follow-up of #7873.

@Ms2ger r? :)

Source-Repo: https://github.com/servo/servo
Source-Revision: 417cf5738e4609f4b2e34e9e0c4f7ef68f087432
2015-10-15 12:53:08 -06:00
Anthony Ramine
d5038d123e servo: Merge #7873 - Generate the various TypeId enums in codegen (from nox:codegen-typeid); r=Ms2ger
This frees us forever from caring about maintaining these enums. The last commit removes their use from the initialisation of interface objects derived from Node.

Source-Repo: https://github.com/servo/servo
Source-Revision: 32daa17d5cbcad02db0713e21e52410cdc60480e
2015-10-14 12:47:48 -06:00
Corey Farwell
795e875ef6 servo: Merge #7960 - Replace usage of old-style WHATWG spec links (from frewsxcv:update-spec-links); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 4052a22a1c6826cb18f03de9d2f6aed82d809e71
2015-10-10 10:17:52 -06:00
Anthony Urena
d38f437e11 servo: Merge #7892 - Refactor html form dataset collection (from anthgur:form-data-refactor); r=jdm
Factor out FormDatum collection for `<input>`
Improve early return logic for getting the FormDatum from an `<input>`
Condense element type patterns

Proposed to close #7851

Source-Repo: https://github.com/servo/servo
Source-Revision: 94dc98717b79c12cdac6b1eba72227199850ac31
2015-10-07 08:32:44 -06:00
Maciej Skrzypkowski
c939d50d97 servo: Merge #7902 - Removed unneeded pub annotations in HTMLInputElement #7897 (from mskrzypkows:HTMLInputElement_pub_refactor); r=nox
get_size method appeared to be never used so I removed it.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9a12c2c06199bc0a11982949b0cb43ee8500c001
2015-10-07 05:35:14 -06:00
Keith Yeung
4b48d7845e servo: Merge #7777 - Add support for caseless group name matching in HTML input elements (from KiChjang:caseless-group-name-match); r=jdm
Fixes #7749

Source-Repo: https://github.com/servo/servo
Source-Revision: e9842b7db2243ea72d9607c18753025e946788bd
2015-10-02 13:26:05 -06:00
Philipp Hartwig
96d1fb1610 servo: Merge #7801 - Refactor FormControl trait (from aopicier:refactor_formcontrol); r=Manishearth
The trait is now implemented for HTMLFooElement instead of
&HTMLFooElement and does no longer require an impl body.

Suggested by @Manishearth

Source-Repo: https://github.com/servo/servo
Source-Revision: 94e85a5226fe5b18bde40a2d5f6727b717bd148f
2015-09-30 19:06:18 -06:00
Jacob Parker
df1c899822 servo: Merge #7764 - Only display text carets in text inputs (from j3parker:input-caret-only-for-text); r=pcwalton
For #7756

Source-Repo: https://github.com/servo/servo
Source-Revision: 0c64e4a2c98cbf5e7b95dbea31c2e6993b70472c
2015-09-29 14:13:32 -06:00
Anthony Ramine
d80fcc3c14 servo: Merge #7733 - Properly consider radio button groups (from nox:checked); r=Manishearth
Radio button groups with missing or empty names are always the only element of their respective radio button group.

Source-Repo: https://github.com/servo/servo
Source-Revision: 37ce248f316ba3cb5a2cfb0b4bb95918c1c45828
2015-09-26 11:21:11 -06:00
Manish Goregaokar
e487982661 servo: Merge #7719 - Various fixes to make github less error-prone (from Manishearth:ghfix); r=Ms2ger
r? @Ms2ger

Source-Repo: https://github.com/servo/servo
Source-Revision: 2623f58a4b2b302c354257632e3ff67d1dfa72d9
2015-09-24 03:55:29 -06:00
Ravi Shankar
7d512d50d1 servo: Merge #7698 - sorted the declarations in various files (from Wafflespeanut:sorting); r=frewsxcv
This is a direct extract from my abandoned PR for a lint (#7546), along with some rather clumsy modifications (only on `components/script/dom/mod.rs` and `components/style/lib.rs`), because I had to sort some of the files again to make peace with tidy, which hasn't been educated about sorting yet!

Source-Repo: https://github.com/servo/servo
Source-Revision: a7208869f2903e36f9b2f540b55b50283d7df466
2015-09-23 15:02:56 -06:00
Brandon Fairchild
f7fb1e4b4a servo: Merge #7662 - Check for multiple import blocks separated by whitespace (from nerith:import); r=frewsxcv
Fixes #7381.

Source-Repo: https://github.com/servo/servo
Source-Revision: a0d3c9223f09757124b1520c4f17e94fa8bbe249
2015-09-19 13:34:51 -06:00
Patrick Walton
12ae75107c servo: Merge #7644 - layout: Draw the insertion point in input elements (from pcwalton:carrot); r=mbrubeck
Known issues:

* The caret doesn't show up if there's no text present, because we don't create text runs in that case. This should be a followup.

* Text runs don't support decomposing ligatures into their constituent subglyphs for advance computation, so the caret won't appear inside a ligature. This is a text run bug.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: 6cd098da302db85975d0967ddee836f04eae3bd5
2015-09-17 05:50:41 -06:00
Ms2ger
ff563dd32f servo: Merge #7622 - Use static atoms in some places (from Ms2ger:atoms); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 97710f0739410e7b464591f482c2dc117e528bbe
2015-09-14 02:38:02 -06:00
Manish Goregaokar
cf0446c9f9 servo: Merge #7536 - More clippy fixes (from Manishearth:clippyfix); r=Ms2ger
Elided almost all the lifetimes and removed needless returns. Mostly done by sed + manual fixes.

r? @nox

Source-Repo: https://github.com/servo/servo
Source-Revision: c2c2646d37614ece5869af861993c3d619f6e003
2015-09-04 07:59:04 -06:00
Prabhjyot Singh Sodhi
3406659245 servo: Merge #7511 - make AttrVal tokens() and atom() return or panic (from psdh:attrtokato); r=Ms2ger
Fixes #7479

Source-Repo: https://github.com/servo/servo
Source-Revision: da02dba9793f373c6c9cdc1e0bd1c3411cfcc4ba
2015-09-02 15:03:10 -06:00
Anthony Ramine
719d3d7bcc servo: Merge #7452 - Introduce VirtualMethods::attribute_mutated() (from nox:cleanup-attributes); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: eaf90c0b1c14717fb580bb0bdb8f6c4db363ace6
2015-09-02 08:14:33 -06:00
Corey Farwell
de4ce06ffa servo: Merge #7483 - Enforce linking to spec for method implementations via macros (from frewsxcv:macro-spec-links); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 4984aaf8bfca0698a132e10e9f48cef42d1b8302
2015-08-31 21:17:54 -06:00
Anthony Ramine
c327bc7867 servo: Merge #7416 - Make the traits for the IDL interfaces take &self (from nox:methods-ref); r=frewsxcv
Source-Repo: https://github.com/servo/servo
Source-Revision: 71b277d5675556e61a82ae9dbf3105449c3a8275
2015-08-27 15:08:41 -06:00
Anthony Ramine
d2ee701ee9 servo: Merge #7401 - Remove helper traits (from nox:rm-helpers); r=Manishearth
Now that `JSRef<T>` is gone, there is no need to have helper traits.

Source-Repo: https://github.com/servo/servo
Source-Revision: 909429702972d53bf02dfe9a4aa93ea0cb588cf4
2015-08-27 09:38:48 -06:00
João Oliveira
d39bd47b08 servo: Merge #7361 - make dom_struct derive HeapSizeOf (from jxs:master); r=Ms2ger
closes #7357

Source-Repo: https://github.com/servo/servo
Source-Revision: 532fd19d69fd11d06bca7539c722a46fab2c4419
2015-08-27 02:35:45 -06:00
Manish Goregaokar
8c0333b4f1 servo: Merge #7397 - Remove doublepointer in VirtualMethods, and from_borrowed_ref (from Manishearth:doublepointer-meet-fire); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 48945b0fc1b1f1bee77f6cb30ac10e17614ef283
2015-08-26 15:01:12 -06:00
Johann Tuffe
5c3a5a67f5 servo: Merge #7265 - Add alphabetical order check for use statements (from tafia:tidy-use); r=Ms2ger
close #7112

Source-Repo: https://github.com/servo/servo
Source-Revision: a5fbb2f2a6fa79755f975feff2435abb6a5dd0e9
2015-08-20 07:43:56 -06:00
Bogdan Cuza
b3e4dcef5f servo: Merge #7097 - Measure heap memory usage for more types. Fixes #6951 (from boghison:memtypes); r=jdm
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 :)

Source-Repo: https://github.com/servo/servo
Source-Revision: a03616f379c255cc6c9b6e1d04dd7d98bd9926ce
2015-08-13 13:16:14 -06:00
Simon Sapin
72eb9c272a servo: Merge #6850 - Upgrade to rustc 1.3.0-dev (87055a68c 2015-07-30) (from servo:rustup_2015-07-30); r=SimonSapin
This builds and passes unit tests.

Source-Repo: https://github.com/servo/servo
Source-Revision: 4837dd9a1c172a55bfad0a7ae67dc3b64753be9a
2015-07-30 14:46:13 -06:00
Ms2ger
c9cf829342 servo: Merge #6771 - Remove unused allow(unrooted_must_root) attribute (from Ms2ger:unused-attr); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 78455ec033c6116732a8f43b909093b7d7732779
2015-07-27 02:23:53 -06:00