Bug 575294 - s/mFocused/sFocused/. part=4/4 r=smaug
☠☠ backed out by 8a8c0d8b1ac7 ☠ ☠
authorMats Palmgren <matspal@gmail.com>
Tue, 29 May 2012 02:50:42 +0200
changeset 95133 deac5d31bc126203fcc50c9ff8f62baf4611cbe7
parent 95132 8622c5680fb32ccb93cd879437255f58f640529a
child 95134 6d605438199cf30d64ee530986668e182292f6b1
push id9960
push usermpalmgren@mozilla.com
push dateTue, 29 May 2012 00:50:36 +0000
treeherdermozilla-inbound@6d605438199c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs575294
milestone15.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 575294 - s/mFocused/sFocused/. part=4/4 r=smaug
layout/forms/nsComboboxControlFrame.cpp
layout/forms/nsComboboxControlFrame.h
--- a/layout/forms/nsComboboxControlFrame.cpp
+++ b/layout/forms/nsComboboxControlFrame.cpp
@@ -111,17 +111,17 @@ public:
 
   nsComboboxControlFrame* mComboBox;
 };
 
 NS_IMPL_ISUPPORTS1(nsComboButtonListener,
                    nsIDOMEventListener)
 
 // static class data member for Bug 32920
-nsComboboxControlFrame * nsComboboxControlFrame::mFocused = nsnull;
+nsComboboxControlFrame* nsComboboxControlFrame::sFocused = nsnull;
 
 nsIFrame*
 NS_NewComboboxControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, PRUint32 aStateFlags)
 {
   nsComboboxControlFrame* it = new (aPresShell) nsComboboxControlFrame(aContext);
 
   if (it) {
     // set the state flags (if any are provided)
@@ -325,25 +325,25 @@ nsComboboxControlFrame::CreateAccessible
 #endif
 
 void
 nsComboboxControlFrame::SetFocus(bool aOn, bool aRepaint)
 {
   nsWeakFrame weakFrame(this);
   if (aOn) {
     nsListControlFrame::ComboboxFocusSet();
-    mFocused = this;
+    sFocused = this;
     if (mDelayedShowDropDown) {
       ShowDropDown(true); // might destroy us
       if (!weakFrame.IsAlive()) {
         return;
       }
     }
   } else {
-    mFocused = nsnull;
+    sFocused = nsnull;
     mDelayedShowDropDown = false;
     if (mDroppedDown) {
       mListControlFrame->ComboboxFinish(mDisplayedIndex); // might destroy us
       if (!weakFrame.IsAlive()) {
         return;
       }
     }
     // May delete |this|.
@@ -624,17 +624,17 @@ public:
   nsWeakFrame mFrame;
 };
 
 void
 nsComboboxControlFrame::GetAvailableDropdownSpace(nscoord* aAbove,
                                                   nscoord* aBelow,
                                                   nsPoint* aTranslation)
 {
-  // Note: As first glance, it appears that you could simply get the absolute
+  // Note: At first glance, it appears that you could simply get the absolute
   // bounding box for the dropdown list by first getting its view, then getting
   // the view's nsIWidget, then asking the nsIWidget for its AbsoluteBounds.
   // The problem with this approach, is that the dropdown lists y location can
   // change based on whether the dropdown is placed below or above the display
   // frame.  The approach, taken here is to get the absolute position of the
   // display frame and use its location to determine if the dropdown will go
   // offscreen.
 
@@ -964,17 +964,17 @@ nsComboboxControlFrame::ShowDropDown(boo
 {
   mDelayedShowDropDown = false;
   nsEventStates eventStates = mContent->AsElement()->State();
   if (aDoDropDown && eventStates.HasState(NS_EVENT_STATE_DISABLED)) {
     return;
   }
 
   if (!mDroppedDown && aDoDropDown) {
-    if (mFocused == this) {
+    if (sFocused == this) {
       DropDownPositionState state = AbsolutelyPositionDropDown();
       if (state == eDropDownPositionFinal) {
         ShowList(aDoDropDown); // might destroy us
       } else if (state == eDropDownPositionPendingResize) {
         // Delay until after the resize reflow, see nsAsyncResize.
         mDelayedShowDropDown = true;
       }
     } else {
@@ -1608,17 +1608,17 @@ nsComboboxControlFrame::BuildDisplayList
   return DisplaySelectionOverlay(aBuilder, aLists.Content());
 }
 
 void nsComboboxControlFrame::PaintFocus(nsRenderingContext& aRenderingContext,
                                         nsPoint aPt)
 {
   /* Do we need to do anything? */
   nsEventStates eventStates = mContent->AsElement()->State();
-  if (eventStates.HasState(NS_EVENT_STATE_DISABLED) || mFocused != this)
+  if (eventStates.HasState(NS_EVENT_STATE_DISABLED) || sFocused != this)
     return;
 
   aRenderingContext.PushState();
   nsRect clipRect = mDisplayFrame->GetRect() + aPt;
   aRenderingContext.IntersectClip(clipRect);
 
   // REVIEW: Why does the old code paint mDisplayFrame again? We've
   // already painted it in the children above. So clipping it here won't do
--- a/layout/forms/nsComboboxControlFrame.h
+++ b/layout/forms/nsComboboxControlFrame.h
@@ -276,16 +276,16 @@ protected:
   bool                  mDroppedDown;
   // See comment in HandleRedisplayTextEvent().
   bool                  mInRedisplayText;
   // Acting on ShowDropDown(true) is delayed until we're focused.
   bool                  mDelayedShowDropDown;
 
   // static class data member for Bug 32920
   // only one control can be focused at a time
-  static nsComboboxControlFrame * mFocused;
+  static nsComboboxControlFrame* sFocused;
 
 #ifdef DO_REFLOW_COUNTER
   PRInt32 mReflowId;
 #endif
 };
 
 #endif