GNOME Bugzilla – Bug 728673
AtkComponent is not implemented for pages
Last modified: 2014-04-25 05:15:23 UTC
Created attachment 274831 [details] [review] proposed patch The default AtkComponent interface will largely JustWork(tm) -- if there is a minimal implementation (namely atk_component_get_extents).
Review of attachment 274831 [details] [review]: ::: libview/ev-page-accessible.c @@ +1075,3 @@ + ev_view_get_page_extents (view, self->priv->page, &page_area, &border); + + doc_rect = ev_rectangle_new(); Use a stack allocated rectangle instead. @@ +1080,3 @@ + doc_rect->x2 = page_area.x + page_area.width; + doc_rect->y2 = page_area.y + page_area.height; + atk_rect = _transform_doc_rect_to_atk_rect (self->priv->view_accessible, self->priv->page, doc_rect, coord_type); This could return the transformed rect as an out parameter (like view methods do) and you could use a stack allocated rectangle for the return value as well. ::: libview/ev-view-accessible.c @@ +503,3 @@ } + +EvRectangle* EvRectangle* -> EvRectangle * @@ +504,3 @@ + +EvRectangle* +_transform_doc_rect_to_atk_rect (EvViewAccessible *accessible, Why does this need to be here? it's only used in ev-page-accessible, couldn't it be a static function there? or are there other places where we could reuse this?
Thanks for the review! I'll do the first two things you mention, but in answer to this: (In reply to comment #1) > @@ +504,3 @@ > + > +EvRectangle* > +_transform_doc_rect_to_atk_rect (EvViewAccessible *accessible, > > Why does this need to be here? it's only used in ev-page-accessible, couldn't > it be a static function there? or are there other places where we could reuse > this? Not can; will. That bit came out of bug 728475 (which I'm still chipping away at). But all objects (tagged pdf elements, images, form fields, links ...) will need to implement atk_component_get_extents.
Created attachment 274882 [details] [review] proposed patch
Review of attachment 274882 [details] [review]: Ok.
Comment on attachment 274882 [details] [review] proposed patch Thanks! Since it only touches the a11y code, I committed it both to master and the gnome-3-12 branch. Hope that's ok. If not, please let me know.