Closed Bug 1325503 Opened 7 years ago Closed 7 years ago

Remove Windows {XP, Server 2003, Vista} support from widget/.

Categories

(Core :: Widget: Win32, defect)

Unspecified
Windows
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

References

(Depends on 1 open bug)

Details

(Whiteboard: tpi:-)

Attachments

(1 file, 1 obsolete file)

I like deleting code so I took a crack at removing widget support for the no-longer-supported versions of Windows. Patch coming up shortly.
Sorry if bug 1325368 is a duplicate effort.
Blocks: xp-eol
I did my best to remove as much stuff as possible in this patch. The starting
point was to remove all the IsVistaOrLater() and IsWin7OrLater() calls, but I
also grepped for various strings and found some other removable stuff that way.
I may have still missed some things.

Notable things done by this patch.

- It removes numerous blocklist entries.

- It removes CanComputeVirtualKeyCodeFromScanCode(), because it's always true
  now.

- It removes ShowXP{Folder,File}Picker(), even though these were available as
  fallbacks on Vista+. The "when platform is built without the longhorn SDK"
  condition in the comment above nsFilePicker::ShowXPFolderPicker() sounds like
  it won't ever happen any more.

- It removes the config.trim_on_minimize preference. This requires adding a
  bool sHaveInitializedPrefs variable; previously the lack of pref
  initialization was indicated by the tri-state sTrimOnMinimize variable having
  the value 2.

Notable things *not* done by this patch.

- ClearThemeRegion() still exists. The comment suggests that it is XP/Vista
  only, but the code suggests otherwise. jimm thinks the comment is wrong.

- The comment in WinWakeLockListener::Callback() suggests that the StartTimer()
  call is no longer needed to block the screen saver. I'm uncertain about this
  and so I think it's best left to a follow-up.
Attachment #8821405 - Flags: feedback?(jmathies)
Assignee: nobody → n.nethercote
Status: NEW → ASSIGNED
emk did a similar change in bug 1325368. I think my changes are more comprehensive, e.g. I have changes in GfxInfo.cpp that emk's patch lacks. I also think it's better to break these changes up by component rather than doing them tree-wide. jimm, since you are already r?'d in bug 1325368 I'll let you decide the best way to proceed.
Whiteboard: tpi:-
jimm: you r-'d the full-repo patch in bug 1325368 for being too broad so I
think it makes sense to do the widget changes here. I have rebased the patch.
Attachment #8824819 - Flags: review?(jmathies)
Attachment #8821405 - Attachment is obsolete: true
Attachment #8821405 - Flags: feedback?(jmathies)
Comment on attachment 8824819 [details] [diff] [review]
Remove Windows {XP, Server 2003, Vista} support from widget/

Review of attachment 8824819 [details] [diff] [review]:
-----------------------------------------------------------------

r+, thanks for doing this. (Those two theme tests might cause this to bounce though.)

::: layout/style/nsMediaFeatures.cpp
@@ -71,5 @@
>  
>  // Os version identities used in the -moz-os-version media query.
>  const OperatingSystemVersionInfo osVersionStrings[] = {
> -  { LookAndFeel::eOperatingSystemVersion_WindowsXP,     L"windows-xp" },
> -  { LookAndFeel::eOperatingSystemVersion_WindowsVista,  L"windows-vista" },

We have css and some tests that will break when this gets removed.

http://searchfox.org/mozilla-central/search?q=windows-xp&path=

::: widget/windows/nsFilePicker.cpp
@@ -681,5 @@
> -  return GetFileNameWrapper(ofn, aType);
> -}
> -
> -bool
> -nsFilePicker::ShowXPFilePicker(const nsString& aInitialDir)

buh bye ancient filepicker code. woot!

::: widget/windows/nsNativeThemeWin.cpp
@@ -418,5 @@
>  // The amount of time we animate progress meters parts across the frame.
>  static const double kProgressDeterminateTimeSpan = 3.0;
>  static const double kProgressIndeterminateTimeSpan = 5.0;
>  // The width of the overlay used to animate the horizontal progress bar (Vista and later).
>  static const int32_t kProgressHorizontalVistaOverlaySize = 120;

you could name this 'kProgressHorizontalOverlaySize' if you like.

@@ -554,5 @@
>  }
>  
>  /*
> - * DrawChunkProgressMeter - renders an xp style chunked progress meter. Called
> - * by DrawProgressMeter.

ahh. eventually everything we write gets rewritten or removed.

@@ +1192,4 @@
>            return NS_OK;
>          }
> +      } else {
> +        /* On Vista, the dropdown indicator on a menulist button in chrome is

nit - snip "On Vista, "

@@ +2198,5 @@
>      case NS_THEME_SCALETHUMB_HORIZONTAL:
>      case NS_THEME_SCALETHUMB_VERTICAL:
>      {
>        *aIsOverridable = false;
> +      // On Vista, GetThemePartAndState returns odd values for

ditto here - nix "On Vista, "

::: widget/windows/nsWindow.cpp
@@ -845,5 @@
> -    // the working set when windows are minimized, but on Vista and up it has
> -    // little to no effect. Since this feature has been the source of numerous
> -    // bugs over the years, disable it (sTrimOnMinimize=1) on Vista and up.
> -    sTrimOnMinimize =
> -      Preferences::GetBool("config.trim_on_minimize",

'config.trim_on_minimize' - R.I.P.
Attachment #8824819 - Flags: review?(jmathies) → review+
> ::: layout/style/nsMediaFeatures.cpp
> @@ -71,5 @@
> >  
> >  // Os version identities used in the -moz-os-version media query.
> >  const OperatingSystemVersionInfo osVersionStrings[] = {
> > -  { LookAndFeel::eOperatingSystemVersion_WindowsXP,     L"windows-xp" },
> > -  { LookAndFeel::eOperatingSystemVersion_WindowsVista,  L"windows-vista" },
> 
> We have css and some tests that will break when this gets removed.

My try push (comment 4) didn't have any failures. However, this bug is supposed to be about widget/ and this change is in layout/ so I will revert. I'll file a follow-up for removal of these CSS properties.
> I'll file a follow-up for removal of these CSS properties.

Bug 1330146.
https://hg.mozilla.org/integration/mozilla-inbound/rev/0673be23886e7eadfa5d815394357db365b86f70
Bug 1325503 - Remove Windows {XP, Server 2003, Vista} support from widget/. r=jimm.
https://hg.mozilla.org/mozilla-central/rev/0673be23886e
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Bug 751729 regressed because this bug completely removed the old file picker code. Is it intentional?
Flags: needinfo?(n.nethercote)
Flags: needinfo?(jmathies)
(In reply to Masatoshi Kimura [:emk] from comment #12)
> Bug 751729 regressed because this bug completely removed the old file picker
> code. Is it intentional?

From comment 2:

> - It removes ShowXP{Folder,File}Picker(), even though these were available as
>   fallbacks on Vista+. The "when platform is built without the longhorn SDK"
>   condition in the comment above nsFilePicker::ShowXPFolderPicker() sounds like
>   it won't ever happen any more.

jimm and I discussed this on IRC and he said it was ok. But I can reinstate that code if necessary.
Flags: needinfo?(n.nethercote)
(In reply to Nicholas Nethercote [:njn] from comment #13)
> > - It removes ShowXP{Folder,File}Picker(), even though these were available as
> >   fallbacks on Vista+. The "when platform is built without the longhorn SDK"
> >   condition in the comment above nsFilePicker::ShowXPFolderPicker() sounds like
> >   it won't ever happen any more.

The comment was added in bug 661991 and bug 751729 didn't update the comment accordingly.

> jimm and I discussed this on IRC and he said it was ok. But I can reinstate
> that code if necessary.

Please do.
(In reply to Masatoshi Kimura [:emk] from comment #14)
> (In reply to Nicholas Nethercote [:njn] from comment #13)
> > > - It removes ShowXP{Folder,File}Picker(), even though these were available as
> > >   fallbacks on Vista+. The "when platform is built without the longhorn SDK"
> > >   condition in the comment above nsFilePicker::ShowXPFolderPicker() sounds like
> > >   it won't ever happen any more.
> 
> The comment was added in bug 661991 and bug 751729 didn't update the comment
> accordingly.
> 
> > jimm and I discussed this on IRC and he said it was ok. But I can reinstate
> > that code if necessary.
> 
> Please do.

Wait, why are we bringing this back? For XP compatibility mode?
Flags: needinfo?(jmathies)
(In reply to Jim Mathies [:jimm] from comment #15)
> Wait, why are we bringing this back? For XP compatibility mode?

Written in bug 751729. If "Disable Visual Themes" is checked in Comptibility tab of the Properties dialog of firefox.exe, the file picker will no longer open. It does not have to do with XP compatibility mode.

Do we no longer support this configuration?
(In reply to Masatoshi Kimura [:emk] from comment #16)
> (In reply to Jim Mathies [:jimm] from comment #15)
> > Wait, why are we bringing this back? For XP compatibility mode?
> 
> Written in bug 751729. If "Disable Visual Themes" is checked in Comptibility
> tab of the Properties dialog of firefox.exe, the file picker will no longer
> open. It does not have to do with XP compatibility mode.
> 
> Do we no longer support this configuration?

I guess this is a decision we need to make. I don't know off hand how popular this option is but I'm betting it's not common at all. Also, there are additional issues with this option in the browser, including a problem with the titlebar command buttons not getting displayed.

Why don't we file a bug on this and see how many users chime in? There's an easy work around (uncheck the option).

FYI, I also tried XPSP2 compat mode and surprisingly, the browser launched and loaded a page.
Depends on: 1331278
I filed bug 1331278 about removing support for "Disable Visual Themes".
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: