зеркало из https://github.com/mozilla/gecko-dev.git
Bug 339287, support accesskey attribute, p=surkov, r=me+mats, sr=jst
This commit is contained in:
Родитель
77122f5c9c
Коммит
aec6ee9631
|
@ -63,8 +63,8 @@ class nsIDocShell;
|
|||
|
||||
// IID for the nsIContent interface
|
||||
#define NS_ICONTENT_IID \
|
||||
{ 0x53a5757c, 0xf602, 0x41ee, \
|
||||
{ 0xac, 0x55, 0xfc, 0x3c, 0x89, 0x4e, 0xb8, 0x97 } }
|
||||
{ 0xb6408b0, 0x20c6, 0x4d60, \
|
||||
{ 0xb7, 0x2f, 0x90, 0xb7, 0x7a, 0x9d, 0xb9, 0xb6 } }
|
||||
|
||||
|
||||
// hack to make egcs / gcc 2.95.2 happy
|
||||
|
@ -496,6 +496,19 @@ public:
|
|||
return PR_FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* The method focuses (or activates) element that accesskey is bound to. It is
|
||||
* called when accesskey is activated.
|
||||
*
|
||||
* @param aKeyCausesActivation - if true then element should be activated
|
||||
* @param aIsTrustedEvent - if true then event that is cause of accesskey
|
||||
* execution is trusted.
|
||||
*/
|
||||
virtual void PerformAccesskey(PRBool aKeyCausesActivation,
|
||||
PRBool aIsTrustedEvent)
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* Get desired IME state for the content.
|
||||
*
|
||||
|
|
|
@ -1185,93 +1185,14 @@ nsEventStateManager::HandleAccessKey(nsPresContext* aPresContext,
|
|||
|
||||
nsVoidKey key(NS_INT32_TO_PTR(accKey));
|
||||
if (mAccessKeys->Exists(&key)) {
|
||||
nsCOMPtr<nsIContent> content = dont_AddRef(NS_STATIC_CAST(nsIContent*, mAccessKeys->Get(&key)));
|
||||
|
||||
// if it's a XUL element...
|
||||
if (content->IsNodeOfType(nsINode::eXUL)) {
|
||||
// find out what type of content node this is
|
||||
if (content->Tag() == nsGkAtoms::label) {
|
||||
// If anything fails, this will be null ...
|
||||
nsCOMPtr<nsIDOMElement> element;
|
||||
|
||||
nsAutoString control;
|
||||
content->GetAttr(kNameSpaceID_None, nsGkAtoms::control, control);
|
||||
if (!control.IsEmpty()) {
|
||||
nsCOMPtr<nsIDOMDocument> domDocument =
|
||||
do_QueryInterface(content->GetDocument());
|
||||
if (domDocument)
|
||||
domDocument->GetElementById(control, getter_AddRefs(element));
|
||||
}
|
||||
// ... that here we'll either change |content| to the element
|
||||
// referenced by |element|, or clear it.
|
||||
content = do_QueryInterface(element);
|
||||
}
|
||||
|
||||
if (!content)
|
||||
return;
|
||||
|
||||
nsIFrame* frame = aPresContext->PresShell()->GetPrimaryFrameFor(content);
|
||||
|
||||
if (frame) {
|
||||
const nsStyleVisibility* vis = frame->GetStyleVisibility();
|
||||
PRBool viewShown = frame->AreAncestorViewsVisible();
|
||||
|
||||
// get the XUL element
|
||||
nsCOMPtr<nsIDOMXULElement> element = do_QueryInterface(content);
|
||||
|
||||
// if collapsed or hidden, we don't get tabbed into.
|
||||
if (viewShown &&
|
||||
vis->mVisible != NS_STYLE_VISIBILITY_COLLAPSE &&
|
||||
vis->mVisible != NS_STYLE_VISIBILITY_HIDDEN &&
|
||||
element) {
|
||||
|
||||
// find out what type of content node this is
|
||||
nsIAtom *atom = content->Tag();
|
||||
|
||||
// define behavior for each type of XUL element:
|
||||
if (atom == nsGkAtoms::textbox || atom == nsGkAtoms::menulist) {
|
||||
// if it's a text box or menulist, give it focus
|
||||
element->Focus();
|
||||
} else if (atom == nsGkAtoms::toolbarbutton) {
|
||||
// if it's a toolbar button, just click
|
||||
element->Click();
|
||||
} else {
|
||||
// otherwise, focus and click in it
|
||||
element->Focus();
|
||||
element->Click();
|
||||
}
|
||||
}
|
||||
}
|
||||
} else { // otherwise, it must be HTML
|
||||
// It's hard to say what HTML4 wants us to do in all cases.
|
||||
// So for now we'll settle for A) Set focus (except for <label>s
|
||||
// which focus their control in nsHTMLLabelElement::PostHandleEvent)
|
||||
if (content->Tag() != nsGkAtoms::label || !sKeyCausesActivation) {
|
||||
ChangeFocusWith(content, eEventFocusedByKey);
|
||||
}
|
||||
if (sKeyCausesActivation) {
|
||||
// B) Click on it if the users prefs indicate to do so.
|
||||
|
||||
// Propagate trusted state to the new event.
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
nsMouseEvent event(NS_IS_TRUSTED_EVENT(aEvent), NS_MOUSE_CLICK,
|
||||
nsnull, nsMouseEvent::eReal);
|
||||
|
||||
nsAutoPopupStatePusher popupStatePusher(NS_IS_TRUSTED_EVENT(aEvent) ?
|
||||
openAllowed : openAbused);
|
||||
|
||||
nsCOMPtr<nsIContent> oldTargetContent = mCurrentTargetContent;
|
||||
mCurrentTargetContent = content;
|
||||
nsEventDispatcher::Dispatch(content, mPresContext, &event, nsnull,
|
||||
&status);
|
||||
mCurrentTargetContent = oldTargetContent;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIContent> content =
|
||||
dont_AddRef(NS_STATIC_CAST(nsIContent*, mAccessKeys->Get(&key)));
|
||||
content->PerformAccesskey(sKeyCausesActivation,
|
||||
NS_IS_TRUSTED_EVENT(aEvent));
|
||||
*aStatus = nsEventStatus_eConsumeNoDefault;
|
||||
}
|
||||
}
|
||||
|
||||
// after the local accesskey handling
|
||||
if (nsEventStatus_eConsumeNoDefault != *aStatus) {
|
||||
// checking all sub docshells
|
||||
|
|
|
@ -3324,6 +3324,33 @@ nsGenericHTMLElement::RegUnRegAccessKey(PRBool aDoReg)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsGenericHTMLElement::PerformAccesskey(PRBool aKeyCausesActivation,
|
||||
PRBool aIsTrustedEvent)
|
||||
{
|
||||
nsPresContext *presContext = GetPresContext();
|
||||
if (!presContext)
|
||||
return;
|
||||
|
||||
nsIEventStateManager *esm = presContext->EventStateManager();
|
||||
if (!esm)
|
||||
return;
|
||||
|
||||
// It's hard to say what HTML4 wants us to do in all cases.
|
||||
esm->ChangeFocusWith(this, nsIEventStateManager::eEventFocusedByKey);
|
||||
|
||||
if (aKeyCausesActivation) {
|
||||
// Click on it if the users prefs indicate to do so.
|
||||
nsMouseEvent event(aIsTrustedEvent, NS_MOUSE_CLICK,
|
||||
nsnull, nsMouseEvent::eReal);
|
||||
|
||||
nsAutoPopupStatePusher popupStatePusher(aIsTrustedEvent ?
|
||||
openAllowed : openAbused);
|
||||
|
||||
nsEventDispatcher::Dispatch(this, presContext, &event);
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
nsresult
|
||||
nsGenericHTMLElement::SetProtocolInHrefString(const nsAString &aHref,
|
||||
|
|
|
@ -192,6 +192,8 @@ public:
|
|||
virtual PRBool IsNodeOfType(PRUint32 aFlags) const;
|
||||
virtual void RemoveFocus(nsPresContext *aPresContext);
|
||||
virtual PRBool IsFocusable(PRInt32 *aTabIndex = nsnull);
|
||||
virtual void PerformAccesskey(PRBool aKeyCausesActivation,
|
||||
PRBool aIsTrustedEvent);
|
||||
|
||||
nsresult PostHandleEventForAnchors(nsEventChainPostVisitor& aVisitor);
|
||||
PRBool IsHTMLLink(nsIURI** aURI) const;
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
#include "nsGUIEvent.h"
|
||||
#include "nsIEventStateManager.h"
|
||||
#include "nsEventDispatcher.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
|
||||
class nsHTMLLabelElement : public nsGenericHTMLFormElement,
|
||||
public nsIDOMHTMLLabelElement
|
||||
|
@ -101,6 +102,8 @@ public:
|
|||
PRBool aNotify);
|
||||
virtual nsresult UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
|
||||
PRBool aNotify);
|
||||
virtual void PerformAccesskey(PRBool aKeyCausesActivation,
|
||||
PRBool aIsTrustedEvent);
|
||||
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
|
||||
|
||||
protected:
|
||||
|
@ -318,6 +321,31 @@ nsHTMLLabelElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
|
|||
return nsGenericHTMLElement::UnsetAttr(aNameSpaceID, aAttribute, aNotify);
|
||||
}
|
||||
|
||||
void
|
||||
nsHTMLLabelElement::PerformAccesskey(PRBool aKeyCausesActivation,
|
||||
PRBool aIsTrustedEvent)
|
||||
{
|
||||
if (!aKeyCausesActivation) {
|
||||
nsCOMPtr<nsIContent> content = GetForContent();
|
||||
if (content)
|
||||
content->PerformAccesskey(aKeyCausesActivation, aIsTrustedEvent);
|
||||
} else {
|
||||
nsPresContext *presContext = GetPresContext();
|
||||
if (!presContext)
|
||||
return;
|
||||
|
||||
// Click on it if the users prefs indicate to do so.
|
||||
nsMouseEvent event(aIsTrustedEvent, NS_MOUSE_CLICK,
|
||||
nsnull, nsMouseEvent::eReal);
|
||||
|
||||
nsAutoPopupStatePusher popupStatePusher(aIsTrustedEvent ?
|
||||
openAllowed : openAbused);
|
||||
|
||||
nsEventDispatcher::Dispatch(NS_STATIC_CAST(nsIContent*, this), presContext,
|
||||
&event);
|
||||
}
|
||||
}
|
||||
|
||||
inline PRBool IsNonLabelFormControl(nsIContent *aContent)
|
||||
{
|
||||
return aContent->IsNodeOfType(nsINode::eHTML_FORM_CONTROL) &&
|
||||
|
|
|
@ -42,10 +42,11 @@ interface nsIAtom;
|
|||
interface nsIDOMDocument;
|
||||
interface nsIDOMElement;
|
||||
interface nsIDOMNode;
|
||||
interface nsIDOMAttr;
|
||||
interface nsIDOMEvent;
|
||||
interface nsIXTFElementWrapper;
|
||||
|
||||
[scriptable, uuid(9987c448-5a9d-4df5-a217-86ef6fedc366)]
|
||||
[scriptable, uuid(4f144387-796d-4baf-8641-5db45dba1808)]
|
||||
interface nsIXTFElement : nsISupports
|
||||
{
|
||||
// onCreated will be called before any notifications are sent to
|
||||
|
@ -103,7 +104,9 @@ interface nsIXTFElement : nsISupports
|
|||
const unsigned long NOTIFY_DONE_ADDING_CHILDREN = 0x00008000;
|
||||
|
||||
const unsigned long NOTIFY_HANDLE_DEFAULT = 0x00010000;
|
||||
|
||||
|
||||
const unsigned long NOTIFY_PERFORM_ACCESSKEY = 0x00020000;
|
||||
|
||||
// Event notifications:
|
||||
|
||||
void willChangeDocument(in nsIDOMDocument newDoc);
|
||||
|
@ -144,5 +147,15 @@ interface nsIXTFElement : nsISupports
|
|||
// to worry about copying attributes or child nodes, but should copy any
|
||||
// other needed state.
|
||||
void cloneState(in nsIDOMElement aElement);
|
||||
|
||||
/**
|
||||
* Returns accesskey attribute node.
|
||||
*/
|
||||
readonly attribute nsIDOMAttr accesskeyNode;
|
||||
|
||||
/**
|
||||
* Performs accesskey. The method is called when accesskey is activated.
|
||||
*/
|
||||
void performAccesskey();
|
||||
};
|
||||
|
||||
|
|
|
@ -46,11 +46,16 @@
|
|||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsIEventStateManager.h"
|
||||
#include "nsIEventListenerManager.h"
|
||||
#include "nsIDOMEvent.h"
|
||||
#include "nsGUIEvent.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsIXTFService.h"
|
||||
#include "nsIDOMAttr.h"
|
||||
#include "nsIAttribute.h"
|
||||
#include "nsDOMAttributeMap.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "nsEventDispatcher.h"
|
||||
|
@ -175,6 +180,9 @@ nsXTFElementWrapper::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
|||
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (mNotificationMask & nsIXTFElement::NOTIFY_PERFORM_ACCESSKEY)
|
||||
RegUnregAccessKey(PR_TRUE);
|
||||
|
||||
if (domDocument &&
|
||||
(mNotificationMask & (nsIXTFElement::NOTIFY_DOCUMENT_CHANGED))) {
|
||||
GetXTFElement()->DocumentChanged(domDocument);
|
||||
|
@ -193,6 +201,7 @@ nsXTFElementWrapper::UnbindFromTree(PRBool aDeep, PRBool aNullParent)
|
|||
{
|
||||
// XXXbz making up random order for the notifications... Perhaps
|
||||
// this api should more closely match BindToTree/UnbindFromTree?
|
||||
|
||||
PRBool inDoc = IsInDoc();
|
||||
if (inDoc &&
|
||||
(mNotificationMask & nsIXTFElement::NOTIFY_WILL_CHANGE_DOCUMENT)) {
|
||||
|
@ -206,6 +215,9 @@ nsXTFElementWrapper::UnbindFromTree(PRBool aDeep, PRBool aNullParent)
|
|||
GetXTFElement()->WillChangeParent(nsnull);
|
||||
}
|
||||
|
||||
if (mNotificationMask & nsIXTFElement::NOTIFY_PERFORM_ACCESSKEY)
|
||||
RegUnregAccessKey(PR_FALSE);
|
||||
|
||||
nsXTFElementWrapperBase::UnbindFromTree(aDeep, aNullParent);
|
||||
|
||||
if (parentChanged &&
|
||||
|
@ -280,7 +292,15 @@ nsXTFElementWrapper::SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
|
|||
if (aNameSpaceID == kNameSpaceID_None &&
|
||||
(mNotificationMask & nsIXTFElement::NOTIFY_ATTRIBUTE_SET))
|
||||
GetXTFElement()->AttributeSet(aName, aValue);
|
||||
|
||||
|
||||
if (mNotificationMask & nsIXTFElement::NOTIFY_PERFORM_ACCESSKEY) {
|
||||
nsCOMPtr<nsIDOMAttr> accesskey;
|
||||
GetXTFElement()->GetAccesskeyNode(getter_AddRefs(accesskey));
|
||||
nsCOMPtr<nsIAttribute> attr(do_QueryInterface(accesskey));
|
||||
if (attr && attr->NodeInfo()->Equals(aName, aNameSpaceID))
|
||||
RegUnregAccessKey(PR_TRUE);
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
@ -406,7 +426,15 @@ nsXTFElementWrapper::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttr,
|
|||
if (aNameSpaceID == kNameSpaceID_None &&
|
||||
(mNotificationMask & nsIXTFElement::NOTIFY_WILL_REMOVE_ATTRIBUTE))
|
||||
GetXTFElement()->WillRemoveAttribute(aAttr);
|
||||
|
||||
|
||||
if (mNotificationMask & nsIXTFElement::NOTIFY_PERFORM_ACCESSKEY) {
|
||||
nsCOMPtr<nsIDOMAttr> accesskey;
|
||||
GetXTFElement()->GetAccesskeyNode(getter_AddRefs(accesskey));
|
||||
nsCOMPtr<nsIAttribute> attr(do_QueryInterface(accesskey));
|
||||
if (attr && attr->NodeInfo()->Equals(aAttr, aNameSpaceID))
|
||||
RegUnregAccessKey(PR_FALSE);
|
||||
}
|
||||
|
||||
if (aNameSpaceID==kNameSpaceID_None && HandledByInner(aAttr)) {
|
||||
nsDOMSlots *slots = GetExistingDOMSlots();
|
||||
if (slots && slots->mAttributeMap) {
|
||||
|
@ -501,6 +529,14 @@ nsXTFElementWrapper::IntrinsicState() const
|
|||
return nsXTFElementWrapperBase::IntrinsicState() | mIntrinsicState;
|
||||
}
|
||||
|
||||
void
|
||||
nsXTFElementWrapper::PerformAccesskey(PRBool aKeyCausesActivation,
|
||||
PRBool aIsTrustedEvent)
|
||||
{
|
||||
if (mNotificationMask & nsIXTFElement::NOTIFY_PERFORM_ACCESSKEY)
|
||||
GetXTFElement()->PerformAccesskey();
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsXTFElementWrapper::Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const
|
||||
{
|
||||
|
@ -886,6 +922,41 @@ nsXTFElementWrapper::SetClassAttributeName(nsIAtom* aName)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
nsXTFElementWrapper::RegUnregAccessKey(PRBool aDoReg)
|
||||
{
|
||||
nsIDocument* doc = GetCurrentDoc();
|
||||
if (!doc)
|
||||
return;
|
||||
|
||||
// Get presentation shell 0
|
||||
nsIPresShell *presShell = doc->GetShellAt(0);
|
||||
if (!presShell)
|
||||
return;
|
||||
|
||||
nsPresContext *presContext = presShell->GetPresContext();
|
||||
if (!presContext)
|
||||
return;
|
||||
|
||||
nsIEventStateManager *esm = presContext->EventStateManager();
|
||||
if (!esm)
|
||||
return;
|
||||
|
||||
// Register or unregister as appropriate.
|
||||
nsCOMPtr<nsIDOMAttr> accesskeyNode;
|
||||
GetXTFElement()->GetAccesskeyNode(getter_AddRefs(accesskeyNode));
|
||||
if (!accesskeyNode)
|
||||
return;
|
||||
|
||||
nsAutoString accessKey;
|
||||
accesskeyNode->GetValue(accessKey);
|
||||
|
||||
if (aDoReg && !accessKey.IsEmpty())
|
||||
esm->RegisterAccessKey(this, (PRUint32)accessKey.First());
|
||||
else
|
||||
esm->UnregisterAccessKey(this, (PRUint32)accessKey.First());
|
||||
}
|
||||
|
||||
nsresult
|
||||
NS_NewXTFElementWrapper(nsIXTFElement* aXTFElement,
|
||||
nsINodeInfo* aNodeInfo,
|
||||
|
|
|
@ -109,6 +109,9 @@ public:
|
|||
virtual nsIAtom *GetClassAttributeName() const;
|
||||
virtual const nsAttrValue* GetClasses() const;
|
||||
|
||||
virtual void PerformAccesskey(PRBool aKeyCausesActivation,
|
||||
PRBool aIsTrustedEvent);
|
||||
|
||||
// nsIDOMElement specializations:
|
||||
NS_IMETHOD GetAttribute(const nsAString& aName,
|
||||
nsAString& aReturn);
|
||||
|
@ -137,6 +140,8 @@ protected:
|
|||
|
||||
PRBool HandledByInner(nsIAtom* attr) const;
|
||||
|
||||
void RegUnregAccessKey(PRBool aDoReg);
|
||||
|
||||
nsCOMPtr<nsIXTFElement> mXTFElement;
|
||||
|
||||
PRUint32 mNotificationMask;
|
||||
|
|
|
@ -623,6 +623,67 @@ nsXULElement::IsFocusable(PRInt32 *aTabIndex)
|
|||
return tabIndex >= 0 || (!disabled && HasAttr(kNameSpaceID_None, nsGkAtoms::tabindex));
|
||||
}
|
||||
|
||||
void
|
||||
nsXULElement::PerformAccesskey(PRBool aKeyCausesActivation,
|
||||
PRBool aIsTrustedEvent)
|
||||
{
|
||||
nsCOMPtr<nsIContent> content(this);
|
||||
|
||||
if (Tag() == nsGkAtoms::label) {
|
||||
nsCOMPtr<nsIDOMElement> element;
|
||||
|
||||
nsAutoString control;
|
||||
GetAttr(kNameSpaceID_None, nsGkAtoms::control, control);
|
||||
if (!control.IsEmpty()) {
|
||||
nsCOMPtr<nsIDOMDocument> domDocument =
|
||||
do_QueryInterface(content->GetCurrentDoc());
|
||||
if (domDocument)
|
||||
domDocument->GetElementById(control, getter_AddRefs(element));
|
||||
}
|
||||
// here we'll either change |content| to the element referenced by
|
||||
// |element|, or clear it.
|
||||
content = do_QueryInterface(element);
|
||||
|
||||
if (!content)
|
||||
return;
|
||||
}
|
||||
|
||||
nsIDocument* doc = GetCurrentDoc();
|
||||
if (!doc)
|
||||
return;
|
||||
|
||||
nsIPresShell *shell = doc->GetShellAt(0);
|
||||
if (!shell)
|
||||
return;
|
||||
|
||||
nsIFrame* frame = shell->GetPrimaryFrameFor(content);
|
||||
if (!frame)
|
||||
return;
|
||||
|
||||
const nsStyleVisibility* vis = frame->GetStyleVisibility();
|
||||
|
||||
if (vis->mVisible == NS_STYLE_VISIBILITY_COLLAPSE ||
|
||||
vis->mVisible == NS_STYLE_VISIBILITY_HIDDEN ||
|
||||
!frame->AreAncestorViewsVisible())
|
||||
return;
|
||||
|
||||
nsCOMPtr<nsIDOMXULElement> elm(do_QueryInterface(content));
|
||||
|
||||
// Define behavior for each type of XUL element.
|
||||
nsIAtom *tag = content->Tag();
|
||||
if (tag == nsGkAtoms::textbox || tag == nsGkAtoms::menulist) {
|
||||
// if it's a text box or menulist, give it focus
|
||||
elm->Focus();
|
||||
} else if (tag == nsGkAtoms::toolbarbutton) {
|
||||
// if it's a toolbar button, just click
|
||||
elm->Click();
|
||||
} else {
|
||||
// otherwise, focus and click in it
|
||||
elm->Focus();
|
||||
elm->Click();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsIScriptEventHandlerOwner interface
|
||||
|
|
|
@ -544,6 +544,8 @@ public:
|
|||
|
||||
virtual void SetFocus(nsPresContext* aPresContext);
|
||||
virtual void RemoveFocus(nsPresContext* aPresContext);
|
||||
virtual void PerformAccesskey(PRBool aKeyCausesActivation,
|
||||
PRBool aIsTrustedEvent);
|
||||
|
||||
virtual nsIContent *GetBindingParent() const;
|
||||
virtual PRBool IsNodeOfType(PRUint32 aFlags) const;
|
||||
|
|
|
@ -75,13 +75,32 @@ nsXFormsDelegateStub::WillChangeParent(nsIDOMElement *aNewParent)
|
|||
return nsXFormsControlStub::WillChangeParent(aNewParent);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsDelegateStub::GetAccesskeyNode(nsIDOMAttr** aNode)
|
||||
{
|
||||
return mElement->GetAttributeNode(NS_LITERAL_STRING("accesskey"), aNode);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsDelegateStub::PerformAccesskey()
|
||||
{
|
||||
nsCOMPtr<nsIXFormsUIWidget> widget(do_QueryInterface(mElement));
|
||||
if (widget) {
|
||||
PRBool isFocused;
|
||||
widget->Focus(&isFocused);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsDelegateStub::OnCreated(nsIXTFElementWrapper *aWrapper)
|
||||
{
|
||||
nsresult rv = nsXFormsControlStub::OnCreated(aWrapper);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aWrapper->SetNotificationMask(kStandardNotificationMask |
|
||||
nsIXTFElement::NOTIFY_WILL_CHANGE_PARENT);
|
||||
nsIXTFElement::NOTIFY_WILL_CHANGE_PARENT |
|
||||
nsIXTFElement::NOTIFY_PERFORM_ACCESSKEY);
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
|
|
@ -84,6 +84,8 @@ public:
|
|||
NS_IMETHOD OnDestroyed();
|
||||
NS_IMETHOD WillChangeParent(nsIDOMElement *aNewParent);
|
||||
NS_IMETHOD WillChangeDocument(nsIDOMDocument *aNewDocument);
|
||||
NS_IMETHOD GetAccesskeyNode(nsIDOMAttr** aNode);
|
||||
NS_IMETHOD PerformAccesskey();
|
||||
|
||||
// nsIXFormsControl
|
||||
NS_IMETHOD TryFocus(PRBool* aOK);
|
||||
|
|
|
@ -84,6 +84,7 @@ public:
|
|||
NS_IMETHOD ChildRemoved(PRUint32 aIndex);
|
||||
NS_IMETHOD AttributeSet(nsIAtom *aName, const nsAString &aSrc);
|
||||
NS_IMETHOD AttributeRemoved(nsIAtom *aName);
|
||||
NS_IMETHOD PerformAccesskey();
|
||||
|
||||
nsXFormsLabelElement() : mWidgetLoaded(PR_FALSE) {};
|
||||
|
||||
|
@ -113,7 +114,8 @@ nsXFormsLabelElement::OnCreated(nsIXTFElementWrapper *aWrapper)
|
|||
aWrapper->SetNotificationMask(kStandardNotificationMask |
|
||||
nsIXTFElement::NOTIFY_CHILD_INSERTED |
|
||||
nsIXTFElement::NOTIFY_CHILD_APPENDED |
|
||||
nsIXTFElement::NOTIFY_CHILD_REMOVED);
|
||||
nsIXTFElement::NOTIFY_CHILD_REMOVED |
|
||||
nsIXTFElement::NOTIFY_PERFORM_ACCESSKEY);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -187,6 +189,23 @@ nsXFormsLabelElement::AttributeRemoved(nsIAtom *aName)
|
|||
return nsXFormsDelegateStub::AttributeRemoved(aName);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsLabelElement::PerformAccesskey()
|
||||
{
|
||||
nsCOMPtr<nsIDOMNode> node(do_QueryInterface(mElement));
|
||||
nsCOMPtr<nsIDOMNode> parent;
|
||||
node->GetParentNode(getter_AddRefs(parent));
|
||||
if (parent) {
|
||||
nsCOMPtr<nsIXFormsUIWidget> widget(do_QueryInterface(parent));
|
||||
if (widget) {
|
||||
PRBool isFocused;
|
||||
widget->Focus(&isFocused);
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsLabelElement::GetValue(nsAString& aValue)
|
||||
{
|
||||
|
|
|
@ -104,7 +104,8 @@ nsXFormsSelect1Element::OnCreated(nsIXTFElementWrapper *aWrapper)
|
|||
nsIXTFElement::NOTIFY_CHILD_APPENDED |
|
||||
nsIXTFElement::NOTIFY_CHILD_REMOVED |
|
||||
nsIXTFElement::NOTIFY_BEGIN_ADDING_CHILDREN |
|
||||
nsIXTFElement::NOTIFY_DONE_ADDING_CHILDREN);
|
||||
nsIXTFElement::NOTIFY_DONE_ADDING_CHILDREN |
|
||||
nsIXTFElement::NOTIFY_PERFORM_ACCESSKEY);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -94,7 +94,8 @@ nsXFormsSelectElement::OnCreated(nsIXTFElementWrapper *aWrapper)
|
|||
aWrapper->SetNotificationMask(kStandardNotificationMask |
|
||||
nsIXTFElement::NOTIFY_CHILD_INSERTED |
|
||||
nsIXTFElement::NOTIFY_CHILD_APPENDED |
|
||||
nsIXTFElement::NOTIFY_CHILD_REMOVED);
|
||||
nsIXTFElement::NOTIFY_CHILD_REMOVED |
|
||||
nsIXTFElement::NOTIFY_PERFORM_ACCESSKEY);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -176,6 +176,18 @@ nsXFormsStubElement::HandleDefault(nsIDOMEvent *aEvent, PRBool *aHandled)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsStubElement::GetAccesskeyNode(nsIDOMAttr** aNode)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsStubElement::PerformAccesskey()
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsStubElement::OnCreated(nsIXTFElementWrapper *aWrapper)
|
||||
{
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
extends="#xformswidget-input-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<html:input class="xf-value" anonid="control" xbl:inherits="accesskey"/>
|
||||
<html:input class="xf-value" anonid="control"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
||||
|
@ -144,8 +144,7 @@
|
|||
extends="chrome://xforms/content/input.xml#xformswidget-input-boolean-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<html:input anonid="control" xbl:inherits="accesskey" type="checkbox"
|
||||
class="xf-value"/>
|
||||
<html:input anonid="control" type="checkbox" class="xf-value"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
||||
|
@ -209,7 +208,7 @@
|
|||
<content>
|
||||
<children includes="label"/>
|
||||
<html:span class="-moz-date-container">
|
||||
<html:input anonid="control" xbl:inherits="accesskey" size="10"
|
||||
<html:input anonid="control" size="10"
|
||||
class="-moz-xforms-date-input xf-value"/>
|
||||
<html:input mozType:dropmarker="true"
|
||||
type="button" anonid="dropmarker"
|
||||
|
@ -591,7 +590,7 @@
|
|||
extends="chrome://xforms/content/input.xml#xformswidget-input-month-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<html:select anonid="control" xbl:inherits="style, accesskey">
|
||||
<html:select anonid="control" xbl:inherits="style">
|
||||
<html:option value=""></html:option>
|
||||
</html:select>
|
||||
<children/>
|
||||
|
@ -640,7 +639,7 @@
|
|||
extends="chrome://xforms/content/input.xml#xformswidget-input-day-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<html:select anonid="control" xbl:inherits="style, accesskey">
|
||||
<html:select anonid="control" xbl:inherits="style">
|
||||
<html:option value=""></html:option>
|
||||
</html:select>
|
||||
<children/>
|
||||
|
@ -689,7 +688,7 @@
|
|||
extends="#xformswidget-input">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<html:input anonid="control" xbl:inherits="accesskey" type="password"/>
|
||||
<html:input anonid="control" type="password"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
||||
|
@ -708,8 +707,7 @@
|
|||
extends="#xformswidget-input-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<html:textarea class="xf-value" anonid="control"
|
||||
xbl:inherits="accesskey"/>
|
||||
<html:textarea class="xf-value" anonid="control"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
||||
|
|
|
@ -117,8 +117,7 @@
|
|||
extends="#xformswidget-input-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox class="xf-value" anonid="control"
|
||||
xbl:inherits="accesskey" flex="1"/>
|
||||
<xul:textbox class="xf-value" anonid="control" flex="1"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
||||
|
@ -137,7 +136,7 @@
|
|||
extends="chrome://xforms/content/input.xml#xformswidget-input-boolean-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:checkbox anonid="control" xbl:inherits="accesskey" class="xf-value"/>
|
||||
<xul:checkbox anonid="control" class="xf-value"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
||||
|
@ -195,7 +194,7 @@
|
|||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:hbox class="-moz-menulist-container" flex="1">
|
||||
<html:input anonid="control" xbl:inherits="accesskey" flex="1"
|
||||
<html:input anonid="control" flex="1"
|
||||
class="-moz-menulist-textfield"
|
||||
allowevents="true"/>
|
||||
<xul:dropmarker mozType:dropmarker="true" anonid="dropmarker"
|
||||
|
@ -393,8 +392,7 @@
|
|||
extends="#xformswidget-input-number-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="number" class="xf-value" anonid="control"
|
||||
xbl:inherits="accesskey" flex="1"
|
||||
<xul:textbox type="number" class="xf-value" anonid="control" flex="1"
|
||||
min="Number.MIN_VALUE" max="Number.MAX_VALUE"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
@ -405,8 +403,7 @@
|
|||
extends="#xformswidget-input-number-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="number" class="xf-value" anonid="control"
|
||||
xbl:inherits="accesskey" flex="1"
|
||||
<xul:textbox type="number" class="xf-value" anonid="control" flex="1"
|
||||
min="Number.MIN_VALUE" max="0"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
@ -417,8 +414,7 @@
|
|||
extends="#xformswidget-input-number-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="number" class="xf-value" anonid="control"
|
||||
xbl:inherits="accesskey" flex="1"
|
||||
<xul:textbox type="number" class="xf-value" anonid="control" flex="1"
|
||||
min="Number.MIN_VALUE" max="-1"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
@ -429,8 +425,7 @@
|
|||
extends="#xformswidget-input-number-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="number" class="xf-value" anonid="control"
|
||||
xbl:inherits="accesskey" flex="1"
|
||||
<xul:textbox type="number" class="xf-value" anonid="control" flex="1"
|
||||
min="-9223372036854775807" max="9223372036854775807"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
@ -441,8 +436,7 @@
|
|||
extends="#xformswidget-input-number-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="number" class="xf-value" anonid="control"
|
||||
xbl:inherits="accesskey" flex="1"
|
||||
<xul:textbox type="number" class="xf-value" anonid="control" flex="1"
|
||||
min="-2147483647" max="2147483647"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
@ -453,8 +447,7 @@
|
|||
extends="#xformswidget-input-number-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="number" class="xf-value" anonid="control"
|
||||
xbl:inherits="accesskey" flex="1"
|
||||
<xul:textbox type="number" class="xf-value" anonid="control" flex="1"
|
||||
min="-32767" max="32767"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
@ -465,8 +458,7 @@
|
|||
extends="#xformswidget-input-number-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="number" class="xf-value" anonid="control"
|
||||
xbl:inherits="accesskey" flex="1"
|
||||
<xul:textbox type="number" class="xf-value" anonid="control" flex="1"
|
||||
min="-127" max="127"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
@ -477,8 +469,7 @@
|
|||
extends="#xformswidget-input-number-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="number" class="xf-value" anonid="control"
|
||||
xbl:inherits="accesskey" flex="1"
|
||||
<xul:textbox type="number" class="xf-value" anonid="control" flex="1"
|
||||
min="0" max="Number.MAX_VALUE"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
@ -490,8 +481,7 @@
|
|||
extends="#xformswidget-input-number-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="number" class="xf-value" anonid="control"
|
||||
xbl:inherits="accesskey" flex="1"
|
||||
<xul:textbox type="number" class="xf-value" anonid="control" flex="1"
|
||||
min="0" max="18446744073709551615"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
@ -502,8 +492,7 @@
|
|||
extends="#xformswidget-input-number-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="number" class="xf-value" anonid="control"
|
||||
xbl:inherits="accesskey" flex="1"
|
||||
<xul:textbox type="number" class="xf-value" anonid="control" flex="1"
|
||||
min="0" max="4294967295"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
@ -514,8 +503,7 @@
|
|||
extends="#xformswidget-input-number-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="number" class="xf-value" anonid="control"
|
||||
xbl:inherits="accesskey" flex="1"
|
||||
<xul:textbox type="number" class="xf-value" anonid="control" flex="1"
|
||||
min="0" max="65535"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
@ -526,8 +514,7 @@
|
|||
extends="#xformswidget-input-number-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="number" class="xf-value" anonid="control"
|
||||
xbl:inherits="accesskey" flex="1"
|
||||
<xul:textbox type="number" class="xf-value" anonid="control" flex="1"
|
||||
min="0" max="255"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
@ -538,8 +525,7 @@
|
|||
extends="#xformswidget-input-number-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="number" class="xf-value" anonid="control"
|
||||
xbl:inherits="accesskey" flex="1"
|
||||
<xul:textbox type="number" class="xf-value" anonid="control" flex="1"
|
||||
min="1" max="Number.MAX_VALUE"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
@ -551,8 +537,7 @@
|
|||
extends="#xformswidget-input-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox type="password" anonid="control"
|
||||
xbl:inherits="accesskey" flex="1"/>
|
||||
<xul:textbox type="password" anonid="control" flex="1"/>
|
||||
<children/>
|
||||
</content>
|
||||
|
||||
|
@ -580,7 +565,7 @@
|
|||
<content>
|
||||
<children includes="label"/>
|
||||
<xul:textbox multiline="true" class="xf-value"
|
||||
anonid="control" xbl:inherits="accesskey" flex="1"/>
|
||||
anonid="control" flex="1"/>
|
||||
<children/>
|
||||
</content>
|
||||
</binding>
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
<html:span class="label-container">
|
||||
<children includes="label"/>
|
||||
</html:span>
|
||||
<html:span anonid="control" xbl:inherits="style, accesskey"/>
|
||||
<html:span anonid="control" xbl:inherits="style"/>
|
||||
<children/>
|
||||
</content>
|
||||
</binding>
|
||||
|
@ -81,7 +81,7 @@
|
|||
<html:span class="label-container">
|
||||
<children includes="label"/>
|
||||
</html:span>
|
||||
<html:span anonid="control" xbl:inherits="style, accesskey"/>
|
||||
<html:span anonid="control" xbl:inherits="style"/>
|
||||
<children/>
|
||||
</html:label>
|
||||
</content>
|
||||
|
@ -107,7 +107,7 @@
|
|||
extends="chrome://xforms/content/select.xml#controlwidget-base">
|
||||
|
||||
<content>
|
||||
<html:select xbl:inherits="style, accesskey, disabled=readonly"
|
||||
<html:select xbl:inherits="style, disabled=readonly"
|
||||
class="xf-value" multiple="true" size="5" anonid="control"/>
|
||||
</content>
|
||||
|
||||
|
@ -212,7 +212,7 @@
|
|||
<binding id="controlwidget-select1-compact"
|
||||
extends="#controlwidget-select-compact">
|
||||
<content>
|
||||
<html:select xbl:inherits="style, accesskey, disabled=readonly"
|
||||
<html:select xbl:inherits="style, disabled=readonly"
|
||||
class="xf-value" size="5" anonid="control"/>
|
||||
</content>
|
||||
</binding>
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
<content>
|
||||
<xul:hbox flex="1">
|
||||
<children includes="label"/>
|
||||
<xul:box anonid="control" xbl:inherits="style, accesskey"
|
||||
<xul:box anonid="control" xbl:inherits="style"
|
||||
class="xf-value" flex="1"/>
|
||||
</xul:hbox>
|
||||
<children/>
|
||||
|
@ -77,7 +77,7 @@
|
|||
<content>
|
||||
<xul:hbox flex="1">
|
||||
<children includes="label"/>
|
||||
<xul:box anonid="control" xbl:inherits="style, accesskey"
|
||||
<xul:box anonid="control" xbl:inherits="style"
|
||||
class="xf-value" flex="1"/>
|
||||
</xul:hbox>
|
||||
<children/>
|
||||
|
@ -112,7 +112,7 @@
|
|||
extends="chrome://xforms/content/select.xml#controlwidget-base">
|
||||
|
||||
<content>
|
||||
<xul:listbox xbl:inherits="style, accesskey, disabled=readonly"
|
||||
<xul:listbox xbl:inherits="style, disabled=readonly"
|
||||
rows="5" flex="1"
|
||||
seltype="multiple"
|
||||
anonid="control"/>
|
||||
|
@ -245,7 +245,7 @@
|
|||
extends="chrome://xforms/content/select.xml#controlwidget-base">
|
||||
|
||||
<content>
|
||||
<xul:menulist xbl:inherits="style, accesskey, disabled=readonly"
|
||||
<xul:menulist xbl:inherits="style, disabled=readonly"
|
||||
anonid="control" flex="1">
|
||||
<xul:menupopup/>
|
||||
</xul:menulist>
|
||||
|
@ -384,7 +384,7 @@
|
|||
<binding id="controlwidget-select1-compact"
|
||||
extends="#controlwidget-select-compact">
|
||||
<content>
|
||||
<xul:listbox xbl:inherits="style, accesskey, disabled=readonly"
|
||||
<xul:listbox xbl:inherits="style, disabled=readonly"
|
||||
rows="5" anonid="control"/>
|
||||
</content>
|
||||
</binding>
|
||||
|
|
|
@ -56,7 +56,6 @@
|
|||
anonid="container"><html:input
|
||||
class="-moz-xforms-select1-input xf-value"
|
||||
anonid="control"
|
||||
xbl:inherits="accesskey"
|
||||
onfocus="this.parentNode.parentNode.dispatchDOMUIEvent('DOMFocusIn')"
|
||||
onblur="this.parentNode.parentNode.handleBlur(); this.parentNode.parentNode.dispatchDOMUIEvent('DOMFocusOut');"
|
||||
onclick="this.parentNode.parentNode.handleControlClick();"
|
||||
|
|
|
@ -315,7 +315,7 @@
|
|||
<binding id="xformswidget-trigger"
|
||||
extends="chrome://xforms/content/xforms.xml#xformswidget-trigger-base">
|
||||
<content>
|
||||
<html:button anonid="control" xbl:inherits="accesskey">
|
||||
<html:button anonid="control">
|
||||
<children/>
|
||||
</html:button>
|
||||
</content>
|
||||
|
@ -360,7 +360,7 @@
|
|||
<binding id="xformswidget-trigger-minimal"
|
||||
extends="chrome://xforms/content/xforms.xml#xformswidget-trigger-base">
|
||||
<content>
|
||||
<html:span tabindex="0" anonid="control" xbl:inherits="accesskey">
|
||||
<html:span tabindex="0" anonid="control">
|
||||
<children/>
|
||||
</html:span>
|
||||
</content>
|
||||
|
@ -518,7 +518,7 @@
|
|||
<content>
|
||||
<children includes="label"/>
|
||||
<html:input anonid="text_control" class="xf-value" readonly="readonly"/>
|
||||
<html:button anonid="browse_button" xbl:inherits="accesskey">
|
||||
<html:button anonid="browse_button">
|
||||
&xforms.upload.browsetext;
|
||||
</html:button>
|
||||
<html:button anonid="clear_button">
|
||||
|
@ -590,11 +590,11 @@
|
|||
extends="chrome://xforms/content/xforms.xml#xformswidget-upload-base">
|
||||
<content>
|
||||
<children includes="label"/>
|
||||
<html:input readonly="readonly" class="xf-value" xbl:inherits="accesskey"/>
|
||||
<html:button disabled="disabled" xbl:inherits="accesskey">
|
||||
<html:input readonly="readonly" class="xf-value"/>
|
||||
<html:button disabled="disabled">
|
||||
&xforms.upload.browsetext;
|
||||
</html:button>
|
||||
<html:button disabled="disabled" xbl:inherits="accesskey">
|
||||
<html:button disabled="disabled">
|
||||
&xforms.upload.cleartext;
|
||||
</html:button>
|
||||
<children/>
|
||||
|
|
|
@ -230,7 +230,7 @@
|
|||
<binding id="xformswidget-trigger"
|
||||
extends="#xformswidget-trigger-base">
|
||||
<content>
|
||||
<xul:button anonid="control" xbl:inherits="accesskey" flex="1">
|
||||
<xul:button anonid="control" flex="1">
|
||||
<children/>
|
||||
</xul:button>
|
||||
</content>
|
||||
|
@ -260,7 +260,7 @@
|
|||
extends="#xformswidget-trigger-base">
|
||||
<content>
|
||||
<xul:box tabindex="0" anonid="control" flex="1"
|
||||
xbl:inherits="accesskey, orient">
|
||||
xbl:inherits="orient">
|
||||
<children/>
|
||||
</xul:box>
|
||||
</content>
|
||||
|
|
|
@ -452,7 +452,8 @@ html|*:root trigger[accesskey] > label,
|
|||
html|*:root submit[accesskey] > label,
|
||||
html|*:root select[accesskey] > label,
|
||||
html|*:root select1[accesskey] > label,
|
||||
html|*:root upload[accesskey] > label {
|
||||
html|*:root upload[accesskey] > label,
|
||||
html|*:root range[accesskey] > label {
|
||||
-moz-binding: url('chrome://xforms/content/xforms-xhtml.xml#xformswidget-label-accesskey');
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче