Closed
Bug 974901
Opened 12 years ago
Closed 12 years ago
Cleanup static variable use in winrt widget
Categories
(Core Graveyard :: Widget: WinRT, defect, P1)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla30
People
(Reporter: jimm, Assigned: jimm)
References
Details
(Whiteboard: p=2 s=it-30c-29a-28b.2 r=ff30 [qa-])
Attachments
(1 file, 1 obsolete file)
18.00 KB,
patch
|
TimAbraldes
:
review+
|
Details | Diff | Splinter Review |
Something I've been meaning to do for a while, this work gave me an excuse to do it.
I'm not 100% clear yet on the relationship between the base FrameworkView and the views we'll create for multiple windows. I think though they will be the same interface/class, in which case this static variable is going to get confusing. So I wanted to eliminate the use of it as much as possible.
Attachment #8378992 -
Flags: review?(tabraldes)
![]() |
Assignee | |
Comment 1•12 years ago
|
||
Comment on attachment 8378992 [details] [diff] [review]
patch
I'm going to keep most of this, except I think I'll revert the global FrameworkView pointer. Having that as a member variable of MetroApp is going to make life harder in bug 974989 since MetroAppChild will want access to it.
Attachment #8378992 -
Flags: review?(tabraldes)
![]() |
Assignee | |
Updated•12 years ago
|
Assignee: nobody → jmathies
![]() |
Assignee | |
Updated•12 years ago
|
Summary: Remove the use of a static FrameworkView pointer from winrt widget → Cleanup static variable use in winrt widget
![]() |
Assignee | |
Comment 2•12 years ago
|
||
I think this is pretty much complete.
Attachment #8378992 -
Attachment is obsolete: true
![]() |
Assignee | |
Updated•12 years ago
|
Attachment #8379810 -
Flags: review?(tabraldes)
![]() |
Assignee | |
Updated•12 years ago
|
Whiteboard: p=2
Comment 3•12 years ago
|
||
Comment on attachment 8379810 [details] [diff] [review]
wip
Review of attachment 8379810 [details] [diff] [review]:
-----------------------------------------------------------------
Cleanup/organization work is never done, but this looks like a step in the right direction :)
::: widget/windows/winrt/MetroApp.h
@@ +58,5 @@
>
> private:
> EventRegistrationToken mSuspendEvent;
> EventRegistrationToken mResumeEvent;
> + Microsoft::WRL::ComPtr<FrameworkView> mView;
Is this used anywhere?
::: widget/windows/winrt/nsWinMetroUtils.cpp
@@ +247,5 @@
>
> NS_IMETHODIMP
> nsWinMetroUtils::GetActivationURI(nsAString &aActivationURI)
> {
> + if (XRE_GetWindowsEnvironment() == WindowsEnvironmentType_Desktop) {
I don't really know the semantics of XRE_GetWindowsEnvironment, but should we be checking "not metro" instead of "windows desktop?" What does this do on --metrodesktop, or on Linux?
@@ +274,5 @@
>
> NS_IMETHODIMP
> nsWinMetroUtils::GetKeyboardX(uint32_t *aX)
> {
> + *aX = (uint32_t)floor(FrameworkView::KeyboardVisibleRect().X);
While we're here, can we change this and the below casts to |static_cast|s?
Attachment #8379810 -
Flags: review?(tabraldes) → review+
![]() |
Assignee | |
Comment 4•12 years ago
|
||
(In reply to Tim Abraldes [:TimAbraldes] [:tabraldes] from comment #3)
> Comment on attachment 8379810 [details] [diff] [review]
> wip
>
> Review of attachment 8379810 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Cleanup/organization work is never done, but this looks like a step in the
> right direction :)
>
> ::: widget/windows/winrt/MetroApp.h
> @@ +58,5 @@
> >
> > private:
> > EventRegistrationToken mSuspendEvent;
> > EventRegistrationToken mResumeEvent;
> > + Microsoft::WRL::ComPtr<FrameworkView> mView;
>
> Is this used anywhere?
no it isn't. looks like it leaked into a different patch -
https://bugzilla.mozilla.org/attachment.cgi?id=8379813&action=diff
I'll fix this up here and update the other.
> ::: widget/windows/winrt/nsWinMetroUtils.cpp
> @@ +247,5 @@
> >
> > NS_IMETHODIMP
> > nsWinMetroUtils::GetActivationURI(nsAString &aActivationURI)
> > {
> > + if (XRE_GetWindowsEnvironment() == WindowsEnvironmentType_Desktop) {
>
> I don't really know the semantics of XRE_GetWindowsEnvironment, but should
> we be checking "not metro" instead of "windows desktop?" What does this do
> on --metrodesktop, or on Linux?
There's only two values, desktop and metro. w/metrodesktop it would be desktop. We did it this way to provide a cleaner early exit, for example -
http://mxr.mozilla.org/mozilla-central/source/widget/windows/winrt/nsWinMetroUtils.cpp#118
vs. a big if block.
>
> @@ +274,5 @@
> >
> > NS_IMETHODIMP
> > nsWinMetroUtils::GetKeyboardX(uint32_t *aX)
> > {
> > + *aX = (uint32_t)floor(FrameworkView::KeyboardVisibleRect().X);
>
> While we're here, can we change this and the below casts to |static_cast|s?
no problem!
![]() |
Assignee | |
Comment 5•12 years ago
|
||
Oh I see your point, != metro vs. == desktop in case we add a run type. I like that, I think I'll update all of them.
![]() |
Assignee | |
Comment 6•12 years ago
|
||
Updated•12 years ago
|
Blocks: metrobacklog
Priority: -- → P1
QA Contact: kamiljoz
Whiteboard: p=2 → p=2 s=it-30c-29a-28b.2 r=ff30
![]() |
Assignee | |
Comment 7•12 years ago
|
||
try:
https://tbpl.mozilla.org/?tree=Try&showall=0&rev=ae65e2f08589
I had to make one change, HString is a winrt class that imports some win8 specific gunk when initialized. So I had to convert that navigation parameter to an HSTRING handle.
https://hg.mozilla.org/integration/mozilla-inbound/rev/e403f6dd4947
Comment 8•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Comment 9•12 years ago
|
||
For testing and verification. Reopen if any defects found.
Flags: needinfo?(kamiljoz)
Comment 10•12 years ago
|
||
Talked Jim via IRC and made sure there wasn't anything that needed to be testing in this issue. Issue was basically cleaning up internal code. Marking as verified and [qa-].
Status: RESOLVED → VERIFIED
Flags: needinfo?(kamiljoz)
Whiteboard: p=2 s=it-30c-29a-28b.2 r=ff30 → p=2 s=it-30c-29a-28b.2 r=ff30 [qa-]
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•