зеркало из https://github.com/mozilla/pjs.git
back out bug 238987
This commit is contained in:
Родитель
5ced05b248
Коммит
f4cad9464f
|
@ -774,7 +774,6 @@ nsEventStateManager::PreHandleEvent(nsPresContext* aPresContext,
|
|||
|
||||
nsEventStatus blurstatus = nsEventStatus_eIgnore;
|
||||
nsEvent blurevent(PR_TRUE, NS_BLUR_CONTENT);
|
||||
blurevent.flags |= NS_EVENT_FLAG_CANT_BUBBLE;
|
||||
|
||||
nsEventDispatcher::Dispatch(gLastFocusedDocument,
|
||||
gLastFocusedPresContext,
|
||||
|
@ -838,9 +837,10 @@ nsEventStateManager::PreHandleEvent(nsPresContext* aPresContext,
|
|||
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
nsEvent focusevent(PR_TRUE, NS_FOCUS_CONTENT);
|
||||
focusevent.flags |= NS_EVENT_FLAG_CANT_BUBBLE;
|
||||
|
||||
if (gLastFocusedDocument != mDocument) {
|
||||
//XXXsmaug bubbling for now, because in the old event dispatching
|
||||
// code focus event did bubble from document to window.
|
||||
nsEventDispatcher::Dispatch(mDocument, aPresContext,
|
||||
&focusevent, nsnull, &status);
|
||||
if (currentFocus && currentFocus != gLastFocusedContent) {
|
||||
|
@ -921,7 +921,6 @@ nsEventStateManager::PreHandleEvent(nsPresContext* aPresContext,
|
|||
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
nsEvent event(PR_TRUE, NS_BLUR_CONTENT);
|
||||
event.flags |= NS_EVENT_FLAG_CANT_BUBBLE;
|
||||
|
||||
if (gLastFocusedDocument && gLastFocusedPresContext) {
|
||||
if (gLastFocusedContent) {
|
||||
|
@ -1085,7 +1084,6 @@ nsEventStateManager::PreHandleEvent(nsPresContext* aPresContext,
|
|||
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
nsEvent event(PR_TRUE, NS_BLUR_CONTENT);
|
||||
event.flags |= NS_EVENT_FLAG_CANT_BUBBLE;
|
||||
|
||||
if (gLastFocusedContent) {
|
||||
nsIPresShell *shell = gLastFocusedDocument->GetPrimaryShell();
|
||||
|
@ -4183,7 +4181,6 @@ nsEventStateManager::SendFocusBlur(nsPresContext* aPresContext,
|
|||
//fire blur
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
nsEvent event(PR_TRUE, NS_BLUR_CONTENT);
|
||||
event.flags |= NS_EVENT_FLAG_CANT_BUBBLE;
|
||||
|
||||
EnsureDocument(presShell);
|
||||
|
||||
|
@ -4247,7 +4244,6 @@ nsEventStateManager::SendFocusBlur(nsPresContext* aPresContext,
|
|||
window) {
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
nsEvent event(PR_TRUE, NS_BLUR_CONTENT);
|
||||
event.flags |= NS_EVENT_FLAG_CANT_BUBBLE;
|
||||
|
||||
// Make sure we're not switching command dispatchers, if so,
|
||||
// suppress the blurred one if it isn't already suppressed
|
||||
|
@ -4357,7 +4353,6 @@ nsEventStateManager::SendFocusBlur(nsPresContext* aPresContext,
|
|||
//fire focus
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
nsEvent event(PR_TRUE, NS_FOCUS_CONTENT);
|
||||
event.flags |= NS_EVENT_FLAG_CANT_BUBBLE;
|
||||
|
||||
if (nsnull != mPresContext) {
|
||||
nsCxPusher pusher(aContent);
|
||||
|
@ -4382,7 +4377,6 @@ nsEventStateManager::SendFocusBlur(nsPresContext* aPresContext,
|
|||
//see bugzilla bug 93521
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
nsEvent event(PR_TRUE, NS_FOCUS_CONTENT);
|
||||
event.flags |= NS_EVENT_FLAG_CANT_BUBBLE;
|
||||
|
||||
if (nsnull != mPresContext && mDocument) {
|
||||
nsCxPusher pusher(mDocument);
|
||||
|
|
|
@ -45,7 +45,6 @@ include $(DEPTH)/config/autoconf.mk
|
|||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
_TEST_FILES = \
|
||||
test_bug238987.html \
|
||||
test_bug336682_1.html \
|
||||
test_bug336682_2.xul \
|
||||
test_bug336682.js \
|
||||
|
|
|
@ -254,7 +254,6 @@ nsHTMLLabelElement::PostHandleEvent(nsEventChainPostVisitor& aVisitor)
|
|||
// of redirecting |SetFocus|.
|
||||
{
|
||||
nsEvent event(NS_IS_TRUSTED_EVENT(aVisitor.mEvent), NS_FOCUS_CONTENT);
|
||||
event.flags |= NS_EVENT_FLAG_CANT_BUBBLE;
|
||||
nsEventStatus status = aVisitor.mEventStatus;
|
||||
DispatchEvent(aVisitor.mPresContext, &event,
|
||||
content, PR_TRUE, &status);
|
||||
|
|
|
@ -1079,6 +1079,8 @@ nsTextEditorFocusListener::Focus(nsIDOMEvent* aEvent)
|
|||
// turn on selection and caret
|
||||
if (mEditor)
|
||||
{
|
||||
aEvent->StopPropagation();
|
||||
|
||||
PRUint32 flags;
|
||||
mEditor->GetFlags(&flags);
|
||||
if (! (flags & nsIPlaintextEditor::eEditorDisabledMask))
|
||||
|
@ -1133,6 +1135,8 @@ nsTextEditorFocusListener::Blur(nsIDOMEvent* aEvent)
|
|||
// turn off selection and caret
|
||||
if (mEditor)
|
||||
{
|
||||
aEvent->StopPropagation();
|
||||
|
||||
// when imeEditor exists, call ForceCompositionEnd() to tell
|
||||
// the input focus is leaving first
|
||||
nsCOMPtr<nsIEditorIMESupport> imeEditor = do_QueryInterface(mEditor);
|
||||
|
|
Загрузка…
Ссылка в новой задаче