Last Comment Bug 770058 - Switching main window between active and inactive doesn't update the title bar active state if disabled MenuBar in Window7Classic Style
: Switching main window between active and inactive doesn't update the title ba...
Status: RESOLVED FIXED
: regression
Product: Core
Classification: Components
Component: Layout (show other bugs)
: 16 Branch
: All All
: -- normal (vote)
: mozilla18
Assigned To: Robert O'Callahan (:roc) (email my personal email if necessary)
:
: Jet Villegas (:jet)
Mentors:
Depends on: 770575 770642
Blocks: dlbi
  Show dependency treegraph
 
Reported: 2012-07-01 15:01 PDT by Alice0775 White
Modified: 2012-09-28 16:19 PDT (History)
10 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
part 1: remove unnecessary parameters (11.45 KB, patch)
2012-07-01 20:55 PDT, Robert O'Callahan (:roc) (email my personal email if necessary)
matt.woodrow: review+
Details | Diff | Splinter Review
Part 2: invalidate themed frames on document activity change (2.24 KB, patch)
2012-07-01 20:56 PDT, Robert O'Callahan (:roc) (email my personal email if necessary)
no flags Details | Diff | Splinter Review
part 2 v2 (2.23 KB, patch)
2012-07-01 21:01 PDT, Robert O'Callahan (:roc) (email my personal email if necessary)
no flags Details | Diff | Splinter Review
do it the hard way (1.24 KB, patch)
2012-07-01 22:15 PDT, Robert O'Callahan (:roc) (email my personal email if necessary)
matt.woodrow: review+
Details | Diff | Splinter Review

Description Alice0775 White 2012-07-01 15:01:32 PDT
Build Identifier:
http://hg.mozilla.org/mozilla-central/rev/d9d61d199b11
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/16.0 Firefox/16.0 ID:20120701030537

This maybe happens in Windows7 Classic style only.

Steps to Reproduce:
1. Make sure "Windows7 Classic Style" is selected
2. Start Firefox with clean profile (MenuBar is disabled)
3-1. Switch to another application (Alt+Tab)
    -- Observe TitleBar Color
3-2. Switch to Nightly again (Alt+Tab)
    -- Observe TitleBar Color

Actual Results:
 The TitleBar color does not change

Expected Results:
 The TitleBar should change .


Mouse over Window Control Buttons(Minimum/Maximize/Close) helps.

Good:
http://hg.mozilla.org/integration/mozilla-inbound/rev/0d9f7fb55226
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/16.0 Firefox/16.0 ID:20120629192951
Bad:
http://hg.mozilla.org/integration/mozilla-inbound/rev/cd6d52bdf2d8
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/16.0 Firefox/16.0 ID:20120629200651
Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=0d9f7fb55226&tochange=cd6d52bdf2d8

Suspected: Bug 539356
Comment 1 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-07-01 19:59:21 PDT
It's probably this change to PresShell::DocumentStatesChanged:

-  if (aStateMask.HasState(NS_DOCUMENT_STATE_WINDOW_INACTIVE)) {
-    nsIFrame* root = mFrameConstructor->GetRootFrame();
-    if (root) {
-      root->InvalidateFrameSubtree();
-    }
-  }
+  ScheduleViewManagerFlush();

We still need to do that InvalidateFrameSubtree to invalidate frames that have native-theme backgrounds that have changed.
Comment 2 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-07-01 20:55:33 PDT
Created attachment 638256 [details] [diff] [review]
part 1: remove unnecessary parameters
Comment 3 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-07-01 20:56:05 PDT
Created attachment 638257 [details] [diff] [review]
Part 2: invalidate themed frames on document activity change
Comment 4 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-07-01 21:01:21 PDT
Created attachment 638258 [details] [diff] [review]
part 2 v2

Only call GetChildLists, not GetCrossDocChildLists, because this gets called on every document anyway.
Comment 5 Phil Ringnalda (:philor) 2012-07-01 22:09:02 PDT
FWIW (not much), those don't seem to fix the not-yet-marked-dupe bug 770081 on OS X.
Comment 6 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-07-01 22:12:08 PDT
Hmm, maybe that uses nsILookAndFeel colors or something?
Comment 7 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-07-01 22:15:12 PDT
Created attachment 638268 [details] [diff] [review]
do it the hard way

I sure hope this fixes it. I don't have any bigger sledgehammers.
Comment 9 Phil Ringnalda (:philor) 2012-07-02 21:38:12 PDT
I'm not sure which All this one is, but it's All minus OS X, which is bug 770056.

Note You need to log in before you can comment on or make changes to this bug.