08.09.2020, 12:30, "Ramakanth Kesireddy" <[email protected]>:
> HI Konstantin,
>
> Thanks for your mail.
> Not sure if the other issue reported #908 is similar to the one I raised in 
> github https://github.com/qtwebkit/qtwebkit/issues/1021

No it is not, as it talks about qtwebkit-dev branch.

>
> 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)?

Generally, present or missing build options don't trigger rendering bugs.

There is one more thing I can think about: if your target CPU is Cortex-A53, it 
requires adding -DWTF_CPU_ARM64_CORTEXA53=ON when doing cross-compilation, 
otherwise bugs may occur. (CPU type is autodetected in host-based builds but 
cross build cannot know where will it be run)


>
> 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.

FWIW, spamming the same information over and over again doesn't help to resolve 
problem. Please report only changes in your findings if there are any, I have 
no interest in comparing your emails between each other to find difference.


>
> 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.

When I mentioned debug prints I've meant ones in QtWebKit code itself, of 
course you likely won't find anything useful outside.
BTW, what scroll bars are missing? If that's about scrollbar of main frame, 
does it reproduce when QWebView is not fullscreen?

>
> 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?

Did you run web inspector? Are css rules loaded correctly? If they are, debug 
prints should be placed in WebCore around code which is related to scrollbar, 
e.g. ScrollbarThemeQt/QStyle, ScrollbarTheme, RenderScrollbar.

-- 
Regards,
Konstantin
_______________________________________________
webkit-qt mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-qt

Reply via email to