зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1427512 - Part 23: Remove nsIDOMCounter. r=xidorn,bz
It's not actually implemented. Since we never return any Counter object, and to avoid exposing a Counter Web IDL interface object, we declare getCounterValue() to return void (since it always throws). MozReview-Commit-ID: JGvYtPmyeSp
This commit is contained in:
Родитель
e3549b2d1c
Коммит
eb5c3b0f3a
|
@ -1724,7 +1724,6 @@ def addExternalIface(iface, nativeType=None, headerFile=None,
|
|||
addExternalIface('ApplicationCache', nativeType='nsIDOMOfflineResourceList')
|
||||
addExternalIface('Cookie', nativeType='nsICookie2',
|
||||
headerFile='nsICookie2.h', notflattened=True)
|
||||
addExternalIface('Counter')
|
||||
addExternalIface('RTCDataChannel', nativeType='nsIDOMDataChannel')
|
||||
addExternalIface('HitRegionOptions', nativeType='nsISupports')
|
||||
addExternalIface('imgINotificationObserver', nativeType='imgINotificationObserver')
|
||||
|
|
|
@ -60,7 +60,6 @@ interface nsIDOMHTMLHeadElement;
|
|||
interface nsIDOMCSSValue;
|
||||
interface nsIDOMCSSPrimitiveValue;
|
||||
interface nsIDOMCSSStyleDeclaration;
|
||||
interface nsIDOMCounter;
|
||||
interface nsIDOMRect;
|
||||
|
||||
// Range
|
||||
|
|
|
@ -8,7 +8,6 @@ with Files("**"):
|
|||
BUG_COMPONENT = ("Core", "DOM: CSS Object Model")
|
||||
|
||||
XPIDL_SOURCES += [
|
||||
'nsIDOMCounter.idl',
|
||||
'nsIDOMCSSPrimitiveValue.idl',
|
||||
'nsIDOMCSSStyleDeclaration.idl',
|
||||
'nsIDOMCSSValue.idl',
|
||||
|
|
|
@ -55,8 +55,6 @@ interface nsIDOMCSSPrimitiveValue : nsIDOMCSSValue
|
|||
raises(DOMException);
|
||||
DOMString getStringValue()
|
||||
raises(DOMException);
|
||||
nsIDOMCounter getCounterValue()
|
||||
raises(DOMException);
|
||||
nsIDOMRect getRectValue()
|
||||
raises(DOMException);
|
||||
};
|
||||
|
|
|
@ -1,14 +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"
|
||||
|
||||
[scriptable, uuid(31adb439-0055-402d-9b1d-d5ca94f3f55b)]
|
||||
interface nsIDOMCounter : nsISupports
|
||||
{
|
||||
readonly attribute DOMString identifier;
|
||||
readonly attribute DOMString listStyle;
|
||||
readonly attribute DOMString separator;
|
||||
};
|
|
@ -4,8 +4,6 @@
|
|||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
interface Counter;
|
||||
|
||||
interface CSSPrimitiveValue : CSSValue {
|
||||
|
||||
// UnitTypes
|
||||
|
@ -48,7 +46,7 @@ interface CSSPrimitiveValue : CSSValue {
|
|||
[Throws]
|
||||
DOMString getStringValue();
|
||||
[Throws]
|
||||
Counter getCounterValue();
|
||||
void getCounterValue(); // always throws
|
||||
[Throws]
|
||||
Rect getRectValue();
|
||||
[Throws]
|
||||
|
|
|
@ -475,26 +475,18 @@ nsROCSSPrimitiveValue::GetStringValue(nsAString& aReturn)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
nsROCSSPrimitiveValue::GetCounterValue(ErrorResult& aRv)
|
||||
{
|
||||
aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
void
|
||||
nsROCSSPrimitiveValue::GetStringValue(nsString& aString, ErrorResult& aRv)
|
||||
{
|
||||
aRv = GetStringValue(aString);
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsROCSSPrimitiveValue::GetCounterValue(nsIDOMCounter** aReturn)
|
||||
{
|
||||
return NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR;
|
||||
}
|
||||
|
||||
already_AddRefed<nsIDOMCounter>
|
||||
nsROCSSPrimitiveValue::GetCounterValue(ErrorResult& aRv)
|
||||
{
|
||||
aRv.Throw(NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsDOMCSSRect*
|
||||
nsROCSSPrimitiveValue::GetRectValue(ErrorResult& aRv)
|
||||
{
|
||||
|
|
|
@ -72,7 +72,7 @@ public:
|
|||
void GetStringValue(nsString& aString, mozilla::ErrorResult& aRv);
|
||||
void SetStringValue(uint16_t aUnitType, const nsAString& aString,
|
||||
mozilla::ErrorResult& aRv);
|
||||
already_AddRefed<nsIDOMCounter> GetCounterValue(mozilla::ErrorResult& aRv);
|
||||
void GetCounterValue(mozilla::ErrorResult& aRv);
|
||||
nsDOMCSSRect* GetRectValue(mozilla::ErrorResult& aRv);
|
||||
nsDOMCSSRGBColor *GetRGBColorValue(mozilla::ErrorResult& aRv);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче