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

Side by Side Diff: ui/keyboard/resources/elements/kb-keyset.html

Issue 98073012: Add unit test for lock and unlock virtual keyboard feature (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months 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 | Annotate | Revision Log
OLDNEW
1 <!-- 1 <!--
2 -- Copyright 2013 The Chromium Authors. All rights reserved. 2 -- Copyright 2013 The Chromium Authors. All rights reserved.
3 -- Use of this source code is governed by a BSD-style license that can be 3 -- Use of this source code is governed by a BSD-style license that can be
4 -- found in the LICENSE file. 4 -- found in the LICENSE file.
5 --> 5 -->
6 6
7 <polymer-element name="kb-keyset" attributes="nextKeyset isDefault" 7 <polymer-element name="kb-keyset" attributes="nextKeyset isDefault"
8 on-key-up="{{keyUp}}" on-key-longpress="{{keyLongpress}}"> 8 on-key-up="{{keyUp}}" on-key-longpress="{{keyLongpress}}">
9 <template> 9 <template>
10 <style> 10 <style>
11 :host { 11 :host {
12 -webkit-box-flex: 1; 12 -webkit-box-flex: 1;
13 -webkit-box-orient: vertical; 13 -webkit-box-orient: vertical;
14 display: -webkit-box; 14 display: -webkit-box;
15 } 15 }
16 </style> 16 </style>
17 <content select="kb-row"></content> 17 <content select="kb-row"></content>
18 <content select="kb-altkey-container" id="altkeyContainer" 18 <content select="kb-altkey-container" id="altkeyContainer"
19 touch-action="none"></content> 19 touch-action="none"></content>
20 <kb-altkey-data id="altkeyMetadata"></kb-altkey-data> 20 <kb-altkey-data id="altkeyMetadata"></kb-altkey-data>
21 </template> 21 </template>
22 <script> 22 <script>
23 Polymer('kb-keyset', { 23 Polymer('kb-keyset', {
24 isDefault: false, 24 isDefault: false,
25 nextKeyset: undefined, 25 nextKeyset: undefined,
26 // TODO(bshe): support select keyset on down, long and dbl events. 26 // TODO(bshe): support select keyset on down, long and dbl events.
27 keyUp: function(event, detail) { 27 keyUp: function(event, detail) {
28 switch (detail.char) { 28 switch (detail.char) {
29 case 'Shift': 29 case 'Shift':
30 case 'Alt': 30 case 'Alt':
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 var leftOffset = activeAltKeySet.offset * event.target.clientWidth; 74 var leftOffset = activeAltKeySet.offset * event.target.clientWidth;
75 activeAltKeySet.style.left = event.target.offsetLeft - leftOffset + 75 activeAltKeySet.style.left = event.target.offsetLeft - leftOffset +
76 'px'; 76 'px';
77 var nodes = activeAltKeySet.childNodes; 77 var nodes = activeAltKeySet.childNodes;
78 nodes[activeAltKeySet.offset].classList.add('active'); 78 nodes[activeAltKeySet.offset].classList.add('active');
79 altkeyContainer.hidden = false; 79 altkeyContainer.hidden = false;
80 } 80 }
81 }); 81 });
82 </script> 82 </script>
83 </polymer-element> 83 </polymer-element>
OLDNEW
« no previous file with comments | « ui/keyboard/resources/elements/kb-key-base.html ('k') | ui/keyboard/resources/elements/kb-options-menu.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698