refactor: remove redundant resizing strategy equality check (#38596)

* refactor: remove redundant resizing strategy equality check

Upstream already checks this.
This commit is contained in:
Charles Kerr 2023-06-06 14:03:39 -05:00 committed by GitHub
parent 7982c6cee2
commit 5c1321b20a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 10 deletions

View file

@ -21,6 +21,7 @@
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/browser/devtools/devtools_contents_resizing_strategy.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/scoped_user_pref_update.h"
@ -624,13 +625,8 @@ void InspectableWebContents::AddDevToolsExtensionsToClient() {
#endif
void InspectableWebContents::SetInspectedPageBounds(const gfx::Rect& rect) {
DevToolsContentsResizingStrategy strategy(rect);
if (contents_resizing_strategy_.Equals(strategy))
return;
contents_resizing_strategy_.CopyFrom(strategy);
if (managed_devtools_web_contents_)
view_->SetContentsResizingStrategy(contents_resizing_strategy_);
view_->SetContentsResizingStrategy(DevToolsContentsResizingStrategy{rect});
}
void InspectableWebContents::InspectElementCompleted() {}