fix: use Chromium's way to compute min/max sizes (#38974)
This commit is contained in:
parent
52fe76ca28
commit
3fa15ebb7e
6 changed files with 96 additions and 397 deletions
|
@ -423,6 +423,13 @@ class NativeWindow : public base::SupportsUserData,
|
|||
// The "titleBarStyle" option.
|
||||
TitleBarStyle title_bar_style_ = TitleBarStyle::kNormal;
|
||||
|
||||
// Minimum and maximum size.
|
||||
absl::optional<extensions::SizeConstraints> size_constraints_;
|
||||
// Same as above but stored as content size, we are storing 2 types of size
|
||||
// constraints beacause converting between them will cause rounding errors
|
||||
// on HiDPI displays on some environments.
|
||||
absl::optional<extensions::SizeConstraints> content_size_constraints_;
|
||||
|
||||
std::queue<bool> pending_transitions_;
|
||||
FullScreenTransitionState fullscreen_transition_state_ =
|
||||
FullScreenTransitionState::kNone;
|
||||
|
@ -450,9 +457,6 @@ class NativeWindow : public base::SupportsUserData,
|
|||
// Whether window is transparent.
|
||||
bool transparent_ = false;
|
||||
|
||||
// Minimum and maximum size, stored as content size.
|
||||
extensions::SizeConstraints size_constraints_;
|
||||
|
||||
// Whether window can be resized larger than screen.
|
||||
bool enable_larger_than_screen_ = false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue