Backed out 1 changesets (bug 1443902) for reftest failures reftest/tests/editor/reftests/1443902-2.html CLOSED TREE

Backed out changeset 4c31558d3481 (bug 1443902)
This commit is contained in:
Ciure Andrei 2018-07-10 05:50:31 +03:00
Родитель 281b4c08f4
Коммит b37e54e443
12 изменённых файлов: 0 добавлений и 181 удалений

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

@ -2339,20 +2339,6 @@ nsHTMLDocument::TurnEditingOff()
mEditingState = eOff;
// Editor resets selection since it is being destroyed. But if focus is
// still into editable control, we have to initialize selection again.
nsFocusManager* fm = nsFocusManager::GetFocusManager();
if (fm) {
Element* element = fm->GetFocusedElement();
nsCOMPtr<nsITextControlElement> txtCtrl = do_QueryInterface(element);
if (txtCtrl) {
RefPtr<TextEditor> textEditor = txtCtrl->GetTextEditor();
if (textEditor) {
textEditor->ReinitializeSelection(*element);
}
}
}
return NS_OK;
}

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

@ -4799,23 +4799,6 @@ EditorBase::FinalizeSelection()
return NS_OK;
}
void
EditorBase::ReinitializeSelection(Element& aElement)
{
if (NS_WARN_IF(Destroyed())) {
return;
}
OnFocus(&aElement);
nsPresContext* context = GetPresContext();
if (NS_WARN_IF(!context)) {
return;
}
nsCOMPtr<nsIContent> focusedContent = GetFocusedContentForIME();
IMEStateManager::OnFocusInEditor(context, focusedContent, *this);
}
Element*
EditorBase::GetEditorRoot()
{

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

@ -672,14 +672,6 @@ public:
*/
void SyncRealTimeSpell();
/**
* This method re-initializes the selection and caret state that are for
* current editor state. When editor session is destroyed, it always reset
* selection state even if this has no focus. So if destroying editor,
* we have to call this method for focused editor to set selection state.
*/
void ReinitializeSelection(Element& aElement);
protected: // May be called by friends.
/****************************************************************************
* Some classes like TextEditRules, HTMLEditRules, WSRunObject which are

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

@ -1,15 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<script>
function init()
{
document.getElementById("t1").focus();
document.getElementById("t1").setSelectionRange(4, 4);
}
</script>
</head>
<body onload="init()">
<textarea id=t1 contenteditable=true>ABCD</textarea>
</body>
</html>

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

@ -1,16 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<script>
function init()
{
document.getElementById("t1").focus();
document.getElementById("t1").setSelectionRange(4, 4);
document.getElementById("t1").setAttribute("contentEditable", "false");
}
</script>
</head>
<body onload="init()">
<textarea id=t1 contenteditable=true>ABCD</textarea>
</body>
</html>

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

@ -1,17 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<script>
function init()
{
document.getElementById("t1").focus();
document.getElementById("t1").setSelectionRange(4, 4);
}
</script>
</head>
<body onload="init()">
<div id="d1">
<input type="text" id=t1 value="ABCD">
</div>
</body>
</html>

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

@ -1,18 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<script>
function init()
{
document.getElementById("t1").focus();
document.getElementById("t1").setSelectionRange(4, 4);
document.getElementById("d1").setAttribute("contentEditable", "false");
}
</script>
</head>
<body onload="init()">
<div contenteditable=true id="d1">
<input type="text" id=t1 value="ABCD">
</div>
</body>
</html>

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

@ -1,17 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<script>
function init()
{
document.getElementById("t1").focus();
document.getElementById("t1").setSelectionRange(0, 1);
}
</script>
</head>
<body onload="init()">
<div>
<input type="text" id=t1 value="ABCD" readonly>
</div>
</body>
</html>

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

@ -1,18 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<script>
function init()
{
document.getElementById("t1").focus();
document.getElementById("t1").setSelectionRange(0, 1);
document.getElementById("d1").setAttribute("contentEditable", "false");
}
</script>
</head>
<body onload="init()">
<div contenteditable=true id="d1">
<input type="text" id=t1 value="ABCD" readonly>
</div>
</body>
</html>

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

@ -1,18 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<script>
function init()
{
document.getElementById("t1").focus();
document.getElementById("t1").setSelectionRange(4, 4);
}
</script>
</head>
<body onload="init()">
<div id="d1">
<input type="text">
</div>
<input type="text" id=t1 value="ABCD">
</body>
</html>

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

@ -1,19 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<script>
function init()
{
document.getElementById("t1").focus();
document.getElementById("t1").setSelectionRange(4, 4);
document.getElementById("d1").setAttribute("contentEditable", "false");
}
</script>
</head>
<body onload="init()">
<div contenteditable=true id="d1">
<input type="text">
</div>
<input type="text" id=t1 value="ABCD">
</body>
</html>

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

@ -135,7 +135,3 @@ needs-focus == spellcheck-contenteditable-focused-reframe.html spellcheck-conten
needs-focus == 969773.html 969773-ref.html
fuzzy-if(skiaContent,1,220) == 997805.html 997805-ref.html
fuzzy-if(skiaContent,1,220) skip-if(verify&&OSX) == 1088158.html 1088158-ref.html
needs-focus == 1443902-1.html 1443902-1-ref.html
needs-focus == 1443902-2.html 1443902-2-ref.html
needs-focus == 1443902-3.html 1443902-3-ref.html
needs-focus == 1443902-4.html 1443902-4-ref.html