Merge branch 'DottedUnits' into 'main'

Was forgotten about dotted units.

See merge request freepascal.org/fpc/pas2js!85
This commit is contained in:
Henrique Gottardi Werlang 2025-02-13 14:31:10 +00:00
commit 5df3ae48b8
3 changed files with 19 additions and 12 deletions

View File

@ -3076,7 +3076,7 @@ end;
constructor EJSException.create(aJSError: TJSError);
begin
Inherited CreateFmt('Javascript %s exception : %s',[JS.JSClassName(aJSError),aJSError.Message]);
Inherited CreateFmt('Javascript %s exception : %s',[{$IFDEF FPC_DOTTEDUNITS}JSApi.{$ENDIF}JS.JSClassName(aJSError),aJSError.Message]);
end;
Const

View File

@ -441,7 +441,11 @@ function UnionRectF(out Rect: TRectF; const R1, R2: TRectF): Boolean;
implementation
{$IFDEF FPC_DOTTEDUNITS}
uses System.Math;
{$ELSE FPC_DOTTEDUNITS}
uses math;
{$ENDIF FPC_DOTTEDUNITS}
function RectCenter(var R: TRect; const Bounds: TRect): TRect;

View File

@ -124,6 +124,13 @@ Type
TJSPermissions = BrowserApi.WebOrWorker.TJSPermissions;
TJSRequest = BrowserApi.WebOrWorker.TJSRequest;
TJSPerformance = BrowserApi.WebOrWorker.TJSPerformance;
TCanvasCoordType = BrowserApi.WebOrWorker.TCanvasCoordType;
TJSCanvasGradient = BrowserApi.WebOrWorker.TJSCanvasGradient;
TJSCanvasPattern = BrowserApi.WebOrWorker.TJSCanvasPattern;
TJSPath2D = BrowserApi.WebOrWorker.TJSPath2D;
TJSImageBitmap = BrowserApi.WebOrWorker.TJSImageBitmap;
TJSOffscreenCanvasRenderingContext2D = BrowserApi.WebOrWorker.TJSOffscreenCanvasRenderingContext2D;
TJSHTMLOffscreenCanvasElement = BrowserApi.WebOrWorker.TJSHTMLOffscreenCanvas;
{$ELSE}
TJSServiceWorker = weborworker.TJSServiceWorker;
TJSServiceWorkerRegistration = weborworker.TJSServiceWorkerRegistration;
@ -197,6 +204,13 @@ Type
TJSRequest = webOrworker.TJSRequest;
TJSAbortController = webOrworker.TJSAbortController;
TJSPerformance = WebOrWorker.TJSPerformance;
TCanvasCoordType = weborworker.TCanvasCoordType;
TJSCanvasGradient = weborworker.TJSCanvasGradient;
TJSCanvasPattern = weborworker.TJSCanvasPattern;
TJSPath2D = weborworker.TJSPath2D;
TJSImageBitmap = weborworker.TJSImageBitmap;
TJSOffscreenCanvasRenderingContext2D = weborworker.TJSOffscreenCanvasRenderingContext2D;
TJSHTMLOffscreenCanvasElement = weborworker.TJSHTMLOffscreenCanvas;
{$ENDIF}
TJSMessagePortArray = TJSMessagePortDynArray;
TEventListenerEvent = TJSEvent;
@ -2547,11 +2561,6 @@ Type
end;
TCanvasCoordType = weborworker.TCanvasCoordType;
TJSCanvasGradient = weborworker.TJSCanvasGradient;
TJSCanvasPattern = weborworker.TJSCanvasPattern;
TJSPath2D = weborworker.TJSPath2D;
TJSCanvasRenderingContext2D = class external name 'CanvasRenderingContext2D' (TJSBaseCanvasRenderingContext2D)
private
FCanvas: TJSHTMLCanvasElement; external name 'canvas';
@ -2562,12 +2571,6 @@ Type
end;
TJSImageBitmap = weborworker.TJSImageBitmap;
TJSOffscreenCanvasRenderingContext2D = weborworker.TJSOffscreenCanvasRenderingContext2D;
TJSHTMLOffscreenCanvasElement = weborworker.TJSHTMLOffscreenCanvas;
{ TJSHTMLIFrameElement }
TJSHTMLIFrameElement = Class external name 'HTMLIFrameElement' (TJSHTMLElement)