Updates WPT to expect newly passing tests

Addresses reviews

More review addressing
This commit is contained in:
Matthew Rasmus 2014-11-29 14:03:33 -08:00
parent 29241699fd
commit ed37b53a62
5 changed files with 13 additions and 64 deletions

View file

@ -274,8 +274,7 @@ impl<'a> FlowConstructor<'a> {
TableColumnFragment(TableColumnFragmentInfo::new(node)) TableColumnFragment(TableColumnFragmentInfo::new(node))
} }
Some(ElementNodeTypeId(HTMLTableDataCellElementTypeId)) | Some(ElementNodeTypeId(HTMLTableDataCellElementTypeId)) |
Some(ElementNodeTypeId(HTMLTableHeaderCellElementTypeId)) | Some(ElementNodeTypeId(HTMLTableHeaderCellElementTypeId)) => TableCellFragment,
Some(ElementNodeTypeId(HTMLTextAreaElementTypeId)) => TableCellFragment,
Some(ElementNodeTypeId(HTMLTableRowElementTypeId)) | Some(ElementNodeTypeId(HTMLTableRowElementTypeId)) |
Some(ElementNodeTypeId(HTMLTableSectionElementTypeId)) => TableRowFragment, Some(ElementNodeTypeId(HTMLTableSectionElementTypeId)) => TableRowFragment,
Some(TextNodeTypeId) => UnscannedTextFragment(UnscannedTextFragmentInfo::new(node)), Some(TextNodeTypeId) => UnscannedTextFragment(UnscannedTextFragmentInfo::new(node)),

View file

@ -5,7 +5,7 @@
#![comment = "The Servo Parallel Browser Project"] #![comment = "The Servo Parallel Browser Project"]
#![license = "MPL"] #![license = "MPL"]
#![feature(globs, macro_rules, phase, thread_local, unsafe_destructor)] #![feature(globs, macro_rules, phase, thread_local, unsafe_destructor, if_let)]
#![deny(unused_imports)] #![deny(unused_imports)]
#![deny(unused_variables)] #![deny(unused_variables)]

View file

@ -184,16 +184,14 @@ impl<'ln> TLayoutNode for LayoutNode<'ln> {
fn text(&self) -> String { fn text(&self) -> String {
unsafe { unsafe {
let text_opt: Option<JS<Text>> = TextCast::to_js(self.get_jsmanaged()); if let Some(text) = TextCast::to_js(self.get_jsmanaged()) {
match text_opt { (*text.unsafe_get()).characterdata().data_for_layout().to_string()
Some(text) => (*text.unsafe_get()).characterdata().data_for_layout().to_string(), } else if let Some(input) = HTMLInputElementCast::to_js(self.get_jsmanaged()) {
None => match HTMLInputElementCast::to_js(self.get_jsmanaged()) { input.get_value_for_layout()
Some(input) => input.get_value_for_layout(), } else if let Some(area) = HTMLTextAreaElementCast::to_js(self.get_jsmanaged()) {
None => match HTMLTextAreaElementCast::to_js(self.get_jsmanaged()) { area.get_value_for_layout()
Some(area) => area.get_value_for_layout(), } else {
None => panic!("not text!") panic!("not text!")
}
}
} }
} }
} }

View file

@ -139,11 +139,11 @@ impl<'a> HTMLTextAreaElementMethods for JSRef<'a, HTMLTextAreaElement> {
} }
} }
pub trait HTMLTextAreaElementHelpers { trait PrivateHTMLTextAreaElementHelpers {
fn force_relayout(self); fn force_relayout(self);
} }
impl<'a> HTMLTextAreaElementHelpers for JSRef<'a, HTMLTextAreaElement> { impl<'a> PrivateHTMLTextAreaElementHelpers for JSRef<'a, HTMLTextAreaElement> {
fn force_relayout(self) { fn force_relayout(self) {
let doc = document_from_node(self).root(); let doc = document_from_node(self).root();
let node: JSRef<Node> = NodeCast::from_ref(self); let node: JSRef<Node> = NodeCast::from_ref(self);
@ -223,7 +223,7 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLTextAreaElement> {
} }
if child.is_text() { if child.is_text() {
self.SetValue(child.GetTextContent().unwrap()); self.SetValue(self.DefaultValue());
} }
} }

View file

@ -5370,9 +5370,6 @@
[HTMLTextAreaElement interface: attribute autofocus] [HTMLTextAreaElement interface: attribute autofocus]
expected: FAIL expected: FAIL
[HTMLTextAreaElement interface: attribute cols]
expected: FAIL
[HTMLTextAreaElement interface: attribute dirName] [HTMLTextAreaElement interface: attribute dirName]
expected: FAIL expected: FAIL
@ -5388,30 +5385,9 @@
[HTMLTextAreaElement interface: attribute minLength] [HTMLTextAreaElement interface: attribute minLength]
expected: FAIL expected: FAIL
[HTMLTextAreaElement interface: attribute name]
expected: FAIL
[HTMLTextAreaElement interface: attribute placeholder]
expected: FAIL
[HTMLTextAreaElement interface: attribute readOnly] [HTMLTextAreaElement interface: attribute readOnly]
expected: FAIL expected: FAIL
[HTMLTextAreaElement interface: attribute required]
expected: FAIL
[HTMLTextAreaElement interface: attribute rows]
expected: FAIL
[HTMLTextAreaElement interface: attribute wrap]
expected: FAIL
[HTMLTextAreaElement interface: attribute defaultValue]
expected: FAIL
[HTMLTextAreaElement interface: attribute value]
expected: FAIL
[HTMLTextAreaElement interface: attribute textLength] [HTMLTextAreaElement interface: attribute textLength]
expected: FAIL expected: FAIL
@ -5463,9 +5439,6 @@
[HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "autofocus" with the proper type (1)] [HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "autofocus" with the proper type (1)]
expected: FAIL expected: FAIL
[HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "cols" with the proper type (2)]
expected: FAIL
[HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "dirName" with the proper type (3)] [HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "dirName" with the proper type (3)]
expected: FAIL expected: FAIL
@ -5481,30 +5454,9 @@
[HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "minLength" with the proper type (8)] [HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "minLength" with the proper type (8)]
expected: FAIL expected: FAIL
[HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "name" with the proper type (9)]
expected: FAIL
[HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "placeholder" with the proper type (10)]
expected: FAIL
[HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "readOnly" with the proper type (11)] [HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "readOnly" with the proper type (11)]
expected: FAIL expected: FAIL
[HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "required" with the proper type (12)]
expected: FAIL
[HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "rows" with the proper type (13)]
expected: FAIL
[HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "wrap" with the proper type (14)]
expected: FAIL
[HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "defaultValue" with the proper type (16)]
expected: FAIL
[HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "value" with the proper type (17)]
expected: FAIL
[HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "textLength" with the proper type (18)] [HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "textLength" with the proper type (18)]
expected: FAIL expected: FAIL