Commit 750982a4 authored by manuk's avatar manuk Committed by Commit Bot

[chrome:omnibox] 2 variable renamed for consistency.

The global variable cursorPositionUsed was renamed to cursorPosition in order to match the name in the C++ files. Similarly, PresentationInfoRecord.urlLabelForHeader was renamed to url in order to match the parameter name and for brevity.

Bug: 891303
Change-Id: Icce59c31e09824b01bb1cac3a5c542bc8267cf7d
Reviewed-on: https://chromium-review.googlesource.com/c/1287100Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
Commit-Queue: manuk hovanesian <manukh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600825}
parent 5d4e0962
......@@ -24,7 +24,7 @@
* in the output; otherwise it's hard or impossible to determine
* from screen captures or print-to-PDFs.
*/
let cursorPositionUsed = -1;
let cursorPosition = -1;
/**
* Returns a simple object with information about how to display an
......@@ -46,7 +46,7 @@
/** @type {string} */
this.header = header;
/** @type {string} */
this.urlLabelForHeader = url;
this.url = url;
/** @type {string} */
this.propertyName = propertyName;
/** @type {boolean} */
......@@ -189,7 +189,7 @@
// batch of results.
if (omniboxInputs.$$('show-details').checked
|| omniboxInputs.$$('show-incomplete-results').checked) {
addParagraph(`cursor position = ${cursorPositionUsed}`);
addParagraph(`cursor position = ${cursorPosition}`);
addParagraph(`inferred input type = ${result.type}`);
addParagraph(`elapsed time = ${result.timeSinceOmniboxStartedMs}ms`);
addParagraph(`all providers done = ${result.done}`);
......@@ -304,10 +304,10 @@
PROPERTY_OUTPUT_ORDER.forEach(property => {
if (inDetailedMode || property.displayAlways) {
let headerCell = document.createElement('th');
if (property.urlLabelForHeader !== '') {
if (property.url !== '') {
// Wrap header text in URL.
let linkNode = document.createElement('a');
linkNode.href = property.urlLabelForHeader;
linkNode.href = property.url;
linkNode.textContent = property.header;
headerCell.appendChild(linkNode);
} else {
......@@ -417,7 +417,7 @@
* call handleNewAutocompleteResult as results come in.
*/
makeRequest(inputString,
cursorPositionUsed,
cursorPosition,
preventInlineAutocomplete,
preferKeyword,
pageClassification) {
......@@ -430,7 +430,7 @@
// - fifth element: the value of page-classification
this.pagehandlePtr_.startOmniboxQuery(
inputString,
cursorPositionUsed,
cursorPosition,
preventInlineAutocomplete,
preferKeyword,
pageClassification);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment