Backout changeset 2705abe8d3f2 (bug 686247) again because of the accessibility test failures

This commit is contained in:
Ehsan Akhgari 2011-09-13 17:42:43 -04:00
Родитель f4cbad79bb
Коммит 2cb2e9f876
7 изменённых файлов: 27 добавлений и 57 удалений

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

@ -35,6 +35,10 @@
new invokerChecker(EVENT_FOCUS, getAccessible, this.linkNode) new invokerChecker(EVENT_FOCUS, getAccessible, this.linkNode)
]; ];
this.unexpectedEventSeq = [
new invokerChecker(EVENT_REORDER, this.linkNode.parentNode)
];
this.invoke = function focusAnchor_invoke() this.invoke = function focusAnchor_invoke()
{ {
this.linkNode.focus(); this.linkNode.focus();
@ -42,9 +46,8 @@
this.check = function focusAnchor_check(aEvent) this.check = function focusAnchor_check(aEvent)
{ {
todo_is(this.link, aEvent.accessible, is(this.link, aEvent.accessible,
"Focus should be fired against new link accessible!"); "The link accessible shouldn't be recreated!");
todo(false, "Doubled reorder events!");
} }
this.getID = function focusAnchor_getID() this.getID = function focusAnchor_getID()
@ -62,6 +65,10 @@
new invokerChecker(EVENT_FOCUS, getAccessible, this.linkNode) new invokerChecker(EVENT_FOCUS, getAccessible, this.linkNode)
]; ];
this.unexpectedEventSeq = [
new invokerChecker(EVENT_REORDER, this.linkNode.parentNode)
];
this.invoke = function tabAnchor_invoke() this.invoke = function tabAnchor_invoke()
{ {
synthesizeKey("VK_TAB", { shiftKey: false }); synthesizeKey("VK_TAB", { shiftKey: false });
@ -69,9 +76,8 @@
this.check = function tabAnchor_check(aEvent) this.check = function tabAnchor_check(aEvent)
{ {
todo_isnot(this.link, aEvent.accessible, is(this.link, aEvent.accessible,
"Focus should be fired against new link accessible!"); "The link accessible shouldn't be recreated!");
todo(false, "Doubled reorder events!");
} }
this.getID = function tabAnchor_getID() this.getID = function tabAnchor_getID()
@ -120,9 +126,9 @@
Mozilla Bug 570275 Mozilla Bug 570275
</a><br> </a><br>
<a target="_blank" <a target="_blank"
title="Text control frames should accept dynamic changes to the CSS overflow property" title="Don't recreate frames for inlines with overflow style applied"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=686247"> href="https://bugzilla.mozilla.org/show_bug.cgi?id=606087">
Mozilla Bug 686247 Mozilla Bug 606087
</a><br> </a><br>
<p id="display"></p> <p id="display"></p>

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

@ -1058,9 +1058,6 @@ nsTextEditorState::BindToFrame(nsTextControlFrame* aFrame)
nsIContent *rootNode = GetRootNode(); nsIContent *rootNode = GetRootNode();
nsresult rv = InitializeRootNode();
NS_ENSURE_SUCCESS(rv, rv);
nsIPresShell *shell = mBoundFrame->PresContext()->GetPresShell(); nsIPresShell *shell = mBoundFrame->PresContext()->GetPresShell();
NS_ENSURE_TRUE(shell, NS_ERROR_FAILURE); NS_ENSURE_TRUE(shell, NS_ERROR_FAILURE);
@ -1548,17 +1545,6 @@ nsTextEditorState::CreateRootNode()
NOT_FROM_PARSER); NOT_FROM_PARSER);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
if (!IsSingleLineTextControl()) {
mMutationObserver = new nsAnonDivObserver(this);
mRootNode->AddMutationObserver(mMutationObserver);
}
return rv;
}
nsresult
nsTextEditorState::InitializeRootNode()
{
// Set the necessary classes on the text control. We use class values // Set the necessary classes on the text control. We use class values
// instead of a 'style' attribute so that the style comes from a user-agent // instead of a 'style' attribute so that the style comes from a user-agent
// style sheet and is still applied even if author styles are disabled. // style sheet and is still applied even if author styles are disabled.
@ -1578,12 +1564,19 @@ nsTextEditorState::InitializeRootNode()
disp->mOverflowX != NS_STYLE_OVERFLOW_CLIP) { disp->mOverflowX != NS_STYLE_OVERFLOW_CLIP) {
classValue.AppendLiteral(" inherit-overflow"); classValue.AppendLiteral(" inherit-overflow");
} }
mMutationObserver = new nsAnonDivObserver(this);
NS_ENSURE_TRUE(mMutationObserver, NS_ERROR_OUT_OF_MEMORY);
mRootNode->AddMutationObserver(mMutationObserver);
} }
nsresult rv = mRootNode->SetAttr(kNameSpaceID_None, nsGkAtoms::_class, rv = mRootNode->SetAttr(kNameSpaceID_None, nsGkAtoms::_class,
classValue, PR_FALSE); classValue, PR_FALSE);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
return mBoundFrame->UpdateValueDisplay(PR_FALSE); rv = mBoundFrame->UpdateValueDisplay(PR_FALSE);
NS_ENSURE_SUCCESS(rv, rv);
return rv;
} }
nsresult nsresult

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

@ -253,8 +253,6 @@ private:
void DestroyEditor(); void DestroyEditor();
void Clear(); void Clear();
nsresult InitializeRootNode();
void FinishedRestoringSelection() { mRestoringSelection = nsnull; } void FinishedRestoringSelection() { mRestoringSelection = nsnull; }
class InitializationGuard { class InitializationGuard {

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

@ -1,13 +0,0 @@
<!DOCTYPE html>
<html>
<body>
<textarea rows="2" style="overflow: hidden;">
this
is
a
textarea
with
overflow
</textarea>
</body>
</html>

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

@ -1,13 +0,0 @@
<!DOCTYPE html>
<html>
<body onload="document.querySelector('textarea').style.overflow='hidden'">
<textarea rows="2">
this
is
a
textarea
with
overflow
</textarea>
</body>
</html>

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

@ -69,4 +69,3 @@ skip-if(Android) == 674212-spellcheck.html 674212-spellcheck-ref.html
skip-if(Android) == 338427-2.html 338427-2-ref.html skip-if(Android) == 338427-2.html 338427-2-ref.html
skip-if(Android) == 338427-3.html 338427-3-ref.html skip-if(Android) == 338427-3.html 338427-3-ref.html
skip-if(Android) == 462758-grabbers-resizers.html 462758-grabbers-resizers-ref.html skip-if(Android) == 462758-grabbers-resizers.html 462758-grabbers-resizers-ref.html
== dynamic-overflow-change.html dynamic-overflow-change-ref.html

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

@ -2180,8 +2180,8 @@ nsChangeHint nsStyleDisplay::CalcDifference(const nsStyleDisplay& aOther) const
|| mPosition != aOther.mPosition || mPosition != aOther.mPosition
|| mDisplay != aOther.mDisplay || mDisplay != aOther.mDisplay
|| (mFloats == NS_STYLE_FLOAT_NONE) != (aOther.mFloats == NS_STYLE_FLOAT_NONE) || (mFloats == NS_STYLE_FLOAT_NONE) != (aOther.mFloats == NS_STYLE_FLOAT_NONE)
|| mOverflowX != aOther.mOverflowX || (mOverflowX != aOther.mOverflowX && mDisplay != NS_STYLE_DISPLAY_INLINE)
|| mOverflowY != aOther.mOverflowY || (mOverflowY != aOther.mOverflowY && mDisplay != NS_STYLE_DISPLAY_INLINE)
|| mResize != aOther.mResize) || mResize != aOther.mResize)
NS_UpdateHint(hint, nsChangeHint_ReconstructFrame); NS_UpdateHint(hint, nsChangeHint_ReconstructFrame);