fixup! [WRTJS][M120 Migration] Support for WRTContextMenuController 13/317913/2
authorChandan Padhi <c.padhi@samsung.com>
Fri, 20 Sep 2024 10:05:52 +0000 (15:35 +0530)
committerBot Blink <blinkbot@samsung.com>
Tue, 24 Sep 2024 07:39:38 +0000 (07:39 +0000)
This commit enables code under WRT_JS_BRINGUP and fixes a compilation
error related to it.

Change-Id: I2ef0acfc0e6edec2d928232a7b91a3d7cf7150bc
Signed-off-by: Chandan Padhi <c.padhi@samsung.com>
content/browser/renderer_host/render_widget_host_view_aura.h
wrt/src/browser/wrt_context_menu_controller.cc

index 6030efd74272d1e961df4f6bd25c65f3b5039538..16691214337997501f5027096c1fe30a8d3ffedd 100644 (file)
@@ -496,6 +496,10 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
   void OnSelectionRectReceived(const gfx::Rect&) override;
   void OnGetNumberFieldAttributes(bool is_minimum_negative,
                                   bool is_step_integer) override;
+
+  // Returns the text including the selection which might include
+  // several characters before and after it.
+  std::u16string GetSelectionText();
 #endif
 
 #if defined(BUILD_CHROME)
@@ -531,9 +535,6 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
 #if BUILDFLAG(IS_EFL)
   void DisplayQRCode(std::string contents) override;
   void CloseQRCode() override;
-  // Returns the text including the selection which might include
-  // several characters before and after it.
-  std::u16string GetSelectionText();
 #endif
 
   // May be overridden in tests.
index bece639ee238bbc8f97800042d1fdea72da24015..b82949faeabeb87a01c5ccd1b18b358f7a8bd479 100755 (executable)
@@ -149,7 +149,6 @@ void WRTContextMenuController::GetProposedContextMenu() {
             std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_SELECT_ABB")));
       }
 
-#if !defined(WRT_JS_BRINGUP)
       size_t surroundings_length = rwhv->GetSelectionText().length();
       size_t selection_length = params_.selection_text.length();
       auto surroundings_last_char =
@@ -163,7 +162,6 @@ void WRTContextMenuController::GetProposedContextMenu() {
             EWK_CONTEXT_MENU_ITEM_TAG_SELECT_ALL,
             std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_SELECT_ALL_ABB")));
       }
-#endif
     }
   } else {
     if (params_.media_type != blink::mojom::ContextMenuDataMediaType::kImage &&
@@ -246,10 +244,8 @@ void WRTContextMenuController::GetSelectionRange(
 }
 
 void WRTContextMenuController::MoveCaret(const gfx::Point& point) {
-#if !defined(WRT_JS_BRINGUP)
   if (rwhva() && rwhva()->offscreen_helper())
     rwhva()->offscreen_helper()->MoveCaret(point);
-#endif
 }
 
 void WRTContextMenuController::SelectFocusedLink() {