Skip to content

Commit 93bcffc

Browse files
committed
q
1 parent 9839d97 commit 93bcffc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+7274
-1426
lines changed

bridge/core/dom/document_fragment.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#define BRIDGE_DOCUMENT_FRAGMENT_H
77

88
#include "container_node.h"
9+
#include "plugin_api/document_fragment.h"
910

1011
namespace webf {
1112

bridge/core/dom/events/event_target.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,13 @@ bool EventTarget::removeEventListener(const AtomicString& event_type,
138138
return RemoveEventListenerInternal(event_type, event_listener, event_listener_options);
139139
}
140140

141+
bool EventTarget::removeEventListener(const AtomicString& event_type,
142+
const std::shared_ptr<EventListener>& event_listener,
143+
const std::shared_ptr<EventListenerOptions>& options,
144+
ExceptionState& exception_state) {
145+
return RemoveEventListenerInternal(event_type, event_listener, options);
146+
}
147+
141148
bool EventTarget::removeEventListener(const AtomicString& event_type,
142149
const std::shared_ptr<EventListener>& event_listener,
143150
bool use_capture,

bridge/core/dom/events/event_target.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ class EventTarget : public BindingObject {
117117
const std::shared_ptr<EventListener>& event_listener,
118118
const std::shared_ptr<QJSUnionEventListenerOptionsBoolean>& options,
119119
ExceptionState& exception_state);
120+
bool removeEventListener(const AtomicString& event_type,
121+
const std::shared_ptr<EventListener>& event_listener,
122+
const std::shared_ptr<EventListenerOptions>& options,
123+
ExceptionState& exception_state);
120124
bool removeEventListener(const AtomicString& event_type,
121125
const std::shared_ptr<EventListener>& event_listener,
122126
bool use_capture,

bridge/core/dom/text.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ Node::NodeType Text::nodeType() const {
2424
return Node::kTextNode;
2525
}
2626

27-
const TextNodePublicMethods* Text::textNodePublicMethods() {
28-
static TextNodePublicMethods text_node_public_methods;
27+
const TextPublicMethods* Text::textPublicMethods() {
28+
static TextPublicMethods text_node_public_methods;
2929
return &text_node_public_methods;
3030
}
3131

bridge/core/dom/text.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Text : public CharacterData {
2727
}
2828

2929
NodeType nodeType() const override;
30-
const TextNodePublicMethods* textNodePublicMethods();
30+
const TextPublicMethods* textPublicMethods();
3131

3232
private:
3333
std::string nodeName() const override;

bridge/core/html/html_div_element.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#define BRIDGE_CORE_HTML_HTML_DIV_ELEMENT_H_
88

99
#include "html_element.h"
10+
#include "plugin_api/html_div_element.h"
1011

1112
namespace webf {
1213

@@ -16,6 +17,11 @@ class HTMLDivElement : public HTMLElement {
1617
public:
1718
using ImplType = HTMLDivElement*;
1819
explicit HTMLDivElement(Document&);
20+
21+
const HTMLDivElementPublicMethods* htmlDivElementPublicMethods() {
22+
static HTMLDivElementPublicMethods html_element_public_methods;
23+
return &html_element_public_methods;
24+
}
1925
};
2026

2127
} // namespace webf

bridge/core/html/html_script_element.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#define BRIDGE_CORE_HTML_HTML_SCRIPT_ELEMENT_H_
77

88
#include "html_element.h"
9+
#include "plugin_api/html_script_element.h"
910

1011
namespace webf {
1112

@@ -16,6 +17,11 @@ class HTMLScriptElement : public HTMLElement {
1617
static bool supports(const AtomicString& type, ExceptionState& exception_state);
1718

1819
explicit HTMLScriptElement(Document& document);
20+
21+
const HTMLScriptElementPublicMethods* htmlScriptElementPublicMethods() {
22+
static HTMLScriptElementPublicMethods html_element_public_methods;
23+
return &html_element_public_methods;
24+
}
1925
};
2026

2127
} // namespace webf

bridge/core/html/image.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#define WEBF_CORE_HTML_IMAGE_H_
77

88
#include "html_image_element.h"
9+
#include "plugin_api/image.h"
910

1011
namespace webf {
1112

@@ -17,6 +18,11 @@ class Image : public HTMLImageElement {
1718

1819
explicit Image(ExecutingContext* context, ExceptionState& exception_state);
1920

21+
const ImagePublicMethods* imagePublicMethods() {
22+
static ImagePublicMethods image_public_methods;
23+
return &image_public_methods;
24+
}
25+
2026
private:
2127
};
2228

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Generated by WebF TSDL, don't edit this file directly.
2+
// Generate command: node scripts/generate_binding_code.js
3+
// clang-format off
4+
/*
5+
* Copyright (C) 2022-present The WebF authors. All rights reserved.
6+
*/
7+
#ifndef WEBF_CORE_WEBF_API_PLUGIN_API_CANVAS_RENDERING_CONTEXT_H_
8+
#define WEBF_CORE_WEBF_API_PLUGIN_API_CANVAS_RENDERING_CONTEXT_H_
9+
#include <stdint.h>
10+
#include "core/native/vector_value_ref.h"
11+
#include "rust_readable.h"
12+
#include "webf_value.h"
13+
namespace webf {
14+
class SharedExceptionState;
15+
class ExecutingContext;
16+
typedef struct NativeValue NativeValue;
17+
typedef struct AtomicStringRef AtomicStringRef;
18+
class CanvasRenderingContext;
19+
enum class CanvasRenderingContextType {
20+
kCanvasRenderingContext = 0,
21+
};
22+
using PublicCanvasRenderingContextRelease = void (*)(CanvasRenderingContext*);
23+
using PublicCanvasRenderingContextDynamicTo = WebFValue<CanvasRenderingContext, WebFPublicMethods> (*)(CanvasRenderingContext*, CanvasRenderingContextType);
24+
struct CanvasRenderingContextPublicMethods : public WebFPublicMethods {
25+
static void Release(CanvasRenderingContext* canvas_rendering_context);
26+
static WebFValue<CanvasRenderingContext, WebFPublicMethods> DynamicTo(CanvasRenderingContext* canvas_rendering_context, CanvasRenderingContextType canvas_rendering_context_type);
27+
double version{1.0};
28+
PublicCanvasRenderingContextRelease canvas_rendering_context_release{Release};
29+
PublicCanvasRenderingContextDynamicTo canvas_rendering_context_dynamic_to{DynamicTo};
30+
};
31+
} // namespace webf
32+
#endif // WEBF_CORE_WEBF_API_PLUGIN_API_CANVAS_RENDERING_CONTEXT_H_
Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,33 @@
1+
// Generated by WebF TSDL, don't edit this file directly.
2+
// Generate command: node scripts/generate_binding_code.js
3+
// clang-format off
14
/*
25
* Copyright (C) 2022-present The WebF authors. All rights reserved.
36
*/
4-
5-
#ifndef WEBF_CORE_RUST_API_CHARACTER_DATA_H_
6-
#define WEBF_CORE_RUST_API_CHARACTER_DATA_H_
7-
7+
#ifndef WEBF_CORE_WEBF_API_PLUGIN_API_CHARACTER_DATA_H_
8+
#define WEBF_CORE_WEBF_API_PLUGIN_API_CHARACTER_DATA_H_
9+
#include <stdint.h>
10+
#include "core/native/vector_value_ref.h"
11+
#include "rust_readable.h"
812
#include "node.h"
9-
1013
namespace webf {
11-
12-
class EventTarget;
1314
class SharedExceptionState;
1415
class ExecutingContext;
15-
class Event;
16-
17-
struct CharacterDataPublicMethods : WebFPublicMethods {
16+
typedef struct NativeValue NativeValue;
17+
typedef struct AtomicStringRef AtomicStringRef;
18+
class CharacterData;
19+
using PublicCharacterDataGetData = AtomicStringRef (*)(CharacterData*);
20+
using PublicCharacterDataSetData = void (*)(CharacterData*, const char*, SharedExceptionState*);
21+
using PublicCharacterDataGetLength = int64_t (*)(CharacterData*);
22+
struct CharacterDataPublicMethods : public WebFPublicMethods {
23+
static AtomicStringRef Data(CharacterData* character_data);
24+
static void SetData(CharacterData* character_data, const char* data, SharedExceptionState* shared_exception_state);
25+
static int64_t Length(CharacterData* character_data);
1826
double version{1.0};
1927
NodePublicMethods node;
28+
PublicCharacterDataGetData character_data_get_data{Data};
29+
PublicCharacterDataSetData character_data_set_data{SetData};
30+
PublicCharacterDataGetLength character_data_get_length{Length};
2031
};
21-
2232
} // namespace webf
23-
24-
#endif // WEBF_CORE_RUST_API_CHARACTER_DATA_H_
33+
#endif // WEBF_CORE_WEBF_API_PLUGIN_API_CHARACTER_DATA_H_

0 commit comments

Comments
 (0)