Comparer: fix bug when find element with showing condition.
authorHosang Kim <hosang12.kim@samsung.com>
Thu, 1 Feb 2024 05:35:38 +0000 (14:35 +0900)
committerHosang Kim <hosang12.kim@samsung.com>
Thu, 7 Mar 2024 08:00:59 +0000 (17:00 +0900)
Comparer checks only matchshowing, so it can't find hidden element.
Add checks isshowing also.

Change-Id: I82f491f91ab95e78f99356feace5d6fa405c63cb

libaurum/src/Comparer.cc

index f2c120abf41404fb5a3057ba111b89f76f5565fc..d9b6312a51a5fb889295b56227ce1f06c84ce6cf 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});