Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions packages/react-native/ReactAndroid/api/ReactAndroid.api
Original file line number Diff line number Diff line change
Expand Up @@ -2672,11 +2672,6 @@ public final class com/facebook/react/fabric/EmptyReactNativeConfig : com/facebo
public fun getString (Ljava/lang/String;)Ljava/lang/String;
}

public final class com/facebook/react/fabric/FabricComponents {
public static final field INSTANCE Lcom/facebook/react/fabric/FabricComponents;
public static final fun getFabricComponentName (Ljava/lang/String;)Ljava/lang/String;
}

public final class com/facebook/react/fabric/FabricSoLoader {
public static final field INSTANCE Lcom/facebook/react/fabric/FabricSoLoader;
public static final fun staticInit ()V
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@

package com.facebook.react.fabric.mounting.mountitems

/**
* Utility class for Fabric components, this will be removed
*
* TODO T97384889: remove this class when the component names are unified between JS - Android -
* iOS - C++
*/
/** Utility class for Fabric components, this will be removed */
internal object FabricNameComponentMapping {
private val componentNames: Map<String, String> =
mapOf(
Expand All @@ -23,7 +18,7 @@ internal object FabricNameComponentMapping {
"Slider" to "RCTSlider",
"ModalHostView" to "RCTModalHostView",
"Paragraph" to "RCTText",
"Text" to "RCText",
"Text" to "RCTText",
"RawText" to "RCTRawText",
"ActivityIndicatorView" to "AndroidProgressBar",
"ShimmeringView" to "RKShimmeringView",
Expand All @@ -39,7 +34,6 @@ internal object FabricNameComponentMapping {
/** @return the name of component in the Fabric environment */
@JvmStatic
fun getFabricComponentName(componentName: String): String {
val component = componentNames[componentName]
return component ?: componentName
return componentNames[componentName] ?: componentName
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <react/featureflags/ReactNativeFeatureFlags.h>
#include <react/renderer/core/LayoutableShadowNode.h>
#include <algorithm>

#include "ShadowView.h"

#ifdef DEBUG_LOGS_DIFFER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,18 @@
*/

#include "MountingCoordinator.h"

#include <cxxreact/SystraceSection.h>
#include <react/debug/react_native_assert.h>
#include <react/renderer/mounting/ShadowViewMutation.h>
#include <condition_variable>
#include "updateMountedFlag.h"

#ifdef RN_SHADOW_TREE_INTROSPECTION
#include <glog/logging.h>
#include <sstream>
#endif

#include <condition_variable>

#include <cxxreact/SystraceSection.h>
#include <react/debug/react_native_assert.h>
#include <react/renderer/mounting/ShadowViewMutation.h>

namespace facebook::react {

MountingCoordinator::MountingCoordinator(const ShadowTreeRevision& baseRevision)
Expand Down Expand Up @@ -104,6 +103,9 @@ std::optional<MountingTransaction> MountingCoordinator::pullTransaction(
}

// Override case
#ifdef RN_SHADOW_TREE_INTROSPECTION
bool didOverridePullTransaction = false;
#endif
for (const auto& delegate : mountingOverrideDelegates_) {
auto mountingOverrideDelegate = delegate.lock();
auto shouldOverridePullTransaction = mountingOverrideDelegate &&
Expand All @@ -130,6 +132,9 @@ std::optional<MountingTransaction> MountingCoordinator::pullTransaction(

transaction = mountingOverrideDelegate->pullTransaction(
surfaceId_, number_, telemetry, std::move(mutations));
#ifdef RN_SHADOW_TREE_INTROSPECTION
didOverridePullTransaction = true;
#endif
}
}

Expand All @@ -148,7 +153,7 @@ std::optional<MountingTransaction> MountingCoordinator::pullTransaction(
// If the transaction was overridden, we don't have a model of the shadow
// tree therefore we cannot validate the validity of the mutation
// instructions.
if (!shouldOverridePullTransaction && lastRevision_.has_value()) {
if (!didOverridePullTransaction && lastRevision_.has_value()) {
auto stubViewTree = buildStubViewTreeWithoutUsingDifferentiator(
*lastRevision_->rootShadowNode);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <react/renderer/mounting/MountingTransaction.h>
#include <react/renderer/mounting/ShadowTreeRevision.h>
#include <react/renderer/mounting/TelemetryController.h>
#include "ShadowTreeRevision.h"

#ifdef RN_SHADOW_TREE_INTROSPECTION
#include <react/renderer/mounting/stubs/stubs.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@ void StubViewTree::mutate(const ShadowViewMutationList& mutations) {
google::FlushLogFiles(google::GLOG_INFO);
}

std::ostream& StubViewTree::dumpTags(std::ostream& stream) {
std::ostream& StubViewTree::dumpTags(std::ostream& stream) const {
for (const auto& pair : registry_) {
auto& stubView = *registry_.at(pair.first);
auto& stubView = *pair.second;
stream << "[" << stubView.tag << "]##"
<< std::hash<ShadowView>{}((ShadowView)stubView) << " ";
}
Expand All @@ -273,10 +273,10 @@ bool operator==(const StubViewTree& lhs, const StubViewTree& rhs) {
<< lhs.registry_.size() << " RHS: " << rhs.registry_.size();

LOG(ERROR) << "Tags in LHS: ";
lhs.dumpTagsHash(LOG(ERROR));
lhs.dumpTags(LOG(ERROR));

LOG(ERROR) << "Tags in RHS: ";
rhs.dumpTagsHash(LOG(ERROR));
rhs.dumpTags(LOG(ERROR));
});

return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class StubViewTree {
friend bool operator==(const StubViewTree& lhs, const StubViewTree& rhs);
friend bool operator!=(const StubViewTree& lhs, const StubViewTree& rhs);

std::ostream& dumpTags(std::ostream& stream);
std::ostream& dumpTags(std::ostream& stream) const;

bool hasTag(Tag tag) const {
return registry_.find(tag) != registry_.end();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#pragma once

#include <react/renderer/core/ShadowNode.h>
#include "StubView.h"
#include "StubViewTree.h"
#include <react/renderer/mounting/stubs/StubView.h>
#include <react/renderer/mounting/stubs/StubViewTree.h>

namespace facebook::react {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@
#include <react/renderer/uimanager/UIManager.h>
#include <react/renderer/uimanager/UIManagerBinding.h>

#ifdef RN_SHADOW_TREE_INTROSPECTION
#include <react/renderer/mounting/stubs.h>
#include <iostream>
#endif

namespace facebook::react {

Scheduler::Scheduler(
Expand Down