Skip to content

Commit 916e4ea

Browse files
author
openwebf-bot
committed
Committing clang-format changes
1 parent a373ec9 commit 916e4ea

33 files changed

+263
-345
lines changed

bridge/bindings/qjs/binding_initializer.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
#include "qjs_custom_event.h"
2323
#include "qjs_document.h"
2424
#include "qjs_document_fragment.h"
25-
#include "qjs_mutation_observer.h"
26-
#include "qjs_mutation_record.h"
27-
#include "qjs_mutation_observer_registration.h"
2825
#include "qjs_dom_matrix.h"
2926
#include "qjs_dom_matrix_readonly.h"
3027
#include "qjs_dom_string_map.h"
@@ -64,6 +61,9 @@
6461
#include "qjs_message_event.h"
6562
#include "qjs_module_manager.h"
6663
#include "qjs_mouse_event.h"
64+
#include "qjs_mutation_observer.h"
65+
#include "qjs_mutation_observer_registration.h"
66+
#include "qjs_mutation_record.h"
6767
#include "qjs_node.h"
6868
#include "qjs_node_list.h"
6969
#include "qjs_performance.h"

bridge/bindings/qjs/converter_impl.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,7 @@ struct Converter<IDLOptional<IDLSequence<T>>> : public ConverterBase<IDLSequence
348348
return Converter<IDLSequence<T>>::FromValue(ctx, value, exception_state);
349349
}
350350

351-
static JSValue ToValue(JSContext* ctx, ImplType value) {
352-
return Converter<IDLSequence<T>>::ToValue(ctx, value);
353-
}
351+
static JSValue ToValue(JSContext* ctx, ImplType value) { return Converter<IDLSequence<T>>::ToValue(ctx, value); }
354352
};
355353

356354
template <typename T>

bridge/bindings/qjs/cppgc/member.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#include <type_traits>
1010
#include "bindings/qjs/qjs_engine_patch.h"
1111
#include "bindings/qjs/script_value.h"
12-
#include "core/executing_context.h"
1312
#include "bindings/qjs/script_wrappable.h"
13+
#include "core/executing_context.h"
1414
#include "foundation/casting.h"
1515
#include "mutation_scope.h"
1616

@@ -26,7 +26,6 @@ class ScriptWrappable;
2626
template <typename T, typename = std::is_base_of<ScriptWrappable, T>>
2727
class Member {
2828
public:
29-
3029
struct KeyHasher {
3130
std::size_t operator()(const Member& k) const { return reinterpret_cast<std::size_t>(k.raw_); }
3231
};
@@ -37,7 +36,7 @@ class Member {
3736
raw_ = other.raw_;
3837
runtime_ = other.runtime_;
3938
js_object_ptr_ = other.js_object_ptr_;
40-
((JSRefCountHeader*) other.js_object_ptr_)->ref_count++;
39+
((JSRefCountHeader*)other.js_object_ptr_)->ref_count++;
4140
}
4241
~Member() {
4342
if (raw_ != nullptr) {
@@ -70,7 +69,7 @@ class Member {
7069
raw_ = other.raw_;
7170
runtime_ = other.runtime_;
7271
js_object_ptr_ = other.js_object_ptr_;
73-
((JSRefCountHeader*) other.js_object_ptr_)->ref_count++;
72+
((JSRefCountHeader*)other.js_object_ptr_)->ref_count++;
7473
return *this;
7574
}
7675
// Move assignment.

bridge/bindings/qjs/microtask_queue.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* Copyright (C) 2019-2022 The Kraken authors. All rights reserved.
3-
* Copyright (C) 2022-present The WebF authors. All rights reserved.
4-
*/
2+
* Copyright (C) 2019-2022 The Kraken authors. All rights reserved.
3+
* Copyright (C) 2022-present The WebF authors. All rights reserved.
4+
*/
55

66
#include "microtask_queue.h"
77

@@ -28,4 +28,4 @@ bool MicrotaskQueue::empty() {
2828
return queue_.size() == 0;
2929
}
3030

31-
}
31+
} // namespace webf

bridge/bindings/qjs/microtask_queue.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* Copyright (C) 2019-2022 The Kraken authors. All rights reserved.
3-
* Copyright (C) 2022-present The WebF authors. All rights reserved.
4-
*/
2+
* Copyright (C) 2019-2022 The Kraken authors. All rights reserved.
3+
* Copyright (C) 2022-present The WebF authors. All rights reserved.
4+
*/
55

66
#ifndef WEBF_BINDINGS_QJS_MICROTASK_QUEUE_H_
77
#define WEBF_BINDINGS_QJS_MICROTASK_QUEUE_H_
@@ -14,7 +14,6 @@ using MicrotaskCallback = void (*)(void* data);
1414

1515
class MicrotaskQueue final {
1616
public:
17-
1817
struct QueueData {
1918
void* data;
2019
MicrotaskCallback callback;
@@ -25,10 +24,9 @@ class MicrotaskQueue final {
2524
bool empty();
2625

2726
private:
28-
2927
std::list<std::unique_ptr<QueueData>> queue_;
3028
};
3129

32-
}
30+
} // namespace webf
3331

3432
#endif // WEBF_BINDINGS_QJS_MICROTASK_QUEUE_H_

bridge/core/css/inline_css_style_declaration.cc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
#include "inline_css_style_declaration.h"
66
#include <vector>
77
#include "core/dom/element.h"
8+
#include "core/dom/mutation_observer_interest_group.h"
89
#include "core/executing_context.h"
910
#include "core/html/parser/html_parser.h"
1011
#include "css_property_list.h"
11-
#include "core/dom/mutation_observer_interest_group.h"
12-
#include "html_names.h"
1312
#include "element_namespace_uris.h"
13+
#include "html_names.h"
1414

1515
namespace webf {
1616

@@ -182,11 +182,10 @@ void InlineCssStyleDeclaration::InlineStyleChanged() {
182182
assert(owner_element_->IsStyledElement());
183183

184184
if (std::shared_ptr<MutationObserverInterestGroup> recipients =
185-
MutationObserverInterestGroup::CreateForAttributesMutation(
186-
*owner_element_, html_names::kStyleAttr)) {
185+
MutationObserverInterestGroup::CreateForAttributesMutation(*owner_element_, html_names::kStyleAttr)) {
187186
AtomicString old_value;
188-
recipients->EnqueueMutationRecord(MutationRecord::CreateAttributes(
189-
owner_element_, html_names::kStyleAttr, element_namespace_uris::khtml, old_value));
187+
recipients->EnqueueMutationRecord(MutationRecord::CreateAttributes(owner_element_, html_names::kStyleAttr,
188+
element_namespace_uris::khtml, old_value));
190189
}
191190
}
192191

bridge/core/dom/character_data.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
#include "character_data.h"
77
#include "built_in_string.h"
88
#include "core/dom/document.h"
9-
#include "qjs_character_data.h"
109
#include "mutation_observer_interest_group.h"
10+
#include "qjs_character_data.h"
1111

1212
namespace webf {
1313

@@ -27,8 +27,7 @@ void CharacterData::DidModifyData(const webf::AtomicString& old_data) {
2727
std::shared_ptr<MutationObserverInterestGroup> mutation_recipients =
2828
MutationObserverInterestGroup::CreateForCharacterDataMutation(*this);
2929
if (mutation_recipients != nullptr) {
30-
mutation_recipients->EnqueueMutationRecord(
31-
MutationRecord::CreateCharacterData(this, old_data));
30+
mutation_recipients->EnqueueMutationRecord(MutationRecord::CreateCharacterData(this, old_data));
3231
}
3332
}
3433

bridge/core/dom/child_list_mutation_scope.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ static AccumulatorMap& GetAccumulatorMap() {
4747
return map;
4848
}
4949

50-
ChildListMutationAccumulator::ChildListMutationAccumulator(Node* target,
51-
const std::shared_ptr<MutationObserverInterestGroup>& observers)
50+
ChildListMutationAccumulator::ChildListMutationAccumulator(
51+
Node* target,
52+
const std::shared_ptr<MutationObserverInterestGroup>& observers)
5253
: target_(target), last_added_(nullptr), observers_(observers), mutation_scopes_(0) {}
5354

54-
ChildListMutationAccumulator::~ChildListMutationAccumulator() {
55-
}
55+
ChildListMutationAccumulator::~ChildListMutationAccumulator() {}
5656

5757
void ChildListMutationAccumulator::LeaveMutationScope() {
5858
assert(mutation_scopes_ > 0u);
@@ -141,10 +141,10 @@ bool ChildListMutationAccumulator::IsEmpty() {
141141
void ChildListMutationAccumulator::Trace(GCVisitor* visitor) const {
142142
visitor->TraceMember(target_);
143143

144-
for(auto& entry : removed_nodes_) {
144+
for (auto& entry : removed_nodes_) {
145145
visitor->TraceMember(entry);
146146
}
147-
for(auto& entry : added_nodes_) {
147+
for (auto& entry : added_nodes_) {
148148
visitor->TraceMember(entry);
149149
}
150150

bridge/core/dom/child_list_mutation_scope.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/*
2-
* Copyright (C) 2022-present The WebF authors. All rights reserved.
3-
*/
2+
* Copyright (C) 2022-present The WebF authors. All rights reserved.
3+
*/
44

55
#ifndef WEBF_CORE_DOM_CHILD_LIST_MUTATION_SCOPE_H_
66
#define WEBF_CORE_DOM_CHILD_LIST_MUTATION_SCOPE_H_
77

8+
#include "document.h"
89
#include "foundation/macros.h"
910
#include "mutation_observer_interest_group.h"
10-
#include "document.h"
1111
#include "static_node_list.h"
1212

1313
namespace webf {
@@ -62,8 +62,7 @@ class ChildListMutationScope final {
6262

6363
public:
6464
explicit ChildListMutationScope(Node& target) {
65-
if (!target.IsDocumentNode() && target.ownerDocument()->HasMutationObserversOfType(
66-
kMutationTypeChildList)) {
65+
if (!target.IsDocumentNode() && target.ownerDocument()->HasMutationObserversOfType(kMutationTypeChildList)) {
6766
accumulator_ = ChildListMutationAccumulator::GetOrCreate(target);
6867
// Register another user of the accumulator.
6968
accumulator_->EnterMutationScope();
@@ -94,7 +93,6 @@ class ChildListMutationScope final {
9493
std::shared_ptr<ChildListMutationAccumulator> accumulator_ = nullptr;
9594
};
9695

97-
98-
}
96+
} // namespace webf
9997

10098
#endif // WEBF_CORE_DOM_CHILD_LIST_MUTATION_SCOPE_H_

bridge/core/dom/collection_items_cache.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ unsigned CollectionItemsCache<Collection, NodeType>::NodeCount(const Collection&
8686
unsigned current_index = 0;
8787
while (current_node) {
8888
cached_list_.emplace_back(current_node);
89-
// cached_list_.push_back(current_node);
89+
// cached_list_.push_back(current_node);
9090
current_node = collection.TraverseForwardToOffset(current_index + 1, *current_node, current_index);
9191
}
9292

0 commit comments

Comments
 (0)