зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1334865 part 2. Remove the unused (and broken) asyncDrawXULElement API. r=smaug
This commit is contained in:
Родитель
35e52eaec1
Коммит
11a5929f8e
|
@ -55,9 +55,6 @@ CallWatcherFront.SETTER_FUNCTION = 2;
|
|||
CallWatcherFront.KNOWN_METHODS = {};
|
||||
|
||||
CallWatcherFront.KNOWN_METHODS.CanvasRenderingContext2D = {
|
||||
asyncDrawXULElement: {
|
||||
enums: new Set([6]),
|
||||
},
|
||||
drawWindow: {
|
||||
enums: new Set([6])
|
||||
},
|
||||
|
|
|
@ -5369,87 +5369,6 @@ CanvasRenderingContext2D::DrawWindow(nsGlobalWindow& aWindow, double aX,
|
|||
RedrawUser(gfxRect(0, 0, aW, aH));
|
||||
}
|
||||
|
||||
void
|
||||
CanvasRenderingContext2D::AsyncDrawXULElement(nsXULElement& aElem,
|
||||
double aX, double aY,
|
||||
double aW, double aH,
|
||||
const nsAString& aBgColor,
|
||||
uint32_t aFlags,
|
||||
SystemCallerGuarantee,
|
||||
ErrorResult& aError)
|
||||
{
|
||||
// XXXbz This should go away. Bug 1334865.
|
||||
#if 0
|
||||
nsCOMPtr<nsIFrameLoaderOwner> loaderOwner = do_QueryInterface(&elem);
|
||||
if (!loaderOwner) {
|
||||
aError.Throw(NS_ERROR_FAILURE);
|
||||
return;
|
||||
}
|
||||
|
||||
RefPtr<nsFrameLoader> frameloader = loaderOwner->GetFrameLoader();
|
||||
if (!frameloader) {
|
||||
aError.Throw(NS_ERROR_FAILURE);
|
||||
return;
|
||||
}
|
||||
|
||||
PBrowserParent *child = frameloader->GetRemoteBrowser();
|
||||
if (!child) {
|
||||
nsIDocShell* docShell = frameLoader->GetExistingDocShell();
|
||||
if (!docShell) {
|
||||
aError.Throw(NS_ERROR_FAILURE);
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsPIDOMWindowOuter> window = docShell->GetWindow();
|
||||
if (!window) {
|
||||
aError.Throw(NS_ERROR_FAILURE);
|
||||
return;
|
||||
}
|
||||
|
||||
return DrawWindow(window->GetCurrentInnerWindow(), aX, aY, aW, aH,
|
||||
aBgColor, aFlags);
|
||||
}
|
||||
|
||||
// protect against too-large surfaces that will cause allocation
|
||||
// or overflow issues
|
||||
if (!Factory::CheckSurfaceSize(IntSize(aW, aH), 0xffff)) {
|
||||
aError.Throw(NS_ERROR_FAILURE);
|
||||
return;
|
||||
}
|
||||
|
||||
bool flush =
|
||||
(aFlags & nsIDOMCanvasRenderingContext2D::DRAWWINDOW_DO_NOT_FLUSH) == 0;
|
||||
|
||||
uint32_t renderDocFlags = nsIPresShell::RENDER_IGNORE_VIEWPORT_SCROLLING;
|
||||
if (aFlags & nsIDOMCanvasRenderingContext2D::DRAWWINDOW_DRAW_CARET) {
|
||||
renderDocFlags |= nsIPresShell::RENDER_CARET;
|
||||
}
|
||||
if (aFlags & nsIDOMCanvasRenderingContext2D::DRAWWINDOW_DRAW_VIEW) {
|
||||
renderDocFlags &= ~nsIPresShell::RENDER_IGNORE_VIEWPORT_SCROLLING;
|
||||
}
|
||||
|
||||
nsRect rect(nsPresContext::CSSPixelsToAppUnits(aX),
|
||||
nsPresContext::CSSPixelsToAppUnits(aY),
|
||||
nsPresContext::CSSPixelsToAppUnits(aW),
|
||||
nsPresContext::CSSPixelsToAppUnits(aH));
|
||||
if (mIPC) {
|
||||
PDocumentRendererParent *pdocrender =
|
||||
child->SendPDocumentRendererConstructor(rect,
|
||||
mThebes->CurrentMatrix(),
|
||||
nsString(aBGColor),
|
||||
renderDocFlags, flush,
|
||||
nsIntSize(mWidth, mHeight));
|
||||
if (!pdocrender)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
DocumentRendererParent *docrender =
|
||||
static_cast<DocumentRendererParent *>(pdocrender);
|
||||
|
||||
docrender->SetCanvasContext(this, mThebes);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//
|
||||
// device pixel getting/setting
|
||||
//
|
||||
|
|
|
@ -400,9 +400,6 @@ public:
|
|||
double aW, double aH,
|
||||
const nsAString& aBgColor, uint32_t aFlags,
|
||||
mozilla::ErrorResult& aError);
|
||||
void AsyncDrawXULElement(nsXULElement& aElem, double aX, double aY, double aW,
|
||||
double aH, const nsAString& aBgColor, uint32_t aFlags,
|
||||
SystemCallerGuarantee, mozilla::ErrorResult& aError);
|
||||
|
||||
enum RenderingMode {
|
||||
SoftwareBackendMode,
|
||||
|
|
|
@ -110,10 +110,6 @@ interface CanvasRenderingContext2D {
|
|||
[Throws, ChromeOnly]
|
||||
void drawWindow(Window window, double x, double y, double w, double h,
|
||||
DOMString bgColor, optional unsigned long flags = 0);
|
||||
[Throws, ChromeOnly, NeedsCallerType]
|
||||
void asyncDrawXULElement(XULElement elem, double x, double y, double w,
|
||||
double h, DOMString bgColor,
|
||||
optional unsigned long flags = 0);
|
||||
|
||||
/**
|
||||
* This causes a context that is currently using a hardware-accelerated
|
||||
|
|
Загрузка…
Ссылка в новой задаче