mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Always traverse the entire parent chain in Page_getInheritedPageProp (issue 5954)
This enables us to find resources placed on multiple levels of the tree. Fixes 5954.
This commit is contained in:
parent
d3fa65e019
commit
a28ed7c834
5 changed files with 136 additions and 21 deletions
|
@ -213,6 +213,24 @@ var Dict = (function DictClosure() {
|
|||
|
||||
Dict.empty = new Dict(null);
|
||||
|
||||
Dict.merge = function Dict_merge(xref, dictArray) {
|
||||
var mergedDict = new Dict(xref);
|
||||
|
||||
for (var i = 0, ii = dictArray.length; i < ii; i++) {
|
||||
var dict = dictArray[i];
|
||||
if (!isDict(dict)) {
|
||||
continue;
|
||||
}
|
||||
for (var keyName in dict.map) {
|
||||
if (mergedDict.map[keyName]) {
|
||||
continue;
|
||||
}
|
||||
mergedDict.map[keyName] = dict.map[keyName];
|
||||
}
|
||||
}
|
||||
return mergedDict;
|
||||
};
|
||||
|
||||
return Dict;
|
||||
})();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue