mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-06 07:17:30 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
11
dom/xml/resources/XMLMonoPrint.css
Normal file
11
dom/xml/resources/XMLMonoPrint.css
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
@charset "UTF-8";
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
@import url("chrome://global/content/xml/XMLPrettyPrint.css");
|
||||
|
||||
#top > .expander-open {
|
||||
font-family: monospace;
|
||||
white-space: pre;
|
||||
}
|
||||
41
dom/xml/resources/XMLPrettyPrint.css
Normal file
41
dom/xml/resources/XMLPrettyPrint.css
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
@charset "UTF-8";
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
@import url("resource://gre-resources/viewsource.css");
|
||||
|
||||
#header {
|
||||
background-color: #ccc;
|
||||
border-bottom: 3px solid black;
|
||||
padding: 0.5em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.expander-content {
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
.expander {
|
||||
cursor: pointer;
|
||||
-moz-user-select: none;
|
||||
text-align: center;
|
||||
vertical-align: top;
|
||||
width: 1em;
|
||||
display: inline-block;
|
||||
margin-left: -1em;
|
||||
}
|
||||
|
||||
#top > .expander-open, #top > .expander-closed {
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
.expander-closed > .expander-content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.comment {
|
||||
font-family: monospace;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
43
dom/xml/resources/XMLPrettyPrint.xml
Normal file
43
dom/xml/resources/XMLPrettyPrint.xml
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<bindings xmlns="http://www.mozilla.org/xbl"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<binding id="prettyprint" bindToUntrustedContent="true">
|
||||
|
||||
<content><html:div id='top' class="highlight"/>
|
||||
<html:span style="display: none;"><children/></html:span>
|
||||
</content>
|
||||
|
||||
<handlers>
|
||||
<handler event="click" button="0">
|
||||
<![CDATA[
|
||||
try {
|
||||
var par = event.originalTarget;
|
||||
if (par.nodeName == 'div' && par.className == 'expander') {
|
||||
if (par.parentNode.className == 'expander-closed') {
|
||||
par.parentNode.className = 'expander-open';
|
||||
event.originalTarget.firstChild.data = '\u2212';
|
||||
}
|
||||
else {
|
||||
par.parentNode.className = 'expander-closed';
|
||||
event.originalTarget.firstChild.data = '+';
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
]]>
|
||||
</handler>
|
||||
<handler event="prettyprint-dom-created" allowuntrusted="false">
|
||||
<![CDATA[
|
||||
document.getAnonymousNodes(this).item(0).appendChild(event.detail);
|
||||
]]>
|
||||
</handler>
|
||||
</handlers>
|
||||
|
||||
</binding>
|
||||
|
||||
</bindings>
|
||||
137
dom/xml/resources/XMLPrettyPrint.xsl
Normal file
137
dom/xml/resources/XMLPrettyPrint.xsl
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<!DOCTYPE overlay [
|
||||
<!ENTITY % prettyPrintDTD SYSTEM "chrome://global/locale/xml/prettyprint.dtd">
|
||||
%prettyPrintDTD;
|
||||
<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
|
||||
%globalDTD;
|
||||
]>
|
||||
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<xsl:output method="xml"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<link href="chrome://global/content/xml/XMLPrettyPrint.css" type="text/css" rel="stylesheet"/>
|
||||
<link title="Monospace" href="chrome://global/content/xml/XMLMonoPrint.css" type="text/css" rel="alternate stylesheet"/>
|
||||
<div id="header" dir="&locale.dir;">
|
||||
<p>
|
||||
&xml.nostylesheet;
|
||||
</p>
|
||||
</div>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="*">
|
||||
<div>
|
||||
<xsl:text><</xsl:text>
|
||||
<span class="start-tag"><xsl:value-of select="name(.)"/></span>
|
||||
<xsl:apply-templates select="@*"/>
|
||||
<xsl:text>/></xsl:text>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="*[node()]">
|
||||
<div>
|
||||
<xsl:text><</xsl:text>
|
||||
<span class="start-tag"><xsl:value-of select="name(.)"/></span>
|
||||
<xsl:apply-templates select="@*"/>
|
||||
<xsl:text>></xsl:text>
|
||||
|
||||
<span class="text"><xsl:value-of select="."/></span>
|
||||
|
||||
<xsl:text></</xsl:text>
|
||||
<span class="end-tag"><xsl:value-of select="name(.)"/></span>
|
||||
<xsl:text>></xsl:text>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="*[* or processing-instruction() or comment() or string-length(.) > 50]">
|
||||
<div class="expander-open">
|
||||
<xsl:call-template name="expander"/>
|
||||
|
||||
<xsl:text><</xsl:text>
|
||||
<span class="start-tag"><xsl:value-of select="name(.)"/></span>
|
||||
<xsl:apply-templates select="@*"/>
|
||||
<xsl:text>></xsl:text>
|
||||
|
||||
<div class="expander-content"><xsl:apply-templates/></div>
|
||||
|
||||
<xsl:text></</xsl:text>
|
||||
<span class="end-tag"><xsl:value-of select="name(.)"/></span>
|
||||
<xsl:text>></xsl:text>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="@*">
|
||||
<xsl:text> </xsl:text>
|
||||
<span class="attribute-name"><xsl:value-of select="name(.)"/></span>
|
||||
<xsl:text>=</xsl:text>
|
||||
<span class="attribute-value">"<xsl:value-of select="."/>"</span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="text()">
|
||||
<xsl:if test="normalize-space(.)">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="processing-instruction()">
|
||||
<div class="pi">
|
||||
<xsl:text><?</xsl:text>
|
||||
<xsl:value-of select="name(.)"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="."/>
|
||||
<xsl:text>?></xsl:text>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="processing-instruction()[string-length(.) > 50]">
|
||||
<div class="expander-open">
|
||||
<xsl:call-template name="expander"/>
|
||||
|
||||
<span class="pi">
|
||||
<xsl:text> <?</xsl:text>
|
||||
<xsl:value-of select="name(.)"/>
|
||||
</span>
|
||||
<div class="expander-content pi"><xsl:value-of select="."/></div>
|
||||
<span class="pi">
|
||||
<xsl:text>?></xsl:text>
|
||||
</span>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="comment()">
|
||||
<div class="comment">
|
||||
<xsl:text><!--</xsl:text>
|
||||
<xsl:value-of select="."/>
|
||||
<xsl:text>--></xsl:text>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="comment()[string-length(.) > 50]">
|
||||
<div class="expander-open">
|
||||
<xsl:call-template name="expander"/>
|
||||
|
||||
<span class="comment">
|
||||
<xsl:text><!--</xsl:text>
|
||||
</span>
|
||||
<div class="expander-content comment">
|
||||
<xsl:value-of select="."/>
|
||||
</div>
|
||||
<span class="comment">
|
||||
<xsl:text>--></xsl:text>
|
||||
</span>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="expander">
|
||||
<div class="expander">−</div>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
9
dom/xml/resources/jar.mn
Normal file
9
dom/xml/resources/jar.mn
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
toolkit.jar:
|
||||
content/global/xml/XMLPrettyPrint.css (XMLPrettyPrint.css)
|
||||
content/global/xml/XMLMonoPrint.css (XMLMonoPrint.css)
|
||||
content/global/xml/XMLPrettyPrint.xml (XMLPrettyPrint.xml)
|
||||
content/global/xml/XMLPrettyPrint.xsl (XMLPrettyPrint.xsl)
|
||||
7
dom/xml/resources/moz.build
Normal file
7
dom/xml/resources/moz.build
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
JAR_MANIFESTS += ['jar.mn']
|
||||
Loading…
Add table
Add a link
Reference in a new issue