summaryrefslogtreecommitdiffstats
path: root/src/core/render_widget_host_view_qt.cpp
diff options
context:
space:
mode:
authorSzabolcs David <davidsz@inf.u-szeged.hu>2014-07-25 08:40:54 -0700
committerSzabolcs David <davidsz@inf.u-szeged.hu>2014-08-01 09:59:37 +0200
commit2781345715338669e2573fb0c05efe5656ca37d8 (patch)
treeb55dd9e07f5d868500a3ec3ab1ddb0b69174f784 /src/core/render_widget_host_view_qt.cpp
parenta2a8ded66e33db0313194bd23c7337f106c2140e (diff)
Add loadVisuallyCommitted signal to the experimental Quick API
This fixes the flaky QQuickWebEngineViewGraphics test and extends it with a new test case. Change-Id: I2d8a0762716cb9232fdea6473760e67ac2e7146d Reviewed-by: Andras Becsi <andras.becsi@digia.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'src/core/render_widget_host_view_qt.cpp')
-rw-r--r--src/core/render_widget_host_view_qt.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index ef07584a6..77588bc16 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -161,6 +161,7 @@ RenderWidgetHostViewQt::RenderWidgetHostViewQt(content::RenderWidgetHost* widget
, m_gestureRecognizer(ui::GestureRecognizer::Create())
, m_frameNodeData(new DelegatedFrameNodeData)
, m_needsDelegatedFrameAck(false)
+ , m_didFirstVisuallyNonEmptyLayout(false)
, m_adapterClient(0)
, m_anchorPositionWithinSelection(0)
, m_cursorPositionWithinSelection(0)
@@ -608,6 +609,11 @@ void RenderWidgetHostViewQt::OnSwapCompositorFrame(uint32 output_surface_id, sco
m_frameNodeData->frameDevicePixelRatio /= dpiScale;
m_delegate->update();
+
+ if (m_didFirstVisuallyNonEmptyLayout) {
+ m_adapterClient->loadVisuallyCommitted();
+ m_didFirstVisuallyNonEmptyLayout = false;
+ }
}
void RenderWidgetHostViewQt::GetScreenInfo(blink::WebScreenInfo* results)
@@ -1099,3 +1105,8 @@ QAccessibleInterface *RenderWidgetHostViewQt::GetQtAccessible()
content::BrowserAccessibilityQt *accQt = static_cast<content::BrowserAccessibilityQt*>(acc);
return accQt;
}
+
+void RenderWidgetHostViewQt::didFirstVisuallyNonEmptyLayout()
+{
+ m_didFirstVisuallyNonEmptyLayout = true;
+}