зеркало из https://github.com/mozilla/gecko-dev.git
e4245a36ed
In the case of nsStandaloneNativeMenu, the root nsMenuX has the nsStandaloneNativeMenu as its parent. But the parent's NativeNSMenu() is the root nsMenuX's NativeNSMenu(). So when we were removing the collapsed="true" attribute from the root nsMenuX of an nsStandaloneNativeMenu, `parentMenu` and `mNativeMenu` were the same object. So we would insert mNativeMenuItem into mNativeMenu (as a subitem), and then also set mNativeMenuItem.submenu = mNativeMenu, creating a cyclic menu structure. I've added a test for this scenario. It turns out though that without this patch, the test doesn't actually fail, because the collapsed attribute handling also calls SetRebuild(true). So while the test would briefly create the cyclic structure, this bug would be corrected by the MenuOpened calls which would rebuild the menu contents, and then all the checks from the test would still succeed. Depends on D109113 Differential Revision: https://phabricator.services.mozilla.com/D109114 |
||
---|---|---|
.. | ||
browser | ||
gtest | ||
unit | ||
.eslintrc.js | ||
TestChromeMargin.cpp | ||
bug586713_window.xhtml | ||
chrome.ini | ||
empty_window.xhtml | ||
file_bug596600.html | ||
file_input_events_on_deactive_window.html | ||
file_secure_input.html | ||
mochitest.ini | ||
moz.build | ||
native_menus_window.xhtml | ||
standalone_native_menu_window.xhtml | ||
system_font_changes.xhtml | ||
taskbar_previews.xhtml | ||
test_AltGr_key_events_in_web_content_on_windows.html | ||
test_actionhint.html | ||
test_alwaysontop_focus.xhtml | ||
test_assign_event_data.html | ||
test_autocapitalize.html | ||
test_bug343416.xhtml | ||
test_bug413277.html | ||
test_bug428405.xhtml | ||
test_bug429954.xhtml | ||
test_bug444800.xhtml | ||
test_bug466599.xhtml | ||
test_bug478536.xhtml | ||
test_bug485118.xhtml | ||
test_bug517396.xhtml | ||
test_bug522217.xhtml | ||
test_bug538242.xhtml | ||
test_bug565392.html | ||
test_bug586713.xhtml | ||
test_bug593307.xhtml | ||
test_bug596600.xhtml | ||
test_bug673301.xhtml | ||
test_bug760802.xhtml | ||
test_bug1123480.xhtml | ||
test_clipboard.xhtml | ||
test_composition_text_querycontent.xhtml | ||
test_imestate.html | ||
test_input_events_on_deactive_window.xhtml | ||
test_key_event_counts.xhtml | ||
test_keycodes.xhtml | ||
test_keypress_event_with_alt_on_mac.html | ||
test_mouse_event_with_control_on_mac.html | ||
test_mouse_scroll.xhtml | ||
test_native_key_bindings_mac.html | ||
test_native_menus.xhtml | ||
test_panel_mouse_coords.xhtml | ||
test_picker_no_crash.html | ||
test_platform_colors.xhtml | ||
test_plugin_scroll_consistency.html | ||
test_position_on_resize.xhtml | ||
test_scrollbar_colors.html | ||
test_secure_input.html | ||
test_sizemode_events.xhtml | ||
test_standalone_native_menu.xhtml | ||
test_system_font_changes.xhtml | ||
test_system_status_bar.xhtml | ||
test_taskbar_progress.xhtml | ||
test_transferable_overflow.xhtml | ||
test_wheeltransaction.xhtml | ||
utils.js | ||
window_bug429954.xhtml | ||
window_bug478536.xhtml | ||
window_bug522217.xhtml | ||
window_bug538242.xhtml | ||
window_bug593307_centerscreen.xhtml | ||
window_bug593307_offscreen.xhtml | ||
window_composition_text_querycontent.xhtml | ||
window_imestate_iframes.html | ||
window_mouse_scroll_win.html | ||
window_mouse_scroll_win_2.html | ||
window_picker_no_crash_child.html | ||
window_state_windows.xhtml | ||
window_wheeltransaction.xhtml |