mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 1427512 - Part 18: Remove nsIDOMCSSStyleSheet. r=xidorn,jryans,bz
MozReview-Commit-ID: CN3VZvQceZB
This commit is contained in:
parent
32554d99d3
commit
a4541d9b18
@ -1739,7 +1739,7 @@ DebuggerServer.ObjectActorPreviewers.Object = [
|
||||
|
||||
function ObjectWithURL({obj, hooks}, grip, rawObj) {
|
||||
if (isWorker || !rawObj || !(obj.class == "CSSImportRule" ||
|
||||
rawObj instanceof Ci.nsIDOMCSSStyleSheet ||
|
||||
obj.class == "CSSStyleSheet" ||
|
||||
obj.class == "Location" ||
|
||||
rawObj instanceof Ci.nsIDOMWindow)) {
|
||||
return false;
|
||||
|
@ -165,8 +165,8 @@ var PageStyleActor = protocol.ActorClassWithSpec(pageStyleSpec, {
|
||||
},
|
||||
|
||||
/**
|
||||
* Return or create a StyleSheetActor for the given nsIDOMCSSStyleSheet.
|
||||
* @param {DOMStyleSheet} sheet
|
||||
* Return or create a StyleSheetActor for the given CSSStyleSheet.
|
||||
* @param {CSSStyleSheet} sheet
|
||||
* The style sheet to create an actor for.
|
||||
* @return {StyleSheetActor}
|
||||
* The actor for this style sheet
|
||||
|
@ -65,7 +65,6 @@ interface nsIDOMHTMLHeadElement;
|
||||
interface nsIDOMCSSValue;
|
||||
interface nsIDOMCSSPrimitiveValue;
|
||||
interface nsIDOMCSSRuleList;
|
||||
interface nsIDOMCSSStyleSheet;
|
||||
interface nsIDOMCSSStyleDeclaration;
|
||||
interface nsIDOMCounter;
|
||||
interface nsIDOMRect;
|
||||
|
@ -12,7 +12,6 @@ XPIDL_SOURCES += [
|
||||
'nsIDOMCSSPrimitiveValue.idl',
|
||||
'nsIDOMCSSRuleList.idl',
|
||||
'nsIDOMCSSStyleDeclaration.idl',
|
||||
'nsIDOMCSSStyleSheet.idl',
|
||||
'nsIDOMCSSValue.idl',
|
||||
'nsIDOMCSSValueList.idl',
|
||||
'nsIDOMRect.idl',
|
||||
|
@ -1,26 +0,0 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 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/. */
|
||||
|
||||
#include "nsIDOMStyleSheet.idl"
|
||||
|
||||
/**
|
||||
* The nsIDOMCSSStyleSheet interface is a datatype for a CSS style
|
||||
* sheet in the Document Object Model.
|
||||
*
|
||||
* For more information on this interface please see
|
||||
* http://www.w3.org/TR/DOM-Level-2-Style
|
||||
*/
|
||||
|
||||
[uuid(a6cf90c2-15b3-11d2-932e-00805f8add32)]
|
||||
interface nsIDOMCSSStyleSheet : nsIDOMStyleSheet
|
||||
{
|
||||
readonly attribute nsIDOMCSSRuleList cssRules;
|
||||
|
||||
unsigned long insertRule(in DOMString rule,
|
||||
in unsigned long index)
|
||||
raises(DOMException);
|
||||
void deleteRule(in unsigned long index)
|
||||
raises(DOMException);
|
||||
};
|
@ -24,7 +24,6 @@
|
||||
#include "nsString.h"
|
||||
#include "nsStyleSet.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsIDOMCSSStyleSheet.h"
|
||||
#include "mozilla/dom/CSSRuleList.h"
|
||||
#include "nsIDOMMediaList.h"
|
||||
#include "nsIDOMNode.h"
|
||||
@ -435,7 +434,7 @@ CSSStyleSheet::TraverseInner(nsCycleCollectionTraversalCallback &cb)
|
||||
|
||||
// QueryInterface implementation for CSSStyleSheet
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(CSSStyleSheet)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMCSSStyleSheet)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMStyleSheet)
|
||||
if (aIID.Equals(NS_GET_IID(CSSStyleSheet)))
|
||||
foundInterface = reinterpret_cast<nsISupports*>(this);
|
||||
else
|
||||
|
@ -2600,7 +2600,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(Loader)
|
||||
!iter.Done();
|
||||
iter.Next()) {
|
||||
NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "Sheet cache nsCSSLoader");
|
||||
cb.NoteXPCOMChild(NS_ISUPPORTS_CAST(nsIDOMCSSStyleSheet*, iter.UserData()));
|
||||
cb.NoteXPCOMChild(NS_ISUPPORTS_CAST(nsIDOMStyleSheet*, iter.UserData()));
|
||||
}
|
||||
}
|
||||
nsTObserverArray<nsCOMPtr<nsICSSLoaderObserver>>::ForwardIterator
|
||||
|
@ -45,10 +45,10 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(ServoImportRule,
|
||||
// Note the child sheet twice, since the Servo rule also holds a strong
|
||||
// reference to it.
|
||||
NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mChildSheet");
|
||||
cb.NoteXPCOMChild(static_cast<nsIDOMCSSStyleSheet*>(tmp->mChildSheet));
|
||||
cb.NoteXPCOMChild(static_cast<nsIDOMStyleSheet*>(tmp->mChildSheet));
|
||||
MOZ_ASSERT_IF(tmp->mRawRule,
|
||||
Servo_ImportRule_GetSheet(tmp->mRawRule) == tmp->mChildSheet);
|
||||
cb.NoteXPCOMChild(static_cast<nsIDOMCSSStyleSheet*>(tmp->mChildSheet));
|
||||
cb.NoteXPCOMChild(static_cast<nsIDOMStyleSheet*>(tmp->mChildSheet));
|
||||
NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mRawRule.stylesheet");
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
|
||||
|
@ -21,7 +21,6 @@
|
||||
|
||||
|
||||
#include "mozAutoDocUpdate.h"
|
||||
#include "nsIDOMCSSStyleSheet.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
|
||||
@ -173,7 +172,7 @@ ServoStyleSheet::LastRelease()
|
||||
|
||||
// QueryInterface implementation for ServoStyleSheet
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(ServoStyleSheet)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMCSSStyleSheet)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMStyleSheet)
|
||||
if (aIID.Equals(NS_GET_IID(ServoStyleSheet)))
|
||||
foundInterface = reinterpret_cast<nsISupports*>(this);
|
||||
else
|
||||
|
@ -34,7 +34,6 @@
|
||||
#include "nsRuleProcessorData.h"
|
||||
|
||||
class nsIDOMCSSStyleDeclaration;
|
||||
class nsIDOMCSSStyleSheet;
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
|
@ -136,7 +136,7 @@ StyleSheet::TraverseInner(nsCycleCollectionTraversalCallback &cb)
|
||||
StyleSheet* childSheet = GetFirstChild();
|
||||
while (childSheet) {
|
||||
NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "child sheet");
|
||||
cb.NoteXPCOMChild(NS_ISUPPORTS_CAST(nsIDOMCSSStyleSheet*, childSheet));
|
||||
cb.NoteXPCOMChild(NS_ISUPPORTS_CAST(nsIDOMStyleSheet*, childSheet));
|
||||
childSheet = childSheet->mNext;
|
||||
}
|
||||
}
|
||||
@ -146,7 +146,6 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(StyleSheet)
|
||||
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
||||
NS_INTERFACE_MAP_ENTRY(nsICSSLoaderObserver)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMStyleSheet)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMCSSStyleSheet)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(StyleSheet)
|
||||
@ -385,34 +384,6 @@ StyleSheet::GetMedia(nsIDOMMediaList** aMedia)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
StyleSheet::GetCssRules(nsIDOMCSSRuleList** aCssRules)
|
||||
{
|
||||
ErrorResult rv;
|
||||
nsCOMPtr<nsIDOMCSSRuleList> rules =
|
||||
GetCssRules(*nsContentUtils::SubjectPrincipal(), rv);
|
||||
rules.forget(aCssRules);
|
||||
return rv.StealNSResult();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
StyleSheet::InsertRule(const nsAString& aRule, uint32_t aIndex,
|
||||
uint32_t* aReturn)
|
||||
{
|
||||
ErrorResult rv;
|
||||
*aReturn =
|
||||
InsertRule(aRule, aIndex, *nsContentUtils::SubjectPrincipal(), rv);
|
||||
return rv.StealNSResult();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
StyleSheet::DeleteRule(uint32_t aIndex)
|
||||
{
|
||||
ErrorResult rv;
|
||||
DeleteRule(aIndex, *nsContentUtils::SubjectPrincipal(), rv);
|
||||
return rv.StealNSResult();
|
||||
}
|
||||
|
||||
void
|
||||
StyleSheet::WillDirty()
|
||||
{
|
||||
|
@ -13,9 +13,8 @@
|
||||
#include "mozilla/StyleBackendType.h"
|
||||
#include "mozilla/CORSMode.h"
|
||||
#include "mozilla/ServoUtils.h"
|
||||
|
||||
#include "nsICSSLoaderObserver.h"
|
||||
#include "nsIDOMCSSStyleSheet.h"
|
||||
#include "nsIDOMStyleSheet.h"
|
||||
#include "nsWrapperCache.h"
|
||||
|
||||
class nsIDocument;
|
||||
@ -46,7 +45,7 @@ class Rule;
|
||||
/**
|
||||
* Superclass for data common to CSSStyleSheet and ServoStyleSheet.
|
||||
*/
|
||||
class StyleSheet : public nsIDOMCSSStyleSheet
|
||||
class StyleSheet : public nsIDOMStyleSheet
|
||||
, public nsICSSLoaderObserver
|
||||
, public nsWrapperCache
|
||||
{
|
||||
@ -62,7 +61,7 @@ protected:
|
||||
public:
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(StyleSheet,
|
||||
nsIDOMCSSStyleSheet)
|
||||
nsIDOMStyleSheet)
|
||||
|
||||
/**
|
||||
* The different changes that a stylesheet may go through.
|
||||
@ -248,12 +247,6 @@ public:
|
||||
NS_IMETHOD GetTitle(nsAString& aTitle) final;
|
||||
NS_IMETHOD GetMedia(nsIDOMMediaList** aMedia) final;
|
||||
|
||||
// nsIDOMCSSStyleSheet
|
||||
NS_IMETHOD GetCssRules(nsIDOMCSSRuleList** aCssRules) final;
|
||||
NS_IMETHOD InsertRule(const nsAString& aRule, uint32_t aIndex,
|
||||
uint32_t* aReturn) final;
|
||||
NS_IMETHOD DeleteRule(uint32_t aIndex) final;
|
||||
|
||||
// Changes to sheets should be inside of a WillDirty-DidDirty pair.
|
||||
// However, the calls do not need to be matched; it's ok to call
|
||||
// WillDirty and then make no change and skip the DidDirty call.
|
||||
|
@ -89,7 +89,7 @@ StyleSheet::GetParentObject() const
|
||||
if (mOwningNode) {
|
||||
return dom::ParentObject(mOwningNode);
|
||||
}
|
||||
return dom::ParentObject(static_cast<nsIDOMCSSStyleSheet*>(mParent), mParent);
|
||||
return dom::ParentObject(static_cast<nsIDOMStyleSheet*>(mParent), mParent);
|
||||
}
|
||||
|
||||
nsIPrincipal*
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include "nsCSSProps.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIDOMCSSStyleSheet.h"
|
||||
#include "nsMediaList.h"
|
||||
#include "mozilla/dom/CSSRuleList.h"
|
||||
#include "nsIDocument.h"
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include "nsIDOMComment.h"
|
||||
#include "nsIDOMCSSPrimitiveValue.h"
|
||||
#include "nsIDOMCSSStyleDeclaration.h"
|
||||
#include "nsIDOMCSSStyleSheet.h"
|
||||
#include "nsIDOMCSSValue.h"
|
||||
#include "nsIDOMCSSValueList.h"
|
||||
#include "nsIDOMCustomEvent.h"
|
||||
@ -265,7 +264,6 @@ const ComponentsInterfaceShimEntry kComponentsInterfaceShimMap[] =
|
||||
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIContainerBoxObject, ContainerBoxObject),
|
||||
DEFINE_SHIM(CSSPrimitiveValue),
|
||||
DEFINE_SHIM(CSSStyleDeclaration),
|
||||
DEFINE_SHIM(CSSStyleSheet),
|
||||
DEFINE_SHIM(CSSValue),
|
||||
DEFINE_SHIM(CSSValueList),
|
||||
DEFINE_SHIM(CustomEvent),
|
||||
|
Loading…
Reference in New Issue
Block a user