Skip to content

Commit

Permalink
Merge branch 'develop' into reformat-code
Browse files Browse the repository at this point in the history
  • Loading branch information
zpl-zak committed Jan 30, 2024
2 parents 14099e1 + 1d60e59 commit 5cd276a
Show file tree
Hide file tree
Showing 828 changed files with 80,328 additions and 19,774 deletions.
4 changes: 2 additions & 2 deletions vendors/ultralight/bin/AppCore.dll
Git LFS file not shown
4 changes: 2 additions & 2 deletions vendors/ultralight/bin/Ultralight.dll
Git LFS file not shown
4 changes: 2 additions & 2 deletions vendors/ultralight/bin/UltralightCore.dll
Git LFS file not shown
4 changes: 2 additions & 2 deletions vendors/ultralight/bin/WebCore.dll
Git LFS file not shown
1 change: 1 addition & 0 deletions vendors/ultralight/include/AppCore/Overlay.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ class AExport Overlay : public RefCounted {

protected:
virtual ~Overlay();
virtual void Render() = 0;
virtual void Paint() = 0;
friend class OverlayManager;
};
Expand Down
1 change: 1 addition & 0 deletions vendors/ultralight/include/AppCore/Window.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ class AExport Window : public RefCounted {

protected:
virtual ~Window();
virtual bool platform_always_uses_cpu_renderer() const = 0;
virtual OverlayManager* overlay_manager() const = 0;

friend class OverlayImpl;
Expand Down
2 changes: 1 addition & 1 deletion vendors/ultralight/include/JavaScriptCore/JSBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ JS_EXPORT void JSGarbageCollect(JSContextRef ctx);

/* Enable the Objective-C API for platforms with a modern runtime. NOTE: This is duplicated in VM.h. */
#if !defined(JSC_OBJC_API_ENABLED)
#if (defined(__clang__) && defined(__APPLE__) && ((defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && !defined(__i386__)) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)))
#if (defined(__clang__) && defined(__APPLE__) && (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)))
#define JSC_OBJC_API_ENABLED 1
#else
#define JSC_OBJC_API_ENABLED 0
Expand Down
23 changes: 19 additions & 4 deletions vendors/ultralight/include/JavaScriptCore/JSContextRef.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,19 +143,34 @@ JS_EXPORT JSGlobalContextRef JSContextGetGlobalContext(JSContextRef ctx) JSC_API
@abstract Gets a copy of the name of a context.
@param ctx The JSGlobalContext whose name you want to get.
@result The name for ctx.
@discussion A JSGlobalContext's name is exposed for remote debugging to make it
easier to identify the context you would like to attach to.
@discussion A JSGlobalContext's name is exposed when inspecting the context to make it easier to identify the context you would like to inspect.
*/
JS_EXPORT JSStringRef JSGlobalContextCopyName(JSGlobalContextRef ctx) JSC_API_AVAILABLE(macos(10.10), ios(8.0));

/*!
@function
@abstract Sets the remote debugging name for a context.
@abstract Sets the name exposed when inspecting a context.
@param ctx The JSGlobalContext that you want to name.
@param name The remote debugging name to set on ctx.
@param name The name to set on the context.
*/
JS_EXPORT void JSGlobalContextSetName(JSGlobalContextRef ctx, JSStringRef name) JSC_API_AVAILABLE(macos(10.10), ios(8.0));

/*!
@function
@abstract Gets whether the context is inspectable in Web Inspector.
@param ctx The JSGlobalContext that you want to change the inspectability of.
@result Whether the context is inspectable in Web Inspector.
*/
JS_EXPORT bool JSGlobalContextIsInspectable(JSGlobalContextRef ctx) JSC_API_AVAILABLE(macos(JSC_MAC_TBA), ios(JSC_IOS_TBA));

/*!
@function
@abstract Sets whether the context is inspectable in Web Inspector. Default value is NO.
@param ctx The JSGlobalContext that you want to change the inspectability of.
@param inspectable YES to allow Web Inspector to connect to the context, otherwise NO.
*/
JS_EXPORT void JSGlobalContextSetInspectable(JSGlobalContextRef ctx, bool inspectable) JSC_API_AVAILABLE(macos(JSC_MAC_TBA), ios(JSC_IOS_TBA));

#ifdef __cplusplus
}
#endif
Expand Down
141 changes: 20 additions & 121 deletions vendors/ultralight/include/JavaScriptCore/JSObjectRef.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,6 @@ derived class (the parent class) first, and the most derived class last.
typedef void
(*JSObjectInitializeCallback) (JSContextRef ctx, JSObjectRef object);

/* Extension of the above callback with the class that the method is being invoked for. */
typedef void
(*JSObjectInitializeCallbackEx) (JSContextRef ctx, JSClassRef jsClass, JSObjectRef object);

/*!
@typedef JSObjectFinalizeCallback
@abstract The callback invoked when an object is finalized (prepared for garbage collection). An object may be finalized on any thread.
Expand All @@ -113,10 +109,6 @@ all functions that have a JSContextRef parameter.
typedef void
(*JSObjectFinalizeCallback) (JSObjectRef object);

/* Extension of the above callback with the class that the method is being invoked for. */
typedef void
(*JSObjectFinalizeCallbackEx) (JSClassRef jsClass, JSObjectRef object);

/*!
@typedef JSObjectHasPropertyCallback
@abstract The callback invoked when determining whether an object has a property.
Expand All @@ -137,10 +129,6 @@ If this callback is NULL, the getProperty callback will be used to service hasPr
typedef bool
(*JSObjectHasPropertyCallback) (JSContextRef ctx, JSObjectRef object, JSStringRef propertyName);

/* Extension of the above callback with the class that the method is being invoked for. */
typedef bool
(*JSObjectHasPropertyCallbackEx) (JSContextRef ctx, JSClassRef jsClass, JSObjectRef object, JSStringRef propertyName);

/*!
@typedef JSObjectGetPropertyCallback
@abstract The callback invoked when getting a property's value.
Expand All @@ -158,10 +146,6 @@ If this function returns NULL, the get request forwards to object's statically d
typedef JSValueRef
(*JSObjectGetPropertyCallback) (JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception);

/* Extension of the above callback with the class that the method is being invoked for. */
typedef JSValueRef
(*JSObjectGetPropertyCallbackEx) (JSContextRef ctx, JSClassRef jsClass, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception);

/*!
@typedef JSObjectSetPropertyCallback
@abstract The callback invoked when setting a property's value.
Expand All @@ -180,10 +164,6 @@ If this function returns false, the set request forwards to object's statically
typedef bool
(*JSObjectSetPropertyCallback) (JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception);

/* Extension of the above callback with the class that the method is being invoked for. */
typedef bool
(*JSObjectSetPropertyCallbackEx) (JSContextRef ctx, JSClassRef jsClass, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception);

/*!
@typedef JSObjectDeletePropertyCallback
@abstract The callback invoked when deleting a property.
Expand All @@ -201,10 +181,6 @@ If this function returns false, the delete request forwards to object's statical
typedef bool
(*JSObjectDeletePropertyCallback) (JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception);

/* Extension of the above callback with the class that the method is being invoked for. */
typedef bool
(*JSObjectDeletePropertyCallbackEx) (JSContextRef ctx, JSClassRef jsClass, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception);

/*!
@typedef JSObjectGetPropertyNamesCallback
@abstract The callback invoked when collecting the names of an object's properties.
Expand All @@ -222,10 +198,6 @@ Use JSPropertyNameAccumulatorAddName to add property names to accumulator. A cla
typedef void
(*JSObjectGetPropertyNamesCallback) (JSContextRef ctx, JSObjectRef object, JSPropertyNameAccumulatorRef propertyNames);

/* Extension of the above callback with the class that the method is being invoked for. */
typedef void
(*JSObjectGetPropertyNamesCallbackEx) (JSContextRef ctx, JSClassRef jsClass, JSObjectRef object, JSPropertyNameAccumulatorRef propertyNames);

/*!
@typedef JSObjectCallAsFunctionCallback
@abstract The callback invoked when an object is called as a function.
Expand All @@ -247,12 +219,6 @@ If this callback is NULL, calling your object as a function will throw an except
typedef JSValueRef
(*JSObjectCallAsFunctionCallback) (JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);

/* Extension of the above callback with the class and class name of the object being called as a function.
@discussion If this is a JSStaticFunctionEx, className will actually be the name of the function.
*/
typedef JSValueRef
(*JSObjectCallAsFunctionCallbackEx) (JSContextRef ctx, JSClassRef jsClass, JSStringRef className, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);

/*!
@typedef JSObjectCallAsConstructorCallback
@abstract The callback invoked when an object is used as a constructor in a 'new' expression.
Expand All @@ -273,10 +239,6 @@ If this callback is NULL, using your object as a constructor in a 'new' expressi
typedef JSObjectRef
(*JSObjectCallAsConstructorCallback) (JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);

/* Extension of the above callback with the class that the method is being invoked for. */
typedef JSObjectRef
(*JSObjectCallAsConstructorCallbackEx) (JSContextRef ctx, JSClassRef jsClass, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);

