Movatterモバイル変換


[0]ホーム

URL:


Google Git
Sign in
chromium /chromium /src /refs/heads/main /. /pdf /input_utils.cc
blob: 1d3f1348473e568dbe548ef4253d477c9f42d2f2 [file] [log] [blame] [edit]
// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include"pdf/input_utils.h"
#include"build/build_config.h"
#include"third_party/blink/public/common/input/web_input_event.h"
#include"third_party/blink/public/common/input/web_mouse_event.h"
#include"third_party/blink/public/common/input/web_pointer_properties.h"
namespace chrome_pdf{
blink::WebMouseEventNormalizeMouseEvent(const blink::WebMouseEvent& event){
blink::WebMouseEvent normalized_event= event;
#if BUILDFLAG(IS_MAC)
usingModifiers= blink::WebInputEvent::Modifiers;
if((event.GetModifiers()&Modifiers::kControlKey)&&
event.button== blink::WebPointerProperties::Button::kLeft&&
event.GetType()== blink::WebInputEvent::Type::kMouseDown){
constexprint kUnsetModifiers=
Modifiers::kControlKey|Modifiers::kLeftButtonDown;
normalized_event.SetModifiers((event.GetModifiers()&~kUnsetModifiers)|
Modifiers::kRightButtonDown);
normalized_event.button= blink::WebPointerProperties::Button::kRight;
}
#endif
return normalized_event;
}
}// namespace chrome_pdf

[8]ページ先頭

©2009-2025 Movatter.jp