[Webkit-unassigned] [Bug 25678] [GTK] Implement ROLE_COMBO_BOX

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 17 09:40:44 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=25678


Mario Sanchez Prada <msanchez at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #74116|0                           |1
        is obsolete|                            |
  Attachment #74127|                            |review?
               Flag|                            |




--- Comment #6 from Mario Sanchez Prada <msanchez at igalia.com>  2010-11-17 09:40:44 PST ---
Created an attachment (id=74127)
 --> (https://bugs.webkit.org/attachment.cgi?id=74127&action=review)
Patch proposal + Unit test

(In reply to comment #5)
> [...]
> > WebCore/ChangeLog:23
> > +        of that methor to an overriden version of stringValue(), which is
> 
> methor -> method

Ooops! Fixed.

> > WebCore/accessibility/AccessibilityMenuListOption.cpp:113
> > +String AccessibilityMenuListOption::stringValue() const
> 
> I'm not sure about the naming here. Maybe Chris can give the nod.

Well, the naming must be exactly that one ('stringValue') since what I want to do is precisely to override the stringValue() method from the superclass AccessibilityObject, so no more black magic is needed and everything works without changing anything else :-)

> > WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:768
> > +        const Vector<Element*> listItems = selectNode->listItems();
> >  
> > -    // TODO: Combo boxes
> > +        if (selectedIndex < 0 || selectedIndex >= (int)listItems.size())
> 
> Is it possible for the selectedIndex to be > listeItems.size()? It doesn't look like it after staring at SelectElement::selectedIndex. If you still need to cast to int, be sure to use a static_cast.

I thought of that as a nice sanity check, to explicitly make sure the returned value for selectedIndex is actually between those two limits. But if you think I'm being too paranoid I have no problems with removing that (which would also remove the previous line, btw).  For the time being I'll leave it as it is.

About the static_cast: sorry. Fixed!

> > WebCore/platform/gtk/PopupMenuGtk.cpp:65
> > -    int x, y;
> > -    gdk_window_get_origin(gtk_widget_get_window(GTK_WIDGET(view->hostWindow()->platformPageClient())), &x, &y);
> > +    int x = 0;
> > +    int y = 0;
> > +    GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(view->hostWindow()->platformPageClient()));
> > +    if (window)
> > +        gdk_window_get_origin(window, &x, &y);
> 
> Is this change related?

Yes, it's related to this patch because without that extra null check the unit test will crash with a segfault, since the gdk_window_get_origin() function would be called over a NULL value, as returned from gtk_widget_get_window().

Now attaching a new patch.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list