| OLD | NEW |
| 1 /** | 1 /** |
| 2 * @license | 2 * @license |
| 3 * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. | 3 * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. |
| 4 * This code may only be used under the BSD style license found at http://polyme
r.github.io/LICENSE.txt | 4 * This code may only be used under the BSD style license found at http://polyme
r.github.io/LICENSE.txt |
| 5 * The complete set of authors may be found at http://polymer.github.io/AUTHORS.
txt | 5 * The complete set of authors may be found at http://polymer.github.io/AUTHORS.
txt |
| 6 * The complete set of contributors may be found at http://polymer.github.io/CON
TRIBUTORS.txt | 6 * The complete set of contributors may be found at http://polymer.github.io/CON
TRIBUTORS.txt |
| 7 * Code distributed by Google as part of the polymer project is also | 7 * Code distributed by Google as part of the polymer project is also |
| 8 * subject to an additional IP rights grant found at http://polymer.github.io/PA
TENTS.txt | 8 * subject to an additional IP rights grant found at http://polymer.github.io/PA
TENTS.txt |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 // Respect nodes that are disabled in the UI. | 100 // Respect nodes that are disabled in the UI. |
| 101 if (window.getComputedStyle(node)['pointer-events'] === 'none') | 101 if (window.getComputedStyle(node)['pointer-events'] === 'none') |
| 102 return; | 102 return; |
| 103 var xy = middleOfNode(node); | 103 var xy = middleOfNode(node); |
| 104 down(node, xy); | 104 down(node, xy); |
| 105 up(node, xy); | 105 up(node, xy); |
| 106 makeEvent('tap', xy, node); | 106 makeEvent('tap', xy, node); |
| 107 } | 107 } |
| 108 | 108 |
| 109 function focus(target) { | 109 function focus(target) { |
| 110 Polymer.Base.fire.call(target, 'focus', {}, { | 110 Polymer.Base.fire('focus', {}, { |
| 111 bubbles: false | 111 bubbles: false, |
| 112 node: target |
| 112 }); | 113 }); |
| 113 } | 114 } |
| 114 | 115 |
| 115 function blur(target) { | 116 function blur(target) { |
| 116 Polymer.Base.fire.call(target, 'blur', {}, { | 117 Polymer.Base.fire('blur', {}, { |
| 117 bubbles: false | 118 bubbles: false, |
| 119 node: target |
| 118 }); | 120 }); |
| 119 } | 121 } |
| 120 | 122 |
| 121 function downAndUp(target, callback) { | 123 function downAndUp(target, callback) { |
| 122 down(target); | 124 down(target); |
| 123 Polymer.Base.async(function() { | 125 Polymer.Base.async(function() { |
| 124 up(target); | 126 up(target); |
| 125 tap(target); | 127 tap(target); |
| 126 | 128 |
| 127 callback && callback(); | 129 callback && callback(); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 track: track, | 193 track: track, |
| 192 pressAndReleaseKeyOn: pressAndReleaseKeyOn, | 194 pressAndReleaseKeyOn: pressAndReleaseKeyOn, |
| 193 pressEnter: pressEnter, | 195 pressEnter: pressEnter, |
| 194 pressSpace: pressSpace, | 196 pressSpace: pressSpace, |
| 195 keyDownOn: keyDownOn, | 197 keyDownOn: keyDownOn, |
| 196 keyUpOn: keyUpOn, | 198 keyUpOn: keyUpOn, |
| 197 middleOfNode: middleOfNode, | 199 middleOfNode: middleOfNode, |
| 198 topLeftOfNode: topLeftOfNode | 200 topLeftOfNode: topLeftOfNode |
| 199 }; | 201 }; |
| 200 })(this); | 202 })(this); |
| OLD | NEW |