зеркало из https://github.com/electron/electron.git
refactor: replace DeprecatedLayoutImmediately() calls with InvalidateLayout()
Xref: https://crbug.com/1121681 Xref: https://chromium-review.googlesource.com/c/chromium/src/+/5242027
This commit is contained in:
Родитель
67ba30402b
Коммит
c6cd09985f
|
@ -100,7 +100,7 @@ BrowserWindow::BrowserWindow(gin::Arguments* args,
|
|||
// Note that |GetContentsView|, confusingly, does not refer to the same thing
|
||||
// as |BaseWindow::GetContentView|.
|
||||
window()->GetContentsView()->AddChildViewAt(web_contents_view->view(), 0);
|
||||
window()->GetContentsView()->DeprecatedLayoutImmediately();
|
||||
window()->GetContentsView()->InvalidateLayout();
|
||||
|
||||
// Init window after everything has been setup.
|
||||
window()->InitFromOptions(options);
|
||||
|
|
|
@ -365,7 +365,7 @@ void NativeWindowMac::SetContentView(views::View* view) {
|
|||
set_content_view(view);
|
||||
root_view->AddChildView(content_view());
|
||||
|
||||
root_view->DeprecatedLayoutImmediately();
|
||||
root_view->InvalidateLayout();
|
||||
}
|
||||
|
||||
void NativeWindowMac::Close() {
|
||||
|
|
|
@ -474,7 +474,7 @@ void NativeWindowViews::SetContentView(views::View* view) {
|
|||
set_content_view(view);
|
||||
focused_view_ = view;
|
||||
root_view_.GetMainView()->AddChildView(content_view());
|
||||
root_view_.GetMainView()->DeprecatedLayoutImmediately();
|
||||
root_view_.GetMainView()->InvalidateLayout();
|
||||
}
|
||||
|
||||
void NativeWindowViews::Close() {
|
||||
|
|
|
@ -123,7 +123,7 @@ void InspectableWebContentsView::ShowDevTools(bool activate) {
|
|||
devtools_web_view_->SetWebContents(
|
||||
inspectable_web_contents_->GetDevToolsWebContents());
|
||||
devtools_web_view_->RequestFocus();
|
||||
DeprecatedLayoutImmediately();
|
||||
InvalidateLayout();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -144,7 +144,7 @@ void InspectableWebContentsView::CloseDevTools() {
|
|||
} else {
|
||||
devtools_web_view_->SetVisible(false);
|
||||
devtools_web_view_->SetWebContents(nullptr);
|
||||
DeprecatedLayoutImmediately();
|
||||
InvalidateLayout();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -193,7 +193,7 @@ void InspectableWebContentsView::SetIsDocked(bool docked, bool activate) {
|
|||
void InspectableWebContentsView::SetContentsResizingStrategy(
|
||||
const DevToolsContentsResizingStrategy& strategy) {
|
||||
strategy_.CopyFrom(strategy);
|
||||
DeprecatedLayoutImmediately();
|
||||
InvalidateLayout();
|
||||
}
|
||||
|
||||
void InspectableWebContentsView::SetTitle(const std::u16string& title) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче