mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-29 10:32:23 +00:00
HTML - picture - does not react to resize/viewport changes
This commit is contained in:
@@ -10547,6 +10547,38 @@ nsDocument::GetPlugins(nsTArray<nsIObjectLoadingContent*>& aPlugins)
|
||||
EnumerateSubDocuments(AllSubDocumentPluginEnum, &aPlugins);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsDocument::AddResponsiveContent(nsIContent* aContent)
|
||||
{
|
||||
MOZ_ASSERT(aContent);
|
||||
MOZ_ASSERT(aContent->IsHTML(nsGkAtoms::img));
|
||||
mResponsiveContent.PutEntry(aContent);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
nsDocument::RemoveResponsiveContent(nsIContent* aContent)
|
||||
{
|
||||
MOZ_ASSERT(aContent);
|
||||
mResponsiveContent.RemoveEntry(aContent);
|
||||
}
|
||||
|
||||
static PLDHashOperator
|
||||
NotifyMediaFeatureEnum(nsPtrHashKey<nsIContent>* aContent, void* userArg)
|
||||
{
|
||||
nsCOMPtr<nsIContent> content = aContent->GetKey();
|
||||
if (content->IsHTML(nsGkAtoms::img)) {
|
||||
static_cast<HTMLImageElement*>(content.get())->MediaFeatureValuesChanged();
|
||||
}
|
||||
return PL_DHASH_NEXT;
|
||||
}
|
||||
|
||||
void
|
||||
nsDocument::NotifyMediaFeatureValuesChanged()
|
||||
{
|
||||
mResponsiveContent.EnumerateEntries(NotifyMediaFeatureEnum, nullptr);
|
||||
}
|
||||
|
||||
PLDHashOperator LockEnumerator(imgIRequest* aKey,
|
||||
uint32_t aData,
|
||||
void* userArg)
|
||||
|
||||
Reference in New Issue
Block a user