Bug 1943226 - Make nsFrameSelection treat limiters are elements r=jjaschke,dom-core
`nsFrameSelection::GetLimiter()` is not `nullptr` only when it's an instance for an independent selection of a text control. In the case, it's set to the editor root anonymous `<div>` of the text control. Despite the name, this is already optimized only for this purpose in `nsFrameSelection::NodeIsInLimiters()`. Thus, we don't have any problems to make this clearer for the other developers with renaming some parameter names. `nsFrameSelection::GetAncestorLimiter()` is also always an `Element`. So, we can change this to `Element` too. Differential Revision: https://phabricator.services.mozilla.com/D235254
This commit is contained in:
@@ -1063,7 +1063,7 @@ nsresult HTMLEditor::CollapseSelectionToEndOfLastLeafNodeOfDocument() const {
|
||||
}
|
||||
|
||||
void HTMLEditor::InitializeSelectionAncestorLimit(
|
||||
nsIContent& aAncestorLimit) const {
|
||||
Element& aAncestorLimit) const {
|
||||
MOZ_ASSERT(IsEditActionDataAvailable());
|
||||
|
||||
// Hack for initializing selection.
|
||||
@@ -7450,7 +7450,7 @@ void HTMLEditor::NotifyEditingHostMaybeChanged() {
|
||||
}
|
||||
|
||||
// Compute current editing host.
|
||||
nsIContent* editingHost = ComputeEditingHost();
|
||||
Element* const editingHost = ComputeEditingHost();
|
||||
if (NS_WARN_IF(!editingHost)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user