зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1519001 - Rename some style sheet accessors on nsLayoutStylesheetCache to indicate they can return null r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D16150 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
b73c2c6e9b
Коммит
8106cebcf9
|
@ -2497,7 +2497,7 @@ void ContentParent::InitInternal(ProcessPriority aInitialPriority) {
|
|||
|
||||
// Content processes have no permission to access profile directory, so we
|
||||
// send the file URL instead.
|
||||
StyleSheet* ucs = nsLayoutStylesheetCache::Singleton()->UserContentSheet();
|
||||
StyleSheet* ucs = nsLayoutStylesheetCache::Singleton()->GetUserContentSheet();
|
||||
if (ucs) {
|
||||
SerializeURI(ucs->GetSheetURI(), xpcomInit.userContentSheetURL());
|
||||
} else {
|
||||
|
|
|
@ -2299,12 +2299,9 @@ UniquePtr<ServoStyleSet> nsDocumentViewer::CreateStyleSet(Document* aDocument) {
|
|||
auto cache = nsLayoutStylesheetCache::Singleton();
|
||||
|
||||
// Handle the user sheets.
|
||||
StyleSheet* sheet = nullptr;
|
||||
if (nsContentUtils::IsInChromeDocshell(aDocument)) {
|
||||
sheet = cache->UserChromeSheet();
|
||||
} else {
|
||||
sheet = cache->UserContentSheet();
|
||||
}
|
||||
StyleSheet* sheet = nsContentUtils::IsInChromeDocshell(aDocument)
|
||||
? cache->GetUserChromeSheet()
|
||||
: cache->GetUserContentSheet();
|
||||
|
||||
if (sheet) {
|
||||
styleSet->AppendStyleSheet(SheetType::User, sheet);
|
||||
|
|
|
@ -59,11 +59,11 @@ nsresult nsLayoutStylesheetCache::Observe(nsISupports* aSubject,
|
|||
#include "mozilla/UserAgentStyleSheetList.h"
|
||||
#undef STYLE_SHEET
|
||||
|
||||
StyleSheet* nsLayoutStylesheetCache::UserContentSheet() {
|
||||
StyleSheet* nsLayoutStylesheetCache::GetUserContentSheet() {
|
||||
return mUserContentSheet;
|
||||
}
|
||||
|
||||
StyleSheet* nsLayoutStylesheetCache::UserChromeSheet() {
|
||||
StyleSheet* nsLayoutStylesheetCache::GetUserChromeSheet() {
|
||||
return mUserChromeSheet;
|
||||
}
|
||||
|
||||
|
|
|
@ -43,8 +43,8 @@ class nsLayoutStylesheetCache final : public nsIObserver,
|
|||
#include "mozilla/UserAgentStyleSheetList.h"
|
||||
#undef STYLE_SHEET
|
||||
|
||||
mozilla::StyleSheet* UserContentSheet();
|
||||
mozilla::StyleSheet* UserChromeSheet();
|
||||
mozilla::StyleSheet* GetUserContentSheet();
|
||||
mozilla::StyleSheet* GetUserChromeSheet();
|
||||
mozilla::StyleSheet* ChromePreferenceSheet(nsPresContext* aPresContext);
|
||||
mozilla::StyleSheet* ContentPreferenceSheet(nsPresContext* aPresContext);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче