Move Attr helper methods to AttrHelpers trait to avoid to touch them from layout task.

This commit is contained in:
Tetsuharu OHZEKI 2014-09-10 14:07:55 +09:00
parent 842823e321
commit b73b06b9a8
9 changed files with 45 additions and 34 deletions

View file

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::attr::Attr;
use dom::attr::{Attr, AttrHelpers};
use dom::bindings::codegen::InheritTypes::{ElementCast, TextCast, CommentCast, NodeCast};
use dom::bindings::codegen::InheritTypes::{DocumentTypeCast, CharacterDataCast};
use dom::bindings::codegen::InheritTypes::ProcessingInstructionCast;
@ -153,7 +153,7 @@ fn serialize_attr(attr: &JSRef<Attr>, html: &mut String) {
html.push_str(attr.deref().name.as_slice());
};
html.push_str("=\"");
escape(attr.deref().value().as_slice(), true, html);
escape(attr.value().as_slice(), true, html);
html.push_char('"');
}