Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed blank tab is shown after attaching split view
fix brave/brave-browser#41852 When split view transfers to another browser, its web contents should be cleared before attached to target browser. It's done by SplitView::UpdateContentsWebViewVisual(). So far, we posted it to next turn when we break tile. If we break a tile by unsplit, it doesn't cause any issue because any other secondary web view doesn't host that secondary web contents. However, if it's attached to another browser window, it's another story. When we detach a split view from browser A and attach to browser B, browser A breaks a tile after detached. And then, they are attached to browser B and we make them as a split view. If we don't clear secondary web contents after break the tile synchronously, browser A and browser B's secondary web view has same web contents till posed `UpdateContentsWebViewVisual(). This could cause unexpected behavior like above issue. So, secondary web view should be cleared synchronously after breaking a tile.
- Loading branch information