-
-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
litehtml 0.7/0.8 break qttools-6.5.0 #266
Comments
Interface of litehtml was changed. All strings are now have type |
this makes my life way easier when using litehtml. |
Here is a WIP patch for adapting the Qt wrapper for litehtml 0.8 https://codereview.qt-project.org/c/playground/qlitehtml/+/479103. Unfortunately |
It looks like the render_item has a backpointer to the |
@e4z9 -- I didn't see this WIP until I had already done the same thing here locally to see if I could get it working with the latest litehtml. What seems to be missing is a Line 464 in 32e294f
But yeah, that was the showstopper I hit as well. Except instead of disabling that on the qttools side, I temporarily patched litehtml until this could get decided. I guess I need to compare our two WIPs to see if we arrived at the same code. The I'm eager to see where all of this ends up. |
@e4z9 -- looks like we came up with nearly the same things. One thing different is that I was working against the current HEAD of litehtml instead of the v0.8 tag, and On your comment about And since The one key place we disagreed on was in the new loop in And in Apart from having to stub in the missing I've attached (zipped due to attachment type limits) my version of |
I think the main difference is that "position" seems to be the position in the parent, and "placement" is relative to the document. I've updated https://codereview.qt-project.org/c/playground/qlitehtml/+/479103 with workarounds for the missing |
So, I've finished the patch updating the Qt backend to litehtml v0.9 . Not sure if it works correctly in all cases (z-ordering and fixed position elements are ignored for selection/hover). But generally speaking I think that this issue can be closed. |
@e4z9 -- don't hold me to it, as this is a busy time for me, but I will try next week to pull your qlitehtml patch and do some testing of it here with my use case. |
@e4z9 -- I managed to get ahead in my testing work and you have a thumbs up from me on your Qt backend patch at the current Patchset 11, 7071977bd53c0e5f0bc5efba55505bb898ce8136 hash, in that qt-project repo that you linked above. I only found one issue when applying it to my use case and moving to litehtml v0.9, but I don't see anyway it can be caused by the Qt wrapper. The issue seems to be litehtml itself not correctly computing the overall document size and seems related to the margins. The Qt wrapper is telling litehtml to render the sizing for the current viewport, including removing of the vertical scrollbar, etc. But litehtml is computing an overall document size that's larger than this maximum size. The I can't find anywhere in the Qt wrapper that's supplying any other sizing constraint to litehtml other than through that call to For now, I'm going to work around that quirk in my application by just setting the margin to zero, as having it fit the viewport correctly is less annoying than losing the margin. But as far as your Qt backend wrapper updates, it seems to work just fine with v0.9 of litehtml. And I concur that this issue can be closed. |
From: https://codereview.qt-project.org/c/playground/qlitehtml/+/479103 Qt Commit: 7071977bd53c0e5f0bc5efba55505bb898ce8136 And litehtml issue: litehtml/litehtml#266 While this doesn't yet support ltr/rtl direction tags, it does support flex layouts, meaning we can drop the majority of the kludge in KJPBS.
Right, and the top navigation bar of the Qt documentation is too wide as well. It wasn't fixed for me just by removing the margin in the body in master.css, but after an update of the master css to the current version in litehtml fixes the issues for me: https://codereview.qt-project.org/c/playground/qlitehtml/+/544585 |
@e4z9 -- nice catch! I didn't think to compare the master.css with the current litehtml version. Your latest changes to QLiteHtmlWidget fixed my issue as well. I was able to drop my workaround with changing the margin and everything is working as it should now. The only thing I'm currently waiting on, totally unrelated to this issue, is the |
From: https://codereview.qt-project.org/c/playground/qlitehtml/+/544585 Qt Commit: ad21baea37527d54f78aa63a3c0fc7ff4c66121b And litehtml issue: litehtml/litehtml#266
Some of the changes in litehtml 0.7 break qttools-6.5.0.
Here's a build log, the errors start with
build.log
The text was updated successfully, but these errors were encountered: