From 1858de467c276eb8446895a755857e97ab22d4d5 Mon Sep 17 00:00:00 2001 From: Dominic Farolino Date: Thu, 31 May 2018 10:08:21 -0700 Subject: [PATCH 1/8] Initial text Addressed Domenic's comments" Various nits and cleanups: - Remove "lazyload hint" concept and refer instead to states of the attribute directly - IDL attribute casing should be lazyLoad, not lazyload - Be a bit more precise in the iframe processing model - Remove domintro for reflecting attributes (both this one and the one added for img.decoding, erroneously) Updated metadata fetch algorithm Addressed comments Referred to add a range header Addressed nit Source formatting nits Added info about how to handle range response Addressed some comments from domenic Addressed remaining comments from domenic and others Addressed more comments from Domenic Editorial tweaks Avoid potential race condition by saving corsState and origin Have an explicit "el" variable Previously it was sometimes implicit, sometimes "the img element", sometimes "the element"... DRY up the code a bit with a "document" variable Since a document's origin can never change, this is safe to do. Upon re-reading, moving this sentence up seems clearer Changed to load=lazy|eager|auto Wait for the element to be in the active document. Attribute renamed as 'loading' and added intersection observer algo Addressed more comments Images created by the NamedConstructor should be eager by default Yank 'fetch image metadata' + small fixes Revert 'Images created by the NamedConstructor should be eager by default' Properly link to IntersectionObserver Always invoke updating-the-image-data algorithm This commit removes the option to defer updating-the-image-data based on the loading attribute's state, and instead invokes it unconditionally. Then, instide the updating-the-image-data algorithm, the UA can optionally continue fetching the image normally, or wait until the image intersects with the viewport, or the loading attribute changes values. Add privacy fingerprinting notes + remove superfluous link Small fixes Move deferral of image loading after request is made Editorial: Attempt to fix Travis build updating-the-image-data should not await a stable state Rebase * Updating-the-image-data cannot be called while in-parallel Fix rebase mistake (loadstart event) Refactor lazy loading conditions for images Limit invocations of compute the intersection Remove the