Commit graph

61 commits

Author SHA1 Message Date
Corey Farwell
8e3f4bba85 Reduce max line length from 150 to 120 characters
Part of https://github.com/servo/servo/issues/6041
2015-05-24 00:01:49 -04:00
bors-servo
5cb1356e9e Auto merge of #5800 - aweinstock314:x11-clipboard, r=jdm
...ed test_clipboard_paste to the "test-unit" suite.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5800)
<!-- Reviewable:end -->
2015-05-06 16:09:37 -05:00
Anthony Ramine
fedad2af1f Improve support of limited unsigned long attributes 2015-05-06 20:18:08 +02:00
Avi Weinstock
b742eeca05 Made the clipboard-related functionality in TextInput more testable. Added test_clipboard_paste to the "test-unit" suite. 2015-05-06 11:46:18 -04:00
Anthony Ramine
7197052c0d Uniformise root() methods
They now live in traits Rootable, OptionalOptionalRootable, OptionalRootable
and ResultRootable.
2015-04-28 09:22:45 +02:00
Ms2ger
a862479ca8 Remove as_slice() calls from script. 2015-04-26 10:52:55 +02:00
Avi Weinstock
cf6aef5d51 Make the channel argument to TextInput::new be optional, to support the signature expected by the unit tests. 2015-04-21 15:18:23 -04:00
Avi Weinstock
503cc9e6d6 Moved clipboard integration from textinput to constellation, to facilitate sandboxing. 2015-04-21 09:31:20 -04:00
Ms2ger
49393a8762 Update some URLs.
The HTML spec's division into pages is not stable, so it is safer to use the
URL without a specific page (which will redirect).
2015-04-14 10:44:51 +02:00
Corey Farwell
5eaa922045 Update WHATWG links to use HTTPS
Extracted this out of #5649

This commit was created with the following commands:

```
find . -iname "*.webidl" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```

```
find . -iname "*.rs" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```
2015-04-13 21:34:27 -07:00
Anthony Ramine
bf7c791e3a Hold a Temporary in AncestorIterator 2015-04-07 15:46:31 +02:00
Manish Goregaokar
3479d3fa7f Replace unsafe_blocks by unsafe_code. 2015-03-21 10:27:32 +01:00
Ms2ger
5f15eb5fbf Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev. 2015-03-18 13:18:31 -04:00
Matt McCoy
0bd717e470 #4508 Adding simple test and actually getting the event to dispatch 2015-03-17 19:54:05 -04:00
Matt McCoy
5938a4c0f5 #4508 Ranaming the runnable and making sure the event is trusted 2015-03-17 17:05:41 -04:00
Matt McCoy
a481c8f28a #4508 Only dispatching input event when the textarea receives keyboard input and not for javascript 2015-03-17 17:05:41 -04:00
Matt McCoy
bfa4fe762b #4508 Fixing issues related to dispatching input event at HTMLTextareaElement 2015-03-17 17:05:41 -04:00
Matt McCoy
7cb851dda1 Fixes #4508 dispatching input event at HTMLTextareaElement 2015-03-17 17:05:21 -04:00
Zack Slayton
08ac0766ed Use new if let syntax wherever possible. Fixes #4153. 2015-03-10 09:18:55 -04:00
yodalee
c0867ec90a formcontrol trait to element trait
mutable function and reset function in formcontrol
move into trait of single element
currently only TextArea element and Input element
2015-02-03 19:50:31 +08:00
Tetsuharu OHZEKI
e2bd9eadd8 LayoutJS<T> implements Layout*Helpers instead of JS<T>. 2015-02-01 01:54:37 +09:00
Ms2ger
505159a464 Import the util crate as util rather than servo_util.
This used to conflict with the util crate from the standard library, which
has long since been removed.

