summaryrefslogtreecommitdiffstats
path: root/WebCore/inspector/front-end/HelpScreen.js
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/inspector/front-end/HelpScreen.js')
-rw-r--r--WebCore/inspector/front-end/HelpScreen.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/WebCore/inspector/front-end/HelpScreen.js b/WebCore/inspector/front-end/HelpScreen.js
index a1bbf1e..cad39d0 100644
--- a/WebCore/inspector/front-end/HelpScreen.js
+++ b/WebCore/inspector/front-end/HelpScreen.js
@@ -30,6 +30,8 @@
WebInspector.HelpScreen = function(title)
{
+ this._addStyleSheetIfNeeded("helpScreen.css");
+
this._element = document.createElement("div");
this._element.className = "help-window-outer";
this._element.addEventListener("keydown", this._onKeyDown.bind(this), false);
@@ -84,5 +86,17 @@ WebInspector.HelpScreen.prototype = {
// 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)
+ return;
+
+ WebInspector.HelpScreen._styleSheetAdded = true;
+ var link = document.head.createChild("link");
+ link.type = "text/css";
+ link.rel = "stylesheet";
+ link.href = href;
}
-}
+};