mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-06 16:57:14 +08:00
28 lines
906 B
Diff
28 lines
906 B
Diff
--- a/Source/WebKit/qt/WebCoreSupport/PageClientQt.cpp
|
|
+++ b/Source/WebKit/qt/WebCoreSupport/PageClientQt.cpp
|
|
@@ -45,16 +45,19 @@
|
|
*surface = 0;
|
|
if (surfaceOwner)
|
|
*surfaceOwner = 0;
|
|
+
|
|
+ QGLWidget* glViewport = 0;
|
|
+
|
|
QAbstractScrollArea* scrollArea = qobject_cast<QAbstractScrollArea*>(widget);
|
|
- if (!scrollArea)
|
|
- return;
|
|
|
|
- QGLWidget* glViewport = qobject_cast<QGLWidget*>(scrollArea->viewport());
|
|
+ if (scrollArea)
|
|
+ glViewport = qobject_cast<QGLWidget*>(scrollArea->viewport());
|
|
+
|
|
QGLWidget* glWidget = 0;
|
|
if (glViewport)
|
|
- glWidget = new QGLWidget(0, glViewport);
|
|
+ glWidget = new QGLWidget(widget, glViewport);
|
|
else
|
|
- glWidget = new QGLWidget();
|
|
+ glWidget = new QGLWidget(widget);
|
|
|
|
if (glWidget->isValid()) {
|
|
// Geometry can be set to zero because m_glWidget is used only for its QGLContext.
|