Bug 1784265 - Remove XULElement.flex WebIDL API. r=mconley

It's basically an alias of setAttribute("flex", value), and it has no
remaining usage in the tree.

Since it's less useful now, let's remove the WebIDL API in favor of CSS.

Do this as a separate patch so that thunderbird / pine / etc can revert
this patch for diagnostics / to find UI with behavior changes.

Differential Revision: https://phabricator.services.mozilla.com/D154498
This commit is contained in:
Emilio Cobos Álvarez 2022-08-12 23:13:41 +00:00
parent a7401488af
commit d73fb963b0
3 changed files with 0 additions and 29 deletions

View File

@ -11,10 +11,6 @@ interface XULControllers;
interface XULElement : Element {
[HTMLConstructor] constructor();
// Layout properties
[SetterThrows]
attribute DOMString flex;
// Properties for hiding elements.
attribute boolean hidden;
attribute boolean collapsed;

View File

@ -846,28 +846,6 @@ nsresult nsXULElement::AfterSetAttr(int32_t aNamespaceID, nsAtom* aName,
aSubjectPrincipal, aNotify);
}
void nsXULElement::GetFlex(DOMString& aValue) const {
#ifdef DEBUG
printf_stderr("\n");
ListAttributes(stderr);
xpc_DumpJSStack(true, true, false);
printf_stderr("\n");
MOZ_ASSERT_UNREACHABLE("XULElement.flex getter");
#endif
GetXULAttr(nsGkAtoms::flex, aValue);
}
void nsXULElement::SetFlex(const nsAString& aValue, ErrorResult& aRv) {
#ifdef DEBUG
printf_stderr("\n");
ListAttributes(stderr);
xpc_DumpJSStack(true, true, false);
printf_stderr("\n");
MOZ_ASSERT_UNREACHABLE("XULElement.flex setter");
#endif
SetXULAttr(nsGkAtoms::flex, aValue, aRv);
}
void nsXULElement::AddTooltipSupport() {
nsXULTooltipListener* listener = nsXULTooltipListener::GetInstance();
if (!listener) {

View File

@ -398,9 +398,6 @@ class nsXULElement : public nsStyledElement {
}
// WebIDL API
void GetFlex(DOMString& aValue) const;
void SetFlex(const nsAString& aValue, mozilla::ErrorResult&);
bool Hidden() const { return BoolAttrIsTrue(nsGkAtoms::hidden); }
void SetHidden(bool aHidden) { SetXULBoolAttr(nsGkAtoms::hidden, aHidden); }
bool Collapsed() const { return BoolAttrIsTrue(nsGkAtoms::collapsed); }