diff --git a/bridge/core/api/document.cc b/bridge/core/api/document.cc index 935144ed05..bcfd34a6c9 100644 --- a/bridge/core/api/document.cc +++ b/bridge/core/api/document.cc @@ -228,7 +228,7 @@ WebFValue DocumentPublicMethods::ElementFromPoint } WebFValue DocumentPublicMethods::DocumentElement(webf::Document* document) { - auto* document_element = document->documentElement(); + auto* document_element = DynamicTo(document->documentElement()); WebFValueStatus* status_block = document_element->KeepAlive(); return WebFValue{document_element, document_element->htmlElementPublicMethods(), status_block}; diff --git a/bridge/core/css/parser/find_length_of_declaration_list-inl.h b/bridge/core/css/parser/find_length_of_declaration_list-inl.h index 17708c5568..467744a02b 100644 --- a/bridge/core/css/parser/find_length_of_declaration_list-inl.h +++ b/bridge/core/css/parser/find_length_of_declaration_list-inl.h @@ -11,6 +11,7 @@ #include #endif +#include "core/base/compiler_specific.h" #include "foundation/string_view.h" namespace webf { @@ -365,7 +366,7 @@ ALWAYS_INLINE static size_t FindLengthOfDeclarationList(const uint8_t* begin, #endif -inline static size_t FindLengthOfDeclarationList(std::string_view str) { +inline ALWAYS_INLINE size_t FindLengthOfDeclarationList(std::string_view str) { return FindLengthOfDeclarationList(reinterpret_cast(str.data()), reinterpret_cast(str.data() + str.length())); } diff --git a/bridge/core/dom/node.cc b/bridge/core/dom/node.cc index 032e9f7ca6..a4ff0ab5b3 100644 --- a/bridge/core/dom/node.cc +++ b/bridge/core/dom/node.cc @@ -40,7 +40,6 @@ #include "element.h" #include "empty_node_list.h" #include "node.h" -#include "node_data.h" #include "node_traversal.h" #include "qjs_node.h" #include "text.h" diff --git a/bridge/core/html/html_element.h b/bridge/core/html/html_element.h index a915b113bd..03c739a3f2 100644 --- a/bridge/core/html/html_element.h +++ b/bridge/core/html/html_element.h @@ -24,8 +24,6 @@ class HTMLElement : public Element { return &html_element_public_methods; } - private: - void ParseAttribute(const webf::Element::AttributeModificationParams &) override; }; diff --git a/bridge/foundation/shared_ui_command.cc b/bridge/foundation/shared_ui_command.cc index 2b397deba2..7ff118b08e 100644 --- a/bridge/foundation/shared_ui_command.cc +++ b/bridge/foundation/shared_ui_command.cc @@ -2,6 +2,8 @@ * Copyright (C) 2022-present The WebF authors. All rights reserved. */ +#include +#include #include "shared_ui_command.h" #include "core/executing_context.h" #include "foundation/logging.h" @@ -45,7 +47,7 @@ void* SharedUICommand::data() { uint32_t SharedUICommand::kindFlag() { // simply spin wait for the swapBuffers to finish. - while (is_blocking_writing_.load(std::memory_order::memory_order_acquire)) { + while (is_blocking_writing_.load(std::memory_order_acquire)) { } return active_buffer->kindFlag(); @@ -59,7 +61,7 @@ int64_t SharedUICommand::size() { // third called by dart to clear commands. void SharedUICommand::clear() { // simply spin wait for the swapBuffers to finish. - while (is_blocking_writing_.load(std::memory_order::memory_order_acquire)) { + while (is_blocking_writing_.load(std::memory_order_acquire)) { } active_buffer->clear(); } diff --git a/bridge/scripts/code_generator/bin/code_generator.js b/bridge/scripts/code_generator/bin/code_generator.js index e11acc5c92..4ae31aedd7 100644 --- a/bridge/scripts/code_generator/bin/code_generator.js +++ b/bridge/scripts/code_generator/bin/code_generator.js @@ -319,10 +319,10 @@ function genPluginAPICodeFromTypeDefine() { let headerFilePath = path.join(b.dist, '../include/plugin_api', b.filename.replace('plugin_api_', '')); let genFilePath = path.join(b.dist, b.filename); - wirteFileIfChanged(headerFilePath + '.h', result.header); + writeFileIfChanged(headerFilePath + '.h', result.header); if (result.source) { - wirteFileIfChanged(genFilePath + '.cc', result.source); + writeFileIfChanged(genFilePath + '.cc', result.source); } } @@ -352,7 +352,7 @@ function genRustCodeFromTypeDefine() { let genFilePath = path.join(b.dist, '../rusty_webf_sys/src', b.filename); - wirteFileIfChanged(genFilePath + '.rs', result); + writeFileIfChanged(genFilePath + '.rs', result); } }