Bug 801819. Remove nsIDOMCSS2Properties and the classinfo bits for CSS declarations. r=peterv,dbaron
This commit is contained in:
@@ -142,7 +142,6 @@
|
||||
#include "nsCSSRules.h"
|
||||
#include "nsIDOMStyleSheet.h"
|
||||
#include "nsIDOMStyleSheetList.h"
|
||||
#include "nsIDOMCSSStyleDeclaration.h"
|
||||
#include "nsIDOMCSSRule.h"
|
||||
#include "nsICSSRuleList.h"
|
||||
#include "nsIDOMRect.h"
|
||||
@@ -157,7 +156,6 @@
|
||||
#include "nsIFrame.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMCSSStyleDeclaration.h"
|
||||
#include "nsStyleContext.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsMemory.h"
|
||||
@@ -281,7 +279,6 @@
|
||||
#include "nsIDOMMediaStream.h"
|
||||
#endif
|
||||
#include "nsIDOMProgressEvent.h"
|
||||
#include "nsIDOMCSS2Properties.h"
|
||||
#include "nsIDOMCSSCharsetRule.h"
|
||||
#include "nsIDOMCSSImportRule.h"
|
||||
#include "nsIDOMCSSMediaRule.h"
|
||||
@@ -1032,8 +1029,6 @@ static nsDOMClassInfoData sClassInfoData[] = {
|
||||
ARRAY_SCRIPTABLE_FLAGS)
|
||||
NS_DEFINE_CLASSINFO_DATA(CSSStyleSheet, nsDOMGenericSH,
|
||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||
NS_DEFINE_CLASSINFO_DATA(CSSStyleDeclaration, nsCSSStyleDeclSH,
|
||||
ARRAY_SCRIPTABLE_FLAGS)
|
||||
NS_DEFINE_CLASSINFO_DATA(ROCSSPrimitiveValue, nsDOMGenericSH,
|
||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||
|
||||
@@ -1527,8 +1522,6 @@ static nsDOMClassInfoData sClassInfoData[] = {
|
||||
|
||||
NS_DEFINE_CLASSINFO_DATA(CSSFontFaceRule, nsDOMGenericSH,
|
||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||
NS_DEFINE_CLASSINFO_DATA(CSSFontFaceStyleDecl, nsCSSStyleDeclSH,
|
||||
ARRAY_SCRIPTABLE_FLAGS)
|
||||
|
||||
#if defined(MOZ_MEDIA)
|
||||
NS_DEFINE_CLASSINFO_DATA(HTMLVideoElement, nsElementSH,
|
||||
@@ -3039,11 +3032,6 @@ nsDOMClassInfo::Init()
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSStyleSheet)
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
DOM_CLASSINFO_MAP_BEGIN(CSSStyleDeclaration, nsIDOMCSSStyleDeclaration)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSStyleDeclaration)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSS2Properties)
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(ROCSSPrimitiveValue,
|
||||
nsIDOMCSSPrimitiveValue)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSPrimitiveValue)
|
||||
@@ -4124,11 +4112,6 @@ nsDOMClassInfo::Init()
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSFontFaceRule)
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(CSSFontFaceStyleDecl,
|
||||
nsIDOMCSSStyleDeclaration)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSStyleDeclaration)
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
#if defined (MOZ_MEDIA)
|
||||
DOM_CLASSINFO_MAP_BEGIN(HTMLVideoElement, nsIDOMHTMLVideoElement)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLVideoElement)
|
||||
@@ -10314,54 +10297,6 @@ nsCSSValueListSH::GetItemAt(nsISupports *aNative, uint32_t aIndex,
|
||||
return list->GetItemAt(aIndex);
|
||||
}
|
||||
|
||||
|
||||
// CSSStyleDeclaration helper
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsCSSStyleDeclSH::PreCreate(nsISupports *nativeObj, JSContext *cx,
|
||||
JSObject *globalObj, JSObject **parentObj)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
nsWrapperCache* cache = nullptr;
|
||||
CallQueryInterface(nativeObj, &cache);
|
||||
MOZ_ASSERT(cache, "All CSS declarations must be wrappercached");
|
||||
#endif
|
||||
|
||||
nsICSSDeclaration *declaration = static_cast<nsICSSDeclaration*>(nativeObj);
|
||||
nsINode *native_parent = declaration->GetParentObject();
|
||||
if (!native_parent) {
|
||||
return nsDOMClassInfo::PreCreate(nativeObj, cx, globalObj, parentObj);
|
||||
}
|
||||
|
||||
nsresult rv =
|
||||
WrapNativeParent(cx, globalObj, native_parent, parentObj);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
return NS_SUCCESS_ALLOW_SLIM_WRAPPERS;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsCSSStyleDeclSH::GetStringAt(nsISupports *aNative, int32_t aIndex,
|
||||
nsAString& aResult)
|
||||
{
|
||||
if (aIndex < 0) {
|
||||
return NS_ERROR_DOM_INDEX_SIZE_ERR;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMCSSStyleDeclaration> style_decl(do_QueryInterface(aNative));
|
||||
|
||||
nsresult rv = style_decl->Item(uint32_t(aIndex), aResult);
|
||||
#ifdef DEBUG
|
||||
if (DOMStringIsNull(aResult)) {
|
||||
uint32_t length = 0;
|
||||
style_decl->GetLength(&length);
|
||||
NS_ASSERTION(uint32_t(aIndex) >= length, "Item should only return null for out-of-bounds access");
|
||||
}
|
||||
#endif
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
// CSSRuleList scriptable helper
|
||||
|
||||
nsISupports*
|
||||
|
||||
@@ -1162,34 +1162,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// CSSStyleDeclaration helper
|
||||
|
||||
class nsCSSStyleDeclSH : public nsStringArraySH
|
||||
{
|
||||
protected:
|
||||
nsCSSStyleDeclSH(nsDOMClassInfoData* aData) : nsStringArraySH(aData)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~nsCSSStyleDeclSH()
|
||||
{
|
||||
}
|
||||
|
||||
virtual nsresult GetStringAt(nsISupports *aNative, int32_t aIndex,
|
||||
nsAString& aResult);
|
||||
|
||||
public:
|
||||
NS_IMETHOD PreCreate(nsISupports *nativeObj, JSContext *cx,
|
||||
JSObject *globalObj, JSObject **parentObj);
|
||||
|
||||
static nsIClassInfo *doCreate(nsDOMClassInfoData* aData)
|
||||
{
|
||||
return new nsCSSStyleDeclSH(aData);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// CSSRuleList helper
|
||||
|
||||
class nsCSSRuleListSH : public nsArraySH
|
||||
|
||||
@@ -130,7 +130,6 @@ DOMCI_CLASS(CSSGroupRuleRuleList)
|
||||
DOMCI_CLASS(MediaList)
|
||||
DOMCI_CLASS(StyleSheetList)
|
||||
DOMCI_CLASS(CSSStyleSheet)
|
||||
DOMCI_CLASS(CSSStyleDeclaration)
|
||||
DOMCI_CLASS(ROCSSPrimitiveValue)
|
||||
|
||||
// Range classes
|
||||
@@ -414,7 +413,6 @@ DOMCI_CLASS(DataErrorEvent)
|
||||
|
||||
// @font-face in CSS
|
||||
DOMCI_CLASS(CSSFontFaceRule)
|
||||
DOMCI_CLASS(CSSFontFaceStyleDecl)
|
||||
|
||||
#if defined(MOZ_MEDIA)
|
||||
// WhatWG Video Element
|
||||
|
||||
@@ -26,7 +26,6 @@ SDK_XPIDLSRCS = \
|
||||
$(NULL)
|
||||
|
||||
XPIDLSRCS = \
|
||||
nsIDOMCSS2Properties.idl \
|
||||
nsIDOMCSSCharsetRule.idl \
|
||||
nsIDOMCSSFontFaceRule.idl \
|
||||
nsIDOMCSSImportRule.idl \
|
||||
|
||||
@@ -1,832 +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 "domstubs.idl"
|
||||
|
||||
/**
|
||||
* The nsIDOMCSS2Properties interface is a datatype for additional
|
||||
* reflection of data already provided in nsIDOMCSSStyleDeclaration in
|
||||
* the Document Object Model.
|
||||
*
|
||||
* For more information on this interface please see
|
||||
* http://www.w3.org/TR/DOM-Level-2-Style
|
||||
*/
|
||||
|
||||
[builtinclass, scriptable, uuid(df3491fd-2243-427f-bd93-b0dd3c3e7834)]
|
||||
interface nsIDOMCSS2Properties : nsISupports
|
||||
{
|
||||
attribute DOMString background;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString backgroundAttachment;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString backgroundColor;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString backgroundImage;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString backgroundPosition;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString backgroundRepeat;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString border;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderCollapse;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderColor;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderSpacing;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderStyle;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderTop;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderRight;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderBottom;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderLeft;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderTopColor;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderRightColor;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderBottomColor;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderLeftColor;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderTopStyle;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderRightStyle;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderBottomStyle;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderLeftStyle;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderTopWidth;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderRightWidth;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderBottomWidth;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderLeftWidth;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderWidth;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderRadius;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderTopLeftRadius;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderTopRightRadius;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderBottomLeftRadius;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderBottomRightRadius;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString bottom;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString boxShadow;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString captionSide;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString clear;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString clip;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString color;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString content;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString counterIncrement;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString counterReset;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString cursor;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString direction;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString display;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString emptyCells;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString cssFloat;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString font;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString fontFamily;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString fontSize;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString fontSizeAdjust;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString fontStretch;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString fontStyle;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString fontVariant;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString fontWeight;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString height;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString left;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString letterSpacing;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString lineHeight;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString listStyle;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString listStyleImage;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString listStylePosition;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString listStyleType;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString margin;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString marginTop;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString marginRight;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString marginBottom;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString marginLeft;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString markerOffset;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString marks;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString maxHeight;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString maxWidth;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString minHeight;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString minWidth;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString orphans;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString outline;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString outlineColor;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString outlineStyle;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString outlineWidth;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString overflow;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString padding;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString paddingTop;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString paddingRight;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString paddingBottom;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString paddingLeft;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString page;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString pageBreakAfter;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString pageBreakBefore;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString pageBreakInside;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString position;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString quotes;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString right;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString size;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString tableLayout;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString textAlign;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString textDecoration;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString textIndent;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString textOverflow;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString textShadow;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString textTransform;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString top;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString unicodeBidi;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString verticalAlign;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString visibility;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString whiteSpace;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString widows;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString width;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString wordSpacing;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString zIndex;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
/* SVG CSS properties */
|
||||
attribute DOMString clipPath;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString clipRule;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString colorInterpolation;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString colorInterpolationFilters;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString dominantBaseline;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString fill;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString fillOpacity;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString fillRule;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString filter;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString floodColor;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString floodOpacity;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString imageRendering;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString lightingColor;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString marker;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString markerEnd;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString markerMid;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString markerStart;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString mask;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString shapeRendering;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString stopColor;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString stopOpacity;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString stroke;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString strokeDasharray;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString strokeDashoffset;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString strokeLinecap;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString strokeLinejoin;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString strokeMiterlimit;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString strokeOpacity;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString strokeWidth;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString textAnchor;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString textRendering;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString vectorEffect;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
/* Non-DOM 2 extensions */
|
||||
|
||||
/* Mozilla extension CSS properties */
|
||||
attribute DOMString MozAppearance;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString backgroundClip;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozBackgroundInlinePolicy;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString backgroundOrigin;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozBinding;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozBorderBottomColors;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozBorderLeftColors;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozBorderRightColors;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozBorderTopColors;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozBoxAlign;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozBoxDirection;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozBoxFlex;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozBoxOrient;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozBoxOrdinalGroup;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozBoxPack;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozBoxSizing;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozColumnCount;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozColumnWidth;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozColumnFill;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozColumnGap;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozFloatEdge;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozFontFeatureSettings;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozFontLanguageOverride;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozForceBrokenImageIcon;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozImageRegion;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozMarginEnd;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozMarginStart;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozOrient;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozOutlineRadius;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozOutlineRadiusTopleft;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozOutlineRadiusTopright;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozOutlineRadiusBottomleft;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozOutlineRadiusBottomright;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozPaddingEnd;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozPaddingStart;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozUserFocus;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozUserInput;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozUserModify;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozUserSelect;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
/* CSS3 properties */
|
||||
attribute DOMString opacity;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString outlineOffset;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozTextAlignLast;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
/* Mozilla extensions */
|
||||
attribute DOMString overflowX;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString overflowY;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString imeMode;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozBorderEnd;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozBorderEndColor;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozBorderEndStyle;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozBorderEndWidth;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozBorderStart;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozBorderStartColor;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozBorderStartStyle;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozBorderStartWidth;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozStackSizing;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderImage;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozColumns;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozColumnRule;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozColumnRuleWidth;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozColumnRuleStyle;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozColumnRuleColor;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString wordBreak;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString wordWrap;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozHyphens;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString transform;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString transformOrigin;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString perspective;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString perspectiveOrigin;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString backfaceVisibility;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString transformStyle;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozTransform;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozTransformOrigin;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozPerspective;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozPerspectiveOrigin;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozBackfaceVisibility;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozTransformStyle;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozWindowShadow;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString backgroundSize;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozTextBlink;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozTextDecorationColor;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozTextDecorationLine;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozTextDecorationStyle;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString transitionProperty;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString transitionDuration;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString transitionDelay;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString transitionTimingFunction;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString transition;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozTransitionProperty;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozTransitionDuration;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozTransitionDelay;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozTransitionTimingFunction;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozTransition;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString pointerEvents;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozTabSize;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString resize;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString animationName;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString animationDuration;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString animationDelay;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString animationTimingFunction;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString animationDirection;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString animationFillMode;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString animationIterationCount;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString animationPlayState;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString animation;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozAnimationName;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozAnimationDuration;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozAnimationDelay;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozAnimationTimingFunction;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozAnimationDirection;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozAnimationFillMode;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozAnimationIterationCount;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozAnimationPlayState;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozAnimation;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozTextSizeAdjust;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderImageSource;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderImageSlice;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderImageWidth;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderImageOutset;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString borderImageRepeat;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozBorderImage;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString alignItems;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString alignSelf;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString flex;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString flexBasis;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString flexDirection;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString flexGrow;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString flexShrink;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString order;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString justifyContent;
|
||||
// raises(DOMException) on setting
|
||||
};
|
||||
@@ -141,9 +141,7 @@ members = [
|
||||
|
||||
# dom/interfaces/css
|
||||
'nsIDOMElementCSSInlineStyle.*',
|
||||
'nsIDOMCSS2Properties.*',
|
||||
'nsIDOMRect.*',
|
||||
'nsIDOMCSSStyleDeclaration.*',
|
||||
|
||||
# dom/interfaces/events
|
||||
'nsIDOMEventTarget.addEventListener',
|
||||
@@ -665,15 +663,6 @@ customMethodCalls = {
|
||||
'nsIDOMStorage_Clear': {
|
||||
'code': nsIDOMStorage_Clear_customMethodCallCode
|
||||
},
|
||||
'nsIDOMCSS2Properties_': {
|
||||
'thisType': 'nsICSSDeclaration',
|
||||
'additionalArguments': 'const nsCSSProperty prop',
|
||||
'additionalArgumentValues': 'QS_CSS_PROP_%s',
|
||||
'getter_code': ' nsString result;\n' +
|
||||
' rv = self->GetPropertyValue(prop, result);',
|
||||
'setter_code': ' rv = self->SetPropertyValue(prop, arg0);',
|
||||
'canFail': True
|
||||
},
|
||||
'nsIDOMElement_GetScrollTop': {
|
||||
'thisType': 'nsGenericElement',
|
||||
'code': ' int32_t result = self->GetScrollTop();',
|
||||
|
||||
@@ -452,20 +452,11 @@ to the style struct:<br>
|
||||
<h3><a name="DOM">DOM</a></h3>
|
||||
Users in scripts, or anywhere outside of layout/ or content/ may need to access
|
||||
the new property. This is done using the CSS OM, specifically
|
||||
<code>nsIDOMCSSStyleDeclaration</code> and <code>nsIDOMCSS2Properties</code>.
|
||||
<code>nsIDOMCSSStyleDeclaration</code> and <code>CSS2Properties</code>.
|
||||
By the magic of C++ pre-processing, the
|
||||
CSS2Properties interfaces will be implemented automatically when you
|
||||
CSS2Properties bits will be implemented automatically when you
|
||||
<a href="#CSSPropList">add your property</a> to <a href="http://lxr.mozilla.org/seamonkey/source/content/shared/public/nsCSSPropList.h">
|
||||
nsCSSPropList.h</a>. Because of this, if you fail to add your property to the
|
||||
DOM interface, you will be rewarded with compiler errors. All you have to do
|
||||
is modify <a href="http://lxr.mozilla.org/mozilla/source/dom/public/idl/css/nsIDOMCSS2Properties.idl">
|
||||
nsIDOMCSS2Properties.idl</a> and add the appropriate attribute to the
|
||||
<code>nsIDOMNSCSS2Properties</code> interface (lower in the file).
|
||||
For example:<br>
|
||||
<pre> attribute DOMString MozForceBrokenImageIcon;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
</pre>
|
||||
nsCSSPropList.h</a>.
|
||||
<h3><a name="Layout">Layout</a></h3>
|
||||
OK, finally the style system is supporting the new property. It is time to
|
||||
actually make use of it now.<br>
|
||||
|
||||
@@ -1437,8 +1437,6 @@ nsCSSFontFaceStyleDecl::Fields[] = {
|
||||
#undef CSS_FONT_DESC
|
||||
};
|
||||
|
||||
DOMCI_DATA(CSSFontFaceStyleDecl, nsCSSFontFaceStyleDecl)
|
||||
|
||||
// QueryInterface implementation for nsCSSFontFaceStyleDecl
|
||||
NS_INTERFACE_MAP_BEGIN(nsCSSFontFaceStyleDecl)
|
||||
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
||||
@@ -1452,7 +1450,6 @@ NS_INTERFACE_MAP_BEGIN(nsCSSFontFaceStyleDecl)
|
||||
return ContainingRule()->QueryInterface(aIID, aInstancePtr);
|
||||
}
|
||||
else
|
||||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(CSSFontFaceStyleDecl)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
NS_IMPL_ADDREF_USING_AGGREGATOR(nsCSSFontFaceStyleDecl, ContainingRule())
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
|
||||
#include "nsError.h"
|
||||
#include "nsDOMString.h"
|
||||
#include "nsIDOMCSS2Properties.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMCSSPrimitiveValue.h"
|
||||
#include "nsStyleContext.h"
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include "nsIURL.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsIPrincipal.h"
|
||||
#include "nsDOMClassInfoID.h"
|
||||
#include "mozAutoDocUpdate.h"
|
||||
|
||||
namespace css = mozilla::css;
|
||||
@@ -27,15 +26,11 @@ nsDOMCSSDeclaration::~nsDOMCSSDeclaration()
|
||||
{
|
||||
}
|
||||
|
||||
DOMCI_DATA(CSSStyleDeclaration, nsDOMCSSDeclaration)
|
||||
|
||||
NS_INTERFACE_TABLE_HEAD(nsDOMCSSDeclaration)
|
||||
NS_INTERFACE_TABLE3(nsDOMCSSDeclaration,
|
||||
NS_INTERFACE_TABLE2(nsDOMCSSDeclaration,
|
||||
nsICSSDeclaration,
|
||||
nsIDOMCSSStyleDeclaration,
|
||||
nsIDOMCSS2Properties)
|
||||
nsIDOMCSSStyleDeclaration)
|
||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
||||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(CSSStyleDeclaration)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
NS_IMETHODIMP
|
||||
@@ -303,35 +298,3 @@ nsDOMCSSDeclaration::RemoveProperty(const nsCSSProperty aPropID)
|
||||
decl->RemoveProperty(aPropID);
|
||||
return SetCSSDeclaration(decl);
|
||||
}
|
||||
|
||||
// nsIDOMCSS2Properties
|
||||
|
||||
#define CSS_PROP_DOMPROP_PREFIXED(prop_) Moz ## prop_
|
||||
#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \
|
||||
kwtable_, stylestruct_, stylestructoffset_, animtype_) \
|
||||
NS_IMETHODIMP \
|
||||
nsDOMCSSDeclaration::Get##method_(nsAString& aValue) \
|
||||
{ \
|
||||
return GetPropertyValue(eCSSProperty_##id_, aValue); \
|
||||
} \
|
||||
\
|
||||
NS_IMETHODIMP \
|
||||
nsDOMCSSDeclaration::Set##method_(const nsAString& aValue) \
|
||||
{ \
|
||||
return SetPropertyValue(eCSSProperty_##id_, aValue); \
|
||||
}
|
||||
|
||||
#define CSS_PROP_LIST_EXCLUDE_INTERNAL
|
||||
#define CSS_PROP_SHORTHAND(name_, id_, method_, flags_, pref_) \
|
||||
CSS_PROP(name_, id_, method_, flags_, pref_, X, X, X, X, X)
|
||||
#include "nsCSSPropList.h"
|
||||
|
||||
#define CSS_PROP_ALIAS(aliasname_, propid_, aliasmethod_, pref_) \
|
||||
CSS_PROP(X, propid_, aliasmethod_, X, pref_, X, X, X, X, X)
|
||||
#include "nsCSSPropAliasList.h"
|
||||
#undef CSS_PROP_ALIAS
|
||||
|
||||
#undef CSS_PROP_SHORTHAND
|
||||
#undef CSS_PROP_LIST_EXCLUDE_INTERNAL
|
||||
#undef CSS_PROP
|
||||
#undef CSS_PROP_DOMPROP_PREFIXED
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsICSSDeclaration.h"
|
||||
#include "nsIDOMCSS2Properties.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "mozilla/dom/CSS2PropertiesBinding.h"
|
||||
|
||||
@@ -27,8 +26,7 @@ class Rule;
|
||||
}
|
||||
}
|
||||
|
||||
class nsDOMCSSDeclaration : public nsICSSDeclaration,
|
||||
public nsIDOMCSS2Properties
|
||||
class nsDOMCSSDeclaration : public nsICSSDeclaration
|
||||
{
|
||||
public:
|
||||
// Only implement QueryInterface; subclasses have the responsibility
|
||||
@@ -61,10 +59,6 @@ public:
|
||||
NS_IMETHOD GetLength(uint32_t *aLength) MOZ_OVERRIDE;
|
||||
NS_IMETHOD GetParentRule(nsIDOMCSSRule * *aParentRule) MOZ_OVERRIDE = 0;
|
||||
|
||||
// We implement this as a shim which forwards to GetPropertyValue
|
||||
// and SetPropertyValue; subclasses need not.
|
||||
NS_DECL_NSIDOMCSS2PROPERTIES
|
||||
|
||||
// WebIDL interface for CSS2Properties
|
||||
#define CSS_PROP_DOMPROP_PREFIXED(prop_) Moz ## prop_
|
||||
#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \
|
||||
|
||||
Reference in New Issue
Block a user