Home
last modified time | relevance | path

Searched refs:treeAdapter (Results 1 – 19 of 19) sorted by relevance

/third_party/parse5/packages/parse5/lib/parser/
Dparser-location-info.test.ts15 generateTestsForEachTreeAdapter('location-info-parser', (treeAdapter) => {
20 treeAdapter,
25 const firstP = treeAdapter.getChildNodes(fragment)[0];
26 const firstPLocation = treeAdapter.getNodeSourceCodeLocation(firstP);
36 treeAdapter,
41 const firstChild = treeAdapter.getChildNodes(fragment)[0];
42 const location = treeAdapter.getNodeSourceCodeLocation(firstChild);
52 treeAdapter,
57 const firstChild = treeAdapter.getChildNodes(fragment)[0];
59 assert.ok(treeAdapter.getNodeSourceCodeLocation(firstChild));
[all …]
Dopen-element-stack.test.ts16 generateTestsForEachTreeAdapter('open-element-stack', (treeAdapter) => {
18 return treeAdapter.createElement(tagName, namespaceURI, []);
22 const document = treeAdapter.createDocument();
25 const stack = new OpenElementStack(document, treeAdapter, stackHandler);
41 const stack = new OpenElementStack(treeAdapter.createDocument(), treeAdapter, stackHandler);
58 const stack = new OpenElementStack(treeAdapter.createDocument(), treeAdapter, stackHandler);
71 const stack = new OpenElementStack(treeAdapter.createDocument(), treeAdapter, stackHandler);
87 const stack = new OpenElementStack(treeAdapter.createDocument(), treeAdapter, stackHandler);
108 const stack = new OpenElementStack(treeAdapter.createDocument(), treeAdapter, stackHandler);
129 const stack = new OpenElementStack(treeAdapter.createDocument(), treeAdapter, stackHandler);
[all …]
Dformatting-element-list.test.ts19 generateTestsForEachTreeAdapter('FormattingElementList', (treeAdapter) => {
21 const list = new FormattingElementList(treeAdapter);
33 const list = new FormattingElementList(treeAdapter);
36 const element1 = treeAdapter.createElement($.DIV, NS.HTML, []);
37 const element2 = treeAdapter.createElement($.P, NS.HTML, []);
53 const list = new FormattingElementList(treeAdapter);
54 const element1 = treeAdapter.createElement($.DIV, NS.HTML, []);
55 const element2 = treeAdapter.createElement($.P, NS.HTML, []);
56 const element3 = treeAdapter.createElement($.SPAN, NS.HTML, []);
57 const element4 = treeAdapter.createElement($.TITLE, NS.HTML, []);
[all …]
Dformatting-element-list.ts31 constructor(private treeAdapter: TreeAdapter<T>) {} property in FormattingElementList
43 const neTagName = this.treeAdapter.getTagName(newElement);
44 const neNamespaceURI = this.treeAdapter.getNamespaceURI(newElement);
56 this.treeAdapter.getTagName(element) === neTagName &&
57 this.treeAdapter.getNamespaceURI(element) === neNamespaceURI
59 const elementAttrs = this.treeAdapter.getAttrList(element);
73 const neAttrs = this.treeAdapter.getAttrList(newElement);
148 …(entry) => entry.type === EntryType.Marker || this.treeAdapter.getTagName(entry.element) === tagNa…
Dindex.ts104 treeAdapter?: TreeAdapter<T>; property
117 treeAdapter: defaultTreeAdapter, constant
123 treeAdapter: TreeAdapter<T>; property in Parser
140 this.treeAdapter = this.options.treeAdapter;
148 this.document = document ?? this.treeAdapter.createDocument();
151 this.activeFormattingElements = new FormattingElementList(this.treeAdapter);
153 …this.fragmentContextID = fragmentContext ? getTagID(this.treeAdapter.getTagName(fragmentContext)) …
156 this.openElements = new OpenElementStack(this.document, this.treeAdapter, this);
179 fragmentContext ??= opts.treeAdapter.createElement(TN.TEMPLATE, NS.HTML, []);
184 const documentMock = opts.treeAdapter.createElement('documentmock', NS.HTML, []);
[all …]
Dopen-element-stack.ts60 … return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current;
63 …constructor(document: T['document'], private treeAdapter: TreeAdapter<T>, private handler: StackHa… property in OpenElementStack
74 …return this.currentTagId === $.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) === NS.H…
139 … } while (targetIdx > 0 && this.treeAdapter.getNamespaceURI(this.items[targetIdx]) !== NS.HTML);
186 …if (tagNames.includes(this.tagIDs[i]) && this.treeAdapter.getNamespaceURI(this.items[i]) === names…
250 const ns = this.treeAdapter.getNamespaceURI(this.items[i]);
267 const ns = this.treeAdapter.getNamespaceURI(this.items[i]);
284 const ns = this.treeAdapter.getNamespaceURI(this.items[i]);
301 const ns = this.treeAdapter.getNamespaceURI(this.items[i]);
318 const ns = this.treeAdapter.getNamespaceURI(this.items[i]);
[all …]
Dindex.test.ts43 const document = parse(html, { treeAdapter: treeAdapters.htmlparser2 });
64 treeAdapter: treeAdapters.htmlparser2,
93 treeAdapter: {
/third_party/parse5/test/utils/
Dserialize-to-dat-file-format.ts9 treeAdapter: TreeAdapter<T>
11 switch (treeAdapter.getNamespaceURI(element)) {
27 treeAdapter: TreeAdapter<T>
34 if (treeAdapter.isCommentNode(node)) {
35 str += `<!-- ${treeAdapter.getCommentNodeContent(node)} -->\n`;
36 } else if (treeAdapter.isTextNode(node)) {
37 str += `"${treeAdapter.getTextNodeContent(node)}"\n`;
38 } else if (treeAdapter.isDocumentTypeNode(node)) {
39 const publicId = treeAdapter.getDocumentTypeNodePublicId(node);
40 const systemId = treeAdapter.getDocumentTypeNodeSystemId(node);
[all …]
Dgenerate-location-info-parser-tests.ts16 treeAdapter: TreeAdapter<T>,
19 for (const node of treeAdapter.getChildNodes(parent)) {
20 if (treeAdapter.isElementNode(node)) {
21 walkTree(node, treeAdapter, handler);
120 generateTestsForEachTreeAdapter(name, (treeAdapter) => {
130 treeAdapter,
137 walkTree(document, treeAdapter, (node) => {
138 const location = treeAdapter.getNodeSourceCodeLocation(node);
142 const serializedNode = treeAdapter.isDocumentTypeNode(node)
144 treeAdapter.getDocumentTypeNodeName(node),
[all …]
Dgenerate-parsing-tests.ts17 treeAdapter: TreeAdapter<T>
34 for (const [idx, test] of parseDatFile(testSet, treeAdapter).entries()) {
65 treeAdapter: TreeAdapter<T>; property
80 treeAdapter: TreeAdapter<T>,
89 treeAdapter, constant
106 const actual = serializeToDatFileFormat(node, opts.treeAdapter);
144 generateTestsForEachTreeAdapter(name, (treeAdapter) => {
147 for (const test of loadTreeConstructionTestData(suitePath, treeAdapter)) {
152 createParsingTest<TreeAdapterTypeMap>(test, treeAdapter, parse, {
Dparse-dat-file.ts5 treeAdapter: TreeAdapter<T>
24 return treeAdapter.createElement(tagName, namespace, []);
37 export function parseDatFile<T extends TreeAdapterTypeMap>(testSet: string, treeAdapter: TreeAdapte…
66 fragmentContext: createFragmentContext<T>(fragmentContextTagName, treeAdapter),
Dgenerate-serializer-tests.ts22 generateTestsForEachTreeAdapter(name, (treeAdapter) => {
25 const opts = { ...test.options, treeAdapter }; constant
/third_party/parse5/packages/parse5/lib/serializer/
Dindex.ts30 options.treeAdapter.isElementNode(node) &&
31 options.treeAdapter.getNamespaceURI(node) === NS.HTML &&
32 VOID_ELEMENTS.has(options.treeAdapter.getTagName(node))
42 treeAdapter?: TreeAdapter<T>; property
54 const defaultOpts: InternalOptions<DefaultTreeAdapterMap> = { treeAdapter: defaultTreeAdapter, scri…
125 options.treeAdapter.isElementNode(parentNode) &&
126 options.treeAdapter.getTagName(parentNode) === $.TEMPLATE &&
127 options.treeAdapter.getNamespaceURI(parentNode) === NS.HTML
128 ? options.treeAdapter.getTemplateContent(parentNode)
130 const childNodes = options.treeAdapter.getChildNodes(container);
[all …]
Dindex.test.ts12 const treeAdapter: typeof treeAdapters.default = { constant
21 serialize(document, { treeAdapter });
/third_party/parse5/packages/parse5-parser-stream/test/
Dlocation-info.test.ts11 generateTestsForEachTreeAdapter('location-info', (treeAdapter) => {
16 treeAdapter,
21 const htmlEl = treeAdapter.getChildNodes(document)[0];
22 const headEl = treeAdapter.getChildNodes(htmlEl)[0];
23 const bodyEl = treeAdapter.getChildNodes(htmlEl)[1];
25 assert.strictEqual(treeAdapter.getNodeSourceCodeLocation(htmlEl), null);
26 assert.strictEqual(treeAdapter.getNodeSourceCodeLocation(headEl), null);
27 assert.strictEqual(treeAdapter.getNodeSourceCodeLocation(bodyEl), null);
Dscripting.test.ts26 const scriptTextNode = opts.treeAdapter.getChildNodes(scriptElement)[0];
27 … const script = scriptTextNode ? opts.treeAdapter.getTextNodeContent(scriptTextNode) : '';
57 generateTestsForEachTreeAdapter('ParserStream', (treeAdapter) => {
59 const parser = new ParserStream({ treeAdapter });
69 const parser = new ParserStream({ treeAdapter });
/third_party/parse5/packages/parse5-plain-text-conversion-stream/test/
Dplain-text-conversion-stream.test.ts6 generateTestsForEachTreeAdapter('plain-test-conversion-stream', (treeAdapter) => {
8 const converter = new PlainTextConversionStream({ treeAdapter });
15 const result = serialize(converter.document, { treeAdapter });
/third_party/vk-gl-cts/external/vulkan-docs/src/scripts/asciidoctor-chunker/
Dasciidoctor-chunker.js4treeAdapter:o.default,sourceCodeLocationInfo:t.sourceCodeLocationInfo},i=t.context;return n?s.pars… property
/third_party/parse5/packages/parse5-plain-text-conversion-stream/lib/
Dindex.ts37 this.parser.treeAdapter.insertText(this.parser.openElements.current, '\n');