зеркало из https://github.com/mozilla/pjs.git
Make applet and embed elements focusable. Bug 257488, r=aaronl, sr=jst
This commit is contained in:
Родитель
86e40b2395
Коммит
fdbe2c6ead
|
@ -77,6 +77,11 @@ public:
|
||||||
virtual void DoneAddingChildren();
|
virtual void DoneAddingChildren();
|
||||||
virtual PRBool IsDoneAddingChildren();
|
virtual PRBool IsDoneAddingChildren();
|
||||||
|
|
||||||
|
// nsIContent
|
||||||
|
// Have to override tabindex for <embed> to act right
|
||||||
|
NS_IMETHOD GetTabIndex(PRInt32* aTabIndex);
|
||||||
|
NS_IMETHOD SetTabIndex(PRInt32 aTabIndex);
|
||||||
|
|
||||||
virtual PRBool ParseAttribute(nsIAtom* aAttribute,
|
virtual PRBool ParseAttribute(nsIAtom* aAttribute,
|
||||||
const nsAString& aValue,
|
const nsAString& aValue,
|
||||||
nsAttrValue& aResult);
|
nsAttrValue& aResult);
|
||||||
|
@ -143,7 +148,8 @@ NS_IMPL_STRING_ATTR(nsHTMLAppletElement, Name, name)
|
||||||
NS_IMPL_STRING_ATTR(nsHTMLAppletElement, Object, object)
|
NS_IMPL_STRING_ATTR(nsHTMLAppletElement, Object, object)
|
||||||
NS_IMPL_INT_ATTR(nsHTMLAppletElement, Vspace, vspace)
|
NS_IMPL_INT_ATTR(nsHTMLAppletElement, Vspace, vspace)
|
||||||
NS_IMPL_STRING_ATTR(nsHTMLAppletElement, Width, width)
|
NS_IMPL_STRING_ATTR(nsHTMLAppletElement, Width, width)
|
||||||
|
NS_IMPL_INT_ATTR_DEFAULT_VALUE(nsHTMLAppletElement, TabIndex, tabindex, 0)
|
||||||
|
|
||||||
PRBool
|
PRBool
|
||||||
nsHTMLAppletElement::ParseAttribute(nsIAtom* aAttribute,
|
nsHTMLAppletElement::ParseAttribute(nsIAtom* aAttribute,
|
||||||
const nsAString& aValue,
|
const nsAString& aValue,
|
||||||
|
|
|
@ -112,6 +112,11 @@ public:
|
||||||
// nsIDOMHTMLBaseFontElement
|
// nsIDOMHTMLBaseFontElement
|
||||||
NS_DECL_NSIDOMHTMLBASEFONTELEMENT
|
NS_DECL_NSIDOMHTMLBASEFONTELEMENT
|
||||||
|
|
||||||
|
// nsIContent
|
||||||
|
// Have to override tabindex for <embed> to act right
|
||||||
|
NS_IMETHOD GetTabIndex(PRInt32* aTabIndex);
|
||||||
|
NS_IMETHOD SetTabIndex(PRInt32 aTabIndex);
|
||||||
|
|
||||||
virtual PRBool ParseAttribute(nsIAtom* aAttribute,
|
virtual PRBool ParseAttribute(nsIAtom* aAttribute,
|
||||||
const nsAString& aValue,
|
const nsAString& aValue,
|
||||||
nsAttrValue& aResult);
|
nsAttrValue& aResult);
|
||||||
|
@ -206,6 +211,10 @@ NS_IMPL_STRING_ATTR(nsHTMLSharedElement, Color, color)
|
||||||
NS_IMPL_STRING_ATTR(nsHTMLSharedElement, Face, face)
|
NS_IMPL_STRING_ATTR(nsHTMLSharedElement, Face, face)
|
||||||
NS_IMPL_INT_ATTR(nsHTMLSharedElement, Size, size)
|
NS_IMPL_INT_ATTR(nsHTMLSharedElement, Size, size)
|
||||||
|
|
||||||
|
// TabIndex for embed
|
||||||
|
NS_IMPL_INT_ATTR_DEFAULT_VALUE(nsHTMLSharedElement, TabIndex, tabindex,
|
||||||
|
mNodeInfo->Equals(nsHTMLAtoms::embed) ? 0 : -1)
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsHTMLSharedElement::GetType(nsAString& aType)
|
nsHTMLSharedElement::GetType(nsAString& aType)
|
||||||
{
|
{
|
||||||
|
@ -242,8 +251,6 @@ nsHTMLSharedElement::GetForm(nsIDOMHTMLFormElement** aForm)
|
||||||
NS_IMPL_URI_ATTR(nsHTMLSharedElement, Href, href)
|
NS_IMPL_URI_ATTR(nsHTMLSharedElement, Href, href)
|
||||||
NS_IMPL_STRING_ATTR(nsHTMLSharedElement, Target, target)
|
NS_IMPL_STRING_ATTR(nsHTMLSharedElement, Target, target)
|
||||||
|
|
||||||
// spacer element code
|
|
||||||
|
|
||||||
PRBool
|
PRBool
|
||||||
nsHTMLSharedElement::ParseAttribute(nsIAtom* aAttribute,
|
nsHTMLSharedElement::ParseAttribute(nsIAtom* aAttribute,
|
||||||
const nsAString& aValue,
|
const nsAString& aValue,
|
||||||
|
@ -319,6 +326,8 @@ nsHTMLSharedElement::AttributeToString(nsIAtom* aAttribute,
|
||||||
return nsGenericHTMLElement::AttributeToString(aAttribute, aValue, aResult);
|
return nsGenericHTMLElement::AttributeToString(aAttribute, aValue, aResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// spacer element code
|
||||||
|
|
||||||
static void
|
static void
|
||||||
SpacerMapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
SpacerMapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||||
nsRuleData* aData)
|
nsRuleData* aData)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче