mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 23:38:38 +09:00
Issue #2472 - Part 5: Make modal versions of <dialog> work, and tune styles.
This adds a pseudo-class `:-moz-modal-dialog` to be able to track whether the dialog is in the top layer in CSS. This implements default styling for modal dialogs following the HTML standard. Slightly off-extreme color scheme chosen for unstyled <dialog> elements.
This commit is contained in:
parent
7a04afab4a
commit
7d34b285e0
5 changed files with 57 additions and 4 deletions
|
|
@ -41,10 +41,14 @@ public:
|
|||
{
|
||||
mReturnValue = aReturnValue;
|
||||
}
|
||||
|
||||
void UnbindFromTree(bool aNullParent = true) /*override*/;
|
||||
|
||||
void Close(const mozilla::dom::Optional<nsAString>& aReturnValue);
|
||||
void Show();
|
||||
void ShowModal(ErrorResult& aError);
|
||||
|
||||
bool IsInTopLayer() const;
|
||||
|
||||
nsString mReturnValue;
|
||||
|
||||
|
|
@ -52,6 +56,9 @@ protected:
|
|||
virtual ~HTMLDialogElement();
|
||||
JSObject* WrapNode(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aGivenProto) override;
|
||||
|
||||
private:
|
||||
void RemoveFromTopLayerIfNeeded();
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue