WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
211785
[Wheel event region] Add support for getting wheel event region from ScrollingTree
https://bugs.webkit.org/show_bug.cgi?id=211785
Summary
[Wheel event region] Add support for getting wheel event region from Scrollin...
Antti Koivisto
Reported
2020-05-12 09:50:59 PDT
Add more code.
Attachments
patch
(9.87 KB, patch)
2020-05-12 10:11 PDT
,
Antti Koivisto
no flags
Details
Formatted Diff
Diff
patch
(9.89 KB, patch)
2020-05-12 10:23 PDT
,
Antti Koivisto
simon.fraser
: review+
Details
Formatted Diff
Diff
patch
(9.90 KB, patch)
2020-05-12 23:39 PDT
,
Antti Koivisto
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Antti Koivisto
Comment 1
2020-05-12 10:11:39 PDT
Created
attachment 399139
[details]
patch
Antti Koivisto
Comment 2
2020-05-12 10:23:26 PDT
Created
attachment 399142
[details]
patch
Simon Fraser (smfr)
Comment 3
2020-05-12 10:42:38 PDT
Comment on
attachment 399142
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=399142&action=review
> Source/WebCore/page/scrolling/mac/ScrollingTreeMac.mm:106 > + return eventRegion && eventRegion->contains(IntPoint(localPoint));
Maybe roundedIntPoint()?
> Source/WebCore/page/scrolling/mac/ScrollingTreeMac.mm:216 > + return eventRegion->eventListenerRegionTypesForPoint(IntPoint(point));
roundedIntPoint?
Darin Adler
Comment 4
2020-05-12 11:04:19 PDT
Comment on
attachment 399142
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=399142&action=review
Is IntPoint right here? I’d like to understand better some day when it should be int, float, CGFloat/double, or LayoutUnit.
> Source/WebCore/page/scrolling/mac/ScrollingTreeMac.mm:194 > + LockHolder lockHolder(m_layerHitTestMutex);
Does this lock need to be held all the way to the end? I don’t fully understand what is being guarded.
> Source/WebCore/page/scrolling/mac/ScrollingTreeMac.mm:208 > + auto platformCALayer = PlatformCALayer::platformCALayerForLayer((__bridge void*)hitLayer);
Seems like we eventually need to fix this function so we don’t have to cast to void* to use it.
> Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:171 > + const EventRegion* eventRegion() const override { return &m_eventRegion; }
final?
Simon Fraser (smfr)
Comment 5
2020-05-12 11:21:48 PDT
Comment on
attachment 399142
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=399142&action=review
>> Source/WebCore/page/scrolling/mac/ScrollingTreeMac.mm:194 >> + LockHolder lockHolder(m_layerHitTestMutex); > > Does this lock need to be held all the way to the end? I don’t fully understand what is being guarded.
This lock guards CALayers and PlatformCALayers, so the answer is yes.
Antti Koivisto
Comment 6
2020-05-12 23:39:56 PDT
Created
attachment 399245
[details]
patch
Antti Koivisto
Comment 7
2020-05-12 23:42:41 PDT
> final?
The class is marked final, using override for consistency.
EWS
Comment 8
2020-05-13 00:10:56 PDT
Committed
r261602
: <
https://trac.webkit.org/changeset/261602
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 399245
[details]
.
Radar WebKit Bug Importer
Comment 9
2020-05-13 00:11:18 PDT
<
rdar://problem/63172645
>
Antti Koivisto
Comment 10
2020-05-13 00:12:30 PDT
> Is IntPoint right here? I’d like to understand better some day when it > should be int, float, CGFloat/double, or LayoutUnit.
The underlying data structure here (Region) is currently integer based, that's why IntPoint. For its current use cases that level of accuracy is sufficient. I think we should move to 64 bit LayoutUnit at some point. That could allow using a single unit type through the layout code.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug