mirror of
https://github.com/servo/servo.git
synced 2025-08-02 04:00:32 +01:00
Auto merge of #6044 - Ms2ger:cleanup, r=jdm
<!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6044) <!-- Reviewable:end -->
This commit is contained in:
commit
7bda431e61
14 changed files with 80 additions and 54 deletions
|
@ -9,7 +9,8 @@ use dom::bindings::codegen::Bindings::HTMLFormElementBinding::HTMLFormElementMet
|
|||
use dom::bindings::codegen::Bindings::HTMLInputElementBinding::HTMLInputElementMethods;
|
||||
use dom::bindings::codegen::Bindings::HTMLButtonElementBinding::HTMLButtonElementMethods;
|
||||
use dom::bindings::codegen::InheritTypes::{EventTargetCast, HTMLFormElementDerived, NodeCast};
|
||||
use dom::bindings::codegen::InheritTypes::{HTMLInputElementCast, HTMLTextAreaElementCast, HTMLFormElementCast};
|
||||
use dom::bindings::codegen::InheritTypes::{HTMLInputElementCast, HTMLTextAreaElementCast};
|
||||
use dom::bindings::codegen::InheritTypes::{HTMLFormElementCast, HTMLDataListElementCast};
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::{JSRef, OptionalRootable, Rootable, Temporary};
|
||||
use dom::document::{Document, DocumentHelpers};
|
||||
|
@ -260,7 +261,7 @@ impl<'a> HTMLFormElementHelpers for JSRef<'a, HTMLFormElement> {
|
|||
return None;
|
||||
}
|
||||
if child.r().ancestors()
|
||||
.any(|a| a.root().r().type_id() == NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLDataListElement))) {
|
||||
.any(|a| HTMLDataListElementCast::to_temporary(a).is_some()) {
|
||||
return None;
|
||||
}
|
||||
// XXXManishearth don't include it if it is a button but not the submitter
|
||||
|
|
|
@ -26,7 +26,9 @@ impl HTMLMediaElementDerived for EventTarget {
|
|||
}
|
||||
|
||||
impl HTMLMediaElement {
|
||||
pub fn new_inherited(type_id: HTMLMediaElementTypeId, tag_name: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLMediaElement {
|
||||
pub fn new_inherited(type_id: HTMLMediaElementTypeId, tag_name: DOMString,
|
||||
prefix: Option<DOMString>, document: JSRef<Document>)
|
||||
-> HTMLMediaElement {
|
||||
HTMLMediaElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLElementTypeId::HTMLMediaElement(type_id), tag_name, prefix, document)
|
||||
}
|
||||
|
|
|
@ -2234,13 +2234,18 @@ impl<'a> NodeMethods for JSRef<'a, Node> {
|
|||
|
||||
match node.type_id() {
|
||||
// Step 3.
|
||||
NodeTypeId::DocumentType if !is_equal_doctype(this, node) => return false,
|
||||
NodeTypeId::Element(..) if !is_equal_element(this, node) => return false,
|
||||
NodeTypeId::CharacterData(CharacterDataTypeId::ProcessingInstruction) if !is_equal_processinginstruction(this, node) => return false,
|
||||
NodeTypeId::DocumentType
|
||||
if !is_equal_doctype(this, node) => return false,
|
||||
NodeTypeId::Element(..)
|
||||
if !is_equal_element(this, node) => return false,
|
||||
NodeTypeId::CharacterData(CharacterDataTypeId::ProcessingInstruction)
|
||||
if !is_equal_processinginstruction(this, node) => return false,
|
||||
NodeTypeId::CharacterData(CharacterDataTypeId::Text) |
|
||||
NodeTypeId::CharacterData(CharacterDataTypeId::Comment) if !is_equal_characterdata(this, node) => return false,
|
||||
NodeTypeId::CharacterData(CharacterDataTypeId::Comment)
|
||||
if !is_equal_characterdata(this, node) => return false,
|
||||
// Step 4.
|
||||
NodeTypeId::Element(..) if !is_equal_element_attrs(this, node) => return false,
|
||||
NodeTypeId::Element(..)
|
||||
if !is_equal_element_attrs(this, node) => return false,
|
||||
_ => ()
|
||||
}
|
||||
|
||||
|
|
|
@ -156,7 +156,8 @@ impl<'a> WebSocketMethods for JSRef<'a, WebSocket> {
|
|||
fn Send(self, data: Option<DOMString>)-> Fallible<()>{
|
||||
/*TODO: This is not up to spec see http://html.spec.whatwg.org/multipage/comms.html search for "If argument is a string"
|
||||
TODO: Need to buffer data
|
||||
TODO: bufferedAmount attribute returns the size of the buffer in bytes - this is a required attribute defined in the websocket.webidle file
|
||||
TODO: bufferedAmount attribute returns the size of the buffer in bytes -
|
||||
this is a required attribute defined in the websocket.webidl file
|
||||
TODO: The send function needs to flag when full by using the following
|
||||
self.full.set(true). This needs to be done when the buffer is full
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue