Browse Source

1.9.1

master
boisso 12 years ago
parent
commit
8c657d5ec4
  1. 6
      mozilla/kmeleon/build.mk
  2. 2
      mozilla/kmeleon/config/version.txt
  3. 25
      mozilla/kmeleon/confvars.sh
  4. 173
      mozilla/kmeleon/embed-replacements/content/global/about.xhtml
  5. BIN
      mozilla/kmeleon/embed-replacements/content/global/logo.gif
  6. 295
      mozilla/kmeleon/embed-replacements/content/global/netError.xhtml
  7. 151
      mozilla/kmeleon/embed-replacements/skin/classic/global/netError.css
  8. 63
      mozilla/kmeleon/flashblock/Makefile.in
  9. 10
      mozilla/kmeleon/flashblock/README
  10. BIN
      mozilla/kmeleon/flashblock/content/authorware.png
  11. 18
      mozilla/kmeleon/flashblock/content/contents.rdf
  12. BIN
      mozilla/kmeleon/flashblock/content/director.png
  13. BIN
      mozilla/kmeleon/flashblock/content/flash.png
  14. 98
      mozilla/kmeleon/flashblock/content/flashblock.css
  15. 619
      mozilla/kmeleon/flashblock/content/flashblock.xml
  16. BIN
      mozilla/kmeleon/flashblock/content/flashplay.png
  17. 8
      mozilla/kmeleon/flashblock/jar.mn
  18. 52
      mozilla/kmeleon/history/Makefile.in
  19. 53
      mozilla/kmeleon/history/public/Makefile.in
  20. 108
      mozilla/kmeleon/history/public/nsIBrowserHistory.idl
  21. 75
      mozilla/kmeleon/history/src/Makefile.in
  22. 4642
      mozilla/kmeleon/history/src/nsGlobalHistory.cpp
  23. 455
      mozilla/kmeleon/history/src/nsGlobalHistory.h
  24. 63
      mozilla/kmeleon/history/src/nsHistoryLoadListener.h
  25. 46
      mozilla/kmeleon/makefiles.sh
  26. 51
      mozilla/kmeleon/typeaheadfind/Makefile.in
  27. 44
      mozilla/kmeleon/typeaheadfind/makefiles.sh
  28. 50
      mozilla/kmeleon/typeaheadfind/public/Makefile.in
  29. 88
      mozilla/kmeleon/typeaheadfind/public/nsITypeAheadFind.idl
  30. 44
      mozilla/kmeleon/typeaheadfind/resources/Makefile.in
  31. BIN
      mozilla/kmeleon/typeaheadfind/resources/content/notfound.wav
  32. 41
      mozilla/kmeleon/typeaheadfind/resources/content/prefs/typeaheadfind.js
  33. 2
      mozilla/kmeleon/typeaheadfind/resources/jar.mn
  34. 99
      mozilla/kmeleon/typeaheadfind/src/Makefile.in
  35. 2993
      mozilla/kmeleon/typeaheadfind/src/nsTypeAheadFind.cpp
  36. 279
      mozilla/kmeleon/typeaheadfind/src/nsTypeAheadFind.h
  37. 102
      mozilla/kmeleon/typeaheadfind/src/nsTypeAheadFindRegistration.cpp
  38. 9
      mozilla/kmeleon/typeaheadfind/src/typeaheadfind.pkg
  39. 48
      mozilla/kmeleon/wallet/Makefile.in
  40. 82
      mozilla/kmeleon/wallet/build/Makefile.in
  41. 61
      mozilla/kmeleon/wallet/build/nsWalletViewerFactory.cpp
  42. 9
      mozilla/kmeleon/wallet/build/walletviewer.pkg
  43. 64
      mozilla/kmeleon/wallet/editor/Makefile.in
  44. 61
      mozilla/kmeleon/wallet/editor/nsIWalletEditor.idl
  45. 99
      mozilla/kmeleon/wallet/editor/nsWalletEditor.cpp
  46. 51
      mozilla/kmeleon/wallet/editor/nsWalletEditor.h
  47. 185
      mozilla/kmeleon/wallet/editor/resources/content/WalletAddress.xul
  48. 57
      mozilla/kmeleon/wallet/editor/resources/content/WalletBilling.xul
  49. 525
      mozilla/kmeleon/wallet/editor/resources/content/WalletConcatenated.xul
  50. 127
      mozilla/kmeleon/wallet/editor/resources/content/WalletCredit.xul
  51. 105
      mozilla/kmeleon/wallet/editor/resources/content/WalletEmploy.xul
  52. 191
      mozilla/kmeleon/wallet/editor/resources/content/WalletMisc.xul
  53. 129
      mozilla/kmeleon/wallet/editor/resources/content/WalletName.xul
  54. 57
      mozilla/kmeleon/wallet/editor/resources/content/WalletOther.xul
  55. 229
      mozilla/kmeleon/wallet/editor/resources/content/WalletPhone.xul
  56. 57
      mozilla/kmeleon/wallet/editor/resources/content/WalletPrimary.xul
  57. 57
      mozilla/kmeleon/wallet/editor/resources/content/WalletShipping.xul
  58. 168
      mozilla/kmeleon/wallet/editor/resources/content/WalletTree.xul
  59. 112
      mozilla/kmeleon/wallet/editor/resources/content/WalletUrlspecific.xul
  60. 479
      mozilla/kmeleon/wallet/editor/resources/content/WalletViewer.js
  61. 42
      mozilla/kmeleon/wallet/editor/resources/content/WalletViewer.xul
  62. 14
      mozilla/kmeleon/wallet/editor/resources/locale/en-US/WalletEditor.dtd
  63. 46
      mozilla/kmeleon/wallet/editor/resources/locale/en-US/WalletEditor.properties
  64. 178
      mozilla/kmeleon/wallet/editor/resources/locale/en-US/WalletViewer.dtd
  65. 53
      mozilla/kmeleon/wallet/jar.mn
  66. 47
      mozilla/kmeleon/wallet/makefiles.sh
  67. 61
      mozilla/kmeleon/wallet/public/Makefile.in
  68. 49
      mozilla/kmeleon/wallet/public/nsCPassword.h
  69. 79
      mozilla/kmeleon/wallet/public/nsIPassword.idl
  70. 97
      mozilla/kmeleon/wallet/public/nsIWalletService.idl
  71. 38
      mozilla/kmeleon/wallet/resources/content/contents.rdf
  72. 109
      mozilla/kmeleon/wallet/resources/content/pref-passwords.xul
  73. 93
      mozilla/kmeleon/wallet/resources/content/pref-wallet.xul
  74. 9
      mozilla/kmeleon/wallet/resources/content/walletContextOverlay.xul
  75. 191
      mozilla/kmeleon/wallet/resources/content/walletNavigatorOverlay.xul
  76. 386
      mozilla/kmeleon/wallet/resources/content/walletOverlay.js
  77. 54
      mozilla/kmeleon/wallet/resources/content/walletPrefsOverlay.xul
  78. 102
      mozilla/kmeleon/wallet/resources/content/walletTasksOverlay.xul
  79. 26
      mozilla/kmeleon/wallet/resources/locale/en-US/contents.rdf
  80. 15
      mozilla/kmeleon/wallet/resources/locale/en-US/pref-passwords.dtd
  81. 10
      mozilla/kmeleon/wallet/resources/locale/en-US/pref-wallet.dtd
  82. 20
      mozilla/kmeleon/wallet/resources/locale/en-US/walletNavigatorOverlay.dtd
  83. 2
      mozilla/kmeleon/wallet/resources/locale/en-US/walletPrefsOverlay.dtd
  84. 28
      mozilla/kmeleon/wallet/resources/locale/en-US/walletTasksOverlay.dtd
  85. 64
      mozilla/kmeleon/wallet/signonviewer/Makefile.in
  86. 61
      mozilla/kmeleon/wallet/signonviewer/nsISignonViewer.idl
  87. 118
      mozilla/kmeleon/wallet/signonviewer/nsSignonViewer.cpp
  88. 52
      mozilla/kmeleon/wallet/signonviewer/nsSignonViewer.h
  89. 749
      mozilla/kmeleon/wallet/signonviewer/resources/content/SignonViewer.js
  90. 187
      mozilla/kmeleon/wallet/signonviewer/resources/content/SignonViewer.xul
  91. 20
      mozilla/kmeleon/wallet/signonviewer/resources/locale/en-US/SignonViewer.dtd
  92. 7
      mozilla/kmeleon/wallet/signonviewer/resources/locale/en-US/SignonViewer.properties
  93. 14
      mozilla/kmeleon/wallet/src/DistinguishedSchema.tbl
  94. 2541
      mozilla/kmeleon/wallet/src/FieldSchema.tbl
  95. 103
      mozilla/kmeleon/wallet/src/Makefile.in
  96. 191
      mozilla/kmeleon/wallet/src/PositionalSchema.tbl
  97. 1338
      mozilla/kmeleon/wallet/src/SchemaConcat.tbl
  98. 184
      mozilla/kmeleon/wallet/src/SchemaStrings.tbl
  99. 377
      mozilla/kmeleon/wallet/src/StateSchema.tbl
  100. 77
      mozilla/kmeleon/wallet/src/VcardSchema.tbl

6
mozilla/kmeleon/build.mk

@ -50,6 +50,8 @@ tier_app_dirs += $(MOZ_BRANDING_DIRECTORY)
endif
tier_app_dirs += \
profile \
embedding/config \
kmeleon \
$(NULL)
package:
@$(MAKE) -C kmeleon/installer

2
mozilla/kmeleon/config/version.txt

@ -1 +1 @@
1.5.0pre
1.6.0pre

25
mozilla/kmeleon/confvars.sh

@ -36,18 +36,19 @@
#
# ***** END LICENSE BLOCK *****
MOZ_APP_NAME=K-Meleon
MOZ_APP_DISPLAYNAME=K-Meleon
MOZ_APP_VERSION=$MOZILLA_VERSION
MOZ_NO_XPCOM_OBSOLETE=1
MOZ_EXTENSIONS_DEFAULT="wallet xml-rpc typeaheadfind"
MOZ_XUL_APP=
MOZ_DISABLE_PARENTAL_CONTROLS=1
MOZ_PREF_EXTENSIONS=
MOZ_WEBSERVICES=
MOZ_APP_NAME=kmeleon
ENABLE_TESTS=
ACCESSIBILITY=
MOZ_JSDEBUGGER=
MOZ_PROFILESHARING=
MOZ_UNIVERSALCHARDET=1
MOZ_CRASHREPORTER=
MOZ_PLACES=
MOZ_APP_DISPLAYNAME=K-Meleon
MOZ_APP_VERSION=$MOZILLA_VERSION
MOZ_EXTENSIONS_DEFAULT=
MOZ_PREF_EXTENSIONS=1
MOZ_WEBSERVICES=
MOZ_NO_XPCOM_OBSOLETE=1
MOZ_XPINSTALL=
MOZ_VIEW_SOURCE=1
MOZ_URL_CLASSIFIER=1
MOZ_SPELLCHECK=

173
mozilla/kmeleon/embed-replacements/content/global/about.xhtml

@ -0,0 +1,173 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" [
<!-- K-Meleon Copyright information START
These K-Meleon Copyright informations must stay untouched!
You are not allowed to remove or modify these informations.
--><!ENTITY km "K-Meleon">
<!ENTITY mail "kmeleon-dev@lists.sourceforge.net">
<!ENTITY home "http://kmeleon.sourceforge.net/">
<!ENTITY faq "&home;docs/faq.php">
<!ENTITY kmYear "2008">
<!ENTITY notes "&home;wiki/ReleaseNotes15">
<!ENTITY contrib "Contributors">
<!ENTITY copyright "Copyright &copy;">
<!ENTITY allrights "All Rights Reserved.">
<!-- K-Meleon Copyright information END -->
]>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" class="km_PageBackground"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<title>About &km;</title>
<link rel="stylesheet" href="chrome://global/skin/netError.css" type="text/css" media="all" />
<style type="text/css">
#head > a { text-decoration: none; font-size: 110%; }
h2,
#main p#useragent,
ul.credits { text-align: center; }
ul.credits { margin: 0; list-style-type: none; }
ul.credits > li { margin: 0 0 3em; }
p#useragent,
p#government { font-size: 83.3%; }
p#useragent { margin: 1.2em; }
#main { font-size: 120%; }
#main p { text-align: justify; }
#main hr { margin: 1em 0; }
@media screen {
#dummy1 { height: 9.5em; }
#dummy2 { height: 11em; }
#creditsScrollBox{ height: 11em; min-height: 11em; overflow: hidden; }
}
@media print {
ul.credits { margin: 1em 0; -moz-margin-start: 1.5em; list-style-type: square; text-align: left; }
ul.credits > li { margin: 0 0 0.5em; }
#dummy1,
#dummy2 { display: none; }
#creditsScrollBox{ overflow: visible; }
#main { position: relative; }
}
</style>
<script type="text/javascript"><![CDATA[
function init() {
initCredits();
initUserAgent();
}
// user agent
function initUserAgent() {
try {
document.getElementById("useragent").appendChild(document.createTextNode(navigator.userAgent));
document.getElementById("mozYear").firstChild.appendData("-"+navigator.productSub.substr(0,4));
document.getElementById("kmName").firstChild.appendData(" "+navigator.vendorSub);
} catch (e) {}
}
// credits
var timer = 0, box;
function initCredits() {
box = document.getElementById("creditsScrollBox");
box.scrollTop = 0;
setTimeout("startCredits()", 2000);
}
function startCredits() {
timer = setInterval("scrollCredits()", 25);
}
function scrollCredits() {
var tmp = ++box.scrollTop;
if (box.scrollTop != tmp) {
// we're at the bottom
clearInterval(timer);
initCredits();
}
}
]]></script>
</head><body dir="ltr" class="km_PageBackground km_Text" onload="init()">
<fieldset dir="rtl" class="km_TextBackground km_TextBorder km_PageContainer">
<legend id="head" class="km_TextBackground km_TextBorder">&nbsp;<a href="&home;">Homepage</a>&nbsp;&middot; <a href="&notes;">Release&nbsp;Notes</a>&nbsp;&middot; <a href="&faq;">FAQ</a>&nbsp;</legend>
<div dir="ltr" class="km_Logo">
<div id="creditsBox" class="km_Border km_SpecialBorder km_LogoWidth km_LogoHeight">
<h1 id="kmName">&km;</h1>
<p class="km_Border">Thanks to all &km; &contrib;, especially:</p>
<div id="creditsScrollBox">
<div id="dummy1"></div>
<ul class="credits">
<!-- 1.0, 1.1, 1.5 -->
<li>Dorian Boissonnade</li>
<li>Klaus Kohler</li>
<!-- 0.9 -->
<li>Ulf Erikson</li>
<li>Romain Vallet</li>
<li>Jason J.</li>
<li>Andrew Mutch</li>
<!-- 0.8 -->
<li>Vernon Brooks</li>
<li>Jordan Callicoat</li>
<!-- 0.7 -->
<li>Jeff Doozan</li>
<li>Mark Liffiton</li>
<li>Rob Johnson</li>
<!-- 0.1 - 0.6 -->
<li>Chak Nanga</li><!-- winEmbed -->
<li>Brian Harris</li>
<li>Sebastian Spaeth</li>
<li>Christophe Thibault</li>
</ul>
<div id="dummy2"></div>
</div>
</div>
</div>
<div id="main" dir="ltr">
<!-- Begin Main Content -->
<p id="useragent"></p>
<hr class="km_Color km_Border"/>
<ul><!-- Add your own Copyright notice here -->
<!-- K-Meleon Copyright notice START
This K-Meleon Copyright notice must stay untouched!
You are not allowed to remove or modify this notice.
--><li>&copyright; 2000-&kmYear; by &contrib; to the <a href="&home;">&km;</a> project under the <a href="http://www.gnu.org/licenses/licenses.html#TOCGPL">GNU General Public License</a>. &allrights;</li>
<!-- K-Meleon Copyright notice END -->
<!-- Extensions -->
<li><a href="http://console2.mozdev.org/">Console&sup2;</a> extension developed by Simon B&uuml;nzli and <a href="http://console2.mozdev.org/contributors.html">&contrib;</a>. &allrights;</li>
<li><a href="http://flashblock.mozdev.org/">Flashblock</a> extension developed by Ted Mielczarek and <a href="http://flashblock.mozdev.org/credits.html">&contrib;</a>. &allrights;</li>
<li><a href="http://newsfox.mozdev.org/">NewsFox</a> RSS/Atom news reader developed by Andy Frank and <a href="http://newsfox.mozdev.org/team.html">&contrib;</a>. &allrights;</li>
<!-- Mozilla Copyright notice START
This Mozilla Copyright notice must stay untouched!
You are not allowed to remove or modify this notice.
--><li>Portions of this software are &copyright; <span id="mozYear">1998</span> by <a href="http://www.mozilla.org/credits/">&contrib;</a> to the <a href="http://www.mozilla.org/">Mozilla</a> codebase under the <a href="http://www.mozilla.org/MPL/MPL-1.1.html">Mozilla Public License</a> and <a href="http://www.mozilla.org/MPL/NPL-1.1.html">Netscape Public License</a>. &allrights;</li>
<li>Portions of this software are &copyright; 1994 The Regents of the University of California. &allrights;</li>
<li>Portions of this software are &copyright; 2000-2002 Japan Network Information Center. &allrights;</li>
<li>This software may contain portions that are &copyright; 1998-2002 <a href="http://www.supportsoft.com/">SupportSoft</a>, Inc. &allrights;</li>
</ul>
<p id="government">U.S. GOVERNMENT END USERS. The Software is a "commercial item," as that term is defined
in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software
documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48
C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire the Software with only
those rights set forth herein.</p>
<!-- Mozilla Copyright notice END -->
<hr class="km_Color km_Border"/>
<h2>Our &contrib;</h2>
<p>We would like to thank our &contrib; whose efforts make &km; possible. These people have helped by
writing code and documentation, and by testing. They have created and maintained the browser, its associated
development kits, our build tools and our web site.</p>
<p>To be added to the list, send mail to <a
href="mailto:&mail;?subject=&km; Credits">&mail;</a> with your name and a sentence summarizing what you
have contributed to &km;.</p>
<!-- End Main Content -->
</div>
</fieldset>
</body></html>

BIN
mozilla/kmeleon/embed-replacements/content/global/logo.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

295
mozilla/kmeleon/embed-replacements/content/global/netError.xhtml

@ -0,0 +1,295 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html [
<!ENTITY % htmlDTD
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
%htmlDTD;
<!ENTITY % netErrorDTD
SYSTEM "chrome://global/locale/netError.dtd">
%netErrorDTD;
<!ENTITY % globalDTD
SYSTEM "chrome://global/locale/global.dtd">
%globalDTD;
]>
<html xmlns="http://www.w3.org/1999/xhtml" class="km_PageBackground">
<head>
<title>&loadError.label;</title>
<link rel="stylesheet" href="chrome://global/skin/netError.css" type="text/css" media="all" />
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAANbY1E9YMgAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAICSURBVHjaYvz//z8DJQAggJhwiDPvnmlzc2aR0O+JGezt+AwACCCsBhxfYhn59N41FWtXIxZOLu70niRGXVwGAAQQNgNYHj96O8HaWYdJW5ubwd4/mI2Ng7sblwEAAYRhwMm1URk/vn4SUNWVYGD8+YZBXZOZm5OLzRjoCmNsBgAEEKoBN82Y7l851GLrqMjM8Oc7A8O/3wwMP54wuAQFCXNycUzGZgBAAKEYcOaKZO2/f//5FbUVgBrfMoRVcgHpNwyKGjKMXDwCan0prFboBgAEELIBzDcvXyy2cVZhYPj9GWj7H4jo/38MDJ9OMDj7O/KzsjH3oxsAEEBwA/bNNipiZf7FI6cqwcDw8x2qqp8fGORUpVn4BEXlgGHhhCwFEEAwA9gfP3hdZ+Oizcjw+wvCdjgAuuLrFQbXIH9hTm7uqcgyAAEENuD4ctcebm5mbikFYRTbV7V/Q6j88Z5BSuY7q4CQgAjQFR4wYYAAAhtw89L5ZFsnRaDtn4CW/YXrAQcisit+PGVwDgrnZ2NnnwATBQggpsNLvGYLCAmxi8tLARWg+h3FBVBXSEj/ZZWQkRcCuiIQJAQQQCyvnj5KMDTkZ2JgYmRg4FchnHv+vmEwttLmeXT3VjKQtx4ggFgk5TXebV63UfT3ijOMxOZAVlZWdiB1EMQGCCBGSrMzQIABAFR3kRM3KggZAAAAAElFTkSuQmCC" />
<script type="application/x-javascript"><![CDATA[
// Error url MUST be formatted like this:
// moz-neterror:page?e=error&u=url&d=desc
// Note that this file uses document.documentURI to get
// the URL (with the format from above). This is because
// document.location.href gets the current URI off the docshell,
// which is the URL displayed in the location bar, i.e.
// the URI that the user attempted to load.
function getErrorCode()
{
var url = document.documentURI;
var error = url.search(/e\=/);
var duffUrl = url.search(/\&u\=/);
return decodeURIComponent(url.slice(error + 2, duffUrl));
}
function getCSSClass()
{
var url = document.documentURI;
var matches = url.match(/s\=([^&]+)\&/);
// s is optional, if no match just return nothing
if (!matches || matches.length < 2)
return "";
// parenthetical match is the second entry
return decodeURIComponent(matches[1]);
}
function getDescription()
{
var url = document.documentURI;
var desc = url.search(/d\=/);
// desc == -1 if not found; if so, return an empty string
// instead of what would turn out to be portions of the URI
if (desc == -1) return "";
return decodeURIComponent(url.slice(desc + 2));
}
function retryThis(buttonEl)
{
// Session history has the URL of the page that failed
// to load, not the one of the error page. So, just call
// reload(), which will also repost POST data correctly.
try {
location.reload();
} catch (e) {
// We probably tried to reload a URI that caused an exception to
// occur; e.g. a non-existent file.
}
buttonEl.disabled = true;
}
function initPage()
{
var err = getErrorCode();
// if it's an unknown error or there's no title or description
// defined, get the generic message
var errTitle = document.getElementById("et_" + err);
var errDesc = document.getElementById("ed_" + err);
if (!errTitle || !errDesc)
{
errTitle = document.getElementById("et_generic");
errDesc = document.getElementById("ed_generic");
}
var title = document.getElementById("errorTitleText");
if (title)
{
title.parentNode.replaceChild(errTitle, title);
// change id to the replaced child's id so styling works
errTitle.id = "errorTitleText";
}
var sd = document.getElementById("errorShortDescText");
if (sd)
sd.textContent = getDescription();
var ld = document.getElementById("errorLongDesc");
if (ld)
{
ld.parentNode.replaceChild(errDesc, ld);
// change id to the replaced child's id so styling works
errDesc.id = "errorLongDesc";
}
// remove undisplayed errors to avoid bug 39098
var errContainer = document.getElementById("errorContainer");
errContainer.parentNode.removeChild(errContainer);
var className = getCSSClass();
if (className && className != "expertBadCert") {
// Associate a CSS class with the root of the page, if one was passed in,
// to allow custom styling.
// Not "expertBadCert" though, don't want to deal with the favicon
document.documentElement.className = className;
// Also, if they specified a CSS class, they must supply their own
// favicon. In order to trigger the browser to repaint though, we
// need to remove/add the link element.
var favicon = document.getElementById("favicon");
var faviconParent = favicon.parentNode;
faviconParent.removeChild(favicon);
favicon.setAttribute("href", "chrome://global/skin/icons/" + className + "_favicon.png");
faviconParent.appendChild(favicon);
}
if (className == "expertBadCert") {
showSecuritySection();
}
if (err == "nssBadCert") {
// Remove the "Try again" button for security exceptions, since it's
// almost certainly useless.
document.getElementById("errorTryAgain").style.display = "none";
document.getElementById("errorPageContainer").setAttribute("class", "certerror");
addDomainErrorLink();
}
else {
// Remove the override block for non-certificate errors. CSS-hiding
// isn't good enough here, because of bug 39098
var secOverride = document.getElementById("securityOverrideDiv");
secOverride.parentNode.removeChild(secOverride);
}
}
function showSecuritySection() {
// Swap link out, content in
document.getElementById('securityOverrideContent').style.display = '';
document.getElementById('securityOverrideLink').style.display = 'none';
}
/* In the case of SSL error pages about domain mismatch, see if
we can hyperlink the user to the correct site. We don't want
to do this generically since it allows MitM attacks to redirect
users to a site under attacker control, but in certain cases
it is safe (and helpful!) to do so. Bug 402210
*/
function addDomainErrorLink() {
// Rather than textContent, we need to treat description as HTML
var sd = document.getElementById("errorShortDescText");
if (sd) {
var desc = getDescription();
// sanitize description text - see bug 441169
// First, find the index of the <a> tag we care about, being careful not to
// use an over-greedy regex
var re = /<a id="cert_domain_link" title="([^"]+)">/;
var result = re.exec(desc);
if(!result)
return;
// Remove sd's existing children
sd.textContent = "";
// Everything up to the link should be text content
sd.appendChild(document.createTextNode(desc.slice(0, result.index)));
// Now create the link itself
var anchorEl = document.createElement("a");
anchorEl.setAttribute("id", "cert_domain_link");
anchorEl.setAttribute("title", result[1]);
anchorEl.appendChild(document.createTextNode(result[1]));
sd.appendChild(anchorEl);
// Finally, append text for anything after the closing </a>
sd.appendChild(document.createTextNode(desc.slice(desc.indexOf("</a>") + "</a>".length)));
}
var link = document.getElementById('cert_domain_link');
if (!link)
return;
var okHost = link.getAttribute("title");
var thisHost = document.location.hostname;
var proto = document.location.protocol;
// If okHost is a wildcard domain ("*.example.com") let's
// use "www" instead. "*.example.com" isn't going to
// get anyone anywhere useful. bug 432491
okHost = okHost.replace(/^\*\./, "www.");
/* case #1:
* example.com uses an invalid security certificate.
*
* The certificate is only valid for www.example.com
*
* Make sure to include the "." ahead of thisHost so that
* a MitM attack on paypal.com doesn't hyperlink to "notpaypal.com"
*
* We'd normally just use a RegExp here except that we lack a
* library function to escape them properly (bug 248062), and
* domain names are famous for having '.' characters in them,
* which would allow spurious and possibly hostile matches.
*/
if (endsWith(okHost, "." + thisHost))
link.href = proto + okHost;
/* case #2:
* browser.garage.maemo.org uses an invalid security certificate.
*
* The certificate is only valid for garage.maemo.org
*/
if (endsWith(thisHost, "." + okHost))
link.href = proto + okHost;
}
function endsWith(haystack, needle) {
return haystack.slice(-needle.length) == needle;
}
]]></script>
</head>
<body dir="&locale.dir;" class="km_PageBackground km_Text">
<div id="errorContainer">
<div id="errorTitlesContainer">
<h1 id="et_generic">&generic.title;</h1>
<h1 id="et_dnsNotFound">&dnsNotFound.title;</h1>
<h1 id="et_fileNotFound">&fileNotFound.title;</h1>
<h1 id="et_malformedURI">&malformedURI.title;</h1>
<h1 id="et_protocolNotFound">&protocolNotFound.title;</h1>
<h1 id="et_connectionFailure">&connectionFailure.title;</h1>
<h1 id="et_netTimeout">&netTimeout.title;</h1>
<h1 id="et_redirectLoop">&redirectLoop.title;</h1>
<h1 id="et_unknownSocketType">&unknownSocketType.title;</h1>
<h1 id="et_netReset">&netReset.title;</h1>
<h1 id="et_netOffline">&netOffline.title;</h1>
<h1 id="et_netInterrupt">&netInterrupt.title;</h1>
<h1 id="et_deniedPortAccess">&deniedPortAccess.title;</h1>
<h1 id="et_proxyResolveFailure">&proxyResolveFailure.title;</h1>
<h1 id="et_proxyConnectFailure">&proxyConnectFailure.title;</h1>
<h1 id="et_contentEncodingError">&contentEncodingError.title;</h1>
<h1 id="et_unsafeContentType">&unsafeContentType.title;</h1>
<h1 id="et_nssFailure2">&nssFailure2.title;</h1>
<h1 id="et_nssBadCert">&nssBadCert.title;</h1>
<h1 id="et_malwareBlocked">&malwareBlocked.title;</h1>
</div>
<div id="errorDescriptionsContainer">
<div id="ed_generic">&generic.longDesc;</div>
<div id="ed_dnsNotFound">&dnsNotFound.longDesc;</div>
<div id="ed_fileNotFound">&fileNotFound.longDesc;</div>
<div id="ed_malformedURI">&malformedURI.longDesc;</div>
<div id="ed_protocolNotFound">&protocolNotFound.longDesc;</div>
<div id="ed_connectionFailure">&connectionFailure.longDesc;</div>
<div id="ed_netTimeout">&netTimeout.longDesc;</div>
<div id="ed_redirectLoop">&redirectLoop.longDesc;</div>
<div id="ed_unknownSocketType">&unknownSocketType.longDesc;</div>
<div id="ed_netReset">&netReset.longDesc;</div>
<div id="ed_netOffline">&netOffline.longDesc;</div>
<div id="ed_netInterrupt">&netInterrupt.longDesc;</div>
<div id="ed_deniedPortAccess">&deniedPortAccess.longDesc;</div>
<div id="ed_proxyResolveFailure">&proxyResolveFailure.longDesc;</div>
<div id="ed_proxyConnectFailure">&proxyConnectFailure.longDesc;</div>
<div id="ed_contentEncodingError">&contentEncodingError.longDesc;</div>
<div id="ed_unsafeContentType">&unsafeContentType.longDesc;</div>
<div id="ed_nssFailure2">&nssFailure2.longDesc;</div>
<div id="ed_nssBadCert">&nssBadCert.longDesc2;</div>
<div id="ed_malwareBlocked">&malwareBlocked.longDesc;</div>
</div>
</div>
<div id="errorPageContainer" class="km_TextBackground km_TextBorder km_PageContainer">
<div id="errorTextContainer" class="km_Icon">
<div class="km_Border km_SpecialBorder km_IconWidth km_IconHeight">
<div id="errorTitle">
<h1 id="errorTitleText"/>
</div>
<div id="errorShortDesc">
<p id="errorShortDescText" class="km_Border"/>
</div>
<div id="errorLongDesc"/>
<div id="securityOverrideDiv">
<a id="securityOverrideLink" href="javascript:showSecuritySection();" >&securityOverride.linkText;</a>
<div id="securityOverrideContent" style="display: none;">&securityOverride.warningText;</div>
</div>
</div>
</div>
<div class="km_IconWidth km_Button">
<xul:button xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
id="errorTryAgain" label="&retry.label;" oncommand="retryThis();"/>
</div>
</div>
<script type="application/x-javascript">initPage();</script>
</body>
</html>

151
mozilla/kmeleon/embed-replacements/skin/classic/global/netError.css

@ -0,0 +1,151 @@
.km_Color {
color: #62AC2A;
}
.km_Border {
border-color: #62AC2A;
border-style: solid;
}
.km_TextBorder {
border: 1px solid ThreeDShadow;
}
.km_SpecialBorder {
border-top-width: 0;
border-bottom-width: 2px;
border-left-width: 0;
border-right-width: 0;
}
.km_Icon, .km_Logo {
background-image: url(about:logo);
background-repeat: no-repeat;
background-position: left bottom;
}
body[dir="rtl"] .km_Icon {
background-position: right bottom;
}
.km_IconWidth, .km_LogoWidth {
-moz-margin-start: 150px;
-moz-padding-start: 32px;
}
.km_IconHeight, .km_LogoHeight {
min-height: 200px;
}
.km_Text {
color: -moz-FieldText;
font: message-box;
}
.km_TextBackground {
background-color: -moz-Field;
}
.km_PageBackground {
background-color: -moz-Dialog;
}
.km_PageContainer {
-moz-padding-start: 30px;
-moz-border-radius: 10px;
min-width: 400px;
max-width: 52em;
}
.km_Button {
margin-top: 1.4em;
}
.km_Button button {
margin-top: 0.6em;
}
a {
color: inherit;
background-color: inherit;
text-decoration: underline;
}
a:hover {
color: HighlightText;
background-color: Highlight;
text-decoration: none;
}
body {
margin: 0;
padding: 0 1em;
}
div {
margin: 0;
padding: 0;
}
p, ul, ol {
margin: 1em 0;
padding: 0;
}
h1 {
font-size: 160%;
margin: 0;
padding: 0;
}
h1 + p {
font-size: 130%;
margin: 0;
padding: 1em 0;
border-top-width: 1px;
border-bottom-width: 1px;
border-left-width: 0;
border-right-width: 0;
}
h1 + p + div {
font-size: 110%;
}
ul, ol {
-moz-margin-start: 1.5em;
}
ul {
list-style: square;
}
li {
margin-bottom: 0.5em;
}
div.km_PageContainer {
margin: 4em auto;
padding: 3em;
}
fieldset.km_PageContainer {
margin: 3.35em auto 4em;
padding: 2.35em 3em 3em;
}
@media print {
.km_Color, .km_Text {
color: #000;
}
.km_Border {
border-color: #000;
}
.km_TextBorder {
border: 0;
}
.km_Icon, .km_Logo, .km_TextBackground, .km_PageBackground {
background: none;
}
.km_IconWidth, .km_LogoWidth {
-moz-margin-start: 0;
-moz-padding-start: 0;
}
.km_IconHeight, .km_LogoHeight {
min-height: 0;
}
.km_PageContainer {
-moz-padding-start: 0;
-moz-border-radius: 0;
min-width: 90%;
max-width: 90%;
}
fieldset.km_PageContainer legend, .km_Button {
display: none;
}
body, .km_PageContainer {
margin: 0;
padding: 0;
}
a {
color: #000;
background: none;
text-decoration: none;
}
}

