改为特性宏

Signed-off-by: liuxiao_now87 <liuxiao182@huawei.com>
This commit is contained in:
liuxiao_now87 2024-07-12 07:02:11 +00:00 committed by lxlxlx310@163.com
parent 82e44f2a66
commit 2b7f98931f
6 changed files with 8 additions and 8 deletions

View File

@ -2062,7 +2062,7 @@ void EventManager::MockCancelEventAndDispatch(const AxisEvent& axisEvent)
mockedEvent.id = static_cast<int32_t>(axisTouchTestResults_.begin()->first);
DispatchTouchEvent(mockedEvent);
}
#if defined(IOS_PLATFORM)
#if defined(SUPPORT_TOUCH_TARGET_TEST)
bool EventManager::TouchTargetHitTest(const TouchEvent& touchPoint, const RefPtr<NG::FrameNode>& frameNode,
TouchRestrict& touchRestrict, const Offset& offset, float viewScale, bool needAppend, const std::string& target)

View File

@ -277,7 +277,7 @@ public:
void CheckAndLogLastConsumedEventInfo(int32_t eventId, bool logImmediately = false);
#if defined(IOS_PLATFORM)
#if defined(SUPPORT_TOUCH_TARGET_TEST)
bool TouchTargetHitTest(const TouchEvent& touchPoint, const RefPtr<NG::FrameNode>& frameNode,
TouchRestrict& touchRestrict, const Offset& offset = Offset(), float viewScale = 1.0f,
bool needAppend = false, const std::string& target = "");

View File

@ -1271,7 +1271,7 @@ public:
virtual void UpdateLastVsyncEndTimestamp(uint64_t lastVsyncEndTimestamp) {}
#if defined(IOS_PLATFORM)
#if defined(SUPPORT_TOUCH_TARGET_TEST)
// Called by hittest to find touch node is equal target.
virtual bool OnTouchTargetHitTest(const TouchEvent& point, bool isSubPipe = false,
const std::string& target = "") = 0;

View File

@ -214,7 +214,7 @@ public:
// Called by view when touch event received.
void OnTouchEvent(const TouchEvent& point, bool isSubPipe = false) override;
#if defined(IOS_PLATFORM)
#if defined(SUPPORT_TOUCH_TARGET_TEST)
// Used to determine whether the touched frameNode is the target
bool OnTouchTargetHitTest(const TouchEvent& point, bool isSubPipe = false, const std::string& target = "") override;
#endif

View File

@ -4042,7 +4042,7 @@ void PipelineContext::NotifyAllWebPattern(bool isRegister)
{
rootNode_->NotifyWebPattern(isRegister);
}
#if defined(IOS_PLATFORM)
#if defined(SUPPORT_TOUCH_TARGET_TEST)
bool PipelineContext::OnTouchTargetHitTest(const TouchEvent& point, bool isSubPipe, const std::string& target)
{
@ -4051,9 +4051,9 @@ bool PipelineContext::OnTouchTargetHitTest(const TouchEvent& point, bool isSubPi
TouchRestrict touchRestrict { TouchRestrict::NONE };
touchRestrict.sourceType = point.sourceType;
touchRestrict.touchEvent = point;
bool isTouchWeb = eventManager_->TouchTargetHitTest(
bool isTouchTarget = eventManager_->TouchTargetHitTest(
scalePoint, rootNode_, touchRestrict, GetPluginEventOffset(), viewScale_, isSubPipe, target);
return isTouchWeb;
return isTouchTarget;
}
return false;
}

View File

@ -143,7 +143,7 @@ public:
// Called by view when touch event received.
void OnTouchEvent(const TouchEvent& point, bool isSubPipe = false) override;
#if defined(IOS_PLATFORM)
#if defined(SUPPORT_TOUCH_TARGET_TEST)
// Used to determine whether the touched frameNode is the target
bool OnTouchTargetHitTest(const TouchEvent& point, bool isSubPipe = false, const std::string& target = "") override;
#endif