mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
auto merge of #890 : Ms2ger/servo/textcontent-getter-bug, r=jdm
I confused Doctype and DocumentFragment nodes when implementing.
This commit is contained in:
commit
150f03e677
1 changed files with 4 additions and 1 deletions
|
@ -524,7 +524,7 @@ impl Node<ScriptView> {
|
||||||
|
|
||||||
pub fn GetTextContent(&self) -> DOMString {
|
pub fn GetTextContent(&self) -> DOMString {
|
||||||
match self.type_id {
|
match self.type_id {
|
||||||
DoctypeNodeTypeId | ElementNodeTypeId(*) => {
|
ElementNodeTypeId(*) => {
|
||||||
let mut content = ~"";
|
let mut content = ~"";
|
||||||
for node in self.abstract.unwrap().traverse_preorder() {
|
for node in self.abstract.unwrap().traverse_preorder() {
|
||||||
if node.is_text() {
|
if node.is_text() {
|
||||||
|
@ -541,6 +541,9 @@ impl Node<ScriptView> {
|
||||||
characterdata.Data()
|
characterdata.Data()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
DoctypeNodeTypeId => {
|
||||||
|
null_string
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue