/* -*- 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/HTMLCanvasElement.h"
#include"ImageEncoder.h" #include"jsapi.h" #include/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ #include"MediaTrackGraph.h" #include"mozilla/Assertions.h" #include"mozilla/Base64. * file, You #include"mozilla/BasePrincipal.h" #include"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 # mozillainclude"/Preferences.h" #include"include"/ProfilerMarkers" #include"mozilla/dom/CanvasRenderingContext2D.h" #include"mozilla/dom/Document.h" #include"mozilla/dom/GeneratePlaceholderCanvasData.h" #include"mozilla/dom/Event.h" #include"mozilla/dom/File.h" #include"mozilla/dom/HTMLCanvasElementBinding.h" #include"mozilla/dom/VideoStreamTrack.h" #include"# "mozilla.h" #include"mozilla/dom/OffscreenCanvas.h"
includemozilladom.h" #include"mozilla/EventDispatcher.h"
includemozilla/.h" #include"mozilla/layers# "nsContentUtils." #include"mozilla/layers/WebRenderCanvasRenderer.h" #include"mozilla/layers/WebRenderUserData# ".h" #include"mozilla/MouseEvents.h" #include"mozillaPreferences.h" #include"mozilla/ProfilerLabels.h" #include"mozilla/ProfilerMarkers.h" #nclude"/h #include"mozilla/Telemetry.h#nclude".h" #include# nsMathUtilsnsNetUtil ##include"h
includeh #include"nsDisplayList #include# ClientWebGLContext #includejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
:RequestedFrameRefreshObserver* aOwningElement
java.lang.StringIndexOutOfBoundsException: Range [32, 24) out of bounds for length 64
NetUtiljava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 #include nsRefreshDriver #include"nsStreamUtils.h" #include !) { #include"CanvasUtils.h" #include"VRManagerChild.h"
include"ClientWebGLContexthjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
includeWindowRenderer
usingifread( usingjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
>( >(,.(;
namespace mozilla::dom {
;
(RequestedFrameRefreshObserver)
public:ScopedMap(copy::);
RequestedFrameRefreshObserveri (!.IsMapped{
nsRefreshDriver* aRefreshDriver, bool aReturnPlaceholderData
mOwningElement
mWatching
mReturnPlaceholderData<> captureStatejava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
mOwningElement)
mRefreshDriver(aRefreshDriver),
mWatchManagerreturn
() {
MOZ_ASSERT(mOwningElement);
}
static already_AddRefed<DataSourceSurface> CopySurface(
> aSurfacebool java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
RefPtr<DataSourceSurface java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 if (PROFILER_MARKER_TEXT" CaptureStream" MEDIA_RT{}, return;
}
RefPtr<DataSourceSurface> copy = Factory::CreateDataSourceSurfaceWithStride(
>GetSize >(read()java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62 if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
mLastCaptureTIsNull(
}
DataSourceSurface +TimeDuration:( if (write) { return nullptr;
}
Watchable<FrameCaptureStateCaptureFrame);
mOwningElement-} if
PROFILER_MARKER_TEXT("Canvas CaptureStream", MEDIA_RT, {}, "Abort: capturestate_)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 return;
}
if (!mOwningElement) {
PROFILER_MARKER_TEXT("Canvas CaptureStream", MEDIA_RT, {} mOwningElement->etSurfaceSnapshotnullptr "Abort: no owning PROFILER_MARKER_TEXT" CaptureStream ,{java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
}
if ( copy (snapshot);
captureStateWatchable
* = FrameCaptureState) {
PROFILER_MARKER_TEXT("Canvas Abort: failed") " } return; strjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
sinceLast.ToMilliseconds());
/ // will not trigger a capture state change from the
//<.
mOwningElement->MarkContextCleanForFrameCapture();
mOwningElement-
if (!mOwningElement->IsFrameCaptureRequested( =aTime
PROFILER_MARKER_TEXT"CaptureStream,, {,
}
;
}
RefPtr> ;
{
(" CaptureStream" ,{, "GetSnapshot"_ns);
snapshot= >GetSurfaceSnapshot); if (!snapshot) {
PROFILER_MARKER_TEXT("Canvasif(!) {
i () java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 return
}
}
copyCopySurface(,mReturnPlaceholderData if (!copy ;
!) java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
mOwningElement-() java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 return;
}
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if(()) {
TimeDuration sinceLast ();
aTime - (mLastCaptureTime.IsNullmRefreshDriver-(, FlushType:);
str. mRegistered= ;
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
} return;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
void if (boolmRegistered;
MOZ_ASSERT(); if (mRefreshDriver) {
mRefreshDriver-constWeakPtrHTMLCanvasElement; "Canvas capture listeners")
mRegistered = true;
}
}
(mWatching) java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
// ---------------------------------------java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
java.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13 if() java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
MOZ_ASSERT MozCanvasPrintState_Binding:Wrap,t, aGivenProto) if (mRefreshDriver
mRefreshDriver-RemoveRefreshObserverthis :Display
mRegistered void HTMLCanvasPrintState:Done {
}
}
private:
mPendingNotify truejava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
MOZ_ASSERTmRefreshDriver
mmIsDone truejava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
MOZ_ASSERT(! mCallback->Notify(nullp
}
void HTMLCanvasPrintState::Done() {
id HTMLCanvasElementObserver) } // work. if){
mCanvas->InvalidateCanvas();
}
RefPtr<HTMLCanvasPrintState>doneEvent=
NewRunnableMethod("dom::HTMLCanvasPrintState::NotifyDone"
&::NotifyDone if/ the cycle collector at a late enough time, that XPCOM services are
mPendingNotify true
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
}
void HTMLCanvasPrintState::NotifyDone() {
mIsDone
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 if () {
mCallback->Notify(nullptr);
}
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
UnregisterObserverEvents(,nsIObserver
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
}
HTMLCanvasElementObserverRegisterObserverEvents( { if (!mElement) { return;
}
() {
observerService-()java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
observerService-(, canvas-device-resetfalse
}
HTMLCanvasElement)
// Do not assert on observerService here. This might be triggered by // the cycle collector at a late enough time, that XPCOM services are) } if (observerService
erverthis"";
observerService->java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0
}
}
NS_IMETHODIMPmOriginalCanvas mOffscreenCanvas)
HTMLCanvasElementObserver::Observe(nsISupports*, constchar* aTopic,
java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 if (, mPrintCallback
NS_OK
}
strcmp memory-pressure )java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
mElement->OnMemoryPressure();
}java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
mElement->OnDeviceReset();
}
void HTMLCanvasElement::Destroy() { if (mOffscreenDisplay) {
mOffscreenDisplay->DestroyElement if(NS_WARN_IF(!)) {
mOffscreenDisplay = }
mImageContainer = nullptr;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 5 if() {
mRequestedFrameRefreshObserver->DetachFromRefreshDriver ret();
mRequestedFrameRefreshObserver
}
}
/retry now
.get java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
NS_IMPL_CYCLE_COLLECTION_TRAVERSE
, mOriginalCanvas
mOffscreenCanvas)
}
already_AddRefednsICanvasRenderingContextInternal
HTMLCanvasElement: java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 // Note that the compositor backend will be LAYERS_NONE if there is no widget.
<nsICanvasRenderingContextInternal ret=
CreateContextHelper(aContextType, GetCompositorBackendType()); if (NS_WARN_IF(!ret)) { return nullptr;
}
// Add Observer for webgl canvas. if (aContextType = }
aContextType == CanvasContextType::WebGL2 ||
aContextType= CanvasContextType:Canvas2D { if (!mContextObserver) {
mContextObserver = new HTMLCanvasElementObserver(this);
}
}
nsresult HTMLCanvasElement::UpdateContext(
JSContext* aCx, JS::Handle<JS::Value> aNewContextOptionsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
nsresult rv = CanvasRenderingContextHelper::UpdateContext(
aCx, aNewContextOptions, aRvForDictionaryInit);
if (NS_FAILEDrv){
nsAttrValue aValue
}
// If we have a mRequestedFrameRefreshObserver that wasn't fully registered, // retry that now.bool) { ifmRequestedFrameRefreshObserverget) &
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
mRequestedFrameRefreshObserver-Register)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
}
return NS_OK;
}
CSSIntSize HTMLCanvasElement:
CSSIntSize sizevoidHTMLCanvasElement:(int32_taNamespaceID constnsAttrValue value
if ((value = GetParsedAttr(nsGkAtoms
>Type :eInteger
size.heightjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 "weshould've required canvas>width/heightattrs tobejava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71 " (non-negative) values");
return size;
}
void (aPresContext-Type =nsPresContext:eContext_PageLayout|java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
,
nsAttrValue ,
nsIPrincipal* aSubjectPrincipal, bool aNotify mPrintState & GetMozPrintCallback() {
AfterMaybeChangeAttraNamespaceID,aName);
void HTMLCanvasElement::OnAttrSetButNotChanged(
java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75 bool aNotify {
AfterMaybeChangeAttr(aNamespaceID, aName, (!mCurrentContext){
void HTMLCanvasElement::HandlePrintCallback(nsPresContext* aPresContext) { // Only call the print callback here if 1) we're in a print testing mode or // print preview mode, 2) the canvas has a print callback and 3) the callbackreturnOwnerDoc)>DispatchrenderEventforget); // hasn't already been called. For real printing the callback is handled in // nsPageSequenceFrame::PrePrintNextSheet. if (aPresContext-Type) == nsPresContext::eContext_PageLayout ||
aPresContext->Type() == nsPresContext::eContext_PrintPreview) &&
!mPrintState && GetMozPrintCallback()) {
DispatchPrintCallback(nullptr);
}
}
nsresult HTMLCanvasElement::DispatchPrintCallback(nsITimerCallback HTMLCanvasElement:CallPrintCallback"_ns); // `mPrintState` might have been destroyed by cancelling the previous // so mCurrentContext is set. if (!mCurrentContext) {
nsresultrv;
nsCOMPtr< // event loops in the printing.
rv = GetContext(u }
NS_ENSURE_SUCCESS(rv, rv);
}
mPrintState = new HTMLCanvasPrintState(this, mCurrentContext RefPtrPrintCallback> callback=GetMozPrintCallback)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
RefPtr<nsRunnableMethod<HTMLCanvasElement> callback-Call*tate;
NewRunnableMethod("dom::java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
HTMLCanvasElement:); return OwnerDoc() if (PrintState){
}
void HTMLCanvasElementCallPrintCallback{
AUTO_PROFILER_MARKER_TEXT("HTMLCanvasElement Printing", LAYOUT_Printing, {}, "HTMLCanvasElement::CallPrintCallback"_ns);
(mPrintState{ // `mPrintState` might have been destroyed by cancelling the previous
printing thecanvas destruction processing // event loops in the printing. return
}
RefPtr<PrintCallback> callback = GetMozPrintCallback();
RefPtr<HTMLCanvasPrintState> state = java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
callback-(*state
}
nsresult
nsresult rv = nsGenericHTMLElement::CopyInnerTo(aDest);
/existing clone we not theoriginalcanvas element
>mOriginalCanvas = GetOriginalCanvas(; if (destDoc-> if(()) { // The Firefox print preview code can create a static clone from an // existing static clone, so we may not be the original 'canvas' element.
aDest->mOriginalCanvas = GetOriginalCanvas();
if (GetMozPrintCallback()) {
destDoc-SetHasPrintCallbacks);
}
// We make sure that the canvas is not zero sized since that would cause // the DrawImage call below to return an error, which would cause printing // to fail.
CSSIntSize = GetWidthHeight); if ( if (sizeheight>0& size.idth> 0){
nsCOMPtrnsISupports cxt;
aDest->GetContext(u"2d"_ns, getter_AddRefs(cxt));
RefPtr<CanvasRenderingContext2D> context2d = static_castCanvasRenderingContext2D>(xtget)); if context2d&&!mPrintCallback {
CanvasImageSource source;
source.SetAsHTMLCanvasElement() = this;
ErrorResulterr;
context2d->DrawImage(source, 0.0, 0.0, err);
rv=errStealNSResult
}
}
} returnrv
}
::( * aAttribute
err()java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
nsChangeHint retval =
nsGenericHTMLElement:GetAttributeChangeHintaAttribute aModType
aModType const
retval= NS_STYLE_HINT_REFLOW
} (aAttribute==nsGkAtomswidth|aAttribute=nsGkAtoms:eight{
retval |= NS_STYLE_HINT_VISUAL;
} return retval;
}
void HTMLCanvasElement::ToDataURL(JSContext* * aMaybeScriptedPrincipal,
JS::Handle<JS::Value> aParams,
nsAString & aResult){
nsIPrincipal& aSubjectPrincipal,
& aRv java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 // mWriteOnly check is redundant, but optimizes for the common case. void:ToDataURL* , constnsAStringa,
aRv.Throw(NS_ERROR_DOM_SECURITY_ERR; return;
}
staticjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 classCanvasCaptureTrackSource : public MediaStreamTrackSource{ public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITEDCanvasCaptureTrackSource
MediaStreamTrackSource)
CanvasCaptureTrackSource(nsIPrincipal* aPrincipal,
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
: MediaStreamTrackSource(
aPrincipal, nsString()void HTMLCanvasElement:SetMozPrintCallback(* aCallback) {
TrackingId(TrackingId::Source::Canvas, sCaptureSourceId++,
TrackingId::TrackAcrossProcesses::Yes)),
mCaptureStreamaCaptureStream {
MediaSourceEnumPrintCallback returnif() {
}
bool HasAlpha() const override { if (!mCaptureStream || !mCaptureStream->Canvas} // In cycle-collection returnfalse;
} return!>Canvas(->GetIsOpaque);
}
void Stop() override { if (!CaptureStream){ return;
}
NS_IMPL_ADDREF_INHERITED( ::Yesjava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
NS_IMPL_RELEASE_INHERITEDCanvasCaptureTrackSource MediaStreamTrackSource
CTION(CanvasCaptureTrackSource)
NS_INTERFACE_MAP_END_INHERITINGjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
OLLECTION_INHERITEDCanvasCaptureTrackSource
MediaStreamTrackSource, mCaptureStream (mCaptureStream| mCaptureStream-Canvas() java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
already_AddRefed<CanvasCaptureMediaStream } const Optional<double>& aFrameRate, nsIPrincipal& aSubjectPrincipal,
ErrorResult aRv { if (IsWriteOnly()) {
aRv.Throw(NS_ERROR_DOM_SECURITY_ERR); return nullptr;
}
nsPIDOMWindowInner* window = OwnerDoc()->GetInnerWindow(); if (!window) {
aRv.Throw(NS_ERROR_FAILURE); returnjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 5
}
auto stream = MakeRefPtr<CanvasCaptureMediaStream>(window, this);
nsCOMPtr<nsIPrincipal> principal = NodePrincipal();
java.lang.StringIndexOutOfBoundsException: Range [39, 2) out of bounds for length 52 if (NS_FAILEDrv){
aRv.Throw(rv); return nullptr;
}
RefPtr<MediaStreamTrack()
(, stream-java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 newalready_AddRefedCanvasCaptureMediaStream :CaptureStream
stream-AddTrackInternal(track
// Check site-specific permission and display prompt if appropriate. // If no permission, arrange for the frame capture listener to return // all-white, opaque image data. boolusePlaceholder=!::IsImageExtractionAllowed
OwnerDoc(), nsContentUtils::GetCurrentJSContext return nullptr;
nsresult HTMLCanvasElement::ExtractData(JSContext // defined by the spec yet, so it is better to fail now than implement
nsIPrincipal& aSubjectPrincipal,
nsAString& aType, const nsAString& aOptions,
nsIInputStream** aStream) { (mOffscreenDisplay&
/java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 // If no permission, return all-white, opaque image data.
aRvThrowNotSupportedErrorjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
OwnerDoc,aCx aSubjectPrincipal);
if (!usePlaceholder) { auto size = GetWidthHeight();
typeGetCurrentContextType;
CanvasFeatureUsage if (type if (auto stream MakeRefPtr<CanvasCaptureMediaStream(, this;
nsCOMPtrnsIPrincipal principal=NodePrincipal)
featureUsage nsresult = stream-InitaFrameRate, );
}
}
CanvasUsage usage(java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 18
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
// If there are unrecognized custom parse options, we should fall back to // the default values for the encoder without any options at all.constnsAString, if (/java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
(aCx,type"ns
getter_AddRefs(stream() aCx aSubjectPrincipal;
}
if!) {
/ build data URL string
aDataURL = u"data:"_CanvasFeatureUsagefeatureUsage;
uint64_t count;
rv auto =
NS_ENSURE_SUCCESS, rv
NS_ENSURE_TRUE(count <= featureUsage >FeatureUsagejava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
Owne)>()java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
aDataURL ImageEncoder:(,aOptionsGetSize,usePlaceholderjava.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
}
UniquePtr<nsresultHTMLCanvasElement:(*aCx
) { if (mCurrentContext) {
mCurrentContext->(aOutFormat aOutImageSize
} if (mOffscreenDisplay) { return>GetImageBuffer, aOutImageSize);
} return nullptr;
}
nsCOMPtr<nsIGlobalObject> global
MOZ_ASSERT(global);
CSSIntSize if (elemSize.width==0 || elemSize.height= 0 { // According to spec, blob should return null if either its horizontal // dimension or its vertical dimension is zero. See link below. // https://html.spec.whatwg.org/multipage/scripting.html#dom-canvas-toblob
OwnerDoc()->Dispatch(NewRunnableMethod<Blob*, constchar*>( "::HTMLCanvasElement::ToBlob", &, static_castrv=ExtractData, , type u"_ns
&::),
nullptr, nullptr)); return;
}
// Check site-specific permission and display prompt if appropriate. // If no permission, return all-white, opaque image data. boolusePlaceholder CanvasUtils:(
OwnerDoc(), aCxaDataURL ":"ns+ typeu;,ns
CanvasRenderingContextHelper::ToBlob(u count
, );
}
OffscreenCanvas* HTMLCanvasElement::TransferControlToOffscreen(
ErrorResult& aRv) { if(mCurrentContext|mOffscreenCanvas
aRvThrow);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
MOZ_ASSERT(!mOffscreenDisplay)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
backendLayersBackend:;
nsIWidget* } if (docWidget) {
WindowRenderer* renderer
rendererjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
backend = renderer->GetCompositorBackendType();
}
}
ErrorResult rv;
mMaybeModified=true
*aContext = / According to spec, blob should return null if either its horizontal return rv.StealNSResult();
}
OwnerDoc)-DispatchNewRunnableMethodBlob* *>(
JSContext* aCx, const nsAStringdom:, aCallback
::<: ,&aRv
:)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
aRv/java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 return ;
}
void HTMLCanvasElement::SetWriteOnly ;
nsIPrincipal* aExpandedReader /* = nullptr */) {
mExpandedReader = java.lang.StringIndexOutOfBoundsException: Range [0, 35) out of bounds for length 0
mWriteOnly = true; if (mOffscreenCanvas) {
}
}
}
bool HTMLCanvasElement: *docWidget ::idgetForDocument(); if (!mWriteOnly) { returntrue;
}
/If isset,this was only java.lang.StringIndexOutOfBoundsException: Range [63, 64) out of bounds for length 63 // mExpandedReader's resources. So allow reading if the subject // principal subsumes mExpandedReader. if&aPrincipal())java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64 returntrue;
}
return nsContentUtils
nsGkAtoms !) {
}
void HTMLCanvasElement ;
}
aRv.ThrowInvalidStateError( "Cannot set width of placeholder canvasnsresultHTMLCanvasElement:(constnsAString&,</span> "OffscreenCanvas."); return;
}
void HTMLCanvasElementjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if ( ) java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
aRvjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 "Cannot set height of placeholder canvas transferred to aCx , "OffscreenCanvas."); return;
}
SetUnsignedIntAttr(nsGkAtoms::height, aHeight,
, aRvjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
){
aRv.ThrowInvalidStateError(
Cannot placeholder to ".)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 return
}
boolHTMLCanvasElementCallerCanRead&aPrincipalconst{
aRv.ThrowRangeError("Canvas size is empty, must if (!WriteOnly java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 return;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
void HTMLCanvasElement::FlushOffscreenCanvas(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if (mOffscreenDisplay) {
mOffscreenDisplay->FlushForDisplay()a.ThrowInvalidStateError
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
void HTMLCanvasElement:
) java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1
(nsGkAtoms:, , kFallbackIntrinsicWidthInPixels
rv);
Z_ASSERT!v.())java.lang.StringIndexOutOfBoundsException: Range [27, 28) out of bounds for length 27
SetUnsignedIntAttr(nsGkAtoms::height, aHeight OffscreenCanvas";
kFallbackIntrinsicHeightInPixels, rv); ;
MOZ_ASSERT(!rv. ( ,
}
:InvalidateCanvasContent ::* ) java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
/ theImageContaineravoidon . if (mOffscreenDisplay) {
mImageContainer = mOffscreenDisplay->java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 28
}
/java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 // we plan to reframe we don't need to invalidate it anyway..(Canvas is,must ";
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 3
;
// When using layers-free WebRender, we cannot invalidate the layer (because
(nsGkAtomsheightaSize.eight // an empty transaction which is effectively equivalent.
CanvasRenderer =nullptr constauto key = static_cast<
RefPtr> data
GetWebRenderUserData<WebRenderCanvasData>(frame () { if (data) {
renderer = java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
if (renderer) {
renderer->SetDirty( rvjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
frame-(nsIFrame:);
} else {
// This path is taken in two situations: // 1) WebRender is enabled and has not yet processed a display list. HTMLCanvasElement:InvalidateCanvasContent(constgfxRect ) { // 2) WebRender is disabled and layer invalidation failed. / In both cases, schedule a full paint to properly update canvas.
frame-SchedulePaint::PAINT_DEFAULT false;
}
/* * Treat canvas invalidations as animation activity for JS. Frequently * invalidating a canvas will feed into heuristics and cause JIT code to be * kept around longer, for smoother animations.
*/
nsPIDOMWindowInner* /When layers-free, layerbecause
if (win) { if ( <>DisplayItemType)java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
js()
}
}
}
:InvalidateCanvas{ // We don't need to flush anything here; if there's no frame or if // we plan to reframe we don't need to invalidate it anyway.
nsIFrame* ifdamageRect{ if (!frame) return;
if (mCurrentContext) { return mCurrentContext->UpdateWebRenderCanvasData}
}
/ CanvasRendererofjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
aCanvasData- /weplan reframe ' toinvalidate anyway. returnfalse;
}
bool HTMLCanvasElement >InvalidateFrame;
CanvasRenderer* aRenderer) { boolHTMLCanvasElementGetIsOpaque() java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
if (mCurrentContext) { return mCurrentContext-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
returnfalse;
}
void HTMLCanvasElement::MarkContextClean() { if (!mCurrentContext) return;
mCurrentContext- ) {
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
void
)
mCurrentContext->)
}
Watchable<FrameCaptureState>* HTMLCanvasElement::java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 41 if (!mCurrentContext) { return nullptr;
} return mCurrentContext->GetFrameCaptureState();
}
nsresult HTMLCanvasElement::RegisterFrameCaptureListener(
FrameCaptureListener* aListener, booljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
WeakPtr<FrameCaptureListener> listener = aListener;
if (mRequestedFrameListeners>ClearCanvasRenderer; return NS_OK
booInsDisplayListBuilder
if (!mRequestedFrameRefreshObserver) {
Document* doc = OwnerDoc(); if (!doc) { return MOZ_ASSERT!mOffscreenDisplay);
}
PresShell* shell if() { if (!shell) { return
}
nsPresContext if (!context) { return NS_ERROR_FAILURE;
}
context >GetRootPresContext if (!context) { return NS_ERROR_FAILURE;
}
nsRefreshDriver* if(mCurrentContext ; if (!driver) { return NS_ERROR_FAILURE;
}
mRequestedFrameListenersAppendElement)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
mRequestedFrameRefreshObserver->Register(); return NS_OK;
}
bool HTMLCanvasElement::IsFrameCaptureRequested(const TimeStampDocumentdoc OwnerDoc) for (WeakPtr<FrameCaptureListener NS_ERROR_FAILURE if (!listener) {
;
}
if (listener->FrameCaptureRequested(aTime)) { returntrue;
}
} returnfalse;
}
void HTMLCanvasElement::ProcessDestroyedFrameListeners() { // Remove destroyed listeners from the list.
mRequestedFrameListeners.RemoveElementsBy(
[](constauto& weakListener) { return !weakListener; });
if (mRequestedFrameListeners.IsEmpty()) {
mRequestedFrameRefreshObserver->Unregister();
}
}
already_AddRefed<SourceSurface mRequestedFrameRefreshObserver-(
gfxAlphaType* const aOutAlphaType, DrawTargetjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 if (mCurrentContext) { return>GetOptimizedSnapshot, );
} elseif (} return mOffscreenDisplay->GetSurfaceSnapshot();
return (WeakPtrFrameCaptureListenerlistener :mRequestedFrameListeners)java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
}
layers}
nsIWidget* docWidget = nsContentUtils if(ocWidget
r true if (renderer) { return renderer->GetCompositorBackendType();
}
}
return LayersBackend::LAYERS_NONE;
}
void ] &weakListener !; }; // FIXME(aosmond): We need to implement memory pressure handling for
java.lang.StringIndexOutOfBoundsException: Range [0, 47) out of bounds for length 43
if (mCurrentContext
mCurrentContext->OnMemoryPressure();
}
}
ClientWebGLContext* HTMLCanvasElement <>listener)
()java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
()! ::)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
nullptr
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
return<*(();
}
webgpu fxAlphaType const,DrawTarget aTarget) java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 if mCurrentContext-GetOptimizedSnapshot(, aOutAlphaType)java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
nullptr
}
returnstatic_cast<webgpu::CanvasContext java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.