Summary: | Web Inspector: implement panels history traversal on Cmd+Left/Right. | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Pavel Feldman <pfeldman> | ||||
Component: | Web Inspector (Deprecated) | Assignee: | Pavel Feldman <pfeldman> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | abarth, bweinstein, eric, joepeck, keishi, pfeldman, pmuellr, rik, timothy, webkit.review.bot, yurys | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Pavel Feldman
2010-05-06 09:25:55 PDT
Created attachment 55250 [details]
[PATCH] Proposed change.
Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/inspector/front-end/inspector.js Committed r58891 I just have a few NITs. Otherwise this patch looks awesome! Great idea. > switch (event.keyIdentifier) { > + case "Left": > + if (isMac) > + var isBackKey = event.metaKey; > + else > + var isBackKey = event.ctrlKey; > + > + case "Right": > + if (isMac) > + var isForwardKey = event.metaKey; > + else > + var isForwardKey = event.ctrlKey; I think a ternary operator in these cases would read much better here. var isBackKey = (isMac ? event.metaKey : event.ctrlKey); This also seems like such a common task (isn't it used all over?) that it might be worth putting into a method. > + this._history.splice(this._historyIterator + 1, this._history.length - this._historyIterator - 1); The second parameter might not be required. I know that JavaScriptCore implements the following "Spidermonkey Extension": (from MDC) > If no `howMany` parameter is specified (second syntax above, which is > a SpiderMonkey extension), all elements after index are removed. Producing the simpler: this._history.splice(this._historyIterator + 1); http://trac.webkit.org/changeset/58891 might have broken GTK Linux 32-bit Release The following changes are on the blame list: http://trac.webkit.org/changeset/58891 http://trac.webkit.org/changeset/58892 Not this one. |