Bug 1428297 - (Part 3) Disable the assertion that don't allow to call ShowDropDown() in the content process when content-select is enabled. draft
authorKuoE0 <kuoe0.tw@gmail.com>
Wed, 10 Jan 2018 11:52:37 +0800
changeset 718895 fe9e3ef4debf4fdcdaaeb6b278c778b83cef64a6
parent 718894 091f78895f4945a77d6746e99b5a171fe1721e9d
child 718961 ad1ae9901c3133fe0609c5cf27dab1b12eeb74f4
child 720311 b1e061da56935d9b223c75484e8bbdbd35be9955
push id95083
push userbmo:kuoe0@mozilla.com
push dateThu, 11 Jan 2018 03:14:32 +0000
bugs1428297
milestone59.0a1
Bug 1428297 - (Part 3) Disable the assertion that don't allow to call ShowDropDown() in the content process when content-select is enabled. To prevent the crash when content-select is enabled, I disable this assertion that don't allow to call ShowDropDown() in the content process. MozReview-Commit-ID: F3BelChp1AK
layout/forms/nsComboboxControlFrame.cpp
--- a/layout/forms/nsComboboxControlFrame.cpp
+++ b/layout/forms/nsComboboxControlFrame.cpp
@@ -934,17 +934,20 @@ nsComboboxControlFrame::GetFrameName(nsA
 
 
 //----------------------------------------------------------------------
 // nsIComboboxControlFrame
 //----------------------------------------------------------------------
 void
 nsComboboxControlFrame::ShowDropDown(bool aDoDropDown)
 {
-  MOZ_ASSERT(!XRE_IsContentProcess());
+  if (!nsLayoutUtils::IsContentSelectEnabled()) {
+    // TODO(kuoe0) remove this assertion after content-select is enabled
+    MOZ_ASSERT(!XRE_IsContentProcess());
+  }
   mDelayedShowDropDown = false;
   EventStates eventStates = mContent->AsElement()->State();
   if (aDoDropDown && eventStates.HasState(NS_EVENT_STATE_DISABLED)) {
     return;
   }
 
   if (!mDroppedDown && aDoDropDown) {
     nsFocusManager* fm = nsFocusManager::GetFocusManager();