#include "third_party/blink/renderer/core/html/html_image_element.h"
#include "third_party/blink/public/common/loader/lcp_critical_path_predictor_util.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_image_bitmap_options.h"
#include "third_party/blink/renderer/core/css/css_property_names.h"
#include "third_party/blink/renderer/core/css/css_property_value_set.h"
#include "third_party/blink/renderer/core/css/media_query_matcher.h"
#include "third_party/blink/renderer/core/css/media_values_dynamic.h"
#include "third_party/blink/renderer/core/css/parser/sizes_attribute_parser.h"
#include "third_party/blink/renderer/core/css/style_change_reason.h"
#include "third_party/blink/renderer/core/dom/attribute.h"
#include "third_party/blink/renderer/core/dom/dom_exception.h"
#include "third_party/blink/renderer/core/dom/events/event_dispatch_forbidden_scope.h"
#include "third_party/blink/renderer/core/dom/node_traversal.h"
#include "third_party/blink/renderer/core/dom/shadow_root.h"
#include "third_party/blink/renderer/core/frame/attribution_src_loader.h"
#include "third_party/blink/renderer/core/frame/deprecation/deprecation.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame_client.h"
#include "third_party/blink/renderer/core/html/canvas/html_canvas_element.h"
#include "third_party/blink/renderer/core/html/cross_origin_attribute.h"
#include "third_party/blink/renderer/core/html/forms/form_associated.h"
#include "third_party/blink/renderer/core/html/forms/html_form_element.h"
#include "third_party/blink/renderer/core/html/html_dimension.h"
#include "third_party/blink/renderer/core/html/html_image_fallback_helper.h"
#include "third_party/blink/renderer/core/html/html_picture_element.h"
#include "third_party/blink/renderer/core/html/html_source_element.h"
#include "third_party/blink/renderer/core/html/loading_attribute.h"
#include "third_party/blink/renderer/core/html/parser/html_parser_idioms.h"
#include "third_party/blink/renderer/core/html/parser/html_srcset_parser.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/core/imagebitmap/image_bitmap.h"
#include "third_party/blink/renderer/core/inspector/console_message.h"
#include "third_party/blink/renderer/core/layout/adjust_for_absolute_zoom.h"
#include "third_party/blink/renderer/core/layout/layout_block_flow.h"
#include "third_party/blink/renderer/core/layout/layout_image.h"
#include "third_party/blink/renderer/core/lcp_critical_path_predictor/element_locator.h"
#include "third_party/blink/renderer/core/lcp_critical_path_predictor/lcp_critical_path_predictor.h"
#include "third_party/blink/renderer/core/loader/resource/image_resource_content.h"
#include "third_party/blink/renderer/core/media_type_names.h"
#include "third_party/blink/renderer/core/page/chrome_client.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/core/paint/timing/paint_timing.h"
#include "third_party/blink/renderer/core/probe/core_probes.h"
#include "third_party/blink/renderer/core/resize_observer/resize_observer_entry.h"
#include "third_party/blink/renderer/core/style/content_data.h"
#include "third_party/blink/renderer/core/svg/graphics/svg_image_for_container.h"
#include "third_party/blink/renderer/platform/network/mime/content_type.h"
#include "third_party/blink/renderer/platform/network/mime/mime_type_registry.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/weborigin/security_policy.h"
namespace blink {
class HTMLImageElement::ViewportChangeListener final
: public MediaQueryListListener { … };
HTMLImageElement::HTMLImageElement(Document& document,
const CreateElementFlags flags)
: … { … }
HTMLImageElement::HTMLImageElement(Document& document, bool created_by_parser)
: … { … }
HTMLImageElement::~HTMLImageElement() = default;
void HTMLImageElement::Trace(Visitor* visitor) const { … }
void HTMLImageElement::NotifyViewportChanged() { … }
HTMLImageElement* HTMLImageElement::CreateForJSConstructor(Document& document) { … }
HTMLImageElement* HTMLImageElement::CreateForJSConstructor(Document& document,
unsigned width) { … }
HTMLImageElement* HTMLImageElement::CreateForJSConstructor(Document& document,
unsigned width,
unsigned height) { … }
bool HTMLImageElement::IsPresentationAttribute(
const QualifiedName& name) const { … }
void HTMLImageElement::CollectStyleForPresentationAttribute(
const QualifiedName& name,
const AtomicString& value,
MutableCSSPropertyValueSet* style) { … }
void HTMLImageElement::CollectExtraStyleForPresentationAttribute(
MutableCSSPropertyValueSet* style) { … }
const AtomicString HTMLImageElement::ImageSourceURL() const { … }
HTMLFormElement* HTMLImageElement::formOwner() const { … }
void HTMLImageElement::FormRemovedFromTree(const Node& form_root) { … }
void HTMLImageElement::ResetFormOwner() { … }
void HTMLImageElement::SetBestFitURLAndDPRFromImageCandidate(
const ImageCandidate& candidate) { … }
void HTMLImageElement::ParseAttribute(
const AttributeModificationParams& params) { … }
String HTMLImageElement::AltText() const { … }
void HTMLImageElement::InvalidateAttributeMapping() { … }
bool HTMLImageElement::SupportedImageType(
const String& type,
const HashSet<String>* disabled_image_types) { … }
bool HTMLImageElement::HasLazyLoadingAttribute() const { … }
bool HTMLImageElement::HasSizesAttribute() const { … }
ImageCandidate HTMLImageElement::FindBestFitImageFromPictureParent() { … }
LayoutObject* HTMLImageElement::CreateLayoutObject(const ComputedStyle& style) { … }
void HTMLImageElement::AttachLayoutTree(AttachContext& context) { … }
Node::InsertionNotificationRequest HTMLImageElement::InsertedInto(
ContainerNode& insertion_point) { … }
void HTMLImageElement::RemovedFrom(ContainerNode& insertion_point) { … }
unsigned HTMLImageElement::width() { … }
unsigned HTMLImageElement::height() { … }
PhysicalSize HTMLImageElement::DensityCorrectedIntrinsicDimensions() const { … }
unsigned HTMLImageElement::naturalWidth() const { … }
unsigned HTMLImageElement::naturalHeight() const { … }
unsigned HTMLImageElement::LayoutBoxWidth() const { … }
unsigned HTMLImageElement::LayoutBoxHeight() const { … }
bool HTMLImageElement::IsBeingRendered() const { … }
bool HTMLImageElement::AllowAutoSizes() const { … }
const String& HTMLImageElement::currentSrc() const { … }
bool HTMLImageElement::IsURLAttribute(const Attribute& attribute) const { … }
bool HTMLImageElement::HasLegalLinkAttribute(const QualifiedName& name) const { … }
void HTMLImageElement::SetIsAdRelated() { … }
void HTMLImageElement::DidFinishLifecycleUpdate(
const LocalFrameView& local_frame_view) { … }
bool HTMLImageElement::draggable() const { … }
void HTMLImageElement::setHeight(unsigned value) { … }
void HTMLImageElement::setWidth(unsigned value) { … }
int HTMLImageElement::x() const { … }
int HTMLImageElement::y() const { … }
ScriptPromise<IDLUndefined> HTMLImageElement::decode(
ScriptState* script_state,
ExceptionState& exception_state) { … }
bool HTMLImageElement::complete() const { … }
void HTMLImageElement::OnResize() { … }
void HTMLImageElement::DidMoveToNewDocument(Document& old_document) { … }
bool HTMLImageElement::IsServerMap() const { … }
Image* HTMLImageElement::ImageContents() { … }
bool HTMLImageElement::IsInteractiveContent() const { … }
gfx::SizeF HTMLImageElement::DefaultDestinationSize(
const gfx::SizeF& default_object_size,
const RespectImageOrientationEnum respect_orientation) const { … }
struct SourceSizeValueResult { … };
static SourceSizeValueResult SourceSizeValue(const Element* element,
Document& current_document) { … }
std::optional<float> HTMLImageElement::GetResourceWidth() const { … }
float HTMLImageElement::SourceSize(Element& element) { … }
void HTMLImageElement::ForceReload() const { … }
void HTMLImageElement::SelectSourceURL(
ImageLoader::UpdateFromElementBehavior behavior) { … }
void HTMLImageElement::StartLoadingImageDocument(
ImageResourceContent* image_content) { … }
void HTMLImageElement::DidAddUserAgentShadowRoot(ShadowRoot&) { … }
void HTMLImageElement::EnsureFallbackForGeneratedContent() { … }
void HTMLImageElement::EnsureCollapsedOrFallbackContent() { … }
void HTMLImageElement::EnsurePrimaryContent() { … }
bool HTMLImageElement::IsCollapsed() const { … }
void HTMLImageElement::SetAutoSizesUsecounter() { … }
void HTMLImageElement::SetLayoutDisposition(
LayoutDisposition layout_disposition,
bool force_reattach) { … }
void HTMLImageElement::AdjustStyle(ComputedStyleBuilder& builder) { … }
void HTMLImageElement::AssociateWith(HTMLFormElement* form) { … }
}