Changeset 206449 in webkit
- Timestamp:
- Sep 27, 2016, 11:31:32 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r206440 r206449 1 2016-09-27 Dan Bernstein <mitz@apple.com> 2 3 [iOS] REGRESSION (r182126): Selection highlight and handles aren’t visible with WKSelectionGranularityCharacter 4 https://bugs.webkit.org/show_bug.cgi?id=162577 5 <rdar://problem/28481984> 6 7 Reviewed by Simon Fraser. 8 9 * TestExpectations: 10 * editing/selection/character-granularity-rect-expected.txt: Added. 11 * editing/selection/character-granularity-rect.html: Added. 12 * platform/ios-simulator-wk2/TestExpectations: 13 1 14 2016-09-27 Jer Noble <jer.noble@apple.com> 2 15 -
trunk/LayoutTests/TestExpectations
r206422 r206449 63 63 # This test only makes sense on iOS 64 64 fast/attachment/attachment-wrapping-action.html 65 66 # Only iOS has selection UI drawn by UIKit 67 editing/selection/character-granularity-rect.html [ Skip ] 65 68 66 69 #////////////////////////////////////////////////////////////////////////////////////////// -
trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations
r206261 r206449 9 9 fast/scrolling/ios [ Pass ] 10 10 fast/viewport/ios [ Pass ] 11 editing/selection/character-granularity-rect.html [ Pass ] 11 12 12 13 #////////////////////////////////////////////////////////////////////////////////////////// -
trunk/Source/WebKit2/ChangeLog
r206440 r206449 1 2016-09-27 Dan Bernstein <mitz@apple.com> 2 3 [iOS] REGRESSION (r182126): Selection highlight and handles aren’t visible with WKSelectionGranularityCharacter 4 https://bugs.webkit.org/show_bug.cgi?id=162577 5 <rdar://problem/28481984> 6 7 Reviewed by Simon Fraser. 8 9 * UIProcess/API/Cocoa/WKWebView.mm: 10 (-[WKWebView _uiTextSelectionRectViews]): Added this method in the WKTesting category, which 11 uses UIKit internals to get the views used for the selection highlight. 12 * UIProcess/API/Cocoa/WKWebViewPrivate.h: 13 14 * UIProcess/ios/WKContentViewInteraction.mm: 15 (-[WKContentView _selectionClipRect]): When selection is not confined to a form control or 16 content-editable element, return the null rect to indicate no clipping, rather than 17 clipping to the empty rect at the origin. 18 1 19 2016-09-27 Jer Noble <jer.noble@apple.com> 2 20 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
r206413 r206449 4530 4530 } 4531 4531 4532 - (NSArray<UIView *> *)_uiTextSelectionRectViews 4533 { 4534 return [_contentView valueForKeyPath:@"interactionAssistant.selectionView.rangeView.m_rectViews"]; 4535 } 4536 4532 4537 #endif // PLATFORM(IOS) 4533 4538 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h
r206135 r206449 268 268 - (void)didEndFormControlInteraction WK_API_AVAILABLE(ios(WK_IOS_TBA)); 269 269 270 @property (nonatomic, readonly) NSArray<UIView *> *_uiTextSelectionRectViews WK_API_AVAILABLE(ios(WK_IOS_TBA)); 271 270 272 #endif 271 273 -
trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm
r205682 r206449 1128 1128 { 1129 1129 if (_assistedNodeInformation.elementType == InputType::None) 1130 return CGRect Zero;1130 return CGRectNull; 1131 1131 return _page->editorState().postLayoutData().selectionClipRect; 1132 1132 } -
trunk/Tools/ChangeLog
r206441 r206449 1 2016-09-27 Dan Bernstein <mitz@apple.com> 2 3 [iOS] REGRESSION (r182126): Selection highlight and handles aren’t visible with WKSelectionGranularityCharacter 4 https://bugs.webkit.org/show_bug.cgi?id=162577 5 <rdar://problem/28481984> 6 7 Reviewed by Simon Fraser. 8 9 * DumpRenderTree/ios/UIScriptControllerIOS.mm: 10 (WTR::UIScriptController::selectionRangeViewRects): Returns null. 11 12 * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: Declared new 13 selectionRangeViewRects attribute. 14 15 * TestRunnerShared/UIScriptContext/UIScriptContext.h: 16 (WTR::UIScriptContext::jsContext): Added this public accessor. 17 18 * TestRunnerShared/UIScriptContext/UIScriptController.cpp: 19 (WTR::selectionRangeViewRects): Generic implementation that returns null. 20 * TestRunnerShared/UIScriptContext/UIScriptController.h: 21 22 * WebKitTestRunner/TestController.cpp: 23 (WTR::updateTestOptionsFromTestHeader): Parse the new useCharacterSelectionGranularity 24 option. 25 26 * WebKitTestRunner/TestOptions.h: Added new useCharacterSelectionGranularity option. 27 28 * WebKitTestRunner/cocoa/TestControllerCocoa.mm: 29 (WTR::TestController::platformCreateWebView): Set the configuration’s selectionGranularity 30 property based on the new option. 31 32 * WebKitTestRunner/ios/PlatformWebViewIOS.mm: 33 (WTR::PlatformWebView::viewSupportsOptions): Compare selection granularity option values. 34 35 * WebKitTestRunner/ios/UIScriptControllerIOS.mm: 36 (WTR::UIScriptController::selectionRangeViewRects): iOS-specific implementation that calls 37 the new -[WKWebView _uiTextSelectionRectViews] and returns an array of view frame 38 dictionaries. 39 1 40 2016-09-27 Daniel Bates <dabates@apple.com> 2 41 -
trunk/Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm
r206282 r206449 190 190 } 191 191 192 JSObjectRef UIScriptController::selectionRangeViewRects() const 193 { 194 return nullptr; 195 } 196 192 197 } 193 198 -
trunk/Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl
r206282 r206449 80 80 readonly attribute object contentVisibleRect; // Returned object has 'left', 'top', 'width', 'height' properties. 81 81 82 readonly attribute object selectionRangeViewRects; // An array of objects with 'left', 'top', 'width', and 'height' properties. 83 82 84 void uiScriptComplete(DOMString result); 83 85 }; -
trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptContext.h
r204877 r206449 83 83 JSObjectRef objectFromRect(const WebCore::FloatRect&) const; 84 84 85 JSGlobalContextRef jsContext() const { return m_context.get(); } 86 85 87 private: 86 88 JSRetainPtr<JSGlobalContextRef> m_context; -
trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp
r206282 r206449 233 233 } 234 234 235 JSObjectRef UIScriptController::selectionRangeViewRects() const 236 { 237 return nullptr; 238 } 239 235 240 void UIScriptController::platformSetDidStartFormControlInteractionCallback() 236 241 { -
trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.h
r206282 r206449 104 104 JSObjectRef contentVisibleRect() const; 105 105 106 JSObjectRef selectionRangeViewRects() const; 107 106 108 void uiScriptComplete(JSStringRef result); 107 109 -
trunk/Tools/WebKitTestRunner/TestController.cpp
r206355 r206449 951 951 if (key == "ignoresViewportScaleLimits") 952 952 testOptions.ignoresViewportScaleLimits = parseBooleanTestHeaderValue(value); 953 if (key == "useCharacterSelectionGranularity") 954 testOptions.useCharacterSelectionGranularity = parseBooleanTestHeaderValue(value); 953 955 pairStart = pairEnd + 1; 954 956 } -
trunk/Tools/WebKitTestRunner/TestOptions.h
r203075 r206449 43 43 bool needsSiteSpecificQuirks { false }; 44 44 bool ignoresViewportScaleLimits { false }; 45 bool useCharacterSelectionGranularity { false }; 45 46 46 47 float deviceScaleFactor { 1 }; -
trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm
r203855 r206449 89 89 if (options.ignoresViewportScaleLimits) 90 90 [copiedConfiguration setIgnoresViewportScaleLimits:YES]; 91 if (options.useCharacterSelectionGranularity) 92 [copiedConfiguration setSelectionGranularity:WKSelectionGranularityCharacter]; 91 93 #endif 92 94 -
trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm
r204853 r206449 279 279 bool PlatformWebView::viewSupportsOptions(const TestOptions& options) const 280 280 { 281 if (m_options.overrideLanguages != options.overrideLanguages || m_options.needsSiteSpecificQuirks != options.needsSiteSpecificQuirks )281 if (m_options.overrideLanguages != options.overrideLanguages || m_options.needsSiteSpecificQuirks != options.needsSiteSpecificQuirks || m_options.useCharacterSelectionGranularity != options.useCharacterSelectionGranularity) 282 282 return false; 283 283 -
trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm
r206282 r206449 35 35 #import "TestRunnerWKWebView.h" 36 36 #import "UIScriptContext.h" 37 #import <JavaScriptCore/JavaScriptCore.h> 37 38 #import <UIKit/UIKit.h> 38 39 #import <WebCore/FloatRect.h> … … 304 305 } 305 306 307 JSObjectRef UIScriptController::selectionRangeViewRects() const 308 { 309 NSMutableArray *selectionRects = [[NSMutableArray alloc] init]; 310 for (UIView *rectView in TestController::singleton().mainWebView()->platformView()._uiTextSelectionRectViews) { 311 if (rectView.hidden) 312 continue; 313 314 CGRect frame = rectView.frame; 315 [selectionRects addObject:@{ 316 @"left": @(frame.origin.x), 317 @"top": @(frame.origin.y), 318 @"width": @(frame.size.width), 319 @"height": @(frame.size.height), 320 }]; 321 } 322 return JSValueToObject(m_context->jsContext(), [JSValue valueWithObject:selectionRects inContext:[JSContext contextWithJSGlobalContextRef:m_context->jsContext()]].JSValueRef, nullptr); 323 } 324 306 325 void UIScriptController::platformSetDidStartFormControlInteractionCallback() 307 326 {
Note:
See TracChangeset
for help on using the changeset viewer.