Skip to content

Commit b45f07b

Browse files
committed
<chromium> Add FirstVisuallyNonEmptyLayout support for RenderViewObserver
This is needed by the implementation of loadVisuallyCommitted in the QtWebEngine. Change-Id: Ic0fcdc00f7963ea1088a1ae910bb2dbe26e9e12c Reviewed-by: Jocelyn Turcotte <[email protected]>
1 parent b40f4e1 commit b45f07b

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

chromium/content/public/renderer/render_view_observer.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ class RenderViewImpl;
4646
class CONTENT_EXPORT RenderViewObserver : public IPC::Listener,
4747
public IPC::Sender {
4848
public:
49+
50+
virtual void OnFirstVisuallyNonEmptyLayout() {}
51+
4952
// By default, observers will be deleted when the RenderView goes away. If
5053
// they want to outlive it, they can override this function.
5154
virtual void OnDestruct();

chromium/content/renderer/render_view_impl.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4105,6 +4105,8 @@ void RenderViewImpl::didFirstVisuallyNonEmptyLayout(WebFrame* frame) {
41054105
InternalDocumentStateData::FromDataSource(frame->dataSource());
41064106
data->set_did_first_visually_non_empty_layout(true);
41074107

4108+
FOR_EACH_OBSERVER(RenderViewObserver, observers_, OnFirstVisuallyNonEmptyLayout());
4109+
41084110
#if defined(OS_ANDROID)
41094111
// Update body background color if necessary.
41104112
SkColor bg_color = webwidget_->backgroundColor();

0 commit comments

Comments
 (0)