Bug 1518795 - Properly track responsive content in a connected ShadowRoot. r=smaug
Took more to write the test than the fix :) Differential Revision: https://phabricator.services.mozilla.com/D16055
This commit is contained in:
@@ -500,8 +500,9 @@ nsresult HTMLImageElement::BindToTree(Document* aDocument, nsIContent* aParent,
|
||||
}
|
||||
|
||||
if (HaveSrcsetOrInPicture()) {
|
||||
if (aDocument && !mInDocResponsiveContent) {
|
||||
aDocument->AddResponsiveContent(this);
|
||||
Document* doc = GetComposedDoc();
|
||||
if (doc && !mInDocResponsiveContent) {
|
||||
doc->AddResponsiveContent(this);
|
||||
mInDocResponsiveContent = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user