Data detector yellow highlight location is vertically mirrored in WebKit1
Created attachment 267244 [details] Patch
Comment on attachment 267244 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=267244&action=review > Source/WebKit/mac/ChangeLog:3 > + Data detector yellow highlight location is vertically mirrored in WebKit1 No test?
No idea how to test. We could add a way to dump this specific rect at some point, but that would be pretty overly specific to this one patch. Ref/pixel tests won't work because they don't capture subwindows. At the moment we have no tests for TextIndicators in actual use, just some TextIndicator unit-ish tests that wouldn't have hit this. Ideas?
Another alternative: an API test where we override NSWindow addChildWindow and dump its properties. Another roadblock: it looks like we don't currently have support for synthetically invoking force-touch in WebKit1. Might be able to trigger it with the keyboard shortcut, though (?)
Comment on attachment 267244 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=267244&action=review Test coverage is a good question. > Source/WebKit/mac/WebView/WebImmediateActionController.mm:432 > + RefPtr<TextIndicator> indicator = TextIndicator::createWithRange(*detectedDataRange, TextIndicatorOptionDefault, TextIndicatorPresentationTransition::FadeIn); auto is typically better than RefPtr and it might be Ref; unless this is old and still returns PassRefPtr
(In reply to comment #5) > Comment on attachment 267244 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=267244&action=review > > Test coverage is a good question. > > > Source/WebKit/mac/WebView/WebImmediateActionController.mm:432 > > + RefPtr<TextIndicator> indicator = TextIndicator::createWithRange(*detectedDataRange, TextIndicatorOptionDefault, TextIndicatorPresentationTransition::FadeIn); > > auto is typically better than RefPtr and it might be Ref; unless this is old > and still returns PassRefPtr It's not Ref, TextIndicator creation can fail (in a hundred different ways). auto is fine, though.
Ugh, I did all the work to do subwindow dumping for WKTR, then realized I needed in in DRT, then realized (again) that we don't have support for synthetic force-click in DRT. I'm just going to land it.
Created attachment 267572 [details] subwindow dumping patch for safekeeping
http://trac.webkit.org/changeset/194221
Reopening for a new patch.
Created attachment 269097 [details] Patch
Attachment 269097 [details] did not pass style-queue: ERROR: Source/WebKit/mac/WebView/WebView.mm:8573: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/WebKit/mac/WebView/WebView.mm:8637: Place brace on its own line for function definitions. [whitespace/braces] [4] Total errors found: 2 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
http://trac.webkit.org/changeset/195149