mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-19 15:58:56 +00:00
Applications: Add a very simple PDFViewer
This commit is contained in:
parent
309105678b
commit
f7ea1eb610
Notes:
sideshowbarker
2024-07-18 17:51:04 +09:00
Author: https://github.com/mattco98
Commit: f7ea1eb610
Pull-request: https://github.com/SerenityOS/serenity/pull/7018
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/bcoles
Reviewed-by: https://github.com/tomuta
13 changed files with 264 additions and 18 deletions
|
@ -115,23 +115,6 @@ Value Document::resolve(const Value& value)
|
|||
return obj;
|
||||
}
|
||||
|
||||
template<IsValueType T>
|
||||
UnwrappedValueType<T> Document::resolve_to(const Value& value)
|
||||
{
|
||||
auto resolved = resolve(value);
|
||||
|
||||
if constexpr (IsSame<T, bool>)
|
||||
return resolved.as_bool();
|
||||
if constexpr (IsSame<T, int>)
|
||||
return resolved.as_int();
|
||||
if constexpr (IsSame<T, float>)
|
||||
return resolved.as_float();
|
||||
if constexpr (IsObject<T>)
|
||||
return object_cast<T>(resolved.as_object());
|
||||
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
void Document::build_page_tree()
|
||||
{
|
||||
auto page_tree = m_catalog->get_dict(this, "Pages");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue