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?

oatsoda
  • 2,088
  • 2
  • 26
  • 49
  • 1
    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](https://github.com/cefsharp/cef-binary/blob/master/README.txt#L104-L106) 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. – jornh Dec 10 '14 at 20:06
  • @jornh 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. – oatsoda Dec 11 '14 at 16:01
  • 2
    http://stackoverflow.com/questions/10633357/how-to-unpack-resources-pak-from-google-chrome 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 :) – jornh Dec 11 '14 at 21:21

1 Answers1

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...

penderi
  • 8,673
  • 5
  • 45
  • 62
  • The [documentation](https://github.com/cefsharp/CefSharp/wiki/Output-files-description-table-(Redistribution)) 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. – oatsoda Nov 25 '19 at 15:45