Changeset 137099 in webkit


Ignore:
Timestamp:
Dec 9, 2012 5:09:32 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[GTK] accessibility/placeholder.html is failing
https://bugs.webkit.org/show_bug.cgi?id=98373

Patch by Joanmarie Diggs <jdiggs@igalia.com> on 2012-12-09
Reviewed by Martin Robinson.

The test was failing because the placeholder text was not supported and
AccessibilityUIElement::stringAttributeValue() was not implemented.

Source/WebCore:

No new tests; instead the failing test was unskipped.

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(webkitAccessibleGetAttributes): Add the placeholder text as an AtkAttribute
of the AtkObject, as is done in Gtk+ 3.

Tools:

  • DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:

(coreAttributeToAtkAttribute): New convenience method to convert WebCore attribute
names into AtkObject attribute names
(AccessibilityUIElement::stringAttributeValue): implemented

LayoutTests:

  • platform/gtk/TestExpectations: Unskip the failing test
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r137096 r137099  
     12012-12-09  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        [GTK] accessibility/placeholder.html is failing
     4        https://bugs.webkit.org/show_bug.cgi?id=98373
     5
     6        Reviewed by Martin Robinson.
     7
     8        The test was failing because the placeholder text was not supported and
     9        AccessibilityUIElement::stringAttributeValue() was not implemented.
     10
     11        * platform/gtk/TestExpectations: Unskip the failing test
     12
    1132012-12-09  Zan Dobersek  <zandobersek@gmail.com>
    214
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r137096 r137099  
    751751webkit.org/b/98371 accessibility/loading-iframe-updates-axtree.html [ Failure ]
    752752webkit.org/b/98372 accessibility/onclick-handlers.html [ Failure ]
    753 webkit.org/b/98373 accessibility/placeholder.html [ Failure ]
    754753webkit.org/b/98375 accessibility/secure-textfield-title-ui.html [ Failure ]
    755754webkit.org/b/98376 accessibility/selection-states.html [ Failure ]
  • trunk/Source/WebCore/ChangeLog

    r137098 r137099  
     12012-12-09  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        [GTK] accessibility/placeholder.html is failing
     4        https://bugs.webkit.org/show_bug.cgi?id=98373
     5
     6        Reviewed by Martin Robinson.
     7
     8        The test was failing because the placeholder text was not supported and
     9        AccessibilityUIElement::stringAttributeValue() was not implemented.
     10
     11        No new tests; instead the failing test was unskipped.
     12
     13        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
     14        (webkitAccessibleGetAttributes): Add the placeholder text as an AtkAttribute
     15        of the AtkObject, as is done in Gtk+ 3.
     16
    1172012-12-09  Kondapally Kalyan  <kalyan.kondapally@intel.com>
    218
  • trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp

    r136710 r137099  
    455455    if (coreObject->isAccessibilityTable() && !coreObject->isDataTable())
    456456        attributeSet = addToAtkAttributeSet(attributeSet, "layout-guess", "true");
     457
     458    String placeholder = coreObject->placeholderValue();
     459    if (!placeholder.isEmpty())
     460        attributeSet = addToAtkAttributeSet(attributeSet, "placeholder-text", placeholder.utf8().data());
    457461
    458462    return attributeSet;
  • trunk/Tools/ChangeLog

    r137090 r137099  
     12012-12-09  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        [GTK] accessibility/placeholder.html is failing
     4        https://bugs.webkit.org/show_bug.cgi?id=98373
     5
     6        Reviewed by Martin Robinson.
     7
     8        The test was failing because the placeholder text was not supported and
     9        AccessibilityUIElement::stringAttributeValue() was not implemented.
     10
     11        * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
     12        (coreAttributeToAtkAttribute): New convenience method to convert WebCore attribute
     13        names into AtkObject attribute names
     14        (AccessibilityUIElement::stringAttributeValue): implemented
     15
    1162012-12-09  Dan Winship  <danw@gnome.org>
    217
  • trunk/Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp

    r137071 r137099  
    3737#include <wtf/text/WTFString.h>
    3838#include <wtf/unicode/CharacterNames.h>
     39
     40static String coreAttributeToAtkAttribute(JSStringRef attribute)
     41{
     42    size_t bufferSize = JSStringGetMaximumUTF8CStringSize(attribute);
     43    GOwnPtr<gchar> buffer(static_cast<gchar*>(g_malloc(bufferSize)));
     44    JSStringGetUTF8CString(attribute, buffer.get(), bufferSize);
     45
     46    String attributeString = String::fromUTF8(buffer.get());
     47    if (attributeString == "AXPlaceholderValue")
     48        return "placeholder-text";
     49
     50    return "";
     51}
    3952
    4053static inline String roleToString(AtkRole role)
     
    765778JSStringRef AccessibilityUIElement::stringAttributeValue(JSStringRef attribute)
    766779{
    767     // FIXME: implement
     780    if (!m_element)
     781        return JSStringCreateWithCharacters(0, 0);
     782
     783    String atkAttributeName = coreAttributeToAtkAttribute(attribute);
     784    if (atkAttributeName.isEmpty())
     785        return JSStringCreateWithCharacters(0, 0);
     786
     787    for (GSList* atkAttributes = atk_object_get_attributes(ATK_OBJECT(m_element)); atkAttributes; atkAttributes = atkAttributes->next) {
     788        AtkAttribute* atkAttribute = static_cast<AtkAttribute*>(atkAttributes->data);
     789        if (!strcmp(atkAttribute->name, atkAttributeName.utf8().data()))
     790            return JSStringCreateWithUTF8CString(atkAttribute->value);
     791    }
     792
    768793    return JSStringCreateWithCharacters(0, 0);
    769794}
Note: See TracChangeset for help on using the changeset viewer.