зеркало из https://github.com/mozilla/gecko-dev.git
Bug 421351 - allow styling richlistitems with -moz-appearance:menuitem. r=neil
This commit is contained in:
Родитель
b4a8660825
Коммит
54947fe13c
|
@ -565,20 +565,6 @@
|
|||
]]>
|
||||
</setter>
|
||||
</property>
|
||||
|
||||
<property name="selected" onget="return this.getAttribute('selected') == 'true';">
|
||||
<setter><![CDATA[
|
||||
if (val) {
|
||||
this.setAttribute("selected", "true");
|
||||
this.setAttribute("_moz-menuactive", "true");
|
||||
} else {
|
||||
this.removeAttribute("selected");
|
||||
this.removeAttribute("_moz-menuactive");
|
||||
}
|
||||
|
||||
return val;
|
||||
]]></setter>
|
||||
</property>
|
||||
</implementation>
|
||||
</binding>
|
||||
</bindings>
|
||||
|
|
|
@ -387,6 +387,11 @@ nsNativeThemeWin::StandardGetState(nsIFrame* aFrame, PRUint8 aWidgetType,
|
|||
PRBool
|
||||
nsNativeThemeWin::IsMenuActive(nsIFrame *aFrame, PRUint8 aWidgetType)
|
||||
{
|
||||
nsIContent* content = aFrame->GetContent();
|
||||
if (content->IsNodeOfType(nsINode::eXUL) &&
|
||||
content->NodeInfo()->Equals(nsWidgetAtoms::richlistitem))
|
||||
return CheckBooleanAttr(aFrame, nsWidgetAtoms::selected);
|
||||
|
||||
return CheckBooleanAttr(aFrame, nsWidgetAtoms::mozmenuactive);
|
||||
}
|
||||
|
||||
|
|
|
@ -105,6 +105,7 @@ WIDGET_ATOM(parentfocused, "parentfocused")
|
|||
WIDGET_ATOM(radio, "radio")
|
||||
WIDGET_ATOM(readonly, "readonly")
|
||||
WIDGET_ATOM(Reload, "Reload")
|
||||
WIDGET_ATOM(richlistitem, "richlistitem")
|
||||
WIDGET_ATOM(sbattr, "sbattr")
|
||||
WIDGET_ATOM(scrollbarFrame, "ScrollbarFrame")
|
||||
WIDGET_ATOM(scrollbarDownBottom, "scrollbar-down-bottom")
|
||||
|
|
Загрузка…
Ссылка в новой задаче