mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1911009 - Ensure nsRange::mCrossShadowBoundaryRange can only be created when both nodes are in the document r=jjaschke,dom-core
Differential Revision: https://phabricator.services.mozilla.com/D218352
This commit is contained in:
parent
63d5d93f51
commit
027dd359b1
@ -3512,6 +3512,12 @@ void nsRange::CreateOrUpdateCrossShadowBoundaryRangeIfNeeded(
|
||||
return;
|
||||
}
|
||||
|
||||
// Nodes at least needs to be in the same document.
|
||||
if (startNode && endNode &&
|
||||
startNode->GetComposedDoc() != endNode->GetComposedDoc()) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto CanBecomeCrossShadowBoundaryPoint = [](nsINode* aContainer) -> bool {
|
||||
if (!aContainer) {
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user