Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(724)

Unified Diff: third_party/WebKit/Source/core/editing/FrameSelection.h

Issue 2201853002: Blink handle selection handle visibility (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed contextual search test function Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 1c43c7a496c3e63ea0d15992c5cf1b5dc029565d..a1752ae0b3bfb021e77872e20a636e998923e7dc 100644
--- a/third_party/WebKit/Source/core/editing/FrameSelection.h
+++ b/third_party/WebKit/Source/core/editing/FrameSelection.h
@@ -124,17 +124,20 @@ class CORE_EXPORT FrameSelection final
void setSelection(const VisibleSelection&,
SetSelectionOptions = CloseTyping | ClearTypingStyle,
CursorAlignOnScroll = CursorAlignOnScroll::IfNeeded,
- TextGranularity = CharacterGranularity);
+ TextGranularity = CharacterGranularity,
+ bool isHandleVisible = false);
yosin_UTC9 2016/10/17 07:27:46 Could you pass |isHandleVisible| in |SetSelectionO
amaralp 2016/10/19 04:26:38 Done.
void setSelection(const VisibleSelectionInFlatTree&,
SetSelectionOptions = CloseTyping | ClearTypingStyle,
CursorAlignOnScroll = CursorAlignOnScroll::IfNeeded,
- TextGranularity = CharacterGranularity);
+ TextGranularity = CharacterGranularity,
+ bool isHandleVisible = false);
// TODO(yosin) We should get rid of two parameters version of
// |setSelection()| to avoid conflict of four parameters version.
void setSelection(const VisibleSelection& selection,
- TextGranularity granularity) {
+ TextGranularity granularity,
+ bool isHandleVisible = false) {
setSelection(selection, CloseTyping | ClearTypingStyle,
- CursorAlignOnScroll::IfNeeded, granularity);
+ CursorAlignOnScroll::IfNeeded, granularity, isHandleVisible);
}
// TODO(yosin) We should get rid of |Range| version of |setSelectedRagne()|
// for Oilpan.
@@ -155,6 +158,7 @@ class CORE_EXPORT FrameSelection final
// the frame you entirely selected.
void selectFrameElementInParentIfFullySelected();
+ bool contains(const HitTestResult&);
bool contains(const LayoutPoint&);
SelectionType getSelectionType() const {
@@ -242,6 +246,8 @@ class CORE_EXPORT FrameSelection final
bool isFocusedAndActive() const;
void pageActivationChanged();
+ bool isHandleVisible() const { return m_isHandleVisible; }
+
void updateSecureKeyboardEntryIfActive();
// Returns true if a word is selected.
@@ -253,12 +259,13 @@ class CORE_EXPORT FrameSelection final
enum EndPointsAdjustmentMode {
AdjustEndpointsAtBidiBoundary,
- DoNotAdjsutEndpoints
+ DoNotAdjustEndpoints
yosin_UTC9 2016/10/17 07:27:46 Good catch! http://crrev.com/2424703002 will fix t
amaralp 2016/10/19 04:26:38 Thanks!
};
void setNonDirectionalSelectionIfNeeded(
const VisibleSelectionInFlatTree&,
TextGranularity,
- EndPointsAdjustmentMode = DoNotAdjsutEndpoints);
+ EndPointsAdjustmentMode = DoNotAdjustEndpoints,
+ bool isHandleVisible = false);
void setFocusedNodeIfNeeded();
void notifyLayoutObjectOfSelectionChange(EUserTriggered);
@@ -315,7 +322,8 @@ class CORE_EXPORT FrameSelection final
void setSelectionAlgorithm(const VisibleSelectionTemplate<Strategy>&,
SetSelectionOptions,
CursorAlignOnScroll,
- TextGranularity);
+ TextGranularity,
+ bool isHandleVisible = false);
void respondToNodeModification(Node&,
bool baseRemoved,
@@ -360,6 +368,8 @@ class CORE_EXPORT FrameSelection final
bool m_focused : 1;
+ bool m_isHandleVisible : 1;
+
// Controls text granularity used to adjust the selection's extent in
// moveRangeSelectionExtent.
std::unique_ptr<GranularityStrategy> m_granularityStrategy;

Powered by Google App Engine
This is Rietveld 408576698