[Webkit-unassigned] [Bug 27673] Inspector: Tab Through Attributes When Editing

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jul 26 07:46:10 PDT 2009


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


Timothy Hatcher <timothy at hatcher.name> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #33510|review?                     |review-
               Flag|                            |




--- Comment #12 from Timothy Hatcher <timothy at hatcher.name>  2009-07-26 07:46:10 PDT ---
(From update of attachment 33510)
> +                if (elem.className === "name") {

This would be safer as "elem.hasStyleClass("name")" so if we add more to the
className later it still works.

> +            // Find the attribute we were supposed to start editing in this section
> +            var list = section.propertiesTreeOutline._childrenListNode.childNodes;
> +            for (var i = 0, len = list.length; i < len; ++i) {
> +                var listItem = list[i];
> +                var spans = listItem.getElementsByTagName("span");
> +                if (spans[0].textContent === nameOfPropretyToEdit) {
> +                    var event = document.createEvent("MouseEvents");
> +                    event.initMouseEvent("dblclick", true, true);
> +                    spans[1].dispatchEvent(event); // the value
> +                    return;
> +                }
> +            }
> +        }

Over all these patches look good, but I think they are too low level and
fragile at this point. They are working with the DOM too much when they should
just be working with the high-level TreeElements and TreeOutlines. This would
require additions to StylePropertyTreeElement like "editName" or "editValue"
that would start editing on one of the parts without the need for a fake event
and getElementsByTagName or using private properties like _childrenListNode.

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