[Webkit-unassigned] [Bug 14932] New: Display Elements Attributes in Styles pane

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 10 11:50:00 PDT 2007


http://bugs.webkit.org/show_bug.cgi?id=14932

           Summary: Display Elements Attributes in Styles pane
           Product: WebKit
           Version: 522+ (nightly)
          Platform: PC
        OS/Version: Windows XP
            Status: UNCONFIRMED
          Severity: Trivial
          Priority: P5
         Component: Web Inspector
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: saschast at gmx.net


In the actual builds each element attributes are shown in the Styles pane as
separated block.
I would prefer to see all attributes as a single block, like the inline style
displayed as "Elements 'style' Attribute".
For this i have patched the Webinspector File: "ResourcePanels.js" with
following code.
It*s a quick and dirty hack i think you make this better.

File: ResourcePanels.js
Function: updateStyles
Start Line: 588

            var styleNodeName = styleNode.nodeName.toLowerCase();
                var ss_attrName = "";
                var ss_hasAttrStyles = false;
            for (var i = 0; i < styleNode.attributes.length; ++i) {
                var attr = styleNode.attributes[i];
                if (attr.style) {
                                if (!ss_hasAttrStyles) {
                                        var ss_attrStyles = attr.style;
                                        ss_hasAttrStyles = true;
                                } else {
                                       
ss_attrStyles.setProperty(attr.style[0],
attr.style.getPropertyValue(attr.style[0]),
attr.style.getPropertyPriority(attr.style[0]) ); 
                                }
                }
            }
                if (ss_hasAttrStyles) {
                var attrStyle = {style: ss_attrStyles };
                      attrStyle.subtitle = "Elements Attributes";
                attrStyle.selectorText = styleNodeName + "\u2019s attributes";
                  styleRules.push(attrStyle);
                }


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



More information about the webkit-unassigned mailing list