Bug 28174

Summary: Profile and Database views' status bar buttons are blank
Product: WebKit Reporter: Mikhail Naganov <mnaganov>
Component: Web Inspector (Deprecated)Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: joepeck, pfeldman, timothy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Proposed change
timothy: review-
Updated patch---comments addressed
none
Storage view also converted to use StatusBarButton, fixed Reload button css to support glyph.
none
noticed that I've accidentally made "Delete" button in Cookies view hidden---fixed timothy: review+, timothy: commit-queue+

Description Mikhail Naganov 2009-08-11 05:49:34 PDT
This bug was introduced in r46979. Profile view buttons (those shown below a profile view) wasn't updated to use createStatusBarButton method. As a result, they are blank.

Trying to fix it naively, I've found that as profile view doesn't have a reference to a Profiles panel, it would need to access the createStatusBarButton function through WebInspector.panels.profiler, which isn't good. So I've decided to encapsulate glyph-based buttons into a new class. As an additional benifit, this allowed to encapsulate toggling and hiding functionality.
Comment 1 Mikhail Naganov 2009-08-11 05:59:18 PDT
Created attachment 34552 [details]
Proposed change
Comment 2 Timothy Hatcher 2009-08-11 09:33:10 PDT
Comment on attachment 34552 [details]
Proposed change

I like the new class, but it should go into it's own file and not part of Panel.js.

Also I think toggled would be a better name for the getter/setter than toggledOn.
Comment 3 Mikhail Naganov 2009-08-12 02:00:21 PDT
Created attachment 34644 [details]
Updated patch---comments addressed
Comment 4 Joseph Pecoraro 2009-08-12 22:23:51 PDT
Mikhail this is pretty awesome!

Heads up on a few other buttons.
  - delete button in DOMStorageItemsView.js.
  - delete button in CookieItemsView.js. (just added)

The Refresh button has not yet been converted to a glyph, but both of those files have a refresh button as well if you feel they are applicable.
Comment 5 Pavel Feldman 2009-08-12 22:45:47 PDT
> The Refresh button has not yet been converted to a glyph, but both of those
> files have a refresh button as well if you feel they are applicable.

There is an Images/reloadButtonGlyph.png in place, it is just that .refresh-storage-status-bar-item was not updated to use it. Mikhail, could you add the fix into your patch?
Comment 6 Mikhail Naganov 2009-08-13 02:13:05 PDT
Created attachment 34723 [details]
Storage view also converted to use StatusBarButton, fixed Reload button css to support glyph.
Comment 7 Mikhail Naganov 2009-08-13 02:14:00 PDT
Joseph and Pavel, I've addressed your comments.
Comment 8 Mikhail Naganov 2009-08-13 02:21:05 PDT
Created attachment 34724 [details]
noticed that I've accidentally made "Delete" button in Cookies view hidden---fixed
Comment 9 Timothy Hatcher 2009-08-13 04:52:53 PDT
Comment on attachment 34724 [details]
noticed that I've accidentally made "Delete" button in Cookies view hidden---fixed

Nice!
Comment 10 Pavel Feldman 2009-08-13 05:17:25 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
	M	WebCore/WebCore.gypi
	M	WebCore/WebCore.vcproj/WebCore.vcproj
	M	WebCore/inspector/front-end/CookieItemsView.js
	M	WebCore/inspector/front-end/DOMStorageItemsView.js
	M	WebCore/inspector/front-end/ElementsPanel.js
	M	WebCore/inspector/front-end/Panel.js
	M	WebCore/inspector/front-end/ProfileView.js
	M	WebCore/inspector/front-end/ProfilesPanel.js
	M	WebCore/inspector/front-end/ResourcesPanel.js
	M	WebCore/inspector/front-end/ScriptsPanel.js
	M	WebCore/inspector/front-end/WebKit.qrc
	M	WebCore/inspector/front-end/inspector.css
	M	WebCore/inspector/front-end/inspector.html
Committed r47192