From: James Teh Date: Tue, 6 Dec 2011 11:00:34 +0000 (+1000) Subject: webKit vbuf backend: Never render the name for editable text fields and combo boxes... X-Git-Tag: jpdev130418~1213^2~8 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=89df036e0e782cd19c5d08dcfb2205d8baf75756;p=nvdajp%2Fnvdajp.git webKit vbuf backend: Never render the name for editable text fields and combo boxes. Always render a space for empty focusable nodes, even if the name/value was present but empty. --- diff --git a/nvdaHelper/vbufBackends/webKit/webKit.cpp b/nvdaHelper/vbufBackends/webKit/webKit.cpp index f891c7232..d8812eb30 100644 --- a/nvdaHelper/vbufBackends/webKit/webKit.cpp +++ b/nvdaHelper/vbufBackends/webKit/webKit.cpp @@ -170,17 +170,19 @@ VBufStorage_fieldNode_t* WebKitVBufBackend_t::fillVBuf(int docHandle, IAccessibl free(varChildren); } else { - // No children, so this is a text leaf node. + // No children, so fetch content from this leaf node. BSTR tempBstr = NULL; wstring content; - if (pacc->get_accName(varChild, &tempBstr) == S_OK) { + if ((role != ROLE_SYSTEM_TEXT || !(states & STATE_SYSTEM_FOCUSABLE)) && role != ROLE_SYSTEM_COMBOBOX + && pacc->get_accName(varChild, &tempBstr) == S_OK && tempBstr) { content = tempBstr; SysFreeString(tempBstr); - } else if (pacc->get_accValue(varChild, &tempBstr) == S_OK) { + } else if (pacc->get_accValue(varChild, &tempBstr) == S_OK && tempBstr) { content = tempBstr; SysFreeString(tempBstr); - } else if (states & STATE_SYSTEM_FOCUSABLE) { + } + if (content.empty() && states & STATE_SYSTEM_FOCUSABLE) { // This node is focusable, but contains no text. // Therefore, add it with a space so that the user can get to it. content = L" ";