Skip to content

Commit c4e24f8

Browse files
committed
CaretPosition should be EnabledBySetting
https://bugs.webkit.org/show_bug.cgi?id=288644 rdar://145688017 Reviewed by Simon Fraser. https://commits.webkit.org/287047@main (bug 172137) added Document.caretPositionFromPoint(). However, while Document.caretPositionFromPoint() itself has [EnabledBySetting=CaretPositionFromPointEnabled] neither CaretPosition nor CaretPositionFromPointOptions do. These should also be behind the flag, because otherwise we break anyone doing anything like `if (window.CaretPosition)` or the mdn-bcd-collector trying to fetch meaningful data about what browser supports the related APIs. * Source/WebCore/bindings/js/WebCoreBuiltinNames.h: * Source/WebCore/dom/CaretPosition.idl: Canonical link: https://commits.webkit.org/291314@main
1 parent 0d30a66 commit c4e24f8

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

Source/WebCore/bindings/js/WebCoreBuiltinNames.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ namespace WebCore {
107107
macro(BufferedChangeEvent) \
108108
macro(Cache) \
109109
macro(CacheStorage) \
110+
macro(CaretPosition) \
110111
macro(ChannelMergerNode) \
111112
macro(ChannelSplitterNode) \
112113
macro(Client) \

Source/WebCore/dom/CaretPosition.idl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
*/
2525

2626
[
27+
EnabledBySetting=CaretPositionFromPointEnabled,
2728
ExportMacro=WEBCORE_EXPORT,
2829
Exposed=(Window),
2930
TaggedWrapper,

0 commit comments

Comments
 (0)