Closed
Bug 1423556
Opened 6 years ago
Closed 6 years ago
Use BaseRect methods instead of directly member variables in xpfe/
Categories
(Core :: Graphics, enhancement, P3)
Core
Graphics
Tracking
()
RESOLVED
FIXED
mozilla59
Tracking | Status | |
---|---|---|
firefox59 | --- | fixed |
People
(Reporter: milan, Assigned: milan)
References
(Blocks 1 open bug)
Details
(Whiteboard: [gfx-noted])
Attachments
(1 file)
No description provided.
Comment hidden (mozreview-request) |
Assignee | ||
Updated•6 years ago
|
Priority: -- → P3
Whiteboard: [gfx-noted]
![]() |
||
Comment 2•6 years ago
|
||
mozreview-review |
Comment on attachment 8934947 [details] Bug 1423556: Use BaseRect access methods instead of member variables in xpfe/ https://reviewboard.mozilla.org/r/205892/#review211630 r=me with the nits below addressed. ::: xpfe/appshell/nsWebShellWindow.cpp:132 (Diff revision 1) > nsCOMPtr<nsIBaseWindow> base(do_QueryInterface(aOpener)); > if (base) { > - rv = base->GetPositionAndSize(&mOpenerScreenRect.x, > - &mOpenerScreenRect.y, > - &mOpenerScreenRect.width, > - &mOpenerScreenRect.height); > + auto openerScreenRectX = mOpenerScreenRect.X(); > + auto openerScreenRectY = mOpenerScreenRect.Y(); > + auto openerScreenRectW = mOpenerScreenRect.Width(); > + auto openerScreenRectH = mOpenerScreenRect.Height(); Please use int32_t instead of `auto` here. Also, the parameters to GetPositionAndSize() are all outparams, so there should be no need to initialize openerScreenRectX et al. Finally, you could choose shorter names given that these are local variables. All up, these changes would result in something like this: > int32_t x, y, width, height; > rv = base->GetPositionAndSize(&x, &y, &width, &height); > mOpenerScreenRect.SetRect(x, y, width, height);
Attachment #8934947 -
Flags: review?(n.nethercote) → review+
![]() |
||
Comment 3•6 years ago
|
||
mozreview-review |
Comment on attachment 8934947 [details] Bug 1423556: Use BaseRect access methods instead of member variables in xpfe/ https://reviewboard.mozilla.org/r/205892/#review211632 ::: xpfe/appshell/nsWebShellWindow.cpp:132 (Diff revision 1) > nsCOMPtr<nsIBaseWindow> base(do_QueryInterface(aOpener)); > if (base) { > - rv = base->GetPositionAndSize(&mOpenerScreenRect.x, > - &mOpenerScreenRect.y, > - &mOpenerScreenRect.width, > - &mOpenerScreenRect.height); > + auto openerScreenRectX = mOpenerScreenRect.X(); > + auto openerScreenRectY = mOpenerScreenRect.Y(); > + auto openerScreenRectW = mOpenerScreenRect.Width(); > + auto openerScreenRectH = mOpenerScreenRect.Height(); Actually, the mOpenerScreenRect.SetRect() call needs to be moved after the `rv` check.
Assignee | ||
Updated•6 years ago
|
Comment hidden (mozreview-request) |
Assignee | ||
Comment 5•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=fc9c67be2c523a47554cedab957e831946065afe
Pushed by msreckovic@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3d8b1409f0fe Use BaseRect access methods instead of member variables in xpfe/ r=njn
Comment 7•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/3d8b1409f0fe
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in
before you can comment on or make changes to this bug.
Description
•