Bug 30489

Summary: [Gtk] The document frame/html container claims to be parentless
Product: WebKit Reporter: Joanmarie Diggs <jdiggs>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: apinheiro, commit-queue, walker.willie, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Bug Depends on:    
Bug Blocks: 25531    
Attachments:
Description Flags
possible fix
none
revision 2 - made changes Xan suggested none

Description Joanmarie Diggs 2009-10-17 22:48:18 PDT
+++ This bug was initially created as a clone of Bug #25411 +++

Steps to reproduce:

1. In WebKit Gtk or Epiphany, view http://google.com

2. In Accerciser's tree of accessibles, locate the app chosen in step 1, and select the scroll pane (i.e. the parent of the document frame/html container)

3. In Accerciser's iPython console, type:

   acc[0].parent == acc

Expected results: Step 3 would cause True to be returned.

Actual results: Step 3 causes False to be returned. For some reason asking for the parent of the document frame returns None rather than the scroll pane which is its parent. I *believe* this has to do with how apps embed WebKit because we saw this very issue with Yelp (embeds Gecko currently). Besides, what seems to fix 25411 doesn't fix this issue so it's a different bug. :-)
Comment 1 Joanmarie Diggs 2009-10-18 20:45:36 PDT
Created attachment 41392 [details]
possible fix

It's ugly, but it works.

If there's already a method that works to reliably get the accessible parent of the WebView, and I managed to miss it, do please let me know. Otherwise, please review. Thanks!
Comment 2 Joanmarie Diggs 2009-10-19 04:42:55 PDT
Created attachment 41411 [details]
revision 2 - made changes Xan suggested

xan: OK, two really minor things: I think it's worth adding a comment here explaining why are we doing this, and the last NULL check I think you can get rid of, since you'd return NULL anyway
xan: I mean the one checking what gtk_widget_get_accessible returns, just return gtk_widget_get_accessible

----

Done.
Comment 3 Xan Lopez 2009-10-19 04:44:05 PDT
Comment on attachment 41411 [details]
revision 2 - made changes Xan suggested

Bam!
Comment 4 WebKit Commit Bot 2009-10-19 04:58:46 PDT
Comment on attachment 41411 [details]
revision 2 - made changes Xan suggested

Clearing flags on attachment: 41411

Committed r49775: <http://trac.webkit.org/changeset/49775>
Comment 5 WebKit Commit Bot 2009-10-19 04:58:49 PDT
All reviewed patches have been landed.  Closing bug.