Skip to content

Commit

Permalink
[fabric] Refactor MacOS view props & emitters
Browse files Browse the repository at this point in the history
  • Loading branch information
shwanton committed May 1, 2024
1 parent a430e28 commit cc052f5
Show file tree
Hide file tree
Showing 23 changed files with 378 additions and 481 deletions.

This file was deleted.

50 changes: 0 additions & 50 deletions ReactCommon/react/renderer/components/view/macOS/MacOSViewProps.h

This file was deleted.

126 changes: 0 additions & 126 deletions ReactCommon/react/renderer/components/view/macOS/conversions.h

This file was deleted.

73 changes: 0 additions & 73 deletions ReactCommon/react/renderer/components/view/macOS/primitives.h

This file was deleted.

2 changes: 1 addition & 1 deletion packages/react-native/ReactCommon/React-Fabric.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ Pod::Spec.new do |s|
sss.dependency "Yoga"
sss.compiler_flags = folly_compiler_flags
sss.source_files = "react/renderer/components/view/**/*.{m,mm,cpp,h}"
sss.exclude_files = "react/renderer/components/view/tests", "react/renderer/components/view/platform/android"
sss.exclude_files = "react/renderer/components/view/tests", "react/renderer/components/view/platform/android", "react/renderer/components/view/platform/cxx"
sss.header_dir = "react/renderer/components/view"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Headers/Private/Yoga\"" }
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace facebook::react {
#if TARGET_OS_OSX // [macOS
#include <react/renderer/components/view/macOS/MouseEvent.h>
#include <react/renderer/components/view/MouseEvent.h>
#endif // macOS]

class TextInputMetrics {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include <optional>
#include <string>
#include <vector>

namespace facebook::react {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,13 @@ inline void fromRawValue(
} else {
LOG(ERROR) << "Unsupported Selection type";
}
}

#if TARGET_OS_OSX // [macOS
static inline void fromRawValue(
const PropsParserContext &context,
const RawValue &value,
SubmitKeyEvent &result) {
const PropsParserContext& context,
const RawValue& value,
SubmitKeyEvent& result) {
auto map = (std::unordered_map<std::string, RawValue>)value;

auto tmp_key = map.find("key");
Expand Down Expand Up @@ -233,9 +234,9 @@ static inline void fromRawValue(
}

static inline void fromRawValue(
const PropsParserContext &context,
const RawValue &value,
std::vector<SubmitKeyEvent> &result) {
const PropsParserContext& context,
const RawValue& value,
std::vector<SubmitKeyEvent>& result) {
auto items = (std::vector<RawValue>)value;
for (const auto &item : items) {
SubmitKeyEvent newItem;
Expand Down
Loading

0 comments on commit cc052f5

Please sign in to comment.