diff options
author | Andreas Kling <kling@serenityos.org> | 2020-06-01 21:33:23 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-06-01 21:36:43 +0200 |
commit | 5ed66cb8d974c2254e1ea67046b690e414851df3 (patch) | |
tree | 1c22433c2311fde15714358658571886946d3887 /Libraries/LibWeb/CMakeLists.txt | |
parent | 7be9cf8d36c42a8ef9e96f0750554e8aa811d9c0 (diff) | |
download | serenity-5ed66cb8d974c2254e1ea67046b690e414851df3.zip |
LibWeb: Start building a new Resource class to share more resources
A Resource represents a resource that we're loading, have loaded or
will soon load. Basically, it's a downloadable resource that can be
shared by multiple clients.
A typical usecase is multiple <img> elements with the same src.
In a future patch, we will try to make sure that those <img> elements
get the same Resource if possible. This will reduce network usage,
memory usage, and CPU usage. :^)
For now, this first patch simply introduces the mechanism.
You get a Resource by calling ResourceLoader::load_resource().
To get notified about changes to a Resource's load status, you inherit
from ResourceClient and implement the callbacks you're interested in.
This patch turns HTMLImageElement into a ResourceClient.
Diffstat (limited to 'Libraries/LibWeb/CMakeLists.txt')
-rw-r--r-- | Libraries/LibWeb/CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Libraries/LibWeb/CMakeLists.txt b/Libraries/LibWeb/CMakeLists.txt index 1474207ce1..92adb508df 100644 --- a/Libraries/LibWeb/CMakeLists.txt +++ b/Libraries/LibWeb/CMakeLists.txt @@ -83,6 +83,7 @@ set(SOURCES Layout/LayoutWidget.cpp Layout/LineBox.cpp Layout/LineBoxFragment.cpp + Loader/Resource.cpp Loader/ResourceLoader.cpp PageView.cpp Parser/CSSParser.cpp |