summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/HTMLAreaElement.h
diff options
context:
space:
mode:
authorsin-ack <sin-ack@users.noreply.github.com>2022-03-15 14:37:58 +0000
committerAndreas Kling <kling@serenityos.org>2022-03-26 14:01:17 +0100
commitaaa954f900816deb82d4b545bb6b8e28e7971432 (patch)
treeaaf0abd909f0f00a4be4fce8b11015608fa93297 /Userland/Libraries/LibWeb/HTML/HTMLAreaElement.h
parent034c57f1f9be60c08ad80b864e6c78d1d4e6de40 (diff)
downloadserenity-aaa954f900816deb82d4b545bb6b8e28e7971432.zip
LibWeb: Bring handling of anchor elements closer to spec
This commit moves the regular handling of links to the anchor elements' activation behavior, and implements a few auxiliary algorithms as defined by the HTML specification. Note that certain things such as javascript links, fragments and opening a new tab are still handled directly in EventHandler, but they have been moved to handle_mouseup so that it behaves closer to how it would if it was entirely up-to-spec.
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/HTMLAreaElement.h')
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLAreaElement.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLAreaElement.h b/Userland/Libraries/LibWeb/HTML/HTMLAreaElement.h
index df7a662d81..fecfb33af8 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLAreaElement.h
+++ b/Userland/Libraries/LibWeb/HTML/HTMLAreaElement.h
@@ -26,9 +26,16 @@ private:
virtual void parse_attribute(FlyString const& name, String const& value) override;
// ^HTML::HTMLHyperlinkElementUtils
- virtual DOM::Document const& hyperlink_element_utils_document() const override { return document(); }
+ virtual DOM::Document& hyperlink_element_utils_document() override { return document(); }
virtual String hyperlink_element_utils_href() const override;
virtual void set_hyperlink_element_utils_href(String) override;
+ virtual bool hyperlink_element_utils_is_html_anchor_element() const override { return false; }
+ virtual bool hyperlink_element_utils_is_connected() const override { return is_connected(); }
+ virtual String hyperlink_element_utils_target() const override { return ""; }
+ virtual void hyperlink_element_utils_queue_an_element_task(HTML::Task::Source source, Function<void()> steps) override
+ {
+ queue_an_element_task(source, move(steps));
+ }
};
}