mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Move Attr helper methods to AttrHelpers trait to avoid to touch them from layout task.
This commit is contained in:
parent
842823e321
commit
b73b06b9a8
9 changed files with 45 additions and 34 deletions
|
@ -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('"');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue