Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: redesign bridge code base #18

Merged
merged 401 commits into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
401 commits
Select commit Hold shift + click to select a range
2507197
Committing clang-format changes
Aug 8, 2022
b41289f
fix: clean up merge remains.
andycall Aug 9, 2022
25da74e
Committing clang-format changes
Aug 9, 2022
fbc90cb
fix: set webf flutter requirement.
andycall Aug 6, 2022
1c2a528
fix: fix example bundle name.
andycall Aug 6, 2022
b84a8c5
fix: fix plugin test.
andycall Aug 6, 2022
85fd346
test: add flexbox tests of blink.
temper357 Apr 27, 2022
35a298d
test: update tests
temper357 May 12, 2022
9fbb534
test: add comment
temper357 May 13, 2022
c57015e
fix: fix remaining test specs.
andycall Aug 7, 2022
3bca017
fix: fix remaining test specs.
andycall Aug 7, 2022
8abd6c2
Update bug_report.md
andycall Aug 8, 2022
5df7986
fix: fix namespace and error defines.
andycall Aug 9, 2022
03a87cc
Merge branch 'main' into refactor/remove_host_class
andycall Aug 9, 2022
0b35f50
fix: fix global error report.
andycall Aug 9, 2022
925d8fd
Committing clang-format changes
Aug 9, 2022
9c76d18
feat: add promise rejection event.
andycall Aug 10, 2022
d8a5f14
feat: auto generate property event handlers from IDL.
andycall Aug 14, 2022
172a71b
Committing clang-format changes
Aug 14, 2022
afd2644
fix: fix dispatch event memory leak.
andycall Aug 15, 2022
5c9554c
feat: add property event listener for window and body element.
andycall Aug 15, 2022
8cf26ff
fix: fix context specs.
andycall Aug 17, 2022
2e0e0be
Committing clang-format changes
Aug 17, 2022
cc5b41d
fix: fix key query in element.style
andycall Aug 19, 2022
a01c309
Committing clang-format changes
Aug 19, 2022
00d0b5c
feat: add more events implements.
andycall Aug 19, 2022
ce18607
feat: add touch and touchList class.
andycall Aug 20, 2022
4cfba9a
Committing clang-format changes
Aug 20, 2022
38931d4
feat: support generate code from static member.
andycall Aug 23, 2022
8afcb92
Committing clang-format changes
Aug 23, 2022
fa03311
feat: add html collection and support enumerate property of object.
andycall Aug 23, 2022
251ea4b
fix: fix enumerate props with Object.keys()
andycall Aug 24, 2022
4e1829f
feat: add html anchor element.
andycall Aug 24, 2022
67b9e06
feat: add image and script element.
andycall Aug 24, 2022
d45cd23
feat: add canvas, input, button, and textarea element
andycall Aug 26, 2022
e87bd06
Committing clang-format changes
Aug 26, 2022
17faabf
fix: fix ts failed.
andycall Aug 27, 2022
ff8f8dd
Committing clang-format changes
Aug 27, 2022
ddfe181
Merge remote-tracking branch 'origin/main' into refactor/remove_host_…
andycall Sep 2, 2022
1b4d6d5
fix: fix quickjs compile
andycall Sep 2, 2022
9a04dc8
Committing clang-format changes
Sep 2, 2022
19877d9
fix: fix commandQueue stackoverflow.
andycall Sep 5, 2022
c0694f3
Committing clang-format changes
Sep 5, 2022
041cddd
fix: fix document and window initialize
andycall Sep 5, 2022
80c2e81
fix: fix canvas context 2d.
andycall Sep 5, 2022
1a8a431
fix: fix canvas context 2d options params.
andycall Sep 5, 2022
f6cfcfe
Committing clang-format changes
Sep 5, 2022
ebb04c1
feat: add event_factory
andycall Sep 7, 2022
8c6b5b0
fix: sync current event implementation with dart side.
andycall Sep 8, 2022
6e07e33
Committing clang-format changes
Sep 8, 2022
7bf8637
fix: fix dispatch event from dart side.
andycall Sep 8, 2022
a1fd1c6
Committing clang-format changes
Sep 8, 2022
8890ba1
fix: fix returnValue and event factory leak.
andycall Sep 8, 2022
1d0e4bd
Committing clang-format changes
Sep 8, 2022
27c9f34
fix: fix event.toRaw() doesn't match to struct memory align.
andycall Sep 8, 2022
09e0b73
fix: fix override atomicString leaks.
andycall Sep 9, 2022
4b04e5d
Committing clang-format changes
Sep 9, 2022
59b425c
feat: add widget element class and support async and sync function fo…
andycall Sep 11, 2022
1ac6b60
Committing clang-format changes
Sep 11, 2022
3b9bf88
fix: add widget element creation.
andycall Sep 11, 2022
498a99b
Committing clang-format changes
Sep 11, 2022
ed6ecc6
fix: fix TEST_DIR env.
andycall Sep 11, 2022
3511684
fix: fix binding_object getBindingPropertyNames.
andycall Sep 12, 2022
cced15f
fix: fix binding call AnonymousFunctions.
andycall Sep 12, 2022
51c4b96
Committing clang-format changes
Sep 12, 2022
c6d84c2
fix: fix arguments to array leaks.
andycall Sep 12, 2022
f881bbf
fix: fix pending promise cause memory leaks.
andycall Sep 13, 2022
2bc8329
fix: fix documentFragment.
andycall Sep 13, 2022
66d7dff
fix: fix replaceChild uicommand.
andycall Sep 13, 2022
9620979
Committing clang-format changes
Sep 13, 2022
43c33af
fix: fix spec test
andycall Sep 13, 2022
0bab3c1
Committing clang-format changes
Sep 13, 2022
ec26aef
fix: add children api for element.
andycall Sep 15, 2022
9b03bdb
fix: fix tagname not uppercase.
andycall Sep 15, 2022
2281ff2
feat: add Image class.
andycall Sep 15, 2022
503500b
fix: fix interface error.
andycall Sep 15, 2022
5788371
fix: should batch update when incoming new uicommands.
andycall Sep 15, 2022
dbb3f85
Committing clang-format changes
Sep 15, 2022
c077e87
fix: fix img specs.
andycall Sep 15, 2022
d904258
fix: fix form element initialize.
andycall Sep 15, 2022
88ab06a
feat: add popstate event and refactor dart event.
andycall Sep 16, 2022
61f12a9
Committing clang-format changes
Sep 16, 2022
f15bc51
fix: fix string null.
andycall Sep 16, 2022
0126cc9
feat: add additional check for dictionary objects.
andycall Sep 18, 2022
c43c359
feat: add copy constructor of member kind.
andycall Sep 18, 2022
8accd60
feat: add performance api.
andycall Sep 18, 2022
75ec542
Committing clang-format changes
Sep 18, 2022
babf669
fix: should drainPending promise after invoke callback.
andycall Sep 19, 2022
4cbebee
fix: add arguments type check.
andycall Sep 19, 2022
87cb441
fix: add CustomEvent.initCustomEvent API.
andycall Sep 19, 2022
d8e9613
fix: fix textNode.data not readonly.
andycall Sep 19, 2022
25bf3fb
fix: add click() for htmlElement.
andycall Sep 19, 2022
48716d2
fix: fix textare spec.
andycall Sep 19, 2022
74a591c
Committing clang-format changes
Sep 19, 2022
4486372
fix: fix addEvent and removeEvent uiCommand set twice.
andycall Sep 19, 2022
8a704d5
fix: fix crash when dispose page.
andycall Sep 19, 2022
7f6db50
fix: add missing touchList implements.
andycall Sep 19, 2022
ee4076c
Committing clang-format changes
Sep 19, 2022
17a8b04
fix: fix mouseEvent constructor params.
andycall Sep 19, 2022
df7a357
fix: fix dispatch event from dart.
andycall Sep 19, 2022
5f04645
fix: fix touchEvent not bubbles.
andycall Sep 19, 2022
68afa1e
Committing clang-format changes
Sep 19, 2022
b604fbc
fix: fix outerHTML tagName.
andycall Sep 19, 2022
84b4ce4
fix: fix clone node.
andycall Sep 19, 2022
4c957d4
Committing clang-format changes
Sep 19, 2022
5210a94
fix: fix document.createComment.
andycall Sep 19, 2022
0bf929f
feat: add document.all api.
andycall Sep 20, 2022
fe9228a
fix: fix element.nodeName
andycall Sep 20, 2022
3983ba5
feat: add firstElementChild and lastElementChild api.
andycall Sep 20, 2022
82505d6
fix: fix event propagationStopped.
andycall Sep 20, 2022
2c83c76
Committing clang-format changes
Sep 20, 2022
53f1f9e
Merge remote-tracking branch 'origin/feat/css_selector' into refactor…
andycall Sep 20, 2022
429a2ca
feat: add querySelector and querySelectorAll API.
andycall Sep 20, 2022
8ee0210
Committing clang-format changes
Sep 20, 2022
06ad186
feat: add getElementById, getElementsByClass, getElementsByTagName, g…
andycall Sep 20, 2022
b9dcc67
Committing clang-format changes
Sep 20, 2022
fec07f5
fix: fix remove id attribute not working.
andycall Sep 21, 2022
742c504
feat: migrate id and class to dart impl.
andycall Sep 21, 2022
a7298a9
fix: add native value type assert.
andycall Sep 21, 2022
821b0df
fix: fix binding property types.
andycall Sep 21, 2022
c5484ce
fix: fix querySelector and getElementsByClassName.
andycall Sep 21, 2022
2a328f2
Committing clang-format changes
Sep 21, 2022
50a1109
fix: fix cached atomic_string empty.
andycall Sep 21, 2022
0c7a065
fix: fix clone node ui command.
andycall Sep 21, 2022
6cf4ec3
fix: fix native value type convert when pointer is nullptr.
andycall Sep 21, 2022
98882e5
fix: fix Node.isConnected.
andycall Sep 21, 2022
aabc807
fix: fix Node.isConnected.
andycall Sep 21, 2022
4aa7fa0
fix: fix set Text.nodeValue.
andycall Sep 21, 2022
0f0feba
Committing clang-format changes
Sep 21, 2022
ecc9d3b
fix: fix binding returned annoymouse function can not call twice a lot.
andycall Sep 21, 2022
9207a7f
fix: fix async binding function null.
andycall Sep 21, 2022
2ece6d1
fix: fix invoke module params.
andycall Sep 21, 2022
886ef65
fix: fix blob memory crash.
andycall Sep 21, 2022
ef16850
fix: fix timer crash when nested.
andycall Sep 22, 2022
2f03881
fix: fix invoke module listeners.
andycall Sep 22, 2022
820694a
fix: fix screen and window.
andycall Sep 22, 2022
3e476f2
Committing clang-format changes
Sep 22, 2022
0700b81
fix: enable more test specs.
andycall Sep 22, 2022
0891658
feat: ignore underscore properties on widgetElement.
andycall Sep 22, 2022
8da271e
fix: fix gen code with required args.
andycall Sep 22, 2022
6995257
Committing clang-format changes
Sep 22, 2022
db603f1
feat: add node operation benchmark
andycall Sep 22, 2022
645d111
fix: fix javascript inherit class have no methods.
andycall Sep 22, 2022
fef97ab
fix: recover more event target specs.
andycall Sep 23, 2022
889bf74
Committing clang-format changes
Sep 23, 2022
e679be1
fix: fix img load event trigger to early if image assets are in cache.
andycall Sep 23, 2022
6622185
fix: fix invalid access when uicommand overflow.
andycall Sep 23, 2022
8a02e99
fix: fix android 32bit compile.
andycall Sep 23, 2022
678ea13
Committing clang-format changes
Sep 23, 2022
46a51e8
fix: fix parseHTML in test env.
andycall Sep 23, 2022
330042b
Merge remote-tracking branch 'origin/feat/css_selector' into refactor…
andycall Sep 23, 2022
c526883
fix: document.documentElement can be replaced.
andycall Sep 23, 2022
41982c3
Merge remote-tracking branch 'origin/main' into refactor/remove_host_…
andycall Sep 23, 2022
b35b995
fix: fix core-js cause document leak.
andycall Sep 23, 2022
ecb0721
Committing clang-format changes
Sep 23, 2022
8dee4d3
fix: fix linux build
andycall Sep 23, 2022
94867e7
chore: fix dart lint.
andycall Sep 23, 2022
5e52160
Merge branch 'refactor/remove_host_class' of github.com:openwebf/webf…
andycall Sep 23, 2022
c23cd68
Committing clang-format changes
Sep 23, 2022
5e8a9d9
fix: fix linux build.
andycall Sep 23, 2022
e14a020
Merge branch 'refactor/remove_host_class' of github.com:openwebf/webf…
andycall Sep 23, 2022
fb0835d
Committing clang-format changes
Sep 23, 2022
6a6d050
fix: fix linux build
andycall Sep 23, 2022
6d55ad6
Merge remote-tracking branch 'origin/feat/css_selector' into refactor…
andycall Sep 23, 2022
a84ac97
Committing clang-format changes
Sep 23, 2022
f90a349
fix: add options params for document.createElement.
andycall Sep 23, 2022
76f68d4
fix: fix linux build.
andycall Sep 23, 2022
f76ad89
fix: fix core dump in linux env.
andycall Sep 23, 2022
48dcc99
Committing clang-format changes
Sep 23, 2022
cf0a7ce
chore: try to dump cores from github actions
andycall Sep 24, 2022
42e5e59
Update integration_test_flutter.yml
andycall Sep 24, 2022
029e98b
refactor: redesigned module api.
andycall Sep 24, 2022
44b341a
feat: remove unused and deprecated features.
andycall Sep 24, 2022
e0a799e
Committing clang-format changes
Sep 24, 2022
1da1165
chore: fix types.
andycall Sep 24, 2022
9e6af0e
beta: 0.13.0-beta.2
andycall Sep 25, 2022
e5ff545
fix: fix broken symlinks
andycall Sep 25, 2022
a73d2bd
fix: fix publish linter check.
andycall Sep 25, 2022
2fda093
fix: fix error assertion.
andycall Sep 25, 2022
6c0092d
fix: handle exception when convert script value to native value.
andycall Sep 25, 2022
091d230
fix: fix heap use after free when free QJSFunction at dispose stage.
andycall Sep 25, 2022
d3f87cc
Merge branch 'refactor/remove_host_class' into refactor/invoke_module…
andycall Sep 25, 2022
592b900
Committing clang-format changes
Sep 25, 2022
245a188
fix: fix compile.
andycall Sep 25, 2022
bd6be27
fix: fix scriptState cause string leaks.
andycall Sep 25, 2022
f7dd89a
beta: 0.13.0-beta.3
andycall Sep 25, 2022
4d2c85a
fix: fix integration tests.
andycall Sep 26, 2022
8ff9fce
fix: fix reload crash cause by free QJSFunction when JSContext freed
andycall Sep 26, 2022
94dcf36
fix: fix android platform string bad access.
andycall Sep 26, 2022
737b590
chore: remove deprecated native apis.
andycall Sep 26, 2022
f34da31
Committing clang-format changes
Sep 26, 2022
f77afe5
Merge remote-tracking branch 'origin/refactor/remove_host_class' into…
andycall Sep 26, 2022
5535e7a
Update integration_test_flutter.yml
andycall Sep 24, 2022
e1728a6
fix: fix build.
andycall Sep 26, 2022
72d1b2d
Merge remote-tracking branch 'origin/refactor/remove_host_class' into…
andycall Sep 26, 2022
d282c34
fix: fix document create event crash
andycall Sep 26, 2022
71b46b0
fix: fix message event.
andycall Sep 26, 2022
5c638a6
fix: fix plugin test.
andycall Sep 26, 2022
f0b5859
Merge branch 'refactor/remove_host_class' into refactor/invoke_module…
andycall Sep 26, 2022
3fb58eb
fix: upgrade websocket plugin.
andycall Sep 26, 2022
4791c38
fix: fix undefined params of addEventListener.
andycall Sep 26, 2022
c92a120
fix: add isContextValid and isCtxValid();
andycall Sep 26, 2022
11730de
feat: flush all disposeEventTarget commands when dispose page.
andycall Sep 26, 2022
462e0f6
Committing clang-format changes
Sep 26, 2022
0023f11
feat: add document.cookie.
andycall Sep 26, 2022
648c174
fix: fix multiple pages didn't schedule frames.
andycall Sep 26, 2022
2331909
fix: fix android 32bit build.
andycall Sep 27, 2022
4c37f96
Committing clang-format changes
Sep 27, 2022
9624a34
chore: remove mistake define.
andycall Sep 27, 2022
c9f0609
fix: fix JSPropertyDescriptor not initialized.
andycall Sep 27, 2022
0a60ef6
ci: fix integration test ci
andycall Sep 27, 2022
5a3c236
fix: should not bind bindObject when it already disposed.
andycall Sep 27, 2022
5f03c2c
fix: should init dart methods when allocate new bridge.
andycall Sep 27, 2022
ea22a72
fix: fix linux build.
andycall Sep 27, 2022
99c59fb
Committing clang-format changes
Sep 27, 2022
9d28b6b
chore: remove unused code.
andycall Sep 27, 2022
53513be
fix: fix dart allocated binding object not initialized.
andycall Sep 28, 2022
f7d70b6
fix: fix android 32 bit build.
andycall Sep 28, 2022
410f514
Committing clang-format changes
Sep 28, 2022
2da1286
fix: fix set event handler property to custom element.
andycall Sep 28, 2022
9920cb9
Committing clang-format changes
Sep 28, 2022
e4772f0
feat: ignore undefined property when set attribute.
andycall Sep 30, 2022
eac50cf
feat: add link element interface.
andycall Sep 30, 2022
c586a10
fix: disable attribute querySelector.
andycall Sep 30, 2022
66d353a
chore: add hsl snapshots.
andycall Sep 30, 2022
6606fb6
Committing clang-format changes
Sep 30, 2022
68dd213
fix: fix ui command buffer flush crash when hot restart.
andycall Sep 30, 2022
811cc27
Committing clang-format changes
Sep 30, 2022
53f1aed
fix: fix missing isAttributeDefined on element.
andycall Oct 1, 2022
150aa24
Committing clang-format changes
Oct 1, 2022
91558ae
revert: temporary disable ignore element attributes.
andycall Oct 1, 2022
18f9c24
fix: animation-duration should reset to zero if negative.
andycall Oct 2, 2022
ab43596
fix: element's offsetParent should ended at documentElement.
andycall Oct 2, 2022
93fdd74
fix: parseHTML should include header and body.
andycall Oct 2, 2022
52c6f6f
fix: fix animation test specs.
andycall Oct 2, 2022
6ca0074
Committing clang-format changes
Oct 2, 2022
4444b91
revert: ab43596cebead352cb43ea1f842212350f8111df
andycall Oct 4, 2022
478b1d5
test: fix test specs.
andycall Oct 4, 2022
8babe7b
test: fix test specs.
andycall Oct 4, 2022
60e805a
Merge pull request #55 from openwebf/beta/0.13.0
andycall Oct 6, 2022
98606ba
Merge branch 'feat/css_selector' into refactor/remove_host_class
andycall Oct 6, 2022
3ab80ba
fix: should flush ui command before evaluate script when parse html.
andycall Oct 8, 2022
7220125
fix: fix module api callback leaks.
andycall Oct 6, 2022
5ef6f19
Committing clang-format changes
Oct 8, 2022
60750f2
Merge pull request #63 from openwebf/fix/should_flush_ui_command_when…
andycall Oct 9, 2022
b88c8b5
chore: fix code style and macos build.
andycall Oct 13, 2022
f688361
chore: remove empty quickjs.c
andycall Oct 14, 2022
e1e180c
Merge branch 'feat/css_selector' into refactor/remove_host_class
andycall Oct 18, 2022
693dc07
fix: fix style didn't changed when remove link element.
andycall Oct 18, 2022
76d30be
chore: fix specs.
andycall Oct 20, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: fix document.createComment.
  • Loading branch information
andycall committed Sep 20, 2022
commit 5210a9402c5541afdfedcf6b0f7f01243b5a654d
4 changes: 4 additions & 0 deletions bridge/core/dom/document.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ Comment* Document::createComment(ExceptionState& exception_state) {
return Comment::Create(*this);
}

Comment* Document::createComment(const AtomicString& data, ExceptionState& exception_state) {
return Comment::Create(*this);
}

Event* Document::createEvent(const AtomicString& type, ExceptionState& exception_state) {
return EventFactory::Create(GetExecutingContext(), type, nullptr);
}
Expand Down
2 changes: 1 addition & 1 deletion bridge/core/dom/document.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interface Document extends Node {
createElement(tagName: string): Element;
createTextNode(value: string): Text;
createDocumentFragment(): DocumentFragment;
createComment(): Comment;
createComment(data?: string): Comment;
createEvent(event_type: string): Event;

new(): Document;
Expand Down
1 change: 1 addition & 0 deletions bridge/core/dom/document.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class Document : public ContainerNode, public TreeScope {
Text* createTextNode(const AtomicString& value, ExceptionState& exception_state);
DocumentFragment* createDocumentFragment(ExceptionState& exception_state);
Comment* createComment(ExceptionState& exception_state);
Comment* createComment(const AtomicString& data, ExceptionState& exception_state);
Event* createEvent(const AtomicString& type, ExceptionState& exception_state);

[[nodiscard]] std::string nodeName() const override;
Expand Down
6 changes: 2 additions & 4 deletions integration_tests/specs/dom/nodes/clone-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,14 @@ describe('Clone node', () => {

it('should work with img element', async (done) => {
const img = document.createElement('img');
img.addEventListener('load', loadImg);
img.style.width = '100px';
img.style.height = '100px';
img.src = "assets/kraken.png";
document.body.appendChild(img);
const img2 = img.cloneNode(false);
img2.addEventListener('load', loadImg);
document.body.appendChild(img2);

let anotherImgHasLoad = false;
async function loadImg() {
if (anotherImgHasLoad) {
Expand All @@ -124,9 +125,6 @@ describe('Clone node', () => {
anotherImgHasLoad = true;
}
}

img.addEventListener('load', loadImg);
img2.addEventListener('load', loadImg);
})

it('deep is not required', async () => {
Expand Down