mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge inbound to m-c.
This commit is contained in:
commit
c54d45c9d8
@ -239,7 +239,6 @@
|
||||
@BINPATH@/components/inspector.xpt
|
||||
@BINPATH@/components/intl.xpt
|
||||
@BINPATH@/components/jar.xpt
|
||||
@BINPATH@/components/jetpack.xpt
|
||||
@BINPATH@/components/jsdebugger.xpt
|
||||
@BINPATH@/components/jsdservice.xpt
|
||||
@BINPATH@/components/jsinspector.xpt
|
||||
|
@ -1270,19 +1270,33 @@ var gBrowserInit = {
|
||||
|
||||
// Set a sane starting width/height for all resolutions on new profiles.
|
||||
if (!document.documentElement.hasAttribute("width")) {
|
||||
let defaultWidth = 994;
|
||||
let defaultWidth;
|
||||
let defaultHeight;
|
||||
|
||||
// Very small: maximize the window
|
||||
// Portrait : use about full width and 3/4 height, to view entire pages
|
||||
// at once (without being obnoxiously tall)
|
||||
// Widescreen: use about half width, to suggest side-by-side page view
|
||||
// Otherwise : use 3/4 height and width
|
||||
if (screen.availHeight <= 600) {
|
||||
document.documentElement.setAttribute("sizemode", "maximized");
|
||||
defaultWidth = 610;
|
||||
defaultHeight = 450;
|
||||
}
|
||||
else {
|
||||
// Create a narrower window for large or wide-aspect displays, to suggest
|
||||
// side-by-side page view.
|
||||
if (screen.availWidth >= 1600)
|
||||
if (screen.availWidth <= screen.availHeight) {
|
||||
defaultWidth = screen.availWidth * .9;
|
||||
defaultHeight = screen.availHeight * .75;
|
||||
}
|
||||
else if (screen.availWidth >= 2048) {
|
||||
defaultWidth = (screen.availWidth / 2) - 20;
|
||||
defaultHeight = screen.availHeight - 10;
|
||||
defaultHeight = screen.availHeight - 10;
|
||||
}
|
||||
else {
|
||||
defaultWidth = screen.availWidth * .75;
|
||||
defaultHeight = screen.availHeight * .75;
|
||||
}
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
// On X, we're not currently able to account for the size of the window
|
||||
// border. Use 28px as a guess (titlebar + bottom window border)
|
||||
@ -3051,96 +3065,10 @@ function getMarkupDocumentViewer()
|
||||
return gBrowser.markupDocumentViewer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Content area tooltip.
|
||||
* XXX - this must move into XBL binding/equiv! Do not want to pollute
|
||||
* browser.js with functionality that can be encapsulated into
|
||||
* browser widget. TEMPORARY!
|
||||
*
|
||||
* NOTE: Any changes to this routine need to be mirrored in DefaultTooltipTextProvider::GetNodeText()
|
||||
* (located in mozilla/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp)
|
||||
* which performs the same function, but for embedded clients that
|
||||
* don't use a XUL/JS layer. It is important that the logic of
|
||||
* these two routines be kept more or less in sync.
|
||||
* (pinkerton)
|
||||
**/
|
||||
// This function is obsolete. Newer code should use <tooltip page="true"/> instead.
|
||||
function FillInHTMLTooltip(tipElement)
|
||||
{
|
||||
var retVal = false;
|
||||
// Don't show the tooltip if the tooltip node is a document or disconnected.
|
||||
if (!tipElement.ownerDocument ||
|
||||
(tipElement.ownerDocument.compareDocumentPosition(tipElement) & document.DOCUMENT_POSITION_DISCONNECTED))
|
||||
return retVal;
|
||||
|
||||
const XLinkNS = "http://www.w3.org/1999/xlink";
|
||||
const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||
|
||||
var titleText = null;
|
||||
var XLinkTitleText = null;
|
||||
var SVGTitleText = null;
|
||||
var lookingForSVGTitle = true;
|
||||
var direction = tipElement.ownerDocument.dir;
|
||||
|
||||
// If the element is invalid per HTML5 Forms specifications and has no title,
|
||||
// show the constraint validation error message.
|
||||
if ((tipElement instanceof HTMLInputElement ||
|
||||
tipElement instanceof HTMLTextAreaElement ||
|
||||
tipElement instanceof HTMLSelectElement ||
|
||||
tipElement instanceof HTMLButtonElement) &&
|
||||
!tipElement.hasAttribute('title') &&
|
||||
(!tipElement.form || !tipElement.form.noValidate)) {
|
||||
// If the element is barred from constraint validation or valid,
|
||||
// the validation message will be the empty string.
|
||||
titleText = tipElement.validationMessage;
|
||||
}
|
||||
|
||||
while (!titleText && !XLinkTitleText && !SVGTitleText && tipElement) {
|
||||
if (tipElement.nodeType == Node.ELEMENT_NODE &&
|
||||
tipElement.namespaceURI != XULNS) {
|
||||
titleText = tipElement.getAttribute("title");
|
||||
if ((tipElement instanceof HTMLAnchorElement ||
|
||||
tipElement instanceof HTMLAreaElement ||
|
||||
tipElement instanceof HTMLLinkElement ||
|
||||
tipElement instanceof SVGAElement) && tipElement.href) {
|
||||
XLinkTitleText = tipElement.getAttributeNS(XLinkNS, "title");
|
||||
}
|
||||
if (lookingForSVGTitle &&
|
||||
(!(tipElement instanceof SVGElement) ||
|
||||
tipElement.parentNode.nodeType == Node.DOCUMENT_NODE)) {
|
||||
lookingForSVGTitle = false;
|
||||
}
|
||||
if (lookingForSVGTitle) {
|
||||
for (let childNode of tipElement.childNodes) {
|
||||
if (childNode instanceof SVGTitleElement) {
|
||||
SVGTitleText = childNode.textContent;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
var defView = tipElement.ownerDocument.defaultView;
|
||||
// XXX Work around bug 350679:
|
||||
// "Tooltips can be fired in documents with no view".
|
||||
if (!defView)
|
||||
return retVal;
|
||||
direction = defView.getComputedStyle(tipElement, "")
|
||||
.getPropertyValue("direction");
|
||||
}
|
||||
tipElement = tipElement.parentNode;
|
||||
}
|
||||
|
||||
var tipNode = document.getElementById("aHTMLTooltip");
|
||||
tipNode.style.direction = direction;
|
||||
|
||||
[titleText, XLinkTitleText, SVGTitleText].forEach(function (t) {
|
||||
if (t && /\S/.test(t)) {
|
||||
// Make CRLF and CR render one line break each.
|
||||
t = t.replace(/\r\n?/g, '\n');
|
||||
|
||||
tipNode.setAttribute("label", t);
|
||||
retVal = true;
|
||||
}
|
||||
});
|
||||
return retVal;
|
||||
document.getElementById("aHTMLTooltip").fillInPageTooltip(tipElement);
|
||||
}
|
||||
|
||||
var browserDragAndDrop = {
|
||||
@ -4263,20 +4191,19 @@ var XULBrowserWindow = {
|
||||
gFormSubmitObserver.panel.hidePopup();
|
||||
}
|
||||
|
||||
if (document.tooltipNode) {
|
||||
let pageTooltip = document.getElementById("aHTMLTooltip");
|
||||
let tooltipNode = pageTooltip.triggerNode;
|
||||
if (tooltipNode) {
|
||||
// Optimise for the common case
|
||||
if (aWebProgress.DOMWindow == content) {
|
||||
document.getElementById("aHTMLTooltip").hidePopup();
|
||||
document.tooltipNode = null;
|
||||
pageTooltip.hidePopup();
|
||||
}
|
||||
else {
|
||||
for (let tooltipWindow =
|
||||
document.tooltipNode.ownerDocument.defaultView;
|
||||
for (let tooltipWindow = tooltipNode.ownerDocument.defaultView;
|
||||
tooltipWindow != tooltipWindow.parent;
|
||||
tooltipWindow = tooltipWindow.parent) {
|
||||
if (tooltipWindow == aWebProgress.DOMWindow) {
|
||||
document.getElementById("aHTMLTooltip").hidePopup();
|
||||
document.tooltipNode = null;
|
||||
pageTooltip.hidePopup();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -114,7 +114,7 @@
|
||||
onpopupshowing="return FillHistoryMenu(event.target);"
|
||||
oncommand="gotoHistoryIndex(event); event.stopPropagation();"
|
||||
onclick="checkForMiddleClick(this, event);"/>
|
||||
<tooltip id="aHTMLTooltip" onpopupshowing="return FillInHTMLTooltip(document.tooltipNode);"/>
|
||||
<tooltip id="aHTMLTooltip" page="true"/>
|
||||
|
||||
<!-- for search and content formfill/pw manager -->
|
||||
<panel type="autocomplete" id="PopupAutoComplete" noautofocus="true" hidden="true"/>
|
||||
|
@ -1,4 +1,5 @@
|
||||
function test () {
|
||||
|
||||
waitForExplicitFinish();
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
gBrowser.selectedBrowser.addEventListener("load", function () {
|
||||
@ -7,30 +8,30 @@ function test () {
|
||||
let doc = gBrowser.contentDocument;
|
||||
let tooltip = document.getElementById("aHTMLTooltip");
|
||||
|
||||
ok(FillInHTMLTooltip(doc.getElementById("svg1")), "should get title");
|
||||
ok(tooltip.fillInPageTooltip(doc.getElementById("svg1")), "should get title");
|
||||
is(tooltip.getAttribute("label"), "This is a non-root SVG element title");
|
||||
|
||||
ok(FillInHTMLTooltip(doc.getElementById("text1")), "should get title");
|
||||
ok(tooltip.fillInPageTooltip(doc.getElementById("text1")), "should get title");
|
||||
is(tooltip.getAttribute("label"), "\n\n\n This is a title\n\n ");
|
||||
|
||||
ok(!FillInHTMLTooltip(doc.getElementById("text2")), "should not get title");
|
||||
ok(!tooltip.fillInPageTooltip(doc.getElementById("text2")), "should not get title");
|
||||
|
||||
ok(!FillInHTMLTooltip(doc.getElementById("text3")), "should not get title");
|
||||
ok(!tooltip.fillInPageTooltip(doc.getElementById("text3")), "should not get title");
|
||||
|
||||
ok(FillInHTMLTooltip(doc.getElementById("link1")), "should get title");
|
||||
ok(tooltip.fillInPageTooltip(doc.getElementById("link1")), "should get title");
|
||||
is(tooltip.getAttribute("label"), "\n This is a title\n ");
|
||||
ok(FillInHTMLTooltip(doc.getElementById("text4")), "should get title");
|
||||
ok(tooltip.fillInPageTooltip(doc.getElementById("text4")), "should get title");
|
||||
is(tooltip.getAttribute("label"), "\n This is a title\n ");
|
||||
|
||||
ok(!FillInHTMLTooltip(doc.getElementById("link2")), "should not get title");
|
||||
ok(!tooltip.fillInPageTooltip(doc.getElementById("link2")), "should not get title");
|
||||
|
||||
ok(FillInHTMLTooltip(doc.getElementById("link3")), "should get title");
|
||||
ok(tooltip.fillInPageTooltip(doc.getElementById("link3")), "should get title");
|
||||
isnot(tooltip.getAttribute("label"), "");
|
||||
|
||||
ok(FillInHTMLTooltip(doc.getElementById("link4")), "should get title");
|
||||
ok(tooltip.fillInPageTooltip(doc.getElementById("link4")), "should get title");
|
||||
is(tooltip.getAttribute("label"), "This is an xlink:title attribute");
|
||||
|
||||
ok(!FillInHTMLTooltip(doc.getElementById("text5")), "should not get title");
|
||||
ok(!tooltip.fillInPageTooltip(doc.getElementById("text5")), "should not get title");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
finish();
|
||||
|
@ -8,15 +8,15 @@ function test() {
|
||||
let tooltip = document.getElementById("aHTMLTooltip");
|
||||
let i = doc.getElementById("i");
|
||||
|
||||
ok(!FillInHTMLTooltip(i),
|
||||
ok(!tooltip.fillInPageTooltip(i),
|
||||
"No tooltip should be shown when @title is null");
|
||||
|
||||
i.title = "foo";
|
||||
ok(FillInHTMLTooltip(i),
|
||||
ok(tooltip.fillInPageTooltip(i),
|
||||
"A tooltip should be shown when @title is not the empty string");
|
||||
|
||||
i.pattern = "bar";
|
||||
ok(FillInHTMLTooltip(i),
|
||||
ok(tooltip.fillInPageTooltip(i),
|
||||
"A tooltip should be shown when @title is not the empty string");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
|
@ -6,25 +6,25 @@ function check(aElementName, aBarred) {
|
||||
let e = doc.createElement(aElementName);
|
||||
content.appendChild(e);
|
||||
|
||||
ok(!FillInHTMLTooltip(e),
|
||||
ok(!tooltip.fillInPageTooltip(e),
|
||||
"No tooltip should be shown when the element is valid");
|
||||
|
||||
e.setCustomValidity('foo');
|
||||
if (aBarred) {
|
||||
ok(!FillInHTMLTooltip(e),
|
||||
ok(!tooltip.fillInPageTooltip(e),
|
||||
"No tooltip should be shown when the element is barred from constraint validation");
|
||||
} else {
|
||||
ok(FillInHTMLTooltip(e),
|
||||
ok(tooltip.fillInPageTooltip(e),
|
||||
e.tagName + " " +"A tooltip should be shown when the element isn't valid");
|
||||
}
|
||||
|
||||
e.setAttribute('title', '');
|
||||
ok (!FillInHTMLTooltip(e),
|
||||
ok (!tooltip.fillInPageTooltip(e),
|
||||
"No tooltip should be shown if the title attribute is set");
|
||||
|
||||
e.removeAttribute('title');
|
||||
content.setAttribute('novalidate', '');
|
||||
ok (!FillInHTMLTooltip(e),
|
||||
ok (!tooltip.fillInPageTooltip(e),
|
||||
"No tooltip should be shown if the novalidate attribute is set on the form owner");
|
||||
content.removeAttribute('novalidate');
|
||||
|
||||
|
@ -46,7 +46,7 @@
|
||||
</commandset>
|
||||
|
||||
<popupset id="mainPopupSet">
|
||||
<tooltip id="aHTMLTooltip" onpopupshowing="return FillInHTMLTooltip(document.tooltipNode);"/>
|
||||
<tooltip id="aHTMLTooltip" page="true"/>
|
||||
<menupopup id="contentAreaContextMenu" pagemenu="start"
|
||||
onpopupshowing="if (event.target != this)
|
||||
return true;
|
||||
|
@ -13,6 +13,7 @@ include $(DEPTH)/config/autoconf.mk
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
_BROWSER_FILES = browser_bug431826.js \
|
||||
browser_bug633691.js \
|
||||
$(NULL)
|
||||
|
||||
libs:: $(_BROWSER_FILES)
|
||||
|
25
browser/components/certerror/test/browser_bug633691.js
Normal file
25
browser/components/certerror/test/browser_bug633691.js
Normal file
@ -0,0 +1,25 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
// Open a html page with about:certerror in an iframe
|
||||
window.content.addEventListener("load", testIframeCert, true);
|
||||
content.location = "data:text/html,<iframe width='700' height='700' src='about:certerror'></iframe>";
|
||||
}
|
||||
|
||||
function testIframeCert() {
|
||||
window.content.removeEventListener("load", testIframeCert, true);
|
||||
// Confirm that the expert section is hidden
|
||||
var doc = gBrowser.contentDocument.getElementsByTagName('iframe')[0].contentDocument;
|
||||
var eC = doc.getElementById("expertContent");
|
||||
ok(eC, "Expert content should exist")
|
||||
ok(eC.hasAttribute("hidden"), "Expert content should be hidded by default");
|
||||
|
||||
// Clean up
|
||||
gBrowser.removeCurrentTab();
|
||||
|
||||
finish();
|
||||
}
|
@ -496,7 +496,7 @@
|
||||
|
||||
const SUGGEST_TYPE = "application/x-suggestions+json";
|
||||
var engine = this.currentEngine;
|
||||
var connector =
|
||||
var connector =
|
||||
Services.io.QueryInterface(Components.interfaces.nsISpeculativeConnect);
|
||||
var searchURI = engine.getSubmission("dummy").uri;
|
||||
let callbacks = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
|
||||
@ -505,7 +505,7 @@
|
||||
connector.speculativeConnect(searchURI, callbacks);
|
||||
|
||||
if (engine.supportsResponseType(SUGGEST_TYPE)) {
|
||||
var suggestURI = engine.getSubmission("dummy", SUGGEST_TYPE).uri;
|
||||
var suggestURI = engine.getSubmission("dummy", SUGGEST_TYPE).uri;
|
||||
if (suggestURI.prePath != searchURI.prePath)
|
||||
connector.speculativeConnect(suggestURI, callbacks);
|
||||
}
|
||||
|
@ -54,6 +54,7 @@ ToolSidebar.prototype = {
|
||||
iframe.className = "iframe-" + id;
|
||||
iframe.setAttribute("flex", "1");
|
||||
iframe.setAttribute("src", url);
|
||||
iframe.tooltip = "aHTMLTooltip";
|
||||
|
||||
let tab = this._tabbox.tabs.appendItem();
|
||||
tab.setAttribute("label", ""); // Avoid showing "undefined" while the tab is loading
|
||||
@ -74,6 +75,11 @@ ToolSidebar.prototype = {
|
||||
tabpanel.appendChild(iframe);
|
||||
this._tabbox.tabpanels.appendChild(tabpanel);
|
||||
|
||||
this._tooltip = this._panelDoc.createElementNS(XULNS, "tooltip");
|
||||
this._tooltip.id = "aHTMLTooltip";
|
||||
tabpanel.appendChild(this._tooltip);
|
||||
this._tooltip.page = true;
|
||||
|
||||
tab.linkedPanel = "sidebar-panel-" + id;
|
||||
|
||||
// We store the index of this tab.
|
||||
|
@ -492,6 +492,7 @@ Toolbox.prototype = {
|
||||
iframe.id = "toolbox-panel-iframe-" + id;
|
||||
iframe.setAttribute("flex", 1);
|
||||
iframe.setAttribute("forceOwnRefreshDriver", "");
|
||||
iframe.tooltip = "aHTMLTooltip";
|
||||
|
||||
let vbox = this.doc.getElementById("toolbox-panel-" + id);
|
||||
vbox.appendChild(iframe);
|
||||
|
@ -68,6 +68,7 @@ BottomHost.prototype = {
|
||||
deferred.resolve(this.frame);
|
||||
}.bind(this);
|
||||
|
||||
this.frame.tooltip = "aHTMLTooltip";
|
||||
this.frame.addEventListener("DOMContentLoaded", frameLoad, true);
|
||||
|
||||
// we have to load something so we can switch documents if we have to
|
||||
@ -151,6 +152,7 @@ SidebarHost.prototype = {
|
||||
}.bind(this);
|
||||
|
||||
this.frame.addEventListener("DOMContentLoaded", frameLoad, true);
|
||||
this.frame.tooltip = "aHTMLTooltip";
|
||||
this.frame.setAttribute("src", "about:blank");
|
||||
|
||||
focusTab(this.hostTab);
|
||||
|
@ -179,6 +179,12 @@ let Util = {
|
||||
* Rect and nsIDOMRect utilities
|
||||
*/
|
||||
|
||||
getCleanRect: function getCleanRect() {
|
||||
return {
|
||||
left: 0, top: 0, right: 0, bottom: 0
|
||||
};
|
||||
},
|
||||
|
||||
pointWithinRect: function pointWithinRect(aX, aY, aRect) {
|
||||
return (aRect.left < aX && aRect.top < aY &&
|
||||
aRect.right > aX && aRect.bottom > aY);
|
||||
|
@ -10,9 +10,9 @@
|
||||
<html:div flex="1" class="selection-overlay-inner window-width window-height" anonid="selection-overlay-inner">
|
||||
<xul:stack>
|
||||
<html:div anonid="selection-overlay-debug" class="window-width window-height"/>
|
||||
<xul:toolbarbutton id="selectionhandle-start" label="^" left="10" top="10" hidden="true"/>
|
||||
<xul:toolbarbutton id="selectionhandle-end" label="^" left="10" top="10" hidden="true"/>
|
||||
<xul:toolbarbutton id="selectionhandle-caret" label="^" left="10" top="10" hidden="true"/>
|
||||
<xul:toolbarbutton id="selectionhandle-mark1" label="^" left="10" top="10" hidden="true"/>
|
||||
<xul:toolbarbutton id="selectionhandle-mark2" label="^" left="10" top="10" hidden="true"/>
|
||||
<xul:toolbarbutton id="selectionhandle-mark3" label="^" left="10" top="10" hidden="true"/>
|
||||
</xul:stack>
|
||||
</html:div>
|
||||
</content>
|
||||
|
@ -89,7 +89,6 @@ let ScriptContexts = {};
|
||||
["FormHelperUI", "chrome://browser/content/helperui/FormHelperUI.js"],
|
||||
["BrowserTouchHandler", "chrome://browser/content/BrowserTouchHandler.js"],
|
||||
["AlertsHelper", "chrome://browser/content/helperui/AlertsHelper.js"],
|
||||
["CapturePickerUI", "chrome://browser/content/helperui/CapturePickerUI.js"],
|
||||
["AutofillMenuUI", "chrome://browser/content/helperui/MenuUI.js"],
|
||||
["ContextMenuUI", "chrome://browser/content/helperui/MenuUI.js"],
|
||||
["MenuControlUI", "chrome://browser/content/helperui/MenuUI.js"],
|
||||
|
@ -154,13 +154,6 @@ var BrowserUI = {
|
||||
Util.dumpLn("Exception in delay load module:", ex.message);
|
||||
}
|
||||
|
||||
try {
|
||||
// XXX This is currently failing
|
||||
CapturePickerUI.init();
|
||||
} catch(ex) {
|
||||
Util.dumpLn("Exception in CapturePickerUI:", ex.message);
|
||||
}
|
||||
|
||||
#ifdef MOZ_UPDATER
|
||||
// Check for updates in progress
|
||||
let updatePrompt = Cc["@mozilla.org/updates/update-prompt;1"].createInstance(Ci.nsIUpdatePrompt);
|
||||
|
@ -32,6 +32,10 @@ dump("### SelectionHandler.js loaded\n");
|
||||
|
||||
*/
|
||||
|
||||
// selection node parameters for various apis
|
||||
const kSelectionNodeAnchor = 1;
|
||||
const kSelectionNodeFocus = 2;
|
||||
|
||||
var SelectionHandler = {
|
||||
_debugEvents: false,
|
||||
_cache: {},
|
||||
@ -58,9 +62,8 @@ var SelectionHandler = {
|
||||
addMessageListener("Browser:SelectionCopy", this);
|
||||
addMessageListener("Browser:SelectionDebug", this);
|
||||
addMessageListener("Browser:CaretAttach", this);
|
||||
addMessageListener("Browser:CaretMove", this);
|
||||
addMessageListener("Browser:CaretUpdate", this);
|
||||
addMessageListener("Browser:CaretPosition", this);
|
||||
addMessageListener("Browser:CaretPositionEnd", this);
|
||||
},
|
||||
|
||||
shutdown: function shutdown() {
|
||||
@ -76,9 +79,8 @@ var SelectionHandler = {
|
||||
removeMessageListener("Browser:SelectionCopy", this);
|
||||
removeMessageListener("Browser:SelectionDebug", this);
|
||||
removeMessageListener("Browser:CaretAttach", this);
|
||||
removeMessageListener("Browser:CaretMove", this);
|
||||
removeMessageListener("Browser:CaretUpdate", this);
|
||||
removeMessageListener("Browser:CaretPosition", this);
|
||||
removeMessageListener("Browser:CaretPositionEnd", this);
|
||||
},
|
||||
|
||||
/*************************************************
|
||||
@ -207,7 +209,7 @@ var SelectionHandler = {
|
||||
|
||||
// _handleSelectionPoint may set a scroll timer, so this must
|
||||
// be reset after the last call.
|
||||
this.clearTimers();
|
||||
this._clearTimers();
|
||||
|
||||
// Update the position of our selection monocles
|
||||
this._updateSelectionUI(true, true);
|
||||
@ -315,10 +317,15 @@ var SelectionHandler = {
|
||||
},
|
||||
|
||||
/*
|
||||
* Selection clear event handler
|
||||
* Selection clear message handler
|
||||
*
|
||||
* @param aClearFocus requests that the focus also be cleared.
|
||||
*/
|
||||
_onSelectionClear: function _onSelectionClear() {
|
||||
_onSelectionClear: function _onSelectionClear(aClearFocus) {
|
||||
this._clearSelection();
|
||||
if (aClearFocus && this._targetElement) {
|
||||
this._targetElement.blur();
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
@ -365,7 +372,7 @@ var SelectionHandler = {
|
||||
* Clear existing selection if it exists and reset our internla state.
|
||||
*/
|
||||
_clearSelection: function _clearSelection() {
|
||||
this.clearTimers();
|
||||
this._clearTimers();
|
||||
if (this._contentWindow) {
|
||||
let selection = this._getSelection();
|
||||
if (selection)
|
||||
@ -384,7 +391,7 @@ var SelectionHandler = {
|
||||
* Shuts SelectionHandler down.
|
||||
*/
|
||||
_closeSelection: function _closeSelection() {
|
||||
this.clearTimers();
|
||||
this._clearTimers();
|
||||
this._cache = null;
|
||||
this._contentWindow = null;
|
||||
this.selectedText = "";
|
||||
@ -413,12 +420,20 @@ var SelectionHandler = {
|
||||
}
|
||||
|
||||
// Updates this._cache content selection position data which we send over
|
||||
// to SelectionHelperUI.
|
||||
this._updateUIMarkerRects(selection);
|
||||
// to SelectionHelperUI. Note updateUIMarkerRects will fail if there isn't
|
||||
// any selection in the page. This can happen when we start a monocle drag
|
||||
// but haven't dragged enough to create selection. Just return.
|
||||
try {
|
||||
this._updateUIMarkerRects(selection);
|
||||
} catch (ex) {
|
||||
Util.dumpLn(ex.message);
|
||||
return;
|
||||
}
|
||||
|
||||
this._cache.updateStart = aUpdateStart;
|
||||
this._cache.updateEnd = aUpdateEnd;
|
||||
this._cache.updateCaret = aUpdateCaret || false;
|
||||
this._cache.targetIsEditable = this._targetIsEditable;
|
||||
|
||||
// Get monocles positioned correctly
|
||||
sendAsyncMessage("Content:SelectionRange", this._cache);
|
||||
@ -585,7 +600,7 @@ var SelectionHandler = {
|
||||
this._lastMarker = aMarker;
|
||||
|
||||
// If we aren't out-of-bounds, clear the scroll timer if it exists.
|
||||
this.clearTimers();
|
||||
this._clearTimers();
|
||||
|
||||
// Adjusts the selection based on monocle movement
|
||||
this._adjustSelection(aMarker, clientPoint, aEndOfSelection);
|
||||
@ -746,12 +761,12 @@ var SelectionHandler = {
|
||||
let result = { speed: 1, trigger: false, start: false, end: false };
|
||||
|
||||
if (orientation.left || orientation.top) {
|
||||
this._addEditStartSelection();
|
||||
this._addEditSelection(kSelectionNodeAnchor);
|
||||
result.speed = orientation.left + orientation.top;
|
||||
result.trigger = true;
|
||||
result.end = true;
|
||||
} else if (orientation.right || orientation.bottom) {
|
||||
this._addEditEndSelection();
|
||||
this._addEditSelection(kSelectionNodeFocus);
|
||||
result.speed = orientation.right + orientation.bottom;
|
||||
result.trigger = true;
|
||||
result.start = true;
|
||||
@ -772,43 +787,34 @@ var SelectionHandler = {
|
||||
this._scrollTimer.interval(timeout, this.scrollTimerCallback);
|
||||
},
|
||||
|
||||
/*
|
||||
* Selection control call wrapper
|
||||
*/
|
||||
_addEditStartSelection: function _addEditStartSelection() {
|
||||
let selCtrl = this._getSelectController();
|
||||
let selection = this._getSelection();
|
||||
try {
|
||||
this._backupRangeList();
|
||||
selection.collapseToStart();
|
||||
// State: focus = anchor
|
||||
// Only step back if we can, otherwise selCtrl will exception:
|
||||
if (selection.getRangeAt(0).startOffset > 0) {
|
||||
selCtrl.characterMove(false, true);
|
||||
}
|
||||
// State: focus = (anchor - 1)
|
||||
selection.collapseToStart();
|
||||
// State: focus = anchor and both are -1 from the original offset
|
||||
selCtrl.characterMove(true, true);
|
||||
// State: focus = anchor + 1, both have been moved back one char
|
||||
// Restore the rest of the selection:
|
||||
this._restoreRangeList();
|
||||
selCtrl.scrollSelectionIntoView(Ci.nsISelectionController.SELECTION_NORMAL,
|
||||
Ci.nsISelectionController.SELECTION_ANCHOR_REGION,
|
||||
Ci.nsISelectionController.SCROLL_SYNCHRONOUS);
|
||||
} catch (ex) { Util.dumpLn(ex.message);}
|
||||
_clearTimers: function _clearTimers() {
|
||||
if (this._scrollTimer) {
|
||||
this._scrollTimer.clear();
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
* Selection control call wrapper
|
||||
* _addEditSelection - selection control call wrapper for text inputs.
|
||||
* Adds selection on the anchor or focus side of selection in a text
|
||||
* input. Scrolls the location into view as well.
|
||||
* (TBD: anchor side scrolling is currently broken, see bug 848594)
|
||||
*
|
||||
* @param const selection node identifier
|
||||
*/
|
||||
_addEditEndSelection: function _addEditEndSelection() {
|
||||
_addEditSelection: function _addEditSelection(aLocation) {
|
||||
let selCtrl = this._getSelectController();
|
||||
try {
|
||||
let selCtrl = this._getSelectController();
|
||||
selCtrl.characterMove(true, true);
|
||||
selCtrl.scrollSelectionIntoView(Ci.nsISelectionController.SELECTION_NORMAL,
|
||||
Ci.nsISelectionController.SELECTION_FOCUS_REGION,
|
||||
Ci.nsISelectionController.SCROLL_SYNCHRONOUS);
|
||||
if (aLocation == kSelectionNodeAnchor) {
|
||||
this._targetElement.selectionStart = this._targetElement.selectionStart - 1;
|
||||
selCtrl.scrollSelectionIntoView(Ci.nsISelectionController.SELECTION_NORMAL,
|
||||
Ci.nsISelectionController.SELECTION_ANCHOR_REGION,
|
||||
Ci.nsISelectionController.SCROLL_SYNCHRONOUS);
|
||||
} else {
|
||||
this._targetElement.selectionEnd = this._targetElement.selectionEnd + 1;
|
||||
selCtrl.scrollSelectionIntoView(Ci.nsISelectionController.SELECTION_NORMAL,
|
||||
Ci.nsISelectionController.SELECTION_FOCUS_REGION,
|
||||
Ci.nsISelectionController.SCROLL_SYNCHRONOUS);
|
||||
}
|
||||
} catch (ex) {}
|
||||
},
|
||||
|
||||
@ -841,15 +847,6 @@ var SelectionHandler = {
|
||||
return height / 2;
|
||||
},
|
||||
|
||||
_findBetterLowerTextRangePoint: function _findBetterLowerTextRangePoint(aClientPoint, aHalfLineHeight) {
|
||||
let range = this._getSelection().getRangeAt(0);
|
||||
let clientRect = range.getBoundingClientRect();
|
||||
if (aClientPoint.y > clientRect.bottom && clientRect.right < aClientPoint.x) {
|
||||
aClientPoint.y = (clientRect.bottom - aHalfLineHeight);
|
||||
this._setDebugPoint(aClientPoint, "red");
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
* _setContinuousSelection()
|
||||
*
|
||||
@ -972,6 +969,10 @@ var SelectionHandler = {
|
||||
return result;
|
||||
},
|
||||
|
||||
/*
|
||||
* Events
|
||||
*/
|
||||
|
||||
/*
|
||||
* Scroll + selection advancement timer when the monocle is
|
||||
* outside the bounds of an input control.
|
||||
@ -987,16 +988,6 @@ var SelectionHandler = {
|
||||
}
|
||||
},
|
||||
|
||||
clearTimers: function clearTimers() {
|
||||
if (this._scrollTimer) {
|
||||
this._scrollTimer.clear();
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
* Events
|
||||
*/
|
||||
|
||||
receiveMessage: function sh_receiveMessage(aMessage) {
|
||||
if (this._debugEvents && aMessage.name != "Browser:SelectionMove") {
|
||||
Util.dumpLn("SelectionHandler:", aMessage.name);
|
||||
@ -1044,7 +1035,7 @@ var SelectionHandler = {
|
||||
break;
|
||||
|
||||
case "Browser:SelectionClear":
|
||||
this._onSelectionClear();
|
||||
this._onSelectionClear(json.clearFocus);
|
||||
break;
|
||||
|
||||
case "Browser:SelectionDebug":
|
||||
|
@ -1,145 +0,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/. */
|
||||
|
||||
var CaptureDialog = {
|
||||
_video: null,
|
||||
_container: null,
|
||||
_lastOrientationEvent: null,
|
||||
|
||||
init: function() {
|
||||
document.getElementsByAttribute('command', 'cmd_ok')[0].focus();
|
||||
this._video = document.getElementById("capturepicker-video");
|
||||
this._container = document.getElementById("capturepicker-container");
|
||||
window.addEventListener("resize", this, false);
|
||||
window.addEventListener("deviceorientation", this, false);
|
||||
this.handleEvent({ type: "resize" });
|
||||
},
|
||||
|
||||
setPreviewOrientation: function(aEvent) {
|
||||
if (window.innerWidth < window.innerHeight) {
|
||||
if (aEvent.beta > 0)
|
||||
this._video.style.MozTransform = "rotate(90deg)";
|
||||
else
|
||||
this._video.style.MozTransform = "rotate(-90deg)";
|
||||
this._container.classList.add("vertical");
|
||||
}
|
||||
else {
|
||||
if (aEvent.gamma > 0)
|
||||
this._video.style.MozTransform = "rotate(180deg)";
|
||||
else
|
||||
this._video.style.MozTransform = "";
|
||||
this._container.classList.remove("vertical");
|
||||
}
|
||||
},
|
||||
|
||||
handleEvent: function(aEvent) {
|
||||
if (aEvent.type == "deviceorientation") {
|
||||
if (!this._lastOrientationEvent)
|
||||
this.setPreviewOrientation(aEvent);
|
||||
this._lastOrientationEvent = aEvent;
|
||||
}
|
||||
else if (aEvent.type == "resize") {
|
||||
if (this._lastOrientationEvent)
|
||||
this.setPreviewOrientation(this._lastOrientationEvent);
|
||||
}
|
||||
},
|
||||
|
||||
cancel: function() {
|
||||
this.doClose(false);
|
||||
},
|
||||
|
||||
capture: function() {
|
||||
this.doClose(true);
|
||||
},
|
||||
|
||||
doClose: function(aResult) {
|
||||
window.removeEventListener("resize", this, false);
|
||||
window.removeEventListener("deviceorientation", this, false);
|
||||
let dialog = document.getElementById("capturepicker-dialog");
|
||||
dialog.arguments.result = aResult;
|
||||
if (aResult)
|
||||
dialog.arguments.path = this.saveFrame();
|
||||
document.getElementById("capturepicker-video").setAttribute("src", "");
|
||||
dialog.close();
|
||||
},
|
||||
|
||||
saveFrame: function() {
|
||||
let Cc = Components.classes;
|
||||
let Ci = Components.interfaces;
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
let width = 320;
|
||||
let height = 240;
|
||||
let rotation = 0;
|
||||
|
||||
if (window.innerWidth < window.innerHeight) {
|
||||
width = 240;
|
||||
height = 320;
|
||||
if (this._lastOrientationEvent.beta > 0)
|
||||
rotation = Math.PI / 2;
|
||||
else
|
||||
rotation = -Math.PI / 2;
|
||||
}
|
||||
else {
|
||||
if (this._lastOrientationEvent.gamma > 0)
|
||||
rotation = Math.PI;
|
||||
}
|
||||
|
||||
let canvas = document.createElementNS("http://www.w3.org/1999/xhtml", "canvas");
|
||||
canvas.width = width;
|
||||
canvas.height = height;
|
||||
let ctx = canvas.getContext("2d");
|
||||
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
||||
//ctx.save();
|
||||
if (rotation != 0) {
|
||||
if (rotation == Math.PI / 2)
|
||||
ctx.translate(width, 0);
|
||||
else if (rotation == -Math.PI / 2)
|
||||
ctx.translate(-width, 0);
|
||||
else
|
||||
ctx.translate(width, height);
|
||||
ctx.rotate(rotation);
|
||||
}
|
||||
ctx.drawImage(document.getElementById("capturepicker-video"), 0, 0, 320, 240);
|
||||
//ctx.restore();
|
||||
let url = canvas.toDataURL("image/png");
|
||||
|
||||
let tmpDir = Services.dirsvc.get("TmpD", Ci.nsIFile);
|
||||
let file = tmpDir.clone();
|
||||
file.append("capture.png");
|
||||
file.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0600);
|
||||
let persist = Cc["@mozilla.org/embedding/browser/nsWebBrowserPersist;1"].createInstance(Ci.nsIWebBrowserPersist);
|
||||
|
||||
persist.persistFlags = Ci.nsIWebBrowserPersist.PERSIST_FLAGS_REPLACE_EXISTING_FILES | Ci.nsIWebBrowserPersist.PERSIST_FLAGS_AUTODETECT_APPLY_CONVERSION;
|
||||
|
||||
let mDone = false;
|
||||
let mFailed = false;
|
||||
|
||||
let progressListener = {
|
||||
onProgressChange: function() {
|
||||
/* Ignore progress callback */
|
||||
},
|
||||
onStateChange: function(aProgress, aRequest, aStateFlag, aStatus) {
|
||||
if (aStateFlag & Ci.nsIWebProgressListener.STATE_STOP) {
|
||||
mDone = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
persist.progressListener = progressListener;
|
||||
|
||||
let source = Services.io.newURI(url, "UTF8", null);;
|
||||
persist.saveURI(source, null, null, null, null, file);
|
||||
|
||||
// don't wait more than 3 seconds for a successful save
|
||||
window.setTimeout(function() {
|
||||
mDone = true;
|
||||
mFailed = true;
|
||||
}, 3000);
|
||||
|
||||
while (!mDone)
|
||||
Services.tm.currentThread.processNextEvent(true);
|
||||
|
||||
return (mFailed ? null : file.path);
|
||||
}
|
||||
}
|
@ -1,26 +0,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/. */
|
||||
|
||||
/* appears to have something to do with capturing a camera image. tries to
|
||||
* create a dialog, which will fail. TBD. */
|
||||
var CapturePickerUI = {
|
||||
init: function() {
|
||||
this.messageManager = Cc["@mozilla.org/parentprocessmessagemanager;1"].getService(Ci.nsIFrameMessageManager);
|
||||
this.messageManager.addMessageListener("CapturePicker:Show", this);
|
||||
},
|
||||
|
||||
receiveMessage: function(aMessage) {
|
||||
switch (aMessage.name) {
|
||||
case "CapturePicker:Show":
|
||||
let params = { result: true };
|
||||
let dialog = DialogUI.importModal(null, "chrome://browser/content/prompt/CaptureDialog.xul", params);
|
||||
document.getElementById("capturepicker-title").appendChild(document.createTextNode(aMessage.json.title));
|
||||
dialog.waitForClose();
|
||||
return { value: params.result, path: params.path };
|
||||
break;
|
||||
}
|
||||
// prevents warning from the script loader
|
||||
return null;
|
||||
}
|
||||
};
|
@ -76,6 +76,7 @@ function Marker(aParent, aTag, aElementId, xPos, yPos) {
|
||||
this._yPos = yPos;
|
||||
this._selectionHelperUI = aParent;
|
||||
this._element = document.getElementById(aElementId);
|
||||
this._elementId = aElementId;
|
||||
// These get picked in input.js and receives drag input
|
||||
this._element.customDragger = new MarkerDragger(this);
|
||||
this.tag = aTag;
|
||||
@ -83,6 +84,7 @@ function Marker(aParent, aTag, aElementId, xPos, yPos) {
|
||||
|
||||
Marker.prototype = {
|
||||
_element: null,
|
||||
_elementId: "",
|
||||
_selectionHelperUI: null,
|
||||
_xPos: 0,
|
||||
_yPos: 0,
|
||||
@ -171,8 +173,12 @@ Marker.prototype = {
|
||||
moveBy: function moveBy(aDx, aDy, aClientX, aClientY) {
|
||||
this._xPos -= aDx;
|
||||
this._yPos -= aDy;
|
||||
this._selectionHelperUI.markerDragMove(this);
|
||||
this._setPosition();
|
||||
let direction = (aDx < 0 || aDy < 0 ? "end" : "start");
|
||||
// We may swap markers in markerDragMove. If markerDragMove
|
||||
// returns true keep processing, otherwise get out of here.
|
||||
if (this._selectionHelperUI.markerDragMove(this, direction)) {
|
||||
this._setPosition();
|
||||
}
|
||||
},
|
||||
|
||||
hitTest: function hitTest(aX, aY) {
|
||||
@ -187,6 +193,23 @@ Marker.prototype = {
|
||||
return true;
|
||||
return false;
|
||||
},
|
||||
|
||||
swapMonocle: function swapMonocle(aCaret) {
|
||||
let targetElement = aCaret._element;
|
||||
let targetElementId = aCaret._elementId;
|
||||
|
||||
aCaret._element = this._element;
|
||||
aCaret._element.customDragger._marker = aCaret;
|
||||
aCaret._elementId = this._elementId;
|
||||
|
||||
this._xPos = aCaret._xPos;
|
||||
this._yPos = aCaret._yPos;
|
||||
this._element = targetElement;
|
||||
this._element.customDragger._marker = this;
|
||||
this._elementId = targetElementId;
|
||||
this._element.visible = true;
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
@ -203,24 +226,30 @@ var SelectionHelperUI = {
|
||||
_movement: { active: false, x:0, y: 0 },
|
||||
_activeSelectionRect: null,
|
||||
_selectionHandlerActive: false,
|
||||
_selectionMarkIds: [],
|
||||
_targetIsEditable: false,
|
||||
|
||||
/*
|
||||
* Properties
|
||||
*/
|
||||
|
||||
get startMark() {
|
||||
if (this._startMark == null) {
|
||||
this._startMark = new Marker(this, "start", "selectionhandle-start", 0, 0);
|
||||
this._startMark = new Marker(this, "start", this._selectionMarkIds.pop(), 0, 0);
|
||||
}
|
||||
return this._startMark;
|
||||
},
|
||||
|
||||
get endMark() {
|
||||
if (this._endMark == null) {
|
||||
this._endMark = new Marker(this, "end", "selectionhandle-end", 0, 0);
|
||||
this._endMark = new Marker(this, "end", this._selectionMarkIds.pop(), 0, 0);
|
||||
}
|
||||
return this._endMark;
|
||||
},
|
||||
|
||||
get caretMark() {
|
||||
if (this._caretMark == null) {
|
||||
this._caretMark = new Marker(this, "caret", "selectionhandle-caret", 0, 0);
|
||||
this._caretMark = new Marker(this, "caret", this._selectionMarkIds.pop(), 0, 0);
|
||||
}
|
||||
return this._caretMark;
|
||||
},
|
||||
@ -229,6 +258,20 @@ var SelectionHelperUI = {
|
||||
return document.getElementById("selection-overlay");
|
||||
},
|
||||
|
||||
/*
|
||||
* isActive (prop)
|
||||
*
|
||||
* Determines if an edit session is currently active.
|
||||
*/
|
||||
get isActive() {
|
||||
return (this._msgTarget &&
|
||||
this._selectionHandlerActive);
|
||||
},
|
||||
|
||||
/*
|
||||
* Public apis
|
||||
*/
|
||||
|
||||
/*
|
||||
* openEditSession
|
||||
*
|
||||
@ -241,10 +284,6 @@ var SelectionHelperUI = {
|
||||
this._init(aContent);
|
||||
this._setupDebugOptions();
|
||||
|
||||
// Set the track bounds for each marker NIY
|
||||
this.startMark.setTrackBounds(aClientX, aClientY);
|
||||
this.endMark.setTrackBounds(aClientX, aClientY);
|
||||
|
||||
// Send this over to SelectionHandler in content, they'll message us
|
||||
// back with information on the current selection. SelectionStart
|
||||
// takes client coordinates.
|
||||
@ -266,10 +305,6 @@ var SelectionHelperUI = {
|
||||
this._init(aContent);
|
||||
this._setupDebugOptions();
|
||||
|
||||
// Set the track bounds for each marker NIY
|
||||
this.startMark.setTrackBounds(aClientX, aClientY);
|
||||
this.endMark.setTrackBounds(aClientX, aClientY);
|
||||
|
||||
// Send this over to SelectionHandler in content, they'll message us
|
||||
// back with information on the current selection. SelectionAttach
|
||||
// takes client coordinates.
|
||||
@ -289,7 +324,7 @@ var SelectionHelperUI = {
|
||||
* Note the caret marker is pretty limited in functionality. The
|
||||
* only thing is can do is be displayed at the caret position.
|
||||
* Once the user starts a drag, the caret marker is hidden, and
|
||||
* the start and end markers take over. (TBD)
|
||||
* the start and end markers take over.
|
||||
*
|
||||
* @param aClientX, aClientY client coordiates of the tap that
|
||||
* initiated the session.
|
||||
@ -319,16 +354,6 @@ var SelectionHelperUI = {
|
||||
return false;
|
||||
},
|
||||
|
||||
/*
|
||||
* isActive (prop)
|
||||
*
|
||||
* Determines if an edit session is currently active.
|
||||
*/
|
||||
get isActive() {
|
||||
return (this._msgTarget &&
|
||||
this._selectionHandlerActive);
|
||||
},
|
||||
|
||||
/*
|
||||
* closeEditSession
|
||||
*
|
||||
@ -342,12 +367,16 @@ var SelectionHelperUI = {
|
||||
|
||||
/*
|
||||
* closeEditSessionAndClear
|
||||
*
|
||||
*
|
||||
* Closes an active edit session and shuts down. Clears any selection region
|
||||
* associated with the edit session.
|
||||
*
|
||||
* @param aClearFocus bool indicating if the selection handler should also
|
||||
* clear the focus element. optional, the default is false.
|
||||
*/
|
||||
closeEditSessionAndClear: function closeEditSessionAndClear() {
|
||||
this._sendAsyncMessage("Browser:SelectionClear");
|
||||
closeEditSessionAndClear: function closeEditSessionAndClear(aClearFocus) {
|
||||
let clearFocus = aClearFocus || false;
|
||||
this._sendAsyncMessage("Browser:SelectionClear", { clearFocus: clearFocus });
|
||||
this.closeEditSession();
|
||||
},
|
||||
|
||||
@ -359,6 +388,15 @@ var SelectionHelperUI = {
|
||||
// store the target message manager
|
||||
this._msgTarget = aMsgTarget;
|
||||
|
||||
// Init our list of available monocle ids
|
||||
this._selectionMarkIds = ["selectionhandle-mark1",
|
||||
"selectionhandle-mark2",
|
||||
"selectionhandle-mark3"];
|
||||
|
||||
// Init selection rect info
|
||||
this._activeSelectionRect = Util.getCleanRect();
|
||||
this._targetElementRect = Util.getCleanRect();
|
||||
|
||||
// SelectionHandler messages
|
||||
messageManager.addMessageListener("Content:SelectionRange", this);
|
||||
messageManager.addMessageListener("Content:SelectionCopied", this);
|
||||
@ -419,10 +457,11 @@ var SelectionHelperUI = {
|
||||
if (this._caretMark != null)
|
||||
this._caretMark.shutdown();
|
||||
|
||||
delete this._startMark;
|
||||
delete this._endMark;
|
||||
delete this._caretMark;
|
||||
this._startMark = null;
|
||||
this._endMark = null;
|
||||
this._caretMark = null;
|
||||
|
||||
this._selectionMarkIds = [];
|
||||
this._msgTarget = null;
|
||||
this._activeSelectionRect = null;
|
||||
this._selectionHandlerActive = false;
|
||||
@ -435,6 +474,54 @@ var SelectionHelperUI = {
|
||||
* Utilities
|
||||
*/
|
||||
|
||||
/*
|
||||
* _swapCaretMarker
|
||||
*
|
||||
* Swap two drag markers - used when transitioning from caret mode
|
||||
* to selection mode. We take the current caret marker (which is in a
|
||||
* drag state) and swap it out with one of the selection markers.
|
||||
*/
|
||||
_swapCaretMarker: function _swapCaretMarker(aDirection) {
|
||||
let targetMark = null;
|
||||
if (aDirection == "start")
|
||||
targetMark = this.startMark;
|
||||
else
|
||||
targetMark = this.endMark;
|
||||
let caret = this.caretMark;
|
||||
targetMark.swapMonocle(caret);
|
||||
let id = caret._elementId;
|
||||
caret.shutdown();
|
||||
this._caretMark = null;
|
||||
this._selectionMarkIds.push(id);
|
||||
},
|
||||
|
||||
/*
|
||||
* _transitionFromCaretToSelection
|
||||
*
|
||||
* Transitions from caret mode to text selection mode.
|
||||
*/
|
||||
_transitionFromCaretToSelection: function _transitionFromCaretToSelection(aDirection) {
|
||||
// Get selection markers initialized if they aren't already
|
||||
{ let mark = this.startMark; mark = this.endMark; }
|
||||
|
||||
// Swap the caret marker out for the start or end marker depending
|
||||
// on direction.
|
||||
this._swapCaretMarker(aDirection);
|
||||
|
||||
let targetMark = null;
|
||||
if (aDirection == "start")
|
||||
targetMark = this.startMark;
|
||||
else
|
||||
targetMark = this.endMark;
|
||||
// Start the selection monocle drag. SelectionHandler relies on this
|
||||
// for getting initialized. This will also trigger a message back for
|
||||
// monocle positioning. Note, markerDragMove is still on the stack in
|
||||
// this call!
|
||||
targetMark._setPosition();
|
||||
this.markerDragStart(targetMark);
|
||||
this.markerDragMove(targetMark, aDirection);
|
||||
},
|
||||
|
||||
/*
|
||||
* _setupDebugOptions
|
||||
*
|
||||
@ -509,34 +596,53 @@ var SelectionHelperUI = {
|
||||
/*
|
||||
* _onTap
|
||||
*
|
||||
* Handles taps that move the current caret around text text
|
||||
* edits. Also will clear active selection if it is present.
|
||||
* Future: changing slection modes by tapping on a monocle.
|
||||
* Handles taps that move the current caret around in text edits,
|
||||
* clear active selection and focus when neccessary, or change
|
||||
* modes.
|
||||
* Future: changing selection modes by tapping on a monocle.
|
||||
*/
|
||||
_onTap: function _onTap(aEvent) {
|
||||
// Check for a tap on a monocle
|
||||
if (this.startMark.hitTest(aEvent.clientX, aEvent.clientY) ||
|
||||
this.endMark.hitTest(aEvent.clientX, aEvent.clientY)) {
|
||||
aEvent.stopPropagation();
|
||||
aEvent.preventDefault();
|
||||
return;
|
||||
}
|
||||
|
||||
// If the tap is within the target element and the caret monocle is
|
||||
// Is the tap point within the bound of the target element? This
|
||||
// is useful if we are dealing with some sort of input control.
|
||||
// Not so much if the target is a page or div.
|
||||
let pointInTargetElement =
|
||||
Util.pointWithinRect(aEvent.clientX, aEvent.clientY,
|
||||
this._targetElementRect);
|
||||
|
||||
// If the tap is within an editable element and the caret monocle is
|
||||
// active, update the caret.
|
||||
if (this.caretMark.visible &&
|
||||
Util.pointWithinRect(aEvent.clientX, aEvent.clientY,
|
||||
this._targetElementRect)) {
|
||||
if (this.caretMark.visible && pointInTargetElement) {
|
||||
// Move the caret
|
||||
this._setCaretPositionAtPoint(aEvent.clientX, aEvent.clientY);
|
||||
return;
|
||||
}
|
||||
|
||||
// if the target is editable and the user clicks off the target
|
||||
// clear selection and remove focus from the input.
|
||||
if (this.caretMark.visible) {
|
||||
// shutdown selection
|
||||
this.closeEditSessionAndClear();
|
||||
// shutdown and clear selection and remove focus
|
||||
this.closeEditSessionAndClear(true);
|
||||
return;
|
||||
}
|
||||
|
||||
// If we have active selection w/monocles, don't let random taps
|
||||
// kill selection.
|
||||
// If the target is editable, we have active selection, and
|
||||
// the user taps off the input, clear selection and shutdown.
|
||||
if (this.startMark.visible && !pointInTargetElement &&
|
||||
this._targetIsEditable) {
|
||||
this.closeEditSessionAndClear(true);
|
||||
return;
|
||||
}
|
||||
|
||||
// If we have active selection in anything else don't let the event get
|
||||
// to content. Prevents random taps from killing active selection.
|
||||
aEvent.stopPropagation();
|
||||
aEvent.preventDefault();
|
||||
},
|
||||
@ -582,6 +688,7 @@ var SelectionHelperUI = {
|
||||
}
|
||||
this._activeSelectionRect = json.selection;
|
||||
this._targetElementRect = json.element;
|
||||
this._targetIsEditable = json.targetIsEditable;
|
||||
},
|
||||
|
||||
_onSelectionFail: function _onSelectionFail() {
|
||||
@ -731,13 +838,17 @@ var SelectionHelperUI = {
|
||||
this._sendAsyncMessage("Browser:SelectionMoveEnd", json);
|
||||
},
|
||||
|
||||
markerDragMove: function markerDragMove(aMarker) {
|
||||
markerDragMove: function markerDragMove(aMarker, aDirection) {
|
||||
let json = this._getMarkerBaseMessage();
|
||||
json.change = aMarker.tag;
|
||||
if (aMarker.tag == "caret") {
|
||||
this._sendAsyncMessage("Browser:CaretMove", json);
|
||||
return;
|
||||
// We are going to transition from caret browsing mode to selection mode
|
||||
// on a drag. So swap the caret monocle for a start or end monocle
|
||||
// depending on the direction of the drag, and start selecting text.
|
||||
this._transitionFromCaretToSelection(aDirection);
|
||||
return false;
|
||||
}
|
||||
this._sendAsyncMessage("Browser:SelectionMove", json);
|
||||
return true;
|
||||
},
|
||||
};
|
||||
|
@ -146,10 +146,12 @@ var TouchModule = {
|
||||
// once we get omtc and the apzc. Currently though dblclick is delivered to
|
||||
// content and triggers selection of text, so fire up the SelectionHelperUI
|
||||
// once selection is present.
|
||||
setTimeout(function () {
|
||||
SelectionHelperUI.attachEditSession(Browser.selectedTab.browser,
|
||||
aEvent.clientX, aEvent.clientY);
|
||||
}, 50);
|
||||
if (!SelectionHelperUI.isActive) {
|
||||
setTimeout(function () {
|
||||
SelectionHelperUI.attachEditSession(Browser.selectedTab.browser,
|
||||
aEvent.clientX, aEvent.clientY);
|
||||
}, 50);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1,40 +0,0 @@
|
||||
<?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 dialog SYSTEM "chrome://browser/locale/prompt.dtd">
|
||||
<dialog id="capturepicker-dialog"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="document.getElementById('capturepicker-dialog').CaptureDialog.init()"
|
||||
script="chrome://browser/content/CaptureDialog.js">
|
||||
|
||||
<keyset>
|
||||
<key keycode="VK_RETURN" command="cmd_ok"/>
|
||||
<key keycode="VK_ESCAPE" command="cmd_cancel"/>
|
||||
</keyset>
|
||||
|
||||
<commandset>
|
||||
<command id="cmd_ok" oncommand="document.getElementById('capturepicker-dialog').CaptureDialog.capture();"/>
|
||||
<command id="cmd_cancel" oncommand="document.getElementById('capturepicker-dialog').CaptureDialog.cancel();"/>
|
||||
</commandset>
|
||||
|
||||
<vbox class="prompt-inner">
|
||||
<vbox class="prompt-header" flex="1">
|
||||
<description id="capturepicker-title" class="prompt-title" crop="center" flex="1"/>
|
||||
<hbox flex="1" pack="center">
|
||||
<vbox id="capturepicker-container" pack="center">
|
||||
<video xmlns="http://www.w3.org/1999/xhtml" id="capturepicker-video"
|
||||
width="320" height="240"
|
||||
src="moz-device:?width=320&height=240&type=video/x-raw-yuv"
|
||||
autoplay="true"> </video>
|
||||
</vbox>
|
||||
</hbox>
|
||||
</vbox>
|
||||
|
||||
<hbox id="capturepicker-buttons-box" class="prompt-buttons">
|
||||
<button class="prompt-button" label="&ok.label;" command="cmd_ok"/>
|
||||
<button class="prompt-button" label="&cancel.label;" command="cmd_cancel"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</dialog>
|
@ -30,7 +30,6 @@ chrome.jar:
|
||||
content/bindings/flyoutpanel.xml (content/bindings/flyoutpanel.xml)
|
||||
content/bindings/selectionoverlay.xml (content/bindings/selectionoverlay.xml)
|
||||
|
||||
content/prompt/CaptureDialog.xul (content/prompt/CaptureDialog.xul)
|
||||
content/prompt/alert.xul (content/prompt/alert.xul)
|
||||
content/prompt/confirm.xul (content/prompt/confirm.xul)
|
||||
content/prompt/prompt.xul (content/prompt/prompt.xul)
|
||||
@ -41,8 +40,6 @@ chrome.jar:
|
||||
content/prompt/removeMasterPassword.xul (content/prompt/removeMasterPassword.xul)
|
||||
|
||||
content/helperui/AlertsHelper.js (content/helperui/AlertsHelper.js)
|
||||
content/helperui/CaptureDialog.js (content/helperui/CaptureDialog.js)
|
||||
content/helperui/CapturePickerUI.js (content/helperui/CapturePickerUI.js)
|
||||
content/helperui/IndexedDB.js (content/helperui/IndexedDB.js)
|
||||
content/helperui/MasterPasswordUI.js (content/helperui/MasterPasswordUI.js)
|
||||
content/helperui/MenuUI.js (content/helperui/MenuUI.js)
|
||||
|
@ -93,8 +93,3 @@ category app-startup SafeBrowsing service,@mozilla.org/safebrowsing/application;
|
||||
component {88b3eb21-d072-4e3b-886d-f89d8c49fe59} UpdatePrompt.js
|
||||
contract @mozilla.org/updates/update-prompt;1 {88b3eb21-d072-4e3b-886d-f89d8c49fe59}
|
||||
#endif
|
||||
|
||||
# CapturePicker.js
|
||||
component {cb5a47f0-b58c-4fc3-b61a-358ee95f8238} CapturePicker.js
|
||||
contract @mozilla.org/capturepicker;1 {cb5a47f0-b58c-4fc3-b61a-358ee95f8238}
|
||||
|
||||
|
@ -934,18 +934,18 @@ setting[type="directory"] > .preferences-alignment {
|
||||
|
||||
/* Text selection handles */
|
||||
|
||||
#selectionhandle-start,
|
||||
#selectionhandle-end,
|
||||
#selectionhandle-caret {
|
||||
#selectionhandle-mark1,
|
||||
#selectionhandle-mark2,
|
||||
#selectionhandle-mark3 {
|
||||
border: 0px solid gray;
|
||||
padding: 0px;
|
||||
margin-top: -30px;
|
||||
margin-left: -18px;
|
||||
}
|
||||
|
||||
#selectionhandle-start,
|
||||
#selectionhandle-end,
|
||||
#selectionhandle-caret {
|
||||
#selectionhandle-mark1,
|
||||
#selectionhandle-mark2,
|
||||
#selectionhandle-mark3 {
|
||||
list-style-image: url("chrome://browser/skin/images/selection-monocle.png");
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,6 @@ TARGET_DEPTH = ..
|
||||
include $(srcdir)/automation-build.mk
|
||||
|
||||
_LEAKTEST_DIR = $(DEPTH)/_leaktest
|
||||
GARBAGE_DIRS += $(_LEAKTEST_DIR)
|
||||
|
||||
_LEAKTEST_FILES = \
|
||||
automation.py \
|
||||
|
@ -24,6 +24,24 @@ SCRIPT_DIR = os.path.abspath(os.path.realpath(os.path.dirname(sys.argv[0])))
|
||||
sys.path.insert(0, SCRIPT_DIR)
|
||||
import automationutils
|
||||
|
||||
# --------------------------------------------------------------
|
||||
# TODO: this is a hack for mozbase without virtualenv, remove with bug 849900
|
||||
#
|
||||
here = os.path.dirname(__file__)
|
||||
mozbase = os.path.realpath(os.path.join(os.path.dirname(here), 'mozbase'))
|
||||
|
||||
try:
|
||||
import mozcrash
|
||||
except:
|
||||
deps = ['mozcrash',
|
||||
'mozlog']
|
||||
for dep in deps:
|
||||
module = os.path.join(mozbase, dep)
|
||||
if module not in sys.path:
|
||||
sys.path.append(module)
|
||||
import mozcrash
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
_DEFAULT_WEB_SERVER = "127.0.0.1"
|
||||
_DEFAULT_HTTP_PORT = 8888
|
||||
_DEFAULT_SSL_PORT = 4443
|
||||
@ -1132,7 +1150,7 @@ user_pref("camino.use_system_proxy_settings", false); // Camino-only, harmless t
|
||||
return foundZombie
|
||||
|
||||
def checkForCrashes(self, profileDir, symbolsPath):
|
||||
return automationutils.checkForCrashes(os.path.join(profileDir, "minidumps"), symbolsPath, self.lastTestSeen)
|
||||
return mozcrash.check_for_crashes(os.path.join(profileDir, "minidumps"), symbolsPath, test_name=self.lastTestSeen)
|
||||
|
||||
def runApp(self, testURL, env, app, profileDir, extraArgs,
|
||||
runSSLTunnel = False, utilityPath = None,
|
||||
|
@ -11,7 +11,6 @@ from urlparse import urlparse
|
||||
__all__ = [
|
||||
"ZipFileReader",
|
||||
"addCommonOptions",
|
||||
"checkForCrashes",
|
||||
"dumpLeakLog",
|
||||
"isURL",
|
||||
"processLeakLog",
|
||||
@ -132,95 +131,6 @@ def addCommonOptions(parser, defaults={}):
|
||||
help = "prevents the test harness from redirecting "
|
||||
"stdout and stderr for interactive debuggers")
|
||||
|
||||
def checkForCrashes(dumpDir, symbolsPath, testName=None):
|
||||
stackwalkPath = os.environ.get('MINIDUMP_STACKWALK', None)
|
||||
# try to get the caller's filename if no test name is given
|
||||
if testName is None:
|
||||
try:
|
||||
testName = os.path.basename(sys._getframe(1).f_code.co_filename)
|
||||
except:
|
||||
testName = "unknown"
|
||||
|
||||
# Check preconditions
|
||||
dumps = glob.glob(os.path.join(dumpDir, '*.dmp'))
|
||||
if len(dumps) == 0:
|
||||
return False
|
||||
|
||||
try:
|
||||
removeSymbolsPath = False
|
||||
|
||||
# If our symbols are at a remote URL, download them now
|
||||
if symbolsPath and isURL(symbolsPath):
|
||||
print "Downloading symbols from: " + symbolsPath
|
||||
removeSymbolsPath = True
|
||||
# Get the symbols and write them to a temporary zipfile
|
||||
data = urllib2.urlopen(symbolsPath)
|
||||
symbolsFile = tempfile.TemporaryFile()
|
||||
symbolsFile.write(data.read())
|
||||
# extract symbols to a temporary directory (which we'll delete after
|
||||
# processing all crashes)
|
||||
symbolsPath = tempfile.mkdtemp()
|
||||
zfile = ZipFileReader(symbolsFile)
|
||||
zfile.extractall(symbolsPath)
|
||||
|
||||
for d in dumps:
|
||||
stackwalkOutput = []
|
||||
stackwalkOutput.append("Crash dump filename: " + d)
|
||||
topFrame = None
|
||||
if symbolsPath and stackwalkPath and os.path.exists(stackwalkPath):
|
||||
# run minidump stackwalk
|
||||
p = subprocess.Popen([stackwalkPath, d, symbolsPath],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE)
|
||||
(out, err) = p.communicate()
|
||||
if len(out) > 3:
|
||||
# minidump_stackwalk is chatty, so ignore stderr when it succeeds.
|
||||
stackwalkOutput.append(out)
|
||||
# The top frame of the crash is always the line after "Thread N (crashed)"
|
||||
# Examples:
|
||||
# 0 libc.so + 0xa888
|
||||
# 0 libnss3.so!nssCertificate_Destroy [certificate.c : 102 + 0x0]
|
||||
# 0 mozjs.dll!js::GlobalObject::getDebuggers() [GlobalObject.cpp:89df18f9b6da : 580 + 0x0]
|
||||
# 0 libxul.so!void js::gc::MarkInternal<JSObject>(JSTracer*, JSObject**) [Marking.cpp : 92 + 0x28]
|
||||
lines = out.splitlines()
|
||||
for i, line in enumerate(lines):
|
||||
if "(crashed)" in line:
|
||||
match = re.search(r"^ 0 (?:.*!)?(?:void )?([^\[]+)", lines[i+1])
|
||||
if match:
|
||||
topFrame = "@ %s" % match.group(1).strip()
|
||||
break
|
||||
else:
|
||||
stackwalkOutput.append("stderr from minidump_stackwalk:")
|
||||
stackwalkOutput.append(err)
|
||||
if p.returncode != 0:
|
||||
stackwalkOutput.append("minidump_stackwalk exited with return code %d" % p.returncode)
|
||||
else:
|
||||
if not symbolsPath:
|
||||
stackwalkOutput.append("No symbols path given, can't process dump.")
|
||||
if not stackwalkPath:
|
||||
stackwalkOutput.append("MINIDUMP_STACKWALK not set, can't process dump.")
|
||||
elif stackwalkPath and not os.path.exists(stackwalkPath):
|
||||
stackwalkOutput.append("MINIDUMP_STACKWALK binary not found: %s" % stackwalkPath)
|
||||
if not topFrame:
|
||||
topFrame = "Unknown top frame"
|
||||
log.info("PROCESS-CRASH | %s | application crashed [%s]", testName, topFrame)
|
||||
print '\n'.join(stackwalkOutput)
|
||||
dumpSavePath = os.environ.get('MINIDUMP_SAVE_PATH', None)
|
||||
if dumpSavePath:
|
||||
shutil.move(d, dumpSavePath)
|
||||
print "Saved dump as %s" % os.path.join(dumpSavePath,
|
||||
os.path.basename(d))
|
||||
else:
|
||||
os.remove(d)
|
||||
extra = os.path.splitext(d)[0] + ".extra"
|
||||
if os.path.exists(extra):
|
||||
os.remove(extra)
|
||||
finally:
|
||||
if removeSymbolsPath:
|
||||
shutil.rmtree(symbolsPath)
|
||||
|
||||
return True
|
||||
|
||||
def getFullPath(directory, path):
|
||||
"Get an absolute path relative to 'directory'."
|
||||
return os.path.normpath(os.path.join(directory, os.path.expanduser(path)))
|
||||
|
@ -5,7 +5,6 @@
|
||||
import time
|
||||
import re
|
||||
import os
|
||||
import automationutils
|
||||
import tempfile
|
||||
import shutil
|
||||
import subprocess
|
||||
@ -133,8 +132,8 @@ class RemoteAutomation(Automation):
|
||||
# Whilst no crash was found, the run should still display as a failure
|
||||
return True
|
||||
self._devicemanager.getDirectory(remoteCrashDir, dumpDir)
|
||||
crashed = automationutils.checkForCrashes(dumpDir, symbolsPath,
|
||||
self.lastTestSeen)
|
||||
crashed = Automation.checkForCrashes(self, dumpDir, symbolsPath)
|
||||
|
||||
finally:
|
||||
try:
|
||||
shutil.rmtree(dumpDir)
|
||||
|
38
content/base/crashtests/849601.html
Normal file
38
content/base/crashtests/849601.html
Normal file
@ -0,0 +1,38 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<script>
|
||||
|
||||
function addEmptyMutationObserver()
|
||||
{
|
||||
var m = new MutationObserver(function () {});
|
||||
var e = document.createElement('i');
|
||||
m.observe(e, { childList: true });
|
||||
}
|
||||
|
||||
function addPointlessMutationListener()
|
||||
{
|
||||
var a = document.createElementNS("http://www.w3.org/1999/xhtml", "div");
|
||||
a.appendChild(document.createTextNode("1"));
|
||||
|
||||
function f() {
|
||||
window.removeEventListener("DOMSubtreeModified", f, false);
|
||||
a.insertAdjacentHTML("afterBegin", "<span></span>");
|
||||
};
|
||||
|
||||
window.addEventListener("DOMSubtreeModified", f, false);
|
||||
}
|
||||
|
||||
function boom()
|
||||
{
|
||||
addEmptyMutationObserver();
|
||||
addPointlessMutationListener();
|
||||
document.body.outerHTML = "";
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body onload="boom();"></body>
|
||||
</html>
|
@ -132,3 +132,4 @@ load 836890.html
|
||||
load 841205.html
|
||||
load 844404.html
|
||||
load 847127.html
|
||||
load 849601.html
|
||||
|
@ -1207,11 +1207,6 @@ inline const mozilla::dom::Element* nsINode::AsElement() const
|
||||
return static_cast<const mozilla::dom::Element*>(this);
|
||||
}
|
||||
|
||||
inline bool nsINode::HasAttributes() const
|
||||
{
|
||||
return IsElement() && AsElement()->GetAttrCount() > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Macros to implement Clone(). _elementName is the class for which to implement
|
||||
* Clone.
|
||||
|
@ -1572,8 +1572,6 @@ public:
|
||||
{
|
||||
aLocalName = mNodeInfo->LocalName();
|
||||
}
|
||||
// HasAttributes is defined inline in Element.h.
|
||||
bool HasAttributes() const;
|
||||
nsDOMAttributeMap* GetAttributes();
|
||||
JS::Value SetUserData(JSContext* aCx, const nsAString& aKey, JS::Value aData,
|
||||
nsIDOMUserDataHandler* aHandler,
|
||||
@ -2011,12 +2009,6 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsINode, NS_INODE_IID)
|
||||
nsINode::GetLocalName(aLocalName); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
using nsINode::HasAttributes; \
|
||||
NS_IMETHOD HasAttributes(bool* aResult) __VA_ARGS__ \
|
||||
{ \
|
||||
*aResult = nsINode::HasAttributes(); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
NS_IMETHOD GetDOMBaseURI(nsAString& aBaseURI) __VA_ARGS__ \
|
||||
{ \
|
||||
nsINode::GetBaseURI(aBaseURI); \
|
||||
|
@ -3387,7 +3387,6 @@ Element::SetOuterHTML(const nsAString& aOuterHTML, ErrorResult& aError)
|
||||
OwnerDoc()->GetCompatibilityMode() ==
|
||||
eCompatibility_NavQuirks,
|
||||
true);
|
||||
nsAutoMutationBatch mb(parent, true, false);
|
||||
parent->ReplaceChild(*fragment, *this, aError);
|
||||
return;
|
||||
}
|
||||
@ -3415,7 +3414,6 @@ Element::SetOuterHTML(const nsAString& aOuterHTML, ErrorResult& aError)
|
||||
return;
|
||||
}
|
||||
nsCOMPtr<nsINode> fragment = do_QueryInterface(df);
|
||||
nsAutoMutationBatch mb(parent, true, false);
|
||||
parent->ReplaceChild(*fragment, *this, aError);
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,12 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
void JSBindingFinalized()
|
||||
{
|
||||
// Don't do anything special for destination nodes, as they will always
|
||||
// remain accessible through the AudioContext.
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -10,7 +10,6 @@
|
||||
"Historical DOM features must be removed: setAttributeNode": true,
|
||||
"Historical DOM features must be removed: removeAttributeNode": true,
|
||||
"DocumentType member must be nuked: internalSubset": true,
|
||||
"Node member must be nuked: hasAttributes": true,
|
||||
"Node member must be nuked: getUserData": true,
|
||||
"Node member must be nuked: setUserData": true
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
* http://www.w3.org/TR/DOM-Level-2-Core/
|
||||
*/
|
||||
|
||||
[scriptable, builtinclass, uuid(a974a4d3-2ff1-445b-8b8e-0aada5d4eedc)]
|
||||
[scriptable, builtinclass, uuid(05568261-182f-4911-8b1e-8c8d7ffe79f9)]
|
||||
interface nsIDOMAttr : nsIDOMNode
|
||||
{
|
||||
readonly attribute DOMString name;
|
||||
|
@ -15,7 +15,7 @@
|
||||
* http://www.w3.org/TR/DOM-Level-2-Core/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(cfad94e0-92d6-4b32-ab18-c61f9b8cb313)]
|
||||
[scriptable, uuid(3f73b88e-d158-416d-990f-740baabf262e)]
|
||||
interface nsIDOMCDATASection : nsIDOMText
|
||||
{
|
||||
};
|
||||
|
@ -13,7 +13,7 @@
|
||||
* http://www.w3.org/TR/DOM-Level-2-Core/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(05c29ae6-5533-42b6-9085-257f60445d5a)]
|
||||
[scriptable, uuid(e934716a-f7ee-46a4-9b6c-d084163d6b48)]
|
||||
interface nsIDOMCharacterData : nsIDOMNode
|
||||
{
|
||||
attribute DOMString data;
|
||||
|
@ -14,7 +14,7 @@
|
||||
* http://www.w3.org/TR/DOM-Level-2-Core/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(cf5493dc-ba25-423a-81e7-b417494f103a)]
|
||||
[scriptable, uuid(3bc4c503-bce5-44c5-9554-aba72502a468)]
|
||||
interface nsIDOMComment : nsIDOMCharacterData
|
||||
{
|
||||
};
|
||||
|
@ -27,7 +27,7 @@ interface nsIDOMLocation;
|
||||
* http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html
|
||||
*/
|
||||
|
||||
[scriptable, uuid(75996de6-6b0f-43e5-ae79-c98fa669da9a)]
|
||||
[scriptable, uuid(49592e41-a3a6-406c-a3d4-b5cf491f4e73)]
|
||||
interface nsIDOMDocument : nsIDOMNode
|
||||
{
|
||||
readonly attribute nsIDOMDocumentType doctype;
|
||||
|
@ -14,7 +14,7 @@
|
||||
* http://www.w3.org/TR/DOM-Level-2-Core/
|
||||
*/
|
||||
|
||||
[scriptable, builtinclass, uuid(33127aed-9d6a-4b0d-95aa-0529f51bcb9c)]
|
||||
[scriptable, builtinclass, uuid(e9ba0a30-1fb4-4823-870c-650afbbc9b87)]
|
||||
interface nsIDOMDocumentFragment : nsIDOMNode
|
||||
{
|
||||
};
|
||||
|
@ -15,7 +15,7 @@
|
||||
* http://www.w3.org/TR/DOM-Level-2-Core/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(7568365e-240f-4818-b2fc-0680bfb50942)]
|
||||
[scriptable, uuid(4caa34a7-27f6-42d3-9d7f-f631334d849d)]
|
||||
interface nsIDOMDocumentType : nsIDOMNode
|
||||
{
|
||||
readonly attribute DOMString name;
|
||||
|
@ -15,7 +15,7 @@ interface nsIDOMMozNamedAttrMap;
|
||||
* http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#interface-element
|
||||
*/
|
||||
|
||||
[scriptable, uuid(ccc2bbbc-5b44-4b01-b718-dd51f339fef8)]
|
||||
[scriptable, uuid(adea0ac9-f399-4537-bed5-58ba5d608a1b)]
|
||||
interface nsIDOMElement : nsIDOMNode
|
||||
{
|
||||
readonly attribute DOMString tagName;
|
||||
|
@ -17,7 +17,7 @@ interface nsIDOMUserDataHandler;
|
||||
* http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html
|
||||
*/
|
||||
|
||||
[scriptable, uuid(56545150-a001-484e-9ed4-cb319eebd7b3)]
|
||||
[scriptable, uuid(e0fda4a1-b4fd-404f-85b0-3167b79ae87f)]
|
||||
interface nsIDOMNode : nsISupports
|
||||
{
|
||||
const unsigned short ELEMENT_NODE = 1;
|
||||
@ -69,8 +69,6 @@ interface nsIDOMNode : nsISupports
|
||||
|
||||
// Introduced in DOM Level 2:
|
||||
readonly attribute DOMString localName;
|
||||
// Introduced in DOM Level 2:
|
||||
boolean hasAttributes();
|
||||
|
||||
// Introduced in DOM Level 3:
|
||||
// This uses a binaryname to avoid warnings due to name collision with
|
||||
|
@ -15,7 +15,7 @@
|
||||
* http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html
|
||||
*/
|
||||
|
||||
[scriptable, uuid(9ee8b1c3-2b0d-49e2-b2d6-f6bb8bf21b9e)]
|
||||
[scriptable, uuid(62af8276-947f-4ad1-a303-f076a3b05ca8)]
|
||||
interface nsIDOMProcessingInstruction : nsIDOMCharacterData
|
||||
{
|
||||
readonly attribute DOMString target;
|
||||
|
@ -13,7 +13,7 @@
|
||||
* http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html
|
||||
*/
|
||||
|
||||
[scriptable, uuid(3de88cc9-1462-4bb8-a2fc-845b132547ac)]
|
||||
[scriptable, uuid(50a838c2-f421-4496-a63e-0d58dbc480d9)]
|
||||
interface nsIDOMText : nsIDOMCharacterData
|
||||
{
|
||||
nsIDOMText splitText(in unsigned long offset)
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include "nsIDOMDocument.idl"
|
||||
|
||||
[scriptable, uuid(79547ba5-291e-4775-b71e-2440a4621b54)]
|
||||
[scriptable, uuid(94ed1513-b191-4375-b898-bde6e7352f54)]
|
||||
interface nsIDOMXMLDocument : nsIDOMDocument
|
||||
{
|
||||
// DOM Level 3 Load & Save, DocumentLS
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(c75e7bb1-cc7a-4169-9467-9513a95e3b94)]
|
||||
[scriptable, uuid(15399819-7bf8-4378-b49d-af77740f1365)]
|
||||
interface nsIDOMHTMLAnchorElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString href;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(351dd451-0077-4298-b569-a41529baca32)]
|
||||
[scriptable, uuid(fffb81fc-a950-4814-bec1-9fba3c88bccf)]
|
||||
interface nsIDOMHTMLAppletElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString align;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(6ab5b382-c19d-4a4e-98b7-2f4e14dbecdf)]
|
||||
[scriptable, uuid(6acf0592-60f7-4046-a95e-84a9e13ab75e)]
|
||||
interface nsIDOMHTMLAreaElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString alt;
|
||||
|
@ -20,7 +20,7 @@
|
||||
* @status UNDER_DEVELOPMENT
|
||||
*/
|
||||
|
||||
[scriptable, uuid(8e3fb6a1-490d-4772-90fd-3e3763958b74)]
|
||||
[scriptable, uuid(15a3360c-278c-4667-a9b5-ec6c57120ddf)]
|
||||
interface nsIDOMHTMLAudioElement : nsIDOMHTMLMediaElement
|
||||
{
|
||||
// Setup the audio stream for writing
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(8e69e7c2-2c32-4176-aec7-3ec9b518f4d7)]
|
||||
[scriptable, uuid(04b2f8b6-d5d0-4023-804c-f560d9b6d97e)]
|
||||
interface nsIDOMHTMLBRElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString clear;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(a07d89f2-c923-4632-901c-47b61c2b5f72)]
|
||||
[scriptable, uuid(ba49dfab-9361-4b73-b024-3e8ad810a71e)]
|
||||
interface nsIDOMHTMLBaseElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString href;
|
||||
|
@ -20,7 +20,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(4df676f2-7da1-4b88-843c-67d6c3f151df)]
|
||||
[scriptable, uuid(385b5f03-a450-4154-931f-032ba50b6ad6)]
|
||||
interface nsIDOMHTMLBodyElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString aLink;
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
interface nsIDOMValidityState;
|
||||
|
||||
[scriptable, uuid(1b5905c5-cc98-4446-9700-a90b96e4e2f4)]
|
||||
[scriptable, uuid(ef1a1782-5ea9-430f-b0ee-55f26a229512)]
|
||||
interface nsIDOMHTMLButtonElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute boolean autofocus;
|
||||
|
@ -46,7 +46,7 @@ interface nsIFileCallback : nsISupports {
|
||||
void receive(in nsIDOMBlob file);
|
||||
};
|
||||
|
||||
[scriptable, uuid(1cfacc53-ab73-4ceb-9f5f-22387dcd1aae)]
|
||||
[scriptable, uuid(7a65eb33-0441-456f-9d58-575ce4421a3f)]
|
||||
interface nsIDOMHTMLCanvasElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute unsigned long width;
|
||||
|
@ -15,7 +15,7 @@
|
||||
* @status UNDER_DEVELOPMENT
|
||||
*/
|
||||
|
||||
[scriptable, uuid(97efa08f-8b7f-41bd-8be6-b806eb48b08c)]
|
||||
[scriptable, uuid(2b10cb0d-79c1-4543-aac1-0d3582593c61)]
|
||||
interface nsIDOMHTMLCommandElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString type;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(e611c0c1-d5ea-4d25-b9e5-08d4cafd0151)]
|
||||
[scriptable, uuid(3571547c-9293-437f-a6bb-c96d4b5ce2d3)]
|
||||
interface nsIDOMHTMLDListElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute boolean compact;
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
interface nsIDOMHTMLCollection;
|
||||
|
||||
[scriptable, uuid(87ea361b-fe0f-486b-a891-7686dadd6372)]
|
||||
[scriptable, uuid(cdab1755-37ed-46c6-bcb8-520dfd64952a)]
|
||||
interface nsIDOMHTMLDataListElement : nsIDOMHTMLElement
|
||||
{
|
||||
readonly attribute nsIDOMHTMLCollection options;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(15b161c4-f471-4681-9368-1114f5d7a129)]
|
||||
[scriptable, uuid(f762b720-e03b-471e-bf3e-5d0de482c87f)]
|
||||
interface nsIDOMHTMLDirectoryElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute boolean compact;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(a4f021dd-9e3b-4a78-a9a0-bae60f9a4cc4)]
|
||||
[scriptable, uuid(9fbe9793-c92b-485c-b856-b87b0399574e)]
|
||||
interface nsIDOMHTMLDivElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString align;
|
||||
|
@ -13,7 +13,7 @@
|
||||
*/
|
||||
interface nsISelection;
|
||||
|
||||
[scriptable, uuid(fd76e045-8d97-4a97-ad75-eac5ae2f3ea4)]
|
||||
[scriptable, uuid(a6603d58-3cbe-4cf3-baec-cac7aba498b6)]
|
||||
interface nsIDOMHTMLDocument : nsIDOMDocument
|
||||
{
|
||||
attribute DOMString domain;
|
||||
|
@ -19,7 +19,7 @@ interface nsIDOMHTMLMenuElement;
|
||||
* with changes from the work-in-progress WHATWG HTML specification:
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
[scriptable, uuid(56d50046-31af-4cdc-af51-217fb2fd0a4d)]
|
||||
[scriptable, uuid(6decb41e-44e6-40ca-b3cb-9ded9c1fc382)]
|
||||
interface nsIDOMHTMLElement : nsIDOMElement
|
||||
{
|
||||
// metadata attributes
|
||||
|
@ -13,7 +13,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/#the-embed-element
|
||||
*/
|
||||
|
||||
[scriptable, uuid(ca0de9c2-e230-4acb-aa6d-65fc0283bf06)]
|
||||
[scriptable, uuid(2989533c-72d1-480c-9870-b6b831b53ea8)]
|
||||
interface nsIDOMHTMLEmbedElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString align;
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
interface nsIDOMValidityState;
|
||||
|
||||
[scriptable, uuid(a3e19d5b-aa7c-46bd-8bca-7135b250260a)]
|
||||
[scriptable, uuid(e36fdef0-1c7f-4c1d-8917-28466ea70df8)]
|
||||
interface nsIDOMHTMLFieldSetElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute boolean disabled;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(3ab61e70-7aac-4d9b-99fd-1c5ec5228463)]
|
||||
[scriptable, uuid(447032ca-1a2c-4e4b-b160-67b1738e5629)]
|
||||
interface nsIDOMHTMLFontElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString color;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(6c79f4b0-3d55-45ca-8bf3-68a236e90e97)]
|
||||
[scriptable, uuid(a71d7de5-eae8-42fe-9770-cc28dd040b16)]
|
||||
interface nsIDOMHTMLFormElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString acceptCharset;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(912423ad-00c2-4948-8f8e-4950169e516d)]
|
||||
[scriptable, uuid(ee026cb0-7f3d-464d-84b8-02c97ecad7f9)]
|
||||
interface nsIDOMHTMLFrameElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString frameBorder;
|
||||
|
@ -20,7 +20,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(e62b41c0-eaec-49bc-bf0c-be3a50b175d1)]
|
||||
[scriptable, uuid(d165dc56-ca5f-4d6d-a96c-252ca246b2a9)]
|
||||
interface nsIDOMHTMLFrameSetElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString cols;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(adf811c1-eece-4cd2-9632-ea39bc0e20e7)]
|
||||
[scriptable, uuid(1d72b9fe-f100-4800-9669-7442d7f2b326)]
|
||||
interface nsIDOMHTMLHRElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString align;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(2baa2206-1ce6-4208-aead-d1f6b18e97fb)]
|
||||
[scriptable, uuid(3d69a421-ff1e-49e1-9208-541e417de298)]
|
||||
interface nsIDOMHTMLHeadElement : nsIDOMHTMLElement
|
||||
{
|
||||
};
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(39a59521-2e03-436b-b87b-6405396e1a24)]
|
||||
[scriptable, uuid(431846a5-243b-4e0a-abd0-098a0fb5320b)]
|
||||
interface nsIDOMHTMLHeadingElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString align;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(e7720912-1fb4-4c00-ae78-faddba690b45)]
|
||||
[scriptable, uuid(f4249435-cf81-4806-a5db-a53c8f8731c5)]
|
||||
interface nsIDOMHTMLHtmlElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString version;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(87d6e8db-4ae2-4a9d-a546-510836611038)]
|
||||
[scriptable, uuid(3cdaedb6-5029-4852-a66e-b0d3c295b972)]
|
||||
interface nsIDOMHTMLIFrameElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString align;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(0e2ffdcb-b881-436b-a450-4790f47b60fe)]
|
||||
[scriptable, uuid(fc7490d1-234b-4d0a-910d-5fb859c99fc1)]
|
||||
interface nsIDOMHTMLImageElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString alt;
|
||||
|
@ -20,7 +20,7 @@ interface nsIDOMValidityState;
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(3f51d301-be0e-4e19-b056-ea98c03eedfd)]
|
||||
[scriptable, uuid(858dfd88-491b-4276-8acb-8e0f4d4fff54)]
|
||||
interface nsIDOMHTMLInputElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString accept;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(8be7060b-66fe-47f4-99f0-44fe65cf9cd6)]
|
||||
[scriptable, uuid(090b4519-3636-4ea3-be6f-83d4917456a9)]
|
||||
interface nsIDOMHTMLLIElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString type;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(02024255-6b9e-445f-971e-ac71ed091a64)]
|
||||
[scriptable, uuid(b59fe47f-c4e7-47c4-b9c8-6960495fe7e3)]
|
||||
interface nsIDOMHTMLLabelElement : nsIDOMHTMLElement
|
||||
{
|
||||
readonly attribute nsIDOMHTMLFormElement form;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(42f1c264-d2b1-4f50-95cf-929ae2ea4c52)]
|
||||
[scriptable, uuid(27b837cb-c825-4248-9c7c-99e2a7ddaebc)]
|
||||
interface nsIDOMHTMLLegendElement : nsIDOMHTMLElement
|
||||
{
|
||||
readonly attribute nsIDOMHTMLFormElement form;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(ca856a0b-6786-4123-90fe-dc9c7600274e)]
|
||||
[scriptable, uuid(1e63390c-4263-4578-a584-d2f2bbf37141)]
|
||||
interface nsIDOMHTMLLinkElement : nsIDOMHTMLElement
|
||||
{
|
||||
[binaryname(MozDisabled)]
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(4b2136a3-f296-479a-88dc-ed4421eb3a22)]
|
||||
[scriptable, uuid(ea67d322-96be-4941-8e78-35cce42b411c)]
|
||||
interface nsIDOMHTMLMapElement : nsIDOMHTMLElement
|
||||
{
|
||||
readonly attribute nsIDOMHTMLCollection areas;
|
||||
|
@ -27,7 +27,7 @@ interface nsIDOMMediaStream;
|
||||
#endif
|
||||
%}
|
||||
|
||||
[scriptable, uuid(585a5edd-0a64-4edb-a7d7-d0304e3b8e55)]
|
||||
[scriptable, uuid(488eb1d7-fa08-425e-bac4-f7dd59805352)]
|
||||
interface nsIDOMHTMLMediaElement : nsIDOMHTMLElement
|
||||
{
|
||||
// error state
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(6790c2f5-01ac-43ba-9145-dd2052e3b0c7)]
|
||||
[scriptable, uuid(7d2b6008-9554-403d-8f21-e1bedba4d057)]
|
||||
interface nsIDOMHTMLMenuElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute boolean compact;
|
||||
|
@ -12,7 +12,7 @@
|
||||
* @status UNDER_DEVELOPMENT
|
||||
*/
|
||||
|
||||
[scriptable, uuid(79a4ca67-bca8-4044-bc69-629e8961137a)]
|
||||
[scriptable, uuid(dacbe36c-5e6e-4949-99af-6644baf8118a)]
|
||||
interface nsIDOMHTMLMenuItemElement : nsIDOMHTMLCommandElement
|
||||
{
|
||||
};
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(1aeebf8a-577e-433a-ae40-339426b52e96)]
|
||||
[scriptable, uuid(26482444-c807-4268-96cf-c07f54fd9fa4)]
|
||||
interface nsIDOMHTMLMetaElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString content;
|
||||
|
@ -13,7 +13,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-meter-element
|
||||
*/
|
||||
|
||||
[scriptable, uuid(53b55f04-fd1a-47e5-8181-d059114a3bc9)]
|
||||
[scriptable, uuid(4ac29593-8756-4060-a960-478082b82c48)]
|
||||
interface nsIDOMHTMLMeterElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute double value;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(c8ce2f75-2bbf-4c30-8627-0ea1a7b2ebf7)]
|
||||
[scriptable, uuid(860f2f1b-3d75-4b11-b3e3-c4aa7e6007b7)]
|
||||
interface nsIDOMHTMLModElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString cite;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(d94ba4eb-a154-4abf-9868-105905e995e4)]
|
||||
[scriptable, uuid(56dc0564-41a5-4a49-b8ca-7ede3766c084)]
|
||||
interface nsIDOMHTMLOListElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute boolean compact;
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
interface nsIDOMValidityState;
|
||||
|
||||
[scriptable, uuid(2481afa7-9ca3-448b-80d7-0138c47b5b33)]
|
||||
[scriptable, uuid(0d8341fb-1d07-41e3-98ad-2782aedf7224)]
|
||||
interface nsIDOMHTMLObjectElement : nsIDOMHTMLElement
|
||||
{
|
||||
readonly attribute nsIDOMHTMLFormElement form;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(cc9fe8ad-908b-40c4-b007-254e15d783bb)]
|
||||
[scriptable, uuid(4d103638-5db1-4426-ba16-df773d6ad61c)]
|
||||
interface nsIDOMHTMLOptGroupElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute boolean disabled;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(d4c53417-e746-451a-8b8a-0fa3fcda95b3)]
|
||||
[scriptable, uuid(a6fbb1d0-5342-47cd-94a3-1e50cae98648)]
|
||||
interface nsIDOMHTMLOptionElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute boolean disabled;
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
interface nsIDOMValidityState;
|
||||
|
||||
[scriptable, uuid(6d6bf653-3eb4-420f-b1b0-6ad919a06926)]
|
||||
[scriptable, uuid(de830a0f-0722-4258-8ec4-5cb75c4fd0fe)]
|
||||
interface nsIDOMHTMLOutputElement : nsIDOMHTMLElement
|
||||
{
|
||||
// DOMSettableTokenList
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(ccc50b61-8e2e-4e0a-be5e-0b30923051b0)]
|
||||
[scriptable, uuid(6bed192b-064f-4c62-922d-22820f822933)]
|
||||
interface nsIDOMHTMLParagraphElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString align;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(9cb0d681-1d1c-4c5d-b165-579cafcdf897)]
|
||||
[scriptable, uuid(fa065fd2-daa5-4695-bb5e-67f7148e310d)]
|
||||
interface nsIDOMHTMLParamElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString name;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(128840c4-0973-4c7a-b71a-81e23071f1f6)]
|
||||
[scriptable, uuid(b7924741-8a28-469b-85a8-3880133f2fac)]
|
||||
interface nsIDOMHTMLPreElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute long width;
|
||||
|
@ -15,7 +15,7 @@
|
||||
* @status UNDER_DEVELOPMENT
|
||||
*/
|
||||
|
||||
[scriptable, uuid(e5ba151c-0772-4849-8021-fb30f341fff9)]
|
||||
[scriptable, uuid(67a5c7ec-40bb-49ac-a38d-59f3b31e1af1)]
|
||||
interface nsIDOMHTMLProgressElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute double value;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(fa9731da-fa8a-48a4-95a3-cba2623bcc59)]
|
||||
[scriptable, uuid(5f07a07a-8f10-4af6-919f-2c6c2c01cedf)]
|
||||
interface nsIDOMHTMLQuoteElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString cite;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(e445db32-0116-4cf5-b73e-7073ccf3d259)]
|
||||
[scriptable, uuid(09b9dd56-e330-4556-93ca-7557cfcf4233)]
|
||||
interface nsIDOMHTMLScriptElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString src;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user