[Webkit-unassigned] [Bug 59461] New: WebKitDOMNodeList's internal order is modified when iterating it

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 26 08:15:34 PDT 2011


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

           Summary: WebKitDOMNodeList's internal order is modified when
                    iterating it
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebKit Gtk
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: xclaesse at gmail.com


I have an issue when trying to implement adium theme "focus" feature in Empathy[1]

My code needs to list all nodes having "focus" in its classes, like <div class="foo focus bar"> and then remove focus from the list. So basically like this:

dom = webkit_web_view_get_dom_document (WEBKIT_WEB_VIEW (view));
nodes = webkit_dom_document_get_elements_by_class_name (dom, "focus");
for (i = 0; i < webkit_dom_node_list_get_length (nodes); i++) {

    webkit_dom_html_element_set_class_name (element, new_class_name);

}

This problem with that code is that it will update only one node op 2. My guess is that when a node is modified, it gets moved to the end of the nodes list. This seems really weird behaviour... Note that adium does exactly the same code using the MacOS objective-C API of webkit and it works as expected.


[1] https://bugzilla.gnome.org/show_bug.cgi?id=443884

-- 
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