Bug 30998 - [Gtk] Implement AtkDocument's locale support
Summary: [Gtk] Implement AtkDocument's locale support
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks: 25531
  Show dependency treegraph
 
Reported: 2009-11-01 13:42 PST by Joanmarie Diggs
Modified: 2009-11-02 09:35 PST (History)
2 users (show)

See Also:


Attachments
proposed fix (2.03 KB, patch)
2009-11-01 13:42 PST, Joanmarie Diggs
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joanmarie Diggs 2009-11-01 13:42:59 PST
Created attachment 42281 [details]
proposed fix

+++ This bug was initially created as a clone of Bug #30964 +++

We need to implement the AtkDocument interface.
http://library.gnome.org/devel/atk/unstable/AtkDocument.html
Comment 1 Jan Alonzo 2009-11-02 03:31:25 PST
Comment on attachment 42281 [details]
proposed fix

>  static const gchar* webkit_accessible_document_get_locale(AtkDocument* document)
>  {
> -    // FIXME: This needs to be implemented.
> -    notImplemented();
> +
> +    // TODO: Should we fall back on lang xml:lang when the following comes up empty?
> +    String language = static_cast<AccessibilityRenderObject*>(core(document))->language();
> +    if (!language.isEmpty())
> +        return returnString(language);

Should this return NULL if empty?
Comment 2 Joanmarie Diggs 2009-11-02 03:37:17 PST
(In reply to comment #1)
> (From update of attachment 42281 [details])
> >  static const gchar* webkit_accessible_document_get_locale(AtkDocument* document)
> >  {
> > -    // FIXME: This needs to be implemented.
> > -    notImplemented();
> > +
> > +    // TODO: Should we fall back on lang xml:lang when the following comes up empty?
> > +    String language = static_cast<AccessibilityRenderObject*>(core(document))->language();
> > +    if (!language.isEmpty())
> > +        return returnString(language);
> 
> Should this return NULL if empty?

I think so. Do you think otherwise? Or am I missing something?

-    // FIXME: This needs to be implemented.
-    notImplemented();
+
+    // TODO: Should we fall back on lang xml:lang when the following comes up empty?
+    String language = static_cast<AccessibilityRenderObject*>(core(document))->language();
+    if (!language.isEmpty())
+        return returnString(language);
+
     return 0;
     ^^^^^^^^^
Comment 3 Jan Alonzo 2009-11-02 03:44:28 PST
Comment on attachment 42281 [details]
proposed fix

>      return 0;

Yup, I missed it. :) r=me.
Comment 4 WebKit Commit Bot 2009-11-02 09:35:42 PST
Comment on attachment 42281 [details]
proposed fix

Clearing flags on attachment: 42281

Committed r50412: <http://trac.webkit.org/changeset/50412>
Comment 5 WebKit Commit Bot 2009-11-02 09:35:48 PST
All reviewed patches have been landed.  Closing bug.