mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 08:35:26 +00:00
b88fc62b54
--HG-- rename : content/xul/document/src/XULDocument.cpp => dom/xul/XULDocument.cpp rename : content/xul/document/src/XULDocument.h => dom/xul/XULDocument.h rename : content/xul/content/crashtests/107518-1.xml => dom/xul/crashtests/107518-1.xml rename : content/xul/content/crashtests/252448-1.xul => dom/xul/crashtests/252448-1.xul rename : content/xul/content/crashtests/253479-1.xul => dom/xul/crashtests/253479-1.xul rename : content/xul/content/crashtests/253479-2.xul => dom/xul/crashtests/253479-2.xul rename : content/xul/document/crashtests/326204-1.xul => dom/xul/crashtests/326204-1.xul rename : content/xul/content/crashtests/326644-1-inner.xul => dom/xul/crashtests/326644-1-inner.xul rename : content/xul/content/crashtests/326644-1.html => dom/xul/crashtests/326644-1.html rename : content/xul/content/crashtests/326644-2-inner.xul => dom/xul/crashtests/326644-2-inner.xul rename : content/xul/content/crashtests/326644-2.html => dom/xul/crashtests/326644-2.html rename : content/xul/content/crashtests/326864-1.xul => dom/xul/crashtests/326864-1.xul rename : content/xul/content/crashtests/326875-1.xul => dom/xul/crashtests/326875-1.xul rename : content/xul/content/crashtests/326881-1.xul => dom/xul/crashtests/326881-1.xul rename : content/xul/content/crashtests/329982-1.xhtml => dom/xul/crashtests/329982-1.xhtml rename : content/xul/content/crashtests/336096-1.xhtml => dom/xul/crashtests/336096-1.xhtml rename : content/xul/document/crashtests/344215-1.xul => dom/xul/crashtests/344215-1.xul rename : content/xul/content/crashtests/354611-1.html => dom/xul/crashtests/354611-1.html rename : content/xul/content/crashtests/360078-1.xhtml => dom/xul/crashtests/360078-1.xhtml rename : content/xul/content/crashtests/360078-1xbl.xml => dom/xul/crashtests/360078-1xbl.xml rename : content/xul/content/crashtests/363791-1.xul => dom/xul/crashtests/363791-1.xul rename : content/xul/content/crashtests/384740-1.xul => dom/xul/crashtests/384740-1.xul rename : content/xul/content/crashtests/384877-1-inner.xul => dom/xul/crashtests/384877-1-inner.xul rename : content/xul/content/crashtests/384877-1.html => dom/xul/crashtests/384877-1.html rename : content/xul/document/crashtests/386914-1-inner.xul => dom/xul/crashtests/386914-1-inner.xul rename : content/xul/document/crashtests/386914-1.html => dom/xul/crashtests/386914-1.html rename : content/xul/content/crashtests/386947-1.xul => dom/xul/crashtests/386947-1.xul rename : content/xul/content/crashtests/425821-1.xul => dom/xul/crashtests/425821-1.xul rename : content/xul/document/crashtests/428951-1.xul => dom/xul/crashtests/428951-1.xul rename : content/xul/content/crashtests/429085-1.xhtml => dom/xul/crashtests/429085-1.xhtml rename : content/xul/content/crashtests/431906-1-inner.xul => dom/xul/crashtests/431906-1-inner.xul rename : content/xul/content/crashtests/431906-1.html => dom/xul/crashtests/431906-1.html rename : content/xul/content/crashtests/451311-1.xul => dom/xul/crashtests/451311-1.xul rename : content/xul/content/crashtests/461917-1.xhtml => dom/xul/crashtests/461917-1.xhtml rename : content/xul/document/crashtests/468211-1.xul => dom/xul/crashtests/468211-1.xul rename : content/xul/document/crashtests/468211-2-binding.xml => dom/xul/crashtests/468211-2-binding.xml rename : content/xul/document/crashtests/468211-2.xul => dom/xul/crashtests/468211-2.xul rename : content/xul/document/crashtests/468211-3.xul => dom/xul/crashtests/468211-3.xul rename : content/xul/document/crashtests/495635-1.xul => dom/xul/crashtests/495635-1.xul rename : content/xul/content/crashtests/509719-1-overlay.xul => dom/xul/crashtests/509719-1-overlay.xul rename : content/xul/content/crashtests/509719-1.xul => dom/xul/crashtests/509719-1.xul rename : content/xul/content/crashtests/509719-2-overlay.xul => dom/xul/crashtests/509719-2-overlay.xul rename : content/xul/content/crashtests/509719-2.xul => dom/xul/crashtests/509719-2.xul rename : content/xul/document/crashtests/583230.xul => dom/xul/crashtests/583230.xul rename : content/xul/content/crashtests/crashtests.list => dom/xul/crashtests/crashtests.list rename : content/xul/document/crashtests/extA1.xul => dom/xul/crashtests/extA1.xul rename : content/xul/document/crashtests/extA2.xul => dom/xul/crashtests/extA2.xul rename : content/xul/document/crashtests/extB1.xul => dom/xul/crashtests/extB1.xul rename : content/xul/moz.build => dom/xul/moz.build rename : content/xul/document/src/nsForwardReference.h => dom/xul/nsForwardReference.h rename : content/xul/document/public/nsIController.idl => dom/xul/nsIController.idl rename : content/xul/document/public/nsIControllers.idl => dom/xul/nsIControllers.idl rename : content/xul/content/public/nsIXULContextMenuBuilder.idl => dom/xul/nsIXULContextMenuBuilder.idl rename : content/xul/document/public/nsIXULDocument.h => dom/xul/nsIXULDocument.h rename : content/xul/document/public/nsIXULOverlayProvider.idl => dom/xul/nsIXULOverlayProvider.idl rename : content/xul/document/src/nsXULCommandDispatcher.cpp => dom/xul/nsXULCommandDispatcher.cpp rename : content/xul/document/src/nsXULCommandDispatcher.h => dom/xul/nsXULCommandDispatcher.h rename : content/xul/document/src/nsXULContentSink.cpp => dom/xul/nsXULContentSink.cpp rename : content/xul/document/src/nsXULContentSink.h => dom/xul/nsXULContentSink.h rename : content/xul/content/src/nsXULContextMenuBuilder.cpp => dom/xul/nsXULContextMenuBuilder.cpp rename : content/xul/content/src/nsXULContextMenuBuilder.h => dom/xul/nsXULContextMenuBuilder.h rename : content/xul/document/src/nsXULControllers.cpp => dom/xul/nsXULControllers.cpp rename : content/xul/document/src/nsXULControllers.h => dom/xul/nsXULControllers.h rename : content/xul/content/src/nsXULElement.cpp => dom/xul/nsXULElement.cpp rename : content/xul/content/src/nsXULElement.h => dom/xul/nsXULElement.h rename : content/xul/content/src/nsXULPopupListener.cpp => dom/xul/nsXULPopupListener.cpp rename : content/xul/content/src/nsXULPopupListener.h => dom/xul/nsXULPopupListener.h rename : content/xul/document/src/nsXULPrototypeCache.cpp => dom/xul/nsXULPrototypeCache.cpp rename : content/xul/document/src/nsXULPrototypeCache.h => dom/xul/nsXULPrototypeCache.h rename : content/xul/document/src/nsXULPrototypeDocument.cpp => dom/xul/nsXULPrototypeDocument.cpp rename : content/xul/document/src/nsXULPrototypeDocument.h => dom/xul/nsXULPrototypeDocument.h rename : content/xul/templates/src/crashtests/257752-1-recursion.rdf => dom/xul/templates/crashtests/257752-1-recursion.rdf rename : content/xul/templates/src/crashtests/257752-1-recursion.xul => dom/xul/templates/crashtests/257752-1-recursion.xul rename : content/xul/templates/src/crashtests/329884-1.xul => dom/xul/templates/crashtests/329884-1.xul rename : content/xul/templates/src/crashtests/330012-1.rdf => dom/xul/templates/crashtests/330012-1.rdf rename : content/xul/templates/src/crashtests/330012-1.xul => dom/xul/templates/crashtests/330012-1.xul rename : content/xul/templates/src/crashtests/404346-1.xul => dom/xul/templates/crashtests/404346-1.xul rename : content/xul/templates/src/crashtests/415019-1.xul => dom/xul/templates/crashtests/415019-1.xul rename : content/xul/templates/src/crashtests/417840-1.xul => dom/xul/templates/crashtests/417840-1.xul rename : content/xul/templates/src/crashtests/424418-1.xul => dom/xul/templates/crashtests/424418-1.xul rename : content/xul/templates/src/crashtests/crashtests.list => dom/xul/templates/crashtests/crashtests.list rename : content/xul/templates/moz.build => dom/xul/templates/moz.build rename : content/xul/templates/src/nsContentSupportMap.cpp => dom/xul/templates/nsContentSupportMap.cpp rename : content/xul/templates/src/nsContentSupportMap.h => dom/xul/templates/nsContentSupportMap.h rename : content/xul/templates/src/nsContentTestNode.cpp => dom/xul/templates/nsContentTestNode.cpp rename : content/xul/templates/src/nsContentTestNode.h => dom/xul/templates/nsContentTestNode.h rename : content/xul/templates/public/nsIXULBuilderListener.idl => dom/xul/templates/nsIXULBuilderListener.idl rename : content/xul/templates/public/nsIXULSortService.idl => dom/xul/templates/nsIXULSortService.idl rename : content/xul/templates/public/nsIXULTemplateBuilder.idl => dom/xul/templates/nsIXULTemplateBuilder.idl rename : content/xul/templates/public/nsIXULTemplateQueryProcessor.idl => dom/xul/templates/nsIXULTemplateQueryProcessor.idl rename : content/xul/templates/public/nsIXULTemplateResult.idl => dom/xul/templates/nsIXULTemplateResult.idl rename : content/xul/templates/public/nsIXULTemplateRuleFilter.idl => dom/xul/templates/nsIXULTemplateRuleFilter.idl rename : content/xul/templates/src/nsInstantiationNode.cpp => dom/xul/templates/nsInstantiationNode.cpp rename : content/xul/templates/src/nsInstantiationNode.h => dom/xul/templates/nsInstantiationNode.h rename : content/xul/templates/src/nsRDFBinding.cpp => dom/xul/templates/nsRDFBinding.cpp rename : content/xul/templates/src/nsRDFBinding.h => dom/xul/templates/nsRDFBinding.h rename : content/xul/templates/src/nsRDFConInstanceTestNode.cpp => dom/xul/templates/nsRDFConInstanceTestNode.cpp rename : content/xul/templates/src/nsRDFConInstanceTestNode.h => dom/xul/templates/nsRDFConInstanceTestNode.h rename : content/xul/templates/src/nsRDFConMemberTestNode.cpp => dom/xul/templates/nsRDFConMemberTestNode.cpp rename : content/xul/templates/src/nsRDFConMemberTestNode.h => dom/xul/templates/nsRDFConMemberTestNode.h rename : content/xul/templates/src/nsRDFPropertyTestNode.cpp => dom/xul/templates/nsRDFPropertyTestNode.cpp rename : content/xul/templates/src/nsRDFPropertyTestNode.h => dom/xul/templates/nsRDFPropertyTestNode.h rename : content/xul/templates/src/nsRDFQuery.cpp => dom/xul/templates/nsRDFQuery.cpp rename : content/xul/templates/src/nsRDFQuery.h => dom/xul/templates/nsRDFQuery.h rename : content/xul/templates/src/nsRDFTestNode.h => dom/xul/templates/nsRDFTestNode.h rename : content/xul/templates/src/nsResourceSet.cpp => dom/xul/templates/nsResourceSet.cpp rename : content/xul/templates/src/nsResourceSet.h => dom/xul/templates/nsResourceSet.h rename : content/xul/templates/src/nsRuleNetwork.cpp => dom/xul/templates/nsRuleNetwork.cpp rename : content/xul/templates/src/nsRuleNetwork.h => dom/xul/templates/nsRuleNetwork.h rename : content/xul/templates/src/nsTemplateMap.h => dom/xul/templates/nsTemplateMap.h rename : content/xul/templates/src/nsTemplateMatch.cpp => dom/xul/templates/nsTemplateMatch.cpp rename : content/xul/templates/src/nsTemplateMatch.h => dom/xul/templates/nsTemplateMatch.h rename : content/xul/templates/src/nsTemplateRule.cpp => dom/xul/templates/nsTemplateRule.cpp rename : content/xul/templates/src/nsTemplateRule.h => dom/xul/templates/nsTemplateRule.h rename : content/xul/templates/src/nsTreeRows.cpp => dom/xul/templates/nsTreeRows.cpp rename : content/xul/templates/src/nsTreeRows.h => dom/xul/templates/nsTreeRows.h rename : content/xul/templates/src/nsXMLBinding.cpp => dom/xul/templates/nsXMLBinding.cpp rename : content/xul/templates/src/nsXMLBinding.h => dom/xul/templates/nsXMLBinding.h rename : content/xul/templates/src/nsXULContentBuilder.cpp => dom/xul/templates/nsXULContentBuilder.cpp rename : content/xul/templates/src/nsXULContentUtils.cpp => dom/xul/templates/nsXULContentUtils.cpp rename : content/xul/templates/src/nsXULContentUtils.h => dom/xul/templates/nsXULContentUtils.h rename : content/xul/templates/src/nsXULResourceList.h => dom/xul/templates/nsXULResourceList.h rename : content/xul/templates/src/nsXULSortService.cpp => dom/xul/templates/nsXULSortService.cpp rename : content/xul/templates/src/nsXULSortService.h => dom/xul/templates/nsXULSortService.h rename : content/xul/templates/src/nsXULTemplateBuilder.cpp => dom/xul/templates/nsXULTemplateBuilder.cpp rename : content/xul/templates/src/nsXULTemplateBuilder.h => dom/xul/templates/nsXULTemplateBuilder.h rename : content/xul/templates/src/nsXULTemplateQueryProcessorRDF.cpp => dom/xul/templates/nsXULTemplateQueryProcessorRDF.cpp rename : content/xul/templates/src/nsXULTemplateQueryProcessorRDF.h => dom/xul/templates/nsXULTemplateQueryProcessorRDF.h rename : content/xul/templates/src/nsXULTemplateQueryProcessorStorage.cpp => dom/xul/templates/nsXULTemplateQueryProcessorStorage.cpp rename : content/xul/templates/src/nsXULTemplateQueryProcessorStorage.h => dom/xul/templates/nsXULTemplateQueryProcessorStorage.h rename : content/xul/templates/src/nsXULTemplateQueryProcessorXML.cpp => dom/xul/templates/nsXULTemplateQueryProcessorXML.cpp rename : content/xul/templates/src/nsXULTemplateQueryProcessorXML.h => dom/xul/templates/nsXULTemplateQueryProcessorXML.h rename : content/xul/templates/src/nsXULTemplateResultRDF.cpp => dom/xul/templates/nsXULTemplateResultRDF.cpp rename : content/xul/templates/src/nsXULTemplateResultRDF.h => dom/xul/templates/nsXULTemplateResultRDF.h rename : content/xul/templates/src/nsXULTemplateResultSetRDF.cpp => dom/xul/templates/nsXULTemplateResultSetRDF.cpp rename : content/xul/templates/src/nsXULTemplateResultSetRDF.h => dom/xul/templates/nsXULTemplateResultSetRDF.h rename : content/xul/templates/src/nsXULTemplateResultStorage.cpp => dom/xul/templates/nsXULTemplateResultStorage.cpp rename : content/xul/templates/src/nsXULTemplateResultStorage.h => dom/xul/templates/nsXULTemplateResultStorage.h rename : content/xul/templates/src/nsXULTemplateResultXML.cpp => dom/xul/templates/nsXULTemplateResultXML.cpp rename : content/xul/templates/src/nsXULTemplateResultXML.h => dom/xul/templates/nsXULTemplateResultXML.h rename : content/xul/templates/src/nsXULTreeBuilder.cpp => dom/xul/templates/nsXULTreeBuilder.cpp rename : content/xul/templates/tests/chrome/animals.rdf => dom/xul/templates/tests/chrome/animals.rdf rename : content/xul/templates/tests/chrome/animals.sqlite => dom/xul/templates/tests/chrome/animals.sqlite rename : content/xul/templates/tests/chrome/animals.xml => dom/xul/templates/tests/chrome/animals.xml rename : content/xul/templates/tests/chrome/bug441785-1.rdf => dom/xul/templates/tests/chrome/bug441785-1.rdf rename : content/xul/templates/tests/chrome/bug441785-2.rdf => dom/xul/templates/tests/chrome/bug441785-2.rdf rename : content/xul/templates/tests/chrome/chrome.ini => dom/xul/templates/tests/chrome/chrome.ini rename : content/xul/templates/tests/chrome/file_bug330010.rdf => dom/xul/templates/tests/chrome/file_bug330010.rdf rename : content/xul/templates/tests/chrome/templates_shared.js => dom/xul/templates/tests/chrome/templates_shared.js rename : content/xul/templates/tests/chrome/test_bug329335.xul => dom/xul/templates/tests/chrome/test_bug329335.xul rename : content/xul/templates/tests/chrome/test_bug330010.xul => dom/xul/templates/tests/chrome/test_bug330010.xul rename : content/xul/templates/tests/chrome/test_bug397148.xul => dom/xul/templates/tests/chrome/test_bug397148.xul rename : content/xul/templates/tests/chrome/test_bug441785.xul => dom/xul/templates/tests/chrome/test_bug441785.xul rename : content/xul/templates/tests/chrome/test_bug476634.xul => dom/xul/templates/tests/chrome/test_bug476634.xul rename : content/xul/templates/tests/chrome/test_sortservice.xul => dom/xul/templates/tests/chrome/test_sortservice.xul rename : content/xul/templates/tests/chrome/test_tmpl_bindingsextendedsyntax.xul => dom/xul/templates/tests/chrome/test_tmpl_bindingsextendedsyntax.xul rename : content/xul/templates/tests/chrome/test_tmpl_bindingsmultiple.xul => dom/xul/templates/tests/chrome/test_tmpl_bindingsmultiple.xul rename : content/xul/templates/tests/chrome/test_tmpl_bindingsquerysyntax.xul => dom/xul/templates/tests/chrome/test_tmpl_bindingsquerysyntax.xul rename : content/xul/templates/tests/chrome/test_tmpl_bindingsreversed.xul => dom/xul/templates/tests/chrome/test_tmpl_bindingsreversed.xul rename : content/xul/templates/tests/chrome/test_tmpl_bindingssameastriple.xul => dom/xul/templates/tests/chrome/test_tmpl_bindingssameastriple.xul rename : content/xul/templates/tests/chrome/test_tmpl_containerandmembervariablechanged.xul => dom/xul/templates/tests/chrome/test_tmpl_containerandmembervariablechanged.xul rename : content/xul/templates/tests/chrome/test_tmpl_containervariablechanged.xul => dom/xul/templates/tests/chrome/test_tmpl_containervariablechanged.xul rename : content/xul/templates/tests/chrome/test_tmpl_containmentattribute.xul => dom/xul/templates/tests/chrome/test_tmpl_containmentattribute.xul rename : content/xul/templates/tests/chrome/test_tmpl_defaultcontainervariableisuri.xul => dom/xul/templates/tests/chrome/test_tmpl_defaultcontainervariableisuri.xul rename : content/xul/templates/tests/chrome/test_tmpl_errors.xul => dom/xul/templates/tests/chrome/test_tmpl_errors.xul rename : content/xul/templates/tests/chrome/test_tmpl_extendedsyntax.xul => dom/xul/templates/tests/chrome/test_tmpl_extendedsyntax.xul rename : content/xul/templates/tests/chrome/test_tmpl_extendedsyntaxemptyconditions.xul => dom/xul/templates/tests/chrome/test_tmpl_extendedsyntaxemptyconditions.xul rename : content/xul/templates/tests/chrome/test_tmpl_extendedsyntaxotherrefvariable.xul => dom/xul/templates/tests/chrome/test_tmpl_extendedsyntaxotherrefvariable.xul rename : content/xul/templates/tests/chrome/test_tmpl_extendedsyntaxremoveunmatched.xul => dom/xul/templates/tests/chrome/test_tmpl_extendedsyntaxremoveunmatched.xul rename : content/xul/templates/tests/chrome/test_tmpl_extendedsyntaxsimplevariablesubstitution.xul => dom/xul/templates/tests/chrome/test_tmpl_extendedsyntaxsimplevariablesubstitution.xul rename : content/xul/templates/tests/chrome/test_tmpl_extendedsyntaxtworulesrecurse.xul => dom/xul/templates/tests/chrome/test_tmpl_extendedsyntaxtworulesrecurse.xul rename : content/xul/templates/tests/chrome/test_tmpl_extendedsyntaxusinganinterveningcontainer.xul => dom/xul/templates/tests/chrome/test_tmpl_extendedsyntaxusinganinterveningcontainer.xul rename : content/xul/templates/tests/chrome/test_tmpl_extendedvariablesubstitution.xul => dom/xul/templates/tests/chrome/test_tmpl_extendedvariablesubstitution.xul rename : content/xul/templates/tests/chrome/test_tmpl_gridelement.xul => dom/xul/templates/tests/chrome/test_tmpl_gridelement.xul rename : content/xul/templates/tests/chrome/test_tmpl_htmlelementextendedsyntaxwithbinding.xul => dom/xul/templates/tests/chrome/test_tmpl_htmlelementextendedsyntaxwithbinding.xul rename : content/xul/templates/tests/chrome/test_tmpl_htmlelementquerysyntaxrecursive.xul => dom/xul/templates/tests/chrome/test_tmpl_htmlelementquerysyntaxrecursive.xul rename : content/xul/templates/tests/chrome/test_tmpl_htmlelementquerysyntaxwithmultiplerules.xul => dom/xul/templates/tests/chrome/test_tmpl_htmlelementquerysyntaxwithmultiplerules.xul rename : content/xul/templates/tests/chrome/test_tmpl_htmlelementsimplesyntax.xul => dom/xul/templates/tests/chrome/test_tmpl_htmlelementsimplesyntax.xul rename : content/xul/templates/tests/chrome/test_tmpl_htmlelementsimplesyntaxusingatextnode.xul => dom/xul/templates/tests/chrome/test_tmpl_htmlelementsimplesyntaxusingatextnode.xul rename : content/xul/templates/tests/chrome/test_tmpl_invalidqp.xul => dom/xul/templates/tests/chrome/test_tmpl_invalidqp.xul rename : content/xul/templates/tests/chrome/test_tmpl_listboxelement.xul => dom/xul/templates/tests/chrome/test_tmpl_listboxelement.xul rename : content/xul/templates/tests/chrome/test_tmpl_literalasmember.xul => dom/xul/templates/tests/chrome/test_tmpl_literalasmember.xul rename : content/xul/templates/tests/chrome/test_tmpl_membervariablechanged.xul => dom/xul/templates/tests/chrome/test_tmpl_membervariablechanged.xul rename : content/xul/templates/tests/chrome/test_tmpl_membervariablesubstitution.xul => dom/xul/templates/tests/chrome/test_tmpl_membervariablesubstitution.xul rename : content/xul/templates/tests/chrome/test_tmpl_menuelement.xul => dom/xul/templates/tests/chrome/test_tmpl_menuelement.xul rename : content/xul/templates/tests/chrome/test_tmpl_menuelementrecursive.xul => dom/xul/templates/tests/chrome/test_tmpl_menuelementrecursive.xul rename : content/xul/templates/tests/chrome/test_tmpl_menulistelement.xul => dom/xul/templates/tests/chrome/test_tmpl_menulistelement.xul rename : content/xul/templates/tests/chrome/test_tmpl_mixedsyntaxiscontainer.xul => dom/xul/templates/tests/chrome/test_tmpl_mixedsyntaxiscontainer.xul rename : content/xul/templates/tests/chrome/test_tmpl_mixedsyntaxiscontainerisempty.xul => dom/xul/templates/tests/chrome/test_tmpl_mixedsyntaxiscontainerisempty.xul rename : content/xul/templates/tests/chrome/test_tmpl_mixedsyntaxisempty.xul => dom/xul/templates/tests/chrome/test_tmpl_mixedsyntaxisempty.xul rename : content/xul/templates/tests/chrome/test_tmpl_noaction.xul => dom/xul/templates/tests/chrome/test_tmpl_noaction.xul rename : content/xul/templates/tests/chrome/test_tmpl_noactionuriattribute.xul => dom/xul/templates/tests/chrome/test_tmpl_noactionuriattribute.xul rename : content/xul/templates/tests/chrome/test_tmpl_parentconditions.xul => dom/xul/templates/tests/chrome/test_tmpl_parentconditions.xul rename : content/xul/templates/tests/chrome/test_tmpl_parentcontenttag.xul => dom/xul/templates/tests/chrome/test_tmpl_parentcontenttag.xul rename : content/xul/templates/tests/chrome/test_tmpl_parentsimplesyntax.xul => dom/xul/templates/tests/chrome/test_tmpl_parentsimplesyntax.xul rename : content/xul/templates/tests/chrome/test_tmpl_query3triples.xul => dom/xul/templates/tests/chrome/test_tmpl_query3triples.xul rename : content/xul/templates/tests/chrome/test_tmpl_query3tripleswherecontains.xul => dom/xul/templates/tests/chrome/test_tmpl_query3tripleswherecontains.xul rename : content/xul/templates/tests/chrome/test_tmpl_querymember3tripleswhereequals.xul => dom/xul/templates/tests/chrome/test_tmpl_querymember3tripleswhereequals.xul rename : content/xul/templates/tests/chrome/test_tmpl_querymemberandtwotriples.xul => dom/xul/templates/tests/chrome/test_tmpl_querymemberandtwotriples.xul rename : content/xul/templates/tests/chrome/test_tmpl_querymembertriplemembertriple.xul => dom/xul/templates/tests/chrome/test_tmpl_querymembertriplemembertriple.xul rename : content/xul/templates/tests/chrome/test_tmpl_queryresourcematch.xul => dom/xul/templates/tests/chrome/test_tmpl_queryresourcematch.xul rename : content/xul/templates/tests/chrome/test_tmpl_queryreversetriple.xul => dom/xul/templates/tests/chrome/test_tmpl_queryreversetriple.xul rename : content/xul/templates/tests/chrome/test_tmpl_queryselfwithtriple.xul => dom/xul/templates/tests/chrome/test_tmpl_queryselfwithtriple.xul rename : content/xul/templates/tests/chrome/test_tmpl_querysetone.xul => dom/xul/templates/tests/chrome/test_tmpl_querysetone.xul rename : content/xul/templates/tests/chrome/test_tmpl_querysettwo.xul => dom/xul/templates/tests/chrome/test_tmpl_querysettwo.xul rename : content/xul/templates/tests/chrome/test_tmpl_querysettwowithcondition.xul => dom/xul/templates/tests/chrome/test_tmpl_querysettwowithcondition.xul rename : content/xul/templates/tests/chrome/test_tmpl_querysyntax.xul => dom/xul/templates/tests/chrome/test_tmpl_querysyntax.xul rename : content/xul/templates/tests/chrome/test_tmpl_querysyntaxmultiplerules.xul => dom/xul/templates/tests/chrome/test_tmpl_querysyntaxmultiplerules.xul rename : content/xul/templates/tests/chrome/test_tmpl_querysyntaxmultiplerulesfirstconditionall.xul => dom/xul/templates/tests/chrome/test_tmpl_querysyntaxmultiplerulesfirstconditionall.xul rename : content/xul/templates/tests/chrome/test_tmpl_querysyntaxmultiplerulestwoconditions.xul => dom/xul/templates/tests/chrome/test_tmpl_querysyntaxmultiplerulestwoconditions.xul rename : content/xul/templates/tests/chrome/test_tmpl_querytripleandmembermerge.xul => dom/xul/templates/tests/chrome/test_tmpl_querytripleandmembermerge.xul rename : content/xul/templates/tests/chrome/test_tmpl_querytripleobjecttosubject.xul => dom/xul/templates/tests/chrome/test_tmpl_querytripleobjecttosubject.xul rename : content/xul/templates/tests/chrome/test_tmpl_querytwomembers.xul => dom/xul/templates/tests/chrome/test_tmpl_querytwomembers.xul rename : content/xul/templates/tests/chrome/test_tmpl_querytwomembersfiltered.xul => dom/xul/templates/tests/chrome/test_tmpl_querytwomembersfiltered.xul rename : content/xul/templates/tests/chrome/test_tmpl_querytwotriples.xul => dom/xul/templates/tests/chrome/test_tmpl_querytwotriples.xul rename : content/xul/templates/tests/chrome/test_tmpl_queryupwardsmember.xul => dom/xul/templates/tests/chrome/test_tmpl_queryupwardsmember.xul rename : content/xul/templates/tests/chrome/test_tmpl_queryupwardsmembertripleandfilteringtriple.xul => dom/xul/templates/tests/chrome/test_tmpl_queryupwardsmembertripleandfilteringtriple.xul rename : content/xul/templates/tests/chrome/test_tmpl_querywithemptyconditions.xul => dom/xul/templates/tests/chrome/test_tmpl_querywithemptyconditions.xul rename : content/xul/templates/tests/chrome/test_tmpl_referenceasmember.xul => dom/xul/templates/tests/chrome/test_tmpl_referenceasmember.xul rename : content/xul/templates/tests/chrome/test_tmpl_regenerate.xul => dom/xul/templates/tests/chrome/test_tmpl_regenerate.xul rename : content/xul/templates/tests/chrome/test_tmpl_selfgenerationextendedsyntax.xul => dom/xul/templates/tests/chrome/test_tmpl_selfgenerationextendedsyntax.xul rename : content/xul/templates/tests/chrome/test_tmpl_selfgenerationsimplesyntax.xul => dom/xul/templates/tests/chrome/test_tmpl_selfgenerationsimplesyntax.xul rename : content/xul/templates/tests/chrome/test_tmpl_simplesyntaxenclosedinacontainer.xul => dom/xul/templates/tests/chrome/test_tmpl_simplesyntaxenclosedinacontainer.xul rename : content/xul/templates/tests/chrome/test_tmpl_simplesyntaxenclosedinacontainerwitharule.xul => dom/xul/templates/tests/chrome/test_tmpl_simplesyntaxenclosedinacontainerwitharule.xul rename : content/xul/templates/tests/chrome/test_tmpl_simplesyntaxfilter.xul => dom/xul/templates/tests/chrome/test_tmpl_simplesyntaxfilter.xul rename : content/xul/templates/tests/chrome/test_tmpl_simplesyntaxfilterwithmultiplerules.xul => dom/xul/templates/tests/chrome/test_tmpl_simplesyntaxfilterwithmultiplerules.xul rename : content/xul/templates/tests/chrome/test_tmpl_simplesyntaxfilterwithrule.xul => dom/xul/templates/tests/chrome/test_tmpl_simplesyntaxfilterwithrule.xul rename : content/xul/templates/tests/chrome/test_tmpl_simplesyntaxiteratingoverasinglevalue.xul => dom/xul/templates/tests/chrome/test_tmpl_simplesyntaxiteratingoverasinglevalue.xul rename : content/xul/templates/tests/chrome/test_tmpl_simplesyntaxusinganinterveningcontainer.xul => dom/xul/templates/tests/chrome/test_tmpl_simplesyntaxusinganinterveningcontainer.xul rename : content/xul/templates/tests/chrome/test_tmpl_simplesyntaxusingatextnode.xul => dom/xul/templates/tests/chrome/test_tmpl_simplesyntaxusingatextnode.xul rename : content/xul/templates/tests/chrome/test_tmpl_simplesyntaxusingcontainerasthegenerationelement.xul => dom/xul/templates/tests/chrome/test_tmpl_simplesyntaxusingcontainerasthegenerationelement.xul rename : content/xul/templates/tests/chrome/test_tmpl_simplesyntaxusingdontrecurse.xul => dom/xul/templates/tests/chrome/test_tmpl_simplesyntaxusingdontrecurse.xul rename : content/xul/templates/tests/chrome/test_tmpl_simplesyntaxusingrecursivegeneration.xul => dom/xul/templates/tests/chrome/test_tmpl_simplesyntaxusingrecursivegeneration.xul rename : content/xul/templates/tests/chrome/test_tmpl_simplesyntaxusingrecursivegenerationagain.xul => dom/xul/templates/tests/chrome/test_tmpl_simplesyntaxusingrecursivegenerationagain.xul rename : content/xul/templates/tests/chrome/test_tmpl_simplesyntaxwithtwovariablesused.xul => dom/xul/templates/tests/chrome/test_tmpl_simplesyntaxwithtwovariablesused.xul rename : content/xul/templates/tests/chrome/test_tmpl_simplevariablesubstitutioncaretsatbeginningandend.xul => dom/xul/templates/tests/chrome/test_tmpl_simplevariablesubstitutioncaretsatbeginningandend.xul rename : content/xul/templates/tests/chrome/test_tmpl_simplevariablesubstitutioncaretsubstitution.xul => dom/xul/templates/tests/chrome/test_tmpl_simplevariablesubstitutioncaretsubstitution.xul rename : content/xul/templates/tests/chrome/test_tmpl_simplevariablesubstitutionnovariable.xul => dom/xul/templates/tests/chrome/test_tmpl_simplevariablesubstitutionnovariable.xul rename : content/xul/templates/tests/chrome/test_tmpl_simplevariablesubstitutionquestionmarkaspartofvariable.xul => dom/xul/templates/tests/chrome/test_tmpl_simplevariablesubstitutionquestionmarkaspartofvariable.xul rename : content/xul/templates/tests/chrome/test_tmpl_simplevariablesubstitutionquestionmarksubstitution.xul => dom/xul/templates/tests/chrome/test_tmpl_simplevariablesubstitutionquestionmarksubstitution.xul rename : content/xul/templates/tests/chrome/test_tmpl_simplevariablesubstitutiontextandvariable.xul => dom/xul/templates/tests/chrome/test_tmpl_simplevariablesubstitutiontextandvariable.xul rename : content/xul/templates/tests/chrome/test_tmpl_simplevariablesubstitutionvariableandtextconcatenated.xul => dom/xul/templates/tests/chrome/test_tmpl_simplevariablesubstitutionvariableandtextconcatenated.xul rename : content/xul/templates/tests/chrome/test_tmpl_simplevariablesubstitutionvariablesconcatenated.xul => dom/xul/templates/tests/chrome/test_tmpl_simplevariablesubstitutionvariablesconcatenated.xul rename : content/xul/templates/tests/chrome/test_tmpl_sortascendinginteger.xul => dom/xul/templates/tests/chrome/test_tmpl_sortascendinginteger.xul rename : content/xul/templates/tests/chrome/test_tmpl_sortascendingquerysyntax.xul => dom/xul/templates/tests/chrome/test_tmpl_sortascendingquerysyntax.xul rename : content/xul/templates/tests/chrome/test_tmpl_sortascendingtworulesquerysyntax.xul => dom/xul/templates/tests/chrome/test_tmpl_sortascendingtworulesquerysyntax.xul rename : content/xul/templates/tests/chrome/test_tmpl_sortascendingtworuleswithcontainerquerysyntax.xul => dom/xul/templates/tests/chrome/test_tmpl_sortascendingtworuleswithcontainerquerysyntax.xul rename : content/xul/templates/tests/chrome/test_tmpl_sortascendingtworuleswithdifferentcontainerquerysyntax.xul => dom/xul/templates/tests/chrome/test_tmpl_sortascendingtworuleswithdifferentcontainerquerysyntax.xul rename : content/xul/templates/tests/chrome/test_tmpl_sortdescendingquerysyntax.xul => dom/xul/templates/tests/chrome/test_tmpl_sortdescendingquerysyntax.xul rename : content/xul/templates/tests/chrome/test_tmpl_sortquerymemberandtwotriples.xul => dom/xul/templates/tests/chrome/test_tmpl_sortquerymemberandtwotriples.xul rename : content/xul/templates/tests/chrome/test_tmpl_sortresource2descendingsimplesyntax.xul => dom/xul/templates/tests/chrome/test_tmpl_sortresource2descendingsimplesyntax.xul rename : content/xul/templates/tests/chrome/test_tmpl_sortresource2settopredicateascendingquerysyntax.xul => dom/xul/templates/tests/chrome/test_tmpl_sortresource2settopredicateascendingquerysyntax.xul rename : content/xul/templates/tests/chrome/test_tmpl_sortresource2settopredicatedescendingquerysyntax.xul => dom/xul/templates/tests/chrome/test_tmpl_sortresource2settopredicatedescendingquerysyntax.xul rename : content/xul/templates/tests/chrome/test_tmpl_sortresourceascendingquerysyntax.xul => dom/xul/templates/tests/chrome/test_tmpl_sortresourceascendingquerysyntax.xul rename : content/xul/templates/tests/chrome/test_tmpl_sortresourcedescendingquerysyntax.xul => dom/xul/templates/tests/chrome/test_tmpl_sortresourcedescendingquerysyntax.xul rename : content/xul/templates/tests/chrome/test_tmpl_sortresourcesettopredicateascendingquerysyntax.xul => dom/xul/templates/tests/chrome/test_tmpl_sortresourcesettopredicateascendingquerysyntax.xul rename : content/xul/templates/tests/chrome/test_tmpl_sortresourcesettopredicatedescendingquerysyntax.xul => dom/xul/templates/tests/chrome/test_tmpl_sortresourcesettopredicatedescendingquerysyntax.xul rename : content/xul/templates/tests/chrome/test_tmpl_sorttworesourcesasstringsettopredicatedescendingquerysyntax.xul => dom/xul/templates/tests/chrome/test_tmpl_sorttworesourcesasstringsettopredicatedescendingquerysyntax.xul rename : content/xul/templates/tests/chrome/test_tmpl_sorttworesourcessettopredicateascendingquerysyntax.xul => dom/xul/templates/tests/chrome/test_tmpl_sorttworesourcessettopredicateascendingquerysyntax.xul rename : content/xul/templates/tests/chrome/test_tmpl_sorttwovariablesascendingquerysyntax.xul => dom/xul/templates/tests/chrome/test_tmpl_sorttwovariablesascendingquerysyntax.xul rename : content/xul/templates/tests/chrome/test_tmpl_sorttwovariablesascendingsimplesyntax.xul => dom/xul/templates/tests/chrome/test_tmpl_sorttwovariablesascendingsimplesyntax.xul rename : content/xul/templates/tests/chrome/test_tmpl_sorttwovariablesdescendingquerysyntax.xul => dom/xul/templates/tests/chrome/test_tmpl_sorttwovariablesdescendingquerysyntax.xul rename : content/xul/templates/tests/chrome/test_tmpl_sortunknownascendingquerysyntax.xul => dom/xul/templates/tests/chrome/test_tmpl_sortunknownascendingquerysyntax.xul rename : content/xul/templates/tests/chrome/test_tmpl_storage_bad_parameters.xul => dom/xul/templates/tests/chrome/test_tmpl_storage_bad_parameters.xul rename : content/xul/templates/tests/chrome/test_tmpl_storage_bad_parameters_2.xul => dom/xul/templates/tests/chrome/test_tmpl_storage_bad_parameters_2.xul rename : content/xul/templates/tests/chrome/test_tmpl_storage_bad_parameters_3.xul => dom/xul/templates/tests/chrome/test_tmpl_storage_bad_parameters_3.xul rename : content/xul/templates/tests/chrome/test_tmpl_storage_baddatasource.xul => dom/xul/templates/tests/chrome/test_tmpl_storage_baddatasource.xul rename : content/xul/templates/tests/chrome/test_tmpl_storage_badquery.xul => dom/xul/templates/tests/chrome/test_tmpl_storage_badquery.xul rename : content/xul/templates/tests/chrome/test_tmpl_storage_dynamicparameters.xul => dom/xul/templates/tests/chrome/test_tmpl_storage_dynamicparameters.xul rename : content/xul/templates/tests/chrome/test_tmpl_storage_listbox.xul => dom/xul/templates/tests/chrome/test_tmpl_storage_listbox.xul rename : content/xul/templates/tests/chrome/test_tmpl_storage_multiqueries.xul => dom/xul/templates/tests/chrome/test_tmpl_storage_multiqueries.xul rename : content/xul/templates/tests/chrome/test_tmpl_storage_parameters.xul => dom/xul/templates/tests/chrome/test_tmpl_storage_parameters.xul rename : content/xul/templates/tests/chrome/test_tmpl_storage_rule.xul => dom/xul/templates/tests/chrome/test_tmpl_storage_rule.xul rename : content/xul/templates/tests/chrome/test_tmpl_storage_simple.xul => dom/xul/templates/tests/chrome/test_tmpl_storage_simple.xul rename : content/xul/templates/tests/chrome/test_tmpl_storage_sortintegerasc.xul => dom/xul/templates/tests/chrome/test_tmpl_storage_sortintegerasc.xul rename : content/xul/templates/tests/chrome/test_tmpl_storage_sortintegerdesc.xul => dom/xul/templates/tests/chrome/test_tmpl_storage_sortintegerdesc.xul rename : content/xul/templates/tests/chrome/test_tmpl_storage_sortstringasc.xul => dom/xul/templates/tests/chrome/test_tmpl_storage_sortstringasc.xul rename : content/xul/templates/tests/chrome/test_tmpl_storage_sortstringdesc.xul => dom/xul/templates/tests/chrome/test_tmpl_storage_sortstringdesc.xul rename : content/xul/templates/tests/chrome/test_tmpl_storage_tree.xul => dom/xul/templates/tests/chrome/test_tmpl_storage_tree.xul rename : content/xul/templates/tests/chrome/test_tmpl_treeelementquerysyntax.xul => dom/xul/templates/tests/chrome/test_tmpl_treeelementquerysyntax.xul rename : content/xul/templates/tests/chrome/test_tmpl_treeelementquerysyntaxnotrecursive.xul => dom/xul/templates/tests/chrome/test_tmpl_treeelementquerysyntaxnotrecursive.xul rename : content/xul/templates/tests/chrome/test_tmpl_treeelementquerysyntaxnotrecursivetreebuilder.xul => dom/xul/templates/tests/chrome/test_tmpl_treeelementquerysyntaxnotrecursivetreebuilder.xul rename : content/xul/templates/tests/chrome/test_tmpl_treeelementquerysyntaxrecursive.xul => dom/xul/templates/tests/chrome/test_tmpl_treeelementquerysyntaxrecursive.xul rename : content/xul/templates/tests/chrome/test_tmpl_treeelementquerysyntaxrecursivemultiplerules.xul => dom/xul/templates/tests/chrome/test_tmpl_treeelementquerysyntaxrecursivemultiplerules.xul rename : content/xul/templates/tests/chrome/test_tmpl_treeelementquerysyntaxrecursivemultiplerulestreebuilder.xul => dom/xul/templates/tests/chrome/test_tmpl_treeelementquerysyntaxrecursivemultiplerulestreebuilder.xul rename : content/xul/templates/tests/chrome/test_tmpl_treeelementquerysyntaxrecursivetreebuilder.xul => dom/xul/templates/tests/chrome/test_tmpl_treeelementquerysyntaxrecursivetreebuilder.xul rename : content/xul/templates/tests/chrome/test_tmpl_treeelementquerysyntaxtreebuilder.xul => dom/xul/templates/tests/chrome/test_tmpl_treeelementquerysyntaxtreebuilder.xul rename : content/xul/templates/tests/chrome/test_tmpl_treeelementsimplesyntaxnotrecursive.xul => dom/xul/templates/tests/chrome/test_tmpl_treeelementsimplesyntaxnotrecursive.xul rename : content/xul/templates/tests/chrome/test_tmpl_treeelementsimplesyntaxnotrecursivetreebuilder.xul => dom/xul/templates/tests/chrome/test_tmpl_treeelementsimplesyntaxnotrecursivetreebuilder.xul rename : content/xul/templates/tests/chrome/test_tmpl_treeelementsimplesyntaxrecursive.xul => dom/xul/templates/tests/chrome/test_tmpl_treeelementsimplesyntaxrecursive.xul rename : content/xul/templates/tests/chrome/test_tmpl_treeelementsimplesyntaxrecursivetreebuilder.xul => dom/xul/templates/tests/chrome/test_tmpl_treeelementsimplesyntaxrecursivetreebuilder.xul rename : content/xul/templates/tests/chrome/test_tmpl_treeelementtreecell.xul => dom/xul/templates/tests/chrome/test_tmpl_treeelementtreecell.xul rename : content/xul/templates/tests/chrome/test_tmpl_treeelementtreecellsortascending.xul => dom/xul/templates/tests/chrome/test_tmpl_treeelementtreecellsortascending.xul rename : content/xul/templates/tests/chrome/test_tmpl_treeelementtreecellsortascendingtreebuilder.xul => dom/xul/templates/tests/chrome/test_tmpl_treeelementtreecellsortascendingtreebuilder.xul rename : content/xul/templates/tests/chrome/test_tmpl_treeelementtreecelltreebuilder.xul => dom/xul/templates/tests/chrome/test_tmpl_treeelementtreecelltreebuilder.xul rename : content/xul/templates/tests/chrome/test_tmpl_treeelementtreeitemonly.xul => dom/xul/templates/tests/chrome/test_tmpl_treeelementtreeitemonly.xul rename : content/xul/templates/tests/chrome/test_tmpl_treeelementtreeitemsortascending.xul => dom/xul/templates/tests/chrome/test_tmpl_treeelementtreeitemsortascending.xul rename : content/xul/templates/tests/chrome/test_tmpl_twogenerationnodes.xul => dom/xul/templates/tests/chrome/test_tmpl_twogenerationnodes.xul rename : content/xul/templates/tests/chrome/test_tmpl_whereafterignorecase.xul => dom/xul/templates/tests/chrome/test_tmpl_whereafterignorecase.xul rename : content/xul/templates/tests/chrome/test_tmpl_whereafterlowercase.xul => dom/xul/templates/tests/chrome/test_tmpl_whereafterlowercase.xul rename : content/xul/templates/tests/chrome/test_tmpl_whereafternegation.xul => dom/xul/templates/tests/chrome/test_tmpl_whereafternegation.xul rename : content/xul/templates/tests/chrome/test_tmpl_whereafteruppercase.xul => dom/xul/templates/tests/chrome/test_tmpl_whereafteruppercase.xul rename : content/xul/templates/tests/chrome/test_tmpl_wherebeforeignorecase.xul => dom/xul/templates/tests/chrome/test_tmpl_wherebeforeignorecase.xul rename : content/xul/templates/tests/chrome/test_tmpl_wherebeforelowercase.xul => dom/xul/templates/tests/chrome/test_tmpl_wherebeforelowercase.xul rename : content/xul/templates/tests/chrome/test_tmpl_wherebeforenegation.xul => dom/xul/templates/tests/chrome/test_tmpl_wherebeforenegation.xul rename : content/xul/templates/tests/chrome/test_tmpl_wherebeforeuppercase.xul => dom/xul/templates/tests/chrome/test_tmpl_wherebeforeuppercase.xul rename : content/xul/templates/tests/chrome/test_tmpl_wherecontains.xul => dom/xul/templates/tests/chrome/test_tmpl_wherecontains.xul rename : content/xul/templates/tests/chrome/test_tmpl_wherecontainsignorecase.xul => dom/xul/templates/tests/chrome/test_tmpl_wherecontainsignorecase.xul rename : content/xul/templates/tests/chrome/test_tmpl_wherecontainsnegation.xul => dom/xul/templates/tests/chrome/test_tmpl_wherecontainsnegation.xul rename : content/xul/templates/tests/chrome/test_tmpl_wherecontainsnumber.xul => dom/xul/templates/tests/chrome/test_tmpl_wherecontainsnumber.xul rename : content/xul/templates/tests/chrome/test_tmpl_wherecontainsnumberstring.xul => dom/xul/templates/tests/chrome/test_tmpl_wherecontainsnumberstring.xul rename : content/xul/templates/tests/chrome/test_tmpl_wherecontainsresource.xul => dom/xul/templates/tests/chrome/test_tmpl_wherecontainsresource.xul rename : content/xul/templates/tests/chrome/test_tmpl_wherecontainstwo.xul => dom/xul/templates/tests/chrome/test_tmpl_wherecontainstwo.xul rename : content/xul/templates/tests/chrome/test_tmpl_whereendswith.xul => dom/xul/templates/tests/chrome/test_tmpl_whereendswith.xul rename : content/xul/templates/tests/chrome/test_tmpl_whereendswithignorecase.xul => dom/xul/templates/tests/chrome/test_tmpl_whereendswithignorecase.xul rename : content/xul/templates/tests/chrome/test_tmpl_whereendswithnegation.xul => dom/xul/templates/tests/chrome/test_tmpl_whereendswithnegation.xul rename : content/xul/templates/tests/chrome/test_tmpl_whereequals.xul => dom/xul/templates/tests/chrome/test_tmpl_whereequals.xul rename : content/xul/templates/tests/chrome/test_tmpl_whereequalsignorecase.xul => dom/xul/templates/tests/chrome/test_tmpl_whereequalsignorecase.xul rename : content/xul/templates/tests/chrome/test_tmpl_whereequalsmultiple.xul => dom/xul/templates/tests/chrome/test_tmpl_whereequalsmultiple.xul rename : content/xul/templates/tests/chrome/test_tmpl_whereequalsmultiplenegation.xul => dom/xul/templates/tests/chrome/test_tmpl_whereequalsmultiplenegation.xul rename : content/xul/templates/tests/chrome/test_tmpl_whereequalsmultiplenegationignorecase.xul => dom/xul/templates/tests/chrome/test_tmpl_whereequalsmultiplenegationignorecase.xul rename : content/xul/templates/tests/chrome/test_tmpl_whereequalsnegation.xul => dom/xul/templates/tests/chrome/test_tmpl_whereequalsnegation.xul rename : content/xul/templates/tests/chrome/test_tmpl_whereequalsnegationignorecase.xul => dom/xul/templates/tests/chrome/test_tmpl_whereequalsnegationignorecase.xul rename : content/xul/templates/tests/chrome/test_tmpl_whereequalsnegationwrongcase.xul => dom/xul/templates/tests/chrome/test_tmpl_whereequalsnegationwrongcase.xul rename : content/xul/templates/tests/chrome/test_tmpl_whereequalsnumber.xul => dom/xul/templates/tests/chrome/test_tmpl_whereequalsnumber.xul rename : content/xul/templates/tests/chrome/test_tmpl_whereequalsothervariable.xul => dom/xul/templates/tests/chrome/test_tmpl_whereequalsothervariable.xul rename : content/xul/templates/tests/chrome/test_tmpl_whereequalsresource.xul => dom/xul/templates/tests/chrome/test_tmpl_whereequalsresource.xul rename : content/xul/templates/tests/chrome/test_tmpl_whereequalssamevariable.xul => dom/xul/templates/tests/chrome/test_tmpl_whereequalssamevariable.xul rename : content/xul/templates/tests/chrome/test_tmpl_whereequalswrongcase.xul => dom/xul/templates/tests/chrome/test_tmpl_whereequalswrongcase.xul rename : content/xul/templates/tests/chrome/test_tmpl_wheregreater.xul => dom/xul/templates/tests/chrome/test_tmpl_wheregreater.xul rename : content/xul/templates/tests/chrome/test_tmpl_wheregreaternegation.xul => dom/xul/templates/tests/chrome/test_tmpl_wheregreaternegation.xul rename : content/xul/templates/tests/chrome/test_tmpl_wheregreaternegationstring.xul => dom/xul/templates/tests/chrome/test_tmpl_wheregreaternegationstring.xul rename : content/xul/templates/tests/chrome/test_tmpl_wheregreaterstring.xul => dom/xul/templates/tests/chrome/test_tmpl_wheregreaterstring.xul rename : content/xul/templates/tests/chrome/test_tmpl_whereless.xul => dom/xul/templates/tests/chrome/test_tmpl_whereless.xul rename : content/xul/templates/tests/chrome/test_tmpl_wherelessnegation.xul => dom/xul/templates/tests/chrome/test_tmpl_wherelessnegation.xul rename : content/xul/templates/tests/chrome/test_tmpl_wherelessnegationstring.xul => dom/xul/templates/tests/chrome/test_tmpl_wherelessnegationstring.xul rename : content/xul/templates/tests/chrome/test_tmpl_wherelessstring.xul => dom/xul/templates/tests/chrome/test_tmpl_wherelessstring.xul rename : content/xul/templates/tests/chrome/test_tmpl_wherenorel.xul => dom/xul/templates/tests/chrome/test_tmpl_wherenorel.xul rename : content/xul/templates/tests/chrome/test_tmpl_wherenosubject.xul => dom/xul/templates/tests/chrome/test_tmpl_wherenosubject.xul rename : content/xul/templates/tests/chrome/test_tmpl_wherenovalue.xul => dom/xul/templates/tests/chrome/test_tmpl_wherenovalue.xul rename : content/xul/templates/tests/chrome/test_tmpl_wherestartswith.xul => dom/xul/templates/tests/chrome/test_tmpl_wherestartswith.xul rename : content/xul/templates/tests/chrome/test_tmpl_wherestartswithignorecase.xul => dom/xul/templates/tests/chrome/test_tmpl_wherestartswithignorecase.xul rename : content/xul/templates/tests/chrome/test_tmpl_wherestartswithmultiple.xul => dom/xul/templates/tests/chrome/test_tmpl_wherestartswithmultiple.xul rename : content/xul/templates/tests/chrome/test_tmpl_wherestartswithnegation.xul => dom/xul/templates/tests/chrome/test_tmpl_wherestartswithnegation.xul rename : content/xul/templates/tests/chrome/test_tmpl_wherestartswithunknownvariable.xul => dom/xul/templates/tests/chrome/test_tmpl_wherestartswithunknownvariable.xul rename : content/xul/templates/tests/chrome/test_tmpl_wherestartswithvariable.xul => dom/xul/templates/tests/chrome/test_tmpl_wherestartswithvariable.xul rename : content/xul/templates/tests/chrome/test_tmpl_wheresubjectequalsvariable.xul => dom/xul/templates/tests/chrome/test_tmpl_wheresubjectequalsvariable.xul rename : content/xul/templates/tests/chrome/test_tmpl_wheresubjectstartswithvariable.xul => dom/xul/templates/tests/chrome/test_tmpl_wheresubjectstartswithvariable.xul rename : content/xul/templates/tests/chrome/test_tmpl_xmlquerysimple.xul => dom/xul/templates/tests/chrome/test_tmpl_xmlquerysimple.xul rename : content/xul/templates/tests/chrome/test_tmpl_xmlquerywithassign.xul => dom/xul/templates/tests/chrome/test_tmpl_xmlquerywithassign.xul rename : content/xul/templates/tests/chrome/test_tmpl_xmlquerywithassignmentandcondition.xul => dom/xul/templates/tests/chrome/test_tmpl_xmlquerywithassignmentandcondition.xul rename : content/xul/templates/tests/chrome/test_tmpl_xmlquerywithassignmentandconditiondontrecurse.xul => dom/xul/templates/tests/chrome/test_tmpl_xmlquerywithassignmentandconditiondontrecurse.xul rename : content/xul/templates/tests/chrome/test_tmpl_xmlquerywithbindinginbindings.xul => dom/xul/templates/tests/chrome/test_tmpl_xmlquerywithbindinginbindings.xul rename : content/xul/templates/tests/chrome/test_tmpl_xmlquerywithbindinginrule.xul => dom/xul/templates/tests/chrome/test_tmpl_xmlquerywithbindinginrule.xul rename : content/xul/templates/tests/chrome/test_tmpl_xmlquerywithdifferentmember.xul => dom/xul/templates/tests/chrome/test_tmpl_xmlquerywithdifferentmember.xul rename : content/xul/templates/tests/chrome/test_tmpl_xmlquerywithinlinedata.xul => dom/xul/templates/tests/chrome/test_tmpl_xmlquerywithinlinedata.xul rename : content/xul/templates/tests/chrome/test_tmpl_xmlquerywithinlinedatawithmultiplequeries.xul => dom/xul/templates/tests/chrome/test_tmpl_xmlquerywithinlinedatawithmultiplequeries.xul rename : content/xul/templates/tests/chrome/test_tmpl_xmlquerywithmultiplequeries.xul => dom/xul/templates/tests/chrome/test_tmpl_xmlquerywithmultiplequeries.xul rename : content/xul/templates/tests/chrome/test_tmpl_xmlquerywithothertypes.xul => dom/xul/templates/tests/chrome/test_tmpl_xmlquerywithothertypes.xul rename : content/xul/templates/tests/chrome/test_tmpl_xmlquerywithsort.xul => dom/xul/templates/tests/chrome/test_tmpl_xmlquerywithsort.xul rename : content/xul/templates/tests/chrome/test_tmpl_xmlquerywithsortotherfield.xul => dom/xul/templates/tests/chrome/test_tmpl_xmlquerywithsortotherfield.xul rename : content/xul/content/test/398289-resource.xul => dom/xul/test/398289-resource.xul rename : content/xul/document/test/bug497875-iframe.xul => dom/xul/test/bug497875-iframe.xul rename : content/xul/content/test/chrome.ini => dom/xul/test/chrome.ini rename : content/xul/content/test/file_bug236853.rdf => dom/xul/test/file_bug236853.rdf rename : content/xul/content/test/mochitest.ini => dom/xul/test/mochitest.ini rename : content/xul/document/test/overlay1_bug335375.xul => dom/xul/test/overlay1_bug335375.xul rename : content/xul/document/test/overlay2_bug335375.xul => dom/xul/test/overlay2_bug335375.xul rename : content/xul/document/test/overlay_640158.xul => dom/xul/test/overlay_640158.xul rename : content/xul/document/test/test_bug199692.xul => dom/xul/test/test_bug199692.xul rename : content/xul/content/test/test_bug233643.xul => dom/xul/test/test_bug233643.xul rename : content/xul/content/test/test_bug236853.xul => dom/xul/test/test_bug236853.xul rename : content/xul/document/test/test_bug311681.xul => dom/xul/test/test_bug311681.xul rename : content/xul/document/test/test_bug335375.xul => dom/xul/test/test_bug335375.xul rename : content/xul/document/test/test_bug391002.xul => dom/xul/test/test_bug391002.xul rename : content/xul/content/test/test_bug398289.html => dom/xul/test/test_bug398289.html rename : content/xul/document/test/test_bug403868.xul => dom/xul/test/test_bug403868.xul rename : content/xul/document/test/test_bug414907.xul => dom/xul/test/test_bug414907.xul rename : content/xul/document/test/test_bug418216.xul => dom/xul/test/test_bug418216.xul rename : content/xul/document/test/test_bug445177.xul => dom/xul/test/test_bug445177.xul rename : content/xul/document/test/test_bug449457.xul => dom/xul/test/test_bug449457.xul rename : content/xul/document/test/test_bug468176.xul => dom/xul/test/test_bug468176.xul rename : content/xul/content/test/test_bug486990.xul => dom/xul/test/test_bug486990.xul rename : content/xul/document/test/test_bug497875.xul => dom/xul/test/test_bug497875.xul rename : content/xul/document/test/test_bug583948.xul => dom/xul/test/test_bug583948.xul rename : content/xul/document/test/test_bug640158_overlay_persist.xul => dom/xul/test/test_bug640158_overlay_persist.xul rename : content/xul/content/test/test_bug749367.xul => dom/xul/test/test_bug749367.xul rename : content/xul/document/test/test_bug757137.xul => dom/xul/test/test_bug757137.xul rename : content/xul/content/test/test_bug775972.xul => dom/xul/test/test_bug775972.xul rename : content/xul/content/test/test_import_xul_to_content.xul => dom/xul/test/test_import_xul_to_content.xul rename : content/xul/document/test/window_bug583948.xul => dom/xul/test/window_bug583948.xul rename : content/xul/document/test/window_bug757137.xul => dom/xul/test/window_bug757137.xul
1091 lines
31 KiB
C++
1091 lines
31 KiB
C++
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
/* vim: set ts=8 sts=4 et sw=4 tw=80: */
|
|
/* 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/. */
|
|
|
|
/*
|
|
* An implementation for a Gecko-style content sink that knows how
|
|
* to build a content model (the "prototype" document) from XUL.
|
|
*
|
|
* For more information on XUL,
|
|
* see http://developer.mozilla.org/en/docs/XUL
|
|
*/
|
|
|
|
#include "nsXULContentSink.h"
|
|
|
|
#include "jsfriendapi.h"
|
|
|
|
#include "nsCOMPtr.h"
|
|
#include "nsForwardReference.h"
|
|
#include "nsHTMLStyleSheet.h"
|
|
#include "nsIContentSink.h"
|
|
#include "nsIDocument.h"
|
|
#include "nsIDOMEventListener.h"
|
|
#include "nsIDOMHTMLFormElement.h"
|
|
#include "nsIDOMXULDocument.h"
|
|
#include "nsIFormControl.h"
|
|
#include "mozilla/dom/NodeInfo.h"
|
|
#include "nsIScriptContext.h"
|
|
#include "nsIScriptGlobalObject.h"
|
|
#include "nsIServiceManager.h"
|
|
#include "nsIURL.h"
|
|
#include "nsNameSpaceManager.h"
|
|
#include "nsParserBase.h"
|
|
#include "nsViewManager.h"
|
|
#include "nsIXULDocument.h"
|
|
#include "nsIScriptSecurityManager.h"
|
|
#include "nsLayoutCID.h"
|
|
#include "nsNetUtil.h"
|
|
#include "nsRDFCID.h"
|
|
#include "nsXPIDLString.h"
|
|
#include "nsReadableUtils.h"
|
|
#include "nsXULElement.h"
|
|
#include "prlog.h"
|
|
#include "prmem.h"
|
|
#include "nsCRT.h"
|
|
|
|
#include "nsXULPrototypeDocument.h" // XXXbe temporary
|
|
#include "mozilla/css/Loader.h"
|
|
|
|
#include "nsUnicharUtils.h"
|
|
#include "nsGkAtoms.h"
|
|
#include "nsContentUtils.h"
|
|
#include "nsAttrName.h"
|
|
#include "nsXMLContentSink.h"
|
|
#include "nsIConsoleService.h"
|
|
#include "nsIScriptError.h"
|
|
#include "nsContentTypeParser.h"
|
|
|
|
#ifdef PR_LOGGING
|
|
static PRLogModuleInfo* gContentSinkLog;
|
|
#endif
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
XULContentSinkImpl::ContextStack::ContextStack()
|
|
: mTop(nullptr), mDepth(0)
|
|
{
|
|
}
|
|
|
|
XULContentSinkImpl::ContextStack::~ContextStack()
|
|
{
|
|
while (mTop) {
|
|
Entry* doomed = mTop;
|
|
mTop = mTop->mNext;
|
|
delete doomed;
|
|
}
|
|
}
|
|
|
|
nsresult
|
|
XULContentSinkImpl::ContextStack::Push(nsXULPrototypeNode* aNode, State aState)
|
|
{
|
|
Entry* entry = new Entry;
|
|
if (! entry)
|
|
return NS_ERROR_OUT_OF_MEMORY;
|
|
|
|
entry->mNode = aNode;
|
|
entry->mState = aState;
|
|
entry->mNext = mTop;
|
|
mTop = entry;
|
|
|
|
++mDepth;
|
|
return NS_OK;
|
|
}
|
|
|
|
nsresult
|
|
XULContentSinkImpl::ContextStack::Pop(State* aState)
|
|
{
|
|
if (mDepth == 0)
|
|
return NS_ERROR_UNEXPECTED;
|
|
|
|
Entry* entry = mTop;
|
|
mTop = mTop->mNext;
|
|
--mDepth;
|
|
|
|
*aState = entry->mState;
|
|
delete entry;
|
|
|
|
return NS_OK;
|
|
}
|
|
|
|
|
|
nsresult
|
|
XULContentSinkImpl::ContextStack::GetTopNode(nsRefPtr<nsXULPrototypeNode>& aNode)
|
|
{
|
|
if (mDepth == 0)
|
|
return NS_ERROR_UNEXPECTED;
|
|
|
|
aNode = mTop->mNode;
|
|
return NS_OK;
|
|
}
|
|
|
|
|
|
nsresult
|
|
XULContentSinkImpl::ContextStack::GetTopChildren(nsPrototypeArray** aChildren)
|
|
{
|
|
if (mDepth == 0)
|
|
return NS_ERROR_UNEXPECTED;
|
|
|
|
*aChildren = &(mTop->mChildren);
|
|
return NS_OK;
|
|
}
|
|
|
|
void
|
|
XULContentSinkImpl::ContextStack::Clear()
|
|
{
|
|
Entry *cur = mTop;
|
|
while (cur) {
|
|
// Release the root element (and its descendants).
|
|
Entry *next = cur->mNext;
|
|
delete cur;
|
|
cur = next;
|
|
}
|
|
|
|
mTop = nullptr;
|
|
mDepth = 0;
|
|
}
|
|
|
|
void
|
|
XULContentSinkImpl::ContextStack::Traverse(nsCycleCollectionTraversalCallback& aCb)
|
|
{
|
|
nsCycleCollectionTraversalCallback& cb = aCb;
|
|
for (ContextStack::Entry* tmp = mTop; tmp; tmp = tmp->mNext) {
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mNode)
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mChildren)
|
|
}
|
|
}
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
|
|
XULContentSinkImpl::XULContentSinkImpl()
|
|
: mText(nullptr),
|
|
mTextLength(0),
|
|
mTextSize(0),
|
|
mConstrainSize(true),
|
|
mState(eInProlog),
|
|
mParser(nullptr)
|
|
{
|
|
|
|
#ifdef PR_LOGGING
|
|
if (! gContentSinkLog)
|
|
gContentSinkLog = PR_NewLogModule("nsXULContentSink");
|
|
#endif
|
|
}
|
|
|
|
|
|
XULContentSinkImpl::~XULContentSinkImpl()
|
|
{
|
|
NS_IF_RELEASE(mParser); // XXX should've been released by now, unless error.
|
|
|
|
// The context stack _should_ be empty, unless something has gone wrong.
|
|
NS_ASSERTION(mContextStack.Depth() == 0, "Context stack not empty?");
|
|
mContextStack.Clear();
|
|
|
|
moz_free(mText);
|
|
}
|
|
|
|
//----------------------------------------------------------------------
|
|
// nsISupports interface
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_CLASS(XULContentSinkImpl)
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(XULContentSinkImpl)
|
|
NS_IMPL_CYCLE_COLLECTION_UNLINK(mNodeInfoManager)
|
|
tmp->mContextStack.Clear();
|
|
NS_IMPL_CYCLE_COLLECTION_UNLINK(mPrototype)
|
|
NS_IF_RELEASE(tmp->mParser);
|
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(XULContentSinkImpl)
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mNodeInfoManager)
|
|
tmp->mContextStack.Traverse(cb);
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPrototype)
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_RAWPTR(mParser)
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
|
|
|
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(XULContentSinkImpl)
|
|
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIXMLContentSink)
|
|
NS_INTERFACE_MAP_ENTRY(nsIXMLContentSink)
|
|
NS_INTERFACE_MAP_ENTRY(nsIExpatSink)
|
|
NS_INTERFACE_MAP_ENTRY(nsIContentSink)
|
|
NS_INTERFACE_MAP_END
|
|
|
|
NS_IMPL_CYCLE_COLLECTING_ADDREF(XULContentSinkImpl)
|
|
NS_IMPL_CYCLE_COLLECTING_RELEASE(XULContentSinkImpl)
|
|
|
|
//----------------------------------------------------------------------
|
|
// nsIContentSink interface
|
|
|
|
NS_IMETHODIMP
|
|
XULContentSinkImpl::WillBuildModel(nsDTDMode aDTDMode)
|
|
{
|
|
#if FIXME
|
|
if (! mParentContentSink) {
|
|
// If we're _not_ an overlay, then notify the document that
|
|
// the load is beginning.
|
|
mDocument->BeginLoad();
|
|
}
|
|
#endif
|
|
|
|
return NS_OK;
|
|
}
|
|
|
|
NS_IMETHODIMP
|
|
XULContentSinkImpl::DidBuildModel(bool aTerminated)
|
|
{
|
|
nsCOMPtr<nsIDocument> doc = do_QueryReferent(mDocument);
|
|
if (doc) {
|
|
doc->EndLoad();
|
|
mDocument = nullptr;
|
|
}
|
|
|
|
// Drop our reference to the parser to get rid of a circular
|
|
// reference.
|
|
NS_IF_RELEASE(mParser);
|
|
return NS_OK;
|
|
}
|
|
|
|
NS_IMETHODIMP
|
|
XULContentSinkImpl::WillInterrupt(void)
|
|
{
|
|
// XXX Notify the docshell, if necessary
|
|
return NS_OK;
|
|
}
|
|
|
|
NS_IMETHODIMP
|
|
XULContentSinkImpl::WillResume(void)
|
|
{
|
|
// XXX Notify the docshell, if necessary
|
|
return NS_OK;
|
|
}
|
|
|
|
NS_IMETHODIMP
|
|
XULContentSinkImpl::SetParser(nsParserBase* aParser)
|
|
{
|
|
NS_IF_RELEASE(mParser);
|
|
mParser = aParser;
|
|
NS_IF_ADDREF(mParser);
|
|
return NS_OK;
|
|
}
|
|
|
|
NS_IMETHODIMP
|
|
XULContentSinkImpl::SetDocumentCharset(nsACString& aCharset)
|
|
{
|
|
nsCOMPtr<nsIDocument> doc = do_QueryReferent(mDocument);
|
|
if (doc) {
|
|
doc->SetDocumentCharacterSet(aCharset);
|
|
}
|
|
|
|
return NS_OK;
|
|
}
|
|
|
|
nsISupports *
|
|
XULContentSinkImpl::GetTarget()
|
|
{
|
|
nsCOMPtr<nsIDocument> doc = do_QueryReferent(mDocument);
|
|
return doc;
|
|
}
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
nsresult
|
|
XULContentSinkImpl::Init(nsIDocument* aDocument,
|
|
nsXULPrototypeDocument* aPrototype)
|
|
{
|
|
NS_PRECONDITION(aDocument != nullptr, "null ptr");
|
|
if (! aDocument)
|
|
return NS_ERROR_NULL_POINTER;
|
|
|
|
nsresult rv;
|
|
|
|
mDocument = do_GetWeakReference(aDocument);
|
|
mPrototype = aPrototype;
|
|
|
|
mDocumentURL = mPrototype->GetURI();
|
|
|
|
// XXX this presumes HTTP header info is already set in document
|
|
// XXX if it isn't we need to set it here...
|
|
// XXXbz not like GetHeaderData on the proto doc _does_ anything....
|
|
nsAutoString preferredStyle;
|
|
rv = mPrototype->GetHeaderData(nsGkAtoms::headerDefaultStyle,
|
|
preferredStyle);
|
|
if (NS_FAILED(rv)) return rv;
|
|
|
|
if (!preferredStyle.IsEmpty()) {
|
|
aDocument->SetHeaderData(nsGkAtoms::headerDefaultStyle,
|
|
preferredStyle);
|
|
}
|
|
|
|
// Set the right preferred style on the document's CSSLoader.
|
|
aDocument->CSSLoader()->SetPreferredSheet(preferredStyle);
|
|
|
|
mNodeInfoManager = aPrototype->GetNodeInfoManager();
|
|
if (! mNodeInfoManager)
|
|
return NS_ERROR_UNEXPECTED;
|
|
|
|
mState = eInProlog;
|
|
return NS_OK;
|
|
}
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
//
|
|
// Text buffering
|
|
//
|
|
|
|
bool
|
|
XULContentSinkImpl::IsDataInBuffer(char16_t* buffer, int32_t length)
|
|
{
|
|
for (int32_t i = 0; i < length; ++i) {
|
|
if (buffer[i] == ' ' ||
|
|
buffer[i] == '\t' ||
|
|
buffer[i] == '\n' ||
|
|
buffer[i] == '\r')
|
|
continue;
|
|
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
|
|
nsresult
|
|
XULContentSinkImpl::FlushText(bool aCreateTextNode)
|
|
{
|
|
nsresult rv;
|
|
|
|
do {
|
|
// Don't do anything if there's no text to create a node from, or
|
|
// if they've told us not to create a text node
|
|
if (! mTextLength)
|
|
break;
|
|
|
|
if (! aCreateTextNode)
|
|
break;
|
|
|
|
nsRefPtr<nsXULPrototypeNode> node;
|
|
rv = mContextStack.GetTopNode(node);
|
|
if (NS_FAILED(rv)) return rv;
|
|
|
|
bool stripWhitespace = false;
|
|
if (node->mType == nsXULPrototypeNode::eType_Element) {
|
|
mozilla::dom::NodeInfo *nodeInfo =
|
|
static_cast<nsXULPrototypeElement*>(node.get())->mNodeInfo;
|
|
|
|
if (nodeInfo->NamespaceEquals(kNameSpaceID_XUL))
|
|
stripWhitespace = !nodeInfo->Equals(nsGkAtoms::label) &&
|
|
!nodeInfo->Equals(nsGkAtoms::description);
|
|
}
|
|
|
|
// Don't bother if there's nothing but whitespace.
|
|
if (stripWhitespace && ! IsDataInBuffer(mText, mTextLength))
|
|
break;
|
|
|
|
// Don't bother if we're not in XUL document body
|
|
if (mState != eInDocumentElement || mContextStack.Depth() == 0)
|
|
break;
|
|
|
|
nsXULPrototypeText* text = new nsXULPrototypeText();
|
|
if (! text)
|
|
return NS_ERROR_OUT_OF_MEMORY;
|
|
|
|
text->mValue.Assign(mText, mTextLength);
|
|
if (stripWhitespace)
|
|
text->mValue.Trim(" \t\n\r");
|
|
|
|
// hook it up
|
|
nsPrototypeArray* children = nullptr;
|
|
rv = mContextStack.GetTopChildren(&children);
|
|
if (NS_FAILED(rv)) return rv;
|
|
|
|
// transfer ownership of 'text' to the children array
|
|
children->AppendElement(text);
|
|
} while (0);
|
|
|
|
// Reset our text buffer
|
|
mTextLength = 0;
|
|
return NS_OK;
|
|
}
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
nsresult
|
|
XULContentSinkImpl::NormalizeAttributeString(const char16_t *aExpatName,
|
|
nsAttrName &aName)
|
|
{
|
|
int32_t nameSpaceID;
|
|
nsCOMPtr<nsIAtom> prefix, localName;
|
|
nsContentUtils::SplitExpatName(aExpatName, getter_AddRefs(prefix),
|
|
getter_AddRefs(localName), &nameSpaceID);
|
|
|
|
if (nameSpaceID == kNameSpaceID_None) {
|
|
aName.SetTo(localName);
|
|
|
|
return NS_OK;
|
|
}
|
|
|
|
nsRefPtr<mozilla::dom::NodeInfo> ni;
|
|
ni = mNodeInfoManager->GetNodeInfo(localName, prefix,
|
|
nameSpaceID,
|
|
nsIDOMNode::ATTRIBUTE_NODE);
|
|
aName.SetTo(ni);
|
|
|
|
return NS_OK;
|
|
}
|
|
|
|
nsresult
|
|
XULContentSinkImpl::CreateElement(mozilla::dom::NodeInfo *aNodeInfo,
|
|
nsXULPrototypeElement** aResult)
|
|
{
|
|
nsXULPrototypeElement* element = new nsXULPrototypeElement();
|
|
if (! element)
|
|
return NS_ERROR_OUT_OF_MEMORY;
|
|
|
|
element->mNodeInfo = aNodeInfo;
|
|
|
|
*aResult = element;
|
|
return NS_OK;
|
|
}
|
|
|
|
/**** BEGIN NEW APIs ****/
|
|
|
|
|
|
NS_IMETHODIMP
|
|
XULContentSinkImpl::HandleStartElement(const char16_t *aName,
|
|
const char16_t **aAtts,
|
|
uint32_t aAttsCount,
|
|
uint32_t aLineNumber)
|
|
{
|
|
// XXX Hopefully the parser will flag this before we get here. If
|
|
// we're in the epilog, there should be no new elements
|
|
NS_PRECONDITION(mState != eInEpilog, "tag in XUL doc epilog");
|
|
NS_PRECONDITION(aAttsCount % 2 == 0, "incorrect aAttsCount");
|
|
// Adjust aAttsCount so it's the actual number of attributes
|
|
aAttsCount /= 2;
|
|
|
|
if (mState == eInEpilog)
|
|
return NS_ERROR_UNEXPECTED;
|
|
|
|
if (mState != eInScript) {
|
|
FlushText();
|
|
}
|
|
|
|
int32_t nameSpaceID;
|
|
nsCOMPtr<nsIAtom> prefix, localName;
|
|
nsContentUtils::SplitExpatName(aName, getter_AddRefs(prefix),
|
|
getter_AddRefs(localName), &nameSpaceID);
|
|
|
|
nsRefPtr<mozilla::dom::NodeInfo> nodeInfo;
|
|
nodeInfo = mNodeInfoManager->GetNodeInfo(localName, prefix, nameSpaceID,
|
|
nsIDOMNode::ELEMENT_NODE);
|
|
|
|
nsresult rv = NS_OK;
|
|
switch (mState) {
|
|
case eInProlog:
|
|
// We're the root document element
|
|
rv = OpenRoot(aAtts, aAttsCount, nodeInfo);
|
|
break;
|
|
|
|
case eInDocumentElement:
|
|
rv = OpenTag(aAtts, aAttsCount, aLineNumber, nodeInfo);
|
|
break;
|
|
|
|
case eInEpilog:
|
|
case eInScript:
|
|
PR_LOG(gContentSinkLog, PR_LOG_WARNING,
|
|
("xul: warning: unexpected tags in epilog at line %d",
|
|
aLineNumber));
|
|
rv = NS_ERROR_UNEXPECTED; // XXX
|
|
break;
|
|
}
|
|
|
|
return rv;
|
|
}
|
|
|
|
NS_IMETHODIMP
|
|
XULContentSinkImpl::HandleEndElement(const char16_t *aName)
|
|
{
|
|
// Never EVER return anything but NS_OK or
|
|
// NS_ERROR_HTMLPARSER_BLOCK from this method. Doing so will blow
|
|
// the parser's little mind all over the planet.
|
|
nsresult rv;
|
|
|
|
nsRefPtr<nsXULPrototypeNode> node;
|
|
rv = mContextStack.GetTopNode(node);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
return NS_OK;
|
|
}
|
|
|
|
switch (node->mType) {
|
|
case nsXULPrototypeNode::eType_Element: {
|
|
// Flush any text _now_, so that we'll get text nodes created
|
|
// before popping the stack.
|
|
FlushText();
|
|
|
|
// Pop the context stack and do prototype hookup.
|
|
nsPrototypeArray* children = nullptr;
|
|
rv = mContextStack.GetTopChildren(&children);
|
|
if (NS_FAILED(rv)) return rv;
|
|
|
|
nsXULPrototypeElement* element =
|
|
static_cast<nsXULPrototypeElement*>(node.get());
|
|
|
|
int32_t count = children->Length();
|
|
if (count) {
|
|
element->mChildren.SetCapacity(count);
|
|
|
|
for (int32_t i = 0; i < count; ++i)
|
|
element->mChildren.AppendElement(children->ElementAt(i));
|
|
|
|
}
|
|
}
|
|
break;
|
|
|
|
case nsXULPrototypeNode::eType_Script: {
|
|
nsXULPrototypeScript* script =
|
|
static_cast<nsXULPrototypeScript*>(node.get());
|
|
|
|
// If given a src= attribute, we must ignore script tag content.
|
|
if (!script->mSrcURI && !script->GetScriptObject()) {
|
|
nsCOMPtr<nsIDocument> doc = do_QueryReferent(mDocument);
|
|
|
|
script->mOutOfLine = false;
|
|
if (doc)
|
|
script->Compile(mText, mTextLength, mDocumentURL,
|
|
script->mLineNo, doc);
|
|
}
|
|
|
|
FlushText(false);
|
|
}
|
|
break;
|
|
|
|
default:
|
|
NS_ERROR("didn't expect that");
|
|
break;
|
|
}
|
|
|
|
rv = mContextStack.Pop(&mState);
|
|
NS_ASSERTION(NS_SUCCEEDED(rv), "context stack corrupted");
|
|
if (NS_FAILED(rv)) return rv;
|
|
|
|
if (mContextStack.Depth() == 0) {
|
|
// The root element should -always- be an element, because
|
|
// it'll have been created via XULContentSinkImpl::OpenRoot().
|
|
NS_ASSERTION(node->mType == nsXULPrototypeNode::eType_Element, "root is not an element");
|
|
if (node->mType != nsXULPrototypeNode::eType_Element)
|
|
return NS_ERROR_UNEXPECTED;
|
|
|
|
// Now that we're done parsing, set the prototype document's
|
|
// root element. This transfers ownership of the prototype
|
|
// element tree to the prototype document.
|
|
nsXULPrototypeElement* element =
|
|
static_cast<nsXULPrototypeElement*>(node.get());
|
|
|
|
mPrototype->SetRootElement(element);
|
|
mState = eInEpilog;
|
|
}
|
|
|
|
return NS_OK;
|
|
}
|
|
|
|
NS_IMETHODIMP
|
|
XULContentSinkImpl::HandleComment(const char16_t *aName)
|
|
{
|
|
FlushText();
|
|
return NS_OK;
|
|
}
|
|
|
|
NS_IMETHODIMP
|
|
XULContentSinkImpl::HandleCDataSection(const char16_t *aData, uint32_t aLength)
|
|
{
|
|
FlushText();
|
|
return AddText(aData, aLength);
|
|
}
|
|
|
|
NS_IMETHODIMP
|
|
XULContentSinkImpl::HandleDoctypeDecl(const nsAString & aSubset,
|
|
const nsAString & aName,
|
|
const nsAString & aSystemId,
|
|
const nsAString & aPublicId,
|
|
nsISupports* aCatalogData)
|
|
{
|
|
return NS_OK;
|
|
}
|
|
|
|
NS_IMETHODIMP
|
|
XULContentSinkImpl::HandleCharacterData(const char16_t *aData,
|
|
uint32_t aLength)
|
|
{
|
|
if (aData && mState != eInProlog && mState != eInEpilog) {
|
|
return AddText(aData, aLength);
|
|
}
|
|
return NS_OK;
|
|
}
|
|
|
|
NS_IMETHODIMP
|
|
XULContentSinkImpl::HandleProcessingInstruction(const char16_t *aTarget,
|
|
const char16_t *aData)
|
|
{
|
|
FlushText();
|
|
|
|
const nsDependentString target(aTarget);
|
|
const nsDependentString data(aData);
|
|
|
|
// Note: the created nsXULPrototypePI has mRefCnt == 1
|
|
nsRefPtr<nsXULPrototypePI> pi = new nsXULPrototypePI();
|
|
if (!pi)
|
|
return NS_ERROR_OUT_OF_MEMORY;
|
|
|
|
pi->mTarget = target;
|
|
pi->mData = data;
|
|
|
|
if (mState == eInProlog) {
|
|
// Note: passing in already addrefed pi
|
|
return mPrototype->AddProcessingInstruction(pi);
|
|
}
|
|
|
|
nsresult rv;
|
|
nsPrototypeArray* children = nullptr;
|
|
rv = mContextStack.GetTopChildren(&children);
|
|
if (NS_FAILED(rv)) {
|
|
return rv;
|
|
}
|
|
|
|
if (!children->AppendElement(pi)) {
|
|
return NS_ERROR_OUT_OF_MEMORY;
|
|
}
|
|
|
|
return NS_OK;
|
|
}
|
|
|
|
|
|
NS_IMETHODIMP
|
|
XULContentSinkImpl::HandleXMLDeclaration(const char16_t *aVersion,
|
|
const char16_t *aEncoding,
|
|
int32_t aStandalone)
|
|
{
|
|
return NS_OK;
|
|
}
|
|
|
|
|
|
NS_IMETHODIMP
|
|
XULContentSinkImpl::ReportError(const char16_t* aErrorText,
|
|
const char16_t* aSourceText,
|
|
nsIScriptError *aError,
|
|
bool *_retval)
|
|
{
|
|
NS_PRECONDITION(aError && aSourceText && aErrorText, "Check arguments!!!");
|
|
|
|
// The expat driver should report the error.
|
|
*_retval = true;
|
|
|
|
nsresult rv = NS_OK;
|
|
|
|
// make sure to empty the context stack so that
|
|
// <parsererror> could become the root element.
|
|
mContextStack.Clear();
|
|
|
|
mState = eInProlog;
|
|
|
|
// Clear any buffered-up text we have. It's enough to set the length to 0.
|
|
// The buffer itself is allocated when we're created and deleted in our
|
|
// destructor, so don't mess with it.
|
|
mTextLength = 0;
|
|
|
|
nsCOMPtr<nsIXULDocument> doc = do_QueryReferent(mDocument);
|
|
if (doc && !doc->OnDocumentParserError()) {
|
|
// The overlay was broken. Don't add a messy element to the master doc.
|
|
return NS_OK;
|
|
}
|
|
|
|
const char16_t* noAtts[] = { 0, 0 };
|
|
|
|
NS_NAMED_LITERAL_STRING(errorNs,
|
|
"http://www.mozilla.org/newlayout/xml/parsererror.xml");
|
|
|
|
nsAutoString parsererror(errorNs);
|
|
parsererror.Append((char16_t)0xFFFF);
|
|
parsererror.AppendLiteral("parsererror");
|
|
|
|
rv = HandleStartElement(parsererror.get(), noAtts, 0, 0);
|
|
NS_ENSURE_SUCCESS(rv,rv);
|
|
|
|
rv = HandleCharacterData(aErrorText, NS_strlen(aErrorText));
|
|
NS_ENSURE_SUCCESS(rv,rv);
|
|
|
|
nsAutoString sourcetext(errorNs);
|
|
sourcetext.Append((char16_t)0xFFFF);
|
|
sourcetext.AppendLiteral("sourcetext");
|
|
|
|
rv = HandleStartElement(sourcetext.get(), noAtts, 0, 0);
|
|
NS_ENSURE_SUCCESS(rv,rv);
|
|
|
|
rv = HandleCharacterData(aSourceText, NS_strlen(aSourceText));
|
|
NS_ENSURE_SUCCESS(rv,rv);
|
|
|
|
rv = HandleEndElement(sourcetext.get());
|
|
NS_ENSURE_SUCCESS(rv,rv);
|
|
|
|
rv = HandleEndElement(parsererror.get());
|
|
NS_ENSURE_SUCCESS(rv,rv);
|
|
|
|
return rv;
|
|
}
|
|
|
|
nsresult
|
|
XULContentSinkImpl::OpenRoot(const char16_t** aAttributes,
|
|
const uint32_t aAttrLen,
|
|
mozilla::dom::NodeInfo *aNodeInfo)
|
|
{
|
|
NS_ASSERTION(mState == eInProlog, "how'd we get here?");
|
|
if (mState != eInProlog)
|
|
return NS_ERROR_UNEXPECTED;
|
|
|
|
nsresult rv;
|
|
|
|
if (aNodeInfo->Equals(nsGkAtoms::script, kNameSpaceID_XHTML) ||
|
|
aNodeInfo->Equals(nsGkAtoms::script, kNameSpaceID_XUL)) {
|
|
PR_LOG(gContentSinkLog, PR_LOG_ERROR,
|
|
("xul: script tag not allowed as root content element"));
|
|
|
|
return NS_ERROR_UNEXPECTED;
|
|
}
|
|
|
|
// Create the element
|
|
nsXULPrototypeElement* element;
|
|
rv = CreateElement(aNodeInfo, &element);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
#ifdef PR_LOGGING
|
|
if (PR_LOG_TEST(gContentSinkLog, PR_LOG_ERROR)) {
|
|
nsAutoString anodeC;
|
|
aNodeInfo->GetName(anodeC);
|
|
PR_LOG(gContentSinkLog, PR_LOG_ERROR,
|
|
("xul: unable to create element '%s' at line %d",
|
|
NS_ConvertUTF16toUTF8(anodeC).get(),
|
|
-1)); // XXX pass in line number
|
|
}
|
|
#endif
|
|
|
|
return rv;
|
|
}
|
|
|
|
// Push the element onto the context stack, so that child
|
|
// containers will hook up to us as their parent.
|
|
rv = mContextStack.Push(element, mState);
|
|
if (NS_FAILED(rv)) {
|
|
element->Release();
|
|
return rv;
|
|
}
|
|
|
|
// Add the attributes
|
|
rv = AddAttributes(aAttributes, aAttrLen, element);
|
|
if (NS_FAILED(rv)) return rv;
|
|
|
|
mState = eInDocumentElement;
|
|
return NS_OK;
|
|
}
|
|
|
|
nsresult
|
|
XULContentSinkImpl::OpenTag(const char16_t** aAttributes,
|
|
const uint32_t aAttrLen,
|
|
const uint32_t aLineNumber,
|
|
mozilla::dom::NodeInfo *aNodeInfo)
|
|
{
|
|
nsresult rv;
|
|
|
|
// Create the element
|
|
nsXULPrototypeElement* element;
|
|
rv = CreateElement(aNodeInfo, &element);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
#ifdef PR_LOGGING
|
|
if (PR_LOG_TEST(gContentSinkLog, PR_LOG_ERROR)) {
|
|
nsAutoString anodeC;
|
|
aNodeInfo->GetName(anodeC);
|
|
PR_LOG(gContentSinkLog, PR_LOG_ERROR,
|
|
("xul: unable to create element '%s' at line %d",
|
|
NS_ConvertUTF16toUTF8(anodeC).get(),
|
|
aLineNumber));
|
|
}
|
|
#endif
|
|
|
|
return rv;
|
|
}
|
|
|
|
// Link this element to its parent.
|
|
nsPrototypeArray* children = nullptr;
|
|
rv = mContextStack.GetTopChildren(&children);
|
|
if (NS_FAILED(rv)) {
|
|
delete element;
|
|
return rv;
|
|
}
|
|
|
|
// Add the attributes
|
|
rv = AddAttributes(aAttributes, aAttrLen, element);
|
|
if (NS_FAILED(rv)) return rv;
|
|
|
|
children->AppendElement(element);
|
|
|
|
if (aNodeInfo->Equals(nsGkAtoms::script, kNameSpaceID_XHTML) ||
|
|
aNodeInfo->Equals(nsGkAtoms::script, kNameSpaceID_XUL)) {
|
|
// Do scripty things now
|
|
rv = OpenScript(aAttributes, aLineNumber);
|
|
NS_ENSURE_SUCCESS(rv, rv);
|
|
|
|
NS_ASSERTION(mState == eInScript || mState == eInDocumentElement,
|
|
"Unexpected state");
|
|
if (mState == eInScript) {
|
|
// OpenScript has pushed the nsPrototypeScriptElement onto the
|
|
// stack, so we're done.
|
|
return NS_OK;
|
|
}
|
|
}
|
|
|
|
// Push the element onto the context stack, so that child
|
|
// containers will hook up to us as their parent.
|
|
rv = mContextStack.Push(element, mState);
|
|
if (NS_FAILED(rv)) return rv;
|
|
|
|
mState = eInDocumentElement;
|
|
return NS_OK;
|
|
}
|
|
|
|
nsresult
|
|
XULContentSinkImpl::OpenScript(const char16_t** aAttributes,
|
|
const uint32_t aLineNumber)
|
|
{
|
|
uint32_t langID = nsIProgrammingLanguage::JAVASCRIPT;
|
|
uint32_t version = JSVERSION_LATEST;
|
|
nsresult rv;
|
|
|
|
// Look for SRC attribute and look for a LANGUAGE attribute
|
|
nsAutoString src;
|
|
while (*aAttributes) {
|
|
const nsDependentString key(aAttributes[0]);
|
|
if (key.EqualsLiteral("src")) {
|
|
src.Assign(aAttributes[1]);
|
|
}
|
|
else if (key.EqualsLiteral("type")) {
|
|
nsDependentString str(aAttributes[1]);
|
|
nsContentTypeParser parser(str);
|
|
nsAutoString mimeType;
|
|
rv = parser.GetType(mimeType);
|
|
if (NS_FAILED(rv)) {
|
|
if (rv == NS_ERROR_INVALID_ARG) {
|
|
// Might as well bail out now instead of setting langID to
|
|
// nsIProgrammingLanguage::UNKNOWN and bailing out later.
|
|
return NS_OK;
|
|
}
|
|
// We do want the warning here
|
|
NS_ENSURE_SUCCESS(rv, rv);
|
|
}
|
|
|
|
if (nsContentUtils::IsJavascriptMIMEType(mimeType)) {
|
|
langID = nsIProgrammingLanguage::JAVASCRIPT;
|
|
version = JSVERSION_LATEST;
|
|
} else {
|
|
langID = nsIProgrammingLanguage::UNKNOWN;
|
|
}
|
|
|
|
if (langID != nsIProgrammingLanguage::UNKNOWN) {
|
|
// Get the version string, and ensure the language supports it.
|
|
nsAutoString versionName;
|
|
rv = parser.GetParameter("version", versionName);
|
|
|
|
if (NS_SUCCEEDED(rv)) {
|
|
version = nsContentUtils::ParseJavascriptVersion(versionName);
|
|
} else if (rv != NS_ERROR_INVALID_ARG) {
|
|
return rv;
|
|
}
|
|
}
|
|
}
|
|
else if (key.EqualsLiteral("language")) {
|
|
// Language is deprecated, and the impl in nsScriptLoader ignores the
|
|
// various version strings anyway. So we make no attempt to support
|
|
// languages other than JS for language=
|
|
nsAutoString lang(aAttributes[1]);
|
|
if (nsContentUtils::IsJavaScriptLanguage(lang)) {
|
|
version = JSVERSION_DEFAULT;
|
|
langID = nsIProgrammingLanguage::JAVASCRIPT;
|
|
}
|
|
}
|
|
aAttributes += 2;
|
|
}
|
|
|
|
// Not all script languages have a "sandbox" concept. At time of
|
|
// writing, Python is the only other language, and it does not.
|
|
// For such languages, neither any inline script nor remote script are
|
|
// safe to execute from untrusted sources.
|
|
// So for such languages, we only allow script when the document
|
|
// itself is from chrome. We then don't bother to check the
|
|
// "src=" tag - we trust chrome to do the right thing.
|
|
// (See also similar code in nsScriptLoader.cpp)
|
|
nsCOMPtr<nsIDocument> doc(do_QueryReferent(mDocument));
|
|
if (langID != nsIProgrammingLanguage::UNKNOWN &&
|
|
langID != nsIProgrammingLanguage::JAVASCRIPT &&
|
|
doc && !nsContentUtils::IsChromeDoc(doc)) {
|
|
langID = nsIProgrammingLanguage::UNKNOWN;
|
|
NS_WARNING("Non JS language called from non chrome - ignored");
|
|
}
|
|
|
|
// Don't process scripts that aren't known
|
|
if (langID != nsIProgrammingLanguage::UNKNOWN) {
|
|
nsCOMPtr<nsIScriptGlobalObject> globalObject;
|
|
if (doc)
|
|
globalObject = do_QueryInterface(doc->GetWindow());
|
|
nsRefPtr<nsXULPrototypeScript> script =
|
|
new nsXULPrototypeScript(aLineNumber, version);
|
|
if (! script)
|
|
return NS_ERROR_OUT_OF_MEMORY;
|
|
|
|
// If there is a SRC attribute...
|
|
if (! src.IsEmpty()) {
|
|
// Use the SRC attribute value to load the URL
|
|
rv = NS_NewURI(getter_AddRefs(script->mSrcURI), src, nullptr, mDocumentURL);
|
|
|
|
// Check if this document is allowed to load a script from this source
|
|
// NOTE: if we ever allow scripts added via the DOM to run, we need to
|
|
// add a CheckLoadURI call for that as well.
|
|
if (NS_SUCCEEDED(rv)) {
|
|
if (!mSecMan)
|
|
mSecMan = do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv);
|
|
if (NS_SUCCEEDED(rv)) {
|
|
nsCOMPtr<nsIDocument> doc = do_QueryReferent(mDocument, &rv);
|
|
|
|
if (NS_SUCCEEDED(rv)) {
|
|
rv = mSecMan->
|
|
CheckLoadURIWithPrincipal(doc->NodePrincipal(),
|
|
script->mSrcURI,
|
|
nsIScriptSecurityManager::ALLOW_CHROME);
|
|
}
|
|
}
|
|
}
|
|
|
|
if (NS_FAILED(rv)) {
|
|
return rv;
|
|
}
|
|
|
|
// Attempt to deserialize an out-of-line script from the FastLoad
|
|
// file right away. Otherwise we'll end up reloading the script and
|
|
// corrupting the FastLoad file trying to serialize it, in the case
|
|
// where it's already there.
|
|
script->DeserializeOutOfLine(nullptr, mPrototype);
|
|
}
|
|
|
|
nsPrototypeArray* children = nullptr;
|
|
rv = mContextStack.GetTopChildren(&children);
|
|
if (NS_FAILED(rv)) {
|
|
return rv;
|
|
}
|
|
|
|
children->AppendElement(script);
|
|
|
|
mConstrainSize = false;
|
|
|
|
mContextStack.Push(script, mState);
|
|
mState = eInScript;
|
|
}
|
|
|
|
return NS_OK;
|
|
}
|
|
|
|
nsresult
|
|
XULContentSinkImpl::AddAttributes(const char16_t** aAttributes,
|
|
const uint32_t aAttrLen,
|
|
nsXULPrototypeElement* aElement)
|
|
{
|
|
// Add tag attributes to the element
|
|
nsresult rv;
|
|
|
|
// Create storage for the attributes
|
|
nsXULPrototypeAttribute* attrs = nullptr;
|
|
if (aAttrLen > 0) {
|
|
attrs = new nsXULPrototypeAttribute[aAttrLen];
|
|
if (! attrs)
|
|
return NS_ERROR_OUT_OF_MEMORY;
|
|
}
|
|
|
|
aElement->mAttributes = attrs;
|
|
aElement->mNumAttributes = aAttrLen;
|
|
|
|
// Copy the attributes into the prototype
|
|
uint32_t i;
|
|
for (i = 0; i < aAttrLen; ++i) {
|
|
rv = NormalizeAttributeString(aAttributes[i * 2], attrs[i].mName);
|
|
NS_ENSURE_SUCCESS(rv, rv);
|
|
|
|
rv = aElement->SetAttrAt(i, nsDependentString(aAttributes[i * 2 + 1]),
|
|
mDocumentURL);
|
|
NS_ENSURE_SUCCESS(rv, rv);
|
|
|
|
#ifdef PR_LOGGING
|
|
if (PR_LOG_TEST(gContentSinkLog, PR_LOG_DEBUG)) {
|
|
nsAutoString extraWhiteSpace;
|
|
int32_t cnt = mContextStack.Depth();
|
|
while (--cnt >= 0)
|
|
extraWhiteSpace.AppendLiteral(" ");
|
|
nsAutoString qnameC,valueC;
|
|
qnameC.Assign(aAttributes[0]);
|
|
valueC.Assign(aAttributes[1]);
|
|
PR_LOG(gContentSinkLog, PR_LOG_DEBUG,
|
|
("xul: %.5d. %s %s=%s",
|
|
-1, // XXX pass in line number
|
|
NS_ConvertUTF16toUTF8(extraWhiteSpace).get(),
|
|
NS_ConvertUTF16toUTF8(qnameC).get(),
|
|
NS_ConvertUTF16toUTF8(valueC).get()));
|
|
}
|
|
#endif
|
|
}
|
|
|
|
return NS_OK;
|
|
}
|
|
|
|
nsresult
|
|
XULContentSinkImpl::AddText(const char16_t* aText,
|
|
int32_t aLength)
|
|
{
|
|
// Create buffer when we first need it
|
|
if (0 == mTextSize) {
|
|
mText = (char16_t *) moz_malloc(sizeof(char16_t) * 4096);
|
|
if (nullptr == mText) {
|
|
return NS_ERROR_OUT_OF_MEMORY;
|
|
}
|
|
mTextSize = 4096;
|
|
}
|
|
|
|
// Copy data from string into our buffer; flush buffer when it fills up
|
|
int32_t offset = 0;
|
|
while (0 != aLength) {
|
|
int32_t amount = mTextSize - mTextLength;
|
|
if (amount > aLength) {
|
|
amount = aLength;
|
|
}
|
|
if (0 == amount) {
|
|
if (mConstrainSize) {
|
|
nsresult rv = FlushText();
|
|
if (NS_OK != rv) {
|
|
return rv;
|
|
}
|
|
}
|
|
else {
|
|
mTextSize += aLength;
|
|
mText = (char16_t *) moz_realloc(mText, sizeof(char16_t) * mTextSize);
|
|
if (nullptr == mText) {
|
|
return NS_ERROR_OUT_OF_MEMORY;
|
|
}
|
|
}
|
|
}
|
|
memcpy(&mText[mTextLength],aText + offset, sizeof(char16_t) * amount);
|
|
|
|
mTextLength += amount;
|
|
offset += amount;
|
|
aLength -= amount;
|
|
}
|
|
|
|
return NS_OK;
|
|
}
|