Skip to content

Commit 04323da

Browse files
committed
[Chromium] Fix the total matches count in find in page
The code assumes that the Web Engine reports the number of matches only once (as Gecko does). However Chromium reports partial results on the go. As the code was only considering the first notification from the engine we were not properly picking the right values for current and total number of matches (just the first partial results). Fixes #1481
1 parent a2e681c commit 04323da

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/src/common/chromium/com/igalia/wolvic/browser/api/impl/SessionFinderImpl.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ class SessionFinderImpl(private val webContents: WebContents) : WSession.Session
4040
}
4141

4242
override fun onFindResultAvailable(details: FindNotificationDetails) {
43+
if (!details.finalUpdate)
44+
return
45+
4346
val finderResult = WSession.SessionFinder.FinderResult().apply {
4447
found = details.numberOfMatches > 0
4548
current = details.activeMatchOrdinal

0 commit comments

Comments
 (0)