Bug 843979. Only add the in popup state bit to list control frames when they are in dropdown mode. r=mattwoodrow
authorTimothy Nikkel <tnikkel@gmail.com>
Fri, 22 Feb 2013 01:38:06 -0600
changeset 122684 d9bdd0a18d7812787bdb1517009cdf5e07112d81
parent 122683 3075a93108fb798871ce0db6da9ca56779b1b8b3
child 122685 c46476d3892a8669c4e3085c411b61c29c3f8862
push id24356
push usergszorc@mozilla.com
push dateSun, 24 Feb 2013 01:00:12 +0000
treeherdermozilla-central@195e706140d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs843979
milestone22.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 843979. Only add the in popup state bit to list control frames when they are in dropdown mode. r=mattwoodrow
layout/forms/nsListControlFrame.cpp
--- a/layout/forms/nsListControlFrame.cpp
+++ b/layout/forms/nsListControlFrame.cpp
@@ -1011,17 +1011,19 @@ nsListControlFrame::Init(nsIContent*    
   mContent->AddEventListener(NS_LITERAL_STRING("mousemove"), mEventListener,
                              false, false);
 
   mStartSelectionIndex = kNothingSelected;
   mEndSelectionIndex = kNothingSelected;
 
   mLastDropdownBackstopColor = PresContext()->DefaultBackgroundColor();
 
-  AddStateBits(NS_FRAME_IN_POPUP);
+  if (IsInDropDownMode()) {
+    AddStateBits(NS_FRAME_IN_POPUP);
+  }
 
   return result;
 }
 
 already_AddRefed<nsIContent> 
 nsListControlFrame::GetOptionAsContent(nsIDOMHTMLOptionsCollection* aCollection, int32_t aIndex) 
 {
   nsIContent * content = nullptr;