/*!
@typedef JSObjectHasInstanceCallback
@abstract hasInstance The callback invoked when an object is used as the target of an 'instanceof' expression.
Expand All @@ -298,10 +260,6 @@ Standard JavaScript practice calls for objects that implement the callAsConstruc
typedef bool
(*JSObjectHasInstanceCallback) (JSContextRef ctx, JSObjectRef constructor, JSValueRef possibleInstance, JSValueRef* exception);

/* Extension of the above callback with the class that the method is being invoked for. */
typedef bool
(*JSObjectHasInstanceCallbackEx) (JSContextRef ctx, JSClassRef jsClass, JSObjectRef constructor, JSValueRef possibleInstance, JSValueRef* exception);

/*!
@typedef JSObjectConvertToTypeCallback
@abstract The callback invoked when converting an object to a particular JavaScript type.
Expand All @@ -321,10 +279,6 @@ This function is only invoked when converting an object to number or string. An
typedef JSValueRef
(*JSObjectConvertToTypeCallback) (JSContextRef ctx, JSObjectRef object, JSType type, JSValueRef* exception);

/* Extension of the above callback with the class that the method is being invoked for. */
typedef JSValueRef
(*JSObjectConvertToTypeCallbackEx) (JSContextRef ctx, JSClassRef jsClass, JSObjectRef object, JSType type, JSValueRef* exception);

/*!
@struct JSStaticValue
@abstract This structure describes a statically declared value property.
Expand All @@ -340,14 +294,6 @@ typedef struct {
JSPropertyAttributes attributes;
} JSStaticValue;

/* Extension of the above structure for use with class version 1000 */
typedef struct {
const char* name;
JSObjectGetPropertyCallbackEx getPropertyEx;
JSObjectSetPropertyCallbackEx setPropertyEx;
JSPropertyAttributes attributes;
} JSStaticValueEx;

/*!
@struct JSStaticFunction
@abstract This structure describes a statically declared function property.
Expand All @@ -361,13 +307,6 @@ typedef struct {
JSPropertyAttributes attributes;
} JSStaticFunction;

/* Extension of the above structure for use with class version 1000 */
typedef struct {
const char* name;
JSObjectCallAsFunctionCallbackEx callAsFunctionEx;
JSPropertyAttributes attributes;
} JSStaticFunctionEx;

/*!
@struct JSClassDefinition
@abstract This structure contains properties and callbacks that define a type of object. All fields other than the version field are optional. Any pointer may be NULL.
Expand Down Expand Up @@ -400,51 +339,30 @@ JSStaticValue StaticValueArray[] = {
Standard JavaScript practice calls for storing function objects in prototypes, so they can be shared. The default JSClass created by JSClassCreate follows this idiom, instantiating objects with a shared, automatically generating prototype containing the class's function objects. The kJSClassAttributeNoAutomaticPrototype attribute specifies that a JSClass should not automatically generate such a prototype. The resulting JSClass instantiates objects with the default object prototype, and gives each instance object its own copy of the class's function objects.
A NULL callback specifies that the default object callback should substitute, except in the case of hasProperty, where it specifies that getProperty should substitute.
It is not possible to use JS subclassing with objects created from a class definition that sets callAsConstructor by default. Subclassing is supported via the JSObjectMakeConstructor function, however.
*/
typedef struct {
int version; /* default version is 0, use version 1000 for callbacks with extended class information */
int version; /* current (and only) version is 0 */
JSClassAttributes attributes;

const char* className;
JSClassRef parentClass;

union {
/* version 0 */
struct {
const JSStaticValue* staticValues;
const JSStaticFunction* staticFunctions;
JSObjectInitializeCallback initialize;
JSObjectFinalizeCallback finalize;
JSObjectHasPropertyCallback hasProperty;
JSObjectGetPropertyCallback getProperty;
JSObjectSetPropertyCallback setProperty;
JSObjectDeletePropertyCallback deleteProperty;
JSObjectGetPropertyNamesCallback getPropertyNames;
JSObjectCallAsFunctionCallback callAsFunction;
JSObjectCallAsConstructorCallback callAsConstructor;
JSObjectHasInstanceCallback hasInstance;
JSObjectConvertToTypeCallback convertToType;
};

/* version 1000 */
struct {
const JSStaticValueEx* staticValuesEx;
const JSStaticFunctionEx* staticFunctionsEx;
JSObjectInitializeCallbackEx initializeEx;
JSObjectFinalizeCallbackEx finalizeEx;
JSObjectHasPropertyCallbackEx hasPropertyEx;
JSObjectGetPropertyCallbackEx getPropertyEx;
JSObjectSetPropertyCallbackEx setPropertyEx;
JSObjectDeletePropertyCallbackEx deletePropertyEx;
JSObjectGetPropertyNamesCallbackEx getPropertyNamesEx;
JSObjectCallAsFunctionCallbackEx callAsFunctionEx;
JSObjectCallAsConstructorCallbackEx callAsConstructorEx;
JSObjectHasInstanceCallbackEx hasInstanceEx;
JSObjectConvertToTypeCallbackEx convertToTypeEx;
};
};

void* privateData; /* version 1000 only */

const JSStaticValue* staticValues;
const JSStaticFunction* staticFunctions;

JSObjectInitializeCallback initialize;
JSObjectFinalizeCallback finalize;
JSObjectHasPropertyCallback hasProperty;
JSObjectGetPropertyCallback getProperty;
JSObjectSetPropertyCallback setProperty;
JSObjectDeletePropertyCallback deleteProperty;
JSObjectGetPropertyNamesCallback getPropertyNames;
JSObjectCallAsFunctionCallback callAsFunction;
JSObjectCallAsConstructorCallback callAsConstructor;
JSObjectHasInstanceCallback hasInstance;
JSObjectConvertToTypeCallback convertToType;
} JSClassDefinition;

/*!
Expand Down Expand Up @@ -480,25 +398,6 @@ JS_EXPORT JSClassRef JSClassRetain(JSClassRef jsClass);
*/
JS_EXPORT void JSClassRelease(JSClassRef jsClass);

/*!
@function
@abstract Retrieves the private data from a class reference, only possible with classes created with version 1000 (extended callbacks).
@param jsClass The class to get the data from
@result The private data on the class, or NULL, if not set
@discussion Only classes with version 1000 (extended callbacks) can store private data, for other classes always NULL will always be returned.
*/
JS_EXPORT void* JSClassGetPrivate(JSClassRef jsClass);

/*!
@function
@abstract Sets the private data on a class, only possible with classes created with version 1000 (extended callbacks).
@param jsClass The class to set the data on
@param data A void* to set as the private data for the class
@result true if the data has been set on the class, false if the class has not been created with version 1000 (extended callbacks)
@discussion Only classes with version 1000 (extended callbacks) can store private data, for other classes the function always fails. The set pointer is not touched by the engine.
*/
JS_EXPORT bool JSClassSetPrivate(JSClassRef jsClass, void* data);

/*!
@function
@abstract Creates a JavaScript object.
Expand Down Expand Up @@ -529,7 +428,7 @@ JS_EXPORT JSObjectRef JSObjectMakeFunctionWithCallback(JSContextRef ctx, JSStrin
@param jsClass A JSClass that is the class your constructor will assign to the objects its constructs. jsClass will be used to set the constructor's .prototype property, and to evaluate 'instanceof' expressions. Pass NULL to use the default object class.
@param callAsConstructor A JSObjectCallAsConstructorCallback to invoke when your constructor is used in a 'new' expression. Pass NULL to use the default object constructor.
@result A JSObject that is a constructor. The object's prototype will be the default object prototype.
@discussion The default object constructor takes no arguments and constructs an object of class jsClass with no private data.
@discussion The default object constructor takes no arguments and constructs an object of class jsClass with no private data. If the constructor is inherited via JS subclassing and the value returned from callAsConstructor was created with jsClass, then the returned object will have it's prototype overridden to the derived class's prototype.
*/
JS_EXPORT JSObjectRef JSObjectMakeConstructor(JSContextRef ctx, JSClassRef jsClass, JSObjectCallAsConstructorCallback callAsConstructor);

Expand Down Expand Up @@ -564,7 +463,7 @@ JS_EXPORT JSObjectRef JSObjectMakeDate(JSContextRef ctx, size_t argumentCount, c
@param argumentCount An integer count of the number of arguments in arguments.
@param arguments A JSValue array of arguments to pass to the Error Constructor. Pass NULL if argumentCount is 0.
@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.
@result A JSObject that is a Error.
@result A JSObject that is an Error.
*/
JS_EXPORT JSObjectRef JSObjectMakeError(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) JSC_API_AVAILABLE(macos(10.6), ios(7.0));

Expand Down
Loading

0 comments on commit 5cd276a

Please sign in to comment.