summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/HitTestResult.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/rendering/HitTestResult.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/rendering/HitTestResult.h')
-rw-r--r--Source/WebCore/rendering/HitTestResult.h94
1 files changed, 50 insertions, 44 deletions
diff --git a/Source/WebCore/rendering/HitTestResult.h b/Source/WebCore/rendering/HitTestResult.h
index 4d728a722..beedf8b51 100644
--- a/Source/WebCore/rendering/HitTestResult.h
+++ b/Source/WebCore/rendering/HitTestResult.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Apple Computer, Inc.
+ * Copyright (C) 2006 Apple Inc.
* Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
*
* This library is free software; you can redistribute it and/or
@@ -19,54 +19,51 @@
*
*/
-#ifndef HitTestResult_h
-#define HitTestResult_h
+#pragma once
#include "FloatQuad.h"
#include "FloatRect.h"
#include "HitTestLocation.h"
#include "HitTestRequest.h"
#include "LayoutRect.h"
-#include "TextDirection.h"
+#include "TextFlags.h"
+#include <memory>
#include <wtf/Forward.h>
#include <wtf/ListHashSet.h>
-#include <wtf/OwnPtr.h>
#include <wtf/RefPtr.h>
namespace WebCore {
class Element;
class Frame;
-#if ENABLE(VIDEO)
class HTMLMediaElement;
-#endif
class Image;
-class URL;
class Node;
-class RenderRegion;
class Scrollbar;
+class URL;
class HitTestResult {
public:
typedef ListHashSet<RefPtr<Node>> NodeSet;
- HitTestResult();
- explicit HitTestResult(const LayoutPoint&);
+ WEBCORE_EXPORT HitTestResult();
+ WEBCORE_EXPORT explicit HitTestResult(const LayoutPoint&);
// Pass non-negative padding values to perform a rect-based hit test.
- HitTestResult(const LayoutPoint& centerPoint, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding);
- explicit HitTestResult(const HitTestLocation&);
- HitTestResult(const HitTestResult&);
- ~HitTestResult();
- HitTestResult& operator=(const HitTestResult&);
+ WEBCORE_EXPORT HitTestResult(const LayoutPoint& centerPoint, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding);
+ WEBCORE_EXPORT explicit HitTestResult(const HitTestLocation&);
+ WEBCORE_EXPORT HitTestResult(const HitTestResult&);
+ WEBCORE_EXPORT ~HitTestResult();
+ WEBCORE_EXPORT HitTestResult& operator=(const HitTestResult&);
Node* innerNode() const { return m_innerNode.get(); }
- Element* innerElement() const;
Node* innerNonSharedNode() const { return m_innerNonSharedNode.get(); }
- Element* innerNonSharedElement() const;
+ WEBCORE_EXPORT Element* innerNonSharedElement() const;
Element* URLElement() const { return m_innerURLElement.get(); }
Scrollbar* scrollbar() const { return m_scrollbar.get(); }
bool isOverWidget() const { return m_isOverWidget; }
+ WEBCORE_EXPORT const AtomicString& URLElementDownloadAttribute() const;
+
// Forwarded from HitTestLocation
bool isRectBasedTest() const { return m_hitTestLocation.isRectBasedTest(); }
@@ -77,43 +74,46 @@ public:
// The hit-tested point in the coordinates of the innerNode frame, the frame containing innerNode.
const LayoutPoint& pointInInnerNodeFrame() const { return m_pointInInnerNodeFrame; }
IntPoint roundedPointInInnerNodeFrame() const { return roundedIntPoint(pointInInnerNodeFrame()); }
- Frame* innerNodeFrame() const;
+ WEBCORE_EXPORT Frame* innerNodeFrame() const;
// The hit-tested point in the coordinates of the inner node.
const LayoutPoint& localPoint() const { return m_localPoint; }
void setLocalPoint(const LayoutPoint& p) { m_localPoint = p; }
- void setToNonShadowAncestor();
+ void setToNonUserAgentShadowAncestor();
const HitTestLocation& hitTestLocation() const { return m_hitTestLocation; }
- void setInnerNode(Node*);
+ WEBCORE_EXPORT void setInnerNode(Node*);
void setInnerNonSharedNode(Node*);
void setURLElement(Element*);
void setScrollbar(Scrollbar*);
void setIsOverWidget(bool b) { m_isOverWidget = b; }
- Frame* targetFrame() const;
- bool isSelected() const;
- String spellingToolTip(TextDirection&) const;
+ WEBCORE_EXPORT Frame* targetFrame() const;
+ WEBCORE_EXPORT bool isSelected() const;
+ WEBCORE_EXPORT String selectedText() const;
+ WEBCORE_EXPORT String spellingToolTip(TextDirection&) const;
String replacedString() const;
- String title(TextDirection&) const;
+ WEBCORE_EXPORT String title(TextDirection&) const;
String innerTextIfTruncated(TextDirection&) const;
- String altDisplayString() const;
- String titleDisplayString() const;
- Image* image() const;
- IntRect imageRect() const;
- URL absoluteImageURL() const;
- URL absolutePDFURL() const;
- URL absoluteMediaURL() const;
- URL absoluteLinkURL() const;
- String textContent() const;
- bool isLiveLink() const;
+ WEBCORE_EXPORT String altDisplayString() const;
+ WEBCORE_EXPORT String titleDisplayString() const;
+ WEBCORE_EXPORT Image* image() const;
+ WEBCORE_EXPORT IntRect imageRect() const;
+ WEBCORE_EXPORT URL absoluteImageURL() const;
+ WEBCORE_EXPORT URL absolutePDFURL() const;
+ WEBCORE_EXPORT URL absoluteMediaURL() const;
+ WEBCORE_EXPORT URL absoluteLinkURL() const;
+#if ENABLE(ATTACHMENT_ELEMENT)
+ WEBCORE_EXPORT URL absoluteAttachmentURL() const;
+#endif
+ WEBCORE_EXPORT String textContent() const;
bool isOverLink() const;
- bool isContentEditable() const;
+ WEBCORE_EXPORT bool isContentEditable() const;
void toggleMediaControlsDisplay() const;
void toggleMediaLoopPlayback() const;
- bool mediaIsInFullscreen() const;
+ WEBCORE_EXPORT bool mediaIsInFullscreen() const;
void toggleMediaFullscreenState() const;
void enterFullscreenForVideo() const;
bool mediaControlsEnabled() const;
@@ -121,10 +121,17 @@ public:
bool mediaPlaying() const;
bool mediaSupportsFullscreen() const;
void toggleMediaPlayState() const;
- bool mediaHasAudio() const;
- bool mediaIsVideo() const;
+ WEBCORE_EXPORT bool mediaHasAudio() const;
+ WEBCORE_EXPORT bool mediaIsVideo() const;
bool mediaMuted() const;
void toggleMediaMuteState() const;
+ bool mediaSupportsEnhancedFullscreen() const;
+ bool mediaIsInEnhancedFullscreen() const;
+ void toggleEnhancedFullscreenForVideo() const;
+
+ WEBCORE_EXPORT bool isDownloadableMedia() const;
+ WEBCORE_EXPORT bool isOverTextInsideFormControlElement() const;
+ WEBCORE_EXPORT bool allowsCopy() const;
// Returns true if it is rect-based hit test and needs to continue until the rect is fully
// enclosed by the boundaries of a node.
@@ -135,11 +142,12 @@ public:
// If m_rectBasedTestResult is 0 then set it to a new NodeSet. Return *m_rectBasedTestResult. Lazy allocation makes
// sense because the NodeSet is seldom necessary, and it's somewhat expensive to allocate and initialize. This method does
// the same thing as mutableRectBasedTestResult(), but here the return value is const.
- const NodeSet& rectBasedTestResult() const;
+ WEBCORE_EXPORT const NodeSet& rectBasedTestResult() const;
Vector<String> dictationAlternatives() const;
Node* targetNode() const;
+ WEBCORE_EXPORT Element* targetElement() const;
private:
NodeSet& mutableRectBasedTestResult(); // See above.
@@ -158,11 +166,9 @@ private:
RefPtr<Scrollbar> m_scrollbar;
bool m_isOverWidget; // Returns true if we are over a widget (and not in the border/padding area of a RenderWidget for example).
- mutable OwnPtr<NodeSet> m_rectBasedTestResult;
+ mutable std::unique_ptr<NodeSet> m_rectBasedTestResult;
};
-String displayString(const String&, const Node*);
+WEBCORE_EXPORT String displayString(const String&, const Node*);
} // namespace WebCore
-
-#endif // HitTestResult_h