gecko/browser/devtools/webconsole/AutocompletePopup.jsm
Rob Campbell 3d6287f1a7 Bug 579909 - Move WebConsole code to browser; f=nfitzgerald r=dtownsend,ddahl,gavin.sharp
--HG--
rename : toolkit/components/console/hudservice/AutocompletePopup.jsm => browser/devtools/webconsole/AutocompletePopup.jsm
rename : toolkit/components/console/hudservice/HUDService.jsm => browser/devtools/webconsole/HUDService.jsm
rename : toolkit/components/console/hudservice/Makefile.in => browser/devtools/webconsole/Makefile.in
rename : toolkit/components/console/hudservice/NetworkHelper.jsm => browser/devtools/webconsole/NetworkHelper.jsm
rename : toolkit/components/console/hudservice/NetworkPanel.xhtml => browser/devtools/webconsole/NetworkPanel.xhtml
rename : toolkit/components/console/hudservice/PropertyPanel.jsm => browser/devtools/webconsole/PropertyPanel.jsm
rename : toolkit/components/console/hudservice/tests/Makefile.in => browser/devtools/webconsole/test/Makefile.in
rename : toolkit/components/console/hudservice/tests/browser/Makefile.in => browser/devtools/webconsole/test/browser/Makefile.in
rename : toolkit/components/console/hudservice/tests/browser/browser_warn_user_about_replaced_api.js => browser/devtools/webconsole/test/browser/browser_warn_user_about_replaced_api.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_abbreviate_source_url.js => browser/devtools/webconsole/test/browser/browser_webconsole_abbreviate_source_url.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_basic_net_logging.js => browser/devtools/webconsole/test/browser/browser_webconsole_basic_net_logging.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_578437_page_reload.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_578437_page_reload.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_579412_input_focus.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_579412_input_focus.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_580001_closing_after_completion.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_580001_closing_after_completion.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_580030_errors_after_page_reload.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_580030_errors_after_page_reload.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_580400_groups.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_580400_groups.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_580454_timestamp_l10n.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_580454_timestamp_l10n.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_581231_close_button.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_581231_close_button.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_582201_duplicate_errors.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_582201_duplicate_errors.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_583816_tab_focus.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_583816_tab_focus.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_585237_line_limit.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_585237_line_limit.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_585956_console_trace.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_585956_console_trace.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_585991_autocomplete_keys.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_585991_autocomplete_keys.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_585991_autocomplete_popup.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_585991_autocomplete_popup.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_586388_select_all.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_586388_select_all.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_587617_output_copy.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_587617_output_copy.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_588342_document_focus.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_588342_document_focus.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_588730_text_node_insertion.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_588730_text_node_insertion.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_588967_input_expansion.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_588967_input_expansion.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_589162_css_filter.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_589162_css_filter.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_592442_closing_brackets.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_592442_closing_brackets.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_593003_iframe_wrong_hud.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_593003_iframe_wrong_hud.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_594477_clickable_output.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_594477_clickable_output.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_594497_history_arrow_keys.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_594497_history_arrow_keys.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595223_file_uri.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_595223_file_uri.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595350_multiple_windows_and_tabs.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_595350_multiple_windows_and_tabs.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_595934_message_categories.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_597103_deactivateHUDForContext_unfocused_window.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_597103_deactivateHUDForContext_unfocused_window.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_597136_external_script_errors.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_597136_external_script_errors.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_597136_network_requests_from_chrome.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_597136_network_requests_from_chrome.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_597460_filter_scroll.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_597460_filter_scroll.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_597756_reopen_closed_tab.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_597756_reopen_closed_tab.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_598357_jsterm_output.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_598357_jsterm_output.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_599725_response_headers.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_599725_response_headers.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_600183_charset.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_600183_charset.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_601177_log_levels.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_601177_log_levels.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_601352_scroll.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_601352_scroll.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_601667_filter_buttons.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_601667_filter_buttons.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_601909_remember_height.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_601909_remember_height.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_602572_log_bodies_checkbox.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_602572_log_bodies_checkbox.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_603750_websocket.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_603750_websocket.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_611795.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_611795.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_613013_console_api_iframe.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_613013_console_api_iframe.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_613280_jsterm_copy.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_613280_jsterm_copy.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_613642_maintain_scroll.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_613642_maintain_scroll.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_613642_prune_scroll.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_613642_prune_scroll.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_614793_jsterm_scroll.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_614793_jsterm_scroll.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_618078_network_exceptions.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_618078_network_exceptions.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_618311_close_panels.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_618311_close_panels.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_618311_private_browsing.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_618311_private_browsing.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_621644_jsterm_dollar.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_621644_jsterm_dollar.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_626484_output_copy_order.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_626484_output_copy_order.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_630733_response_redirect_headers.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_630733_response_redirect_headers.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_632275_getters_document_width.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_632275_getters_document_width.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_632347_iterators_generators.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_632347_iterators_generators.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_632817.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_632817.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_642108_pruneTest.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_642108_pruneTest.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_642615_autocomplete.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_642615_autocomplete.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_644419_log_limits.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_644419_log_limits.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_646025_console_file_location.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_646025_console_file_location.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_651501_document_body_autocomplete.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_651501_document_body_autocomplete.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_660806_history_nav.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_660806_history_nav.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_663443_panel_title.js => browser/devtools/webconsole/test/browser/browser_webconsole_bug_663443_panel_title.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_chrome.js => browser/devtools/webconsole/test/browser/browser_webconsole_chrome.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_completion.js => browser/devtools/webconsole/test/browser/browser_webconsole_completion.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_console_extras.js => browser/devtools/webconsole/test/browser/browser_webconsole_console_extras.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_console_logging_api.js => browser/devtools/webconsole/test/browser/browser_webconsole_console_logging_api.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_consoleonpage.js => browser/devtools/webconsole/test/browser/browser_webconsole_consoleonpage.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_copying_multiple_messages_inserts_newlines_in_between.js => browser/devtools/webconsole/test/browser/browser_webconsole_copying_multiple_messages_inserts_newlines_in_between.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_execution_scope.js => browser/devtools/webconsole/test/browser/browser_webconsole_execution_scope.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_history.js => browser/devtools/webconsole/test/browser/browser_webconsole_history.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_hud_getters.js => browser/devtools/webconsole/test/browser/browser_webconsole_hud_getters.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_js_input_and_output_styling.js => browser/devtools/webconsole/test/browser/browser_webconsole_js_input_and_output_styling.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_js_input_expansion.js => browser/devtools/webconsole/test/browser/browser_webconsole_js_input_expansion.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_jsterm.js => browser/devtools/webconsole/test/browser/browser_webconsole_jsterm.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_live_filtering_of_message_types.js => browser/devtools/webconsole/test/browser/browser_webconsole_live_filtering_of_message_types.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_live_filtering_on_search_strings.js => browser/devtools/webconsole/test/browser/browser_webconsole_live_filtering_on_search_strings.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_log_node_classes.js => browser/devtools/webconsole/test/browser/browser_webconsole_log_node_classes.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_message_node_id.js => browser/devtools/webconsole/test/browser/browser_webconsole_message_node_id.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_netlogging.js => browser/devtools/webconsole/test/browser/browser_webconsole_netlogging.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_network_panel.js => browser/devtools/webconsole/test/browser/browser_webconsole_network_panel.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_notifications.js => browser/devtools/webconsole/test/browser/browser_webconsole_notifications.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_null_and_undefined_output.js => browser/devtools/webconsole/test/browser/browser_webconsole_null_and_undefined_output.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_output_order.js => browser/devtools/webconsole/test/browser/browser_webconsole_output_order.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_position_ui.js => browser/devtools/webconsole/test/browser/browser_webconsole_position_ui.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_property_panel.js => browser/devtools/webconsole/test/browser/browser_webconsole_property_panel.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_property_provider.js => browser/devtools/webconsole/test/browser/browser_webconsole_property_provider.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_registries.js => browser/devtools/webconsole/test/browser/browser_webconsole_registries.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_storage_create_display.js => browser/devtools/webconsole/test/browser/browser_webconsole_storage_create_display.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_storage_iteration.js => browser/devtools/webconsole/test/browser/browser_webconsole_storage_iteration.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_storage_record_entry.js => browser/devtools/webconsole/test/browser/browser_webconsole_storage_record_entry.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_storage_record_many_entries.js => browser/devtools/webconsole/test/browser/browser_webconsole_storage_record_many_entries.js
rename : toolkit/components/console/hudservice/tests/browser/browser_webconsole_view_source.js => browser/devtools/webconsole/test/browser/browser_webconsole_view_source.js
rename : toolkit/components/console/hudservice/tests/browser/head.js => browser/devtools/webconsole/test/browser/head.js
rename : toolkit/components/console/hudservice/tests/browser/test-bug-585956-console-trace.html => browser/devtools/webconsole/test/browser/test-bug-585956-console-trace.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-593003-iframe-wrong-hud-iframe.html => browser/devtools/webconsole/test/browser/test-bug-593003-iframe-wrong-hud-iframe.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-593003-iframe-wrong-hud.html => browser/devtools/webconsole/test/browser/test-bug-593003-iframe-wrong-hud.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-595934-canvas-css.html => browser/devtools/webconsole/test/browser/test-bug-595934-canvas-css.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-595934-canvas-css.js => browser/devtools/webconsole/test/browser/test-bug-595934-canvas-css.js
rename : toolkit/components/console/hudservice/tests/browser/test-bug-595934-canvas.html => browser/devtools/webconsole/test/browser/test-bug-595934-canvas.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-595934-canvas.js => browser/devtools/webconsole/test/browser/test-bug-595934-canvas.js
rename : toolkit/components/console/hudservice/tests/browser/test-bug-595934-css-loader.css => browser/devtools/webconsole/test/browser/test-bug-595934-css-loader.css
rename : toolkit/components/console/hudservice/tests/browser/test-bug-595934-css-loader.css^headers^ => browser/devtools/webconsole/test/browser/test-bug-595934-css-loader.css^headers^
rename : toolkit/components/console/hudservice/tests/browser/test-bug-595934-css-loader.html => browser/devtools/webconsole/test/browser/test-bug-595934-css-loader.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-595934-css-parser.css => browser/devtools/webconsole/test/browser/test-bug-595934-css-parser.css
rename : toolkit/components/console/hudservice/tests/browser/test-bug-595934-css-parser.html => browser/devtools/webconsole/test/browser/test-bug-595934-css-parser.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-595934-dom-events-external2.html => browser/devtools/webconsole/test/browser/test-bug-595934-dom-events-external2.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-595934-dom-events-external2.js => browser/devtools/webconsole/test/browser/test-bug-595934-dom-events-external2.js
rename : toolkit/components/console/hudservice/tests/browser/test-bug-595934-dom-events.html => browser/devtools/webconsole/test/browser/test-bug-595934-dom-events.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-595934-dom-html-external.html => browser/devtools/webconsole/test/browser/test-bug-595934-dom-html-external.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-595934-dom-html-external.js => browser/devtools/webconsole/test/browser/test-bug-595934-dom-html-external.js
rename : toolkit/components/console/hudservice/tests/browser/test-bug-595934-dom-html.html => browser/devtools/webconsole/test/browser/test-bug-595934-dom-html.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-595934-empty-getelementbyid.html => browser/devtools/webconsole/test/browser/test-bug-595934-empty-getelementbyid.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-595934-empty-getelementbyid.js => browser/devtools/webconsole/test/browser/test-bug-595934-empty-getelementbyid.js
rename : toolkit/components/console/hudservice/tests/browser/test-bug-595934-html.html => browser/devtools/webconsole/test/browser/test-bug-595934-html.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-595934-image.html => browser/devtools/webconsole/test/browser/test-bug-595934-image.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-595934-image.jpg => browser/devtools/webconsole/test/browser/test-bug-595934-image.jpg
rename : toolkit/components/console/hudservice/tests/browser/test-bug-595934-imagemap.html => browser/devtools/webconsole/test/browser/test-bug-595934-imagemap.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-595934-malformedxml-external.html => browser/devtools/webconsole/test/browser/test-bug-595934-malformedxml-external.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-595934-malformedxml-external.xml => browser/devtools/webconsole/test/browser/test-bug-595934-malformedxml-external.xml
rename : toolkit/components/console/hudservice/tests/browser/test-bug-595934-malformedxml.xhtml => browser/devtools/webconsole/test/browser/test-bug-595934-malformedxml.xhtml
rename : toolkit/components/console/hudservice/tests/browser/test-bug-595934-svg.xhtml => browser/devtools/webconsole/test/browser/test-bug-595934-svg.xhtml
rename : toolkit/components/console/hudservice/tests/browser/test-bug-595934-workers.html => browser/devtools/webconsole/test/browser/test-bug-595934-workers.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-595934-workers.js => browser/devtools/webconsole/test/browser/test-bug-595934-workers.js
rename : toolkit/components/console/hudservice/tests/browser/test-bug-597136-external-script-errors.html => browser/devtools/webconsole/test/browser/test-bug-597136-external-script-errors.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-597136-external-script-errors.js => browser/devtools/webconsole/test/browser/test-bug-597136-external-script-errors.js
rename : toolkit/components/console/hudservice/tests/browser/test-bug-597756-reopen-closed-tab.html => browser/devtools/webconsole/test/browser/test-bug-597756-reopen-closed-tab.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-599725-response-headers.sjs => browser/devtools/webconsole/test/browser/test-bug-599725-response-headers.sjs
rename : toolkit/components/console/hudservice/tests/browser/test-bug-600183-charset.html => browser/devtools/webconsole/test/browser/test-bug-600183-charset.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-600183-charset.html^headers^ => browser/devtools/webconsole/test/browser/test-bug-600183-charset.html^headers^
rename : toolkit/components/console/hudservice/tests/browser/test-bug-601177-log-levels.html => browser/devtools/webconsole/test/browser/test-bug-601177-log-levels.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-601177-log-levels.js => browser/devtools/webconsole/test/browser/test-bug-601177-log-levels.js
rename : toolkit/components/console/hudservice/tests/browser/test-bug-603750-websocket.html => browser/devtools/webconsole/test/browser/test-bug-603750-websocket.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-603750-websocket.js => browser/devtools/webconsole/test/browser/test-bug-603750-websocket.js
rename : toolkit/components/console/hudservice/tests/browser/test-bug-613013-console-api-iframe.html => browser/devtools/webconsole/test/browser/test-bug-613013-console-api-iframe.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-618078-network-exceptions.html => browser/devtools/webconsole/test/browser/test-bug-618078-network-exceptions.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-621644-jsterm-dollar.html => browser/devtools/webconsole/test/browser/test-bug-621644-jsterm-dollar.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-630733-response-redirect-headers.sjs => browser/devtools/webconsole/test/browser/test-bug-630733-response-redirect-headers.sjs
rename : toolkit/components/console/hudservice/tests/browser/test-bug-632275-getters.html => browser/devtools/webconsole/test/browser/test-bug-632275-getters.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-632347-iterators-generators.html => browser/devtools/webconsole/test/browser/test-bug-632347-iterators-generators.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-644419-log-limits.html => browser/devtools/webconsole/test/browser/test-bug-644419-log-limits.html
rename : toolkit/components/console/hudservice/tests/browser/test-bug-646025-console-file-location.html => browser/devtools/webconsole/test/browser/test-bug-646025-console-file-location.html
rename : toolkit/components/console/hudservice/tests/browser/test-console-extras.html => browser/devtools/webconsole/test/browser/test-console-extras.html
rename : toolkit/components/console/hudservice/tests/browser/test-console-replaced-api.html => browser/devtools/webconsole/test/browser/test-console-replaced-api.html
rename : toolkit/components/console/hudservice/tests/browser/test-console.html => browser/devtools/webconsole/test/browser/test-console.html
rename : toolkit/components/console/hudservice/tests/browser/test-data.json => browser/devtools/webconsole/test/browser/test-data.json
rename : toolkit/components/console/hudservice/tests/browser/test-duplicate-error.html => browser/devtools/webconsole/test/browser/test-duplicate-error.html
rename : toolkit/components/console/hudservice/tests/browser/test-encoding-ISO-8859-1.html => browser/devtools/webconsole/test/browser/test-encoding-ISO-8859-1.html
rename : toolkit/components/console/hudservice/tests/browser/test-error.html => browser/devtools/webconsole/test/browser/test-error.html
rename : toolkit/components/console/hudservice/tests/browser/test-file-location.js => browser/devtools/webconsole/test/browser/test-file-location.js
rename : toolkit/components/console/hudservice/tests/browser/test-filter.html => browser/devtools/webconsole/test/browser/test-filter.html
rename : toolkit/components/console/hudservice/tests/browser/test-image.png => browser/devtools/webconsole/test/browser/test-image.png
rename : toolkit/components/console/hudservice/tests/browser/test-mutation.html => browser/devtools/webconsole/test/browser/test-mutation.html
rename : toolkit/components/console/hudservice/tests/browser/test-network-request.html => browser/devtools/webconsole/test/browser/test-network-request.html
rename : toolkit/components/console/hudservice/tests/browser/test-network.html => browser/devtools/webconsole/test/browser/test-network.html
rename : toolkit/components/console/hudservice/tests/browser/test-observe-http-ajax.html => browser/devtools/webconsole/test/browser/test-observe-http-ajax.html
rename : toolkit/components/console/hudservice/tests/browser/test-own-console.html => browser/devtools/webconsole/test/browser/test-own-console.html
rename : toolkit/components/console/hudservice/tests/browser/test-property-provider.html => browser/devtools/webconsole/test/browser/test-property-provider.html
rename : toolkit/components/console/hudservice/tests/browser/testscript.js => browser/devtools/webconsole/test/browser/testscript.js
2011-07-26 12:22:51 -03:00

405 lines
11 KiB
JavaScript

/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Autocomplete Popup.
*
* The Initial Developer of the Original Code is
* The Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2011
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Mihai Sucan <mihai.sucan@gmail.com> (original author)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
const Cu = Components.utils;
// The XUL and XHTML namespace.
const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
const XHTML_NS = "http://www.w3.org/1999/xhtml";
const HUD_STRINGS_URI = "chrome://global/locale/headsUpDisplay.properties";
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyGetter(this, "stringBundle", function () {
return Services.strings.createBundle(HUD_STRINGS_URI);
});
var EXPORTED_SYMBOLS = ["AutocompletePopup"];
/**
* Autocomplete popup UI implementation.
*
* @constructor
* @param nsIDOMDocument aDocument
* The document you want the popup attached to.
*/
function AutocompletePopup(aDocument)
{
this._document = aDocument;
// Reuse the existing popup elements.
this._panel = this._document.getElementById("webConsole_autocompletePopup");
if (!this._panel) {
this._panel = this._document.createElementNS(XUL_NS, "panel");
this._panel.setAttribute("id", "webConsole_autocompletePopup");
this._panel.setAttribute("label",
stringBundle.GetStringFromName("Autocomplete.label"));
this._panel.setAttribute("noautofocus", "true");
this._panel.setAttribute("ignorekeys", "true");
this._panel.setAttribute("level", "top");
let mainPopupSet = this._document.getElementById("mainPopupSet");
if (mainPopupSet) {
mainPopupSet.appendChild(this._panel);
}
else {
this._document.documentElement.appendChild(this._panel);
}
this._list = this._document.createElementNS(XUL_NS, "richlistbox");
this._list.flex = 1;
this._panel.appendChild(this._list);
// Open and hide the panel, so we initialize the API of the richlistbox.
this._panel.width = 1;
this._panel.height = 1;
this._panel.openPopup(null, "overlap", 0, 0, false, false);
this._panel.hidePopup();
this._panel.width = "";
this._panel.height = "";
}
else {
this._list = this._panel.firstChild;
}
}
AutocompletePopup.prototype = {
_document: null,
_panel: null,
_list: null,
/**
* Open the autocomplete popup panel.
*
* @param nsIDOMNode aAnchor
* Optional node to anchor the panel to.
*/
openPopup: function AP_openPopup(aAnchor)
{
this._panel.openPopup(aAnchor, "after_start", 0, 0, false, false);
if (this.onSelect) {
this._list.addEventListener("select", this.onSelect, false);
}
if (this.onClick) {
this._list.addEventListener("click", this.onClick, false);
}
this._updateSize();
},
/**
* Hide the autocomplete popup panel.
*/
hidePopup: function AP_hidePopup()
{
this._panel.hidePopup();
if (this.onSelect) {
this._list.removeEventListener("select", this.onSelect, false);
}
if (this.onClick) {
this._list.removeEventListener("click", this.onClick, false);
}
},
/**
* Check if the autocomplete popup is open.
*/
get isOpen() {
return this._panel.state == "open";
},
/**
* Destroy the object instance. Please note that the panel DOM elements remain
* in the DOM, because they might still be in use by other instances of the
* same code. It is the responsability of the client code to perform DOM
* cleanup.
*/
destroy: function AP_destroy()
{
if (this.isOpen) {
this.hidePopup();
}
this.clearItems();
this._document = null;
this._list = null;
this._panel = null;
},
/**
* Get the autocomplete items array.
*
* @return array
* The array of autocomplete items.
*/
getItems: function AP_getItems()
{
let items = [];
Array.forEach(this._list.childNodes, function(aItem) {
items.push(aItem._autocompleteItem);
});
return items;
},
/**
* Set the autocomplete items list, in one go.
*
* @param array aItems
* The list of items you want displayed in the popup list.
*/
setItems: function AP_setItems(aItems)
{
this.clearItems();
aItems.forEach(this.appendItem, this);
// Make sure that the new content is properly fitted by the XUL richlistbox.
if (this.isOpen) {
// We need the timeout to allow the content to reflow. Attempting to
// update the richlistbox size too early does not work.
this._document.defaultView.setTimeout(this._updateSize.bind(this), 1);
}
},
/**
* Update the panel size to fit the content.
*
* @private
*/
_updateSize: function AP__updateSize()
{
this._list.width = this._panel.clientWidth +
this._scrollbarWidth;
},
/**
* Clear all the items from the autocomplete list.
*/
clearItems: function AP_clearItems()
{
while (this._list.hasChildNodes()) {
this._list.removeChild(this._list.firstChild);
}
// Reset the panel and list dimensions. New dimensions are calculated when a
// new set of items is added to the autocomplete popup.
this._list.width = "";
this._list.height = "";
this._panel.width = "";
this._panel.height = "";
this._panel.top = "";
this._panel.left = "";
},
/**
* Getter for the index of the selected item.
*
* @type number
*/
get selectedIndex() {
return this._list.selectedIndex;
},
/**
* Setter for the selected index.
*
* @param number aIndex
* The number (index) of the item you want to select in the list.
*/
set selectedIndex(aIndex) {
this._list.selectedIndex = aIndex;
this._list.ensureIndexIsVisible(this._list.selectedIndex);
},
/**
* Getter for the selected item.
* @type object
*/
get selectedItem() {
return this._list.selectedItem ?
this._list.selectedItem._autocompleteItem : null;
},
/**
* Setter for the selected item.
*
* @param object aItem
* The object you want selected in the list.
*/
set selectedItem(aItem) {
this._list.selectedItem = this._findListItem(aItem);
this._list.ensureIndexIsVisible(this._list.selectedIndex);
},
/**
* Append an item into the autocomplete list.
*
* @param object aItem
* The item you want appended to the list. The object must have a
* "label" property which is used as the displayed value.
*/
appendItem: function AP_appendItem(aItem)
{
let description = this._document.createElementNS(XUL_NS, "description");
description.textContent = aItem.label;
let listItem = this._document.createElementNS(XUL_NS, "richlistitem");
listItem.appendChild(description);
listItem._autocompleteItem = aItem;
this._list.appendChild(listItem);
},
/**
* Find the richlistitem element that belongs to an item.
*
* @private
*
* @param object aItem
* The object you want found in the list.
*
* @return nsIDOMNode|null
* The nsIDOMNode that belongs to the given item object. This node is
* the richlistitem element.
*/
_findListItem: function AP__findListItem(aItem)
{
for (let i = 0; i < this._list.childNodes.length; i++) {
let child = this._list.childNodes[i];
if (child._autocompleteItem == aItem) {
return child;
}
}
return null;
},
/**
* Remove an item from the popup list.
*
* @param object aItem
* The item you want removed.
*/
removeItem: function AP_removeItem(aItem)
{
let item = this._findListItem(aItem);
if (!item) {
throw new Error("Item not found!");
}
this._list.removeChild(item);
},
/**
* Getter for the number of items in the popup.
* @type number
*/
get itemCount() {
return this._list.childNodes.length;
},
/**
* Select the next item in the list.
*
* @return object
* The newly selected item object.
*/
selectNextItem: function AP_selectNextItem()
{
if (this.selectedIndex < (this.itemCount - 1)) {
this.selectedIndex++;
}
else {
this.selectedIndex = -1;
}
return this.selectedItem;
},
/**
* Select the previous item in the list.
*
* @return object
* The newly selected item object.
*/
selectPreviousItem: function AP_selectPreviousItem()
{
if (this.selectedIndex > -1) {
this.selectedIndex--;
}
else {
this.selectedIndex = this.itemCount - 1;
}
return this.selectedItem;
},
/**
* Determine the scrollbar width in the current document.
*
* @private
*/
get _scrollbarWidth()
{
if (this.__scrollbarWidth) {
return this.__scrollbarWidth;
}
let hbox = this._document.createElementNS(XUL_NS, "hbox");
hbox.setAttribute("style", "height: 0%; overflow: hidden");
let scrollbar = this._document.createElementNS(XUL_NS, "scrollbar");
scrollbar.setAttribute("orient", "vertical");
hbox.appendChild(scrollbar);
this._document.documentElement.appendChild(hbox);
this.__scrollbarWidth = scrollbar.clientWidth;
this._document.documentElement.removeChild(hbox);
return this.__scrollbarWidth;
},
};