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

Side by Side Diff: chrome/browser/resources/pdf/pdf.js

Issue 888343003: Ctrl-G now selects page number in Material Design PDF Viewer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix underline margin on input Created 5 years, 10 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
« no previous file with comments | « chrome/browser/resources/pdf/elements/viewer-page-selector/viewer-page-selector.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 'use strict'; 5 'use strict';
6 6
7 /** 7 /**
8 * @return {number} Width of a scrollbar in pixels 8 * @return {number} Width of a scrollbar in pixels
9 */ 9 */
10 function getScrollbarWidth() { 10 function getScrollbarWidth() {
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 return; 284 return;
285 case 65: // a key. 285 case 65: // a key.
286 if (e.ctrlKey || e.metaKey) { 286 if (e.ctrlKey || e.metaKey) {
287 this.plugin_.postMessage({ 287 this.plugin_.postMessage({
288 type: 'selectAll' 288 type: 'selectAll'
289 }); 289 });
290 // Since we do selection ourselves. 290 // Since we do selection ourselves.
291 e.preventDefault(); 291 e.preventDefault();
292 } 292 }
293 return; 293 return;
294 case 71: // g key.
295 if (this.isMaterial_ && (e.ctrlKey || e.metaKey)) {
296 this.pageIndicator_.select();
297 // To prevent the default "find text" behaviour in Chrome.
298 e.preventDefault();
299 }
300 return;
294 case 80: // p key. 301 case 80: // p key.
295 if (e.ctrlKey || e.metaKey) { 302 if (e.ctrlKey || e.metaKey) {
296 this.print_(); 303 this.print_();
297 // Since we do the printing of the page. 304 // Since we do the printing of the page.
298 e.preventDefault(); 305 e.preventDefault();
299 } 306 }
300 return; 307 return;
301 case 219: // left bracket. 308 case 219: // left bracket.
302 if (e.ctrlKey) { 309 if (e.ctrlKey) {
303 this.plugin_.postMessage({ 310 this.plugin_.postMessage({
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 * Each bookmark is an Object containing a: 742 * Each bookmark is an Object containing a:
736 * - title 743 * - title
737 * - page (optional) 744 * - page (optional)
738 * - array of children (themselves bookmarks) 745 * - array of children (themselves bookmarks)
739 * @type {Array} the top-level bookmarks of the PDF. 746 * @type {Array} the top-level bookmarks of the PDF.
740 */ 747 */
741 get bookmarks() { 748 get bookmarks() {
742 return this.bookmarks_; 749 return this.bookmarks_;
743 } 750 }
744 }; 751 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/pdf/elements/viewer-page-selector/viewer-page-selector.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698