mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-24 21:33:09 +09:00
Issue #2135 - Bug 1066965: Make contentEditable and spellchecking to work in Shadow DOM
This commit is contained in:
parent
b2c77e5eda
commit
010db07bf3
10 changed files with 60 additions and 30 deletions
|
|
@ -3679,10 +3679,11 @@ CompareToRangeStart(nsINode* aCompareNode, int32_t aCompareOffset,
|
|||
{
|
||||
nsINode* start = aRange->GetStartParent();
|
||||
NS_ENSURE_STATE(aCompareNode && start);
|
||||
// If the nodes that we're comparing are not in the same document,
|
||||
// assume that aCompareNode will fall at the end of the ranges.
|
||||
// If the nodes that we're comparing are not in the same document or in the
|
||||
// same subtree, assume that aCompareNode will fall at the end of the ranges.
|
||||
if (aCompareNode->GetComposedDoc() != start->GetComposedDoc() ||
|
||||
!start->GetComposedDoc()) {
|
||||
!start->GetComposedDoc() ||
|
||||
aCompareNode->SubtreeRoot() != start->SubtreeRoot()) {
|
||||
*aCmp = 1;
|
||||
} else {
|
||||
*aCmp = nsContentUtils::ComparePoints(aCompareNode, aCompareOffset,
|
||||
|
|
@ -3697,10 +3698,11 @@ CompareToRangeEnd(nsINode* aCompareNode, int32_t aCompareOffset,
|
|||
{
|
||||
nsINode* end = aRange->GetEndParent();
|
||||
NS_ENSURE_STATE(aCompareNode && end);
|
||||
// If the nodes that we're comparing are not in the same document,
|
||||
// assume that aCompareNode will fall at the end of the ranges.
|
||||
// If the nodes that we're comparing are not in the same document or in the
|
||||
// same subtree, assume that aCompareNode will fall at the end of the ranges.
|
||||
if (aCompareNode->GetComposedDoc() != end->GetComposedDoc() ||
|
||||
!end->GetComposedDoc()) {
|
||||
!end->GetComposedDoc() ||
|
||||
aCompareNode->SubtreeRoot() != end->SubtreeRoot()) {
|
||||
*aCmp = 1;
|
||||
} else {
|
||||
*aCmp = nsContentUtils::ComparePoints(aCompareNode, aCompareOffset,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue