[NextBrowser] fixup! Navigation issues in Native UI 70/317770/4
authormayur.jain <mayur.jain@samsung.com>
Mon, 16 Sep 2024 09:13:22 +0000 (14:43 +0530)
committerBot Blink <blinkbot@samsung.com>
Thu, 19 Sep 2024 06:08:42 +0000 (06:08 +0000)
-Allowing cursor movement on most visited popup in
 featured page.
-Skip navigation to zoom label.

Change-Id: I814e0635588d8a0eebad82f516c667d3400ef565
Signed-off-by: mayur.jain <mayur.jain@samsung.com>
chrome/browser/ui/samsung/hybrid_navigation_controller.cc
components/samsung/public/samsung_browser_enums.h

index 0975dc4a5d2f8eb1694b853af28501200f36e792..9a94d5a2138fd45f7bdb12150e1f044515334aa5 100644 (file)
@@ -38,6 +38,7 @@ constexpr int UP_KEY = 111;
 constexpr int DOWN_KEY = 116;
 
 constexpr float longPressTimeout = 0.5;
+constexpr int ZOOM_LABEL_INDEX = 9;
 
 HybridNavigationController::HybridNavigationController(Browser* browser)
     : browser_(browser),
@@ -471,6 +472,8 @@ HybridNavigationController::GetNativePopupType() {
                  ->GetActiveWebContents()
                  ->IsShowingContextMenu()) {
     return samsung_browser_main::NativePopupType::CONTEXT_MENU;
+  } else if (popup && popup->isMVOpen()) {
+    return samsung_browser_main::NativePopupType::MOST_VISITED;
   }
   return samsung_browser_main::NativePopupType::NONE;
 }
@@ -673,7 +676,7 @@ void HybridNavigationController::handleToolbarViewArea(std::string key,
               i++;
               continue;
             }
-            if (i == 15) {
+            if (i == ZOOM_LABEL_INDEX) {
               LOG(INFO) << "Zoom label element, continue";
               i++;
               continue;
@@ -736,7 +739,7 @@ void HybridNavigationController::handleToolbarViewArea(std::string key,
               i++;
               continue;
             }
-            if (i == 15) {
+            if (i == ZOOM_LABEL_INDEX) {
               LOG(INFO) << "Zoom label element, continue";
               i++;
               continue;
@@ -952,7 +955,7 @@ void HybridNavigationController::handleToolbarViewArea(std::string key,
               continue;
             }
 
-            if (i == 15) {
+            if (i == ZOOM_LABEL_INDEX) {
               LOG(INFO) << "Zoom label element, continue";
               i++;
               continue;
@@ -1219,7 +1222,7 @@ void HybridNavigationController::handleToolbarViewArea(std::string key,
               i++;
               continue;
             }
-            if (i == 15) {
+            if (i == ZOOM_LABEL_INDEX) {
               LOG(INFO) << "Zoom label element, continue";
               i++;
               continue;
index bde9a38b88b8756b3b079047c75972039af86e54..0f1689084f89c13009fb46f9331f34d0b8d97147 100644 (file)
@@ -67,7 +67,8 @@ enum class NativePopupType {
   OMNIBOX = 1,
   EXTENSION = 2,
   MENU_TREE = 3,
-  CONTEXT_MENU = 4
+  CONTEXT_MENU = 4,
+  MOST_VISITED = 5
 };
 enum SynchronizationItem {
   Bookmarks = 0,