зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1427419 - Part 10: Remove unused nsIDOMUtils.colorNameToRGB. r=bz
MozReview-Commit-ID: 962UjCZqX6I
This commit is contained in:
Родитель
f5ef2d0a72
Коммит
6e85270511
|
@ -38,18 +38,6 @@ dictionary PropertyNamesOptions {
|
|||
boolean includeAliases = false;
|
||||
};
|
||||
|
||||
dictionary InspectorRGBTriple {
|
||||
/*
|
||||
* NOTE: Using octet for RGB components is not generally OK, because
|
||||
* they can be outside the 0-255 range, but for backwards-compatible
|
||||
* named colors (which is what we use this dictionary for) the 0-255
|
||||
* assumption is fine.
|
||||
*/
|
||||
octet r = 0;
|
||||
octet g = 0;
|
||||
octet b = 0;
|
||||
};
|
||||
|
||||
dictionary InspectorRGBATuple {
|
||||
/*
|
||||
* NOTE: This tuple is in the normal 0-255-sized RGB space but can be
|
||||
|
|
|
@ -858,27 +858,6 @@ InspectorUtils::GetCSSValuesForProperty(GlobalObject& aGlobalObject,
|
|||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
NS_IMETHODIMP
|
||||
inDOMUtils::ColorNameToRGB(const nsAString& aColorName, JSContext* aCx,
|
||||
JS::MutableHandle<JS::Value> aValue)
|
||||
{
|
||||
nscolor color;
|
||||
if (!NS_ColorNameToRGB(aColorName, &color)) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
InspectorRGBTriple triple;
|
||||
triple.mR = NS_GET_R(color);
|
||||
triple.mG = NS_GET_G(color);
|
||||
triple.mB = NS_GET_B(color);
|
||||
|
||||
if (!ToJSValue(aCx, triple, aValue)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
inDOMUtils::RgbToColorName(uint8_t aR, uint8_t aG, uint8_t aB,
|
||||
nsAString& aColorName)
|
||||
|
|
|
@ -21,8 +21,6 @@ interface nsIDOMCSSStyleSheet;
|
|||
interface inIDOMUtils : nsISupports
|
||||
{
|
||||
// Utilities for working with CSS colors
|
||||
[implicit_jscontext]
|
||||
jsval colorNameToRGB(in DOMString aColorName);
|
||||
AString rgbToColorName(in octet aR, in octet aG, in octet aB);
|
||||
|
||||
// Convert a given CSS color string to rgba. Returns null on failure or an
|
||||
|
|
Загрузка…
Ссылка в новой задаче