[webkit-qt] Qtwebkit 5.212 Alpha 4 stylesheet issue

Ramakanth Kesireddy rama.kesi at gmail.com
Tue Sep 8 02:30:42 PDT 2020


HI Konstantin,

Thanks for your mail.
Not sure if the other issue reported #908
<https://github.com/qtwebkit/qtwebkit/issues/908> is similar to the one I
raised in github https://github.com/qtwebkit/qtwebkit/issues/1021

Here is the configuration used for Webkit(qtwebkit_git.bb) through yocto.
It does built with  -DCMAKE_BUILD_TYPE=Release.

DEPENDS += "qtbase qtdeclarative icu ruby-native sqlite3 glib-2.0 libxslt
gperf-native bison-native flex-native"

# Patches from https://github.com/meta-qt5/qtwebkit/commits/b5.13
# 5.13.meta-qt5.1

SRC_URI[md5sum] = "fdfdf1a716059bcf225ec7658e757469"
SRC_URI = "\

https://github.com/qtwebkit/qtwebkit/archive/qtwebkit-5.212.0-alpha4.tar.gz
\

file://qt5_qtwebkit_0001-QtTestBrowser-Fix-build-with-launcherwindow-moc.patch
\

file://qt5_qtwebkit_0001-QtTestBrowser-Fix-build-with-QT_NO_OPENGL.patch \
    file://0002-generate-bytecode-files-Add-support-for-Python-2.7.patch \
    file://qt5_qtwebkit_fix-nossl.patch \
    file://0005-PlatformQt.cmake-Do-not-generate-hardcoded-include-p.patch \
    file://0001-PlatformQt.cmake-Fix-include-paths-for-cross-compile.patch \
"

EXTRA_OECMAKE += " \
    -DPORT=Qt \
    -DCROSS_COMPILE=ON \
    -DECM_MKSPECS_INSTALL_DIR=${libdir}${QT_DIR_NAME}/mkspecs/modules \
    -DQML_INSTALL_DIR=${OE_QMAKE_PATH_QML} \
    -DPYTHON_EXECUTABLE=`which python3` \
"

EXTRA_OECMAKE_<productname> += " \
    -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_NAME=Linux
-DCMAKE_SYSTEM_PROCESSOR=arm \
    -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
    -DENABLE_WEBKIT2=OFF -DENABLE_OPENGL=OFF \
    -DENABLE_GEOLOCATION=OFF -DENABLE_DEVICE_ORIENTATION=OFF
-DENABLE_VIDEO=OFF -DENABLE_WEB_AUDIO=OFF -DUSE_LIBHYPHEN=OFF \
    -DPORT=Qt \
    -DECM_MKSPECS_INSTALL_DIR=${libdir}${QT_DIR_NAME}/mkspecs/modules \
    -DCROSS_COMPILE=ON \
"

Are we missing anything in the configuration as I
see -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY being missed(hope it
shouldnot impact)?

Further, the below qtwebkit unit tests fail only on target.

1)qtwebkit/tests/webkitwidgets/qwebview( 2 failed tests)
FAIL! : tst_QWebView::innerOuterRect() Compared values are not the same
Actual (innerWidth.toInt()): 426
Expected (geometry.width()) : 640
Loc: [tst_qwebview.cpp(539)]

FAIL! : tst_QWebView::focusInputTypes()
'webView.testAttribute(Qt::WA_InputMethodEnabled)' returned FALSE. ()

2)qtwebkit/tests/webkitwidgets/qwebpage( 1 failed test)
FAIL! : tst_QWebPage::userStyleSheetFromLocalFileUrl()
'::waitForSignal(m_view, SIGNAL(loadFinished(bool)))' returned FALSE. ()
Loc: [tst_qwebpage.cpp(615)]

Tried only referencing the css from qrc and images separately which work
fine on ubuntu but not on target. Didnot try including images loaded from
css using qrc:/images.

Debugged the below sample code snippet on target:

m_webView = new QWebView(this);
m_webView->setContextMenuPolicy( Qt::NoContextMenu );
QWebSettings::globalSettings()->setUserStyleSheetUrl(
QUrl::fromLocalFile(stylesheetPath) );//Tried with m_webview as well
QWebSettings::globalSettings()->setDefaultTextEncoding( "utf-8" );
m_webView->settings()->setDefaultTextEncoding( "utf-8" );
m_webView->page()->setPreferredContentsSize(QSize(480, 640));

QFile file ("scrolltest_page.html");
if (file.exists())
{
       file.open(QIODevice::ReadOnly);
        QByteArray htmlArr = file.readAll();
        QString htmlStr = QString::fromUtf8(htmlArr);

qDebug()<<"width:"<<m_webView->page()->mainFrame()->contentsSize().width()<<"height:"<<m_webView->page()->mainFrame()->contentsSize().height();

        m_webView->setHtml(htmlStr);
        connect(m_webView, SIGNAL(loadFinished(bool)), this,
SLOT(pageLoaded(bool)));
        file.close();

    }

The page loaded returns true even if scrollbar is not visible on target and
the sizes set are correct as per debug prints.

Could you please suggest to put any specific debug print which would
indicate the stylesheet set is not proper or missing any global
QWebsettings to initialize or disable QNetworkAccessManager on target

for local storage html or css?

Even the couple of qtwebkit unit tests as mentioned above are failing on
target only.

Best Regards,

Ramakanth




On Mon, Sep 7, 2020 at 10:23 PM Konstantin Tokarev <annulen at yandex.ru>
wrote:

>
>
> 07.09.2020, 19:45, "Ramakanth Kesireddy" <rama.kesi at gmail.com>:
> > Thanks for your mail.
> > So the WebKit scrollbar not being visible using stylesheet is not a
> known issue,right?
>
> As you've seen, nobody reported anything similar.
>
> >Am trying to debug on target but want to ensure it is not known issue in
> Qt WebKit 5.212 or this issue not observed in earlier releases like
> QtWebkit 5.6 or 5.9?
> >
> > Is there any means to debug using web inspector on target?
>
> Checking with web inspector may help, but I've meant debugging c++ code,
> e.g. adding debug prints to code which applies stylesheet.
> BTW, do qrc:/ images referenced from css load fine?
>
> As for building QtWebKit, it's absolutely crucial that optimized code is
> built with -fno-strict-aliasing (works automatically if using
> -DCMAKE_BUILD_TYPE=Release), there are no other known issues.
>
> >
> > As WebKit setuserstylesheet unit tests fail only on target with simple
> user.css, could you please suggest in this regard?
> >
> > On Mon, 7 Sep, 2020, 18:38 Konstantin Tokarev, <annulen at yandex.ru>
> wrote:
> >> 07.09.2020, 16:07, "Konstantin Tokarev" <annulen at yandex.ru>:
> >>> You have to debug that issue on target yourself. If it doesn't
> reproduce on desktop, it may be caused by a bug in your compiler or
> whatever else.
> >>
> >> BTW, make sure that QtWebKit is built with -DCMAKE_BUILD_TYPE=Release
> >>
> >> --
> >> Regards,
> >> Konstantin
>
>
> --
> Regards,
> Konstantin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-qt/attachments/20200908/9d974ffa/attachment.htm>


More information about the webkit-qt mailing list