[Webkit-unassigned] [Bug 223304] New: RenderImage::updateInnerContentRect() pays the cost of constructing a full image URL, but only SVG images need this
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Mar 16 21:48:02 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=223304
Bug ID: 223304
Summary: RenderImage::updateInnerContentRect() pays the cost of
constructing a full image URL, but only SVG images
need this
Product: WebKit
Version: Safari Technology Preview
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Images
Assignee: webkit-unassigned at lists.webkit.org
Reporter: simon.fraser at apple.com
RenderImage::updateInnerContentRect() does:
URL imageSourceURL;
if (HTMLImageElement* imageElement = is<HTMLImageElement>(element()) ? downcast<HTMLImageElement>(element()) : nullptr)
imageSourceURL = document().completeURL(imageElement->imageSourceURL());
imageResource().setContainerContext(containerSize, imageSourceURL);
but CachedImage::setContainerContextForClient() only uses the URL for SVG images.
We should avoid paying the cost when it's not needed. That cost is 0.1% on the MM leaves subtest.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210317/f79485e0/attachment-0001.htm>
More information about the webkit-unassigned
mailing list