Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <link rel="import" href="chrome://resources/html/polymer.html"> | 1 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 2 <link rel="import" href="chrome://resources/polymer/v1_0/paper-radio-button/pape r-radio-button.html"> | 2 <link rel="import" href="chrome://resources/polymer/v1_0/paper-radio-button/pape r-radio-button.html"> |
| 3 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_in dicator.html"> | 3 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_in dicator.html"> |
| 4 <link rel="import" href="/controls/pref_control_behavior.html"> | 4 <link rel="import" href="/controls/pref_control_behavior.html"> |
| 5 <link rel="import" href="/prefs/pref_util.html"> | 5 <link rel="import" href="/prefs/pref_util.html"> |
| 6 <link rel="import" href="/settings_shared_css.html"> | 6 <link rel="import" href="/settings_shared_css.html"> |
| 7 | 7 |
| 8 <dom-module id="controlled-radio-button"> | 8 <dom-module id="controlled-radio-button"> |
| 9 <template> | 9 <template> |
| 10 <style include="settings-shared"> | 10 <style include="settings-shared"> |
| 11 :host { | 11 :host { |
| 12 align-items: center; | 12 align-items: center; |
| 13 display: flex; | 13 display: flex; |
| 14 outline: none; | 14 outline: none; |
| 15 } | 15 } |
| 16 | 16 |
| 17 #radioButton { | |
| 18 flex: 1; | |
| 19 } | |
|
dschuyler
2017/01/05 20:25:05
This change looks okay, but maybe comment on it in
Dan Beam
2017/01/06 02:45:29
split off
| |
| 20 | |
| 17 :host([controlled_]) { | 21 :host([controlled_]) { |
| 18 /* Disable pointer events for this whole element, as outer on-tap gets | 22 /* Disable pointer events for this whole element, as outer on-tap gets |
| 19 * triggered when clicking/tapping anywhere in :host. */ | 23 * triggered when clicking/tapping anywhere in :host. */ |
| 20 pointer-events: none; | 24 pointer-events: none; |
| 21 } | 25 } |
| 22 | 26 |
| 23 cr-policy-pref-indicator { | 27 cr-policy-pref-indicator { |
| 24 -webkit-margin-start: var(--checkbox-spacing); | 28 -webkit-margin-start: var(--checkbox-spacing); |
| 25 /* Enable pointer events for the indicator so :hover works. Disable | 29 /* Enable pointer events for the indicator so :hover works. Disable |
| 26 * clicks/taps via onIndicatorTap_ so outer on-tap doesn't trigger. */ | 30 * clicks/taps via onIndicatorTap_ so outer on-tap doesn't trigger. */ |
| 27 pointer-events: all; | 31 pointer-events: all; |
| 28 } | 32 } |
| 29 </style> | 33 </style> |
| 30 | 34 |
| 31 <paper-radio-button id="radioButton" name="{{name}}" checked="{{checked}}" | 35 <paper-radio-button id="radioButton" name="{{name}}" checked="{{checked}}" |
| 32 disabled="[[controlled_]]" tabindex$="[[tabindex]]"> | 36 disabled="[[controlled_]]" tabindex$="[[tabindex]]"> |
| 33 <content></content> | 37 <content></content> |
| 34 </paper-radio-button> | 38 </paper-radio-button> |
| 35 | 39 |
| 36 <template is="dom-if" if="[[showIndicator_(controlled_, name, pref)]]"> | 40 <template is="dom-if" if="[[showIndicator_(controlled_, name, pref)]]"> |
| 37 <cr-policy-pref-indicator pref="[[pref]]" on-tap="onIndicatorTap_"> | 41 <cr-policy-pref-indicator pref="[[pref]]" on-tap="onIndicatorTap_"> |
| 38 </cr-policy-pref-indicator> | 42 </cr-policy-pref-indicator> |
| 39 </template> | 43 </template> |
| 40 | 44 |
| 41 </template> | 45 </template> |
| 42 <script src="/controls/controlled_radio_button.js"></script> | 46 <script src="/controls/controlled_radio_button.js"></script> |
| 43 </dom-module> | 47 </dom-module> |
| OLD | NEW |