Commit graph

384 commits

Author SHA1 Message Date
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
Manish Goregaokar
65e9ab8ece Use macro setters for <input> 2014-10-07 21:22:03 +05:30
Gilles Leblanc
3a5a66d54e Take the prefix from createElementNS into account for HTML elements
Fixes #3139
2014-10-06 22:49:49 -04:00
Josh Matthews
7401cd0aeb Split a long line. 2014-10-01 15:40:37 -04:00
Josh Matthews
8112859d55 Disallow toggling radio buttons. Use generated content for checkboxes and radio buttons. Switching to the glyph 0 for the average advance width. 2014-10-01 15:37:40 -04:00
Josh Matthews
f70bb68503 Implement simple layout for text, button, radio, and checkbox inputs. Implement simple interaction for checkboxes and radio buttons. 2014-10-01 15:35:42 -04:00
Keegan McAllister
6429750b33 Eliminate servo_util::atom
We only needed this for Encodable, and now we use JSTraceable instead.
2014-09-29 18:39:36 -07:00
ProgramFOX
71a05a9c39 Made some DOM fields private.
Relevant to #2242.
2014-09-26 20:35:01 +02:00
Manish Goregaokar
cc44a3b064 Use JSTraceable everywhere 2014-09-24 05:44:49 +05:30
Cameron Zwarich
2c8d51a37c More progress in the &JSRef -> JSRef conversion
Change all of the <Class>Methods traits to take `self` instead of
`&self`.
2014-09-20 11:54:10 -07:00
Cameron Zwarich
4fa8725111 First steps of &JSRef -> JSRef conversion
Replace &JSRef with JSRef in the bulk of the generated code. This will
remove a level of indirection throughout all DOM code.

This patch doesn't change methods implemented on JSRef<T> to take `self`
rather than `&self`, and it leaves a few other uses of &JSRef, but those
changes can be made incrementally.
2014-09-19 13:39:17 -07:00
Manish Goregaokar
f5087e1490 Use #[must_root] for HTMLElements 2014-09-17 01:02:44 +05:30
Jack Moffitt
c6ab60dbfc Cargoify servo 2014-09-08 20:21:42 -06:00
Renamed from src/components/script/dom/htmlinputelement.rs (Browse further)