Handle detached nodes in ComparePreorderTreePosition The method now correctly handles detached nodes and nodes from different Documents by checking the topmost ancestor during the depth calculation in ComparePreorderTreePosition. If the two nodes do not share the same Document as their topmost ancestor or if either is detached, return 0 to indicate no relative preorder tree position without causing a null-pointer dereference during the LCA search. TAG=agy CONV=57441e29-f47e-47f2-8367-dbfe2bf6e459 Fixed: 533050757 Change-Id: I09403b3294231594cb0d56f0e51f936c4272eb46 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8083742 Reviewed-by: Joey Arhar <jarhar@chromium.org> Commit-Queue: Mustaq Ahmed <mustaq@chromium.org> Cr-Commit-Position: refs/heads/main@{#1661286} NOKEYCHECK=True GitOrigin-RevId: 46e117af28cb5223fdade49a348e872c67efa981
The third_party directory contains sources from other projects.
For guidelines on adding a new package to the third_party directory can be found at //docs/adding_to_third_party.md