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

Side by Side Diff: Source/WebCore/Resources/pagepopups/suggestionPicker.js

Issue 11364040: Merge 133011 - Calendar picker can flicker when opened from the suggestion picker (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years, 1 month 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 | « Source/WebCore/Resources/pagepopups/pickerCommon.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 "use strict"; 1 "use strict";
2 /* 2 /*
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 this._element.appendChild(this._containerElement); 183 this._element.appendChild(this._containerElement);
184 }; 184 };
185 185
186 /** 186 /**
187 * @param {!Element} entry 187 * @param {!Element} entry
188 */ 188 */
189 SuggestionPicker.prototype.selectEntry = function(entry) { 189 SuggestionPicker.prototype.selectEntry = function(entry) {
190 if (typeof entry.dataset.value !== "undefined") { 190 if (typeof entry.dataset.value !== "undefined") {
191 this.submitValue(entry.dataset.value); 191 this.submitValue(entry.dataset.value);
192 } else if (entry.dataset.action === SuggestionPicker.ActionNames.OpenCalenda rPicker) { 192 } else if (entry.dataset.action === SuggestionPicker.ActionNames.OpenCalenda rPicker) {
193 window.addEventListener("didHide", SuggestionPicker._handleWindowDidHide , false);
193 hideWindow(); 194 hideWindow();
194 setTimeout(openCalendarPicker, 0);
195 } 195 }
196 }; 196 };
197 197
198 SuggestionPicker._handleWindowDidHide = function() {
199 openCalendarPicker();
200 window.removeEventListener("didHide", SuggestionPicker._handleWindowDidHide) ;
201 };
202
198 /** 203 /**
199 * @param {!Event} event 204 * @param {!Event} event
200 */ 205 */
201 SuggestionPicker.prototype._handleEntryClick = function(event) { 206 SuggestionPicker.prototype._handleEntryClick = function(event) {
202 var entry = enclosingNodeOrSelfWithClass(event.target, SuggestionPicker.List EntryClass); 207 var entry = enclosingNodeOrSelfWithClass(event.target, SuggestionPicker.List EntryClass);
203 if (!entry) 208 if (!entry)
204 return; 209 return;
205 this.selectEntry(entry); 210 this.selectEntry(entry);
206 event.preventDefault(); 211 event.preventDefault();
207 }; 212 };
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 /** 313 /**
309 * @param {!Event} event 314 * @param {!Event} event
310 */ 315 */
311 SuggestionPicker.prototype._handleMouseOut = function(event) { 316 SuggestionPicker.prototype._handleMouseOut = function(event) {
312 if (!document.activeElement.classList.contains(SuggestionPicker.ListEntryCla ss)) 317 if (!document.activeElement.classList.contains(SuggestionPicker.ListEntryCla ss))
313 return; 318 return;
314 this._isFocusByMouse = false; 319 this._isFocusByMouse = false;
315 document.activeElement.blur(); 320 document.activeElement.blur();
316 event.preventDefault(); 321 event.preventDefault();
317 }; 322 };
OLDNEW
« no previous file with comments | « Source/WebCore/Resources/pagepopups/pickerCommon.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698