Issue #2732 - Part 2: Stop accepting <a> as a valid image map <area>

This was part of the HTML4 standard but only ever implemented by Mozilla
and removed again in HTML5 due to lack of adoption. Retaining this could
cause web compat issues and unspecified behavior in the layout engine.
This commit is contained in:
Moonchild 2025-04-24 15:43:32 +02:00 • committed by roytam1
commit 9f64d0f4b0
2 changed files with 34 additions and 41 deletions

View file

@ -21,6 +21,12 @@ class nsIFrame;
class nsIContent;
struct nsRect;
namespace mozilla {
namespace dom {
class HTMLAreaElement;
}
}
class nsImageMap final : public nsStubMutationObserver,
public nsIDOMEventListener
{
@ -81,10 +87,9 @@ protected:
void FreeAreas();
nsresult UpdateAreas();
nsresult SearchForAreas(nsIContent* aParent, bool& aFoundArea,
bool& aFoundAnchor);
nsresult SearchForAreas(nsIContent* aParent);
nsresult AddArea(nsIContent* aArea);
nsresult AddArea(mozilla::dom::HTMLAreaElement* aArea);
void MaybeUpdateAreas(nsIContent *aContent);