Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qtwebkit test failures to load setUserStyleSheetUrl(QUrl::fromLocalFile(".css"))



  • Hi,

    Am using Qt WebKit 5.212 Alpha4 release through yocto build on top of Qt 5.6.3 binaries and found good with respect to security bugs and fixes as recommended and QtTestBrowser works fine on target.

    However, there are a few below qtwebkit test failures observed on latest yocto build 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. ()

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

    Since we use setUserStyleSheetUrl(QUrl::fromLocalFile(".css")) in our application which fails to load .css, we need to ensure these qtwebkit tests pass on target. Do you recommend to use userStyleSheetFromQrcUrl instead?

    As mentioned earlier, QtWebKit 5.212.x is based on old WebKit branch from 2016 with occasional backports of fixes and features, Please let me know if there any known fixes/patches for this issue to load .css?

    Appreciate your help in this regard.

    Thanks and Regards,
    Ramakanth



  • Tried to use setUserStyleSheetUrl from qrc instead of setting setUserStyleSheetUrl( QUrl::fromLocalFile) which worked but local image using background-image:url(arrow_right.png) in the .css is not set and rendered.

    html,css and image are in the same directory.
    The attributes in .css are used to style custom scrollbar as mentioned in https://doc.qt.io/archives/qt-4.8/qtwebkit-guide-css.html

    It does work with scrollbar visible on ubuntu using css stylesheet but it doesnot show scrollbar on target.
    Let me know your feedback.


Log in to reply