summaryrefslogtreecommitdiffstats
path: root/WebCore/inspector
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/inspector')
-rw-r--r--WebCore/inspector/InspectorController.cpp36
-rw-r--r--WebCore/inspector/InspectorDOMAgent.cpp12
-rw-r--r--WebCore/inspector/front-end/AuditRules.js12
-rw-r--r--WebCore/inspector/front-end/ConsoleView.js8
-rw-r--r--WebCore/inspector/front-end/HelpScreen.js15
-rw-r--r--WebCore/inspector/front-end/ImageView.js2
-rw-r--r--WebCore/inspector/front-end/ProfileDataGridTree.js2
-rw-r--r--WebCore/inspector/front-end/ResourcesPanel.js8
-rw-r--r--WebCore/inspector/front-end/ScriptsPanel.js10
-rw-r--r--WebCore/inspector/front-end/SourceFrame.js4
-rw-r--r--WebCore/inspector/front-end/TimelineOverviewPane.js3
-rw-r--r--WebCore/inspector/front-end/TimelinePanel.js59
-rw-r--r--WebCore/inspector/front-end/inspector.js10
13 files changed, 96 insertions, 85 deletions
diff --git a/WebCore/inspector/InspectorController.cpp b/WebCore/inspector/InspectorController.cpp
index 23a991e..3b36a4a 100644
--- a/WebCore/inspector/InspectorController.cpp
+++ b/WebCore/inspector/InspectorController.cpp
@@ -24,7 +24,7 @@
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
@@ -445,12 +445,12 @@ void InspectorController::setFrontend(PassOwnPtr<InspectorFrontend> frontend)
m_frontend->inspectedURLChanged(m_inspectedPage->mainFrame()->loader()->url().string());
populateScriptObjects();
-
+
if (m_showAfterVisible == CurrentPanel) {
String lastActivePanelSetting = setting(lastActivePanelSettingName);
m_showAfterVisible = specialPanelForJSName(lastActivePanelSetting);
}
-
+
if (m_nodeToFocus)
focusNode();
#if ENABLE(JAVASCRIPT_DEBUGGER)
@@ -467,7 +467,7 @@ void InspectorController::show()
if (m_openingFrontend)
return;
-
+
if (m_frontend)
m_frontend->bringToFront();
else {
@@ -604,10 +604,10 @@ void InspectorController::populateScriptObjects()
void InspectorController::unbindAllResources()
{
- ResourcesMap::iterator resourcesEnd = m_resources.end();
- for (ResourcesMap::iterator it = m_resources.begin(); it != resourcesEnd; ++it)
- it->second->releaseScriptObject(0);
-
+ ResourcesMap::iterator resourcesEnd = m_resources.end();
+ for (ResourcesMap::iterator it = m_resources.begin(); it != resourcesEnd; ++it)
+ it->second->releaseScriptObject(0);
+
#if ENABLE(DATABASE)
DatabaseResourcesMap::iterator databasesEnd = m_databaseResources.end();
for (DatabaseResourcesMap::iterator it = m_databaseResources.begin(); it != databasesEnd; ++it)
@@ -668,7 +668,7 @@ void InspectorController::didCommitLoad(DocumentLoader* loader)
// unbindAllResources should be called before database and DOM storage
// resources are cleared so that it has a chance to unbind them.
unbindAllResources();
-
+
m_cssStore->reset();
if (m_frontend) {
m_frontend->reset();
@@ -981,11 +981,11 @@ void InspectorController::scriptImported(unsigned long identifier, const String&
{
if (!enabled() || !m_resourceTrackingEnabled)
return;
-
+
InspectorResource* resource = m_resources.get(identifier).get();
if (!resource)
return;
-
+
resource->setOverrideContent(ScriptString(sourceString), InspectorResource::Script);
if (m_frontend)
@@ -1208,7 +1208,7 @@ void InspectorController::getCookies(long callId)
else
m_frontend->didGetCookies(callId, buildArrayForCookies(rawCookiesList), String());
}
-
+
ScriptArray InspectorController::buildArrayForCookies(ListHashSet<Cookie>& cookiesList)
{
ScriptArray cookies = m_frontend->newScriptArray();
@@ -1235,7 +1235,7 @@ ScriptObject InspectorController::buildObjectForCookie(const Cookie& cookie)
value.set("session", cookie.session);
return value;
}
-
+
#if ENABLE(DOM_STORAGE)
void InspectorController::didUseDOMStorage(StorageArea* storageArea, bool isLocalStorage, Frame* frame)
{
@@ -1419,7 +1419,7 @@ ScriptObject InspectorController::createProfileHeader(const ScriptProfile& profi
String InspectorController::getCurrentUserInitiatedProfileName(bool incrementProfileNumber = false)
{
if (incrementProfileNumber)
- m_currentUserInitiatedProfileNumber = m_nextUserInitiatedProfileNumber++;
+ m_currentUserInitiatedProfileNumber = m_nextUserInitiatedProfileNumber++;
return String::format("%s.%d", UserInitiatedProfileName, m_currentUserInitiatedProfileNumber);
}
@@ -1591,7 +1591,7 @@ void InspectorController::setBreakpoint(const String& sourceID, unsigned lineNum
void InspectorController::removeBreakpoint(const String& sourceID, unsigned lineNumber)
{
ScriptDebugServer::shared().removeBreakpoint(sourceID, lineNumber);
-
+
String url = m_sourceIDToURL.get(sourceID);
if (url.isEmpty())
return;
@@ -1695,7 +1695,7 @@ static void drawOutlinedQuad(GraphicsContext& context, const FloatQuad& quad, co
context.restore();
}
-
+
// Now do the fill
context.addPath(quadPath);
context.setFillColor(fillColor, DeviceColorSpace);
@@ -1836,7 +1836,7 @@ bool InspectorController::stopTiming(const String& title, double& elapsed)
double startTime = it->second;
m_times.remove(it);
-
+
elapsed = currentTime() * 1000 - startTime;
return true;
}
@@ -1904,5 +1904,5 @@ void InspectorController::removeAllScriptsToEvaluateOnLoad()
}
} // namespace WebCore
-
+
#endif // ENABLE(INSPECTOR)
diff --git a/WebCore/inspector/InspectorDOMAgent.cpp b/WebCore/inspector/InspectorDOMAgent.cpp
index 1164736..0833e15 100644
--- a/WebCore/inspector/InspectorDOMAgent.cpp
+++ b/WebCore/inspector/InspectorDOMAgent.cpp
@@ -748,7 +748,7 @@ void InspectorDOMAgent::didRemoveDOMNode(Node* node)
m_frontend->childNodeCountUpdated(parentId, 0);
} else
m_frontend->childNodeRemoved(parentId, m_documentNodeToIdMap.get(node));
- unbind(node, &m_documentNodeToIdMap);
+ unbind(node, &m_documentNodeToIdMap);
}
void InspectorDOMAgent::didModifyDOMAttr(Element* element)
@@ -761,14 +761,14 @@ void InspectorDOMAgent::didModifyDOMAttr(Element* element)
m_frontend->attributesUpdated(id, buildArrayForElementAttributes(element));
}
-void InspectorDOMAgent::getStyles(long callId, long nodeId, bool authorOnly)
+void InspectorDOMAgent::getStyles(long callId, long nodeId, bool authorOnly)
{
Node* node = nodeForId(nodeId);
if (!node || node->nodeType() != Node::ELEMENT_NODE) {
m_frontend->didGetStyles(callId, ScriptValue::undefined());
return;
}
-
+
DOMWindow* defaultView = node->ownerDocument()->defaultView();
if (!defaultView) {
m_frontend->didGetStyles(callId, ScriptValue::undefined());
@@ -789,7 +789,7 @@ void InspectorDOMAgent::getStyles(long callId, long nodeId, bool authorOnly)
result.set("styleAttributes", buildObjectForAttributeStyles(element));
result.set("pseudoElements", buildArrayForPseudoElements(element, authorOnly));
-
+
ScriptObject currentStyle = result;
Element* parentElement = element->parentElement();
while (parentElement) {
@@ -906,7 +906,7 @@ void InspectorDOMAgent::applyStyleText(long callId, long styleId, const String&
return;
}
- // Remove disabled property entry for property with given name.
+ // Remove disabled property entry for property with given name.
IdToDisabledStyleMap::iterator disabledIt = cssStore()->idToDisabledStyle.find(styleId);
if (disabledIt != cssStore()->idToDisabledStyle.end())
disabledIt->second.remove(propertyName);
@@ -978,7 +978,7 @@ void InspectorDOMAgent::applyStyleText(long callId, long styleId, const String&
// Set the property on the real style declaration.
ExceptionCode ec = 0;
style->setProperty(name, value, priority, ec);
- // Remove disabled property entry for property with this name.
+ // Remove disabled property entry for property with this name.
if (disabledIt != cssStore()->idToDisabledStyle.end())
disabledIt->second.remove(name);
changedProperties.append(name);
diff --git a/WebCore/inspector/front-end/AuditRules.js b/WebCore/inspector/front-end/AuditRules.js
index a6976b1..8519cf2 100644
--- a/WebCore/inspector/front-end/AuditRules.js
+++ b/WebCore/inspector/front-end/AuditRules.js
@@ -92,13 +92,13 @@ WebInspector.AuditRules.GzipRule.prototype = {
}
var savings = 2 * size / 3;
totalSavings += savings;
- summary.addChild(String.sprintf("%s could save ~%s", WebInspector.AuditRuleResult.linkifyDisplayName(resource.url), Number.bytesToString(savings)));
+ summary.addChild(String.sprintf("%s could save ~%s", WebInspector.AuditRuleResult.linkifyDisplayName(resource.url), Number.bytesToString(savings, WebInspector.UIString)));
result.violationCount++;
}
}
if (!totalSavings)
return callback(null);
- summary.value = String.sprintf("Compressing the following resources with gzip could reduce their transfer size by about two thirds (~%s):", Number.bytesToString(totalSavings));
+ summary.value = String.sprintf("Compressing the following resources with gzip could reduce their transfer size by about two thirds (~%s):", Number.bytesToString(totalSavings, WebInspector.UIString));
callback(result);
},
@@ -955,7 +955,7 @@ WebInspector.AuditRules.CookieSizeRule.prototype = {
for (var i = 0, len = sortedCookieSizes.length; i < len; ++i) {
var maxCookieSize = sortedCookieSizes[i].maxCookieSize;
if (maxCookieSize > this._maxBytesThreshold)
- hugeCookieDomains.push(WebInspector.AuditRuleResult.resourceDomain(sortedCookieSizes[i].domain) + ": " + Number.bytesToString(maxCookieSize));
+ hugeCookieDomains.push(WebInspector.AuditRuleResult.resourceDomain(sortedCookieSizes[i].domain) + ": " + Number.bytesToString(maxCookieSize, WebInspector.UIString));
}
var bigAvgCookieDomains = [];
@@ -964,9 +964,9 @@ WebInspector.AuditRules.CookieSizeRule.prototype = {
var domain = sortedCookieSizes[i].domain;
var avgCookieSize = sortedCookieSizes[i].avgCookieSize;
if (avgCookieSize > this._avgBytesThreshold && avgCookieSize < this._maxBytesThreshold)
- bigAvgCookieDomains.push(WebInspector.AuditRuleResult.resourceDomain(domain) + ": " + Number.bytesToString(avgCookieSize));
+ bigAvgCookieDomains.push(WebInspector.AuditRuleResult.resourceDomain(domain) + ": " + Number.bytesToString(avgCookieSize, WebInspector.UIString));
}
- result.addChild(String.sprintf("The average cookie size for all requests on this page is %s", Number.bytesToString(avgAllCookiesSize)));
+ result.addChild(String.sprintf("The average cookie size for all requests on this page is %s", Number.bytesToString(avgAllCookiesSize, WebInspector.UIString)));
var message;
if (hugeCookieDomains.length) {
@@ -1017,7 +1017,7 @@ WebInspector.AuditRules.StaticCookielessRule.prototype = {
if (badUrls.length < this._minResources)
return;
- var entry = result.addChild(String.sprintf("%s of cookies were sent with the following static resources. Serve these static resources from a domain that does not set cookies:", Number.bytesToString(cookieBytes)), true);
+ var entry = result.addChild(String.sprintf("%s of cookies were sent with the following static resources. Serve these static resources from a domain that does not set cookies:", Number.bytesToString(cookieBytes, WebInspector.UIString)), true);
entry.addURLs(badUrls);
result.violationCount = badUrls.length;
},
diff --git a/WebCore/inspector/front-end/ConsoleView.js b/WebCore/inspector/front-end/ConsoleView.js
index 9d5042e..b9f6d0a 100644
--- a/WebCore/inspector/front-end/ConsoleView.js
+++ b/WebCore/inspector/front-end/ConsoleView.js
@@ -82,11 +82,11 @@ WebInspector.ConsoleView = function(drawer)
return categoryElement;
}
- this.allElement = createFilterElement.call(this, "All");
+ this.allElement = createFilterElement.call(this, WebInspector.UIString("All"));
createDividerElement.call(this);
- this.errorElement = createFilterElement.call(this, "Errors");
- this.warningElement = createFilterElement.call(this, "Warnings");
- this.logElement = createFilterElement.call(this, "Logs");
+ this.errorElement = createFilterElement.call(this, WebInspector.UIString("Errors"));
+ this.warningElement = createFilterElement.call(this, WebInspector.UIString("Warnings"));
+ this.logElement = createFilterElement.call(this, WebInspector.UIString("Logs"));
this.filter(this.allElement, false);
this._registerShortcuts();
diff --git a/WebCore/inspector/front-end/HelpScreen.js b/WebCore/inspector/front-end/HelpScreen.js
index 0e394c5..cad39d0 100644
--- a/WebCore/inspector/front-end/HelpScreen.js
+++ b/WebCore/inspector/front-end/HelpScreen.js
@@ -41,6 +41,7 @@ WebInspector.HelpScreen = function(title)
var closeButton = captionWindow.createChild("button", "help-close-button");
this.contentElement = mainWindow.createChild("div", "help-content");
this.contentElement.tabIndex = 0;
+ this.contentElement.addEventListener("blur", this._onBlur.bind(this), false);
captionWindow.createChild("h1", "help-window-title").innerText = title;
closeButton.innerText = "\u2716"; // Code stands for HEAVY MULTIPLICATION X.
@@ -56,15 +57,20 @@ WebInspector.HelpScreen = function(title)
WebInspector.HelpScreen.prototype = {
show: function()
{
+ if (this._isShown)
+ return;
+
this._element.style.visibility = "visible";
this._isShown = true;
- this.contentElement.focus();
+ this._previousFocusElement = WebInspector.currentFocusElement;
+ WebInspector.currentFocusElement = this.contentElement;
},
_hide: function()
{
this._isShown = false;
this._element.style.visibility = "hidden";
+ WebInspector.currentFocusElement = this._previousFocusElement;
},
_onKeyDown: function(event)
@@ -75,6 +81,13 @@ WebInspector.HelpScreen.prototype = {
}
},
+ _onBlur: function()
+ {
+ // Pretend we're modal, grab focus back if we're still shown.
+ if (this._isShown)
+ WebInspector.currentFocusElement = this.contentElement;
+ },
+
_addStyleSheetIfNeeded: function(href)
{
if (WebInspector.HelpScreen._styleSheetAdded)
diff --git a/WebCore/inspector/front-end/ImageView.js b/WebCore/inspector/front-end/ImageView.js
index 0c15a40..06ca4a4 100644
--- a/WebCore/inspector/front-end/ImageView.js
+++ b/WebCore/inspector/front-end/ImageView.js
@@ -67,7 +67,7 @@ WebInspector.ImageView.prototype = {
var imageProperties = [
{ name: WebInspector.UIString("Dimensions"), value: WebInspector.UIString("%d × %d", this.imagePreviewElement.naturalWidth, this.imagePreviewElement.height) },
- { name: WebInspector.UIString("File size"), value: Number.bytesToString(this.resource.resourceSize, WebInspector.UIString.bind(WebInspector)) },
+ { name: WebInspector.UIString("File size"), value: Number.bytesToString(this.resource.resourceSize, WebInspector.UIString) },
{ name: WebInspector.UIString("MIME type"), value: this.resource.mimeType }
];
diff --git a/WebCore/inspector/front-end/ProfileDataGridTree.js b/WebCore/inspector/front-end/ProfileDataGridTree.js
index db156bf..b10f392 100644
--- a/WebCore/inspector/front-end/ProfileDataGridTree.js
+++ b/WebCore/inspector/front-end/ProfileDataGridTree.js
@@ -50,7 +50,7 @@ WebInspector.ProfileDataGridNode.prototype = {
{
function formatMilliseconds(time)
{
- return Number.secondsToString(time / 1000, WebInspector.UIString.bind(WebInspector), !Preferences.samplingCPUProfiler);
+ return Number.secondsToString(time / 1000, WebInspector.UIString, !Preferences.samplingCPUProfiler);
}
var data = {};
diff --git a/WebCore/inspector/front-end/ResourcesPanel.js b/WebCore/inspector/front-end/ResourcesPanel.js
index 7a15959..b2dfa15 100644
--- a/WebCore/inspector/front-end/ResourcesPanel.js
+++ b/WebCore/inspector/front-end/ResourcesPanel.js
@@ -898,7 +898,7 @@ WebInspector.ResourceTimeCalculator.prototype = {
formatValue: function(value)
{
- return Number.secondsToString(value, WebInspector.UIString.bind(WebInspector));
+ return Number.secondsToString(value, WebInspector.UIString);
},
_lowerBound: function(resource)
@@ -922,7 +922,7 @@ WebInspector.ResourceTransferTimeCalculator = function()
WebInspector.ResourceTransferTimeCalculator.prototype = {
formatValue: function(value)
{
- return Number.secondsToString(value, WebInspector.UIString.bind(WebInspector));
+ return Number.secondsToString(value, WebInspector.UIString);
},
_lowerBound: function(resource)
@@ -946,7 +946,7 @@ WebInspector.ResourceTransferDurationCalculator = function()
WebInspector.ResourceTransferDurationCalculator.prototype = {
formatValue: function(value)
{
- return Number.secondsToString(value, WebInspector.UIString.bind(WebInspector));
+ return Number.secondsToString(value, WebInspector.UIString);
},
_upperBound: function(resource)
@@ -1002,7 +1002,7 @@ WebInspector.ResourceTransferSizeCalculator.prototype = {
formatValue: function(value)
{
- return Number.bytesToString(value, WebInspector.UIString.bind(WebInspector));
+ return Number.bytesToString(value, WebInspector.UIString);
}
}
diff --git a/WebCore/inspector/front-end/ScriptsPanel.js b/WebCore/inspector/front-end/ScriptsPanel.js
index 31d37a1..6c817ac 100644
--- a/WebCore/inspector/front-end/ScriptsPanel.js
+++ b/WebCore/inspector/front-end/ScriptsPanel.js
@@ -978,7 +978,7 @@ WebInspector.ScriptsPanel.prototype = {
_registerShortcuts: function()
{
- var section = WebInspector.shortcutsHelp.section("Scripts Panel");
+ var section = WebInspector.shortcutsHelp.section(WebInspector.UIString("Scripts Panel"));
var handler, shortcut1, shortcut2;
var platformSpecificModifier = WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta;
@@ -990,7 +990,7 @@ WebInspector.ScriptsPanel.prototype = {
this._shortcuts[shortcut1.key] = handler;
shortcut2 = WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Slash, platformSpecificModifier);
this._shortcuts[shortcut2.key] = handler;
- section.addAlternateKeys([ shortcut1.name, shortcut2.name ], "Continue");
+ section.addAlternateKeys([ shortcut1.name, shortcut2.name ], WebInspector.UIString("Continue"));
// Step over.
handler = this.stepOverButton.click.bind(this.stepOverButton);
@@ -998,7 +998,7 @@ WebInspector.ScriptsPanel.prototype = {
this._shortcuts[shortcut1.key] = handler;
shortcut2 = WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.SingleQuote, platformSpecificModifier);
this._shortcuts[shortcut2.key] = handler;
- section.addAlternateKeys([ shortcut1.name, shortcut2.name ], "Step over");
+ section.addAlternateKeys([ shortcut1.name, shortcut2.name ], WebInspector.UIString("Step over"));
// Step into.
handler = this.stepIntoButton.click.bind(this.stepIntoButton);
@@ -1006,7 +1006,7 @@ WebInspector.ScriptsPanel.prototype = {
this._shortcuts[shortcut1.key] = handler;
shortcut2 = WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Semicolon, platformSpecificModifier);
this._shortcuts[shortcut2.key] = handler;
- section.addAlternateKeys([ shortcut1.name, shortcut2.name ], "Step into");
+ section.addAlternateKeys([ shortcut1.name, shortcut2.name ], WebInspector.UIString("Step into"));
// Step out.
handler = this.stepOutButton.click.bind(this.stepOutButton);
@@ -1014,7 +1014,7 @@ WebInspector.ScriptsPanel.prototype = {
this._shortcuts[shortcut1.key] = handler;
shortcut2 = WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Semicolon, WebInspector.KeyboardShortcut.Modifiers.Shift, platformSpecificModifier);
this._shortcuts[shortcut2.key] = handler;
- section.addAlternateKeys([ shortcut1.name, shortcut2.name ], "Step out");
+ section.addAlternateKeys([ shortcut1.name, shortcut2.name ], WebInspector.UIString("Step out"));
this.sidebarPanes.callstack.registerShortcuts(section);
}
diff --git a/WebCore/inspector/front-end/SourceFrame.js b/WebCore/inspector/front-end/SourceFrame.js
index 2dec650..953da11 100644
--- a/WebCore/inspector/front-end/SourceFrame.js
+++ b/WebCore/inspector/front-end/SourceFrame.js
@@ -425,11 +425,11 @@ WebInspector.SourceFrame.prototype = {
this._editBreakpointCondition(breakpoint);
}
- contextMenu.appendItem(WebInspector.UIString("Add Conditional Breakpoint..."), addConditionalBreakpoint.bind(this));
+ contextMenu.appendItem(WebInspector.UIString("Add Conditional Breakpoint…"), addConditionalBreakpoint.bind(this));
} else {
// This row has a breakpoint, we want to show edit and remove breakpoint, and either disable or enable.
contextMenu.appendItem(WebInspector.UIString("Remove Breakpoint"), WebInspector.panels.scripts.removeBreakpoint.bind(WebInspector.panels.scripts, breakpoint));
- contextMenu.appendItem(WebInspector.UIString("Edit Breakpoint..."), this._editBreakpointCondition.bind(this, breakpoint));
+ contextMenu.appendItem(WebInspector.UIString("Edit Breakpoint…"), this._editBreakpointCondition.bind(this, breakpoint));
if (breakpoint.enabled)
contextMenu.appendItem(WebInspector.UIString("Disable Breakpoint"), function() { breakpoint.enabled = false; });
else
diff --git a/WebCore/inspector/front-end/TimelineOverviewPane.js b/WebCore/inspector/front-end/TimelineOverviewPane.js
index aaf2adb..09431dc 100644
--- a/WebCore/inspector/front-end/TimelineOverviewPane.js
+++ b/WebCore/inspector/front-end/TimelineOverviewPane.js
@@ -336,7 +336,6 @@ WebInspector.TimelineOverviewPane.prototype.__proto__ = WebInspector.Object.prot
WebInspector.TimelineOverviewCalculator = function()
{
- this._uiString = WebInspector.UIString.bind(WebInspector);
}
WebInspector.TimelineOverviewCalculator.prototype = {
@@ -373,7 +372,7 @@ WebInspector.TimelineOverviewCalculator.prototype = {
formatValue: function(value)
{
- return Number.secondsToString(value, this._uiString);
+ return Number.secondsToString(value, WebInspector.UIString);
}
}
diff --git a/WebCore/inspector/front-end/TimelinePanel.js b/WebCore/inspector/front-end/TimelinePanel.js
index 733272d..af49c25 100644
--- a/WebCore/inspector/front-end/TimelinePanel.js
+++ b/WebCore/inspector/front-end/TimelinePanel.js
@@ -87,7 +87,7 @@ WebInspector.TimelinePanel = function()
this._calculator = new WebInspector.TimelineCalculator();
this._calculator._showShortEvents = false;
- var shortRecordThresholdTitle = Number.secondsToString(WebInspector.TimelinePanel.shortRecordThreshold, WebInspector.UIString.bind(WebInspector));
+ var shortRecordThresholdTitle = Number.secondsToString(WebInspector.TimelinePanel.shortRecordThreshold, WebInspector.UIString);
this._showShortRecordsTitleText = WebInspector.UIString("Show the records that are shorter than %s", shortRecordThresholdTitle);
this._hideShortRecordsTitleText = WebInspector.UIString("Hide the records that are shorter than %s", shortRecordThresholdTitle);
this._createStatusbarButtons();
@@ -615,7 +615,6 @@ WebInspector.TimelineCalculator = function()
this.reset();
this.windowLeft = 0.0;
this.windowRight = 1.0;
- this._uiString = WebInspector.UIString.bind(WebInspector);
}
WebInspector.TimelineCalculator.prototype = {
@@ -671,7 +670,7 @@ WebInspector.TimelineCalculator.prototype = {
formatValue: function(value)
{
- return Number.secondsToString(value + this.minimumBoundary - this._absoluteMinimumBoundary, this._uiString);
+ return Number.secondsToString(value + this.minimumBoundary - this._absoluteMinimumBoundary, WebInspector.UIString);
}
}
@@ -870,7 +869,7 @@ WebInspector.TimelinePanel.FormattedRecord.prototype = {
label.className = "timeline-aggregated-category timeline-" + index;
cell.appendChild(label);
var text = document.createElement("span");
- text.textContent = Number.secondsToString(this._aggregatedStats[index] + 0.0001);
+ text.textContent = Number.secondsToString(this._aggregatedStats[index] + 0.0001, WebInspector.UIString);
cell.appendChild(text);
}
return cell;
@@ -881,71 +880,71 @@ WebInspector.TimelinePanel.FormattedRecord.prototype = {
var contentHelper = new WebInspector.TimelinePanel.PopupContentHelper(this.title);
if (this._children && this._children.length) {
- contentHelper._appendTextRow("Self Time", Number.secondsToString(this._selfTime + 0.0001));
- contentHelper._appendElementRow("Aggregated Time", this._generateAggregatedInfo());
+ contentHelper._appendTextRow(WebInspector.UIString("Self Time"), Number.secondsToString(this._selfTime + 0.0001, WebInspector.UIString));
+ contentHelper._appendElementRow(WebInspector.UIString("Aggregated Time"), this._generateAggregatedInfo());
}
- var text = Number.secondsToString(this._lastChildEndTime - this.startTime) + " (@" +
- calculator.formatValue(this.startTime - calculator.minimumBoundary) + ")";
- contentHelper._appendTextRow("Duration", text);
+ var text = WebInspector.UIString("%s (at %s)", Number.secondsToString(this._lastChildEndTime - this.startTime, WebInspector.UIString),
+ calculator.formatValue(this.startTime - calculator.minimumBoundary));
+ contentHelper._appendTextRow(WebInspector.UIString("Duration"), text);
const recordTypes = WebInspector.TimelineAgent.RecordType;
switch (this.type) {
case recordTypes.GCEvent:
- contentHelper._appendTextRow("Collected", Number.bytesToString(this.data.usedHeapSizeDelta));
+ contentHelper._appendTextRow(WebInspector.UIString("Collected"), Number.bytesToString(this.data.usedHeapSizeDelta, WebInspector.UIString));
break;
case recordTypes.TimerInstall:
case recordTypes.TimerFire:
case recordTypes.TimerRemove:
- contentHelper._appendTextRow("Timer Id", this.data.timerId);
+ contentHelper._appendTextRow(WebInspector.UIString("Timer ID"), this.data.timerId);
if (typeof this.timeout === "number") {
- contentHelper._appendTextRow("Timeout", this.timeout);
- contentHelper._appendTextRow("Repeats", !this.singleShot);
+ contentHelper._appendTextRow(WebInspector.UIString("Timeout"), this.timeout);
+ contentHelper._appendTextRow(WebInspector.UIString("Repeats"), !this.singleShot);
}
if (typeof this.callSiteScriptLine === "number")
- contentHelper._appendLinkRow("Call Site", this.callSiteScriptName, this.callSiteScriptLine);
+ contentHelper._appendLinkRow(WebInspector.UIString("Call Site"), this.callSiteScriptName, this.callSiteScriptLine);
break;
case recordTypes.FunctionCall:
- contentHelper._appendLinkRow("Location", this.data.scriptName, this.data.scriptLine);
+ contentHelper._appendLinkRow(WebInspector.UIString("Location"), this.data.scriptName, this.data.scriptLine);
break;
case recordTypes.ScheduleResourceRequest:
case recordTypes.ResourceSendRequest:
case recordTypes.ResourceReceiveResponse:
case recordTypes.ResourceReceiveData:
case recordTypes.ResourceFinish:
- contentHelper._appendLinkRow("Resource", this.data.url);
+ contentHelper._appendLinkRow(WebInspector.UIString("Resource"), this.data.url);
if (this.data.requestMethod)
- contentHelper._appendTextRow("Request Method", this.data.requestMethod);
+ contentHelper._appendTextRow(WebInspector.UIString("Request Method"), this.data.requestMethod);
if (typeof this.data.statusCode === "number")
- contentHelper._appendTextRow("Status Code", this.data.statusCode);
+ contentHelper._appendTextRow(WebInspector.UIString("Status Code"), this.data.statusCode);
if (this.data.mimeType)
- contentHelper._appendTextRow("Mime Type", this.data.mimeType);
+ contentHelper._appendTextRow(WebInspector.UIString("MIME Type"), this.data.mimeType);
if (typeof this.data.expectedContentLength === "number" && this.data.expectedContentLength !== -1)
- contentHelper._appendTextRow("Expected Content Length", this.data.expectedContentLength);
+ contentHelper._appendTextRow(WebInspector.UIString("Expected Content Length"), this.data.expectedContentLength);
break;
case recordTypes.EvaluateScript:
if (this.data && this.data.url)
- contentHelper._appendLinkRow("Script", this.data.url, this.data.lineNumber);
+ contentHelper._appendLinkRow(WebInspector.UIString("Script"), this.data.url, this.data.lineNumber);
break;
case recordTypes.Paint:
- contentHelper._appendTextRow("Location", this.data.x + "\u2009\u00d7\u2009" + this.data.y);
- contentHelper._appendTextRow("Dimensions", this.data.width + "\u2009\u00d7\u2009" + this.data.height);
+ contentHelper._appendTextRow(WebInspector.UIString("Location"), WebInspector.UIString("%d × %d", this.data.x, this.data.y));
+ contentHelper._appendTextRow(WebInspector.UIString("Dimensions"), WebInspector.UIString("%d × %d", this.data.width, this.data.height));
case recordTypes.RecalculateStyles: // We don't want to see default details.
break;
default:
if (this.details)
- contentHelper._appendTextRow("Details", this.details);
+ contentHelper._appendTextRow(WebInspector.UIString("Details"), this.details);
break;
}
if (this.data.scriptName && this.type !== recordTypes.FunctionCall)
- contentHelper._appendLinkRow("Function Call", this.data.scriptName, this.data.scriptLine);
+ contentHelper._appendLinkRow(WebInspector.UIString("Function Call"), this.data.scriptName, this.data.scriptLine);
if (this.callerScriptName && this.type !== recordTypes.GCEvent)
- contentHelper._appendLinkRow("Caller", this.callerScriptName, this.callerScriptLine);
+ contentHelper._appendLinkRow(WebInspector.UIString("Caller"), this.callerScriptName, this.callerScriptLine);
if (this.usedHeapSize)
- contentHelper._appendTextRow("Used Heap Size", WebInspector.UIString("%s of %s", Number.bytesToString(this.usedHeapSize), Number.bytesToString(this.totalHeapSize)));
+ contentHelper._appendTextRow(WebInspector.UIString("Used Heap Size"), WebInspector.UIString("%s of %s", Number.bytesToString(this.usedHeapSize, WebInspector.UIString), Number.bytesToString(this.totalHeapSize, WebInspector.UIString)));
return contentHelper._contentTable;
},
@@ -954,7 +953,7 @@ WebInspector.TimelinePanel.FormattedRecord.prototype = {
{
switch (record.type) {
case WebInspector.TimelineAgent.RecordType.GCEvent:
- return WebInspector.UIString("%s collected", Number.bytesToString(record.data.usedHeapSizeDelta));
+ return WebInspector.UIString("%s collected", Number.bytesToString(record.data.usedHeapSizeDelta, WebInspector.UIString));
case WebInspector.TimelineAgent.RecordType.TimerFire:
return record.data.scriptName ? WebInspector.linkifyResourceAsNode(record.data.scriptName, "scripts", record.data.scriptLine, "", "") : record.data.timerId;
case WebInspector.TimelineAgent.RecordType.FunctionCall:
@@ -1032,7 +1031,7 @@ WebInspector.TimelinePanel.PopupContentHelper.prototype = {
_appendTextRow: function(title, content)
{
var row = document.createElement("tr");
- row.appendChild(this._createCell(WebInspector.UIString(title), "timeline-details-row-title"));
+ row.appendChild(this._createCell(title, "timeline-details-row-title"));
row.appendChild(this._createCell(content, "timeline-details-row-data"));
this._contentTable.appendChild(row);
},
@@ -1040,7 +1039,7 @@ WebInspector.TimelinePanel.PopupContentHelper.prototype = {
_appendElementRow: function(title, content)
{
var row = document.createElement("tr");
- row.appendChild(this._createCell(WebInspector.UIString(title), "timeline-details-row-title"));
+ row.appendChild(this._createCell(title, "timeline-details-row-title"));
var cell = document.createElement("td");
cell.appendChild(content);
row.appendChild(cell);
diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js
index f6ae79d..06ae503 100644
--- a/WebCore/inspector/front-end/inspector.js
+++ b/WebCore/inspector/front-end/inspector.js
@@ -444,8 +444,8 @@ WebInspector.loaded = function()
this._registerShortcuts();
// set order of some sections explicitly
- WebInspector.shortcutsHelp.section("Console");
- WebInspector.shortcutsHelp.section("Elements Panel");
+ WebInspector.shortcutsHelp.section(WebInspector.UIString("Console"));
+ WebInspector.shortcutsHelp.section(WebInspector.UIString("Elements Panel"));
this.drawer = new WebInspector.Drawer();
this.console = new WebInspector.ConsoleView(this.drawer);
@@ -1514,7 +1514,7 @@ WebInspector.setRecordingProfile = function(isProfiling)
if (!this._temporaryRecordingProfile) {
this._temporaryRecordingProfile = {
typeId: WebInspector.CPUProfileType.TypeId,
- title: WebInspector.UIString('Recording...'),
+ title: WebInspector.UIString("Recording…"),
uid: -1,
isTemporary: true
};
@@ -1861,10 +1861,10 @@ WebInspector.UIString = function(string)
if (window.localizedStrings && string in window.localizedStrings)
string = window.localizedStrings[string];
else {
- if (!(string in this.missingLocalizedStrings)) {
+ if (!(string in WebInspector.missingLocalizedStrings)) {
if (!WebInspector.InspectorBackendStub)
console.error("Localized string \"" + string + "\" not found.");
- this.missingLocalizedStrings[string] = true;
+ WebInspector.missingLocalizedStrings[string] = true;
}
if (Preferences.showMissingLocalizedStrings)