Index: chrome/browser/resources/print_preview/print_preview.js |
=================================================================== |
--- chrome/browser/resources/print_preview/print_preview.js (revision 104536) |
+++ chrome/browser/resources/print_preview/print_preview.js (working copy) |
@@ -536,7 +536,7 @@ |
*/ |
function setDefaultPrinter(printer_name, cloudPrintData) { |
// Add a placeholder value so the printer list looks valid. |
- addDestinationListOption('', '', true, true, true); |
+ addDestinationListOption('', '', true, true, false); |
kmadhusu
2011/10/07 22:11:26
dpapad: I am not sure why we have a placeholder he
dpapad
2011/10/10 21:54:27
Briefly spoke with thestig about why we have this
|
if (printer_name) { |
defaultOrLastUsedPrinterName = printer_name; |
if (cloudPrintData) { |
@@ -617,14 +617,14 @@ |
*/ |
function createDestinationListOption(optionText, optionValue, isDefault, |
isDisabled, isSeparator) { |
+ if (isSeparator) |
+ return document.createElement('hr'); |
kmadhusu
2011/10/07 22:11:26
Can you move lines 620 and 621 to a separate funct
csilv
2011/10/07 22:40:34
Done.
|
+ |
var option = document.createElement('option'); |
option.textContent = optionText; |
option.value = optionValue; |
option.selected = isDefault; |
- option.disabled = isSeparator || isDisabled; |
- // Adding attribute for improved accessibility. |
- if (isSeparator) |
- option.setAttribute("role", "separator"); |
+ option.disabled = isDisabled; |
return option; |
} |