cleaning up 34896 ender-lite with saari's review.

This commit is contained in:
mjudge%netscape.com 2000-06-09 21:13:03 +00:00
Родитель 94e33b349f
Коммит 42b098a06e
6 изменённых файлов: 20 добавлений и 8 удалений

Просмотреть файл

@ -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);