mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 927892 - Add the CanvasRenderingContext2D.filter property, preffed off by default behind canvas.filters.enabled. r=roc, r=smaug
--HG-- extra : rebase_source : d80516906bea090c4db0d5419342f470cbe8f1b4
This commit is contained in:
parent
ffbff9909d
commit
5912e033b8
@ -1610,6 +1610,16 @@ CanvasRenderingContext2D::SetShadowColor(const nsAString& shadowColor)
|
||||
CurrentState().shadowColor = color;
|
||||
}
|
||||
|
||||
//
|
||||
// filters
|
||||
//
|
||||
|
||||
void
|
||||
CanvasRenderingContext2D::SetFilter(const nsAString& filter, ErrorResult& error)
|
||||
{
|
||||
CurrentState().filterString = filter;
|
||||
}
|
||||
|
||||
//
|
||||
// rects
|
||||
//
|
||||
|
@ -231,7 +231,13 @@ public:
|
||||
StyleColorToString(CurrentState().shadowColor, shadowColor);
|
||||
}
|
||||
|
||||
void GetFilter(nsAString& filter)
|
||||
{
|
||||
filter = CurrentState().filterString;
|
||||
}
|
||||
|
||||
void SetShadowColor(const nsAString& shadowColor);
|
||||
void SetFilter(const nsAString& filter, mozilla::ErrorResult& error);
|
||||
void ClearRect(double x, double y, double w, double h);
|
||||
void FillRect(double x, double y, double w, double h);
|
||||
void StrokeRect(double x, double y, double w, double h);
|
||||
@ -919,6 +925,7 @@ protected:
|
||||
fillRule(other.fillRule),
|
||||
lineCap(other.lineCap),
|
||||
lineJoin(other.lineJoin),
|
||||
filterString(other.filterString),
|
||||
imageSmoothingEnabled(other.imageSmoothingEnabled)
|
||||
{ }
|
||||
|
||||
@ -977,6 +984,7 @@ protected:
|
||||
mozilla::gfx::CapStyle lineCap;
|
||||
mozilla::gfx::JoinStyle lineJoin;
|
||||
|
||||
nsString filterString;
|
||||
bool imageSmoothingEnabled;
|
||||
};
|
||||
|
||||
|
@ -73,6 +73,9 @@ interface CanvasRenderingContext2D {
|
||||
attribute double shadowBlur; // (default 0)
|
||||
attribute DOMString shadowColor; // (default transparent black)
|
||||
|
||||
[Pref="canvas.filters.enabled", SetterThrows]
|
||||
attribute DOMString filter; // (default empty string = no filter)
|
||||
|
||||
// rects
|
||||
[LenientFloat]
|
||||
void clearRect(double x, double y, double w, double h);
|
||||
|
@ -621,6 +621,7 @@ pref("ui.scrollToClick", 0);
|
||||
pref("canvas.focusring.enabled", true);
|
||||
pref("canvas.customfocusring.enabled", false);
|
||||
pref("canvas.hitregions.enabled", false);
|
||||
pref("canvas.filters.enabled", false);
|
||||
// Add support for canvas path objects
|
||||
pref("canvas.path.enabled", true);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user