Comparer: fix bug when find element with showing condition. 91/305391/2
authorHosang Kim <hosang12.kim@samsung.com>
Thu, 1 Feb 2024 05:35:38 +0000 (14:35 +0900)
committerkim hosang <hosang12.kim@samsung.com>
Tue, 6 Feb 2024 04:51:55 +0000 (04:51 +0000)
Comparer checks only matchshowing, so it can't find hidden element.
Add checks isshowing also.

Change-Id: I82f491f91ab95e78f99356feace5d6fa405c63cb

libaurum/src/Comparer.cc

index f2c120a..d9b6312 100644 (file)
@@ -116,7 +116,7 @@ void Comparer::findObjects(std::vector<std::shared_ptr<AccessibleNode>> &ret,
             continue;
         }
 
-        if (mSelector->mMatchShowing && !curNode->isShowing()) continue;
+        if (mSelector->mMatchShowing && mSelector->mIsshowing && !curNode->isShowing()) continue;
 
         int partialMatchSize = (int)partialMatches.size();
         mStack.push_back({curNode, curIndex, curDepth, true, partialMatchSize});