mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-04 01:05:58 +03:00
8c79f0e0cf
Being both of them containers, these classes already offered a set of methods to retrieve an inner element by key or index, respectively, with different methods for the different subtypes of the PDF::Object type returning the element cast to the correct type pointer. On top of that, DictObject offered an additional method to obtain an element as an Object pointer. While these methods were useful, they have some shortcomings: * They always take a Document pointer to first perform an object resolution, in case the element is a Reference. This is not always necessary though, as there are values that are always meant to be immediate, and hence the resolution lookup adds overhead. * There was no easy way to get an individual Object element from an ArrayObject like there is in DictObject. This makes it difficult to obtain such values, as one first needs to call dict.get() to get a Value, then cast it manually to a NonnullRefPtr<Object>. This commit fixes these two issues by: * Adding a new method that returns an Object for a given index. * Adding overloads for this new method, and all the existing methods described above, that do *not* take a Document, and therefore do *not* perform an object resolution lookup. |
||
---|---|---|
.. | ||
Applets | ||
Applications | ||
BuggieBox | ||
Demos | ||
DevTools | ||
DynamicLoader | ||
Games | ||
Libraries | ||
Services | ||
Shell | ||
Utilities | ||
CMakeLists.txt |