/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * 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/. */
// Wrap things in a div or body for parsing, but it won't show up in // the fragment.
nsresult rv = NS_OK;
AutoTArray<nsString, 2> tagStack;
RefPtr<DocumentFragment> fragment; if (aIsXML) { // XHTML
tagStack.AppendElement(nsLiteralString(XHTML_DIV_TAG));
rv = nsContentUtils::ParseFragmentXML(aFragment, document, tagStack, true,
aFlags, getter_AddRefs(fragment));
} else {
fragment = new (document->NodeInfoManager())
DocumentFragment(document->NodeInfoManager());
rv = nsContentUtils::ParseFragmentHTML(aFragment, fragment, nsGkAtoms::body,
kNameSpaceID_XHTML, false, true,
aFlags);
}
if (scripts_enabled) {
loader->SetEnabled(true);
}
fragment.forget(aReturn); return rv;
}
¤ Dauer der Verarbeitung: 0.17 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.