| Index: third_party/WebKit/Source/core/editing/VisibleSelection.h
|
| diff --git a/third_party/WebKit/Source/core/editing/VisibleSelection.h b/third_party/WebKit/Source/core/editing/VisibleSelection.h
|
| index d3c694bf21f9c8bf2c23c64623cc3a2c3b1c160d..665889c6fe0e52b8d44e01ab573aad8b52c7d50d 100644
|
| --- a/third_party/WebKit/Source/core/editing/VisibleSelection.h
|
| +++ b/third_party/WebKit/Source/core/editing/VisibleSelection.h
|
| @@ -61,6 +61,12 @@ class CORE_TEMPLATE_CLASS_EXPORT VisibleSelectionTemplate {
|
| // Note: |create()| should be used only by |createVisibleSelection|.
|
| static VisibleSelectionTemplate Create(const SelectionTemplate<Strategy>&);
|
|
|
| + // Note: |CreateWithGranularity()| should be used only by
|
| + // |CreateVisibleSelectionWithGranularity()|.
|
| + static VisibleSelectionTemplate CreateWithGranularity(
|
| + const SelectionTemplate<Strategy>&,
|
| + TextGranularity);
|
| +
|
| SelectionType GetSelectionType() const { return selection_type_; }
|
|
|
| TextAffinity Affinity() const { return affinity_; }
|
| @@ -144,7 +150,7 @@ class CORE_TEMPLATE_CLASS_EXPORT VisibleSelectionTemplate {
|
| private:
|
| friend class SelectionAdjuster;
|
|
|
| - VisibleSelectionTemplate(const SelectionTemplate<Strategy>&);
|
| + VisibleSelectionTemplate(const SelectionTemplate<Strategy>&, TextGranularity);
|
|
|
| void Validate(TextGranularity = kCharacterGranularity);
|
|
|
| @@ -193,6 +199,14 @@ CORE_EXPORT VisibleSelection CreateVisibleSelection(const SelectionInDOMTree&);
|
| CORE_EXPORT VisibleSelectionInFlatTree
|
| CreateVisibleSelection(const SelectionInFlatTree&);
|
|
|
| +CORE_EXPORT VisibleSelection
|
| +CreateVisibleSelectionWithGranularity(const SelectionInDOMTree&,
|
| + TextGranularity);
|
| +
|
| +CORE_EXPORT VisibleSelectionInFlatTree
|
| +CreateVisibleSelectionWithGranularity(const SelectionInFlatTree&,
|
| + TextGranularity);
|
| +
|
| // We don't yet support multi-range selections, so we only ever have one range
|
| // to return.
|
| CORE_EXPORT EphemeralRange FirstEphemeralRangeOf(const VisibleSelection&);
|
|
|