| Index: third_party/WebKit/Source/core/html/HTMLImageElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLImageElement.cpp b/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
|
| index 084a218f6f639cecbb74e2f0ce0e10f58914ff6e..2516ceb54b759d8686dda45e2b45a4d1f8298a59 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
|
| @@ -98,7 +98,7 @@ HTMLImageElement::HTMLImageElement(Document& document, HTMLFormElement* form, bo
|
| , m_referrerPolicy(ReferrerPolicyDefault)
|
| {
|
| setHasCustomStyleCallbacks();
|
| - if (form && form->inDocument()) {
|
| + if (form && form->inShadowIncludingDocument()) {
|
| #if ENABLE(OILPAN)
|
| m_form = form;
|
| #else
|
| @@ -411,7 +411,7 @@ Node::InsertionNotificationRequest HTMLImageElement::insertedInto(ContainerNode*
|
|
|
| // If we have been inserted from a layoutObject-less document,
|
| // our loader may have not fetched the image, so do it now.
|
| - if ((insertionPoint->inDocument() && !imageLoader().image()) || imageWasModified)
|
| + if ((insertionPoint->inShadowIncludingDocument() && !imageLoader().image()) || imageWasModified)
|
| imageLoader().updateFromElement(ImageLoader::UpdateNormal, m_referrerPolicy);
|
|
|
| return HTMLElement::insertedInto(insertionPoint);
|
|
|