@@ -87,7 +87,7 @@ static Rect computeIntersection(
8787 const Rect& rootBoundingRect,
8888 const Rect& targetBoundingRect,
8989 const ShadowNodeFamily::AncestorList& targetToRootAncestors,
90- bool hasCustomRoot ) {
90+ bool hasExplicitRoot ) {
9191 auto absoluteIntersectionRect =
9292 Rect::intersect (rootBoundingRect, targetBoundingRect);
9393
@@ -109,7 +109,7 @@ static Rect computeIntersection(
109109 auto clippedTargetFromRoot =
110110 getClippedTargetBoundingRect (targetToRootAncestors);
111111
112- auto clippedTargetBoundingRect = hasCustomRoot ? Rect{
112+ auto clippedTargetBoundingRect = hasExplicitRoot ? Rect{
113113 .origin =rootBoundingRect.origin + clippedTargetFromRoot.origin ,
114114 .size =clippedTargetFromRoot.size }
115115 : clippedTargetFromRoot;
@@ -135,14 +135,14 @@ std::optional<IntersectionObserverEntry>
135135IntersectionObserver::updateIntersectionObservation (
136136 const RootShadowNode& rootShadowNode,
137137 HighResTimeStamp time) {
138- bool hasCustomRoot = observationRootShadowNodeFamily_.has_value ();
138+ bool hasExplicitRoot = observationRootShadowNodeFamily_.has_value ();
139139
140- auto rootAncestors = hasCustomRoot
140+ auto rootAncestors = hasExplicitRoot
141141 ? observationRootShadowNodeFamily_.value ()->getAncestors (rootShadowNode)
142142 : ShadowNodeFamily::AncestorList{};
143143
144144 // Absolute coordinates of the root
145- auto rootBoundingRect = hasCustomRoot
145+ auto rootBoundingRect = hasExplicitRoot
146146 ? getBoundingRect (rootAncestors)
147147 : getRootNodeBoundingRect (rootShadowNode);
148148
@@ -151,21 +151,21 @@ IntersectionObserver::updateIntersectionObservation(
151151 // Absolute coordinates of the target
152152 auto targetBoundingRect = getBoundingRect (targetAncestors);
153153
154- if ((hasCustomRoot && rootAncestors.empty ()) || targetAncestors.empty ()) {
154+ if ((hasExplicitRoot && rootAncestors.empty ()) || targetAncestors.empty ()) {
155155 // If observation root or target is not a descendant of `rootShadowNode`
156156 return setNotIntersectingState (
157157 rootBoundingRect, targetBoundingRect, {}, time);
158158 }
159159
160- auto targetToRootAncestors = hasCustomRoot
160+ auto targetToRootAncestors = hasExplicitRoot
161161 ? targetShadowNodeFamily_->getAncestors (*getShadowNode (rootAncestors))
162162 : targetAncestors;
163163
164164 auto intersectionRect = computeIntersection (
165165 rootBoundingRect,
166166 targetBoundingRect,
167167 targetToRootAncestors,
168- hasCustomRoot );
168+ hasExplicitRoot );
169169
170170 Float targetBoundingRectArea =
171171 targetBoundingRect.size .width * targetBoundingRect.size .height ;
0 commit comments