| Index: chrome/browser/ui/views/frame/browser_view.cc
|
| diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
|
| index bcf02326df3ae7cd0bb1caf9e3722c873bd96ebe..0c002fbd1ebe9dd88ff06df7367c6c0dec16edf8 100644
|
| --- a/chrome/browser/ui/views/frame/browser_view.cc
|
| +++ b/chrome/browser/ui/views/frame/browser_view.cc
|
| @@ -2134,6 +2134,17 @@ void BrowserView::UpdateDevToolsForContents(
|
| DevToolsContentsResizingStrategy());
|
| }
|
| contents_container_->Layout();
|
| +
|
| + if (devtools) {
|
| + // When strategy.hide_inspected_contents() returns true, we are hiding
|
| + // contents_web_view_ behind the devtools_web_view_. Otherwise,
|
| + // contents_web_view_ should be right above the devtools_web_view_.
|
| + int devtools_index = contents_container_->GetIndexOf(devtools_web_view_);
|
| + int contents_index = contents_container_->GetIndexOf(contents_web_view_);
|
| + bool devtools_is_on_top = devtools_index > contents_index;
|
| + if (strategy.hide_inspected_contents() != devtools_is_on_top)
|
| + contents_container_->ReorderChildView(contents_web_view_, devtools_index);
|
| + }
|
| }
|
|
|
| void BrowserView::UpdateUIForContents(WebContents* contents) {
|
|
|