HTMLAnchorElement.h [plain text]
#ifndef HTMLAnchorElement_h
#define HTMLAnchorElement_h
#include "HTMLElement.h"
namespace WebCore {
enum {
RelationNoReferrer = 0x00001000,
};
class HTMLAnchorElement : public HTMLElement {
public:
static PassRefPtr<HTMLAnchorElement> create(Document*);
static PassRefPtr<HTMLAnchorElement> create(const QualifiedName&, Document*);
KURL href() const;
void setHref(const AtomicString&);
const AtomicString& name() const;
String hash() const;
void setHash(const String&);
String host() const;
void setHost(const String&);
String hostname() const;
void setHostname(const String&);
String pathname() const;
void setPathname(const String&);
String port() const;
void setPort(const String&);
String protocol() const;
void setProtocol(const String&);
String search() const;
void setSearch(const String&);
String origin() const;
String getParameter(const String&) const;
String text() const;
String toString() const;
bool isLiveLink() const;
virtual bool willRespondToMouseClickEvents();
bool hasRel(uint32_t relation) const;
void setRel(const String&);
protected:
HTMLAnchorElement(const QualifiedName&, Document*);
virtual void parseMappedAttribute(Attribute*);
private:
virtual bool supportsFocus() const;
virtual bool isMouseFocusable() const;
virtual bool isKeyboardFocusable(KeyboardEvent*) const;
virtual void defaultEventHandler(Event*);
virtual void setActive(bool active = true, bool pause = false);
virtual void accessKeyAction(bool fullAction);
virtual bool isURLAttribute(Attribute*) const;
virtual bool canStartSelection() const;
virtual String target() const;
virtual short tabIndex() const;
virtual bool draggable() const;
void sendPings(const KURL& destinationURL);
enum EventType {
MouseEventWithoutShiftKey,
MouseEventWithShiftKey,
NonMouseEvent,
};
static EventType eventType(Event*);
bool treatLinkAsLiveForEventType(EventType) const;
RefPtr<Element> m_rootEditableElementForSelectionOnMouseDown;
bool m_wasShiftKeyDownOnMouseDown;
uint32_t m_linkRelations;
};
bool isEnterKeyKeydownEvent(Event*);
bool isMiddleMouseButtonEvent(Event*);
bool isLinkClick(Event*);
void handleLinkClick(Event*, Document*, const String& url, const String& target, bool hideReferrer = false);
}
#endif // HTMLAnchorElement_h