Changeset 246327 in webkit
- Timestamp:
- Jun 11, 2019, 12:02:31 PM (7 years ago)
- Location:
- trunk/Source
- Files:
-
- 1 added
- 9 edited
-
WTF/ChangeLog (modified) (1 diff)
-
WTF/WTF.xcodeproj/project.pbxproj (modified) (4 diffs)
-
WTF/wtf/text/TextStream.h (modified) (2 diffs)
-
WTF/wtf/text/cocoa/TextStreamCocoa.mm (added)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/platform/TouchAction.h (modified) (1 diff)
-
WebKit/ChangeLog (modified) (1 diff)
-
WebKit/Platform/Logging.h (modified) (1 diff)
-
WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm (modified) (3 diffs)
-
WebKit/UIProcess/ios/WKContentViewInteraction.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r246322 r246327 1 2019-06-10 Simon Fraser <simon.fraser@apple.com> 2 3 Add logging for UI-side compositing hit-testing 4 https://bugs.webkit.org/show_bug.cgi?id=198739 5 6 Reviewed by Antti Koivisto. 7 8 Make it possible to output an Objective-C object to TextStream, which will 9 log its -description. 10 11 Also add a template for OptionSet<> printing. 12 13 * WTF.xcodeproj/project.pbxproj: 14 * wtf/text/TextStream.h: 15 (WTF::operator<<): 16 * wtf/text/cocoa/TextStreamCocoa.mm: Added. 17 (WTF::TextStream::operator<<): 18 1 19 2019-06-11 Saam Barati <sbarati@apple.com> 2 20 -
trunk/Source/WTF/WTF.xcodeproj/project.pbxproj
r246322 r246327 24 24 0F30BA901E78708E002CA847 /* GlobalVersion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F30BA8A1E78708E002CA847 /* GlobalVersion.cpp */; }; 25 25 0F30CB5A1FCDF134004B5323 /* ConcurrentPtrHashSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F30CB581FCDF133004B5323 /* ConcurrentPtrHashSet.cpp */; }; 26 0F3492D722AF431C004F85FC /* TextStreamCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F3492D622AF42F1004F85FC /* TextStreamCocoa.mm */; }; 26 27 0F43D8F11DB5ADDC00108FB6 /* AutomaticThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F43D8EF1DB5ADDC00108FB6 /* AutomaticThread.cpp */; }; 27 28 0F5BF1761F23D49A0029D91D /* Gigacage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F5BF1741F23D49A0029D91D /* Gigacage.cpp */; }; … … 203 204 0F30CB591FCDF133004B5323 /* ConcurrentPtrHashSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConcurrentPtrHashSet.h; sourceTree = "<group>"; }; 204 205 0F31DD701F1308BC0072EB4A /* LockAlgorithmInlines.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LockAlgorithmInlines.h; sourceTree = "<group>"; }; 206 0F3492D622AF42F1004F85FC /* TextStreamCocoa.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = TextStreamCocoa.mm; sourceTree = "<group>"; }; 205 207 0F3501631BB258C800F0A2A3 /* WeakRandom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeakRandom.h; sourceTree = "<group>"; }; 206 208 0F43D8EF1DB5ADDC00108FB6 /* AutomaticThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AutomaticThread.cpp; sourceTree = "<group>"; }; … … 832 834 93934BD218A1E8C300D0D6A1 /* StringViewCocoa.mm */, 833 835 1C181C951D30800A00F5FA16 /* TextBreakIteratorInternalICUCocoa.cpp */, 836 0F3492D622AF42F1004F85FC /* TextStreamCocoa.mm */, 834 837 ); 835 838 path = cocoa; … … 1621 1624 1C181C961D30800A00F5FA16 /* TextBreakIteratorInternalICUCocoa.cpp in Sources */, 1622 1625 A3E4DD931F3A803400DED0B4 /* TextStream.cpp in Sources */, 1626 0F3492D722AF431C004F85FC /* TextStreamCocoa.mm in Sources */, 1623 1627 E311FB171F0A568B003C08DE /* ThreadGroup.cpp in Sources */, 1624 1628 A8A4744A151A825B004123FF /* Threading.cpp in Sources */, -
trunk/Source/WTF/wtf/text/TextStream.h
r245336 r246327 71 71 WTF_EXPORT_PRIVATE TextStream& operator<<(const FormatNumberRespectingIntegers&); 72 72 73 #ifdef __OBJC__ 74 WTF_EXPORT_PRIVATE TextStream& operator<<(id<NSObject>); 75 #endif 76 73 77 FormattingFlags formattingFlags() const { return m_formattingFlags; } 74 78 void setFormattingFlags(FormattingFlags flags) { m_formattingFlags = flags; } … … 181 185 } 182 186 187 template<typename Option> 188 TextStream& operator<<(TextStream& ts, const OptionSet<Option>& options) 189 { 190 ts << "["; 191 bool needComma = false; 192 for (auto option : options) { 193 if (needComma) 194 ts << ", "; 195 needComma = true; 196 ts << option; 197 } 198 return ts << "]"; 199 } 200 183 201 // Deprecated. Use TextStream::writeIndent() instead. 184 202 WTF_EXPORT_PRIVATE void writeIndent(TextStream&, int indent); -
trunk/Source/WebCore/ChangeLog
r246320 r246327 1 2019-06-10 Simon Fraser <simon.fraser@apple.com> 2 3 Add logging for UI-side compositing hit-testing 4 https://bugs.webkit.org/show_bug.cgi?id=198739 5 6 Reviewed by Antti Koivisto. 7 8 Export the TextStream output operator. 9 10 * platform/TouchAction.h: 11 1 12 2019-06-11 Greg Doolittle <gr3g@apple.com> 2 13 -
trunk/Source/WebCore/platform/TouchAction.h
r243893 r246327 41 41 }; 42 42 43 TextStream& operator<<(TextStream&, TouchAction);43 WEBCORE_EXPORT TextStream& operator<<(TextStream&, TouchAction); 44 44 45 45 } -
trunk/Source/WebKit/ChangeLog
r246316 r246327 1 2019-06-10 Simon Fraser <simon.fraser@apple.com> 2 3 Add logging for UI-side compositing hit-testing 4 https://bugs.webkit.org/show_bug.cgi?id=198739 5 6 Reviewed by Antti Koivisto. 7 8 Make it easier to debug UI-side compositing hit-testing issues with a UIHitTesting log 9 channel, which logs information about the UIView hierarchy, which views are found by 10 hit-testing, and what touch-actions apply. 11 12 This log channel can be set by passing the argument '-WebKit2Logging "UIHitTesting"' when 13 launching a debug iOS MobileSafari instance. 14 15 * Platform/Logging.h: 16 * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm: 17 (-[UIView _web_findDescendantViewAtPoint:withEvent:]): 18 * UIProcess/ios/WKContentViewInteraction.mm: 19 (-[WKContentView hitTest:withEvent:]): 20 (-[WKContentView _handleTouchActionsForTouchEvent:]): 21 1 22 2019-06-11 Antti Koivisto <antti@apple.com> 2 23 -
trunk/Source/WebKit/Platform/Logging.h
r245320 r246327 85 85 M(StorageAPI) \ 86 86 M(TextInput) \ 87 M(UIHitTesting) \ 87 88 M(ViewGestures) \ 88 89 M(ViewState) \ -
trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm
r246316 r246327 29 29 #if PLATFORM(IOS_FAMILY) 30 30 31 #import "Logging.h" 31 32 #import "RemoteLayerTreeHost.h" 32 33 #import "RemoteLayerTreeNode.h" … … 137 138 WebKit::collectDescendantViewsAtPoint(viewsAtPoint, self, point, event); 138 139 140 LOG_WITH_STREAM(UIHitTesting, stream << (void*)self << "_web_findDescendantViewAtPoint " << WebCore::FloatPoint(point) << " found " << viewsAtPoint.size() << " views"); 141 139 142 for (auto *view : WTF::makeReversedRange(viewsAtPoint)) { 140 143 if ([view conformsToProtocol:@protocol(WKNativelyInteractible)]) { 144 LOG_WITH_STREAM(UIHitTesting, stream << " " << (void*)view << " is natively interactible"); 141 145 CGPoint subviewPoint = [view convertPoint:point fromView:self]; 142 146 return [view hitTest:subviewPoint withEvent:event]; … … 144 148 145 149 if ([view isKindOfClass:[WKChildScrollView class]]) { 146 if (WebKit::isScrolledBy((WKChildScrollView *)view, viewsAtPoint.last())) 150 if (WebKit::isScrolledBy((WKChildScrollView *)view, viewsAtPoint.last())) { 151 LOG_WITH_STREAM(UIHitTesting, stream << " " << (void*)view << " is child scroll view and scrolled by " << (void*)viewsAtPoint.last()); 147 152 return view; 148 } 149 } 153 } 154 } 155 156 LOG_WITH_STREAM(UIHitTesting, stream << " ignoring " << [view class] << " " << (void*)view); 157 } 158 159 LOG_WITH_STREAM(UIHitTesting, stream << (void*)self << "_web_findDescendantViewAtPoint found no interactive views"); 150 160 return nil; 151 161 } -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r246311 r246327 1078 1078 for (UIView *subView in [_interactionViewsContainerView.get() subviews]) { 1079 1079 UIView *hitView = [subView hitTest:[subView convertPoint:point fromView:self] withEvent:event]; 1080 if (hitView) 1080 if (hitView) { 1081 LOG_WITH_STREAM(UIHitTesting, stream << self << "hitTest at " << WebCore::FloatPoint(point) << " found interaction view " << hitView); 1081 1082 return hitView; 1082 } 1083 return [super hitTest:point withEvent:event]; 1083 } 1084 } 1085 1086 LOG_WITH_STREAM(UIHitTesting, stream << "hit-testing WKContentView subviews " << [[self recursiveDescription] UTF8String]); 1087 UIView* hitView = [super hitTest:point withEvent:event]; 1088 LOG_WITH_STREAM(UIHitTesting, stream << " found view " << [hitView class] << " " << (void*)hitView); 1089 return hitView; 1084 1090 } 1085 1091 … … 1349 1355 if (phase == WebKit::WebPlatformTouchPoint::TouchPressed) { 1350 1356 auto touchActions = WebKit::touchActionsForPoint(self, touchPoint.location()); 1357 LOG_WITH_STREAM(UIHitTesting, stream << "touchActionsForPoint " << touchPoint.location() << " found " << touchActions); 1351 1358 if (!touchActions || touchActions.containsAny({ WebCore::TouchAction::Auto, WebCore::TouchAction::Manipulation })) 1352 1359 continue; 1360 1353 1361 scrollingCoordinator->setTouchActionsForTouchIdentifier(touchActions, touchPoint.identifier()); 1354 1362
Note:
See TracChangeset
for help on using the changeset viewer.