зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 429187de34ff (bug 1779269) for causing geckoview-junit failures CLOSED TREE
This commit is contained in:
Родитель
b6d609f852
Коммит
42e074c74e
|
@ -820,9 +820,23 @@ already_AddRefed<nsFrameSelection> AccessibleCaretManager::GetFrameSelection()
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
nsFocusManager* fm = nsFocusManager::GetFocusManager();
|
||||
MOZ_ASSERT(fm);
|
||||
|
||||
nsIContent* focusedContent = fm->GetFocusedElement();
|
||||
if (!focusedContent) {
|
||||
// For non-editable content
|
||||
return mPresShell->FrameSelection();
|
||||
}
|
||||
|
||||
nsIFrame* focusFrame = focusedContent->GetPrimaryFrame();
|
||||
if (!focusFrame) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Prevent us from touching the nsFrameSelection associated with other
|
||||
// PresShell.
|
||||
RefPtr<nsFrameSelection> fs = mPresShell->GetLastFocusedFrameSelection();
|
||||
RefPtr<nsFrameSelection> fs = focusFrame->GetFrameSelection();
|
||||
if (!fs || fs->GetPresShell() != mPresShell) {
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@ class AccessibleCaretSelectionModeTestCase(MarionetteTestCase):
|
|||
_input_size_id = "input-size"
|
||||
_textarea_id = "textarea"
|
||||
_textarea2_id = "textarea2"
|
||||
_textarea_disabled_id = "textarea-disabled"
|
||||
_textarea_one_line_id = "textarea-one-line"
|
||||
_textarea_rtl_id = "textarea-rtl"
|
||||
_contenteditable_id = "contenteditable"
|
||||
|
@ -171,7 +170,6 @@ class AccessibleCaretSelectionModeTestCase(MarionetteTestCase):
|
|||
|
||||
@parameterized(_input_id, el_id=_input_id)
|
||||
@parameterized(_textarea_id, el_id=_textarea_id)
|
||||
@parameterized(_textarea_disabled_id, el_id=_textarea_disabled_id)
|
||||
@parameterized(_textarea_rtl_id, el_id=_textarea_rtl_id)
|
||||
@parameterized(_contenteditable_id, el_id=_contenteditable_id)
|
||||
@parameterized(_content_id, el_id=_content_id)
|
||||
|
@ -195,7 +193,6 @@ class AccessibleCaretSelectionModeTestCase(MarionetteTestCase):
|
|||
|
||||
@parameterized(_input_id, el_id=_input_id)
|
||||
@parameterized(_textarea_id, el_id=_textarea_id)
|
||||
@parameterized(_textarea_disabled_id, el_id=_textarea_disabled_id)
|
||||
@parameterized(_textarea_rtl_id, el_id=_textarea_rtl_id)
|
||||
@parameterized(_contenteditable_id, el_id=_contenteditable_id)
|
||||
@parameterized(_content_id, el_id=_content_id)
|
||||
|
@ -229,7 +226,6 @@ class AccessibleCaretSelectionModeTestCase(MarionetteTestCase):
|
|||
|
||||
@parameterized(_input_id, el_id=_input_id)
|
||||
@parameterized(_textarea_id, el_id=_textarea_id)
|
||||
@parameterized(_textarea_disabled_id, el_id=_textarea_disabled_id)
|
||||
@parameterized(_textarea_rtl_id, el_id=_textarea_rtl_id)
|
||||
@parameterized(_contenteditable_id, el_id=_contenteditable_id)
|
||||
@parameterized(_content_id, el_id=_content_id)
|
||||
|
@ -267,7 +263,6 @@ class AccessibleCaretSelectionModeTestCase(MarionetteTestCase):
|
|||
|
||||
@parameterized(_input_id, el_id=_input_id)
|
||||
@parameterized(_textarea_id, el_id=_textarea_id)
|
||||
@parameterized(_textarea_disabled_id, el_id=_textarea_disabled_id)
|
||||
@parameterized(_textarea_rtl_id, el_id=_textarea_rtl_id)
|
||||
@parameterized(_contenteditable_id, el_id=_contenteditable_id)
|
||||
@parameterized(_content_id, el_id=_content_id)
|
||||
|
@ -400,7 +395,6 @@ class AccessibleCaretSelectionModeTestCase(MarionetteTestCase):
|
|||
|
||||
@parameterized(_input_id, el_id=_input_id)
|
||||
@parameterized(_textarea_id, el_id=_textarea_id)
|
||||
@parameterized(_textarea_disabled_id, el_id=_textarea_disabled_id)
|
||||
@parameterized(_textarea_rtl_id, el_id=_textarea_rtl_id)
|
||||
@parameterized(_contenteditable_id, el_id=_contenteditable_id)
|
||||
@parameterized(_content_id, el_id=_content_id)
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
<br>
|
||||
<div>
|
||||
<textarea id="textarea" rows="4" cols="8">ABC DEF GHI JKL MNO PQR</textarea>
|
||||
<textarea id="textarea-disabled" rows="4" cols="8" disabled>ABC DEF GHI JKL MNO PQR</textarea>
|
||||
<textarea id="textarea-one-line" rows="4" cols="12">ABC DEF GHI</textarea>
|
||||
</div>
|
||||
<br>
|
||||
|
|
Загрузка…
Ссылка в новой задаче