Skip to content

Commit 659212a

Browse files
author
openkraken-bot
committed
Committing clang-format changes
1 parent 46dccea commit 659212a

8 files changed

+24
-16
lines changed

bridge/bindings/qjs/atomic_string.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ class AtomicString {
4141

4242
// Return the undefined string value from atom key.
4343
JSValue ToQuickJS(JSContext* ctx) const {
44-
if (ctx_ == nullptr) { return JS_NULL; }
44+
if (ctx_ == nullptr) {
45+
return JS_NULL;
46+
}
4547

4648
assert(ctx_ != nullptr);
4749
return JS_AtomToValue(ctx, atom_);

bridge/bindings/qjs/binding_initializer.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
#include "qjs_html_html_element.h"
2525
#include "qjs_html_template_element.h"
2626
#include "qjs_html_unknown_element.h"
27+
#include "qjs_location.h"
2728
#include "qjs_message_event.h"
2829
#include "qjs_module_manager.h"
2930
#include "qjs_node.h"
3031
#include "qjs_node_list.h"
3132
#include "qjs_text.h"
3233
#include "qjs_window.h"
3334
#include "qjs_window_or_worker_global_scope.h"
34-
#include "qjs_location.h"
3535

3636
namespace kraken {
3737

bridge/core/dom/document.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ HTMLHeadElement* Document::head() const {
196196
return Traversal<HTMLHeadElement>::FirstChild(*de);
197197
}
198198

199-
uint32_t Document::RequestAnimationFrame(const std::shared_ptr<FrameCallback>& callback, ExceptionState& exception_state) {
199+
uint32_t Document::RequestAnimationFrame(const std::shared_ptr<FrameCallback>& callback,
200+
ExceptionState& exception_state) {
200201
return script_animation_controller_.RegisterFrameCallback(callback, exception_state);
201202
}
202203

bridge/core/dom/scripted_animation_controller.cc

+8-3
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,14 @@ static void handleRAFTransientCallback(void* ptr, int32_t contextId, double high
2424
frame_callback->Fire(highResTimeStamp);
2525
}
2626

27-
uint32_t ScriptAnimationController::RegisterFrameCallback(const std::shared_ptr<FrameCallback>& frame_callback, ExceptionState& exception_state) {
27+
uint32_t ScriptAnimationController::RegisterFrameCallback(const std::shared_ptr<FrameCallback>& frame_callback,
28+
ExceptionState& exception_state) {
2829
auto* context = frame_callback->context();
2930

3031
if (context->dartMethodPtr()->requestAnimationFrame == nullptr) {
31-
exception_state.ThrowException(context->ctx(), ErrorType::InternalError, "Failed to execute 'requestAnimationFrame': dart method (requestAnimationFrame) is not registered.");
32+
exception_state.ThrowException(
33+
context->ctx(), ErrorType::InternalError,
34+
"Failed to execute 'requestAnimationFrame': dart method (requestAnimationFrame) is not registered.");
3235
return -1;
3336
}
3437

@@ -45,7 +48,9 @@ void ScriptAnimationController::CancelFrameCallback(ExecutingContext* context,
4548
uint32_t callbackId,
4649
ExceptionState& exception_state) {
4750
if (context->dartMethodPtr()->cancelAnimationFrame == nullptr) {
48-
exception_state.ThrowException(context->ctx(), ErrorType::InternalError, "Failed to execute 'cancelAnimationFrame': dart method (cancelAnimationFrame) is not registered.");
51+
exception_state.ThrowException(
52+
context->ctx(), ErrorType::InternalError,
53+
"Failed to execute 'cancelAnimationFrame': dart method (cancelAnimationFrame) is not registered.");
4954
return;
5055
}
5156

bridge/core/frame/legacy/location.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ namespace kraken {
1010

1111
void Location::__kraken_location_reload__(ExecutingContext* context, ExceptionState& exception_state) {
1212
if (context->dartMethodPtr()->reloadApp == nullptr) {
13-
exception_state.ThrowException(context->ctx(), ErrorType::InternalError, "Failed to execute 'reload': dart method (reloadApp) is not registered.");
13+
exception_state.ThrowException(context->ctx(), ErrorType::InternalError,
14+
"Failed to execute 'reload': dart method (reloadApp) is not registered.");
1415
return;
1516
}
1617

bridge/core/frame/legacy/location.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
#ifndef KRAKENBRIDGE_LOCATION_H
77
#define KRAKENBRIDGE_LOCATION_H
88

9-
#include "bindings/qjs/script_wrappable.h"
109
#include "bindings/qjs/exception_state.h"
10+
#include "bindings/qjs/script_wrappable.h"
1111

1212
namespace kraken {
1313

14-
class Location {
14+
class Location {
1515
public:
1616
static void __kraken_location_reload__(ExecutingContext* context, ExceptionState& exception_state);
1717
};

bridge/core/frame/window.cc

+3-4
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,9 @@ void Window::postMessage(const ScriptValue& message,
9898

9999
double Window::requestAnimationFrame(const std::shared_ptr<QJSFunction>& callback, ExceptionState& exceptionState) {
100100
if (GetExecutingContext()->dartMethodPtr()->flushUICommand == nullptr) {
101-
exceptionState.ThrowException(
102-
ctx(), ErrorType::InternalError,
103-
"Failed to execute 'flushUICommand': dart method (flushUICommand) executed "
104-
"with unexpected error.");
101+
exceptionState.ThrowException(ctx(), ErrorType::InternalError,
102+
"Failed to execute 'flushUICommand': dart method (flushUICommand) executed "
103+
"with unexpected error.");
105104
return 0;
106105
}
107106

bridge/core/frame/window_test.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ requestAnimationFrame(() => {
6767
EXPECT_EQ(logCalled, true);
6868
}
6969

70-
TEST(Window, cancelAnimationFrame) {
70+
TEST(Window, cancelAnimationFrame) {
7171
auto bridge = TEST_init();
7272

7373
kraken::KrakenPage::consoleMessageHandler = [](void* ctx, const std::string& message, int logLevel) { abort(); };
@@ -83,7 +83,7 @@ requestAnimationFrame(() => {
8383
TEST_runLoop(bridge->GetExecutingContext());
8484
}
8585

86-
TEST(Window, postMessage) {
86+
TEST(Window, postMessage) {
8787
{
8888
auto bridge = TEST_init();
8989
static bool logCalled = false;
@@ -107,7 +107,7 @@ requestAnimationFrame(() => {
107107
{ TEST_init(); }
108108
}
109109

110-
TEST(Window, location) {
110+
TEST(Window, location) {
111111
auto bridge = TEST_init();
112112
static bool logCalled = false;
113113
kraken::KrakenPage::consoleMessageHandler = [](void* ctx, const std::string& message, int logLevel) {

0 commit comments

Comments
 (0)