зеркало из https://github.com/mozilla/gecko-dev.git
Bug 943524 - fix charset and chardet processing to allow for unique IDs, r=jaws
This commit is contained in:
Родитель
e1af4fd4be
Коммит
acd2297ca2
|
@ -11,9 +11,9 @@
|
|||
#endif
|
||||
oncommand="MultiplexHandler(event)"
|
||||
#ifdef OMIT_ACCESSKEYS
|
||||
onpopupshowing="CharsetMenu.build(event);"
|
||||
#expand onpopupshowing="CharsetMenu.build(event, '__ID_PREFIX__');"
|
||||
#else
|
||||
onpopupshowing="CharsetMenu.build(event, true);"
|
||||
#expand onpopupshowing="CharsetMenu.build(event, '__ID_PREFIX__', true);"
|
||||
#endif
|
||||
onpopupshown="UpdateMenus(event);">
|
||||
<menupopup>
|
||||
|
|
|
@ -5087,7 +5087,7 @@ function MultiplexHandler(event)
|
|||
SelectDetector(event, false);
|
||||
} else if (name == 'charsetGroup') {
|
||||
var charset = node.getAttribute('id');
|
||||
charset = charset.substring('charset.'.length, charset.length)
|
||||
charset = charset.substring(charset.indexOf('charset.') + 'charset.'.length);
|
||||
BrowserSetForcedCharacterSet(charset);
|
||||
} else if (name == 'charsetCustomize') {
|
||||
//do nothing - please remove this else statement, once the charset prefs moves to the pref window
|
||||
|
@ -5100,7 +5100,7 @@ function MultiplexHandler(event)
|
|||
function SelectDetector(event, doReload)
|
||||
{
|
||||
var uri = event.target.getAttribute("id");
|
||||
var prefvalue = uri.substring('chardet.'.length, uri.length);
|
||||
var prefvalue = uri.substring(uri.indexOf('chardet.') + 'chardet.'.length);
|
||||
if ("off" == prefvalue) { // "off" is special value to turn off the detectors
|
||||
prefvalue = "";
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ const kPinned = [
|
|||
];
|
||||
|
||||
this.CharsetMenu = Object.freeze({
|
||||
build: function BuildCharsetMenu(event, showAccessKeys) {
|
||||
build: function BuildCharsetMenu(event, idPrefix="", showAccessKeys=false) {
|
||||
let parent = event.target;
|
||||
if (parent.lastChild.localName != "menuseparator") {
|
||||
// Detector menu or charset menu already built
|
||||
|
@ -108,7 +108,7 @@ this.CharsetMenu = Object.freeze({
|
|||
// Some items intentionally don't have an accesskey
|
||||
}
|
||||
}
|
||||
menuItem.setAttribute("id", "charset." + encoding);
|
||||
menuItem.setAttribute("id", idPrefix + "charset." + encoding);
|
||||
return menuItem;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче