Bug 96502 - [GTK] ControlsPanel string is not localized in LocalizedStringsGtk
Summary: [GTK] ControlsPanel string is not localized in LocalizedStringsGtk
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-12 05:45 PDT by Philippe Normand
Modified: 2012-09-20 10:55 PDT (History)
7 users (show)

See Also:


Attachments
Patch (4.50 KB, patch)
2012-09-20 03:07 PDT, Joanmarie Diggs (irc: joanie)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2012-09-12 05:45:21 PDT
I don't have time to dig which commit introduced this regression. With a debug build:

run-launcher --gtk --debug LayoutTests/media/content/test.wav


Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5e9264f in WebCore::localizedMediaControlElementString (name="ControlsPanel")
    at ../../Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:562
562	    ASSERT_NOT_REACHED();
(gdb) bt
#0  0x00007ffff5e9264f in WebCore::localizedMediaControlElementString (name="ControlsPanel")
    at ../../Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:562
#1  0x00007ffff4a5318c in WebCore::AccessibilityMediaControl::title (this=0x7d5000)
    at ../../Source/WebCore/accessibility/AccessibilityMediaControls.cpp:148
#2  0x00007ffff5e65d42 in webkitAccessibleGetName (object=0xaf5850)
    at ../../Source/WebCore/accessibility/gtk/WebKitAccessibleWrapperAtk.cpp:144
#3  0x00007fffe743499a in append_cache_item (obj=obj@entry=0xaf5850, data=data@entry=
    0x7fffffffcee0) at cache-adaptor.c:192
#4  0x00007fffe7434e44 in emit_cache_add (cache=<optimized out>, obj=obj@entry=0xaf5850)
    at cache-adaptor.c:270
#5  0x00007ffff2e88b74 in g_cclosure_marshal_VOID__OBJECTv (closure=0x566fe0, 
    return_value=<optimized out>, instance=0x563190, args=<optimized out>, 
    marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x565e30)
    at gmarshal.c:1312
#6  0x00007ffff2e85927 in _g_closure_invoke_va (closure=0x566fe0, return_value=0x0, instance=
    0x563190, args=0x7fffffffd258, n_params=1, param_types=0x565e30) at gclosure.c:840
#7  0x00007ffff2e9efb8 in g_signal_emit_valist (instance=0x563190, signal_id=<optimized out>, 
    detail=0, var_args=var_args@entry=0x7fffffffd258) at gsignal.c:3207
#8  0x00007ffff2e9f6f2 in g_signal_emit (instance=instance@entry=0x563190, 
    signal_id=<optimized out>, detail=detail@entry=0) at gsignal.c:3352
#9  0x00007fffe742c373 in add_object (gobj=0xaf5850, cache=0x563190)
    at ../../atk-adaptor/accessible-cache.c:197
#10 add_pending_items (data=<optimized out>) at ../../atk-adaptor/accessible-cache.c:304
#11 0x00007ffff2d9c695 in g_main_dispatch (context=0x466dd0) at gmain.c:2539
#12 g_main_context_dispatch (context=context@entry=0x466dd0) at gmain.c:3075
#13 0x00007ffff2d9c9c8 in g_main_context_iterate (context=0x466dd0, block=block@entry=1, 
    dispatch=dispatch@entry=1, 
    self=<error reading variable: Unhandled dwarf expression opcode 0xfa>) at gmain.c:3146
#14 0x00007ffff2d9cdc2 in g_main_loop_run (loop=0x6cf3b0) at gmain.c:3340
#15 0x00007ffff364b9c5 in gtk_main () at gtkmain.c:1161
#16 0x0000000000405a86 in main (argc=1, argv=0x7fffffffd628) at ../../Tools/GtkLauncher/main.c:534
(gdb)
Comment 1 Joanmarie Diggs (irc: joanie) 2012-09-20 03:07:09 PDT
Created attachment 164873 [details]
Patch
Comment 2 Joanmarie Diggs (irc: joanie) 2012-09-20 03:14:07 PDT
(In reply to comment #0)
> I don't have time to dig which commit introduced this regression.

And I didn't keep digging to find out. It *might* be due to a change in accessible hierarchy that exposed the ControlsPanel whereas it wasn't before. But the bottom line is: That object should be exposed to ATs. It is now exposed to ATs. It would be more accessible with a meaningful accessible name. And localizing the string makes that happen and also fixes your reported bug. So that's what I wound up doing.
Comment 3 Philippe Normand 2012-09-20 03:15:41 PDT
It strucks me that we're the only port hitting this issue. Especially given this FIXME in LocalizedStrings.cpp

    // FIXME: the ControlsPanel container should never be visible in the accessibility hierarchy.

Can you clarify this please? :)
Comment 4 Joanmarie Diggs (irc: joanie) 2012-09-20 04:02:34 PDT
(In reply to comment #3)
> It strucks me that we're the only port hitting this issue. Especially given this FIXME in LocalizedStrings.cpp
> 
>     // FIXME: the ControlsPanel container should never be visible in the accessibility hierarchy.
> 
> Can you clarify this please? :)

It took a bit of spelunking (this FIXME is well traveled, having been moved several times as part of refactors and other changes). But I discovered its birth:

http://trac.webkit.org/changeset/49206/trunk/WebKit/mac/WebCoreSupport/WebViewFactory.mm

I don't know what other platforms expect, but having media controls floating outside of a logical parent container strikes me as being quite odd.

Would you like me to amend the FIXME to indicate that at least the Gtk port expects this object?
Comment 5 Joanmarie Diggs (irc: joanie) 2012-09-20 04:12:14 PDT
Chris, mind taking a look at this and chiming in? Thanks in advance!
Comment 6 WebKit Review Bot 2012-09-20 10:55:38 PDT
Comment on attachment 164873 [details]
Patch

Clearing flags on attachment: 164873

Committed r129141: <http://trac.webkit.org/changeset/129141>
Comment 7 WebKit Review Bot 2012-09-20 10:55:41 PDT
All reviewed patches have been landed.  Closing bug.