зеркало из https://github.com/mozilla/gecko-dev.git
Make sure <keyset> tags are only hooked up when in the XUL namespace. Add an assertion if HTML element creation fails.
This commit is contained in:
Родитель
8f9b391882
Коммит
ff552aaad0
|
@ -809,6 +809,7 @@ RDFXULBuilderImpl::CreateHTMLElement(nsINameSpace* aContainingNameSpace,
|
|||
rv = mHTMLElementFactory->CreateInstanceByTag(unicodeString,
|
||||
getter_AddRefs(element));
|
||||
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "unable to create HTML element");
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
// XXX This is part of what will be an optimal solution. To allow
|
||||
|
@ -1059,7 +1060,7 @@ RDFXULBuilderImpl::CreateXULElement(nsINameSpace* aContainingNameSpace,
|
|||
}
|
||||
|
||||
// We also need to pay special attention to the keyset tag to set up a listener
|
||||
if(aTagName == kKeysetAtom) {
|
||||
if((aNameSpaceID == kNameSpaceID_XUL) && (aTagName == kKeysetAtom)) {
|
||||
// Create our nsXULKeyListener and hook it up.
|
||||
nsCOMPtr<nsIXULKeyListener> keyListener;
|
||||
rv = nsComponentManager::CreateInstance(kXULKeyListenerCID,
|
||||
|
|
Загрузка…
Ссылка в новой задаче