changed the way map attributes into is connected
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIHTMLAttributes.h"
|
||||
|
||||
// XXX nav4 has type= start= (same as OL/UL)
|
||||
|
||||
@@ -163,30 +164,39 @@ nsHTMLMenuElement::AttributeToString(nsIAtom* aAttribute,
|
||||
return mInner.AttributeToString(aAttribute, aValue, aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLMenuElement::MapAttributesInto(nsIStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
static void
|
||||
MapAttributesInto(nsIHTMLAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != mInner.mAttributes) {
|
||||
if (nsnull != aAttributes) {
|
||||
nsHTMLValue value;
|
||||
nsStyleList* list = (nsStyleList*)
|
||||
aContext->GetMutableStyleData(eStyleStruct_List);
|
||||
|
||||
// type: enum
|
||||
GetAttribute(nsHTMLAtoms::type, value);
|
||||
aAttributes->GetAttribute(nsHTMLAtoms::type, value);
|
||||
if (value.GetUnit() == eHTMLUnit_Enumerated) {
|
||||
list->mListStyleType = value.GetIntValue();
|
||||
}
|
||||
|
||||
// compact: empty
|
||||
GetAttribute(nsHTMLAtoms::compact, value);
|
||||
aAttributes->GetAttribute(nsHTMLAtoms::compact, value);
|
||||
if (value.GetUnit() == eHTMLUnit_Empty) {
|
||||
// XXX set
|
||||
}
|
||||
}
|
||||
return mInner.MapAttributesInto(aContext, aPresContext);
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLMenuElement::GetAttributeMappingFunction(nsMapAttributesFunc& aMapFunc) const
|
||||
{
|
||||
aMapFunc = &MapAttributesInto;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLMenuElement::HandleDOMEvent(nsIPresContext& aPresContext,
|
||||
nsEvent* aEvent,
|
||||
|
||||
Reference in New Issue
Block a user