mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 873712 - Add "overflowed" property to CustomizableUI widgets. r=Gijs.
This commit is contained in:
parent
bf6232e65b
commit
f16ec30a46
@ -851,6 +851,7 @@ let CustomizableUIInternal = {
|
||||
node.setAttribute("disabled", true);
|
||||
}
|
||||
node.setAttribute("removable", aWidget.removable);
|
||||
node.setAttribute("nooverflow", aWidget.nooverflow);
|
||||
node.setAttribute("label", this.getLocalizedProperty(aWidget, "label"));
|
||||
node.setAttribute("tooltiptext", this.getLocalizedProperty(aWidget, "tooltiptext"));
|
||||
//XXXunf Need to hook this up to a <key> element or something.
|
||||
@ -1467,6 +1468,7 @@ let CustomizableUIInternal = {
|
||||
instances: new Map(),
|
||||
currentArea: null,
|
||||
removable: false,
|
||||
nooverflow: false,
|
||||
defaultArea: null,
|
||||
allowedAreas: [],
|
||||
shortcut: null,
|
||||
@ -1496,7 +1498,7 @@ let CustomizableUIInternal = {
|
||||
}
|
||||
}
|
||||
|
||||
const kOptBoolProps = ["removable", "showInPrivateBrowsing"]
|
||||
const kOptBoolProps = ["removable", "showInPrivateBrowsing", "nooverflow"]
|
||||
for (let prop of kOptBoolProps) {
|
||||
if (typeof aData[prop] == "boolean") {
|
||||
widget[prop] = aData[prop];
|
||||
@ -2079,6 +2081,9 @@ function WidgetSingleWrapper(aWidget, aNode) {
|
||||
return aNode.getAttribute("customizableui-areatype") || "";
|
||||
});
|
||||
|
||||
this.__defineGetter__("overflowed", function() {
|
||||
return aNode.classList.contains("overflowedItem");
|
||||
});
|
||||
|
||||
Object.freeze(this);
|
||||
}
|
||||
@ -2149,6 +2154,10 @@ function XULWidgetSingleWrapper(aWidgetId, aNode) {
|
||||
return aNode.getAttribute("customizableui-areatype") || "";
|
||||
});
|
||||
|
||||
this.__defineGetter__("overflowed", function() {
|
||||
return aNode.classList.contains("overflowedItem");
|
||||
});
|
||||
|
||||
Object.freeze(this);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user