Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Side by Side Diff: chrome/browser/resources/settings/search_settings.js

Issue 2259423002: Settings Search: Make tooltip vertical. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/settings/settings_shared_css.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('settings', function() { 5 cr.define('settings', function() {
6 /** @const {string} */ 6 /** @const {string} */
7 var WRAPPER_CSS_CLASS = 'search-highlight-wrapper'; 7 var WRAPPER_CSS_CLASS = 'search-highlight-wrapper';
8 8
9 /** @const {string} */ 9 /** @const {string} */
10 var HIT_CSS_CLASS = 'search-highlight-hit'; 10 var HIT_CSS_CLASS = 'search-highlight-hit';
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 return; 188 return;
189 189
190 searchBubble = document.createElement('div'); 190 searchBubble = document.createElement('div');
191 searchBubble.classList.add(SEARCH_BUBBLE_CSS_CLASS); 191 searchBubble.classList.add(SEARCH_BUBBLE_CSS_CLASS);
192 var innards = document.createElement('div'); 192 var innards = document.createElement('div');
193 innards.classList.add('search-bubble-innards'); 193 innards.classList.add('search-bubble-innards');
194 innards.textContent = rawQuery; 194 innards.textContent = rawQuery;
195 searchBubble.appendChild(innards); 195 searchBubble.appendChild(innards);
196 element.appendChild(searchBubble); 196 element.appendChild(searchBubble);
197 197
198 // Dynamically position the bubble at the edge the associated controle 198 // Dynamically position the bubble at the edge the associated control
199 // elemnt. 199 // element.
200 searchBubble.style.left = '-' + searchBubble.offsetWidth + 'px'; 200 searchBubble.style.top = element.offsetTop + element.offsetHeight + 'px';
201 } 201 }
202 202
203 /** 203 /**
204 * Finds and makes visible the <settings-section> parent of |node|. 204 * Finds and makes visible the <settings-section> parent of |node|.
205 * @param {!Node} node 205 * @param {!Node} node
206 * @param {string} rawQuery 206 * @param {string} rawQuery
207 * @private 207 * @private
208 */ 208 */
209 function revealParentSection_(node, rawQuery) { 209 function revealParentSection_(node, rawQuery) {
210 var associatedControl = null; 210 var associatedControl = null;
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 function setSearchManagerForTesting(searchManager) { 584 function setSearchManagerForTesting(searchManager) {
585 SearchManagerImpl.instance_ = searchManager; 585 SearchManagerImpl.instance_ = searchManager;
586 } 586 }
587 587
588 return { 588 return {
589 getSearchManager: getSearchManager, 589 getSearchManager: getSearchManager,
590 setSearchManagerForTesting: setSearchManagerForTesting, 590 setSearchManagerForTesting: setSearchManagerForTesting,
591 SearchRequest: SearchRequest, 591 SearchRequest: SearchRequest,
592 }; 592 };
593 }); 593 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/settings/settings_shared_css.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698