fix: allow contextmenu event in draggable regions (#37386)
This commit is contained in:
parent
a3e3efe4c4
commit
e27905c765
7 changed files with 73 additions and 23 deletions
|
@ -442,7 +442,13 @@ class WebContents : public ExclusiveAccessContext,
|
|||
// content::RenderWidgetHost::InputEventObserver:
|
||||
void OnInputEvent(const blink::WebInputEvent& event) override;
|
||||
|
||||
SkRegion* draggable_region() { return draggable_region_.get(); }
|
||||
SkRegion* draggable_region() {
|
||||
return force_non_draggable_ ? nullptr : draggable_region_.get();
|
||||
}
|
||||
|
||||
void SetForceNonDraggable(bool force_non_draggable) {
|
||||
force_non_draggable_ = force_non_draggable;
|
||||
}
|
||||
|
||||
// disable copy
|
||||
WebContents(const WebContents&) = delete;
|
||||
|
@ -826,6 +832,8 @@ class WebContents : public ExclusiveAccessContext,
|
|||
|
||||
std::unique_ptr<SkRegion> draggable_region_;
|
||||
|
||||
bool force_non_draggable_ = false;
|
||||
|
||||
base::WeakPtrFactory<WebContents> weak_factory_{this};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue