mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge fx-team to m-c
This commit is contained in:
commit
602dcde9e3
@ -25,8 +25,7 @@ gcli.addCommand({
|
||||
{
|
||||
name: 'url',
|
||||
type: 'string',
|
||||
description: gcli.lookup('jsbUrlDesc'),
|
||||
manual: 'The URL of the JS to prettify'
|
||||
description: gcli.lookup('jsbUrlDesc')
|
||||
},
|
||||
{
|
||||
name: 'indentSize',
|
||||
|
@ -9340,11 +9340,27 @@ Inputter.prototype.getDimensions = function() {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
var fixedLoc = {};
|
||||
var currentElement = this.element.parentNode;
|
||||
while (currentElement && currentElement.nodeName !== '#document') {
|
||||
var style = this.document.defaultView.getComputedStyle(currentElement, '');
|
||||
if (style) {
|
||||
var position = style.getPropertyValue('position');
|
||||
if (position === 'absolute' || position === 'fixed') {
|
||||
var bounds = currentElement.getBoundingClientRect();
|
||||
fixedLoc.top = bounds.top;
|
||||
fixedLoc.left = bounds.left;
|
||||
break;
|
||||
}
|
||||
}
|
||||
currentElement = currentElement.parentNode;
|
||||
}
|
||||
|
||||
var rect = this.element.getBoundingClientRect();
|
||||
return {
|
||||
top: rect.top + 1,
|
||||
top: rect.top - (fixedLoc.top || 0) + 1,
|
||||
height: rect.bottom - rect.top - 1,
|
||||
left: rect.left + 2,
|
||||
left: rect.left - (fixedLoc.left || 0) + 2,
|
||||
width: rect.right - rect.left
|
||||
};
|
||||
};
|
||||
|
@ -59,7 +59,7 @@ function testLocationChange()
|
||||
ok(true, "tabNavigated event was fired.");
|
||||
info("Still attached to the tab.");
|
||||
|
||||
gDebugger.addEventListener("Debugger:AfterScriptsAdded", function _onEvent(aEvent) {
|
||||
gDebugger.addEventListener("Debugger:AfterNewScript", function _onEvent(aEvent) {
|
||||
gDebugger.removeEventListener(aEvent.type, _onEvent);
|
||||
|
||||
isnot(gDebugger.DebuggerView.Scripts.selected, null,
|
||||
|
@ -95,7 +95,7 @@ function test()
|
||||
else if (step === 2) {
|
||||
testCurrentScript("-01.js", step);
|
||||
expectedScript = "-02.js";
|
||||
gView.Scripts.selectScript(gView.Scripts.scriptLocations[1]);
|
||||
switchScript(1);
|
||||
}
|
||||
else if (step === 3) {
|
||||
testCurrentScript("-02.js", step);
|
||||
@ -105,7 +105,7 @@ function test()
|
||||
else if (step === 4) {
|
||||
testCurrentScript("-02.js", step);
|
||||
expectedScript = "-01.js";
|
||||
gView.Scripts.selectScript(gView.Scripts.scriptLocations[0]);
|
||||
switchScript(0);
|
||||
}
|
||||
else if (step === 5) {
|
||||
testCurrentScript("-01.js", step);
|
||||
@ -125,7 +125,7 @@ function test()
|
||||
else if (step === 8) {
|
||||
testCurrentScript("-01.js", step);
|
||||
expectedScript = "-02.js";
|
||||
gView.Scripts.selectScript(gView.Scripts.scriptLocations[1]);
|
||||
switchScript(1);
|
||||
}
|
||||
else if (step === 9) {
|
||||
testCurrentScript("-02.js", step);
|
||||
@ -145,7 +145,7 @@ function test()
|
||||
else if (step === 12) {
|
||||
testCurrentScript("-02.js", step);
|
||||
expectedScript = "-01.js";
|
||||
gView.Scripts.selectScript(gView.Scripts.scriptLocations[0]);
|
||||
switchScript(0);
|
||||
}
|
||||
else if (step === 13) {
|
||||
testCurrentScript("-01.js", step);
|
||||
@ -166,6 +166,24 @@ function test()
|
||||
"The shown script is not the the correct one. (" + step + ")");
|
||||
}
|
||||
|
||||
function switchScript(index)
|
||||
{
|
||||
let scriptsView = gView.Scripts;
|
||||
let scriptLocations = scriptsView.scriptLocations;
|
||||
info("Available scripts: " + scriptLocations);
|
||||
|
||||
if (scriptLocations.length === 2) {
|
||||
// We got all the scripts, it's safe to switch.
|
||||
scriptsView.selectScript(scriptLocations[index]);
|
||||
return;
|
||||
}
|
||||
|
||||
window.addEventListener("Debugger:AfterNewScript", function _onEvent(aEvent) {
|
||||
window.removeEventListener(aEvent.type, _onEvent);
|
||||
switchScript(index);
|
||||
});
|
||||
}
|
||||
|
||||
function reloadPage()
|
||||
{
|
||||
gDebuggee.location.reload();
|
||||
|
@ -24,6 +24,19 @@ XPCOMUtils.defineLazyModuleGetter(this, "gcli",
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "CmdCommands",
|
||||
"resource:///modules/devtools/CmdCmd.jsm");
|
||||
|
||||
/**
|
||||
* Due to a number of panel bugs we need a way to check if we are running on
|
||||
* Linux. See the comments for TooltipPanel and OutputPanel for further details.
|
||||
*
|
||||
* When bug 780102 is fixed all isLinux checks can be removed and we can revert
|
||||
* to using panels.
|
||||
*/
|
||||
XPCOMUtils.defineLazyGetter(this, "isLinux", function () {
|
||||
let os = Components.classes["@mozilla.org/xre/app-info;1"]
|
||||
.getService(Components.interfaces.nsIXULRuntime).OS;
|
||||
return os == "Linux";
|
||||
});
|
||||
|
||||
/**
|
||||
* A component to manage the global developer toolbar, which contains a GCLI
|
||||
* and buttons for various developer tools.
|
||||
@ -539,6 +552,18 @@ function DT_resetErrorsCount(aTab)
|
||||
|
||||
/**
|
||||
* Panel to handle command line output.
|
||||
*
|
||||
* There is a tooltip bug on Windows and OSX that prevents tooltips from being
|
||||
* positioned properly (bug 786975). There is a Gnome panel bug on Linux that
|
||||
* causes ugly focus issues (https://bugzilla.gnome.org/show_bug.cgi?id=621848).
|
||||
* We now use a tooltip on Linux and a panel on OSX & Windows.
|
||||
*
|
||||
* If a panel has no content and no height it is not shown when openPopup is
|
||||
* called on Windows and OSX (bug 692348) ... this prevents the panel from
|
||||
* appearing the first time it is shown. Setting the panel's height to 1px
|
||||
* before calling openPopup works around this issue as we resize it ourselves
|
||||
* anyway.
|
||||
*
|
||||
* @param aChromeDoc document from which we can pull the parts we need.
|
||||
* @param aInput the input element that should get focus.
|
||||
* @param aLoadCallback called when the panel is loaded properly.
|
||||
@ -551,7 +576,7 @@ function OutputPanel(aChromeDoc, aInput, aLoadCallback)
|
||||
this._loadCallback = aLoadCallback;
|
||||
|
||||
/*
|
||||
<tooltip id="gcli-output"
|
||||
<tooltip|panel id="gcli-output"
|
||||
noautofocus="true"
|
||||
noautohide="true"
|
||||
class="gcli-panel">
|
||||
@ -559,15 +584,31 @@ function OutputPanel(aChromeDoc, aInput, aLoadCallback)
|
||||
id="gcli-output-frame"
|
||||
src="chrome://browser/content/devtools/commandlineoutput.xhtml"
|
||||
flex="1"/>
|
||||
</tooltip>
|
||||
</tooltip|panel>
|
||||
*/
|
||||
|
||||
// TODO: Switch back from tooltip to panel when metacity focus issue is fixed:
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=780102
|
||||
this._panel = aChromeDoc.createElement("tooltip");
|
||||
this._panel = aChromeDoc.createElement(isLinux ? "tooltip" : "panel");
|
||||
|
||||
this._panel.id = "gcli-output";
|
||||
this._panel.classList.add("gcli-panel");
|
||||
|
||||
if (isLinux) {
|
||||
this.canHide = false;
|
||||
this._onpopuphiding = this._onpopuphiding.bind(this);
|
||||
this._panel.addEventListener("popuphiding", this._onpopuphiding, true);
|
||||
} else {
|
||||
this._panel.setAttribute("noautofocus", "true");
|
||||
this._panel.setAttribute("noautohide", "true");
|
||||
|
||||
// Bug 692348: On Windows and OSX if a panel has no content and no height
|
||||
// openPopup fails to display it. Setting the height to 1px alows the panel
|
||||
// to be displayed before has content or a real height i.e. the first time
|
||||
// it is displayed.
|
||||
this._panel.setAttribute("height", "1px");
|
||||
}
|
||||
|
||||
this._toolbar.parentElement.insertBefore(this._panel, this._toolbar);
|
||||
|
||||
this._frame = aChromeDoc.createElementNS(NS_XHTML, "iframe");
|
||||
@ -582,10 +623,6 @@ function OutputPanel(aChromeDoc, aInput, aLoadCallback)
|
||||
this._frame.addEventListener("load", this._onload, true);
|
||||
|
||||
this.loaded = false;
|
||||
this.canHide = false;
|
||||
|
||||
this._onpopuphiding = this._onpopuphiding.bind(this);
|
||||
this._panel.addEventListener("popuphiding", this._onpopuphiding, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -620,7 +657,7 @@ OutputPanel.prototype._onpopuphiding = function OP_onpopuphiding(aEvent)
|
||||
{
|
||||
// TODO: When we switch back from tooltip to panel we can remove this hack:
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=780102
|
||||
if (!this.canHide) {
|
||||
if (isLinux && !this.canHide) {
|
||||
aEvent.preventDefault();
|
||||
}
|
||||
};
|
||||
@ -637,7 +674,9 @@ OutputPanel.prototype.show = function OP_show()
|
||||
this._resize();
|
||||
}.bind(this), 0);
|
||||
|
||||
this.canHide = false;
|
||||
if (isLinux) {
|
||||
this.canHide = false;
|
||||
}
|
||||
|
||||
this._panel.openPopup(this._input, "before_start", 0, 0, false, false, null);
|
||||
this._resize();
|
||||
@ -698,7 +737,9 @@ OutputPanel.prototype.update = function OP_update()
|
||||
*/
|
||||
OutputPanel.prototype.remove = function OP_remove()
|
||||
{
|
||||
this.canHide = true;
|
||||
if (isLinux) {
|
||||
this.canHide = true;
|
||||
}
|
||||
|
||||
if (this._panel) {
|
||||
this._panel.hidePopup();
|
||||
@ -743,7 +784,9 @@ OutputPanel.prototype._visibilityChanged = function OP_visibilityChanged(aEvent)
|
||||
if (aEvent.outputVisible === true) {
|
||||
// this.show is called by _outputChanged
|
||||
} else {
|
||||
this.canHide = true;
|
||||
if (isLinux) {
|
||||
this.canHide = true;
|
||||
}
|
||||
this._panel.hidePopup();
|
||||
}
|
||||
};
|
||||
@ -751,6 +794,18 @@ OutputPanel.prototype._visibilityChanged = function OP_visibilityChanged(aEvent)
|
||||
|
||||
/**
|
||||
* Panel to handle tooltips.
|
||||
*
|
||||
* There is a tooltip bug on Windows and OSX that prevents tooltips from being
|
||||
* positioned properly (bug 786975). There is a Gnome panel bug on Linux that
|
||||
* causes ugly focus issues (https://bugzilla.gnome.org/show_bug.cgi?id=621848).
|
||||
* We now use a tooltip on Linux and a panel on OSX & Windows.
|
||||
*
|
||||
* If a panel has no content and no height it is not shown when openPopup is
|
||||
* called on Windows and OSX (bug 692348) ... this prevents the panel from
|
||||
* appearing the first time it is shown. Setting the panel's height to 1px
|
||||
* before calling openPopup works around this issue as we resize it ourselves
|
||||
* anyway.
|
||||
*
|
||||
* @param aChromeDoc document from which we can pull the parts we need.
|
||||
* @param aInput the input element that should get focus.
|
||||
* @param aLoadCallback called when the panel is loaded properly.
|
||||
@ -764,7 +819,7 @@ function TooltipPanel(aChromeDoc, aInput, aLoadCallback)
|
||||
this._onload = this._onload.bind(this);
|
||||
this._loadCallback = aLoadCallback;
|
||||
/*
|
||||
<tooltip id="gcli-tooltip"
|
||||
<tooltip|panel id="gcli-tooltip"
|
||||
type="arrow"
|
||||
noautofocus="true"
|
||||
noautohide="true"
|
||||
@ -773,15 +828,31 @@ function TooltipPanel(aChromeDoc, aInput, aLoadCallback)
|
||||
id="gcli-tooltip-frame"
|
||||
src="chrome://browser/content/devtools/commandlinetooltip.xhtml"
|
||||
flex="1"/>
|
||||
</tooltip>
|
||||
</tooltip|panel>
|
||||
*/
|
||||
|
||||
// TODO: Switch back from tooltip to panel when metacity focus issue is fixed:
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=780102
|
||||
this._panel = aChromeDoc.createElement("tooltip");
|
||||
this._panel = aChromeDoc.createElement(isLinux ? "tooltip" : "panel");
|
||||
|
||||
this._panel.id = "gcli-tooltip";
|
||||
this._panel.classList.add("gcli-panel");
|
||||
|
||||
if (isLinux) {
|
||||
this.canHide = false;
|
||||
this._onpopuphiding = this._onpopuphiding.bind(this);
|
||||
this._panel.addEventListener("popuphiding", this._onpopuphiding, true);
|
||||
} else {
|
||||
this._panel.setAttribute("noautofocus", "true");
|
||||
this._panel.setAttribute("noautohide", "true");
|
||||
|
||||
// Bug 692348: On Windows and OSX if a panel has no content and no height
|
||||
// openPopup fails to display it. Setting the height to 1px alows the panel
|
||||
// to be displayed before has content or a real height i.e. the first time
|
||||
// it is displayed.
|
||||
this._panel.setAttribute("height", "1px");
|
||||
}
|
||||
|
||||
this._toolbar.parentElement.insertBefore(this._panel, this._toolbar);
|
||||
|
||||
this._frame = aChromeDoc.createElementNS(NS_XHTML, "iframe");
|
||||
@ -793,10 +864,6 @@ function TooltipPanel(aChromeDoc, aInput, aLoadCallback)
|
||||
this._frame.addEventListener("load", this._onload, true);
|
||||
|
||||
this.loaded = false;
|
||||
this.canHide = false;
|
||||
|
||||
this._onpopuphiding = this._onpopuphiding.bind(this);
|
||||
this._panel.addEventListener("popuphiding", this._onpopuphiding, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -829,7 +896,7 @@ TooltipPanel.prototype._onpopuphiding = function TP_onpopuphiding(aEvent)
|
||||
{
|
||||
// TODO: When we switch back from tooltip to panel we can remove this hack:
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=780102
|
||||
if (!this.canHide) {
|
||||
if (isLinux && !this.canHide) {
|
||||
aEvent.preventDefault();
|
||||
}
|
||||
};
|
||||
@ -851,7 +918,9 @@ TooltipPanel.prototype.show = function TP_show(aDimensions)
|
||||
this._resize();
|
||||
}.bind(this), 0);
|
||||
|
||||
this.canHide = false;
|
||||
if (isLinux) {
|
||||
this.canHide = false;
|
||||
}
|
||||
|
||||
this._resize();
|
||||
this._panel.openPopup(this._input, "before_start", aDimensions.start * 10, 0, false, false, null);
|
||||
@ -896,7 +965,9 @@ TooltipPanel.prototype._resize = function TP_resize()
|
||||
*/
|
||||
TooltipPanel.prototype.remove = function TP_remove()
|
||||
{
|
||||
this.canHide = true;
|
||||
if (isLinux) {
|
||||
this.canHide = true;
|
||||
}
|
||||
this._panel.hidePopup();
|
||||
};
|
||||
|
||||
@ -934,7 +1005,9 @@ TooltipPanel.prototype._visibilityChanged = function TP_visibilityChanged(aEvent
|
||||
if (aEvent.tooltipVisible === true) {
|
||||
this.show(aEvent.dimensions);
|
||||
} else {
|
||||
this.canHide = true;
|
||||
if (isLinux) {
|
||||
this.canHide = true;
|
||||
}
|
||||
this._panel.hidePopup();
|
||||
}
|
||||
};
|
||||
|
@ -758,6 +758,87 @@ StyleEditor.prototype = {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Decode a CSS source string to unicode according to the character set rules
|
||||
* defined in <http://www.w3.org/TR/CSS2/syndata.html#charset>.
|
||||
*
|
||||
* @param string aString
|
||||
* Source of a CSS stylesheet, loaded from file or cache.
|
||||
* @param string aChannelCharset
|
||||
* Charset of the source string if set by the HTTP channel.
|
||||
* @return string
|
||||
* The CSS string, in unicode.
|
||||
*/
|
||||
_decodeCSSCharset: function SE__decodeCSSCharset(aString, aChannelCharset)
|
||||
{
|
||||
// StyleSheet's charset can be specified from multiple sources
|
||||
|
||||
if (aChannelCharset.length > 0) {
|
||||
// step 1 of syndata.html: charset given in HTTP header.
|
||||
return this._convertToUnicode(aString, aChannelCharset);
|
||||
}
|
||||
|
||||
let sheet = this.styleSheet;
|
||||
if (sheet) {
|
||||
// Do we have a @charset rule in the stylesheet?
|
||||
// step 2 of syndata.html (without the BOM check).
|
||||
if (sheet.cssRules) {
|
||||
let rules = sheet.cssRules;
|
||||
if (rules.length
|
||||
&& rules.item(0).type == Ci.nsIDOMCSSRule.CHARSET_RULE) {
|
||||
return this._convertToUnicode(aString, rules.item(0).encoding);
|
||||
}
|
||||
}
|
||||
|
||||
if (sheet.ownerNode) {
|
||||
// step 3: see <link charset="…">
|
||||
let linkCharset = sheet.ownerNode.getAttribute("charset");
|
||||
if (linkCharset != null) {
|
||||
return this._convertToUnicode(aString, linkCharset);
|
||||
}
|
||||
}
|
||||
|
||||
// step 4 (1 of 2): charset of referring stylesheet.
|
||||
let parentSheet = sheet.parentStyleSheet;
|
||||
if (parentSheet && parentSheet.cssRules &&
|
||||
parentSheet.cssRules[0].type == Ci.nsIDOMCSSRule.CHARSET_RULE) {
|
||||
return this._convertToUnicode(aString,
|
||||
parentSheet.cssRules[0].encoding);
|
||||
}
|
||||
|
||||
// step 4 (2 of 2): charset of referring document.
|
||||
if (sheet.ownerNode && sheet.ownerNode.ownerDocument.characterSet) {
|
||||
return this._convertToUnicode(aString,
|
||||
sheet.ownerNode.ownerDocument.characterSet);
|
||||
}
|
||||
}
|
||||
|
||||
// step 5: default to utf-8.
|
||||
return this._convertToUnicode(aString, "UTF-8");
|
||||
},
|
||||
|
||||
/**
|
||||
* Convert a given string, encoded in a given character set, to unicode.
|
||||
* @param string aString
|
||||
* A string.
|
||||
* @param string aCharset
|
||||
* A character set.
|
||||
* @return string
|
||||
* A unicode string.
|
||||
*/
|
||||
_convertToUnicode: function SE__convertToUnicode(aString, aCharset) {
|
||||
// Decoding primitives.
|
||||
let converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"]
|
||||
.createInstance(Ci.nsIScriptableUnicodeConverter);
|
||||
|
||||
try {
|
||||
converter.charset = aCharset;
|
||||
return converter.ConvertToUnicode(aString);
|
||||
} catch(e) {
|
||||
return aString;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Load source from a file or file-like resource.
|
||||
*
|
||||
@ -790,6 +871,7 @@ StyleEditor.prototype = {
|
||||
{
|
||||
let channel = Services.io.newChannel(aHref, null, null);
|
||||
let chunks = [];
|
||||
let channelCharset = "";
|
||||
let streamListener = { // nsIStreamListener inherits nsIRequestObserver
|
||||
onStartRequest: function (aRequest, aContext, aStatusCode) {
|
||||
if (!Components.isSuccessCode(aStatusCode)) {
|
||||
@ -797,6 +879,10 @@ StyleEditor.prototype = {
|
||||
}
|
||||
}.bind(this),
|
||||
onDataAvailable: function (aRequest, aContext, aStream, aOffset, aCount) {
|
||||
let channel = aRequest.QueryInterface(Ci.nsIChannel);
|
||||
if (!channelCharset) {
|
||||
channelCharset = channel.contentCharset;
|
||||
}
|
||||
chunks.push(NetUtil.readInputStreamToString(aStream, aCount));
|
||||
},
|
||||
onStopRequest: function (aRequest, aContext, aStatusCode) {
|
||||
@ -804,7 +890,7 @@ StyleEditor.prototype = {
|
||||
return this._signalError(LOAD_ERROR);
|
||||
}
|
||||
|
||||
this._onSourceLoad(chunks.join(""));
|
||||
this._onSourceLoad(chunks.join(""), channelCharset);
|
||||
}.bind(this)
|
||||
};
|
||||
|
||||
@ -816,9 +902,14 @@ StyleEditor.prototype = {
|
||||
* Called when source has been loaded.
|
||||
*
|
||||
* @param string aSourceText
|
||||
* @param string aCharset
|
||||
* Optional. The character set to use. The default is to detect the
|
||||
* character set following the standard (see
|
||||
* <http://www.w3.org/TR/CSS2/syndata.html#charset>).
|
||||
*/
|
||||
_onSourceLoad: function SE__onSourceLoad(aSourceText)
|
||||
_onSourceLoad: function SE__onSourceLoad(aSourceText, aCharset)
|
||||
{
|
||||
aSourceText = this._decodeCSSCharset(aSourceText, aCharset || "");
|
||||
this._restoreExpando();
|
||||
this._state.text = prettifyCSS(aSourceText);
|
||||
this._loaded = true;
|
||||
|
@ -71,6 +71,10 @@ function testEditorAdded(aChrome, aEditor)
|
||||
|
||||
function testFirstStyleSheetEditor(aChrome, aEditor)
|
||||
{
|
||||
// Note: the html <link> contains charset="UTF-8".
|
||||
ok(aEditor._state.text.indexOf("\u263a") >= 0,
|
||||
"stylesheet is unicode-aware.");
|
||||
|
||||
//testing TESTCASE's simple.css stylesheet
|
||||
is(aEditor.styleSheetIndex, 0,
|
||||
"first stylesheet is at index 0");
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* vim: set ts=2 et sw=2 tw=80: */
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
/* ☺ */
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
|
@ -2,7 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>simple testcase</title>
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="simple.css"/>
|
||||
<link rel="stylesheet" charset="UTF-8" type="text/css" media="screen" href="simple.css"/>
|
||||
<style type="text/css">
|
||||
body {
|
||||
background: white;
|
||||
|
@ -562,7 +562,7 @@ CssHtmlTree.prototype = {
|
||||
|
||||
// Tidy up block headings by moving CSS property names and their values onto
|
||||
// the same line and inserting a colon between them.
|
||||
text = text.replace(/(.+)\r?\n\s+/g, "$1: ");
|
||||
text = text.replace(/\t(.+)\t\t(.+)/g, "$1: $2");
|
||||
|
||||
// Remove any MDN link titles
|
||||
text = text.replace(CssHtmlTree.HELP_LINK_TITLE, "");
|
||||
@ -866,9 +866,9 @@ PropertyView.prototype = {
|
||||
this.element = doc.createElementNS(HTML_NS, "tr");
|
||||
this.element.setAttribute("class", this.propertyHeaderClassName);
|
||||
|
||||
this.propertyHeader = doc.createElementNS(HTML_NS, "td");
|
||||
this.element.appendChild(this.propertyHeader);
|
||||
this.propertyHeader.setAttribute("class", "property-header");
|
||||
this.expanderContainer = doc.createElementNS(HTML_NS, "td");
|
||||
this.element.appendChild(this.expanderContainer);
|
||||
this.expanderContainer.setAttribute("class", "expander-container");
|
||||
|
||||
this.matchedExpander = doc.createElementNS(HTML_NS, "div");
|
||||
this.matchedExpander.setAttribute("class", "match expander");
|
||||
@ -885,10 +885,10 @@ PropertyView.prototype = {
|
||||
this.matchedExpanderClick(aEvent);
|
||||
}
|
||||
}.bind(this), false);
|
||||
this.propertyHeader.appendChild(this.matchedExpander);
|
||||
this.expanderContainer.appendChild(this.matchedExpander);
|
||||
|
||||
this.nameNode = doc.createElementNS(HTML_NS, "div");
|
||||
this.propertyHeader.appendChild(this.nameNode);
|
||||
this.nameNode = doc.createElementNS(HTML_NS, "td");
|
||||
this.element.appendChild(this.nameNode);
|
||||
this.nameNode.setAttribute("class", "property-name");
|
||||
this.nameNode.textContent = this.name;
|
||||
this.nameNode.addEventListener("click", function(aEvent) {
|
||||
|
@ -112,10 +112,10 @@ function checkCopySelection()
|
||||
|
||||
let range = document.createRange();
|
||||
range.setStart(props[0], 0);
|
||||
range.setEnd(props[3], 3);
|
||||
range.setEnd(props[3], 4);
|
||||
contentWindow.getSelection().addRange(range);
|
||||
|
||||
info("Checking that cssHtmlTree.siBoundCopyPropertyValue() " +
|
||||
info("Checking that cssHtmlTree.siBoundCopy() " +
|
||||
" returns the correct clipboard value");
|
||||
|
||||
let expectedPattern = "color: rgb\\(255, 255, 0\\)[\\r\\n]+" +
|
||||
|
@ -37,17 +37,11 @@ function test()
|
||||
{
|
||||
addTab(TEST_URI);
|
||||
|
||||
let initialLoad = true;
|
||||
|
||||
browser.addEventListener("load", function onLoad() {
|
||||
if (initialLoad) {
|
||||
openConsole(null, function() {
|
||||
HUDService.lastFinishedRequestCallback = performTest;
|
||||
content.location.reload();
|
||||
});
|
||||
initialLoad = false;
|
||||
} else {
|
||||
browser.removeEventListener("load", onLoad, true);
|
||||
}
|
||||
browser.removeEventListener("load", onLoad, true);
|
||||
openConsole(null, function() {
|
||||
HUDService.lastFinishedRequestCallback = performTest;
|
||||
content.location.reload();
|
||||
});
|
||||
}, true);
|
||||
}
|
||||
|
@ -350,11 +350,11 @@ dbgStepManual=Commands to step in, out and over lines of code
|
||||
dbgStepOverDesc=Executes the current statement and then stops at the next statement. If the current statement is a function call then the debugger executes the whole function, and it stops at the next statement after the function call
|
||||
|
||||
# LOCALIZATION NOTE (dbgStepInDesc) A very short string used to describe the
|
||||
# function of the dbg step over command.
|
||||
# function of the dbg step in command.
|
||||
dbgStepInDesc=Executes the current statement and then stops at the next statement. If the current statement is a function call, then the debugger steps into that function, otherwise it stops at the next statement
|
||||
|
||||
# LOCALIZATION NOTE (dbgStepOutDesc) A very short string used to describe the
|
||||
# function of the dbg step over command.
|
||||
# function of the dbg step out command.
|
||||
dbgStepOutDesc=Steps out of the current function and up one level if the function is nested. If in the main body, the script is executed to the end, or to the next breakpoint. The skipped statements are executed, but not stepped through
|
||||
|
||||
# LOCALIZATION NOTE (consolecloseDesc) A very short description of the
|
||||
@ -609,7 +609,7 @@ pagemodRemoveElementResultMatchedAndRemovedElements=Elements matched by selector
|
||||
# 'pagemod remove attribute' command. This string is designed to be shown in
|
||||
# a menu alongside the command name, which is why it should be as short as
|
||||
# possible.
|
||||
pagemodRemoveAttributeDesc=Remove matching atributes
|
||||
pagemodRemoveAttributeDesc=Remove matching attributes
|
||||
|
||||
# LOCALIZATION NOTE (pagemodRemoveAttributeSearchAttributesDesc) A very short
|
||||
# string to describe the 'searchAttributes' parameter to the 'pagemod remove
|
||||
|
@ -2602,6 +2602,7 @@ stack[anonid=browserStack][responsivemode] {
|
||||
text-shadow: none;
|
||||
background-image: -moz-linear-gradient(top, #B4211B, #8A1915);
|
||||
border-radius: 1px;
|
||||
-moz-margin-end: 2px;
|
||||
}
|
||||
|
||||
#social-toolbar-button {
|
||||
|
@ -8,12 +8,6 @@
|
||||
color: -moz-FieldText;
|
||||
}
|
||||
|
||||
.property-header {
|
||||
padding: 5px 0;
|
||||
white-space: nowrap;
|
||||
vertical-align: text-top;
|
||||
}
|
||||
|
||||
/* Take away these two :visited rules to get a core dumper */
|
||||
/* See https://bugzilla.mozilla.org/show_bug.cgi?id=575675#c30 */
|
||||
.link,
|
||||
@ -53,7 +47,6 @@
|
||||
-moz-appearance: treetwisty;
|
||||
padding-top: 12px;
|
||||
-moz-margin-start: 5px;
|
||||
-moz-margin-end: 5px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
@ -70,15 +63,19 @@
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.expander-container {
|
||||
vertical-align: text-top;
|
||||
}
|
||||
|
||||
.property-name {
|
||||
font-size: 12px;
|
||||
padding: 2px 0;
|
||||
color: -moz-FieldText;
|
||||
}
|
||||
|
||||
.property-value {
|
||||
padding: 0;
|
||||
font-size: 10px;
|
||||
-moz-padding-end: 6px;
|
||||
color: grey;
|
||||
vertical-align: text-top;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
@ -8,12 +8,6 @@
|
||||
color: -moz-FieldText;
|
||||
}
|
||||
|
||||
.property-header {
|
||||
padding: 5px 0;
|
||||
white-space: nowrap;
|
||||
vertical-align: text-top;
|
||||
}
|
||||
|
||||
/* Take away these two :visited rules to get a core dumper */
|
||||
/* See https://bugzilla.mozilla.org/show_bug.cgi?id=575675#c30 */
|
||||
.link,
|
||||
@ -55,7 +49,6 @@
|
||||
height: 12px;
|
||||
padding-top: 12px;
|
||||
-moz-margin-start: 5px;
|
||||
-moz-margin-end: 5px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
@ -72,15 +65,19 @@
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.expander-container {
|
||||
vertical-align: text-top;
|
||||
}
|
||||
|
||||
.property-name {
|
||||
font-size: 12px;
|
||||
padding: 2px 0;
|
||||
color: -moz-FieldText;
|
||||
}
|
||||
|
||||
.property-value {
|
||||
padding: 0;
|
||||
font-size: 10px;
|
||||
-moz-padding-end: 6px;
|
||||
color: grey;
|
||||
vertical-align: text-top;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
@ -8,12 +8,6 @@
|
||||
color: -moz-FieldText;
|
||||
}
|
||||
|
||||
.property-header {
|
||||
padding: 5px 0;
|
||||
white-space: nowrap;
|
||||
vertical-align: text-top;
|
||||
}
|
||||
|
||||
/* Take away these two :visited rules to get a core dumper */
|
||||
/* See https://bugzilla.mozilla.org/show_bug.cgi?id=575675#c30 */
|
||||
.link,
|
||||
@ -71,15 +65,19 @@
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.expander-container {
|
||||
vertical-align: text-top;
|
||||
}
|
||||
|
||||
.property-name {
|
||||
font-size: 12px;
|
||||
padding: 2px 0;
|
||||
color: -moz-FieldText;
|
||||
}
|
||||
|
||||
.property-value {
|
||||
padding: 0;
|
||||
font-size: 10px;
|
||||
-moz-padding-end: 6px;
|
||||
color: grey;
|
||||
vertical-align: text-top;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user