mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fabric: Using ShadowView instad of ShadowNode inside AttributedString
Summary: That's generally better because: * Avoids exposing ShadowNode to mounting layer; * Enables hashing and comparing the AttributedString based on actual meaningful data (not on just a pointer to ShadowNode). Reviewed By: mdvacca Differential Revision: D13205230 fbshipit-source-id: 7b79c1aad97b10d81e3faa10408be61b74f815cf
This commit is contained in:
committed by
Facebook Github Bot
parent
6c3b05f343
commit
7197aa026b
@@ -18,12 +18,12 @@ using Fragments = AttributedString::Fragments;
|
||||
#pragma mark - Fragment
|
||||
|
||||
bool Fragment::operator==(const Fragment &rhs) const {
|
||||
return std::tie(string, textAttributes, shadowNode, parentShadowNode) ==
|
||||
return std::tie(string, textAttributes, shadowView, parentShadowView) ==
|
||||
std::tie(
|
||||
rhs.string,
|
||||
rhs.textAttributes,
|
||||
rhs.shadowNode,
|
||||
rhs.parentShadowNode);
|
||||
rhs.shadowView,
|
||||
rhs.parentShadowView);
|
||||
}
|
||||
|
||||
bool Fragment::operator!=(const Fragment &rhs) const {
|
||||
@@ -90,11 +90,6 @@ SharedDebugStringConvertibleList AttributedString::getDebugChildren() const {
|
||||
auto propsList =
|
||||
fragment.textAttributes.DebugStringConvertible::getDebugProps();
|
||||
|
||||
if (fragment.shadowNode) {
|
||||
propsList.push_back(std::make_shared<DebugStringConvertibleItem>(
|
||||
"shadowNode", fragment.shadowNode->getDebugDescription()));
|
||||
}
|
||||
|
||||
list.push_back(std::make_shared<DebugStringConvertibleItem>(
|
||||
"Fragment",
|
||||
fragment.string,
|
||||
|
||||
Reference in New Issue
Block a user