summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/HTMLAreaElement.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/html/HTMLAreaElement.h')
-rw-r--r--Source/WebCore/html/HTMLAreaElement.h39
1 files changed, 17 insertions, 22 deletions
diff --git a/Source/WebCore/html/HTMLAreaElement.h b/Source/WebCore/html/HTMLAreaElement.h
index ae6c2a8bb..92291930d 100644
--- a/Source/WebCore/html/HTMLAreaElement.h
+++ b/Source/WebCore/html/HTMLAreaElement.h
@@ -20,8 +20,7 @@
*
*/
-#ifndef HTMLAreaElement_h
-#define HTMLAreaElement_h
+#pragma once
#include "HTMLAnchorElement.h"
#include "LayoutRect.h"
@@ -29,50 +28,46 @@
namespace WebCore {
-class HitTestResult;
class HTMLImageElement;
+class HitTestResult;
class Path;
class HTMLAreaElement final : public HTMLAnchorElement {
public:
- static PassRefPtr<HTMLAreaElement> create(const QualifiedName&, Document&);
+ static Ref<HTMLAreaElement> create(const QualifiedName&, Document&);
bool isDefault() const { return m_shape == Default; }
bool mapMouseEvent(LayoutPoint location, const LayoutSize&, HitTestResult&);
- // FIXME: Use RenderElement* instead of RenderObject* once we upstream iOS's DOMUIKitExtensions.{h, mm}.
- LayoutRect computeRect(RenderObject*) const;
+ // FIXME: Use RenderElement& instead of RenderObject*.
+ WEBCORE_EXPORT LayoutRect computeRect(RenderObject*) const;
Path computePath(RenderObject*) const;
+ Path computePathForFocusRing(const LayoutSize& elementSize) const;
// The parent map's image.
- HTMLImageElement* imageElement() const;
+ WEBCORE_EXPORT HTMLImageElement* imageElement() const;
private:
HTMLAreaElement(const QualifiedName&, Document&);
- virtual void parseAttribute(const QualifiedName&, const AtomicString&) override;
- virtual bool supportsFocus() const override;
- virtual String target() const override;
- virtual bool isKeyboardFocusable(KeyboardEvent*) const override;
- virtual bool isMouseFocusable() const override;
- virtual bool isFocusable() const override;
- virtual void updateFocusAppearance(bool /*restorePreviousSelection*/) override;
- virtual void setFocus(bool) override;
+ void parseAttribute(const QualifiedName&, const AtomicString&) final;
+ bool supportsFocus() const final;
+ String target() const final;
+ bool isKeyboardFocusable(KeyboardEvent&) const final;
+ bool isMouseFocusable() const final;
+ bool isFocusable() const final;
+ void updateFocusAppearance(SelectionRestorationMode, SelectionRevealMode) final;
+ void setFocus(bool) final;
enum Shape { Default, Poly, Rect, Circle, Unknown };
Path getRegion(const LayoutSize&) const;
void invalidateCachedRegion();
- OwnPtr<Path> m_region;
- std::unique_ptr<Length[]> m_coords;
- int m_coordsLen;
+ std::unique_ptr<Path> m_region;
+ Vector<double> m_coords;
LayoutSize m_lastSize;
Shape m_shape;
};
-NODE_TYPE_CASTS(HTMLAreaElement)
-
} //namespace
-
-#endif