Cleanup Win32 nsWindow size mode logic
Categories
(Core :: Widget: Win32, enhancement, P3)
Tracking
()
People
(Reporter: cmartin, Assigned: cmartin)
Details
Attachments
(7 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
The logic of the Win32 nsWindow mSizeMode
is rather difficult to follow, as it goes through a bit of a maze of code, is touched by Win32 API callbacks after it is set, etc. As a result, there are likely subtle bugs and other hard-to-reason-about behavior, and maintainability also suffers.
Let's try and refactor this code a bit to pull mSizeMode
and others into some objects and try to enforce some variants around them so we can more easily reason about this code.
Assignee | ||
Comment 1•2 years ago
|
||
Assignee | ||
Updated•2 years ago
|
Pushed by cmartin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/83586d05e4b9 Cleanup Win32 nsWindow.h
Assignee | ||
Comment 3•2 years ago
|
||
Pushed by cmartin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7a5554703a48 Allow nsBaseWidget::mBorderStyle to be set via constructor r=handyman
Assignee | ||
Comment 5•2 years ago
|
||
It looks like it was added to abstract commonalities between Win32 and
WinRT. But we dropped support for WinRT a long time ago, and there hasn't been
any work on this area of code in 8 years. In the meantime, it just adds an
extra layer of indirection that doesn't need to exist.
Comment 6•2 years ago
|
||
bugherder |
Pushed by cmartin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/70df6518a020 Remove nsWindowBase r=handyman
Comment 8•2 years ago
|
||
bugherder |
Assignee | ||
Comment 9•2 years ago
|
||
As a first step to making this code easier to understand, we pull the members
into a smaller class with a limited API to reduce their scope.
I will move all these new methods together in the next changelist -- It just
makes review difficult if everything is moving and changing at the same time.
Assignee | ||
Comment 10•2 years ago
|
||
This is just a copy/paste change
Assignee | ||
Comment 11•2 years ago
|
||
Now that the code has been restructured, let's simplify some of the methods
by propagating constants and removing redundant logic
Assignee | ||
Comment 12•2 years ago
|
||
Comment 13•2 years ago
|
||
Pushed by cmartin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/53be97731374 Encapsulate Win32 nsWindow size mode members r=handyman https://hg.mozilla.org/integration/autoland/rev/e08c65b89343 Move new Win32 nsWindow::FrameState functions r=handyman https://hg.mozilla.org/integration/autoland/rev/832276c12c9c Cleanup nsWindow::FrameState code r=handyman https://hg.mozilla.org/integration/autoland/rev/c9dad72c910f Add CheckInvariantWrapper to nsWindow and use for FrameState r=handyman
Comment 14•2 years ago
|
||
bugherder |
Comment 15•2 years ago
|
||
Chris, do you intend to land more patches as part of this bug, or can the leave-open
keyword be removed and this bug be closed?
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Description
•