-
mario@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=72830 Reviewed by Martin Robinson. Source/WebCore: Fix issue getting the exposed text for an accessibility object at, before of after a given offset, after changing it at least once. * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (webkit_accessible_class_init): Don't initialize gailTextUtilQuark, it won't be used anymore. (getGailTextUtilForAtk): Don't cache the GailTextUtil as object data, but create a new one each time this function is called. (webkit_accessible_text_get_caret_offset): Simplified code by using the new focusedObjectAndCaretOffsetUnignored function, instead of the old objectAndOffsetUnignored function. (focusedObjectAndCaretOffsetUnignored): Rewrite of the old objectAndOffsetUnignored function so it now needs less parameters than before and takes care of carefully selecting the start and end visible positions to calculate the position of the caret from the point of view of the accessibility object of reference passed as the only input parameter now. Updated callers. * accessibility/gtk/AccessibilityObjectWrapperAtk.h: * editing/gtk/FrameSelectionGtk.cpp: (WebCore::FrameSelection::notifyAccessibilityForSelectionChange): Simplified code by calling to focusedObjectAndCaretOffsetUnignored function, instead of the old objectAndOffsetUnignored function. Source/WebKit/gtk: Updated unit tests to check that both getting the current position for the caret and the exposed text at, before or after a given offset for an accessible object works as expected. * tests/testatk.c: (runGetTextTests): For objects implementing AtkEditableText, try to change the exposed text and retrieve it again as a full line. (testWebkitAtkCaretOffsets): For a text control (a text entry), set the caret offset to a value greater than 1 and retrieve it. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@104446 268f45cc-cd09-0410-ab3c-d52691b4dbfc
4c778d72