diff options
author | FranklinDM <mrmineshafter17@gmail.com> | 2023-03-04 13:01:56 +0800 |
---|---|---|
committer | FranklinDM <mrmineshafter17@gmail.com> | 2023-03-04 21:32:14 +0800 |
commit | 7669ddb4b79c4c32db577a5a38b8c64c79488938 (patch) | |
tree | 9d6c752fc88ea958b030e51051a43b5fccb7369d /dom/html | |
parent | 8edbed37613362bc9310447d7f27ed803035650f (diff) | |
download | uxp-7669ddb4b79c4c32db577a5a38b8c64c79488938.tar.gz |
Issue #2135 - Bug 1518795: Properly track responsive content in a connected ShadowRoot
Diffstat (limited to 'dom/html')
-rw-r--r-- | dom/html/HTMLImageElement.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/dom/html/HTMLImageElement.cpp b/dom/html/HTMLImageElement.cpp index b11cd101a0..b697dcabea 100644 --- a/dom/html/HTMLImageElement.cpp +++ b/dom/html/HTMLImageElement.cpp @@ -623,8 +623,9 @@ HTMLImageElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent, } if (HaveSrcsetOrInPicture()) { - if (aDocument && !mInDocResponsiveContent) { - aDocument->AddResponsiveContent(this); + nsIDocument* doc = GetComposedDoc(); + if (doc && !mInDocResponsiveContent) { + doc->AddResponsiveContent(this); mInDocResponsiveContent = true; } |