diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 561d75eeb63d..a5aa18f24ee6 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -1354,7 +1354,7 @@ void WebContents::OnPaint(const gfx::Rect& dirty_rect, mate::Dictionary dict = mate::Dictionary::CreateEmpty(isolate()); dict.Set("width", bitmap_size.width()); dict.Set("height", bitmap_size.height()); - dict.Set("pixel", pixel_size); + dict.Set("bytesPerPixel", pixel_size); if (!buffer.IsEmpty()) Emit("paint", dirty_rect, buffer.ToLocalChecked(), dict); diff --git a/atom/browser/osr/osr_render_widget_host_view.cc b/atom/browser/osr/osr_render_widget_host_view.cc index 2f6d02659ee8..ecb8c6628ec3 100644 --- a/atom/browser/osr/osr_render_widget_host_view.cc +++ b/atom/browser/osr/osr_render_widget_host_view.cc @@ -381,11 +381,11 @@ OffScreenRenderWidgetHostView::~OffScreenRenderWidgetHostView() { #endif if (copy_frame_generator_.get()) - copy_frame_generator_.reset(NULL); + copy_frame_generator_.reset(nullptr); - delegated_frame_host_.reset(NULL); - compositor_.reset(NULL); - root_layer_.reset(NULL); + delegated_frame_host_.reset(nullptr); + compositor_.reset(nullptr); + root_layer_.reset(nullptr); } void OffScreenRenderWidgetHostView::OnBeginFrameTimerTick() { diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index a7428e38223c..1f3d9cbf4100 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -471,7 +471,7 @@ Returns: * `bitmapSize` Object * `width` Number - the width of the whole bitmap * `height` Number - the height of the whole bitmap - * `pixel` Number - The number of bytes per pixel + * `bytesPerPixel` Number - The number of bytes per pixel in the bitmap Emitted when a new frame is generated. Only the dirty area is passed in the buffer.