Title: [284148] trunk/Source/WebCore
- Revision
- 284148
- Author
- [email protected]
- Date
- 2021-10-13 22:29:16 -0700 (Wed, 13 Oct 2021)
Log Message
Determine viewport distances for lazy image loading
https://bugs.webkit.org/show_bug.cgi?id=203557
Patch by Rob Buis <[email protected]> on 2021-10-13
Reviewed by Simon Fraser.
Determine appropriate lazy image loading viewport distances
for desktop and mobile devices by using a lazy load distance
of one viewport in all directions.
* html/LazyLoadImageObserver.cpp:
(WebCore::LazyLoadImageObserver::intersectionObserver):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (284147 => 284148)
--- trunk/Source/WebCore/ChangeLog 2021-10-14 05:14:32 UTC (rev 284147)
+++ trunk/Source/WebCore/ChangeLog 2021-10-14 05:29:16 UTC (rev 284148)
@@ -1,3 +1,17 @@
+2021-10-13 Rob Buis <[email protected]>
+
+ Determine viewport distances for lazy image loading
+ https://bugs.webkit.org/show_bug.cgi?id=203557
+
+ Reviewed by Simon Fraser.
+
+ Determine appropriate lazy image loading viewport distances
+ for desktop and mobile devices by using a lazy load distance
+ of one viewport in all directions.
+
+ * html/LazyLoadImageObserver.cpp:
+ (WebCore::LazyLoadImageObserver::intersectionObserver):
+
2021-10-13 Jean-Yves Avenard <[email protected]>
Compilation error: error: definition of implicit copy assignment operator in AppHighlightRangeData.h
Modified: trunk/Source/WebCore/html/LazyLoadImageObserver.cpp (284147 => 284148)
--- trunk/Source/WebCore/html/LazyLoadImageObserver.cpp 2021-10-14 05:14:32 UTC (rev 284147)
+++ trunk/Source/WebCore/html/LazyLoadImageObserver.cpp 2021-10-14 05:29:16 UTC (rev 284148)
@@ -29,7 +29,6 @@
#include "Frame.h"
#include "HTMLImageElement.h"
#include "IntersectionObserverCallback.h"
-#include "RenderStyle.h"
#include <limits>
@@ -86,7 +85,8 @@
{
if (!m_observer) {
auto callback = LazyImageLoadIntersectionObserverCallback::create(document);
- IntersectionObserver::Init options { std::nullopt, emptyString(), { } };
+ static NeverDestroyed<const String> lazyLoadingRootMarginFallback(MAKE_STATIC_STRING_IMPL("100%"));
+ IntersectionObserver::Init options { std::nullopt, lazyLoadingRootMarginFallback, { } };
auto observer = IntersectionObserver::create(document, WTFMove(callback), WTFMove(options));
if (observer.hasException())
return nullptr;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes