Form-associated custom elements: Support the |anchor| argument of setValidity()

This CL follows the latest specification PR;

Add the |anchor| argument to setValidity().  ElementInternals has a data
member to store it.  ListedElement shows a validation bubble on
ValidationAnchor() result, which returns the data member if it's not
null, returns the target element otherwise.

Internals::isValidationMessageVisible() is updated so that it asks
ValidationMessageClient directly because we can show validation bubble
on any elements.

Bug: 905922
Change-Id: I20e1bdfeed6ab2635fd3f171e5160feeba170681
Commit-Queue: Kent Tamura <>
Reviewed-by: Hayato Ito <>
Cr-Commit-Position: refs/heads/master@{#661295}
11 files changed