Offscreen handles are visible
authorAntonio Gomes <a1.gomes@samsung.com>
Thu, 10 Dec 2015 20:13:31 +0000 (16:13 -0400)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 07:55:23 +0000 (07:55 +0000)
Patch changes the selection controller logic a bit to
take SelectionBound::visible bit into account before
show/hide a "input" handle.

This fixes WCS TC 15, and various real world websites.

Original beta/m47 patch:
- http://165.213.202.130/gerrit/98864

Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=14720

Reviewed by: g.czajkowski

Change-Id: I104c0b38f583c7b0467fe224c100052e1b8fe98a
Signed-off-by: Antonio Gomes <a1.gomes@samsung.com>
tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.cc

index 1a35277..70df3f5 100644 (file)
@@ -260,8 +260,10 @@ void SelectionControllerEfl::ShowHandleAndContextMenuIfRequired(
     if (!GetSelectionEditable())
       return;
 
-    gfx::Rect left = selection_data_->GetLeftRect();
-    if (GetCaretSelectionStatus()) {
+    CHECK(start_selection_ == end_selection_);
+
+    if (GetCaretSelectionStatus() && start_selection_.visible()) {
+      gfx::Rect left = selection_data_->GetLeftRect();
       input_handle_->SetBasePosition(gfx::Point(left.x(), left.y()));
       input_handle_->Move(left.bottom_right());
       input_handle_->Show();