[GTK] Missing call to g_object_ref while retrieving accessible table cells
authormario@webkit.org <mario@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Feb 2013 17:15:52 +0000 (17:15 +0000)
committermario@webkit.org <mario@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Feb 2013 17:15:52 +0000 (17:15 +0000)
commit009299267bcc9fb5d5397c8de6bd5f263174f912
tree2da0e9bf9a86381e0b9b00fde9162228fe42ae54
parent9edae6a86d59a74c22ade499efe7876a2c8621ba
[GTK] Missing call to g_object_ref while retrieving accessible table cells
https://bugs.webkit.org/show_bug.cgi?id=106903

Reviewed by Martin Robinson.

Source/WebCore:

Add missing extra ref to implementation of atk_table_ref_at().

Test: accessibility/table-cell-for-column-and-row-crash.html

* accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
(webkitAccessibleTableRefAt): This method transfers full ownership
over the returned AtkObject, so an extra reference is needed here.

Tools:

Both DRT and WKTR need to call g_object_unref() now that an extra
reference is added in the implementation of atk_table_ref_at().

* DumpRenderTree/atk/AccessibilityUIElementGtk.cpp:
(AccessibilityUIElement::cellForColumnAndRow): Call g_object_unref
before returning the new instance of AccessibilityUIElement.
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::cellForColumnAndRow): Ditto.

LayoutTests:

Added new test. It should work fine at least in Mac and GTK ports,
but will need specific results for chromium and windows.

* accessibility/table-cell-for-column-and-row-crash.html: Added.
* accessibility/table-cell-for-column-and-row-crash-expected.txt: Added.
* platform/chromium/TestExpectations: Skipped test.
* platform/win/TestExpectations: Ditto.
* platform/wincairo/TestExpectations: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142883 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/accessibility/table-cell-for-column-and-row-crash-expected.txt [new file with mode: 0644]
LayoutTests/accessibility/table-cell-for-column-and-row-crash.html [new file with mode: 0644]
LayoutTests/platform/chromium/TestExpectations
LayoutTests/platform/win/TestExpectations
LayoutTests/platform/wincairo/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceTable.cpp
Tools/ChangeLog
Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp
Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp