diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /dom/html/crashtests/257818-1.html | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/html/crashtests/257818-1.html')
-rw-r--r-- | dom/html/crashtests/257818-1.html | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/dom/html/crashtests/257818-1.html b/dom/html/crashtests/257818-1.html new file mode 100644 index 0000000000..27929fd793 --- /dev/null +++ b/dom/html/crashtests/257818-1.html @@ -0,0 +1,82 @@ +<html><head> +<script type="text/javascript"> +function cE (v) { + return document.createElement(v) +} +function cTN (v) { + return document.createTextNode(v) +} + +function OSXBarIcon(elt) { + this.element = elt; + this.labelNode = this.element.firstChild; + this.labelNodeParent = this.element; + this.labelNodeParent.removeChild(this.labelNode); + + this.contents = []; + var kids = this.element.childNodes; + for(var i=0; i<kids.length; i++) this.contents[this.contents.length] = this.element.removeChild(kids[i]); + this.popupSubmenu = new OSXBarSubmenu(this); +} + +function OSXBarSubmenu(icon) { + this.parentIcon = icon; + this.create(); + this.addContent(); +} +OSXBarSubmenu.prototype = { + create : function() { + var p = this.popupNode = document.createElement("div"); + var b = document.getElementsByTagName("body").item(0); + if(b) b.appendChild(p); + this.popupNode.style.display = "none"; + // Uncomment next line to fix the problem +// var v = document.body.offsetWidth; + } +}; +OSXBarSubmenu.prototype.addContent = function() { + + // add popup label: + var label = document.createElement("div"); + label.appendChild(document.createTextNode(this.parentIcon.label)); + this.popupNode.appendChild(label); + + // add <li> children to the popup: + var contents = this.parentIcon.contents; + for(var i=0; i<contents.length; i++) { + this.popupNode.appendChild(contents[i]); + + } +}; + +</script> + +<script type="text/javascript"> +function createControlPanel() { + var bar = document.getElementById("navigation"); + var item = cE("li"); + item.appendChild(cTN("aaa")); + var textfield = cE("input"); + textfield.value = 0; + item.appendChild(textfield); + bar.insertBefore(item, bar.firstChild); +} + +window.addEventListener("load", createControlPanel); +</script> + +<script type="text/javascript"> +function ssload() { + new OSXBarIcon(document.getElementById("navigation").childNodes[0]); +} +window.addEventListener("load",ssload); + + +</script> +</head> + +<body> +<ul id="navigation"></ul> +</body></html> + + |