Merge m-c and birch.

This commit is contained in:
Ryan VanderMeulen 2013-07-01 08:15:19 -04:00
commit 5c4be83eff
236 changed files with 3678 additions and 1623 deletions

View File

@ -605,6 +605,9 @@
@BINPATH@/res/EditorOverride.css
@BINPATH@/res/contenteditable.css
@BINPATH@/res/designmode.css
@BINPATH@/res/ImageDocument.css
@BINPATH@/res/TopLevelImageDocument.css
@BINPATH@/res/TopLevelVideoDocument.css
@BINPATH@/res/table-add-column-after-active.gif
@BINPATH@/res/table-add-column-after-hover.gif
@BINPATH@/res/table-add-column-after.gif

View File

@ -7,7 +7,7 @@ function test() {
function testChromeless() {
// test a chromeless window
var newWin = openDialog(getBrowserURL(), "_blank",
"chrome,dialog=no,toolbar=no", "about:blank");
"chrome,dialog=no,location=yes,toolbar=no", "about:blank");
ok(newWin, "got new window");
whenDelayedStartupFinished(newWin, function () {

View File

@ -159,7 +159,7 @@
<field name="_formattingEnabled">true</field>
<method name="formatValue">
<body><![CDATA[
if (!this._formattingEnabled || this.focused || !this.editor)
if (!this._formattingEnabled || this.focused)
return;
let controller = this.editor.selectionController;

View File

@ -516,6 +516,41 @@ BrowserGlue.prototype = {
nb.PRIORITY_INFO_LOW, buttons);
},
/**
* Show a notification bar offering a reset if the profile has been unused for some time.
*/
_resetUnusedProfileNotification: function () {
let win = this.getMostRecentBrowserWindow();
if (!win)
return;
Cu.import("resource://gre/modules/ResetProfile.jsm");
if (!ResetProfile.resetSupported())
return;
let productName = Services.strings
.createBundle("chrome://branding/locale/brand.properties")
.GetStringFromName("brandShortName");
let resetBundle = Services.strings
.createBundle("chrome://global/locale/resetProfile.properties");
let message = resetBundle.formatStringFromName("resetUnusedProfile.message", [productName], 1);
let buttons = [
{
label: resetBundle.formatStringFromName("resetProfile.resetButton.label", [productName], 1),
accessKey: resetBundle.GetStringFromName("resetProfile.resetButton.accesskey"),
callback: function () {
ResetProfile.openConfirmationDialog(win);
}
},
];
let nb = win.document.getElementById("global-notificationbox");
nb.appendNotification(message, "reset-unused-profile",
"chrome://global/skin/icons/question-16.png",
nb.PRIORITY_INFO_LOW, buttons);
},
// the first browser window has finished initializing
_onFirstWindowLoaded: function BG__onFirstWindowLoaded() {
#ifdef XP_WIN
@ -530,6 +565,15 @@ BrowserGlue.prototype = {
#endif
this._trackSlowStartup();
// Offer to reset a user's profile if it hasn't been used for 60 days.
const OFFER_PROFILE_RESET_INTERVAL_MS = 60 * 24 * 60 * 60 * 1000;
let processStartupTime = Services.startup.getStartupInfo().process;
let lastUse = Services.appinfo.replacedLockTime;
if (processStartupTime && lastUse &&
processStartupTime.getTime() - lastUse >= OFFER_PROFILE_RESET_INTERVAL_MS) {
this._resetUnusedProfileNotification();
}
},
/**

View File

@ -4,7 +4,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/ForgetAboutSite.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "ForgetAboutSite",
"resource://gre/modules/ForgetAboutSite.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
"resource://gre/modules/NetUtil.jsm");

View File

@ -1,19 +0,0 @@
#
# 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/.
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DISABLED_EXTRA_COMPONENTS = \
nsSidebar.manifest \
nsSidebar.js \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@ -225,10 +225,7 @@
class="tabpanel-summary-container"
align="center">
<textbox id="custom-method-value"
oninput="NetMonitorView.CustomRequest.onUpdate('method');"
multiline="true"
cols="6"
rows="1"/>
oninput="NetMonitorView.CustomRequest.onUpdate('method');"/>
<textbox id="custom-url-value"
flex="1"
oninput="NetMonitorView.CustomRequest.onUpdate('url');"/>
@ -251,7 +248,7 @@
<textbox id="custom-headers-value"
class="tabpanel-summary-input"
multiline="true"
rows="6"
rows="8"
wrap="off"
oninput="NetMonitorView.CustomRequest.onUpdate('headers');"/>
</vbox>

View File

@ -1,14 +0,0 @@
# 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/.
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DISABLED_EXTRA_COMPONENTS = fuelApplication.manifest
include $(topsrcdir)/config/rules.mk

View File

@ -441,6 +441,10 @@ box.requests-menu-status[code^="5"] {
margin-top: 0.5em;
}
#custom-method-value {
width: 4.5em;
}
/* Footer */
#requests-menu-footer {

View File

@ -441,6 +441,10 @@ box.requests-menu-status[code^="5"] {
margin-top: 0.5em;
}
#custom-method-value {
width: 4.5em;
}
/* Footer */
#requests-menu-footer {

View File

@ -441,6 +441,10 @@ box.requests-menu-status[code^="5"] {
margin-top: 0.5em;
}
#custom-method-value {
width: 4.5em;
}
/* Footer */
#requests-menu-footer {

View File

@ -4,8 +4,10 @@
* 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 "mozilla/MemoryReporting.h"
#include "nsNullPrincipalURI.h"
#include "mozilla/MemoryReporting.h"
#include "nsNetUtil.h"
#include "nsEscape.h"
#include "nsCRT.h"

View File

@ -4340,7 +4340,7 @@ MOZ_ARG_WITH_STRING(google-api-keyfile,
if test -z "$MOZ_GOOGLE_API_KEY"; then
MOZ_GOOGLE_API_KEY=no-google-api-key
fi
AC_DEFINE_UNQUOTED(MOZ_GOOGLE_API_KEY, $MOZ_GOOGLE_API_KEY)
AC_SUBST(MOZ_GOOGLE_API_KEY)
# Allow the application to influence configure with a confvars.sh script.
AC_MSG_CHECKING([if app-specific confvars.sh exists])

View File

@ -39,6 +39,7 @@
#include "nsAttrValue.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "nsIHTMLCollection.h"
#include "Units.h"
class nsIDOMEventListener;
class nsIFrame;
@ -674,8 +675,8 @@ public:
{
nsIScrollableFrame* sf = GetScrollFrame();
if (sf) {
sf->ScrollToCSSPixels(nsIntPoint(sf->GetScrollPositionCSSPixels().x,
aScrollTop));
sf->ScrollToCSSPixels(CSSIntPoint(sf->GetScrollPositionCSSPixels().x,
aScrollTop));
}
}
int32_t ScrollLeft()
@ -687,8 +688,8 @@ public:
{
nsIScrollableFrame* sf = GetScrollFrame();
if (sf) {
sf->ScrollToCSSPixels(nsIntPoint(aScrollLeft,
sf->GetScrollPositionCSSPixels().y));
sf->ScrollToCSSPixels(CSSIntPoint(aScrollLeft,
sf->GetScrollPositionCSSPixels().y));
}
}
int32_t ScrollWidth();

View File

@ -8,8 +8,10 @@
* the two is unified to minimize footprint.
*/
#include "mozilla/MemoryReporting.h"
#include "nsAttrAndChildArray.h"
#include "mozilla/MemoryReporting.h"
#include "nsMappedAttributeElement.h"
#include "prbit.h"
#include "nsString.h"

View File

@ -20,8 +20,10 @@
* nsIAtom pointers, and the values are void pointers.
*/
#include "mozilla/MemoryReporting.h"
#include "nsPropertyTable.h"
#include "mozilla/MemoryReporting.h"
#include "pldhash.h"
#include "nsError.h"
#include "nsIAtom.h"

View File

@ -4,8 +4,9 @@
* 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 "mozilla/MemoryReporting.h"
#include "mozilla/dom/HTMLAnchorElement.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/dom/HTMLAnchorElementBinding.h"
#include "nsCOMPtr.h"

View File

@ -4,8 +4,9 @@
* 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 "mozilla/MemoryReporting.h"
#include "mozilla/dom/HTMLAreaElement.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/dom/HTMLAreaElementBinding.h"
#include "base/compiler_specific.h"

View File

@ -289,12 +289,7 @@ HTMLAudioElement::UpdateAudioChannelPlayingState()
// Use a weak ref so the audio channel agent can't leak |this|.
mAudioChannelAgent->InitWithWeakCallback(mAudioChannelType, this);
nsCOMPtr<nsIDOMDocument> domDoc = do_QueryInterface(OwnerDoc());
if (domDoc) {
bool hidden = false;
domDoc->GetHidden(&hidden);
mAudioChannelAgent->SetVisibilityState(!hidden);
}
mAudioChannelAgent->SetVisibilityState(!OwnerDoc()->Hidden());
}
if (mPlayingThroughTheAudioChannel) {

View File

@ -3,9 +3,9 @@
* 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 "mozilla/MemoryReporting.h"
#include "mozilla/dom/HTMLLinkElement.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/dom/HTMLLinkElementBinding.h"
#include "base/compiler_specific.h"
#include "nsGenericHTMLElement.h"

View File

@ -273,12 +273,7 @@ HTMLVideoElement::WakeLockRelease()
void
HTMLVideoElement::WakeLockUpdate()
{
bool hidden = true;
nsCOMPtr<nsIDOMDocument> domDoc = do_QueryInterface(OwnerDoc());
if (domDoc) {
domDoc->GetHidden(&hidden);
}
bool hidden = OwnerDoc()->Hidden();
if (mScreenWakeLock && (mPaused || hidden)) {
mScreenWakeLock->Unlock();

View File

@ -0,0 +1,33 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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 "mozilla/dom/SVGAnimatedEnumeration.h"
#include "mozilla/dom/SVGAnimatedEnumerationBinding.h"
namespace mozilla {
namespace dom {
NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGAnimatedEnumeration,
mSVGElement)
NS_IMPL_CYCLE_COLLECTING_ADDREF(SVGAnimatedEnumeration)
NS_IMPL_CYCLE_COLLECTING_RELEASE(SVGAnimatedEnumeration)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGAnimatedEnumeration)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_INTERFACE_MAP_ENTRY(nsIDOMSVGAnimatedEnumeration)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END
JSObject*
SVGAnimatedEnumeration::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
{
return SVGAnimatedEnumerationBinding::Wrap(aCx, aScope, this);
}
} // namespace dom
} // namespace mozilla

View File

@ -0,0 +1,68 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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/. */
#ifndef mozilla_dom_SVGAnimatedEnumeration_h
#define mozilla_dom_SVGAnimatedEnumeration_h
#include "nsIDOMSVGAnimatedEnum.h"
#include "nsWrapperCache.h"
#include "nsSVGElement.h"
namespace mozilla {
namespace dom {
class SVGAnimatedEnumeration : public nsIDOMSVGAnimatedEnumeration
, public nsWrapperCache
{
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SVGAnimatedEnumeration)
nsSVGElement* GetParentObject() const
{
return mSVGElement;
}
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
MOZ_OVERRIDE MOZ_FINAL;
virtual uint16_t BaseVal() = 0;
virtual void SetBaseVal(uint16_t aBaseVal, ErrorResult& aRv) = 0;
virtual uint16_t AnimVal() = 0;
NS_IMETHOD GetBaseVal(uint16_t* aResult) MOZ_OVERRIDE MOZ_FINAL
{
*aResult = BaseVal();
return NS_OK;
}
NS_IMETHOD SetBaseVal(uint16_t aValue) MOZ_OVERRIDE MOZ_FINAL
{
ErrorResult rv;
SetBaseVal(aValue, rv);
return rv.ErrorCode();
}
NS_IMETHOD GetAnimVal(uint16_t* aResult) MOZ_OVERRIDE MOZ_FINAL
{
*aResult = AnimVal();
return NS_OK;
}
protected:
explicit SVGAnimatedEnumeration(nsSVGElement* aSVGElement)
: mSVGElement(aSVGElement)
{
SetIsDOMBinding();
}
virtual ~SVGAnimatedEnumeration() {};
nsRefPtr<nsSVGElement> mSVGElement;
};
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_SVGAnimatedEnumeration_h

View File

@ -0,0 +1,32 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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 "mozilla/dom/SVGAnimatedInteger.h"
#include "mozilla/dom/SVGAnimatedIntegerBinding.h"
namespace mozilla {
namespace dom {
NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGAnimatedInteger,
mSVGElement)
NS_IMPL_CYCLE_COLLECTING_ADDREF(SVGAnimatedInteger)
NS_IMPL_CYCLE_COLLECTING_RELEASE(SVGAnimatedInteger)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGAnimatedInteger)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END
JSObject*
SVGAnimatedInteger::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
{
return SVGAnimatedIntegerBinding::Wrap(aCx, aScope, this);
}
} // namespace dom
} // namespace mozilla

View File

@ -0,0 +1,51 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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/. */
#ifndef mozilla_dom_SVGAnimatedInteger_h
#define mozilla_dom_SVGAnimatedInteger_h
#include "nsIDOMSVGAnimatedEnum.h"
#include "nsWrapperCache.h"
#include "nsSVGElement.h"
namespace mozilla {
namespace dom {
class SVGAnimatedInteger : public nsISupports
, public nsWrapperCache
{
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SVGAnimatedInteger)
nsSVGElement* GetParentObject() const
{
return mSVGElement;
}
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
MOZ_OVERRIDE MOZ_FINAL;
virtual int32_t BaseVal() = 0;
virtual void SetBaseVal(int32_t aBaseVal) = 0;
virtual int32_t AnimVal() = 0;
protected:
explicit SVGAnimatedInteger(nsSVGElement* aSVGElement)
: mSVGElement(aSVGElement)
{
SetIsDOMBinding();
}
virtual ~SVGAnimatedInteger() {};
nsRefPtr<nsSVGElement> mSVGElement;
};
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_SVGAnimatedInteger_h

View File

@ -0,0 +1,32 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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 "mozilla/dom/SVGAnimatedNumber.h"
#include "mozilla/dom/SVGAnimatedNumberBinding.h"
namespace mozilla {
namespace dom {
NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGAnimatedNumber,
mSVGElement)
NS_IMPL_CYCLE_COLLECTING_ADDREF(SVGAnimatedNumber)
NS_IMPL_CYCLE_COLLECTING_RELEASE(SVGAnimatedNumber)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGAnimatedNumber)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END
JSObject*
SVGAnimatedNumber::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
{
return SVGAnimatedNumberBinding::Wrap(aCx, aScope, this);
}
} // namespace dom
} // namespace mozilla

View File

@ -0,0 +1,51 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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/. */
#ifndef mozilla_dom_SVGAnimatedNumber_h
#define mozilla_dom_SVGAnimatedNumber_h
#include "nsISupports.h"
#include "nsWrapperCache.h"
#include "nsSVGElement.h"
namespace mozilla {
namespace dom {
class SVGAnimatedNumber : public nsISupports
, public nsWrapperCache
{
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SVGAnimatedNumber)
nsSVGElement* GetParentObject() const
{
return mSVGElement;
}
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
MOZ_OVERRIDE MOZ_FINAL;
virtual float BaseVal() = 0;
virtual void SetBaseVal(float aBaseVal) = 0;
virtual float AnimVal() = 0;
protected:
explicit SVGAnimatedNumber(nsSVGElement* aSVGElement)
: mSVGElement(aSVGElement)
{
SetIsDOMBinding();
}
virtual ~SVGAnimatedNumber() {};
nsRefPtr<nsSVGElement> mSVGElement;
};
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_SVGAnimatedNumber_h

View File

@ -36,12 +36,10 @@ SVGClipPathElement::SVGClipPathElement(already_AddRefed<nsINodeInfo> aNodeInfo)
{
}
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
already_AddRefed<SVGAnimatedEnumeration>
SVGClipPathElement::ClipPathUnits()
{
nsCOMPtr<nsIDOMSVGAnimatedEnumeration> unit;
mEnumAttributes[CLIPPATHUNITS].ToDOMAnimatedEnum(getter_AddRefs(unit), this);
return unit.forget();
return mEnumAttributes[CLIPPATHUNITS].ToDOMAnimatedEnum(this);
}
nsSVGElement::EnumAttributesInfo

View File

@ -34,7 +34,7 @@ public:
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
// WebIDL
already_AddRefed<nsIDOMSVGAnimatedEnumeration> ClipPathUnits();
already_AddRefed<SVGAnimatedEnumeration> ClipPathUnits();
protected:

View File

@ -47,13 +47,13 @@ public:
// WebIDL
virtual JSObject* WrapNode(JSContext* aCx,
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE = 0;
already_AddRefed<nsIDOMSVGAnimatedEnumeration> Type();
already_AddRefed<SVGAnimatedEnumeration> Type();
already_AddRefed<DOMSVGAnimatedNumberList> TableValues();
already_AddRefed<nsIDOMSVGAnimatedNumber> Slope();
already_AddRefed<nsIDOMSVGAnimatedNumber> Intercept();
already_AddRefed<nsIDOMSVGAnimatedNumber> Amplitude();
already_AddRefed<nsIDOMSVGAnimatedNumber> Exponent();
already_AddRefed<nsIDOMSVGAnimatedNumber> Offset();
already_AddRefed<SVGAnimatedNumber> Slope();
already_AddRefed<SVGAnimatedNumber> Intercept();
already_AddRefed<SVGAnimatedNumber> Amplitude();
already_AddRefed<SVGAnimatedNumber> Exponent();
already_AddRefed<SVGAnimatedNumber> Offset();
protected:
virtual NumberAttributesInfo GetNumberInfo() MOZ_OVERRIDE;

View File

@ -62,7 +62,7 @@ SVGFEBlendElement::In2()
return mStringAttributes[IN2].ToDOMAnimatedString(this);
}
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
already_AddRefed<SVGAnimatedEnumeration>
SVGFEBlendElement::Mode()
{
return mEnumAttributes[MODE].ToDOMAnimatedEnum(this);

View File

@ -50,7 +50,7 @@ public:
// WebIDL
already_AddRefed<SVGAnimatedString> In1();
already_AddRefed<SVGAnimatedString> In2();
already_AddRefed<nsIDOMSVGAnimatedEnumeration> Mode();
already_AddRefed<SVGAnimatedEnumeration> Mode();
protected:

View File

@ -63,7 +63,7 @@ SVGFEColorMatrixElement::In1()
return mStringAttributes[IN1].ToDOMAnimatedString(this);
}
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
already_AddRefed<SVGAnimatedEnumeration>
SVGFEColorMatrixElement::Type()
{
return mEnumAttributes[TYPE].ToDOMAnimatedEnum(this);

View File

@ -50,7 +50,7 @@ public:
// WebIDL
already_AddRefed<SVGAnimatedString> In1();
already_AddRefed<nsIDOMSVGAnimatedEnumeration> Type();
already_AddRefed<SVGAnimatedEnumeration> Type();
already_AddRefed<DOMSVGAnimatedNumberList> Values();
protected:

View File

@ -67,31 +67,31 @@ SVGFECompositeElement::In2()
return mStringAttributes[IN2].ToDOMAnimatedString(this);
}
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
already_AddRefed<SVGAnimatedEnumeration>
SVGFECompositeElement::Operator()
{
return mEnumAttributes[OPERATOR].ToDOMAnimatedEnum(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFECompositeElement::K1()
{
return mNumberAttributes[ATTR_K1].ToDOMAnimatedNumber(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFECompositeElement::K2()
{
return mNumberAttributes[ATTR_K2].ToDOMAnimatedNumber(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFECompositeElement::K3()
{
return mNumberAttributes[ATTR_K3].ToDOMAnimatedNumber(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFECompositeElement::K4()
{
return mNumberAttributes[ATTR_K4].ToDOMAnimatedNumber(this);

View File

@ -57,11 +57,11 @@ public:
// WebIDL
already_AddRefed<SVGAnimatedString> In1();
already_AddRefed<SVGAnimatedString> In2();
already_AddRefed<nsIDOMSVGAnimatedEnumeration> Operator();
already_AddRefed<nsIDOMSVGAnimatedNumber> K1();
already_AddRefed<nsIDOMSVGAnimatedNumber> K2();
already_AddRefed<nsIDOMSVGAnimatedNumber> K3();
already_AddRefed<nsIDOMSVGAnimatedNumber> K4();
already_AddRefed<SVGAnimatedEnumeration> Operator();
already_AddRefed<SVGAnimatedNumber> K1();
already_AddRefed<SVGAnimatedNumber> K2();
already_AddRefed<SVGAnimatedNumber> K3();
already_AddRefed<SVGAnimatedNumber> K4();
void SetK(float k1, float k2, float k3, float k4);
protected:

View File

@ -91,13 +91,13 @@ SVGFEConvolveMatrixElement::In1()
return mStringAttributes[IN1].ToDOMAnimatedString(this);
}
already_AddRefed<nsIDOMSVGAnimatedInteger>
already_AddRefed<SVGAnimatedInteger>
SVGFEConvolveMatrixElement::OrderX()
{
return mIntegerPairAttributes[ORDER].ToDOMAnimatedInteger(nsSVGIntegerPair::eFirst, this);
}
already_AddRefed<nsIDOMSVGAnimatedInteger>
already_AddRefed<SVGAnimatedInteger>
SVGFEConvolveMatrixElement::OrderY()
{
return mIntegerPairAttributes[ORDER].ToDOMAnimatedInteger(nsSVGIntegerPair::eSecond, this);
@ -110,19 +110,19 @@ SVGFEConvolveMatrixElement::KernelMatrix()
this, KERNELMATRIX);
}
already_AddRefed<nsIDOMSVGAnimatedInteger>
already_AddRefed<SVGAnimatedInteger>
SVGFEConvolveMatrixElement::TargetX()
{
return mIntegerAttributes[TARGET_X].ToDOMAnimatedInteger(this);
}
already_AddRefed<nsIDOMSVGAnimatedInteger>
already_AddRefed<SVGAnimatedInteger>
SVGFEConvolveMatrixElement::TargetY()
{
return mIntegerAttributes[TARGET_Y].ToDOMAnimatedInteger(this);
}
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
already_AddRefed<SVGAnimatedEnumeration>
SVGFEConvolveMatrixElement::EdgeMode()
{
return mEnumAttributes[EDGEMODE].ToDOMAnimatedEnum(this);
@ -134,26 +134,26 @@ SVGFEConvolveMatrixElement::PreserveAlpha()
return mBooleanAttributes[PRESERVEALPHA].ToDOMAnimatedBoolean(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFEConvolveMatrixElement::Divisor()
{
return mNumberAttributes[DIVISOR].ToDOMAnimatedNumber(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFEConvolveMatrixElement::Bias()
{
return mNumberAttributes[BIAS].ToDOMAnimatedNumber(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFEConvolveMatrixElement::KernelUnitLengthX()
{
return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(nsSVGNumberPair::eFirst,
this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFEConvolveMatrixElement::KernelUnitLengthY()
{
return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(nsSVGNumberPair::eSecond,

View File

@ -59,17 +59,17 @@ public:
// WebIDL
already_AddRefed<SVGAnimatedString> In1();
already_AddRefed<nsIDOMSVGAnimatedInteger> OrderX();
already_AddRefed<nsIDOMSVGAnimatedInteger> OrderY();
already_AddRefed<SVGAnimatedInteger> OrderX();
already_AddRefed<SVGAnimatedInteger> OrderY();
already_AddRefed<DOMSVGAnimatedNumberList> KernelMatrix();
already_AddRefed<nsIDOMSVGAnimatedInteger> TargetX();
already_AddRefed<nsIDOMSVGAnimatedInteger> TargetY();
already_AddRefed<nsIDOMSVGAnimatedEnumeration> EdgeMode();
already_AddRefed<SVGAnimatedInteger> TargetX();
already_AddRefed<SVGAnimatedInteger> TargetY();
already_AddRefed<SVGAnimatedEnumeration> EdgeMode();
already_AddRefed<SVGAnimatedBoolean> PreserveAlpha();
already_AddRefed<nsIDOMSVGAnimatedNumber> Divisor();
already_AddRefed<nsIDOMSVGAnimatedNumber> Bias();
already_AddRefed<nsIDOMSVGAnimatedNumber> KernelUnitLengthX();
already_AddRefed<nsIDOMSVGAnimatedNumber> KernelUnitLengthY();
already_AddRefed<SVGAnimatedNumber> Divisor();
already_AddRefed<SVGAnimatedNumber> Bias();
already_AddRefed<SVGAnimatedNumber> KernelUnitLengthX();
already_AddRefed<SVGAnimatedNumber> KernelUnitLengthY();
protected:
virtual bool OperatesOnPremultipledAlpha(int32_t) MOZ_OVERRIDE {

View File

@ -31,26 +31,26 @@ SVGFEDiffuseLightingElement::In1()
return mStringAttributes[IN1].ToDOMAnimatedString(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFEDiffuseLightingElement::SurfaceScale()
{
return mNumberAttributes[SURFACE_SCALE].ToDOMAnimatedNumber(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFEDiffuseLightingElement::DiffuseConstant()
{
return mNumberAttributes[DIFFUSE_CONSTANT].ToDOMAnimatedNumber(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFEDiffuseLightingElement::KernelUnitLengthX()
{
return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(
nsSVGNumberPair::eFirst, this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFEDiffuseLightingElement::KernelUnitLengthY()
{
return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(

View File

@ -36,10 +36,10 @@ public:
// WebIDL
already_AddRefed<SVGAnimatedString> In1();
already_AddRefed<nsIDOMSVGAnimatedNumber> SurfaceScale();
already_AddRefed<nsIDOMSVGAnimatedNumber> DiffuseConstant();
already_AddRefed<nsIDOMSVGAnimatedNumber> KernelUnitLengthX();
already_AddRefed<nsIDOMSVGAnimatedNumber> KernelUnitLengthY();
already_AddRefed<SVGAnimatedNumber> SurfaceScale();
already_AddRefed<SVGAnimatedNumber> DiffuseConstant();
already_AddRefed<SVGAnimatedNumber> KernelUnitLengthX();
already_AddRefed<SVGAnimatedNumber> KernelUnitLengthY();
protected:
virtual void LightPixel(const float *N, const float *L,

View File

@ -77,19 +77,19 @@ SVGFEDisplacementMapElement::In2()
return mStringAttributes[IN2].ToDOMAnimatedString(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFEDisplacementMapElement::Scale()
{
return mNumberAttributes[SCALE].ToDOMAnimatedNumber(this);
}
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
already_AddRefed<SVGAnimatedEnumeration>
SVGFEDisplacementMapElement::XChannelSelector()
{
return mEnumAttributes[CHANNEL_X].ToDOMAnimatedEnum(this);
}
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
already_AddRefed<SVGAnimatedEnumeration>
SVGFEDisplacementMapElement::YChannelSelector()
{
return mEnumAttributes[CHANNEL_Y].ToDOMAnimatedEnum(this);

View File

@ -51,9 +51,9 @@ public:
// WebIDL
already_AddRefed<SVGAnimatedString> In1();
already_AddRefed<SVGAnimatedString> In2();
already_AddRefed<nsIDOMSVGAnimatedNumber> Scale();
already_AddRefed<nsIDOMSVGAnimatedEnumeration> XChannelSelector();
already_AddRefed<nsIDOMSVGAnimatedEnumeration> YChannelSelector();
already_AddRefed<SVGAnimatedNumber> Scale();
already_AddRefed<SVGAnimatedEnumeration> XChannelSelector();
already_AddRefed<SVGAnimatedEnumeration> YChannelSelector();
protected:
virtual bool OperatesOnSRGB(nsSVGFilterInstance* aInstance,

View File

@ -40,13 +40,13 @@ SVGFEDistantLightElement::AttributeAffectsRendering(int32_t aNameSpaceID,
aAttribute == nsGkAtoms::elevation);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFEDistantLightElement::Azimuth()
{
return mNumberAttributes[AZIMUTH].ToDOMAnimatedNumber(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFEDistantLightElement::Elevation()
{
return mNumberAttributes[ELEVATION].ToDOMAnimatedNumber(this);

View File

@ -36,8 +36,8 @@ public:
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
// WebIDL
already_AddRefed<nsIDOMSVGAnimatedNumber> Azimuth();
already_AddRefed<nsIDOMSVGAnimatedNumber> Elevation();
already_AddRefed<SVGAnimatedNumber> Azimuth();
already_AddRefed<SVGAnimatedNumber> Elevation();
protected:
virtual NumberAttributesInfo GetNumberInfo() MOZ_OVERRIDE;

View File

@ -43,13 +43,13 @@ SVGFEGaussianBlurElement::In1()
return mStringAttributes[IN1].ToDOMAnimatedString(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFEGaussianBlurElement::StdDeviationX()
{
return mNumberPairAttributes[STD_DEV].ToDOMAnimatedNumber(nsSVGNumberPair::eFirst, this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFEGaussianBlurElement::StdDeviationY()
{
return mNumberPairAttributes[STD_DEV].ToDOMAnimatedNumber(nsSVGNumberPair::eSecond, this);

View File

@ -51,8 +51,8 @@ public:
// WebIDL
already_AddRefed<SVGAnimatedString> In1();
already_AddRefed<nsIDOMSVGAnimatedNumber> StdDeviationX();
already_AddRefed<nsIDOMSVGAnimatedNumber> StdDeviationY();
already_AddRefed<SVGAnimatedNumber> StdDeviationX();
already_AddRefed<SVGAnimatedNumber> StdDeviationY();
void SetStdDeviation(float stdDeviationX, float stdDeviationY);
protected:

View File

@ -64,19 +64,19 @@ SVGFEMorphologyElement::In1()
return mStringAttributes[IN1].ToDOMAnimatedString(this);
}
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
already_AddRefed<SVGAnimatedEnumeration>
SVGFEMorphologyElement::Operator()
{
return mEnumAttributes[OPERATOR].ToDOMAnimatedEnum(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFEMorphologyElement::RadiusX()
{
return mNumberPairAttributes[RADIUS].ToDOMAnimatedNumber(nsSVGNumberPair::eFirst, this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFEMorphologyElement::RadiusY()
{
return mNumberPairAttributes[RADIUS].ToDOMAnimatedNumber(nsSVGNumberPair::eSecond, this);

View File

@ -51,9 +51,9 @@ public:
// WebIDL
already_AddRefed<SVGAnimatedString> In1();
already_AddRefed<nsIDOMSVGAnimatedEnumeration> Operator();
already_AddRefed<nsIDOMSVGAnimatedNumber> RadiusX();
already_AddRefed<nsIDOMSVGAnimatedNumber> RadiusY();
already_AddRefed<SVGAnimatedEnumeration> Operator();
already_AddRefed<SVGAnimatedNumber> RadiusX();
already_AddRefed<SVGAnimatedNumber> RadiusY();
void SetRadius(float rx, float ry);
protected:

View File

@ -45,13 +45,13 @@ SVGFEOffsetElement::In1()
return mStringAttributes[IN1].ToDOMAnimatedString(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFEOffsetElement::Dx()
{
return mNumberAttributes[DX].ToDOMAnimatedNumber(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFEOffsetElement::Dy()
{
return mNumberAttributes[DY].ToDOMAnimatedNumber(this);

View File

@ -50,8 +50,8 @@ public:
// WebIDL
already_AddRefed<SVGAnimatedString> In1();
already_AddRefed<nsIDOMSVGAnimatedNumber> Dx();
already_AddRefed<nsIDOMSVGAnimatedNumber> Dy();
already_AddRefed<SVGAnimatedNumber> Dx();
already_AddRefed<SVGAnimatedNumber> Dy();
protected:
nsIntPoint GetOffset(const nsSVGFilterInstance& aInstance);

View File

@ -44,19 +44,19 @@ SVGFEPointLightElement::AttributeAffectsRendering(int32_t aNameSpaceID,
//----------------------------------------------------------------------
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFEPointLightElement::X()
{
return mNumberAttributes[ATTR_X].ToDOMAnimatedNumber(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFEPointLightElement::Y()
{
return mNumberAttributes[ATTR_Y].ToDOMAnimatedNumber(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFEPointLightElement::Z()
{
return mNumberAttributes[ATTR_Z].ToDOMAnimatedNumber(this);

View File

@ -36,9 +36,9 @@ public:
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
// WebIDL
already_AddRefed<nsIDOMSVGAnimatedNumber> X();
already_AddRefed<nsIDOMSVGAnimatedNumber> Y();
already_AddRefed<nsIDOMSVGAnimatedNumber> Z();
already_AddRefed<SVGAnimatedNumber> X();
already_AddRefed<SVGAnimatedNumber> Y();
already_AddRefed<SVGAnimatedNumber> Z();
protected:
virtual NumberAttributesInfo GetNumberInfo() MOZ_OVERRIDE;

View File

@ -29,32 +29,32 @@ SVGFESpecularLightingElement::In1()
return mStringAttributes[IN1].ToDOMAnimatedString(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFESpecularLightingElement::SurfaceScale()
{
return mNumberAttributes[SURFACE_SCALE].ToDOMAnimatedNumber(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFESpecularLightingElement::SpecularConstant()
{
return mNumberAttributes[SPECULAR_CONSTANT].ToDOMAnimatedNumber(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFESpecularLightingElement::SpecularExponent()
{
return mNumberAttributes[SPECULAR_EXPONENT].ToDOMAnimatedNumber(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFESpecularLightingElement::KernelUnitLengthX()
{
return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(
nsSVGNumberPair::eFirst, this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFESpecularLightingElement::KernelUnitLengthY()
{
return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(

View File

@ -42,11 +42,11 @@ public:
// WebIDL
already_AddRefed<SVGAnimatedString> In1();
already_AddRefed<nsIDOMSVGAnimatedNumber> SurfaceScale();
already_AddRefed<nsIDOMSVGAnimatedNumber> SpecularConstant();
already_AddRefed<nsIDOMSVGAnimatedNumber> SpecularExponent();
already_AddRefed<nsIDOMSVGAnimatedNumber> KernelUnitLengthX();
already_AddRefed<nsIDOMSVGAnimatedNumber> KernelUnitLengthY();
already_AddRefed<SVGAnimatedNumber> SurfaceScale();
already_AddRefed<SVGAnimatedNumber> SpecularConstant();
already_AddRefed<SVGAnimatedNumber> SpecularExponent();
already_AddRefed<SVGAnimatedNumber> KernelUnitLengthX();
already_AddRefed<SVGAnimatedNumber> KernelUnitLengthY();
protected:
virtual void LightPixel(const float *N, const float *L,

View File

@ -54,49 +54,49 @@ SVGFESpotLightElement::AttributeAffectsRendering(int32_t aNameSpaceID,
//----------------------------------------------------------------------
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFESpotLightElement::X()
{
return mNumberAttributes[ATTR_X].ToDOMAnimatedNumber(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFESpotLightElement::Y()
{
return mNumberAttributes[ATTR_Y].ToDOMAnimatedNumber(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFESpotLightElement::Z()
{
return mNumberAttributes[ATTR_Z].ToDOMAnimatedNumber(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFESpotLightElement::PointsAtX()
{
return mNumberAttributes[POINTS_AT_X].ToDOMAnimatedNumber(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFESpotLightElement::PointsAtY()
{
return mNumberAttributes[POINTS_AT_Y].ToDOMAnimatedNumber(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFESpotLightElement::PointsAtZ()
{
return mNumberAttributes[POINTS_AT_Z].ToDOMAnimatedNumber(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFESpotLightElement::SpecularExponent()
{
return mNumberAttributes[SPECULAR_EXPONENT].ToDOMAnimatedNumber(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFESpotLightElement::LimitingConeAngle()
{
return mNumberAttributes[LIMITING_CONE_ANGLE].ToDOMAnimatedNumber(this);

View File

@ -39,14 +39,14 @@ public:
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
// WebIDL
already_AddRefed<nsIDOMSVGAnimatedNumber> X();
already_AddRefed<nsIDOMSVGAnimatedNumber> Y();
already_AddRefed<nsIDOMSVGAnimatedNumber> Z();
already_AddRefed<nsIDOMSVGAnimatedNumber> PointsAtX();
already_AddRefed<nsIDOMSVGAnimatedNumber> PointsAtY();
already_AddRefed<nsIDOMSVGAnimatedNumber> PointsAtZ();
already_AddRefed<nsIDOMSVGAnimatedNumber> SpecularExponent();
already_AddRefed<nsIDOMSVGAnimatedNumber> LimitingConeAngle();
already_AddRefed<SVGAnimatedNumber> X();
already_AddRefed<SVGAnimatedNumber> Y();
already_AddRefed<SVGAnimatedNumber> Z();
already_AddRefed<SVGAnimatedNumber> PointsAtX();
already_AddRefed<SVGAnimatedNumber> PointsAtY();
already_AddRefed<SVGAnimatedNumber> PointsAtZ();
already_AddRefed<SVGAnimatedNumber> SpecularExponent();
already_AddRefed<SVGAnimatedNumber> LimitingConeAngle();
protected:
virtual NumberAttributesInfo GetNumberInfo() MOZ_OVERRIDE;

View File

@ -86,37 +86,37 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFETurbulenceElement)
//----------------------------------------------------------------------
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFETurbulenceElement::BaseFrequencyX()
{
return mNumberPairAttributes[BASE_FREQ].ToDOMAnimatedNumber(nsSVGNumberPair::eFirst, this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFETurbulenceElement::BaseFrequencyY()
{
return mNumberPairAttributes[BASE_FREQ].ToDOMAnimatedNumber(nsSVGNumberPair::eSecond, this);
}
already_AddRefed<nsIDOMSVGAnimatedInteger>
already_AddRefed<SVGAnimatedInteger>
SVGFETurbulenceElement::NumOctaves()
{
return mIntegerAttributes[OCTAVES].ToDOMAnimatedInteger(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGFETurbulenceElement::Seed()
{
return mNumberAttributes[SEED].ToDOMAnimatedNumber(this);
}
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
already_AddRefed<SVGAnimatedEnumeration>
SVGFETurbulenceElement::StitchTiles()
{
return mEnumAttributes[STITCHTILES].ToDOMAnimatedEnum(this);
}
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
already_AddRefed<SVGAnimatedEnumeration>
SVGFETurbulenceElement::Type()
{
return mEnumAttributes[TYPE].ToDOMAnimatedEnum(this);

View File

@ -48,12 +48,12 @@ public:
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
// WebIDL
already_AddRefed<nsIDOMSVGAnimatedNumber> BaseFrequencyX();
already_AddRefed<nsIDOMSVGAnimatedNumber> BaseFrequencyY();
already_AddRefed<nsIDOMSVGAnimatedInteger> NumOctaves();
already_AddRefed<nsIDOMSVGAnimatedNumber> Seed();
already_AddRefed<nsIDOMSVGAnimatedEnumeration> StitchTiles();
already_AddRefed<nsIDOMSVGAnimatedEnumeration> Type();
already_AddRefed<SVGAnimatedNumber> BaseFrequencyX();
already_AddRefed<SVGAnimatedNumber> BaseFrequencyY();
already_AddRefed<SVGAnimatedInteger> NumOctaves();
already_AddRefed<SVGAnimatedNumber> Seed();
already_AddRefed<SVGAnimatedEnumeration> StitchTiles();
already_AddRefed<SVGAnimatedEnumeration> Type();
protected:
virtual NumberAttributesInfo GetNumberInfo() MOZ_OVERRIDE;

View File

@ -93,26 +93,26 @@ SVGFilterElement::Height()
return mLengthAttributes[ATTR_HEIGHT].ToDOMAnimatedLength(this);
}
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
already_AddRefed<SVGAnimatedEnumeration>
SVGFilterElement::FilterUnits()
{
return mEnumAttributes[FILTERUNITS].ToDOMAnimatedEnum(this);
}
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
already_AddRefed<SVGAnimatedEnumeration>
SVGFilterElement::PrimitiveUnits()
{
return mEnumAttributes[PRIMITIVEUNITS].ToDOMAnimatedEnum(this);
}
already_AddRefed<nsIDOMSVGAnimatedInteger>
already_AddRefed<SVGAnimatedInteger>
SVGFilterElement::FilterResX()
{
return mIntegerPairAttributes[FILTERRES].ToDOMAnimatedInteger(nsSVGIntegerPair::eFirst,
this);
}
already_AddRefed<nsIDOMSVGAnimatedInteger>
already_AddRefed<SVGAnimatedInteger>
SVGFilterElement::FilterResY()
{
return mIntegerPairAttributes[FILTERRES].ToDOMAnimatedInteger(nsSVGIntegerPair::eSecond,

View File

@ -52,10 +52,10 @@ public:
already_AddRefed<SVGAnimatedLength> Y();
already_AddRefed<SVGAnimatedLength> Width();
already_AddRefed<SVGAnimatedLength> Height();
already_AddRefed<nsIDOMSVGAnimatedEnumeration> FilterUnits();
already_AddRefed<nsIDOMSVGAnimatedEnumeration> PrimitiveUnits();
already_AddRefed<nsIDOMSVGAnimatedInteger> FilterResX();
already_AddRefed<nsIDOMSVGAnimatedInteger> FilterResY();
already_AddRefed<SVGAnimatedEnumeration> FilterUnits();
already_AddRefed<SVGAnimatedEnumeration> PrimitiveUnits();
already_AddRefed<SVGAnimatedInteger> FilterResX();
already_AddRefed<SVGAnimatedInteger> FilterResY();
void SetFilterRes(uint32_t filterResX, uint32_t filterResY);
already_AddRefed<SVGAnimatedString> Href();

View File

@ -71,7 +71,7 @@ SVGGradientElement::GetStringInfo()
ArrayLength(sStringInfo));
}
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
already_AddRefed<SVGAnimatedEnumeration>
SVGGradientElement::GradientUnits()
{
return mEnumAttributes[GRADIENTUNITS].ToDOMAnimatedEnum(this);
@ -87,7 +87,7 @@ SVGGradientElement::GradientTransform()
GetAnimatedTransformList(DO_ALLOCATE), this);
}
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
already_AddRefed<SVGAnimatedEnumeration>
SVGGradientElement::SpreadMethod()
{
return mEnumAttributes[SPREADMETHOD].ToDOMAnimatedEnum(this);

View File

@ -59,9 +59,9 @@ public:
}
// WebIDL
already_AddRefed<nsIDOMSVGAnimatedEnumeration> GradientUnits();
already_AddRefed<SVGAnimatedEnumeration> GradientUnits();
already_AddRefed<SVGAnimatedTransformList> GradientTransform();
already_AddRefed<nsIDOMSVGAnimatedEnumeration> SpreadMethod();
already_AddRefed<SVGAnimatedEnumeration> SpreadMethod();
already_AddRefed<SVGAnimatedString> Href();
protected:

View File

@ -53,20 +53,6 @@ nsSVGElement::AngleInfo SVGMarkerElement::sAngleInfo[1] =
{ &nsGkAtoms::orient, 0, SVG_ANGLETYPE_UNSPECIFIED }
};
//----------------------------------------------------------------------
// nsISupports methods
NS_SVG_VAL_IMPL_CYCLE_COLLECTION(nsSVGOrientType::DOMAnimatedEnum, mSVGElement)
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsSVGOrientType::DOMAnimatedEnum)
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsSVGOrientType::DOMAnimatedEnum)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsSVGOrientType::DOMAnimatedEnum)
NS_INTERFACE_MAP_ENTRY(nsIDOMSVGAnimatedEnumeration)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGAnimatedEnumeration)
NS_INTERFACE_MAP_END
//----------------------------------------------------------------------
// Implementation
@ -86,10 +72,10 @@ nsSVGOrientType::SetBaseValue(uint16_t aValue,
return NS_ERROR_DOM_SYNTAX_ERR;
}
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
already_AddRefed<SVGAnimatedEnumeration>
nsSVGOrientType::ToDOMAnimatedEnum(nsSVGElement *aSVGElement)
{
nsCOMPtr<nsIDOMSVGAnimatedEnumeration> toReturn =
nsRefPtr<SVGAnimatedEnumeration> toReturn =
new DOMAnimatedEnum(this, aSVGElement);
return toReturn.forget();
}
@ -134,7 +120,7 @@ SVGMarkerElement::RefY()
return mLengthAttributes[REFY].ToDOMAnimatedLength(this);
}
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
already_AddRefed<SVGAnimatedEnumeration>
SVGMarkerElement::MarkerUnits()
{
return mEnumAttributes[MARKERUNITS].ToDOMAnimatedEnum(this);
@ -152,7 +138,7 @@ SVGMarkerElement::MarkerHeight()
return mLengthAttributes[MARKERHEIGHT].ToDOMAnimatedLength(this);
}
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
already_AddRefed<SVGAnimatedEnumeration>
SVGMarkerElement::OrientType()
{
return mOrientType.ToDOMAnimatedEnum(this);

View File

@ -14,6 +14,7 @@
#include "SVGAnimatedPreserveAspectRatio.h"
#include "nsSVGElement.h"
#include "mozilla/Attributes.h"
#include "mozilla/dom/SVGAnimatedEnumeration.h"
class nsSVGMarkerFrame;
@ -56,31 +57,36 @@ public:
uint16_t GetAnimValue() const
{ return mAnimVal; }
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
already_AddRefed<SVGAnimatedEnumeration>
ToDOMAnimatedEnum(nsSVGElement* aSVGElement);
private:
nsSVGEnumValue mAnimVal;
nsSVGEnumValue mBaseVal;
struct DOMAnimatedEnum MOZ_FINAL : public nsIDOMSVGAnimatedEnumeration
struct DOMAnimatedEnum MOZ_FINAL : public SVGAnimatedEnumeration
{
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(DOMAnimatedEnum)
DOMAnimatedEnum(nsSVGOrientType* aVal,
nsSVGElement *aSVGElement)
: mVal(aVal), mSVGElement(aSVGElement) {}
: SVGAnimatedEnumeration(aSVGElement)
, mVal(aVal)
{}
nsSVGOrientType *mVal; // kept alive because it belongs to content
nsRefPtr<nsSVGElement> mSVGElement;
NS_IMETHOD GetBaseVal(uint16_t* aResult) MOZ_OVERRIDE
{ *aResult = mVal->GetBaseValue(); return NS_OK; }
NS_IMETHOD SetBaseVal(uint16_t aValue) MOZ_OVERRIDE
{ return mVal->SetBaseValue(aValue, mSVGElement); }
NS_IMETHOD GetAnimVal(uint16_t* aResult) MOZ_OVERRIDE
{ *aResult = mVal->GetAnimValue(); return NS_OK; }
using mozilla::dom::SVGAnimatedEnumeration::SetBaseVal;
virtual uint16_t BaseVal() MOZ_OVERRIDE
{
return mVal->GetBaseValue();
}
virtual void SetBaseVal(uint16_t aBaseVal, ErrorResult& aRv) MOZ_OVERRIDE
{
aRv = mVal->SetBaseValue(aBaseVal, mSVGElement);
}
virtual uint16_t AnimVal() MOZ_OVERRIDE
{
return mVal->GetAnimValue();
}
};
};
@ -122,10 +128,10 @@ public:
already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio();
already_AddRefed<SVGAnimatedLength> RefX();
already_AddRefed<SVGAnimatedLength> RefY();
already_AddRefed<nsIDOMSVGAnimatedEnumeration> MarkerUnits();
already_AddRefed<SVGAnimatedEnumeration> MarkerUnits();
already_AddRefed<SVGAnimatedLength> MarkerWidth();
already_AddRefed<SVGAnimatedLength> MarkerHeight();
already_AddRefed<nsIDOMSVGAnimatedEnumeration> OrientType();
already_AddRefed<SVGAnimatedEnumeration> OrientType();
already_AddRefed<SVGAnimatedAngle> OrientAngle();
void SetOrientToAuto();
void SetOrientToAngle(SVGAngle& angle, ErrorResult& rv);

View File

@ -58,13 +58,13 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGMaskElement)
//----------------------------------------------------------------------
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
already_AddRefed<SVGAnimatedEnumeration>
SVGMaskElement::MaskUnits()
{
return mEnumAttributes[MASKUNITS].ToDOMAnimatedEnum(this);
}
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
already_AddRefed<SVGAnimatedEnumeration>
SVGMaskElement::MaskContentUnits()
{
return mEnumAttributes[MASKCONTENTUNITS].ToDOMAnimatedEnum(this);

View File

@ -42,8 +42,8 @@ public:
virtual bool HasValidDimensions() const MOZ_OVERRIDE;
// WebIDL
already_AddRefed<nsIDOMSVGAnimatedEnumeration> MaskUnits();
already_AddRefed<nsIDOMSVGAnimatedEnumeration> MaskContentUnits();
already_AddRefed<SVGAnimatedEnumeration> MaskUnits();
already_AddRefed<SVGAnimatedEnumeration> MaskContentUnits();
already_AddRefed<SVGAnimatedLength> X();
already_AddRefed<SVGAnimatedLength> Y();
already_AddRefed<SVGAnimatedLength> Width();

View File

@ -42,12 +42,10 @@ SVGPathElement::SVGPathElement(already_AddRefed<nsINodeInfo> aNodeInfo)
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGPathElement)
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGPathElement::PathLength()
{
nsCOMPtr<nsIDOMSVGAnimatedNumber> number;
mPathLength.ToDOMAnimatedNumber(getter_AddRefs(number), this);
return number.forget();
return mPathLength.ToDOMAnimatedNumber(this);
}
float

View File

@ -74,7 +74,7 @@ public:
gfxFloat GetPathLengthScale(PathLengthScaleForType aFor);
// WebIDL
already_AddRefed<nsIDOMSVGAnimatedNumber> PathLength();
already_AddRefed<SVGAnimatedNumber> PathLength();
float GetTotalLength(ErrorResult& rv);
already_AddRefed<nsISVGPoint> GetPointAtLength(float distance, ErrorResult& rv);
uint32_t GetPathSegAtLength(float distance);

View File

@ -80,13 +80,13 @@ SVGPatternElement::PreserveAspectRatio()
//----------------------------------------------------------------------
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
already_AddRefed<SVGAnimatedEnumeration>
SVGPatternElement::PatternUnits()
{
return mEnumAttributes[PATTERNUNITS].ToDOMAnimatedEnum(this);
}
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
already_AddRefed<SVGAnimatedEnumeration>
SVGPatternElement::PatternContentUnits()
{
return mEnumAttributes[PATTERNCONTENTUNITS].ToDOMAnimatedEnum(this);

View File

@ -56,8 +56,8 @@ public:
// WebIDL
already_AddRefed<SVGAnimatedRect> ViewBox();
already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio();
already_AddRefed<nsIDOMSVGAnimatedEnumeration> PatternUnits();
already_AddRefed<nsIDOMSVGAnimatedEnumeration> PatternContentUnits();
already_AddRefed<SVGAnimatedEnumeration> PatternUnits();
already_AddRefed<SVGAnimatedEnumeration> PatternContentUnits();
already_AddRefed<SVGAnimatedTransformList> PatternTransform();
already_AddRefed<SVGAnimatedLength> X();
already_AddRefed<SVGAnimatedLength> Y();

View File

@ -35,12 +35,10 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGStopElement)
//----------------------------------------------------------------------
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGStopElement::Offset()
{
nsCOMPtr<nsIDOMSVGAnimatedNumber> offset;
mOffset.ToDOMAnimatedNumber(getter_AddRefs(offset), this);
return offset.forget();
return mOffset.ToDOMAnimatedNumber(this);
}
//----------------------------------------------------------------------

View File

@ -33,7 +33,7 @@ public:
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
// WebIDL
already_AddRefed<nsIDOMSVGAnimatedNumber> Offset();
already_AddRefed<SVGAnimatedNumber> Offset();
protected:

View File

@ -84,13 +84,13 @@ SVGTextPathElement::StartOffset()
return mLengthAttributes[STARTOFFSET].ToDOMAnimatedLength(this);
}
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
already_AddRefed<SVGAnimatedEnumeration>
SVGTextPathElement::Method()
{
return mEnumAttributes[METHOD].ToDOMAnimatedEnum(this);
}
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
already_AddRefed<SVGAnimatedEnumeration>
SVGTextPathElement::Spacing()
{
return mEnumAttributes[SPACING].ToDOMAnimatedEnum(this);

View File

@ -53,8 +53,8 @@ public:
// WebIDL
already_AddRefed<SVGAnimatedLength> StartOffset();
already_AddRefed<nsIDOMSVGAnimatedEnumeration> Method();
already_AddRefed<nsIDOMSVGAnimatedEnumeration> Spacing();
already_AddRefed<SVGAnimatedEnumeration> Method();
already_AddRefed<SVGAnimatedEnumeration> Spacing();
already_AddRefed<SVGAnimatedString> Href();
protected:

View File

@ -23,7 +23,10 @@ EXPORTS.mozilla.dom += [
'SVGAnimateTransformElement.h',
'SVGAnimatedAngle.h',
'SVGAnimatedBoolean.h',
'SVGAnimatedEnumeration.h',
'SVGAnimatedInteger.h',
'SVGAnimatedLength.h',
'SVGAnimatedNumber.h',
'SVGAnimatedRect.h',
'SVGAnimatedString.h',
'SVGAnimatedTransformList.h',
@ -116,8 +119,11 @@ CPP_SOURCES += [
'SVGAnimateTransformElement.cpp',
'SVGAnimatedAngle.cpp',
'SVGAnimatedBoolean.cpp',
'SVGAnimatedEnumeration.cpp',
'SVGAnimatedInteger.cpp',
'SVGAnimatedLength.cpp',
'SVGAnimatedLengthList.cpp',
'SVGAnimatedNumber.cpp',
'SVGAnimatedNumberList.cpp',
'SVGAnimatedPathSegList.cpp',
'SVGAnimatedPointList.cpp',

View File

@ -12,19 +12,7 @@
#include "SMILEnumType.h"
using namespace mozilla;
NS_SVG_VAL_IMPL_CYCLE_COLLECTION(nsSVGEnum::DOMAnimatedEnum, mSVGElement)
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsSVGEnum::DOMAnimatedEnum)
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsSVGEnum::DOMAnimatedEnum)
DOMCI_DATA(SVGAnimatedEnumeration, nsSVGEnum::DOMAnimatedEnum)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsSVGEnum::DOMAnimatedEnum)
NS_INTERFACE_MAP_ENTRY(nsIDOMSVGAnimatedEnumeration)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGAnimatedEnumeration)
NS_INTERFACE_MAP_END
using namespace mozilla::dom;
static nsSVGAttrTearoffTable<nsSVGEnum, nsSVGEnum::DOMAnimatedEnum>
sSVGAnimatedEnumTearoffTable;
@ -122,15 +110,7 @@ nsSVGEnum::SetAnimValue(uint16_t aValue, nsSVGElement *aSVGElement)
aSVGElement->DidAnimateEnum(mAttrEnum);
}
nsresult
nsSVGEnum::ToDOMAnimatedEnum(nsIDOMSVGAnimatedEnumeration **aResult,
nsSVGElement *aSVGElement)
{
*aResult = ToDOMAnimatedEnum(aSVGElement).get();
return NS_OK;
}
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
already_AddRefed<SVGAnimatedEnumeration>
nsSVGEnum::ToDOMAnimatedEnum(nsSVGElement* aSVGElement)
{
nsRefPtr<DOMAnimatedEnum> domAnimatedEnum =

View File

@ -13,6 +13,7 @@
#include "nsISMILAttr.h"
#include "nsSVGElement.h"
#include "mozilla/Attributes.h"
#include "mozilla/dom/SVGAnimatedEnumeration.h"
class nsIAtom;
class nsSMILValue;
@ -53,10 +54,7 @@ public:
bool IsExplicitlySet() const
{ return mIsAnimated || mIsBaseSet; }
nsresult ToDOMAnimatedEnum(nsIDOMSVGAnimatedEnumeration **aResult,
nsSVGElement* aSVGElement);
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
already_AddRefed<mozilla::dom::SVGAnimatedEnumeration>
ToDOMAnimatedEnum(nsSVGElement* aSVGElement);
// Returns a new nsISMILAttr object that the caller must delete
@ -72,30 +70,33 @@ private:
nsSVGEnumMapping *GetMapping(nsSVGElement *aSVGElement);
public:
struct DOMAnimatedEnum MOZ_FINAL : public nsIDOMSVGAnimatedEnumeration
struct DOMAnimatedEnum MOZ_FINAL : public mozilla::dom::SVGAnimatedEnumeration
{
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(DOMAnimatedEnum)
DOMAnimatedEnum(nsSVGEnum* aVal, nsSVGElement *aSVGElement)
: mVal(aVal), mSVGElement(aSVGElement) {}
: mozilla::dom::SVGAnimatedEnumeration(aSVGElement)
, mVal(aVal)
{}
virtual ~DOMAnimatedEnum();
nsSVGEnum *mVal; // kept alive because it belongs to content
nsRefPtr<nsSVGElement> mSVGElement;
NS_IMETHOD GetBaseVal(uint16_t* aResult) MOZ_OVERRIDE
{ *aResult = mVal->GetBaseValue(); return NS_OK; }
NS_IMETHOD SetBaseVal(uint16_t aValue) MOZ_OVERRIDE
{ return mVal->SetBaseValue(aValue, mSVGElement); }
// Script may have modified animation parameters or timeline -- DOM getters
// need to flush any resample requests to reflect these modifications.
NS_IMETHOD GetAnimVal(uint16_t* aResult) MOZ_OVERRIDE
using mozilla::dom::SVGAnimatedEnumeration::SetBaseVal;
virtual uint16_t BaseVal() MOZ_OVERRIDE
{
return mVal->GetBaseValue();
}
virtual void SetBaseVal(uint16_t aBaseVal,
mozilla::ErrorResult& aRv) MOZ_OVERRIDE
{
aRv = mVal->SetBaseValue(aBaseVal, mSVGElement);
}
virtual uint16_t AnimVal() MOZ_OVERRIDE
{
// Script may have modified animation parameters or timeline -- DOM
// getters need to flush any resample requests to reflect these
// modifications.
mSVGElement->FlushAnimations();
*aResult = mVal->GetAnimValue();
return NS_OK;
return mVal->GetAnimValue();
}
};

View File

@ -387,7 +387,7 @@ SVGComponentTransferFunctionElement::AttributeAffectsRendering(int32_t aNameSpac
//----------------------------------------------------------------------
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
already_AddRefed<SVGAnimatedEnumeration>
SVGComponentTransferFunctionElement::Type()
{
return mEnumAttributes[TYPE].ToDOMAnimatedEnum(this);
@ -400,31 +400,31 @@ SVGComponentTransferFunctionElement::TableValues()
&mNumberListAttributes[TABLEVALUES], this, TABLEVALUES);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGComponentTransferFunctionElement::Slope()
{
return mNumberAttributes[SLOPE].ToDOMAnimatedNumber(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGComponentTransferFunctionElement::Intercept()
{
return mNumberAttributes[INTERCEPT].ToDOMAnimatedNumber(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGComponentTransferFunctionElement::Amplitude()
{
return mNumberAttributes[AMPLITUDE].ToDOMAnimatedNumber(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGComponentTransferFunctionElement::Exponent()
{
return mNumberAttributes[EXPONENT].ToDOMAnimatedNumber(this);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
SVGComponentTransferFunctionElement::Offset()
{
return mNumberAttributes[OFFSET].ToDOMAnimatedNumber(this);

View File

@ -10,19 +10,7 @@
#include "SMILIntegerType.h"
using namespace mozilla;
NS_SVG_VAL_IMPL_CYCLE_COLLECTION(nsSVGInteger::DOMAnimatedInteger, mSVGElement)
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsSVGInteger::DOMAnimatedInteger)
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsSVGInteger::DOMAnimatedInteger)
DOMCI_DATA(SVGAnimatedInteger, nsSVGInteger::DOMAnimatedInteger)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsSVGInteger::DOMAnimatedInteger)
NS_INTERFACE_MAP_ENTRY(nsIDOMSVGAnimatedInteger)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGAnimatedInteger)
NS_INTERFACE_MAP_END
using namespace mozilla::dom;
/* Implementation */
@ -112,15 +100,7 @@ nsSVGInteger::SetAnimValue(int aValue, nsSVGElement *aSVGElement)
aSVGElement->DidAnimateInteger(mAttrEnum);
}
nsresult
nsSVGInteger::ToDOMAnimatedInteger(nsIDOMSVGAnimatedInteger **aResult,
nsSVGElement *aSVGElement)
{
*aResult = ToDOMAnimatedInteger(aSVGElement).get();
return NS_OK;
}
already_AddRefed<nsIDOMSVGAnimatedInteger>
already_AddRefed<SVGAnimatedInteger>
nsSVGInteger::ToDOMAnimatedInteger(nsSVGElement *aSVGElement)
{
nsRefPtr<DOMAnimatedInteger> domAnimatedInteger =

View File

@ -9,7 +9,7 @@
#include "nsAutoPtr.h"
#include "nsCycleCollectionParticipant.h"
#include "nsError.h"
#include "nsIDOMSVGAnimatedInteger.h"
#include "SVGAnimatedInteger.h"
#include "nsISMILAttr.h"
#include "nsSVGElement.h"
#include "mozilla/Attributes.h"
@ -53,10 +53,8 @@ public:
bool IsExplicitlySet() const
{ return mIsAnimated || mIsBaseSet; }
already_AddRefed<nsIDOMSVGAnimatedInteger>
already_AddRefed<mozilla::dom::SVGAnimatedInteger>
ToDOMAnimatedInteger(nsSVGElement* aSVGElement);
nsresult ToDOMAnimatedInteger(nsIDOMSVGAnimatedInteger **aResult,
nsSVGElement* aSVGElement);
// Returns a new nsISMILAttr object that the caller must delete
nsISMILAttr* ToSMILAttr(nsSVGElement* aSVGElement);
@ -69,30 +67,31 @@ private:
bool mIsBaseSet;
public:
struct DOMAnimatedInteger MOZ_FINAL : public nsIDOMSVGAnimatedInteger
struct DOMAnimatedInteger MOZ_FINAL : public mozilla::dom::SVGAnimatedInteger
{
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(DOMAnimatedInteger)
DOMAnimatedInteger(nsSVGInteger* aVal, nsSVGElement *aSVGElement)
: mVal(aVal), mSVGElement(aSVGElement) {}
DOMAnimatedInteger(nsSVGInteger* aVal, nsSVGElement* aSVGElement)
: mozilla::dom::SVGAnimatedInteger(aSVGElement)
, mVal(aVal)
{}
virtual ~DOMAnimatedInteger();
nsSVGInteger* mVal; // kept alive because it belongs to content
nsRefPtr<nsSVGElement> mSVGElement;
NS_IMETHOD GetBaseVal(int32_t* aResult) MOZ_OVERRIDE
{ *aResult = mVal->GetBaseValue(); return NS_OK; }
NS_IMETHOD SetBaseVal(int32_t aValue) MOZ_OVERRIDE
{ mVal->SetBaseValue(aValue, mSVGElement); return NS_OK; }
virtual int32_t BaseVal() MOZ_OVERRIDE
{
return mVal->GetBaseValue();
}
virtual void SetBaseVal(int32_t aValue) MOZ_OVERRIDE
{
mVal->SetBaseValue(aValue, mSVGElement);
}
// Script may have modified animation parameters or timeline -- DOM getters
// need to flush any resample requests to reflect these modifications.
NS_IMETHOD GetAnimVal(int32_t* aResult) MOZ_OVERRIDE
virtual int32_t AnimVal() MOZ_OVERRIDE
{
mSVGElement->FlushAnimations();
*aResult = mVal->GetAnimValue();
return NS_OK;
return mVal->GetAnimValue();
}
};

View File

@ -13,19 +13,7 @@
#include "SVGIntegerPairSMILType.h"
using namespace mozilla;
NS_SVG_VAL_IMPL_CYCLE_COLLECTION(nsSVGIntegerPair::DOMAnimatedInteger, mSVGElement)
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsSVGIntegerPair::DOMAnimatedInteger)
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsSVGIntegerPair::DOMAnimatedInteger)
DOMCI_DATA(SVGAnimatedIntegerPair, nsSVGIntegerPair::DOMAnimatedInteger)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsSVGIntegerPair::DOMAnimatedInteger)
NS_INTERFACE_MAP_ENTRY(nsIDOMSVGAnimatedInteger)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGAnimatedInteger)
NS_INTERFACE_MAP_END
using namespace mozilla::dom;
static nsSVGAttrTearoffTable<nsSVGIntegerPair, nsSVGIntegerPair::DOMAnimatedInteger>
sSVGFirstAnimatedIntegerTearoffTable;
@ -168,16 +156,7 @@ nsSVGIntegerPair::SetAnimValue(const int32_t aValue[2], nsSVGElement *aSVGElemen
aSVGElement->DidAnimateIntegerPair(mAttrEnum);
}
nsresult
nsSVGIntegerPair::ToDOMAnimatedInteger(nsIDOMSVGAnimatedInteger **aResult,
PairIndex aIndex,
nsSVGElement *aSVGElement)
{
*aResult = ToDOMAnimatedInteger(aIndex, aSVGElement).get();
return NS_OK;
}
already_AddRefed<nsIDOMSVGAnimatedInteger>
already_AddRefed<SVGAnimatedInteger>
nsSVGIntegerPair::ToDOMAnimatedInteger(PairIndex aIndex,
nsSVGElement* aSVGElement)
{

View File

@ -9,10 +9,10 @@
#include "nsAutoPtr.h"
#include "nsCycleCollectionParticipant.h"
#include "nsError.h"
#include "nsIDOMSVGAnimatedInteger.h"
#include "nsISMILAttr.h"
#include "nsSVGElement.h"
#include "mozilla/Attributes.h"
#include "mozilla/dom/SVGAnimatedInteger.h"
class nsSMILValue;
@ -59,10 +59,7 @@ public:
bool IsExplicitlySet() const
{ return mIsAnimated || mIsBaseSet; }
nsresult ToDOMAnimatedInteger(nsIDOMSVGAnimatedInteger **aResult,
PairIndex aIndex,
nsSVGElement* aSVGElement);
already_AddRefed<nsIDOMSVGAnimatedInteger>
already_AddRefed<mozilla::dom::SVGAnimatedInteger>
ToDOMAnimatedInteger(PairIndex aIndex,
nsSVGElement* aSVGElement);
// Returns a new nsISMILAttr object that the caller must delete
@ -77,34 +74,34 @@ private:
bool mIsBaseSet;
public:
struct DOMAnimatedInteger MOZ_FINAL : public nsIDOMSVGAnimatedInteger
struct DOMAnimatedInteger MOZ_FINAL : public mozilla::dom::SVGAnimatedInteger
{
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(DOMAnimatedInteger)
DOMAnimatedInteger(nsSVGIntegerPair* aVal, PairIndex aIndex, nsSVGElement *aSVGElement)
: mVal(aVal), mSVGElement(aSVGElement), mIndex(aIndex) {}
DOMAnimatedInteger(nsSVGIntegerPair* aVal, PairIndex aIndex,
nsSVGElement* aSVGElement)
: mozilla::dom::SVGAnimatedInteger(aSVGElement)
, mVal(aVal)
, mIndex(aIndex)
{}
virtual ~DOMAnimatedInteger();
nsSVGIntegerPair* mVal; // kept alive because it belongs to content
nsRefPtr<nsSVGElement> mSVGElement;
PairIndex mIndex; // are we the first or second integer
NS_IMETHOD GetBaseVal(int32_t* aResult) MOZ_OVERRIDE
{ *aResult = mVal->GetBaseValue(mIndex); return NS_OK; }
NS_IMETHOD SetBaseVal(int32_t aValue) MOZ_OVERRIDE
{
mVal->SetBaseValue(aValue, mIndex, mSVGElement);
return NS_OK;
}
virtual int32_t BaseVal() MOZ_OVERRIDE
{
return mVal->GetBaseValue(mIndex);
}
virtual void SetBaseVal(int32_t aValue) MOZ_OVERRIDE
{
mVal->SetBaseValue(aValue, mIndex, mSVGElement);
}
// Script may have modified animation parameters or timeline -- DOM getters
// need to flush any resample requests to reflect these modifications.
NS_IMETHOD GetAnimVal(int32_t* aResult) MOZ_OVERRIDE
virtual int32_t AnimVal() MOZ_OVERRIDE
{
mSVGElement->FlushAnimations();
*aResult = mVal->GetAnimValue(mIndex);
return NS_OK;
return mVal->GetAnimValue(mIndex);
}
};

View File

@ -14,6 +14,9 @@
#include "nsIDOMSVGNumber.h"
#include "mozilla/Attributes.h"
using namespace mozilla;
using namespace mozilla::dom;
class DOMSVGNumber MOZ_FINAL : public nsIDOMSVGNumber
{
public:
@ -33,22 +36,9 @@ private:
float mVal;
};
NS_SVG_VAL_IMPL_CYCLE_COLLECTION(nsSVGNumber2::DOMAnimatedNumber, mSVGElement)
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsSVGNumber2::DOMAnimatedNumber)
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsSVGNumber2::DOMAnimatedNumber)
NS_IMPL_ADDREF(DOMSVGNumber)
NS_IMPL_RELEASE(DOMSVGNumber)
DOMCI_DATA(SVGAnimatedNumber, nsSVGNumber2::DOMAnimatedNumber)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsSVGNumber2::DOMAnimatedNumber)
NS_INTERFACE_MAP_ENTRY(nsIDOMSVGAnimatedNumber)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGAnimatedNumber)
NS_INTERFACE_MAP_END
NS_INTERFACE_MAP_BEGIN(DOMSVGNumber)
NS_INTERFACE_MAP_ENTRY(nsIDOMSVGNumber)
NS_INTERFACE_MAP_ENTRY(nsISupports)
@ -150,7 +140,7 @@ nsSVGNumber2::SetAnimValue(float aValue, nsSVGElement *aSVGElement)
aSVGElement->DidAnimateNumber(mAttrEnum);
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
nsSVGNumber2::ToDOMAnimatedNumber(nsSVGElement* aSVGElement)
{
nsRefPtr<DOMAnimatedNumber> domAnimatedNumber =
@ -163,14 +153,6 @@ nsSVGNumber2::ToDOMAnimatedNumber(nsSVGElement* aSVGElement)
return domAnimatedNumber.forget();
}
nsresult
nsSVGNumber2::ToDOMAnimatedNumber(nsIDOMSVGAnimatedNumber **aResult,
nsSVGElement *aSVGElement)
{
*aResult = ToDOMAnimatedNumber(aSVGElement).get();
return NS_OK;
}
nsSVGNumber2::DOMAnimatedNumber::~DOMAnimatedNumber()
{
sSVGAnimatedNumberTearoffTable.RemoveTearoff(mVal);

View File

@ -9,11 +9,11 @@
#include "nsAutoPtr.h"
#include "nsCycleCollectionParticipant.h"
#include "nsError.h"
#include "nsIDOMSVGAnimatedNumber.h"
#include "nsISMILAttr.h"
#include "nsMathUtils.h"
#include "nsSVGElement.h"
#include "mozilla/Attributes.h"
#include "mozilla/dom/SVGAnimatedNumber.h"
class nsSMILValue;
@ -53,10 +53,8 @@ public:
bool IsExplicitlySet() const
{ return mIsAnimated || mIsBaseSet; }
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<mozilla::dom::SVGAnimatedNumber>
ToDOMAnimatedNumber(nsSVGElement* aSVGElement);
nsresult ToDOMAnimatedNumber(nsIDOMSVGAnimatedNumber **aResult,
nsSVGElement* aSVGElement);
// Returns a new nsISMILAttr object that the caller must delete
nsISMILAttr* ToSMILAttr(nsSVGElement* aSVGElement);
@ -69,36 +67,32 @@ private:
bool mIsBaseSet;
public:
struct DOMAnimatedNumber MOZ_FINAL : public nsIDOMSVGAnimatedNumber
struct DOMAnimatedNumber MOZ_FINAL : public mozilla::dom::SVGAnimatedNumber
{
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(DOMAnimatedNumber)
DOMAnimatedNumber(nsSVGNumber2* aVal, nsSVGElement *aSVGElement)
: mVal(aVal), mSVGElement(aSVGElement) {}
DOMAnimatedNumber(nsSVGNumber2* aVal, nsSVGElement* aSVGElement)
: mozilla::dom::SVGAnimatedNumber(aSVGElement)
, mVal(aVal)
{}
virtual ~DOMAnimatedNumber();
nsSVGNumber2* mVal; // kept alive because it belongs to content
nsRefPtr<nsSVGElement> mSVGElement;
NS_IMETHOD GetBaseVal(float* aResult) MOZ_OVERRIDE
{ *aResult = mVal->GetBaseValue(); return NS_OK; }
NS_IMETHOD SetBaseVal(float aValue) MOZ_OVERRIDE
{
if (!NS_finite(aValue)) {
return NS_ERROR_ILLEGAL_VALUE;
}
mVal->SetBaseValue(aValue, mSVGElement);
return NS_OK;
}
virtual float BaseVal() MOZ_OVERRIDE
{
return mVal->GetBaseValue();
}
virtual void SetBaseVal(float aValue) MOZ_OVERRIDE
{
MOZ_ASSERT(NS_finite(aValue));
mVal->SetBaseValue(aValue, mSVGElement);
}
// Script may have modified animation parameters or timeline -- DOM getters
// need to flush any resample requests to reflect these modifications.
NS_IMETHOD GetAnimVal(float* aResult) MOZ_OVERRIDE
virtual float AnimVal() MOZ_OVERRIDE
{
mSVGElement->FlushAnimations();
*aResult = mVal->GetAnimValue();
return NS_OK;
return mVal->GetAnimValue();
}
};

View File

@ -14,21 +14,7 @@
#include "SVGNumberPairSMILType.h"
using namespace mozilla;
NS_SVG_VAL_IMPL_CYCLE_COLLECTION(nsSVGNumberPair::DOMAnimatedNumber, mSVGElement)
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsSVGNumberPair::DOMAnimatedNumber)
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsSVGNumberPair::DOMAnimatedNumber)
DOMCI_DATA(SVGAnimatedNumberPair, nsSVGNumberPair::DOMAnimatedNumber)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsSVGNumberPair::DOMAnimatedNumber)
NS_INTERFACE_MAP_ENTRY(nsIDOMSVGAnimatedNumber)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGAnimatedNumber)
NS_INTERFACE_MAP_END
/* Implementation */
using namespace mozilla::dom;
static nsSVGAttrTearoffTable<nsSVGNumberPair, nsSVGNumberPair::DOMAnimatedNumber>
sSVGFirstAnimatedNumberTearoffTable;
@ -166,16 +152,7 @@ nsSVGNumberPair::SetAnimValue(const float aValue[2], nsSVGElement *aSVGElement)
aSVGElement->DidAnimateNumberPair(mAttrEnum);
}
nsresult
nsSVGNumberPair::ToDOMAnimatedNumber(nsIDOMSVGAnimatedNumber** aResult,
PairIndex aIndex,
nsSVGElement* aSVGElement)
{
*aResult = ToDOMAnimatedNumber(aIndex, aSVGElement).get();
return NS_OK;
}
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<SVGAnimatedNumber>
nsSVGNumberPair::ToDOMAnimatedNumber(PairIndex aIndex,
nsSVGElement* aSVGElement)
{

View File

@ -9,11 +9,11 @@
#include "nsAutoPtr.h"
#include "nsCycleCollectionParticipant.h"
#include "nsError.h"
#include "nsIDOMSVGAnimatedNumber.h"
#include "nsISMILAttr.h"
#include "nsMathUtils.h"
#include "nsSVGElement.h"
#include "mozilla/Attributes.h"
#include "mozilla/dom/SVGAnimatedNumber.h"
class nsSMILValue;
@ -60,10 +60,7 @@ public:
bool IsExplicitlySet() const
{ return mIsAnimated || mIsBaseSet; }
nsresult ToDOMAnimatedNumber(nsIDOMSVGAnimatedNumber** aResult,
PairIndex aIndex,
nsSVGElement* aSVGElement);
already_AddRefed<nsIDOMSVGAnimatedNumber>
already_AddRefed<mozilla::dom::SVGAnimatedNumber>
ToDOMAnimatedNumber(PairIndex aIndex,
nsSVGElement* aSVGElement);
// Returns a new nsISMILAttr object that the caller must delete
@ -78,37 +75,34 @@ private:
bool mIsBaseSet;
public:
struct DOMAnimatedNumber MOZ_FINAL : public nsIDOMSVGAnimatedNumber
struct DOMAnimatedNumber MOZ_FINAL : public mozilla::dom::SVGAnimatedNumber
{
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(DOMAnimatedNumber)
DOMAnimatedNumber(nsSVGNumberPair* aVal, PairIndex aIndex, nsSVGElement *aSVGElement)
: mVal(aVal), mSVGElement(aSVGElement), mIndex(aIndex) {}
: mozilla::dom::SVGAnimatedNumber(aSVGElement)
, mVal(aVal)
, mIndex(aIndex)
{}
virtual ~DOMAnimatedNumber();
nsSVGNumberPair* mVal; // kept alive because it belongs to content
nsRefPtr<nsSVGElement> mSVGElement;
PairIndex mIndex; // are we the first or second number
NS_IMETHOD GetBaseVal(float* aResult) MOZ_OVERRIDE
{ *aResult = mVal->GetBaseValue(mIndex); return NS_OK; }
NS_IMETHOD SetBaseVal(float aValue) MOZ_OVERRIDE
{
if (!NS_finite(aValue)) {
return NS_ERROR_ILLEGAL_VALUE;
}
mVal->SetBaseValue(aValue, mIndex, mSVGElement);
return NS_OK;
}
virtual float BaseVal() MOZ_OVERRIDE
{
return mVal->GetBaseValue(mIndex);
}
virtual void SetBaseVal(float aValue) MOZ_OVERRIDE
{
MOZ_ASSERT(NS_finite(aValue));
mVal->SetBaseValue(aValue, mIndex, mSVGElement);
}
// Script may have modified animation parameters or timeline -- DOM getters
// need to flush any resample requests to reflect these modifications.
NS_IMETHOD GetAnimVal(float* aResult) MOZ_OVERRIDE
virtual float AnimVal() MOZ_OVERRIDE
{
mSVGElement->FlushAnimations();
*aResult = mVal->GetAnimValue(mIndex);
return NS_OK;
return mVal->GetAnimValue(mIndex);
}
};

View File

@ -183,9 +183,6 @@
#include "nsIDOMXPathResult.h"
#include "nsIDOMMozBrowserFrame.h"
#include "nsIDOMSVGAnimatedEnum.h"
#include "nsIDOMSVGAnimatedInteger.h"
#include "nsIDOMSVGAnimatedNumber.h"
#include "nsIDOMSVGLength.h"
#include "nsIDOMSVGNumber.h"
@ -222,7 +219,6 @@
#include "HTMLLegendElement.h"
#include "mozilla/dom/indexedDB/IDBWrapperCache.h"
#include "mozilla/dom/indexedDB/IDBFileHandle.h"
#include "mozilla/dom/indexedDB/IDBRequest.h"
#include "mozilla/dom/indexedDB/IDBDatabase.h"
#include "mozilla/dom/indexedDB/IDBEvents.h"
@ -313,11 +309,6 @@ static const char kDOMStringBundleURL[] =
nsIXPCScriptable::IS_GLOBAL_OBJECT | \
nsIXPCScriptable::WANT_OUTER_OBJECT)
// We need to let JavaScript QI elements to interfaces that are not in
// the classinfo since XBL can be used to dynamically implement new
// unknown interfaces on elements, accessibility relies on this being
// possible.
#define ARRAY_SCRIPTABLE_FLAGS \
(DOM_DEFAULT_SCRIPTABLE_FLAGS | \
nsIXPCScriptable::WANT_GETPROPERTY | \
@ -577,12 +568,6 @@ static nsDOMClassInfoData sClassInfoData[] = {
DOM_DEFAULT_SCRIPTABLE_FLAGS)
// other SVG classes
NS_DEFINE_CLASSINFO_DATA(SVGAnimatedEnumeration, nsDOMGenericSH,
DOM_DEFAULT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(SVGAnimatedInteger, nsDOMGenericSH,
DOM_DEFAULT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(SVGAnimatedNumber, nsDOMGenericSH,
DOM_DEFAULT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(SVGLength, nsDOMGenericSH,
DOM_DEFAULT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(SVGNumber, nsDOMGenericSH,
@ -686,8 +671,6 @@ static nsDOMClassInfoData sClassInfoData[] = {
NS_DEFINE_CHROME_ONLY_CLASSINFO_DATA(ChromeMessageSender, nsDOMGenericSH,
DOM_DEFAULT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA_WITH_NAME(IDBFileHandle, FileHandle, nsEventTargetSH,
EVENTTARGET_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(IDBRequest, IDBEventTargetSH,
IDBEVENTTARGET_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(IDBDatabase, IDBEventTargetSH,
@ -1519,18 +1502,6 @@ nsDOMClassInfo::Init()
// The SVG document
// other SVG classes
DOM_CLASSINFO_MAP_BEGIN(SVGAnimatedEnumeration, nsIDOMSVGAnimatedEnumeration)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedEnumeration)
DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(SVGAnimatedInteger, nsIDOMSVGAnimatedInteger)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedInteger)
DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(SVGAnimatedNumber, nsIDOMSVGAnimatedNumber)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedNumber)
DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(SVGLength, nsIDOMSVGLength)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGLength)
DOM_CLASSINFO_MAP_END
@ -1672,11 +1643,6 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_ENTRY(nsIMessageSender)
DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(IDBFileHandle, nsIDOMFileHandle)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMFileHandle)
DOM_CLASSINFO_MAP_ENTRY(nsIIDBFileHandle)
DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(IDBRequest, nsIIDBRequest)
DOM_CLASSINFO_MAP_ENTRY(nsIIDBRequest)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)

View File

@ -74,9 +74,6 @@ DOMCI_CLASS(CSSMozDocumentRule)
DOMCI_CLASS(CSSSupportsRule)
// other SVG classes
DOMCI_CLASS(SVGAnimatedEnumeration)
DOMCI_CLASS(SVGAnimatedInteger)
DOMCI_CLASS(SVGAnimatedNumber)
DOMCI_CLASS(SVGLength)
DOMCI_CLASS(SVGNumber)
@ -134,7 +131,6 @@ DOMCI_CLASS(ContentFrameMessageManager)
DOMCI_CLASS(ChromeMessageBroadcaster)
DOMCI_CLASS(ChromeMessageSender)
DOMCI_CLASS(IDBFileHandle)
DOMCI_CLASS(IDBRequest)
DOMCI_CLASS(IDBDatabase)
DOMCI_CLASS(IDBObjectStore)

View File

@ -4061,11 +4061,10 @@ nsGlobalWindow::CSSToDevIntPixels(nsIntSize px)
presContext->CSSPixelsToDevPixels(px.height));
}
NS_IMETHODIMP
nsGlobalWindow::GetInnerWidth(int32_t* aInnerWidth)
nsresult
nsGlobalWindow::GetInnerSize(CSSIntSize& aSize)
{
FORWARD_TO_OUTER(GetInnerWidth, (aInnerWidth), NS_ERROR_NOT_INITIALIZED);
MOZ_ASSERT(IsOuterWindow());
EnsureSizeUpToDate();
@ -4075,17 +4074,29 @@ nsGlobalWindow::GetInnerWidth(int32_t* aInnerWidth)
mDocShell->GetPresContext(getter_AddRefs(presContext));
nsRefPtr<nsIPresShell> presShell = mDocShell->GetPresShell();
if (presContext && presShell) {
nsRefPtr<nsViewManager> viewManager = presShell->GetViewManager();
if (viewManager) {
viewManager->FlushDelayedResize(false);
}
nsRect shellArea = presContext->GetVisibleArea();
*aInnerWidth = nsPresContext::AppUnitsToIntCSSPixels(shellArea.width);
} else {
*aInnerWidth = 0;
if (!presContext || !presShell) {
aSize = CSSIntSize(0, 0);
return NS_OK;
}
nsRefPtr<nsViewManager> viewManager = presShell->GetViewManager();
if (viewManager) {
viewManager->FlushDelayedResize(false);
}
aSize = CSSIntRect::FromAppUnitsRounded(presContext->GetVisibleArea().Size());
return NS_OK;
}
NS_IMETHODIMP
nsGlobalWindow::GetInnerWidth(int32_t* aInnerWidth)
{
FORWARD_TO_OUTER(GetInnerWidth, (aInnerWidth), NS_ERROR_NOT_INITIALIZED);
CSSIntSize size;
nsresult rv = GetInnerSize(size);
NS_ENSURE_SUCCESS(rv, rv);
*aInnerWidth = size.width;
return NS_OK;
}
@ -4140,24 +4151,11 @@ nsGlobalWindow::GetInnerHeight(int32_t* aInnerHeight)
{
FORWARD_TO_OUTER(GetInnerHeight, (aInnerHeight), NS_ERROR_NOT_INITIALIZED);
EnsureSizeUpToDate();
CSSIntSize size;
nsresult rv = GetInnerSize(size);
NS_ENSURE_SUCCESS(rv, rv);
NS_ENSURE_STATE(mDocShell);
nsRefPtr<nsPresContext> presContext;
mDocShell->GetPresContext(getter_AddRefs(presContext));
nsRefPtr<nsIPresShell> presShell = mDocShell->GetPresShell();
if (presContext && presShell) {
nsRefPtr<nsViewManager> viewManager = presShell->GetViewManager();
if (viewManager) {
viewManager->FlushDelayedResize(false);
}
nsRect shellArea = presContext->GetVisibleArea();
*aInnerHeight = nsPresContext::AppUnitsToIntCSSPixels(shellArea.height);
} else {
*aInnerHeight = 0;
}
*aInnerHeight = size.height;
return NS_OK;
}
@ -6036,11 +6034,19 @@ nsGlobalWindow::GetTopWindowRoot()
NS_IMETHODIMP
nsGlobalWindow::Scroll(int32_t aXScroll, int32_t aYScroll)
{
return ScrollTo(aXScroll, aYScroll);
ScrollTo(CSSIntPoint(aXScroll, aYScroll));
return NS_OK;
}
NS_IMETHODIMP
nsGlobalWindow::ScrollTo(int32_t aXScroll, int32_t aYScroll)
{
ScrollTo(CSSIntPoint(aXScroll, aYScroll));
return NS_OK;
}
void
nsGlobalWindow::ScrollTo(const CSSIntPoint& aScroll)
{
FlushPendingNotifications(Flush_Layout);
nsIScrollableFrame *sf = GetScrollFrame();
@ -6048,22 +6054,21 @@ nsGlobalWindow::ScrollTo(int32_t aXScroll, int32_t aYScroll)
if (sf) {
// Here we calculate what the max pixel value is that we can
// scroll to, we do this by dividing maxint with the pixel to
// twips conversion factor, and substracting 4, the 4 comes from
// twips conversion factor, and subtracting 4, the 4 comes from
// experimenting with this value, anything less makes the view
// code not scroll correctly, I have no idea why. -- jst
const int32_t maxpx = nsPresContext::AppUnitsToIntCSSPixels(0x7fffffff) - 4;
if (aXScroll > maxpx) {
aXScroll = maxpx;
CSSIntPoint scroll(aScroll);
if (scroll.x > maxpx) {
scroll.x = maxpx;
}
if (aYScroll > maxpx) {
aYScroll = maxpx;
if (scroll.y > maxpx) {
scroll.y = maxpx;
}
sf->ScrollToCSSPixels(nsIntPoint(aXScroll, aYScroll));
sf->ScrollToCSSPixels(scroll);
}
return NS_OK;
}
NS_IMETHODIMP
@ -6073,12 +6078,13 @@ nsGlobalWindow::ScrollBy(int32_t aXScrollDif, int32_t aYScrollDif)
nsIScrollableFrame *sf = GetScrollFrame();
if (sf) {
nsPoint scrollPos = sf->GetScrollPosition();
CSSIntPoint scrollPos =
CSSIntPoint::FromAppUnitsRounded(sf->GetScrollPosition()) +
CSSIntPoint(aXScrollDif, aYScrollDif);
// It seems like it would make more sense for ScrollBy to use
// SMOOTH mode, but tests seem to depend on the synchronous behaviour.
// Perhaps Web content does too.
return ScrollTo(nsPresContext::AppUnitsToIntCSSPixels(scrollPos.x) + aXScrollDif,
nsPresContext::AppUnitsToIntCSSPixels(scrollPos.y) + aYScrollDif);
ScrollTo(scrollPos);
}
return NS_OK;
@ -10855,6 +10861,8 @@ nsGlobalWindow::FlushPendingNotifications(mozFlushType aType)
void
nsGlobalWindow::EnsureSizeUpToDate()
{
MOZ_ASSERT(IsOuterWindow());
// If we're a subframe, make sure our size is up to date. It's OK that this
// crosses the content/chrome boundary, since chrome can have pending reflows
// too.

View File

@ -65,6 +65,7 @@
#include "nsIDocument.h"
#include "mozilla/dom/EventTarget.h"
#include "Units.h"
// JS includes
#include "jsapi.h"
@ -442,6 +443,7 @@ public:
void DispatchDOMWindowCreated();
virtual NS_HIDDEN_(void) SetOpenerWindow(nsIDOMWindow* aOpener,
bool aOriginalOpener);
// Outer windows only.
virtual NS_HIDDEN_(void) EnsureSizeUpToDate();
virtual NS_HIDDEN_(nsIDOMWindow*) EnterModalState();
@ -996,10 +998,15 @@ protected:
bool aDoFlush);
nsresult GetScrollMaxXY(int32_t* aScrollMaxX, int32_t* aScrollMaxY);
// Outer windows only.
nsresult GetInnerSize(mozilla::CSSIntSize& aSize);
nsresult GetOuterSize(nsIntSize* aSizeCSSPixels);
nsresult SetOuterSize(int32_t aLengthCSSPixels, bool aIsWidth);
nsRect GetInnerScreenRect();
void ScrollTo(const mozilla::CSSIntPoint& aScroll);
bool IsFrame()
{
return GetParentInternal() != nullptr;

View File

@ -636,6 +636,8 @@ NativeInterface2JSObjectAndThrowIfFailed(JSContext* aCx,
bool
TryPreserveWrapper(JSObject* obj)
{
MOZ_ASSERT(IsDOMObject(obj));
if (nsISupports* native = UnwrapDOMObjectToISupports(obj)) {
nsWrapperCache* cache = nullptr;
CallQueryInterface(native, &cache);

View File

@ -557,6 +557,10 @@ DOMInterfaces = {
'nativeType': 'mozilla::dom::indexedDB::IDBFactory',
},
'IDBFileHandle': {
'nativeType': 'mozilla::dom::indexedDB::IDBFileHandle',
},
'IDBVersionChangeEvent': {
'nativeType': 'mozilla::dom::indexedDB::IDBVersionChangeEvent',
'headerFile': 'IDBEvents.h',
@ -1625,6 +1629,7 @@ addExternalIface('File')
addExternalIface('FileCallback', nativeType='nsIFileCallback',
headerFile='nsIDOMHTMLCanvasElement.h')
addExternalIface('HitRegionOptions', nativeType='nsISupports')
addExternalIface('IDBDatabase', nativeType='nsIIDBDatabase')
addExternalIface('IDBOpenDBRequest', nativeType='nsIIDBOpenDBRequest')
addExternalIface('imgINotificationObserver', nativeType='imgINotificationObserver')
addExternalIface('imgIRequest', nativeType='imgIRequest', notflattened=True)
@ -1658,8 +1663,6 @@ addExternalIface('PrintCallback', nativeType='nsIPrintCallback',
headerFile='nsIDOMHTMLCanvasElement.h')
addExternalIface('Selection', nativeType='nsISelection')
addExternalIface('StyleSheetList')
addExternalIface('SVGAnimatedEnumeration', headerFile='nsIDOMSVGAnimatedEnum.h')
addExternalIface('SVGAnimatedNumber')
addExternalIface('SVGLength')
addExternalIface('SVGNumber')
addExternalIface('TouchList', headerFile='nsIDOMTouchEvent.h')

View File

@ -10,8 +10,7 @@ relativesrcdir = @relativesrcdir@
include $(DEPTH)/config/autoconf.mk
TEST_FILES = \
MOCHITEST_FILES := \
test_ipc.html \
../test/devicestorage_common.js \
$(NULL)
@ -20,7 +19,3 @@ TEST_FILES = \
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk
include $(topsrcdir)/config/rules.mk
libs:: $(TEST_FILES)
$(INSTALL) $(foreach f,$^,"$f") \
$(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)\

View File

@ -7,8 +7,8 @@
#include "IDBFileHandle.h"
#include "mozilla/dom/file/File.h"
#include "mozilla/dom/IDBFileHandleBinding.h"
#include "mozilla/dom/quota/FileStreams.h"
#include "nsDOMClassInfoID.h"
#include "IDBDatabase.h"
@ -35,6 +35,13 @@ GetFileFor(FileInfo* aFileInfo)
} // anonymous namespace
// virtual
JSObject*
IDBFileHandle::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
{
return IDBFileHandleBinding::Wrap(aCx, aScope, this);
}
// static
already_AddRefed<IDBFileHandle>
IDBFileHandle::Create(IDBDatabase* aDatabase,
@ -99,24 +106,13 @@ IDBFileHandle::CreateFileObject(mozilla::dom::file::LockedFile* aLockedFile,
return file.forget();
}
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(IDBFileHandle)
NS_INTERFACE_MAP_ENTRY(nsIIDBFileHandle)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(IDBFileHandle)
NS_INTERFACE_MAP_END_INHERITING(FileHandle)
NS_IMPL_ADDREF_INHERITED(IDBFileHandle, FileHandle)
NS_IMPL_RELEASE_INHERITED(IDBFileHandle, FileHandle)
DOMCI_DATA(IDBFileHandle, IDBFileHandle)
NS_IMETHODIMP
IDBFileHandle::GetDatabase(nsIIDBDatabase** aDatabase)
nsIIDBDatabase*
IDBFileHandle::Database()
{
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
nsCOMPtr<nsIIDBDatabase> database = do_QueryInterface(mFileStorage);
NS_ASSERTION(database, "This should always succeed!");
IDBDatabase* database = static_cast<IDBDatabase*>(mFileStorage.get());
MOZ_ASSERT(database);
database.forget(aDatabase);
return NS_OK;
return database;
}

View File

@ -9,19 +9,18 @@
#include "IndexedDatabase.h"
#include "nsIIDBFileHandle.h"
#include "mozilla/dom/file/FileHandle.h"
#include "mozilla/dom/indexedDB/FileInfo.h"
class nsIIDBDatabase;
BEGIN_INDEXEDDB_NAMESPACE
class IDBFileHandle : public mozilla::dom::file::FileHandle,
public nsIIDBFileHandle
class IDBFileHandle : public mozilla::dom::file::FileHandle
{
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIIDBFILEHANDLE
virtual JSObject*
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
NS_IMETHOD_(int64_t)
GetFileId()
@ -46,6 +45,8 @@ public:
CreateFileObject(mozilla::dom::file::LockedFile* aLockedFile,
uint32_t aFileSize);
nsIIDBDatabase* Database();
private:
IDBFileHandle()
{ }

View File

@ -11,7 +11,6 @@ XPIDL_SOURCES += [
'nsIIDBCursor.idl',
'nsIIDBCursorWithValue.idl',
'nsIIDBDatabase.idl',
'nsIIDBFileHandle.idl',
'nsIIDBIndex.idl',
'nsIIDBKeyRange.idl',
'nsIIDBObjectStore.idl',

View File

@ -1,15 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* 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 "nsISupports.idl"
interface nsIIDBDatabase;
[scriptable, builtinclass, uuid(7b05f6bb-26b0-4c12-a9a1-e31dd933deb8)]
interface nsIIDBFileHandle : nsISupports
{
readonly attribute nsIIDBDatabase database;
};

View File

@ -6,7 +6,6 @@
XPIDL_SOURCES += [
'nsIDOMSVGAnimatedEnum.idl',
'nsIDOMSVGAnimatedInteger.idl',
'nsIDOMSVGAnimatedNumber.idl',
'nsIDOMSVGElement.idl',
'nsIDOMSVGLength.idl',

View File

@ -1,25 +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 nsIDOMSVGAnimatedNumber interface is the interface to an SVG
* Animated Integer.
*
* For more information on this interface please see
* http://www.w3.org/TR/SVG11/types.html
*
*/
[scriptable, uuid(7b196db6-955e-4a9f-8f42-645ebc2ce938)]
interface nsIDOMSVGAnimatedInteger : nsISupports
{
attribute long baseVal;
// raises DOMException on setting
readonly attribute long animVal;
};

View File

@ -1,19 +0,0 @@
# 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/.
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DISABLED_EXTRA_COMPONENTS = \
PermissionSettings.js \
PermissionSettings.manifest \
PermissionPromptService.js \
PermissionPromptService.manifest \
$(NULL)
include $(topsrcdir)/config/rules.mk

Some files were not shown because too many files have changed in this diff Show More