diff options
author | Andras Becsi <andras.becsi@digia.com> | 2014-03-18 13:16:26 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-03-20 15:55:39 +0100 |
commit | 3f0f86b0caed75241fa71c95a5d73bc0164348c5 (patch) | |
tree | 92b9fb00f2e9e90b0be2262093876d4f43b6cd13 /chromium/third_party/WebKit/Source/devtools/front_end/StyleSheetOutlineDialog.js | |
parent | e90d7c4b152c56919d963987e2503f9909a666d2 (diff) |
Update to new stable branch 1750
This also includes an updated ninja and chromium dependencies
needed on Windows.
Change-Id: Icd597d80ed3fa4425933c9f1334c3c2e31291c42
Reviewed-by: Zoltan Arvai <zarvai@inf.u-szeged.hu>
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'chromium/third_party/WebKit/Source/devtools/front_end/StyleSheetOutlineDialog.js')
-rw-r--r-- | chromium/third_party/WebKit/Source/devtools/front_end/StyleSheetOutlineDialog.js | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/chromium/third_party/WebKit/Source/devtools/front_end/StyleSheetOutlineDialog.js b/chromium/third_party/WebKit/Source/devtools/front_end/StyleSheetOutlineDialog.js index 4c396470a15..b7f21e5e0e8 100644 --- a/chromium/third_party/WebKit/Source/devtools/front_end/StyleSheetOutlineDialog.js +++ b/chromium/third_party/WebKit/Source/devtools/front_end/StyleSheetOutlineDialog.js @@ -29,13 +29,14 @@ /** * @constructor * @extends {WebInspector.SelectionDialogContentProvider} - * @param {WebInspector.View} view - * @param {WebInspector.UISourceCode} uiSourceCode + * @param {!WebInspector.View} view + * @param {!WebInspector.UISourceCode} uiSourceCode + * @param {function(number, number)} selectItemCallback */ -WebInspector.StyleSheetOutlineDialog = function(view, uiSourceCode) +WebInspector.StyleSheetOutlineDialog = function(view, uiSourceCode, selectItemCallback) { WebInspector.SelectionDialogContentProvider.call(this); - + this._selectItemCallback = selectItemCallback; this._rules = []; this._view = view; this._uiSourceCode = uiSourceCode; @@ -43,14 +44,15 @@ WebInspector.StyleSheetOutlineDialog = function(view, uiSourceCode) } /** - * @param {WebInspector.View} view - * @param {WebInspector.UISourceCode} uiSourceCode + * @param {!WebInspector.View} view + * @param {!WebInspector.UISourceCode} uiSourceCode + * @param {function(number, number)} selectItemCallback */ -WebInspector.StyleSheetOutlineDialog.show = function(view, uiSourceCode) +WebInspector.StyleSheetOutlineDialog.show = function(view, uiSourceCode, selectItemCallback) { if (WebInspector.Dialog.currentInstance()) return null; - var delegate = new WebInspector.StyleSheetOutlineDialog(view, uiSourceCode); + var delegate = new WebInspector.StyleSheetOutlineDialog(view, uiSourceCode, selectItemCallback); var filteredItemSelectionDialog = new WebInspector.FilteredItemSelectionDialog(delegate); WebInspector.Dialog.show(view.element, filteredItemSelectionDialog); } @@ -87,8 +89,8 @@ WebInspector.StyleSheetOutlineDialog.prototype = { /** * @param {number} itemIndex * @param {string} query - * @param {Element} titleElement - * @param {Element} subtitleElement + * @param {!Element} titleElement + * @param {!Element} subtitleElement */ renderItem: function(itemIndex, query, titleElement, subtitleElement) { @@ -100,6 +102,11 @@ WebInspector.StyleSheetOutlineDialog.prototype = { _requestItems: function() { + /** + * @param {?Protocol.Error} error + * @param {!Array.<!CSSAgent.CSSStyleSheetHeader>} infos + * @this {WebInspector.StyleSheetOutlineDialog} + */ function didGetAllStyleSheets(error, infos) { if (error) @@ -118,6 +125,7 @@ WebInspector.StyleSheetOutlineDialog.prototype = { /** * @param {?WebInspector.CSSStyleSheet} styleSheet + * @this {WebInspector.StyleSheetOutlineDialog} */ function didGetStyleSheet(styleSheet) { @@ -138,8 +146,7 @@ WebInspector.StyleSheetOutlineDialog.prototype = { var rule = this._rules[itemIndex]; var lineNumber = rule.rawLocation.lineNumber; if (!isNaN(lineNumber) && lineNumber >= 0) - this._view.highlightPosition(lineNumber, rule.rawLocation.columnNumber); - this._view.focus(); + this._selectItemCallback(lineNumber, rule.rawLocation.columnNumber); }, __proto__: WebInspector.SelectionDialogContentProvider.prototype |