Skip to content

Commit

Permalink
chore: reorganize file structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
andycall committed Jan 29, 2022
1 parent c14831b commit 5c1dd1b
Show file tree
Hide file tree
Showing 97 changed files with 437 additions and 285 deletions.
20 changes: 18 additions & 2 deletions bridge/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ endif()
list(APPEND BRIDGE_SOURCE
kraken_bridge.cc
${CMAKE_CURRENT_SOURCE_DIR}/include/kraken_bridge.h
${CMAKE_CURRENT_SOURCE_DIR}/include/dart_methods.h
foundation/macros.h
foundation/logging.cc
foundation/logging.h
Expand All @@ -103,7 +102,6 @@ list(APPEND BRIDGE_SOURCE
foundation/ui_command_buffer.cc
foundation/ui_command_buffer.h
foundation/ui_command_callback_queue.cc
dart_methods.cc
polyfill/dist/polyfill.cc
)

Expand Down Expand Up @@ -198,6 +196,8 @@ if ($ENV{KRAKEN_JS_ENGINE} MATCHES "quickjs")
bindings/qjs/native_string.h
bindings/qjs/qjs_patch.cc
bindings/qjs/qjs_patch.h
bindings/qjs/dart_methods.cc
bindings/qjs/dart_methods.h
bindings/qjs/module_manager.cc
bindings/qjs/module_manager.h
bindings/qjs/html_parser.cc
Expand Down Expand Up @@ -278,6 +278,22 @@ if ($ENV{KRAKEN_JS_ENGINE} MATCHES "quickjs")
bindings/qjs/dom/custom_event.h
bindings/qjs/dom/all_collection.cc
bindings/qjs/dom/all_collection.h

# Core sources
core/dom/character_data.cc
core/dom/character_data.h
core/dom/comment.cc
core/dom/comment.h
core/dom/node.cc
core/dom/node.h
core/dom/events/custom_event.cc
core/dom/events/custom_event.h
core/dom/events/event.h
core/dom/events/event.cc
core/dom/events/event_listener_map.cc
core/dom/events/event_listener_map.h
core/dom/events/event_target.cc
core/dom/events/event_target.h
)

# Quickjs use __builtin_frame_address() to get stack pointer, we should add follow options to get it work with -O2
Expand Down
79 changes: 0 additions & 79 deletions bridge/bindings/qjs/dom/all_collection.cc

This file was deleted.

32 changes: 0 additions & 32 deletions bridge/bindings/qjs/dom/all_collection.h

This file was deleted.

108 changes: 0 additions & 108 deletions bridge/bindings/qjs/dom/elements/image_element.cc

This file was deleted.

48 changes: 0 additions & 48 deletions bridge/bindings/qjs/dom/elements/image_element.h

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Author: Kraken Team.
*/

#include "style_declaration.h"
#include "css_style_declaration.h"
#include "event_target.h"

namespace kraken {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Author: Kraken Team.
*/

#ifndef KRAKENBRIDGE_STYLE_DECLARATION_H
#define KRAKENBRIDGE_STYLE_DECLARATION_H
#ifndef KRAKENBRIDGE_CSS_STYLE_DECLARATION_H
#define KRAKENBRIDGE_CSS_STYLE_DECLARATION_H

#include "bindings/qjs/context_macros.h"
#include "bindings/qjs/dom/event_target.h"
Expand Down Expand Up @@ -53,4 +53,4 @@ class CSSStyleDeclaration : public GarbageCollected<CSSStyleDeclaration> {

} // namespace kraken

#endif // KRAKENBRIDGE_STYLE_DECLARATION_H
#endif // KRAKENBRIDGE_CSS_STYLE_DECLARATION_H
6 changes: 6 additions & 0 deletions bridge/core/dom/character_data.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/*
* Copyright (C) 2021 Alibaba Inc. All rights reserved.
* Author: Kraken Team.
*/

#include "character_data.h"
11 changes: 11 additions & 0 deletions bridge/core/dom/character_data.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* Copyright (C) 2021 Alibaba Inc. All rights reserved.
* Author: Kraken Team.
*/

#ifndef KRAKENBRIDGE_CHARACTER_DATA_H
#define KRAKENBRIDGE_CHARACTER_DATA_H

class character_data {};

#endif // KRAKENBRIDGE_CHARACTER_DATA_H
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Author: Kraken Team.
*/

#include "comment_node.h"
#include "comment.h"
#include "document.h"

namespace kraken {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Author: Kraken Team.
*/

#ifndef KRAKENBRIDGE_COMMENT_NODE_H
#define KRAKENBRIDGE_COMMENT_NODE_H
#ifndef KRAKENBRIDGE_COMMENT_H
#define KRAKENBRIDGE_COMMENT_H

#include "node.h"

Expand Down Expand Up @@ -52,4 +52,4 @@ const WrapperTypeInfo commentTypeInfo = {"Comment", &nodeTypeInfo, commentCreato

} // namespace kraken

#endif // KRAKENBRIDGE_COMMENT_NODE_H
#endif // KRAKENBRIDGE_COMMENT_H
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "element.h"
#include "frame_request_callback_collection.h"
#include "node.h"
#include "script_animation_controller.h"
#include "scripted_animation_controller.h"

namespace kraken {

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 5c1dd1b

Please sign in to comment.