WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
176204
Implement the attribute HTMLImageElement.async
https://bugs.webkit.org/show_bug.cgi?id=176204
Summary
Implement the attribute HTMLImageElement.async
Said Abou-Hallawa
Reported
2017-08-31 17:30:07 PDT
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.
Attachments
Patch
(6.60 KB, patch)
2017-08-31 17:35 PDT
,
Said Abou-Hallawa
no flags
Details
Formatted Diff
Diff
Patch
(5.26 KB, patch)
2017-09-08 16:04 PDT
,
Said Abou-Hallawa
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Said Abou-Hallawa
Comment 1
2017-08-31 17:35:59 PDT
Created
attachment 319554
[details]
Patch
Said Abou-Hallawa
Comment 2
2017-08-31 17:39:34 PDT
<
rdar://problem/34107641
>
Darin Adler
Comment 3
2017-09-03 17:24:38 PDT
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))
Said Abou-Hallawa
Comment 4
2017-09-08 16:04:53 PDT
Created
attachment 320312
[details]
Patch
WebKit Commit Bot
Comment 5
2017-09-08 17:10:48 PDT
Comment on
attachment 320312
[details]
Patch Clearing flags on attachment: 320312 Committed
r221803
: <
http://trac.webkit.org/changeset/221803
>
WebKit Commit Bot
Comment 6
2017-09-08 17:10:49 PDT
All reviewed patches have been landed. Closing bug.
Simon Fraser (smfr)
Comment 7
2017-11-08 10:51:22 PST
Followup to support the on/off syntax: 179432
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug