Native text selection UI is incorrectly suppressed in Microsoft Visio
[WebKit-https.git] / Source / WebCore / rendering / SelectionRangeData.cpp
index a38adcd..ec5e735 100644 (file)
 #include "VisibleSelection.h"
 
 namespace WebCore {
-    
+
+namespace { // See bug #177808.
+
 struct SelectionData {
     using RendererMap = HashMap<RenderObject*, std::unique_ptr<RenderSelectionInfo>>;
     using RenderBlockMap = HashMap<const RenderBlock*, std::unique_ptr<RenderBlockSelectionInfo>>;
 
-    std::optional<unsigned> startPosition;
-    std::optional<unsigned> endPosition;
+    Optional<unsigned> startPosition;
+    Optional<unsigned> endPosition;
     RendererMap renderers;
     RenderBlockMap blocks;
 };
@@ -94,6 +96,8 @@ private:
     Vector<RenderMultiColumnSpannerPlaceholder*> m_spannerStack;
 };
 
+} // anonymous namespace
+
 static RenderObject* rendererAfterPosition(const RenderObject& renderer, unsigned offset)
 {
     auto* child = renderer.childAt(offset);