|
@@ -0,0 +1,159 @@
|
|
|
+# HG changeset patch
|
|
|
+# User Ian Neal <iann_cvs@blueyonder.co.uk>
|
|
|
+# Date 1727009005 -3600
|
|
|
+# Parent f8d1643b824e14182d3235acdf11c044651ed093
|
|
|
+Bug 1920367 - Remove use of nsIAtomService from DOMi. r=frg a=frg
|
|
|
+
|
|
|
+diff --git a/suite/extensions/inspector/resources/content/jsutil/xul/inBaseTreeView.js b/suite/extensions/inspector/resources/content/jsutil/xul/inBaseTreeView.js
|
|
|
+--- a/suite/extensions/inspector/resources/content/jsutil/xul/inBaseTreeView.js
|
|
|
++++ b/suite/extensions/inspector/resources/content/jsutil/xul/inBaseTreeView.js
|
|
|
+@@ -40,30 +40,16 @@ inBaseTreeView.prototype =
|
|
|
+ cycleCell: function(aRow, aCol) {},
|
|
|
+ isEditable: function(aRow, aCol) {},
|
|
|
+ isSelectable: function(aRow, aCol) {},
|
|
|
+ setCellValue: function(aRow, aCol, aValue) {},
|
|
|
+ setCellText: function(aRow, aCol, aValue) {},
|
|
|
+ performAction: function(aAction) {},
|
|
|
+ performActionOnRow: function(aAction, aRow) {},
|
|
|
+ performActionOnCell: function(aAction, aRow, aCol) {},
|
|
|
+-
|
|
|
+-
|
|
|
+- // extra utility stuff
|
|
|
+-
|
|
|
+- createAtom: function createAtom(aVal)
|
|
|
+- {
|
|
|
+- try {
|
|
|
+- var i = Components.interfaces.nsIAtomService;
|
|
|
+- var svc = Components.classes["@mozilla.org/atom-service;1"].getService(i);
|
|
|
+- return svc.getAtom(aVal);
|
|
|
+- } catch(ex) {
|
|
|
+- return null;
|
|
|
+- }
|
|
|
+- },
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Returns an array of selected indices in the tree.
|
|
|
+ * @return an array of indices
|
|
|
+ */
|
|
|
+ getSelectedIndices: function getSelectedIndices()
|
|
|
+ {
|
|
|
+ var indices = [];
|
|
|
+diff --git a/suite/extensions/inspector/resources/content/viewers/accessibleEvents/accessibleEvents.js b/suite/extensions/inspector/resources/content/viewers/accessibleEvents/accessibleEvents.js
|
|
|
+--- a/suite/extensions/inspector/resources/content/viewers/accessibleEvents/accessibleEvents.js
|
|
|
++++ b/suite/extensions/inspector/resources/content/viewers/accessibleEvents/accessibleEvents.js
|
|
|
+@@ -1082,36 +1082,30 @@ function inAccTreeView(aAccessible, aHig
|
|
|
+ this.expandNodes(list);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ inAccTreeView.prototype = new inDataTreeView();
|
|
|
+
|
|
|
+ // nsITreeView
|
|
|
+ inAccTreeView.prototype.getRowProperties =
|
|
|
+- function inAccTreeView_getRowProperties(aRowIdx, aProperties)
|
|
|
++ function inAccTreeView_getRowProperties(aRowIdx)
|
|
|
+ {
|
|
|
+ var data = this.getDataAt(aRowIdx);
|
|
|
+ if (data && data.properties) {
|
|
|
+- if (!aProperties)
|
|
|
+- return data.properties.join(" ");
|
|
|
+-
|
|
|
+- for (let i = 0; i < data.properties.length; i++) {
|
|
|
+- var atom = this.createAtom(data.properties[i]);
|
|
|
+- aProperties.AppendElement(atom);
|
|
|
+- }
|
|
|
++ return data.properties.join(" ");
|
|
|
+ }
|
|
|
+
|
|
|
+ return "";
|
|
|
+ };
|
|
|
+
|
|
|
+ inAccTreeView.prototype.getCellProperties =
|
|
|
+- function inAccTreeView_getCellProperties(aRowIdx, aCol, aProperties)
|
|
|
+-{
|
|
|
+- return this.getRowProperties(aRowIdx, aProperties);
|
|
|
++ function inAccTreeView_getCellProperties(aRowIdx, aCol)
|
|
|
++{
|
|
|
++ return this.getRowProperties(aRowIdx);
|
|
|
+ };
|
|
|
+
|
|
|
+ // Initialization
|
|
|
+ inAccTreeView.prototype.generateChildren =
|
|
|
+ function inAccTreeView_generateChildren(aAccessible, aHighlightList, aParent,
|
|
|
+ aIsUnattached)
|
|
|
+ {
|
|
|
+ var data = {
|
|
|
+diff --git a/suite/extensions/inspector/resources/content/viewers/accessibleTree/accessibleTree.js b/suite/extensions/inspector/resources/content/viewers/accessibleTree/accessibleTree.js
|
|
|
+--- a/suite/extensions/inspector/resources/content/viewers/accessibleTree/accessibleTree.js
|
|
|
++++ b/suite/extensions/inspector/resources/content/viewers/accessibleTree/accessibleTree.js
|
|
|
+@@ -299,34 +299,30 @@ function toggleOpenState(aRow)
|
|
|
+ else
|
|
|
+ this.expandNode(aRow);
|
|
|
+
|
|
|
+ this.mTree.invalidateRow(aRow);
|
|
|
+ this.mTree.rowCountChanged(aRow + 1, this.rowCount - oldCount);
|
|
|
+ }
|
|
|
+
|
|
|
+ inAccTreeView.prototype.getRowProperties =
|
|
|
+-function getRowProperties(aRowIdx, aProperties)
|
|
|
++function getRowProperties(aRowIdx)
|
|
|
+ {
|
|
|
+ var node = this.rowToNode(aRowIdx);
|
|
|
+ if (node && node.highlighted) {
|
|
|
+- if (!aProperties)
|
|
|
+- return "highlight";
|
|
|
+-
|
|
|
+- let atom = this.createAtom("highlight");
|
|
|
+- aProperties.AppendElement(atom);
|
|
|
++ return "highlight";
|
|
|
+ }
|
|
|
+
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+
|
|
|
+ inAccTreeView.prototype.getCellProperties =
|
|
|
+-function getCellProperties(aRowIdx, aCol, aProperties)
|
|
|
+-{
|
|
|
+- return this.getRowProperties(aRowIdx, aProperties);
|
|
|
++function getCellProperties(aRowIdx, aCol)
|
|
|
++{
|
|
|
++ return this.getRowProperties(aRowIdx);
|
|
|
+ }
|
|
|
+
|
|
|
+ ///////////////////////////////////////////////////////////////////////////////
|
|
|
+ //// inAccTreeView. Public.
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Destroy the view.
|
|
|
+ */
|
|
|
+diff --git a/suite/extensions/inspector/resources/content/viewers/styleRules/styleRules.js b/suite/extensions/inspector/resources/content/viewers/styleRules/styleRules.js
|
|
|
+--- a/suite/extensions/inspector/resources/content/viewers/styleRules/styleRules.js
|
|
|
++++ b/suite/extensions/inspector/resources/content/viewers/styleRules/styleRules.js
|
|
|
+@@ -573,25 +573,22 @@ function StylePropsView(aDec)
|
|
|
+ StylePropsView.prototype = new inBaseTreeView();
|
|
|
+
|
|
|
+ StylePropsView.prototype.__defineGetter__("rowCount", function()
|
|
|
+ {
|
|
|
+ return this.mDec ? this.mDec.length : 0;
|
|
|
+ });
|
|
|
+
|
|
|
+ StylePropsView.prototype.getCellProperties =
|
|
|
+- function SPV_GetCellProperties(aRow, aCol, aProperties)
|
|
|
++ function SPV_GetCellProperties(aRow, aCol)
|
|
|
+ {
|
|
|
+ if (aCol.id == "olcPropPriority") {
|
|
|
+ var prop = this.mDec.item(aRow);
|
|
|
+ if (this.mDec.getPropertyPriority(prop) == "important") {
|
|
|
+- if (!aProperties)
|
|
|
+- return "important";
|
|
|
+-
|
|
|
+- aProperties.AppendElement(this.createAtom("important"));
|
|
|
++ return "important";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+
|
|
|
+ StylePropsView.prototype.getCellText = function SPV_GetCellText(aRow, aCol)
|
|
|
+ {
|