[webkit-reviews] review granted: [Bug 221236] Introduce image overlays and add UA shadow root support for image extraction : [Attachment 419426] Fix title
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Feb 5 21:23:43 PST 2021
Ryosuke Niwa <rniwa at webkit.org> has granted Wenson Hsieh
<wenson_hsieh at apple.com>'s request for review:
Bug 221236: Introduce image overlays and add UA shadow root support for image
extraction
https://bugs.webkit.org/show_bug.cgi?id=221236
Attachment 419426: Fix title
https://bugs.webkit.org/attachment.cgi?id=419426&action=review
--- Comment #19 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 419426
--> https://bugs.webkit.org/attachment.cgi?id=419426
Fix title
View in context: https://bugs.webkit.org/attachment.cgi?id=419426&action=review
> Source/WebCore/html/HTMLImageElement.cpp:827
> +bool HTMLImageElement::hasOverlay() const
> +{
Don't we need to have this on HTMLPlugInImageElement too so that this will also
work on object element?
> Source/WebCore/html/HTMLImageElement.cpp:832
> + for (auto child = makeRefPtr(shadowRoot->firstChild()); child; child =
child->nextSibling()) {
Use childrenOfType<Element>?
> Source/WebCore/html/HTMLImageElement.cpp:878
> + container->appendChild(child);
It's more efficient to build tree bottom up so do this before appending
children to child.
> Source/WebCore/html/HTMLImageElement.cpp:898
> + if (auto* frame = document().frame())
Please use makeRefPtr here.
> Source/WebCore/html/shadow/imageOverlay.css:25
> +div#image-overlay {
img element is display: inline by default. div is display: block by default.
Don't we want this to be inline-block?
More information about the webkit-reviews
mailing list