/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * vim: ft=cpp tw=78 sw=2 et ts=2 * * 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/. * * This Original Code has been modified by IBM Corporation. * Modifications made by IBM described herein are Copyright (c) * International Business Machines Corporation, 2000. Modifications * to Mozilla code or documentation identified per MPL Section 3.3 * * Date Modified by Description of modification * 04/20/2000 IBM Corp. OS/2 VisualAge build. */ /* loading of CSS style sheets using the network APIs */ #include "mozilla/Util.h" #include "mozilla/css/Loader.h" #include "nsIRunnable.h" #include "nsIUnicharStreamLoader.h" #include "nsSyncLoadService.h" #include "nsCOMPtr.h" #include "nsCOMArray.h" #include "nsString.h" #include "nsIContent.h" #include "nsIDocument.h" #include "nsIDOMNode.h" #include "nsIDOMDocument.h" #include "nsIDOMWindow.h" #include "nsHashtable.h" #include "nsIURI.h" #include "nsIServiceManager.h" #include "nsNetUtil.h" #include "nsContentUtils.h" #include "nsCRT.h" #include "nsIScriptSecurityManager.h" #include "nsContentPolicyUtils.h" #include "nsIHttpChannel.h" #include "nsIScriptError.h" #include "nsMimeTypes.h" #include "nsIAtom.h" #include "nsCSSStyleSheet.h" #include "nsIStyleSheetLinkingElement.h" #include "nsICSSLoaderObserver.h" #include "nsCSSParser.h" #include "mozilla/css/ImportRule.h" #include "nsThreadUtils.h" #include "nsGkAtoms.h" #include "nsDocShellCID.h" #include "nsIThreadInternal.h" #include "nsCrossSiteListenerProxy.h" #ifdef MOZ_XUL #include "nsXULPrototypeCache.h" #endif #include "nsIMediaList.h" #include "nsIDOMStyleSheet.h" #include "nsIDOMCSSStyleSheet.h" #include "nsError.h" #include "nsIChannelPolicy.h" #include "nsIContentSecurityPolicy.h" #include "nsCycleCollectionParticipant.h" /** * OVERALL ARCHITECTURE * * The CSS Loader gets requests to load various sorts of style sheets: * inline style from