Since r165704 there are two resources that are now generated. This revealed some problems in the way we generate the inspector resources: - The script generate-inspector-gresource-manifest.py doesn't receive the list of resources from the makefile, but it duplicates the expression in the makefile to generate the resources list again. This is very easy to end up out of sync, and people from other ports are not expected to know we have this duplication. - We are generating the resources xml file using paths relative to Source/WebInspectorUI, but the new files are in DerivedSources. We should use top source dir and use full paths Source/ buldir/DerivedSource, etc. To keep the same names for the gresources, we need to use alias, something like: <file alias="UserInterface/External/CodeMirror/css.js">Source/WebInspectorU/UserInterface/External/CodeMirror/css.js</file>
This is a good moment to fix inspector resource generation in general, by moving it to WebCore.
Created attachment 227146 [details] Patch
(In reply to comment #2) > Created an attachment (id=227146) [details] > Patch The inspector is shown for me with this patch, but the resources tab shows nothing.
(In reply to comment #3) > (In reply to comment #2) > > Created an attachment (id=227146) [details] [details] > > Patch > > The inspector is shown for me with this patch, but the resources tab shows nothing. I'm not sure it's related to this patch. I get errors like these in WebKit1: ** Message: console message: resource:///org/webkitgtk/inspector/UserInterface/Base/ImageUtilities.js @626: IndexSizeError: DOM Exception 1: Index or size was negative, or greater than the allowed value. ** Message: console message: resource:///org/webkitgtk/inspector/UserInterface/Base/ImageUtilities.js @86: 0 ** Message: console message: resource:///org/webkitgtk/inspector/UserInterface/Protocol/InspectorBackend.js @259: Uncaught exception in inspector page: ** Message: console message: resource:///org/webkitgtk/inspector/UserInterface/Base/ImageUtilities.js @626: IndexSizeError: DOM Exception 1: Index or size was negative, or greater than the allowed value. ** Message: console message: resource:///org/webkitgtk/inspector/UserInterface/Base/ImageUtilities.js @86: 0 ** Message: console message: resource:///org/webkitgtk/inspector/UserInterface/Base/ImageUtilities.js @626: IndexSizeError: DOM Exception 1: Index or size was negative, or greater than the allowed value. ** Message: console message: resource:///org/webkitgtk/inspector/UserInterface/Base/ImageUtilities.js @86: 0 ** Message: console message: resource:///org/webkitgtk/inspector/UserInterface/Views/ResourceSidebarPanel.js @123: TypeError: null is not an object (evaluating 'contentView.showSourceCode') ** Message: console message: resource:///org/webkitgtk/inspector/UserInterface/Views/ResourceSidebarPanel.js @116: TypeError: null is not an object (evaluating 'contentView.showDOMTree')
(In reply to comment #3) > (In reply to comment #2) > > Created an attachment (id=227146) [details] [details] > > Patch > > The inspector is shown for me with this patch, but the resources tab shows nothing. This happened to me as well, but then I recompiled to debug it and started to work. It haven't failed again.
it *hasn't* :-P
Comment on attachment 227146 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=227146&action=review I guess we need to update the autotools build too > Tools/gtk/generate-inspector-gresource-manifest.py:52 > + gresources_file_content = \ > + """<?xml version=1.0 encoding=UTF-8?> > + <gresources> > + <gresource prefix="/org/webkitgtk/inspector"> > """ Now that we have a file open for writing already at this point, maybe we can write to the file, instead of buffering the whole file in memory and writing to the file in one shoot.
See also https://bugs.webkit.org/show_bug.cgi?id=121545#c1
(In reply to comment #3) > (In reply to comment #2) > > Created an attachment (id=227146) [details] [details] > > Patch > > The inspector is shown for me with this patch, but the resources tab shows nothing. The inspector appears here too, but it's not working either.
(In reply to comment #9) > (In reply to comment #3) > > (In reply to comment #2) > > > Created an attachment (id=227146) [details] [details] [details] > > > Patch > > > > The inspector is shown for me with this patch, but the resources tab shows nothing. > > The inspector appears here too, but it's not working either. After a clean build the inspector is working again for me with this patch.
Comment on attachment 227146 [details] Patch Patch looks good to me in general, but please, don't compile the resources in WebCore, but in libwebkit and libwebkit2, even if there are some rules duplicated in cmake files we are going to remove the wk1 ones soon, so it's not a problem. Also consider using the file descriptor instead of buffering the whole file.
Created attachment 228388 [details] Updated patch I've updated the patch, the inspector has been broken for long time and it's high priority now.
Comment on attachment 228388 [details] Updated patch OK, but looks like efl-wk2 will need a fix
Comment on attachment 228388 [details] Updated patch EFL failure looks unrelated to me
Comment on attachment 228388 [details] Updated patch Clearing flags on attachment: 228388 Committed r166648: <http://trac.webkit.org/changeset/166648>
All reviewed patches have been landed. Closing bug.