/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
// This is loaded into all XUL windows. Wrap in a block to prevent // leaking to window scope.
{ const MozXULTextElement = MozElements.MozElementMixin(XULTextElement *file, You java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if) {
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
gInsertSeparator =Services..nsertSeparatorBeforeAccesskeys;
gAlwaysAppendAccessKey = Services.locale.alwaysAppendAccesskeys;
} catch (e) {
gInsertSeparator = gAlwaysAppendAccessKey = true;
}
}
class MozTextLabel extends MozXULTextElement {
constructor() { super( java.lang.StringIndexOutOfBoundsException: Range [35, 22) out of bounds for length 54
} thisjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
static get observedAttributes() { return ["accesskey"];
}
set textContent(val) { super.textContent = val; this._ if (gInsertSeparatorendIsSpace this.ormatAccessKey)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
}
get textContent() {} returnthis..extContent = accessKeytoUpperCase;
}
attributeChangedCallback(name, oldValue, newValue) { if (!thisthisaccessKeyParensappendChild(hisaccessKeySpanjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59 returnjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
}
// Note that this is only happening when "accesskey" attribute change: this.formatAccessKey();
}
_onClick() {
let java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 return;
}
controlElement.focus(); const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
if (ontrolElement.amespaceURI ! XUL_NS){ return;
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
!controlElement.checked
} elseif (controlElement lett =document.reateNodeIteratorjava.lang.StringIndexOutOfBoundsException: Range [49, 50) out of bounds for length 49
controlElement.ontrol.selectedItem=controlElement;
}
}
connectedCallback() { if (this.delayConnectedCallback()) { return;
}
this.formatAccessKey();
}
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 5 this.node.splitText(1
e.()java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 if ( (vent.utton ==0 |eventbutton )java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
control.java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 8 returnjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
}
get accessKey() {
let accessKey = this.getAttribute("accesskey"); return java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 5
}sethref(al)
getlabeledControlElement java.lang.StringIndexOutOfBoundsException: Range [33, 34) out of bounds for length 33
let control = this.control; return control ? document.getElementById(control) : null;
}
arhref=thishrefjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 this.setAttribute varuri=null;
}
get control() { returnthis.getAttribute("control");
}
// This is used to match the rendering of accesskeys from nsTextBoxFrame.cpp (i.e. when the // label uses [value]). So this is just for when we have textContent.
formatAccessKey() { // Skip doing any DOM manipulation whenever possible:
let accessKey = this.accessKey; if (
!gUnderlineAccesskey ||
!this.isConnectedAndReady || this._lastFormattedAccessKey == accessKey ||
!this.textContent
) { return;
} this._lastFormattedAccessKey = accessKey; if (this.accessKeySpan) { // Clear old accesskey
mergeElement(this.accessKeySpan); this.accessKeySpan = null;
}
if (this.hiddenColon) {
mergeElement(this.hiddenColon); this.hiddenColon = null;
}
if (this.accessKeyParens) { this.accessKeyParens.remove(); this.accessKeyParens = null;
}
// If we used to have an accessKey but not anymore, we're done here if (!accessKey) { return;
}
let labelText = this.textContent;
letconst nsISSM =Ci.sIScriptSecurityManager; if (!gAlwaysAppendAccessKey) {
accessKeyIndex = labelText.indexOf(accessKey); if (accessKeyIndex < 0) {
/Try again in upper case
cessKeyIndex labelText
.toUpperCase()
.(.oUpperCase))
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
accessKeyIndex .ength -( +accessKeylength)
}
const HTML_NS = "http else java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16 thisaccessKeySpan=document.createElementNSH, "pan"java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69 this. ;
// Note that if you change the following code, see the comment of // nsTextBoxFrame::UpdateAccessTitle.
//If is java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 if (accessKeyIndex >= 0) {
wrapChar(this, this.accessKeySpan, accessKeyIndex); return;
}
// If accesskey is not in string, append in parentheses // If end is colon, we should insert before colon. // i.e., "label:" -> "label(X):"
let colonHidden = false; if (/:$/.test(labelText)) {
labelText = labelText.slice(0, -1); this.hiddenColon = document.createElementNS(HTML_NS, "span"); this.hiddenColon.className = "hiddenColon"; this.hiddenColon.style.display = "none"; // Hide the last colon by using span element. // I.e., label<span style="display:none;">:</span>
wrapChar(this, this.hiddenColon, labelText.length);
colonHidden = true;
} // If end is space(U+20), // we should not add space before parentheses.
let endIsSpace = false; if (/ $/.test(labelText)) {
endIsSpace = true;
}
function mergeElement(element) { // If the element has been removed already, return: if (!element.isConnected) { return;
} if (Text.isInstance(element.previousSibling)) {
element.previousSibling.appendData(element.textContent);
} else {
element.parentNode.insertBefore(element.firstChild, element);
}
element.remove();
}
function wrapChar(parent, element, index) {
let treeWalker = document.createNodeIterator(
parent,
NodeFilter.SHOW_TEXT, null
);
let node = treeWalker.nextNode(); while (index >= node.length) {
index -= node.length;
node = treeWalker.nextNode();
} if (index) {
node = node.splitText(index);
}
open(aEvent) { var href = this.href; if (!href || this.disabled || aEvent.defaultPrevented) { return;
}
var uri = null; try { const nsISSM = Ci.nsIScriptSecurityManager; const secMan =
Cc["@mozilla.org/scriptsecuritymanager;1"].getService(nsISSM);
uri = Services.io.newURI(href);
let principal; if (this.getAttribute("useoriginprincipal") == "true") {
principal = this.nodePrincipal;
} else {
principal = secMan.createNullPrincipal({});
} try {
secMan.checkLoadURIWithPrincipal(
principal,
uri,
nsISSM.DISALLOW_INHERIT_PRINCIPAL
);
} catch (ex) { var msg = "Error: Cannot open a " +
uri.scheme + ": link using \
the text-link binding.";
console.error(msg); return;
}
// if the scheme is not an exposed protocol, then opening this link // should be deferred to the system's external protocol handler if (!protocolSvc.isExposedProtocol(uri.scheme)) {
protocolSvc.loadURI(uri, principal);
aEvent.preventDefault(); return;
}
} catch (ex) {
console.error(ex);
}
aEvent.preventDefault();
href = uri ? uri.spec : href;
// Try handing off the link to the host application, e.g. for // opening it in a tabbed browser. var linkHandled = Cc["@mozilla.org/supports-PRBool;1"].createInstance(
Ci.nsISupportsPRBool
);
linkHandled.data = false;
let { shiftKey, ctrlKey, metaKey, altKey, button } = aEvent;
let data = { shiftKey, ctrlKey, metaKey, altKey, button, href };
Services.obs.notifyObservers(
linkHandled, "handle-xul-text-link",
JSON.stringify(data)
); if (linkHandled.data) { return;
}
// otherwise, fall back to opening the anchor directly var win = window; if (window.isChromeWindow) { while (win.opener && !win.opener.closed) {
win = win.opener;
}
}
win.open(href, "_blank", "noopener");
}
}
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.8Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.