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

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

Issue 2341053002: Mark the createVisiblePosition overloads as deprecated (Closed)
Patch Set: minor revision Created 4 years, 3 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/VisiblePosition.h
diff --git a/third_party/WebKit/Source/core/editing/VisiblePosition.h b/third_party/WebKit/Source/core/editing/VisiblePosition.h
index abc174e77c16477cbcd638f7a1be66c453a845da..ffaab651d8adc7f529bcac23e32549e44ace65bf 100644
--- a/third_party/WebKit/Source/core/editing/VisiblePosition.h
+++ b/third_party/WebKit/Source/core/editing/VisiblePosition.h
@@ -71,8 +71,8 @@ class CORE_TEMPLATE_CLASS_EXPORT VisiblePositionTemplate final {
public:
VisiblePositionTemplate();
- // Node: Other than |createVisiblePosition()|, we should not use
- // |create()|.
+ // Node: Other than |createVisiblePosition()| and
+ // |createVisiblePositionDeprecated()|, we should not use |create()|.
static VisiblePositionTemplate create(const PositionWithAffinityTemplate<Strategy>&);
// Intentionally delete |operator==()| and |operator!=()| for reducing
@@ -119,6 +119,14 @@ extern template class CORE_EXTERN_TEMPLATE_EXPORT VisiblePositionTemplate<Editin
using VisiblePosition = VisiblePositionTemplate<EditingStrategy>;
using VisiblePositionInFlatTree = VisiblePositionTemplate<EditingInFlatTreeStrategy>;
+// |createVisiblePositionDeprecated| updates layout before creating the
+// VisiblePosition, which messes up the rendering pipeline. The callers should
+// ensure clean layout by themselves and call |createVisiblePosition| instead.
+CORE_EXPORT VisiblePosition createVisiblePositionDeprecated(const Position&, TextAffinity = VP_DEFAULT_AFFINITY);
+CORE_EXPORT VisiblePosition createVisiblePositionDeprecated(const PositionWithAffinity&);
+CORE_EXPORT VisiblePositionInFlatTree createVisiblePositionDeprecated(const PositionInFlatTree&, TextAffinity = VP_DEFAULT_AFFINITY);
+CORE_EXPORT VisiblePositionInFlatTree createVisiblePositionDeprecated(const PositionInFlatTreeWithAffinity&);
+
CORE_EXPORT VisiblePosition createVisiblePosition(const Position&, TextAffinity = VP_DEFAULT_AFFINITY);
CORE_EXPORT VisiblePosition createVisiblePosition(const PositionWithAffinity&);
CORE_EXPORT VisiblePositionInFlatTree createVisiblePosition(const PositionInFlatTree&, TextAffinity = VP_DEFAULT_AFFINITY);

Powered by Google App Engine
This is Rietveld 408576698