RESOLVED FIXED 134084
iOS WebKit2: selection handles become too large when zooming a page.
https://bugs.webkit.org/show_bug.cgi?id=134084
Summary iOS WebKit2: selection handles become too large when zooming a page.
Enrica Casucci
Reported 2014-06-19 17:46:29 PDT
This happens only in WebKit2, since the WKContentView is now zoomed and all the selection views are child views of the document view. <rdar://problem/16799164>
Attachments
Patch (6.89 KB, patch)
2014-06-19 17:51 PDT, Enrica Casucci
benjamin: review+
Enrica Casucci
Comment 1 2014-06-19 17:51:52 PDT
WebKit Commit Bot
Comment 2 2014-06-19 17:53:34 PDT
Attachment 233398 [details] did not pass style-queue: ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1719: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1720: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 2 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Benjamin Poulain
Comment 3 2014-06-20 14:23:39 PDT
Comment on attachment 233398 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=233398&action=review > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:201 > + CGFloat inverseScale = 1 / [[self layer] transform].m11; > + [_inverseScaleRootView setTransform:CGAffineTransformMakeScale(inverseScale, inverseScale)]; Can you just call [self _updateUnscaledView]? > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:291 > + hitView = [hitView hitTest:[hitView convertPoint:point fromView:self] withEvent:event]; I would not reuse "hitView" but use a different UIView* local variable for clarity. maybe: for (UIView *subView ...) { if (UIView *hitView...) > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1695 > - (UITextRange *)selectedTextRange I would store inverseScale in a local variable. I think this deserve a comment with a little explanation of how the UI works regarding the caret width/height.
Ahmad Saleem
Comment 4 2022-10-25 13:33:29 PDT
Landed - https://github.com/WebKit/WebKit/commit/81101735c10d2c44bbcd0d5684177d7fc473310d and didn't backed out. Marking this bug as "RESOLVED FIXED". Thanks!
Note You need to log in before you can comment on or make changes to this bug.