Index: third_party/WebKit/Source/core/editing/FrameSelection.h |
diff --git a/third_party/WebKit/Source/core/editing/FrameSelection.h b/third_party/WebKit/Source/core/editing/FrameSelection.h |
index c2d3357835ce3f475d1b46707726bc9ca54812c6..43b6aa8c3b2478fa11c940141149c41014f2ef20 100644 |
--- a/third_party/WebKit/Source/core/editing/FrameSelection.h |
+++ b/third_party/WebKit/Source/core/editing/FrameSelection.h |
@@ -67,6 +67,8 @@ enum class SelectionDirectionalMode { NonDirectional, Directional }; |
enum class CaretVisibility; |
+enum class HandleVisibility { NotVisible, Visible }; |
+ |
class CORE_EXPORT FrameSelection final |
: public GarbageCollectedFinalized<FrameSelection> { |
WTF_MAKE_NONCOPYABLE(FrameSelection); |
@@ -86,6 +88,7 @@ class CORE_EXPORT FrameSelection final |
DoNotUpdateAppearance = 1 << 4, |
DoNotClearStrategy = 1 << 5, |
DoNotAdjustInFlatTree = 1 << 6, |
+ HandleVisible = 1 << 7, |
}; |
// Union of values in SetSelectionOption and EUserTriggered |
typedef unsigned SetSelectionOptions; |
@@ -164,6 +167,7 @@ class CORE_EXPORT FrameSelection final |
// the frame you entirely selected. |
void selectFrameElementInParentIfFullySelected(); |
+ bool contains(const HitTestResult&); |
bool contains(const LayoutPoint&); |
SelectionType getSelectionType() const { |
@@ -251,6 +255,10 @@ class CORE_EXPORT FrameSelection final |
bool isFocusedAndActive() const; |
void pageActivationChanged(); |
+ bool isHandleVisible() const { |
+ return m_handleVisibility == HandleVisibility::Visible; |
+ } |
+ |
void updateSecureKeyboardEntryIfActive(); |
// Returns true if a word is selected. |
@@ -267,7 +275,8 @@ class CORE_EXPORT FrameSelection final |
void setNonDirectionalSelectionIfNeeded( |
const VisibleSelectionInFlatTree&, |
TextGranularity, |
- EndPointsAdjustmentMode = DoNotAdjustEndpoints); |
+ EndPointsAdjustmentMode = DoNotAdjustEndpoints, |
+ const HandleVisibility& = HandleVisibility::NotVisible); |
void setFocusedNodeIfNeeded(); |
void notifyLayoutObjectOfSelectionChange(EUserTriggered); |
@@ -369,6 +378,8 @@ class CORE_EXPORT FrameSelection final |
bool m_focused : 1; |
+ HandleVisibility m_handleVisibility; |
+ |
// Controls text granularity used to adjust the selection's extent in |
// moveRangeSelectionExtent. |
std::unique_ptr<GranularityStrategy> m_granularityStrategy; |