-
-
Notifications
You must be signed in to change notification settings - Fork 475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Follow-up doc update for cefpython123 #678
base: master
Are you sure you want to change the base?
Conversation
Fixes: cztomczak#546 Had to include harfbuzz manually as newer Pango change this. See: eiskaltdcpp/eiskaltdcpp#413 https://gitlab.gnome.org/GNOME/pango/-/issues/387 Also had to add `-Wno-deprecated-declarations` to get this to compile because of the following errors that didn't seem to be coming from this code directly: warning: ‘GTimeVal’ is deprecated: Use 'GDateTime' instead warning: ‘GTypeDebugFlags’ is deprecated
…k#484). These callbacks were never called previously. Rename --no-run-examples flag to --unittests in build scripts.
… code at frame.pyx
…nd CanSaveCookie; restore network_cookies.py and make slight tweak to use CanSendCookie and CanSaveCookie
… is using complex iframe which is not good with cefpython javascript binding
Update CEF to version 123.0.7 with Chromium-123.0.6312.46 (Windows tested)
@@ -55,7 +55,7 @@ Below is a table with supported platforms, python versions and architectures. | |||
|
|||
OS | Py2 | Py3 | 32bit | 64bit | Requirements | |||
--- | --- | --- | --- | --- | --- | |||
Windows | 2.7 | 3.4 / 3.5 / 3.6 / 3.7 / 3.8 / 3.9 | Yes | Yes | Windows 7+ (Note that Python 3.9 supports Windows 8.1+) | |||
Windows | 2.7 | 3.4 / 3.5 / 3.6 / 3.7 / 3.8 / 3.9 / 3.10 / 3.11 | Yes | Yes | Windows 7+ (Note that Python 3.9 supports Windows 8.1+) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That OS table is in Install section and has instructions to use pip install cefpython3==66.1
which doesn't yet support 3.10 and 3.11.
- removed `CanSetCookie` | ||
- added `CanSendCookie` | ||
- added `CanSaveCookie` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's mention CookieAccessFilter handler where new methods are, and also mention the old handler in which old cookie methods were.
- added `CanSaveCookie` | ||
|
||
## v123+ LifeSpan Handler callback |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change the title to LifespanHandler.OnBeforePopup new param
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually change it to LifespanHandler.OnBeforePopup changes
and remove the section v123+ cef_types changed
. Put information about the WOD_
constants changes here.
|
||
Per https://github.com/chromiumembedded/cef/issues/3452 windows high-dpi support is now enabled | ||
You shouldn't normally need to use DpiAware class |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to:
## v123+ High DPI support changes
DpiAware.EnableHighDpiSupport was removed on Windows. High-DPI support is now enabled by default in Chromium. It is recommended to embed a DPI awareness manifest in the subprocess executable, because setting process awareness during runtime is not always reliable.
You shouldn't normally need to use DpiAware class | ||
|
||
## v123+ plugin support is removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need proper sentences in documentation. Please start with an upper leter.
As cef has removed plugin support https://github.com/chromiumembedded/cef/commit/28c7f040016a0271ec2612cc5021599fb55a1054 | ||
previous popular plugin such as flash, pdf would no longer work | ||
`OnBeforePluginLoad` handler is removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change to:
CEF has removed plugin support. RequestHandler.`_OnBeforePluginLoad` was removed. Flash plugin is not supported anymore.
Use similar style as in the rest of the document to reference handlers and callbacks.
PDF is supported in CEF via chrome extension. They removed PPAPI plugin support, so it only changed internal implementation for PDF. No need to get into these details in docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole document needs to be rewritten, as it is outdated and makes confusion.
Calling SetProcessDpiAware
should generate DEPRECATED log message. Also this method's code should be removed and just leave a dummy method for backwards compatibility.
IsProcessDpiAware
- remove from docs, but leave in code for BC (backwards compatibility).
Remove CalculateWindowSize
from docs, but keep in code for BC.
Introduction section needs to be rewritten, as it's not true.
api/DpiAware.md
Outdated
@@ -5,6 +5,8 @@ | |||
|
|||
Available only on Windows. All methods of this class are static, access them through [cefpython](cefpython.md).`WindowUtils`. | |||
|
|||
Usage of this class is not encouraged, as upstream chromium is already support high-dpi by default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove that sentence. Scale and GetSystemDpi are still needed to set appropriate window sizes.
@@ -21,9 +23,6 @@ Table of contents: | |||
|
|||
## Introduction | |||
|
|||
By default if DPI awareness is not enabled in application, then OS performs display scaling. That causes text to look blurry on high DPI displays. To resolve this you have to | |||
call `cef.DpiAware.EnableHighDpiSupport` method. High DPI support is available only on Windows. | |||
|
|||
Enabling High DPI support in app can be done by embedding a DPI awareness xml manifest in both main executable and subprocess executable (see [Issue #112](../issues/112) comment #2), or by calling the `cef.DpiAware.EnableHighDpiSupport` method. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add information that it is recommended to embed a DPI awareness manifeest in subprocess executable. If it's not embedded Chromium will set DPI awareness for processes during runtime, but it's not always reliable, so it's best to embed a manifest.
api/DpiAware.md
Outdated
latest CEF. This method now internally calls `EnableHighDpiSupport()`. | ||
|
||
Enables DPI awareness for the running process. Embedding a DPI manifest in .exe is the prefered way, as it gives more reliable results, otherwise some display bugs may appear (discussed in the "Introduction" section on this page). | ||
Calling this method is deprecated, it is a dummy function now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove that method from docs. In code generate only a DEPRECATED warning log message and do not execute any code.
docs/Build-instructions.md
Outdated
@@ -48,13 +47,13 @@ Before you can build CEF Python or CEF you must satisfy | |||
|
|||
## Quick build instructions for Windows | |||
|
|||
Complete steps for building CEF Python v50+ with Python 2.7 using | |||
Complete steps for building CEF Python v123+ with Python 3.11 using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep it just Python 3
.
prebuilt binaries and libraries from GitHub Releases. | ||
|
||
When cloning repository you should checkout a stable branch which | ||
are named "cefpythonXX" where XX is Chromium version number. | ||
|
||
1) Tested and works fine on Windows 7 64-bit | ||
1) Tested and works fine on Windows 11 64-bit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is Windows 10 not supported anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
windows 10 should still work. My personal machine was upgraded from win 10 to win 11 last year, so this proposed doc update is mostly reflecting my own environment. I don't have super strong preference whether to put win 10 or win 11 at this line, but knowning win 10 is ending support this year
https://learn.microsoft.com/en-us/lifecycle/products/windows-10-home-and-pro
For a future proof doc, I slightly prefer putting win 11 here
@@ -235,37 +234,6 @@ requirements common for all platforms. | |||
cefpython version to avoid issues. | |||
|
|||
|
|||
## Build using prebuilt CEF binaries and libraries |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As of this writing, there is nothing to download from
[GH releases](https://github.com/cztomczak/cefpython/tags)
for cefpython123. I don't know whether you would continue to support this style of build instruction or not. To be safe, I only include the build instruction that works
* [v123+ cef_types changed](#v123-cef_types-changed) | ||
* [v123+ Windows dpiaware change](#v123-windows-dpiaware-change) | ||
* [v123+ plugin support is removed](#v123-plugin-support-is-removed) | ||
* [v123+ cookie related code is changed](#v123-cookie-related-code-is-changed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See how other sections in this document are written and please use similar style and reference to handlers and callbacks.
## v123+ Response's function `GetHeader` is renamed to `GetHeaderByName` | ||
|
||
## v123+ CookieManager's `GetBlockingManager`, `CreateManager` and `SetSupportedSchemes` functions are removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See how other sections in Migration Guide document are named and continue using the same style and references.
The problem with this PR and the previous one PR is that it changes documentation, however official releases are still using CEF 66. So documentation is confusing. I have to rollback previous merge of cefpython123 PR. SOLUTION: Create cefpython123 branch and send PR requests with code and documentation changes to that branch. |
The problem of your solution is, there is no way for pull requester to make a |
This is a follow-up pull request for
#669
Most are doc update. Very small code update
src/extern/cef/cef_types.pxd
src/dpi_aware_win.pyx
are included