RESOLVED FIXED Bug 50107
Web Inspector: implement "Revert to this revision" in resources panel.
https://bugs.webkit.org/show_bug.cgi?id=50107
Summary Web Inspector: implement "Revert to this revision" in resources panel.
Pavel Feldman
Reported 2010-11-26 05:07:11 PST
Patch to follow.
Attachments
[PATCH] Proposed change (17.90 KB, patch)
2010-11-30 08:01 PST, Pavel Feldman
yurys: review+
Pavel Feldman
Comment 1 2010-11-30 08:01:34 PST
Created attachment 75149 [details] [PATCH] Proposed change
Alexander Pavlov (apavlov)
Comment 2 2010-11-30 08:56:13 PST
Comment on attachment 75149 [details] [PATCH] Proposed change View in context: https://bugs.webkit.org/attachment.cgi?id=75149&action=review You need to add: m_pageStyleSheet->styleSheetChanged(); after m_pageStyleSheet->parseString(text, m_pageStyleSheet->useStrictParsing()); in InspectorStyleSheet::reparseStyleSheet(const String& text) for the new stylesheet text to take effect after reparsing. > WebCore/inspector/front-end/Resource.js:731 > + } trailing whitespace > WebCore/inspector/front-end/ResourcesPanel.js:1230 > + var title = revision.timestamp ? revision.timestamp.toLocaleTimeString() : "(original)"; "(original)" should be localized
Yury Semikhatsky
Comment 3 2010-11-30 09:14:34 PST
Comment on attachment 75149 [details] [PATCH] Proposed change View in context: https://bugs.webkit.org/attachment.cgi?id=75149&action=review > WebCore/inspector/front-end/Resource.js:680 > + function callback(content) You're ignoring contentEncoded parameter here, is it intentional? > WebCore/inspector/front-end/Resource.js:685 > + this.requestContent(callback.bind(this)); Why do you need this call? if (this._content) this._fireOnRevert(this._content); should work just fine. > WebCore/inspector/front-end/Resource.js:731 > + } Trailing whitespace.
Pavel Feldman
Comment 4 2010-11-30 10:58:28 PST
Anyways, I am not landing this change unless setStyleSheetText2 is fixed. Currently, it hangs on every other revert on apple.com. I see this: dhcp-172-19-1-225:WebKit pfeldman$ run-safari --debug Starting Safari with DYLD_FRAMEWORK_PATH set to point to built WebKit in /Users/pfeldman/WebKit/WebKitBuild/Debug. ASSERTION FAILED: m_pendingStylesheets > 0 (/Users/pfeldman/WebKit/WebCore/dom/Document.cpp:2856 void WebCore::Document::removePendingSheet()) and other crashers.
Pavel Feldman
Comment 5 2010-11-30 11:17:36 PST
Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/English.lproj/localizedStrings.js M WebCore/inspector/Inspector.idl M WebCore/inspector/InspectorCSSAgent.cpp M WebCore/inspector/InspectorCSSAgent.h M WebCore/inspector/InspectorStyleSheet.cpp M WebCore/inspector/front-end/CSSStyleModel.js M WebCore/inspector/front-end/Resource.js M WebCore/inspector/front-end/ResourcesPanel.js M WebCore/inspector/front-end/ScriptsPanel.js M WebCore/inspector/front-end/SourceView.js Committed r72938
Note You need to log in before you can comment on or make changes to this bug.