Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2785853002: Selection Action mode triggered like a context menu (Closed)
Patch Set: fix rebase Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 EnableTapHighlights(highlight_nodes); 833 EnableTapHighlights(highlight_nodes);
834 for (size_t i = 0; i < link_highlights_.size(); ++i) 834 for (size_t i = 0; i < link_highlights_.size(); ++i)
835 link_highlights_[i]->StartHighlightAnimationIfNeeded(); 835 link_highlights_[i]->StartHighlightAnimationIfNeeded();
836 event_result = WebInputEventResult::kHandledSystem; 836 event_result = WebInputEventResult::kHandledSystem;
837 event_cancelled = true; 837 event_cancelled = true;
838 break; 838 break;
839 } 839 }
840 } 840 }
841 } 841 }
842 842
843 event_result = 843 {
844 MainFrameImpl()->GetFrame()->GetEventHandler().HandleGestureEvent( 844 ContextMenuAllowedScope scope;
845 targeted_event); 845 event_result =
846 MainFrameImpl()->GetFrame()->GetEventHandler().HandleGestureEvent(
847 targeted_event);
848 }
849
846 if (page_popup_ && last_hidden_page_popup_ && 850 if (page_popup_ && last_hidden_page_popup_ &&
847 page_popup_->HasSamePopupClient(last_hidden_page_popup_.Get())) { 851 page_popup_->HasSamePopupClient(last_hidden_page_popup_.Get())) {
848 // The tap triggered a page popup that is the same as the one we just 852 // The tap triggered a page popup that is the same as the one we just
849 // closed. It needs to be closed. 853 // closed. It needs to be closed.
850 CancelPagePopup(); 854 CancelPagePopup();
851 } 855 }
852 last_hidden_page_popup_ = nullptr; 856 last_hidden_page_popup_ = nullptr;
853 break; 857 break;
854 } 858 }
855 case WebInputEvent::kGestureTwoFingerTap: 859 case WebInputEvent::kGestureTwoFingerTap:
(...skipping 3279 matching lines...) Expand 10 before | Expand all | Expand 10 after
4135 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) 4139 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame())
4136 return nullptr; 4140 return nullptr;
4137 return focused_frame; 4141 return focused_frame;
4138 } 4142 }
4139 4143
4140 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { 4144 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const {
4141 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; 4145 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr;
4142 } 4146 }
4143 4147
4144 } // namespace blink 4148 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/ContextMenuClientImpl.cpp ('k') | third_party/WebKit/public/web/WebMenuSourceType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698