#include "third_party/blink/renderer/core/html/image_document.h"
#include <limits>
#include "base/compiler_specific.h"
#include "base/containers/span.h"
#include "third_party/blink/public/platform/web_content_settings_client.h"
#include "third_party/blink/renderer/core/css/css_color.h"
#include "third_party/blink/renderer/core/dom/events/native_event_listener.h"
#include "third_party/blink/renderer/core/dom/raw_data_document_parser.h"
#include "third_party/blink/renderer/core/dom/shadow_root.h"
#include "third_party/blink/renderer/core/events/mouse_event.h"
#include "third_party/blink/renderer/core/events/touch_event.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/local_frame_client.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/frame/visual_viewport.h"
#include "third_party/blink/renderer/core/html/html_body_element.h"
#include "third_party/blink/renderer/core/html/html_div_element.h"
#include "third_party/blink/renderer/core/html/html_head_element.h"
#include "third_party/blink/renderer/core/html/html_html_element.h"
#include "third_party/blink/renderer/core/html/html_image_element.h"
#include "third_party/blink/renderer/core/html/html_meta_element.h"
#include "third_party/blink/renderer/core/html/html_slot_element.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/core/layout/layout_object.h"
#include "third_party/blink/renderer/core/loader/document_loader.h"
#include "third_party/blink/renderer/core/loader/frame_loader.h"
#include "third_party/blink/renderer/core/loader/resource/image_resource.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/paint_layer_scrollable_area.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
#include "third_party/blink/renderer/platform/wtf/casting.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
namespace blink {
class ImageEventListener : public NativeEventListener { … };
template <>
struct DowncastTraits<ImageEventListener> { … };
class ImageDocumentParser : public RawDataDocumentParser { … };
static String ImageTitle(const String& filename, const gfx::Size& size) { … }
void ImageDocumentParser::AppendBytes(base::span<const uint8_t> data) { … }
void ImageDocumentParser::Finish() { … }
ImageDocument::ImageDocument(const DocumentInit& initializer)
: … { … }
DocumentParser* ImageDocument::CreateParser() { … }
gfx::Size ImageDocument::ImageSize() const { … }
void ImageDocument::CreateDocumentStructure(
ImageResourceContent* image_content) { … }
void ImageDocument::UpdateTitle() { … }
float ImageDocument::Scale() const { … }
void ImageDocument::ResizeImageToFit() { … }
void ImageDocument::ImageClicked(int x, int y) { … }
void ImageDocument::ImageLoaded() { … }
ImageDocument::MouseCursorMode ImageDocument::ComputeMouseCursorMode() const { … }
void ImageDocument::UpdateImageStyle() { … }
void ImageDocument::ImageUpdated() { … }
void ImageDocument::RestoreImageSize() { … }
bool ImageDocument::ImageFitsInWindow() const { … }
int ImageDocument::CalculateDivWidth() { … }
void ImageDocument::WindowSizeChanged() { … }
ImageResourceContent* ImageDocument::CachedImage() { … }
bool ImageDocument::ShouldShrinkToFit() const { … }
void ImageDocument::Trace(Visitor* visitor) const { … }
void ImageEventListener::Invoke(ExecutionContext*, Event* event) { … }
bool ImageEventListener::Matches(const EventListener& listener) const { … }
}