From: James Teh Date: Fri, 30 Nov 2012 02:18:05 +0000 (+1000) Subject: gecko vbuf backend: Never treat non-editable documents and iframes as interactive... X-Git-Tag: jpdev130418~416 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=6303d1fef70e5424b92c758fd2d26c94abc4b8bd;p=nvdajp%2Fnvdajp.git gecko vbuf backend: Never treat non-editable documents and iframes as interactive, even if they're clickable. --- diff --git a/nvdaHelper/vbufBackends/gecko_ia2/gecko_ia2.cpp b/nvdaHelper/vbufBackends/gecko_ia2/gecko_ia2.cpp index 8ff3cc131..64badde86 100755 --- a/nvdaHelper/vbufBackends/gecko_ia2/gecko_ia2.cpp +++ b/nvdaHelper/vbufBackends/gecko_ia2/gecko_ia2.cpp @@ -441,7 +441,9 @@ VBufStorage_fieldNode_t* GeckoVBufBackend_t::fillVBuf(IAccessible2* pacc, // Whether this node is a link or inside a link. int inLink = states & STATE_SYSTEM_LINKED; // Whether this node is interactive. - bool isInteractive = isEditable || inLink || (states & STATE_SYSTEM_FOCUSABLE && role != ROLE_SYSTEM_DOCUMENT && role != IA2_ROLE_INTERNAL_FRAME) || states & STATE_SYSTEM_UNAVAILABLE || role == ROLE_SYSTEM_APPLICATION || role == ROLE_SYSTEM_DIALOG || role == IA2_ROLE_EMBEDDED_OBJECT; + // Certain objects are never interactive, even if other checks are true. + bool isNeverInteractive = !isEditable && (role == ROLE_SYSTEM_DOCUMENT || role == IA2_ROLE_INTERNAL_FRAME); + bool isInteractive = !isNeverInteractive && (isEditable || inLink || states & STATE_SYSTEM_FOCUSABLE || states & STATE_SYSTEM_UNAVAILABLE || role == ROLE_SYSTEM_APPLICATION || role == ROLE_SYSTEM_DIALOG || role == IA2_ROLE_EMBEDDED_OBJECT); // We aren't finished calculating isInteractive yet; actions are handled below. // Whether the name is the content of this node. bool nameIsContent = role == ROLE_SYSTEM_LINK || role == ROLE_SYSTEM_PUSHBUTTON || role == IA2_ROLE_TOGGLE_BUTTON || role == ROLE_SYSTEM_MENUITEM || role == ROLE_SYSTEM_GRAPHIC || (role == ROLE_SYSTEM_TEXT && !isEditable) || role == IA2_ROLE_SECTION || role == IA2_ROLE_TEXT_FRAME || role == IA2_ROLE_HEADING || role == ROLE_SYSTEM_PAGETAB || role == ROLE_SYSTEM_BUTTONMENU; @@ -510,7 +512,7 @@ VBufStorage_fieldNode_t* GeckoVBufBackend_t::fillVBuf(IAccessible2* pacc, s<addAttribute(attribName,s.str()); s.str(L""); - if(wcscmp(actionName, L"click")==0||wcscmp(actionName, L"showlongdesc")==0) { + if(!isNeverInteractive&&(wcscmp(actionName, L"click")==0||wcscmp(actionName, L"showlongdesc")==0)) { isInteractive=true; } SysFreeString(actionName);