зеркало из https://github.com/mozilla/pjs.git
cleaning up 34896 ender-lite with saari's review.
This commit is contained in:
Родитель
94e33b349f
Коммит
42b098a06e
|
@ -358,7 +358,8 @@ nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
|
|||
}
|
||||
}
|
||||
|
||||
gLastFocusedDocument->HandleDOMEvent(gLastFocusedPresContext, &blurevent, nsnull, NS_EVENT_FLAG_INIT, &blurstatus);
|
||||
if(gLastFocusedDocument != mDocument)
|
||||
gLastFocusedDocument->HandleDOMEvent(gLastFocusedPresContext, &blurevent, nsnull, NS_EVENT_FLAG_INIT, &blurstatus);
|
||||
|
||||
if (commandDispatcher) {
|
||||
commandDispatcher->SetSuppressFocus(PR_FALSE);
|
||||
|
@ -372,7 +373,9 @@ nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
|
|||
if (globalObject) {
|
||||
nsIContent* currentFocus = mCurrentFocus;
|
||||
mCurrentFocus = nsnull;
|
||||
mDocument->HandleDOMEvent(aPresContext, &focusevent, nsnull, NS_EVENT_FLAG_INIT, &status);
|
||||
if(gLastFocusedDocument != mDocument)
|
||||
mDocument->HandleDOMEvent(aPresContext, &focusevent, nsnull, NS_EVENT_FLAG_INIT, &status);
|
||||
|
||||
globalObject->HandleDOMEvent(aPresContext, &focusevent, nsnull, NS_EVENT_FLAG_INIT, &status);
|
||||
mCurrentFocus = currentFocus;
|
||||
}
|
||||
|
@ -570,7 +573,7 @@ nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
|
|||
nsCOMPtr<nsIScriptGlobalObject> globalObject;
|
||||
if(gLastFocusedDocument) {
|
||||
gLastFocusedDocument->GetScriptGlobalObject(getter_AddRefs(globalObject));
|
||||
gLastFocusedDocument->HandleDOMEvent(gLastFocusedPresContext, &event, nsnull, NS_EVENT_FLAG_INIT, &status);
|
||||
//gLastFocusedDocument->HandleDOMEvent(gLastFocusedPresContext, &event, nsnull, NS_EVENT_FLAG_INIT, &status);
|
||||
if(globalObject)
|
||||
globalObject->HandleDOMEvent(gLastFocusedPresContext, &event, nsnull, NS_EVENT_FLAG_INIT, &status);
|
||||
}
|
||||
|
|
|
@ -768,7 +768,8 @@ nsHTMLInputElement::HandleDOMEvent(nsIPresContext* aPresContext,
|
|||
return rv;
|
||||
}
|
||||
|
||||
// Try script event handlers first
|
||||
// Try script event handlers first if its not a focus/blur event
|
||||
//we dont want the doc to get these
|
||||
nsresult ret = mInner.HandleDOMEvent(aPresContext, aEvent, aDOMEvent,
|
||||
aFlags, aEventStatus);
|
||||
|
||||
|
|
|
@ -1070,6 +1070,7 @@ nsTextEditorFocusListener::Focus(nsIDOMEvent* aEvent)
|
|||
if (mEditor)
|
||||
{
|
||||
PRUint32 flags;
|
||||
aEvent->PreventBubble();
|
||||
mEditor->GetFlags(&flags);
|
||||
if (! (flags & nsIHTMLEditor::eEditorDisabledMask))
|
||||
{ // only enable caret and selection if the editor is not disabled
|
||||
|
@ -1115,6 +1116,7 @@ nsTextEditorFocusListener::Blur(nsIDOMEvent* aEvent)
|
|||
if (mEditor)
|
||||
{
|
||||
PRUint32 flags;
|
||||
aEvent->PreventBubble();
|
||||
mEditor->GetFlags(&flags);
|
||||
nsCOMPtr<nsIEditor>editor = do_QueryInterface(mEditor);
|
||||
if (editor)
|
||||
|
|
|
@ -1070,6 +1070,7 @@ nsTextEditorFocusListener::Focus(nsIDOMEvent* aEvent)
|
|||
if (mEditor)
|
||||
{
|
||||
PRUint32 flags;
|
||||
aEvent->PreventBubble();
|
||||
mEditor->GetFlags(&flags);
|
||||
if (! (flags & nsIHTMLEditor::eEditorDisabledMask))
|
||||
{ // only enable caret and selection if the editor is not disabled
|
||||
|
@ -1115,6 +1116,7 @@ nsTextEditorFocusListener::Blur(nsIDOMEvent* aEvent)
|
|||
if (mEditor)
|
||||
{
|
||||
PRUint32 flags;
|
||||
aEvent->PreventBubble();
|
||||
mEditor->GetFlags(&flags);
|
||||
nsCOMPtr<nsIEditor>editor = do_QueryInterface(mEditor);
|
||||
if (editor)
|
||||
|
|
|
@ -358,7 +358,8 @@ nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
|
|||
}
|
||||
}
|
||||
|
||||
gLastFocusedDocument->HandleDOMEvent(gLastFocusedPresContext, &blurevent, nsnull, NS_EVENT_FLAG_INIT, &blurstatus);
|
||||
if(gLastFocusedDocument != mDocument)
|
||||
gLastFocusedDocument->HandleDOMEvent(gLastFocusedPresContext, &blurevent, nsnull, NS_EVENT_FLAG_INIT, &blurstatus);
|
||||
|
||||
if (commandDispatcher) {
|
||||
commandDispatcher->SetSuppressFocus(PR_FALSE);
|
||||
|
@ -372,7 +373,9 @@ nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
|
|||
if (globalObject) {
|
||||
nsIContent* currentFocus = mCurrentFocus;
|
||||
mCurrentFocus = nsnull;
|
||||
mDocument->HandleDOMEvent(aPresContext, &focusevent, nsnull, NS_EVENT_FLAG_INIT, &status);
|
||||
if(gLastFocusedDocument != mDocument)
|
||||
mDocument->HandleDOMEvent(aPresContext, &focusevent, nsnull, NS_EVENT_FLAG_INIT, &status);
|
||||
|
||||
globalObject->HandleDOMEvent(aPresContext, &focusevent, nsnull, NS_EVENT_FLAG_INIT, &status);
|
||||
mCurrentFocus = currentFocus;
|
||||
}
|
||||
|
@ -570,7 +573,7 @@ nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
|
|||
nsCOMPtr<nsIScriptGlobalObject> globalObject;
|
||||
if(gLastFocusedDocument) {
|
||||
gLastFocusedDocument->GetScriptGlobalObject(getter_AddRefs(globalObject));
|
||||
gLastFocusedDocument->HandleDOMEvent(gLastFocusedPresContext, &event, nsnull, NS_EVENT_FLAG_INIT, &status);
|
||||
//gLastFocusedDocument->HandleDOMEvent(gLastFocusedPresContext, &event, nsnull, NS_EVENT_FLAG_INIT, &status);
|
||||
if(globalObject)
|
||||
globalObject->HandleDOMEvent(gLastFocusedPresContext, &event, nsnull, NS_EVENT_FLAG_INIT, &status);
|
||||
}
|
||||
|
|
|
@ -768,7 +768,8 @@ nsHTMLInputElement::HandleDOMEvent(nsIPresContext* aPresContext,
|
|||
return rv;
|
||||
}
|
||||
|
||||
// Try script event handlers first
|
||||
// Try script event handlers first if its not a focus/blur event
|
||||
//we dont want the doc to get these
|
||||
nsresult ret = mInner.HandleDOMEvent(aPresContext, aEvent, aDOMEvent,
|
||||
aFlags, aEventStatus);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче