зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1194856 - Load noscript.css and noframes.css from data: URLs in release builds. r=dbaron
This commit is contained in:
Родитель
e45e2f99e5
Коммит
caf777f1cb
|
@ -4,6 +4,9 @@
|
|||
|
||||
/* This sheet is added to the style set for documents with frames disabled */
|
||||
|
||||
/* Until bug 1194856 is fixed, if you update this file you should also update
|
||||
the data: URL in nsLayoutStylesheetCache::NoFramesSheet(). */
|
||||
|
||||
noframes {
|
||||
display: block;
|
||||
}
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
|
||||
/* This sheet is added to the style set for documents with script disabled */
|
||||
|
||||
/* Until bug 1194856 is fixed, if you update this file you should also update
|
||||
the data: URL in nsLayoutStylesheetCache::NoScriptSheet(). */
|
||||
|
||||
noscript {
|
||||
display: none !important;
|
||||
}
|
||||
|
|
|
@ -198,7 +198,13 @@ nsLayoutStylesheetCache::NoScriptSheet()
|
|||
EnsureGlobal();
|
||||
|
||||
if (!gStyleCache->mNoScriptSheet) {
|
||||
LoadSheetURL("resource://gre-resources/noscript.css",
|
||||
// If you update the data: URL, also update noscript.css (See bug 1194856.)
|
||||
LoadSheetURL(
|
||||
#ifdef RELEASE_BUILD
|
||||
"data:text/css,noscript { display%3A none !important%3B }",
|
||||
#else
|
||||
"resource://gre-resources/noscript.css",
|
||||
#endif
|
||||
gStyleCache->mNoScriptSheet, true);
|
||||
}
|
||||
|
||||
|
@ -211,7 +217,14 @@ nsLayoutStylesheetCache::NoFramesSheet()
|
|||
EnsureGlobal();
|
||||
|
||||
if (!gStyleCache->mNoFramesSheet) {
|
||||
LoadSheetURL("resource://gre-resources/noframes.css",
|
||||
// If you update the data: URL, also update noframes.css (See bug 1194856.)
|
||||
LoadSheetURL(
|
||||
#ifdef RELEASE_BUILD
|
||||
"data:text/css,noframes { display%3A block%3B } "
|
||||
"frame%2C frameset%2C iframe { display%3A none !important%3B }",
|
||||
#else
|
||||
"resource://gre-resources/noframes.css",
|
||||
#endif
|
||||
gStyleCache->mNoFramesSheet, true);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче