Attention is currently required from: vmpstr.
Joey Arhar would like vmpstr to review this change.
ComputeContainerNode -> AnchorNode for ScopedForcedUpdate
In crrev.com/921268 I replaced the usage of AnchorNode with a Range
based unlock. In crrev.com/937171 I re-added the removed single node
unlock, but instead of using AnchorNode like I should have, I used
ComputeContainerNode.
ComputeContainerNode is used for the Range based unlock because that's
what Range uses in its constructor and it must be non-null for Ranges.
The test case is unminimized so I didn't include a test in this patch,
but I verified with the clusterfuzz repro tool that this fixes the bug.
Fixed: 1266366
Change-Id: I8416d1c28ebad3ff6fc5341ca8e8ea740133eb83
---
M third_party/blink/renderer/core/editing/frame_selection.cc
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/third_party/blink/renderer/core/editing/frame_selection.cc b/third_party/blink/renderer/core/editing/frame_selection.cc
index 41f9c2c..05898bd 100644
--- a/third_party/blink/renderer/core/editing/frame_selection.cc
+++ b/third_party/blink/renderer/core/editing/frame_selection.cc
@@ -168,8 +168,7 @@
DisplayLockContext::ForcedPhase::kLayout);
} else {
force_locks = DisplayLockUtilities::ScopedForcedUpdate(
- base.ComputeContainerNode(),
- DisplayLockContext::ForcedPhase::kLayout);
+ base.AnchorNode(), DisplayLockContext::ForcedPhase::kLayout);
}
GetDocument().UpdateStyleAndLayout(DocumentUpdateReason::kSelection);
return ComputeVisibleSelectionInDOMTree();
To view, visit change 3260206. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: vmpstr.
Patch set 1:Auto-Submit +1Commit-Queue +1
Attention is currently required from: Joey Arhar.
Patch set 2:Code-Review +1Commit-Queue +2
Chromium LUCI CQ submitted this change.
ComputeContainerNode -> AnchorNode for ScopedForcedUpdate
In crrev.com/921268 I replaced the usage of AnchorNode with a Range
based unlock. In crrev.com/937171 I re-added the removed single node
unlock, but instead of using AnchorNode like I should have, I used
ComputeContainerNode.
ComputeContainerNode is used for the Range based unlock because that's
what Range uses in its constructor and it must be non-null for Ranges.
The test case is unminimized so I didn't include a test in this patch,
but I verified with the clusterfuzz repro tool that this fixes the bug.
Fixed: 1266366
Change-Id: I8416d1c28ebad3ff6fc5341ca8e8ea740133eb83
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3260206
Commit-Queue: Joey Arhar <jar...@chromium.org>
Commit-Queue: vmpstr <vmp...@chromium.org>
Reviewed-by: vmpstr <vmp...@chromium.org>
Auto-Submit: Joey Arhar <jar...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#938025}
---
M third_party/blink/renderer/core/editing/frame_selection.cc
1 file changed, 28 insertions(+), 2 deletions(-)
diff --git a/third_party/blink/renderer/core/editing/frame_selection.cc b/third_party/blink/renderer/core/editing/frame_selection.cc
index 3da2a3a..c5372cb 100644
--- a/third_party/blink/renderer/core/editing/frame_selection.cc
+++ b/third_party/blink/renderer/core/editing/frame_selection.cc
@@ -169,8 +169,7 @@
DisplayLockContext::ForcedPhase::kLayout);
} else {
force_locks = DisplayLockUtilities::ScopedForcedUpdate(
- base.ComputeContainerNode(),
- DisplayLockContext::ForcedPhase::kLayout);
+ base.AnchorNode(), DisplayLockContext::ForcedPhase::kLayout);
}
GetDocument().UpdateStyleAndLayout(DocumentUpdateReason::kSelection);
return ComputeVisibleSelectionInDOMTree();
To view, visit change 3260206. To unsubscribe, or for help writing mail filters, visit settings.