зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1671768 - Part 1: Use MOZ_CAN_RUN_SCRIPT for Selection::StyledRanges::MaybeFocusCommonEditingHost r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D103777
This commit is contained in:
Родитель
2cdca4441a
Коммит
03a9abe590
|
@ -3130,7 +3130,8 @@ nsresult Selection::NotifySelectionListeners() {
|
||||||
// browsers don't do it either.
|
// browsers don't do it either.
|
||||||
if (mSelectionType == SelectionType::eNormal &&
|
if (mSelectionType == SelectionType::eNormal &&
|
||||||
calledByJSRestorer.SavedValue()) {
|
calledByJSRestorer.SavedValue()) {
|
||||||
mStyledRanges.MaybeFocusCommonEditingHost(GetPresShell());
|
RefPtr<PresShell> presShell = GetPresShell();
|
||||||
|
mStyledRanges.MaybeFocusCommonEditingHost(presShell);
|
||||||
}
|
}
|
||||||
|
|
||||||
RefPtr<nsFrameSelection> frameSelection = mFrameSelection;
|
RefPtr<nsFrameSelection> frameSelection = mFrameSelection;
|
||||||
|
|
|
@ -860,7 +860,7 @@ class Selection final : public nsSupportsWeakReference,
|
||||||
*/
|
*/
|
||||||
Element* GetCommonEditingHost() const;
|
Element* GetCommonEditingHost() const;
|
||||||
|
|
||||||
MOZ_CAN_RUN_SCRIPT_BOUNDARY void MaybeFocusCommonEditingHost(
|
MOZ_CAN_RUN_SCRIPT void MaybeFocusCommonEditingHost(
|
||||||
PresShell* aPresShell) const;
|
PresShell* aPresShell) const;
|
||||||
|
|
||||||
static nsresult SubtractRange(StyledRange& aRange, nsRange& aSubtract,
|
static nsresult SubtractRange(StyledRange& aRange, nsRange& aSubtract,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче