mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Remove the getPageProp
method in src/core/document.js
It's only used in two places in the class and those callsites can directly get the information from the dictionary, which is more readable and avoids an additional method call.
This commit is contained in:
parent
c33bf800cc
commit
4e5eb59a33
1 changed files with 2 additions and 6 deletions
|
@ -62,10 +62,6 @@ var Page = (function PageClosure() {
|
|||
}
|
||||
|
||||
Page.prototype = {
|
||||
getPageProp: function Page_getPageProp(key) {
|
||||
return this.pageDict.get(key);
|
||||
},
|
||||
|
||||
getInheritedPageProp: function Page_getInheritedPageProp(key, getArray) {
|
||||
var dict = this.pageDict, valueArray = null, loopCount = 0;
|
||||
var MAX_LOOP_COUNT = 100;
|
||||
|
@ -96,7 +92,7 @@ var Page = (function PageClosure() {
|
|||
},
|
||||
|
||||
get content() {
|
||||
return this.getPageProp('Contents');
|
||||
return this.pageDict.get('Contents');
|
||||
},
|
||||
|
||||
get resources() {
|
||||
|
@ -126,7 +122,7 @@ var Page = (function PageClosure() {
|
|||
},
|
||||
|
||||
get userUnit() {
|
||||
var obj = this.getPageProp('UserUnit');
|
||||
var obj = this.pageDict.get('UserUnit');
|
||||
if (!isNum(obj) || obj <= 0) {
|
||||
obj = DEFAULT_USER_UNIT;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue