Changeset 176701 in webkit
- Timestamp:
- Dec 2, 2014, 4:59:06 PM (12 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/ios/WKContentViewInteraction.mm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r176698 r176701 1 2014-12-02 Dan Bernstein <mitz@apple.com> 2 3 <rdar://problem/18441138> [iOS] Text selection in WKWebView with WKSelectionGranularityCharacter only works in the most recent WKWebView to load 4 https://bugs.webkit.org/show_bug.cgi?id=139211 5 6 Reviewed by Anders Carlsson. 7 8 * UIProcess/ios/WKContentViewInteraction.mm: 9 (-[WKContentView becomeFirstResponder]): Override to activate the text selection for when 10 becoming first resopnder. 11 (-[WKContentView resignFirstResponder]): Deactiavte the text selection when resigning first 12 responder. This ensures that if another WKWebView becomes first responder, and it uses 13 block selection, we don’t end up with two active selection views. 14 (-[WKContentView useSelectionAssistantWithMode:]): Only activate the text selection if this 15 is the first responder. This ensures that loading content into a non-first-responder 16 WKWebView doesn‘t deactivate the text selection in the current first responder. 17 1 18 2014-12-02 Alexey Proskuryakov <ap@apple.com> 2 19 -
trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm
r176411 r176701 451 451 } 452 452 453 - (BOOL)becomeFirstResponder 454 { 455 BOOL didBecomeFirstResponder = [super becomeFirstResponder]; 456 if (didBecomeFirstResponder) 457 [_textSelectionAssistant activateSelection]; 458 459 return didBecomeFirstResponder; 460 } 461 453 462 - (BOOL)resignFirstResponder 454 463 { … … 460 469 [self _cancelInteraction]; 461 470 [_webSelectionAssistant resignedFirstResponder]; 471 [_textSelectionAssistant deactivateSelection]; 462 472 463 473 return [super resignFirstResponder]; … … 1087 1097 } 1088 1098 1089 [_textSelectionAssistant activateSelection]; 1099 if (self.isFirstResponder) 1100 [_textSelectionAssistant activateSelection]; 1090 1101 } 1091 1102 }
Note:
See TracChangeset
for help on using the changeset viewer.