The import in layout has not been changed because of a conflict with the
util mod there.
2015-01-29 12:16:41 +01:00
Ms2ger
f8ac1777ff Don't shadow lifetimes in script. 2015-01-28 13:48:28 +01:00
Josh Matthews
95fc29fa0d Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev. 2015-01-28 10:16:49 +10:00
Ms2ger
01ed338746 Move to to_owned rather than into_string.
into_string has been removed from Rust.
2015-01-20 14:49:07 +01:00
bors-servo
2e17cae5d0 auto merge of #4495 : MeghaGupta/servo/typeid, r=Ms2ger 2015-01-04 12:12:48 -07:00
Megha Gupta
f85b9e37cc Add HTMLElementTypeId enum (fixes #3625) 2015-01-02 23:10:31 +05:30
Ms2ger
1dad710063 Replace Root::deref() calls by Root::r() calls where possible.
This changes those calls that were already sound.
2015-01-01 20:36:43 +01:00
bors-servo
56d1b16d1b auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister
Now `#[dom_struct]` also generates Reflectable impls, and there's another lint to ensure that a DOM struct only contains one bare DOM field (as the first field) or a Reflector.

A lot of this was generated by sed -- each autogenerated change has its own commit for easy review; these will be squashed later.
2014-12-27 22:12:45 -07:00
Manish Goregaokar
e9d1740e19 script: to_string() -> into_string() 2014-12-27 14:48:36 +01:00
Manish Goregaokar
21a888341d Ensure that Reflectors are the first field 2014-12-27 02:53:36 +05:30
Manish Goregaokar
552db382d6 Remove manual impls of Reflectors (autogen)
Obtained via:

 `find . -maxdepth 1 -type f -print0 | xargs -0 sed -z -i "s/\\nimpl Reflectable for[^{]*{[^}]*}[^}]*}\\n//"`
 `find . -maxdepth 1 -type f -print0 |xargs -0  grep -lZ dom_struct | xargs -0 grep -LZ  "reflector()\\|Reflector::new" |xargs -0 sed -z -i "s/use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};/use dom::bindings::utils::reflect_dom_object;/"`

followed by semi-automated removal of leftover imports
2014-12-27 02:52:33 +05:30
Ms2ger
466faac2a5 Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d. 2014-12-17 15:19:45 -05:00
bors-servo
5951056973 auto merge of #4133 : mttr/servo/form_resetting, r=jdm
We can reset `<input type=text>` fields! I wish I could've done something with checkboxes, but unfortunately, that's it for now.

In addition to that, this PR implements `HTMLInputAttribute.defaultValue`, updates wpt-test to expect passing tests as a result of that implementation, and fixes an index error crash with text inputs.

edit: also includes an html example where one may lazily watch form resets in action: ` tests/html/form_reset_handsfree.html`
2014-12-16 15:03:49 -07:00
Matthew Rasmus
504f968b20 Implements :indeterminate pseudo-class
Addresses reviews
2014-12-16 11:34:04 -08:00
Matthew Rasmus
0c8e1aeda3 Implements dirty value/checked flags for input
And modifies test-inputs.html to test.

Fixes wpt breaking mistake
2014-12-16 11:34:04 -08:00
Matthew Rasmus
a5c0bb708d htmltextarea: Fixed some value_changed issues
Also modified tests/html/textarea.html to allow for the testing of the
textarea's dirty value flag.
2014-12-16 11:34:04 -08:00
Matthew Rasmus
7e0c39a82d Implements FormControl for HTMLTextAreaElement 2014-12-16 11:34:04 -08:00
Matthew Rasmus
fc0748f50e Makes layout respect <textarea> rows attribute
review addresssing
2014-12-16 11:02:01 -08:00
Matthew Rasmus
2c7f6076d1 Makes layout respect <textarea> cols attribute 2014-12-16 10:44:15 -08:00
Patrick Walton
d101c1dd91 script: Improve dirty propagation and fix script-layout synchronization.
This fixes race conditions whereby layout and script could be running
simultaneously.
2014-12-15 14:16:04 -08:00
Matthew Rasmus
c97a4d999e Handle default uint attributes properly
...and passing a whole bunch of new tests.
2014-12-05 12:31:32 -08:00
Matthew Rasmus
f5bd8f830a HTMLTextArea: Implements a dirty value flag 2014-12-05 12:31:31 -08:00
Matthew Rasmus
ed37b53a62 Updates WPT to expect newly passing tests
Addresses reviews

More review addressing
2014-12-05 12:31:31 -08:00
Matthew Rasmus
29241699fd Implements multi line text input for TextArea 2014-12-05 12:21:31 -08:00
Matthew Rasmus
fd65b5f438 Implements some HTMLTextAreaElement attributes
These attributes all reflect their own related content values, with the
exception of defaultValue, which acts as an alias for its IDL
textContent attribute.

Many of these do have default values and constraints which are currently unimplemented.
2014-12-05 12:21:31 -08:00
Bruno de Oliveira Abinader
bbab8831e0 Usage of JSRef<Attr> in before_remove_attr & after_set_attr
JSRef<Attr> does not require allocating a DOMString for value, which are
unused in most cases. It also provides more access to Attr data.
2014-10-22 11:13:58 -04:00
Manish Goregaokar
3f2cbb275b Use #[dom_struct] everywhere 2014-10-16 10:20:18 +05:30
Tim Taubert
df60f8b2c5 Privatize EventTarget and EventListenerEntry 2014-10-13 13:25:43 +02:00
Tim Taubert
9a52bb8310 Privatize InheritTypes 2014-10-13 11:13:12 +02:00