Chromium Code Reviews| Index: chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js |
| diff --git a/chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js b/chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js |
| index fa44d0edc374e3ba0fd596d61981c18da1c17050..c91b7f3eb283683107dea281be6d64664fe18518 100644 |
| --- a/chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js |
| +++ b/chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js |
| @@ -145,12 +145,6 @@ function updateSelectedSuggestion(increment) { |
| * chrome.searchBox.onnativesuggestions implementation. |
| */ |
| function handleNativeSuggestions() { |
| - // This can't be done in setUpApi(), because apiHandle.font/fontSize |
| - // isn't available yet. |
| - var suggestionStyleNode = $('suggestionStyle'); |
| - if (!suggestionStyleNode) |
| - appendSuggestionStyles(); |
| - |
| var apiHandle = getApiObjectHandle(); |
| // Used to workaround repeated undesired asynchronous onnativesuggestions |
| @@ -234,6 +228,10 @@ function setUpApi() { |
| apiHandle.onnativesuggestions = handleNativeSuggestions; |
| apiHandle.onkeypress = handleKeyPress; |
| apiHandle.onsubmit = onSubmit; |
| + appendSuggestionStyles(); |
|
sreeram
2013/01/22 03:58:03
This isn't quite right. It's possible that the pag
Shishir
2013/01/25 22:11:26
With the change to push font info in RenderViewCre
|
| + |
| + if (apiHandle.nativeSuggestions.length) |
| + handleNativeSuggestions(); |
| } |
| document.addEventListener('DOMContentLoaded', setUpApi); |