[webkit-reviews] review granted: [Bug 25415] [GTK][ATK] Please implement support for get_text_at_offset : [Attachment 31049] gailtextutil.patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 10 04:05:28 PDT 2009


Jan Alonzo <jmalonzo at gmail.com> has granted Xan Lopez <xan.lopez at gmail.com>'s
request for review:
Bug 25415: [GTK][ATK] Please implement support for get_text_at_offset
https://bugs.webkit.org/show_bug.cgi?id=25415

Attachment 31049: gailtextutil.patch
https://bugs.webkit.org/attachment.cgi?id=31049&action=review

------- Additional Comments from Jan Alonzo <jmalonzo at gmail.com>
> -static bool findCharacterAttributeSkip(isCharacterAttribute
predicateFunction, unsigned skip, PangoLogAttr* attributes, Direction
direction, int startOffset, int attrsLength, int* resultOffset)
> +static GailTextUtil* getGailTextUtilForAtk(AtkText* textObject)
>  {
> -    int tmpOffset;
> +    gpointer data = g_object_get_data(G_OBJECT(textObject),
"webkit-accessible-gail-text-util");



>  static gchar* webkit_accessible_text_get_text_after_offset(AtkText* text,
gint offset, AtkTextBoundary boundaryType, gint* startOffset, gint* endOffset)
>  {
> -    return getTextHelper(AfterOffset, text, offset, boundaryType,
startOffset, endOffset);
> +    return gail_text_util_get_text(getGailTextUtilForAtk(text), NULL,
GAIL_AFTER_OFFSET, boundaryType, offset, startOffset, endOffset);
>  }
>  
>  static gchar* webkit_accessible_text_get_text_at_offset(AtkText* text, gint
offset, AtkTextBoundary boundaryType, gint* startOffset, gint* endOffset)
>  {
> -    return getTextHelper(AtOffset, text, offset, boundaryType, startOffset,
endOffset);
> +    return gail_text_util_get_text(getGailTextUtilForAtk(text), NULL,
GAIL_AT_OFFSET, boundaryType, offset, startOffset, endOffset);
>  }
>  
>  static gchar* webkit_accessible_text_get_text_before_offset(AtkText* text,
gint offset, AtkTextBoundary boundaryType, gint* startOffset, gint* endOffset)
>  {
> -    return getTextHelper(BeforeOffset, text, offset, boundaryType,
startOffset, endOffset);
> +    return gail_text_util_get_text(getGailTextUtilForAtk(text), NULL,
GAIL_BEFORE_OFFSET, boundaryType, offset, startOffset, endOffset);
>  }

Would be nice if we can refactor these in the future.

Looks fine. Are we OK with depending on libgail? If so, r=me.


More information about the webkit-reviews mailing list