mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Remove null_str_as_empty and null_str_as_empty_ref functions.
With just one caller between the two functions, there doesn't seem to be much point in having the abstraction.
This commit is contained in:
parent
3ece6bc166
commit
5149f0e953
2 changed files with 2 additions and 18 deletions
|
@ -53,7 +53,7 @@ use parse::html::parse_html_fragment;
|
|||
use script_traits::UntrustedNodeAddress;
|
||||
use util::geometry::Au;
|
||||
use util::namespace;
|
||||
use util::str::{DOMString, null_str_as_empty};
|
||||
use util::str::DOMString;
|
||||
use selectors::parser::{Selector, AttrSelector, NamespaceConstraint};
|
||||
use selectors::parser::parse_author_origin_selector_list_from_str;
|
||||
use selectors::matching::matches;
|
||||
|
@ -2078,7 +2078,7 @@ impl<'a> NodeMethods for JSRef<'a, Node> {
|
|||
|
||||
// https://dom.spec.whatwg.org/#dom-node-textcontent
|
||||
fn SetTextContent(self, value: Option<DOMString>) {
|
||||
let value = null_str_as_empty(&value);
|
||||
let value = value.unwrap_or(String::new());
|
||||
match self.type_id {
|
||||
NodeTypeId::DocumentFragment |
|
||||
NodeTypeId::Element(..) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue