PK 203AA!locale/ca/inspector/inspector.dtd PK 203FJlocale/ca/inspector/prefs.dtd PK 203GFFlocale/ca/inspector/editing.dtd PK 203)".$locale/ca/inspector/tasksOverlay.dtd PK 203O(locale/ca/inspector/search/findFiles.dtd PK 203LTUU'locale/ca/inspector/search/junkImgs.dtd PK si2L locale/ca/inspector/contents.rdf PK 203W_#locale/ca/inspector/viewers/dom.dtd PK 203 ,||'locale/ca/inspector/viewers/domNode.dtd PK 2039'  *locale/ca/inspector/viewers/styleRules.dtd PK 203`+locale/ca/inspector/viewers/stylesheets.dtd PK 203c*xMM+locale/ca/inspector/viewers/xblBindings.dtd PK 203*{O(locale/ca/inspector/viewers/boxModel.dtd PK 2039jo-locale/ca/inspector/viewers/computedStyle.dtd PK 203 F(locale/ca/inspector/viewers/jsObject.dtd PK 2033(locale/ca/inspector/inspector.properties inspectURL.title=Inspecció d'un URL inspectURL.message=Introduïu un URL inspectWindow.error.message=No ha estat possible commutar a la finestra sol·licitada. inspectWindow.error.title=S'ha produït un error durant la inspecció de la finestra styleRuleNewProperty.title=Nova regla d'estil styleRuleEditProperty.title=Edita la regla d'estil styleRulePropertyValue.message=Introduïu el valor de la propietat: styleRulePropertyName.message=Introduïu el nom de la propietat: sidebar.title=Inspector DOM sidebarInstalled=S'ha instal·lat la barra lateral newAttribute.title=Nou atribut editAttribute.title=Edita l'atribut enterAttrName.message=Introduïu un nom d'atribut: enterAttrValue.message=Introduïu un valor de l'atribut: findNodesDocumentEnd.message=S'ha arribat al final del document. findNodesDocumentEnd.title=Cerca els nodes root.title = Assumpte 1=Element 2=Atribut 3=Text 4=Secció CDATA 5=Referència d'entitat 6=Entitat 7=Instrucció de procés 8=Comentari 9=Document 10=Tipus de document 11=Fragment del document 12=Notació PK -2Tě$locale/cs-CZ/inspector/inspector.dtd PK -2   locale/cs-CZ/inspector/prefs.dtd PK -2 rGG"locale/cs-CZ/inspector/editing.dtd PK -2ořl'locale/cs-CZ/inspector/tasksOverlay.dtd PK -2^&+locale/cs-CZ/inspector/search/findFiles.dtd PK -2NSS*locale/cs-CZ/inspector/search/junkImgs.dtd PK si2nmt#locale/cs-CZ/inspector/contents.rdf PK -2  &locale/cs-CZ/inspector/viewers/dom.dtd PK -2b*locale/cs-CZ/inspector/viewers/domNode.dtd PK -2 Y.-locale/cs-CZ/inspector/viewers/styleRules.dtd PK -2~Ø.locale/cs-CZ/inspector/viewers/stylesheets.dtd PK -2*ֱ,.locale/cs-CZ/inspector/viewers/xblBindings.dtd PK -2dH+locale/cs-CZ/inspector/viewers/boxModel.dtd PK -2&(0locale/cs-CZ/inspector/viewers/computedStyle.dtd PK -2'+locale/cs-CZ/inspector/viewers/jsObject.dtd PK -2  +locale/cs-CZ/inspector/inspector.properties inspectURL.title=Prozkoumat URL inspectURL.message=Vlo\u017Ete URL: inspectWindow.error.message=Nepoda\u0159ilo se p\u0159epnout na po\u017Eadovan\u00E9 okno inspectWindow.error.title=Prozkoumat chyby okna styleRuleNewProperty.title=Nov\u00E9 pravidlo stylu styleRuleEditProperty.title=\u00DAprava pravidla stylu styleRulePropertyValue.message=Vlo\u017Ete hodnotu vlastnosti: styleRulePropertyName.message=Vlo\u017Ete jm\u00E9no vlastnosti sidebar.title=DOM Inspektor sidebarInstalled=Postrann\u00ED li\u0161ta je nainstalov\u00E1na newAttribute.title=Nov\u00FD atribut editAttribute.title=\u00DApravy atributu enterAttrName.message=Vlo\u017Ete jm\u00E9no atributu enterAttrValue.message=Vlo\u017Ete hodnotu atributu findNodesDocumentEnd.message=Dosa\u017Een konec dokumentu findNodesDocumentEnd.title=Naj\u00EDt uzel root.title=Ko\u0159en 1=Prvek 2=Atribut 3=Text 4=Sekce CDATA 5=Odkaz entity 6=Entita 7=Prov\u00E1d\u011Bj\u00EDc\u00ED instrukce 8=Koment\u00E1\u0159 9=Dokument 10=Typ dokumentu 11=Fragment dokumentu 12=Z\u00E1znam PK 33Q11!locale/da/inspector/inspector.dtd PK 33!locale/da/inspector/prefs.dtd PK 33CClocale/da/inspector/editing.dtd PK 33«z$locale/da/inspector/tasksOverlay.dtd PK 33<(locale/da/inspector/search/findFiles.dtd PK 33_#mQQ'locale/da/inspector/search/junkImgs.dtd PK si2# locale/da/inspector/contents.rdf PK 33 q3SS#locale/da/inspector/viewers/dom.dtd PK 33K0'locale/da/inspector/viewers/domNode.dtd PK 333tt*locale/da/inspector/viewers/styleRules.dtd PK 33hs+locale/da/inspector/viewers/stylesheets.dtd PK 3321+locale/da/inspector/viewers/xblBindings.dtd PK 33I  (locale/da/inspector/viewers/boxModel.dtd PK 33$P-locale/da/inspector/viewers/computedStyle.dtd PK 33ξj(locale/da/inspector/viewers/jsObject.dtd PK 33"W(locale/da/inspector/inspector.properties inspectURL.title = Inspicer URL inspectURL.message = Indtast en URL: inspectWindow.error.message = Kan ikke skifte til det valgte vindue. inspectWindow.error.title = Fejl ved inspicering af vindue styleRuleNewProperty.title = Ny typografi-regl styleRuleEditProperty.title = Rediger typografi-regl styleRulePropertyValue.message = Indtast v\u00e6rdi for egenskab: styleRulePropertyName.message = Indtast navn på egenskab: sidebar.title = DOM Inspekt\u00f8r sidebarInstalled = Sidebj\u00e6lken er installeret. newAttribute.title = Ny attribut editAttribute.title = Rediger attribut enterAttrName.message = Indtast attribut navn: enterAttrValue.message = Indtast attribut v\u00e6rdi: findNodesDocumentEnd.message = Slutningen af dokumentet n\u00e5et. findNodesDocumentEnd.title = Find noder root.title = Rod 1 = Element 2 = Attribut 3 = Tekst 4 = CDATA Sektion 5 = Entitet reference 6 = Entitet 7 = Processeringsinstruktion 8 = Kommentar 9 = Dokument 10 = Dokumenttype 11 = Dokumentfragment 12 = Notation PK K321!locale/de/inspector/inspector.dtd PK K32W`olocale/de/inspector/prefs.dtd PK K32Saalocale/de/inspector/editing.dtd PK K326Z$locale/de/inspector/tasksOverlay.dtd PK K32i(locale/de/inspector/search/findFiles.dtd PK K32Att'locale/de/inspector/search/junkImgs.dtd PK si2Q locale/de/inspector/contents.rdf PK }>=4g>w#locale/de/inspector/viewers/dom.dtd PK L32`'locale/de/inspector/viewers/domNode.dtd PK L32=(*locale/de/inspector/viewers/styleRules.dtd PK }>=4VV+locale/de/inspector/viewers/stylesheets.dtd PK L32+locale/de/inspector/viewers/xblBindings.dtd PK L32go(locale/de/inspector/viewers/boxModel.dtd PK L325-locale/de/inspector/viewers/computedStyle.dtd PK L32V(locale/de/inspector/viewers/jsObject.dtd PK xv4\U&''(locale/de/inspector/inspector.properties inspectURL.title = URL inspizieren inspectURL.message = Geben Sie eine URL an\: inspectWindow.error.message = Konnte nicht zum gew\u00FCnschten Fenster springen. inspectWindow.error.title = Fhler beim Inspizieren des Fensters styleRuleNewProperty.title = Neue Style-Regel styleRuleEditProperty.title = Style-Regel bearbeiten styleRulePropertyValue.message = Geben Sie den Eigenschaftswert ein\: styleRulePropertyName.message = Geben Sie den Eigenschaftsnamen ein\: sidebar.title = DOM Inspector sidebarInstalled = Die Sidebar ist installiert. newAttribute.title = Neues Attribut editAttribute.title = Attribut bearbeiten enterAttrName.message = Geben Sie den Attribut-Namen ein\: enterAttrValue.message = Geben Sie den Attribut-Wert ein\: findNodesDocumentEnd.message = Ende des Dokuments erreicht. findNodesDocumentEnd.title = Nodes suchen root.title = Subjekt 1 = Element 2 = Attribut 3 = Text 4 = CDATA-Bereich 5 = Entity-Referenz 6 = Entity 7 = Durchf\u00FChrungsanweisung 8 = Kommentar 9 = Dokument 10 = Dokument-Typ 11 = Dokument-Fragment 12 = Notation PK %739R R !locale/el/inspector/inspector.dtd PK %73 B55locale/el/inspector/prefs.dtd PK %73Å׳locale/el/inspector/editing.dtd PK %73Od%22$locale/el/inspector/tasksOverlay.dtd PK %73p(locale/el/inspector/search/findFiles.dtd PK %73 %%'locale/el/inspector/search/junkImgs.dtd PK si2?u locale/el/inspector/contents.rdf PK %73%v5{{#locale/el/inspector/viewers/dom.dtd PK %73o'locale/el/inspector/viewers/domNode.dtd PK %73 *locale/el/inspector/viewers/styleRules.dtd PK %73:@@+locale/el/inspector/viewers/stylesheets.dtd PK %73q8+locale/el/inspector/viewers/xblBindings.dtd PK %73~ (locale/el/inspector/viewers/boxModel.dtd PK %73aAA-locale/el/inspector/viewers/computedStyle.dtd PK %73{$0 0 (locale/el/inspector/viewers/jsObject.dtd PK %73fmm(locale/el/inspector/inspector.properties inspectURL.title = Επιθεώρηση URL inspectURL.message = Εισάγετε ένα URL: inspectWindow.error.message = Αδυναμία εναλλαγής στο αιτούμενο παράθυρο. inspectWindow.error.title = Επιθεώρηση σφάλματος παραθύρου styleRuleNewProperty.title = Νέο στυλ κανόνα styleRuleEditProperty.title = Επεξεργασία στυλ κανόνα styleRulePropertyValue.message =Εισάγετε την τιμή ιδιότητας: styleRulePropertyName.message = Εισάγετε το όνομα ιδιότητας: sidebar.title = DOM Inspector sidebarInstalled = Η πλευρική στήλη έχει εγκατασταθεί. newAttribute.title = Νέο Γνώρισμα editAttribute.title = Επεξεργασία γνωρίσματος enterAttrName.message = Εισάγετε το όνομα γνωρίσματος: enterAttrValue.message = Εισάγετε την τιμή γνωρίσματος: findNodesDocumentEnd.message = Έφτασα στο τέλος εγγράφου. findNodesDocumentEnd.title = Εύρεση Nodes root.title = Θέμα 1 = Στοιχείο 2 = Γνώρισμα 3 = Κείμενο 4 = Ενότητα CDATA 5 = Entity Reference 6 = Entity 7 = Processing Instruction 8 = Σχόλιο 9 = Έγγραφο 10 = Τύπος εγγράφου 11 = Document Fragment 12 = Notation PK X2$locale/en-US/inspector/inspector.dtd PK ).) locale/en-US/inspector/prefs.dtd PK .n+]44"locale/en-US/inspector/editing.dtd PK X2Q'locale/en-US/inspector/tasksOverlay.dtd PK *w.֬+locale/en-US/inspector/search/findFiles.dtd PK *U#77*locale/en-US/inspector/search/junkImgs.dtd PK si2Se#locale/en-US/inspector/contents.rdf PK b2ͮw:ZZ&locale/en-US/inspector/viewers/dom.dtd PK b2IW*locale/en-US/inspector/viewers/domNode.dtd PK b2&pp-locale/en-US/inspector/viewers/styleRules.dtd PK b2a(.locale/en-US/inspector/viewers/stylesheets.dtd PK b2:K5.locale/en-US/inspector/viewers/xblBindings.dtd PK b2u;  +locale/en-US/inspector/viewers/boxModel.dtd PK b2ai,0locale/en-US/inspector/viewers/computedStyle.dtd PK b2Ջ+locale/en-US/inspector/viewers/jsObject.dtd PK K|R2Ձ]+locale/en-US/inspector/inspector.properties inspectURL.title = Inspect URL inspectURL.message = Enter a URL: inspectWindow.error.message = Unable to switch to the requested window. inspectWindow.error.title = Inspect Window Error styleRuleNewProperty.title = New Style Rule styleRuleEditProperty.title = Edit Style Rule styleRulePropertyValue.message = Enter the property value: styleRulePropertyName.message = Enter the property name: sidebar.title = DOM Inspector sidebarInstalled = The sidebar is installed. newAttribute.title = New Attribute editAttribute.title = Edit Attribute enterAttrName.message = Enter the attribute name: enterAttrValue.message = Enter the attribute value: findNodesDocumentEnd.message = End of document reached. findNodesDocumentEnd.title = Find Nodes root.title = Subject 1 = Element 2 = Attribute 3 = Text 4 = CDATA Section 5 = Entity Reference 6 = Entity 7 = Processing Instruction 8 = Comment 9 = Document 10 = Document Type 11 = Document Fragment 12 = Notation PK ,73F!locale/fr/inspector/inspector.dtd PK ,7399locale/fr/inspector/prefs.dtd PK ,73 GGlocale/fr/inspector/editing.dtd PK ,73zvQ$locale/fr/inspector/tasksOverlay.dtd PK ,73(locale/fr/inspector/search/findFiles.dtd PK ,734fpp'locale/fr/inspector/search/junkImgs.dtd PK si2)9 locale/fr/inspector/contents.rdf PK ,73T #locale/fr/inspector/viewers/dom.dtd PK ,73\'locale/fr/inspector/viewers/domNode.dtd PK ,73*locale/fr/inspector/viewers/styleRules.dtd PK ,737Y+locale/fr/inspector/viewers/stylesheets.dtd PK ,73:+locale/fr/inspector/viewers/xblBindings.dtd PK ,73^ (locale/fr/inspector/viewers/boxModel.dtd PK ,73-locale/fr/inspector/viewers/computedStyle.dtd PK ,73_(locale/fr/inspector/viewers/jsObject.dtd PK ,73]!N(locale/fr/inspector/inspector.properties inspectURL.title = Examiner une URL inspectURL.message = Entrez une URL : inspectWindow.error.message = Impossible de basculer vers la fen\u00e8tre sp\u00e9cifi\u00e9e. inspectWindow.error.title = Erreur de l'inspection de la fen\u00e8tre styleRuleNewProperty.title = Nouvelle r\u00e8gle de style styleRuleEditProperty.title = \u00c9diter la r\u00e8gle de style styleRulePropertyValue.message = Entrez la valeur de la propri\u00e9t\u00e9 : styleRulePropertyName.message = Entrez le nom de la propri\u00e9t\u00e9 : sidebar.title = Inspecteur DOM sidebarInstalled = Le panneau \u00ab\u00a0Inspecteur DOM\u00a0\u00bb est install\u00e9 dans la barre lat\u00e9rale. newAttribute.title = Nouvel attribut editAttribute.title = \u00c9diter l'attribut enterAttrName.message = Entrez le nom de l'attribut : enterAttrValue.message = Entrez la valeur de l'attribut : findNodesDocumentEnd.message = La fin du document a \u00e9t\u00e9 atteinte. findNodesDocumentEnd.title = Trouver les n\u0153uds root.title = Sujet 1 = \u00c9l\u00e9ment 2 = Attribut 3 = Texte 4 = Section CDATA 5 = R\u00e9f\u00e9rence d'entit\u00e9 6 = Entit\u00e9 7 = Instruction de traitement 8 = Commentaire 9 = Document 10 = Type de document 11 = Fragment de document 12 = Notation PK 23E[[$locale/ga-IE/inspector/inspector.dtd PK 23L (( locale/ga-IE/inspector/prefs.dtd PK 23GGSS"locale/ga-IE/inspector/editing.dtd PK 23['locale/ga-IE/inspector/tasksOverlay.dtd PK 23F+locale/ga-IE/inspector/search/findFiles.dtd PK 23`.\\*locale/ga-IE/inspector/search/junkImgs.dtd PK si21g6w#locale/ga-IE/inspector/contents.rdf PK 23c&locale/ga-IE/inspector/viewers/dom.dtd PK 23T\*locale/ga-IE/inspector/viewers/domNode.dtd PK 23i-locale/ga-IE/inspector/viewers/styleRules.dtd PK 23a.locale/ga-IE/inspector/viewers/stylesheets.dtd PK 23Ul|.locale/ga-IE/inspector/viewers/xblBindings.dtd PK 23%|Cn+locale/ga-IE/inspector/viewers/boxModel.dtd PK 23e0locale/ga-IE/inspector/viewers/computedStyle.dtd PK 23/&+locale/ga-IE/inspector/viewers/jsObject.dtd PK 23Y+locale/ga-IE/inspector/inspector.properties inspectURL.title=Scr\u00FAdaigh URL inspectURL.message=Iontr\u00E1il URL: inspectWindow.error.message=N\u00ED f\u00E9idir aistri\u00FA go dt\u00ED an fhuinneog iarrtha. inspectWindow.error.title=Scr\u00FAdaigh Earr\u00E1id Fhuinneoga styleRuleNewProperty.title=Riail Nua St\u00EDle styleRuleEditProperty.title=Cuir Riail St\u00EDle in Eagar styleRulePropertyValue.message=Iontr\u00E1il luach an air\u00ED: styleRulePropertyName.message=Iontr\u00E1il ainm an air\u00ED: sidebar.title=Scr\u00FAdaitheoir DOM sidebarInstalled=T\u00E1 an barra taoibh suite\u00E1ilte. newAttribute.title=Aitreab\u00FAid Nua editAttribute.title=Cuir Aitreab\u00FAid in Eagar enterAttrName.message=Iontr\u00E1il ainm na haitreab\u00FAide: enterAttrValue.message=Iontr\u00E1il luach na haitreab\u00FAide: findNodesDocumentEnd.message=T\u00E1 deireadh na c\u00E1ip\u00E9ise sroichte. findNodesDocumentEnd.title=Aimsigh N\u00F3id root.title=\u00C1bhar 1=Eilimint 2=Aitreab\u00FAid 3=T\u00E9acs 4=Rann\u00E1n CDATA 5=Tagairt Aon\u00E1in 6=Aon\u00E1n 7=Ord\u00FA Pr\u00F3ise\u00E1la 8=N\u00F3ta 9=C\u00E1ip\u00E9is 10=Cine\u00E1l C\u00E1ip\u00E9ise 11=Bl\u00FAire de Ch\u00E1ip\u00E9is 12=Nodaireacht PK ;03"a!locale/hu/inspector/inspector.dtd PK ;03о:)  locale/hu/inspector/prefs.dtd PK ;030H]]locale/hu/inspector/editing.dtd PK ;03y-~$locale/hu/inspector/tasksOverlay.dtd PK <03"(locale/hu/inspector/search/findFiles.dtd PK <03|Jz%<<'locale/hu/inspector/search/junkImgs.dtd PK si2! locale/hu/inspector/contents.rdf PK <03Qi#locale/hu/inspector/viewers/dom.dtd PK <039'locale/hu/inspector/viewers/domNode.dtd PK <038ϸ*locale/hu/inspector/viewers/styleRules.dtd PK <03Z_+locale/hu/inspector/viewers/stylesheets.dtd PK <03Ma6+locale/hu/inspector/viewers/xblBindings.dtd PK <03JO  (locale/hu/inspector/viewers/boxModel.dtd PK <03-locale/hu/inspector/viewers/computedStyle.dtd PK <03:-""(locale/hu/inspector/viewers/jsObject.dtd PK ;03(locale/hu/inspector/inspector.properties inspectURL.title = URL vizsg\u00e1lata inspectURL.message = Adjon meg egy URL-t: inspectWindow.error.message = Nem lehets\u00e9ges a k\u00e9rt ablakra val\u00f3 v\u00e1lt\u00e1s. inspectWindow.error.title = Vizsg\u00e1lati ablak hiba styleRuleNewProperty.title = \u00daj st\u00edlus szab\u00e1lyk\u00e9szlet styleRuleEditProperty.title = St\u00edlus szab\u00e1lyk\u00e9szlet szerkeszt\u00e9se styleRulePropertyValue.message = Adja meg a tulajdons\u00e1g \u00e9rt\u00e9k\u00e9t: styleRulePropertyName.message = Adja meg a tulajdons\u00e1g nev\u00e9t: sidebar.title = DOM Inspector sidebarInstalled = Oldals\u00e1v telep\u00edtve. newAttribute.title = \u00daj attrib\u00fatum editAttribute.title = Attrib\u00fatum szerkeszt\u00e9se enterAttrName.message = Adja meg az attrib\u00fatum nev\u00e9t: enterAttrValue.message = Adja meg az attrib\u00fatum \u00e9rt\u00e9k\u00e9t: findNodesDocumentEnd.message = El\u00e9rte a dokumentum v\u00e9g\u00e9t. findNodesDocumentEnd.title = Csom\u00f3pont keres\u00e9se root.title = T\u00e1rgy 1 = Elem 2 = Attrib\u00fatum 3 = Sz\u00f6veg 4 = CDATA-r\u00e9sz 5 = Egyedhivatkoz\u00e1s 6 = Egyed 7 = Feldolgoz\u00e1si utas\u00edt\u00e1s 8 = Megjegyz\u00e9s 9 = Dokumentum 10 = Dokumentumt\u00edpus 11 = Dokumentumt\u00f6red\u00e9k 12 = Jel\u00f6l\u00e9s PK <03Z::$locale/nb-NO/inspector/inspector.dtd PK <03`( locale/nb-NO/inspector/prefs.dtd PK <03QcDD"locale/nb-NO/inspector/editing.dtd PK <03,0X'locale/nb-NO/inspector/tasksOverlay.dtd PK <03d3+locale/nb-NO/inspector/search/findFiles.dtd PK <03a;;*locale/nb-NO/inspector/search/junkImgs.dtd PK si2#locale/nb-NO/inspector/contents.rdf PK <03X ]`\\&locale/nb-NO/inspector/viewers/dom.dtd PK <03k(*locale/nb-NO/inspector/viewers/domNode.dtd PK <039 -locale/nb-NO/inspector/viewers/styleRules.dtd PK <03J.locale/nb-NO/inspector/viewers/stylesheets.dtd PK <03A.locale/nb-NO/inspector/viewers/xblBindings.dtd PK <03פ3+locale/nb-NO/inspector/viewers/boxModel.dtd PK <03'0locale/nb-NO/inspector/viewers/computedStyle.dtd PK <03J+locale/nb-NO/inspector/viewers/jsObject.dtd PK <03kj+locale/nb-NO/inspector/inspector.properties inspectURL.title = Inspiser adresse inspectURL.message = Skriv inn en adresse: inspectWindow.error.message = Klarte ikke bytte til forespurt vindu. inspectWindow.error.title = Feil i vindu styleRuleNewProperty.title = Ny stilregel ... styleRuleEditProperty.title = Rediger stilregel ... styleRulePropertyValue.message = Egenskapens verdi: styleRulePropertyName.message = Egenskapens navn: sidebar.title = DOM-inspekt\u00F8r sidebarInstalled = Sidestolpen er installert. newAttribute.title = Ny egenskap ... editAttribute.title = Rediger egenskap ... enterAttrName.message = Egenskapens navn: enterAttrValue.message = Egenskapens verdi: findNodesDocumentEnd.message = Slutten av dokumentet er n\u00E5dd. findNodesDocumentEnd.title = Finn noder root.title = Subjekt 1 = Element 2 = Egenskap 3 = Tekst 4 = CDATA-seksjon 5 = Entitetreferanse 6 = Entitet 7 = Prosesseringsinstruksjon 8 = Kommentar 9 = Dokument 10 = Dokumenttype 11 = Dokumentfragment 12 = Notasjon PK 8 3Gk ff!locale/pl/inspector/inspector.dtd PK 8 3lpT<<locale/pl/inspector/prefs.dtd PK 8 3WaBBlocale/pl/inspector/editing.dtd PK R3$$$locale/pl/inspector/tasksOverlay.dtd PK 8 3ܓ(locale/pl/inspector/search/findFiles.dtd PK 8 3Poo'locale/pl/inspector/search/junkImgs.dtd PK si2. locale/pl/inspector/contents.rdf PK 8 3}+#locale/pl/inspector/viewers/dom.dtd PK e33'locale/pl/inspector/viewers/domNode.dtd PK 8 3ҥy*locale/pl/inspector/viewers/styleRules.dtd PK 8 3&+locale/pl/inspector/viewers/stylesheets.dtd PK e33)jp+locale/pl/inspector/viewers/xblBindings.dtd PK 8 3ڡ(locale/pl/inspector/viewers/boxModel.dtd PK 8 3ň-locale/pl/inspector/viewers/computedStyle.dtd PK 8 3=OO(locale/pl/inspector/viewers/jsObject.dtd PK 8 3ϴ(locale/pl/inspector/inspector.properties inspectURL.title = Zbadaj URL inspectURL.message = Wprowad\u017A URL: inspectWindow.error.message = Prze\u0142\u0105czenie do wybranego okna jest niemo\u017Cliwe. inspectWindow.error.title = B\u0142\u0105d inspekcji okna styleRuleNewProperty.title = Nowa w\u0142asno\u015B\u0107 regu\u0142y stylu styleRuleEditProperty.title = Edycja w\u0142asno\u015Bci regu\u0142y stylu styleRulePropertyValue.message = Wprowad\u017A warto\u015B\u0107 w\u0142asno\u015Bci: styleRulePropertyName.message = Wprowad\u017A nazw\u0119 w\u0142asno\u015Bci: sidebar.title = Inspektor DOM sidebarInstalled = Panel Sidebar Inspektora DOM zosta\u0142 zainstalowany. newAttribute.title = Nowy atrybut editAttribute.title = Edycja atrybutu enterAttrName.message = Wprowad\u017A nazw\u0119 atrybutu: enterAttrValue.message = Wprowad\u017A warto\u015B\u0107 atrybutu: findNodesDocumentEnd.message = Zako\u0144czono wyszukiwanie w\u0119z\u0142\u00F3w. findNodesDocumentEnd.title = Znajd\u017A w\u0119z\u0142y root.title = Przedmiot 1 = Element 2 = Atrybut 3 = Tekst 4 = Sekcja CDATA 5 = Odwo\u0142anie encji 6 = Encja 7 = Instrukcje przetwarzania 8 = Komentarz 9 = Dokument 10 = Typ dokumentu 11 = Fragment dokumentu 12 = Notacja PK 803hii$locale/pt-BR/inspector/inspector.dtd PK 803x. locale/pt-BR/inspector/prefs.dtd PK 803| LL"locale/pt-BR/inspector/editing.dtd PK 803Fu'locale/pt-BR/inspector/tasksOverlay.dtd PK 8039[ٶ+locale/pt-BR/inspector/search/findFiles.dtd PK 803J"p00*locale/pt-BR/inspector/search/junkImgs.dtd PK si2H#locale/pt-BR/inspector/contents.rdf PK 803FЋ&locale/pt-BR/inspector/viewers/dom.dtd PK 803*51?*locale/pt-BR/inspector/viewers/domNode.dtd PK 803XrB-locale/pt-BR/inspector/viewers/styleRules.dtd PK 803 r.locale/pt-BR/inspector/viewers/stylesheets.dtd PK 803ݨ.locale/pt-BR/inspector/viewers/xblBindings.dtd PK 803Q+e  +locale/pt-BR/inspector/viewers/boxModel.dtd PK 803 0locale/pt-BR/inspector/viewers/computedStyle.dtd PK 803c+locale/pt-BR/inspector/viewers/jsObject.dtd PK ;;03߁]]+locale/pt-BR/inspector/inspector.properties inspectURL.title = Inspecionar URL inspectURL.message = Forne\u00e7a uma URL: inspectWindow.error.message = N\u00e3o foi poss\u00edvel mudar para a janela requisitada. inspectWindow.error.title = Erro ao inspecionar janela styleRuleNewProperty.title = Nova regra de estilo styleRuleEditProperty.title = Editar regra de estilo styleRulePropertyValue.message = Forne\u00e7a o valor da propriedade: styleRulePropertyName.message = Forne\u00e7a o nome da propriedade: sidebar.title = DOM Inspector sidebarInstalled = O painel est\u00e1 instalado. newAttribute.title = Novo atributo editAttribute.title = Editar atributo enterAttrName.message = Forne\u00e7a o nome do atributo: enterAttrValue.message = Forne\u00e7a o valor do atributo: findNodesDocumentEnd.message = Atingido o fim do documento. findNodesDocumentEnd.title = Localizar n\u00f3s root.title = Subject 1 = Elemento 2 = Atributo 3 = Texto 4 = Se\u00e7\u00e3o CDATA 5 = Refer\u00eancia de entidade 6 = Entidade 7 = Processando instru\u00e7\u00e3o 8 = Coment\u00e1rio 9 = Documento 10 = Tipo de documento 11 = Fragmento de documento 12 = Anota\u00e7\u00e3o PK 8 3 !locale/ru/inspector/inspector.dtd PK 8 34  locale/ru/inspector/prefs.dtd PK 8 3qlocale/ru/inspector/editing.dtd PK 8 3N44$locale/ru/inspector/tasksOverlay.dtd PK 8 35c(locale/ru/inspector/search/findFiles.dtd PK 8 34'locale/ru/inspector/search/junkImgs.dtd PK si2B locale/ru/inspector/contents.rdf PK 8 3^UfZgg#locale/ru/inspector/viewers/dom.dtd PK 8 3kN.'locale/ru/inspector/viewers/domNode.dtd PK 8 3*locale/ru/inspector/viewers/styleRules.dtd PK 8 3Áfbhh+locale/ru/inspector/viewers/stylesheets.dtd PK 8 3CS+locale/ru/inspector/viewers/xblBindings.dtd PK 8 3L(locale/ru/inspector/viewers/boxModel.dtd PK 8 3n&aa-locale/ru/inspector/viewers/computedStyle.dtd PK 8 3'ff(locale/ru/inspector/viewers/jsObject.dtd PK 8 3/" (locale/ru/inspector/inspector.propertiesstyleRulePropertyValue.message=\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430\: newAttribute.title=\u041D\u043E\u0432\u044B\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 styleRuleEditProperty.title=\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435 \u043E\u0431\u044A\u044F\u0432\u043B\u0435\u043D\u0438\u044F \u0441\u0442\u0438\u043B\u044F enterAttrName.message=\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u043C\u044F \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\: inspectURL.message=\u0412\u0432\u0435\u0434\u0438\u0442\u0435 URL\: findNodesDocumentEnd.message=\u0414\u043E\u0441\u0442\u0438\u0433\u043D\u0443\u0442 \u043A\u043E\u043D\u0435\u0446 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430. inspectURL.title=\u0418\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0438\u0435 URL editAttribute.title=\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 findNodesDocumentEnd.title=\u041F\u043E\u0438\u0441\u043A \u0443\u0437\u043B\u043E\u0432 sidebarInstalled=\u0411\u043E\u043A\u043E\u0432\u0430\u044F \u043F\u0430\u043D\u0435\u043B\u044C \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0430. inspectWindow.error.title=\u041E\u0448\u0438\u0431\u043A\u0430 \u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0438\u044F \u043E\u043A\u043D\u0430 12=\u041D\u043E\u0442\u0430\u0446\u0438\u044F sidebar.title=\u0418\u043D\u0441\u043F\u0435\u043A\u0442\u043E\u0440 DOM 11=\u0427\u0430\u0441\u0442\u044C \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430 10=\u0422\u0438\u043F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430 enterAttrValue.message=\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\: styleRulePropertyName.message=\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u043C\u044F \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430\: 9=\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442 8=\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439 7=\u0418\u043D\u0441\u0442\u0440\u0443\u043A\u0446\u0438\u044F \u043F\u043E \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0435 root.title=\u041E\u0431\u044C\u0435\u043A\u0442 6=\u0421\u0443\u0449\u043D\u043E\u0441\u0442\u044C 5=\u0421\u0441\u044B\u043B\u043A\u0430 \u043D\u0430 \u0441\u0443\u0449\u043D\u043E\u0441\u0442\u044C inspectWindow.error.message=\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u043F\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u0443\u043A\u0430\u0437\u0430\u043D\u043D\u043E\u0435 \u043E\u043A\u043D\u043E 4=\u0420\u0430\u0437\u0434\u0435\u043B CDATA 3=\u0422\u0435\u043A\u0441\u0442 2=\u0410\u0442\u0440\u0438\u0431\u0443\u0442 styleRuleNewProperty.title=\u041D\u043E\u0432\u043E\u0435 \u043E\u0431\u044A\u044F\u0432\u043B\u0435\u043D\u0438\u0435 \u0441\u0442\u0438\u043B\u044F 1=\u042D\u043B\u0435\u043C\u0435\u043D\u0442 PK 803A!locale/sk/inspector/inspector.dtd PK 803s_locale/sk/inspector/prefs.dtd PK 803&VVlocale/sk/inspector/editing.dtd PK 803$locale/sk/inspector/tasksOverlay.dtd PK 8031B(locale/sk/inspector/search/findFiles.dtd PK 803jܥ33'locale/sk/inspector/search/junkImgs.dtd PK si2 locale/sk/inspector/contents.rdf PK 803X,,#locale/sk/inspector/viewers/dom.dtd PK 803`Ē'locale/sk/inspector/viewers/domNode.dtd PK 803\UU*locale/sk/inspector/viewers/styleRules.dtd PK 803yp+locale/sk/inspector/viewers/stylesheets.dtd PK 8036 +locale/sk/inspector/viewers/xblBindings.dtd PK 803:""(locale/sk/inspector/viewers/boxModel.dtd PK 803wP/-locale/sk/inspector/viewers/computedStyle.dtd PK 803(locale/sk/inspector/viewers/jsObject.dtd PK ;;03ѳ;[[(locale/sk/inspector/inspector.properties inspectURL.title=Presk\u00FAma\u0165 URL inspectURL.message=Vlo\u017Eite URL: inspectWindow.error.message=Nepodarilo sa prepn\u00FA\u0165 na po\u017Eadovan\u00E9 okno inspectWindow.error.title=Presk\u00FAma\u0165 chyby okna styleRuleNewProperty.title=Nov\u00E9 pravidlo \u0161t\u00FDlu styleRuleEditProperty.title=\u00DAprava pravidla \u0161t\u00FDlu styleRulePropertyValue.message=Vlo\u017Ete hodnotu vlastnosti\: styleRulePropertyName.message=Vlo\u017Ete n\u00E1zov vlastnosti sidebar.title=DOM Inspektor sidebarInstalled=Bon\u00FD panel je nain\u0161talovan\u00FD newAttribute.title=Nov\u00FD atrib\u00FAt editAttribute.title=\u00DApravy atrib\u00FAtu enterAttrName.message=Vlo\u017Ete n\u00E1zov atrib\u00FAtu enterAttrValue.message=Vlo\u017Ete hodnotu atrib\u00FAtu findNodesDocumentEnd.message=Dosiahnut\u00FD koniec dokumentu findNodesDocumentEnd.title=H\u013Eada\u0165 uzol root.title = Predmet 1 = Prvok 2 = Atrib\u00FAt 3 = Text 4 = Sekcia CDATA 5 = Odkaz entity 6 = Entita 7 = Vykonu00E1vanie in\u0161trukcie 8 = Koment\u00E1r 9 = Dokument 10 = Typ dokumentu 11 = Fragment dokumentu 12 = Z\u00E1znam PK 8 3u>==$locale/sv-SE/inspector/inspector.dtd PK `"3[4c locale/sv-SE/inspector/prefs.dtd PK 8 3iїLL"locale/sv-SE/inspector/editing.dtd PK 8 3G##'locale/sv-SE/inspector/tasksOverlay.dtd PK 8 3xK+locale/sv-SE/inspector/search/findFiles.dtd PK 8 3-P&&*locale/sv-SE/inspector/search/junkImgs.dtd PK si2]#locale/sv-SE/inspector/contents.rdf PK ~4sxx&locale/sv-SE/inspector/viewers/dom.dtd PK ~4֠d*locale/sv-SE/inspector/viewers/domNode.dtd PK ~4`#-locale/sv-SE/inspector/viewers/styleRules.dtd PK ~4.locale/sv-SE/inspector/viewers/stylesheets.dtd PK ~4p=}.locale/sv-SE/inspector/viewers/xblBindings.dtd PK ~4[  +locale/sv-SE/inspector/viewers/boxModel.dtd PK ~4m0locale/sv-SE/inspector/viewers/computedStyle.dtd PK ~4b+locale/sv-SE/inspector/viewers/jsObject.dtd PK ~4'Ƈ+locale/sv-SE/inspector/inspector.properties inspectURL.title = Inspektera URL inspectURL.message = Ange en URL: inspectWindow.error.message = Det g\u00E5r inte att v\u00E4xla till det \u00F6nskade f\u00F6nstret. inspectWindow.error.title = Fel i inspektionsf\u00F6nstret styleRuleNewProperty.title = Ny stilregel styleRuleEditProperty.title = Redigera stilregel styleRulePropertyValue.message = Ange enhetens v\u00E4rde: styleRulePropertyName.message = Ange enhetens namn: sidebar.title = DOM Inspector sidebarInstalled = Sidof\u00E4ltet \u00E4r installerat. newAttribute.title = Nytt attribut editAttribute.title = Redigera attribut enterAttrName.message = Ange attributets namn: enterAttrValue.message = Ange attributets v\u00E4rde: findNodesDocumentEnd.message = Slut p\u00E5 dokumentet. findNodesDocumentEnd.title = Hitta noder root.title = \u00C4mne 1 = Element 2 = Attribut 3 = Text 4 = CDATA-sektion 5 = Enhetseferens 6 = Enhet 7 = Processar instruktion 8 = Kommentar 9 = Dokument 10 = Dokumenttyp 11 = Dokumentfragment 12 = Notering PK %73Ψ$locale/zh-CN/inspector/inspector.dtd PK %73zd` locale/zh-CN/inspector/prefs.dtd PK %73J@@"locale/zh-CN/inspector/editing.dtd PK %73 V  'locale/zh-CN/inspector/tasksOverlay.dtd PK %73ү+locale/zh-CN/inspector/search/findFiles.dtd PK %73j<*locale/zh-CN/inspector/search/junkImgs.dtd PK si2n#locale/zh-CN/inspector/contents.rdf PK %73 {&locale/zh-CN/inspector/viewers/dom.dtd PK %73|*locale/zh-CN/inspector/viewers/domNode.dtd PK %73PCj-locale/zh-CN/inspector/viewers/styleRules.dtd PK %73cwQQ.locale/zh-CN/inspector/viewers/stylesheets.dtd PK %73b .locale/zh-CN/inspector/viewers/xblBindings.dtd PK %73o+locale/zh-CN/inspector/viewers/boxModel.dtd PK %73oJJ0locale/zh-CN/inspector/viewers/computedStyle.dtd PK %73+locale/zh-CN/inspector/viewers/jsObject.dtd PK %73[|+locale/zh-CN/inspector/inspector.propertiesstyleRulePropertyValue.message=\u8BF7\u8F93\u5165\u5C5E\u6027\u503C\uFF1A newAttribute.title=\u65B0\u5EFA\u5C5E\u6027 styleRuleEditProperty.title=\u7F16\u8F91\u6837\u5F0F\u89C4\u5219 enterAttrName.message=\u8BF7\u8F93\u5165\u5C5E\u6027\u540D\u79F0\uFF1A inspectURL.message=\u8BF7\u8F93\u5165\u4E00\u4E2AURL\uFF1A findNodesDocumentEnd.message=\u5DF2\u8FBE\u5230\u6587\u6863\u5C3E\u90E8\u3002 inspectURL.title=\u67E5\u770BURL editAttribute.title=\u7F16\u8F91\u5C5E\u6027 findNodesDocumentEnd.title=\u67E5\u627E\u8282\u70B9 sidebarInstalled=\u4FA7\u680F\u5DF2\u5B89\u88C5 inspectWindow.error.title=\u67E5\u770B\u7A97\u53E3\u51FA\u9519 12=\u7B26\u53F7 sidebar.title=DOM \u67E5\u770B\u5668 11=\u6587\u6863\u6BB5 10=\u6587\u6863\u7C7B\u578B enterAttrValue.message=\u8BF7\u8F93\u5165\u5C5E\u6027\u503C\uFF1A styleRulePropertyName.message=\u8BF7\u8F93\u5165\u5C5E\u6027\u540D\u79F0\uFF1A 9=\u6587\u6863 8=\u8BF4\u660E 7=\u5904\u7406\u6307\u4EE4 root.title=\u6807\u9898 6=\u5B9E\u4F53 5=\u5B9E\u4F53\u5F15\u7528 inspectWindow.error.message=\u65E0\u6CD5\u5207\u6362\u81F3\u8BF7\u6C42\u7684\u7A97\u53E3\u3002 4=CDATA \u6BB5 3=\u6587\u5B57 2=\u5C5E\u6027 styleRuleNewProperty.title=\u65B0\u6837\u5F0F\u89C4\u5219 1=\u5143\u7D20 PK -03U\$locale/zh-TW/inspector/inspector.dtd PK -03 [Z locale/zh-TW/inspector/prefs.dtd PK -03=:g"locale/zh-TW/inspector/editing.dtd PK -03ʠ<%PP'locale/zh-TW/inspector/tasksOverlay.dtd PK -03}w+locale/zh-TW/inspector/search/findFiles.dtd PK -03ɯXX*locale/zh-TW/inspector/search/junkImgs.dtd PK si2JN#locale/zh-TW/inspector/contents.rdf PK -03 W&locale/zh-TW/inspector/viewers/dom.dtd PK -03q;*locale/zh-TW/inspector/viewers/domNode.dtd PK -03 gU++-locale/zh-TW/inspector/viewers/styleRules.dtd PK -03 .locale/zh-TW/inspector/viewers/stylesheets.dtd PK -03ed$$.locale/zh-TW/inspector/viewers/xblBindings.dtd PK -033+locale/zh-TW/inspector/viewers/boxModel.dtd PK -03q*0locale/zh-TW/inspector/viewers/computedStyle.dtd PK -03kK+locale/zh-TW/inspector/viewers/jsObject.dtd PK -03+locale/zh-TW/inspector/inspector.propertiesinspectURL.title=\u89c0\u5bdf\u7db2\u5740 URL inspectURL.message=\u8f38\u5165\u7db2\u5740 URL: inspectWindow.error.message=\u7121\u6cd5\u5207\u81f3\u8981\u6c42\u8996\u7a97\u3002 inspectWindow.error.title=\u89c0\u5bdf\u8996\u7a97\u767c\u751f\u932f\u8aa4 styleRuleNewProperty.title=\u65b0\u6a23\u5f0f\u898f\u5247 styleRuleEditProperty.title=\u7de8\u8f2f\u6a23\u5f0f\u898f\u5247 styleRulePropertyValue.message=\u8f38\u5165 Property \u8a2d\u5b9a\u503c: styleRulePropertyName.message=\u8f38\u5165 Property \u540d\u7a31: sidebar.title=DOM \u89c0\u5bdf\u5668 sidebarInstalled=\u8cc7\u8a0a\u65b9\u584a\u5217\u6a21\u7d44\u5df2\u5b89\u88dd\u3002 newAttribute.title=\u65b0\u589e\u5c6c\u6027 editAttribute.title=\u7de8\u8f2f\u5c6c\u6027 enterAttrName.message=\u8f38\u5165\u5c6c\u6027\u540d\u7a31: enterAttrValue.message=\u8f38\u5165\u5c6c\u6027(Attribute)\u540d\u7a31: findNodesDocumentEnd.message=\u5df2\u5230\u6587\u4ef6\u5e95\u7aef\u3002 findNodesDocumentEnd.title=\u5c0b\u627e\u7bc0\u9ede root.title=\u6a19\u984c 1=\u5143\u7d20(Element) 2=\u5c6c\u6027(Attribute) 3=\u6587\u5b57 4=CDATA \u5340\u6bb5 5=\u5be6\u9ad4\u53c3\u8003(Entity Ref) 6=\u5be6\u9ad4(Entity) 7=\u8655\u7406\u6307\u4ee4 8=\u8a3b\u89e3 9=\u6587\u4ef6 10=\u6587\u4ef6\u578b\u614b 11=\u6587\u4ef6\u7247\u6bb5 12=\u6ce8\u610f PK 4SScontent/inspector/inspector.xul %dtd1; %dtd2; ]> PK 3y2qzAAcontent/inspector/inspector.js/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Joe Hewitt (original author) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ /*************************************************************** * InspectorApp ------------------------------------------------- * The primary object that controls the Inspector application. ****************************************************************/ //////////// global variables ///////////////////// var inspector; //////////// global constants //////////////////// const kSearchRegURL = "resource:///res/inspector/search-registry.rdf"; const kWindowDataSourceCID = "@mozilla.org/rdf/datasource;1?name=window-mediator"; const kClipboardHelperCID = "@mozilla.org/widget/clipboardhelper;1"; const kPromptServiceCID = "@mozilla.org/embedcomp/prompt-service;1"; const nsIWebNavigation = Components.interfaces.nsIWebNavigation; ////////////////////////////////////////////////// window.addEventListener("load", InspectorApp_initialize, false); window.addEventListener("unload", InspectorApp_destroy, false); function InspectorApp_initialize() { inspector = new InspectorApp(); // window.arguments may be either a string or a node. // If passed via a command line handler, it will be a uri string. // If passed via navigator hooks, it will be a dom node to inspect. var initNode, initURI; if (window.arguments && window.arguments.length) { if (typeof window.arguments[0] == "string") { initURI = window.arguments[0]; } else if (window.arguments[0] instanceof Components.interfaces.nsIDOMNode) { initNode = window.arguments[0]; } } inspector.initialize(initNode, initURI); } function InspectorApp_destroy() { inspector.destroy(); } //////////////////////////////////////////////////////////////////////////// //// class InspectorApp function InspectorApp() { } InspectorApp.prototype = { //////////////////////////////////////////////////////////////////////////// //// Initialization mSearchService: null, mShowBrowser: false, mClipboardHelper: null, mPromptService: null, get document() { return this.mDocPanel.viewer.subject }, get searchRegistry() { return this.mSearchService }, get panelset() { return this.mPanelSet; }, initialize: function(aTarget, aURI) { this.mInitTarget = aTarget; //this.initSearch(); var el = document.getElementById("bxBrowser"); el.addEventListener("pageshow", BrowserPageShowListener, true); this.setBrowser(false, true); //this.setSearch(false, true); this.mClipboardHelper = XPCU.getService(kClipboardHelperCID, "nsIClipboardHelper"); this.mPromptService = XPCU.getService(kPromptServiceCID, "nsIPromptService"); this.mPanelSet = document.getElementById("bxPanelSet"); this.mPanelSet.addObserver("panelsetready", this, false); this.mPanelSet.initialize(); if (aURI) { this.gotoURL(aURI); } }, destroy: function() { InsUtil.persistAll("bxDocPanel"); InsUtil.persistAll("bxObjectPanel"); }, //////////////////////////////////////////////////////////////////////////// //// Viewer Panels initViewerPanels: function() { this.mDocPanel = this.mPanelSet.getPanel(0); this.mDocPanel.addObserver("subjectChange", this, false); this.mObjectPanel = this.mPanelSet.getPanel(1); if (this.mInitTarget) { if (this.mInitTarget.nodeType == Node.DOCUMENT_NODE) this.setTargetDocument(this.mInitTarget); else if (this.mInitTarget.nodeType == Node.ELEMENT_NODE) { this.setTargetDocument(this.mInitTarget.ownerDocument); this.mDocPanel.params = this.mInitTarget; } this.mInitTarget = null; } }, onEvent: function(aEvent) { switch (aEvent.type) { case "panelsetready": this.initViewerPanels(); break; case "subjectChange": if (aEvent.target == this.mDocPanel.viewer && aEvent.subject && "location" in aEvent.subject) { this.locationText = aEvent.subject.location; // display document url } } }, //////////////////////////////////////////////////////////////////////////// //// UI Commands doViewerCommand: function(aCommand) { this.mPanelSet.execCommand(aCommand); }, showOpenURLDialog: function() { var bundle = this.mPanelSet.stringBundle; var msg = bundle.getString("inspectURL.message"); var title = bundle.getString("inspectURL.title"); var url = { value: "http://" }; var dummy = { value: false }; var go = this.mPromptService.prompt(window, title, msg, url, null, dummy); if (go) { this.gotoURL(url.value); } }, showPrefsDialog: function() { goPreferences("advancedItem", "chrome://inspector/content/prefs/pref-inspector.xul", "inspector"); }, toggleBrowser: function(aToggleSplitter) { this.setBrowser(!this.mShowBrowser, aToggleSplitter) }, setBrowser: function(aValue, aToggleSplitter) { this.mShowBrowser = aValue; if (aToggleSplitter) this.openSplitter("Browser", aValue); var cmd = document.getElementById("cmdToggleBrowser"); cmd.setAttribute("checked", aValue); }, toggleSearch: function(aToggleSplitter) { this.setSearch(!this.mShowSearch, aToggleSplitter); }, setSearch: function(aValue, aToggleSplitter) { this.mShowSearch = aValue; if (aToggleSplitter) this.openSplitter("Search", aValue); var cmd = document.getElementById("cmdToggleSearch"); cmd.setAttribute("checked", aValue); }, openSplitter: function(aName, aTruth) { var splitter = document.getElementById("spl" + aName); if (aTruth) splitter.open(); else splitter.close(); }, /* XXXcaa The following code needs to evaluated. What does it do? Why does nobody call it? If deemed necessary, turn it back on with the right callers, and localize it. */ /* runSearch: function() { var path = null; // TODO: should persist last path chosen in a pref var file = FilePickerUtils.pickFile("Find Search File", path, ["filterXML"], "Open"); if (file) { var ioService = XPCU.getService("@mozilla.org/network/io-service;1","nsIIOService"); var fileHandler = XPCU.QI(ioService.getProtocolHandler("file"), "nsIFileProtocolHandler"); var url = fileHandler.getURLSpecFromFile(file); this.startSearchModule(url); } }, viewSearchItem: function() { if (this.mCurrentSearch.canViewItems) window.openDialog("chrome://inspector/content/utilWindow.xul", "viewItem", "chrome,resizable"); }, doViewSearchItem: function(aWindow) { var idx = this.getSelectedSearchIndex(); var el = this.mCurrentSearch.viewItemAt(idx); aWindow.document.title = this.mCurrentSearch.getItemDescription(idx); aWindow.document.getElementById("bxCenter").appendChild(el); }, editSearchItem: function() { }, onSearchTreeClick: function(aEvent) { if (aEvent.detail == 2) { // double click this.viewSearchItem(); } }, copySearchItemLine: function() { var mod = this.mSearchService.currentModule; var idx = this.mSearchService.getSelectedIndex(0); var text = mod.getItemText(idx); this.mClipboardHelper.copyString(text); }, // XXX what is this? It doesn't seem to get called from anywhere? copySearchItemAll: function() { var text = this.getAllSearchItemText(); this.mClipboardHelper.copyString(text); }, saveSearchItemText: function() { var target = FilePickerUtils.pickFile("Save Results As", null, ["filterAll", "filterText"], "Save"); var text = this.getAllSearchItemText(); var file = new File(target.path); file.open('w'); file.write(text); file.close(); }, getAllSearchItemText: function() { var mod = this.mSearchService.currentModule; var len = mod.resultCount; var text = ""; for (var i = 0; i < len; i++) { text += mod.getItemText(i) + "\r"; } return text; }, */ exit: function() { window.close(); // Todo: remove observer service here }, //////////////////////////////////////////////////////////////////////////// //// Navigation gotoTypedURL: function() { var url = document.getElementById("tfURLBar").value; this.gotoURL(url); }, gotoURL: function(aURL, aNoSaveHistory) { this.mPendingURL = aURL; this.mPendingNoSave = aNoSaveHistory; this.browseToURL(aURL); this.setBrowser(true, true); }, browseToURL: function(aURL) { try { this.webNavigation.loadURI(aURL, nsIWebNavigation.LOAD_FLAGS_NONE, null, null, null); } catch(ex) { // nsIWebNavigation.loadURI will spit out an appropriate user prompt, so // we don't need to do anything here. See nsDocShell::DisplayLoadError() } }, goToWindow: function(aMenuitem) { this.setTargetWindowById(aMenuitem.id); }, setTargetWindowById: function(aResId) { var windowManager = XPCU.getService(kWindowDataSourceCID, "nsIWindowDataSource"); var win = windowManager.getWindowForResource(aResId); if (win) { this.setTargetWindow(win); this.setBrowser(false, true); } else { var bundle = this.mPanelSet.stringBundle; var msg = bundle.getString("inspectWindow.error.message"); var title = bundle.getString("inspectWindow.error.title"); this.mPromptService.alert(window, title, msg); } }, setTargetWindow: function(aWindow) { this.setTargetDocument(aWindow.document); }, setTargetDocument: function(aDoc) { this.mDocPanel.subject = aDoc; }, get webNavigation() { var browser = document.getElementById("ifBrowser"); return browser.webNavigation; }, //////////////////////////////////////////////////////////////////////////// //// UI Labels getters and setters get locationText() { return document.getElementById("tfURLBar").value; }, set locationText(aText) { document.getElementById("tfURLBar").value = aText; }, get statusText() { return document.getElementById("txStatus").value; }, set statusText(aText) { document.getElementById("txStatus").value = aText; }, get progress() { return document.getElementById("pmStatus").value; }, set progress(aPct) { document.getElementById("pmStatus").value = aPct; }, /* XXXcaa -- What is this? get searchTitle(aTitle) { return document.getElementById("splSearch").label; }, set searchTitle(aTitle) { var splitter = document.getElementById("splSearch"); splitter.setAttribute("label", "Search" + (aTitle ? " - " + aTitle : "")); }, */ //////////////////////////////////////////////////////////////////////////// //// Document Loading documentLoaded: function() { this.setTargetWindow(_content); var url = this.webNavigation.currentURI.spec; // put the url into the urlbar this.locationText = url; // add url to the history, unless explicity told not to if (!this.mPendingNoSave) this.addToHistory(url); this.mPendingURL = null; this.mPendingNoSave = null; }, //////////////////////////////////////////////////////////////////////////// //// Search /* initSearch: function() { var ss = new inSearchService(); this.mSearchService = ss; ss.addSearchObserver(this); ss.resultsTree = document.getElementById("trSearch"); ss.contextMenu = document.getElementById("ppSearchResults"); ss.contextMenuInsertPt = document.getElementById("ppSearchResults-insertion"); ss.contextMenuInsert = inSearchService.INSERT_BEFORE; }, startSearchModule: function(aModuleURL) { this.mSearchService.startModule(aModuleURL); }, clearSearchResults: function() { this.searchTitle = null; this.statusText = ""; this.progress = 0; this.mSearchService.clearSearch(); }, //////////////////////////////////////////////////////////////////////////// //// interface inISearchObserver onSearchStart: function(aModule) { this.searchTitle = aModule.title; this.toggleSearch(true, true); }, onSearchResult: function(aModule) { if (aModule.isPastMilestone) { this.statusText = "Searching - " + aModule.resultCount + " results found."; // XXX localize this.progress = aModule.progressPercent; } }, onSearchEnd: function(aModule, aResult) { var diff = Math.round(aModule.elapsed / 100) / 10; this.progress = 100; this.statusText = "Search complete - " + aModule.resultCount + " results found ("+diff+"s)"; // XXX localize }, onSearchError: function(aModule, aMessage) { alert("Unable to complete this search due to the following error:\n" + aMessage); }, */ //////////////////////////////////////////////////////////////////////////// //// History addToHistory: function(aURL) { }, //////////////////////////////////////////////////////////////////////////// //// Uncategorized get isViewingContent() { return this.mPanelSet.getPanel(0).subject != null; }, fillInTooltip: function(tipElement) { var retVal = false; var textNode = document.getElementById("txTooltip"); if (textNode) { try { var tipText = tipElement.getAttribute("tooltiptext"); if (tipText != "") { textNode.setAttribute("value", tipText); retVal = true; } } catch (e) { } } return retVal; }, initPopup: function(aPopup) { var items = aPopup.getElementsByTagName("menuitem"); var js, fn, item; for (var i = 0; i < items.length; i++) { item = items[i]; fn = "isDisabled" in item ? item.isDisabled : null; if (!fn) { js = item.getAttribute("isDisabled"); if (js) { fn = new Function(js); item.isDisabled = fn; } else { item.isDisabled = null; // to prevent annoying "strict" warning messages } } if (fn) { if (item.isDisabled()) item.setAttribute("disabled", "true"); else item.removeAttribute("disabled"); } fn = null; } }, emptyChildren: function(aNode) { while (aNode.childNodes.length > 0) { aNode.removeChild(aNode.lastChild); } }, onSplitterOpen: function(aSplitter) { if (aSplitter.id == "splBrowser") { this.setBrowser(aSplitter.isOpened, false); } else if (aSplitter.id == "splSearch") { this.setSearch(aSplitter.isOpened, false); } }, // needed by overlayed commands from viewer to get references to a specific // viewer object by name getViewer: function(aUID) { return this.mPanelSet.registry.getViewerByUID(aUID); } }; //////////////////////////////////////////////////////////////////////////// //// event listeners function BrowserPageShowListener(aEvent) { // since we will also get pageshow events for frame documents, // make sure we respond to the top-level document load if (aEvent.target.defaultView == _content) inspector.documentLoaded(); } function UtilWindowOpenListener(aWindow) { inspector.doViewSearchItem(aWindow); } PK y00  content/inspector/inspector.css/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Joe Hewitt (original author) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ @import url("chrome://inspector/content/extensions/titledSplitter.css"); @import url("chrome://inspector/content/extensions/multipanel.css"); @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); *[hide="true"] { visibility: hidden; } domi-panelset { -moz-binding: url("chrome://inspector/content/inspector.xml#panelset"); display: -moz-box; } domi-panel { -moz-binding: url("chrome://inspector/content/inspector.xml#panel"); display: -moz-box; } #ppsViewerPopupset { display: none; } .tree-list > treecol, .tree-list > .tree-columns > treecol { -moz-binding: none; background-color: transparent !important; margin: 0px !important; border: none !important; padding: 0px !important; } .tree-nocolpicker > .tree-columns > .tree-columnpicker { visibility: collapse; } PK e3$t7~7~content/inspector/inspector.xml null null [] -1 null return this.getElementsByTagName("domi-panel"); return this.panels.length; = 0; else if (aCommand == "cmdEditRedo") { enabled = this.mCommandPtr+1 < this.mCommandStack.length; if (!enabled && (this.mCommandPtr > -1)) { var lastCmd = this.mCommandStack[this.mCommandPtr]; enabled = ((lastCmd instanceof nsITransactionManager) && (lastCmd.numberOfRedoItems > 0)); } } else { if (this.focusedPanel && this.focusedPanel.viewer) { enabled = this.focusedPanel.viewer.isCommandEnabled(aCommand); } } this.setCommandAttribute(aCommand, "disabled", !enabled); ]]> = 0) { var command = this.mCommandStack[this.mCommandPtr]; if ((command instanceof nsITransactionManager) && (command.numberOfUndoItems > 0)) { command.undoTransaction(); if (command.numberOfUndoItems == 0) { --this.mCommandPtr; } } else { --this.mCommandPtr; //try { command.undoCommand(); /*} catch (ex) { dump("Unable to successfully undo command.\n"); return; }*/ } this.updateCommand("cmdEditUndo"); this.updateCommand("cmdEditRedo"); } ]]> = -1) { if (!((command instanceof nsITransactionManager)&&(command.numberOfRedoItems > 0))) { ++this.mCommandPtr; command = this.mCommandStack[this.mCommandPtr]; } if ((command instanceof nsITransactionManager)&&(command.numberOfRedoItems > 0)) { command.redoTransaction(); } else { try { command.doCommand(); } catch (ex) { dump("Unable to successfully redo command.\n"); return; } } this.updateCommand("cmdEditUndo"); this.updateCommand("cmdEditRedo"); } ]]> null null null null null null null return this.mLinkedPanel; if (this.mLinkedPanel) this.mLinkedPanel.removeObserver("viewerChange", this); this.mLinkedPanel = val; if (val) val.addObserver("viewerChange", this); null null null PK 4Y"F==content/inspector/sidebar.xul %dtd1; %dtd2; ]> PK ;4;%content/inspector/tasksOverlay-sb.xul PK X2-%content/inspector/tasksOverlay-tb.xul PK n+"T?~ ~ $content/inspector/editingOverlay.xul PK n+NYK content/inspector/utilWindow.xul PK y0r$$content/inspector/Flasher.js/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Joe Hewitt (original author) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ /*************************************************************** * Flasher --------------------------------------------------- * Object for controlling a timed flashing animation which * paints a border around an element. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * REQUIRED IMPORTS: ****************************************************************/ //////////// global variables ///////////////////// var gFlasherRegistry = []; //////////// global constants //////////////////// //////////////////////////////////////////////////////////////////////////// //// class Flasher function Flasher(aColor, aThickness, aDuration, aSpeed, aInvert) { this.mShell = XPCU.getService("@mozilla.org/inspector/flasher;1", "inIFlasher"); this.mShell.color = aColor; this.mShell.thickness = aThickness; this.mShell.invert = aInvert; this.duration = aDuration; this.mSpeed = aSpeed; this.register(); } Flasher.prototype = { //////////////////////////////////////////////////////////////////////////// //// Initialization mFlashTimeout: null, mElement:null, mRegistryId: null, mFlashes: 0, mStartTime: 0, mDuration: 0, mSpeed: 0, //////////////////////////////////////////////////////////////////////////// //// Properties get flashing() { return this.mFlashTimeout != null; }, get element() { return this.mElement; }, set element(val) { if (val && val.nodeType == Node.ELEMENT_NODE) { this.mElement = val; this.mShell.scrollElementIntoView(val); } else throw "Invalid node type."; }, get color() { return this.mShell.color; }, set color(aVal) { return this.mShell.color = aVal; }, get thickness() { return this.mShell.thickness; }, set thickness(aVal) { this.mShell.thickness = aVal; }, get duration() { return this.mDuration; }, set duration(aVal) { this.mDuration = aVal; }, get speed() { return this.mSpeed; }, set speed(aVal) { this.mSpeed = aVal; }, get invert() { return this.mShell.invert; }, set invert(aVal) { this.mShell.invert = aVal; }, // ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: // :::::::::::::::::::: Methods :::::::::::::::::::::::::::: // ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: register: function() { var length = gFlasherRegistry.length; gFlasherRegistry[length] = this; this.mRegistryId = length; }, start: function(aDuration, aSpeed, aHold) { this.mUDuration = aDuration ? aDuration*1000 : this.mDuration; this.mUSpeed = aSpeed ? aSpeed : this.mSpeed this.mHold = aHold; this.mFlashes = 0; this.mStartTime = new Date(); this.doFlash(); }, doFlash: function() { if (this.mHold || this.mFlashes%2) { this.paintOn(); } else { this.paintOff(); } this.mFlashes++; if (this.mUDuration < 0 || new Date() - this.mStartTime < this.mUDuration) { this.mFlashTimeout = window.setTimeout("gFlasherRegistry["+this.mRegistryId+"].doFlash()", this.mUSpeed); } else { this.stop(); } }, stop: function() { if (this.flashing) { window.clearTimeout(this.mFlashTimeout); this.mFlashTimeout = null; this.paintOff(); } }, paintOn: function() { this.mShell.drawElementOutline(this.mElement); }, paintOff: function() { this.mShell.repaintElement(this.mElement); } }; PK X2~G#content/inspector/ViewerRegistry.js/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Joe Hewitt (original author) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ /*************************************************************** * ViewerRegistry ----------------------------------------------- * The central registry where information about all installed * viewers is kept. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * REQUIRED IMPORTS: * chrome://inspector/content/jsutil/xpcom/XPCU.js * chrome://inspector/content/jsutil/rdf/RDFU.js ****************************************************************/ //////////// global variables ///////////////////// //////////// global constants //////////////////// const kViewerURLPrefix = "chrome://inspector/content/viewers/"; const kViewerRegURL = "chrome://inspector/content/res/viewer-registry.rdf"; //////////////////////////////////////////////////////////////////////////// //// class ViewerRegistry function ViewerRegistry() // implements inIViewerRegistry { this.mViewerHash = {}; } ViewerRegistry.prototype = { //////////////////////////////////////////////////////////////////////////// //// interface inIViewerRegistry // not yet formalized... //////////////////////////////////////////////////////////////////////////// //// Initialization mDS: null, mObserver: null, mViewerDS: null, mViewerHash: null, mFilters: null, get url() { return this.mURL; }, //// Loading Methods load: function(aURL, aObserver) { this.mURL = aURL; this.mObserver = aObserver; RDFU.loadDataSource(aURL, new ViewerRegistryLoadObserver(this)); }, onError: function(aStatus, aErrorMsg) { this.mObserver.onViewerRegistryLoadError(aStatus, aErrorMsg); }, onLoad: function(aDS) { this.mDS = aDS; this.prepareRegistry(); this.mObserver.onViewerRegistryLoad(); }, prepareRegistry: function() { this.mViewerDS = RDFArray.fromContainer(this.mDS, "inspector:viewers", kInspectorNSURI); // create and cache the filter functions var js, fn; this.mFilters = []; for (var i = 0; i < this.mViewerDS.length; ++i) { js = this.getEntryProperty(i, "filter"); try { fn = new Function("object", js); } catch (ex) { fn = new Function("return false"); debug("### ERROR - Syntax error in filter for viewer \"" + this.getEntryProperty(i, "description") + "\"\n"); } this.mFilters.push(fn); } }, /////////////////////////////////////////////////////////////////////////// // Returns the absolute url where the xul file for a viewer can be found. // // @param long aIndex - the index of the entry representing the viewer // @return wstring - the fully cannonized url /////////////////////////////////////////////////////////////////////////// getEntryURL: function(aIndex) { var uid = this.getEntryProperty(aIndex, "uid"); return kViewerURLPrefix + uid + "/" + uid + ".xul"; }, //// Lookup Methods /////////////////////////////////////////////////////////////////////////// // Searches the viewer registry for all viewers that can view a particular // object. // // @param Object aObject - the object being searched against // @param String aPanelId - the id of the panel requesting viewers // @return nsIRDFResource[] - array of entries in the viewer registry /////////////////////////////////////////////////////////////////////////// findViewersForObject: function(aObject, aPanelId) { // check each entry in the registry var len = this.mViewerDS.length; var entry; var urls = []; for (var i = 0; i < len; ++i) { if (this.getEntryProperty(i, "panels").indexOf(aPanelId) == -1) { continue; } if (this.objectMatchesEntry(aObject, i)) { if (this.getEntryProperty(i, "important")) { urls.unshift(i); } else { urls.push(i); } } } return urls; }, /////////////////////////////////////////////////////////////////////////// // Determines if an object is eligible to be viewed by a particular viewer. // // @param Object aObject - the object being checked for eligibility // @param long aIndex - the index of the entry // @return boolean - true if object can be viewed /////////////////////////////////////////////////////////////////////////// objectMatchesEntry: function(aObject, aIndex) { return this.mFilters[aIndex](aObject); }, /////////////////////////////////////////////////////////////////////////// // Notifies the registry that a viewer has been instantiated, and that // it corresponds to a particular entry in the viewer registry. // // @param /////////////////////////////////////////////////////////////////////////// cacheViewer: function(aViewer, aIndex) { var uid = this.getEntryProperty(aIndex, "uid"); this.mViewerHash[uid] = { viewer: aViewer, entry: aIndex }; }, uncacheViewer: function(aViewer) { delete this.mViewerHash[aViewer.uid]; }, // for previously loaded viewers only getViewerByUID: function(aUID) { return this.mViewerHash[aUID].viewer; }, // for previously loaded viewers only getEntryForViewer: function(aViewer) { return this.mViewerHash[aViewer.uid].entry; }, // for previously loaded viewers only getEntryByUID: function(aUID) { return this.mViewerHash[aUID].aIndex; }, getEntryProperty: function(aIndex, aProp) { return this.mViewerDS.get(aIndex, aProp); }, getEntryCount: function() { return this.mViewerDS.length; }, //////////////////////////////////////////////////////////////////////////// //// Viewer Registration addNewEntry: function(aUID, aDescription, aFilter) { }, removeEntry: function(aIndex) { }, saveRegistry: function() { } }; //////////////////////////////////////////////////////////////////////////// //// Listener Objects function ViewerRegistryLoadObserver(aTarget) { this.mTarget = aTarget; } ViewerRegistryLoadObserver.prototype = { mTarget: null, onError: function(aStatus, aErrorMsg) { this.mTarget.onError(aStatus, aErrorMsg); }, onDataSourceReady: function(aDS) { this.mTarget.onLoad(aDS); } }; PK m4Fcontent/inspector/utils.js/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Joe Hewitt (original author) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ /*************************************************************** * Inspector Utils ---------------------------------------------- * Common functions and constants used across the app. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * REQUIRED IMPORTS: * chrome://inspector/content/jsutil/xpcom/XPCU.js * chrome://inspector/content/jsutil/rdf/RDFU.js ****************************************************************/ //////////// global constants //////////////////// const kInspectorNSURI = "http://www.mozilla.org/inspector#"; const kXULNSURI = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; const kHTMLNSURI = "http://www.w3.org/1999/xhtml"; const nsITransactionManager = Components.interfaces.nsITransactionManager; var InsUtil = { /****************************************************************************** * Convenience function for calling nsIChromeRegistry::convertChromeURL *******************************************************************************/ convertChromeURL: function(aURL) { var uri = XPCU.getService("@mozilla.org/network/io-service;1", "nsIIOService") .newURI(aURL, null, null); var reg = XPCU.getService("@mozilla.org/chrome/chrome-registry;1", "nsIChromeRegistry"); return reg.convertChromeURL(uri); }, /****************************************************************************** * Convenience function for getting a literal value from nsIRDFDataSource::GetTarget *******************************************************************************/ getDSProperty: function(/*nsISupports*/ aDS, /*String*/ aId, /*String*/ aPropName) { var ruleRes = gRDF.GetResource(aId); var ds = XPCU.QI(aDS, "nsIRDFDataSource"); // just to be sure var propRes = ds.GetTarget(ruleRes, gRDF.GetResource(kInspectorNSURI+aPropName), true); propRes = XPCU.QI(propRes, "nsIRDFLiteral"); return propRes.Value; }, /****************************************************************************** * Convenience function for persisting an element's persisted attributes. *******************************************************************************/ persistAll: function(aId) { var el = document.getElementById(aId); if (el) { var attrs = el.getAttribute("persist").split(" "); for (var i = 0; i < attrs.length; ++i) { document.persist(aId, attrs[i]); } } } }; // ::::::: debugging utilities :::::: function debug(aText) { // XX comment out to reduce noise consoleDump(aText); //dump(aText); } // dump text to the Error Console function consoleDump(aText) { var csClass = Components.classes['@mozilla.org/consoleservice;1']; var cs = csClass.getService(Components.interfaces.nsIConsoleService); cs.logStringMessage(aText); } function dumpDOM(aNode, aIndent) { if (!aIndent) aIndent = ""; debug(aIndent + "<" + aNode.localName + "\n"); var attrs = aNode.attributes; var attr; for (var a = 0; a < attrs.length; ++a) { attr = attrs[a]; debug(aIndent + " " + attr.nodeName + "=\"" + attr.nodeValue + "\"\n"); } debug(aIndent + ">\n"); aIndent += " "; for (var i = 0; i < aNode.childNodes.length; ++i) dumpDOM(aNode.childNodes[i], aIndent); } var gStringBundle; // convert nodeType constant into human readable form function nodeTypeToText (nodeType) { if (!gStringBundle) { var strBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"]. getService(Components.interfaces.nsIStringBundleService); gStringBundle = strBundleService.createBundle("chrome://inspector/locale/inspector.properties"); } if (gStringBundle) { const nsIDOMNode = Components.interfaces.nsIDOMNode; if (nodeType >= nsIDOMNode.ELEMENT_NODE && nodeType <= nsIDOMNode.NOTATION_NODE) { return gStringBundle.GetStringFromName(nodeType); } } return nodeType; } // ::::::: nsITransaction helper functions ::::::: function txnQueryInterface(theUID, theResult) { const nsITransaction = Components.interfaces.nsITransaction; const nsISupports = Components.interfaces.nsISupports; if (theUID == nsITransaction || theUID == nsISupports) { return this; } return null; } function txnMerge() { return false; } function txnRedoTransaction() { this.doTransaction(); } PK y0B|content/inspector/hooks.js/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Joe Hewitt (original author) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ function inspectDOMDocument(aDocument, aModal) { window.openDialog("chrome://inspector/content/", "_blank", "chrome,all,dialog=no"+(aModal?",modal":""), aDocument); } function inspectDOMNode(aNode, aModal) { window.openDialog("chrome://inspector/content/", "_blank", "chrome,all,dialog=no"+(aModal?",modal":""), aNode); } function inspectObject(aObject, aModal) { window.openDialog("chrome://inspector/content/object.xul", "_blank", "chrome,all,dialog=no"+(aModal?",modal":""), aObject); }PK O*ؑmmcontent/inspector/util.dtd PK }Q/0b )content/inspector/res/viewer-registry.rdf PK y0oZrr/content/inspector/extensions/titledSplitter.css/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Joe Hewitt (original author) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ @import url("chrome://inspector/skin/titledSplitter.css"); .titled-splitter { -moz-binding: url("titledSplitter.xml#titledSplitter") !important; } PK .KE E /content/inspector/extensions/titledSplitter.xml PK y0_y-content/inspector/extensions/treeEditable.css/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Joe Hewitt (original author) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ @import url("chrome://inspector/skin/treeEditable.css"); .tree-editable { -moz-binding: url("treeEditable.xml#treeEditable"); } .treecell-editable { -moz-binding: url("treeEditable.xml#treecellEditable"); } treeitem[editing="true"] > treerow { background-color: transparent !important; }PK .`(ۿ-content/inspector/extensions/treeEditable.xml new Function("event", this.getAttribute("onstartedit")); new Function("event", this.getAttribute("onafteredit")); PK y0Ngg+content/inspector/extensions/multipanel.css/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Joe Hewitt (original author) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); multipanelset { -moz-binding: url("chrome://inspector/content/extensions/multipanel.xml#multipanelset"); display: -moz-box; -moz-box-orient: vertical; } multipanel { -moz-binding: url("chrome://inspector/content/extensions/multipanel.xml#multipanel"); display: -moz-box; -moz-box-orient: vertical; } PK L.D@@+content/inspector/extensions/multipanel.xml PK y0Q Q /content/inspector/extensions/wsm-colorpicker.js/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Joe Hewitt (original author) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ /*************************************************************** * wsm-colorpicker ---------------------------------------------- * Quick script which adds support for the color picker widget * to nsWidgetStateManager in the pref winodw. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * REQUIRED IMPORTS: ****************************************************************/ function AddColorPicker(aCallback) { window.addEventListener("load", AddColorPicker_delayCheck, false); window.AddColorPicker_callback = aCallback; } function AddColorPicker_delayCheck() { if (parent.hPrefWindow) AddColorPicker_addColorHandlers() else setTimeout("AddColorPicker_delayCheck()", 1); } function AddColorPicker_addColorHandlers() { parent.hPrefWindow.wsm.handlers.colorpicker = { set: function (aElementID, aDataObject) { var wsm = parent.hPrefWindow.wsm; var element = wsm.contentArea.document.getElementById( aElementID ); element.color = aDataObject.color; }, get: function (aElementID) { var wsm = parent.hPrefWindow.wsm; var element = wsm.contentArea.document.getElementById( aElementID ); var dataObject = wsm.generic_Get(element); if(dataObject) { dataObject.color = element.color; return dataObject; } return null; } } window.AddColorPicker_callback(); } PK y0UQe(content/inspector/jsutil/rdf/RDFArray.js/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Joe Hewitt (original author) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ /*************************************************************** * RDFArray ----------------------------------------------- * A convenience routine for creating an RDF-based 2d array * indexed by number and hashkey. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * REQUIRED IMPORTS: * chrome://inspector/content/utils.js * chrome://inspector/content/jsutil/xpcom/XPCU.js * chrome://inspector/content/jsutil/rdf/RDFU.js ****************************************************************/ //////////// global constants //////////////////// RDFArray.URI = "http://www.joehewitt.com/mozilla/util/RDFArray#"; RDFArray.RDF_URI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"; ///// class RDFArray ///////////////////////// function RDFArray(aNSURI, aRootURN, aArcName) { this.mNSURI = aNSURI; this.mRootURN = aRootURN; this.mArcName = aArcName ? aArcName : "list"; } RDFArray.prototype = { get datasource() { return this.mDS; }, get length() { return this.mLength } , initialize: function() { this.mLength = 0; this.mDS = XPCU.createInstance("@mozilla.org/rdf/datasource;1?name=in-memory-datasource", "nsIRDFDataSource"); var root = gRDF.GetResource(this.mRootURN); var res = gRDF.GetAnonymousResource(); this.mDS.Assert(root, gRDF.GetResource(this.mNSURI+this.mArcName), res, true); this.mSeq = gRDFCU.MakeSeq(this.mDS, res); }, add: function(aObject) { var res = this.createResourceFrom(aObject); this.addResource(res); }, addResource: function(aResource) { this.mSeq.AppendElement(aResource); this.mLength++; }, insertAt: function(aIndex, aObject) { var res = this.createResourceFrom(aObject); this.insertResourceAt(aIndex, res); }, insertResourceAt: function(aIndex, aResource) { }, removeAt: function(aIndex) { this.mSeq.RemoveElementAt(aIndex+1, true); this.mLength--; }, removeById: function(aId) { var proj = gRDF.GetResource(aId); proj = XPCU.QI(proj, "nsIRDFNode"); this.mSeq.RemoveElement(proj, true); this.mLength--; }, get: function(aIndex, aKey) { var res = RDFU.getSeqElementAt(this.mSeq, aIndex); return RDFU.readAttribute(this.mDS, res, this.mNSURI+aKey); }, set: function(aIndex, aKey, aValue) { var res = RDFU.getSeqElementAt(this.mSeq, aIndex); RDFU.writeAttribute(this.mDS, res, this.mNSURI+aKey, aValue); }, getResource: function(aIndex) { return RDFU.getSeqElementAt(this.mSeq, aIndex); }, getResourceId: function(aIndex) { var el = RDFU.getSeqElementAt(this.mSeq, aIndex); return el.Value; }, save: function() { RDFU.saveDataSource(this.mDS); }, clear: function() { while (this.mLength) { this.mSeq.RemoveElementAt(1, true); this.mLength--; } }, createResourceFrom: function(aObject) { var el = gRDF.GetAnonymousResource(); // add a literal node for each property being added for (var name in aObject) { this.mDS.Assert(el, gRDF.GetResource(this.mNSURI+name), gRDF.GetLiteral(aObject[name]), true); } return el; } }; /////////// static factory methods ///////////////////////// RDFArray.fromContainer = function(aDS, aResourceID, aNSURI) { var list = new RDFArray(aNSURI); list.mDS = aDS; var seq = RDFU.findSeq(aDS, aResourceID); list.mSeq = seq; list.mLength = seq.GetCount(); return list; } RDFArray.fromContainerArc = function(aDS, aSourceId, aTargetId, aNSURI) { var list = new RDFArray(aNSURI); list.mDS = aDS; var source = gRDF.GetResource(aSourceId); var target = gRDF.GetResource(aTargetId); var seqRes = aDS.GetTarget(source, target, true); var seq = RDFU.makeSeq(aDS, seqRes); list.mSeq = seq; list.mLength = seq.GetCount(); return list; } PK H2i4$content/inspector/jsutil/rdf/RDFU.js/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Joe Hewitt (original author) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ /*************************************************************** * RDFU ----------------------------------------------- * Convenience routines for common RDF commands. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * REQUIRED IMPORTS: * chrome://inspector/content/jsutil/xpcom/XPCU.js ****************************************************************/ //////////// global constants //////////////////// try { var gRDF = Components.classes['@mozilla.org/rdf/rdf-service;1'].getService(); gRDF = gRDF.QueryInterface(Components.interfaces.nsIRDFService); var gRDFCU = Components.classes['@mozilla.org/rdf/container-utils;1'].getService(); gRDFCU = gRDFCU.QueryInterface(Components.interfaces.nsIRDFContainerUtils); } catch (ex) { alert("RDFU: " + ex); } /////////////////////////////////////////////////// var RDFU = { getSeqElementAt: function(aSeq, aIndex) { var ordinal = gRDFCU.IndexToOrdinalResource(aIndex+1); return aSeq.DataSource.GetTarget(aSeq.Resource, ordinal, true); }, readAttribute: function(aDS, aRes, aName) { var attr = aDS.GetTarget(aRes, gRDF.GetResource(aName), true); if (attr) attr = XPCU.QI(attr, "nsIRDFLiteral"); return attr ? attr.Value : null; }, writeAttribute: function(aDS, aRes, aName, aValue) { var attr = aDS.GetTarget(aRes, gRDF.GetResource(aName), true); if (attr) aDS.Change(aRes, gRDF.GetResource(aName), attr, gRDF.GetLiteral(aValue)); }, findSeq: function(aDS, aResName) { try { var res = gRDF.GetResource(aResName); var seq = this.makeSeq(aDS, res); } catch (ex) { alert("Unable to find sequence:" + ex); } return seq; }, makeSeq: function(aDS, aRes) { var seq = XPCU.createInstance("@mozilla.org/rdf/container;1", "nsIRDFContainer"); seq.Init(aDS, aRes); return seq; }, createSeq: function(aDS, aBaseRes, aArcRes) { var res = gRDF.GetAnonymousResource(); aDS.Assert(aBaseRes, aArcRes, res, true); var seq = gRDFCU.MakeSeq(aDS, res); return seq; }, loadDataSource: function(aURL, aListener) { var ds = gRDF.GetDataSource(aURL); var rds = XPCU.QI(ds, "nsIRDFRemoteDataSource"); var observer = new DSLoadObserver(aListener); if (rds.loaded) { observer.onEndLoad(ds); } else { var sink = XPCU.QI(ds, "nsIRDFXMLSink"); sink.addXMLSinkObserver(observer); } }, saveDataSource: function(aDS) { var ds = XPCU.QI(aDS, "nsIRDFRemoteDataSource"); ds.Flush(); } }; /////////// function DSLoadObserver(aListener) { this.mListener = aListener; } DSLoadObserver.prototype = { onBeginLoad: function(aSink) { }, onInterrupt: function(aSink) {}, onResume: function(aSink) {}, onError: function(aSink, aStatus, aErrorMsg) { this.mListener.onError(aStatus, aErrorMsg); aSink.removeXMLSinkObserver(this); }, onEndLoad: function(aSink) { var ds = XPCU.QI(aSink, "nsIRDFDataSource"); this.mListener.onDataSourceReady(ds); aSink = XPCU.QI(aSink, "nsIRDFXMLSink"); aSink.removeXMLSinkObserver(this); } }; PK y0}-content/inspector/jsutil/system/DiskSearch.js/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Joe Hewitt (original author) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ /*************************************************************** * DiskSearch ------------------------------------------------- * A utility for handily searching the disk for files matching * a certain criteria. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * REQUIRED IMPORTS: ****************************************************************/ //////////// global variables ///////////////////// //////////// global constants //////////////////// //////////////////////////////////////////////////////////////////////////// //// class DiskSearch var DiskSearch = { findFiles: function(aRootDir, aExtList, aRecurse) { // has the file extensions so we don't have to // linear search the array every time through var extHash = {}; for (var i = 0; i < aExtList.length; i++) { extHash[aExtList[i]] = true; } var ios = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService); this.fileHandler = ios.getProtocolHandler("file").QueryInterface(Components.interfaces.nsIFileProtocolHandler); // recursively build the list of results var results = []; this.recurseDir(aRootDir, extHash, aRecurse, results); return results; }, recurseDir: function(aDir, aExtHash, aRecurse, aResults) { debug("("+aResults.length+") entering " + aDir.path + "\n"); var entries = aDir.directoryEntries; var entry, ext; while (entries.hasMoreElements()) { entry = XPCU.QI(entries.getNext(), "nsIFile"); if (aRecurse && entry.isDirectory()) this.recurseDir(entry, aExtHash, aRecurse, aResults); ext = this.getExtension(entry.leafName); if (ext) { if (aExtHash[ext]) aResults.push(this.fileHandler.getURLSpecFromFile(entry)); } } }, getExtension: function(aFileName) { var dotpt = aFileName.lastIndexOf("."); if (dotpt) return aFileName.substr(dotpt+1).toLowerCase(); return null; } }; PK y0]5,XX2content/inspector/jsutil/system/FilePickerUtils.js/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Joe Hewitt (original author) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ /*************************************************************** * FilePickerUtils ------------------------------------------------- * A utility for easily dealing with the file picker dialog. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * REQUIRED IMPORTS: ****************************************************************/ //////////// global constants //////////////////// const kFilePickerCID = "@mozilla.org/filepicker;1"; const kLFileCID = "@mozilla.org/file/local;1"; const nsIFilePicker = Components.interfaces.nsIFilePicker; //////////////////////////////////////////////////////////////////////////// //// class FilePickerUtils var FilePickerUtils = { pickFile: function(aTitle, aInitPath, aFilters, aMode) { try { var modeStr = aMode ? "mode" + aMode : "modeOpen"; var mode; try { mode = nsIFilePicker[modeStr]; } catch (ex) { dump("WARNING: Invalid FilePicker mode '"+aMode+"'. Defaulting to 'Open'.\n"); mode = nsIFilePicker.modeOpen; } var fp = XPCU.createInstance(kFilePickerCID, "nsIFilePicker"); fp.init(window, aTitle, mode); // join array of filter names into bit string var filters = this.prepareFilters(aFilters); if (aInitPath) { var dir = XPCU.createInstance(kLFileCID, "nsILocalFile"); dir.initWithPath(aInitPath); fp.displayDirectory = dir; } if (fp.show() == nsIFilePicker.returnOK) { return fp.file; } } catch (ex) { dump("ERROR: Unable to open file picker.\n" + ex + "\n"); } return null; }, pickDir: function(aTitle, aInitPath) { try { var fp = XPCU.createInstance(kFilePickerCID, "nsIFilePicker"); fp.init(window, aTitle, nsIFilePicker.modeGetFolder); if (aInitPath) { var dir = XPCU.createInstance(kLFileCID, "nsILocalFile"); dir.initWithPath(aInitPath); fp.displayDirectory = dir; } if (fp.show() == nsIFilePicker.returnOK) { return fp.file; } } catch (ex) { dump("ERROR: Unable to open directory picker.\n" + ex + "\n"); } return null; }, prepareFilters: function(aFilters) { // join array of filter names into bit string var filters = 0; for (var i = 0; i < aFilters.length; ++i) filters = filters | nsIFilePicker[aFilters[i]]; return filters; } }; PK y0ce,content/inspector/jsutil/system/PrefUtils.js/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Joe Hewitt (original author) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ /*************************************************************** * PrefUtils ------------------------------------------------- * Utility for easily using the Mozilla preferences system. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * REQUIRED IMPORTS: ****************************************************************/ //////////// global variables ///////////////////// //////////// global constants //////////////////// const nsIPrefBranch = Components.interfaces.nsIPrefBranch; //////////////////////////////////////////////////////////////////////////// //// class PrefUtils var PrefUtils = { mPrefs: null, init: function() { var prefService = XPCU.getService("@mozilla.org/preferences-service;1", "nsIPrefService"); this.mPrefs = prefService.getBranch(null); }, addObserver: function(aDomain, aFunction) { if (!this.mPrefs) this.init(); var pbi = XPCU.QI(this.mPrefs, "nsIPrefBranchInternal"); if (pbi) pbi.addObserver(aDomain, aFunction, false); }, removeObserver: function(aDomain, aFunction) { if (!this.mPrefs) this.init(); var pbi = XPCU.QI(this.mPrefs, "nsIPrefBranchInternal"); if (pbi) pbi.removeObserver(aDomain, aFunction); }, setPref: function(aName, aValue) { if (!this.mPrefs) this.init(); var type = this.mPrefs.getPrefType(aName); try { if (type == nsIPrefBranch.PREF_STRING) { var str = Components.classes["@mozilla.org/supports-string;1"] .createInstance(Components.interfaces.nsISupportsString); str.data = aValue; this.mPrefs.setComplexValue(aName, Components.interfaces.nsISupportsString, str); } else if (type == nsIPrefBranch.PREF_BOOL) { this.mPrefs.setBoolPref(aName, aValue); } else if (type == nsIPrefBranch.PREF_INT) { this.mPrefs.setIntPref(aName, aValue); } } catch(ex) { debug("ERROR: Unable to write pref \"" + aName + "\".\n"); } }, getPref: function(aName) { if (!this.mPrefs) this.init(); var type = this.mPrefs.getPrefType(aName); try { if (type == nsIPrefBranch.PREF_STRING) { return this.mPrefs.getComplexValue(aName, Components.interfaces.nsISupportsString).data; } else if (type == nsIPrefBranch.PREF_BOOL) { return this.mPrefs.getBoolPref(aName); } else if (type == nsIPrefBranch.PREF_INT) { return this.mPrefs.getIntPref(aName); } } catch(ex) { debug("ERROR: Unable to read pref \"" + aName + "\".\n"); } return null; } }; PK y0w AA'content/inspector/jsutil/system/file.js/*** -*- Mode: Javascript; tab-width: 2; ***** BEGIN LICENSE BLOCK ***** Version: MPL 1.1/GPL 2.0/LGPL 2.1 The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is Collabnet code. The Initial Developer of the Original Code is Collabnet. The Initial Developer of the Original Code is Collabnet. Portions created by the Initial Developer are Copyright (C) 2000 the Initial Developer. All Rights Reserved. Contributor(s): Pete Collins, Doug Turner, Brendan Eich, Warren Harris, Eric Plaster Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the LGPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of either the GPL or the LGPL, and not to allow others to use your version of this file under the terms of the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the GPL or the LGPL. If you do not delete the provisions above, a recipient may use your version of this file under the terms of any one of the MPL, the GPL or the LGPL. ***** END LICENSE BLOCK ***** */ /****************** Globals **********************/ const JSLIB_FILE = "file.js"; const JSFILE_LOCAL_CID = "@mozilla.org/file/local;1"; const JSFILE_F_CHANNEL_CID = "@mozilla.org/network/file-input-stream;1"; const JSFILE_I_STREAM_CID = "@mozilla.org/scriptableinputstream;1"; const JSFILE_I_LOCAL_FILE = "nsILocalFile"; const JSFILE_I_FILE_CHANNEL = "nsIFileChannel"; const JSFILE_I_SCRIPTABLE_IN_STREAM = "nsIScriptableInputStream"; const JSFILE_INIT_W_PATH = "initWithPath"; const JSFILE_READ = 0x01; // 1 const JSFILE_WRITE = 0x08; // 8 const JSFILE_APPEND = 0x10; // 16 const JSFILE_READ_MODE = "r"; const JSFILE_WRITE_MODE = "w"; const JSFILE_APPEND_MODE = "a"; const JSFILE_FILETYPE = 0x00; // 0 const JSFILE_CHUNK = 1024; // buffer for readline => set to 1k const JSFILE_OK = true; const JSFILE_FilePath = new Components.Constructor( JSFILE_LOCAL_CID, JSFILE_I_LOCAL_FILE, JSFILE_INIT_W_PATH); const JSFILE_FileChannel = new Components.Constructor( JSFILE_F_CHANNEL_CID, JSFILE_I_FILE_CHANNEL ); const JSFILE_InputStream = new Components.Constructor( JSFILE_I_STREAM_CID, JSFILE_I_SCRIPTABLE_IN_STREAM ); /****************** Globals **********************/ /****************** File Object Class *********************/ function File(aPath) { if(aPath) this.mPath= aPath; } // constructor File.prototype = { mPath : null, mode : null, fileInst : null, fileChannel : null, inputStream : null, lineBuffer : null, /********************* OPEN *****************************/ open : function(aSetMode) { if(!this.mPath) { dump(JSLIB_FILE+":open:ERROR: Missing member path argument\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_NOT_INITIALIZED; } this.close(); if(!aSetMode) aSetMode=JSFILE_READ_MODE; try { this.fileInst = new JSFILE_FilePath(this.mPath); } catch (e) { dump(JSLIB_FILE+":open:ERROR: UNEXPECTED"+e.name+" "+e.message+"\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_UNEXPECTED; } var fileExists = this.exists(); if(fileExists) { if(this.fileInst.isDirectory()) { dump(JSLIB_FILE+":open:ERROR: Can't open directory "+this.mPath+" as a file!\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_FAILURE; } } var retval; switch(aSetMode) { case JSFILE_WRITE_MODE: { if(fileExists) { try { this.fileInst.remove(false); fileExists=false; } catch(e) { dump(JSLIB_FILE+":open:ERROR: Failed to delete file "+this.mPath+"\nNS_ERROR_NUMBER: "); this.close(); return Components.results.NS_ERROR_FAILURE; } } if (!fileExists) { try { this.fileInst.create(JSFILE_FILETYPE, 0644); fileExists=true; } catch(e) { dump(JSLIB_FILE+":open:ERROR: Failed to create file "+this.mPath+"\nNS_ERROR_NUMBER: "); this.close(); return Components.results.NS_ERROR_FAILURE; } } this.mode=JSFILE_WRITE; retval=JSFILE_OK; break; } case JSFILE_APPEND_MODE: { if(!fileExists) { try { this.fileInst.create(JSFILE_FILETYPE, 0644); fileExists=true; } catch(e) { dump(JSLIB_FILE+":open:ERROR: Failed to create file "+this.mPath+"\nNS_ERROR_NUMBER: "); this.close(); return Components.results.NS_ERROR_FAILURE; } } this.mode=JSFILE_APPEND; retval=JSFILE_OK; break; } case JSFILE_READ_MODE: { if(!fileExists) { dump(JSLIB_FILE+"open:ERROR: "+this.mPath+" doesn't exist!\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_FAILURE } try { this.lineBuffer = new Array(); this.fileChannel = new JSFILE_FileChannel(); this.inputStream = new JSFILE_InputStream(); try { var perm = this.fileInst.permissions; } catch(e){ perm=null; } this.fileChannel.init(this.fileInst, JSFILE_READ, perm); this.inputStream.init(this.fileChannel.openInputStream()); retval=JSFILE_OK; } catch (e) { dump(JSLIB_FILE+":open:ERROR: reading... "+e.name+" "+e.message+"\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_FAILURE; } break; } default: dump(JSLIB_FILE+":open:WARNING: \""+setMode+"\" is an Invalid file mode\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_INVALID_ARG; } return retval; }, /********************* EXISTS ***************************/ exists : function () { var retval = null; try { var file = new JSFILE_FilePath(this.mPath); retval=file.exists(); } catch(e) { dump(JSLIB_FILE+":exists:ERROR: "+e.name+"\n"+e.message+"\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_UNEXPECTED; } return retval; }, /********************* WRITE ****************************/ write : function(aBuffer, aPerms) { if(!this.fileInst) { dump(JSLIB_FILE+":write:ERROR: Please open a file handle first\n NS_ERROR_NUMBER:"); return Components.results.NS_ERROR_NOT_INITIALIZED; } if(!aBuffer) throw(JSLIB_FILE+":write:ERROR: must have a buffer to write!\n"); if(this.mode == JSFILE_READ) throw(JSLIB_FILE+":write:ERROR: not in write or append mode!\n"); var buffSize = aBuffer.length; try { if(!this.fileChannel) this.fileChannel = new JSFILE_FileChannel(); if(aPerms) { var checkPerms = this.validatePermissions(aPerms); if(!checkPerms) { dump(JSLIB_FILE+":write:ERROR: invalid permissions set: "+aPerms+"\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_INVALID_ARG } } if(!aPerms) aPerms=0644; this.fileChannel.init(this.fileInst, this.mode, aPerms); try { this.fileInst.permissions=aPerms; } catch(e){ } var outStream = this.fileChannel.openOutputStream(); outStream.write(aBuffer, buffSize); outStream.flush(); outStream.close(); } catch (e) { dump(JSLIB_FILE+":write:ERROR: "+e.name+"\n"+e.message+"\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_UNEXPECTED; } return JSFILE_OK; }, /********************* READ *****************************/ read : function() { var retval = null; try { if(!this.fileInst || !this.inputStream) { dump(JSLIB_FILE+":read:ERROR: Please open a valid file handle for reading\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_NOT_INITIALIZED; } retval = this.inputStream.read(this.fileInst.fileSize); this.inputStream.close(); } catch (e) { dump(JSLIB_FILE+":read:ERROR: "+e.name+"\n"+e.message+"\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_FAILURE; } return retval; }, eof : function() { if(!this.fileInst || !this.inputStream) { dump(JSLIB_FILE+":readline:ERROR: Please open a valid file handle for reading\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_NOT_INITIALIZED; } if((this.lineBuffer.length > 0) || (this.inputStream.available() > 0)) return false; else return JSFILE_OK; }, /********************* READLINE *****************************/ readline : function() { var retval = null; var buf = null; try { if(!this.fileInst || !this.inputStream) { dump(JSLIB_FILE+":readline:ERROR: Please open a valid file handle for reading\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_NOT_INITIALIZED; } if(this.lineBuffer.length < 2) { buf = this.inputStream.read(JSFILE_CHUNK); if(buf) { var tmp = null; if(this.lineBuffer.length == 1) { tmp = this.lineBuffer.shift(); buf = tmp+buf; } this.lineBuffer = buf.split(/[\n\r]/); } } retval = this.lineBuffer.shift(); } catch (e) { dump(JSLIB_FILE+":readline:ERROR: "+e.name+" "+e.message+"\nNS_ERROR_NUMBER: "); throw(e); } return retval; }, /********************* PATH *****************************/ path : function () { return this.mPath; }, /********************* PATH *****************************/ /********************* LEAF *****************************/ leaf : function () { if(!this.mPath) { dump(JSLIB_FILE+":leaf:ERROR: Missing path argument\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_INVALID_ARG; } if(!this.exists()) { dump(JSLIB_FILE+":leaf:ERROR: File doesn't exist\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_FAILURE; } var retval; try { var fileInst = new JSFILE_FilePath(this.mPath); retval=fileInst.leafName; } catch(e) { dump(JSLIB_FILE+":leaf:ERROR: "+e.name+"\n"+e.message+"\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_FAILURE; } return retval; }, /********************* VALIDATE PERMISSIONS *************/ validatePermissions : function(aNum) { if ( parseInt(aNum.toString(10).length) < 3 ) return false; return JSFILE_OK; }, /********************* PERMISSIONS **********************/ permissions : function () { if(!this.mPath) { dump(JSLIB_FILE+":permissions:ERROR: Missing path argument\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_XPC_NOT_ENOUGH_ARGS; } if(!this.exists()) { dump(JSLIB_FILE+":permissions:ERROR: File doesn't exist\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_FAILURE; } var retval; try { var fileInst = new JSFILE_FilePath(this.mPath); retval=fileInst.permissions.toString(8); } catch(e) { dump(JSLIB_FILE+":permissions:ERROR: "+e.name+"\n"+e.message+"\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_UNEXPECTED; } return retval; }, /********************* MODIFIED *************************/ dateModified : function () { if(!this.mPath) { dump(JSLIB_FILE+":dateModified:ERROR: Missing path argument\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_XPC_NOT_ENOUGH_ARGS; } if(!this.exists()) { dump(JSLIB_FILE+":dateModified:ERROR: File doesn't exist\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_FAILURE; } var retval; try { var fileInst = new JSFILE_FilePath(this.mPath); var date = new Date(fileInst.lastModifiedTime).toLocaleString(); retval=date; } catch(e) { dump(JSLIB_FILE+":dateModified:ERROR: "+e.name+"\n"+e.message+"\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_UNEXPECTED; } return retval; }, /********************* SIZE *****************************/ size : function () { if(!this.mPath) { dump(JSLIB_FILE+":size:ERROR: Missing member path argument\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_NOT_INITIALIZED; } if(!this.exists()) { dump(JSLIB_FILE+":size:ERROR: File doesn't exist\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_FAILURE; } var retval; try { var fileInst = new JSFILE_FilePath(this.mPath); retval = fileInst.fileSize; } catch(e) { dump(JSLIB_FILE+":size:ERROR: "+e.name+"\n"+e.message+"\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_UNEXPECTED; } return retval; }, /********************* EXTENSION ************************/ extension : function () { if(!this.mPath) { dump(JSLIB_FILE+":extension:ERROR: Missing member path argument\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_NOT_INITIALIZED; } if(!this.exists()) { dump(JSLIB_FILE+":extension:ERROR: File doesn't exist\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_FAILURE; } var retval; try { var fileInst = new JSFILE_FilePath(this.mPath); var leafName = fileInst.leafName; var dotIndex = leafName.lastIndexOf('.'); retval=(dotIndex >= 0) ? leafName.substring(dotIndex+1) : ""; } catch(e) { dump(JSLIB_FILE+":extension:ERROR: "+e.name+"\n"+e.message+"\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_UNEXPECTED; } return retval; }, /********************* DIRPATH **************************/ dirPath : function () { if(!this.mPath) { dump(JSLIB_FILE+":dirPath:ERROR: Missing member path argument\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_NOT_INITIALIZED; } var retval; try { var fileInst = new JSFILE_FilePath(this.mPath); if(fileInst.isFile()) retval=fileInst.path.replace(this.leaf(), ""); if(fileInst.isDirectory()) retval=fileInst.path; } catch (e) { dump(JSLIB_FILE+":dirPath:ERROR: "+e.name+"\n"+e.message+"\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_UNEXPECTED; } return retval; }, /********************* nsIFILE **************************/ nsIFile : function () { if(!this.mPath) { dump(JSLIB_FILE+":nsIFile:ERROR: Missing member path argument\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_NOT_INITIALIZED; } var retval; try { retval = new JSFILE_FilePath(this.mPath); } catch (e) { dump(JSLIB_FILE+":nsIFile:ERROR: "+e.name+"\n"+e.message+"\nNS_ERROR_NUMBER: "); return Components.results.NS_ERROR_UNEXPECTED; } return retval; }, /********************* HELP *****************************/ help : function() { var help = "\n\nFunction List:\n" + "\n" + " open(aMode);\n" + " exists();\n" + " read();\n" + " readline(aDone);\n" + " write(aContents, aPermissions);\n" + " leaf();\n" + " permissions();\n" + " dateModified();\n" + " size();\n" + " extension();\n" + " dirPath();\n" + " nsIFile();\n" + " help();\n"; dump(help+"\n"); return ""; }, /********************* CLOSE ****************************/ close : function() { /***************** Destroy Instances *********************/ if(this.fileInst) delete this.fileInst; if(this.fileChannel) delete this.fileChannel; if(this.inputStream) delete this.inputStream; if(this.mode) this.mode=null; /***************** Destroy Instances *********************/ return JSFILE_OK; } }; PK y0D &content/inspector/jsutil/xpcom/XPCU.js/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Joe Hewitt (original author) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ var XPCU = { getService: function(aURL, aInterface) { try { return Components.classes[aURL].getService(Components.interfaces[aInterface]); } catch (ex) { dump("Error getting service: " + aURL + ", " + aInterface + "\n" + ex); return null; } }, createInstance: function (aURL, aInterface) { try { return Components.classes[aURL].createInstance(Components.interfaces[aInterface]); } catch (ex) { dump("Error creating instance: " + aURL + ", " + aInterface + "\n" + ex); return null; } }, QI: function(aEl, aIName) { try { return aEl.QueryInterface(Components.interfaces[aIName]); } catch (ex) { throw("Unable to QI " + aEl + " to " + aIName); } } };PK y0J>9``(content/inspector/jsutil/xul/DNDUtils.js/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Joe Hewitt (original author) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ /*************************************************************** * DNDUtils ------------------------------------------------- * Utility functions for common drag and drop tasks. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * REQUIRED IMPORTS: ****************************************************************/ //////////// global variables ///////////////////// var app; //////////// global constants //////////////////// //////////////////////////////////////////////////////////////////////////// //// class DNDUtils var DNDUtils = { invokeSession: function(aTarget, aTypes, aValues) { var transData, trans, supports; var transArray = XPCU.createInstance("@mozilla.org/supports-array;1", "nsISupportsArray"); for (var i = 0; i < aTypes.length; ++i) { transData = this.createTransferableData(aValues[i]); trans = XPCU.createInstance("@mozilla.org/widget/transferable;1", "nsITransferable"); trans.addDataFlavor(aTypes[i]); trans.setTransferData (aTypes[i], transData.data, transData.size); supports = trans.QueryInterface(Components.interfaces.nsISupports); transArray.AppendElement(supports); } var nsIDragService = Components.interfaces.nsIDragService; var dragService = XPCU.getService("@mozilla.org/widget/dragservice;1", "nsIDragService"); dragService.invokeDragSession(aTarget, transArray, null, nsIDragService.DRAGDROP_ACTION_MOVE); }, createTransferableData: function(aValue) { var obj = {}; if (typeof(aValue) == "string") { obj.data = XPCU.createInstance("@mozilla.org/supports-string;1", "nsISupportsString"); obj.data.data = aValue; obj.size = aValue.length*2; } else if (false) { // TODO: create data for other primitive types } return obj; }, checkCanDrop: function(aType) { var dragService = XPCU.getService("@mozilla.org/widget/dragservice;1", "nsIDragService"); var dragSession = dragService.getCurrentSession(); var gotFlavor = false; for (var i = 0; i < arguments.length; ++i) gotFlavor |= dragSession.isDataFlavorSupported(arguments[i]); dragSession.canDrop = gotFlavor; return gotFlavor; }, getData: function(aType, aIndex) { var dragService = XPCU.getService("@mozilla.org/widget/dragservice;1", "nsIDragService"); var dragSession = dragService.getCurrentSession(); var trans = XPCU.createInstance("@mozilla.org/widget/transferable;1", "nsITransferable"); trans.addDataFlavor(aType); dragSession.getData(trans, aIndex); var data = new Object(); trans.getAnyTransferData ({}, data, {}); return data.value; } }; PK y0' -content/inspector/jsutil/xul/FrameExchange.js/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Joe Hewitt (original author) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ /*************************************************************** * FrameExchange ---------------------------------------------- * Utility for passing specific data to a document loaded * through an iframe * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * REQUIRED IMPORTS: ****************************************************************/ //////////// implementation //////////////////// var FrameExchange = { mData: {}, loadURL: function(aFrame, aURL, aData) { this.mData[aURL] = aData; aFrame.setAttribute("src", aURL); }, receiveData: function(aWindow) { var id = aWindow.location.href; var data = this.mData[id]; this.mData[id] = null; return data; } }; PK y0-content/inspector/jsutil/xul/inFormManager.js/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Joe Hewitt (original author) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ /*************************************************************** * inFormManager ------------------------------------------------- * Manages the reading and writing of forms via simple maps of * attribute/value pairs. A "form" is simply a XUL window which * contains "form widgets" such as textboxes and menulists. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * REQUIRED IMPORTS: ****************************************************************/ //////////////////////////////////////////////////////////////////////////// //// class inFormManager var inFormManager = { // Object readWindow: function(aWindow, aIds) { var el, fn; var doc = aWindow.document; var map = {}; for (var i = 0; i < aIds.length; i++) { el = doc.getElementById(aIds[i]); if (el) { this.persistIf(doc, el); fn = this["read_"+el.localName]; if (fn) map[aIds[i]] = fn(el); } } return map; }, // void writeWindow: function(aWindow, aMap) { var el, fn; var doc = aWindow.document; for (var i = 0; i < aIds.length; i++) { el = doc.getElementById(aIds[i]); if (el) { fn = this["write_"+el.localName]; if (fn) fn(el, aMap[aIds[i]]); } } }, persistIf: function(aDoc, aEl) { if (aEl.getAttribute("persist") == "true" && aEl.hasAttribute("id")) { aEl.setAttribute("value", aEl.value); aDoc.persist(aEl.getAttribute("id"), "value"); } }, read_textbox: function(aEl) { return aEl.value; }, read_menulist: function(aEl) { return aEl.getAttribute("value"); }, read_checkbox: function(aEl) { return aEl.getAttribute("checked") == "true"; }, read_radiogroup: function(aEl) { return aEl.getAttribute("value"); }, read_colorpicker: function(aEl) { return aEl.getAttribute("color"); }, write_textbox: function(aEl, aValue) { aEl.setAttribute("value", aValue); }, write_menulist: function(aEl, aValue) { aEl.setAttribute("value", aValue); }, write_checkbox: function(aEl, aValue) { aEl.setAttribute("checked", aValue); }, write_radiogroup: function(aEl, aValue) { aEl.setAttribute("value", aValue); }, write_colorpicker: function(aEl, aValue) { aEl.color = aValue; } }; PK y00lG8K8K-content/inspector/jsutil/xul/inTreeBuilder.js/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Joe Hewitt (original author) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ /*************************************************************** * inTreeBuilder ------------------------------------------------- * Automatically builds up an tree so that it will display a tabular * set of data with titled columns and optionally an icon for each row. * The tree that is supplied must have an treechildren with an * empty template inside of it. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * REQUIRED IMPORTS: * chrome://inspector/content/jsutil/xul/DNDUtils.js ****************************************************************/ //////////// global variables ///////////////////// var inTreeBuilderPartCount = 0; //////////// global constants //////////////////// //////////////////////////////////////////////////////////////////////////// //// class inTreeBuilder function inTreeBuilder(aTree, aNameSpace, aArcName) { this.tree = aTree; this.nameSpace = aNameSpace; this.arcName = aArcName; this.mColumns = []; this.mExtras = []; } inTreeBuilder.prototype = { mTree: null, mTreeBody: null, // datasource stuff mNameSpace: null, mArcName: null, mIsRefContainer: false, mIsContainer: true, // table structure stuff mIsIconic: false, mColumns: null, mSplitters: true, mRowFields: null, mRowAttrs: null, mAllowDND: false, mLastDragCol: null, mLastDragColWhere: null, //////////////////////////////////////////////////////////////////////////// //// properties // the xul tree node we will construct get tree() { return this.mTree }, set tree(aVal) { this.mTree = aVal; if (aVal) this.mTreeBody = aVal.getElementsByTagName("treechildren")[0]; aVal._treeBuilder = this }, // the namespace to use for all fields get nameSpace() { return this.mNameSpace }, set nameSpace(aVal) { this.mNameSpace = aVal }, // the name of the arc to the container get arcName() { return this.mArcName }, set arcName(aVal) { this.mArcName = aVal }, // is the datasource ref an arc to a container, or a container itself get isRefContainer() { return this.mIsRefContainer }, set isRefContainer(aVal) { this.mIsRefContainer = aVal }, // is each row a potential container? get isContainer() { return this.mIsContainer }, set isContainer(aVal) { this.mIsContainer = aVal }, // place an icon before the first column of each row get isIconic() { return this.mIsIconic }, set isIconic(aVal) { this.mIsIconic = aVal }, // put splitters between the columns? get useSplitters() { return this.mSplitters }, set useSplitters(aVal) { this.mSplitters = aVal }, // extra attributes to set on the treeitem get rowAttributes() { return this.mRowAttrs }, set rowAttributes(aVal) { this.mRowAttrs = aVal }, // extra data fields to set on the treeitem get rowFields() { return this.mRowFields }, set rowFields(aVal) { this.mRowFields = aVal }, // extra data fields to set on the treeitem get allowDragColumns() { return this.mAllowDND }, set allowDragColumns(aVal) { this.mAllowDND = aVal }, //////////////////////////////////////////////////////////////////////////// //// event handlers get onColumnAdd() { return this.mOnColumnAdd }, set onColumnAdd(aFn) { this.mOnColumnAdd = aFn }, get onColumnRemove() { return this.mOnColumnRemove }, set onColumnRemove(aFn) { this.mOnColumnRemove = aFn }, //////////////////////////////////////////////////////////////////////////// //// initialization initialize: function() { this.initColumns(); this.initTemplate(); }, initColumns: function() { this.initDND(); }, initTemplate: function() { var template = this.mTree.getElementsByTagNameNS(kXULNSURI, "template")[0]; this.mTemplate = template; this.clearChildren(template); var rule = document.createElementNS(kXULNSURI, "rule"); template.appendChild(rule); this.mRule = rule; this.createDefaultConditions(); var bindings = document.createElementNS(kXULNSURI, "bindings"); rule.appendChild(bindings); this.mBindings = bindings; this.createDefaultAction(); }, createDefaultConditions: function() { var conditions = document.createElementNS(kXULNSURI, "conditions"); this.mRule.appendChild(conditions); var content = document.createElementNS(kXULNSURI, "treerow"); content.setAttribute("uri", "?uri"); conditions.appendChild(content); var triple = this.createTriple("?uri", this.mNameSpace+this.mArcName, this.mIsRefContainer ? "?table" : "?row"); conditions.appendChild(triple); if (this.mIsRefContainer) { var member = this.createMember("?table", "?row"); conditions.appendChild(member); } }, createDefaultAction: function() { var action = document.createElementNS(kXULNSURI, "action"); this.mRule.appendChild(action); var orow = this.createTemplatePart("treerow"); orow.setAttribute("uri", "?row"); action.appendChild(orow); this.mTreeRow = orow; // assign the item attributes if (this.mRowAttrs) for (key in this.mRowAttrs) orow.setAttribute(key, this.mRowAttrs[key]); }, createDefaultBindings: function() { // assign the item fields var binding; if (this.mRowFields) { var props = ""; for (key in this.mRowFields) { binding = this.createBinding(this.mRowFields[key]); this.mBindings.appendChild(binding); props += key+"-?"+this.mRowFields[key]+" "; } this.mTreeRow.setAttribute("properties", props); } }, createTriple: function(aSubject, aPredicate, aObject) { var triple = document.createElementNS(kXULNSURI, "triple"); triple.setAttribute("subject", aSubject); triple.setAttribute("predicate", aPredicate); triple.setAttribute("object", aObject); return triple; }, createMember: function(aContainer, aChild) { var member = document.createElementNS(kXULNSURI, "member"); member.setAttribute("container", aContainer); member.setAttribute("child", aChild); return member; }, reset: function() { this.mColumns = []; this.mIsIconic = false; this.resetTree(); }, resetTree: function() { var kids = this.mTree.childNodes; for (var i = kids.length - 1; i >= 0; --i) if (kids[i].localName != "treechildren") this.mTree.removeChild(kids[i]); this.clearChildren(this.mBindings); this.clearChildren(this.mTreeRow); this.createDefaultBindings(); }, clearChildren: function(aEl) { while (aEl.hasChildNodes()) aEl.removeChild(aEl.lastChild); }, //////////////////////////////////////////////////////////////////////////// //// column drag and drop initDND: function() { if (this.mAllowDND) { // addEventListener doesn't work for dnd events, apparently... so we use the attributes this.addDNDListener(this.mTree, "ondragenter"); this.addDNDListener(this.mTree, "ondragover"); this.addDNDListener(this.mTree, "ondragexit"); this.addDNDListener(this.mTree, "ondraggesture"); this.addDNDListener(this.mTree, "ondragdrop"); } }, onDragEnter: function(aEvent) { }, onDragOver: function(aEvent) { if (!DNDUtils.checkCanDrop("TreeBuilder/column-add")) return; var idx = this.getColumnIndexFromX(aEvent.clientX, 0.5); this.mColumnInsertIndex = idx; var col = this.getColumnAt(idx); if (idx == -1) this.markColumnInsert(col, "after"); else this.markColumnInsert(col, "before"); }, onDragExit: function(aEvent) { }, onDragDrop: function(aEvent) { this.markColumnInsert(null); var dragService = XPCU.getService("@mozilla.org/widget/dragservice;1", "nsIDragService"); var dragSession = dragService.getCurrentSession(); if (!dragSession.isDataFlavorSupported("TreeBuilder/column-add")) return false; var trans = XPCU.createInstance("@mozilla.org/widget/transferable;1", "nsITransferable"); trans.addDataFlavor("TreeBuilder/column-add"); dragSession.getData(trans, 0); var data = {}; trans.getAnyTransferData ({}, data, {}); var string = XPCU.QI(data.value, "nsISupportsString"); this.insertColumn(this.mColumnInsertIndex, { name: string.data, title: string.data, flex: 1 }); // if we rebuildContent during this thread, it will crash in the dnd service setTimeout(function(me) { me.build(); me.buildContent() }, 1, this); // bug 56270 - dragSession.sourceDocument is null -- // causes me to code this very temporary, very nasty hack // to tell columnsDialog.js about the drop if (this.mTree.onClientDrop) { this.mTree.onClientDrop(); } }, markColumnInsert: function (aColumn, aWhere) { var col = this.mLastDragCol; var lastWhere = this.mLastDragColWhere; if (col) col.setAttribute("properties", ""); if (aWhere != "before" && aWhere != "after") { this.mLastDragCol = null; this.mLastDragColWhere = null; return; } col = aColumn; if (col) { this.mLastDragCol = col; this.mLastDragColWhere = aWhere; col.setAttribute("properties", "dnd-insert-"+aWhere); } var bx = this.mTree.boxObject.QueryInterface(Components.interfaces.nsITreeBoxObject); bx.invalidate(); }, getColumnIndexFromX: function(aX, aThresh) { var width = 0; var col, cw; for (var i = 0; i < this.columnCount; ++i) { col = this.getColumnAt(i); cw = col.boxObject.width; width += cw; if (width-(cw*aThresh) > aX) return i; } return -1; }, getColumnIndexFromHeader: function(aHeader) { var headers = this.mTree.getElementsByTagName("treecol"); for (var i = 0; i < headers.length; ++i) { if (headers[i] == aHeader) return i; } return -1; }, //// for drag-n-drop removal/arrangement of columns onDragGesture: function(aEvent) { var target = aEvent.target; if (target.parentNode == this.mTree) { var column = target.getAttribute("label"); var idx = this.getColumnIndexFromHeader(target); if (idx == -1) return; this.mColumnDragging = idx; DNDUtils.invokeSession(target, ["TreeBuilder/column-remove"], [column]); } }, addColumnDropTarget: function(aBox) { aBox._treeBuilderDropTarget = this; this.addDNDListener(aBox, "ondragover", "Target"); this.addDNDListener(aBox, "ondragdrop", "Target"); }, removeColumnDropTarget: function(aBox) { aBox._treeBuilderDropTarget = this; this.removeDNDListener(aBox, "ondragover", "Target"); this.removeDNDListener(aBox, "ondragdrop", "Target"); }, onDragOverTarget: function(aBox, aEvent) { DNDUtils.checkCanDrop("TreeBuilder/column-remove"); }, onDragDropTarget: function(aBox, aEvent) { this.removeColumn(this.mColumnDragging); this.build(); // if we rebuildContent during this thread, it will crash in the dnd service setTimeout(function(aTreeBuilder) { aTreeBuilder.buildContent() }, 1, this); }, // these are horrible hacks to compensate for the lack of true multiple // listener support for the DND events addDNDListener: function(aBox, aType, aModifier) { var js = "inTreeBuilder_"+aType+(aModifier?"_"+aModifier:"")+"(this, event);"; var attr = aBox.getAttribute(aType); attr = attr ? attr : ""; aBox.setAttribute(aType, attr + js); }, removeDNDListener: function(aBox, aType, aModifier) { var js = "inTreeBuilder_"+aType+(aModifier?"_"+aModifier:"")+"(this, event);"; var attr = aBox.getAttribute(aType); var idx = attr.indexOf(js); if (idx != -1) attr = attr.substr(0,idx) + attr.substr(idx+1); aBox.setAttribute(aType, attr); }, //////////////////////////////////////////////////////////////////////////// //// column properties addColumn: function(aData) { this.mColumns.push(aData); if (this.mOnColumnAdd) this.mOnColumnAdd(this.mColumns.length-1) }, insertColumn: function(aIndex, aData) { var idx; if (aIndex == -1) { this.mColumns.push(aData); idx = this.mColumns.length-1; } else { this.mColumns.splice(aIndex, 0, aData); idx = aIndex; } if (this.mOnColumnAdd) this.mOnColumnAdd(idx); }, removeColumn: function(aIndex) { this.mColumns.splice(aIndex, 1); if (this.mOnColumnRemove) this.mOnColumnRemove(aIndex); }, getColumnAt: function(aIndex) { var kids = this.mTree.getElementsByTagName("treecol"); return aIndex < 0 || aIndex >= kids.length ? kids[kids.length-1] : kids[aIndex]; }, get columnCount() { return this.mColumns.length }, getColumnName: function(aIndex) { return this.mColumns[aIndex].name }, setColumnName: function(aIndex, aValue) { this.mColumns[aIndex].name = aValue }, getColumnTitle: function(aIndex) { return this.mColumns[aIndex].title }, setColumnTitle: function(aIndex, aValue) { this.mColumns[aIndex].title = aValue }, getColumnClassName: function(aIndex) { return this.mColumns[aIndex].className }, setColumnClassName: function(aIndex, aValue) { this.mColumns[aIndex].className = aValue }, getColumnFlex: function(aIndex) { return this.mColumns[aIndex].flex }, setColumnFlex: function(aIndex, aValue) { this.mColumns[aIndex].flex = aValue }, getExtras: function(aIndex) { return this.mColumns[aIndex].extras }, setExtras: function(aIndex, aValue) { this.mColumns[aIndex].extras = aExtras }, getAttrs: function(aIndex) { return this.mColumns[aIndex].attrs }, setAttrs: function(aIndex, aValue) { this.mColumns[aIndex].attrs = aExtras }, //////////////////////////////////////////////////////////////////////////// //// template building build: function(aBuildContent) { try { this.resetTree(); this.buildColumns(); this.buildTemplate(); if (aBuildContent) this.buildContent(); } catch (ex) { debug("### ERROR - inTreeBuilder::build failed.\n" + ex); } //dumpDOM2(this.mTree); }, buildContent: function() { this.mTreeBody.builder.rebuild(); }, buildColumns: function() { var cols = document.createElementNS(kXULNSURI, "treecols"); var col, val, split; for (var i = 0; i < this.mColumns.length; i++) { col = document.createElementNS(kXULNSURI, "treecol"); col.setAttribute("id", "treecol-"+this.mColumns[i].name); col.setAttribute("persist", "width"); col.setAttribute("label", this.mColumns[i].title); // mark first node as primary, if necessary if (i == 0 && this.mIsContainer) col.setAttribute("primary", "true"); val = cols[i].className; if (val) col.setAttribute("class", val); val = cols[i].flex; if (val) col.setAttribute("flex", val); cols.appendChild(col); if (this.mSplitters && i < this.mColumns.length-1) { split = document.createElementNS(kXULNSURI, "splitter"); split.setAttribute("class", "tree-splitter"); cols.appendChild(split); } } this.mTree.appendChild(cols); }, buildTemplate: function() { var cols = this.mColumns; var bindings = this.mBindings; var row = this.mTreeRow; var cell, binding, val, extras, attrs, key, className; if (this.mIsIconic) { binding = this.createBinding("_icon"); bindings.appendChild(binding); } for (var i = 0; i < cols.length; ++i) { val = cols[i].name; if (!val) throw "Column data is incomplete - missing name at index " + i + "."; cell = this.createTemplatePart("treecell"); className = ""; // build the default value data field binding = this.createBinding(val); bindings.appendChild(binding); cell.setAttribute("label", "?" + val); cell.setAttribute("ref", "treecol-"+cols[i].name); cell.setAttribute("class", className); var props = ""; for (key in this.mRowFields) props += key+"-?"+this.mRowFields[key]+" "; cell.setAttribute("properties", props); row.appendChild(cell); } }, createBinding: function(aName) { var binding = document.createElementNS(kXULNSURI, "binding"); binding.setAttribute("subject", "?row"); binding.setAttribute("predicate", this.mNameSpace+aName); binding.setAttribute("object", "?" + aName); return binding; }, createTemplatePart: function(aTagName) { var el = document.createElementNS(kXULNSURI, aTagName); el.setAttribute("id", "templatePart"+inTreeBuilderPartCount); inTreeBuilderPartCount++; return el; } }; function inTreeBuilder_ondraggesture(aTree, aEvent) { return aTree._treeBuilder.onDragGesture(aEvent); } function inTreeBuilder_ondragenter(aTree, aEvent) { return aTree._treeBuilder.onDragEnter(aEvent); } function inTreeBuilder_ondragover(aTree, aEvent) { return aTree._treeBuilder.onDragOver(aEvent); } function inTreeBuilder_ondragexit(aTree, aEvent) { return aTree._treeBuilder.onDragExit(aEvent); } function inTreeBuilder_ondragdrop(aTree, aEvent) { return aTree._treeBuilder.onDragDrop(aEvent); } function inTreeBuilder_ondragover_Target(aBox, aEvent) { return aBox._treeBuilderDropTarget.onDragOverTarget(aBox, aEvent); } function inTreeBuilder_ondragdrop_Target(aBox, aEvent) { return aBox._treeBuilderDropTarget.onDragDropTarget(aBox, aEvent); } PK y0.77.content/inspector/jsutil/xul/inBaseTreeView.js/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Joe Hewitt (original author) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ /*************************************************************** * inBaseTreeView ------------------------------------------------- * Simple tree view object meant to be extended. * * Usage example: MyView.prototype = new inBaseTreeView(); ****************************************************************/ function inBaseTreeView() { } inBaseTreeView.prototype = { mRowCount: 0, mTree: null, get rowCount() { return this.mRowCount; }, setTree: function(aTree) { this.mTree = aTree; }, getCellText: function(aRow, aCol) { return ""; }, getRowProperties: function(aIndex, aProperties) {}, getCellProperties: function(aIndex, aCol, aProperties) {}, getColumnProperties: function(aCol, aProperties) {}, getParentIndex: function(aRowIndex) { }, hasNextSibling: function(aRowIndex, aAfterIndex) { }, getLevel: function(aIndex) {}, getImageSrc: function(aRow, aCol) {}, getProgressMode: function(aRow, aCol) {}, getCellValue: function(aRow, aCol) {}, isContainer: function(aIndex) {}, isContainerOpen: function(aIndex) {}, isContainerEmpty: function(aIndex) {}, isSeparator: function(aIndex) {}, isSorted: function() {}, toggleOpenState: function(aIndex) {}, selectionChanged: function() {}, cycleHeader: function(aCol) {}, cycleCell: function(aRow, aCol) {}, isEditable: function(aRow, aCol) {}, setCellValue: function(aRow, aCol, aValue) {}, setCellText: function(aRow, aCol, aValue) {}, performAction: function(aAction) {}, performActionOnRow: function(aAction, aRow) {}, performActionOnCell: function(aAction, aRow, aCol) {}, // extra utility stuff createAtom: function(aVal) { try { var i = Components.interfaces.nsIAtomService; var svc = Components.classes["@mozilla.org/atom-service;1"].getService(i); return svc.getAtom(aVal); } catch(ex) { return null; } } }; PK y0jrЬ 2content/inspector/jsutil/events/ObserverManager.js/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Joe Hewitt (original author) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ /*************************************************************** * ObserverManager ----------------------------------------------- * Manages observer and event dispatching for an object. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * REQUIRED IMPORTS: ****************************************************************/ //////////////////////////////////////////////////////////////////////////// //// class ObserverManager function ObserverManager(aTarget) { this.mTarget = aTarget; this.mObservers = {}; } ObserverManager.prototype = { addObserver: function(aEventName, aObserver) { var list; if (!(aEventName in this.mObservers)) { list = []; this.mObservers[aEventName] = list; } else list = this.mObservers[aEventName]; list.push(aObserver); }, removeObserver: function(aEventName, aObserver) { if (aEventName in this.mObservers) { var list = this.mObservers[aEventName]; for (var i = 0; i < list.length; ++i) { if (list[i] == aObserver) { list.splice(i, 1); return; } } } }, dispatchEvent: function(aEventName, aEventData) { if (aEventName in this.mObservers) { if (!("target" in aEventData)) aEventData.target = this.mTarget; aEventData.type = aEventName; var list = this.mObservers[aEventName]; for (var i = 0; i < list.length; ++i) list[i].onEvent(aEventData); } } }; PK 32 4GG*content/inspector/prefs/pref-inspector.xul &installHowTo.label;