[Nvda-dev] Rev 135: gecko_ia2 backend: It isn't enough to assume that a table cell isn't empty just because its text length is > 0. The cell might have children, but they might be empty; e.g. because they are invisible. Therefore, explicitly check the final length of the rendered cell and render a space if that is 0. in http://bzr.nvaccess.org/nvVBufLib/main
bzr at nvda-project.org
bzr at nvda-project.org
Fri Jul 3 08:12:02 UTC 2009
At http://bzr.nvaccess.org/nvVBufLib/main
------------------------------------------------------------
revno: 135
revision-id: jamie at jantrid.net-20090703081133-70s3njf6748ncp02
parent: jamie at jantrid.net-20090702065030-77eneipfw4zfb0u4
committer: James Teh <jamie at jantrid.net>
branch nick: main
timestamp: Fri 2009-07-03 18:11:33 +1000
message:
gecko_ia2 backend: It isn't enough to assume that a table cell isn't empty just because its text length is > 0. The cell might have children, but they might be empty; e.g. because they are invisible. Therefore, explicitly check the final length of the rendered cell and render a space if that is 0.
-------------- next part --------------
=== modified file 'backends/gecko_ia2/gecko_ia2.cpp'
--- a/backends/gecko_ia2/gecko_ia2.cpp 2009-07-02 06:50:30 +0000
+++ b/backends/gecko_ia2/gecko_ia2.cpp 2009-07-03 08:11:33 +0000
@@ -641,14 +641,17 @@
if(value!=NULL) {
DEBUG_MSG(L"adding value to buffer");
previousNode=buffer->addTextFieldNode(parentNode,previousNode,value);
- } else if(role!=IA2_ROLE_SECTION&&(width>0&&height>0)) {
+ } else if(role!=ROLE_SYSTEM_CELL&&role!=IA2_ROLE_SECTION&&(width>0&&height>0)) {
previousNode=buffer->addTextFieldNode(parentNode,previousNode,L" ");
- if (role == ROLE_SYSTEM_CELL || role == ROLE_SYSTEM_ROWHEADER || role == ROLE_SYSTEM_COLUMNHEADER)
- parentNode->setIsBlock(false);
}
}
}
}
+ if ((role == ROLE_SYSTEM_CELL || role == ROLE_SYSTEM_ROWHEADER || role == ROLE_SYSTEM_COLUMNHEADER) && parentNode->getLength() == 0) {
+ // Always render a space for empty table cells.
+ previousNode=buffer->addTextFieldNode(parentNode,previousNode,L" ");
+ parentNode->setIsBlock(false);
+ }
}
//Free any objects and text etc we don't need, before doing any recursion to save memory
if(name!=NULL) {
More information about the Nvda-dev
mailing list