OSDN Git Service

Improve the presentation of non-screen layout in virtualBuffers a little by only...
authorMichael Curran <mick@kulgan.net>
Wed, 6 Oct 2010 00:47:54 +0000 (11:47 +1100)
committerMichael Curran <mick@kulgan.net>
Wed, 6 Oct 2010 00:47:54 +0000 (11:47 +1100)
commit7638c331a0e2ae873a31285e784f20a24f6d4d94
tree3a34e2b26afffffb119084dbf512a4a4d049f975
parent285223f8b51c5ef480de31fd3f18636258940b08
Improve the presentation of non-screen layout in virtualBuffers a little by only causing a line break at the start of all fields, rather than also at the end. This should mostly filter out some annoying blank lines, and it will have the side affect that text after a field (e.g. text after a link) will appear on the same line as the link, though most importantly still guaranteeing that all fields (links etc) will start a new line.
Specific changes:
*VBufStorage getLineOffsets: when traversing forward through nodes, always limit to the closest ancestor block node, even if useScreenLayout is False. Previously if useScreenLayout was false, it would limit to the closest control field.  This change means that the end of a line in reference to a given character will no longer be guaranteed to be at the end of the current controlField, but instead anywhere between the current character, the beginning of the next controlField, or the end of the current block.
  *VBufStorage getLineOffsets: when traversing backwards through nodes, no longer stop if the next node we get to is a controlFieldNode, if useScreenLayout is false. Instead, always only stop on the next node if its a block node. Also, when useScreenLayout is false and when actually finding the next nodein the traversal, limit to the current traversal node's parent, meaning that it will never give back a node that is outside the closest ancestry controlFieldNode for the current traversal node. Previously with useScreenLayout being false, it would limit to the closest ancestry controlField at the position of the given character, which in some cases may be higher in the ancestry than the current traversal node's closest ancestry controlField node. These changes mean that the start of the line in reference to the given character will no longer be guaranteed to be at the start of the closest controlField. Instead, it will be anywhere between the given character, the beginning (left side) of a previous controlField, or the beginning of the closest ancestry block node.
source/NVDAHelper/vbufBase/storage.cpp