merge autoland to mozilla-central. r=merge a=merge
authorSebastian Hengst <archaeopteryx@coole-files.de>
Sun, 18 Jun 2017 20:27:21 +0200
changeset 364552 ae20db43e8157d48d2e8376eddaabadfdcdd041c
parent 364534 b9485ab03d8ca086028f6c95da4906ff9287684e (current diff)
parent 364551 21c6a3e5c9914b53d757a38da93e9147550912e9 (diff)
child 364563 95543bdc59bd038a3d5d084b85a4fec493c349ee
push id32047
push userarchaeopteryx@coole-files.de
push dateSun, 18 Jun 2017 18:28:16 +0000
treeherdermozilla-central@ae20db43e815 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge, merge
milestone56.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
merge autoland to mozilla-central. r=merge a=merge MozReview-Commit-ID: Fhfh9wPpXMp
dom/encoding/EncodingUtils.cpp
dom/encoding/EncodingUtils.h
dom/encoding/encodingsgroups.properties
mobile/android/base/resources/anim/grow_fade_in.xml
mobile/android/base/resources/anim/overlay_check_entry.xml
mobile/android/base/resources/anim/overlay_check_exit.xml
mobile/android/base/resources/anim/overlay_pop.xml
mobile/android/base/resources/anim/overlay_slide_down.xml
mobile/android/base/resources/anim/overlay_slide_up.xml
mobile/android/base/resources/anim/popup_hide.xml
mobile/android/base/resources/anim/popup_show.xml
mobile/android/base/resources/color/action_bar_menu_item_colors.xml
mobile/android/base/resources/color/action_bar_secondary_menu_item_colors.xml
mobile/android/base/resources/color/facet_button_text_color.xml
mobile/android/base/resources/color/pressed_about_page_header_grey.xml
mobile/android/base/resources/color/primary_text.xml
mobile/android/base/resources/color/primary_text_selector.xml
mobile/android/base/resources/color/recyclerview_selector.xml
mobile/android/base/resources/color/secondary_text.xml
mobile/android/base/resources/color/select_item_multichoice.xml
mobile/android/base/resources/color/state_pressed_toolbar_grey_pressed.xml
mobile/android/base/resources/color/tab_item_title.xml
mobile/android/base/resources/color/tab_new_tab_strip_colors.xml
mobile/android/base/resources/color/tab_strip_item_bg.xml
mobile/android/base/resources/color/tab_strip_item_title.xml
mobile/android/base/resources/color/tab_text_color.xml
mobile/android/base/resources/color/tabs_counter_text_color.xml
mobile/android/base/resources/color/tertiary_text.xml
mobile/android/base/resources/color/toolbar_display_layout_bg.xml
mobile/android/base/resources/color/top_sites_grid_item_title.xml
mobile/android/base/resources/color/url_bar_title.xml
mobile/android/base/resources/color/url_bar_title_hint.xml
mobile/android/base/resources/drawable-hdpi-v11/alert_camera.png
mobile/android/base/resources/drawable-hdpi-v11/alert_download.png
mobile/android/base/resources/drawable-hdpi-v11/alert_guest.png
mobile/android/base/resources/drawable-hdpi-v11/alert_mic.png
mobile/android/base/resources/drawable-hdpi-v11/alert_mic_camera.png
mobile/android/base/resources/drawable-hdpi-v11/ic_menu_back.png
mobile/android/base/resources/drawable-hdpi-v11/ic_menu_bookmark_add.png
mobile/android/base/resources/drawable-hdpi-v11/ic_menu_forward.png
mobile/android/base/resources/drawable-hdpi-v11/ic_menu_reload.png
mobile/android/base/resources/drawable-hdpi-v11/ic_menu_stop.png
mobile/android/base/resources/drawable-hdpi-v11/ic_status_logo.png
mobile/android/base/resources/drawable-hdpi-v11/star_blue.png
mobile/android/base/resources/drawable-hdpi/ab_add_search_engine.png
mobile/android/base/resources/drawable-hdpi/ab_copy.png
mobile/android/base/resources/drawable-hdpi/ab_cut.png
mobile/android/base/resources/drawable-hdpi/ab_done.png
mobile/android/base/resources/drawable-hdpi/ab_menu.png
mobile/android/base/resources/drawable-hdpi/ab_mic.png
mobile/android/base/resources/drawable-hdpi/ab_paste.png
mobile/android/base/resources/drawable-hdpi/ab_qrcode.png
mobile/android/base/resources/drawable-hdpi/ab_search.png
mobile/android/base/resources/drawable-hdpi/ab_select_all.png
mobile/android/base/resources/drawable-hdpi/add_folder.png
mobile/android/base/resources/drawable-hdpi/alert_camera.png
mobile/android/base/resources/drawable-hdpi/alert_download.png
mobile/android/base/resources/drawable-hdpi/alert_download_animation_1.png
mobile/android/base/resources/drawable-hdpi/alert_download_animation_2.png
mobile/android/base/resources/drawable-hdpi/alert_download_animation_3.png
mobile/android/base/resources/drawable-hdpi/alert_download_animation_4.png
mobile/android/base/resources/drawable-hdpi/alert_download_animation_5.png
mobile/android/base/resources/drawable-hdpi/alert_download_animation_6.png
mobile/android/base/resources/drawable-hdpi/alert_guest.png
mobile/android/base/resources/drawable-hdpi/alert_mic.png
mobile/android/base/resources/drawable-hdpi/alert_mic_camera.png
mobile/android/base/resources/drawable-hdpi/arrow.png
mobile/android/base/resources/drawable-hdpi/arrow_up.png
mobile/android/base/resources/drawable-hdpi/blank.png
mobile/android/base/resources/drawable-hdpi/casting.png
mobile/android/base/resources/drawable-hdpi/casting_active.png
mobile/android/base/resources/drawable-hdpi/close.png
mobile/android/base/resources/drawable-hdpi/close_edit_mode_dark.png
mobile/android/base/resources/drawable-hdpi/close_edit_mode_light.png
mobile/android/base/resources/drawable-hdpi/color_picker_row_bg.9.png
mobile/android/base/resources/drawable-hdpi/device_desktop.png
mobile/android/base/resources/drawable-hdpi/device_mobile.png
mobile/android/base/resources/drawable-hdpi/dropshadow.9.png
mobile/android/base/resources/drawable-hdpi/favicon_globe.png
mobile/android/base/resources/drawable-hdpi/find_close.png
mobile/android/base/resources/drawable-hdpi/find_next.png
mobile/android/base/resources/drawable-hdpi/find_prev.png
mobile/android/base/resources/drawable-hdpi/firefox_settings_alert.png
mobile/android/base/resources/drawable-hdpi/flat_icon.png
mobile/android/base/resources/drawable-hdpi/folder_closed.png
mobile/android/base/resources/drawable-hdpi/foxfinder.webp
mobile/android/base/resources/drawable-hdpi/globe_light.png
mobile/android/base/resources/drawable-hdpi/grid_icon_bg_activated.9.png
mobile/android/base/resources/drawable-hdpi/grid_icon_bg_focused.9.png
mobile/android/base/resources/drawable-hdpi/handle_end.png
mobile/android/base/resources/drawable-hdpi/handle_middle.png
mobile/android/base/resources/drawable-hdpi/handle_start.png
mobile/android/base/resources/drawable-hdpi/helper_readerview_bookmark.webp
mobile/android/base/resources/drawable-hdpi/home_bg.png
mobile/android/base/resources/drawable-hdpi/home_group_collapsed.png
mobile/android/base/resources/drawable-hdpi/home_star.png
mobile/android/base/resources/drawable-hdpi/home_tab_menu_strip.9.png
mobile/android/base/resources/drawable-hdpi/homepage_banner_firstrun.png
mobile/android/base/resources/drawable-hdpi/ic_action_settings.png
mobile/android/base/resources/drawable-hdpi/ic_media_pause.png
mobile/android/base/resources/drawable-hdpi/ic_media_play.png
mobile/android/base/resources/drawable-hdpi/ic_menu_share.png
mobile/android/base/resources/drawable-hdpi/ic_status_logo.png
mobile/android/base/resources/drawable-hdpi/ic_url_bar_tab.png
mobile/android/base/resources/drawable-hdpi/ic_widget_new_tab.png
mobile/android/base/resources/drawable-hdpi/ic_widget_search.png
mobile/android/base/resources/drawable-hdpi/icon_bookmarks_empty.png
mobile/android/base/resources/drawable-hdpi/icon_home_empty_firefox.png
mobile/android/base/resources/drawable-hdpi/icon_key.png
mobile/android/base/resources/drawable-hdpi/icon_most_recent_empty.png
mobile/android/base/resources/drawable-hdpi/icon_openinapp.png
mobile/android/base/resources/drawable-hdpi/icon_pageaction.png
mobile/android/base/resources/drawable-hdpi/icon_remote_tabs_empty.png
mobile/android/base/resources/drawable-hdpi/icon_search_empty_firefox.png
mobile/android/base/resources/drawable-hdpi/icon_shareplane.png
mobile/android/base/resources/drawable-hdpi/img_check.png
mobile/android/base/resources/drawable-hdpi/location.png
mobile/android/base/resources/drawable-hdpi/lock_disabled.png
mobile/android/base/resources/drawable-hdpi/lock_inactive.png
mobile/android/base/resources/drawable-hdpi/lock_secure.png
mobile/android/base/resources/drawable-hdpi/media_bar_pause.png
mobile/android/base/resources/drawable-hdpi/media_bar_play.png
mobile/android/base/resources/drawable-hdpi/media_bar_stop.png
mobile/android/base/resources/drawable-hdpi/menu.png
mobile/android/base/resources/drawable-hdpi/menu_item_check.png
mobile/android/base/resources/drawable-hdpi/menu_item_more.png
mobile/android/base/resources/drawable-hdpi/menu_item_uncheck.png
mobile/android/base/resources/drawable-hdpi/network_error.png
mobile/android/base/resources/drawable-hdpi/notification_media.webp
mobile/android/base/resources/drawable-hdpi/open_in_browser.png
mobile/android/base/resources/drawable-hdpi/orange_check.png
mobile/android/base/resources/drawable-hdpi/overlay_bookmark_icon.png
mobile/android/base/resources/drawable-hdpi/overlay_bookmarked_already_icon.png
mobile/android/base/resources/drawable-hdpi/overlay_check.png
mobile/android/base/resources/drawable-hdpi/pause.png
mobile/android/base/resources/drawable-hdpi/phone.png
mobile/android/base/resources/drawable-hdpi/play.png
mobile/android/base/resources/drawable-hdpi/private_masq.png
mobile/android/base/resources/drawable-hdpi/progress.9.png
mobile/android/base/resources/drawable-hdpi/reader.png
mobile/android/base/resources/drawable-hdpi/reader_active.png
mobile/android/base/resources/drawable-hdpi/reading_list_folder.png
mobile/android/base/resources/drawable-hdpi/search_clear.png
mobile/android/base/resources/drawable-hdpi/search_history.png
mobile/android/base/resources/drawable-hdpi/search_icon_active.png
mobile/android/base/resources/drawable-hdpi/search_icon_inactive.png
mobile/android/base/resources/drawable-hdpi/search_launcher.png
mobile/android/base/resources/drawable-hdpi/search_plus.png
mobile/android/base/resources/drawable-hdpi/settings_notifications.png
mobile/android/base/resources/drawable-hdpi/shareplane.png
mobile/android/base/resources/drawable-hdpi/shield_disabled.png
mobile/android/base/resources/drawable-hdpi/shield_enabled.png
mobile/android/base/resources/drawable-hdpi/status_icon_readercache.png
mobile/android/base/resources/drawable-hdpi/suggestedsites_amazon.png
mobile/android/base/resources/drawable-hdpi/suggestedsites_facebook.png
mobile/android/base/resources/drawable-hdpi/suggestedsites_twitter.png
mobile/android/base/resources/drawable-hdpi/suggestedsites_wikipedia.png
mobile/android/base/resources/drawable-hdpi/suggestedsites_youtube.png
mobile/android/base/resources/drawable-hdpi/switch_button_icon.png
mobile/android/base/resources/drawable-hdpi/tab_audio_playing.png
mobile/android/base/resources/drawable-hdpi/tab_close.png
mobile/android/base/resources/drawable-hdpi/tab_close_active.png
mobile/android/base/resources/drawable-hdpi/tab_indicator_background.9.png
mobile/android/base/resources/drawable-hdpi/tab_indicator_divider.9.png
mobile/android/base/resources/drawable-hdpi/tab_indicator_selected.9.png
mobile/android/base/resources/drawable-hdpi/tab_indicator_selected_focused.9.png
mobile/android/base/resources/drawable-hdpi/tab_new.png
mobile/android/base/resources/drawable-hdpi/tab_preview_masq.png
mobile/android/base/resources/drawable-hdpi/tabs_count.png
mobile/android/base/resources/drawable-hdpi/tabs_count_foreground.png
mobile/android/base/resources/drawable-hdpi/tabs_normal.png
mobile/android/base/resources/drawable-hdpi/tabs_panel_nav_back.png
mobile/android/base/resources/drawable-hdpi/tabs_private.png
mobile/android/base/resources/drawable-hdpi/tip_addsearch.png
mobile/android/base/resources/drawable-hdpi/top_site_add.png
mobile/android/base/resources/drawable-hdpi/tracking_protection_toolbar_illustration.png
mobile/android/base/resources/drawable-hdpi/undo_button_icon.png
mobile/android/base/resources/drawable-hdpi/url_bar_entry_default.9.png
mobile/android/base/resources/drawable-hdpi/url_bar_entry_default_pb.9.png
mobile/android/base/resources/drawable-hdpi/url_bar_entry_pressed.9.png
mobile/android/base/resources/drawable-hdpi/url_bar_entry_pressed_pb.9.png
mobile/android/base/resources/drawable-hdpi/urlbar_stop.png
mobile/android/base/resources/drawable-hdpi/validation_arrow.png
mobile/android/base/resources/drawable-hdpi/validation_arrow_inverted.png
mobile/android/base/resources/drawable-hdpi/validation_bg.9.png
mobile/android/base/resources/drawable-hdpi/warning_major.png
mobile/android/base/resources/drawable-hdpi/warning_minor.png
mobile/android/base/resources/drawable-hdpi/widget_bg.9.png
mobile/android/base/resources/drawable-large-hdpi-v11/ic_menu_back.png
mobile/android/base/resources/drawable-large-hdpi-v11/ic_menu_forward.png
mobile/android/base/resources/drawable-large-hdpi-v11/ic_menu_reload.png
mobile/android/base/resources/drawable-large-hdpi-v11/ic_menu_stop.png
mobile/android/base/resources/drawable-large-hdpi-v11/tabs_count.png
mobile/android/base/resources/drawable-large-hdpi-v11/tabs_count_foreground.png
mobile/android/base/resources/drawable-large-hdpi-v11/toolbar_favicon_default.png
mobile/android/base/resources/drawable-large-hdpi-v11/url_bar_entry_default.9.png
mobile/android/base/resources/drawable-large-hdpi-v11/url_bar_entry_default_pb.9.png
mobile/android/base/resources/drawable-large-hdpi-v11/url_bar_entry_pressed.9.png
mobile/android/base/resources/drawable-large-hdpi-v11/url_bar_entry_pressed_pb.9.png
mobile/android/base/resources/drawable-large-v11/browser_toolbar_action_bar_button.xml
mobile/android/base/resources/drawable-large-v11/url_bar_nav_button.xml
mobile/android/base/resources/drawable-large-xhdpi-v11/ic_menu_back.png
mobile/android/base/resources/drawable-large-xhdpi-v11/ic_menu_forward.png
mobile/android/base/resources/drawable-large-xhdpi-v11/ic_menu_reload.png
mobile/android/base/resources/drawable-large-xhdpi-v11/ic_menu_stop.png
mobile/android/base/resources/drawable-large-xhdpi-v11/tabs_count.png
mobile/android/base/resources/drawable-large-xhdpi-v11/tabs_count_foreground.png
mobile/android/base/resources/drawable-large-xhdpi-v11/toolbar_favicon_default.png
mobile/android/base/resources/drawable-large-xhdpi-v11/url_bar_entry_default.9.png
mobile/android/base/resources/drawable-large-xhdpi-v11/url_bar_entry_default_pb.9.png
mobile/android/base/resources/drawable-large-xhdpi-v11/url_bar_entry_pressed.9.png
mobile/android/base/resources/drawable-large-xhdpi-v11/url_bar_entry_pressed_pb.9.png
mobile/android/base/resources/drawable-large-xxhdpi-v11/ic_menu_back.png
mobile/android/base/resources/drawable-large-xxhdpi-v11/ic_menu_forward.png
mobile/android/base/resources/drawable-large-xxhdpi-v11/ic_menu_reload.png
mobile/android/base/resources/drawable-large-xxhdpi-v11/ic_menu_stop.png
mobile/android/base/resources/drawable-large-xxhdpi-v11/tabs_count.png
mobile/android/base/resources/drawable-large-xxhdpi-v11/tabs_count_foreground.png
mobile/android/base/resources/drawable-large-xxhdpi-v11/toolbar_favicon_default.png
mobile/android/base/resources/drawable-large-xxhdpi-v11/url_bar_entry_default.9.png
mobile/android/base/resources/drawable-large-xxhdpi-v11/url_bar_entry_default_pb.9.png
mobile/android/base/resources/drawable-large-xxhdpi-v11/url_bar_entry_pressed.9.png
mobile/android/base/resources/drawable-large-xxhdpi-v11/url_bar_entry_pressed_pb.9.png
mobile/android/base/resources/drawable-ldrtl-hdpi/arrow.png
mobile/android/base/resources/drawable-ldrtl-hdpi/home_group_collapsed.png
mobile/android/base/resources/drawable-ldrtl-hdpi/ic_menu_back.png
mobile/android/base/resources/drawable-ldrtl-hdpi/ic_menu_forward.png
mobile/android/base/resources/drawable-ldrtl-hdpi/menu_item_more.png
mobile/android/base/resources/drawable-ldrtl-hdpi/progress.9.png
mobile/android/base/resources/drawable-ldrtl-hdpi/tabs_panel_nav_back.png
mobile/android/base/resources/drawable-ldrtl-large-hdpi/ic_menu_back.png
mobile/android/base/resources/drawable-ldrtl-large-hdpi/ic_menu_forward.png
mobile/android/base/resources/drawable-ldrtl-large-xhdpi/ic_menu_back.png
mobile/android/base/resources/drawable-ldrtl-large-xhdpi/ic_menu_forward.png
mobile/android/base/resources/drawable-ldrtl-large-xxhdpi/ic_menu_back.png
mobile/android/base/resources/drawable-ldrtl-large-xxhdpi/ic_menu_forward.png
mobile/android/base/resources/drawable-ldrtl-xhdpi/arrow.png
mobile/android/base/resources/drawable-ldrtl-xhdpi/home_group_collapsed.png
mobile/android/base/resources/drawable-ldrtl-xhdpi/ic_menu_back.png
mobile/android/base/resources/drawable-ldrtl-xhdpi/ic_menu_forward.png
mobile/android/base/resources/drawable-ldrtl-xhdpi/menu_item_more.png
mobile/android/base/resources/drawable-ldrtl-xhdpi/progress.9.png
mobile/android/base/resources/drawable-ldrtl-xhdpi/tabs_panel_nav_back.png
mobile/android/base/resources/drawable-ldrtl-xxhdpi/arrow.png
mobile/android/base/resources/drawable-ldrtl-xxhdpi/home_group_collapsed.png
mobile/android/base/resources/drawable-ldrtl-xxhdpi/tabs_panel_nav_back.png
mobile/android/base/resources/drawable-nodpi/cloud.png
mobile/android/base/resources/drawable-nodpi/firstrun_account.webp
mobile/android/base/resources/drawable-nodpi/firstrun_bookmarks.webp
mobile/android/base/resources/drawable-nodpi/firstrun_data_off.webp
mobile/android/base/resources/drawable-nodpi/firstrun_data_on.webp
mobile/android/base/resources/drawable-nodpi/firstrun_readerview.webp
mobile/android/base/resources/drawable-nodpi/firstrun_signin.webp
mobile/android/base/resources/drawable-nodpi/firstrun_sync.webp
mobile/android/base/resources/drawable-nodpi/firstrun_tabqueue_off.png
mobile/android/base/resources/drawable-nodpi/firstrun_tabqueue_on.webp
mobile/android/base/resources/drawable-nodpi/firstrun_urlbar.webp
mobile/android/base/resources/drawable-nodpi/icon_recent.png
mobile/android/base/resources/drawable-v12/toast_button_background.xml
mobile/android/base/resources/drawable-v17/url_bar_translating_edge.xml
mobile/android/base/resources/drawable-v21/logo.xml
mobile/android/base/resources/drawable-xhdpi-v11/alert_camera.png
mobile/android/base/resources/drawable-xhdpi-v11/alert_download.png
mobile/android/base/resources/drawable-xhdpi-v11/alert_guest.png
mobile/android/base/resources/drawable-xhdpi-v11/alert_mic.png
mobile/android/base/resources/drawable-xhdpi-v11/alert_mic_camera.png
mobile/android/base/resources/drawable-xhdpi-v11/ic_menu_back.png
mobile/android/base/resources/drawable-xhdpi-v11/ic_menu_bookmark_add.png
mobile/android/base/resources/drawable-xhdpi-v11/ic_menu_forward.png
mobile/android/base/resources/drawable-xhdpi-v11/ic_menu_reload.png
mobile/android/base/resources/drawable-xhdpi-v11/ic_menu_stop.png
mobile/android/base/resources/drawable-xhdpi-v11/ic_status_logo.png
mobile/android/base/resources/drawable-xhdpi-v11/star_blue.png
mobile/android/base/resources/drawable-xhdpi/ab_add_search_engine.png
mobile/android/base/resources/drawable-xhdpi/ab_copy.png
mobile/android/base/resources/drawable-xhdpi/ab_cut.png
mobile/android/base/resources/drawable-xhdpi/ab_done.png
mobile/android/base/resources/drawable-xhdpi/ab_menu.png
mobile/android/base/resources/drawable-xhdpi/ab_mic.png
mobile/android/base/resources/drawable-xhdpi/ab_paste.png
mobile/android/base/resources/drawable-xhdpi/ab_qrcode.png
mobile/android/base/resources/drawable-xhdpi/ab_search.png
mobile/android/base/resources/drawable-xhdpi/ab_select_all.png
mobile/android/base/resources/drawable-xhdpi/add_folder.png
mobile/android/base/resources/drawable-xhdpi/alert_camera.png
mobile/android/base/resources/drawable-xhdpi/alert_download.png
mobile/android/base/resources/drawable-xhdpi/alert_download_animation_1.png
mobile/android/base/resources/drawable-xhdpi/alert_download_animation_2.png
mobile/android/base/resources/drawable-xhdpi/alert_download_animation_3.png
mobile/android/base/resources/drawable-xhdpi/alert_download_animation_4.png
mobile/android/base/resources/drawable-xhdpi/alert_download_animation_5.png
mobile/android/base/resources/drawable-xhdpi/alert_download_animation_6.png
mobile/android/base/resources/drawable-xhdpi/alert_guest.png
mobile/android/base/resources/drawable-xhdpi/alert_mic.png
mobile/android/base/resources/drawable-xhdpi/alert_mic_camera.png
mobile/android/base/resources/drawable-xhdpi/arrow.png
mobile/android/base/resources/drawable-xhdpi/arrow_up.png
mobile/android/base/resources/drawable-xhdpi/blank.png
mobile/android/base/resources/drawable-xhdpi/casting.png
mobile/android/base/resources/drawable-xhdpi/casting_active.png
mobile/android/base/resources/drawable-xhdpi/close.png
mobile/android/base/resources/drawable-xhdpi/close_edit_mode_dark.png
mobile/android/base/resources/drawable-xhdpi/close_edit_mode_light.png
mobile/android/base/resources/drawable-xhdpi/color_picker_row_bg.9.png
mobile/android/base/resources/drawable-xhdpi/device_desktop.png
mobile/android/base/resources/drawable-xhdpi/device_mobile.png
mobile/android/base/resources/drawable-xhdpi/dropshadow.9.png
mobile/android/base/resources/drawable-xhdpi/favicon_globe.png
mobile/android/base/resources/drawable-xhdpi/find_close.png
mobile/android/base/resources/drawable-xhdpi/find_next.png
mobile/android/base/resources/drawable-xhdpi/find_prev.png
mobile/android/base/resources/drawable-xhdpi/firefox_settings_alert.png
mobile/android/base/resources/drawable-xhdpi/flat_icon.png
mobile/android/base/resources/drawable-xhdpi/folder_closed.png
mobile/android/base/resources/drawable-xhdpi/foxfinder.webp
mobile/android/base/resources/drawable-xhdpi/globe_light.png
mobile/android/base/resources/drawable-xhdpi/grid_icon_bg_activated.9.png
mobile/android/base/resources/drawable-xhdpi/grid_icon_bg_focused.9.png
mobile/android/base/resources/drawable-xhdpi/handle_end.png
mobile/android/base/resources/drawable-xhdpi/handle_middle.png
mobile/android/base/resources/drawable-xhdpi/handle_start.png
mobile/android/base/resources/drawable-xhdpi/helper_readerview_bookmark.webp
mobile/android/base/resources/drawable-xhdpi/home_group_collapsed.png
mobile/android/base/resources/drawable-xhdpi/home_tab_menu_strip.9.png
mobile/android/base/resources/drawable-xhdpi/homepage_banner_firstrun.png
mobile/android/base/resources/drawable-xhdpi/ic_action_settings.png
mobile/android/base/resources/drawable-xhdpi/ic_media_pause.png
mobile/android/base/resources/drawable-xhdpi/ic_media_play.png
mobile/android/base/resources/drawable-xhdpi/ic_menu_share.png
mobile/android/base/resources/drawable-xhdpi/ic_status_logo.png
mobile/android/base/resources/drawable-xhdpi/ic_url_bar_tab.png
mobile/android/base/resources/drawable-xhdpi/ic_widget_new_tab.png
mobile/android/base/resources/drawable-xhdpi/ic_widget_search.png
mobile/android/base/resources/drawable-xhdpi/icon_bookmarks_empty.png
mobile/android/base/resources/drawable-xhdpi/icon_home_empty_firefox.png
mobile/android/base/resources/drawable-xhdpi/icon_key.png
mobile/android/base/resources/drawable-xhdpi/icon_most_recent_empty.png
mobile/android/base/resources/drawable-xhdpi/icon_openinapp.png
mobile/android/base/resources/drawable-xhdpi/icon_pageaction.png
mobile/android/base/resources/drawable-xhdpi/icon_remote_tabs_empty.png
mobile/android/base/resources/drawable-xhdpi/icon_search_empty_firefox.png
mobile/android/base/resources/drawable-xhdpi/icon_shareplane.png
mobile/android/base/resources/drawable-xhdpi/img_check.png
mobile/android/base/resources/drawable-xhdpi/location.png
mobile/android/base/resources/drawable-xhdpi/lock_disabled.png
mobile/android/base/resources/drawable-xhdpi/lock_inactive.png
mobile/android/base/resources/drawable-xhdpi/lock_secure.png
mobile/android/base/resources/drawable-xhdpi/media_bar_pause.png
mobile/android/base/resources/drawable-xhdpi/media_bar_play.png
mobile/android/base/resources/drawable-xhdpi/media_bar_stop.png
mobile/android/base/resources/drawable-xhdpi/menu.png
mobile/android/base/resources/drawable-xhdpi/menu_item_check.png
mobile/android/base/resources/drawable-xhdpi/menu_item_more.png
mobile/android/base/resources/drawable-xhdpi/menu_item_uncheck.png
mobile/android/base/resources/drawable-xhdpi/network_error.png
mobile/android/base/resources/drawable-xhdpi/notification_media.webp
mobile/android/base/resources/drawable-xhdpi/open_in_browser.png
mobile/android/base/resources/drawable-xhdpi/orange_check.png
mobile/android/base/resources/drawable-xhdpi/overlay_bookmark_icon.png
mobile/android/base/resources/drawable-xhdpi/overlay_bookmarked_already_icon.png
mobile/android/base/resources/drawable-xhdpi/overlay_check.png
mobile/android/base/resources/drawable-xhdpi/pause.png
mobile/android/base/resources/drawable-xhdpi/phone.png
mobile/android/base/resources/drawable-xhdpi/play.png
mobile/android/base/resources/drawable-xhdpi/private_masq.png
mobile/android/base/resources/drawable-xhdpi/progress.9.png
mobile/android/base/resources/drawable-xhdpi/push_notification.png
mobile/android/base/resources/drawable-xhdpi/reader.png
mobile/android/base/resources/drawable-xhdpi/reader_active.png
mobile/android/base/resources/drawable-xhdpi/reading_list_folder.png
mobile/android/base/resources/drawable-xhdpi/search_clear.png
mobile/android/base/resources/drawable-xhdpi/search_history.png
mobile/android/base/resources/drawable-xhdpi/search_icon_active.png
mobile/android/base/resources/drawable-xhdpi/search_icon_inactive.png
mobile/android/base/resources/drawable-xhdpi/search_launcher.png
mobile/android/base/resources/drawable-xhdpi/search_plus.png
mobile/android/base/resources/drawable-xhdpi/settings_notifications.png
mobile/android/base/resources/drawable-xhdpi/shareplane.png
mobile/android/base/resources/drawable-xhdpi/shield_disabled.png
mobile/android/base/resources/drawable-xhdpi/shield_enabled.png
mobile/android/base/resources/drawable-xhdpi/status_icon_readercache.png
mobile/android/base/resources/drawable-xhdpi/suggestedsites_amazon.png
mobile/android/base/resources/drawable-xhdpi/suggestedsites_facebook.png
mobile/android/base/resources/drawable-xhdpi/suggestedsites_restricted_fxsupport.png
mobile/android/base/resources/drawable-xhdpi/suggestedsites_restricted_mozilla.png
mobile/android/base/resources/drawable-xhdpi/suggestedsites_twitter.png
mobile/android/base/resources/drawable-xhdpi/suggestedsites_webmaker.png
mobile/android/base/resources/drawable-xhdpi/suggestedsites_wikipedia.png
mobile/android/base/resources/drawable-xhdpi/suggestedsites_youtube.png
mobile/android/base/resources/drawable-xhdpi/switch_button_icon.png
mobile/android/base/resources/drawable-xhdpi/tab_audio_playing.png
mobile/android/base/resources/drawable-xhdpi/tab_close.png
mobile/android/base/resources/drawable-xhdpi/tab_close_active.png
mobile/android/base/resources/drawable-xhdpi/tab_indicator_background.9.png
mobile/android/base/resources/drawable-xhdpi/tab_indicator_divider.9.png
mobile/android/base/resources/drawable-xhdpi/tab_indicator_selected.9.png
mobile/android/base/resources/drawable-xhdpi/tab_indicator_selected_focused.9.png
mobile/android/base/resources/drawable-xhdpi/tab_new.png
mobile/android/base/resources/drawable-xhdpi/tab_preview_masq.png
mobile/android/base/resources/drawable-xhdpi/tabs_count.png
mobile/android/base/resources/drawable-xhdpi/tabs_count_foreground.png
mobile/android/base/resources/drawable-xhdpi/tabs_normal.png
mobile/android/base/resources/drawable-xhdpi/tabs_panel_nav_back.png
mobile/android/base/resources/drawable-xhdpi/tabs_private.png
mobile/android/base/resources/drawable-xhdpi/tip_addsearch.png
mobile/android/base/resources/drawable-xhdpi/top_site_add.png
mobile/android/base/resources/drawable-xhdpi/tracking_protection_toolbar_illustration.png
mobile/android/base/resources/drawable-xhdpi/undo_button_icon.png
mobile/android/base/resources/drawable-xhdpi/url_bar_entry_default.9.png
mobile/android/base/resources/drawable-xhdpi/url_bar_entry_default_pb.9.png
mobile/android/base/resources/drawable-xhdpi/url_bar_entry_pressed.9.png
mobile/android/base/resources/drawable-xhdpi/url_bar_entry_pressed_pb.9.png
mobile/android/base/resources/drawable-xhdpi/urlbar_stop.png
mobile/android/base/resources/drawable-xhdpi/validation_arrow.png
mobile/android/base/resources/drawable-xhdpi/validation_arrow_inverted.png
mobile/android/base/resources/drawable-xhdpi/validation_bg.9.png
mobile/android/base/resources/drawable-xhdpi/warning_major.png
mobile/android/base/resources/drawable-xhdpi/warning_minor.png
mobile/android/base/resources/drawable-xhdpi/widget_bg.9.png
mobile/android/base/resources/drawable-xlarge-hdpi-v11/ic_menu_bookmark_add.png
mobile/android/base/resources/drawable-xlarge-hdpi-v11/star_blue.png
mobile/android/base/resources/drawable-xlarge-xhdpi-v11/ic_menu_bookmark_add.png
mobile/android/base/resources/drawable-xlarge-xhdpi-v11/star_blue.png
mobile/android/base/resources/drawable-xlarge-xxhdpi-v11/ic_menu_bookmark_add.png
mobile/android/base/resources/drawable-xlarge-xxhdpi-v11/star_blue.png
mobile/android/base/resources/drawable-xxhdpi-v11/ic_status_logo.png
mobile/android/base/resources/drawable-xxhdpi/ab_mic.png
mobile/android/base/resources/drawable-xxhdpi/ab_qrcode.png
mobile/android/base/resources/drawable-xxhdpi/add_folder.png
mobile/android/base/resources/drawable-xxhdpi/arrow.png
mobile/android/base/resources/drawable-xxhdpi/arrow_up.png
mobile/android/base/resources/drawable-xxhdpi/close_edit_mode_dark.png
mobile/android/base/resources/drawable-xxhdpi/close_edit_mode_light.png
mobile/android/base/resources/drawable-xxhdpi/device_desktop.png
mobile/android/base/resources/drawable-xxhdpi/device_mobile.png
mobile/android/base/resources/drawable-xxhdpi/dropshadow.9.png
mobile/android/base/resources/drawable-xxhdpi/exit_fullscreen.png
mobile/android/base/resources/drawable-xxhdpi/flat_icon.png
mobile/android/base/resources/drawable-xxhdpi/folder_closed.png
mobile/android/base/resources/drawable-xxhdpi/foxfinder.webp
mobile/android/base/resources/drawable-xxhdpi/fullscreen.png
mobile/android/base/resources/drawable-xxhdpi/globe_light.png
mobile/android/base/resources/drawable-xxhdpi/helper_readerview_bookmark.webp
mobile/android/base/resources/drawable-xxhdpi/home_group_collapsed.png
mobile/android/base/resources/drawable-xxhdpi/homepage_banner_firstrun.png
mobile/android/base/resources/drawable-xxhdpi/ic_action_settings.png
mobile/android/base/resources/drawable-xxhdpi/ic_media_pause.png
mobile/android/base/resources/drawable-xxhdpi/ic_media_play.png
mobile/android/base/resources/drawable-xxhdpi/ic_menu_share.png
mobile/android/base/resources/drawable-xxhdpi/ic_widget_new_tab.png
mobile/android/base/resources/drawable-xxhdpi/ic_widget_search.png
mobile/android/base/resources/drawable-xxhdpi/icon_key.png
mobile/android/base/resources/drawable-xxhdpi/icon_search_empty_firefox.png
mobile/android/base/resources/drawable-xxhdpi/icon_shareplane.png
mobile/android/base/resources/drawable-xxhdpi/img_check.png
mobile/android/base/resources/drawable-xxhdpi/location.png
mobile/android/base/resources/drawable-xxhdpi/lock_disabled.png
mobile/android/base/resources/drawable-xxhdpi/lock_inactive.png
mobile/android/base/resources/drawable-xxhdpi/lock_secure.png
mobile/android/base/resources/drawable-xxhdpi/menu.png
mobile/android/base/resources/drawable-xxhdpi/menu_item_check.png
mobile/android/base/resources/drawable-xxhdpi/menu_item_uncheck.png
mobile/android/base/resources/drawable-xxhdpi/network_error.png
mobile/android/base/resources/drawable-xxhdpi/notification_media.webp
mobile/android/base/resources/drawable-xxhdpi/orange_check.png
mobile/android/base/resources/drawable-xxhdpi/overlay_bookmark_icon.png
mobile/android/base/resources/drawable-xxhdpi/overlay_bookmarked_already_icon.png
mobile/android/base/resources/drawable-xxhdpi/overlay_check.png
mobile/android/base/resources/drawable-xxhdpi/private_masq.png
mobile/android/base/resources/drawable-xxhdpi/push_notification.png
mobile/android/base/resources/drawable-xxhdpi/reading_list_folder.png
mobile/android/base/resources/drawable-xxhdpi/search_clear.png
mobile/android/base/resources/drawable-xxhdpi/search_history.png
mobile/android/base/resources/drawable-xxhdpi/search_icon_active.png
mobile/android/base/resources/drawable-xxhdpi/search_icon_inactive.png
mobile/android/base/resources/drawable-xxhdpi/search_launcher.png
mobile/android/base/resources/drawable-xxhdpi/search_plus.png
mobile/android/base/resources/drawable-xxhdpi/shareplane.png
mobile/android/base/resources/drawable-xxhdpi/shield_disabled.png
mobile/android/base/resources/drawable-xxhdpi/shield_enabled.png
mobile/android/base/resources/drawable-xxhdpi/status_icon_readercache.png
mobile/android/base/resources/drawable-xxhdpi/suggestedsites_amazon.png
mobile/android/base/resources/drawable-xxhdpi/suggestedsites_facebook.png
mobile/android/base/resources/drawable-xxhdpi/suggestedsites_twitter.png
mobile/android/base/resources/drawable-xxhdpi/suggestedsites_wikipedia.png
mobile/android/base/resources/drawable-xxhdpi/suggestedsites_youtube.png
mobile/android/base/resources/drawable-xxhdpi/tab_close.png
mobile/android/base/resources/drawable-xxhdpi/tab_close_active.png
mobile/android/base/resources/drawable-xxhdpi/tab_new.png
mobile/android/base/resources/drawable-xxhdpi/tab_preview_masq.png
mobile/android/base/resources/drawable-xxhdpi/tabs_panel_nav_back.png
mobile/android/base/resources/drawable-xxhdpi/tracking_protection_toolbar_illustration.png
mobile/android/base/resources/drawable-xxhdpi/url_bar_entry_default.9.png
mobile/android/base/resources/drawable-xxhdpi/url_bar_entry_default_pb.9.png
mobile/android/base/resources/drawable-xxhdpi/url_bar_entry_pressed.9.png
mobile/android/base/resources/drawable-xxhdpi/url_bar_entry_pressed_pb.9.png
mobile/android/base/resources/drawable-xxhdpi/urlbar_stop.png
mobile/android/base/resources/drawable-xxhdpi/warning_major.png
mobile/android/base/resources/drawable-xxhdpi/warning_minor.png
mobile/android/base/resources/drawable-xxxhdpi/search_launcher.png
mobile/android/base/resources/drawable/action_bar_button.xml
mobile/android/base/resources/drawable/action_bar_button_inverse.xml
mobile/android/base/resources/drawable/action_bar_button_negative.xml
mobile/android/base/resources/drawable/action_bar_button_positive.xml
mobile/android/base/resources/drawable/alert_download_animation.xml
mobile/android/base/resources/drawable/arrow_down.xml
mobile/android/base/resources/drawable/as_bin.xml
mobile/android/base/resources/drawable/as_bookmark.xml
mobile/android/base/resources/drawable/as_bookmark_filled.xml
mobile/android/base/resources/drawable/as_contextmenu_divider.xml
mobile/android/base/resources/drawable/as_copy.xml
mobile/android/base/resources/drawable/as_dismiss.xml
mobile/android/base/resources/drawable/as_home.xml
mobile/android/base/resources/drawable/as_pin.xml
mobile/android/base/resources/drawable/as_private.xml
mobile/android/base/resources/drawable/as_share.xml
mobile/android/base/resources/drawable/as_tab.xml
mobile/android/base/resources/drawable/autocomplete_list_bg.xml
mobile/android/base/resources/drawable/bookmark_folder_arrow_up.xml
mobile/android/base/resources/drawable/button_background_action_blue_round.xml
mobile/android/base/resources/drawable/button_background_action_orange_round.xml
mobile/android/base/resources/drawable/button_enabled_action_blue_round.xml
mobile/android/base/resources/drawable/button_enabled_action_orange_round.xml
mobile/android/base/resources/drawable/button_pressed_action_blue_round.xml
mobile/android/base/resources/drawable/button_pressed_action_orange_round.xml
mobile/android/base/resources/drawable/close_edit_mode_selector.xml
mobile/android/base/resources/drawable/color_picker_checkmark.xml
mobile/android/base/resources/drawable/customtabs_menu_item_control.xml
mobile/android/base/resources/drawable/divider_vertical.xml
mobile/android/base/resources/drawable/edit_text_default.xml
mobile/android/base/resources/drawable/edit_text_focused.xml
mobile/android/base/resources/drawable/facet_button_background.xml
mobile/android/base/resources/drawable/facet_button_background_default.xml
mobile/android/base/resources/drawable/facet_button_background_pressed.xml
mobile/android/base/resources/drawable/home_banner.xml
mobile/android/base/resources/drawable/home_history_clear_button_bg.xml
mobile/android/base/resources/drawable/home_pager_empty_state.xml
mobile/android/base/resources/drawable/ic_as_bookmarked.xml
mobile/android/base/resources/drawable/ic_as_visited.xml
mobile/android/base/resources/drawable/icon_grid_item_bg.xml
mobile/android/base/resources/drawable/logo.xml
mobile/android/base/resources/drawable/menu_item_action_bar_bg.xml
mobile/android/base/resources/drawable/menu_item_state.xml
mobile/android/base/resources/drawable/overlay_share_bookmark_button.xml
mobile/android/base/resources/drawable/overlay_share_button_background.xml
mobile/android/base/resources/drawable/overlay_share_button_background_first.xml
mobile/android/base/resources/drawable/panel_auth_button.xml
mobile/android/base/resources/drawable/progressbar.xml
mobile/android/base/resources/drawable/push_notification.png
mobile/android/base/resources/drawable/remote_tabs_setup_button_background.xml
mobile/android/base/resources/drawable/search_row_background.xml
mobile/android/base/resources/drawable/search_suggestion_button.xml
mobile/android/base/resources/drawable/search_suggestion_prompt_no.xml
mobile/android/base/resources/drawable/search_suggestion_prompt_yes.xml
mobile/android/base/resources/drawable/shaped_button.xml
mobile/android/base/resources/drawable/site_security_icon.xml
mobile/android/base/resources/drawable/site_security_unknown.xml
mobile/android/base/resources/drawable/tab_history_bg.xml
mobile/android/base/resources/drawable/tab_history_icon_state.xml
mobile/android/base/resources/drawable/tab_item_close_button.xml
mobile/android/base/resources/drawable/tab_panel_tab_background.xml
mobile/android/base/resources/drawable/tab_queue_dismiss_button_foreground.xml
mobile/android/base/resources/drawable/tab_row.xml
mobile/android/base/resources/drawable/tab_strip_button.xml
mobile/android/base/resources/drawable/tab_thumbnail.xml
mobile/android/base/resources/drawable/tabs_panel_indicator.xml
mobile/android/base/resources/drawable/tabs_panel_indicator_selected.xml
mobile/android/base/resources/drawable/tabs_panel_indicator_selected_private.xml
mobile/android/base/resources/drawable/tabs_strip_indicator.xml
mobile/android/base/resources/drawable/toast_background.xml
mobile/android/base/resources/drawable/toast_button_background.xml
mobile/android/base/resources/drawable/toolbar_favicon_default.xml
mobile/android/base/resources/drawable/top_sites_thumbnail_bg.xml
mobile/android/base/resources/drawable/url_bar_bg.xml
mobile/android/base/resources/drawable/url_bar_entry.xml
mobile/android/base/resources/drawable/url_bar_nav_button.xml
mobile/android/base/resources/drawable/url_bar_translating_edge.xml
mobile/android/base/resources/drawable/widget_button_left.xml
mobile/android/base/resources/drawable/widget_button_left_default.xml
mobile/android/base/resources/drawable/widget_button_left_pressed.xml
mobile/android/base/resources/drawable/widget_button_middle.xml
mobile/android/base/resources/drawable/widget_button_middle_pressed.xml
mobile/android/base/resources/drawable/widget_button_right.xml
mobile/android/base/resources/drawable/widget_button_right_pressed.xml
mobile/android/base/resources/layout-large-v11/browser_toolbar.xml
mobile/android/base/resources/layout-large-v11/tabs_counter.xml
mobile/android/base/resources/layout/actionbar.xml
mobile/android/base/resources/layout/activity_stream.xml
mobile/android/base/resources/layout/activity_stream_card_history_item.xml
mobile/android/base/resources/layout/activity_stream_contextmenu_bottomsheet.xml
mobile/android/base/resources/layout/activity_stream_contextmenu_popupmenu.xml
mobile/android/base/resources/layout/activity_stream_main_highlightstitle.xml
mobile/android/base/resources/layout/activity_stream_main_toppanel.xml
mobile/android/base/resources/layout/activity_stream_main_welcomepanel.xml
mobile/android/base/resources/layout/activity_stream_main_welcomepanel_content.xml
mobile/android/base/resources/layout/activity_stream_topsites_card.xml
mobile/android/base/resources/layout/activity_stream_topsites_page.xml
mobile/android/base/resources/layout/anchored_popup.xml
mobile/android/base/resources/layout/as_content.xml
mobile/android/base/resources/layout/autocomplete_list.xml
mobile/android/base/resources/layout/autocomplete_list_item.xml
mobile/android/base/resources/layout/basic_color_picker_dialog.xml
mobile/android/base/resources/layout/bookmark_add_folder.xml
mobile/android/base/resources/layout/bookmark_edit.xml
mobile/android/base/resources/layout/bookmark_edit_with_full_page.xml
mobile/android/base/resources/layout/bookmark_folder_item.xml
mobile/android/base/resources/layout/bookmark_folder_row.xml
mobile/android/base/resources/layout/bookmark_folder_select.xml
mobile/android/base/resources/layout/bookmark_item_row.xml
mobile/android/base/resources/layout/bookmark_screenshot_row.xml
mobile/android/base/resources/layout/browser_search.xml
mobile/android/base/resources/layout/browser_toolbar.xml
mobile/android/base/resources/layout/button_toast.xml
mobile/android/base/resources/layout/color_picker_row.xml
mobile/android/base/resources/layout/customtabs_action_bar_custom_view.xml
mobile/android/base/resources/layout/customtabs_options_menu_footer.xml
mobile/android/base/resources/layout/datetime_picker.xml
mobile/android/base/resources/layout/default_doorhanger.xml
mobile/android/base/resources/layout/doorhanger.xml
mobile/android/base/resources/layout/doorhanger_security.xml
mobile/android/base/resources/layout/find_in_page_content.xml
mobile/android/base/resources/layout/firstrun_animation_container.xml
mobile/android/base/resources/layout/firstrun_basepanel_checkable_fragment.xml
mobile/android/base/resources/layout/firstrun_sync_fragment.xml
mobile/android/base/resources/layout/gecko_app.xml
mobile/android/base/resources/layout/history_sync_setup.xml
mobile/android/base/resources/layout/home_banner.xml
mobile/android/base/resources/layout/home_banner_content.xml
mobile/android/base/resources/layout/home_bookmarks_panel.xml
mobile/android/base/resources/layout/home_combined_back_item.xml
mobile/android/base/resources/layout/home_combined_history_panel.xml
mobile/android/base/resources/layout/home_empty_panel.xml
mobile/android/base/resources/layout/home_header_row.xml
mobile/android/base/resources/layout/home_item_row.xml
mobile/android/base/resources/layout/home_pager.xml
mobile/android/base/resources/layout/home_remote_tabs_group.xml
mobile/android/base/resources/layout/home_remote_tabs_hidden_devices.xml
mobile/android/base/resources/layout/home_search_item_row.xml
mobile/android/base/resources/layout/home_smartfolder.xml
mobile/android/base/resources/layout/home_suggestion_prompt.xml
mobile/android/base/resources/layout/home_top_sites_panel.xml
mobile/android/base/resources/layout/icon_grid.xml
mobile/android/base/resources/layout/icon_grid_item.xml
mobile/android/base/resources/layout/list_item_header.xml
mobile/android/base/resources/layout/login_doorhanger.xml
mobile/android/base/resources/layout/login_edit_dialog.xml
mobile/android/base/resources/layout/media_casting.xml
mobile/android/base/resources/layout/menu_action_bar.xml
mobile/android/base/resources/layout/menu_item_switcher_layout.xml
mobile/android/base/resources/layout/menu_popup.xml
mobile/android/base/resources/layout/menu_secondary_action_bar.xml
mobile/android/base/resources/layout/overlay_share_button.xml
mobile/android/base/resources/layout/overlay_share_dialog.xml
mobile/android/base/resources/layout/overlay_share_send_tab_item.xml
mobile/android/base/resources/layout/panel_article_item.xml
mobile/android/base/resources/layout/panel_auth_layout.xml
mobile/android/base/resources/layout/panel_back_item.xml
mobile/android/base/resources/layout/panel_icon_item.xml
mobile/android/base/resources/layout/panel_image_item.xml
mobile/android/base/resources/layout/panel_item_container.xml
mobile/android/base/resources/layout/pin_site_dialog.xml
mobile/android/base/resources/layout/preference_checkbox.xml
mobile/android/base/resources/layout/preference_panels.xml
mobile/android/base/resources/layout/preference_rightalign_icon.xml
mobile/android/base/resources/layout/preference_search_engine.xml
mobile/android/base/resources/layout/preference_search_tip.xml
mobile/android/base/resources/layout/preference_set_homepage.xml
mobile/android/base/resources/layout/private_tabs_panel.xml
mobile/android/base/resources/layout/restricted_firstrun_welcome_fragment.xml
mobile/android/base/resources/layout/search_activity_main.xml
mobile/android/base/resources/layout/search_bar.xml
mobile/android/base/resources/layout/search_empty.xml
mobile/android/base/resources/layout/search_engine_bar_item.xml
mobile/android/base/resources/layout/search_engine_bar_label.xml
mobile/android/base/resources/layout/search_engine_row.xml
mobile/android/base/resources/layout/search_fragment_post_search.xml
mobile/android/base/resources/layout/search_fragment_pre_search.xml
mobile/android/base/resources/layout/search_history_row.xml
mobile/android/base/resources/layout/search_sugestions.xml
mobile/android/base/resources/layout/search_suggestions_row.xml
mobile/android/base/resources/layout/search_widget.xml
mobile/android/base/resources/layout/select_dialog_list.xml
mobile/android/base/resources/layout/select_dialog_multichoice.xml
mobile/android/base/resources/layout/select_dialog_singlechoice.xml
mobile/android/base/resources/layout/site_identity.xml
mobile/android/base/resources/layout/site_setting_item.xml
mobile/android/base/resources/layout/suggestion_item.xml
mobile/android/base/resources/layout/tab_history_item_row.xml
mobile/android/base/resources/layout/tab_history_layout.xml
mobile/android/base/resources/layout/tab_menu_strip.xml
mobile/android/base/resources/layout/tab_prompt_input.xml
mobile/android/base/resources/layout/tab_queue_prompt.xml
mobile/android/base/resources/layout/tab_queue_toast.xml
mobile/android/base/resources/layout/tab_strip.xml
mobile/android/base/resources/layout/tab_strip_inner.xml
mobile/android/base/resources/layout/tab_strip_item.xml
mobile/android/base/resources/layout/tab_strip_item_view.xml
mobile/android/base/resources/layout/tabs_counter.xml
mobile/android/base/resources/layout/tabs_layout_item_view.xml
mobile/android/base/resources/layout/tabs_list_item_view.xml
mobile/android/base/resources/layout/tabs_panel_default.xml
mobile/android/base/resources/layout/tabs_panel_indicator.xml
mobile/android/base/resources/layout/tabs_panel_view.xml
mobile/android/base/resources/layout/toolbar_display_layout.xml
mobile/android/base/resources/layout/toolbar_edit_layout.xml
mobile/android/base/resources/layout/top_sites_grid_item_view.xml
mobile/android/base/resources/layout/tracking_protection_prompt.xml
mobile/android/base/resources/layout/two_line_folder_row.xml
mobile/android/base/resources/layout/two_line_page_row.xml
mobile/android/base/resources/layout/validation_message.xml
mobile/android/base/resources/layout/webapps_action_bar_custom_view.xml
mobile/android/base/resources/menu-large/browser_app_menu.xml
mobile/android/base/resources/menu-v11/preferences_search_menu.xml
mobile/android/base/resources/menu-v11/tabs_menu.xml
mobile/android/base/resources/menu-v11/titlebar_contextmenu.xml
mobile/android/base/resources/menu-xlarge/browser_app_menu.xml
mobile/android/base/resources/menu/activitystream_contextmenu.xml
mobile/android/base/resources/menu/bookmark_edit_menu.xml
mobile/android/base/resources/menu/bookmark_folder_menu.xml
mobile/android/base/resources/menu/browser_app_menu.xml
mobile/android/base/resources/menu/browsersearch_contextmenu.xml
mobile/android/base/resources/menu/customtabs_menu.xml
mobile/android/base/resources/menu/gecko_app_menu.xml
mobile/android/base/resources/menu/home_contextmenu.xml
mobile/android/base/resources/menu/home_remote_tabs_client_contextmenu.xml
mobile/android/base/resources/menu/preferences_search_menu.xml
mobile/android/base/resources/menu/tabs_menu.xml
mobile/android/base/resources/menu/titlebar_contextmenu.xml
mobile/android/base/resources/raw/bookmarkdefaults_favicon_addons.png
mobile/android/base/resources/raw/bookmarkdefaults_favicon_restricted_support.png
mobile/android/base/resources/raw/bookmarkdefaults_favicon_restricted_webmaker.png
mobile/android/base/resources/raw/bookmarkdefaults_favicon_support.png
mobile/android/base/resources/raw/fake_home_items.json
mobile/android/base/resources/raw/topdomains.txt
mobile/android/base/resources/values-land/dimens.xml
mobile/android/base/resources/values-land/integers.xml
mobile/android/base/resources/values-land/styles.xml
mobile/android/base/resources/values-large-land-v11/dimens.xml
mobile/android/base/resources/values-large-land-v11/styles.xml
mobile/android/base/resources/values-large-v16/dimens.xml
mobile/android/base/resources/values-large-v16/styles.xml
mobile/android/base/resources/values-large-v17/styles.xml
mobile/android/base/resources/values-large/bool.xml
mobile/android/base/resources/values-large/dimens.xml
mobile/android/base/resources/values-large/integers.xml
mobile/android/base/resources/values-large/styles.xml
mobile/android/base/resources/values-sw240dp/dimens.xml
mobile/android/base/resources/values-sw360dp/dimens.xml
mobile/android/base/resources/values-sw400dp/dimens.xml
mobile/android/base/resources/values-v11/dimens.xml
mobile/android/base/resources/values-v11/styles.xml
mobile/android/base/resources/values-v11/themes.xml
mobile/android/base/resources/values-v13/search_styles.xml
mobile/android/base/resources/values-v13/styles.xml
mobile/android/base/resources/values-v14/themes.xml
mobile/android/base/resources/values-v16/search_styles.xml
mobile/android/base/resources/values-v16/styles.xml
mobile/android/base/resources/values-v17/styles.xml
mobile/android/base/resources/values-v19/dimens.xml
mobile/android/base/resources/values-v19/styles.xml
mobile/android/base/resources/values-v21/dimens.xml
mobile/android/base/resources/values-v21/integers.xml
mobile/android/base/resources/values-v21/styles.xml
mobile/android/base/resources/values-v21/themes.xml
mobile/android/base/resources/values-w400dp/styles.xml
mobile/android/base/resources/values-xlarge-land-v11/dimens.xml
mobile/android/base/resources/values-xlarge-land-v11/styles.xml
mobile/android/base/resources/values-xlarge-v11/dimens.xml
mobile/android/base/resources/values-xlarge-v11/integers.xml
mobile/android/base/resources/values-xlarge-v11/styles.xml
mobile/android/base/resources/values/arrays.xml
mobile/android/base/resources/values/attrs.xml
mobile/android/base/resources/values/bool.xml
mobile/android/base/resources/values/colors.xml
mobile/android/base/resources/values/dimens.xml
mobile/android/base/resources/values/ids.xml
mobile/android/base/resources/values/integers.xml
mobile/android/base/resources/values/search_attrs.xml
mobile/android/base/resources/values/search_colors.xml
mobile/android/base/resources/values/search_dimens.xml
mobile/android/base/resources/values/search_styles.xml
mobile/android/base/resources/values/styles.xml
mobile/android/base/resources/values/themes.xml
mobile/android/base/resources/values/vpi__attrs.xml
mobile/android/base/resources/values/vpi__defaults.xml
mobile/android/base/resources/xml-v11/preference_headers.xml
mobile/android/base/resources/xml-v11/preferences_default_browser_tablet.xml
mobile/android/base/resources/xml-v11/preferences_privacy_clear_tablet.xml
mobile/android/base/resources/xml-v11/preferences_search.xml
mobile/android/base/resources/xml/preference_headers.xml
mobile/android/base/resources/xml/preferences.xml
mobile/android/base/resources/xml/preferences_accessibility.xml
mobile/android/base/resources/xml/preferences_advanced.xml
mobile/android/base/resources/xml/preferences_general.xml
mobile/android/base/resources/xml/preferences_general_tablet.xml
mobile/android/base/resources/xml/preferences_home.xml
mobile/android/base/resources/xml/preferences_locale.xml
mobile/android/base/resources/xml/preferences_notifications.xml
mobile/android/base/resources/xml/preferences_privacy.xml
mobile/android/base/resources/xml/preferences_search.xml
mobile/android/base/resources/xml/preferences_vendor.xml
mobile/android/base/resources/xml/search_preferences.xml
mobile/android/base/resources/xml/search_widget_info.xml
mobile/android/base/resources/xml/searchable.xml
testing/web-platform/meta/web-animations/interfaces/KeyframeEffect/setTarget.html.ini
--- a/browser/components/migration/360seProfileMigrator.js
+++ b/browser/components/migration/360seProfileMigrator.js
@@ -39,17 +39,17 @@ function copyToTempUTF8File(file, charse
   let out = FileUtils.openAtomicFileOutputStream(tempUTF8File);
   try {
     let bufferedOut = Cc["@mozilla.org/network/buffered-output-stream;1"]
                         .createInstance(Ci.nsIBufferedOutputStream);
     bufferedOut.init(out, 4096);
     try {
       let converterOut = Cc["@mozilla.org/intl/converter-output-stream;1"]
                            .createInstance(Ci.nsIConverterOutputStream);
-      converterOut.init(bufferedOut, "utf-8", 0, 0x0000);
+      converterOut.init(bufferedOut, "utf-8");
       try {
         converterOut.writeString(inputStr || "");
         bufferedOut.QueryInterface(Ci.nsISafeOutputStream).finish();
       } finally {
         converterOut.close();
       }
     } finally {
       bufferedOut.close();
--- a/devtools/client/netmonitor/src/har/har-utils.js
+++ b/devtools/client/netmonitor/src/har/har-utils.js
@@ -85,17 +85,17 @@ var HarUtils = {
       let foStream = Cc["@mozilla.org/network/file-output-stream;1"]
         .createInstance(Ci.nsIFileOutputStream);
 
       let permFlags = parseInt("0666", 8);
       foStream.init(file, openFlags, permFlags, 0);
 
       let convertor = Cc["@mozilla.org/intl/converter-output-stream;1"]
         .createInstance(Ci.nsIConverterOutputStream);
-      convertor.init(foStream, "UTF-8", 0, 0);
+      convertor.init(foStream, "UTF-8");
 
       // The entire jsonString can be huge so, write the data in chunks.
       let chunkLength = 1024 * 1024;
       for (let i = 0; i <= jsonString.length; i++) {
         let data = jsonString.substr(i, chunkLength + 1);
         if (data) {
           convertor.writeString(data);
         }
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -210,19 +210,19 @@
 #include "nsISecureBrowserUI.h"
 #include "nsISocketProvider.h"
 #include "nsIStringBundle.h"
 #include "nsIURIFixup.h"
 #include "nsIURILoader.h"
 #include "nsIURL.h"
 #include "nsIWebBrowserFind.h"
 #include "nsIWidget.h"
-#include "mozilla/dom/EncodingUtils.h"
 #include "mozilla/dom/PerformanceNavigation.h"
 #include "mozilla/dom/ScriptSettings.h"
+#include "mozilla/Encoding.h"
 
 #ifdef MOZ_TOOLKIT_SEARCH
 #include "nsIBrowserSearchService.h"
 #endif
 
 #include "mozIThirdPartyUtil.h"
 
 static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID);
@@ -2111,26 +2111,26 @@ nsDocShell::SetCharset(const nsACString&
 
 NS_IMETHODIMP
 nsDocShell::SetForcedCharset(const nsACString& aCharset)
 {
   if (aCharset.IsEmpty()) {
     mForcedCharset.Truncate();
     return NS_OK;
   }
-  nsAutoCString encoding;
-  if (!EncodingUtils::FindEncodingForLabel(aCharset, encoding)) {
+  const Encoding* encoding = Encoding::ForLabel(aCharset);
+  if (!encoding) {
     // Reject unknown labels
     return NS_ERROR_INVALID_ARG;
   }
-  if (!EncodingUtils::IsAsciiCompatible(encoding)) {
+  if (!encoding->IsAsciiCompatible() && encoding != ISO_2022_JP_ENCODING) {
     // Reject XSS hazards
     return NS_ERROR_INVALID_ARG;
   }
-  mForcedCharset = encoding;
+  encoding->Name(mForcedCharset);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDocShell::GetForcedCharset(nsACString& aResult)
 {
   aResult = mForcedCharset;
   return NS_OK;
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -4493,55 +4493,16 @@ nsContentUtils::GetSubdocumentWithOuterW
     // Note that ContentIsCrossDocDescendantOf will return true if
     // foundDoc == aDocument.
     return foundDoc;
   }
 
   return nullptr;
 }
 
-// Convert the string from the given encoding to Unicode.
-/* static */
-nsresult
-nsContentUtils::ConvertStringFromEncoding(const nsACString& aEncoding,
-                                          const char* aInput,
-                                          uint32_t aInputLen,
-                                          nsAString& aOutput)
-{
-  const Encoding* encoding;
-  if (aEncoding.IsEmpty()) {
-    encoding = UTF_8_ENCODING;
-  } else {
-    encoding = Encoding::ForName(aEncoding);
-  }
-  nsresult rv = encoding->DecodeWithBOMRemoval(MakeSpan(reinterpret_cast<const uint8_t*>(aInput), aInputLen), aOutput);
-  if (NS_FAILED(rv)) {
-    return rv;
-  }
-  return NS_OK;
-}
-
-/* static */
-bool
-nsContentUtils::CheckForBOM(const unsigned char* aBuffer, uint32_t aLength,
-                            nsACString& aCharset)
-{
-  auto span = MakeSpan(reinterpret_cast<const uint8_t*>(aBuffer), aLength);
-  const Encoding* encoding;
-  size_t bomLength;
-  Tie(encoding, bomLength) = Encoding::ForBOM(span);
-  Unused << bomLength;
-  if (!encoding) {
-    aCharset.Truncate();
-    return false;
-  }
-  encoding->Name(aCharset);
-  return true;
-}
-
 /* static */
 void
 nsContentUtils::RegisterShutdownObserver(nsIObserver* aObserver)
 {
   nsCOMPtr<nsIObserverService> observerService =
     mozilla::services::GetObserverService();
   if (observerService) {
     observerService->AddObserver(aObserver,
--- a/dom/base/nsContentUtils.h
+++ b/dom/base/nsContentUtils.h
@@ -614,52 +614,16 @@ public:
    * aDocument.
    */
   static nsresult NewURIWithDocumentCharset(nsIURI** aResult,
                                             const nsAString& aSpec,
                                             nsIDocument* aDocument,
                                             nsIURI* aBaseURI);
 
   /**
-   * Convert aInput (in encoding aEncoding) to UTF16 in aOutput.
-   *
-   * @deprecated Use mozilla::Encoding::DecodeWithBOMRemoval() in new code.
-   * https://bugzilla.mozilla.org/show_bug.cgi?id=1369020
-   *
-   * @param aEncoding the Gecko-canonical name of the encoding or the empty
-   *                  string (meaning UTF-8)
-   */
-  static nsresult ConvertStringFromEncoding(const nsACString& aEncoding,
-                                            const char* aInput,
-                                            uint32_t aInputLen,
-                                            nsAString& aOutput);
-
-  static nsresult ConvertStringFromEncoding(const nsACString& aEncoding,
-                                            const nsACString& aInput,
-                                            nsAString& aOutput) {
-    return ConvertStringFromEncoding(
-        aEncoding, aInput.BeginReading(), aInput.Length(), aOutput);
-  }
-
-  /**
-   * Determine whether a buffer begins with a BOM for UTF-8, UTF-16LE,
-   * UTF-16BE
-   *
-   * @deprecated Use mozilla::Encoding::ForBOM() in new code.
-   * https://bugzilla.mozilla.org/show_bug.cgi?id=1369022
-   *
-   * @param aBuffer the buffer to check
-   * @param aLength the length of the buffer
-   * @param aCharset empty if not found
-   * @return boolean indicating whether a BOM was detected.
-   */
-  static bool CheckForBOM(const unsigned char* aBuffer, uint32_t aLength,
-                          nsACString& aCharset);
-
-  /**
    * Returns true if |aName| is a valid name to be registered via
    * document.registerElement.
    */
   static bool IsCustomElementName(nsIAtom* aName);
 
   static nsresult CheckQName(const nsAString& aQualifiedName,
                              bool aNamespaceAware = true,
                              const char16_t** aColon = nullptr);
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -169,17 +169,17 @@
 #include "mozilla/dom/HTMLMediaElement.h"
 #include "mozilla/dom/HTMLIFrameElement.h"
 #include "mozilla/dom/HTMLImageElement.h"
 #include "mozilla/dom/MediaSource.h"
 #include "mozilla/dom/FlyWebService.h"
 
 #include "mozAutoDocUpdate.h"
 #include "nsGlobalWindow.h"
-#include "mozilla/dom/EncodingUtils.h"
+#include "mozilla/Encoding.h"
 #include "nsDOMNavigationTiming.h"
 
 #include "nsSMILAnimationController.h"
 #include "imgIContainer.h"
 #include "nsSVGUtils.h"
 
 #include "nsRefreshDriver.h"
 
@@ -3839,19 +3839,19 @@ nsDocument::TryChannelCharset(nsIChannel
                               int32_t& aCharsetSource,
                               nsACString& aCharset,
                               nsHtml5TreeOpExecutor* aExecutor)
 {
   if (aChannel) {
     nsAutoCString charsetVal;
     nsresult rv = aChannel->GetContentCharset(charsetVal);
     if (NS_SUCCEEDED(rv)) {
-      nsAutoCString preferred;
-      if(EncodingUtils::FindEncodingForLabel(charsetVal, preferred)) {
-        aCharset = preferred;
+      const Encoding* preferred = Encoding::ForLabel(charsetVal);
+      if (preferred) {
+        preferred->Name(aCharset);
         aCharsetSource = kCharsetFromChannel;
         return;
       } else if (aExecutor && !charsetVal.IsEmpty()) {
         aExecutor->ComplainAboutBogusProtocolCharset(this);
       }
     }
   }
 }
@@ -9925,20 +9925,19 @@ nsDocument::ScrollToRef()
       rv = NS_ERROR_FAILURE;
     }
 
     // If UTF-8 URI failed then try to assume the string as a
     // document's charset.
 
     if (NS_FAILED(rv)) {
       const nsACString &docCharset = GetDocumentCharacterSet();
-
-      rv = nsContentUtils::ConvertStringFromEncoding(docCharset,
-                                                     unescapedRef,
-                                                     ref);
+      const Encoding* encoding = Encoding::ForName(docCharset);
+
+      rv = encoding->DecodeWithoutBOMHandling(unescapedRef, ref);
 
       if (NS_SUCCEEDED(rv) && !ref.IsEmpty()) {
         rv = shell->GoToAnchor(ref, mChangeScrollPosWhenScrollingToRef);
       }
     }
     if (NS_SUCCEEDED(rv)) {
       mScrolledToRefAlready = true;
     }
--- a/dom/base/nsDocumentEncoder.cpp
+++ b/dom/base/nsDocumentEncoder.cpp
@@ -43,17 +43,16 @@
 #include "nsNodeUtils.h"
 #include "nsUnicharUtils.h"
 #include "nsReadableUtils.h"
 #include "nsTArray.h"
 #include "nsIFrame.h"
 #include "nsStringBuffer.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/ShadowRoot.h"
-#include "mozilla/dom/EncodingUtils.h"
 #include "nsLayoutUtils.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 nsresult NS_NewDomSelection(nsISelection **aDomSelection);
 
 enum nsRangeIterationDirection {
--- a/dom/base/nsReferencedElement.cpp
+++ b/dom/base/nsReferencedElement.cpp
@@ -28,23 +28,24 @@ nsReferencedElement::Reset(nsIContent* a
   nsAutoCString refPart;
   aURI->GetRef(refPart);
   // Unescape %-escapes in the reference. The result will be in the
   // origin charset of the URL, hopefully...
   NS_UnescapeURL(refPart);
 
   nsAutoCString charset;
   aURI->GetOriginCharset(charset);
+  const Encoding* encoding = charset.IsEmpty() ?
+    UTF_8_ENCODING : Encoding::ForName(charset);
   nsAutoString ref;
-  nsresult rv = nsContentUtils::ConvertStringFromEncoding(charset,
-                                                          refPart,
-                                                          ref);
+  nsresult rv = encoding->DecodeWithoutBOMHandling(refPart, ref);
   if (NS_FAILED(rv) || ref.IsEmpty()) {
     return;
   }
+  rv = NS_OK;
 
   // Get the current document
   nsIDocument *doc = aFromContent->OwnerDoc();
   if (!doc)
     return;
 
   nsIContent* bindingParent = aFromContent->GetBindingParent();
   if (bindingParent) {
deleted file mode 100644
--- a/dom/encoding/EncodingUtils.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "mozilla/dom/EncodingUtils.h"
-
-#include "mozilla/ArrayUtils.h" // ArrayLength
-#include "nsUConvPropertySearch.h"
-
-namespace mozilla {
-namespace dom {
-
-static constexpr nsUConvProp labelsEncodings[] = {
-#include "labelsencodings.properties.h"
-};
-
-static constexpr nsUConvProp encodingsGroups[] = {
-#include "encodingsgroups.properties.h"
-};
-
-bool
-EncodingUtils::FindEncodingForLabel(const nsACString& aLabel,
-                                    nsACString& aOutEncoding)
-{
-  auto encoding = Encoding::ForLabel(aLabel);
-  if (!encoding) {
-    aOutEncoding.Truncate();
-    return false;
-  }
-  encoding->Name(aOutEncoding);
-  return true;
-}
-
-bool
-EncodingUtils::FindEncodingForLabelNoReplacement(const nsACString& aLabel,
-                                                 nsACString& aOutEncoding)
-{
-  auto encoding = Encoding::ForLabelNoReplacement(aLabel);
-  if (!encoding) {
-    aOutEncoding.Truncate();
-    return false;
-  }
-  encoding->Name(aOutEncoding);
-  return true;
-}
-
-bool
-EncodingUtils::IsAsciiCompatible(const nsACString& aPreferredName)
-{
-  // HZ and UTF-7 are no longer in mozilla-central, but keeping them here
-  // just in case for the benefit of comm-central.
-  return !(aPreferredName.LowerCaseEqualsLiteral("utf-16") ||
-           aPreferredName.LowerCaseEqualsLiteral("utf-16be") ||
-           aPreferredName.LowerCaseEqualsLiteral("utf-16le") ||
-           aPreferredName.LowerCaseEqualsLiteral("replacement") ||
-           aPreferredName.LowerCaseEqualsLiteral("hz-gb-2312") ||
-           aPreferredName.LowerCaseEqualsLiteral("utf-7") ||
-           aPreferredName.LowerCaseEqualsLiteral("x-imap4-modified-utf7"));
-}
-
-UniquePtr<Decoder>
-EncodingUtils::DecoderForEncoding(const nsACString& aEncoding)
-{
-  return Encoding::ForName(aEncoding)->NewDecoderWithBOMRemoval();
-}
-
-UniquePtr<Encoder>
-EncodingUtils::EncoderForEncoding(const nsACString& aEncoding)
-{
-  return Encoding::ForName(aEncoding)->NewEncoder();
-}
-
-void
-EncodingUtils::LangGroupForEncoding(const nsACString& aEncoding,
-                                    nsACString& aOutGroup)
-{
-  if (NS_FAILED(nsUConvPropertySearch::SearchPropertyValue(
-      encodingsGroups, ArrayLength(encodingsGroups), aEncoding, aOutGroup))) {
-    aOutGroup.AssignLiteral("x-unicode");
-  }
-}
-
-} // namespace dom
-} // namespace mozilla
deleted file mode 100644
--- a/dom/encoding/EncodingUtils.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef mozilla_dom_encodingutils_h_
-#define mozilla_dom_encodingutils_h_
-
-#include "nsDataHashtable.h"
-#include "nsString.h"
-#include "mozilla/Encoding.h"
-
-namespace mozilla {
-namespace dom {
-
-class EncodingUtils
-{
-public:
-  /**
-   * Implements get an encoding algorithm from Encoding spec.
-   * http://encoding.spec.whatwg.org/#concept-encoding-get
-   * Given a label, this function returns the corresponding encoding or a
-   * false.
-   * The returned name may not be lowercased due to compatibility with
-   * our internal implementations.
-   *
-   * @deprecated Use mozilla::Encoding::ForLabel() in new code.
-   * https://bugzilla.mozilla.org/show_bug.cgi?id=1369025
-   *
-   * @param      aLabel, incoming label describing charset to be decoded.
-   * @param      aOutEncoding, returning corresponding encoding for label.
-   * @return     false if no encoding was found for label.
-   *             true if valid encoding found.
-   */
-  static bool FindEncodingForLabel(const nsACString& aLabel,
-                                   nsACString& aOutEncoding);
-
-  static bool FindEncodingForLabel(const nsAString& aLabel,
-                                   nsACString& aOutEncoding)
-  {
-    return FindEncodingForLabel(NS_ConvertUTF16toUTF8(aLabel), aOutEncoding);
-  }
-
-  /**
-   * Like FindEncodingForLabel() except labels that map to "replacement"
-   * are treated as unknown.
-   *
-   * @deprecated Use mozilla::Encoding::ForLabelNoReplacement() in new code.
-   * https://bugzilla.mozilla.org/show_bug.cgi?id=1369025
-   *
-   * @param      aLabel, incoming label describing charset to be decoded.
-   * @param      aOutEncoding, returning corresponding encoding for label.
-   * @return     false if no encoding was found for label.
-   *             true if valid encoding found.
-   */
-  static bool FindEncodingForLabelNoReplacement(const nsACString& aLabel,
-                                                nsACString& aOutEncoding);
-
-  static bool FindEncodingForLabelNoReplacement(const nsAString& aLabel,
-                                                nsACString& aOutEncoding)
-  {
-    return FindEncodingForLabelNoReplacement(NS_ConvertUTF16toUTF8(aLabel),
-                                             aOutEncoding);
-  }
-
-  /**
-   * Remove any leading and trailing space characters, following the
-   * definition of space characters from Encoding spec.
-   * http://encoding.spec.whatwg.org/#terminology
-   * Note that nsAString::StripWhitespace() doesn't exactly match the
-   * definition. It also removes all matching chars in the string,
-   * not just leading and trailing.
-   *
-   * @param      aString, string to be trimmed.
-   */
-  template<class T>
-  static void TrimSpaceCharacters(T& aString)
-  {
-    aString.Trim(" \t\n\f\r");
-  }
-
-  /**
-   * Check is the encoding is ASCII-compatible in the sense that Basic Latin
-   * encodes to ASCII bytes. (The reverse may not be true!)
-   *
-   * @param aPreferredName a preferred encoding label
-   * @return whether the encoding is ASCII-compatible
-   */
-  static bool IsAsciiCompatible(const nsACString& aPreferredName);
-
-  /**
-   * Instantiates a decoder for an encoding. The input must be a
-   * Gecko-canonical encoding name.
-   *
-   * @deprecated Use mozilla::Encoding::NewDecoderWithBOMRemoval()
-   *             (or more appropriate variant) in new code.
-   * https://bugzilla.mozilla.org/show_bug.cgi?id=1369032
-   *
-   * @param aEncoding a Gecko-canonical encoding name
-   * @return a decoder
-   */
-  static UniquePtr<Decoder> DecoderForEncoding(const char* aEncoding)
-  {
-    nsDependentCString encoding(aEncoding);
-    return DecoderForEncoding(encoding);
-  }
-
-  /**
-   * Instantiates a decoder for an encoding. The input must be a
-   *
-   * @deprecated Use mozilla::Encoding::NewDecoderWithBOMRemoval()
-   *             (or more appropriate variant) in new code.
-   * https://bugzilla.mozilla.org/show_bug.cgi?id=1369032
-   *
-   * Gecko-canonical encoding name
-   * @param aEncoding a Gecko-canonical encoding name
-   * @return a decoder
-   */
-  static UniquePtr<Decoder> DecoderForEncoding(const nsACString& aEncoding);
-
-  /**
-   * Instantiates an encoder for an encoding. The input must be a
-   *
-   * @deprecated Use mozilla::Encoding::NewEncoder() in new code.
-   * https://bugzilla.mozilla.org/show_bug.cgi?id=1369032
-   *
-   * Gecko-canonical encoding name.
-   * @param aEncoding a Gecko-canonical encoding name
-   * @return an encoder
-   */
-  static UniquePtr<Encoder> EncoderForEncoding(const char* aEncoding)
-  {
-    nsDependentCString encoding(aEncoding);
-    return EncoderForEncoding(encoding);
-  }
-
-  /**
-   * Instantiates an encoder for an encoding. The input must be a
-   * Gecko-canonical encoding name.
-   *
-   * @deprecated Use mozilla::Encoding::NewEncoder() in new code.
-   * https://bugzilla.mozilla.org/show_bug.cgi?id=1369032
-   *
-   * @param aEncoding a Gecko-canonical encoding name
-   * @return an encoder
-   */
-  static UniquePtr<Encoder> EncoderForEncoding(const nsACString& aEncoding);
-
-  /**
-   * Finds a Gecko language group string (e.g. x-western) for a Gecko-canonical
-   * encoding name.
-   *
-   * @param      aEncoding, incoming label describing charset to be decoded.
-   * @param      aOutGroup, returning corresponding language group.
-   */
-  static void LangGroupForEncoding(const nsACString& aEncoding,
-                                   nsACString& aOutGroup);
-
-private:
-  EncodingUtils() = delete;
-};
-
-} // namespace dom
-} // namespace mozilla
-
-#endif // mozilla_dom_encodingutils_h_
--- a/dom/encoding/FallbackEncoding.cpp
+++ b/dom/encoding/FallbackEncoding.cpp
@@ -1,22 +1,22 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/dom/FallbackEncoding.h"
 
-#include "mozilla/dom/EncodingUtils.h"
-#include "nsUConvPropertySearch.h"
+#include "mozilla/Encoding.h"
+#include "mozilla/intl/LocaleService.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/Services.h"
 #include "nsIObserverService.h"
-#include "mozilla/intl/LocaleService.h"
+#include "nsUConvPropertySearch.h"
 
 using mozilla::intl::LocaleService;
 
 namespace mozilla {
 namespace dom {
 
 static constexpr nsUConvProp localesFallbacks[] = {
 #include "localesfallbacks.properties.h"
@@ -48,20 +48,22 @@ FallbackEncoding::Get(nsACString& aFallb
     aFallback = mFallback;
     return;
   }
 
   const nsAdoptingCString& override =
     Preferences::GetCString("intl.charset.fallback.override");
   // Don't let the user break things by setting the override to unreasonable
   // values via about:config
-  if (!EncodingUtils::FindEncodingForLabel(override, mFallback) ||
-      !EncodingUtils::IsAsciiCompatible(mFallback) ||
-      mFallback.EqualsLiteral("UTF-8")) {
+  const Encoding* encoding = Encoding::ForLabel(override);
+  if (!encoding || !encoding->IsAsciiCompatible() ||
+      encoding == UTF_8_ENCODING) {
     mFallback.Truncate();
+  } else {
+    encoding->Name(mFallback);
   }
 
   if (!mFallback.IsEmpty()) {
     aFallback = mFallback;
     return;
   }
 
   nsAutoCString locale;
--- a/dom/encoding/TextDecoder.cpp
+++ b/dom/encoding/TextDecoder.cpp
@@ -1,54 +1,55 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/dom/TextDecoder.h"
-#include "mozilla/dom/EncodingUtils.h"
 #include "mozilla/dom/UnionTypes.h"
+#include "mozilla/Encoding.h"
 #include "mozilla/UniquePtrExtensions.h"
 #include "nsContentUtils.h"
 #include <stdint.h>
 
 namespace mozilla {
 namespace dom {
 
 static const char16_t kReplacementChar = static_cast<char16_t>(0xFFFD);
 
 void
 TextDecoder::Init(const nsAString& aLabel, const bool aFatal,
                   ErrorResult& aRv)
 {
-  nsAutoCString encoding;
   // Let encoding be the result of getting an encoding from label.
   // If encoding is failure or replacement, throw a RangeError
   // (https://encoding.spec.whatwg.org/#dom-textdecoder).
-  if (!EncodingUtils::FindEncodingForLabelNoReplacement(aLabel, encoding)) {
+  const Encoding* encoding = Encoding::ForLabelNoReplacement(aLabel);
+  if (!encoding) {
     nsAutoString label(aLabel);
-    EncodingUtils::TrimSpaceCharacters(label);
+    label.Trim(" \t\n\f\r");
     aRv.ThrowRangeError<MSG_ENCODING_NOT_SUPPORTED>(label);
     return;
   }
-  InitWithEncoding(encoding, aFatal);
+  InitWithEncoding(WrapNotNull(encoding), aFatal);
 }
 
 void
-TextDecoder::InitWithEncoding(const nsACString& aEncoding, const bool aFatal)
+TextDecoder::InitWithEncoding(NotNull<const Encoding*> aEncoding,
+                              const bool aFatal)
 {
-  mEncoding = aEncoding;
+  aEncoding->Name(mEncoding);
   // If the constructor is called with an options argument,
   // and the fatal property of the dictionary is set,
   // set the internal fatal flag of the decoder object.
   mFatal = aFatal;
 
   // Create a decoder object for mEncoding.
-  mDecoder = EncodingUtils::DecoderForEncoding(mEncoding);
+  mDecoder = aEncoding->NewDecoderWithBOMRemoval();
 }
 
 void
 TextDecoder::Decode(Span<const uint8_t> aInput,
                     const bool aStream,
                     nsAString& aOutDecodedString,
                     ErrorResult& aRv)
 {
--- a/dom/encoding/TextDecoder.h
+++ b/dom/encoding/TextDecoder.h
@@ -65,21 +65,22 @@ public:
    * @return aRv         EncodingError exception else null.
    */
   void Init(const nsAString& aLabel, const bool aFatal, ErrorResult& aRv);
 
   /**
    * Performs initialization with a Gecko-canonical encoding name (as opposed
    * to a label.)
    *
-   * @param aEncoding    A Gecko-canonical encoding name
+   * @param aEncoding    An Encoding object
    * @param aFatal       indicates whether to throw an 'EncodingError'
    *                     exception or not when decoding.
    */
-  void InitWithEncoding(const nsACString& aEncoding, const bool aFatal);
+  void InitWithEncoding(NotNull<const Encoding*> aEncoding,
+                        const bool aFatal);
 
   /**
    * Return the encoding name.
    *
    * @param aEncoding, current encoding.
    */
   void GetEncoding(nsAString& aEncoding);
 
--- a/dom/encoding/moz.build
+++ b/dom/encoding/moz.build
@@ -3,38 +3,35 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 with Files("**"):
     BUG_COMPONENT = ("Core", "Internationalization")
 
 EXPORTS.mozilla.dom += [
-    'EncodingUtils.h',
     'FallbackEncoding.h',
     'TextDecoder.h',
     'TextEncoder.h',
 ]
 
 UNIFIED_SOURCES += [
-    'EncodingUtils.cpp',
     'FallbackEncoding.cpp',
     'TextDecoder.cpp',
     'TextEncoder.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '/intl/locale',
 ]
 
 props2arrays = '/intl/locale/props2arrays.py'
 prefixes = (
     'domainsfallbacks',
-    'encodingsgroups',
     'labelsencodings',
     'localesfallbacks',
     'nonparticipatingdomains',
 )
 
 for prefix in prefixes:
     input_file = prefix + '.properties'
     header = prefix + '.properties.h'
--- a/dom/fetch/BodyExtractor.cpp
+++ b/dom/fetch/BodyExtractor.cpp
@@ -1,16 +1,15 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "BodyExtractor.h"
-#include "mozilla/dom/EncodingUtils.h"
 #include "mozilla/dom/File.h"
 #include "mozilla/dom/FormData.h"
 #include "mozilla/dom/TypedArray.h"
 #include "mozilla/dom/URLSearchParams.h"
 #include "mozilla/dom/XMLHttpRequest.h"
 #include "nsContentUtils.h"
 #include "nsIDOMDocument.h"
 #include "nsIDOMSerializer.h"
--- a/dom/file/FileReader.cpp
+++ b/dom/file/FileReader.cpp
@@ -10,21 +10,20 @@
 #include "nsIGlobalObject.h"
 #include "nsITimer.h"
 #include "nsITransport.h"
 #include "nsIStreamTransportService.h"
 
 #include "mozilla/Base64.h"
 #include "mozilla/CheckedInt.h"
 #include "mozilla/dom/DOMError.h"
-#include "mozilla/dom/EncodingUtils.h"
 #include "mozilla/dom/File.h"
 #include "mozilla/dom/FileReaderBinding.h"
 #include "mozilla/dom/ProgressEvent.h"
-#include "nsContentUtils.h"
+#include "mozilla/Encoding.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsDOMJSUtils.h"
 #include "nsError.h"
 #include "nsNetCID.h"
 #include "nsNetUtil.h"
 #include "xpcpublic.h"
 
 #include "WorkerPrivate.h"
@@ -446,47 +445,43 @@ FileReader::ReadFileContent(Blob& aBlob,
 
 nsresult
 FileReader::GetAsText(Blob *aBlob,
                       const nsACString &aCharset,
                       const char *aFileData,
                       uint32_t aDataLen,
                       nsAString& aResult)
 {
-  // The BOM sniffing is baked into the "decode" part of the Encoding
-  // Standard, which the File API references.
-  nsAutoCString encoding;
-  if (!nsContentUtils::CheckForBOM(
-        reinterpret_cast<const unsigned char *>(aFileData),
-        aDataLen,
-        encoding)) {
-    // BOM sniffing failed. Try the API argument.
-    if (!EncodingUtils::FindEncodingForLabel(aCharset,
-                                             encoding)) {
-      // API argument failed. Try the type property of the blob.
-      nsAutoString type16;
-      aBlob->GetType(type16);
-      NS_ConvertUTF16toUTF8 type(type16);
-      nsAutoCString specifiedCharset;
-      bool haveCharset;
-      int32_t charsetStart, charsetEnd;
-      NS_ExtractCharsetFromContentType(type,
-                                       specifiedCharset,
-                                       &haveCharset,
-                                       &charsetStart,
-                                       &charsetEnd);
-      if (!EncodingUtils::FindEncodingForLabel(specifiedCharset, encoding)) {
-        // Type property failed. Use UTF-8.
-        encoding.AssignLiteral("UTF-8");
-      }
+  // Try the API argument.
+  const Encoding* encoding = Encoding::ForLabel(aCharset);
+  if (!encoding) {
+    // API argument failed. Try the type property of the blob.
+    nsAutoString type16;
+    aBlob->GetType(type16);
+    NS_ConvertUTF16toUTF8 type(type16);
+    nsAutoCString specifiedCharset;
+    bool haveCharset;
+    int32_t charsetStart, charsetEnd;
+    NS_ExtractCharsetFromContentType(type,
+                                     specifiedCharset,
+                                     &haveCharset,
+                                     &charsetStart,
+                                     &charsetEnd);
+    encoding = Encoding::ForLabel(specifiedCharset);
+    if (!encoding) {
+      // Type property failed. Use UTF-8.
+      encoding = UTF_8_ENCODING;
     }
   }
 
-  return nsContentUtils::ConvertStringFromEncoding(
-      encoding, aFileData, aDataLen, aResult);
+  auto data = MakeSpan(reinterpret_cast<const uint8_t*>(aFileData),
+                       aDataLen);
+  nsresult rv;
+  Tie(rv, encoding) = encoding->Decode(data, aResult);
+  return NS_FAILED(rv) ? rv : NS_OK;
 }
 
 nsresult
 FileReader::GetAsDataURL(Blob *aBlob,
                          const char *aFileData,
                          uint32_t aDataLen,
                          nsAString& aResult)
 {
--- a/dom/html/HTMLFormSubmission.cpp
+++ b/dom/html/HTMLFormSubmission.cpp
@@ -33,17 +33,16 @@
 #include "nsIScriptError.h"
 #include "nsIStringBundle.h"
 #include "nsCExternalHandlerService.h"
 #include "nsIFileStreams.h"
 #include "nsContentUtils.h"
 #include "mozilla/Telemetry.h"
 
 #include "mozilla/dom/Directory.h"
-#include "mozilla/dom/EncodingUtils.h"
 #include "mozilla/dom/File.h"
 
 namespace mozilla {
 namespace dom {
 
 namespace {
 
 void
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -1868,18 +1868,22 @@ HTMLInputElement::SetValue(const nsAStri
       // event, we should keep it that way. Otherwise, we should make sure the
       // element will not fire any event because of the script interaction.
       //
       // NOTE: this is currently quite expensive work (too much string
       // manipulation). We should probably optimize that.
       nsAutoString currentValue;
       GetValue(currentValue, aCallerType);
 
+      // Some types sanitize value, so GetValue doesn't return pure
+      // previous value correctly.
       nsresult rv =
         SetValueInternal(aValue,
+          (IsExperimentalMobileType(mType) || IsDateTimeInputType(mType)) ?
+            nullptr : &currentValue,
           nsTextEditorState::eSetValue_ByContent |
           nsTextEditorState::eSetValue_Notify |
           nsTextEditorState::eSetValue_MoveCursorToEndIfValueChanged);
       if (NS_FAILED(rv)) {
         aRv.Throw(rv);
         return;
       }
 
@@ -3027,17 +3031,19 @@ HTMLInputElement::UpdateFileList()
       if (array[i].IsFile()) {
         mFileData->mFileList->Append(array[i].GetAsFile());
       }
     }
   }
 }
 
 nsresult
-HTMLInputElement::SetValueInternal(const nsAString& aValue, uint32_t aFlags)
+HTMLInputElement::SetValueInternal(const nsAString& aValue,
+                                   const nsAString* aOldValue,
+                                   uint32_t aFlags)
 {
   NS_PRECONDITION(GetValueMode() != VALUE_MODE_FILENAME,
                   "Don't call SetValueInternal for file inputs");
 
   switch (GetValueMode()) {
     case VALUE_MODE_VALUE:
     {
       // At the moment, only single line text control have to sanitize their value
@@ -3051,17 +3057,17 @@ HTMLInputElement::SetValueInternal(const
       // else DoneCreatingElement calls us again once mDoneCreating is true
 
       bool setValueChanged = !!(aFlags & nsTextEditorState::eSetValue_Notify);
       if (setValueChanged) {
         SetValueChanged(true);
       }
 
       if (IsSingleLineTextControl(false)) {
-        if (!mInputData.mState->SetValue(value, aFlags)) {
+        if (!mInputData.mState->SetValue(value, aOldValue, aFlags)) {
           return NS_ERROR_OUT_OF_MEMORY;
         }
         if (mType == NS_FORM_INPUT_EMAIL) {
           UpdateAllValidityStates(!mDoneCreating);
         }
       } else {
         free(mInputData.mValue);
         mInputData.mValue = ToNewUnicode(value);
--- a/dom/html/HTMLInputElement.h
+++ b/dom/html/HTMLInputElement.h
@@ -937,19 +937,29 @@ protected:
                                      uint32_t aLen, uint32_t* aResult);
 
   // Helper method
 
   /**
    * Setting the value.
    *
    * @param aValue      String to set.
+   * @param aOldValue   Previous value before setting aValue.
+                        If previous value is unknown, aOldValue can be nullptr.
    * @param aFlags      See nsTextEditorState::SetValueFlags.
    */
-  nsresult SetValueInternal(const nsAString& aValue, uint32_t aFlags);
+  nsresult SetValueInternal(const nsAString& aValue,
+                            const nsAString* aOldValue,
+                            uint32_t aFlags);
+
+  nsresult SetValueInternal(const nsAString& aValue,
+                            uint32_t aFlags)
+  {
+    return SetValueInternal(aValue, nullptr, aFlags);
+  }
 
   // Generic getter for the value that doesn't do experimental control type
   // sanitization.
   void GetValueInternal(nsAString& aValue, CallerType aCallerType) const;
 
   // A getter for callers that know we're not dealing with a file input, so they
   // don't have to think about the caller type.
   void GetNonFileValueInternal(nsAString& aValue) const;
--- a/dom/html/nsHTMLDocument.cpp
+++ b/dom/html/nsHTMLDocument.cpp
@@ -77,18 +77,18 @@
 #include "nsIScriptError.h"
 #include "nsIMutableArray.h"
 #include "nsArrayUtils.h"
 #include "nsIEffectiveTLDService.h"
 
 //AHMED 12-2
 #include "nsBidiUtils.h"
 
-#include "mozilla/dom/EncodingUtils.h"
 #include "mozilla/dom/FallbackEncoding.h"
+#include "mozilla/Encoding.h"
 #include "mozilla/LoadInfo.h"
 #include "nsIEditingSession.h"
 #include "nsIEditor.h"
 #include "nsNodeInfoManager.h"
 #include "nsIPlaintextEditor.h"
 #include "nsIHTMLEditor.h"
 #include "nsIEditorStyleSheets.h"
 #include "nsIInlineSpellChecker.h"
@@ -145,16 +145,30 @@ static bool ConvertToMidasInternalComman
 
 static bool ConvertToMidasInternalCommand(const nsAString & inCommandID,
                                             nsACString& outCommandID);
 
 // ==================================================================
 // =
 // ==================================================================
 
+static bool
+IsAsciiCompatible(const nsACString& aPreferredName)
+{
+  // HZ and UTF-7 are no longer in mozilla-central, but keeping them here
+  // just in case for the benefit of comm-central.
+  return !(aPreferredName.LowerCaseEqualsLiteral("utf-16") ||
+           aPreferredName.LowerCaseEqualsLiteral("utf-16be") ||
+           aPreferredName.LowerCaseEqualsLiteral("utf-16le") ||
+           aPreferredName.LowerCaseEqualsLiteral("replacement") ||
+           aPreferredName.LowerCaseEqualsLiteral("hz-gb-2312") ||
+           aPreferredName.LowerCaseEqualsLiteral("utf-7") ||
+           aPreferredName.LowerCaseEqualsLiteral("x-imap4-modified-utf7"));
+}
+
 nsresult
 NS_NewHTMLDocument(nsIDocument** aInstancePtrResult, bool aLoadedAsData)
 {
   RefPtr<nsHTMLDocument> doc = new nsHTMLDocument();
 
   nsresult rv = doc->Init();
 
   if (NS_FAILED(rv)) {
@@ -281,17 +295,17 @@ nsHTMLDocument::TryHintCharset(nsIConten
     if(NS_SUCCEEDED(rv) && kCharsetUninitialized != requestCharsetSource) {
       nsAutoCString requestCharset;
       rv = aCv->GetHintCharacterSet(requestCharset);
       aCv->SetHintCharacterSetSource((int32_t)(kCharsetUninitialized));
 
       if(requestCharsetSource <= aCharsetSource)
         return;
 
-      if(NS_SUCCEEDED(rv) && EncodingUtils::IsAsciiCompatible(requestCharset)) {
+      if(NS_SUCCEEDED(rv) && IsAsciiCompatible(requestCharset)) {
         aCharsetSource = requestCharsetSource;
         aCharset = requestCharset;
 
         return;
       }
     }
   }
   return;
@@ -305,41 +319,41 @@ nsHTMLDocument::TryUserForcedCharset(nsI
                                      nsACString& aCharset)
 {
   nsresult rv = NS_OK;
 
   if(kCharsetFromUserForced <= aCharsetSource)
     return;
 
   // mCharacterSet not updated yet for channel, so check aCharset, too.
-  if (WillIgnoreCharsetOverride() || !EncodingUtils::IsAsciiCompatible(aCharset)) {
+  if (WillIgnoreCharsetOverride() || !IsAsciiCompatible(aCharset)) {
     return;
   }
 
   nsAutoCString forceCharsetFromDocShell;
   if (aCv) {
     // XXX mailnews-only
     rv = aCv->GetForceCharacterSet(forceCharsetFromDocShell);
   }
 
   if(NS_SUCCEEDED(rv) &&
      !forceCharsetFromDocShell.IsEmpty() &&
-     EncodingUtils::IsAsciiCompatible(forceCharsetFromDocShell)) {
+     IsAsciiCompatible(forceCharsetFromDocShell)) {
     aCharset = forceCharsetFromDocShell;
     aCharsetSource = kCharsetFromUserForced;
     return;
   }
 
   if (aDocShell) {
     // This is the Character Encoding menu code path in Firefox
     nsAutoCString charset;
     rv = aDocShell->GetForcedCharset(charset);
 
     if (NS_SUCCEEDED(rv) && !charset.IsEmpty()) {
-      if (!EncodingUtils::IsAsciiCompatible(charset)) {
+      if (!IsAsciiCompatible(charset)) {
         return;
       }
       aCharset = charset;
       aCharsetSource = kCharsetFromUserForced;
       aDocShell->SetForcedCharset(NS_LITERAL_CSTRING(""));
     }
   }
 }
@@ -355,30 +369,34 @@ nsHTMLDocument::TryCacheCharset(nsICachi
     return;
   }
 
   nsCString cachedCharset;
   rv = aCachingChannel->GetCacheTokenCachedCharset(cachedCharset);
   if (NS_FAILED(rv) || cachedCharset.IsEmpty()) {
     return;
   }
+  // The replacement encoding is not ASCII-compatible.
+  if (cachedCharset.EqualsLiteral("replacement")) {
+    return;
+  }
   // The canonical names changed, so the cache may have an old name.
-  if (!cachedCharset.EqualsLiteral("replacement")) {
-    if (!EncodingUtils::FindEncodingForLabel(cachedCharset, cachedCharset)) {
-      return;
-    }
+  const Encoding* encoding = Encoding::ForLabel(cachedCharset);
+  if (!encoding) {
+    return;
   }
-  // Check EncodingUtils::IsAsciiCompatible() even in the cache case, because the value
+  // Check IsAsciiCompatible() even in the cache case, because the value
   // might be stale and in the case of a stale charset that is not a rough
   // ASCII superset, the parser has no way to recover.
-  if (EncodingUtils::IsAsciiCompatible(cachedCharset))
-  {
-    aCharset = cachedCharset;
-    aCharsetSource = kCharsetFromCache;
+  if (!encoding->IsAsciiCompatible() && encoding != ISO_2022_JP_ENCODING) {
+    return;
   }
+  encoding->Name(cachedCharset);
+  aCharset = cachedCharset;
+  aCharsetSource = kCharsetFromCache;
 }
 
 void
 nsHTMLDocument::TryParentCharset(nsIDocShell*  aDocShell,
                                  int32_t& aCharsetSource,
                                  nsACString& aCharset)
 {
   if (!aDocShell) {
@@ -395,33 +413,33 @@ nsHTMLDocument::TryParentCharset(nsIDocS
                               &parentSource,
                               getter_AddRefs(parentPrincipal));
   if (parentCharset.IsEmpty()) {
     return;
   }
   if (kCharsetFromParentForced == parentSource ||
       kCharsetFromUserForced == parentSource) {
     if (WillIgnoreCharsetOverride() ||
-        !EncodingUtils::IsAsciiCompatible(aCharset) || // if channel said UTF-16
-        !EncodingUtils::IsAsciiCompatible(parentCharset)) {
+        !IsAsciiCompatible(aCharset) || // if channel said UTF-16
+        !IsAsciiCompatible(parentCharset)) {
       return;
     }
     aCharset.Assign(parentCharset);
     aCharsetSource = kCharsetFromParentForced;
     return;
   }
 
   if (aCharsetSource >= kCharsetFromParentFrame) {
     return;
   }
 
   if (kCharsetFromCache <= parentSource) {
     // Make sure that's OK
     if (!NodePrincipal()->Equals(parentPrincipal) ||
-        !EncodingUtils::IsAsciiCompatible(parentCharset)) {
+        !IsAsciiCompatible(parentCharset)) {
       return;
     }
 
     aCharset.Assign(parentCharset);
     aCharsetSource = kCharsetFromParentFrame;
   }
 }
 
@@ -1353,18 +1371,17 @@ nsHTMLDocument::GetCookie(nsAString& aCo
         return;
       }
     }
 
     nsXPIDLCString cookie;
     service->GetCookieString(codebaseURI, channel, getter_Copies(cookie));
     // CopyUTF8toUTF16 doesn't handle error
     // because it assumes that the input is valid.
-    nsContentUtils::ConvertStringFromEncoding(NS_LITERAL_CSTRING("UTF-8"),
-                                              cookie, aCookie);
+    UTF_8_ENCODING->DecodeWithoutBOMHandling(cookie, aCookie);
   }
 }
 
 NS_IMETHODIMP
 nsHTMLDocument::SetCookie(const nsAString& aCookie)
 {
   ErrorResult rv;
   SetCookie(aCookie, rv);
@@ -3720,17 +3737,17 @@ nsHTMLDocument::WillIgnoreCharsetOverrid
 {
   if (mType != eHTML) {
     MOZ_ASSERT(mType == eXHTML);
     return true;
   }
   if (mCharacterSetSource >= kCharsetFromByteOrderMark) {
     return true;
   }
-  if (!EncodingUtils::IsAsciiCompatible(mCharacterSet)) {
+  if (!IsAsciiCompatible(mCharacterSet)) {
     return true;
   }
   nsCOMPtr<nsIWyciwygChannel> wyciwyg = do_QueryInterface(mChannel);
   if (wyciwyg) {
     return true;
   }
   nsIURI* uri = GetOriginalURI();
   if (uri) {
--- a/dom/html/nsTextEditorState.cpp
+++ b/dom/html/nsTextEditorState.cpp
@@ -2487,29 +2487,33 @@ nsTextEditorState::GetValue(nsAString& a
       mTextCtrlElement->GetDefaultValueFromContent(aValue);
     } else {
       aValue = *mValue;
     }
   }
 }
 
 bool
-nsTextEditorState::SetValue(const nsAString& aValue, uint32_t aFlags)
+nsTextEditorState::SetValue(const nsAString& aValue, const nsAString* aOldValue,
+                            uint32_t aFlags)
 {
   nsAutoString newValue(aValue);
 
   // While mIsCommittingComposition is true (that means that some event
   // handlers which are fired during committing composition are the caller of
   // this method), GetValue() uses mValueBeingSet for its result because the
   // first calls of this methods hasn't set the value yet.  So, when it's true,
   // we need to modify mValueBeingSet.  In this case, we will back to the first
   // call of this method, then, mValueBeingSet will be truncated when
   // mIsCommittingComposition is set false.  See below.
   if (mIsCommittingComposition) {
     mValueBeingSet = aValue;
+    // GetValue doesn't return current text frame's content during committing.
+    // So we cannot trust this old value
+    aOldValue = nullptr;
   }
 
   // Note that if this may be called during reframe of the editor.  In such
   // case, we shouldn't commit composition.  Therefore, when this is called
   // for internal processing, we shouldn't commit the composition.
   if (aFlags & (eSetValue_BySetUserInput | eSetValue_ByContent)) {
     if (EditorHasComposition()) {
       // When this is called recursively, there shouldn't be composition.
@@ -2520,24 +2524,35 @@ nsTextEditorState::SetValue(const nsAStr
         return true;
       }
       if (NS_WARN_IF(!mBoundFrame)) {
         // We're not sure if this case is possible.
       } else {
         // If setting value won't change current value, we shouldn't commit
         // composition for compatibility with the other browsers.
         nsAutoString currentValue;
-        mBoundFrame->GetText(currentValue);
+        if (aOldValue) {
+#ifdef DEBUG
+          mBoundFrame->GetText(currentValue);
+          MOZ_ASSERT(currentValue.Equals(*aOldValue));
+#endif
+          currentValue.Assign(*aOldValue);
+        } else {
+          mBoundFrame->GetText(currentValue);
+        }
         if (newValue == currentValue) {
           // Note that in this case, we shouldn't fire any events with setting
           // value because event handlers may try to set value recursively but
           // we cannot commit composition at that time due to unsafe to run
           // script (see below).
           return true;
         }
+        // IME might commit composition, then change value, so we cannot
+        // trust old value from parameter.
+        aOldValue = nullptr;
       }
       // If there is composition, need to commit composition first because
       // other browsers do that.
       // NOTE: We don't need to block nested calls of this because input nor
       //       other events won't be fired by setting values and script blocker
       //       is used during setting the value to the editor.  IE also allows
       //       to set the editor value on the input event which is caused by
       //       forcibly committing composition.
@@ -2588,17 +2603,25 @@ nsTextEditorState::SetValue(const nsAStr
 #ifdef DEBUG
     if (IsSingleLineTextControl()) {
       NS_ASSERTION(mEditorInitialized || mInitializing,
                    "We should never try to use the editor if we're not initialized unless we're being initialized");
     }
 #endif
 
     nsAutoString currentValue;
-    mBoundFrame->GetText(currentValue);
+    if (aOldValue) {
+#ifdef DEBUG
+      mBoundFrame->GetText(currentValue);
+      MOZ_ASSERT(currentValue.Equals(*aOldValue));
+#endif
+      currentValue.Assign(*aOldValue);
+    } else {
+      mBoundFrame->GetText(currentValue);
+    }
 
     AutoWeakFrame weakFrame(mBoundFrame);
 
     // this is necessary to avoid infinite recursion
     if (!currentValue.Equals(newValue))
     {
       ValueSetter valueSetter(mEditor);
 
--- a/dom/html/nsTextEditorState.h
+++ b/dom/html/nsTextEditorState.h
@@ -174,17 +174,24 @@ public:
     eSetValue_Notify                = 1 << 2,
     // Whether to move the cursor to end of the value (in the case when we have
     // cached selection offsets), in the case when the value has changed.  If
     // this is not set, the cached selection offsets will simply be clamped to
     // be within the length of the new value.  In either case, if the value has
     // not changed the cursor won't move.
     eSetValue_MoveCursorToEndIfValueChanged = 1 << 3,
   };
-  MOZ_MUST_USE bool SetValue(const nsAString& aValue, uint32_t aFlags);
+  MOZ_MUST_USE bool SetValue(const nsAString& aValue,
+                             const nsAString* aOldValue,
+                             uint32_t aFlags);
+  MOZ_MUST_USE bool SetValue(const nsAString& aValue,
+                             uint32_t aFlags)
+  {
+    return SetValue(aValue, nullptr, aFlags);
+  }
   void GetValue(nsAString& aValue, bool aIgnoreWrap) const;
   bool HasNonEmptyValue();
   // The following methods are for textarea element to use whether default
   // value or not.
   // XXX We might have to add assertion when it is into editable,
   // or reconsider fixing bug 597525 to remove these.
   void EmptyValue() { if (mValue) mValue->Truncate(); }
   bool IsEmpty() const { return mValue ? mValue->IsEmpty() : true; }
--- a/dom/indexedDB/ActorsChild.cpp
+++ b/dom/indexedDB/ActorsChild.cpp
@@ -19,23 +19,23 @@
 #include "IDBTransaction.h"
 #include "IndexedDatabase.h"
 #include "IndexedDatabaseInlines.h"
 #include "mozilla/BasicEvents.h"
 #include "mozilla/CycleCollectedJSRuntime.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/TypeTraits.h"
 #include "mozilla/dom/Element.h"
-#include "mozilla/dom/EncodingUtils.h"
 #include "mozilla/dom/PermissionMessageUtils.h"
 #include "mozilla/dom/TabChild.h"
 #include "mozilla/dom/indexedDB/PBackgroundIDBDatabaseFileChild.h"
 #include "mozilla/dom/indexedDB/PIndexedDBPermissionRequestChild.h"
 #include "mozilla/dom/ipc/PendingIPCBlobChild.h"
 #include "mozilla/dom/IPCBlobUtils.h"
+#include "mozilla/Encoding.h"
 #include "mozilla/ipc/BackgroundUtils.h"
 #include "mozilla/TaskQueue.h"
 #include "nsCOMPtr.h"
 #include "nsContentUtils.h"
 #include "nsIAsyncInputStream.h"
 #include "nsIBFCacheEntry.h"
 #include "nsIDocument.h"
 #include "nsIDOMEvent.h"
@@ -1325,38 +1325,32 @@ private:
       if (NS_WARN_IF(NS_FAILED(rv))) {
         return NS_ERROR_DOM_FILEHANDLE_UNKNOWN_ERR;
       }
 
       aResult.setObject(*arrayBuffer);
       return NS_OK;
     }
 
-    nsAutoCString encoding;
-    // The BOM sniffing is baked into the "decode" part of the Encoding
-    // Standard, which the File API references.
-    if (!nsContentUtils::CheckForBOM(
-          reinterpret_cast<const unsigned char *>(data.get()),
-          data.Length(),
-          encoding)) {
-      // BOM sniffing failed. Try the API argument.
-      if (!EncodingUtils::FindEncodingForLabel(mFileRequest->GetEncoding(),
-                                               encoding)) {
-        // API argument failed. Since we are dealing with a file system file,
-        // we don't have a meaningful type attribute for the blob available,
-        // so proceeding to the next step, which is defaulting to UTF-8.
-        encoding.AssignLiteral("UTF-8");
-      }
+    // Try the API argument.
+    const Encoding* encoding =
+      Encoding::ForLabel(mFileRequest->GetEncoding());
+    if (!encoding) {
+      // API argument failed. Since we are dealing with a file system file,
+      // we don't have a meaningful type attribute for the blob available,
+      // so proceeding to the next step, which is defaulting to UTF-8.
+      encoding = UTF_8_ENCODING;
     }
 
     nsString tmpString;
-    rv = nsContentUtils::ConvertStringFromEncoding(encoding, data, tmpString);
+    Tie(rv, encoding) = encoding->Decode(data, tmpString);
     if (NS_WARN_IF(NS_FAILED(rv))) {
       return NS_ERROR_DOM_FILEHANDLE_UNKNOWN_ERR;
     }
+    rv = NS_OK;
 
     if (NS_WARN_IF(!xpc::StringToJsval(aCx, tmpString, aResult))) {
       return NS_ERROR_DOM_FILEHANDLE_UNKNOWN_ERR;
     }
 
     return NS_OK;
   }
 
--- a/dom/media/eme/MediaKeySession.cpp
+++ b/dom/media/eme/MediaKeySession.cpp
@@ -11,18 +11,18 @@
 #include "mozilla/dom/MediaEncryptedEvent.h"
 #include "mozilla/dom/MediaKeyStatusMap.h"
 #include "mozilla/dom/MediaKeySystemAccess.h"
 #include "mozilla/dom/KeyIdsInitDataBinding.h"
 #include "nsCycleCollectionParticipant.h"
 #include "mozilla/CDMProxy.h"
 #include "mozilla/AsyncEventDispatcher.h"
 #include "mozilla/Move.h"
-#include "nsContentUtils.h"
 #include "mozilla/EMEUtils.h"
+#include "mozilla/Encoding.h"
 #include "GMPUtils.h"
 #include "nsPrintfCString.h"
 #include "psshparser/PsshParser.h"
 #include <ctime>
 
 namespace mozilla {
 namespace dom {
 
@@ -192,17 +192,17 @@ ValidateInitData(const nsTArray<uint8_t>
   } else if (aInitDataType.LowerCaseEqualsLiteral("keyids")) {
     if (aInitData.Length() > MAX_KEY_ID_LENGTH) {
       return false;
     }
     // Ensure that init data matches the expected JSON format.
     mozilla::dom::KeyIdsInitData keyIds;
     nsString json;
     nsDependentCSubstring raw(reinterpret_cast<const char*>(aInitData.Elements()), aInitData.Length());
-    if (NS_FAILED(nsContentUtils::ConvertStringFromEncoding(NS_LITERAL_CSTRING("UTF-8"), raw, json))) {
+    if (NS_FAILED(UTF_8_ENCODING->DecodeWithBOMRemoval(raw, json))) {
       return false;
     }
     if (!keyIds.Init(json)) {
       return false;
     }
     if (keyIds.mKids.Length() == 0) {
       return false;
     }
--- a/dom/plugins/test/unit/test_bug813245.js
+++ b/dom/plugins/test/unit/test_bug813245.js
@@ -26,17 +26,17 @@ function write_registry(version, info) {
   var foStream = Components.classes["@mozilla.org/network/file-output-stream;1"]
                            .createInstance(Components.interfaces.nsIFileOutputStream);
   // write, create, truncate
   foStream.init(registry, 0x02 | 0x08 | 0x20, 0o666, 0);
 
   var charset = "UTF-8"; // Can be any character encoding name that Mozilla supports
   var os = Cc["@mozilla.org/intl/converter-output-stream;1"].
            createInstance(Ci.nsIConverterOutputStream);
-  os.init(foStream, charset, 0, 0x0000);
+  os.init(foStream, charset);
 
   os.writeString(header);
   os.writeString(info);
   os.close();
 }
 
 function run_test() {
   allow_all_plugins();
--- a/dom/script/ScriptLoader.cpp
+++ b/dom/script/ScriptLoader.cpp
@@ -49,17 +49,16 @@
 #include "nsIContentSecurityPolicy.h"
 #include "mozilla/Logging.h"
 #include "nsCRT.h"
 #include "nsContentCreatorFunctions.h"
 #include "nsProxyRelease.h"
 #include "nsSandboxFlags.h"
 #include "nsContentTypeParser.h"
 #include "nsINetworkPredictor.h"
-#include "mozilla/dom/EncodingUtils.h"
 #include "mozilla/ConsoleReportCollector.h"
 
 #include "mozilla/AsyncEventDispatcher.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/Telemetry.h"
 #include "mozilla/TimeStamp.h"
 #include "mozilla/Unused.h"
 #include "nsIScriptError.h"
--- a/dom/workers/FileReaderSync.cpp
+++ b/dom/workers/FileReaderSync.cpp
@@ -4,19 +4,18 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "FileReaderSync.h"
 
 #include "jsfriendapi.h"
 #include "mozilla/Unused.h"
 #include "mozilla/Base64.h"
-#include "mozilla/dom/EncodingUtils.h"
 #include "mozilla/dom/File.h"
-#include "nsContentUtils.h"
+#include "mozilla/Encoding.h"
 #include "mozilla/dom/FileReaderSyncBinding.h"
 #include "nsCExternalHandlerService.h"
 #include "nsComponentManagerUtils.h"
 #include "nsCOMPtr.h"
 #include "nsDOMClassInfoID.h"
 #include "nsError.h"
 #include "nsIConverterInputStream.h"
 #include "nsIInputStream.h"
@@ -137,18 +136,16 @@ FileReaderSync::ReadAsText(Blob& aBlob,
                            ErrorResult& aRv)
 {
   nsCOMPtr<nsIInputStream> stream;
   aBlob.GetInternalStream(getter_AddRefs(stream), aRv);
   if (NS_WARN_IF(aRv.Failed())) {
     return;
   }
 
-  nsAutoCString encoding;
-
   nsCString sniffBuf;
   if (!sniffBuf.SetLength(3, fallible)) {
     aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
     return;
   }
 
   uint32_t numRead = 0;
   aRv = SyncRead(stream, sniffBuf.BeginWriting(), sniffBuf.Length(), &numRead);
@@ -157,40 +154,36 @@ FileReaderSync::ReadAsText(Blob& aBlob,
   }
 
   // No data, we don't need to continue.
   if (numRead == 0) {
     aResult.Truncate();
     return;
   }
 
-  // The BOM sniffing is baked into the "decode" part of the Encoding
-  // Standard, which the File API references.
-  if (!nsContentUtils::CheckForBOM((const unsigned char*)sniffBuf.BeginReading(),
-                                   numRead, encoding)) {
-    // BOM sniffing failed. Try the API argument.
-    if (!aEncoding.WasPassed() ||
-        !EncodingUtils::FindEncodingForLabel(aEncoding.Value(),
-                                             encoding)) {
-      // API argument failed. Try the type property of the blob.
-      nsAutoString type16;
-      aBlob.GetType(type16);
-      NS_ConvertUTF16toUTF8 type(type16);
-      nsAutoCString specifiedCharset;
-      bool haveCharset;
-      int32_t charsetStart, charsetEnd;
-      NS_ExtractCharsetFromContentType(type,
-                                       specifiedCharset,
-                                       &haveCharset,
-                                       &charsetStart,
-                                       &charsetEnd);
-      if (!EncodingUtils::FindEncodingForLabel(specifiedCharset, encoding)) {
-        // Type property failed. Use UTF-8.
-        encoding.AssignLiteral("UTF-8");
-      }
+  // Try the API argument.
+  const Encoding* encoding = aEncoding.WasPassed() ?
+    Encoding::ForLabel(aEncoding.Value()) : nullptr;
+  if (!encoding) {
+    // API argument failed. Try the type property of the blob.
+    nsAutoString type16;
+    aBlob.GetType(type16);
+    NS_ConvertUTF16toUTF8 type(type16);
+    nsAutoCString specifiedCharset;
+    bool haveCharset;
+    int32_t charsetStart, charsetEnd;
+    NS_ExtractCharsetFromContentType(type,
+                                     specifiedCharset,
+                                     &haveCharset,
+                                     &charsetStart,
+                                     &charsetEnd);
+    encoding = Encoding::ForLabel(specifiedCharset);
+    if (!encoding) {
+      // Type property failed. Use UTF-8.
+      encoding = UTF_8_ENCODING;
     }
   }
 
   if (numRead < sniffBuf.Length()) {
     sniffBuf.Truncate(numRead);
   }
 
   // Let's recreate the full stream using a:
@@ -226,17 +219,19 @@ FileReaderSync::ReadAsText(Blob& aBlob,
   // already closed or there is nothing to read.
   if (syncStream) {
     aRv = multiplexStream->AppendStream(syncStream);
     if (NS_WARN_IF(aRv.Failed())) {
       return;
     }
   }
 
-  aRv = ConvertStream(multiplexStream, encoding.get(), aResult);
+  nsAutoCString charset;
+  encoding->Name(charset);
+  aRv = ConvertStream(multiplexStream, charset.get(), aResult);
   if (NS_WARN_IF(aRv.Failed())) {
     return;
   }
 }
 
 void
 FileReaderSync::ReadAsDataURL(Blob& aBlob, nsAString& aResult,
                               ErrorResult& aRv)
--- a/dom/workers/ServiceWorkerEvents.cpp
+++ b/dom/workers/ServiceWorkerEvents.cpp
@@ -27,17 +27,16 @@
 #include "ServiceWorkerManager.h"
 
 #include "mozilla/ErrorResult.h"
 #include "mozilla/LoadInfo.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/dom/BodyUtil.h"
 #include "mozilla/dom/DOMException.h"
 #include "mozilla/dom/DOMExceptionBinding.h"
-#include "mozilla/dom/EncodingUtils.h"
 #include "mozilla/dom/FetchEventBinding.h"
 #include "mozilla/dom/MessagePort.h"
 #include "mozilla/dom/PromiseNativeHandler.h"
 #include "mozilla/dom/PushEventBinding.h"
 #include "mozilla/dom/PushMessageDataBinding.h"
 #include "mozilla/dom/PushUtil.h"
 #include "mozilla/dom/Request.h"
 #include "mozilla/dom/TypedArray.h"
--- a/dom/xhr/XMLHttpRequestMainThread.cpp
+++ b/dom/xhr/XMLHttpRequestMainThread.cpp
@@ -20,16 +20,17 @@
 #include "mozilla/dom/FileBinding.h"
 #include "mozilla/dom/FileCreatorHelper.h"
 #include "mozilla/dom/FetchUtil.h"
 #include "mozilla/dom/FormData.h"
 #include "mozilla/dom/MutableBlobStorage.h"
 #include "mozilla/dom/XMLDocument.h"
 #include "mozilla/dom/URLSearchParams.h"
 #include "mozilla/dom/PromiseNativeHandler.h"
+#include "mozilla/Encoding.h"
 #include "mozilla/EventDispatcher.h"
 #include "mozilla/EventListenerManager.h"
 #include "mozilla/EventStateManager.h"
 #include "mozilla/LoadInfo.h"
 #include "mozilla/LoadContext.h"
 #include "mozilla/MemoryReporting.h"
 #include "nsIDOMDocument.h"
 #include "mozilla/dom/ProgressEvent.h"
@@ -71,17 +72,16 @@
 #include "nsIConsoleService.h"
 #include "nsIContentSecurityPolicy.h"
 #include "nsAsyncRedirectVerifyHelper.h"
 #include "nsStringBuffer.h"
 #include "nsIFileChannel.h"
 #include "mozilla/Telemetry.h"
 #include "jsfriendapi.h"
 #include "GeckoProfiler.h"
-#include "mozilla/dom/EncodingUtils.h"
 #include "mozilla/dom/XMLHttpRequestBinding.h"
 #include "mozilla/Attributes.h"
 #include "MultipartBlobImpl.h"
 #include "nsIPermissionManager.h"
 #include "nsMimeTypes.h"
 #include "nsIHttpChannelInternal.h"
 #include "nsIClassOfService.h"
 #include "nsCharSeparatedTokenizer.h"
@@ -498,32 +498,34 @@ XMLHttpRequestMainThread::DetectCharset(
   if (mResponseType != XMLHttpRequestResponseType::_empty &&
       mResponseType != XMLHttpRequestResponseType::Text &&
       mResponseType != XMLHttpRequestResponseType::Json &&
       mResponseType != XMLHttpRequestResponseType::Moz_chunked_text) {
     return NS_OK;
   }
 
   nsAutoCString charsetVal;
+  const Encoding* encoding;
   bool ok = mChannel &&
             NS_SUCCEEDED(mChannel->GetContentCharset(charsetVal)) &&
-            EncodingUtils::FindEncodingForLabel(charsetVal, mResponseCharset);
-  if (!ok || mResponseCharset.IsEmpty()) {
+            (encoding = Encoding::ForLabel(charsetVal));
+  if (!ok) {
     // MS documentation states UTF-8 is default for responseText
-    mResponseCharset.AssignLiteral("UTF-8");
+    encoding = UTF_8_ENCODING;
   }
 
   if (mResponseType == XMLHttpRequestResponseType::Json &&
-      !mResponseCharset.EqualsLiteral("UTF-8")) {
+      encoding != UTF_8_ENCODING) {
     // The XHR spec says only UTF-8 is supported for responseType == "json"
     LogMessage("JSONCharsetWarning", GetOwner());
-    mResponseCharset.AssignLiteral("UTF-8");
-  }
-
-  mDecoder = EncodingUtils::DecoderForEncoding(mResponseCharset);
+    encoding = UTF_8_ENCODING;
+  }
+
+  encoding->Name(mResponseCharset);
+  mDecoder = encoding->NewDecoderWithBOMRemoval();
 
   return NS_OK;
 }
 
 nsresult
 XMLHttpRequestMainThread::AppendToResponseText(const char * aSrcBuffer,
                                                uint32_t aSrcBufferLen)
 {
@@ -2426,17 +2428,17 @@ XMLHttpRequestMainThread::OnBodyParseEnd
 
 void
 XMLHttpRequestMainThread::MatchCharsetAndDecoderToResponseDocument()
 {
   if (mResponseXML && mResponseCharset != mResponseXML->GetDocumentCharacterSet()) {
     mResponseCharset = mResponseXML->GetDocumentCharacterSet();
     TruncateResponseText();
     mResponseBodyDecodedPos = 0;
-    mDecoder = EncodingUtils::DecoderForEncoding(mResponseCharset);
+    mDecoder = Encoding::ForName(mResponseCharset)->NewDecoderWithBOMRemoval();
   }
 }
 
 void
 XMLHttpRequestMainThread::ChangeStateToDone()
 {
   StopProgressEventTimer();
 
--- a/dom/xslt/xslt/txMozillaStylesheetCompiler.cpp
+++ b/dom/xslt/xslt/txMozillaStylesheetCompiler.cpp
@@ -32,21 +32,20 @@
 #include "txStylesheetCompiler.h"
 #include "txXMLUtils.h"
 #include "nsAttrName.h"
 #include "nsIScriptError.h"
 #include "nsIURL.h"
 #include "nsError.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/dom/Element.h"
-#include "mozilla/dom/EncodingUtils.h"
+#include "mozilla/Encoding.h"
 #include "mozilla/UniquePtr.h"
 
 using namespace mozilla;
-using mozilla::dom::EncodingUtils;
 using mozilla::net::ReferrerPolicy;
 
 static NS_DEFINE_CID(kCParserCID, NS_PARSER_CID);
 
 static void
 getSpec(nsIChannel* aChannel, nsAString& aSpec)
 {
     if (!aChannel) {
@@ -252,28 +251,31 @@ txStylesheetSink::OnDataAvailable(nsIReq
 NS_IMETHODIMP
 txStylesheetSink::OnStartRequest(nsIRequest *aRequest, nsISupports *aContext)
 {
     int32_t charsetSource = kCharsetFromDocTypeDefault;
 
     nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest);
 
     // check channel's charset...
+    const Encoding* encoding = nullptr;
     nsAutoCString charsetVal;
-    nsAutoCString charset;
     if (NS_SUCCEEDED(channel->GetContentCharset(charsetVal))) {
-        if (EncodingUtils::FindEncodingForLabel(charsetVal, charset)) {
+        encoding = Encoding::ForLabel(charsetVal);
+        if (encoding) {
             charsetSource = kCharsetFromChannel;
         }
     }
 
-    if (charset.IsEmpty()) {
-      charset.AssignLiteral("UTF-8");
+    if (!encoding) {
+        encoding = UTF_8_ENCODING;
     }
 
+    nsAutoCString charset;
+    encoding->Name(charset);
     mParser->SetDocumentCharset(charset, charsetSource);
 
     nsAutoCString contentType;
     channel->GetContentType(contentType);
 
     // Time to sniff! Note: this should go away once file channels do
     // sniffing themselves.
     nsCOMPtr<nsIURI> uri;
--- a/dom/xslt/xslt/txMozillaTextOutput.cpp
+++ b/dom/xslt/xslt/txMozillaTextOutput.cpp
@@ -11,17 +11,17 @@
 #include "nsIDOMDocumentFragment.h"
 #include "nsIDocumentTransformer.h"
 #include "nsCharsetSource.h"
 #include "nsIPrincipal.h"
 #include "txURIUtils.h"
 #include "nsContentCreatorFunctions.h"
 #include "nsContentUtils.h"
 #include "nsGkAtoms.h"
-#include "mozilla/dom/EncodingUtils.h"
+#include "mozilla/Encoding.h"
 #include "nsTextNode.h"
 #include "nsNameSpaceManager.h"
 
 using namespace mozilla::dom;
 
 txMozillaTextOutput::txMozillaTextOutput(nsITransformObserver* aObserver)
 {
     MOZ_COUNT_CTOR(txMozillaTextOutput);
@@ -155,21 +155,21 @@ txMozillaTextOutput::createResultDocumen
     // Reset and set up document
     URIUtils::ResetWithSource(mDocument, aSourceDocument);
     // Only do this after resetting the document to ensure we have the
     // correct principal.
     mDocument->SetScriptHandlingObject(sgo);
 
     // Set the charset
     if (!mOutputFormat.mEncoding.IsEmpty()) {
-        nsAutoCString canonicalCharset;
-
-        if (EncodingUtils::FindEncodingForLabel(mOutputFormat.mEncoding,
-                                                canonicalCharset)) {
+        const Encoding* encoding = Encoding::ForLabel(mOutputFormat.mEncoding);
+        if (encoding) {
             mDocument->SetDocumentCharacterSetSource(kCharsetFromOtherComponent);
+            nsAutoCString canonicalCharset;
+            encoding->Name(canonicalCharset);
             mDocument->SetDocumentCharacterSet(canonicalCharset);
         }
     }
 
     // Notify the contentsink that the document is created
     nsCOMPtr<nsITransformObserver> observer = do_QueryReferent(mObserver);
     if (observer) {
         rv = observer->OnDocumentCreated(mDocument);
--- a/dom/xslt/xslt/txMozillaXMLOutput.cpp
+++ b/dom/xslt/xslt/txMozillaXMLOutput.cpp
@@ -24,18 +24,18 @@
 #include "txStringUtils.h"
 #include "txURIUtils.h"
 #include "nsIHTMLDocument.h"
 #include "nsIStyleSheetLinkingElement.h"
 #include "nsIDocumentTransformer.h"
 #include "mozilla/StyleSheetInlines.h"
 #include "mozilla/css/Loader.h"
 #include "mozilla/dom/Element.h"
-#include "mozilla/dom/EncodingUtils.h"
 #include "mozilla/dom/ScriptLoader.h"
+#include "mozilla/Encoding.h"
 #include "nsContentUtils.h"
 #include "txXMLUtils.h"
 #include "nsContentSink.h"
 #include "nsINode.h"
 #include "nsContentCreatorFunctions.h"
 #include "nsError.h"
 #include "nsIFrame.h"
 #include <algorithm>
@@ -815,20 +815,21 @@ txMozillaXMLOutput::createResultDocument
     URIUtils::ResetWithSource(mDocument, aSourceDocument);
 
     // Make sure we set the script handling object after resetting with the
     // source, so that we have the right principal.
     mDocument->SetScriptHandlingObject(sgo);
 
     // Set the charset
     if (!mOutputFormat.mEncoding.IsEmpty()) {
-        nsAutoCString canonicalCharset;
-        if (EncodingUtils::FindEncodingForLabel(mOutputFormat.mEncoding,
-                                                canonicalCharset)) {
+        const Encoding* encoding = Encoding::ForLabel(mOutputFormat.mEncoding);
+        if (encoding) {
             mDocument->SetDocumentCharacterSetSource(kCharsetFromOtherComponent);
+            nsAutoCString canonicalCharset;
+            encoding->Name(canonicalCharset);
             mDocument->SetDocumentCharacterSet(canonicalCharset);
         }
     }
 
     // Set the mime-type
     if (!mOutputFormat.mMediaType.IsEmpty()) {
         mDocument->SetContentType(mOutputFormat.mMediaType);
     }
--- a/extensions/cookie/test/unit/test_permmanager_defaults.js
+++ b/extensions/cookie/test/unit/test_permmanager_defaults.js
@@ -28,17 +28,17 @@ add_task(function* do_test() {
   file.append("test_default_permissions");
 
   // write our test data to it.
   let ostream = Cc["@mozilla.org/network/file-output-stream;1"].
                 createInstance(Ci.nsIFileOutputStream);
   ostream.init(file, -1, 0o666, 0);
   let conv = Cc["@mozilla.org/intl/converter-output-stream;1"].
              createInstance(Ci.nsIConverterOutputStream);
-  conv.init(ostream, "UTF-8", 0, 0);
+  conv.init(ostream, "UTF-8");
 
   conv.writeString("# this is a comment\n");
   conv.writeString("\n"); // a blank line!
   conv.writeString("host\t" + TEST_PERMISSION + "\t1\t" + TEST_ORIGIN.host + "\n");
   conv.writeString("host\t" + TEST_PERMISSION + "\t1\t" + TEST_ORIGIN_2.host + "\n");
   conv.writeString("origin\t" + TEST_PERMISSION + "\t1\t" + TEST_ORIGIN_3.spec + "\n");
   conv.writeString("origin\t" + TEST_PERMISSION + "\t1\t" + TEST_ORIGIN.spec + "^appId=1000&inBrowser=1\n");
   ostream.close();
--- a/extensions/cookie/test/unit/test_permmanager_removeall.js
+++ b/extensions/cookie/test/unit/test_permmanager_removeall.js
@@ -15,17 +15,17 @@ function run_test() {
   do_check_true(file.exists());
 
   // corrupt the file
   var ostream = Cc["@mozilla.org/network/file-output-stream;1"].
                 createInstance(Ci.nsIFileOutputStream);
   ostream.init(file, 0x02, 0o666, 0);
   var conv = Cc["@mozilla.org/intl/converter-output-stream;1"].
              createInstance(Ci.nsIConverterOutputStream);
-  conv.init(ostream, "UTF-8", 0, 0);
+  conv.init(ostream, "UTF-8");
   for (var i = 0; i < file.fileSize; ++i)
     conv.writeString("a");
   conv.close();
 
   // prepare an empty hostperm.1 file so that it can be used for importing
   var hostperm = dir.clone();
   hostperm.append("hostperm.1");
   ostream.init(hostperm, 0x02 | 0x08, 0o666, 0);
--- a/gfx/thebes/gfxFontUtils.cpp
+++ b/gfx/thebes/gfxFontUtils.cpp
@@ -5,17 +5,16 @@
 
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/BinarySearch.h"
 
 #include "gfxFontUtils.h"
 
 #include "nsServiceManagerUtils.h"
 
-#include "mozilla/dom/EncodingUtils.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/Services.h"
 #include "mozilla/BinarySearch.h"
 #include "mozilla/Sprintf.h"
 
 #include "nsCOMPtr.h"
 #include "nsIUUIDGenerator.h"
 #include "mozilla/Encoding.h"
rename from dom/encoding/encodingsgroups.properties
rename to intl/locale/encodingsgroups.properties
--- a/intl/locale/moz.build
+++ b/intl/locale/moz.build
@@ -84,17 +84,23 @@ FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '/intl/uconv',
 ]
 
 RESOURCE_FILES += [
     'language.properties',
 ]
 
-GENERATED_FILES += [
-    'langGroups.properties.h',
-]
-langgroups = GENERATED_FILES['langGroups.properties.h']
-langgroups.script = 'props2arrays.py'
-langgroups.inputs = ['langGroups.properties']
+prefixes = (
+    'encodingsgroups',
+    'langGroups',
+)
+
+for prefix in prefixes:
+    input_file = prefix + '.properties'
+    header = prefix + '.properties.h'
+    GENERATED_FILES += [header]
+    props = GENERATED_FILES[header]
+    props.script = 'props2arrays.py'
+    props.inputs = [input_file]
 
 if CONFIG['ENABLE_TESTS']:
     DIRS += ['tests/gtest']