The bug was introduced to Chromium here:
https://chromium.googlesource.com/chrom ... 2287300e3a
The change introduced support for high DPI cursors on Windows. However, it failed to copy the new device_scale_ member when copying a WebCursorInfo. CEF assigns (copies) a WebCursorInfo in CefRenderWidgetHostViewOSR::UpdateCursor.
https://bitbucket.org/chromiumembedded/ ... 93d0465c9f
Because device_scale_ is not initialized when CEF calls WebCursor::GetPlatformCursor, Chromium tries to allocate a potentially very large bitmap, leading to the out of memory exception.
It seems like the potential workarounds are to:
- avoid using custom cursors in CSS, or
- avoid registering an IRenderHandler with CEF, however this isn't possible for users of wrappers like CefSharp, which always register a handler
I'm not aware of any command line flags to disable custom cursors in Chromium.
http://peter.sh/experiments/chromium-co ... -switches/
Because I'm not able to reproduce the issue in Chromium or Chrome, and I found no similar bug reports at crbug.com, I thought it best to follow up here. Would the CEF authors consider including this Chromium patch with CEF? If not, could you provide some guidance as to how best to submit this to Chromium authors without a repro?
- Code: Select all
index b8b4c57..69fe05e 100644
--- a/content/common/cursors/webcursor_aurawin.cc
+++ b/content/common/cursors/webcursor_aurawin.cc
@@ -37,6 +37,7 @@ ui::PlatformCursor WebCursor::GetPlatformCursor() {
void WebCursor::InitPlatformData() {
custom_cursor_ = NULL;
+ device_scale_factor_ = 1.0f;
}
bool WebCursor::SerializePlatformData(base::Pickle* pickle) const {
@@ -59,6 +60,7 @@ void WebCursor::CleanupPlatformData() {
}
void WebCursor::CopyPlatformData(const WebCursor& other) {
+ device_scale_factor_ = other.device_scale_factor_;
}
} // namespace content