Commit 66641256 authored by aroben@apple.com's avatar aroben@apple.com

Don't store objects from the Inspector on CSSStyleRules from the inspected page

        Reviewed by Tim Hatcher.

        * page/inspector/StylesSidebarPane.js:
        (WebInspector.StylesSidebarPane.update): Don't store raw CSSStyleRules
        from the inspected page in the styleRules array. Instead, always use a
        wrapper object. This will keep us from setting Inspector objects as
        properties of inspected objects.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d230f670
2008-04-14 Adam Roben <aroben@apple.com>
Don't store objects from the Inspector on CSSStyleRules from the
inspected page
Reviewed by Tim Hatcher.
* page/inspector/StylesSidebarPane.js:
(WebInspector.StylesSidebarPane.update): Don't store raw CSSStyleRules
from the inspected page in the styleRules array. Instead, always use a
wrapper object. This will keep us from setting Inspector objects as
properties of inspected objects.
2008-04-14 Timothy Hatcher <timothy@apple.com>
Fixes a regression where clicking a resource URL in the Console would not
......@@ -99,8 +99,10 @@ WebInspector.StylesSidebarPane.prototype = {
var matchedStyleRules = node.ownerDocument.defaultView.getMatchedCSSRules(node, "", !Preferences.showUserAgentStyles);
if (matchedStyleRules) {
// Add rules in reverse order to match the cascade order.
for (var i = (matchedStyleRules.length - 1); i >= 0; --i)
styleRules.push(matchedStyleRules[i]);
for (var i = (matchedStyleRules.length - 1); i >= 0; --i) {
var rule = matchedStyleRules[i];
styleRules.push({ style: rule.style, selectorText: rule.selectorText });
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment