summaryrefslogtreecommitdiffstats
path: root/layout
diff options
context:
space:
mode:
Diffstat (limited to 'layout')
-rw-r--r--layout/style/res/html.css6
-rw-r--r--layout/xul/tree/nsTreeBodyFrame.cpp7
2 files changed, 10 insertions, 3 deletions
diff --git a/layout/style/res/html.css b/layout/style/res/html.css
index 066aab397..890ea6762 100644
--- a/layout/style/res/html.css
+++ b/layout/style/res/html.css
@@ -576,8 +576,10 @@ ul, menu, dir {
padding-inline-start: 40px;
}
-menu[type="context"] {
- display: none !important;
+@supports -moz-bool-pref("dom.menuitem.enabled") {
+ menu[type="context"] {
+ display: none !important;
+ }
}
ol {
diff --git a/layout/xul/tree/nsTreeBodyFrame.cpp b/layout/xul/tree/nsTreeBodyFrame.cpp
index b31d1de36..ec054a234 100644
--- a/layout/xul/tree/nsTreeBodyFrame.cpp
+++ b/layout/xul/tree/nsTreeBodyFrame.cpp
@@ -1826,12 +1826,17 @@ nsTreeBodyFrame::RowCountChanged(int32_t aIndex, int32_t aCount)
FireRowCountChangedEvent(aIndex, aCount);
#endif
+ nsWeakFrame weakFrame(this);
+
// Adjust our selection.
+ nsCOMPtr<nsITreeView> view = mView;
nsCOMPtr<nsITreeSelection> sel;
- mView->GetSelection(getter_AddRefs(sel));
+ view->GetSelection(getter_AddRefs(sel));
if (sel)
sel->AdjustSelection(aIndex, aCount);
+ NS_ENSURE_STATE (weakFrame.IsAlive());
+
if (mUpdateBatchNest)
return NS_OK;