Commit graph

262 commits

Author SHA1 Message Date
Manish Goregaokar
7d65673561 Remove extra spaces
Command: `find . -maxdepth 1 -type f -print0 | xargs -0 sed -z -i "s/}\\n\\n\\n/}\\n\\n/"`
2014-12-27 02:53:35 +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
Tetsuharu OHZEKI
a7bb436177 script: Remove glob imports added in #4405 2014-12-19 04:52:48 +09:00
Ms2ger
466faac2a5 Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d. 2014-12-17 15:19:45 -05: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
38e4d86b14 Implements DefaultChecked and resets of checkboxes 2014-12-16 11:34:04 -08:00
Matthew Rasmus
4d0a6a6bd6 Implements reset button 2014-12-16 11:34:04 -08:00
Matthew Rasmus
a3b3295d80 Adds reset method to FormControl 2014-12-16 11:34:04 -08:00
Matthew Rasmus
f932a6947a Implements HTMLInputElement.defaultValue
...and changes SetValue to update the input text instead of the content
attr.

Also includes a comment summarizing everything I currently know with
respect to an input elements checkedness vs its IDL attributes vs its
content attributes.
2014-12-16 11:06:56 -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
Nathan E. Egge
b0552cb98e Sending key events through script task before processing them in the compositor.
Fixes #4163
2014-12-12 12:31:44 -05:00
Matthew Rasmus
1b84bd22b8 Implements the :checked pseudo-class for inputs
Relevant spec:
https://html.spec.whatwg.org/multipage/scripting.html#selector-checked

Also modifies HTMLInputElement::SetChecked to no longer modify its
checked content value, instead making use of its internal checkedness
state now that we can match `:checked` properly.
2014-12-08 08:40:15 -08:00
Manish Goregaokar
5511e02a78 Add Comparable trait to js.rs; fixups 2014-12-06 02:51:52 -08:00
Manish Goregaokar
e7b3caa386 Add oninput/onchange so tests work 2014-12-05 18:49:34 -08:00
Manish Goregaokar
b20d7d89c1 Switch over to query_selector_iter 2014-12-05 18:34:52 -08:00
Manish Goregaokar
a2f7e0fbd6 Address review comments 2014-12-05 18:34:51 -08:00
Manish Goregaokar
6482e313d6 Implement implicit form submission 2014-12-05 18:34:49 -08:00
Manish Goregaokar
e68119f82f Move InputRadio to Activatable 2014-12-05 18:32:13 -08:00
Manish Goregaokar
a5180a473d Refactor code for fetching radio siblings 2014-12-05 18:32:13 -08:00
Manish Goregaokar
14a6e54371 Move InputCheckbox to Activatable 2014-12-05 18:32:13 -08:00
Manish Goregaokar
d1547e3a7c Move InputSubmit to Activatable 2014-12-05 18:32:13 -08:00
Manish Goregaokar
7d51a543d8 Implement form control mutability, rename FormOwner -> FormControl 2014-12-05 18:32:11 -08:00
Manish Goregaokar
2c2d741b1f Split up the InputButton variant 2014-12-05 18:32:11 -08:00
Emanuel Rylke
1ecbe021ff Make the password input element show the correct number of dots for multibyte chars. 2014-12-05 22:03:02 +01:00
Gilbert Röhrbein
b3f9c8667c fixes #4110, can input text without 'value' attribute present 2014-11-26 23:39:10 +01:00
Keegan McAllister
642a3592c7 Fix interfaces test 2014-11-13 12:53:54 -05:00
Josh Matthews
89a27dd11a More documentation. 2014-11-13 12:53:54 -05:00
Josh Matthews
80764f65e3 Add single-line text input with no visible cursor. 2014-11-13 12:53:54 -05:00
Josh Matthews
84bc17e7ad Implement document focus context and hook it up to click events. 2014-11-13 11:27:15 -05:00
Jack Moffitt
d1b433a3b3 Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
Ms2ger
e1bb3c3b06 Parse the size attribute on input elements. 2014-11-05 19:07:01 +01: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
Tetsuharu OHZEKI
d8c4588f0e Use DOMRefCell for HTMLInputElement. 2014-10-22 10:01:00 +09:00
Gilles Leblanc
a31849df11 Make HTMLFormElementHelpers::submit take an enumerated argument instead of a boolean
Fixes #3677
2014-10-16 20:57:55 -04:00
bors-servo
1de2fb3721 auto merge of #3695 : saneyuki/servo/cell, r=jdm
#3050
2014-10-16 00:03:18 -06:00
Manish Goregaokar
3f2cbb275b Use #[dom_struct] everywhere 2014-10-16 10:20:18 +05:30
Tetsuharu OHZEKI
2bdcc0e2c0 Use DOMRefCell<T> for HTMLInputElement's field that is borrowed from other tasks. 2014-10-16 11:17:00 +09:00
Patrick Walton
5f8d3f72d8 layout: Introduce support for legacy presentational attributes to selector
matching, and use it for `<input size>` and `<td width>`.

This implements a general framework for legacy presentational attributes
to the DOM and style calculation, so that adding more of them later will
be straightforward.
2014-10-14 12:44:09 -07:00
Patrick Walton
ee2ccc4f87 script: Use atom comparison in more places, especially for attributes.
75% improvement in style recalc for Guardians of the Galaxy.
2014-10-14 10:32:40 -07:00
Manish Goregaokar
79cb1af12a Address review comments 2014-10-14 21:24:36 +05:30
Manish Goregaokar
749e2394c5 Add click handler for <input type=submit> 2014-10-14 21:24:36 +05:30
Rohan Prinja
05134e6d1f Add form submission via input element 2014-10-14 21:24:36 +05:30
Manish Goregaokar
c92d58980c Create an almost-correct form_owner() for convenience 2014-10-14 21:24:36 +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
Manish Goregaokar
10d9a66ce1 Correct <input>.value 2014-10-11 16:10:01 +05:30
Manish Goregaokar
cc6e81103f Fix <input>.checked 2014-10-11 09:48:16 +05:30
Manish Goregaokar
8a2c746e61 Add type IDL attr for submittable elements 2014-10-11 09:48:15 +05:30
Clark Gaebel
d12c6e7383 Incremental Style Recalc
This patch puts in the initial framework for incremental reflow. Nodes' styles
are no longer recalculated unless the node has changed.

I've been hacking on the general problem of incremental reflow for the past
couple weeks, and I've yet to get a full implementation that actually passes all
the reftests + wikipedia + cnn. Therefore, I'm going to try to land the different
parts of it one by one.

This patch only does incremental style recalc, without incremental flow
construction, inline-size bubbling, reflow, or display lists. Those will be coming
in that order as I finish them.

At least with this strategy, I can land a working version of incremental reflow,
even if not yet complete.

r? @pcwalton
2014-10-09 12:55:21 -04:00