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

Side by Side Diff: Source/WebCore/Resources/pagepopups/pickerCommon.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/ChangeLog ('k') | Source/WebCore/Resources/pagepopups/suggestionPicker.js » ('j') | 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 window.resizeTo(rect.width, rect.height); 162 window.resizeTo(rect.width, rect.height);
163 } 163 }
164 } 164 }
165 165
166 function hideWindow() { 166 function hideWindow() {
167 setWindowRect(new Rect(0, 0, 1, 1)); 167 setWindowRect(new Rect(0, 0, 1, 1));
168 } 168 }
169 169
170 window.addEventListener("resize", function() { 170 window.addEventListener("resize", function() {
171 if (window.innerWidth === 1 && window.innerHeight === 1) 171 if (window.innerWidth === 1 && window.innerHeight === 1)
172 return; 172 window.dispatchEvent(new CustomEvent("didHide"));
173 window.dispatchEvent(new CustomEvent("didOpenPicker")); 173 else
174 window.dispatchEvent(new CustomEvent("didOpenPicker"));
174 }, false); 175 }, false);
175 176
176 /** 177 /**
177 * @return {!number} 178 * @return {!number}
178 */ 179 */
179 function getScrollbarWidth() { 180 function getScrollbarWidth() {
180 if (typeof window.scrollbarWidth === "undefined") { 181 if (typeof window.scrollbarWidth === "undefined") {
181 var scrollDiv = document.createElement("div"); 182 var scrollDiv = document.createElement("div");
182 scrollDiv.style.opacity = "0"; 183 scrollDiv.style.opacity = "0";
183 scrollDiv.style.overflow = "scroll"; 184 scrollDiv.style.overflow = "scroll";
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 232
232 Picker.prototype.handleCancel = function() { 233 Picker.prototype.handleCancel = function() {
233 window.pagePopupController.setValueAndClosePopup(Picker.Actions.Cancel, ""); 234 window.pagePopupController.setValueAndClosePopup(Picker.Actions.Cancel, "");
234 } 235 }
235 236
236 Picker.prototype.chooseOtherColor = function() { 237 Picker.prototype.chooseOtherColor = function() {
237 window.pagePopupController.setValueAndClosePopup(Picker.Actions.ChooseOtherC olor, ""); 238 window.pagePopupController.setValueAndClosePopup(Picker.Actions.ChooseOtherC olor, "");
238 } 239 }
239 240
240 Picker.prototype.cleanup = function() {}; 241 Picker.prototype.cleanup = function() {};
OLDNEW
« no previous file with comments | « Source/WebCore/ChangeLog ('k') | Source/WebCore/Resources/pagepopups/suggestionPicker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698