OSDN Git Service

gecko_ia2 vbuf backend:
authorJames Teh <jamie@jantrid.net>
Wed, 15 Sep 2010 08:13:53 +0000 (18:13 +1000)
committerJames Teh <jamie@jantrid.net>
Wed, 15 Sep 2010 08:13:53 +0000 (18:13 +1000)
* Unfortunately, Gecko 1.9.2.10 is becoming 1.9.2.11, so the table crash fix won't be in 1.9.2.10. Therefore, disable table headers for Gecko <= 1.9.2.10.
* Ensure that shouldDisableTableHeaders is always initialised, even if we're not dealing with Gecko. In practice, this wouldn't have mattered, but it might be in future and it's better to be safe.
* Refactor this detection to make it a bit easier to follow.

English What's New: Update Firefox version for table headers support. Translators take note!

source/NVDAHelper/vbufBackends/gecko_ia2/gecko_ia2.cpp
user_docs/en/changes.t2t

index 2f58a94..aef4adc 100755 (executable)
@@ -210,6 +210,9 @@ inline void GeckoVBufBackend_t::fillTableCellInfo_IATable2(VBufStorage_controlFi
 }\r
 \r
 void GeckoVBufBackend_t::versionSpecificInit(IAccessible2* pacc) {\r
+       // Defaults.\r
+       this->shouldDisableTableHeaders = false;\r
+\r
        IServiceProvider* serv = NULL;\r
        if (pacc->QueryInterface(IID_IServiceProvider, (void**)&serv) != S_OK)\r
                return;\r
@@ -236,13 +239,17 @@ void GeckoVBufBackend_t::versionSpecificInit(IAccessible2* pacc) {
        iaApp = NULL;\r
 \r
        if (wcscmp(toolkitName, L"Gecko") == 0) {\r
-               // Gecko <= 1.9.2.9 will crash if we try to retrieve headers on some table cells, so disable them.\r
-               UINT toolkitVersionLen = SysStringLen(toolkitVersion);\r
-               this->shouldDisableTableHeaders = (toolkitVersionLen >= 7 &&\r
-                       wcsncmp(toolkitVersion, L"1.9.2.", 6) == 0 &&\r
-                       // If there is another digit after 1.9.2.n, this is >= 1.9.2.10.\r
-                       (toolkitVersionLen <= 7 || !iswdigit(toolkitVersion[7]))\r
-               );\r
+               if (wcsncmp(toolkitVersion, L"1.9.2.", 6) == 0) {\r
+                       // Gecko 1.9.2.x.\r
+                       // Retrieve the digits for the final part of the main version number.\r
+                       wstring verPart;\r
+                       for (wchar_t* c = &toolkitVersion[6]; iswdigit(*c); c++)\r
+                               verPart += *c;\r
+                       if (_wtoi(verPart.c_str()) <= 10) {\r
+                               // Gecko <= 1.9.2.10 will crash if we try to retrieve headers on some table cells, so disable them.\r
+                               this->shouldDisableTableHeaders = true;\r
+                       }\r
+               }\r
        }\r
 \r
        SysFreeString(toolkitName);\r
index 0da39d6..335898c 100644 (file)
@@ -24,7 +24,7 @@ Notable features of this release include greatly simplified object navigation; v
 - Added a driver for the MDV Lilli braille display. (#241)\r
 - When selecting an entire row or column in Microsoft Excel with the shortcut keys shift+space and control+space, the new selection is now reported. (#759)\r
 - Table row and column headers can now be reported. This is configurable from the Document Formatting preferences dialog.\r
- - Currently, this is supported in documents in Mozilla applications such as Firefox (version 3.6.10 and later) and Thunderbird (version 3.1.5 and later). (#361)\r
+ - Currently, this is supported in documents in Mozilla applications such as Firefox (version 3.6.11 and later) and Thunderbird (version 3.1.5 and later). (#361)\r
 - Introduced commands for flat review: (#58)\r
  - NVDA+numpad7  switches to flat review, placing the review cursor at the position of the current object, allowing you  to review the screen (or a document if within one) with the text review commands.\r
  - NVDA+numpad1 moves the review cursor into the object represented by the text at  the position of the review cursor, allowing you to navigate by object from that point.\r