Currently the Inspector code directly manipulates either its own UI DOM nodes and DOM nodes of the inspected page. To simplify localization the code which access the inspected DOM it is suggested to isolate it in the facade layer. It will help in implementation of out-of-process DOM access in Chromium.
Created attachment 26968 [details] Implementation of the facade layer for the inspected DOM. InspectedWindowFacade.js makes up the interface for the inspected DOM.
Created attachment 27244 [details] The default implementation of the facade layer Resolved conflicts with new changes and fixed ChangeLog
Comment on attachment 27244 [details] The default implementation of the facade layer The code is fine, so this is ready to land except the InspectedWindowFacade.js file needs added to the WebCore.vcproj. The patch also doesn't see to have the ChangeLog like you mentioned.
Created attachment 27384 [details] Added WebCore.vcproj
Testing out this patch before I landed it, I noticed that no styles are showing up in the Elements panel. Only some computed style properties are showing.
Created attachment 27672 [details] Screenshot of bug
Created attachment 27755 [details] A screenshot with additional style rules Can't reproduce the issue. Here is a example (I made the "Computed Style" lable in capital case to be sure I see patched version). Currently I see no difference with the code without patch in this aspect.
Created attachment 27763 [details] Fixed the issue with styles Style rules returned by getMatchedCSSRules was not included int the pane (this fixed here). The computed styles, styls from attributes and inline styles was not toughed (have been working).
Do we need corresponding XCode proj changes?
(In reply to comment #9) > Do we need corresponding XCode proj changes? Nothing in the Xcode project needs to change since it copies the whole inspector folder.
Comment on attachment 27763 [details] Fixed the issue with styles There is still an issue with the Styles pane, all the items are "strike out" and computed style only has width, height and display properties.
Created attachment 28085 [details] Image showing the new issue
Dooh! Almost nearly landed this one.
Created attachment 28444 [details] Fixed issue with striked out styles
I will try this out and review it. What was the main area of the patch that changed? What was the bug?
(In reply to comment #15) > I will try this out and review it. What was the main area of the patch that > changed? What was the bug? The bug was in the method WebInspector.StylesSidebarPane.update: the loop "for (var j = 0; j < style.length; ++j)" was never iterated since style.length was undefined in the facade layer.
Comment on attachment 28444 [details] Fixed issue with striked out styles Styles seems to be working fine now. Thanks! But it looks like the console is broken. I am not seeing output for common expressions. See attached screenshot.
Created attachment 28596 [details] Console bug
Maybe it would be best to break this up into smaller patches so the parts that are working can be landed now, then convert more and more.
Created attachment 28635 [details] Fixed the code displaying results in the Console Fixed methods _formatnode and _formatobject. Also fixed bug in the Scripts panel (incorrect using of the extraProperties argument).
We decided to simplify the changes.
Reopening, since this still has a patch for review.
They decided to change how this was done and filed other bugs.