Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/SelectionController.h |
| diff --git a/third_party/WebKit/Source/core/editing/SelectionController.h b/third_party/WebKit/Source/core/editing/SelectionController.h |
| index 30eb0d352675a08b0fe5711f1933825c404828e1..c41444f60f0fa2e66c46d1172c36bbaed8018589 100644 |
| --- a/third_party/WebKit/Source/core/editing/SelectionController.h |
| +++ b/third_party/WebKit/Source/core/editing/SelectionController.h |
| @@ -39,13 +39,15 @@ class FrameSelection; |
| class HitTestResult; |
| class LocalFrame; |
| -class SelectionController final : public GarbageCollected<SelectionController> { |
| +class CORE_EXPORT SelectionController final |
| + : public GarbageCollectedFinalized<SelectionController> { |
|
Xiaocheng
2016/10/24 03:53:11
What's the difference between GarbageCollected and
yosin_UTC9
2016/10/24 07:12:12
Member variable |m_originalBaseInFlatTree| require
|
| WTF_MAKE_NONCOPYABLE(SelectionController); |
| public: |
| static SelectionController* create(LocalFrame&); |
| - DECLARE_TRACE(); |
| + DECLARE_VIRTUAL_TRACE(); |
| + void documentDetached(); |
| void handleMousePressEvent(const MouseEventWithHitTestResults&); |
| bool handleMousePressEventSingleClick(const MouseEventWithHitTestResults&); |
| bool handleMousePressEventDoubleClick(const MouseEventWithHitTestResults&); |
| @@ -80,10 +82,18 @@ class SelectionController final : public GarbageCollected<SelectionController> { |
| } |
| private: |
| + friend class SelectionControllerTest; |
| + |
| explicit SelectionController(LocalFrame&); |
| enum class AppendTrailingWhitespace { ShouldAppend, DontAppend }; |
| enum class SelectInputEventType { Touch, Mouse }; |
| + enum EndPointsAdjustmentMode { |
| + AdjustEndpointsAtBidiBoundary, |
| + DoNotAdjustEndpoints |
| + }; |
| + |
| + Document& document() const; |
| void selectClosestWordFromHitTestResult(const HitTestResult&, |
| AppendTrailingWhitespace, |
| @@ -95,6 +105,9 @@ class SelectionController final : public GarbageCollected<SelectionController> { |
| const MouseEventWithHitTestResults&); |
| void selectClosestWordOrLinkFromMouseEvent( |
| const MouseEventWithHitTestResults&); |
| + void setNonDirectionalSelectionIfNeeded(const VisibleSelectionInFlatTree&, |
| + TextGranularity, |
| + EndPointsAdjustmentMode); |
| bool updateSelectionForMouseDownDispatchingSelectStart( |
| Node*, |
| const VisibleSelectionInFlatTree&, |
| @@ -103,6 +116,8 @@ class SelectionController final : public GarbageCollected<SelectionController> { |
| FrameSelection& selection() const; |
| Member<LocalFrame> const m_frame; |
| + // Used to store base before the adjustment at bidi boundary |
| + VisiblePositionInFlatTree m_originalBaseInFlatTree; |
|
Xiaocheng
2016/10/24 03:53:11
It's a bad pattern to store a VP on heap, as it's
yosin_UTC9
2016/10/24 07:12:12
Done.
|
| bool m_mouseDownMayStartSelect; |
| bool m_mouseDownWasSingleClickInSelection; |
| bool m_mouseDownAllowsMultiClick; |