diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2021-12-13 08:14:26 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2022-01-06 01:41:33 +0100 |
commit | cd083920b3b4f3a1ed7f2297058cf0d110d7cf10 (patch) | |
tree | 3695efb646b53af9110e29efe75f11a2dae646b7 /src/qml/doc/snippets/code | |
parent | 97eaba8998cad554e6466831ea8977f26c9e0de5 (diff) | |
download | qtdeclarative-cd083920b3b4f3a1ed7f2297058cf0d110d7cf10.tar.gz |
TextEdit: deal with scrolling backwards in rich text
A bug was introduced in 9db23e0e04906cf9ea33e23fa41f34955e5e6fe0 :
when scrolling backwards in some kinds of rich text, updatePaintNode()
failed to re-populate the nodes that had been scrolled out above the
viewport. That was because those nodes had been removed from
textNodeMap, and then firstDirtyPos was set from the first node in
textNodeMap. For some reason this didn't happen with the markdown
document that I was testing (maybe because it had a table and an image
near the beginning), but showed up when viewing an html document similar
to the one we ship with the rich text example. So now we iterate
backwards from textNodeMap.begin() when this happens, to find all nodes
in the current frame that intersect the viewport as rendered.
In the autotest we now use font.pixelSize in an attempt to make
the rendered text ranges more consistent across platforms in CI;
and we need to wait for the rendering to be redone after scrolling.
Pick-to: 6.3
Change-Id: I70ef54c8d8facc439b9a6f8b5cb8e3a4a1c37e16
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/qml/doc/snippets/code')
0 files changed, 0 insertions, 0 deletions