aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmltextareaelement.rs
diff options
context:
space:
mode:
authorSam Gibson <sam@ifdown.net>2015-08-23 16:11:04 +1200
committerSam Gibson <sam@ifdown.net>2015-12-03 14:00:51 +1100
commitd26c555e2a2fe0e10b9237e1ccf48d96665828c7 (patch)
tree58913878ca756d3cd2234c202814e66cb2933b4b /components/script/dom/htmltextareaelement.rs
parent2be60be062e14c937af601faed78a6aceccdb062 (diff)
downloadservo-d26c555e2a2fe0e10b9237e1ccf48d96665828c7.tar.gz
servo-d26c555e2a2fe0e10b9237e1ccf48d96665828c7.zip
Adds support for input element's maxlength attr
servo/servo#7320 servo/servo#7004
Diffstat (limited to 'components/script/dom/htmltextareaelement.rs')
-rw-r--r--components/script/dom/htmltextareaelement.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/components/script/dom/htmltextareaelement.rs b/components/script/dom/htmltextareaelement.rs
index d4e1729f662..94057d4eee0 100644
--- a/components/script/dom/htmltextareaelement.rs
+++ b/components/script/dom/htmltextareaelement.rs
@@ -30,6 +30,7 @@ use script_task::ScriptTaskEventCategory::InputEvent;
use script_task::{CommonScriptMsg, Runnable};
use selectors::states::*;
use std::cell::Cell;
+use std::i32;
use string_cache::Atom;
use textinput::{KeyReaction, Lines, TextInput};
use util::str::DOMString;
@@ -89,6 +90,7 @@ impl<'a> RawLayoutHTMLTextAreaElementHelpers for &'a HTMLTextAreaElement {
static DEFAULT_COLS: u32 = 20;
static DEFAULT_ROWS: u32 = 2;
+static DEFAULT_MAX_LENGTH: i32 = i32::MAX;
impl HTMLTextAreaElement {
fn new_inherited(localName: DOMString,
@@ -99,7 +101,7 @@ impl HTMLTextAreaElement {
htmlelement:
HTMLElement::new_inherited_with_state(IN_ENABLED_STATE,
localName, prefix, document),
- textinput: DOMRefCell::new(TextInput::new(Lines::Multiple, DOMString::new(), chan)),
+ textinput: DOMRefCell::new(TextInput::new(Lines::Multiple, DOMString::new(), chan, None)),
cols: Cell::new(DEFAULT_COLS),
rows: Cell::new(DEFAULT_ROWS),
value_changed: Cell::new(false),