CefFindHandler and PDF viewer

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

CefFindHandler and PDF viewer

Postby riku » Fri Nov 01, 2019 2:24 am

It seems that CefFindHandler and CefBrowserHost::Find behave differently with PDF viewer compared to normal web pages.

1) It seems that with PDF viewer, CefFindHandler::OnFindResult is always called with an empty selectionRect (width and height are zero) even when Find did find something and you can see the results highlighted and other OnFindResult parameters look fine. Should selectionRect work with PDF files?

2) If I create a browser, load a HTML page and then call Find before the page has finished loading, OnFindResult is called several times with finalUpdate set to true, and Find ends up finding results that weren't there when the first results came in. It looks like the search results are updated when the page finishes loading.

However, this doesn't happen with PDF viewer. The PDF viewer needs to be loaded before calling Find in order to find anything. Is this expected?

3) Case-sensitive search doesn't seem to work with PDF viewer. I just get this:
Code: Select all
[1101/084821.867930:FATAL:ppp_find_proxy.cc(22)] Check failed: case_sensitive == PP_FALSE.
#0 0x7f89450bcaf9 base::debug::CollectStackTrace()
#1 0x7f8944fae763 base::debug::StackTrace::StackTrace()
#2 0x7f8944fcdc73 logging::LogMessage::~LogMessage()
#3 0x7f893d03777e ppapi::proxy::(anonymous namespace)::StartFind()
#4 0x7f8942a59648 content::PepperPluginInstanceImpl::StartFind()
#5 0x7f8942a6f04e content::PepperWebPluginImpl::StartFind()
#6 0x7f893b950d61 blink::FindInPage::Find()
#7 0x7f8939f74dac blink::mojom::blink::FindInPageStubDispatch::Accept()


It's just DCHECK, and it seems that this StartFind function will just ignore case_sensitive parameter, so I guess this is not a major issue.
riku
Techie
 
Posts: 17
Joined: Mon Feb 18, 2019 4:42 am

Re: CefFindHandler and PDF viewer

Postby magreenblatt » Fri Nov 01, 2019 7:20 am

I’ve never tested this with the PDF viewer. Having it behave the same as with normal page content seems reasonable. You’ll have to debug the code to find out what’s going on. If you can fix the issues in CEF code a PR would likely be accepted. If the issues are in Chromium code you can file bugs at https://crbug.com/new.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 104 guests