mirror of
https://github.com/servo/servo.git
synced 2025-06-23 16:44:33 +01:00
Reindent some match expressions.
This commit is contained in:
parent
a5233f2bc4
commit
cfc9f4956a
1 changed files with 23 additions and 23 deletions
|
@ -532,18 +532,18 @@ impl Node<ScriptView> {
|
||||||
|
|
||||||
pub fn NodeName(&self, abstract_self: AbstractNode<ScriptView>) -> DOMString {
|
pub fn NodeName(&self, abstract_self: AbstractNode<ScriptView>) -> DOMString {
|
||||||
Some(match self.type_id {
|
Some(match self.type_id {
|
||||||
ElementNodeTypeId(*) => {
|
ElementNodeTypeId(*) => {
|
||||||
do abstract_self.with_imm_element |element| {
|
do abstract_self.with_imm_element |element| {
|
||||||
element.TagName().expect("tagName should never be null")
|
element.TagName().expect("tagName should never be null")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
CommentNodeTypeId => ~"#comment",
|
||||||
CommentNodeTypeId => ~"#comment",
|
TextNodeTypeId => ~"#text",
|
||||||
TextNodeTypeId => ~"#text",
|
DoctypeNodeTypeId => {
|
||||||
DoctypeNodeTypeId => {
|
do abstract_self.with_imm_doctype |doctype| {
|
||||||
do abstract_self.with_imm_doctype |doctype| {
|
doctype.name.clone()
|
||||||
doctype.name.clone()
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -553,11 +553,11 @@ impl Node<ScriptView> {
|
||||||
|
|
||||||
pub fn GetOwnerDocument(&self) -> Option<AbstractDocument> {
|
pub fn GetOwnerDocument(&self) -> Option<AbstractDocument> {
|
||||||
match self.type_id {
|
match self.type_id {
|
||||||
ElementNodeTypeId(*) |
|
ElementNodeTypeId(*) |
|
||||||
CommentNodeTypeId |
|
CommentNodeTypeId |
|
||||||
TextNodeTypeId |
|
TextNodeTypeId |
|
||||||
DoctypeNodeTypeId => Some(self.owner_doc),
|
DoctypeNodeTypeId => Some(self.owner_doc),
|
||||||
// DocumentNodeTypeId => None
|
// DocumentNodeTypeId => None
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -591,15 +591,15 @@ impl Node<ScriptView> {
|
||||||
|
|
||||||
pub fn GetNodeValue(&self, abstract_self: AbstractNode<ScriptView>) -> DOMString {
|
pub fn GetNodeValue(&self, abstract_self: AbstractNode<ScriptView>) -> DOMString {
|
||||||
match self.type_id {
|
match self.type_id {
|
||||||
// ProcessingInstruction
|
// ProcessingInstruction
|
||||||
CommentNodeTypeId | TextNodeTypeId => {
|
CommentNodeTypeId | TextNodeTypeId => {
|
||||||
do abstract_self.with_imm_characterdata() |characterdata| {
|
do abstract_self.with_imm_characterdata() |characterdata| {
|
||||||
characterdata.Data()
|
characterdata.Data()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => {
|
||||||
|
None
|
||||||
}
|
}
|
||||||
}
|
|
||||||
_ => {
|
|
||||||
None
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue