diff options
Diffstat (limited to 'components/pluginproblem/content')
4 files changed, 257 insertions, 0 deletions
diff --git a/components/pluginproblem/content/pluginProblem.xml b/components/pluginproblem/content/pluginProblem.xml new file mode 100644 index 000000000..d890be900 --- /dev/null +++ b/components/pluginproblem/content/pluginProblem.xml @@ -0,0 +1,87 @@ +<?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 bindings [ + <!ENTITY % pluginproblemDTD SYSTEM "chrome://pluginproblem/locale/pluginproblem.dtd"> + <!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd"> + <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" > + %pluginproblemDTD; + %globalDTD; + %brandDTD; +]> + +<bindings id="pluginBindings" + xmlns="http://www.mozilla.org/xbl" + xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" + xmlns:html="http://www.w3.org/1999/xhtml"> +<binding id="pluginProblem" inheritstyle="false" chromeOnlyContent="true" bindToUntrustedContent="true"> + <resources> + <stylesheet src="chrome://pluginproblem/content/pluginProblemContent.css"/> + <stylesheet src="chrome://mozapps/skin/plugins/pluginProblem.css"/> + </resources> + + <content> + <html:div class="mainBox" anonid="main" chromedir="&locale.dir;"> + <html:div class="hoverBox"> + <html:label> + <html:button class="icon" anonid="icon"/> + <html:div class="msg msgVulnerabilityStatus" anonid="vulnerabilityStatus"><!-- set at runtime --></html:div> + <html:div class="msg msgTapToPlay">&tapToPlayPlugin;</html:div> + <html:div class="msg msgClickToPlay" anonid="clickToPlay">&clickToActivatePlugin;</html:div> + </html:label> + + <html:div class="msg msgBlocked">&blockedPlugin.label;</html:div> + <html:div class="msg msgCrashed"> + <html:div class="msgCrashedText" anonid="crashedText"><!-- set at runtime --></html:div> + <!-- link href set at runtime --> + <html:div class="msgReload">&reloadPlugin.pre;<html:a class="reloadLink" anonid="reloadLink" href="">&reloadPlugin.middle;</html:a>&reloadPlugin.post;</html:div> + </html:div> + + <html:div class="msg msgManagePlugins"><html:a class="action-link" anonid="managePluginsLink" href="">&managePlugins;</html:a></html:div> + <html:div class="submitStatus" anonid="submitStatus"> + <html:div class="msg msgPleaseSubmit" anonid="pleaseSubmit"> + <html:textarea class="submitComment" + anonid="submitComment" + placeholder="&report.comment;"/> + <html:div class="submitURLOptInBox"> + <html:label><html:input class="submitURLOptIn" anonid="submitURLOptIn" type="checkbox"/> &report.pageURL;</html:label> + </html:div> + <html:div class="submitButtonBox"> + <html:span class="helpIcon" anonid="helpIcon" role="link"/> + <html:input class="submitButton" type="button" + anonid="submitButton" + value="&report.please;"/> + </html:div> + </html:div> + <html:div class="msg msgSubmitting">&report.submitting;<html:span class="throbber"> </html:span></html:div> + <html:div class="msg msgSubmitted">&report.submitted;</html:div> + <html:div class="msg msgNotSubmitted">&report.disabled;</html:div> + <html:div class="msg msgSubmitFailed">&report.failed;</html:div> + <html:div class="msg msgNoCrashReport">&report.unavailable;</html:div> + </html:div> + <html:div class="msg msgCheckForUpdates"><html:a class="action-link" anonid="checkForUpdatesLink" href="">&checkForUpdates;</html:a></html:div> + </html:div> + <html:button class="closeIcon" anonid="closeIcon" title="&hidePluginBtn.label;"/> + </html:div> + <html:div style="display:none;"><children/></html:div> + </content> + <implementation> + <constructor> + // Notify browser-plugins.js that we were attached, on a delay because + // this binding doesn't complete layout until the constructor + // completes. + this.dispatchEvent(new CustomEvent("PluginBindingAttached")); + </constructor> + </implementation> +</binding> + +<binding id="replacement" extends="chrome://pluginproblem/content/pluginProblem.xml#pluginProblem" inheritstyle="false" chromeOnlyContent="true" bindToUntrustedContent="true"> + <implementation> + <constructor> + this.dispatchEvent(new CustomEvent("PluginPlaceholderReplaced")); + </constructor> + </implementation> +</binding> + +</bindings> diff --git a/components/pluginproblem/content/pluginProblemBinding.css b/components/pluginproblem/content/pluginProblemBinding.css new file mode 100644 index 000000000..a545e3eba --- /dev/null +++ b/components/pluginproblem/content/pluginProblemBinding.css @@ -0,0 +1,31 @@ +/* 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/. */ + +@namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */ + +embed:-moz-handler-blocked, +embed:-moz-handler-crashed, +embed:-moz-handler-clicktoplay, +embed:-moz-handler-vulnerable-updatable, +embed:-moz-handler-vulnerable-no-update, +applet:-moz-handler-blocked, +applet:-moz-handler-crashed, +applet:-moz-handler-clicktoplay, +applet:-moz-handler-vulnerable-updatable, +applet:-moz-handler-vulnerable-no-update, +object:-moz-handler-blocked, +object:-moz-handler-crashed, +object:-moz-handler-clicktoplay, +object:-moz-handler-vulnerable-updatable, +object:-moz-handler-vulnerable-no-update { +%ifdef MC_PALEMOON + /* Initialize the overlay with visibility:hidden to prevent flickering if + * the plugin is too small to show the overlay */ + visibility: hidden; +%endif + display: inline-block; + overflow: hidden; + opacity: 1 !important; + -moz-binding: url('chrome://pluginproblem/content/pluginProblem.xml#pluginProblem') !important; +} diff --git a/components/pluginproblem/content/pluginProblemContent.css b/components/pluginproblem/content/pluginProblemContent.css new file mode 100644 index 000000000..cf8755635 --- /dev/null +++ b/components/pluginproblem/content/pluginProblemContent.css @@ -0,0 +1,122 @@ +/* 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/. */ + +@namespace html url(http://www.w3.org/1999/xhtml); + +/* Do not change this without also changing the appropriate line in + * browser-plugins.js (near where this file is mentioned). */ +html|object:not([width]), html|object[width=""], +html|embed:not([width]), html|embed[width=""], +html|applet:not([width]), html|applet[width=""] { + width: 240px; +} + +/* Do not change this without also changing the appropriate line in + * browser-plugins.js (near where this file is mentioned). */ +html|object:not([height]), html|object[height=""], +html|embed:not([height]), html|embed[height=""], +html|applet:not([height]), html|applet[height=""] { + height: 200px; +} + +a .mainBox, +:-moz-handler-clicktoplay .mainBox, +:-moz-handler-vulnerable-updatable .mainBox, +:-moz-handler-vulnerable-no-update .mainBox, +:-moz-handler-blocked .mainBox { + -moz-user-focus: normal; +} +a .mainBox:focus, +:-moz-handler-clicktoplay .mainBox:focus, +:-moz-handler-vulnerable-updatable .mainBox:focus, +:-moz-handler-vulnerable-no-update .mainBox:focus, +:-moz-handler-blocked .mainBox:focus { + outline: 1px dotted; +} + +.mainBox { + width: inherit; + height: inherit; + overflow: hidden; + direction: ltr; + unicode-bidi: embed; + /* used to block inherited properties */ + text-transform: none; + text-indent: 0; + cursor: initial; + white-space: initial; + word-spacing: initial; + letter-spacing: initial; + line-height: initial; +} + +%ifndef MC_PALEMOON +/* Initialize the overlay with visibility:hidden to prevent flickering if +* the plugin is too small to show the overlay */ +.mainBox > .hoverBox, +.mainBox > .closeIcon { + visibility: hidden; +} + +.visible > .hoverBox, +.visible > .closeIcon { + visibility: visible; +} +%endif + +.mainBox[chromedir="rtl"] { + direction: rtl; +} + +a .hoverBox, +:-moz-handler-clicktoplay .hoverBox, +:-moz-handler-vulnerable-updatable .hoverBox, +:-moz-handler-vulnerable-no-update .hoverBox { + cursor: pointer; +} + +.hoverBox > label { + cursor: inherit; +} +.icon { + cursor: inherit; +} + +.msg { + display: none; +} + +a .msgClickToPlay, +a .msgTapToPlay, +:-moz-handler-clicktoplay .msgClickToPlay, +:-moz-handler-vulnerable-updatable .msgVulnerabilityStatus, +:-moz-handler-vulnerable-updatable .msgCheckForUpdates, +:-moz-handler-vulnerable-updatable .msgClickToPlay, +:-moz-handler-vulnerable-no-update .msgVulnerabilityStatus, +:-moz-handler-vulnerable-no-update .msgClickToPlay, +:-moz-handler-clicktoplay .msgTapToPlay, +:-moz-handler-blocked .msgBlocked, +:-moz-handler-crashed .msgCrashed { + display: block; + position: relative; + left: 0; + top: 0; + z-index: 9999; +} + +.submitStatus[status] { + display: -moz-box; + -moz-box-align: center; + -moz-box-pack: center; + height: 160px; +} + +.submitStatus[status="noReport"] .msgNoCrashReport, +.submitStatus[status="please"] .msgPleaseSubmit, +.submitStatus[status="noSubmit"] .msgNotSubmitted, +.submitStatus[status="submitting"] .msgSubmitting, +.submitStatus[status="success"] .msgSubmitted, +.submitStatus[status="failed"] .msgSubmitFailed { + display: block; +} diff --git a/components/pluginproblem/content/pluginReplaceBinding.css b/components/pluginproblem/content/pluginReplaceBinding.css new file mode 100644 index 000000000..405a3a4b7 --- /dev/null +++ b/components/pluginproblem/content/pluginReplaceBinding.css @@ -0,0 +1,17 @@ +/* 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/. */ + +@namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */ + +a[href='https://get.adobe.com/flashplayer/'], +a[href='http://get.adobe.com/flashplayer/'], +a[href='https://get.adobe.com/flashplayer'], +a[href='http://get.adobe.com/flashplayer'], +a[href='https://www.adobe.com/go/getflash/'], +a[href='http://www.adobe.com/go/getflash/'] { + display: inline-block; + overflow: hidden; + opacity: 1 !important; + -moz-binding: url('chrome://pluginproblem/content/pluginProblem.xml#replacement') !important; +} |