[Files F2] Refine rename/focus logic for directory tree container * `insertBefore` in the directory tree container causes the tree item to lose states like focus/rename, we need to restore them if needed. * Add `renameItemWithKeyWhenRendered/focusItemWithKeyWhenRendered` methods for the directory tree container to handle cases where we want to rename/focus items which are not rendered yet. * When a focused tree item is deleted, we need to update the focused item to either currently selected item or item which will become selected later, otherwise the focus will go back to BODY. * Enable DirectoryTreeContextMenu browser tests with the new tree to test all above changes. Bug: b:302642915 Test: browser_tests --gtest_filter="DirectoryTreeContextMenu/*" Change-Id: If987c033fa928209e8ce3e2ec19ba7be2e661f8f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4940461 Reviewed-by: Luciano Pacheco <lucmult@chromium.org> Commit-Queue: Wenbo Jie <wenbojie@chromium.org> Cr-Commit-Position: refs/heads/main@{#1211329}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.