This will force async decoding for this image all the times regardless weather the image is large or not. Async decoding will be forced even if it causes the image to flicker momentarily.
Created attachment 319554 [details] Patch
<rdar://problem/34107641>
Comment on attachment 319554 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=319554&action=review > Source/WebCore/html/HTMLImageElement.cpp:227 > - } else { > + } else if (name == asyncAttr) > + m_async = !value.isNull(); This code isn’t needed. There is no need to store a boolean in a data member just so we can ask the question of an HTMLImageElement. We can find out the correct value at any time by calling hasAttribute(asyncAttr). > Source/WebCore/html/HTMLImageElement.h:82 > + bool async() const { return m_async; } This function isn’t needed. [Reflect] can answer this question without adding a function, and the one caller can just call hasAttribute(asyncAttr). > Source/WebCore/html/HTMLImageElement.h:146 > + bool m_async { false }; This data member isn’t needed. > Source/WebCore/rendering/RenderBoxModelObject.cpp:330 > + if (is<HTMLImageElement>(element()) && downcast<HTMLImageElement>(*element()).async()) Here we can just write: if (is<HTMLImageElement>(element()) && element()->hasAttribute(asyncAttr))
Created attachment 320312 [details] Patch
Comment on attachment 320312 [details] Patch Clearing flags on attachment: 320312 Committed r221803: <http://trac.webkit.org/changeset/221803>
All reviewed patches have been landed. Closing bug.
Followup to support the on/off syntax: 179432