This change introduces virtual resource that represents inspector stylesheet (that is added for styles added via inspector). New resource has url of form "inspector://<page url folder>/inspector-stylesheet. It enables live editing and revision history of the inspector stylesheet.
Created attachment 143765 [details] Patch
Created attachment 143774 [details] Patch
Comment on attachment 143774 [details] Patch Attachment 143774 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/12799144 New failing tests: inspector/styles/css-live-edit.html inspector/debugger/live-edit.html
Created attachment 143783 [details] Archive of layout-test-results from ec2-cr-linux-02 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: ec2-cr-linux-02 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Comment on attachment 143774 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=143774&action=review > Source/WebCore/inspector/front-end/CSSStyleModel.js:953 > + if (this._frameAndURLToStyleSheetId[resource.frameId + ":" + resource.url]) { Please extract resource.frameId + ":" + resource.url > Source/WebCore/inspector/front-end/CSSStyleModel.js:1096 > + _getViaInspectorResource: function(styleSheetId, callback) _requestViaInspectorResource > Source/WebCore/inspector/front-end/CSSStyleModel.js:1104 > + function hadersLoaded() headersLoaded > Source/WebCore/inspector/front-end/CSSStyleModel.js:1119 > + _viaInspectorResource: function(header) _getOrCreateViaInspectorResource > Source/WebCore/inspector/front-end/SourceFrame.js:56 > + this._textViewer.setReadOnly(!this.canEditSource(), false); Second parameter is not needed. > LayoutTests/inspector/styles/edit-inspector-stylesheet.html:3 > +<meta http-equiv="x-webkit-csp" content="style-src https://*:443"> Is this needed? Why? > LayoutTests/inspector/styles/edit-inspector-stylesheet.html:28 > + // setTimeout(function() { InspectorTest.completeTest(); }, 1000); Please remove this line. > LayoutTests/inspector/styles/edit-inspector-stylesheet.html:49 > + styleSource.requestContent(printContent); Looks like your are doing two potentially asynchronous things here, this looks very confusing.
Comment on attachment 143774 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=143774&action=review > Source/WebCore/inspector/front-end/ScriptsPanel.js:45 > + this._stylesUISourceCodeProvider = new WebInspector.StylesUISourceCodeProvider(); This could be reverted.
(In reply to comment #5) > (From update of attachment 143774 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=143774&action=review > > > Source/WebCore/inspector/front-end/CSSStyleModel.js:953 > > + if (this._frameAndURLToStyleSheetId[resource.frameId + ":" + resource.url]) { > > Please extract resource.frameId + ":" + resource.url > Done. > > Source/WebCore/inspector/front-end/CSSStyleModel.js:1096 > > + _getViaInspectorResource: function(styleSheetId, callback) > > _requestViaInspectorResource Done. > > > Source/WebCore/inspector/front-end/CSSStyleModel.js:1104 > > + function hadersLoaded() > > headersLoaded Done. > > > Source/WebCore/inspector/front-end/CSSStyleModel.js:1119 > > + _viaInspectorResource: function(header) > > _getOrCreateViaInspectorResource Done. > > > Source/WebCore/inspector/front-end/SourceFrame.js:56 > > + this._textViewer.setReadOnly(!this.canEditSource(), false); > > Second parameter is not needed. Removed. > > > LayoutTests/inspector/styles/edit-inspector-stylesheet.html:3 > > +<meta http-equiv="x-webkit-csp" content="style-src https://*:443"> > > Is this needed? Why? Removed. > > > LayoutTests/inspector/styles/edit-inspector-stylesheet.html:28 > > + // setTimeout(function() { InspectorTest.completeTest(); }, 1000); > > Please remove this line. Done. > > > LayoutTests/inspector/styles/edit-inspector-stylesheet.html:49 > > + styleSource.requestContent(printContent); > > Looks like your are doing two potentially asynchronous things here, this looks very confusing. Done. (In reply to comment #6) > (From update of attachment 143774 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=143774&action=review > > > Source/WebCore/inspector/front-end/ScriptsPanel.js:45 > > + this._stylesUISourceCodeProvider = new WebInspector.StylesUISourceCodeProvider(); > > This could be reverted. Done.
Committed r118367: <http://trac.webkit.org/changeset/118367>