What is the purpose of the cef.pak file in cefsharp?
Asked Answered
S

1

7

In the FAQs of CefSharp, it states that you should disable Package Loading:

var settings = new CefSharp.CefSettings 
{
    PackLoadingDisabled = true
};

which is normally OK for a production-mode application

I have an issue where on a particular website a red border is appearing around a drop-down box. If I set PackLoadingDisabled = false and ensure that the cef.pak file is in the folder (This cef.pak is distributed with the CefSharp nuget package. I am not including any other .pak file except locates/en-US.pak) then this fixes the issue.

My question is, What purpose does this cef.pak file serve?

I've looked at the CEF3 Readme and it shows that it is optional, but it isn't very clear on what purpose this Pack serves. Before I go and include it in my software distribution I need to know exactly what it is for.

Am I safe to enabled Pack Loading in my release version?

Soloma answered 10/12, 2014 at 11:33 Comment(3)
Yes true. Since either the CEF 1750 or 2062 branch we have observed has this (side effect)? with red scrollbars if you dont include cef.pak. The purpose of the .pak flies is a bit more clear from the Windows CEF README I think you should be safe to enable it. The best place to ask to be 100% is the CEF Forum. And the CefSharp probably need a bit of clarification (if it turns out that its intended and a permanent CEF change.Croup
@Croup I read the Readme, and "Contains WebKit image and inspector resources." still doesn't really help me understand its purpose. What is it adding to the browser - Is it correcting known rendering issues? I have looked inside and can see there is a bunch of HTML and CSS, so I am confused as to what it is adding.Soloma
#10633857 might help you unpack and look. I guess apart from images it's HTML, .css and maybe some .js to render about:// pages etc. People building browsers has a tendency to favor web technologies to build UI :)Croup
C
5

pak files are used for the developer tools that can be turned on.

We choose NOT to ship the pak. The only that arises is that a 'locales' folder is created no matter what pack loading disabled value we use. The localesdirpath similarly has no effect.

Both the locales folder and the red scroll bars - are inherited by cefSharp from cef, so are upstream bugs. The good news is you can fix the red scroll bars with some javascript and means you can still use the current chromium code.

Look for ::-webkit-scrollbar / ::-webkit-scrollbar-thumb / ::-webkit-scrollbar-thumb:vertical:hover / ::-webkit-scrollbar-thumb:vertical:active etc...

Coh answered 6/1, 2015 at 11:38 Comment(1)
The documentation states that you are required to ship it, along with cef_100_percent.pak and cef_200_percent.pak, and optionally any locales\*.pak that you require.Soloma

© 2022 - 2024 — McMap. All rights reserved.