1
0
Fork 0
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:
Jonas Jenwald 2015-05-20 15:08:55 +02:00
parent d3fa65e019
commit a28ed7c834
5 changed files with 136 additions and 21 deletions

View file

@ -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;
})();