Title: [258539] trunk/Source
- Revision
- 258539
- Author
- [email protected]
- Date
- 2020-03-16 22:09:56 -0700 (Mon, 16 Mar 2020)
Log Message
Add a bit more UIHitTesting logging, and make it possible to dump EventRegions from WebKit
https://bugs.webkit.org/show_bug.cgi?id=209058
Reviewed by Antti Koivisto.
Source/WebCore:
Export operator<<(TextStream&, const EventRegion&) so it can be used from Webkit.
* rendering/EventRegion.h:
Source/WebKit:
Add a UIHitTesting log.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView gestureRecognizer:shouldReceiveTouch:]):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (258538 => 258539)
--- trunk/Source/WebCore/ChangeLog 2020-03-17 04:44:51 UTC (rev 258538)
+++ trunk/Source/WebCore/ChangeLog 2020-03-17 05:09:56 UTC (rev 258539)
@@ -1,3 +1,14 @@
+2020-03-16 Simon Fraser <[email protected]>
+
+ Add a bit more UIHitTesting logging, and make it possible to dump EventRegions from WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=209058
+
+ Reviewed by Antti Koivisto.
+
+ Export operator<<(TextStream&, const EventRegion&) so it can be used from Webkit.
+
+ * rendering/EventRegion.h:
+
2020-03-16 Tim Horton <[email protected]>
Remove a 'using namespace WebCore' in MediaSessionManagerCocoa
Modified: trunk/Source/WebCore/rendering/EventRegion.cpp (258538 => 258539)
--- trunk/Source/WebCore/rendering/EventRegion.cpp 2020-03-17 04:44:51 UTC (rev 258538)
+++ trunk/Source/WebCore/rendering/EventRegion.cpp 2020-03-17 05:09:56 UTC (rev 258539)
@@ -205,6 +205,25 @@
return actions;
}
+void EventRegion::dump(TextStream& ts) const
+{
+ ts << m_region;
+
+ if (!m_touchActionRegions.isEmpty()) {
+ TextStream::IndentScope indentScope(ts);
+ ts << indent << "(touch-action\n";
+ for (unsigned i = 0; i < m_touchActionRegions.size(); ++i) {
+ if (m_touchActionRegions[i].isEmpty())
+ continue;
+ TextStream::IndentScope indentScope(ts);
+ ts << indent << "(" << toTouchAction(i);
+ ts << indent << m_touchActionRegions[i];
+ ts << indent << ")\n";
+ }
+ ts << indent << ")\n";
+ }
+}
+
TextStream& operator<<(TextStream& ts, TouchAction touchAction)
{
switch (touchAction) {
@@ -227,22 +246,7 @@
TextStream& operator<<(TextStream& ts, const EventRegion& eventRegion)
{
- ts << eventRegion.m_region;
-
- if (!eventRegion.m_touchActionRegions.isEmpty()) {
- TextStream::IndentScope indentScope(ts);
- ts << indent << "(touch-action\n";
- for (unsigned i = 0; i < eventRegion.m_touchActionRegions.size(); ++i) {
- if (eventRegion.m_touchActionRegions[i].isEmpty())
- continue;
- TextStream::IndentScope indentScope(ts);
- ts << indent << "(" << toTouchAction(i);
- ts << indent << eventRegion.m_touchActionRegions[i];
- ts << indent << ")\n";
- }
- ts << indent << ")\n";
- }
-
+ eventRegion.dump(ts);
return ts;
}
Modified: trunk/Source/WebCore/rendering/EventRegion.h (258538 => 258539)
--- trunk/Source/WebCore/rendering/EventRegion.h 2020-03-17 04:44:51 UTC (rev 258538)
+++ trunk/Source/WebCore/rendering/EventRegion.h 2020-03-17 05:09:56 UTC (rev 258539)
@@ -83,15 +83,16 @@
// FIXME: Remove legacy decode.
template<class Decoder> static bool decode(Decoder&, EventRegion&);
+ void dump(TextStream&) const;
+
private:
void uniteTouchActions(const Region&, OptionSet<TouchAction>);
- friend TextStream& operator<<(TextStream&, const EventRegion&);
Region m_region;
Vector<Region> m_touchActionRegions;
};
-TextStream& operator<<(TextStream&, const EventRegion&);
+WEBCORE_EXPORT TextStream& operator<<(TextStream&, const EventRegion&);
template<class Encoder>
void EventRegion::encode(Encoder& encoder) const
Modified: trunk/Source/WebKit/ChangeLog (258538 => 258539)
--- trunk/Source/WebKit/ChangeLog 2020-03-17 04:44:51 UTC (rev 258538)
+++ trunk/Source/WebKit/ChangeLog 2020-03-17 05:09:56 UTC (rev 258539)
@@ -1,3 +1,15 @@
+2020-03-16 Simon Fraser <[email protected]>
+
+ Add a bit more UIHitTesting logging, and make it possible to dump EventRegions from WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=209058
+
+ Reviewed by Antti Koivisto.
+
+ Add a UIHitTesting log.
+
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (-[WKContentView gestureRecognizer:shouldReceiveTouch:]):
+
2020-03-16 Chris Dumez <[email protected]>
Crash under WebCookieCache::clearForHost()
Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (258538 => 258539)
--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2020-03-17 04:44:51 UTC (rev 258538)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2020-03-17 05:09:56 UTC (rev 258539)
@@ -1514,7 +1514,9 @@
// specified (only pan-x or only pan-y) we enable the two recognizers in the opposite axis to prevent scrolling from starting
// if the initial gesture is such a swipe. Since the recognizers are specified to use a single finger for recognition, we don't
// need to worry about the case where there may be more than a single touch for a given UIScrollView.
- auto touchActions = WebKit::touchActionsForPoint(self, WebCore::roundedIntPoint([touch locationInView:self]));
+ auto touchLocation = [touch locationInView:self];
+ auto touchActions = WebKit::touchActionsForPoint(self, WebCore::roundedIntPoint(touchLocation));
+ LOG_WITH_STREAM(UIHitTesting, stream << "gestureRecognizer:shouldReceiveTouch: at " << WebCore::FloatPoint(touchLocation) << " - touch actions " << touchActions);
if (gestureRecognizer == _touchActionLeftSwipeGestureRecognizer || gestureRecognizer == _touchActionRightSwipeGestureRecognizer)
return touchActions == WebCore::TouchAction::PanY;
return touchActions == WebCore::TouchAction::PanX;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes