diff --git a/mozilla/browser/base/content/browser.js b/mozilla/browser/base/content/browser.js
index 40ae5a9568c..0c5e2260ff1 100644
--- a/mozilla/browser/base/content/browser.js
+++ b/mozilla/browser/base/content/browser.js
@@ -5231,7 +5231,7 @@ function ShowWindowFromResource( node )
#endif
#ifdef SHOW_ALT_SS_UI
-/* Begin Page Theme Functions */
+/* Begin Page Style Functions */
function getStyleSheetArray(frame)
{
var styleSheets = frame.document.styleSheets;
@@ -5254,19 +5254,17 @@ function getAllStyleSheets(frameset)
function stylesheetFillPopup(menuPopup)
{
- var plainStyle = menuPopup.firstChild;
- var normalStyle = plainStyle.nextSibling;
- var sep = normalStyle.nextSibling;
+ var noStyle = menuPopup.firstChild;
+ var persistentOnly = noStyle.nextSibling;
+ var sep = persistentOnly.nextSibling;
while (sep.nextSibling)
menuPopup.removeChild(sep.nextSibling);
- var noOptionalStyles = true;
var styleSheets = getAllStyleSheets(window._content);
var currentStyleSheets = [];
-
- var allDisabled = true;
+ var styleDisabled = getMarkupDocumentViewer().authorStyleDisabled;
var haveAltSheets = false;
- var haveAnyNonAltSheets = false;
+ var altStyleSelected = false;
for (var i = 0; i < styleSheets.length; ++i) {
var currentStyleSheet = styleSheets[i];
@@ -5276,12 +5274,9 @@ function stylesheetFillPopup(menuPopup)
if (media && (media.indexOf("screen") == -1) && (media.indexOf("all") == -1))
continue;
- if (!currentStyleSheet.disabled)
- allDisabled = false;
-
if (currentStyleSheet.title) {
if (!currentStyleSheet.disabled)
- noOptionalStyles = false;
+ altStyleSelected = true;
haveAltSheets = true;
@@ -5294,7 +5289,7 @@ function stylesheetFillPopup(menuPopup)
menuItem.setAttribute("type", "radio");
menuItem.setAttribute("label", currentStyleSheet.title);
menuItem.setAttribute("data", currentStyleSheet.title);
- menuItem.setAttribute("checked", !currentStyleSheet.disabled);
+ menuItem.setAttribute("checked", !currentStyleSheet.disabled && !styleDisabled);
menuPopup.appendChild(menuItem);
currentStyleSheets[currentStyleSheet.title] = menuItem;
} else {
@@ -5302,15 +5297,13 @@ function stylesheetFillPopup(menuPopup)
lastWithSameTitle.removeAttribute("checked");
}
}
- else
- haveAnyNonAltSheets = true;
}
- normalStyle.setAttribute("checked", noOptionalStyles && (!haveAnyNonAltSheets || !allDisabled));
- plainStyle.setAttribute("checked", allDisabled && haveAnyNonAltSheets);
-
- plainStyle.hidden = !haveAnyNonAltSheets;
+ noStyle.setAttribute("checked", styleDisabled);
+ persistentOnly.setAttribute("checked", !altStyleSelected && !styleDisabled);
+ persistentOnly.hidden = (window._content.document.preferredStylesheetSet) ? true : false;
sep.hidden = !haveAltSheets;
+ return true;
}
function stylesheetInFrame(frame, title) {
@@ -5347,6 +5340,10 @@ function stylesheetSwitchAll(frameset, title) {
}
}
+function setStyleDisabled(disabled) {
+ getMarkupDocumentViewer().authorStyleDisabled = disabled;
+}
+
function updatePageTheme(evt)
{
// XXX - Accessing window._content.document can generate an
diff --git a/mozilla/browser/base/content/browser.xul b/mozilla/browser/base/content/browser.xul
index c4b0ed3c87e..3a3a7204cc4 100644
--- a/mozilla/browser/base/content/browser.xul
+++ b/mozilla/browser/base/content/browser.xul
@@ -459,11 +459,12 @@
#ifdef SHOW_ALT_SS_UI
diff --git a/mozilla/browser/locales/en-US/chrome/browser/browser.dtd b/mozilla/browser/locales/en-US/chrome/browser/browser.dtd
index b44200f1f7a..71c1050afe9 100644
--- a/mozilla/browser/locales/en-US/chrome/browser/browser.dtd
+++ b/mozilla/browser/locales/en-US/chrome/browser/browser.dtd
@@ -320,13 +320,15 @@
-
-
-
-
-
+
+
+
+
+
+
+
-
+
diff --git a/mozilla/content/base/src/nsDocument.cpp b/mozilla/content/base/src/nsDocument.cpp
index de85173b5e5..005b72080de 100644
--- a/mozilla/content/base/src/nsDocument.cpp
+++ b/mozilla/content/base/src/nsDocument.cpp
@@ -618,6 +618,7 @@ NS_INTERFACE_MAP_BEGIN(nsDocument)
NS_INTERFACE_MAP_ENTRY(nsIDOMDocumentEvent)
NS_INTERFACE_MAP_ENTRY(nsIDOM3DocumentEvent)
NS_INTERFACE_MAP_ENTRY(nsIDOMDocumentStyle)
+ NS_INTERFACE_MAP_ENTRY(nsIDOMNSDocumentStyle)
NS_INTERFACE_MAP_ENTRY(nsIDOMDocumentView)
NS_INTERFACE_MAP_ENTRY(nsIDOMDocumentRange)
NS_INTERFACE_MAP_ENTRY(nsIDOMDocumentTraversal)
@@ -2443,6 +2444,13 @@ nsDocument::GetStyleSheets(nsIDOMStyleSheetList** aStyleSheets)
return NS_OK;
}
+NS_IMETHODIMP
+nsDocument::GetPreferredStylesheetSet(nsAString& aStyleTitle)
+{
+ GetHeaderData(nsHTMLAtoms::headerDefaultStyle, aStyleTitle);
+ return NS_OK;
+}
+
NS_IMETHODIMP
nsDocument::GetCharacterSet(nsAString& aCharacterSet)
{
diff --git a/mozilla/content/base/src/nsDocument.h b/mozilla/content/base/src/nsDocument.h
index 92288220730..361fac0e0db 100644
--- a/mozilla/content/base/src/nsDocument.h
+++ b/mozilla/content/base/src/nsDocument.h
@@ -50,7 +50,7 @@
#include "nsIDOMDocumentView.h"
#include "nsIDOMDocumentXBL.h"
#include "nsIDOMNSDocument.h"
-#include "nsIDOMDocumentStyle.h"
+#include "nsIDOMNSDocumentStyle.h"
#include "nsIDOMDocumentRange.h"
#include "nsIDOMDocumentTraversal.h"
#include "nsStubDocumentObserver.h"
@@ -182,7 +182,7 @@ class nsDocument : public nsIDocument,
public nsIDOMNSDocument,
public nsIDOMDocumentEvent,
public nsIDOM3DocumentEvent,
- public nsIDOMDocumentStyle,
+ public nsIDOMNSDocumentStyle,
public nsIDOMDocumentView,
public nsIDOMDocumentRange,
public nsIDOMDocumentTraversal,
@@ -462,6 +462,9 @@ public:
// nsIDOMDocumentStyle
NS_DECL_NSIDOMDOCUMENTSTYLE
+ // nsIDOMNSDocumentStyle
+ NS_DECL_NSIDOMNSDOCUMENTSTYLE
+
// nsIDOMDocumentView
NS_DECL_NSIDOMDOCUMENTVIEW
diff --git a/mozilla/content/base/src/nsDocumentViewer.cpp b/mozilla/content/base/src/nsDocumentViewer.cpp
index 436a9dcbd2f..ba2825038ef 100644
--- a/mozilla/content/base/src/nsDocumentViewer.cpp
+++ b/mozilla/content/base/src/nsDocumentViewer.cpp
@@ -2395,6 +2395,33 @@ NS_IMETHODIMP DocumentViewerImpl::GetTextZoom(float* aTextZoom)
return NS_OK;
}
+static void
+SetChildAuthorStyleDisabled(nsIMarkupDocumentViewer* aChild, void* aClosure)
+{
+ PRBool styleDisabled = *NS_STATIC_CAST(PRBool*, aClosure);
+ aChild->SetAuthorStyleDisabled(styleDisabled);
+}
+
+NS_IMETHODIMP
+DocumentViewerImpl::SetAuthorStyleDisabled(PRBool aStyleDisabled)
+{
+ if (mPresShell) {
+ nsresult rv = mPresShell->SetAuthorStyleDisabled(aStyleDisabled);
+ if (NS_FAILED(rv)) return rv;
+ }
+ return CallChildren(SetChildAuthorStyleDisabled, &aStyleDisabled);
+}
+
+NS_IMETHODIMP
+DocumentViewerImpl::GetAuthorStyleDisabled(PRBool* aStyleDisabled)
+{
+ *aStyleDisabled = PR_FALSE;
+ if (mPresShell) {
+ return mPresShell->GetAuthorStyleDisabled(aStyleDisabled);
+ }
+ return NS_OK;
+}
+
// XXX: SEMANTIC CHANGE!
// returns a copy of the string. Caller is responsible for freeing result
// using Recycle(aDefaultCharacterSet)
diff --git a/mozilla/content/base/src/nsStyleSet.cpp b/mozilla/content/base/src/nsStyleSet.cpp
index d0605336886..bceee0c570a 100644
--- a/mozilla/content/base/src/nsStyleSet.cpp
+++ b/mozilla/content/base/src/nsStyleSet.cpp
@@ -57,6 +57,7 @@ nsStyleSet::nsStyleSet()
mDestroyedCount(0),
mBatching(0),
mInShutdown(PR_FALSE),
+ mAuthorStyleDisabled(PR_FALSE),
mDirty(0)
{
}
@@ -123,6 +124,10 @@ nsresult
nsStyleSet::GatherRuleProcessors(PRInt32 aType)
{
mRuleProcessors[aType].Clear();
+ if (mAuthorStyleDisabled && aType == eDocSheet) {
+ //don't regather if this level is disabled
+ return NS_OK;
+ }
if (mSheets[aType].Count()) {
RuleProcessorEnumData data(&mRuleProcessors[aType]);
if (!mSheets[aType].EnumerateBackwards(EnumRuleProcessor, &data))
@@ -207,6 +212,24 @@ nsStyleSet::ReplaceSheets(sheetType aType,
return NS_OK;
}
+PRBool
+nsStyleSet::GetAuthorStyleDisabled()
+{
+ return mAuthorStyleDisabled;
+}
+
+nsresult
+nsStyleSet::SetAuthorStyleDisabled(PRBool aStyleDisabled)
+{
+ if (aStyleDisabled == !mAuthorStyleDisabled) {
+ mAuthorStyleDisabled = aStyleDisabled;
+ BeginUpdate();
+ mDirty |= 1 << eDocSheet;
+ return EndUpdate();
+ }
+ return NS_OK;
+}
+
// -------- Doc Sheets
nsresult
diff --git a/mozilla/content/base/src/nsStyleSet.h b/mozilla/content/base/src/nsStyleSet.h
index 11b51b3f257..84f9f5b70cb 100644
--- a/mozilla/content/base/src/nsStyleSet.h
+++ b/mozilla/content/base/src/nsStyleSet.h
@@ -167,6 +167,10 @@ class nsStyleSet
nsresult ReplaceSheets(sheetType aType,
const nsCOMArray &aNewSheets);
+ //Enable/Disable entire author style level (Doc & PresHint levels)
+ PRBool GetAuthorStyleDisabled();
+ nsresult SetAuthorStyleDisabled(PRBool aStyleDisabled);
+
PRInt32 SheetCount(sheetType aType) const {
return mSheets[aType].Count();
}
@@ -238,6 +242,7 @@ class nsStyleSet
PRUint16 mBatching;
unsigned mInShutdown : 1;
+ unsigned mAuthorStyleDisabled: 1;
unsigned mDirty : 7; // one dirty bit is used per sheet type
};
diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp
index 9660d79cb9a..e29dbb5f34e 100644
--- a/mozilla/docshell/base/nsDocShell.cpp
+++ b/mozilla/docshell/base/nsDocShell.cpp
@@ -2093,7 +2093,7 @@ nsDocShell::AddChild(nsIDocShellTreeItem * aChild)
if (!childAsDocShell)
return NS_OK;
- // charset and zoom will be inherited in SetupNewViewer()
+ // charset, style-disabling, and zoom will be inherited in SetupNewViewer()
// Now take this document's charset and set the parentCharset field of the
// child's DocumentCharsetInfo to it. We'll later use that field, in the
@@ -4705,6 +4705,7 @@ nsDocShell::SetupNewViewer(nsIContentViewer * aNewViewer)
PRInt32 hintCharsetSource;
nsCAutoString prevDocCharset;
float textZoom;
+ PRBool styleDisabled;
// |newMUDV| also serves as a flag to set the data from the above vars
nsCOMPtr newMUDV;
@@ -4743,6 +4744,9 @@ nsDocShell::SetupNewViewer(nsIContentViewer * aNewViewer)
NS_ENSURE_SUCCESS(oldMUDV->
GetTextZoom(&textZoom),
NS_ERROR_FAILURE);
+ NS_ENSURE_SUCCESS(oldMUDV->
+ GetAuthorStyleDisabled(&styleDisabled),
+ NS_ERROR_FAILURE);
NS_ENSURE_SUCCESS(oldMUDV->
GetPrevDocCharacterSet(prevDocCharset),
NS_ERROR_FAILURE);
@@ -4874,6 +4878,8 @@ nsDocShell::SetupNewViewer(nsIContentViewer * aNewViewer)
NS_ERROR_FAILURE);
NS_ENSURE_SUCCESS(newMUDV->SetTextZoom(textZoom),
NS_ERROR_FAILURE);
+ NS_ENSURE_SUCCESS(newMUDV->SetAuthorStyleDisabled(styleDisabled),
+ NS_ERROR_FAILURE);
}
// End copying block (Don't mess with the old content/document viewer
diff --git a/mozilla/docshell/base/nsIMarkupDocumentViewer.idl b/mozilla/docshell/base/nsIMarkupDocumentViewer.idl
index 92751c321ec..5c64490667e 100644
--- a/mozilla/docshell/base/nsIMarkupDocumentViewer.idl
+++ b/mozilla/docshell/base/nsIMarkupDocumentViewer.idl
@@ -50,6 +50,9 @@ interface nsIMarkupDocumentViewer : nsISupports
/** The amount by which to scale all text. Default is 1.0. */
attribute float textZoom;
+ /** Disable entire author style level (including HTML presentation hints) */
+ attribute boolean authorStyleDisabled;
+
/*
XXX Comment here!
*/
diff --git a/mozilla/dom/public/idl/stylesheets/Makefile.in b/mozilla/dom/public/idl/stylesheets/Makefile.in
index f75b008b8f9..1f103ac6410 100644
--- a/mozilla/dom/public/idl/stylesheets/Makefile.in
+++ b/mozilla/dom/public/idl/stylesheets/Makefile.in
@@ -32,6 +32,7 @@ GRE_MODULE = 1
SDK_XPIDLSRCS = \
nsIDOMDocumentStyle.idl \
+ nsIDOMNSDocumentStyle.idl \
nsIDOMMediaList.idl \
nsIDOMStyleSheet.idl \
nsIDOMStyleSheetList.idl \
diff --git a/mozilla/dom/src/base/nsDOMClassInfo.cpp b/mozilla/dom/src/base/nsDOMClassInfo.cpp
index de4b4c87cdc..c19afe108fb 100644
--- a/mozilla/dom/src/base/nsDOMClassInfo.cpp
+++ b/mozilla/dom/src/base/nsDOMClassInfo.cpp
@@ -198,7 +198,7 @@
#include "nsIDOMMouseEvent.h"
#include "nsIDOMPopupBlockedEvent.h"
#include "nsIDOMMutationEvent.h"
-#include "nsIDOMDocumentStyle.h"
+#include "nsIDOMNSDocumentStyle.h"
#include "nsIDOMDocumentRange.h"
#include "nsIDOMDocumentTraversal.h"
#include "nsIDOMDocumentXBL.h"
@@ -1495,6 +1495,7 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSDocument)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentEvent)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentStyle)
+ DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSDocumentStyle)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentView)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentRange)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentTraversal)
@@ -1601,6 +1602,7 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSDocument)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentEvent)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentStyle)
+ DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSDocumentStyle)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentView)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentRange)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentTraversal)
@@ -2044,6 +2046,7 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentView)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentXBL)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentStyle)
+ DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSDocumentStyle)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentRange)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentTraversal)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
@@ -2140,6 +2143,7 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSDocument)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentEvent)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentStyle)
+ DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSDocumentStyle)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentView)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentRange)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentTraversal)
@@ -2190,6 +2194,7 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentView)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentXBL)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentStyle)
+ DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSDocumentStyle)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentRange)
DOM_CLASSINFO_MAP_END_WITH_XPATH
diff --git a/mozilla/layout/base/public/nsIPresShell.h b/mozilla/layout/base/public/nsIPresShell.h
index cc89c1c2787..561bd8e5c4a 100644
--- a/mozilla/layout/base/public/nsIPresShell.h
+++ b/mozilla/layout/base/public/nsIPresShell.h
@@ -176,6 +176,13 @@ public:
NS_IMETHOD SelectAlternateStyleSheet(const nsString& aSheetTitle) = 0;
+
+ /* Enable/disable author style level. Disabling author style disables the entire
+ * author level of the cascade, including the HTML preshint level.
+ */
+ NS_IMETHOD SetAuthorStyleDisabled(PRBool aStyleDisabled) = 0;
+ NS_IMETHOD GetAuthorStyleDisabled(PRBool* aStyleDisabled) = 0;
+
/*
* Called when stylesheets are added/removed/enabled/disabled to rebuild
* all style data for a given pres shell without necessarily reconstructing
diff --git a/mozilla/layout/html/base/src/nsPresShell.cpp b/mozilla/layout/html/base/src/nsPresShell.cpp
index 9e1b3abc548..f9d140beacb 100644
--- a/mozilla/layout/html/base/src/nsPresShell.cpp
+++ b/mozilla/layout/html/base/src/nsPresShell.cpp
@@ -1036,6 +1036,8 @@ public:
NS_IMETHOD GetActiveAlternateStyleSheet(nsString& aSheetTitle);
NS_IMETHOD SelectAlternateStyleSheet(const nsString& aSheetTitle);
NS_IMETHOD ListAlternateStyleSheets(nsStringArray& aTitleList);
+ NS_IMETHOD GetAuthorStyleDisabled(PRBool* aStyleDisabled);
+ NS_IMETHOD SetAuthorStyleDisabled(PRBool aStyleDisabled);
NS_IMETHOD ReconstructStyleData();
NS_IMETHOD SetPreferenceStyleRules(PRBool aForceReflow);
NS_IMETHOD EnablePrefStyleRules(PRBool aEnable, PRUint8 aPrefType=0xFF);
@@ -2074,6 +2076,23 @@ PresShell::ListAlternateStyleSheets(nsStringArray& aTitleList)
return NS_OK;
}
+NS_IMETHODIMP
+PresShell::SetAuthorStyleDisabled(PRBool aStyleDisabled)
+{
+ if (aStyleDisabled != mStyleSet->GetAuthorStyleDisabled()) {
+ nsresult rv = mStyleSet->SetAuthorStyleDisabled(aStyleDisabled);
+ if (NS_FAILED(rv)) return rv;
+ return ReconstructStyleData();
+ }
+ return NS_OK;
+}
+
+NS_IMETHODIMP
+PresShell::GetAuthorStyleDisabled(PRBool* aStyleDisabled)
+{
+ *aStyleDisabled = mStyleSet->GetAuthorStyleDisabled();
+ return NS_OK;
+}
NS_IMETHODIMP
PresShell::EnablePrefStyleRules(PRBool aEnable, PRUint8 aPrefType/*=0xFF*/)
diff --git a/mozilla/xpfe/browser/resources/content/navigator.js b/mozilla/xpfe/browser/resources/content/navigator.js
index 23d7aeb78b2..e8f88299462 100644
--- a/mozilla/xpfe/browser/resources/content/navigator.js
+++ b/mozilla/xpfe/browser/resources/content/navigator.js
@@ -1750,20 +1750,22 @@ function getAllStyleSheets(frameset)
function stylesheetFillPopup(menuPopup)
{
- var itemNoOptStyles = menuPopup.firstChild;
- while (itemNoOptStyles.nextSibling)
- menuPopup.removeChild(itemNoOptStyles.nextSibling);
+ /* Clear menu */
+ var itemPersistentOnly = menuPopup.firstChild.nextSibling;
+ while (itemPersistentOnly.nextSibling)
+ menuPopup.removeChild(itemPersistentOnly.nextSibling);
- var noOptionalStyles = true;
var styleSheets = getAllStyleSheets(window._content);
var currentStyleSheets = [];
+ var styleDisabled = getMarkupDocumentViewer().authorStyleDisabled;
+ var altStyleSelected = false;
for (var i = 0; i < styleSheets.length; ++i) {
var currentStyleSheet = styleSheets[i];
if (currentStyleSheet.title) {
if (!currentStyleSheet.disabled)
- noOptionalStyles = false;
+ altStyleSelected = true;
var lastWithSameTitle = null;
if (currentStyleSheet.title in currentStyleSheets)
@@ -1774,7 +1776,7 @@ function stylesheetFillPopup(menuPopup)
menuItem.setAttribute("type", "radio");
menuItem.setAttribute("label", currentStyleSheet.title);
menuItem.setAttribute("data", currentStyleSheet.title);
- menuItem.setAttribute("checked", !currentStyleSheet.disabled);
+ menuItem.setAttribute("checked", !currentStyleSheet.disabled && !styleDisabled);
menuPopup.appendChild(menuItem);
currentStyleSheets[currentStyleSheet.title] = menuItem;
} else {
@@ -1783,7 +1785,9 @@ function stylesheetFillPopup(menuPopup)
}
}
}
- itemNoOptStyles.setAttribute("checked", noOptionalStyles);
+ menuPopup.firstChild.setAttribute("checked", styleDisabled);
+ itemPersistentOnly.setAttribute("checked", !altStyleSelected && !styleDisabled);
+ itemPersistentOnly.hidden = (window._content.document.preferredStylesheetSet) ? true : false;
}
function stylesheetInFrame(frame, title) {
@@ -1818,6 +1822,10 @@ function stylesheetSwitchAll(frameset, title) {
}
}
+function setStyleDisabled(disabled) {
+ getMarkupDocumentViewer().authorStyleDisabled = disabled;
+}
+
function applyTheme(themeName)
{
var id = themeName.getAttribute('id');
diff --git a/mozilla/xpfe/browser/resources/content/navigatorOverlay.xul b/mozilla/xpfe/browser/resources/content/navigatorOverlay.xul
index 606dc05bfb3..fa7b6639d33 100644
--- a/mozilla/xpfe/browser/resources/content/navigatorOverlay.xul
+++ b/mozilla/xpfe/browser/resources/content/navigatorOverlay.xul
@@ -389,7 +389,9 @@
diff --git a/mozilla/xpfe/browser/resources/locale/en-US/navigator.dtd b/mozilla/xpfe/browser/resources/locale/en-US/navigator.dtd
index 5e6ac64c8e7..181edcd4240 100644
--- a/mozilla/xpfe/browser/resources/locale/en-US/navigator.dtd
+++ b/mozilla/xpfe/browser/resources/locale/en-US/navigator.dtd
@@ -60,8 +60,10 @@
-
-
+
+
+
+