mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Handle doctype.textContent correctly.
I confused Doctype and DocumentFragment nodes when implementing.
This commit is contained in:
parent
2d3a4d7e1d
commit
fe46fb231a
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