diff --git a/extensions/xforms/resources/content/xforms-xhtml.xml b/extensions/xforms/resources/content/xforms-xhtml.xml index cd94c89697e..10ede23ab2a 100644 --- a/extensions/xforms/resources/content/xforms-xhtml.xml +++ b/extensions/xforms/resources/content/xforms-xhtml.xml @@ -377,6 +377,86 @@ + + + + + + + + + + + + + + + return { + inlineData: this.ownerDocument. + getAnonymousElementByAttribute(this, "anonid", "inlineData"), + bindingData: this.ownerDocument. + getAnonymousElementByAttribute(this, "anonid", "bindingData"), + + setValue: function setValue(aUseInlineValue, aValue) { + if (aUseInlineValue) { + this.bindingData.style.display = "none"; + this.inlineData.style.display = "inherit"; + } else { + this.bindingData.textContent = aValue; + this.inlineData.style.display = "none"; + this.bindingData.style.display = "inherit"; + } + } + }; + + + + + + + + + + + + + + + this.container.style.visibility = "visible"; + this.container.style.display = "inherit"; + this.container.style.left = aPosX + "px"; + this.container.style.top = aPosY + "px"; + + + + + + this.container.style.left = "0px"; + this.container.style.top = "0px"; + this.container.style.visibility = "hidden"; + this.container.style.display = "none"; + + + + + + + if (!this._container) { + this._container = this.ownerDocument. + getAnonymousElementByAttribute(this, "anonid", "container"); + } + return this._container; + + + + + + + diff --git a/extensions/xforms/resources/content/xforms-xul.xml b/extensions/xforms/resources/content/xforms-xul.xml index 7f6430f812c..42d92f974d9 100644 --- a/extensions/xforms/resources/content/xforms-xul.xml +++ b/extensions/xforms/resources/content/xforms-xul.xml @@ -300,6 +300,86 @@ + + + + + + + + + + + + + return { + _contentSwitcher: this.ownerDocument. + getAnonymousElementByAttribute(this, 'anonid', 'contentswitcher'), + _implicitContent: this.ownerDocument. + getAnonymousElementByAttribute(this, 'anonid', 'implicitcontent'), + + setValue: function setValue(aUseInlineValue, aValue) { + if (aUseInlineValue) { + this._contentSwitcher.selectedIndex = 1; + } else { + this._implicitContent.textContent = aValue; + this._contentSwitcher.selectedIndex = 0; + } + } + }; + + + + + + + + + + + + + + + + + + + + + + + + aPosX += this.ownerDocument.defaultView.screenX; + aPosY += this.ownerDocument.defaultView.screenY; + this.popup.showPopup(this.ownerDocument.documentElement, aPosX, aPosY, + "popup", null, null); + + + + + + this.popup.hidePopup(); + + + + + + + if (!this._popup) { + this._popup = this.ownerDocument. + getAnonymousElementByAttribute(this, "anonid", "popup"); + } + return this._popup; + + + + + + + diff --git a/extensions/xforms/resources/content/xforms.css b/extensions/xforms/resources/content/xforms.css index e0278811b9d..8d9113f62bf 100755 --- a/extensions/xforms/resources/content/xforms.css +++ b/extensions/xforms/resources/content/xforms.css @@ -109,7 +109,7 @@ message, alert, help { display: none; } -action, message[level="ephemeral"], hint { +html|*:root message[level="ephemeral"], html|*:root hint { position: absolute; z-index: 2147481647; visibility: hidden; @@ -120,25 +120,40 @@ action, message[level="ephemeral"], hint { display: block; } -alert { - -moz-binding: url('chrome://xforms/content/xforms.xml#inline-alert'); +html|*:root alert { + -moz-binding: url('chrome://xforms/content/xforms-xhtml.xml#xformswidget-alert'); +} +xul|*:root alert { + -moz-binding: url('chrome://xforms/content/xforms-xul.xml#xformswidget-alert'); } -message[level="ephemeral"], hint { - -moz-binding: url('chrome://xforms/content/xforms.xml#ephemeral-message'); +html|*:root message[level="ephemeral"], html|*:root hint { + -moz-binding: url('chrome://xforms/content/xforms-xhtml.xml#xformswidget-ephemeral-message'); +} +xul|*:root message[level="ephemeral"], xul|*:root hint { + -moz-binding: url('chrome://xforms/content/xforms-xul.xml#xformswidget-ephemeral-message'); +} + +html|*:root message[level="ephemeral"], html|*:root hint { background-color: InfoBackground; color: InfoText; border: 1px black solid; padding: 2px 3px; font: message-box; - position: absolute !important; width: auto; height: auto; display: block; } -message[level="ephemeral"] > html|div.-moz-xforms-message-container, -hint > html|div.-moz-xforms-message-container { +xul|*:root message[level="ephemeral"] xul|deck , xul|*:root hint xul|deck { + background-color: InfoBackground; + color: InfoText; + padding: 2px 3px; + font: message-box; +} + +html|*:root message[level="ephemeral"] > html|div.-moz-xforms-message-container, +html|*:root hint > html|div.-moz-xforms-message-container { background-color: inherit; color: inherit; border: inherit; diff --git a/extensions/xforms/resources/content/xforms.xml b/extensions/xforms/resources/content/xforms.xml index a894bee28b7..e2a00f3434a 100644 --- a/extensions/xforms/resources/content/xforms.xml +++ b/extensions/xforms/resources/content/xforms.xml @@ -390,95 +390,17 @@ - - - - - - - - - - - null - - - - if (!this._inlineData) { - this._inlineData = document. - getAnonymousElementByAttribute(this, "anonid", "inlineData"); - } - return this._inlineData; - - - - null - - - if (!this._bindingData) { - this._bindingData = document. - getAnonymousElementByAttribute(this, "anonid", "bindingData"); - } - return this._bindingData; - - - - if (this.accessors.hasBoundNode() || - this.hasAttribute('src')) { - this.bindingData.textContent = this.stringValue; - this.inlineData.style.display = "none"; - this.bindingData.style.display = "inherit"; - } else { - this.bindingData.style.display = "none"; - this.inlineData.style.display = "inherit"; - } - - - - - - - - - - - null - - - - if (!this._container) { - this._container = document. - getAnonymousElementByAttribute(this, "anonid", "container"); - } - return this._container; - - - - - - - - this.container.style.visibility = "visible"; - this.container.style.display = "inherit"; - this.container.style.left = x + "px"; - this.container.style.top = y + "px"; - return true; - - - - - - this.container.style.left = "0px"; - this.container.style.top = "0px"; - this.container.style.visibility = "hidden"; - this.container.style.display = "none"; - +