63
mozilla/kmeleon/flashblock/Makefile.in

@ -0,0 +1,63 @@
# ***** 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 just a lowly Makefile.
#
# The Initial Developer of the Original Code is Google Inc.
# Portions created by the Initial Developer are Copyright (C) 2007
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Mark Mentovai <mark@moxienet.com> (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 *****
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk
# The presence of jar.mn causes $(SOURCE_CHROME_DIR)/$(JAR_FILE).jar to be
# built and $(SOURCE_CHROME_DIR)/installed-chrome.txt to be updated. Camino
# uses $(TARGET_CHROME_DIR)/installed-chrome.txt instead, though, so copy
# the jar and update the correct installed-chrome.txt file.
SOURCE_CHROME_DIR = $(DIST)/bin/chrome
TARGET_CHROME_DIR = $(DIST)/Embed/chrome
INSTALLED_CHROME = $(TARGET_CHROME_DIR)/installed-chrome.txt
CHROME_TYPE = content
CHROME_PKG_NAME = flashblock
JAR_FILE = $(CHROME_PKG_NAME)
libs realchrome:: $(CHROME_DEPS)
chmod a-x $(INSTALLED_CHROME)
$(NSINSTALL) -t -m 0644 \
$(SOURCE_CHROME_DIR)/$(JAR_FILE).jar $(TARGET_CHROME_DIR)
$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/add-chrome.pl \
$(INSTALLED_CHROME) 0 $(CHROME_TYPE) $(CHROME_PKG_NAME) $(JAR_FILE)

10
mozilla/kmeleon/flashblock/README

@ -0,0 +1,10 @@
Flash blocking for Camino is implemented using the Flashblock extension
from http://flashblock.mozdev.org/. Flashblock is available under the
MPL/GPL/LGPL tri-license. The files necessary for operation in Camino
are placed in the content directory and referenced by the jar.mn
manifest. A contents.rdf file is included to allow Camino to identify
the contents of flashblock.jar.
Camino's bundled Flashblock extension is currently synchronized with
Flashblock 1.5.11 from
http://downloads.mozdev.org/flashblock/flashblock-1.5.11.xpi.

BIN
mozilla/kmeleon/flashblock/content/authorware.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

18
mozilla/kmeleon/flashblock/content/contents.rdf

@ -0,0 +1,18 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<!-- list all the packages being supplied by this jar -->
<RDF:Seq about="urn:mozilla:package:root">
<RDF:li resource="urn:mozilla:package:flashblock"/>
</RDF:Seq>
<!-- package information -->
<RDF:Description about="urn:mozilla:package:flashblock"
chrome:displayName="Flashblock"
chrome:author="The Flashblock team"
chrome:authorURL="http://flashblock.mozdev.org/"
chrome:name="flashblock"
chrome:extension="true">
</RDF:Description>
</RDF:RDF>

BIN
mozilla/kmeleon/flashblock/content/director.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
mozilla/kmeleon/flashblock/content/flash.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

98
mozilla/kmeleon/flashblock/content/flashblock.css

@ -0,0 +1,98 @@
/*
* Flash Click to View by Ted Mielczarek (luser_mozilla@perilith.com)
* Original code by Jesse Ruderman (jruderman@hmc.edu)
* taken from http://www.squarefree.com/userstyles/xbl.html
*
* Change XBL binding for <object> tags, click to view flash
*/
/*
* Flash identifiers.
*/
object[classid*=":D27CDB6E-AE6D-11cf-96B8-444553540000"],
object[codebase*="swflash.cab"],
object[data*=".swf"],
embed[type="application/x-shockwave-flash"],
embed[src*=".swf"],
object[type="application/x-shockwave-flash"],
object[src*=".swf"]
{ -moz-binding: url("chrome://flashblock/content/flashblock.xml#flash") !important; }
/*
* Director identifiers.
*/
object[classid*=":166B1BCA-3F9C-11CF-8075-444553540000"],
object[codebase*="sw.cab"],
object[data*=".dcr"],
embed[type="application/x-director"],
embed[src*=".dcr"],
object[type="application/x-director"],
object[src*=".dcr"]
{ -moz-binding: url("chrome://flashblock/content/flashblock.xml#director") !important; }
/*
* Authorware identifiers.
*/
object[classid*=":15B782AF-55D8-11D1-B477-006097098764"],
object[codebase*="awswaxf.cab"],
object[data*=".aam"],
embed[type="application/x-authorware-map"],
embed[src*=".aam"],
object[type="application/x-authorware-map"],
object[src*=".aam"]
{ -moz-binding: url("chrome://flashblock/content/flashblock.xml#authorware") !important; }
/*
* Java identifiers.
*/
applet,
object[classid*=":8AD9C840-044E-11D1-B3E9-00805F499D93"],
object[classid^="clsid:CAFEEFAC-"],
object[classid^="java:"],
object[type="application/x-java-applet"],
embed[classid*=":8AD9C840-044E-11D1-B3E9-00805F499D93"],
embed[classid^="clsid:CAFEEFAC-"],
embed[classid^="java:"],
embed[type="application/x-java-applet"]
{
-moz-binding: none !important;
}
/*
* Silverlight identifiers.
*/
object[classid*="32C73088-76AE-40F7-AC40-81F62CB2C1DA"],
object[type="application/ag-plugin"],
object[type="application/x-silverlight"],
object[source*=".xaml"],
object[sourceelement*="xaml"],
embed[type="application/ag-plugin"],
embed[source*=".xaml"]
{
-moz-binding: none !important;
}
/*
* Don't bind to objects with an explicit type=""
* e.g. type="application/x-sibelius-score".
*/
object[type]:not([type="application/x-shockwave-flash"]):not([type="application/x-director"]):not([type="application/x-authorware-map"]):not([data*=".swf"]):not([src*=".swf"])
{ -moz-binding: none !important; }
/*
* Broken Objects.
*/
object
{ -moz-binding: url("chrome://flashblock/content/flashblock.xml#brokenobject") !important; }
/* sIFR styles */
.sIFR-flash, .sIFR-flash object, .sIFR-flash embed,
.sIFR-replaced div[style*="chrome://flashblock"] {
-moz-binding: url("chrome://flashblock/content/flashblock.xml#sifr-replaced") !important;
}
span.sIFR-alternate {
-moz-binding: url("chrome://flashblock/content/flashblock.xml#sifr-alternate") !important;
position: static !important;
letter-spacing: normal !important;
}

619
mozilla/kmeleon/flashblock/content/flashblock.xml

@ -0,0 +1,619 @@
<?xml version="1.0"?>
<bindings
xmlns="http://www.mozilla.org/xbl"
xmlns:html="http://www.w3.org/1999/xhtml"
>
<binding id="flash">
<implementation>
<constructor>
<![CDATA[
//From Jesse's XPCNativeWrapper: http://mavra.perilith.com/~luser/content/native.js
function nativeMethod(untrustedObject, methodName)
{
// happier stack traces and faster multiple calls
var fun = Components.lookupMethod(untrustedObject, methodName);
return function()
{
return fun.apply(untrustedObject, arguments);
}
}
function flashblockCreatePlaceholder(isStandalone) {
// Create placeholder
var flashblockCreateElement = nativeMethod(document, "createElementNS");
var placeholder = flashblockCreateElement("http://www.w3.org/1999/xhtml", "div");
placeholder.isStandalone = isStandalone;
return placeholder;
}
// Substitute the animation with a placeholder
function flashblockShowPlaceholder() {
// Just in case the object has been moved away from under our feet during
// the timeout, re-assign the parent node. See bug 13680
// parent = current.parentNode;
var newParent = current.parentNode;
parent = newParent ? newParent : parent;
parent.insertBefore(placeholder, current);
if(placeholder.isStandalone) {
placeholder.flashblock = "frame";
if ("StopPlay" in current)
current.StopPlay();
if ("LoadMovie" in current)
current.LoadMovie(0, "");
current.prevWidth = current.width;
current.prevHeight = current.height;
current.width = current.height = 0;
} else {
placeholder.flashblock = "normal";
parent.removeChild(current);
}
}
// Show the original animation
function flashblockShowFlash(event) {
if( event.type == "keypress" && event.keyCode != KeyEvent.DOM_VK_RETURN)
return false;
event.stopPropagation();
if(placeholder.flashblock == "frame") {
current.height = current.prevHeight;
current.width = current.prevWidth;
current.src = placeholder.title;
if ("LoadMovie" in current)
current.LoadMovie(0, current.src);
} else {
parent.insertBefore(current, placeholder);
if (placeholder.hasAttribute("srcAttribute")) {
current.setAttribute("src", placeholder.getAttribute("srcAttribute"));
}
if (placeholder.hasAttribute("movieAttribute")) {
current.setAttribute("movie", placeholder.getAttribute("movieAttribute"));
}
if (placeholder.hasAttribute("dataAttribute")) {
current.setAttribute("data", placeholder.getAttribute("dataAttribute"));
}
if (placeholder.movieParam) {
var mparam = placeholder.movieParam;
mparam[0].value = mparam[1];
}
if (placeholder.hasAttribute("embedsrc")) {
var embeds = current.getElementsByTagName("embed");
if (embeds && embeds.length > 0) {
embeds[0].setAttribute("src", placeholder.getAttribute("embedsrc"));
}
}
}
parent.removeChild(placeholder);
}
function flashblockIsWhitelisted() {
// Check if the page that loaded the Flash site is whitelisted
// Thanks to Neil on #mozilla for suggesting this method, I would never have
// thought of it on my own. :-)
// Lor 20041215: Use "UIEvents" to make it work in post-1.0 FF
// (thanks to Neil again)
var flashblockEvent = document.createEvent("UIEvents");
if(flashblockEvent) {
flashblockEvent.initEvent("flashblockCheckLoad", true, true);
document.dispatchEvent(flashblockEvent);
if(flashblockEvent.getPreventDefault() == true) {
// Whitelisted
return true;
}
}
return false;
}
function flashblockSetImage(placeholder, type) {
var inactiveurl = "url(chrome://flashblock/content/" + type + ".png) no-repeat center";
var activeurl = "url(chrome://flashblock/content/flashplay.png) no-repeat center";
placeholder.setAttribute("bgInactive", inactiveurl);
placeholder.setAttribute("bgActive", activeurl);
placeholder.style.background = inactiveurl;
}
function flashblockStylePlaceholder(flash, placeholder, isStandalone) {
// If object's size was relative, use that.
// Otherwise, set size to minimum 32x32 px
placeholder.style.setProperty("min-width", "32px", "important");
placeholder.style.setProperty("min-height", "32px", "important");
// The size and positioning may come from a class
var fClass = flash.getAttribute("class");
if (fClass)
placeholder.setAttribute("class", fClass);
var fStyle = window.getComputedStyle(flash, "");
var fWidth = fStyle.getPropertyValue("width");
var width = parseInt(flash.width || flash.style.width);
if (fWidth && parseInt(fWidth) > 32)
width = fWidth;
else if(flash.width.match("%$"))
width = flash.width;
else if (width)
width = Math.max(width,32) + "px";
else
width = "32px"
placeholder.style.width = width;
var fHeight = fStyle.getPropertyValue("height");
var height = parseInt(flash.height || flash.style.height);
if (fHeight && parseInt(fHeight) > 32)
height = fHeight;
else if(flash.height.match("%$"))
height = flash.height;
else if (height)
height = Math.max(height,32) + "px";
else
height = "32px"
placeholder.style.height = height;
// Add styling rules to placeholder div.
placeholder.style.border = "1px solid #dfdfdf";
placeholder.style.cursor = "pointer";
placeholder.style.overflow = "hidden";
var disp = fStyle.getPropertyValue("display");
placeholder.style.display = disp == "block" ? "block" : "inline-block";
placeholder.style.setProperty("visibility", "visible", "important");
// The size of the placeholder should include borders too,
// otherwise scrollbars appear for blocked standalone objects
placeholder.style.MozBoxSizing = "border-box";
// Make some style adjustments since the placeholder is a <div>
// element instead of a <embed>, <object>, ... element.
// An <embed> will be centered if the parent has
// 'text-align: center' but a <div> will not. This code fixes that.
var parentStyle = window.getComputedStyle(flash.parentNode, "");
if (parentStyle.getPropertyValue("text-align") == "center") {
placeholder.style.marginRight = "auto";
placeholder.style.marginLeft = "auto";
}
}
function flashblockSetTitle(current, placeholder, isStandalone) {
// non-null "about:blank" value to prevent OS/2 crashing
var fakeURI = "about:blank";
if (isStandalone) {
placeholder.title = current.src;
current.src = fakeURI;
}
else if (current.hasAttribute("src") ||
current.hasAttribute("data") ||
current.hasAttribute("movie") ) {
var srcURI = current.getAttribute("src") ||
current.getAttribute("movie") ||
current.getAttribute("data") ;
placeholder.title = srcURI;
if (current.hasAttribute("src")) {
placeholder.setAttribute("srcAttribute", current.getAttribute("src"));
current.setAttribute("src", fakeURI);
}
if (current.hasAttribute("data")) {
placeholder.setAttribute("dataAttribute", current.getAttribute("data"));
current.setAttribute("data", fakeURI);
}
if (current.hasAttribute("movie")) {
placeholder.setAttribute("movieAttribute", current.getAttribute("movie"));
current.setAttribute("movie", fakeURI);
}
}
else {
var params = current.getElementsByTagName("param");
for (var ii = 0; ii < params.length; ii++) {
if (params[ii].getAttribute("name") == "movie" &&
params[ii].hasAttribute("value")) {
placeholder.title = params[ii].value;
placeholder.movieParam = [ params[ii], placeholder.title ];
params[ii].value = fakeURI;
break;
}
}
}
}
if(flashblockIsWhitelisted())
return;
var current = this;
var parent = current.parentNode;
// Check parent too (case of working EMBED inside broken OBJECT)
if (current.overrideCTV || parentNode.overrideCTV) {
return;
}
current.overrideCTV = true;
// Create placeholder div
var isStandalone = ("src" in current && current.src == current.ownerDocument.location);
var placeholder = flashblockCreatePlaceholder(isStandalone);
// Set placeholder image
var type = this.flashblockType ? this.flashblockType : "flash"
flashblockSetImage(placeholder, type);
flashblockStylePlaceholder(current, placeholder, isStandalone);
flashblockSetTitle(current, placeholder, isStandalone);
// Replace the flash document with a placeholder.
var flashblockSetTimeout = nativeMethod(window, "setTimeout");
flashblockSetTimeout(flashblockShowPlaceholder, 0);
// Change the placeholder background when the mouse enters/exits the div.
placeholder.addEventListener("mouseover",
function(event) { event.target.style.background = event.target.getAttribute("bgActive"); },
"false"
);
placeholder.addEventListener("mouseout",
function(event) { event.target.style.background = event.target.getAttribute("bgInactive"); },
"false"
);
// Replace the placeholder with the flash document.
placeholder.addEventListener("click", flashblockShowFlash, "false");
// Accessibility
placeholder.setAttribute("tabindex", "0");
placeholder.setAttribute("role", "button");
placeholder.addEventListener("keypress", flashblockShowFlash, "false");
]]>
</constructor>
</implementation>
</binding>
<binding id="director" extends="#flash">
<implementation>
<field name="flashblockType">"director"</field>
</implementation>
</binding>
<binding id="authorware" extends="#flash">
<implementation>
<field name="flashblockType">"authorware"</field>
</implementation>
</binding>
<binding id="brokenobject">
<implementation>
<field name="brokenObject">"yes"</field>
<constructor>
<![CDATA[
//From Jesse's XPCNativeWrapper: http://mavra.perilith.com/~luser/content/native.js
function nativeMethod(untrustedObject, methodName)
{
// happier stack traces and faster multiple calls
var fun = Components.lookupMethod(untrustedObject, methodName);
return function()
{
return fun.apply(untrustedObject, arguments);
}
}
function flashblockCreatePlaceholder(isStandalone) {
// Create placeholder
var flashblockCreateElement = nativeMethod(document, "createElementNS");
var placeholder = flashblockCreateElement("http://www.w3.org/1999/xhtml", "div");
placeholder.isStandalone = isStandalone;
return placeholder;
}
// Substitute the animation with a placeholder
function flashblockShowPlaceholder() {
// Just in case the object has been moved away from under our feet during
// the timeout, re-assign the parent node. See bug 13680
// parent = current.parentNode;
var newParent = current.parentNode;
parent = newParent ? newParent : parent;
parent.insertBefore(placeholder, current);
if(placeholder.isStandalone) {
placeholder.flashblock = "frame";
if ("StopPlay" in current)
current.StopPlay();
if ("LoadMovie" in current)
current.LoadMovie(0, "");
current.prevWidth = current.width;
current.prevHeight = current.height;
current.width = current.height = 0;
} else {
placeholder.flashblock = "normal";
parent.removeChild(current);
}
}
// Show the original animation
function flashblockShowFlash(event) {
if( event.type == "keypress" && event.keyCode != KeyEvent.DOM_VK_RETURN)
return false;
event.stopPropagation();
if(placeholder.flashblock == "frame") {
current.height = current.prevHeight;
current.width = current.prevWidth;
current.src = placeholder.title;
if ("LoadMovie" in current)
current.LoadMovie(0, current.src);
} else {
parent.insertBefore(current, placeholder);
if (placeholder.hasAttribute("srcAttribute")) {
current.setAttribute("src", placeholder.getAttribute("srcAttribute"));
}
if (placeholder.hasAttribute("movieAttribute")) {
current.setAttribute("movie", placeholder.getAttribute("movieAttribute"));
}
if (placeholder.hasAttribute("dataAttribute")) {
current.setAttribute("data", placeholder.getAttribute("dataAttribute"));
}
if (placeholder.movieParam) {
var mparam = placeholder.movieParam;
mparam[0].value = mparam[1];
}
if (placeholder.hasAttribute("embedsrc")) {
var embeds = current.getElementsByTagName("embed");
if (embeds && embeds.length > 0) {
embeds[0].setAttribute("src", placeholder.getAttribute("embedsrc"));
}
}
}
parent.removeChild(placeholder);
}
function flashblockIsWhitelisted() {
// Check if the page that loaded the Flash site is whitelisted
// Thanks to Neil on #mozilla for suggesting this method, I would never have
// thought of it on my own. :-)
// Lor 20041215: Use "UIEvents" to make it work in post-1.0 FF
// (thanks to Neil again)
var flashblockEvent = document.createEvent("UIEvents");
if(flashblockEvent) {
flashblockEvent.initEvent("flashblockCheckLoad", true, true);
document.dispatchEvent(flashblockEvent);
if(flashblockEvent.getPreventDefault() == true) {
// Whitelisted
return true;
}
}
return false;
}
function flashblockSetImage(placeholder, type) {
var inactiveurl = "url(chrome://flashblock/content/" + type + ".png) no-repeat center";
var activeurl = "url(chrome://flashblock/content/flashplay.png) no-repeat center";
placeholder.setAttribute("bgInactive", inactiveurl);
placeholder.setAttribute("bgActive", activeurl);
placeholder.style.background = inactiveurl;
}
function flashblockStylePlaceholder(flash, placeholder, isStandalone) {
// If object's size was relative, use that.
// Otherwise, set size to minimum 32x32 px
placeholder.style.setProperty("min-width", "32px", "important");
placeholder.style.setProperty("min-height", "32px", "important");
// The size and positioning may come from a class
var fClass = flash.getAttribute("class");
if (fClass)
placeholder.setAttribute("class", fClass);
var fStyle = window.getComputedStyle(flash, "");
var fWidth = fStyle.getPropertyValue("width");
var width = parseInt(flash.width || flash.style.width);
if (fWidth && parseInt(fWidth) > 32)
width = fWidth;
else if(flash.width.match("%$"))
width = flash.width;
else if (width)
width = Math.max(width,32) + "px";
else
width = "32px"
placeholder.style.width = width;
var fHeight = fStyle.getPropertyValue("height");
var height = parseInt(flash.height || flash.style.height);
if (fHeight && parseInt(fHeight) > 32)
height = fHeight;
else if(flash.height.match("%$"))
height = flash.height;
else if (height)
height = Math.max(height,32) + "px";
else
height = "32px"
placeholder.style.height = height;
// Add styling rules to placeholder div.
placeholder.style.border = "1px solid #dfdfdf";
placeholder.style.cursor = "pointer";
placeholder.style.overflow = "hidden";
var disp = fStyle.getPropertyValue("display");
placeholder.style.display = disp == "block" ? "block" : "inline-block";
placeholder.style.setProperty("visibility", "visible", "important");
// The size of the placeholder should include borders too,
// otherwise scrollbars appear for blocked standalone objects
placeholder.style.MozBoxSizing = "border-box";
// Make some style adjustments since the placeholder is a <div>
// element instead of a <embed>, <object>, ... element.
// An <embed> will be centered if the parent has
// 'text-align: center' but a <div> will not. This code fixes that.
var parentStyle = window.getComputedStyle(flash.parentNode, "");
if (parentStyle.getPropertyValue("text-align") == "center") {
placeholder.style.marginRight = "auto";
placeholder.style.marginLeft = "auto";
}
}
function flashblockSetTitle(current, placeholder, isStandalone) {
// non-null "about:blank" value to prevent OS/2 crashing
var fakeURI = "about:blank";
if (isStandalone) {
placeholder.title = current.src;
current.src = fakeURI;
}
else if (current.hasAttribute("src") ||
current.hasAttribute("data") ||
current.hasAttribute("movie") ) {
var srcURI = current.getAttribute("src") ||
current.getAttribute("movie") ||
current.getAttribute("data") ;
placeholder.title = srcURI;
if (current.hasAttribute("src")) {
placeholder.setAttribute("srcAttribute", current.getAttribute("src"));
current.setAttribute("src", fakeURI);
}
if (current.hasAttribute("data")) {
placeholder.setAttribute("dataAttribute", current.getAttribute("data"));
current.setAttribute("data", fakeURI);
}
if (current.hasAttribute("movie")) {
placeholder.setAttribute("movieAttribute", current.getAttribute("movie"));
current.setAttribute("movie", fakeURI);
}
}
else {
var params = current.getElementsByTagName("param");
for (var ii = 0; ii < params.length; ii++) {
if (params[ii].getAttribute("name") == "movie" &&
params[ii].hasAttribute("value")) {
placeholder.title = params[ii].value;
placeholder.movieParam = [ params[ii], placeholder.title ];
params[ii].value = fakeURI;
break;
}
}
}
}
if(flashblockIsWhitelisted())
return;
var current = this;
var parent = current.parentNode;
// Check parent too (case of working EMBED inside broken OBJECT)
if (current.overrideCTV || parentNode.overrideCTV) {
return;
}
current.overrideCTV = true;
var params = this.getElementsByTagName("param");
var isFlash = false;
for (var ii = 0; ii < params.length; ii++) {
var pvalue = params[ii].getAttribute("value");
if (/\.swf/i.test(pvalue)) {
isFlash = true;
break;
}
}
var embeds = this.getElementsByTagName("embed");
for (var jj = 0; jj < embeds.length; jj++) {
var embed = embeds[jj];
if (/x-shockwave-flash/i.test(embed.getAttribute("type")) ||
/\.swf/i.test(embed.getAttribute("src"))) {
isFlash = true;
break;
}
}
if (!isFlash) {return;}
// Create placeholder div
var isStandalone = ("src" in current && current.src == current.ownerDocument.location);
var placeholder = flashblockCreatePlaceholder(isStandalone);
// Set placeholder image
var type = this.flashblockType ? this.flashblockType : "flash"
flashblockSetImage(placeholder, type);
flashblockStylePlaceholder(current, placeholder, isStandalone);
flashblockSetTitle(current, placeholder, isStandalone);
// Replace the flash document with a placeholder.
var flashblockSetTimeout = nativeMethod(window, "setTimeout");
flashblockSetTimeout(flashblockShowPlaceholder, 0);
// Change the placeholder background when the mouse enters/exits the div.
placeholder.addEventListener("mouseover",
function(event) { event.target.style.background = event.target.getAttribute("bgActive"); },
"false"
);
placeholder.addEventListener("mouseout",
function(event) { event.target.style.background = event.target.getAttribute("bgInactive"); },
"false"
);
// Replace the placeholder with the flash document.
placeholder.addEventListener("click", flashblockShowFlash, "false");
// Accessibility
placeholder.setAttribute("tabindex", "0");
placeholder.setAttribute("role", "button");
placeholder.addEventListener("keypress", flashblockShowFlash, "false");
]]>
</constructor>
</implementation>
</binding>
<binding id="sifr-replaced">
<implementation>
<constructor>
<![CDATA[
event = document.createEvent("UIEvents");
if(event) {
event.initEvent("flashblockCheckLoad", true, true);
document.dispatchEvent(event);
if(event.getPreventDefault() == true) {
// Whitelisted
return;
}
}
this.style.height = 0;
this.style.width = 0;
this.style.setProperty("display", "none", "important");
this.style.position ="absolute";
this.style.overflow ="hidden";
]]>
</constructor>
</implementation>
</binding>
<binding id="sifr-alternate">
<implementation>
<constructor>
<![CDATA[
var event = document.createEvent("UIEvents");
if(event) {
event.initEvent("flashblockCheckLoad", true, true);
document.dispatchEvent(event);
if(event.getPreventDefault() == true) {
// Whitelisted
return;
}
}
this.style.setProperty("visibility", "visible", "important");
this.style.setProperty("display", "block", "important");
this.style.setProperty("left", "auto", "important");
this.style.setProperty("top", "auto", "important");
this.style.setProperty("height", "auto", "important");
this.style.setProperty("width", "auto", "important");
//this.style.position = "static";
]]>
</constructor>
</implementation>
</binding>
</bindings>

BIN
mozilla/kmeleon/flashblock/content/flashplay.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

8
mozilla/kmeleon/flashblock/jar.mn

@ -0,0 +1,8 @@
flashblock.jar:
content/flashblock/contents.rdf (content/contents.rdf)
content/flashblock/flashblock.xml (content/flashblock.xml)
content/flashblock/flashblock.css (content/flashblock.css)
content/flashblock/authorware.png (content/authorware.png)
content/flashblock/director.png (content/director.png)
content/flashblock/flash.png (content/flash.png)
content/flashblock/flashplay.png (content/flashplay.png)

52
mozilla/kmeleon/history/Makefile.in

@ -0,0 +1,52 @@
#
# ***** 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) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# 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 *****
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = public
ifndef MOZ_PLACES
DIRS += src
endif
include $(topsrcdir)/config/rules.mk

53
mozilla/kmeleon/history/public/Makefile.in

@ -0,0 +1,53 @@
#
# ***** 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) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Joe Hewitt <hewitt@netscape.com> (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 *****
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = history
XPIDL_MODULE = history
XPIDLSRCS = \
nsIBrowserHistory.idl \
$(NULL)
include $(topsrcdir)/config/rules.mk

108
mozilla/kmeleon/history/public/nsIBrowserHistory.idl

@ -0,0 +1,108 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** 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) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* 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 ***** */
/*
* browser-specific interface to global history