Bug 1335191 - Remove support for the attributes "activetitlebarcolor" and "inactivetitlebarcolor" for XUL window elements. r=emilio

The last piece of code that was using these attributes was removed in
https://hg.mozilla.org/mozilla-central/rev/35b7fa5ebd58

MozReview-Commit-ID: FyF7kzlpqMz

--HG--
extra : rebase_source : edaf64a4be92be1f72ff67f90c03eed09173cce3
This commit is contained in:
Markus Stange 2018-03-24 01:14:23 -04:00
parent b16957ac94
commit ec65624c9e
3 changed files with 2 additions and 31 deletions

View File

@ -1111,24 +1111,11 @@ nsXULElement::AfterSetAttr(int32_t aNamespaceID, nsAtom* aName,
MaybeUpdatePrivateLifetime();
}
}
// title, (in)activetitlebarcolor and drawintitlebar are settable on
// title and drawintitlebar are settable on
// any root node (windows, dialogs, etc)
if (document && document->GetRootElement() == this) {
if (aName == nsGkAtoms::title) {
document->NotifyPossibleTitleChange(false);
} else if ((aName == nsGkAtoms::activetitlebarcolor ||
aName == nsGkAtoms::inactivetitlebarcolor)) {
nscolor color = NS_RGBA(0, 0, 0, 0);
if (aValue->Type() == nsAttrValue::eColor) {
aValue->GetColorValue(color);
} else {
nsAutoString tmp;
nsAttrValue attrValue;
aValue->ToString(tmp);
attrValue.ParseColor(tmp);
attrValue.GetColorValue(color);
}
SetTitlebarColor(color, aName == nsGkAtoms::activetitlebarcolor);
} else if (aName == nsGkAtoms::drawintitlebar) {
SetDrawsInTitlebar(
aValue->Equals(NS_LITERAL_STRING("true"), eCaseMatters));
@ -1168,11 +1155,7 @@ nsXULElement::AfterSetAttr(int32_t aNamespaceID, nsAtom* aName,
nsIDocument* doc = GetUncomposedDoc();
if (doc && doc->GetRootElement() == this) {
if ((aName == nsGkAtoms::activetitlebarcolor ||
aName == nsGkAtoms::inactivetitlebarcolor)) {
// Use 0, 0, 0, 0 as the "none" color.
SetTitlebarColor(NS_RGBA(0, 0, 0, 0), aName == nsGkAtoms::activetitlebarcolor);
} else if (aName == nsGkAtoms::localedir) {
if (aName == nsGkAtoms::localedir) {
// if the localedir changed on the root element, reset the document direction
XULDocument* xuldoc = doc->AsXULDocument();
if (xuldoc) {
@ -1815,15 +1798,6 @@ nsXULElement::GetWindowWidget()
return nullptr;
}
void
nsXULElement::SetTitlebarColor(nscolor aColor, bool aActive)
{
nsIWidget* mainWidget = GetWindowWidget();
if (mainWidget) {
mainWidget->SetWindowTitlebarColor(aColor, aActive);
}
}
class SetDrawInTitleBarEvent : public Runnable
{
public:

View File

@ -737,7 +737,6 @@ protected:
nsresult HideWindowChrome(bool aShouldHide);
void SetChromeMargins(const nsAttrValue* aValue);
void ResetChromeMargins();
void SetTitlebarColor(nscolor aColor, bool aActive);
void SetDrawsInTitlebar(bool aState);
void SetDrawsTitle(bool aState);

View File

@ -61,7 +61,6 @@ GK_ATOM(accesskey, "accesskey")
GK_ATOM(acronym, "acronym")
GK_ATOM(action, "action")
GK_ATOM(active, "active")
GK_ATOM(activetitlebarcolor, "activetitlebarcolor")
GK_ATOM(activateontab, "activateontab")
GK_ATOM(actuate, "actuate")
GK_ATOM(address, "address")
@ -560,7 +559,6 @@ GK_ATOM(img, "img")
GK_ATOM(implementation, "implementation")
GK_ATOM(implements, "implements")
GK_ATOM(import, "import")
GK_ATOM(inactivetitlebarcolor, "inactivetitlebarcolor")
GK_ATOM(include, "include")
GK_ATOM(includes, "includes")
GK_ATOM(increment, "increment")