[webkit-changes] [211598] trunk/Source/WebKit2
Title: [211598] trunk/Source/WebKit2 Revision 211598 Author enr...@apple.com Date 2017-02-02 15:12:43 -0800 (Thu, 02 Feb 2017) Log Message WK2: cannot tap on candidate view with hardware keyboard. https://bugs.webkit.org/show_bug.cgi?id=167761 rdar://problem/28775395 Reviewed by Tim Horton. The candidate view is a subview of the view returned by automaticallySelectedOverlay and it should be the unscaled view instead of the WKContentView. * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView automaticallySelectedOverlay]): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (211597 => 211598) --- trunk/Source/WebKit2/ChangeLog 2017-02-02 23:03:38 UTC (rev 211597) +++ trunk/Source/WebKit2/ChangeLog 2017-02-02 23:12:43 UTC (rev 211598) @@ -1,3 +1,18 @@ +2017-02-02 Enrica Casucci + +WK2: cannot tap on candidate view with hardware keyboard. +https://bugs.webkit.org/show_bug.cgi?id=167761 +rdar://problem/28775395 + +Reviewed by Tim Horton. + +The candidate view is a subview of the view returned by +automaticallySelectedOverlay and it should be the unscaled view +instead of the WKContentView. + +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView automaticallySelectedOverlay]): + 2017-02-02 Wenson Hsieh Drag images should be anchored to the mouse location Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (211597 => 211598) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2017-02-02 23:03:38 UTC (rev 211597) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2017-02-02 23:12:43 UTC (rev 211598) @@ -3615,7 +3615,7 @@ - (UIView *)automaticallySelectedOverlay { -return self; +return [self unscaledView]; } - (UITextGranularity)selectionGranularity ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [211538] trunk/Source/WebKit2
Title: [211538] trunk/Source/WebKit2 Revision 211538 Author enr...@apple.com Date 2017-02-01 15:25:15 -0800 (Wed, 01 Feb 2017) Log Message WebProcess crashes in int WTF::__throw_bad_variant_access when expanding/shrinking a block selection. https://bugs.webkit.org/show_bug.cgi?id=167673 rdar://problem/30229620 Reviewed by Anders Carlsson This is a speculative fix for a bug that might have been introduced with http://trac.webkit.org/changeset/208479. The code in containsRange inline fuction in WebPageIOS.mm has not been updated when the return value of Range::compareBoundaryPoints was changed to ExceptionOr. Since there is already a method containsRange in the Range class that does the right thing, expandedRangeFromHandle now uses that. * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::expandedRangeFromHandle): (WebKit::containsRange): Deleted. Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (211537 => 211538) --- trunk/Source/WebKit2/ChangeLog 2017-02-01 23:16:20 UTC (rev 211537) +++ trunk/Source/WebKit2/ChangeLog 2017-02-01 23:25:15 UTC (rev 211538) @@ -1,3 +1,23 @@ +2017-02-01 Enrica Casucci + +WebProcess crashes in int WTF::__throw_bad_variant_access when expanding/shrinking a block selection. +https://bugs.webkit.org/show_bug.cgi?id=167673 +rdar://problem/30229620 + +Reviewed by Anders Carlsson + +This is a speculative fix for a bug that might have been introduced +with http://trac.webkit.org/changeset/208479. +The code in containsRange inline fuction in WebPageIOS.mm has not been +updated when the return value of Range::compareBoundaryPoints was changed +to ExceptionOr. +Since there is already a method containsRange in the Range class that +does the right thing, expandedRangeFromHandle now uses that. + +* WebProcess/WebPage/ios/WebPageIOS.mm: +(WebKit::WebPage::expandedRangeFromHandle): +(WebKit::containsRange): Deleted. + 2017-02-01 Anders Carlsson IPC::Connection receive ports should be guarded Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (211537 => 211538) --- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2017-02-01 23:16:20 UTC (rev 211537) +++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2017-02-01 23:25:15 UTC (rev 211538) @@ -1272,15 +1272,6 @@ && (heightRatio > minMagnitudeRatio && yOriginShiftRatio < maxDisplacementRatio)); } -static inline bool containsRange(Range* first, Range* second) -{ -if (!first || !second) -return false; -return first->commonAncestorContainer()->ownerDocument() == second->commonAncestorContainer()->ownerDocument() -&& first->compareBoundaryPoints(Range::START_TO_START, *second).releaseReturnValue() <= 0 -&& first->compareBoundaryPoints(Range::END_TO_END, *second).releaseReturnValue() >= 0; -} - static inline RefPtr unionDOMRanges(Range* rangeA, Range* rangeB) { if (!rangeB) @@ -1350,9 +1341,9 @@ if (!rangeAtPosition || ¤tRange->ownerDocument() != &rangeAtPosition->ownerDocument()) continue; -if (containsRange(rangeAtPosition.get(), currentRange)) +if (rangeAtPosition->contains(*currentRange)) newRange = rangeAtPosition; -else if (containsRange(currentRange, rangeAtPosition.get())) +else if (currentRange->contains(*rangeAtPosition.get())) newRange = currentRange; else newRange = unionDOMRanges(currentRange, rangeAtPosition.get()); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [210687] trunk
Title: [210687] trunk Revision 210687 Author enr...@apple.com Date 2017-01-12 16:36:58 -0800 (Thu, 12 Jan 2017) Log Message Do not allow selection of editable content when not editing. https://bugs.webkit.org/show_bug.cgi?id=166897 Reviewed by Tim Horton. Source/WebKit2: Test: fast/events/touch/ios/long-press-on-editable.html When retrieving the position information, we should not consider as candidates for selection editable elements, since this is only used for non editable selections. * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::isAssistableElement): Moved within the file. (WebKit::WebPage::getPositionInformation): LayoutTests: * fast/events/touch/ios/long-press-on-editable-expected.txt: Added. * fast/events/touch/ios/long-press-on-editable.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm Added Paths trunk/LayoutTests/fast/events/touch/ios/long-press-on-editable-expected.txt trunk/LayoutTests/fast/events/touch/ios/long-press-on-editable.html Diff Modified: trunk/LayoutTests/ChangeLog (210686 => 210687) --- trunk/LayoutTests/ChangeLog 2017-01-13 00:15:51 UTC (rev 210686) +++ trunk/LayoutTests/ChangeLog 2017-01-13 00:36:58 UTC (rev 210687) @@ -1,3 +1,14 @@ +2017-01-12 Enrica Casucci + +Do not allow selection of editable content when not editing. +https://bugs.webkit.org/show_bug.cgi?id=166897 + + +Reviewed by Tim Horton. + +* fast/events/touch/ios/long-press-on-editable-expected.txt: Added. +* fast/events/touch/ios/long-press-on-editable.html: Added. + 2017-01-12 Ryan Haddad Marking fast/mediastream/MediaStream-video-element-video-tracks-disabled-then-enabled.html as a timeout on mac-wk2. Added: trunk/LayoutTests/fast/events/touch/ios/long-press-on-editable-expected.txt (0 => 210687) --- trunk/LayoutTests/fast/events/touch/ios/long-press-on-editable-expected.txt (rev 0) +++ trunk/LayoutTests/fast/events/touch/ios/long-press-on-editable-expected.txt 2017-01-13 00:36:58 UTC (rev 210687) @@ -0,0 +1,2 @@ +PASS: no selection made + Added: trunk/LayoutTests/fast/events/touch/ios/long-press-on-editable.html (0 => 210687) --- trunk/LayoutTests/fast/events/touch/ios/long-press-on-editable.html (rev 0) +++ trunk/LayoutTests/fast/events/touch/ios/long-press-on-editable.html 2017-01-13 00:36:58 UTC (rev 210687) @@ -0,0 +1,59 @@ + + + + + +if (window.testRunner) { +testRunner.dumpAsText(); +testRunner.waitUntilDone(); +} + +function getPressScript() +{ +return ` +(function() { +uiController.longPressAtPoint(30, 20, function() { +uiController.uiScriptComplete(); +}); +})();` +} + +function runTest() +{ +if (!testRunner.runUIScript) +return; + +var output = ''; +var target = document.getElementById('target'); +if (testRunner.runUIScript) { +testRunner.runUIScript(getPressScript(), function(result) { +var selectionText = document.getSelection().toString(); +if (selectionText == "PressMe") +output += 'FAILED: Selected: ' + selectionText; +else +output += 'PASS: no selection made'; +output += '<br>'; +document.getElementById('target').innerHTML = output; +testRunner.notifyDone(); +}); +} +} + +window.addEventListener('load', runTest, false); + + +#target { +height: 100px; +width: 200px; +background-color: silver; +} + + + + + + PressMe +This test requires UIScriptController to run. + + + Modified: trunk/Source/WebKit2/ChangeLog (210686 => 210687) --- trunk/Source/WebKit2/ChangeLog 2017-01-13 00:15:51 UTC (rev 210686) +++ trunk/Source/WebKit2/ChangeLog 2017-01-13 00:36:58 UTC (rev 210687) @@ -1,3 +1,21 @@ +2017-01-12 Enrica Casucci + +Do not allow selection of editable content when not editing. +https://bugs.webkit.org/show_bug.cgi?id=166897 + + +Reviewed by Tim Horton. + +Test: fast/events/touch/ios/long-press-on-editable.html + +When retrieving the position information, we should not consider +as candidates for selection editable elements, since this is only +used for non editable selections. + +* WebProcess/WebPage/ios/WebPageIOS.mm: +(WebKit::isAssistableElement): Moved within the file. +(WebKit::WebPage::getPositionInformation): + 2017-01-12 Megan Gardn
[webkit-changes] [210525] trunk/Source/WebKit2
Title: [210525] trunk/Source/WebKit2 Revision 210525 Author enr...@apple.com Date 2017-01-09 15:17:52 -0800 (Mon, 09 Jan 2017) Log Message Selection animation flashing on editable content when zooming. https://bugs.webkit.org/show_bug.cgi?id=166863 rdar://problem/29931470 Reviewed by Tim Horton. Implementing _allowAnimatedUpdateSelectionRectView and returning NO, prevents the selection animation in UIKit. * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _allowAnimatedUpdateSelectionRectViews]): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (210524 => 210525) --- trunk/Source/WebKit2/ChangeLog 2017-01-09 22:35:27 UTC (rev 210524) +++ trunk/Source/WebKit2/ChangeLog 2017-01-09 23:17:52 UTC (rev 210525) @@ -1,3 +1,17 @@ +2017-01-09 Enrica Casucci + +Selection animation flashing on editable content when zooming. +https://bugs.webkit.org/show_bug.cgi?id=166863 +rdar://problem/29931470 + +Reviewed by Tim Horton. + +Implementing _allowAnimatedUpdateSelectionRectView and returning NO, +prevents the selection animation in UIKit. + +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView _allowAnimatedUpdateSelectionRectViews]): + 2017-01-06 Gustavo Noronha Silva [GTK] Should support key and code properties on keyboard events Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (210524 => 210525) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2017-01-09 22:35:27 UTC (rev 210524) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2017-01-09 23:17:52 UTC (rev 210525) @@ -2748,6 +2748,11 @@ // Keyboard interaction // UITextInput protocol implementation +- (BOOL)_allowAnimatedUpdateSelectionRectViews +{ +return NO; +} + - (void)beginSelectionChange { [self.inputDelegate selectionWillChange:self]; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [210363] trunk/Source/WebKit2
Title: [210363] trunk/Source/WebKit2 Revision 210363 Author enr...@apple.com Date 2017-01-05 10:54:47 -0800 (Thu, 05 Jan 2017) Log Message Unreviewed build fix after https://trac.webkit.org/changeset/210360 * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::performDragOperation): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (210362 => 210363) --- trunk/Source/WebKit2/ChangeLog 2017-01-05 18:32:24 UTC (rev 210362) +++ trunk/Source/WebKit2/ChangeLog 2017-01-05 18:54:47 UTC (rev 210363) @@ -1,5 +1,12 @@ 2017-01-05 Enrica Casucci +Unreviewed build fix after https://trac.webkit.org/changeset/210360 + +* UIProcess/Cocoa/WebViewImpl.mm: +(WebKit::WebViewImpl::performDragOperation): + +2017-01-05 Enrica Casucci + Support File Promise during drag for macOS. https://bugs.webkit.org/show_bug.cgi?id=165204 rdar://problem/19595567 Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm (210362 => 210363) --- trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm 2017-01-05 18:32:24 UTC (rev 210362) +++ trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm 2017-01-05 18:54:47 UTC (rev 210363) @@ -3662,7 +3662,7 @@ createSandboxExtensionsIfNeeded(fileNames, sandboxExtensionHandle, sandboxExtensionForUpload); } #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 -else if (![types containsObject:WebArchivePboardType] && [types containsObject:NSFilesPromisePboardType]) { +else if (![types containsObject:PasteboardTypes::WebArchivePboardType] && [types containsObject:NSFilesPromisePboardType]) { NSArray *files = [draggingInfo.draggingPasteboard propertyListForType:NSFilesPromisePboardType]; if (![files isKindOfClass:[NSArray class]]) { delete dragData; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [210360] trunk/Source
Title: [210360] trunk/Source Revision 210360 Author enr...@apple.com Date 2017-01-05 10:29:00 -0800 (Thu, 05 Jan 2017) Log Message Support File Promise during drag for macOS. https://bugs.webkit.org/show_bug.cgi?id=165204 rdar://problem/19595567 Reviewed by Tim Horton. Source/WebCore: Adds the support for handling File Promise type during drag. DragData now has the knowledge of the NSFilesPromisePboardType and checks for the data type during drag. * page/mac/DragControllerMac.mm: (WebCore::DragController::dragOperation): * platform/DragData.h: (WebCore::DragData::setFileNames): (WebCore::DragData::fileNames): * platform/mac/DragDataMac.mm: (WebCore::DragData::containsFiles): (WebCore::DragData::numberOfFiles): (WebCore::DragData::asFilenames): (WebCore::DragData::containsCompatibleContent): (WebCore::DragData::containsPromise): (WebCore::DragData::asURL): Source/WebKit/mac: Adds support for dropping a File Promise in a WebView. The implementation uses new File Promise API available in Sierra. * Misc/WebNSPasteboardExtras.mm: (+[NSPasteboard _web_dragTypesForURL]): * WebView/WebView.mm: (-[WebView performDragOperation:]): Source/WebKit2: Adds support for dropping a File Promise in a WKWebView. The implementation uses new File Promise API available in Sierra. * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder::encode): (IPC::ArgumentCoder::decode): * Shared/mac/PasteboardTypes.mm: (WebKit::PasteboardTypes::forURL): * UIProcess/Cocoa/WebViewImpl.h: * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::createSandboxExtensionsIfNeeded): (WebKit::WebViewImpl::performDragOperation): (WebKit::maybeCreateSandboxExtensionFromPasteboard): Deleted. (WebKit::createSandboxExtensionsForFileUpload): Deleted. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/page/mac/DragControllerMac.mm trunk/Source/WebCore/platform/DragData.h trunk/Source/WebCore/platform/mac/DragDataMac.mm trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/Misc/WebNSPasteboardExtras.mm trunk/Source/WebKit/mac/WebView/WebView.mm trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp trunk/Source/WebKit2/Shared/mac/PasteboardTypes.mm trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm Diff Modified: trunk/Source/WebCore/ChangeLog (210359 => 210360) --- trunk/Source/WebCore/ChangeLog 2017-01-05 18:05:29 UTC (rev 210359) +++ trunk/Source/WebCore/ChangeLog 2017-01-05 18:29:00 UTC (rev 210360) @@ -1,3 +1,28 @@ +2017-01-05 Enrica Casucci + +Support File Promise during drag for macOS. +https://bugs.webkit.org/show_bug.cgi?id=165204 +rdar://problem/19595567 + +Reviewed by Tim Horton. + +Adds the support for handling File Promise type during +drag. DragData now has the knowledge of the NSFilesPromisePboardType and +checks for the data type during drag. + +* page/mac/DragControllerMac.mm: +(WebCore::DragController::dragOperation): +* platform/DragData.h: +(WebCore::DragData::setFileNames): +(WebCore::DragData::fileNames): +* platform/mac/DragDataMac.mm: +(WebCore::DragData::containsFiles): +(WebCore::DragData::numberOfFiles): +(WebCore::DragData::asFilenames): +(WebCore::DragData::containsCompatibleContent): +(WebCore::DragData::containsPromise): +(WebCore::DragData::asURL): + 2017-01-05 Per Arne Vollan [Win] Compile error. Modified: trunk/Source/WebCore/page/mac/DragControllerMac.mm (210359 => 210360) --- trunk/Source/WebCore/page/mac/DragControllerMac.mm 2017-01-05 18:05:29 UTC (rev 210359) +++ trunk/Source/WebCore/page/mac/DragControllerMac.mm 2017-01-05 18:29:00 UTC (rev 210360) @@ -61,7 +61,7 @@ DragOperation DragController::dragOperation(const DragData& dragData) { -if ((dragData.flags() & DragApplicationIsModal) || !dragData.containsURL()) +if ((dragData.flags() & DragApplicationIsModal) || !(dragData.containsURL() || dragData.containsPromise())) return DragOperationNone; if (!m_documentUnderMouse || (!(dragData.flags() & (DragApplicationHasAttachedSheet | DragApplicationIsSource Modified: trunk/Source/WebCore/platform/DragData.h (210359 => 210360) --- trunk/Source/WebCore/platform/DragData.h 2017-01-05 18:05:29 UTC (rev 210359) +++ trunk/Source/WebCore/platform/DragData.h 2017-01-05 18:29:00 UTC (rev 210360) @@ -105,8 +105,11 @@ bool containsColor() const; bool containsFiles() const; unsigned numberOfFiles() const; +void setFileNames(Vector& fileNames) { m_fileNames = WTFMove(fileNames); } +const Vector& fileNames() const { return m_fileNames; } #if PLATFORM(MAC) const String& pasteboardName() const { return m_pasteboardName; } +bool containsPromise() const; #endif #if PLATFORM(GTK) @@ -128,6 +131,7 @@ DragDataRef m
[webkit-changes] [210287] trunk/Source
Title: [210287] trunk/Source Revision 210287 Author enr...@apple.com Date 2017-01-04 14:30:32 -0800 (Wed, 04 Jan 2017) Log Message Support File Promise during drag for macOS. https://bugs.webkit.org/show_bug.cgi?id=165204 rdar://problem/19595567 Reviewed by Tim Horton. Source/WebCore: Adds the support for handling File Promise type during drag. DragData now has the knowledge of the NSFilesPromisePboardType and checks for the data type during drag. * page/mac/DragControllerMac.mm: (WebCore::DragController::dragOperation): * platform/DragData.h: (WebCore::DragData::setFileNames): (WebCore::DragData::fileNames): * platform/mac/DragDataMac.mm: (WebCore::DragData::containsFiles): (WebCore::DragData::numberOfFiles): (WebCore::DragData::asFilenames): (WebCore::DragData::containsCompatibleContent): (WebCore::DragData::containsPromise): (WebCore::DragData::asURL): Source/WebKit/mac: Adds support for dropping a File Promise in a WebView. The implementation uses new File Promise API available in Sierra. * Misc/WebNSPasteboardExtras.mm: (+[NSPasteboard _web_dragTypesForURL]): * WebView/WebView.mm: (-[WebView performDragOperation:]): Source/WebKit2: Adds support for dropping a File Promise in a WKWebView. The implementation uses new File Promise API available in Sierra. * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder::encode): (IPC::ArgumentCoder::decode): * Shared/mac/PasteboardTypes.mm: (WebKit::PasteboardTypes::forURL): * UIProcess/Cocoa/WebViewImpl.h: * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::createSandboxExtensionsIfNeeded): (WebKit::WebViewImpl::performDragOperation): (WebKit::maybeCreateSandboxExtensionFromPasteboard): Deleted. (WebKit::createSandboxExtensionsForFileUpload): Deleted. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/page/mac/DragControllerMac.mm trunk/Source/WebCore/platform/DragData.h trunk/Source/WebCore/platform/mac/DragDataMac.mm trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/Misc/WebNSPasteboardExtras.mm trunk/Source/WebKit/mac/WebView/WebView.mm trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp trunk/Source/WebKit2/Shared/mac/PasteboardTypes.mm trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm Diff Modified: trunk/Source/WebCore/ChangeLog (210286 => 210287) --- trunk/Source/WebCore/ChangeLog 2017-01-04 22:10:29 UTC (rev 210286) +++ trunk/Source/WebCore/ChangeLog 2017-01-04 22:30:32 UTC (rev 210287) @@ -1,3 +1,28 @@ +2017-01-04 Enrica Casucci + +Support File Promise during drag for macOS. +https://bugs.webkit.org/show_bug.cgi?id=165204 +rdar://problem/19595567 + +Reviewed by Tim Horton. + +Adds the support for handling File Promise type during +drag. DragData now has the knowledge of the NSFilesPromisePboardType and +checks for the data type during drag. + +* page/mac/DragControllerMac.mm: +(WebCore::DragController::dragOperation): +* platform/DragData.h: +(WebCore::DragData::setFileNames): +(WebCore::DragData::fileNames): +* platform/mac/DragDataMac.mm: +(WebCore::DragData::containsFiles): +(WebCore::DragData::numberOfFiles): +(WebCore::DragData::asFilenames): +(WebCore::DragData::containsCompatibleContent): +(WebCore::DragData::containsPromise): +(WebCore::DragData::asURL): + 2017-01-04 Chris Dumez Assertion hit on redfin.com: ASSERTION FAILED: collection->length() > 1 Modified: trunk/Source/WebCore/page/mac/DragControllerMac.mm (210286 => 210287) --- trunk/Source/WebCore/page/mac/DragControllerMac.mm 2017-01-04 22:10:29 UTC (rev 210286) +++ trunk/Source/WebCore/page/mac/DragControllerMac.mm 2017-01-04 22:30:32 UTC (rev 210287) @@ -61,7 +61,7 @@ DragOperation DragController::dragOperation(const DragData& dragData) { -if ((dragData.flags() & DragApplicationIsModal) || !dragData.containsURL()) +if ((dragData.flags() & DragApplicationIsModal) || !(dragData.containsURL() || dragData.containsPromise())) return DragOperationNone; if (!m_documentUnderMouse || (!(dragData.flags() & (DragApplicationHasAttachedSheet | DragApplicationIsSource Modified: trunk/Source/WebCore/platform/DragData.h (210286 => 210287) --- trunk/Source/WebCore/platform/DragData.h 2017-01-04 22:10:29 UTC (rev 210286) +++ trunk/Source/WebCore/platform/DragData.h 2017-01-04 22:30:32 UTC (rev 210287) @@ -105,8 +105,11 @@ bool containsColor() const; bool containsFiles() const; unsigned numberOfFiles() const; +void setFileNames(Vector& fileNames) { m_fileNames = WTFMove(fileNames); } +const Vector& fileNames() const { return m_fileNames; } #if PLATFORM(MAC) const String& pasteboardName() const { return m_pasteboardName; } +bool containsPromise() const; #endif #if PLATFOR
[webkit-changes] [208904] trunk/Source
Title: [208904] trunk/Source Revision 208904 Author enr...@apple.com Date 2016-11-18 15:35:28 -0800 (Fri, 18 Nov 2016) Log Message Refactor drag and drop for WebKit2 to encode DragData message exchange. https://bugs.webkit.org/show_bug.cgi?id=164945 Reviewed by Tim Horton. Source/WebCore: No new tests. No change in functionality. * loader/EmptyClients.h: * page/DragClient.h: * page/DragController.cpp: (WebCore::createMouseEvent): (WebCore::documentFragmentFromDragData): (WebCore::DragController::dragIsMove): (WebCore::DragController::dragEntered): (WebCore::DragController::dragExited): (WebCore::DragController::dragUpdated): (WebCore::DragController::performDragOperation): (WebCore::DragController::dragEnteredOrUpdated): (WebCore::DragController::tryDocumentDrag): (WebCore::DragController::operationForLoad): (WebCore::DragController::dispatchTextInputEventFor): (WebCore::DragController::concludeEditDrag): (WebCore::DragController::canProcessDrag): (WebCore::DragController::tryDHTMLDrag): * page/DragController.h: * page/efl/DragControllerEfl.cpp: (WebCore::DragController::isCopyKeyDown): (WebCore::DragController::dragOperation): * page/gtk/DragControllerGtk.cpp: (WebCore::DragController::isCopyKeyDown): (WebCore::DragController::dragOperation): * page/mac/DragControllerMac.mm: (WebCore::DragController::isCopyKeyDown): (WebCore::DragController::dragOperation): * page/win/DragControllerWin.cpp: (WebCore::DragController::dragOperation): (WebCore::DragController::isCopyKeyDown): * platform/DragData.h: (WebCore::DragData::DragData): Source/WebKit/mac: * WebCoreSupport/WebDragClient.h: * WebCoreSupport/WebDragClient.mm: (WebDragClient::actionMaskForDrag): (WebDragClient::willPerformDragDestinationAction): Source/WebKit2: * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder::encode): (IPC::ArgumentCoder::decode): * Shared/WebCoreArgumentCoders.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::performDragControllerAction): * WebProcess/WebCoreSupport/WebDragClient.cpp: (WebKit::WebDragClient::willPerformDragDestinationAction): (WebKit::WebDragClient::actionMaskForDrag): * WebProcess/WebCoreSupport/WebDragClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::performDragControllerAction): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/loader/EmptyClients.h trunk/Source/WebCore/page/DragClient.h trunk/Source/WebCore/page/DragController.cpp trunk/Source/WebCore/page/DragController.h trunk/Source/WebCore/page/efl/DragControllerEfl.cpp trunk/Source/WebCore/page/gtk/DragControllerGtk.cpp trunk/Source/WebCore/page/mac/DragControllerMac.mm trunk/Source/WebCore/page/win/DragControllerWin.cpp trunk/Source/WebCore/platform/DragData.h trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.h trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.mm trunk/Source/WebKit/win/WebCoreSupport/WebDragClient.cpp trunk/Source/WebKit/win/WebCoreSupport/WebDragClient.h trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.cpp trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.h trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in Diff Modified: trunk/Source/WebCore/ChangeLog (208903 => 208904) --- trunk/Source/WebCore/ChangeLog 2016-11-18 23:33:05 UTC (rev 208903) +++ trunk/Source/WebCore/ChangeLog 2016-11-18 23:35:28 UTC (rev 208904) @@ -1,3 +1,45 @@ +2016-11-18 Enrica Casucci + +Refactor drag and drop for WebKit2 to encode DragData message exchange. +https://bugs.webkit.org/show_bug.cgi?id=164945 + +Reviewed by Tim Horton. + +No new tests. No change in functionality. + +* loader/EmptyClients.h: +* page/DragClient.h: +* page/DragController.cpp: +(WebCore::createMouseEvent): +(WebCore::documentFragmentFromDragData): +(WebCore::DragController::dragIsMove): +(WebCore::DragController::dragEntered): +(WebCore::DragController::dragExited): +(WebCore::DragController::dragUpdated): +(WebCore::DragController::performDragOperation): +(WebCore::DragController::dragEnteredOrUpdated): +(WebCore::DragController::tryDocumentDrag): +(WebCore::DragController::operationForLoad): +(WebCore::DragController::dispatchTextInputEventFor): +(WebCore::DragController::concludeEditDrag): +(WebCore::DragController::canProcessDrag): +(WebCore::DragController::tryDHTMLDrag): +* page/DragController.h: +* page/efl/DragControllerEfl.cpp: +(WebCore::DragController::isCopyKeyDown): +(WebC
[webkit-changes] [204183] trunk/Tools
Title: [204183] trunk/Tools Revision 204183 Author enr...@apple.com Date 2016-08-05 12:16:34 -0700 (Fri, 05 Aug 2016) Log Message Fixing tests failing after r204175. Unreviewed. * TestWebKitAPI/Configurations/WebProcessPlugIn.xcconfig: Modified Paths trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Configurations/WebProcessPlugIn.xcconfig Diff Modified: trunk/Tools/ChangeLog (204182 => 204183) --- trunk/Tools/ChangeLog 2016-08-05 19:16:28 UTC (rev 204182) +++ trunk/Tools/ChangeLog 2016-08-05 19:16:34 UTC (rev 204183) @@ -1,5 +1,13 @@ 2016-08-05 Enrica Casucci +Fixing tests failing after r204175. + +Unreviewed. + +* TestWebKitAPI/Configurations/WebProcessPlugIn.xcconfig: + +2016-08-05 Enrica Casucci + Build fix after 204053. Unreviewed. Modified: trunk/Tools/TestWebKitAPI/Configurations/WebProcessPlugIn.xcconfig (204182 => 204183) --- trunk/Tools/TestWebKitAPI/Configurations/WebProcessPlugIn.xcconfig 2016-08-05 19:16:28 UTC (rev 204182) +++ trunk/Tools/TestWebKitAPI/Configurations/WebProcessPlugIn.xcconfig 2016-08-05 19:16:34 UTC (rev 204183) @@ -23,6 +23,8 @@ // THE POSSIBILITY OF SUCH DAMAGE. // +#include "FeatureDefines.xcconfig" + INFOPLIST_FILE = cocoa/WebProcessPlugIn/Info.plist; PRODUCT_NAME = TestWebKitAPI; EXECUTABLE_SUFFIX = .bundle; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [204175] trunk/Tools
Title: [204175] trunk/Tools Revision 204175 Author enr...@apple.com Date 2016-08-05 09:57:34 -0700 (Fri, 05 Aug 2016) Log Message Build fix after 204053. Unreviewed. * TestWebKitAPI/Configurations/Base.xcconfig: * TestWebKitAPI/Tests/WebKit2Cocoa/ContentFilteringPlugIn.mm: (-[MockContentFilterEnabler initWithCoder:]): (-[MockContentFilterEnabler dealloc]): Modified Paths trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Configurations/Base.xcconfig trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ContentFilteringPlugIn.mm Diff Modified: trunk/Tools/ChangeLog (204174 => 204175) --- trunk/Tools/ChangeLog 2016-08-05 16:51:05 UTC (rev 204174) +++ trunk/Tools/ChangeLog 2016-08-05 16:57:34 UTC (rev 204175) @@ -1,3 +1,14 @@ +2016-08-05 Enrica Casucci + +Build fix after 204053. + +Unreviewed. + +* TestWebKitAPI/Configurations/Base.xcconfig: +* TestWebKitAPI/Tests/WebKit2Cocoa/ContentFilteringPlugIn.mm: +(-[MockContentFilterEnabler initWithCoder:]): +(-[MockContentFilterEnabler dealloc]): + 2016-08-05 Konstantin Tokarev Print test name in "Last character read from DRT..." error message. Modified: trunk/Tools/TestWebKitAPI/Configurations/Base.xcconfig (204174 => 204175) --- trunk/Tools/TestWebKitAPI/Configurations/Base.xcconfig 2016-08-05 16:51:05 UTC (rev 204174) +++ trunk/Tools/TestWebKitAPI/Configurations/Base.xcconfig 2016-08-05 16:57:34 UTC (rev 204175) @@ -70,7 +70,7 @@ DEBUG_DEFINES_normal = NDEBUG; DEBUG_DEFINES = $(DEBUG_DEFINES_$(CURRENT_VARIANT)); -SUPPORTED_PLATFORMS = iphoneos iphonesimulator macosx tvos tvsimulator watchos watchsimulator; +SUPPORTED_PLATFORMS = iphoneos iphonesimulator macosx appletvos appletvsimulator watchos watchsimulator; TARGET_MAC_OS_X_VERSION_MAJOR = $(TARGET_MAC_OS_X_VERSION_MAJOR$(MACOSX_DEPLOYMENT_TARGET:suffix:identifier)); TARGET_MAC_OS_X_VERSION_MAJOR_10 = 101000; Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ContentFilteringPlugIn.mm (204174 => 204175) --- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ContentFilteringPlugIn.mm 2016-08-05 16:51:05 UTC (rev 204174) +++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ContentFilteringPlugIn.mm 2016-08-05 16:57:34 UTC (rev 204175) @@ -59,17 +59,21 @@ if (!(self = [super init])) return nil; +#if ENABLE(CONTENT_FILTERING) auto& settings = MockContentFilterSettings::singleton(); settings.setEnabled(true); settings.setDecision(static_cast([decoder decodeIntForKey:@"Decision"])); settings.setDecisionPoint(static_cast([decoder decodeIntForKey:@"DecisionPoint"])); settings.setBlockedString(ASCIILiteral("blocked")); +#endif return self; } - (void)dealloc { +#if ENABLE(CONTENT_FILTERING) MockContentFilterSettings::singleton().setEnabled(false); +#endif [super dealloc]; } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [204053] trunk
Title: [204053] trunk Revision 204053 Author enr...@apple.com Date 2016-08-02 17:00:59 -0700 (Tue, 02 Aug 2016) Log Message Allow building with content filtering disabled. https://bugs.webkit.org/show_bug.cgi?id=160454 Reviewed by Simon Fraser. Source/_javascript_Core: * Configurations/FeatureDefines.xcconfig: Source/WebCore: * Configurations/FeatureDefines.xcconfig: * platform/PlatformContentFilter.h: (WebCore::PlatformContentFilter::unblockRequestDeniedScript): * platform/cocoa/NetworkExtensionContentFilter.h: * platform/cocoa/NetworkExtensionContentFilter.mm: (WebCore::NetworkExtensionContentFilter::unblockHandler): * platform/cocoa/ParentalControlsContentFilter.h: * testing/MockContentFilter.h: Source/WebKit/mac: * Configurations/FeatureDefines.xcconfig: * WebCoreSupport/WebFrameLoaderClient.h: * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::blockedByContentFilterError): Source/WebKit2: * Configurations/FeatureDefines.xcconfig: * Shared/mac/WebCoreArgumentCodersMac.mm: (IPC::ArgumentCoder::decode): (IPC::ArgumentCoder::encode): (IPC::ArgumentCoder::decode): * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm: (WebKit::blockedByContentFilterError): Tools: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Modified Paths trunk/Source/_javascript_Core/ChangeLog trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig trunk/Source/WebCore/platform/PlatformContentFilter.h trunk/Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.h trunk/Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.mm trunk/Source/WebCore/platform/cocoa/ParentalControlsContentFilter.h trunk/Source/WebCore/platform/cocoa/ParentalControlsContentFilter.mm trunk/Source/WebCore/testing/MockContentFilter.h trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Configurations/FeatureDefines.xcconfig trunk/Source/WebKit2/Shared/mac/WebCoreArgumentCodersMac.mm trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebErrorsMac.mm trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig Diff Modified: trunk/Source/_javascript_Core/ChangeLog (204052 => 204053) --- trunk/Source/_javascript_Core/ChangeLog 2016-08-02 23:43:30 UTC (rev 204052) +++ trunk/Source/_javascript_Core/ChangeLog 2016-08-03 00:00:59 UTC (rev 204053) @@ -1,3 +1,12 @@ +2016-08-02 Enrica Casucci + +Allow building with content filtering disabled. +https://bugs.webkit.org/show_bug.cgi?id=160454 + +Reviewed by Simon Fraser. + +* Configurations/FeatureDefines.xcconfig: + 2016-08-02 Csaba Osztrogonác [ARM] Disable Inline Caching on ARMv7 traditional until proper fix Modified: trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig (204052 => 204053) --- trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig 2016-08-02 23:43:30 UTC (rev 204052) +++ trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig 2016-08-03 00:00:59 UTC (rev 204053) @@ -51,7 +51,9 @@ ENABLE_CANVAS_PROXY = ; ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING; ENABLE_ES6_MODULES = ; -ENABLE_CONTENT_FILTERING = ENABLE_CONTENT_FILTERING; +ENABLE_CONTENT_FILTERING[sdk=appletv*] = ; +ENABLE_CONTENT_FILTERING[sdk=iphone*] = ENABLE_CONTENT_FILTERING; +ENABLE_CONTENT_FILTERING[sdk=macosx*] = ENABLE_CONTENT_FILTERING; ENABLE_CSP_NEXT = ; ENABLE_CSS_ANIMATIONS_LEVEL_2 = ENABLE_CSS_ANIMATIONS_LEVEL_2; ENABLE_CSS_BOX_DECORATION_BREAK = ENABLE_CSS_BOX_DECORATION_BREAK; Modified: trunk/Source/WebCore/ChangeLog (204052 => 204053) --- trunk/Source/WebCore/ChangeLog 2016-08-02 23:43:30 UTC (rev 204052) +++ trunk/Source/WebCore/ChangeLog 2016-08-03 00:00:59 UTC (rev 204053) @@ -1,3 +1,19 @@ +2016-08-02 Enrica Casucci + +Allow building with content filtering disabled. +https://bugs.webkit.org/show_bug.cgi?id=160454 + +Reviewed by Simon Fraser. + +* Configurations/FeatureDefines.xcconfig: +* platform/PlatformContentFilter.h: +(WebCore::PlatformContentFilter::unblockRequestDeniedScript): +* platform/cocoa/NetworkExtensionContentFilter.h: +* platform/cocoa/NetworkExtensionContentFilter.mm: +(WebCore::NetworkExtensionContentFilter::unblockHandler): +* platform/cocoa/ParentalControlsContentFilter.h: +* testing/MockContentFilter.h: + 2016-08-02 Dean Jackson Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569 Modified: trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig (204052 => 204053) --- trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig 2016-08-02 23:43:30 UTC (rev 204052) +++
[webkit-changes] [203724] trunk/Source/WebKit2
Title: [203724] trunk/Source/WebKit2 Revision 203724 Author enr...@apple.com Date 2016-07-26 09:32:21 -0700 (Tue, 26 Jul 2016) Log Message Support configurable autocapitalization. https://bugs.webkit.org/show_bug.cgi?id=158860 rdar://problem/27536113 Reviewed by Tim Horton. Autocapitalization should be enabled/disabled regardless of whether we are using advance spelling feature. * UIProcess/mac/TextCheckerMac.mm: (WebKit::TextChecker::checkTextOfParagraph): (WebKit::TextChecker::getGuessesForWord): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/mac/TextCheckerMac.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (203723 => 203724) --- trunk/Source/WebKit2/ChangeLog 2016-07-26 16:29:06 UTC (rev 203723) +++ trunk/Source/WebKit2/ChangeLog 2016-07-26 16:32:21 UTC (rev 203724) @@ -1,3 +1,19 @@ +2016-07-26 Enrica Casucci + +Support configurable autocapitalization. +https://bugs.webkit.org/show_bug.cgi?id=158860 +rdar://problem/27536113 + +Reviewed by Tim Horton. + +Autocapitalization should be enabled/disabled regardless of whether +we are using advance spelling feature. + +* UIProcess/mac/TextCheckerMac.mm: +(WebKit::TextChecker::checkTextOfParagraph): +(WebKit::TextChecker::getGuessesForWord): + + 2016-07-26 Carlos Garcia Campos [Coordinated Graphics] Test fast/fixed-layout/fixed-layout.html crashes in debug Modified: trunk/Source/WebKit2/UIProcess/mac/TextCheckerMac.mm (203723 => 203724) --- trunk/Source/WebKit2/UIProcess/mac/TextCheckerMac.mm 2016-07-26 16:29:06 UTC (rev 203723) +++ trunk/Source/WebKit2/UIProcess/mac/TextCheckerMac.mm 2016-07-26 16:32:21 UTC (rev 203724) @@ -47,12 +47,10 @@ static NSString* const WebAutomaticLinkDetectionEnabled = @"WebAutomaticLinkDetectionEnabled"; static NSString* const WebAutomaticTextReplacementEnabled = @"WebAutomaticTextReplacementEnabled"; -#if HAVE(ADVANCED_SPELL_CHECKING) // FIXME: this needs to be removed and replaced with NSTextCheckingSuppressInitialCapitalizationKey as soon as // rdar://problem/26800924 is fixed. static NSString* const WebTextCheckingSuppressInitialCapitalizationKey = @"SuppressInitialCapitalization"; -#endif using namespace WebCore; @@ -308,7 +306,7 @@ options = @{ NSTextCheckingInsertionPointKey : @(insertionPoint), WebTextCheckingSuppressInitialCapitalizationKey : @(!initialCapitalizationEnabled) }; #else -UNUSED_PARAM(initialCapitalizationEnabled); +options = @{ WebTextCheckingSuppressInitialCapitalizationKey : @(!initialCapitalizationEnabled) }; #endif NSArray *incomingResults = [[NSSpellChecker sharedSpellChecker] checkString:textString.get() range:NSMakeRange(0, text.length()) @@ -449,6 +447,8 @@ #if HAVE(ADVANCED_SPELL_CHECKING) options = @{ NSTextCheckingInsertionPointKey : @(insertionPoint), WebTextCheckingSuppressInitialCapitalizationKey : @(!initialCapitalizationEnabled) }; +#else +options = @{ WebTextCheckingSuppressInitialCapitalizationKey : @(!initialCapitalizationEnabled) }; #endif if (context.length()) { [checker checkString:context range:NSMakeRange(0, context.length()) types:NSTextCheckingTypeOrthography options:options inSpellDocumentWithTag:spellDocumentTag orthography:&orthography wordCount:0]; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [203169] trunk/Source
Title: [203169] trunk/Source Revision 203169 Author enr...@apple.com Date 2016-07-13 11:44:30 -0700 (Wed, 13 Jul 2016) Log Message Update supported platforms in xcconfig files to match the sdk names. https://bugs.webkit.org/show_bug.cgi?id=159728 Reviewed by Tim Horton. * Configurations/Base.xcconfig: Modified Paths trunk/Source/_javascript_Core/ChangeLog trunk/Source/_javascript_Core/Configurations/Base.xcconfig trunk/Source/ThirdParty/ANGLE/ChangeLog trunk/Source/ThirdParty/ANGLE/Configurations/Base.xcconfig trunk/Source/WTF/ChangeLog trunk/Source/WTF/Configurations/Base.xcconfig trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Configurations/Base.xcconfig trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/Configurations/Base.xcconfig trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Configurations/Base.xcconfig trunk/Source/bmalloc/ChangeLog trunk/Source/bmalloc/Configurations/Base.xcconfig Diff Modified: trunk/Source/_javascript_Core/ChangeLog (203168 => 203169) --- trunk/Source/_javascript_Core/ChangeLog 2016-07-13 18:36:02 UTC (rev 203168) +++ trunk/Source/_javascript_Core/ChangeLog 2016-07-13 18:44:30 UTC (rev 203169) @@ -1,3 +1,12 @@ +2016-07-13 Enrica Casucci + +Update supported platforms in xcconfig files to match the sdk names. +https://bugs.webkit.org/show_bug.cgi?id=159728 + +Reviewed by Tim Horton. + +* Configurations/Base.xcconfig: + 2016-07-13 Csaba Osztrogonác CLoop buildfix after r203142 Modified: trunk/Source/_javascript_Core/Configurations/Base.xcconfig (203168 => 203169) --- trunk/Source/_javascript_Core/Configurations/Base.xcconfig 2016-07-13 18:36:02 UTC (rev 203168) +++ trunk/Source/_javascript_Core/Configurations/Base.xcconfig 2016-07-13 18:44:30 UTC (rev 203169) @@ -96,7 +96,7 @@ CODE_SIGN_IDENTITY = -; -SUPPORTED_PLATFORMS = iphoneos iphonesimulator macosx tvos tvsimulator watchos watchsimulator; +SUPPORTED_PLATFORMS = iphoneos iphonesimulator macosx appletvos appletvsimulator watchos watchsimulator; FRAMEWORK_SEARCH_PATHS = $(WK_QUOTED_OVERRIDE_FRAMEWORKS_DIR); Modified: trunk/Source/ThirdParty/ANGLE/ChangeLog (203168 => 203169) --- trunk/Source/ThirdParty/ANGLE/ChangeLog 2016-07-13 18:36:02 UTC (rev 203168) +++ trunk/Source/ThirdParty/ANGLE/ChangeLog 2016-07-13 18:44:30 UTC (rev 203169) @@ -1,3 +1,12 @@ +2016-07-13 Enrica Casucci + +Update supported platforms in xcconfig files to match the sdk names. +https://bugs.webkit.org/show_bug.cgi?id=159728 + +Reviewed by Tim Horton. + +* Configurations/Base.xcconfig: + 2016-05-24 Alex Christensen Fix iOS WebGL after r199738 Modified: trunk/Source/ThirdParty/ANGLE/Configurations/Base.xcconfig (203168 => 203169) --- trunk/Source/ThirdParty/ANGLE/Configurations/Base.xcconfig 2016-07-13 18:36:02 UTC (rev 203168) +++ trunk/Source/ThirdParty/ANGLE/Configurations/Base.xcconfig 2016-07-13 18:44:30 UTC (rev 203169) @@ -43,7 +43,7 @@ PREBINDING = NO; STRIP_INSTALLED_PRODUCT = NO; -SUPPORTED_PLATFORMS = iphoneos iphonesimulator macosx tvos tvsimulator watchos watchsimulator; +SUPPORTED_PLATFORMS = iphoneos iphonesimulator macosx appletvos appletvsimulator watchos watchsimulator; TARGET_MAC_OS_X_VERSION_MAJOR = $(TARGET_MAC_OS_X_VERSION_MAJOR$(MACOSX_DEPLOYMENT_TARGET:suffix:identifier)); TARGET_MAC_OS_X_VERSION_MAJOR_10 = 101000; Modified: trunk/Source/WTF/ChangeLog (203168 => 203169) --- trunk/Source/WTF/ChangeLog 2016-07-13 18:36:02 UTC (rev 203168) +++ trunk/Source/WTF/ChangeLog 2016-07-13 18:44:30 UTC (rev 203169) @@ -1,3 +1,12 @@ +2016-07-13 Enrica Casucci + +Update supported platforms in xcconfig files to match the sdk names. +https://bugs.webkit.org/show_bug.cgi?id=159728 + +Reviewed by Tim Horton. + +* Configurations/Base.xcconfig: + 2016-07-13 Carlos Garcia Campos [GTK] WebKitGtk+ uses too many file descriptors Modified: trunk/Source/WTF/Configurations/Base.xcconfig (203168 => 203169) --- trunk/Source/WTF/Configurations/Base.xcconfig 2016-07-13 18:36:02 UTC (rev 203168) +++ trunk/Source/WTF/Configurations/Base.xcconfig 2016-07-13 18:44:30 UTC (rev 203169) @@ -88,7 +88,7 @@ TARGET_MAC_OS_X_VERSION_MAJOR_12 = 101200; TARGET_MAC_OS_X_VERSION_MAJOR_13 = 101300; -SUPPORTED_PLATFORMS = iphoneos iphonesimulator macosx tvos tvsimulator watchos watchsimulator; +SUPPORTED_PLATFORMS = iphoneos iphonesimulator macosx appletvos appletvsimulator watchos watchsimulator; _javascript_CORE_FRAMEWORKS_DIR = $(SYSTEM_LIBRARY_DIR)/Frameworks; Modified: trunk/Source/WebCore/ChangeLog (203168 => 203169) --- trunk/Source/WebCore/ChangeLog 2016-07-13 18:36:02 UTC (rev 203168) +++ trunk/Source/WebCore/ChangeLog 2016-07-13 18:44:30 UTC (rev 203169) @@ -1,3 +1,12 @@ +2016-07-13 Enrica Casucci + +Update supported platforms in xcconfig files to match the sdk names. +https://bugs.webkit.org/s
[webkit-changes] [203090] trunk/Source/WebKit/win
Title: [203090] trunk/Source/WebKit/win Revision 203090 Author enr...@apple.com Date 2016-07-11 16:05:10 -0700 (Mon, 11 Jul 2016) Log Message Build fix. Unreviewed. * WebDropSource.cpp: (generateMouseEvent): Modified Paths trunk/Source/WebKit/win/ChangeLog trunk/Source/WebKit/win/WebDropSource.cpp Diff Modified: trunk/Source/WebKit/win/ChangeLog (203089 => 203090) --- trunk/Source/WebKit/win/ChangeLog 2016-07-11 22:51:24 UTC (rev 203089) +++ trunk/Source/WebKit/win/ChangeLog 2016-07-11 23:05:10 UTC (rev 203090) @@ -1,5 +1,14 @@ 2016-07-11 Enrica Casucci +Build fix. + +Unreviewed. + +* WebDropSource.cpp: +(generateMouseEvent): + +2016-07-11 Enrica Casucci + Add synthetic click origin to WKNavigationAction. https://bugs.webkit.org/show_bug.cgi?id=159584 rdar://problem/25610422 Modified: trunk/Source/WebKit/win/WebDropSource.cpp (203089 => 203090) --- trunk/Source/WebKit/win/WebDropSource.cpp 2016-07-11 22:51:24 UTC (rev 203089) +++ trunk/Source/WebKit/win/WebDropSource.cpp 2016-07-11 23:05:10 UTC (rev 203090) @@ -101,7 +101,7 @@ if (SUCCEEDED(webView->viewWindow(&viewWindow))) ::ScreenToClient(viewWindow, reinterpret_cast(&localpt)); return PlatformMouseEvent(IntPoint(localpt.x, localpt.y), IntPoint(pt.x, pt.y), -isDrag ? LeftButton : NoButton, PlatformEvent::MouseMoved, 0, false, false, false, false, currentTime(), 0, 0); +isDrag ? LeftButton : NoButton, PlatformEvent::MouseMoved, 0, false, false, false, false, currentTime(), 0, NoTap); } STDMETHODIMP WebDropSource::QueryContinueDrag(_In_ BOOL fEscapePressed, _In_ DWORD grfKeyState) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [203085] trunk/Source
::WebPage::setCompositionForTesting): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::handleSyntheticClick): (WebKit::WebPage::completePendingSyntheticClickForContentChangeObserver): (WebKit::WebPage::completeSyntheticClick): (WebKit::WebPage::sendTapHighlightForNodeIfNecessary): (WebKit::WebPage::handleTwoFingerTapAtPoint): (WebKit::WebPage::potentialTapAtPosition): (WebKit::WebPage::inspectorNodeSearchMovedToPosition): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/dom/Element.cpp trunk/Source/WebCore/dom/MouseEvent.cpp trunk/Source/WebCore/dom/MouseEvent.h trunk/Source/WebCore/dom/SimulatedClick.cpp trunk/Source/WebCore/dom/WheelEvent.cpp trunk/Source/WebCore/page/ContextMenuController.cpp trunk/Source/WebCore/page/DragController.cpp trunk/Source/WebCore/page/EventHandler.cpp trunk/Source/WebCore/platform/PlatformMouseEvent.h trunk/Source/WebCore/replay/SerializationMethods.cpp trunk/Source/WebKit/ios/ChangeLog trunk/Source/WebKit/ios/WebView/WebPDFViewPlaceholder.mm trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/WebView/WebFrame.mm trunk/Source/WebKit/mac/WebView/WebPDFView.mm trunk/Source/WebKit/win/ChangeLog trunk/Source/WebKit/win/WebDropSource.cpp trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Shared/NavigationActionData.cpp trunk/Source/WebKit2/Shared/NavigationActionData.h trunk/Source/WebKit2/Shared/WebEvent.h trunk/Source/WebKit2/Shared/WebMouseEvent.cpp trunk/Source/WebKit2/Shared/mac/WebEventFactory.mm trunk/Source/WebKit2/UIProcess/API/APINavigationAction.h trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.mm trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationActionPrivate.h trunk/Source/WebKit2/UIProcess/WebPageProxy.h trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleNavigationAction.h trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm Diff Modified: trunk/Source/WebCore/ChangeLog (203084 => 203085) --- trunk/Source/WebCore/ChangeLog 2016-07-11 21:10:29 UTC (rev 203084) +++ trunk/Source/WebCore/ChangeLog 2016-07-11 21:34:36 UTC (rev 203085) @@ -1,3 +1,49 @@ +2016-07-11 Enrica Casucci + +Add synthetic click origin to WKNavigationAction. +https://bugs.webkit.org/show_bug.cgi?id=159584 +rdar://problem/25610422 + +Reviewed by Tim Horton. + +Adding plumbing code to pass synthetic click type +through WebCore. + +* dom/Element.cpp: +(WebCore::Element::dispatchMouseEvent): +(WebCore::Element::dispatchMouseForceWillBegin): +* dom/MouseEvent.cpp: +(WebCore::MouseEvent::create): +(WebCore::MouseEvent::MouseEvent): +(WebCore::MouseEvent::initMouseEvent): +(WebCore::MouseEvent::cloneFor): +* dom/MouseEvent.h: +(WebCore::MouseEvent::createForBindings): +(WebCore::MouseEvent::button): +(WebCore::MouseEvent::syntheticClickType): +(WebCore::MouseEvent::buttonDown): +(WebCore::MouseEvent::setRelatedTarget): +* dom/SimulatedClick.cpp: +* dom/WheelEvent.cpp: +(WebCore::WheelEvent::WheelEvent): +* page/ContextMenuController.cpp: +(WebCore::ContextMenuController::showContextMenuAt): +* page/DragController.cpp: +(WebCore::createMouseEvent): +(WebCore::DragController::DragController): +* page/EventHandler.cpp: +(WebCore::EventHandler::dispatchDragEvent): +(WebCore::EventHandler::sendContextMenuEventForKey): +(WebCore::EventHandler::fakeMouseMoveEventTimerFired): +* platform/PlatformMouseEvent.h: +(WebCore::PlatformMouseEvent::PlatformMouseEvent): +(WebCore::PlatformMouseEvent::clickCount): +(WebCore::PlatformMouseEvent::modifierFlags): +(WebCore::PlatformMouseEvent::force): +(WebCore::PlatformMouseEvent::syntheticClickType): +* replay/SerializationMethods.cpp: +(JSC::EncodingTraits::decodeValue): + 2016-07-11 Anders Carlsson Able to open multiple payment sheets in Safari at the same time Modified: trunk/Source/WebCore/dom/Element.cpp (203084 => 203085) --- trunk/Source/WebCore/dom/Element.cpp 2016-07-11 21:10:29 UTC (rev 203084) +++ trunk/Source/WebCore/dom/Element.cpp 2016-07-11 21:34:36 UTC (rev 203085) @@ -292,7 +292,7 @@ mouseEvent->bubbles(), mouseEvent->cancelable(), mouseEvent->view(), mou
[webkit-changes] [202868] trunk/Source/WebKit2
Title: [202868] trunk/Source/WebKit2 Revision 202868 Author enr...@apple.com Date 2016-07-06 12:04:50 -0700 (Wed, 06 Jul 2016) Log Message Limit touch distance for two finger tap. https://bugs.webkit.org/show_bug.cgi?id=159476 rdar://problem/26439052 Reviewed by Beth Dakin. * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView setupInteraction]): * Platform/spi/ios/UIKitSPI.h Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (202867 => 202868) --- trunk/Source/WebKit2/ChangeLog 2016-07-06 18:46:51 UTC (rev 202867) +++ trunk/Source/WebKit2/ChangeLog 2016-07-06 19:04:50 UTC (rev 202868) @@ -1,3 +1,15 @@ +2016-07-06 Enrica Casucci + +Limit touch distance for two finger tap. +https://bugs.webkit.org/show_bug.cgi?id=159476 +rdar://problem/26439052 + +Reviewed by Beth Dakin. + +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView setupInteraction]): +* Platform/spi/ios/UIKitSPI.h + 2016-07-06 Antoine Quint with a wide gamut PDF does not display using a wide gamut color space Modified: trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h (202867 => 202868) --- trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h 2016-07-06 18:46:51 UTC (rev 202867) +++ trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h 2016-07-06 19:04:50 UTC (rev 202868) @@ -315,6 +315,7 @@ @end @interface UITapGestureRecognizer () +@property (nonatomic, getter=_allowableSeparation, setter=_setAllowableSeparation:) CGFloat allowableSeparation; @property (nonatomic, readonly) CGPoint location; @property (nonatomic) CGFloat allowableMovement; @property (nonatomic, readonly) CGPoint centroid; Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (202867 => 202868) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2016-07-06 18:46:51 UTC (rev 202867) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2016-07-06 19:04:50 UTC (rev 202868) @@ -539,6 +539,7 @@ _twoFingerSingleTapGestureRecognizer = adoptNS([[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(_twoFingerSingleTapGestureRecognized:)]); [_twoFingerSingleTapGestureRecognizer setAllowableMovement:60]; +[_twoFingerSingleTapGestureRecognizer _setAllowableSeparation:150]; [_twoFingerSingleTapGestureRecognizer setNumberOfTapsRequired:1]; [_twoFingerSingleTapGestureRecognizer setNumberOfTouchesRequired:2]; [_twoFingerSingleTapGestureRecognizer setDelaysTouchesEnded:NO]; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [202835] trunk
Title: [202835] trunk Revision 202835 Author enr...@apple.com Date 2016-07-05 15:23:49 -0700 (Tue, 05 Jul 2016) Log Message HTMLAttachment elements don't receive clicks after the first on iOS. https://bugs.webkit.org/show_bug.cgi?id=159310 rdar://problem/25776940 Reviewed by Tim Horton. Source/WebCore: shouldSelectOnMouseDown() now returns false on iOS. * html/HTMLAttachmentElement.h: LayoutTests: Updated existing test to correctly reflect the new behavior. * fast/attachment/attachment-select-on-click.html: * platform/ios-simulator-wk1/TestExpectations: * platform/ios-simulator/fast/attachment/attachment-select-on-click-expected.txt: * platform/mac/fast/attachment/attachment-select-on-click-expected.txt: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/fast/attachment/attachment-select-on-click.html trunk/LayoutTests/platform/ios-simulator/fast/attachment/attachment-select-on-click-expected.txt trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations trunk/LayoutTests/platform/mac/fast/attachment/attachment-select-on-click-expected.txt trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/html/HTMLAttachmentElement.h Diff Modified: trunk/LayoutTests/ChangeLog (202834 => 202835) --- trunk/LayoutTests/ChangeLog 2016-07-05 22:21:54 UTC (rev 202834) +++ trunk/LayoutTests/ChangeLog 2016-07-05 22:23:49 UTC (rev 202835) @@ -1,3 +1,18 @@ +2016-07-05 Enrica Casucci + +HTMLAttachment elements don't receive clicks after the first on iOS. +https://bugs.webkit.org/show_bug.cgi?id=159310 +rdar://problem/25776940 + +Reviewed by Tim Horton. + +Updated existing test to correctly reflect the new behavior. + +* fast/attachment/attachment-select-on-click.html: +* platform/ios-simulator-wk1/TestExpectations: +* platform/ios-simulator/fast/attachment/attachment-select-on-click-expected.txt: +* platform/mac/fast/attachment/attachment-select-on-click-expected.txt: + 2016-07-05 Benjamin Poulain [JSC] The prototype cycle checks throws the wrong error type Modified: trunk/LayoutTests/fast/attachment/attachment-select-on-click.html (202834 => 202835) --- trunk/LayoutTests/fast/attachment/attachment-select-on-click.html 2016-07-05 22:21:54 UTC (rev 202834) +++ trunk/LayoutTests/fast/attachment/attachment-select-on-click.html 2016-07-05 22:23:49 UTC (rev 202835) @@ -6,6 +6,7 @@ text before text after + </span><span class="cx"> var file; </span><span class="cx"> if (window.internals) </span><span class="lines">@@ -20,6 +21,8 @@ </span><span class="cx"> eventSender.mouseMoveTo(attachment.offsetLeft + 10, attachment.offsetTop + 10); </span><span class="cx"> eventSender.mouseDown(0); </span><span class="cx"> eventSender.mouseUp(0); </span><ins>+var range = window.getSelection().getRangeAt(0); +document.getElementById("result").innerText = 'Start offset ' + range.startOffset + ' End offset ' + range.endOffset; </ins><span class="cx"> } </span><span class="cx"> Modified: trunk/LayoutTests/platform/ios-simulator/fast/attachment/attachment-select-on-click-expected.txt (202834 => 202835) --- trunk/LayoutTests/platform/ios-simulator/fast/attachment/attachment-select-on-click-expected.txt 2016-07-05 22:21:54 UTC (rev 202834) +++ trunk/LayoutTests/platform/ios-simulator/fast/attachment/attachment-select-on-click-expected.txt 2016-07-05 22:23:49 UTC (rev 202835) @@ -1,8 +1,8 @@ layer at (0,0) size 800x600 RenderView at (0,0) size 800x600 -layer at (0,0) size 800x150 - RenderBlock {HTML} at (0,0) size 800x150 -RenderBody {BODY} at (8,8) size 784x134 +layer at (0,0) size 800x170 + RenderBlock {HTML} at (0,0) size 800x170 +RenderBody {BODY} at (8,8) size 784x154 RenderBlock {DIV} at (0,0) size 784x134 RenderText {#text} at (0,0) size 73x19 text run at (0,0) width 73: "text before " @@ -9,3 +9,7 @@ RenderAttachment {ATTACHMENT} at (72,15) size 161x119 [color=#007AFF] RenderText {#text} at (232,0) size 63x19 text run at (232,0) width 63: " text after" + RenderBlock {DIV} at (0,134) size 784x20 +RenderText {#text} at (0,0) size 181x19 + text run at (0,0) width 181: "Start offset 12 End offset 12" +caret: position 12 of child 0 {#text} of child 1 {DIV} of body Modified: trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations (202834 => 202835) --- trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations 2016-07-05 22:21:54 UTC (rev 202834) +++ trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations 2016-07-05 22:23:49 UTC (rev 202835) @@ -1180,7 +1180,7 @@ editing/selection/mixed-editability-3.html [ Failure ]
[webkit-changes] [202436] trunk/Source/WebCore
Title: [202436] trunk/Source/WebCore Revision 202436 Author enr...@apple.com Date 2016-06-24 11:52:56 -0700 (Fri, 24 Jun 2016) Log Message Do not use iOS specific telephone detection on macOS. https://bugs.webkit.org/show_bug.cgi?id=159096 rdar://problem/25870571 Reviewed by Anders Carlsson. Adding platform guard. * platform/cocoa/TelephoneNumberDetectorCocoa.cpp: (WebCore::TelephoneNumberDetector::phoneNumbersScanner): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/cocoa/TelephoneNumberDetectorCocoa.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (202435 => 202436) --- trunk/Source/WebCore/ChangeLog 2016-06-24 18:51:07 UTC (rev 202435) +++ trunk/Source/WebCore/ChangeLog 2016-06-24 18:52:56 UTC (rev 202436) @@ -1,3 +1,16 @@ +2016-06-24 Enrica Casucci + +Do not use iOS specific telephone detection on macOS. +https://bugs.webkit.org/show_bug.cgi?id=159096 +rdar://problem/25870571 + +Reviewed by Anders Carlsson. + +Adding platform guard. + +* platform/cocoa/TelephoneNumberDetectorCocoa.cpp: +(WebCore::TelephoneNumberDetector::phoneNumbersScanner): + 2016-06-24 Jer Noble Unreviewed build fix after r202429; AVStreamDataParser does not exist on iOS. Modified: trunk/Source/WebCore/platform/cocoa/TelephoneNumberDetectorCocoa.cpp (202435 => 202436) --- trunk/Source/WebCore/platform/cocoa/TelephoneNumberDetectorCocoa.cpp 2016-06-24 18:51:07 UTC (rev 202435) +++ trunk/Source/WebCore/platform/cocoa/TelephoneNumberDetectorCocoa.cpp 2016-06-24 18:52:56 UTC (rev 202436) @@ -47,6 +47,7 @@ static DDDFAScannerRef phoneNumbersScanner() { +#if PLATFORM(IOS) if (!DataDetectorsCoreLibrary()) return nullptr; @@ -56,6 +57,9 @@ static DDDFAScannerRef scanner = DDDFAScannerCreateFromCache(cache); return scanner; +#else +return nullptr; +#endif } bool isSupported() ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [202185] trunk/Source/WebKit2
Title: [202185] trunk/Source/WebKit2 Revision 202185 Author enr...@apple.com Date 2016-06-17 16:31:42 -0700 (Fri, 17 Jun 2016) Log Message Support configurable autocapitalization. https://bugs.webkit.org/show_bug.cgi?id=158860 rdar://problem/26231403 Reviewed by Tim Horton. The behavior of spellchecker should be configurable to avoid unwanted autocapitalization. * UIProcess/API/APIPageConfiguration.cpp: (API::PageConfiguration::copy): * UIProcess/API/APIPageConfiguration.h: (API::PageConfiguration::initialCapitalizationEnabled): (API::PageConfiguration::setInitialCapitalizationEnabled): * UIProcess/API/C/WKPageConfigurationRef.cpp: (WKPageConfigurationSetIntialCapitalizationEnabled): * UIProcess/API/C/WKPageConfigurationRef.h: * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _initializeWithConfiguration:]): * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration copyWithZone:]): (-[WKWebViewConfiguration _initialCapitalizationEnabled]): (-[WKWebViewConfiguration _setInitialCapitalizationEnabled:]): * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: * UIProcess/TextChecker.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::checkTextOfParagraph): (WebKit::WebPageProxy::getGuessesForWord): * UIProcess/WebPageProxy.h: * UIProcess/efl/TextCheckerEfl.cpp: (WebKit::TextChecker::checkTextOfParagraph): (WebKit::TextChecker::getGuessesForWord): * UIProcess/gtk/TextCheckerGtk.cpp: (WebKit::TextChecker::getGuessesForWord): (WebKit::TextChecker::checkTextOfParagraph): * UIProcess/ios/TextCheckerIOS.mm: (WebKit::TextChecker::checkTextOfParagraph): (WebKit::TextChecker::getGuessesForWord): * UIProcess/mac/TextCheckerMac.mm: (WebKit::TextChecker::checkTextOfParagraph): (WebKit::TextChecker::getGuessesForWord): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/API/APIPageConfiguration.cpp trunk/Source/WebKit2/UIProcess/API/APIPageConfiguration.h trunk/Source/WebKit2/UIProcess/API/C/WKPageConfigurationRef.cpp trunk/Source/WebKit2/UIProcess/API/C/WKPageConfigurationRef.h trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h trunk/Source/WebKit2/UIProcess/TextChecker.h trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp trunk/Source/WebKit2/UIProcess/WebPageProxy.h trunk/Source/WebKit2/UIProcess/efl/TextCheckerEfl.cpp trunk/Source/WebKit2/UIProcess/gtk/TextCheckerGtk.cpp trunk/Source/WebKit2/UIProcess/ios/TextCheckerIOS.mm trunk/Source/WebKit2/UIProcess/mac/TextCheckerMac.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (202184 => 202185) --- trunk/Source/WebKit2/ChangeLog 2016-06-17 23:27:28 UTC (rev 202184) +++ trunk/Source/WebKit2/ChangeLog 2016-06-17 23:31:42 UTC (rev 202185) @@ -1,3 +1,48 @@ +2016-06-16 Enrica Casucci + +Support configurable autocapitalization. +https://bugs.webkit.org/show_bug.cgi?id=158860 +rdar://problem/26231403 + +Reviewed by Tim Horton. + +The behavior of spellchecker should be configurable to avoid +unwanted autocapitalization. + +* UIProcess/API/APIPageConfiguration.cpp: +(API::PageConfiguration::copy): +* UIProcess/API/APIPageConfiguration.h: +(API::PageConfiguration::initialCapitalizationEnabled): +(API::PageConfiguration::setInitialCapitalizationEnabled): +* UIProcess/API/C/WKPageConfigurationRef.cpp: +(WKPageConfigurationSetIntialCapitalizationEnabled): +* UIProcess/API/C/WKPageConfigurationRef.h: +* UIProcess/API/Cocoa/WKWebView.mm: +(-[WKWebView _initializeWithConfiguration:]): +* UIProcess/API/Cocoa/WKWebViewConfiguration.mm: +(-[WKWebViewConfiguration copyWithZone:]): +(-[WKWebViewConfiguration _initialCapitalizationEnabled]): +(-[WKWebViewConfiguration _setInitialCapitalizationEnabled:]): +* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: +* UIProcess/TextChecker.h: +* UIProcess/WebPageProxy.cpp: +(WebKit::WebPageProxy::WebPageProxy): +(WebKit::WebPageProxy::checkTextOfParagraph): +(WebKit::WebPageProxy::getGuessesForWord): +* UIProcess/WebPageProxy.h: +* UIProcess/efl/TextCheckerEfl.cpp: +(WebKit::TextChecker::checkTextOfParagraph): +(WebKit::TextChecker::getGuessesForWord): +* UIProcess/gtk/TextCheckerGtk.cpp: +(WebKit::TextChecker::getGuessesForWord): +(WebKit::TextChecker::checkTextOfParagraph): +* UIProcess/ios/TextCheckerIOS.mm: +(WebKit::TextChecker::checkTextOfParagraph): +(WebKit::TextChecker::getGuessesForWord): +* UIProcess/mac/TextCheckerMac.mm: +(WebKit::TextChecker::checkTextOfParagraph): +(WebKit::TextChecker::getGuessesForWord): + 2016-06-17 Chris Dumez Use WTF::NoncopyableFunction
[webkit-changes] [202018] trunk/Source/WebCore
Title: [202018] trunk/Source/WebCore Revision 202018 Author enr...@apple.com Date 2016-06-13 17:17:44 -0700 (Mon, 13 Jun 2016) Log Message REGRESSION(r201956): Failure to initialize new internal settings produced random test failures in release. https://bugs.webkit.org/show_bug.cgi?id=158713 rdar://26769957 Reviewed by Simon Fraser. Failed to initialize the new member variable in both Settings and InternalSettings classes. * page/Settings.cpp: (WebCore::Settings::Settings): * testing/InternalSettings.cpp: (WebCore::InternalSettings::Backup::Backup): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/page/Settings.cpp trunk/Source/WebCore/testing/InternalSettings.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (202017 => 202018) --- trunk/Source/WebCore/ChangeLog 2016-06-14 00:11:16 UTC (rev 202017) +++ trunk/Source/WebCore/ChangeLog 2016-06-14 00:17:44 UTC (rev 202018) @@ -1,3 +1,18 @@ +2016-06-13 Enrica Casucci + +REGRESSION(r201956): Failure to initialize new internal settings produced random test failures in release. +https://bugs.webkit.org/show_bug.cgi?id=158713 +rdar://26769957 + +Reviewed by Simon Fraser. + +Failed to initialize the new member variable in both Settings and InternalSettings classes. + +* page/Settings.cpp: +(WebCore::Settings::Settings): +* testing/InternalSettings.cpp: +(WebCore::InternalSettings::Backup::Backup): + 2016-06-13 Chris Dumez Drop HipChat hack introduced in r197548 Modified: trunk/Source/WebCore/page/Settings.cpp (202017 => 202018) --- trunk/Source/WebCore/page/Settings.cpp 2016-06-14 00:11:16 UTC (rev 202017) +++ trunk/Source/WebCore/page/Settings.cpp 2016-06-14 00:17:44 UTC (rev 202018) @@ -192,6 +192,7 @@ , m_isJavaEnabledForLocalFiles(true) , m_loadsImagesAutomatically(false) , m_areImagesEnabled(true) +, m_preferMIMETypeForImages(false) , m_arePluginsEnabled(false) , m_isScriptEnabled(false) , m_needsAdobeFrameReloadingQuirk(false) Modified: trunk/Source/WebCore/testing/InternalSettings.cpp (202017 => 202018) --- trunk/Source/WebCore/testing/InternalSettings.cpp 2016-06-14 00:11:16 UTC (rev 202017) +++ trunk/Source/WebCore/testing/InternalSettings.cpp 2016-06-14 00:17:44 UTC (rev 202018) @@ -79,6 +79,7 @@ , m_originalMockScrollbarsEnabled(settings.mockScrollbarsEnabled()) , m_langAttributeAwareFormControlUIEnabled(RuntimeEnabledFeatures::sharedFeatures().langAttributeAwareFormControlUIEnabled()) , m_imagesEnabled(settings.areImagesEnabled()) +, m_preferMIMETypeForImages(settings.preferMIMETypeForImages()) , m_minimumTimerInterval(settings.minimumDOMTimerInterval()) #if ENABLE(VIDEO_TRACK) , m_shouldDisplaySubtitles(settings.shouldDisplaySubtitles()) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [201956] trunk
Title: [201956] trunk Revision 201956 Author enr...@apple.com Date 2016-06-10 17:21:16 -0700 (Fri, 10 Jun 2016) Log Message REGRESSION(r198177): Cannot paste an image when the pasteboard format is mime type. https://bugs.webkit.org/show_bug.cgi?id=158590 rdar://problem/25471371 Reviewed by Darin Adler. Source/WebCore: When creating a fragment from an image resource, the resource needs to be added to the document loader before setting the src attribute to the image element, otherwise loading is triggered and the loading fails. In r198177 the order of the operations was changed causing the bug. This patch adds support to test the scenario where the image in the pasteboard is available only as mime type (not WebArchive or RTFD), a situation that occurs more frequently on iOS. Test: editing/pasteboard/image-in-iframe.html * editing/ios/EditorIOS.mm: (WebCore::Editor::createFragmentForImageResourceAndAddResource): * editing/mac/EditorMac.mm: (WebCore::Editor::WebContentReader::readWebArchive): (WebCore::Editor::WebContentReader::readRTFD): (WebCore::Editor::WebContentReader::readRTF): (WebCore::Editor::createFragmentForImageResourceAndAddResource): * page/Settings.cpp: (WebCore::Settings::setImagesEnabled): (WebCore::Settings::setPreferMimeTypeForImages): (WebCore::Settings::setForcePendingWebGLPolicy): * page/Settings.h: (WebCore::Settings::areImagesEnabled): (WebCore::Settings::preferMimeTypeForImages): (WebCore::Settings::arePluginsEnabled): * testing/InternalSettings.cpp: (WebCore::InternalSettings::Backup::restoreTo): (WebCore::InternalSettings::setLangAttributeAwareFormControlUIEnabled): (WebCore::InternalSettings::setPreferMimeTypeForImages): (WebCore::InternalSettings::setImagesEnabled): * testing/InternalSettings.h: * testing/InternalSettings.idl: LayoutTests: * editing/pasteboard/image-in-iframe-expected.txt: Added. * editing/pasteboard/image-in-iframe.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/editing/ios/EditorIOS.mm trunk/Source/WebCore/editing/mac/EditorMac.mm trunk/Source/WebCore/page/Settings.cpp trunk/Source/WebCore/page/Settings.h trunk/Source/WebCore/testing/InternalSettings.cpp trunk/Source/WebCore/testing/InternalSettings.h trunk/Source/WebCore/testing/InternalSettings.idl Added Paths trunk/LayoutTests/editing/pasteboard/image-in-iframe-expected.txt trunk/LayoutTests/editing/pasteboard/image-in-iframe.html Diff Modified: trunk/LayoutTests/ChangeLog (201955 => 201956) --- trunk/LayoutTests/ChangeLog 2016-06-11 00:20:05 UTC (rev 201955) +++ trunk/LayoutTests/ChangeLog 2016-06-11 00:21:16 UTC (rev 201956) @@ -1,3 +1,14 @@ +2016-06-10 Enrica Casucci + +REGRESSION(r198177): Cannot paste an image when the pasteboard format is mime type. +https://bugs.webkit.org/show_bug.cgi?id=158590 +rdar://problem/25471371 + +Reviewed by Darin Adler. + +* editing/pasteboard/image-in-iframe-expected.txt: Added. +* editing/pasteboard/image-in-iframe.html: Added. + 2016-06-10 Ryan Haddad Marking imported/blink/storage/indexeddb/blob-delete-objectstore-db.html as flaky on Yosemite Release WK2 Added: trunk/LayoutTests/editing/pasteboard/image-in-iframe-expected.txt (0 => 201956) --- trunk/LayoutTests/editing/pasteboard/image-in-iframe-expected.txt (rev 0) +++ trunk/LayoutTests/editing/pasteboard/image-in-iframe-expected.txt 2016-06-11 00:21:16 UTC (rev 201956) @@ -0,0 +1,18 @@ +layer at (0,0) size 800x600 + RenderView at (0,0) size 800x600 +layer at (0,0) size 800x276 + RenderBlock {HTML} at (0,0) size 800x276 +RenderBody {BODY} at (8,8) size 784x260 + RenderBlock {DIV} at (0,0) size 502x102 [border: (1px solid #FF)] +RenderImage {IMG} at (1,1) size 76x103 + RenderBlock (anonymous) at (0,102) size 784x158 +RenderIFrame {IFRAME} at (0,0) size 304x154 [border: (2px inset #00)] + layer at (0,0) size 300x150 +RenderView at (0,0) size 300x150 + layer at (0,0) size 300x150 +RenderBlock {HTML} at (0,0) size 300x150 + RenderBody {BODY} at (0,0) size 300x150 +RenderImage {IMG} at (0,0) size 76x103 +RenderText {#text} at (0,0) size 0x0 +RenderText {#text} at (0,0) size 0x0 +caret: position 1 of child 0 {IMG} of child 1 {DIV} of body Added: trunk/LayoutTests/editing/pasteboard/image-in-iframe.html (0 => 201956) --- trunk/LayoutTests/editing/pasteboard/image-in-iframe.html (rev 0) +++ trunk/LayoutTests/editing/pasteboard/image-in-iframe.html 2016-06-11 00:21:16 UTC (rev 201956) @@ -0,0 +1,21 @@ + + + + + + + +function selectInFrame() { +if (window.internals) +window.internals.settings.setPreferMIMETypeForImages(true); +var iframe = document.getElementById("iframe"); +var iframeDocument = iframe.contentDocument; +
[webkit-changes] [201227] trunk
Title: [201227] trunk Revision 201227 Author enr...@apple.com Date 2016-05-20 15:05:01 -0700 (Fri, 20 May 2016) Log Message Drag cannot start if no drag data or custom data is available in the Pasteboard. https://bugs.webkit.org/show_bug.cgi?id=157911 rdar://problem/24577706 Reviewed by Tim Horton. Source/WebKit/mac: We need to make sure there is always one item in common between source and target of the drag and drop operation. * WebView/WebHTMLView.mm: (-[WebHTMLView dragImage:at:offset:event:pasteboard:source:slideBack:]): Source/WebKit2: We need to make sure there is always one item in common between source and target of the drag and drop operation. * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::dragImageForView): LayoutTests: * fast/events/draggable-div-customdata-expected.txt: Added. * fast/events/draggable-div-customdata.html: Added. * platform/ios-simulator/TestExpectations * platform/mac-wk2/TestExpectations Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/ios-simulator/TestExpectations trunk/LayoutTests/platform/mac-wk2/TestExpectations trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/WebView/WebHTMLView.mm trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm Added Paths trunk/LayoutTests/fast/events/draggable-div-customdata-expected.txt trunk/LayoutTests/fast/events/draggable-div-customdata.html Diff Modified: trunk/LayoutTests/ChangeLog (201226 => 201227) --- trunk/LayoutTests/ChangeLog 2016-05-20 21:47:18 UTC (rev 201226) +++ trunk/LayoutTests/ChangeLog 2016-05-20 22:05:01 UTC (rev 201227) @@ -1,3 +1,16 @@ +2016-05-20 Enrica Casucci + +Drag cannot start if no drag data or custom data is available in the Pasteboard. +https://bugs.webkit.org/show_bug.cgi?id=157911 +rdar://problem/24577706 + +Reviewed by Tim Horton. + +* fast/events/draggable-div-customdata-expected.txt: Added. +* fast/events/draggable-div-customdata.html: Added. +* platform/ios-simulator/TestExpectations +* platform/mac-wk2/TestExpectations + 2016-05-20 Alex Christensen Fix null dereferencing in CSSAnimationTriggerScrollValue::equals Added: trunk/LayoutTests/fast/events/draggable-div-customdata-expected.txt (0 => 201227) --- trunk/LayoutTests/fast/events/draggable-div-customdata-expected.txt (rev 0) +++ trunk/LayoutTests/fast/events/draggable-div-customdata-expected.txt 2016-05-20 22:05:01 UTC (rev 201227) @@ -0,0 +1,9 @@ +This test checks that we drag a draggable element without setting data to transfer + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS TEST PASSED: square dropped + +TEST COMPLETE + Added: trunk/LayoutTests/fast/events/draggable-div-customdata.html (0 => 201227) --- trunk/LayoutTests/fast/events/draggable-div-customdata.html (rev 0) +++ trunk/LayoutTests/fast/events/draggable-div-customdata.html 2016-05-20 22:05:01 UTC (rev 201227) @@ -0,0 +1,89 @@ + + + +#dropTarget, #dragMe { text-align: center; display: table-cell; vertical-align: middle } +#dropTarget {width: 256px; height: 256px; border: 1px dashed} +#dragMe {-webkit-user-drag: element; -webkit-user-select: none; background: #ff; width: 64px; height: 64px; color: white} +</style> +<script> +var dragMe; +var dropTarget; +var consoleElm; +var event; + +window._onload_ = function() +{ +dragMe = document.getElementById("dragMe"); +dropTarget = document.getElementById("dropTarget"); +consoleElm = document.getElementById("console"); + +if (!dragMe || !dropTarget || !consoleElm) +return; + +dragMe._onstart_ = dragStart; +dropTarget._ondragover_ = dragOver; +dropTarget._ondrop_ = drop; + +runTest(); +} + +function dragStart(event) +{ +event.dataTransfer.items.add('hello world', 'custom-data'); +} + +function drop(event) +{ +testPassed("TEST PASSED: square dropped"); +event.preventDefault(); +dragMe.parentNode.removeChild(dragMe); +event.target.appendChild(dragMe); +} + +function dragOver(event) +{ +event.preventDefault(); +} + +function runTest() +{ +if (!window.eventSender) +return; + +if (window.testRunner) +testRunner.dumpAsText(); + +var startX = dragMe.offsetLeft + 10; +var startY = dragMe.offsetTop + dragMe.offsetHeight / 2; +var endX = dropTarget.offsetLeft + 10; +var endY = dropTarget.offsetTop + dropTarget.offsetHeight / 2; + +eventSender.mouseMoveTo(startX, startY); +eventSender.mouseDown(); +eventSender.leapForward(1000); +eventSender.mouseMoveTo(endX, endY); +
[webkit-changes] [201199] trunk/Source
Title: [201199] trunk/Source Revision 201199 Author enr...@apple.com Date 2016-05-19 16:32:13 -0700 (Thu, 19 May 2016) Log Message No candidate punctuation when typing punctuation in WK2 text field. https://bugs.webkit.org/show_bug.cgi?id=157773 rdar://problem/23084603 Reviewed by Sam Weinig. Source/WebCore: We need to keep the inputManagerHint as part of the platform key event information. Adding a new initializer for the task and a property to retrieve the stored hint. * platform/ios/WebEvent.h: * platform/ios/WebEvent.mm: (-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:withFlags:keyCode:isTabKey:characterSet:]): (-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:withFlags:withInputManagerHint:keyCode:isTabKey:]): (-[WebEvent dealloc]): (-[WebEvent inputManagerHint]): Source/WebKit2: We need to adopt the new addInputString:withFlags:withInputManagerHint function for this to work propertly. * Platform/spi/ios/UIKitSPI.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _interpretKeyEvent:isCharEvent:]): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/ios/WebEvent.h trunk/Source/WebCore/platform/ios/WebEvent.mm trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm Diff Modified: trunk/Source/WebCore/ChangeLog (201198 => 201199) --- trunk/Source/WebCore/ChangeLog 2016-05-19 22:58:40 UTC (rev 201198) +++ trunk/Source/WebCore/ChangeLog 2016-05-19 23:32:13 UTC (rev 201199) @@ -1,3 +1,22 @@ +2016-05-16 Enrica Casucci + +No candidate punctuation when typing punctuation in WK2 text field. +https://bugs.webkit.org/show_bug.cgi?id=157773 +rdar://problem/23084603 + +Reviewed by Sam Weinig. + +We need to keep the inputManagerHint as part of the platform key event +information. Adding a new initializer for the task and a property to retrieve +the stored hint. + +* platform/ios/WebEvent.h: +* platform/ios/WebEvent.mm: +(-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:withFlags:keyCode:isTabKey:characterSet:]): +(-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:withFlags:withInputManagerHint:keyCode:isTabKey:]): +(-[WebEvent dealloc]): +(-[WebEvent inputManagerHint]): + 2016-05-19 Brady Eidson Finishing off: Modern IDB: Website data store management. Modified: trunk/Source/WebCore/platform/ios/WebEvent.h (201198 => 201199) --- trunk/Source/WebCore/platform/ios/WebEvent.h 2016-05-19 22:58:40 UTC (rev 201198) +++ trunk/Source/WebCore/platform/ios/WebEvent.h 2016-05-19 23:32:13 UTC (rev 201199) @@ -87,6 +87,7 @@ WebEventFlags _modifierFlags; BOOL _keyRepeating; NSUInteger _keyboardFlags; +NSString *_inputManagerHint; uint16_t _keyCode; BOOL _tabKey; @@ -125,6 +126,7 @@ gestureScale:(float)gestureScale gestureRotation:(float)gestureRotation; +// FIXME: this needs to be removed when UIKit adopts the other initializer. - (WebEvent *)initWithKeyEventType:(WebEventType)type timeStamp:(CFTimeInterval)timeStamp characters:(NSString *)characters @@ -136,6 +138,17 @@ isTabKey:(BOOL)tabKey characterSet:(WebEventCharacterSet)characterSet; +- (WebEvent *)initWithKeyEventType:(WebEventType)type + timeStamp:(CFTimeInterval)timeStamp +characters:(NSString *)characters + charactersIgnoringModifiers:(NSString *)charactersIgnoringModifiers + modifiers:(WebEventFlags)modifiers + isRepeating:(BOOL)repeating + withFlags:(NSUInteger)flags + withInputManagerHint:(NSString *)hint + keyCode:(uint16_t)keyCode + isTabKey:(BOOL)tabKey; + @property(nonatomic, readonly) WebEventType type; @property(nonatomic, readonly) CFTimeInterval timestamp; @@ -147,6 +160,7 @@ @property(nonatomic, readonly, retain) NSString *charactersIgnoringModifiers; @property(nonatomic, readonly) WebEventFlags modifierFlags; @property(nonatomic, readonly, getter = isKeyRepeating) BOOL keyRepeating; +@property(nonatomic, readonly, retain) NSString *inputManagerHint; @property(nonatomic, readonly) NSUInteger keyboardFlags; @property(nonatomic, readonly) uint16_t keyCode; Modified: trunk/Source/WebCore/platform/ios/WebEvent.mm (201198 => 201199) --- trunk/Source/WebCore/platform/ios/WebEvent.mm 2016-05-19 22:58:40 UTC (rev 201198) +++ trunk/Source/WebCore/platform/ios/WebEvent.mm 2016-05-19 23:32:13
[webkit-changes] [201189] trunk
Title: [201189] trunk Revision 201189 Author enr...@apple.com Date 2016-05-19 15:19:48 -0700 (Thu, 19 May 2016) Log Message Drag cannot start if no drag data is available in the Pasteboard. https://bugs.webkit.org/show_bug.cgi?id=157911 rdar://problem/24577706 Reviewed by Tim Horton. Source/WebKit/mac: * WebView/WebHTMLView.mm: (+[WebHTMLView _dummyPasteboardType]): (-[WebHTMLView dragImage:at:offset:event:pasteboard:source:slideBack:]): * WebView/WebHTMLViewPrivate.h: * WebView/WebView.mm: (-[WebView _registerDraggedTypes]): Source/WebKit2: Setting dummy data to allow drag to start. * Shared/mac/PasteboardTypes.h: * Shared/mac/PasteboardTypes.mm: * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::registerDraggedTypes): (WebKit::WebViewImpl::dragImageForView): LayoutTests: * fast/events/draggable-div-nodata-expected.txt: Added. * fast/events/draggable-div-nodata.html: Added. * platform/ios-simulator/TestExpectations * platform/mac-wk2/TestExpectations Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/ios-simulator/TestExpectations trunk/LayoutTests/platform/mac-wk2/TestExpectations trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/WebView/WebHTMLView.mm trunk/Source/WebKit/mac/WebView/WebHTMLViewPrivate.h trunk/Source/WebKit/mac/WebView/WebView.mm trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Shared/mac/PasteboardTypes.h trunk/Source/WebKit2/Shared/mac/PasteboardTypes.mm trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm Added Paths trunk/LayoutTests/fast/events/draggable-div-nodata-expected.txt trunk/LayoutTests/fast/events/draggable-div-nodata.html Diff Modified: trunk/LayoutTests/ChangeLog (201188 => 201189) --- trunk/LayoutTests/ChangeLog 2016-05-19 22:11:52 UTC (rev 201188) +++ trunk/LayoutTests/ChangeLog 2016-05-19 22:19:48 UTC (rev 201189) @@ -1,3 +1,16 @@ +2016-05-19 Enrica Casucci + +Drag cannot start if no drag data is available in the Pasteboard. +https://bugs.webkit.org/show_bug.cgi?id=157911 +rdar://problem/24577706 + +Reviewed by Tim Horton. + +* fast/events/draggable-div-nodata-expected.txt: Added. +* fast/events/draggable-div-nodata.html: Added. +* platform/ios-simulator/TestExpectations +* platform/mac-wk2/TestExpectations + 2016-05-19 Jer Noble [IOS] Add setting to allow playback to continue inline after exiting fullscreen. Added: trunk/LayoutTests/fast/events/draggable-div-nodata-expected.txt (0 => 201189) --- trunk/LayoutTests/fast/events/draggable-div-nodata-expected.txt (rev 0) +++ trunk/LayoutTests/fast/events/draggable-div-nodata-expected.txt 2016-05-19 22:19:48 UTC (rev 201189) @@ -0,0 +1,9 @@ +This test checks that we drag a draggable element without setting data to transfer + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS TEST PASSED: square dropped + +TEST COMPLETE + Added: trunk/LayoutTests/fast/events/draggable-div-nodata.html (0 => 201189) --- trunk/LayoutTests/fast/events/draggable-div-nodata.html (rev 0) +++ trunk/LayoutTests/fast/events/draggable-div-nodata.html 2016-05-19 22:19:48 UTC (rev 201189) @@ -0,0 +1,83 @@ + + + +#dropTarget, #dragMe { text-align: center; display: table-cell; vertical-align: middle } +#dropTarget {width: 256px; height: 256px; border: 1px dashed} +#dragMe {-webkit-user-drag: element; -webkit-user-select: none; background: #ff; width: 64px; height: 64px; color: white} +</style> +<script> +var dragMe; +var dropTarget; +var consoleElm; +var event; + +window._onload_ = function() +{ +dragMe = document.getElementById("dragMe"); +dropTarget = document.getElementById("dropTarget"); +consoleElm = document.getElementById("console"); + +if (!dragMe || !dropTarget || !consoleElm) +return; + +dropTarget._ondragover_ = dragOver; +dropTarget._ondrop_ = drop; + +runTest(); +} + +function drop(event) +{ +testPassed("TEST PASSED: square dropped"); +event.preventDefault(); +dragMe.parentNode.removeChild(dragMe); +event.target.appendChild(dragMe); +} + +function dragOver(event) +{ +event.preventDefault(); +} + +function runTest() +{ +if (!window.eventSender) +return; + +if (window.testRunner) +testRunner.dumpAsText(); + +var startX = dragMe.offsetLeft + 10; +var startY = dragMe.offsetTop + dragMe.offsetHeight / 2; +var endX = dropTarget.offsetLeft + 10; +var endY = dropTarget.offsetTop + dropTarget.offsetHeight / 2; + +eventSender.mouseMoveTo(startX, startY); +eventSender.mouseDown(); +eventSender.leapForward(1000); +eventSender.mous
[webkit-changes] [200979] trunk/Tools
Title: [200979] trunk/Tools Revision 200979 Author enr...@apple.com Date 2016-05-16 16:21:32 -0700 (Mon, 16 May 2016) Log Message build fix after r200968 and r200969 Unreviewed. * DumpRenderTree/mac/EventSendingController.mm: (-[EventSendingController keyDown:withModifiers:withLocation:]): Modified Paths trunk/Tools/ChangeLog trunk/Tools/DumpRenderTree/mac/EventSendingController.mm Diff Modified: trunk/Tools/ChangeLog (200978 => 200979) --- trunk/Tools/ChangeLog 2016-05-16 23:19:36 UTC (rev 200978) +++ trunk/Tools/ChangeLog 2016-05-16 23:21:32 UTC (rev 200979) @@ -1,3 +1,12 @@ +2016-05-16 Enrica Casucci + +build fix after r200968 and r200969 + +Unreviewed. + +* DumpRenderTree/mac/EventSendingController.mm: +(-[EventSendingController keyDown:withModifiers:withLocation:]): + 2016-05-16 Jer Noble API test WebKit2.MSEIsPlayingAudio timing out after r200951 Modified: trunk/Tools/DumpRenderTree/mac/EventSendingController.mm (200978 => 200979) --- trunk/Tools/DumpRenderTree/mac/EventSendingController.mm 2016-05-16 23:19:36 UTC (rev 200978) +++ trunk/Tools/DumpRenderTree/mac/EventSendingController.mm 2016-05-16 23:21:32 UTC (rev 200979) @@ -1074,7 +1074,7 @@ charactersIgnoringModifiers:charactersIgnoringModifiers modifiers:(WebEventFlags)modifierFlags isRepeating:NO -isPopupVariant:NO +withFlags:0 keyCode:[character characterAtIndex:0] isTabKey:([character characterAtIndex:0] == '\t') characterSet:WebEventCharacterSetASCII]; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [200972] trunk/Source/WebKit2
Title: [200972] trunk/Source/WebKit2 Revision 200972 Author enr...@apple.com Date 2016-05-16 15:20:16 -0700 (Mon, 16 May 2016) Log Message Text selection is basically impossible on plain text pages. https://bugs.webkit.org/show_bug.cgi?id=157681 rdar://problem/26065660 Reviewed by Darin Adler. When dealing with a plain text file, the rules for deciding whether a position is selectable should be different and we should never switch to block selection. * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::shouldSwitchToBlockModeForHandle): (WebKit::rectIsTooBigForSelection): Added helper function. (WebKit::WebPage::selectTextWithGranularityAtPoint): (WebKit::WebPage::getPositionInformation): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (200971 => 200972) --- trunk/Source/WebKit2/ChangeLog 2016-05-16 22:00:30 UTC (rev 200971) +++ trunk/Source/WebKit2/ChangeLog 2016-05-16 22:20:16 UTC (rev 200972) @@ -1,3 +1,21 @@ +2016-05-13 Enrica Casucci + +Text selection is basically impossible on plain text pages. +https://bugs.webkit.org/show_bug.cgi?id=157681 +rdar://problem/26065660 + +Reviewed by Darin Adler. + +When dealing with a plain text file, the rules for deciding whether +a position is selectable should be different and we should never +switch to block selection. + +* WebProcess/WebPage/ios/WebPageIOS.mm: +(WebKit::WebPage::shouldSwitchToBlockModeForHandle): +(WebKit::rectIsTooBigForSelection): Added helper function. +(WebKit::WebPage::selectTextWithGranularityAtPoint): +(WebKit::WebPage::getPositionInformation): + 2016-05-16 Chelsea Pugh [iOS] Remove dispatch_after in -[WKFormInputSession setSuggestions:] Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (200971 => 200972) --- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2016-05-16 22:00:30 UTC (rev 200971) +++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2016-05-16 22:20:16 UTC (rev 200972) @@ -1658,6 +1658,8 @@ bool WebPage::shouldSwitchToBlockModeForHandle(const IntPoint& handlePoint, SelectionHandlePosition handlePosition) { +if (!m_blockRectForTextSelection.height()) +return false; switch (handlePosition) { case SelectionHandlePosition::Top: return handlePoint.y() < m_blockRectForTextSelection.y(); @@ -1859,6 +1861,12 @@ return range; } +static inline bool rectIsTooBigForSelection(const IntRect& blockRect, const Frame& frame) +{ +const float factor = 0.97; +return blockRect.height() > frame.view()->unobscuredContentRect().height() * factor; +} + void WebPage::selectTextWithGranularityAtPoint(const WebCore::IntPoint& point, uint32_t granularity, bool isInteractingWithAssistedNode, uint64_t callbackID) { const Frame& frame = m_page->focusController().focusedOrMainFrame(); @@ -1867,9 +1875,17 @@ m_blockSelectionDesiredSize.setWidth(blockSelectionStartWidth); m_blockSelectionDesiredSize.setHeight(blockSelectionStartHeight); m_currentBlockSelection = nullptr; -RefPtr paragraphRange = enclosingTextUnitOfGranularity(visiblePositionInFocusedNodeForPoint(frame, point, isInteractingWithAssistedNode), ParagraphGranularity, DirectionForward); -if (paragraphRange && !paragraphRange->collapsed()) -m_blockRectForTextSelection = selectionBoxForRange(paragraphRange.get()); +auto* renderer = range->startContainer().renderer(); +if (renderer->style().preserveNewline()) +m_blockRectForTextSelection = renderer->absoluteBoundingBoxRect(true); +else { +auto* paragraphRange = enclosingTextUnitOfGranularity(visiblePositionInFocusedNodeForPoint(frame, point, isInteractingWithAssistedNode), ParagraphGranularity, DirectionForward).get(); +if (paragraphRange && !paragraphRange->collapsed()) +m_blockRectForTextSelection = selectionBoxForRange(paragraphRange); +} + +if (rectIsTooBigForSelection(m_blockRectForTextSelection, frame)) +m_blockRectForTextSelection.setHeight(0); } if (range) @@ -2388,8 +2404,9 @@ if (attachment.file()) info.url = "" } else { -const static CGFloat factor = 0.97; -info.isSelectable = renderer->style().userSelect() != SELECT_NONE && info.bounds.height() < result.innerNodeFrame()->view()->unobscuredContentRect().height() * factor; +info.isSelectable = renderer->style().userSelect() != SELECT_NONE; +if (info.isSelectable && !hitNode->isT
[webkit-changes] [200969] trunk/Source/WebKit/mac
Title: [200969] trunk/Source/WebKit/mac Revision 200969 Author enr...@apple.com Date 2016-05-16 14:42:07 -0700 (Mon, 16 May 2016) Log Message Remove unused initializer for WebEvent on iOS. https://bugs.webkit.org/show_bug.cgi?id=157689 Reviewed by Anders Carlsson. Removing use of characterSet property. * WebView/WebHTMLView.mm: (-[WebHTMLView _handleEditingKeyEvent:]): Modified Paths trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/WebView/WebHTMLView.mm Diff Modified: trunk/Source/WebKit/mac/ChangeLog (200968 => 200969) --- trunk/Source/WebKit/mac/ChangeLog 2016-05-16 21:39:04 UTC (rev 200968) +++ trunk/Source/WebKit/mac/ChangeLog 2016-05-16 21:42:07 UTC (rev 200969) @@ -1,3 +1,16 @@ +2016-05-13 Enrica Casucci + +Remove unused initializer for WebEvent on iOS. +https://bugs.webkit.org/show_bug.cgi?id=157689 + +Reviewed by Anders Carlsson. + +Removing use of characterSet property. + +* WebView/WebHTMLView.mm: +(-[WebHTMLView _handleEditingKeyEvent:]): + + 2016-05-13 Commit Queue Unreviewed, rolling out r200894. Modified: trunk/Source/WebKit/mac/WebView/WebHTMLView.mm (200968 => 200969) --- trunk/Source/WebKit/mac/WebView/WebHTMLView.mm 2016-05-16 21:39:04 UTC (rev 200968) +++ trunk/Source/WebKit/mac/WebView/WebHTMLView.mm 2016-05-16 21:42:07 UTC (rev 200969) @@ -6511,10 +6511,6 @@ #define kWebBackspaceKey 0x0008 #define kWebReturnKey0x000d #define kWebDeleteKey0x007F -#define kWebLeftArrowKey 0x00AC -#define kWebUpArrowKey 0x00AD -#define kWebRightArrowKey0x00AE -#define kWebDownArrowKey 0x00AF #define kWebDeleteForwardKey 0xF728 - (BOOL)_handleEditingKeyEvent:(KeyboardEvent *)wcEvent @@ -6526,79 +6522,36 @@ // embedded as the whole view, as in Mail, and tabs should input tabs as expected // in a text editor. -// FIXME - this code will break when content editable is supported. if (const PlatformKeyboardEvent* platformEvent = wcEvent->keyEvent()) { WebEvent *event = platformEvent->event(); if (![[self _webView] isEditable] && event.isTabKey) return NO; -// Now process the key normally -BOOL shift = platformEvent->shiftKey(); - -switch (event.characterSet) { -case WebEventCharacterSetSymbol: { -SEL sel = 0; -NSString *s = [event charactersIgnoringModifiers]; -if ([s length] == 0) -break; -switch ([s characterAtIndex:0]) { -case kWebLeftArrowKey: -sel = shift ? @selector(moveLeftAndModifySelection:) : @selector(moveLeft:); -break; -case kWebUpArrowKey: -sel = shift ? @selector(moveUpAndModifySelection:) : @selector(moveUp:); -break; -case kWebRightArrowKey: -sel = shift ? @selector(moveRightAndModifySelection:) : @selector(moveRight:); -break; -case kWebDownArrowKey: -sel = shift ? @selector(moveDownAndModifySelection:) : @selector(moveDown:); -break; -} -if (sel) { -[self performSelector:sel withObject:self]; -return YES; -} -break; +NSString *s = [event characters]; +if (!s.length) +return NO; +WebView* webView = [self _webView]; +switch ([s characterAtIndex:0]) { +case kWebBackspaceKey: +case kWebDeleteKey: +[[webView _UIKitDelegateForwarder] deleteFromInputWithFlags:event.keyboardFlags]; +return YES; +case kWebEnterKey: +case kWebReturnKey: +if (platformEvent->type() == PlatformKeyboardEvent::Char) { +// Map \r from HW keyboard to \n to match the behavior of the soft keyboard. +[[webView _UIKitDelegateForwarder] addInputString:@"\n" withFlags:0]; +return YES; } -case WebEventCharacterSetASCII: -case WebEventCharacterSetUnicode: { -NSString *s = [event characters]; -if ([s length] == 0) -break; -WebView* webView = [self _webView]; -switch ([s characterAtIndex:0]) { -case kWebBackspaceKey: -case kWebDeleteKey: -// FIXME: remove the call to deleteFromInput when UIKit implements deleteFromInputWithFlags. -if ([webView respondsToSelector:@selector(deleteFromInputWithFlags:)]) -[[webView _UIKitDelegateForwarder] deleteFromInputWithFlags:event.keyboardF
[webkit-changes] [200968] trunk
Title: [200968] trunk Revision 200968 Author enr...@apple.com Date 2016-05-16 14:39:04 -0700 (Mon, 16 May 2016) Log Message Remove unused initializer for WebEvent on iOS. https://bugs.webkit.org/show_bug.cgi?id=157689 Reviewed by Anders Carlsson. Source/WebCore: This is no longer used and can be removed. The logic tied to isPopupVariant has been incorporated in keyboard flags. The characterSet property is no longer needed too. * platform/ios/WebEvent.h: * platform/ios/WebEvent.mm: (-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:withFlags:keyCode:isTabKey:characterSet:]): (-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:isPopupVariant:keyCode:isTabKey:characterSet:]): Deleted. (-[WebEvent _characterSetDescription]): Deleted. (-[WebEvent isPopupVariant]): Deleted. (-[WebEvent characterSet]): Deleted. Tools: Adopting different initializer for WebEvent to fix the build. * DumpRenderTree/mac/EventSendingController.mm: (-[EventSendingController keyDown:withModifiers:withLocation:]): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/ios/WebEvent.h trunk/Source/WebCore/platform/ios/WebEvent.mm trunk/Tools/ChangeLog trunk/Tools/DumpRenderTree/mac/EventSendingController.mm Diff Modified: trunk/Source/WebCore/ChangeLog (200967 => 200968) --- trunk/Source/WebCore/ChangeLog 2016-05-16 21:36:15 UTC (rev 200967) +++ trunk/Source/WebCore/ChangeLog 2016-05-16 21:39:04 UTC (rev 200968) @@ -1,3 +1,22 @@ +2016-05-13 Enrica Casucci + +Remove unused initializer for WebEvent on iOS. +https://bugs.webkit.org/show_bug.cgi?id=157689 + +Reviewed by Anders Carlsson. + +This is no longer used and can be removed. +The logic tied to isPopupVariant has been incorporated +in keyboard flags. The characterSet property is no longer needed too. + +* platform/ios/WebEvent.h: +* platform/ios/WebEvent.mm: +(-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:withFlags:keyCode:isTabKey:characterSet:]): +(-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:isPopupVariant:keyCode:isTabKey:characterSet:]): Deleted. +(-[WebEvent _characterSetDescription]): Deleted. +(-[WebEvent isPopupVariant]): Deleted. +(-[WebEvent characterSet]): Deleted. + 2016-05-16 Simon Fraser Add a WebCore logging channel for images Modified: trunk/Source/WebCore/platform/ios/WebEvent.h (200967 => 200968) --- trunk/Source/WebCore/platform/ios/WebEvent.h 2016-05-16 21:36:15 UTC (rev 200967) +++ trunk/Source/WebCore/platform/ios/WebEvent.h 2016-05-16 21:39:04 UTC (rev 200968) @@ -86,11 +86,9 @@ NSString *_charactersIgnoringModifiers; WebEventFlags _modifierFlags; BOOL _keyRepeating; -BOOL _popupVariant; // FIXME: to be removed NSUInteger _keyboardFlags; uint16_t _keyCode; BOOL _tabKey; -WebEventCharacterSet _characterSet; float _deltaX; float _deltaY; @@ -127,24 +125,12 @@ gestureScale:(float)gestureScale gestureRotation:(float)gestureRotation; -// FIXME: this is deprecated. It will be removed when UIKit adopts the new one below. - (WebEvent *)initWithKeyEventType:(WebEventType)type timeStamp:(CFTimeInterval)timeStamp characters:(NSString *)characters charactersIgnoringModifiers:(NSString *)charactersIgnoringModifiers modifiers:(WebEventFlags)modifiers isRepeating:(BOOL)repeating -isPopupVariant:(BOOL)popupVariant - keyCode:(uint16_t)keyCode - isTabKey:(BOOL)tabKey - characterSet:(WebEventCharacterSet)characterSet; - -- (WebEvent *)initWithKeyEventType:(WebEventType)type - timeStamp:(CFTimeInterval)timeStamp -characters:(NSString *)characters - charactersIgnoringModifiers:(NSString *)charactersIgnoringModifiers - modifiers:(WebEventFlags)modifiers - isRepeating:(BOOL)repeating withFlags:(NSUInteger)flags keyCode:(uint16_t)keyCode isTabKey:(BOOL)tabKey @@ -162,12 +148,9 @@ @property(nonatomic, readonly) WebEventFlags modifierFlags; @property(nonatomic, readonly, getter = isKeyRepeating) BOOL keyRepeating; -// FIXME: this is deprecated. It will be removed when UIKit adopts the new initWithKeyEventType. -@property(nonatomic, readonly, getter = isPopupVariant) BOOL popupVariant; @property(nonatomic, readonly) NSUInteger keyboardFlags; @property(nonatomic, readonly) uint16_t keyCode; @property(nonatomic, re
[webkit-changes] [200894] trunk/Source
Title: [200894] trunk/Source Revision 200894 Author enr...@apple.com Date 2016-05-13 16:39:00 -0700 (Fri, 13 May 2016) Log Message Remove unused initializer for WebEvent on iOS. https://bugs.webkit.org/show_bug.cgi?id=157689 Reviewed by Anders Carlsson. Source/WebCore: This is no longer used and can be removed. The logic tied to isPopupVariant has been incorporated in keyboard flags. The characterSet property is no longer needed too. * platform/ios/WebEvent.h: * platform/ios/WebEvent.mm: (-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:withFlags:keyCode:isTabKey:characterSet:]): (-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:isPopupVariant:keyCode:isTabKey:characterSet:]): Deleted. (-[WebEvent _characterSetDescription]): Deleted. (-[WebEvent isPopupVariant]): Deleted. (-[WebEvent characterSet]): Deleted. Source/WebKit/mac: Removing use of characterSet property. * WebView/WebHTMLView.mm: (-[WebHTMLView _handleEditingKeyEvent:]): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/ios/WebEvent.h trunk/Source/WebCore/platform/ios/WebEvent.mm trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/WebView/WebHTMLView.mm Diff Modified: trunk/Source/WebCore/ChangeLog (200893 => 200894) --- trunk/Source/WebCore/ChangeLog 2016-05-13 23:29:13 UTC (rev 200893) +++ trunk/Source/WebCore/ChangeLog 2016-05-13 23:39:00 UTC (rev 200894) @@ -1,3 +1,22 @@ +2016-05-13 Enrica Casucci + +Remove unused initializer for WebEvent on iOS. +https://bugs.webkit.org/show_bug.cgi?id=157689 + +Reviewed by Anders Carlsson. + +This is no longer used and can be removed. +The logic tied to isPopupVariant has been incorporated +in keyboard flags. The characterSet property is no longer needed too. + +* platform/ios/WebEvent.h: +* platform/ios/WebEvent.mm: +(-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:withFlags:keyCode:isTabKey:characterSet:]): +(-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:isPopupVariant:keyCode:isTabKey:characterSet:]): Deleted. +(-[WebEvent _characterSetDescription]): Deleted. +(-[WebEvent isPopupVariant]): Deleted. +(-[WebEvent characterSet]): Deleted. + 2016-05-13 Simon Fraser cross-fade() rendering doesn't match expectation Modified: trunk/Source/WebCore/platform/ios/WebEvent.h (200893 => 200894) --- trunk/Source/WebCore/platform/ios/WebEvent.h 2016-05-13 23:29:13 UTC (rev 200893) +++ trunk/Source/WebCore/platform/ios/WebEvent.h 2016-05-13 23:39:00 UTC (rev 200894) @@ -86,11 +86,9 @@ NSString *_charactersIgnoringModifiers; WebEventFlags _modifierFlags; BOOL _keyRepeating; -BOOL _popupVariant; // FIXME: to be removed NSUInteger _keyboardFlags; uint16_t _keyCode; BOOL _tabKey; -WebEventCharacterSet _characterSet; float _deltaX; float _deltaY; @@ -127,24 +125,12 @@ gestureScale:(float)gestureScale gestureRotation:(float)gestureRotation; -// FIXME: this is deprecated. It will be removed when UIKit adopts the new one below. - (WebEvent *)initWithKeyEventType:(WebEventType)type timeStamp:(CFTimeInterval)timeStamp characters:(NSString *)characters charactersIgnoringModifiers:(NSString *)charactersIgnoringModifiers modifiers:(WebEventFlags)modifiers isRepeating:(BOOL)repeating -isPopupVariant:(BOOL)popupVariant - keyCode:(uint16_t)keyCode - isTabKey:(BOOL)tabKey - characterSet:(WebEventCharacterSet)characterSet; - -- (WebEvent *)initWithKeyEventType:(WebEventType)type - timeStamp:(CFTimeInterval)timeStamp -characters:(NSString *)characters - charactersIgnoringModifiers:(NSString *)charactersIgnoringModifiers - modifiers:(WebEventFlags)modifiers - isRepeating:(BOOL)repeating withFlags:(NSUInteger)flags keyCode:(uint16_t)keyCode isTabKey:(BOOL)tabKey @@ -162,12 +148,9 @@ @property(nonatomic, readonly) WebEventFlags modifierFlags; @property(nonatomic, readonly, getter = isKeyRepeating) BOOL keyRepeating; -// FIXME: this is deprecated. It will be removed when UIKit adopts the new initWithKeyEventType. -@property(nonatomic, readonly, getter = isPopupVariant) BOOL popupVariant; @property(nonatomic, readonly) NSUInteger keyboardFlags; @property(nonatomic, readonly) uint16_t keyCode; @property(nonatomic, readonly, getter = isTabKey)
[webkit-changes] [200660] trunk/Source
Title: [200660] trunk/Source Revision 200660 Author enr...@apple.com Date 2016-05-10 17:20:10 -0700 (Tue, 10 May 2016) Log Message Numerous block selection issues on iOS. https://bugs.webkit.org/show_bug.cgi?id=157490 rdar://problem/25717977 rdar://problem/23042215 Reviewed by Tim Horton. Source/WebCore: * rendering/style/RenderStyle.h: Exporting method. Source/WebKit2: This patch fixes a number of issues with block selection on iOS. We no longer eagerly choose block selection vs text selection and we make sure we are capable of switching back to text selection from block under every circumstance. The patch also fixes the logic used to decide when to switch to block selection. It now computes the rectangle for the paragraph containing the initial text selection to decide when we are actually dragging outside the boundaries of the paragraph block. * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/ios/WKContentViewInteraction.mm: (selectionChangedWithGesture): (selectionChangedWithTouch): (-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]): * UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::gestureCallback): (WebKit::WebPageProxy::touchesCallback): (WebKit::WebPageProxy::autocorrectionDataCallback): (WebKit::WebPageProxy::selectWithGesture): (WebKit::WebPageProxy::updateSelectionWithTouches): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::selectionBoxForRange): (WebKit::canShrinkToTextSelection): (WebKit::hasCustomLineHeight): (WebKit::WebPage::rangeForWebSelectionAtPosition): (WebKit::WebPage::contractedRangeFromHandle): (WebKit::WebPage::updateBlockSelectionWithTouch): (WebKit::WebPage::clearSelection): (WebKit::WebPage::switchToBlockSelectionAtPoint): (WebKit::WebPage::shouldSwitchToBlockModeForHandle): (WebKit::WebPage::updateSelectionWithTouches): (WebKit::WebPage::selectWithTwoTouches): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/rendering/style/RenderStyle.h trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/WebPageProxy.h trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm Diff Modified: trunk/Source/WebCore/ChangeLog (200659 => 200660) --- trunk/Source/WebCore/ChangeLog 2016-05-11 00:16:14 UTC (rev 200659) +++ trunk/Source/WebCore/ChangeLog 2016-05-11 00:20:10 UTC (rev 200660) @@ -1,3 +1,15 @@ +2016-05-10 Enrica Casucci + +Numerous block selection issues on iOS. +https://bugs.webkit.org/show_bug.cgi?id=157490 +rdar://problem/25717977 +rdar://problem/23042215 + +Reviewed by Tim Horton. + +* rendering/style/RenderStyle.h: +Exporting method. + 2016-05-10 Sam Weinig Tweak underline style for data detected links Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (200659 => 200660) --- trunk/Source/WebCore/rendering/style/RenderStyle.h 2016-05-11 00:16:14 UTC (rev 200659) +++ trunk/Source/WebCore/rendering/style/RenderStyle.h 2016-05-11 00:20:10 UTC (rev 200660) @@ -757,7 +757,7 @@ bool hasExplicitlySetDirection() const { return noninherited_flags.hasExplicitlySetDirection(); } const Length& specifiedLineHeight() const; -Length lineHeight() const; +WEBCORE_EXPORT Length lineHeight() const; int computedLineHeight() const; EWhiteSpace whiteSpace() const { return static_cast(inherited_flags._white_space); } Modified: trunk/Source/WebKit2/ChangeLog (200659 => 200660) --- trunk/Source/WebKit2/ChangeLog 2016-05-11 00:16:14 UTC (rev 200659) +++ trunk/Source/WebKit2/ChangeLog 2016-05-11 00:20:10 UTC (rev 200660) @@ -1,3 +1,46 @@ +2016-05-10 Enrica Casucci + +Numerous block selection issues on iOS. +https://bugs.webkit.org/show_bug.cgi?id=157490 +rdar://problem/25717977 +rdar://problem/23042215 + +Reviewed by Tim Horton. + +This patch fixes a number of issues with block selection on iOS. +We no longer eagerly choose block selection vs text selection and we +make sure we are capable of switching back to text selection from block +under every circumstance. The patch also fixes the logic used to decide +when to switch to block selection. It now computes the rectangle for the +paragraph containing the initial text selection to decide when we are +actually dragging outside the boundaries of the paragraph block. + +* UIProcess/WebPageProxy.h: +* UIProcess/WebPageProxy.messages.in: +* UIProcess/ios/WKContentViewInteraction.mm: +(selectionChangedWithGesture): +(selectionChangedWithTouch): +(-[WKContentView changeSelectionWithTouchAt:withSelectionTouc
[webkit-changes] [200162] trunk/Source/WebCore
Title: [200162] trunk/Source/WebCore Revision 200162 Author enr...@apple.com Date 2016-04-27 16:53:08 -0700 (Wed, 27 Apr 2016) Log Message Refactor findExplodedTextNodeAtPoint to move core functionality in RenderBlockFlow. https://bugs.webkit.org/show_bug.cgi?id=157076 Reviewed by Simon Fraser. * bindings/objc/DOMUIKitExtensions.mm: (-[DOMNode findExplodedTextNodeAtPoint:]): * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::findClosestTextAtAbsolutePoint): * rendering/RenderBlockFlow.h: * rendering/RenderText.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/objc/DOMUIKitExtensions.mm trunk/Source/WebCore/rendering/RenderBlockFlow.cpp trunk/Source/WebCore/rendering/RenderBlockFlow.h trunk/Source/WebCore/rendering/RenderText.h Diff Modified: trunk/Source/WebCore/ChangeLog (200161 => 200162) --- trunk/Source/WebCore/ChangeLog 2016-04-27 23:51:40 UTC (rev 200161) +++ trunk/Source/WebCore/ChangeLog 2016-04-27 23:53:08 UTC (rev 200162) @@ -1,3 +1,17 @@ +2016-04-27 Enrica Casucci + +Refactor findExplodedTextNodeAtPoint to move core functionality in RenderBlockFlow. +https://bugs.webkit.org/show_bug.cgi?id=157076 + +Reviewed by Simon Fraser. + +* bindings/objc/DOMUIKitExtensions.mm: +(-[DOMNode findExplodedTextNodeAtPoint:]): +* rendering/RenderBlockFlow.cpp: +(WebCore::RenderBlockFlow::findClosestTextAtAbsolutePoint): +* rendering/RenderBlockFlow.h: +* rendering/RenderText.h: + 2016-04-27 Simon Fraser [iOS WK2] When determining tile size, check whether ancestor UIScrollViews are actually scrollable Modified: trunk/Source/WebCore/bindings/objc/DOMUIKitExtensions.mm (200161 => 200162) --- trunk/Source/WebCore/bindings/objc/DOMUIKitExtensions.mm 2016-04-27 23:51:40 UTC (rev 200161) +++ trunk/Source/WebCore/bindings/objc/DOMUIKitExtensions.mm 2016-04-27 23:53:08 UTC (rev 200162) @@ -253,75 +253,16 @@ - (DOMNode *)findExplodedTextNodeAtPoint:(CGPoint)point { -// A light, non-recursive version of RenderBlock::positionForCoordinates that looks at -// whether a point lies within the gaps between its root line boxes, to be called against -// a node returned from elementAtPoint. We make the assumption that either the node or one -// of its immediate children contains the root line boxes in question. -// See for context. RenderObject* renderer = core(self)->renderer(); if (!is(renderer)) return nil; -RenderBlock* block = downcast(renderer); - -FloatPoint absPoint(point); -FloatPoint localPoint = block->absoluteToLocal(absPoint); +RenderBlockFlow* block = downcast(renderer); +RenderText* renderText = block->findClosestTextAtAbsolutePoint(point); +if (renderText && renderText->textNode()) +return kit(renderText->textNode()); -if (!block->childrenInline()) { -// Look among our immediate children for an alternate box that contains the point. -for (RenderBox* child = block->firstChildBox(); child; child = child->nextSiblingBox()) { -if (child->height() == 0 || child->style().visibility() != WebCore::VISIBLE || child->isFloatingOrOutOfFlowPositioned()) -continue; -float top = child->y(); - -RenderBox* nextChild = child->nextSiblingBox(); -while (nextChild && nextChild->isFloatingOrOutOfFlowPositioned()) -nextChild = nextChild->nextSiblingBox(); -if (!nextChild) { -if (localPoint.y() >= top) { -block = downcast(child); -break; -} -continue; -} - -float bottom = nextChild->y(); - -if (localPoint.y() >= top && localPoint.y() < bottom && is(*child)) { -block = downcast(child); -break; -} -} - -if (!block->childrenInline()) -return nil; - -localPoint = block->absoluteToLocal(absPoint); -} - -RenderBlockFlow& blockFlow = downcast(*block); - -// Only check the gaps between the root line boxes. We deliberately ignore overflow because -// experience has shown that hit tests on an exploded text node can fail when within the -// overflow region. -for (RootInlineBox* current = blockFlow.firstRootBox(); current && current != blockFlow.lastRootBox(); current = current->nextRootBox()) { -float currentBottom = current->y() + current->logicalHeight(); -if (localPoint.y() < currentBottom) -return nil; - -RootInlineBox* next = current->nextRootBox(); -float nextTop = next->y(); -if (localPoint.y() < nextTop) { -
[webkit-changes] [199399] trunk/Source/WebKit2
Title: [199399] trunk/Source/WebKit2 Revision 199399 Author enr...@apple.com Date 2016-04-12 18:07:26 -0700 (Tue, 12 Apr 2016) Log Message Should retrieve text surrounding the selection when performing lookup. https://bugs.webkit.org/show_bug.cgi?id=156525 rdar://problem/25043678 Reviewed by Tim Horton. The lookup functionality requires the surrounding text to improve the quality of the results. This patch changes the implementation of _lookup to retrieve the text before and the text after the selection. It also renames DictationContextCallback to SelectionContextCallback so that it can be used for both dictation and lookup, since they both need the surrounding text. * UIProcess/AutoCorrectionCallback.h: * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _lookup:]): * UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::autocorrectionDataCallback): (WebKit::WebPageProxy::selectionContextCallback): (WebKit::WebPageProxy::getAutocorrectionContext): (WebKit::WebPageProxy::getSelectionContext): (WebKit::WebPageProxy::handleTwoFingerTapAtPoint): (WebKit::WebPageProxy::dictationContextCallback): Deleted. (WebKit::WebPageProxy::getLookupContextAtPoint): Deleted. * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::performDefaultBehaviorForKeyEvent): (WebKit::WebPage::getSelectionContext): (WebKit::WebPage::accessibilityObjectForMainFramePlugin): (WebKit::WebPage::requestDictationContext): (WebKit::WebPage::replaceSelectedText): (WebKit::WebPage::getLookupContextAtPoint): Deleted. Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/AutoCorrectionCallback.h trunk/Source/WebKit2/UIProcess/WebPageProxy.h trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (199398 => 199399) --- trunk/Source/WebKit2/ChangeLog 2016-04-13 00:48:50 UTC (rev 199398) +++ trunk/Source/WebKit2/ChangeLog 2016-04-13 01:07:26 UTC (rev 199399) @@ -1,3 +1,41 @@ +2016-04-12 Enrica Casucci + +Should retrieve text surrounding the selection when performing lookup. +https://bugs.webkit.org/show_bug.cgi?id=156525 +rdar://problem/25043678 + +Reviewed by Tim Horton. + +The lookup functionality requires the surrounding text to improve +the quality of the results. This patch changes the implementation of +_lookup to retrieve the text before and the text after the selection. +It also renames DictationContextCallback to SelectionContextCallback so +that it can be used for both dictation and lookup, since they both need +the surrounding text. + +* UIProcess/AutoCorrectionCallback.h: +* UIProcess/WebPageProxy.h: +* UIProcess/WebPageProxy.messages.in: +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView _lookup:]): +* UIProcess/ios/WebPageProxyIOS.mm: +(WebKit::WebPageProxy::autocorrectionDataCallback): +(WebKit::WebPageProxy::selectionContextCallback): +(WebKit::WebPageProxy::getAutocorrectionContext): +(WebKit::WebPageProxy::getSelectionContext): +(WebKit::WebPageProxy::handleTwoFingerTapAtPoint): +(WebKit::WebPageProxy::dictationContextCallback): Deleted. +(WebKit::WebPageProxy::getLookupContextAtPoint): Deleted. +* WebProcess/WebPage/WebPage.h: +* WebProcess/WebPage/WebPage.messages.in: +* WebProcess/WebPage/ios/WebPageIOS.mm: +(WebKit::WebPage::performDefaultBehaviorForKeyEvent): +(WebKit::WebPage::getSelectionContext): +(WebKit::WebPage::accessibilityObjectForMainFramePlugin): +(WebKit::WebPage::requestDictationContext): +(WebKit::WebPage::replaceSelectedText): +(WebKit::WebPage::getLookupContextAtPoint): Deleted. + 2016-04-12 Joseph Pecoraro Web Inspector: Dock controls are not available in toolbar if Web Inspector window leaves fullscreen Modified: trunk/Source/WebKit2/UIProcess/AutoCorrectionCallback.h (199398 => 199399) --- trunk/Source/WebKit2/UIProcess/AutoCorrectionCallback.h 2016-04-13 00:48:50 UTC (rev 199398) +++ trunk/Source/WebKit2/UIProcess/AutoCorrectionCallback.h 2016-04-13 01:07:26 UTC (rev 199399) @@ -36,7 +36,7 @@ typedef GenericCallback&, const String&, double, uint64_t> AutocorrectionDataCallback; typedef GenericCallback AutocorrectionContextCallback; -typedef GenericCallback DictationContextCallback; +typedef GenericCallback SelectionContextCallback; } // namespace WebKit Modified: tru
[webkit-changes] [198864] trunk/Source/WebCore
Title: [198864] trunk/Source/WebCore Revision 198864 Author enr...@apple.com Date 2016-03-30 16:09:41 -0700 (Wed, 30 Mar 2016) Log Message Add a style for Data Detectors links. https://bugs.webkit.org/show_bug.cgi?id=155996 rdar://problem/25343514 Reviewed by Sam Weinig. Based on indication from the data detection engine, we style some of the links differently. * editing/cocoa/DataDetection.mm: (WebCore::DataDetection::detectContentInRange): * platform/cocoa/DataDetectorsCoreSoftLink.h: * platform/cocoa/DataDetectorsCoreSoftLink.mm: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/editing/cocoa/DataDetection.mm trunk/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.h trunk/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.mm Diff Modified: trunk/Source/WebCore/ChangeLog (198863 => 198864) --- trunk/Source/WebCore/ChangeLog 2016-03-30 23:06:44 UTC (rev 198863) +++ trunk/Source/WebCore/ChangeLog 2016-03-30 23:09:41 UTC (rev 198864) @@ -1,3 +1,19 @@ +2016-03-30 Enrica Casucci + +Add a style for Data Detectors links. +https://bugs.webkit.org/show_bug.cgi?id=155996 +rdar://problem/25343514 + +Reviewed by Sam Weinig. + +Based on indication from the data detection engine, +we style some of the links differently. + +* editing/cocoa/DataDetection.mm: +(WebCore::DataDetection::detectContentInRange): +* platform/cocoa/DataDetectorsCoreSoftLink.h: +* platform/cocoa/DataDetectorsCoreSoftLink.mm: + 2016-03-30 Myles C. Maxfield [OS X] [RTL Scrollbars] Overlay RTL scrollbars animate in from the wrong side Modified: trunk/Source/WebCore/editing/cocoa/DataDetection.mm (198863 => 198864) --- trunk/Source/WebCore/editing/cocoa/DataDetection.mm 2016-03-30 23:06:44 UTC (rev 198863) +++ trunk/Source/WebCore/editing/cocoa/DataDetection.mm 2016-03-30 23:09:41 UTC (rev 198864) @@ -49,9 +49,10 @@ #import #endif -const char *dataDetectorsURLScheme = "x-apple-data-detectors"; -const char *dataDetectorsAttributeTypeKey = "x-apple-data-detectors-type"; -const char *dataDetectorsAttributeResultKey = "x-apple-data-detectors-result"; +const char* dataDetectorsURLScheme = "x-apple-data-detectors"; +const char* dataDetectorsAttributeTypeKey = "x-apple-data-detectors-type"; +const char* dataDetectorsAttributeResultKey = "x-apple-data-detectors-result"; +const char* dataDetectorsLinkStyle = "-webkit-text-decoration-color:rgb(199, 199, 204); color:initial;"; namespace WebCore { @@ -575,6 +576,7 @@ } lastModifiedQueryOffset = queryRange.end; +BOOL shouldUseLightLinks = softLink_DataDetectorsCore_DDShouldUseLightLinksForResult(coreResult, [indexPaths[resultIndex] length] > 1); for (auto& range : resultRanges) { Node* parentNode = range->startContainer().parentNode(); @@ -605,10 +607,13 @@ RefPtr anchorElement = HTMLAnchorElement::create(document); anchorElement->setHref(correspondingURL); anchorElement->setDir("ltr"); -RefPtr color = downcast(parentNode)->getAttributeNode("color"); -if (color) -anchorElement->setAttribute(HTMLNames::styleAttr, color->style()->cssText()); - +if (shouldUseLightLinks) +anchorElement->setAttribute(HTMLNames::styleAttr, dataDetectorsLinkStyle); +else { +RefPtr color = downcast(parentNode)->getAttributeNode("color"); +if (color) +anchorElement->setAttribute(HTMLNames::styleAttr, color->style()->cssText()); +} anchorElement->Node::appendChild(newNode, ASSERT_NO_EXCEPTION); parentNode->insertBefore(anchorElement, ¤tTextNode, ASSERT_NO_EXCEPTION); // Add a special attribute to mark this URLification as the result of data detectors. Modified: trunk/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.h (198863 => 198864) --- trunk/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.h 2016-03-30 23:06:44 UTC (rev 198863) +++ trunk/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.h 2016-03-30 23:09:41 UTC (rev 198864) @@ -51,6 +51,7 @@ SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, DataDetectorsCore, DDURLTapAndHoldSchemes, NSArray *, (), ()) SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, DataDetectorsCore, DDShouldImmediatelyShowActionSheetForURL, BOOL, (NSURL *url), (url)) SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, DataDetectorsCore, DDShouldImmediatelyShowActionSheetForResult, BOOL, (DDResultRef result), (result)) +SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, DataDetectorsCore, DDShouldUseLightLinksForResult, BOOL, (DDResultRef result, BOOL extractedFromSignature), (result, extractedFromSignature)) SOFT_LINK_POINTER_FO
[webkit-changes] [198810] trunk/Source/WebKit2
Title: [198810] trunk/Source/WebKit2 Revision 198810 Author enr...@apple.com Date 2016-03-29 16:34:54 -0700 (Tue, 29 Mar 2016) Log Message When moving focus from one select element to another (iPhone) the value is committed to the newly focused element. https://bugs.webkit.org/show_bug.cgi?id=155958 rdar://problem/22738524 Reviewed by Tim Horton. We should not delay the call to endEditing until we receive stopAssistingNode, because by then the assisted node might have already changed. We need to call endEditing to commit potential changes every time we tap. This way we can make sure the editing session on the select element has been completed. This affects only single select elements on iPhone, where the change to the actual DOM element is delayed until we stop interacting with the element. On iPad or for multi-select elements, the change to the DOM happens immediately. * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _singleTapCommited:]): (-[WKContentView _attemptClickAtLocation:]): (-[WKContentView _stopAssistingNode]): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (198809 => 198810) --- trunk/Source/WebKit2/ChangeLog 2016-03-29 23:19:11 UTC (rev 198809) +++ trunk/Source/WebKit2/ChangeLog 2016-03-29 23:34:54 UTC (rev 198810) @@ -1,3 +1,25 @@ +2016-03-28 Enrica Casucci + +When moving focus from one select element to another (iPhone) the value is committed to the newly focused element. +https://bugs.webkit.org/show_bug.cgi?id=155958 +rdar://problem/22738524 + +Reviewed by Tim Horton. + +We should not delay the call to endEditing until we receive +stopAssistingNode, because by then the assisted node might have already +changed. We need to call endEditing to commit potential changes every +time we tap. This way we can make sure the editing session on the select +element has been completed. This affects only single select elements on +iPhone, where the change to the actual DOM element is delayed until we +stop interacting with the element. On iPad or for multi-select elements, +the change to the DOM happens immediately. + +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView _singleTapCommited:]): +(-[WKContentView _attemptClickAtLocation:]): +(-[WKContentView _stopAssistingNode]): + 2016-03-29 Brian Burg Unreviewed build fix after r198793. Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (198809 => 198810) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2016-03-29 23:19:11 UTC (rev 198809) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2016-03-29 23:34:54 UTC (rev 198810) @@ -1448,6 +1448,7 @@ _hasTapHighlightForPotentialTap = NO; } +[_inputPeripheral endEditing]; _page->commitPotentialTap(); if (!_isExpectingFastSingleTapCommit) @@ -1486,6 +1487,7 @@ if (![self isFirstResponder]) [self becomeFirstResponder]; +[_inputPeripheral endEditing]; _page->handleTap(location); } @@ -3587,7 +3589,6 @@ _formInputSession = nil; _isEditable = NO; _assistedNodeInformation.elementType = InputType::None; -[_inputPeripheral endEditing]; _inputPeripheral = nil; [self _stopAssistingKeyboard]; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [198684] trunk/Source/WebCore
Title: [198684] trunk/Source/WebCore Revision 198684 Author enr...@apple.com Date 2016-03-25 12:32:53 -0700 (Fri, 25 Mar 2016) Log Message Data Detection creates multiple links even when the detected content is within the same node. https://bugs.webkit.org/show_bug.cgi?id=155860 rdar://problem/25319579 Reviewed by Tim Horton. If the detected content spans over multiple query fragments, we need to check if consecutive fragments are all within the same node. This way we can avoid creating multiple ranges and consequntly more links. * editing/cocoa/DataDetection.mm: (WebCore::DataDetection::detectContentInRange): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/editing/cocoa/DataDetection.mm Diff Modified: trunk/Source/WebCore/ChangeLog (198683 => 198684) --- trunk/Source/WebCore/ChangeLog 2016-03-25 19:25:05 UTC (rev 198683) +++ trunk/Source/WebCore/ChangeLog 2016-03-25 19:32:53 UTC (rev 198684) @@ -1,3 +1,19 @@ +2016-03-24 Enrica Casucci + +Data Detection creates multiple links even when the detected content is within the same node. +https://bugs.webkit.org/show_bug.cgi?id=155860 +rdar://problem/25319579 + +Reviewed by Tim Horton. + +If the detected content spans over multiple query fragments, +we need to check if consecutive fragments are all within the +same node. This way we can avoid creating multiple ranges and +consequntly more links. + +* editing/cocoa/DataDetection.mm: +(WebCore::DataDetection::detectContentInRange): + 2016-03-23 Dave Hyatt Implement the allow-end value of the hanging-punctuation CSS property. Modified: trunk/Source/WebCore/editing/cocoa/DataDetection.mm (198683 => 198684) --- trunk/Source/WebCore/editing/cocoa/DataDetection.mm 2016-03-25 19:25:05 UTC (rev 198683) +++ trunk/Source/WebCore/editing/cocoa/DataDetection.mm 2016-03-25 19:32:53 UTC (rev 198684) @@ -518,10 +518,13 @@ iteratorCount++; } currentRange = iterator.range(); -if (fragmentIndex == queryRange.end.queryIndex) -fragmentRanges.append(Range::create(currentRange->ownerDocument(), ¤tRange->startContainer(), currentRange->startOffset(), ¤tRange->endContainer(), currentRange->startOffset() + queryRange.end.offset)); -else -fragmentRanges.append(currentRange); +RefPtr fragmentRange = (fragmentIndex == queryRange.end.queryIndex) ? Range::create(currentRange->ownerDocument(), ¤tRange->startContainer(), currentRange->startOffset(), ¤tRange->endContainer(), currentRange->startOffset() + queryRange.end.offset) : currentRange; +RefPtr previousRange = fragmentRanges.last(); +if (&previousRange->startContainer() == &fragmentRange->startContainer()) { +fragmentRange = Range::create(currentRange->ownerDocument(), &previousRange->startContainer(), previousRange->startOffset(), &fragmentRange->endContainer(), fragmentRange->endOffset()); +fragmentRanges.last() = fragmentRange; +} else +fragmentRanges.append(fragmentRange); } allResultRanges.append(fragmentRanges); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [198653] trunk/Source
Title: [198653] trunk/Source Revision 198653 Author enr...@apple.com Date 2016-03-24 16:56:27 -0700 (Thu, 24 Mar 2016) Log Message Adopt new SPI from DataDetectorsCore to decide link behavior. https://bugs.webkit.org/show_bug.cgi?id=155780 rdar://problem/25303631 Reviewed by Sam Weinig. Source/WebCore: isDataDetectorLink and shouldCancelDefaultAction now use the SPI provided by DataDetectorsCore to decide what is the link behavior when the user taps on it. * editing/cocoa/DataDetection.h: * editing/cocoa/DataDetection.mm: (WebCore::detectItemAtPositionWithRange): (WebCore::DataDetection::isDataDetectorLink): (WebCore::DataDetection::requiresExtendedContext): (WebCore::DataDetection::dataDetectorIdentifier): (WebCore::DataDetection::shouldCancelDefaultAction): * platform/cocoa/DataDetectorsCoreSoftLink.h: * platform/cocoa/DataDetectorsCoreSoftLink.mm: * platform/spi/cocoa/DataDetectorsCoreSPI.h: Source/WebKit2: Changed use of data detection functions to take a reference to Element instead of a pointer. * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::handleTap): (WebKit::WebPage::commitPotentialTap): (WebKit::WebPage::getPositionInformation): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/editing/cocoa/DataDetection.h trunk/Source/WebCore/editing/cocoa/DataDetection.mm trunk/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.h trunk/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.mm trunk/Source/WebCore/platform/spi/cocoa/DataDetectorsCoreSPI.h trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm Diff Modified: trunk/Source/WebCore/ChangeLog (198652 => 198653) --- trunk/Source/WebCore/ChangeLog 2016-03-24 23:18:49 UTC (rev 198652) +++ trunk/Source/WebCore/ChangeLog 2016-03-24 23:56:27 UTC (rev 198653) @@ -1,5 +1,28 @@ 2016-03-24 Enrica Casucci +Adopt new SPI from DataDetectorsCore to decide link behavior. +https://bugs.webkit.org/show_bug.cgi?id=155780 +rdar://problem/25303631 + +Reviewed by Sam Weinig. + +isDataDetectorLink and shouldCancelDefaultAction now +use the SPI provided by DataDetectorsCore to decide +what is the link behavior when the user taps on it. + +* editing/cocoa/DataDetection.h: +* editing/cocoa/DataDetection.mm: +(WebCore::detectItemAtPositionWithRange): +(WebCore::DataDetection::isDataDetectorLink): +(WebCore::DataDetection::requiresExtendedContext): +(WebCore::DataDetection::dataDetectorIdentifier): +(WebCore::DataDetection::shouldCancelDefaultAction): +* platform/cocoa/DataDetectorsCoreSoftLink.h: +* platform/cocoa/DataDetectorsCoreSoftLink.mm: +* platform/spi/cocoa/DataDetectorsCoreSPI.h: + +2016-03-24 Enrica Casucci + DataDetection creates links that are longer than the actual result. https://bugs.webkit.org/show_bug.cgi?id=155850 rdar://problem/25280740 Modified: trunk/Source/WebCore/editing/cocoa/DataDetection.h (198652 => 198653) --- trunk/Source/WebCore/editing/cocoa/DataDetection.h 2016-03-24 23:18:49 UTC (rev 198652) +++ trunk/Source/WebCore/editing/cocoa/DataDetection.h 2016-03-24 23:56:27 UTC (rev 198653) @@ -58,10 +58,12 @@ WEBCORE_EXPORT static RetainPtr detectItemAroundHitTestResult(const HitTestResult&, FloatRect& detectedDataBoundingBox, RefPtr& detectedDataRange); #endif WEBCORE_EXPORT static NSArray *detectContentInRange(RefPtr& contextRange, DataDetectorTypes); -WEBCORE_EXPORT static bool isDataDetectorLink(Element*); -WEBCORE_EXPORT static String dataDetectorIdentifier(Element*); -WEBCORE_EXPORT static bool shouldCancelDefaultAction(Element*); -WEBCORE_EXPORT static bool requiresExtendedContext(Element*); +#if PLATFORM(IOS) +WEBCORE_EXPORT static bool isDataDetectorLink(Element&); +WEBCORE_EXPORT static String dataDetectorIdentifier(Element&); +WEBCORE_EXPORT static bool shouldCancelDefaultAction(Element&); +WEBCORE_EXPORT static bool requiresExtendedContext(Element&); +#endif }; } // namespace WebCore Modified: trunk/Source/WebCore/editing/cocoa/DataDetection.mm (198652 => 198653) --- trunk/Source/WebCore/editing/cocoa/DataDetection.mm 2016-03-24 23:18:49 UTC (rev 198652) +++ trunk/Source/WebCore/editing/cocoa/DataDetection.mm 2016-03-24 23:56:27 UTC (rev 198653) @@ -55,48 +55,8 @@ namespace WebCore { -bool DataDetection::isDataDetectorLink(Element* element) -{ -// FIXME: We should be able to ask this from DataDetectorsCore when rdar://problem/25206062 is fixed. -if (!is(*element)) -return false; - -if (element->getAttribute(dataDetectorsURLScheme) == "true") -return true; -URL url = "" -return url.protocolIs("mailto") || url.protocolIs("tel"); -} - -bool DataDetection::requiresExtendedContext(Element* element) -{
[webkit-changes] [198650] trunk/Source/WebCore
Title: [198650] trunk/Source/WebCore Revision 198650 Author enr...@apple.com Date 2016-03-24 16:09:18 -0700 (Thu, 24 Mar 2016) Log Message DataDetection creates links that are longer than the actual result. https://bugs.webkit.org/show_bug.cgi?id=155850 rdar://problem/25280740 Reviewed by Anders Carlsson. When a data detection result is composed of multiple fragments, the range for the last fragment should take into account the end offset of the query range structure, since there could be additional content in that range that is not part of the result. * editing/cocoa/DataDetection.mm: (WebCore::DataDetection::detectContentInRange): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/editing/cocoa/DataDetection.mm Diff Modified: trunk/Source/WebCore/ChangeLog (198649 => 198650) --- trunk/Source/WebCore/ChangeLog 2016-03-24 23:01:45 UTC (rev 198649) +++ trunk/Source/WebCore/ChangeLog 2016-03-24 23:09:18 UTC (rev 198650) @@ -1,3 +1,19 @@ +2016-03-24 Enrica Casucci + +DataDetection creates links that are longer than the actual result. +https://bugs.webkit.org/show_bug.cgi?id=155850 +rdar://problem/25280740 + +Reviewed by Anders Carlsson. + +When a data detection result is composed of multiple fragments, +the range for the last fragment should take into account the end +offset of the query range structure, since there could be additional +content in that range that is not part of the result. + +* editing/cocoa/DataDetection.mm: +(WebCore::DataDetection::detectContentInRange): + 2016-03-24 Commit Queue Unreviewed, rolling out r198627. Modified: trunk/Source/WebCore/editing/cocoa/DataDetection.mm (198649 => 198650) --- trunk/Source/WebCore/editing/cocoa/DataDetection.mm 2016-03-24 23:01:45 UTC (rev 198649) +++ trunk/Source/WebCore/editing/cocoa/DataDetection.mm 2016-03-24 23:09:18 UTC (rev 198650) @@ -516,7 +516,10 @@ iteratorCount++; } currentRange = iterator.range(); -fragmentRanges.append(currentRange); +if (fragmentIndex == queryRange.end.queryIndex) +fragmentRanges.append(Range::create(currentRange->ownerDocument(), ¤tRange->startContainer(), currentRange->startOffset(), ¤tRange->endContainer(), currentRange->startOffset() + queryRange.end.offset)); +else +fragmentRanges.append(currentRange); } allResultRanges.append(fragmentRanges); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [198496] trunk/Source/WebKit2
Title: [198496] trunk/Source/WebKit2 Revision 198496 Author enr...@apple.com Date 2016-03-21 12:28:53 -0700 (Mon, 21 Mar 2016) Log Message Enable preview of images as attachments. https://bugs.webkit.org/show_bug.cgi?id=155674 rdar://problem/25242656 Reviewed by Darin Adler. If the client cannot handle image preview, but can handle attachments, let them handle images as attachments. * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _dataForPreviewItemController:atPosition:type:]): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (198495 => 198496) --- trunk/Source/WebKit2/ChangeLog 2016-03-21 19:22:42 UTC (rev 198495) +++ trunk/Source/WebKit2/ChangeLog 2016-03-21 19:28:53 UTC (rev 198496) @@ -1,3 +1,17 @@ +2016-03-18 Enrica Casucci + +Enable preview of images as attachments. +https://bugs.webkit.org/show_bug.cgi?id=155674 +rdar://problem/25242656 + +Reviewed by Darin Adler. + +If the client cannot handle image preview, but can handle attachments, +let them handle images as attachments. + +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView _dataForPreviewItemController:atPosition:type:]): + 2016-03-20 Dan Bernstein [Mac] Determine TARGET_MAC_OS_X_VERSION_MAJOR from MACOSX_DEPLOYMENT_TARGET rather than from MAC_OS_X_VERSION_MAJOR Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (198495 => 198496) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2016-03-21 19:22:42 UTC (rev 198495) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2016-03-21 19:28:53 UTC (rev 198496) @@ -3827,7 +3827,7 @@ BOOL canShowLinkPreview = _positionInformation.isLink || canShowImagePreview; BOOL useImageURLForLink = NO; BOOL supportsAttachmentPreview = [uiDelegate respondsToSelector:@selector(_attachmentListForWebView:)] && [uiDelegate respondsToSelector:@selector(_webView:indexIntoAttachmentListForElement:)]; -BOOL canShowAttachmentPreview = _positionInformation.isAttachment && supportsAttachmentPreview; +BOOL canShowAttachmentPreview = (_positionInformation.isAttachment || _positionInformation.isImage) && supportsAttachmentPreview; if (canShowImagePreview && _positionInformation.isAnimatedImage) { canShowImagePreview = NO; @@ -3886,8 +3886,11 @@ enum { WKUIPreviewItemTypeAttachment = 5 }; *type = static_cast(WKUIPreviewItemTypeAttachment); const auto& element = [[_WKActivatedElementInfo alloc] _initWithType:_WKActivatedElementTypeAttachment URL:[NSURL _web_URLWithWTFString:_positionInformation.url] location:_positionInformation.point title:_positionInformation.title ID:_positionInformation.idAttribute rect:_positionInformation.bounds image:nil]; -dataForPreview[@"UIPreviewDataAttachmentList"] = [uiDelegate _attachmentListForWebView:_webView]; -dataForPreview[@"UIPreviewDataAttachmentIndex"] = [NSNumber numberWithUnsignedInteger:[uiDelegate _webView:_webView indexIntoAttachmentListForElement:element]]; +NSUInteger index = [uiDelegate _webView:_webView indexIntoAttachmentListForElement:element]; +if (index != NSNotFound) { +dataForPreview[@"UIPreviewDataAttachmentList"] = [uiDelegate _attachmentListForWebView:_webView]; +dataForPreview[@"UIPreviewDataAttachmentIndex"] = [NSNumber numberWithUnsignedInteger:index]; +} } return dataForPreview; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [198311] trunk/Source/WebCore
Title: [198311] trunk/Source/WebCore Revision 198311 Author enr...@apple.com Date 2016-03-16 17:56:33 -0700 (Wed, 16 Mar 2016) Log Message Recognize mailto and tel url as data detector links. https://bugs.webkit.org/show_bug.cgi?id=155569 rdar://problem/24836185 Reviewed by Sam Weinig. When we check if the element is a data detector link, we should return true also for URLs with mailto: and tel: scheme. * editing/cocoa/DataDetection.mm: (WebCore::DataDetection::isDataDetectorLink): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/editing/cocoa/DataDetection.mm Diff Modified: trunk/Source/WebCore/ChangeLog (198310 => 198311) --- trunk/Source/WebCore/ChangeLog 2016-03-17 00:13:30 UTC (rev 198310) +++ trunk/Source/WebCore/ChangeLog 2016-03-17 00:56:33 UTC (rev 198311) @@ -1,3 +1,17 @@ +2016-03-16 Enrica Casucci + +Recognize mailto and tel url as data detector links. +https://bugs.webkit.org/show_bug.cgi?id=155569 +rdar://problem/24836185 + +Reviewed by Sam Weinig. + +When we check if the element is a data detector link, +we should return true also for URLs with mailto: and tel: scheme. + +* editing/cocoa/DataDetection.mm: +(WebCore::DataDetection::isDataDetectorLink): + 2016-03-16 Zalan Bujtas Subpixel rendering: Directly composited image layers need pixelsnapping. Modified: trunk/Source/WebCore/editing/cocoa/DataDetection.mm (198310 => 198311) --- trunk/Source/WebCore/editing/cocoa/DataDetection.mm 2016-03-17 00:13:30 UTC (rev 198310) +++ trunk/Source/WebCore/editing/cocoa/DataDetection.mm 2016-03-17 00:56:33 UTC (rev 198311) @@ -57,7 +57,14 @@ bool DataDetection::isDataDetectorLink(Element* element) { -return element->getAttribute(dataDetectorsURLScheme) == "true"; +// FIXME: We should be able to ask this from DataDetectorsCore when rdar://problem/25206062 is fixed. +if (!is(*element)) +return false; + +if (element->getAttribute(dataDetectorsURLScheme) == "true") +return true; +URL url = "" +return url.protocolIs("mailto") || url.protocolIs("tel"); } bool DataDetection::requiresExtendedContext(Element* element) @@ -76,7 +83,7 @@ UNUSED_PARAM(element); return false; #else -// FIXME: We should also compute the DDResultRef and check the result category. +// FIXME: We should be able to retrieve this information from DataDetectorsCore when rdar://problem/25169133 is fixed. if (!is(*element)) return false; if (element->getAttribute(dataDetectorsURLScheme) != "true") ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [198446] trunk/Source/WebKit2
Title: [198446] trunk/Source/WebKit2 Revision 198446 Author enr...@apple.com Date 2016-03-18 15:35:33 -0700 (Fri, 18 Mar 2016) Log Message Add id attribute to _WKActivatedElementInfo. https://bugs.webkit.org/show_bug.cgi?id=155666 rdar://problem/25181956 Reviewed by Beth Dakin. * Shared/ios/InteractionInformationAtPosition.h: * Shared/ios/InteractionInformationAtPosition.mm: (WebKit::InteractionInformationAtPosition::encode): (WebKit::InteractionInformationAtPosition::decode): * UIProcess/API/Cocoa/_WKActivatedElementInfo.h: * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm: (-[_WKActivatedElementInfo _initWithType:URL:location:title:ID:rect:image:]): (-[_WKActivatedElementInfo ID]): (-[_WKActivatedElementInfo _initWithType:URL:location:title:rect:image:]): Deleted. * UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h: * UIProcess/ios/WKActionSheetAssistant.mm: (-[WKActionSheetAssistant showImageSheet]): (-[WKActionSheetAssistant showLinkSheet]): * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _showAttachmentSheet]): (-[WKContentView _showLinkSheet]): (-[WKContentView _dataForPreviewItemController:atPosition:type:]): (-[WKContentView _presentedViewControllerForPreviewItemController:]): * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::getPositionInformation): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Shared/ios/InteractionInformationAtPosition.h trunk/Source/WebKit2/Shared/ios/InteractionInformationAtPosition.mm trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKActivatedElementInfo.h trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKActivatedElementInfo.mm trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (198445 => 198446) --- trunk/Source/WebKit2/ChangeLog 2016-03-18 22:35:26 UTC (rev 198445) +++ trunk/Source/WebKit2/ChangeLog 2016-03-18 22:35:33 UTC (rev 198446) @@ -1,3 +1,32 @@ +2016-03-18 Enrica Casucci + +Add id attribute to _WKActivatedElementInfo. +https://bugs.webkit.org/show_bug.cgi?id=155666 +rdar://problem/25181956 + +Reviewed by Beth Dakin. + +* Shared/ios/InteractionInformationAtPosition.h: +* Shared/ios/InteractionInformationAtPosition.mm: +(WebKit::InteractionInformationAtPosition::encode): +(WebKit::InteractionInformationAtPosition::decode): +* UIProcess/API/Cocoa/_WKActivatedElementInfo.h: +* UIProcess/API/Cocoa/_WKActivatedElementInfo.mm: +(-[_WKActivatedElementInfo _initWithType:URL:location:title:ID:rect:image:]): +(-[_WKActivatedElementInfo ID]): +(-[_WKActivatedElementInfo _initWithType:URL:location:title:rect:image:]): Deleted. +* UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h: +* UIProcess/ios/WKActionSheetAssistant.mm: +(-[WKActionSheetAssistant showImageSheet]): +(-[WKActionSheetAssistant showLinkSheet]): +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView _showAttachmentSheet]): +(-[WKContentView _showLinkSheet]): +(-[WKContentView _dataForPreviewItemController:atPosition:type:]): +(-[WKContentView _presentedViewControllerForPreviewItemController:]): +* WebProcess/WebPage/ios/WebPageIOS.mm: +(WebKit::WebPage::getPositionInformation): + 2016-03-18 Antti Koivisto Protect against excessive cache traversal Modified: trunk/Source/WebKit2/Shared/ios/InteractionInformationAtPosition.h (198445 => 198446) --- trunk/Source/WebKit2/Shared/ios/InteractionInformationAtPosition.h 2016-03-18 22:35:26 UTC (rev 198445) +++ trunk/Source/WebKit2/Shared/ios/InteractionInformationAtPosition.h 2016-03-18 22:35:33 UTC (rev 198446) @@ -54,6 +54,7 @@ String url; String imageURL; String title; +String idAttribute; WebCore::IntRect bounds; RefPtr image; String textBefore; Modified: trunk/Source/WebKit2/Shared/ios/InteractionInformationAtPosition.mm (198445 => 198446) --- trunk/Source/WebKit2/Shared/ios/InteractionInformationAtPosition.mm 2016-03-18 22:35:26 UTC (rev 198445) +++ trunk/Source/WebKit2/Shared/ios/InteractionInformationAtPosition.mm 2016-03-18 22:35:33 UTC (rev 198446) @@ -54,6 +54,7 @@ encoder << url; encoder << imageURL; encoder << title; +encoder << idAttribute; encoder << bounds; encoder << textBefore; encoder << textAfter; @@ -119,6 +120,9 @@ if (!decoder.decode(result.title)) return false; +if (!decoder.decode(result.idAttribute)) +return false; + if (!decoder.decode(result.bounds)) return false; Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKActivatedElementInfo.h (198445 =>
[webkit-changes] [198245] trunk/Source/WebKit2
Title: [198245] trunk/Source/WebKit2 Revision 198245 Author enr...@apple.com Date 2016-03-15 17:02:05 -0700 (Tue, 15 Mar 2016) Log Message Follow up to r195769. https://bugs.webkit.org/show_bug.cgi?id=155519 rdar://problem/25146483 Reviewed by Tim Horton. There are two code paths that lead to calling handleSyntheticClick() where we need to check if the default action can be performed on the data detector link. Only one was covered in r195769 and this patch addresses the missing one. I've also discovered that the point reported in DidNotHandleTapAsClick was incorrectly always (0, 0) and I've fixed it. * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::handleTap): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (198244 => 198245) --- trunk/Source/WebKit2/ChangeLog 2016-03-16 00:00:26 UTC (rev 198244) +++ trunk/Source/WebKit2/ChangeLog 2016-03-16 00:02:05 UTC (rev 198245) @@ -1,3 +1,21 @@ +2016-03-15 Enrica Casucci + +Follow up to r195769. +https://bugs.webkit.org/show_bug.cgi?id=155519 +rdar://problem/25146483 + +Reviewed by Tim Horton. + +There are two code paths that lead to calling handleSyntheticClick() +where we need to check if the default action can be performed on the +data detector link. +Only one was covered in r195769 and this patch addresses the missing one. +I've also discovered that the point reported in DidNotHandleTapAsClick was +incorrectly always (0, 0) and I've fixed it. + +* WebProcess/WebPage/ios/WebPageIOS.mm: +(WebKit::WebPage::handleTap): + 2016-03-15 Ryan Haddad Unreviewed, rolling out r198230. Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (198244 => 198245) --- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2016-03-16 00:00:26 UTC (rev 198244) +++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2016-03-16 00:02:05 UTC (rev 198245) @@ -595,10 +595,14 @@ FloatPoint adjustedPoint; Node* nodeRespondingToClick = m_page->mainFrame().nodeRespondingToClickEvents(point, adjustedPoint); Frame* frameRespondingToClick = nodeRespondingToClick ? nodeRespondingToClick->document().frame() : nullptr; +IntPoint adjustedIntPoint = roundedIntPoint(adjustedPoint); if (!frameRespondingToClick || lastLayerTreeTransactionId < WebFrame::fromCoreFrame(*frameRespondingToClick)->firstLayerTreeTransactionIDAfterDidCommitLoad()) -send(Messages::WebPageProxy::DidNotHandleTapAsClick(roundedIntPoint(m_potentialTapLocation))); -else +send(Messages::WebPageProxy::DidNotHandleTapAsClick(adjustedIntPoint)); +else if (is(*nodeRespondingToClick) && DataDetection::shouldCancelDefaultAction(&downcast(*nodeRespondingToClick))) { +requestPositionInformation(adjustedIntPoint); +send(Messages::WebPageProxy::DidNotHandleTapAsClick(adjustedIntPoint)); +} else handleSyntheticClick(nodeRespondingToClick, adjustedPoint); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [198179] trunk/Source/WebCore
Title: [198179] trunk/Source/WebCore Revision 198179 Author enr...@apple.com Date 2016-03-14 17:47:11 -0700 (Mon, 14 Mar 2016) Log Message iOS: RTFD format is not available in the pasteboard after copy/cut. https://bugs.webkit.org/show_bug.cgi?id=155477 rdar://problem/23500600 Reviewed by Tim Horton. WebKit is using UTTypeRTFD instead of UTTypeFlatRTFD that is the proper RTFD format for pastedboard. I also discovered that, when we create the NSTextAttachment in the NSAttributedString we produce from the DOM range, we are not generating a file name with the appropriate extension for the MIME type. The iOS specific implementation of the MIMETypeRegistry functions were empty. There is no need to have a differentiation between OS X and iOS, so we now have only one file called MIMETypeRegistryCocoa.mm. * WebCore.xcodeproj/project.pbxproj: * platform/cocoa/MIMETypeRegistryCocoa.mm: Added. (WebCore::MIMETypeRegistry::getMIMETypeForExtension): (WebCore::MIMETypeRegistry::getExtensionsForMIMEType): (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType): (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType): * platform/ios/MIMETypeRegistryIOS.mm: Removed. * platform/ios/PasteboardIOS.mm: (WebCore::Pasteboard::read): (WebCore::Pasteboard::supportedPasteboardTypes): (WebCore::Pasteboard::hasData): * platform/ios/PlatformPasteboardIOS.mm: (WebCore::PlatformPasteboard::write): * platform/mac/MIMETypeRegistryMac.mm: Removed. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj trunk/Source/WebCore/platform/ios/PasteboardIOS.mm trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm Added Paths trunk/Source/WebCore/platform/cocoa/MIMETypeRegistryCocoa.mm Removed Paths trunk/Source/WebCore/platform/ios/MIMETypeRegistryIOS.mm trunk/Source/WebCore/platform/mac/MIMETypeRegistryMac.mm Diff Modified: trunk/Source/WebCore/ChangeLog (198178 => 198179) --- trunk/Source/WebCore/ChangeLog 2016-03-15 00:39:59 UTC (rev 198178) +++ trunk/Source/WebCore/ChangeLog 2016-03-15 00:47:11 UTC (rev 198179) @@ -1,3 +1,35 @@ +2016-03-14 Enrica Casucci + +iOS: RTFD format is not available in the pasteboard after copy/cut. +https://bugs.webkit.org/show_bug.cgi?id=155477 +rdar://problem/23500600 + +Reviewed by Tim Horton. + +WebKit is using UTTypeRTFD instead of UTTypeFlatRTFD that is the +proper RTFD format for pastedboard. I also discovered that, when +we create the NSTextAttachment in the NSAttributedString we produce +from the DOM range, we are not generating a file name with the +appropriate extension for the MIME type. The iOS specific implementation +of the MIMETypeRegistry functions were empty. +There is no need to have a differentiation between OS X and iOS, so +we now have only one file called MIMETypeRegistryCocoa.mm. + +* WebCore.xcodeproj/project.pbxproj: +* platform/cocoa/MIMETypeRegistryCocoa.mm: Added. +(WebCore::MIMETypeRegistry::getMIMETypeForExtension): +(WebCore::MIMETypeRegistry::getExtensionsForMIMEType): +(WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType): +(WebCore::MIMETypeRegistry::isApplicationPluginMIMEType): +* platform/ios/MIMETypeRegistryIOS.mm: Removed. +* platform/ios/PasteboardIOS.mm: +(WebCore::Pasteboard::read): +(WebCore::Pasteboard::supportedPasteboardTypes): +(WebCore::Pasteboard::hasData): +* platform/ios/PlatformPasteboardIOS.mm: +(WebCore::PlatformPasteboard::write): +* platform/mac/MIMETypeRegistryMac.mm: Removed. + 2016-03-14 Daniel Bates Web Inspector: Display Content Security Policy hash in details sidebar for script and style elements Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (198178 => 198179) --- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2016-03-15 00:39:59 UTC (rev 198178) +++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2016-03-15 00:47:11 UTC (rev 198179) @@ -5629,7 +5629,6 @@ BC772C470C4EB2C60083285F /* XMLHttpRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = BC772C450C4EB2C60083285F /* XMLHttpRequest.h */; }; BC772C4E0C4EB3040083285F /* MIMETypeRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC772C4C0C4EB3040083285F /* MIMETypeRegistry.cpp */; }; BC772C4F0C4EB3040083285F /* MIMETypeRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = BC772C4D0C4EB3040083285F /* MIMETypeRegistry.h */; settings = {ATTRIBUTES = (Private, ); }; }; - BC772C5E0C4EB3440083285F /* MIMETypeRegistryMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC772C5D0C4EB3440083285F /* MIMETypeRegistryMac.mm */; }; BC772E131331620C001EC9CE /* CSSLineBoxContainValue.h in Headers */ = {isa = PBXBuildFile; fileRef = BC772E121331620C001EC9CE /* CSSLineBoxContainValue.h */; settings = {ATTRIBUTES = (P
[webkit-changes] [198049] trunk/Source/WebKit2
Title: [198049] trunk/Source/WebKit2 Revision 198049 Author enr...@apple.com Date 2016-03-11 14:50:21 -0800 (Fri, 11 Mar 2016) Log Message Use only selected text for Look up. https://bugs.webkit.org/show_bug.cgi?id=155380 Reviewed by Tim Horton. The corresponding piece that uses the extended context for Look up is not ready yet. For the moment default to retrieving the selected text. * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _lookup:]): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (198048 => 198049) --- trunk/Source/WebKit2/ChangeLog 2016-03-11 22:49:00 UTC (rev 198048) +++ trunk/Source/WebKit2/ChangeLog 2016-03-11 22:50:21 UTC (rev 198049) @@ -1,3 +1,16 @@ +2016-03-11 Enrica Casucci + +Use only selected text for Look up. +https://bugs.webkit.org/show_bug.cgi?id=155380 + +Reviewed by Tim Horton. + +The corresponding piece that uses the extended context for Look up +is not ready yet. For the moment default to retrieving the selected text. + +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView _lookup:]): + 2016-03-11 Chelsea Pugh [iOS] Allow clients to specify text suggestions to be used for a form input session Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (198048 => 198049) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2016-03-11 22:49:00 UTC (rev 198048) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2016-03-11 22:50:21 UTC (rev 198049) @@ -1610,10 +1610,10 @@ return (_page->editorState().isContentRichlyEditable) ? richTypes : plainTextTypes; } -- (void)_lookup:(CGPoint)point +- (void)_lookup:(id)sender { RetainPtr view = self; -_page->getLookupContextAtPoint(WebCore::IntPoint(point), [view](const String& string, CallbackBase::Error error) { +_page->getSelectionOrContentsAsString([view](const String& string, CallbackBase::Error error) { if (error != CallbackBase::Error::None) return; if (!string) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [197976] trunk/Source
Title: [197976] trunk/Source Revision 197976 Author enr...@apple.com Date 2016-03-10 17:06:48 -0800 (Thu, 10 Mar 2016) Log Message Expose additional WKDataDetectorTypes. https://bugs.webkit.org/show_bug.cgi?id=155331 rdar://problem/24175813 Reviewed by Tim Horton. Source/WebCore: Adding support for additional data detector types (tracking numbers, flight information and spotlight suggestions). * editing/cocoa/DataDetection.h: * editing/cocoa/DataDetection.mm: (WebCore::constructURLStringForResult): (WebCore::DataDetection::detectContentInRange): * platform/cocoa/DataDetectorsCoreSoftLink.h: * platform/cocoa/DataDetectorsCoreSoftLink.mm: * platform/spi/cocoa/DataDetectorsCoreSPI.h: Source/WebKit2: Adding API to enable data detection of tracking numbers, flight number and spotlight suggestions. * UIProcess/API/Cocoa/WKWebView.mm: (fromWKDataDetectorTypes): * UIProcess/API/Cocoa/WKWebViewConfiguration.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/editing/cocoa/DataDetection.h trunk/Source/WebCore/editing/cocoa/DataDetection.mm trunk/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.h trunk/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.mm trunk/Source/WebCore/platform/spi/cocoa/DataDetectorsCoreSPI.h trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h Diff Modified: trunk/Source/WebCore/ChangeLog (197975 => 197976) --- trunk/Source/WebCore/ChangeLog 2016-03-11 01:03:38 UTC (rev 197975) +++ trunk/Source/WebCore/ChangeLog 2016-03-11 01:06:48 UTC (rev 197976) @@ -1,3 +1,22 @@ +2016-03-10 Enrica Casucci + +Expose additional WKDataDetectorTypes. +https://bugs.webkit.org/show_bug.cgi?id=155331 +rdar://problem/24175813 + +Reviewed by Tim Horton. + +Adding support for additional data detector types (tracking +numbers, flight information and spotlight suggestions). + +* editing/cocoa/DataDetection.h: +* editing/cocoa/DataDetection.mm: +(WebCore::constructURLStringForResult): +(WebCore::DataDetection::detectContentInRange): +* platform/cocoa/DataDetectorsCoreSoftLink.h: +* platform/cocoa/DataDetectorsCoreSoftLink.mm: +* platform/spi/cocoa/DataDetectorsCoreSPI.h: + 2016-03-10 Daniel Bates CSP: Implement frame-ancestors directive Modified: trunk/Source/WebCore/editing/cocoa/DataDetection.h (197975 => 197976) --- trunk/Source/WebCore/editing/cocoa/DataDetection.h 2016-03-11 01:03:38 UTC (rev 197975) +++ trunk/Source/WebCore/editing/cocoa/DataDetection.h 2016-03-11 01:06:48 UTC (rev 197976) @@ -46,8 +46,9 @@ DataDetectorTypeLink = 1 << 1, DataDetectorTypeAddress = 1 << 2, DataDetectorTypeCalendarEvent = 1 << 3, -DataDetectorTypeTrackingNumber = 1 << 4, // Not individually selectable with the API -DataDetectorTypeFlight = 1 << 5, // Not individually selectable with the API +DataDetectorTypeTrackingNumber = 1 << 4, +DataDetectorTypeFlightNumber = 1 << 5, +DataDetectorTypeSpotlightSuggestion = 1 << 6, DataDetectorTypeAll = ULONG_MAX }; Modified: trunk/Source/WebCore/editing/cocoa/DataDetection.mm (197975 => 197976) --- trunk/Source/WebCore/editing/cocoa/DataDetection.mm 2016-03-11 01:03:38 UTC (rev 197975) +++ trunk/Source/WebCore/editing/cocoa/DataDetection.mm 2016-03-11 01:06:48 UTC (rev 197976) @@ -44,6 +44,7 @@ #import "VisiblePosition.h" #import "VisibleUnits.h" #import "htmlediting.h" +#import const char *dataDetectorsURLScheme = "x-apple-data-detectors"; const char *dataDetectorsAttributeTypeKey = "x-apple-data-detectors-type"; @@ -199,7 +200,8 @@ if (((detectionTypes & DataDetectorTypeAddress) && (DDResultCategoryAddress == category)) || ((detectionTypes & DataDetectorTypeTrackingNumber) && (CFStringCompare(get_DataDetectorsCore_DDBinderTrackingNumberKey(), type, 0) == kCFCompareEqualTo)) -|| ((detectionTypes & DataDetectorTypeFlight) && (CFStringCompare(get_DataDetectorsCore_DDBinderFlightInformationKey(), type, 0) == kCFCompareEqualTo)) +|| ((detectionTypes & DataDetectorTypeFlightNumber) && (CFStringCompare(get_DataDetectorsCore_DDBinderFlightInformationKey(), type, 0) == kCFCompareEqualTo)) +|| ((detectionTypes & DataDetectorTypeSpotlightSuggestion) && (CFStringCompare(DDBinderSpotlightSourceKey, type, 0) == kCFCompareEqualTo)) || ((detectionTypes & DataDetectorTypePhoneNumber) && (DDResultCategoryPhoneNumber == category)) || ((detectionTypes & DataDetectorTypeLink) && resultIsURL(currentResult))) { @@ -427,6 +429,9 @@ RetainPtr scanQuery = adoptCF(softLink_DataDetectorsCore_DDScanQueryCreate(NULL));
[webkit-changes] [197916] trunk/Source
Title: [197916] trunk/Source Revision 197916 Author enr...@apple.com Date 2016-03-09 18:05:49 -0800 (Wed, 09 Mar 2016) Log Message Retrieve additional context for some data detector link for preview and action menu. https://bugs.webkit.org/show_bug.cgi?id=155278 rdar://problem/24884951 Reviewed by Tim Horton. Source/WebCore: Adding helper function to compute a range by moving by a number of characters from a given position and direction. Adding function to check if the given data detector link element requires an extended context. * editing/VisibleUnits.cpp: (WebCore::rangeExpandedByCharactersInDirectionAtWordBoundary): * editing/VisibleUnits.h: * editing/cocoa/DataDetection.h: * editing/cocoa/DataDetection.mm: (WebCore::DataDetection::requiresExtendedContext): Source/WebKit2: Data detector results for items like calendar events, can be augmented retrieving the text surrounding the link. * Platform/spi/ios/DataDetectorsUISPI.h: * Shared/ios/InteractionInformationAtPosition.h: * Shared/ios/InteractionInformationAtPosition.mm: (WebKit::InteractionInformationAtPosition::encode): (WebKit::InteractionInformationAtPosition::decode): * UIProcess/ios/WKActionSheetAssistant.mm: (-[WKActionSheetAssistant showDataDetectorsSheet]): * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _dataForPreviewItemController:atPosition:type:]): * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::getPositionInformation): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/editing/VisibleUnits.cpp trunk/Source/WebCore/editing/VisibleUnits.h trunk/Source/WebCore/editing/cocoa/DataDetection.h trunk/Source/WebCore/editing/cocoa/DataDetection.mm trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Platform/spi/ios/DataDetectorsUISPI.h trunk/Source/WebKit2/Shared/ios/InteractionInformationAtPosition.h trunk/Source/WebKit2/Shared/ios/InteractionInformationAtPosition.mm trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm Diff Modified: trunk/Source/WebCore/ChangeLog (197915 => 197916) --- trunk/Source/WebCore/ChangeLog 2016-03-10 02:04:20 UTC (rev 197915) +++ trunk/Source/WebCore/ChangeLog 2016-03-10 02:05:49 UTC (rev 197916) @@ -1,3 +1,23 @@ +2016-03-09 Enrica Casucci + +Retrieve additional context for some data detector link for preview and action menu. +https://bugs.webkit.org/show_bug.cgi?id=155278 +rdar://problem/24884951 + +Reviewed by Tim Horton. + +Adding helper function to compute a range by moving by a number of characters +from a given position and direction. +Adding function to check if the given data detector link element requires +an extended context. + +* editing/VisibleUnits.cpp: +(WebCore::rangeExpandedByCharactersInDirectionAtWordBoundary): +* editing/VisibleUnits.h: +* editing/cocoa/DataDetection.h: +* editing/cocoa/DataDetection.mm: +(WebCore::DataDetection::requiresExtendedContext): + 2016-03-09 Daniel Bates Fix the Windows build after Modified: trunk/Source/WebCore/editing/VisibleUnits.cpp (197915 => 197916) --- trunk/Source/WebCore/editing/VisibleUnits.cpp 2016-03-10 02:04:20 UTC (rev 197915) +++ trunk/Source/WebCore/editing/VisibleUnits.cpp 2016-03-10 02:05:49 UTC (rev 197916) @@ -1983,6 +1983,25 @@ return result; } +PassRefPtr rangeExpandedByCharactersInDirectionAtWordBoundary(const VisiblePosition& position, int numberOfCharactersToExpand, SelectionDirection direction) +{ +Position start = position.deepEquivalent(); +Position end = position.deepEquivalent(); +for (int i = 0; i < numberOfCharactersToExpand; ++i) { +if (direction == DirectionBackward) +start = start.previous(Character); +else +end = end.next(Character); +} + +if (direction == DirectionBackward && !atBoundaryOfGranularity(start, WordGranularity, DirectionBackward)) +start = startOfWord(start).deepEquivalent(); +if (direction == DirectionForward && !atBoundaryOfGranularity(end, WordGranularity, DirectionForward)) +end = endOfWord(end).deepEquivalent(); + +return makeRange(start, end); +} + PassRefPtr rangeExpandedAroundPositionByCharacters(const VisiblePosition& position, int numberOfCharactersToExpand) { Position start = position.deepEquivalent(); Modified: trunk/Source/WebCore/editing/VisibleUnits.h (197915 => 197916) --- trunk/Source/WebCore/editing/VisibleUnits.h 2016-03-10 02:04:20 UTC (rev 197915) +++ trunk/Source/WebCore/editing/VisibleUnits.h 2016-03-10 02:05:49 UTC (rev 197916) @@ -108,6 +108,7 @@ WEBCORE_EXPORT VisiblePosition closestWordBoundaryForPosition(const VisiblePosition& position); WEBCORE_EXPORT void charactersAroundPosition(const VisiblePosition&, UChar32&
[webkit-changes] [197866] trunk/Source/WebKit2
Title: [197866] trunk/Source/WebKit2 Revision 197866 Author enr...@apple.com Date 2016-03-09 11:29:29 -0800 (Wed, 09 Mar 2016) Log Message Add two finger tap on links. https://bugs.webkit.org/show_bug.cgi?id=155205 rdar://problem/22937516 Reviewed by Sam Weinig. Adds two finger tap gesture recognizer. When performed on a link, it calls the delegate. * Platform/spi/ios/UIKitSPI.h: * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: * UIProcess/WebPageProxy.h: * UIProcess/ios/WKContentViewInteraction.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView setupInteraction]): (-[WKContentView cleanupInteraction]): (-[WKContentView _removeDefaultGestureRecognizers]): (-[WKContentView _addDefaultGestureRecognizers]): (-[WKContentView _twoFingerSingleTapGestureRecognized:]): * UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::handleTwoFingerTapAtPoint): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::handleTwoFingerTapAtPoint): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h trunk/Source/WebKit2/UIProcess/WebPageProxy.h trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (197865 => 197866) --- trunk/Source/WebKit2/ChangeLog 2016-03-09 19:04:07 UTC (rev 197865) +++ trunk/Source/WebKit2/ChangeLog 2016-03-09 19:29:29 UTC (rev 197866) @@ -1,3 +1,31 @@ +2016-03-09 Enrica Casucci + +Add two finger tap on links. +https://bugs.webkit.org/show_bug.cgi?id=155205 +rdar://problem/22937516 + +Reviewed by Sam Weinig. + +Adds two finger tap gesture recognizer. When performed +on a link, it calls the delegate. + +* Platform/spi/ios/UIKitSPI.h: +* UIProcess/API/Cocoa/WKUIDelegatePrivate.h: +* UIProcess/WebPageProxy.h: +* UIProcess/ios/WKContentViewInteraction.h: +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView setupInteraction]): +(-[WKContentView cleanupInteraction]): +(-[WKContentView _removeDefaultGestureRecognizers]): +(-[WKContentView _addDefaultGestureRecognizers]): +(-[WKContentView _twoFingerSingleTapGestureRecognized:]): +* UIProcess/ios/WebPageProxyIOS.mm: +(WebKit::WebPageProxy::handleTwoFingerTapAtPoint): +* WebProcess/WebPage/WebPage.h: +* WebProcess/WebPage/WebPage.messages.in: +* WebProcess/WebPage/ios/WebPageIOS.mm: +(WebKit::WebPage::handleTwoFingerTapAtPoint): + 2016-03-09 Alex Christensen Always call NSURLSession completion handlers Modified: trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h (197865 => 197866) --- trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h 2016-03-09 19:04:07 UTC (rev 197865) +++ trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h 2016-03-09 19:29:29 UTC (rev 197866) @@ -316,6 +316,8 @@ @interface UITapGestureRecognizer () @property (nonatomic, readonly) CGPoint location; +@property (nonatomic) CGFloat allowableMovement; +@property (nonatomic, readonly) CGPoint centroid; @end @class WebEvent; Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h (197865 => 197866) --- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h 2016-03-09 19:04:07 UTC (rev 197865) +++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h 2016-03-09 19:29:29 UTC (rev 197866) @@ -72,6 +72,7 @@ - (void)_webView:(WKWebView *)webView didDismissPreviewViewController:(UIViewController *)previewedViewController committing:(BOOL)committing WK_AVAILABLE(NA, 9_0); - (void)_webView:(WKWebView *)webView didDismissPreviewViewController:(UIViewController *)previewedViewController WK_AVAILABLE(NA, 9_0); - (BOOL)_webView:(WKWebView *)webView showCustomSheetForElement:(_WKActivatedElementInfo *)element WK_AVAILABLE(NA, WK_IOS_TBA); +- (void)_webView:(WKWebView *)webView alternateActionForURL:(NSURL *)url WK_AVAILABLE(NA, WK_IOS_TBA); - (NSArray *)_attachmentListForWebView:(WKWebView *)webView WK_AVAILABLE(NA, WK_IOS_TBA); - (NSUInteger)_webView:(WKWebView *)webView indexIntoAttachmentListForElement:(_WKActivatedElementInfo *)element WK_AVAILABLE(NA, WK_IOS_TBA); - (UIEdgeInsets)_webView:(WKWebView *)webView finalObscuredInsetsForScrollView:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset WK_AVAILABLE(NA, 9_0); Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (197865 => 197866) --- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2016
[webkit-changes] [197656] trunk/Source/WebKit2
Title: [197656] trunk/Source/WebKit2 Revision 197656 Author enr...@apple.com Date 2016-03-06 19:36:53 -0800 (Sun, 06 Mar 2016) Log Message Support preview on attachment elements. https://bugs.webkit.org/show_bug.cgi?id=155074 rdar://problem/24806079 Reviewed by Sam Weinig. Allowing preview to start on attachment elements. Adding a private UIDelegate method to provide the data for the preview. * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]): (-[WKContentView _dataForPreviewItemController:atPosition:type:]): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (197655 => 197656) --- trunk/Source/WebKit2/ChangeLog 2016-03-07 03:21:08 UTC (rev 197655) +++ trunk/Source/WebKit2/ChangeLog 2016-03-07 03:36:53 UTC (rev 197656) @@ -1,3 +1,19 @@ +2016-03-05 Enrica Casucci + +Support preview on attachment elements. +https://bugs.webkit.org/show_bug.cgi?id=155074 +rdar://problem/24806079 + +Reviewed by Sam Weinig. + +Allowing preview to start on attachment elements. +Adding a private UIDelegate method to provide the data for the preview. + +* UIProcess/API/Cocoa/WKUIDelegatePrivate.h: +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]): +(-[WKContentView _dataForPreviewItemController:atPosition:type:]): + 2016-03-06 Andreas Kling Reduce page cache capacity from 3 to 2. Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h (197655 => 197656) --- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h 2016-03-07 03:21:08 UTC (rev 197655) +++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h 2016-03-07 03:36:53 UTC (rev 197656) @@ -72,6 +72,8 @@ - (void)_webView:(WKWebView *)webView didDismissPreviewViewController:(UIViewController *)previewedViewController committing:(BOOL)committing WK_AVAILABLE(NA, 9_0); - (void)_webView:(WKWebView *)webView didDismissPreviewViewController:(UIViewController *)previewedViewController WK_AVAILABLE(NA, 9_0); - (BOOL)_webView:(WKWebView *)webView showCustomSheetForElement:(_WKActivatedElementInfo *)element WK_AVAILABLE(NA, WK_IOS_TBA); +- (NSArray *)_attachmentListForWebView:(WKWebView *)webView WK_AVAILABLE(NA, WK_IOS_TBA); +- (NSUInteger)_webView:(WKWebView *)webView indexIntoAttachmentListForElement:(_WKActivatedElementInfo *)element WK_AVAILABLE(NA, WK_IOS_TBA); - (UIEdgeInsets)_webView:(WKWebView *)webView finalObscuredInsetsForScrollView:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset WK_AVAILABLE(NA, 9_0); - (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForURL:(NSURL *)url defaultActions:(WK_ARRAY(_WKElementAction *) *)actions elementInfo:(_WKActivatedElementInfo *)elementInfo WK_AVAILABLE(NA, 9_0); - (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForAnimatedImageAtURL:(NSURL *)url defaultActions:(WK_ARRAY(_WKElementAction *) *)actions elementInfo:(_WKActivatedElementInfo *)elementInfo imageSize:(CGSize)imageSize WK_AVAILABLE(NA, 9_0); Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (197655 => 197656) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2016-03-07 03:21:08 UTC (rev 197655) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2016-03-07 03:36:53 UTC (rev 197656) @@ -3632,7 +3632,7 @@ return NO; [self ensurePositionInformationIsUpToDate:position]; -if (!_positionInformation.isLink && !_positionInformation.isImage) +if (!_positionInformation.isLink && !_positionInformation.isImage && !_positionInformation.isAttachment) return NO; String absoluteLinkURL = _positionInformation.url; @@ -3663,6 +3663,8 @@ BOOL canShowImagePreview = _positionInformation.isImage && supportsImagePreview; BOOL canShowLinkPreview = _positionInformation.isLink || canShowImagePreview; BOOL useImageURLForLink = NO; +BOOL supportsAttachmentPreview = [uiDelegate respondsToSelector:@selector(_attachmentListForWebView:)] && [uiDelegate respondsToSelector:@selector(_webView:indexIntoAttachmentListForElement:)]; +BOOL canShowAttachmentPreview = _positionInformation.isAttachment && supportsAttachmentPreview; if (canShowImagePreview && _positionInformation.isAnimatedImage) { canShowImagePreview = NO; @@ -3670,7 +3672,7 @@ useImageURLForLink = YES; } -if (!canShowLinkPreview && !canShowImagePreview) +if (!canShowLinkPreview && !can
[webkit-changes] [197596] trunk/Source
Title: [197596] trunk/Source Revision 197596 Author enr...@apple.com Date 2016-03-04 15:55:55 -0800 (Fri, 04 Mar 2016) Log Message Add a mechanism to customize the long press action. https://bugs.webkit.org/show_bug.cgi?id=154995 rdar://problem/24823732 Reviewed by Tim Horton. Source/WebCore: We want to allow long press on attachment elements as well. * WebCore.xcodeproj/project.pbxproj: Making HTMLAttachmentElement.h private. * html/HTMLAttachmentElement.h: Adding exported functions. Source/WebKit2: Adding a new private delegate method to allow clients to replace the action sheet displayed for images and links. The change also adds support for attachment elements. * Shared/ios/InteractionInformationAtPosition.h: * Shared/ios/InteractionInformationAtPosition.mm: (WebKit::InteractionInformationAtPosition::encode): (WebKit::InteractionInformationAtPosition::decode): * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: * UIProcess/API/Cocoa/_WKActivatedElementInfo.h: * UIProcess/ios/WKActionSheetAssistant.h: * UIProcess/ios/WKActionSheetAssistant.mm: (-[WKActionSheetAssistant showImageSheet]): (-[WKActionSheetAssistant showLinkSheet]): * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _showImageSheet]): (-[WKContentView _showAttachmentSheet]): (-[WKContentView _showLinkSheet]): (-[WKContentView _actionForLongPress]): (-[WKContentView actionSheetAssistant:shouldIncludeAppLinkActionsForElement:]): (-[WKContentView actionSheetAssistant:showCustomSheetForElement:]): (-[WKContentView actionSheetAssistant:decideActionsForElement:defaultActions:]): * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::getPositionInformation): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj trunk/Source/WebCore/html/HTMLAttachmentElement.h trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Shared/ios/InteractionInformationAtPosition.h trunk/Source/WebKit2/Shared/ios/InteractionInformationAtPosition.mm trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKActivatedElementInfo.h trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.h trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm Diff Modified: trunk/Source/WebCore/ChangeLog (197595 => 197596) --- trunk/Source/WebCore/ChangeLog 2016-03-04 23:33:22 UTC (rev 197595) +++ trunk/Source/WebCore/ChangeLog 2016-03-04 23:55:55 UTC (rev 197596) @@ -1,3 +1,16 @@ +2016-03-03 Enrica Casucci + +Add a mechanism to customize the long press action. +https://bugs.webkit.org/show_bug.cgi?id=154995 +rdar://problem/24823732 + +Reviewed by Tim Horton. + +We want to allow long press on attachment elements as well. + +* WebCore.xcodeproj/project.pbxproj: Making HTMLAttachmentElement.h private. +* html/HTMLAttachmentElement.h: Adding exported functions. + 2016-03-04 Andreas Kling [iOS] Throw away compiled RegExp code when navigating to a new page. Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (197595 => 197596) --- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2016-03-04 23:33:22 UTC (rev 197595) +++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2016-03-04 23:55:55 UTC (rev 197596) @@ -2743,7 +2743,7 @@ 7C5343FC17B74B63004232F0 /* JSMediaQueryListListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C5343FA17B74B63004232F0 /* JSMediaQueryListListener.cpp */; }; 7C5343FD17B74B63004232F0 /* JSMediaQueryListListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C5343FB17B74B63004232F0 /* JSMediaQueryListListener.h */; }; 7C5F28FB1A827D8400C0F31F /* HTMLAttachmentElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C5F28F91A827D8400C0F31F /* HTMLAttachmentElement.cpp */; }; - 7C5F28FC1A827D8400C0F31F /* HTMLAttachmentElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C5F28FA1A827D8400C0F31F /* HTMLAttachmentElement.h */; }; + 7C5F28FC1A827D8400C0F31F /* HTMLAttachmentElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C5F28FA1A827D8400C0F31F /* HTMLAttachmentElement.h */; settings = {ATTRIBUTES = (Private, ); }; }; 7C73FB07191EF417007DE061 /* UserMessageHandlersNamespace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C73FB05191EF416007DE061 /* UserMessageHandlersNamespace.cpp */; }; 7C73FB08191EF417007DE061 /* UserMessageHandlersNamespace.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C73FB06191EF417007DE061 /* UserMessageHandlersNamespace.h */; settings = {ATTRIBUTES = (Private, ); }; }; 7C73FB0C191EF5A8007DE061 /* JSUserMessageHandlersNamespace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C73FB0A191EF5A8007DE061 /* JSUserMessageHandlersNamespace.cpp */; }; Modified: trunk/Source/WebCore/html/HTMLAttachmentElement.h (197595 => 197596) --- trunk/Sourc
[webkit-changes] [196445] trunk/Source/WebCore
Title: [196445] trunk/Source/WebCore Revision 196445 Author enr...@apple.com Date 2016-02-11 15:04:13 -0800 (Thu, 11 Feb 2016) Log Message WebContent process crashes when performing data detection on content with existing data detector links. https://bugs.webkit.org/show_bug.cgi?id=154118 rdar://problem/24511860 Reviewed by Tim Horton. The DOM mutation caused by removing the existing links, can shift the range endpoints. We now save the range enpoints as positions so that we can recreate the ranges, if a DOM mutation occurred. * editing/cocoa/DataDetection.mm: (WebCore::removeResultLinksFromAnchor): (WebCore::searchForLinkRemovingExistingDDLinks): (WebCore::DataDetection::detectContentInRange): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/editing/cocoa/DataDetection.mm Diff Modified: trunk/Source/WebCore/ChangeLog (196444 => 196445) --- trunk/Source/WebCore/ChangeLog 2016-02-11 23:01:39 UTC (rev 196444) +++ trunk/Source/WebCore/ChangeLog 2016-02-11 23:04:13 UTC (rev 196445) @@ -1,3 +1,20 @@ +2016-02-11 Enrica Casucci + +WebContent process crashes when performing data detection on content with existing data detector links. +https://bugs.webkit.org/show_bug.cgi?id=154118 +rdar://problem/24511860 + +Reviewed by Tim Horton. + +The DOM mutation caused by removing the existing links, can shift the range endpoints. +We now save the range enpoints as positions so that we can recreate the ranges, +if a DOM mutation occurred. + +* editing/cocoa/DataDetection.mm: +(WebCore::removeResultLinksFromAnchor): +(WebCore::searchForLinkRemovingExistingDDLinks): +(WebCore::DataDetection::detectContentInRange): + 2016-02-11 Jer Noble Make MediaResourceLoader behave more like a CachedResourceLoader. Modified: trunk/Source/WebCore/editing/cocoa/DataDetection.mm (196444 => 196445) --- trunk/Source/WebCore/editing/cocoa/DataDetection.mm 2016-02-11 23:01:39 UTC (rev 196444) +++ trunk/Source/WebCore/editing/cocoa/DataDetection.mm 2016-02-11 23:04:13 UTC (rev 196445) @@ -240,14 +240,16 @@ } } -static bool searchForLinkRemovingExistingDDLinks(Node* startNode, Node* endNode) +static bool searchForLinkRemovingExistingDDLinks(Node* startNode, Node* endNode, bool &didModifyDOM) { +didModifyDOM = false; Node *node = startNode; while (node) { if (is(*node)) { if (downcast(*node).getAttribute(dataDetectorsURLScheme) != "true") return true; removeResultLinksFromAnchor(node, node->parentElement()); +didModifyDOM = true; } if (node == endNode) { @@ -259,6 +261,7 @@ if (downcast(*node).getAttribute(dataDetectorsURLScheme) != "true") return true; removeResultLinksFromAnchor(node, node->parentElement()); +didModifyDOM = true; } node = node->parentNode(); } @@ -520,10 +523,25 @@ NSString *identifier = dataDetectorStringForPath(indexPaths[resultIndex].get()); NSString *correspondingURL = constructURLStringForResult(coreResult, identifier, referenceDate, (NSTimeZone *)tz, types); +bool didModifyDOM = false; -if (!correspondingURL || searchForLinkRemovingExistingDDLinks(&resultRanges.first()->startContainer(), &resultRanges.last()->endContainer())) +// Store the range boundaries as Position, because the DOM could change if we find +// old data detector link. +Vector> rangeBoundaries; +for (auto& range : resultRanges) +rangeBoundaries.append(std::make_pair(range->startPosition(), range->endPosition())); + +if (!correspondingURL || searchForLinkRemovingExistingDDLinks(&resultRanges.first()->startContainer(), &resultRanges.last()->endContainer(), didModifyDOM)) continue; +if (didModifyDOM) { +// If the DOM was modified because some old links were removed, +// we need to recreate the ranges because they could no longer be valid. +resultRanges.clear(); +for (auto& rangeBoundary : rangeBoundaries) +resultRanges.append(Range::create(*rangeBoundary.first.document(), rangeBoundary.first, rangeBoundary.second)); +} + lastModifiedQueryOffset = queryRange.end; for (auto& range : resultRanges) { ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [196037] trunk/Source/WebKit2
Title: [196037] trunk/Source/WebKit2 Revision 196037 Author enr...@apple.com Date 2016-02-02 16:09:33 -0800 (Tue, 02 Feb 2016) Log Message Provide handleKeyWebEvent with completion handler. https://bugs.webkit.org/show_bug.cgi?id=153806 rdar://problem/24399218 Reviewed by Tim Horton. * UIProcess/ios/WKContentViewInteraction.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView handleKeyWebEvent:withCompletionHandler:]): (-[WKContentView _didHandleKeyEvent:eventWasHandled:]): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (196036 => 196037) --- trunk/Source/WebKit2/ChangeLog 2016-02-03 00:08:33 UTC (rev 196036) +++ trunk/Source/WebKit2/ChangeLog 2016-02-03 00:09:33 UTC (rev 196037) @@ -1,3 +1,16 @@ +2016-02-02 Enrica Casucci + +Provide handleKeyWebEvent with completion handler. +https://bugs.webkit.org/show_bug.cgi?id=153806 +rdar://problem/24399218 + +Reviewed by Tim Horton. + +* UIProcess/ios/WKContentViewInteraction.h: +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView handleKeyWebEvent:withCompletionHandler:]): +(-[WKContentView _didHandleKeyEvent:eventWasHandled:]): + 2016-02-02 Alex Christensen Fix authentication with NetworkSession Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h (196036 => 196037) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h 2016-02-03 00:08:33 UTC (rev 196036) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h 2016-02-03 00:09:33 UTC (rev 196037) @@ -70,6 +70,7 @@ typedef void (^UIWKDictationContextHandler)(NSString *selectedText, NSString *beforeText, NSString *afterText); typedef void (^UIWKSelectionCompletionHandler)(void); typedef void (^UIWKSelectionWithDirectionCompletionHandler)(BOOL selectionEndIsMoving); +typedef void (^UIWKKeyWebEventCompletionHandler)(WebIOSEvent *theEvent, BOOL wasHandled); namespace WebKit { struct WKSelectionDrawingInfo { @@ -142,6 +143,7 @@ WebKit::AssistedNodeInformation _assistedNodeInformation; RetainPtr> _inputPeripheral; RetainPtr _uiEventBeingResent; +UIWKKeyWebEventCompletionHandler _keyWebEventHandler; CGPoint _lastInteractionLocation; Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (196036 => 196037) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2016-02-03 00:08:33 UTC (rev 196036) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2016-02-03 00:09:33 UTC (rev 196037) @@ -2870,8 +2870,21 @@ _page->handleKeyboardEvent(NativeWebKeyboardEvent(theEvent)); } +- (void)handleKeyWebEvent:(WebIOSEvent *)theEvent withCompletionHandler:(void (^)(WebIOSEvent *theEvent, BOOL wasHandled))completionHandler +{ +_keyWebEventHandler = [completionHandler copy]; +_page->handleKeyboardEvent(NativeWebKeyboardEvent(theEvent)); +} + - (void)_didHandleKeyEvent:(WebIOSEvent *)event eventWasHandled:(BOOL)eventWasHandled { +if (_keyWebEventHandler) { +_keyWebEventHandler(event, eventWasHandled); +[_keyWebEventHandler release]; +_keyWebEventHandler = nil; +return; +} + if (event.type == WebEventKeyDown) { // FIXME: This is only for staging purposes. if ([[UIKeyboardImpl sharedInstance] respondsToSelector:@selector(didHandleWebKeyEvent:)]) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [195840] trunk/Source/WebKit2
Title: [195840] trunk/Source/WebKit2 Revision 195840 Author enr...@apple.com Date 2016-01-29 14:11:48 -0800 (Fri, 29 Jan 2016) Log Message One more iOS build fix. Unreviewed. * Platform/spi/ios/UIKitSPI.h: Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h Diff Modified: trunk/Source/WebKit2/ChangeLog (195839 => 195840) --- trunk/Source/WebKit2/ChangeLog 2016-01-29 21:29:08 UTC (rev 195839) +++ trunk/Source/WebKit2/ChangeLog 2016-01-29 22:11:48 UTC (rev 195840) @@ -1,5 +1,13 @@ 2016-01-29 Enrica Casucci +One more iOS build fix. + +Unreviewed. + +* Platform/spi/ios/UIKitSPI.h: + +2016-01-29 Enrica Casucci + iOS build fix after r195826. Unreviewed. Modified: trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h (195839 => 195840) --- trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h 2016-01-29 21:29:08 UTC (rev 195839) +++ trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h 2016-01-29 22:11:48 UTC (rev 195840) @@ -241,6 +241,7 @@ @interface UIGestureRecognizer () - (void)requireOtherGestureToFail:(UIGestureRecognizer *)gestureRecognizer; +@property(nonatomic, copy) NSArray *allowedTouchTypes; @end @interface UILongPressGestureRecognizer () ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [195833] trunk/Source/WebKit2
Title: [195833] trunk/Source/WebKit2 Revision 195833 Author enr...@apple.com Date 2016-01-29 12:15:09 -0800 (Fri, 29 Jan 2016) Log Message iOS build fix after r195826. Unreviewed. * Platform/spi/ios/UIKitSPI.h: Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h Diff Modified: trunk/Source/WebKit2/ChangeLog (195832 => 195833) --- trunk/Source/WebKit2/ChangeLog 2016-01-29 19:47:03 UTC (rev 195832) +++ trunk/Source/WebKit2/ChangeLog 2016-01-29 20:15:09 UTC (rev 195833) @@ -1,5 +1,13 @@ 2016-01-29 Enrica Casucci +iOS build fix after r195826. + +Unreviewed. + +* Platform/spi/ios/UIKitSPI.h: + +2016-01-29 Enrica Casucci + Disable text interaction with pencil. https://bugs.webkit.org/show_bug.cgi?id=153655 rdar://problem/24337778 Modified: trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h (195832 => 195833) --- trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h 2016-01-29 19:47:03 UTC (rev 195832) +++ trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h 2016-01-29 20:15:09 UTC (rev 195833) @@ -294,6 +294,14 @@ - (CADisplay *)_display; @end +typedef enum { +UITouchTypeDirect +} UITouchType; + +@interface UITouch () +@property(nonatomic,readonly) UITouchType type; +@end + @interface UIScrollView () - (void)_stopScrollingAndZoomingAnimations; - (void)_zoomToCenter:(CGPoint)center scale:(CGFloat)scale duration:(CFTimeInterval)duration force:(BOOL)force; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [195826] trunk/Source/WebKit2
Title: [195826] trunk/Source/WebKit2 Revision 195826 Author enr...@apple.com Date 2016-01-29 11:07:50 -0800 (Fri, 29 Jan 2016) Log Message Disable text interaction with pencil. https://bugs.webkit.org/show_bug.cgi?id=153655 rdar://problem/24337778 Reviewed by Tim Horton. * Platform/spi/ios/UIKitSPI.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _createAndConfigureDoubleTapGestureRecognizer]): (-[WKContentView _singleTapCommited:]): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (195825 => 195826) --- trunk/Source/WebKit2/ChangeLog 2016-01-29 18:59:55 UTC (rev 195825) +++ trunk/Source/WebKit2/ChangeLog 2016-01-29 19:07:50 UTC (rev 195826) @@ -1,3 +1,16 @@ +2016-01-29 Enrica Casucci + +Disable text interaction with pencil. +https://bugs.webkit.org/show_bug.cgi?id=153655 +rdar://problem/24337778 + +Reviewed by Tim Horton. + +* Platform/spi/ios/UIKitSPI.h: +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView _createAndConfigureDoubleTapGestureRecognizer]): +(-[WKContentView _singleTapCommited:]): + 2016-01-29 Mario Sanchez Prada [GTK] WebProcess crashes when quickly attempting many DnD operations Modified: trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h (195825 => 195826) --- trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h 2016-01-29 18:59:55 UTC (rev 195825) +++ trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h 2016-01-29 19:07:50 UTC (rev 195826) @@ -24,6 +24,7 @@ */ #import +#import #if USE(APPLE_INTERNAL_SDK) @@ -311,6 +312,7 @@ @interface UITapGestureRecognizer () @property (nonatomic, readonly) CGPoint location; +@property (nonatomic, readonly) NSArray *touches; @end @class WebEvent; Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (195825 => 195826) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2016-01-29 18:59:55 UTC (rev 195825) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2016-01-29 19:07:50 UTC (rev 195826) @@ -434,6 +434,7 @@ { _doubleTapGestureRecognizer = adoptNS([[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(_doubleTapRecognized:)]); [_doubleTapGestureRecognizer setNumberOfTapsRequired:2]; +[_doubleTapGestureRecognizer setAllowedTouchTypes:@[@(UITouchTypeDirect)]]; [_doubleTapGestureRecognizer setDelegate:self]; [self addGestureRecognizer:_doubleTapGestureRecognizer.get()]; [_singleTapGestureRecognizer requireOtherGestureToFail:_doubleTapGestureRecognizer.get()]; @@ -1332,7 +1333,8 @@ // We don't want to clear the selection if it is in editable content. // The selection could have been set by autofocusing on page load and not // reflected in the UI process since the user was not interacting with the page. -if (!_page->editorState().isContentEditable) +UITouch *touch = [gestureRecognizer.touches lastObject]; +if (!_page->editorState().isContentEditable && touch.type == UITouchTypeDirect) [_webSelectionAssistant clearSelection]; _lastInteractionLocation = gestureRecognizer.location; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [195769] trunk/Source
Title: [195769] trunk/Source Revision 195769 Author enr...@apple.com Date 2016-01-28 11:40:36 -0800 (Thu, 28 Jan 2016) Log Message Should avoid navigation for some data detector urls. https://bugs.webkit.org/show_bug.cgi?id=153600 Reviewed by Tim Horton. Source/WebCore: Adding helper function to decide whether the default action should be performed. * editing/cocoa/DataDetection.h: * editing/cocoa/DataDetection.mm: (WebCore::DataDetection::shouldCancelDefaultAction): Source/WebKit2: When a tap is commited, we normally generate a synthetic click if the node responds to click events. This patch adds the logic to prevent that from happening if the node is a data detector link with certain characteristics (calendar event, telephone, etc.). If this is the case, we compute the interaction information as position, send it over to the UI process and notify that we did not handle the tap. The page client is now also notified of this event and can show the data detector sheet if appropriate. * UIProcess/PageClient.h: * UIProcess/ios/PageClientImplIOS.h: * UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::toolTipChanged): (WebKit::PageClientImpl::didNotHandleTapAsClick): (WebKit::PageClientImpl::decidePolicyForGeolocationPermissionRequest): * UIProcess/ios/WKContentViewInteraction.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView clearSelection]): (-[WKContentView _didNotHandleTapAsClick:]): (-[WKContentView _positionInformationDidChange:]): * UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::didNotHandleTapAsClick): * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::commitPotentialTap): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/editing/cocoa/DataDetection.h trunk/Source/WebCore/editing/cocoa/DataDetection.mm trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/PageClient.h trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm Diff Modified: trunk/Source/WebCore/ChangeLog (195768 => 195769) --- trunk/Source/WebCore/ChangeLog 2016-01-28 19:34:36 UTC (rev 195768) +++ trunk/Source/WebCore/ChangeLog 2016-01-28 19:40:36 UTC (rev 195769) @@ -1,3 +1,16 @@ +2016-01-28 Enrica Casucci + +Should avoid navigation for some data detector urls. +https://bugs.webkit.org/show_bug.cgi?id=153600 + +Reviewed by Tim Horton. + +Adding helper function to decide whether the default action should be performed. + +* editing/cocoa/DataDetection.h: +* editing/cocoa/DataDetection.mm: +(WebCore::DataDetection::shouldCancelDefaultAction): + 2016-01-28 Dave Hyatt Roll out r194555, as it introduced some bad regressions and was not Modified: trunk/Source/WebCore/editing/cocoa/DataDetection.h (195768 => 195769) --- trunk/Source/WebCore/editing/cocoa/DataDetection.h 2016-01-28 19:34:36 UTC (rev 195768) +++ trunk/Source/WebCore/editing/cocoa/DataDetection.h 2016-01-28 19:40:36 UTC (rev 195769) @@ -59,6 +59,7 @@ WEBCORE_EXPORT static NSArray *detectContentInRange(RefPtr& contextRange, DataDetectorTypes); WEBCORE_EXPORT static bool isDataDetectorLink(Element*); WEBCORE_EXPORT static String dataDetectorIdentifier(Element*); +WEBCORE_EXPORT static bool shouldCancelDefaultAction(Element*); }; } // namespace WebCore Modified: trunk/Source/WebCore/editing/cocoa/DataDetection.mm (195768 => 195769) --- trunk/Source/WebCore/editing/cocoa/DataDetection.mm 2016-01-28 19:34:36 UTC (rev 195768) +++ trunk/Source/WebCore/editing/cocoa/DataDetection.mm 2016-01-28 19:40:36 UTC (rev 195769) @@ -61,8 +61,26 @@ return element->getAttribute(dataDetectorsAttributeResultKey); } +bool DataDetection::shouldCancelDefaultAction(Element* element) +{ #if PLATFORM(MAC) +UNUSED_PARAM(element); +return false; +#else +// FIXME: We should also compute the DDResultRef and check the result category. +if (!is(*element)) +return false; +if (element->getAttribute(dataDetectorsURLScheme) != "true") +return false; +String type = element->getAttribute(dataDetectorsAttributeTypeKey); +if (type == "misc" || type == "calendar-event" || type == "telephone") +return true; +return false; +#endif +} +#if PLATFORM(MAC) + static RetainPtr detectItemAtPositionWithRange(VisiblePosition position, RefPtr contextRange, FloatRect& detectedDataBoundingBox, RefPtr& detectedDataRange) { String fullPlainTextString = plainText(contextRange.get()); Modified: trunk/Source/WebKit2/ChangeLog (195768 => 195769) --- trunk/Source/WebKit2/ChangeLog 2016-01-28 19:34:36 UTC (rev 19576
[webkit-changes] [195722] trunk/Source
Title: [195722] trunk/Source Revision 195722 Author enr...@apple.com Date 2016-01-27 17:36:06 -0800 (Wed, 27 Jan 2016) Log Message Cache results of data detection in the UI process when load completes. https://bugs.webkit.org/show_bug.cgi?id=153560 Reviewed by Tim Horton. Source/WebCore: Adding new FrameLoaderClient method to notify that data detection is complete and provide the results. * loader/EmptyClients.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame): * loader/FrameLoaderClient.h: Source/WebKit/mac: Adding empty implementation for WK1. * WebCoreSupport/WebFrameLoaderClient.h: * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::dispatchDidFinishDataDetection): Source/WebKit2: This patch changes when the results of data detections are sent to the UIProcess. Before this change, they were only provided as part of InteractionInformationAtPosition, which is populated when long press gesture is triggered. We need to have the results available if the client wants to allow navigation to a data detector link, in order to allow them to retrieve the full url. With this change, we now send the results as soon as they are computed and keep them in the WebPageProxy object so that they can be fetched when necessary from a WKWebView private interface. * Shared/Cocoa/DataDetectionResult.h: Added. * Shared/Cocoa/DataDetectionResult.mm: Added. (WebKit::DataDetectionResult::encode): (WebKit::DataDetectionResult::decode): * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _snapshotLayerContentsForBackForwardListItem:]): (-[WKWebView _dataDetectionResults]): (-[WKWebView _didRelaunchProcess]): * UIProcess/API/Cocoa/WKWebViewPrivate.h: * UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::setDataDetectionResult): (WebKit::WebPageProxy::saveRecentSearches): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::websiteDataStore): (WebKit::WebPageProxy::dataDetectionResults): (WebKit::WebPageProxy::scrollingCoordinatorProxy): * UIProcess/WebPageProxy.messages.in: * UIProcess/ios/WKContentViewInteraction.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView ensurePositionInformationIsUpToDate:]): (-[WKContentView _dataDetectionResults]): (-[WKContentView gestureRecognizerShouldBegin:]): * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidReceiveContentLength): (WebKit::WebFrameLoaderClient::dispatchDidFinishDataDetection): (WebKit::WebFrameLoaderClient::dispatchDidFinishLoading): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): (WebKit::WebPage::setDataDetectionResults): (WebKit::WebPage::willCommitLayerTree): * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::shouldExtendIncrementalRenderingSuppression): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/loader/EmptyClients.h trunk/Source/WebCore/loader/FrameLoader.cpp trunk/Source/WebCore/loader/FrameLoaderClient.h trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h trunk/Source/WebKit2/UIProcess/Cocoa/WebPageProxyCocoa.mm trunk/Source/WebKit2/UIProcess/WebPageProxy.h trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h Added Paths trunk/Source/WebKit2/Shared/Cocoa/DataDetectionResult.h trunk/Source/WebKit2/Shared/Cocoa/DataDetectionResult.mm Diff Modified: trunk/Source/WebCore/ChangeLog (195721 => 195722) --- trunk/Source/WebCore/ChangeLog 2016-01-28 01:34:33 UTC (rev 195721) +++ trunk/Source/WebCore/ChangeLog 2016-01-28 01:36:06 UTC (rev 195722) @@ -1,3 +1,18 @@ +2016-01-27 Enrica Casucci + +Cache results of data detection in the UI process when load completes. +https://bugs.webkit.org/show_bug.cgi?id=153560 + +Reviewed by Tim Horton. + +Adding new FrameLoaderClient method to notify that data +detection is complete and provide the results. + +* loader/EmptyClients.h: +* loader/FrameLoader.cpp: +(WebCore::FrameLoader::checkLoadCompleteForThisFrame): +* loader/FrameLoaderClient.h: + 2016-01-27 Daniel Bates Move ContentSecurityPolicy.{cpp, h} to its own directory Modified: trunk/Source/WebCore/loader/EmptyClients.h (195721 => 195722) --- trunk/Source/W
[webkit-changes] [195574] trunk/Source
Title: [195574] trunk/Source Revision 195574 Author enr...@apple.com Date 2016-01-25 18:18:13 -0800 (Mon, 25 Jan 2016) Log Message Add support for DataDetectors in WK (iOS). https://bugs.webkit.org/show_bug.cgi?id=152989 rdar://problem/22855960 Reviewed by Tim Horton. Source/WebCore: Adding new helper functions for data detection related tasks. The patch also fixes a bug when creating DOM ranges from DDQueryRange spanning multiple fragments. * editing/cocoa/DataDetection.h: * editing/cocoa/DataDetection.mm: (WebCore::DataDetection::isDataDetectorLink): (WebCore::DataDetection::dataDetectorIdentifier): (WebCore::detectItemAtPositionWithRange): (WebCore::DataDetection::detectItemAroundHitTestResult): (WebCore::resultIsURL): (WebCore::removeResultLinksFromAnchor): (WebCore::searchForLinkRemovingExistingDDLinks): (WebCore::DataDetection::detectContentInRange): Source/WebKit2: Moving InteractionInformationAtPosition files to platform folder, since this is only used on iOS and changing from .cpp to .mm. The structure is extended to include data detection specific fields and the relevant encode/decode functions have been updated to handle the new fields. The patch also adds a new WKUIDelegatePrivate method to allow the client to provide additional context for data detection actions. * Platform/spi/ios/UIKitSPI.h: * Shared/InteractionInformationAtPosition.cpp: Removed. * Shared/InteractionInformationAtPosition.h: Removed. * Shared/ios/InteractionInformationAtPosition.h: Copied from Shared/InteractionInformationAtPosition.h. * Shared/ios/InteractionInformationAtPosition.mm: Copied from Shared/InteractionInformationAtPosition.cpp. (WebKit::InteractionInformationAtPosition::encode): (WebKit::InteractionInformationAtPosition::decode): * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: * UIProcess/WebPageProxy.h: * UIProcess/ios/WKActionSheetAssistant.h: * UIProcess/ios/WKActionSheetAssistant.mm: (-[WKActionSheetAssistant showDataDetectorsSheet]): * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView actionSheetAssistantDidStopInteraction:]): (-[WKContentView dataDetectionContextForActionSheetAssistant:]): (-[WKContentView selectedTextForActionSheetAssistant:]): (-[WKContentView _dataForPreviewItemController:atPosition:type:]): * UIProcess/ios/WebPageProxyIOS.mm: * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::getPositionInformation): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/editing/cocoa/DataDetection.h trunk/Source/WebCore/editing/cocoa/DataDetection.mm trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h trunk/Source/WebKit2/UIProcess/WebPageProxy.h trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.h trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm Added Paths trunk/Source/WebKit2/Shared/ios/InteractionInformationAtPosition.h trunk/Source/WebKit2/Shared/ios/InteractionInformationAtPosition.mm Removed Paths trunk/Source/WebKit2/Shared/InteractionInformationAtPosition.cpp trunk/Source/WebKit2/Shared/InteractionInformationAtPosition.h Diff Modified: trunk/Source/WebCore/ChangeLog (195573 => 195574) --- trunk/Source/WebCore/ChangeLog 2016-01-26 01:56:15 UTC (rev 195573) +++ trunk/Source/WebCore/ChangeLog 2016-01-26 02:18:13 UTC (rev 195574) @@ -1,3 +1,26 @@ +2016-01-25 Enrica Casucci + +Add support for DataDetectors in WK (iOS). +https://bugs.webkit.org/show_bug.cgi?id=152989 +rdar://problem/22855960 + +Reviewed by Tim Horton. + +Adding new helper functions for data detection related tasks. +The patch also fixes a bug when creating DOM ranges from DDQueryRange +spanning multiple fragments. + +* editing/cocoa/DataDetection.h: +* editing/cocoa/DataDetection.mm: +(WebCore::DataDetection::isDataDetectorLink): +(WebCore::DataDetection::dataDetectorIdentifier): +(WebCore::detectItemAtPositionWithRange): +(WebCore::DataDetection::detectItemAroundHitTestResult): +(WebCore::resultIsURL): +(WebCore::removeResultLinksFromAnchor): +(WebCore::searchForLinkRemovingExistingDDLinks): +(WebCore::DataDetection::detectContentInRange): + 2016-01-25 Myles C. Maxfield Remove broken cache from CSSFontFaceSource Modified: trunk/Source/WebCore/editing/cocoa/DataDetection.h (195573 => 195574) --- trunk/Source/WebCore/editing/cocoa/DataDetection.h 2016-01-26 01:56:15 UTC (rev 195573) +++ trunk/Source/WebCore/editing/cocoa/DataDetection.h 2016-01-26 02:18:13 UTC (rev 195574) @@ -28,12 +28,14 @@ #import #import +#import OBJC_CLASS DDActionC
[webkit-changes] [195494] trunk/Source
Title: [195494] trunk/Source Revision 195494 Author enr...@apple.com Date 2016-01-22 16:24:02 -0800 (Fri, 22 Jan 2016) Log Message Add support for DataDetectors in WK (iOS). https://bugs.webkit.org/show_bug.cgi?id=152989 rdar://problem/22855960 Reviewed by Tim Horton. Source/WebCore: This patch adds the logic to perform data detection and modify the DOM by adding data detector links as appropriate. The data detector results returned by detectContentInRange are stored in the Frame object. * editing/cocoa/DataDetection.h: * editing/cocoa/DataDetection.mm: (WebCore::resultIsURL): (WebCore::constructURLStringForResult): (WebCore::removeResultLinksFromAnchor): (WebCore::searchForLinkRemovingExistingDDLinks): (WebCore::dataDetectorTypeForCategory): (WebCore::buildQuery): (WebCore::DataDetection::detectContentInRange): * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame): * page/Frame.h: (WebCore::Frame::setDataDetectionResults): (WebCore::Frame::dataDetectionResults): * platform/spi/cocoa/DataDetectorsCoreSPI.h: (DDQueryOffsetCompare): Source/WebKit2: * UIProcess/API/Cocoa/WKWebView.mm: (fromWKDataDetectorTypes): Changed parameter to uint64_t to successfully compare against WKDataDetectorTypeAll. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/editing/cocoa/DataDetection.h trunk/Source/WebCore/editing/cocoa/DataDetection.mm trunk/Source/WebCore/loader/FrameLoader.cpp trunk/Source/WebCore/page/Frame.h trunk/Source/WebCore/platform/spi/cocoa/DataDetectorsCoreSPI.h trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm Diff Modified: trunk/Source/WebCore/ChangeLog (195493 => 195494) --- trunk/Source/WebCore/ChangeLog 2016-01-23 00:19:02 UTC (rev 195493) +++ trunk/Source/WebCore/ChangeLog 2016-01-23 00:24:02 UTC (rev 195494) @@ -1,3 +1,33 @@ +2016-01-22 Enrica Casucci + +Add support for DataDetectors in WK (iOS). +https://bugs.webkit.org/show_bug.cgi?id=152989 +rdar://problem/22855960 + +Reviewed by Tim Horton. + +This patch adds the logic to perform data detection and modify +the DOM by adding data detector links as appropriate. +The data detector results returned by detectContentInRange are +stored in the Frame object. + +* editing/cocoa/DataDetection.h: +* editing/cocoa/DataDetection.mm: +(WebCore::resultIsURL): +(WebCore::constructURLStringForResult): +(WebCore::removeResultLinksFromAnchor): +(WebCore::searchForLinkRemovingExistingDDLinks): +(WebCore::dataDetectorTypeForCategory): +(WebCore::buildQuery): +(WebCore::DataDetection::detectContentInRange): +* loader/FrameLoader.cpp: +(WebCore::FrameLoader::checkLoadCompleteForThisFrame): +* page/Frame.h: +(WebCore::Frame::setDataDetectionResults): +(WebCore::Frame::dataDetectionResults): +* platform/spi/cocoa/DataDetectorsCoreSPI.h: +(DDQueryOffsetCompare): + 2016-01-22 Daniel Bates LayoutTest http/tests/security/xssAuditor/embed-tag-in-path-unterminated.html crashing @@ -1724,7 +1754,6 @@ (WebCore::matchesFutureCuePseudoClass): (WebCore::matchesPastCuePseudoClass): ->>>>>>> .r195316 2016-01-19 Chris Dumez Unreviewed, rolling out r195179. Modified: trunk/Source/WebCore/editing/cocoa/DataDetection.h (195493 => 195494) --- trunk/Source/WebCore/editing/cocoa/DataDetection.h 2016-01-23 00:19:02 UTC (rev 195493) +++ trunk/Source/WebCore/editing/cocoa/DataDetection.h 2016-01-23 00:24:02 UTC (rev 195494) @@ -30,6 +30,7 @@ #import OBJC_CLASS DDActionContext; +OBJC_CLASS NSArray; namespace WebCore { @@ -53,7 +54,7 @@ #if PLATFORM(MAC) WEBCORE_EXPORT static RetainPtr detectItemAroundHitTestResult(const HitTestResult&, FloatRect& detectedDataBoundingBox, RefPtr& detectedDataRange); #endif -WEBCORE_EXPORT static void detectContentInRange(RefPtr& contextRange, DataDetectorTypes); +WEBCORE_EXPORT static NSArray *detectContentInRange(RefPtr& contextRange, DataDetectorTypes); }; } // namespace WebCore Modified: trunk/Source/WebCore/editing/cocoa/DataDetection.mm (195493 => 195494) --- trunk/Source/WebCore/editing/cocoa/DataDetection.mm 2016-01-23 00:19:02 UTC (rev 195493) +++ trunk/Source/WebCore/editing/cocoa/DataDetection.mm 2016-01-23 00:24:02 UTC (rev 195494) @@ -44,6 +44,12 @@ #import "VisibleUnits.h" #import "htmlediting.h" +#if PLATFORM(IOS) +const char *dataDetectorsURLScheme = "x-apple-data-detectors"; +const char *dataDetectorsAttributeTypeKey = "x-apple-data-detectors-type"; +const char *dataDetectorsAttributeResultKey = "x-apple-data-detectors-result"; +#endif + namespace WebCore { #if PLATFORM(MAC) @@ -138,9 +144,412 @@ return detectItemAtPositionWithRange(position, contextRan
[webkit-changes] [195481] trunk/Tools
Title: [195481] trunk/Tools Revision 195481 Author enr...@apple.com Date 2016-01-22 14:42:28 -0800 (Fri, 22 Jan 2016) Log Message Unreviewed build fix after http://trac.webkit.org/changeset/195474. * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::platformCreateWebView): Modified Paths trunk/Tools/ChangeLog trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm Diff Modified: trunk/Tools/ChangeLog (195480 => 195481) --- trunk/Tools/ChangeLog 2016-01-22 22:41:12 UTC (rev 195480) +++ trunk/Tools/ChangeLog 2016-01-22 22:42:28 UTC (rev 195481) @@ -1,3 +1,10 @@ +2016-01-22 Enrica Casucci + +Unreviewed build fix after http://trac.webkit.org/changeset/195474. + +* WebKitTestRunner/cocoa/TestControllerCocoa.mm: +(WTR::TestController::platformCreateWebView): + 2016-01-22 Tim Horton Reproducible "Unhanded web process message 'WebUserContentController:AddUserScripts'" and friends Modified: trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm (195480 => 195481) --- trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm 2016-01-22 22:41:12 UTC (rev 195480) +++ trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm 2016-01-22 22:42:28 UTC (rev 195481) @@ -79,11 +79,15 @@ void TestController::platformCreateWebView(WKPageConfigurationRef, const TestOptions& options) { +#if WK_API_ENABLED RetainPtr copiedConfiguration = adoptNS([globalWebViewConfiguration copy]); if (options.useDataDetection) [copiedConfiguration setDataDetectorTypes:WKDataDetectorTypeAll]; m_mainWebView = std::make_unique(copiedConfiguration.get(), options); +#else +m_mainWebView = std::make_unique(globalWebViewConfiguration, options); +#endif } PlatformWebView* TestController::platformCreateOtherPage(PlatformWebView* parentView, WKPageConfigurationRef, const TestOptions& options) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [195474] trunk/Tools
Title: [195474] trunk/Tools Revision 195474 Author enr...@apple.com Date 2016-01-22 14:17:04 -0800 (Fri, 22 Jan 2016) Log Message Add support for testing data detection. https://bugs.webkit.org/show_bug.cgi?id=153360 Reviewed by Tim Horton. Adding a new testing option (useDataDetection) to turn on data detection when running the a test. * WebKitTestRunner/TestController.cpp: (WTR::updateTestOptionsFromTestHeader): * WebKitTestRunner/TestOptions.h: * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::platformCreateWebView): Modified Paths trunk/Tools/ChangeLog trunk/Tools/WebKitTestRunner/TestController.cpp trunk/Tools/WebKitTestRunner/TestOptions.h trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm Diff Modified: trunk/Tools/ChangeLog (195473 => 195474) --- trunk/Tools/ChangeLog 2016-01-22 22:12:59 UTC (rev 195473) +++ trunk/Tools/ChangeLog 2016-01-22 22:17:04 UTC (rev 195474) @@ -1,3 +1,19 @@ +2016-01-22 Enrica Casucci + +Add support for testing data detection. +https://bugs.webkit.org/show_bug.cgi?id=153360 + +Reviewed by Tim Horton. + +Adding a new testing option (useDataDetection) to turn on +data detection when running the a test. + +* WebKitTestRunner/TestController.cpp: +(WTR::updateTestOptionsFromTestHeader): +* WebKitTestRunner/TestOptions.h: +* WebKitTestRunner/cocoa/TestControllerCocoa.mm: +(WTR::TestController::platformCreateWebView): + 2016-01-21 Simon Fraser Fix the lldb WebCoreLayoutUnitProvider to not dynamically look up the LayoutUnit denominator Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (195473 => 195474) --- trunk/Tools/WebKitTestRunner/TestController.cpp 2016-01-22 22:12:59 UTC (rev 195473) +++ trunk/Tools/WebKitTestRunner/TestController.cpp 2016-01-22 22:17:04 UTC (rev 195474) @@ -917,6 +917,8 @@ testOptions.useThreadedScrolling = parseBooleanTestHeaderValue(value); if (key == "useFlexibleViewport") testOptions.useFlexibleViewport = parseBooleanTestHeaderValue(value); +if (key == "useDataDetection") +testOptions.useDataDetection = parseBooleanTestHeaderValue(value); pairStart = pairEnd + 1; } } Modified: trunk/Tools/WebKitTestRunner/TestOptions.h (195473 => 195474) --- trunk/Tools/WebKitTestRunner/TestOptions.h 2016-01-22 22:12:59 UTC (rev 195473) +++ trunk/Tools/WebKitTestRunner/TestOptions.h 2016-01-22 22:17:04 UTC (rev 195474) @@ -39,6 +39,7 @@ bool useFixedLayout { false }; bool isSVGTest { false }; bool isHiDPITest { false }; +bool useDataDetection { false }; Vector overrideLanguages; Modified: trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm (195473 => 195474) --- trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm 2016-01-22 22:12:59 UTC (rev 195473) +++ trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm 2016-01-22 22:17:04 UTC (rev 195474) @@ -79,7 +79,11 @@ void TestController::platformCreateWebView(WKPageConfigurationRef, const TestOptions& options) { -m_mainWebView = std::make_unique(globalWebViewConfiguration, options); +RetainPtr copiedConfiguration = adoptNS([globalWebViewConfiguration copy]); +if (options.useDataDetection) +[copiedConfiguration setDataDetectorTypes:WKDataDetectorTypeAll]; + +m_mainWebView = std::make_unique(copiedConfiguration.get(), options); } PlatformWebView* TestController::platformCreateOtherPage(PlatformWebView* parentView, WKPageConfigurationRef, const TestOptions& options) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [195459] trunk/Source/WebCore
Title: [195459] trunk/Source/WebCore Revision 195459 Author enr...@apple.com Date 2016-01-22 10:37:11 -0800 (Fri, 22 Jan 2016) Log Message Remove dependency from DataDetectorsCore on iOS. https://bugs.webkit.org/show_bug.cgi?id=153358 rdar://problem/24294651 Reviewed by Anders Carlsson. Avoid build dependencies. * Configurations/WebCore.xcconfig: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Configurations/WebCore.xcconfig Diff Modified: trunk/Source/WebCore/ChangeLog (195458 => 195459) --- trunk/Source/WebCore/ChangeLog 2016-01-22 18:24:57 UTC (rev 195458) +++ trunk/Source/WebCore/ChangeLog 2016-01-22 18:37:11 UTC (rev 195459) @@ -1,3 +1,15 @@ +2016-01-22 Enrica Casucci + +Remove dependency from DataDetectorsCore on iOS. +https://bugs.webkit.org/show_bug.cgi?id=153358 +rdar://problem/24294651 + +Reviewed by Anders Carlsson. + +Avoid build dependencies. + +* Configurations/WebCore.xcconfig: + 2016-01-22 Chris Fleizach AX: ARIA combo boxes are not returning the right value for selected text range Modified: trunk/Source/WebCore/Configurations/WebCore.xcconfig (195458 => 195459) --- trunk/Source/WebCore/Configurations/WebCore.xcconfig 2016-01-22 18:24:57 UTC (rev 195458) +++ trunk/Source/WebCore/Configurations/WebCore.xcconfig 2016-01-22 18:37:11 UTC (rev 195459) @@ -50,7 +50,7 @@ UNEXPORTED_SYMBOLS_FILE = Configurations/WebCore.unexp; OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_PLATFORM); OTHER_LDFLAGS_BASE = -lsqlite3 -lobjc -lANGLE; -OTHER_LDFLAGS_BASE_ios = $(OTHER_LDFLAGS_BASE) -framework CFNetwork -framework CoreGraphics -framework CoreText -framework Foundation -framework GraphicsServices -framework ImageIO -framework OpenGLES -lMobileGestalt -framework DataDetectorsCore; +OTHER_LDFLAGS_BASE_ios = $(OTHER_LDFLAGS_BASE) -framework CFNetwork -framework CoreGraphics -framework CoreText -framework Foundation -framework GraphicsServices -framework ImageIO -framework OpenGLES -lMobileGestalt; OTHER_LDFLAGS_PLATFORM[sdk=iphoneos*] = $(OTHER_LDFLAGS_BASE_ios) -framework IOSurface; OTHER_LDFLAGS_PLATFORM[sdk=iphonesimulator*] = $(OTHER_LDFLAGS_BASE_ios); OTHER_LDFLAGS_PLATFORM[sdk=macosx*] = $(OTHER_LDFLAGS_BASE) -sub_library libobjc -umbrella WebKit -allowable_client WebCoreTestSupport -allowable_client WebKit2 -allowable_client WebKitLegacy -framework ApplicationServices -framework AudioUnit -framework Carbon -framework Cocoa -framework DataDetectorsCore -framework IOSurface -framework OpenGL; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [195317] trunk/Source
Title: [195317] trunk/Source Revision 195317 Author enr...@apple.com Date 2016-01-19 14:58:59 -0800 (Tue, 19 Jan 2016) Log Message Add support for DataDetectors in WK (iOS). https://bugs.webkit.org/show_bug.cgi?id=152989 rdar://problem/22855960 Reviewed by Tim Horton. Source/_javascript_Core: Adding feature definition for data detection. * Configurations/FeatureDefines.xcconfig: Source/WebCore: This is the first step toward implementing Data Detectors support in WK2. The patch adds a new memeber to the Settings object to retrieve the type of detection desired. The DataDetection files have been moved under cocoa, since they are no longer OS X specific. * Configurations/FeatureDefines.xcconfig: * Configurations/WebCore.xcconfig: * WebCore.xcodeproj/project.pbxproj: * editing/cocoa/DataDetection.h: Copied from Source/WebCore/editing/mac/DataDetection.h. * editing/cocoa/DataDetection.mm: Copied from Source/WebCore/editing/mac/DataDetection.mm. (WebCore::detectItemAtPositionWithRange): (WebCore::DataDetection::detectItemAroundHitTestResult): (WebCore::DataDetection::detectContentInRange): * editing/mac/DataDetection.h: Removed. * editing/mac/DataDetection.mm: Removed. * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame): * page/Settings.h: * page/Settings.in: * platform/spi/mac/DataDetectorsSPI.h: Source/WebKit/mac: Adding feature definition for data detection. * Configurations/FeatureDefines.xcconfig: Source/WebKit2: This is the first step toward implementing Data Detectors support in WK2. The patch adds a new property to the configuration object to indicate the type of detection desired and propagates to the WebProcess. * Configurations/FeatureDefines.xcconfig: * Shared/WebPreferencesDefinitions.h: * UIProcess/API/Cocoa/WKWebView.mm: (fromWKDataDetectorTypes): (-[WKWebView initWithFrame:configuration:]): * UIProcess/API/Cocoa/WKWebViewConfiguration.h: * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration copyWithZone:]): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Source/WTF: Adding feature definition for data detection. * wtf/FeatureDefines.h: Modified Paths trunk/Source/_javascript_Core/ChangeLog trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig trunk/Source/WTF/ChangeLog trunk/Source/WTF/wtf/FeatureDefines.h trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig trunk/Source/WebCore/Configurations/WebCore.xcconfig trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj trunk/Source/WebCore/loader/FrameLoader.cpp trunk/Source/WebCore/page/Settings.h trunk/Source/WebCore/page/Settings.in trunk/Source/WebCore/platform/spi/mac/DataDetectorsSPI.h trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Configurations/FeatureDefines.xcconfig trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp Added Paths trunk/Source/WebCore/editing/cocoa/DataDetection.h trunk/Source/WebCore/editing/cocoa/DataDetection.mm Removed Paths trunk/Source/WebCore/editing/mac/DataDetection.h trunk/Source/WebCore/editing/mac/DataDetection.mm Diff Modified: trunk/Source/_javascript_Core/ChangeLog (195316 => 195317) --- trunk/Source/_javascript_Core/ChangeLog 2016-01-19 22:37:02 UTC (rev 195316) +++ trunk/Source/_javascript_Core/ChangeLog 2016-01-19 22:58:59 UTC (rev 195317) @@ -1,3 +1,15 @@ +2016-01-19 Enrica Casucci + +Add support for DataDetectors in WK (iOS). +https://bugs.webkit.org/show_bug.cgi?id=152989 +rdar://problem/22855960 + +Reviewed by Tim Horton. + +Adding feature definition for data detection. + +* Configurations/FeatureDefines.xcconfig: + 2016-01-19 Per Arne Vollan [B3][Win64] Compile and warning fixes. Modified: trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig (195316 => 195317) --- trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig 2016-01-19 22:37:02 UTC (rev 195316) +++ trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig 2016-01-19 22:58:59 UTC (rev 195317) @@ -111,6 +111,7 @@ ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_YES = ENABLE_MAC_GESTURE_EVENTS; ENABLE_IOS_TEXT_AUTOSIZING[sdk=iphone*] = ENABLE_IOS_TEXT_AUTOSIZING; +ENABLE_DATA_DETECTION = ENABLE_DATA_DETECTION; ENABLE_IOS_TOUCH_EVENTS[sdk=iphone*] = $(ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK)); ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_IOS_TOUCH_EVENTS; Modified: trunk/Source/WTF/ChangeLog (195316 => 195317) --- trunk/Source/WTF/ChangeLog 2016-01-19 22:37:02 UTC (rev 195316)
[webkit-changes] [195300] trunk/Source
Title: [195300] trunk/Source Revision 195300 Author enr...@apple.com Date 2016-01-19 11:34:20 -0800 (Tue, 19 Jan 2016) Log Message Add support for DataDetectors in WK (iOS). https://bugs.webkit.org/show_bug.cgi?id=152989 rdar://problem/22855960 Reviewed by Tim Horton. Source/_javascript_Core: Adding feature definition. * Configurations/FeatureDefines.xcconfig: Source/WebCore: This is the first step toward implementing Data Detectors support in WK2. The patch adds a new memeber to the Settings object to retrieve the type of detection desired. The DataDetection files have been moved under cocoa, since they are no longer OS X specific. * Configurations/FeatureDefines.xcconfig: * Configurations/WebCore.xcconfig: * WebCore.xcodeproj/project.pbxproj: * editing/cocoa/DataDetection.h: Copied from Source/WebCore/editing/mac/DataDetection.h. * editing/cocoa/DataDetection.mm: Copied from Source/WebCore/editing/mac/DataDetection.mm. (WebCore::detectItemAtPositionWithRange): (WebCore::DataDetection::detectItemAroundHitTestResult): (WebCore::DataDetection::detectContentInRange): * editing/mac/DataDetection.h: Removed. * editing/mac/DataDetection.mm: Removed. * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame): * page/Settings.h: * page/Settings.in: * platform/spi/mac/DataDetectorsSPI.h: Source/WebKit/mac: Adding feature definition for data detection. * Configurations/FeatureDefines.xcconfig: Source/WebKit2: This is the first step toward implementing Data Detectors support in WK2. The patch adds a new property to the configuration object to indicate the type of detection desired and propagates to the WebProcess. * Configurations/FeatureDefines.xcconfig: * Shared/WebPreferencesDefinitions.h: * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView initWithFrame:configuration:]): * UIProcess/API/Cocoa/WKWebViewConfiguration.h: * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration copyWithZone:]): * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebPage/Cocoa/WebPageCocoa.mm: Added. (WebKit::WebPage::fromWKDataDetectorTypes): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): * WebProcess/WebPage/WebPage.h: Source/WTF: Adding feature definition for data detection. * wtf/FeatureDefines.h: Modified Paths trunk/Source/_javascript_Core/ChangeLog trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig trunk/Source/WTF/ChangeLog trunk/Source/WTF/wtf/FeatureDefines.h trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig trunk/Source/WebCore/Configurations/WebCore.xcconfig trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj trunk/Source/WebCore/loader/FrameLoader.cpp trunk/Source/WebCore/page/Settings.h trunk/Source/WebCore/page/Settings.in trunk/Source/WebCore/platform/spi/mac/DataDetectorsSPI.h trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Configurations/FeatureDefines.xcconfig trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h Added Paths trunk/Source/WebCore/editing/cocoa/DataDetection.h trunk/Source/WebCore/editing/cocoa/DataDetection.mm trunk/Source/WebKit2/WebProcess/WebPage/Cocoa/WebPageCocoa.mm Removed Paths trunk/Source/WebCore/editing/mac/DataDetection.h trunk/Source/WebCore/editing/mac/DataDetection.mm Diff Modified: trunk/Source/_javascript_Core/ChangeLog (195299 => 195300) --- trunk/Source/_javascript_Core/ChangeLog 2016-01-19 19:32:06 UTC (rev 195299) +++ trunk/Source/_javascript_Core/ChangeLog 2016-01-19 19:34:20 UTC (rev 195300) @@ -1,3 +1,15 @@ +2016-01-19 Enrica Casucci + +Add support for DataDetectors in WK (iOS). +https://bugs.webkit.org/show_bug.cgi?id=152989 +rdar://problem/22855960 + +Reviewed by Tim Horton. + +Adding feature definition. + +* Configurations/FeatureDefines.xcconfig: + 2016-01-17 Filip Pizlo FTL B3 should be just as fast as FTL LLVM on Octane/crypto Modified: trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig (195299 => 195300) --- trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig 2016-01-19 19:32:06 UTC (rev 195299) +++ trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig 2016-01-19 19:34:20 UTC (rev 195300) @@ -111,6 +111,7 @@ ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_YES = ENABLE_MAC_GESTURE_EVENTS; ENABLE_IOS_TEXT_AUTOSIZING[sdk=iphone*] = ENABLE_IOS_TEXT_AUTOSIZING; +ENABLE_DATA_DETECTION = ENABLE_DATA_DETECTION; ENABLE_IOS_TOUCH_EVENTS[sdk=
[webkit-changes] [193922] trunk
Title: [193922] trunk Revision 193922 Author enr...@apple.com Date 2015-12-10 12:22:18 -0800 (Thu, 10 Dec 2015) Log Message Change skin tone support for two emoji. https://bugs.webkit.org/show_bug.cgi?id=152147 rdar://problem/23716993 rdar://problem/23716344 Reviewed by Darin Adler. Source/WebCore: Horse race emoji (1F3C7) should no longer have skin tone variation. Sleuth/Spy emoji (!F575) should instead have skin tone variation. * platform/text/TextBreakIterator.cpp: (WebCore::cursorMovementIterator): LayoutTests: * fast/text/emoji.html: * platform/mac/fast/text/emoji-expected.txt: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/fast/text/emoji.html trunk/LayoutTests/platform/mac/fast/text/emoji-expected.txt trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/text/TextBreakIterator.cpp Diff Modified: trunk/LayoutTests/ChangeLog (193921 => 193922) --- trunk/LayoutTests/ChangeLog 2015-12-10 19:19:03 UTC (rev 193921) +++ trunk/LayoutTests/ChangeLog 2015-12-10 20:22:18 UTC (rev 193922) @@ -1,3 +1,15 @@ +2015-12-10 Enrica Casucci + +Change skin tone support for two emoji. +https://bugs.webkit.org/show_bug.cgi?id=152147 +rdar://problem/23716993 +rdar://problem/23716344 + +Reviewed by Darin Adler. + +* fast/text/emoji.html: +* platform/mac/fast/text/emoji-expected.txt: + 2015-12-10 Ryan Haddad Skip unsupported css3/font-variant-* tests on Win Modified: trunk/LayoutTests/fast/text/emoji.html (193921 => 193922) --- trunk/LayoutTests/fast/text/emoji.html 2015-12-10 19:19:03 UTC (rev 193921) +++ trunk/LayoutTests/fast/text/emoji.html 2015-12-10 20:22:18 UTC (rev 193922) @@ -1,9 +1,9 @@ -This test validate rendering of emoji sequences and emoji with modifiers. +This test validate rendering of emoji sequences and emoji with modifiers. Horse racing emoji no longer supports skin tone. Added skin tone to spy. 😁 - -👦🏻👩🏼👦🏾❤️💋 + +👦🏻👩🏼👦🏾❤️💋🕵🏻🏇🏻 👨👩👦 👨👩👧 👪 👦🏻👩🏼👦🏾 👩👩👦 👩👩👧 👩👩👧👦 👩👩👦👦 👩👩👧👧 👨👨👦 👨👨👧 👨👨👧👦 👨👨👦👦 👨👨👧👧 Modified: trunk/LayoutTests/platform/mac/fast/text/emoji-expected.txt (193921 => 193922) --- trunk/LayoutTests/platform/mac/fast/text/emoji-expected.txt 2015-12-10 19:19:03 UTC (rev 193921) +++ trunk/LayoutTests/platform/mac/fast/text/emoji-expected.txt 2015-12-10 20:22:18 UTC (rev 193922) @@ -3,24 +3,25 @@ layer at (0,0) size 800x600 RenderBlock {HTML} at (0,0) size 800x600 RenderBody {BODY} at (8,8) size 784x584 - RenderBlock (anonymous) at (0,0) size 784x18 -RenderText {#text} at (0,0) size 470x18 - text run at (0,0) width 470: "This test validate rendering of emoji sequences and emoji with modifiers." - RenderBlock {DIV} at (0,18) size 784x21 + RenderBlock (anonymous) at (0,0) size 784x36 +RenderText {#text} at (0,0) size 751x36 + text run at (0,0) width 751: "This test validate rendering of emoji sequences and emoji with modifiers. Horse racing emoji no longer supports skin" + text run at (0,18) width 187: "tone. Added skin tone to spy." + RenderBlock {DIV} at (0,36) size 784x21 RenderText {#text} at (0,0) size 21x21 text run at (0,0) width 21: "\x{D83D}\x{DE01}" - RenderBlock {DIV} at (0,39) size 784x235 -RenderText {#text} at (0,4) size 180x41 - text run at (0,4) width 180: "\x{D83D}\x{DC66}\x{D83C}\x{DFFB}\x{D83D}\x{DC69}\x{D83C}\x{DFFC}\x{D83D}\x{DC66}\x{D83C}\x{DFFE}\x{2764}\x{FE0F}\x{D83D}\x{DC8B}" -RenderBR {BR} at (180,36) size 0x0 -RenderText {#text} at (0,51) size 243x41 - text run at (0,51) width 243: "\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC67} \x{D83D}\x{DC6A} \x{D83D}\x{DC66}\x{D83C}\x{DFFB}\x{D83D}\x{DC69}\x{D83C}\x{DFFC}\x{D83D}\x{DC66}\x{D83C}\x{DFFE}" -RenderBR {BR} at (243,83) size 0x0 -RenderText {#text} at (0,98) size 216x41 - text run at (0,98) width 216: "\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC67} \x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC67}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC66}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC67}\x{200D}\x{D83D}\x{DC67}" -RenderBR {BR} at (216,130) size 0x0 -RenderText {#text} at (0,145) size 216x41 - text run at (0,145) width 216: "\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC67} \x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC67}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC68}\x{200D}\x{D83D
[webkit-changes] [191414] trunk/Source/WebKit2
Title: [191414] trunk/Source/WebKit2 Revision 191414 Author enr...@apple.com Date 2015-10-21 17:02:01 -0700 (Wed, 21 Oct 2015) Log Message WebProcess crashes when accessibility bundle is not found. https://bugs.webkit.org/show_bug.cgi?id=150414 Reviewed by Dan Bernstein. The uninitialized pointer to NSError causes the print function to crash. * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::registerWithAccessibility): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (191413 => 191414) --- trunk/Source/WebKit2/ChangeLog 2015-10-21 23:54:32 UTC (rev 191413) +++ trunk/Source/WebKit2/ChangeLog 2015-10-22 00:02:01 UTC (rev 191414) @@ -1,3 +1,15 @@ +2015-10-21 Enrica Casucci + +WebProcess crashes when accessibility bundle is not found. +https://bugs.webkit.org/show_bug.cgi?id=150414 + +Reviewed by Dan Bernstein. + +The uninitialized pointer to NSError causes the print function to crash. + +* WebProcess/cocoa/WebProcessCocoa.mm: +(WebKit::registerWithAccessibility): + 2015-10-21 Anders Carlsson Move services menu handling out into a separate function Modified: trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm (191413 => 191414) --- trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm 2015-10-21 23:54:32 UTC (rev 191413) +++ trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm 2015-10-22 00:02:01 UTC (rev 191414) @@ -203,7 +203,7 @@ #endif #if PLATFORM(IOS) NSString *accessibilityBundlePath = [(NSString *)GSSystemRootDirectory() stringByAppendingString:@"/System/Library/AccessibilityBundles/WebProcessLoader.axbundle"]; -NSError *error; +NSError *error = nil; if (![[NSBundle bundleWithPath:accessibilityBundlePath] loadAndReturnError:&error]) LOG_ERROR("Failed to load accessibility bundle at %@: %@", accessibilityBundlePath, error); #endif ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [190568] trunk/Source/WebKit2
Title: [190568] trunk/Source/WebKit2 Revision 190568 Author enr...@apple.com Date 2015-10-05 11:49:54 -0700 (Mon, 05 Oct 2015) Log Message Cannot select certain text on Wikipedia homepage even when zoomed in. https://bugs.webkit.org/show_bug.cgi?id=149758 rdar://problem/22407947 Reviewed by Dan Bernstein. Several functions that handle gestures for text selection are used for both editable and non editable content. When used on editable content, the point where the gesture occurs needs to be constrained within the boundaries of the editable element. In the WebProcess we decide whether to constrain the point or not only based on the presence of the assisted node. That unfortunately does not guarantee that the user is actually editing the element, but only that the element is focused. Since the knowledge about the interaction exists reliably in the UI process, this patch adds a parameter to each gesture handler that tries to clip the point, to indicate whether the user is actually interacting with the element so that in the WebProcess the assisted node information can be used to constrain the point. * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::deviceOrientation): * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _isInteractingWithAssistedNode]): (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]): (-[WKContentView selectPositionAtPoint:completionHandler:]): (-[WKContentView selectPositionAtBoundary:inDirection:fromPoint:completionHandler:]): (-[WKContentView selectTextWithGranularity:atPoint:completionHandler:]): (-[WKContentView updateSelectionWithExtentPoint:completionHandler:]): (-[WKContentView updateSelectionWithExtentPoint:withBoundary:completionHandler:]): * UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::selectWithGesture): (WebKit::WebPageProxy::selectTextWithGranularityAtPoint): (WebKit::WebPageProxy::selectPositionAtBoundaryWithDirection): (WebKit::WebPageProxy::selectPositionAtPoint): (WebKit::WebPageProxy::updateSelectionWithExtentPoint): (WebKit::WebPageProxy::updateSelectionWithExtentPointAndBoundary): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::selectWithGesture): (WebKit::WebPage::visiblePositionInFocusedNodeForPoint): (WebKit::WebPage::selectPositionAtPoint): (WebKit::WebPage::selectPositionAtBoundaryWithDirection): (WebKit::WebPage::rangeForGranularityAtPoint): (WebKit::WebPage::selectTextWithGranularityAtPoint): (WebKit::WebPage::updateSelectionWithExtentPointAndBoundary): (WebKit::WebPage::updateSelectionWithExtentPoint): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/WebPageProxy.h trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (190567 => 190568) --- trunk/Source/WebKit2/ChangeLog 2015-10-05 18:31:38 UTC (rev 190567) +++ trunk/Source/WebKit2/ChangeLog 2015-10-05 18:49:54 UTC (rev 190568) @@ -1,3 +1,51 @@ +2015-10-05 Enrica Casucci + +Cannot select certain text on Wikipedia homepage even when zoomed in. +https://bugs.webkit.org/show_bug.cgi?id=149758 +rdar://problem/22407947 + +Reviewed by Dan Bernstein. + +Several functions that handle gestures for text selection are used for both +editable and non editable content. When used on editable content, the point +where the gesture occurs needs to be constrained within the boundaries of the +editable element. In the WebProcess we decide whether to constrain the point or not only based +on the presence of the assisted node. +That unfortunately does not guarantee that the user is actually editing the element, +but only that the element is focused. Since the knowledge about the interaction exists reliably +in the UI process, this patch adds a parameter to each gesture handler that tries to clip +the point, to indicate whether the user is actually interacting with the element so that +in the WebProcess the assisted node information can be used to constrain the point. + +* UIProcess/WebPageProxy.h: +(WebKit::WebPageProxy::deviceOrientation): +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView _isInteractingWithAssistedNode]): +(-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]): +(-[WKContentView selectPositionAtPoint:completionHandler:]): +(-[WKContentView selectPositionAtBoundary:inDirection:fromPoint:completionHandler:]): +(-[WKContentView selectTextWithGranularity:atPoint:completionHandler:]): +(-[WKContentView updateSelectionWithExtentPoint:completionHand
[webkit-changes] [190512] trunk/Source/WebKit2
Title: [190512] trunk/Source/WebKit2 Revision 190512 Author enr...@apple.com Date 2015-10-02 11:29:03 -0700 (Fri, 02 Oct 2015) Log Message Text selection is inaccurate in Wikipedia pages when starting navigation from wikipedia.org. https://bugs.webkit.org/show_bug.cgi?id=149756 rdar://problem/22332409 Reviewed by Tim Horton. When loading a new document into the same WebPage object, we need to clear the assisted node, since there is no guarantee that the node will be blurred. The bug is caused by the use of a stale assisted node to constrain the point where the gesture occurs. A fix for this problem was landed in http://trac.webkit.org/changeset/179885 where the cleanup was added when FrameLoaderClient::detach2 was called. This method doesn't seem to be called any longer for the main frame, so the correct solution is to add the cleanup to didCommitLoad in WebPage. I've also added some checks to webSelectionsRects and selectedTextRange to avoid the use of postLayoutData when the selection is none. * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView webSelectionRects]): (-[WKContentView selectedTextRange]): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::detachedFromParent2): Removed call to resetAssistedNodeForFrame. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didCommitLoad): Added call to resetAssistedNodeForFrame. Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp Diff Modified: trunk/Source/WebKit2/ChangeLog (190511 => 190512) --- trunk/Source/WebKit2/ChangeLog 2015-10-02 17:58:21 UTC (rev 190511) +++ trunk/Source/WebKit2/ChangeLog 2015-10-02 18:29:03 UTC (rev 190512) @@ -1,3 +1,30 @@ +2015-10-02 Enrica Casucci + +Text selection is inaccurate in Wikipedia pages when starting navigation from wikipedia.org. +https://bugs.webkit.org/show_bug.cgi?id=149756 +rdar://problem/22332409 + +Reviewed by Tim Horton. + +When loading a new document into the same WebPage object, we need +to clear the assisted node, since there is no guarantee that the +node will be blurred. The bug is caused by the use of a stale +assisted node to constrain the point where the gesture occurs. +A fix for this problem was landed in http://trac.webkit.org/changeset/179885 +where the cleanup was added when FrameLoaderClient::detach2 was called. +This method doesn't seem to be called any longer for the main frame, +so the correct solution is to add the cleanup to didCommitLoad in WebPage. +I've also added some checks to webSelectionsRects and selectedTextRange to avoid +the use of postLayoutData when the selection is none. + +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView webSelectionRects]): +(-[WKContentView selectedTextRange]): +* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: +(WebKit::WebFrameLoaderClient::detachedFromParent2): Removed call to resetAssistedNodeForFrame. +* WebProcess/WebPage/WebPage.cpp: +(WebKit::WebPage::didCommitLoad): Added call to resetAssistedNodeForFrame. + 2015-10-02 Alex Christensen Reloading without content blockers doesn't apply to resource loads after the main frame finishes Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (190511 => 190512) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-10-02 17:58:21 UTC (rev 190511) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-10-02 18:29:03 UTC (rev 190512) @@ -1026,6 +1026,8 @@ - (NSArray *)webSelectionRects { +if (_page->editorState().selectionIsNone) +return nil; const auto& selectionRects = _page->editorState().postLayoutData().selectionRects; unsigned size = selectionRects.size(); if (!size) @@ -2301,6 +2303,8 @@ - (UITextRange *)selectedTextRange { +if (_page->editorState().selectionIsNone) +return nil; auto& postLayoutEditorStateData = _page->editorState().postLayoutData(); FloatRect startRect = postLayoutEditorStateData.caretRectAtStart; FloatRect endRect = postLayoutEditorStateData.caretRectAtEnd; Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (190511 => 190512) --- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2015-10-02 17:58:21 UTC (rev 190511) +++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2015-10-02 18:29:03 UTC (rev 190512) @@ -140,9 +140,6 @@ if (!webPage) return; -#if PLATFORM(IOS) -webPage->resetAssistedNodeForFrame(m_frame); -#endif RefPtr userData; // Notify the bundle cl
[webkit-changes] [189167] trunk
Title: [189167] trunk Revision 189167 Author enr...@apple.com Date 2015-08-31 08:37:51 -0700 (Mon, 31 Aug 2015) Log Message Incorrect cursor movement for U+26F9, U+1F3CB with variations. https://bugs.webkit.org/show_bug.cgi?id=148629 rdar://problem/22492366 Reviewed by Ryosuke Niwa. Source/WebCore: Updating text break iterator rules to correctly handle those two emoji with variations. * platform/text/TextBreakIterator.cpp: (WebCore::cursorMovementIterator): LayoutTests: The test has been updated to test these two emoji and to cover the cursor movement as well. * editing/deleting/delete-emoji-expected.txt: * editing/deleting/delete-emoji.html: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/editing/deleting/delete-emoji-expected.txt trunk/LayoutTests/editing/deleting/delete-emoji.html trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/text/TextBreakIterator.cpp Diff Modified: trunk/LayoutTests/ChangeLog (189166 => 189167) --- trunk/LayoutTests/ChangeLog 2015-08-31 10:54:07 UTC (rev 189166) +++ trunk/LayoutTests/ChangeLog 2015-08-31 15:37:51 UTC (rev 189167) @@ -1,3 +1,17 @@ +2015-08-31 Enrica Casucci + +Incorrect cursor movement for U+26F9, U+1F3CB with variations. +https://bugs.webkit.org/show_bug.cgi?id=148629 +rdar://problem/22492366 + +Reviewed by Ryosuke Niwa. + +The test has been updated to test these two emoji and to +cover the cursor movement as well. + +* editing/deleting/delete-emoji-expected.txt: +* editing/deleting/delete-emoji.html: + 2015-07-31 Sergio Villar Senin [css-grid] Grid containers reporting wrong preferred widths Modified: trunk/LayoutTests/editing/deleting/delete-emoji-expected.txt (189166 => 189167) --- trunk/LayoutTests/editing/deleting/delete-emoji-expected.txt 2015-08-31 10:54:07 UTC (rev 189166) +++ trunk/LayoutTests/editing/deleting/delete-emoji-expected.txt 2015-08-31 15:37:51 UTC (rev 189167) @@ -1,65 +1,59 @@ -This test verifies that emoji groups and emoji with variations are deleted correctly +This test verifies that deletions are correct over emoji groups and emoji with variations Dump of markup 1: -| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾🖐🏾🖕🏾🤘🏾🕵🏾🕴🏾🏋🏾👁🗨<#selection-caret> +| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾🖐🏾🖕🏾🤘🏾👁🗨🏋🏾<#selection-caret> " Dump of markup 2: -| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾🖐🏾🖕🏾🤘🏾🕵🏾🕴🏾🏋🏾<#selection-caret>" +| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾🖐🏾🖕🏾🤘🏾👁🗨<#selection-caret>" Dump of markup 3: -| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾🖐🏾🖕🏾🤘🏾🕵🏾🕴🏾<#selection-caret>" - -Dump of markup 4: -| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾🖐🏾🖕🏾🤘🏾🕵🏾<#selection-caret>" - -Dump of markup 5: | "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾🖐🏾🖕🏾🤘🏾<#selection-caret>" -Dump of markup 6: +Dump of markup 4: | "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾🖐🏾🖕🏾<#selection-caret>" -Dump of markup 7: +Dump of markup 5: | "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾🖐🏾<#selection-caret>" -Dump of markup 8: +Dump of markup 6: | "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾<#selection-caret>" -Dump of markup 9: +Dump of markup 7: | "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾<#selection-caret>" -Dump of markup 10: +Dump of markup 8: | "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻<#selection-caret>" -Dump of markup 11: +Dump of markup 9: | "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨<#selection-caret>" -Dump of markup 12: +Dump of markup 10: | "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩<#selection-caret>" -Dump of markup 13: +Dump of markup 11: | "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨<#selection-caret>" -Dump of markup 14: +Dump of markup 12: | "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩<#selection-caret>" -Dump of markup 15: +Dump of markup 13: | "👦🏻👦🏾🏻👦🏾👦👩👩👦<#selection-caret>" -Dump of markup 16: +Dump of markup 14: | "👦🏻👦🏾🏻👦🏾👦<#selection-caret>" -Dump of markup 17: +Dump of markup 15: | "👦🏻👦🏾🏻👦🏾<#selection-caret>" -Dump of markup 18: +Dump of markup 16: | "👦🏻👦🏾🏻<#selection-caret>" -Dump of markup 19: +Dump of markup 17: | "👦🏻👦🏾<#selection-caret>" -Dump of markup 20: +Du
[webkit-changes] [189024] trunk
Title: [189024] trunk Revision 189024 Author enr...@apple.com Date 2015-08-27 08:15:40 -0700 (Thu, 27 Aug 2015) Log Message Add some new emoji with modifiers and new sequence. https://bugs.webkit.org/show_bug.cgi?id=148202 rdar://problem/21849857 Reviewed by Sam Weinig. Source/WebCore: Adding support for some new emoji with modifiers and one new emoji sequence. * platform/graphics/FontCascade.cpp: (WebCore::FontCascade::characterRangeCodePath): * platform/text/CharacterProperties.h: (WebCore::isEmojiGroupCandidate): (WebCore::isEmojiModifier): * platform/text/TextBreakIterator.cpp: (WebCore::cursorMovementIterator): LayoutTests: Updated test to reflect the changes. * editing/deleting/delete-emoji-expected.txt: * editing/deleting/delete-emoji.html: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/editing/deleting/delete-emoji-expected.txt trunk/LayoutTests/editing/deleting/delete-emoji.html trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/FontCascade.cpp trunk/Source/WebCore/platform/text/CharacterProperties.h trunk/Source/WebCore/platform/text/TextBreakIterator.cpp Diff Modified: trunk/LayoutTests/ChangeLog (189023 => 189024) --- trunk/LayoutTests/ChangeLog 2015-08-27 14:46:08 UTC (rev 189023) +++ trunk/LayoutTests/ChangeLog 2015-08-27 15:15:40 UTC (rev 189024) @@ -1,3 +1,16 @@ +2015-08-27 Enrica Casucci + +Add some new emoji with modifiers and new sequence. +https://bugs.webkit.org/show_bug.cgi?id=148202 +rdar://problem/21849857 + +Reviewed by Sam Weinig. + +Updated test to reflect the changes. + +* editing/deleting/delete-emoji-expected.txt: +* editing/deleting/delete-emoji.html: + 2015-08-27 Dean Jackson Initial infrastructure of media controls testing Modified: trunk/LayoutTests/editing/deleting/delete-emoji-expected.txt (189023 => 189024) --- trunk/LayoutTests/editing/deleting/delete-emoji-expected.txt 2015-08-27 14:46:08 UTC (rev 189023) +++ trunk/LayoutTests/editing/deleting/delete-emoji-expected.txt 2015-08-27 15:15:40 UTC (rev 189024) @@ -1,38 +1,65 @@ This test verifies that emoji groups and emoji with variations are deleted correctly Dump of markup 1: -| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻<#selection-caret> +| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾🖐🏾🖕🏾🤘🏾🕵🏾🕴🏾🏋🏾👁🗨<#selection-caret> " Dump of markup 2: +| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾🖐🏾🖕🏾🤘🏾🕵🏾🕴🏾🏋🏾<#selection-caret>" + +Dump of markup 3: +| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾🖐🏾🖕🏾🤘🏾🕵🏾🕴🏾<#selection-caret>" + +Dump of markup 4: +| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾🖐🏾🖕🏾🤘🏾🕵🏾<#selection-caret>" + +Dump of markup 5: +| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾🖐🏾🖕🏾🤘🏾<#selection-caret>" + +Dump of markup 6: +| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾🖐🏾🖕🏾<#selection-caret>" + +Dump of markup 7: +| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾🖐🏾<#selection-caret>" + +Dump of markup 8: +| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾<#selection-caret>" + +Dump of markup 9: +| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾<#selection-caret>" + +Dump of markup 10: +| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻<#selection-caret>" + +Dump of markup 11: | "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨<#selection-caret>" -Dump of markup 3: +Dump of markup 12: | "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩<#selection-caret>" -Dump of markup 4: +Dump of markup 13: | "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨<#selection-caret>" -Dump of markup 5: +Dump of markup 14: | "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩<#selection-caret>" -Dump of markup 6: +Dump of markup 15: | "👦🏻👦🏾🏻👦🏾👦👩👩👦<#selection-caret>" -Dump of markup 7: +Dump of markup 16: | "👦🏻👦🏾🏻👦🏾👦<#selection-caret>" -Dump of markup 8: +Dump of markup 17: | "👦🏻👦🏾🏻👦🏾<#selection-caret>" -Dump of markup 9: +Dump of markup 18: | "👦🏻👦🏾🏻<#selection-caret>" -Dump of markup 10: +Dump of markup 19: | "👦🏻👦🏾<#selection-caret>" -Dump of markup 11: +Dump of markup 20: | "👦🏻<#selection-caret>" -Dump of markup 12: +Dump of markup 21: | Modified: trunk/LayoutTests/editing/deleting/delete-emoji.html (189023 => 189024) --- trunk/LayoutTests/editing/deleting/delete-emoji.html 2015-08-27 14:46:08 UTC (rev 189023) +++ trunk/LayoutTests/editing/deleting/delete-emoji.html 2015-08-27 15:15:40 UTC (rev 189024) @@ -1,7 +1,7 @@ -👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻 +👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾🖐🏾🖕🏾🤘🏾🕵🏾🕴🏾🏋🏾👁🗨
[webkit-changes] [188960] trunk
Title: [188960] trunk Revision 188960 Author enr...@apple.com Date 2015-08-26 02:26:14 -0700 (Wed, 26 Aug 2015) Log Message Add some new emoji with modifiers and new sequence. https://bugs.webkit.org/show_bug.cgi?id=148202 rdar://problem/21849857 Reviewed by Sam Weinig. Source/WebCore: Adding support for some new emoji with modifiers and one new emoji sequence. * platform/graphics/FontCascade.cpp: (WebCore::FontCascade::characterRangeCodePath): * platform/text/CharacterProperties.h: (WebCore::isEmojiGroupCandidate): (WebCore::isEmojiModifier): * platform/text/TextBreakIterator.cpp: (WebCore::cursorMovementIterator): LayoutTests: Updated test to reflect the changes. * editing/deleting/delete-emoji-expected.txt: * editing/deleting/delete-emoji.html: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/editing/deleting/delete-emoji-expected.txt trunk/LayoutTests/editing/deleting/delete-emoji.html trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/FontCascade.cpp trunk/Source/WebCore/platform/text/CharacterProperties.h trunk/Source/WebCore/platform/text/TextBreakIterator.cpp Diff Modified: trunk/LayoutTests/ChangeLog (188959 => 188960) --- trunk/LayoutTests/ChangeLog 2015-08-26 09:11:24 UTC (rev 188959) +++ trunk/LayoutTests/ChangeLog 2015-08-26 09:26:14 UTC (rev 188960) @@ -1,3 +1,16 @@ +2015-08-26 Enrica Casucci + +Add some new emoji with modifiers and new sequence. +https://bugs.webkit.org/show_bug.cgi?id=148202 +rdar://problem/21849857 + +Reviewed by Sam Weinig. + +Updated test to reflect the changes. + +* editing/deleting/delete-emoji-expected.txt: +* editing/deleting/delete-emoji.html: + 2015-08-25 Nan Wang AX: Enable accessibility/aria-controls.html test for mac Modified: trunk/LayoutTests/editing/deleting/delete-emoji-expected.txt (188959 => 188960) --- trunk/LayoutTests/editing/deleting/delete-emoji-expected.txt 2015-08-26 09:11:24 UTC (rev 188959) +++ trunk/LayoutTests/editing/deleting/delete-emoji-expected.txt 2015-08-26 09:26:14 UTC (rev 188960) @@ -1,38 +1,65 @@ This test verifies that emoji groups and emoji with variations are deleted correctly Dump of markup 1: -| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻<#selection-caret> +| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾🖐🏾🖕🏾🤘🏾🕵🏾🕴🏾🏋🏾👁🗨<#selection-caret> " Dump of markup 2: +| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾🖐🏾🖕🏾🤘🏾🕵🏾🕴🏾🏋🏾<#selection-caret>" + +Dump of markup 3: +| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾🖐🏾🖕🏾🤘🏾🕵🏾🕴🏾<#selection-caret>" + +Dump of markup 4: +| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾🖐🏾🖕🏾🤘🏾🕵🏾<#selection-caret>" + +Dump of markup 5: +| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾🖐🏾🖕🏾🤘🏾<#selection-caret>" + +Dump of markup 6: +| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾🖐🏾🖕🏾<#selection-caret>" + +Dump of markup 7: +| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾🖐🏾<#selection-caret>" + +Dump of markup 8: +| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾<#selection-caret>" + +Dump of markup 9: +| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾<#selection-caret>" + +Dump of markup 10: +| "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻<#selection-caret>" + +Dump of markup 11: | "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨<#selection-caret>" -Dump of markup 3: +Dump of markup 12: | "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩<#selection-caret>" -Dump of markup 4: +Dump of markup 13: | "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨<#selection-caret>" -Dump of markup 5: +Dump of markup 14: | "👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩<#selection-caret>" -Dump of markup 6: +Dump of markup 15: | "👦🏻👦🏾🏻👦🏾👦👩👩👦<#selection-caret>" -Dump of markup 7: +Dump of markup 16: | "👦🏻👦🏾🏻👦🏾👦<#selection-caret>" -Dump of markup 8: +Dump of markup 17: | "👦🏻👦🏾🏻👦🏾<#selection-caret>" -Dump of markup 9: +Dump of markup 18: | "👦🏻👦🏾🏻<#selection-caret>" -Dump of markup 10: +Dump of markup 19: | "👦🏻👦🏾<#selection-caret>" -Dump of markup 11: +Dump of markup 20: | "👦🏻<#selection-caret>" -Dump of markup 12: +Dump of markup 21: | Modified: trunk/LayoutTests/editing/deleting/delete-emoji.html (188959 => 188960) --- trunk/LayoutTests/editing/deleting/delete-emoji.html 2015-08-26 09:11:24 UTC (rev 188959) +++ trunk/LayoutTests/editing/deleting/delete-emoji.html 2015-08-26 09:26:14 UTC (rev 188960) @@ -1,7 +1,7 @@ -👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻 +👦🏻👦🏾🏻👦🏾👦👩👩👦👩❤️👩👨❤️👨👩❤️💋👩👨❤️💋👨☝️🏻✍🏾⛹🏾🖐🏾🖕🏾🤘🏾🕵🏾🕴🏾🏋🏾👁🗨
[webkit-changes] [188349] trunk/Source/WebKit2
Title: [188349] trunk/Source/WebKit2 Revision 188349 Author enr...@apple.com Date 2015-08-12 12:29:29 -0700 (Wed, 12 Aug 2015) Log Message Element interaction should not be canceled when the menu is already being shown. https://bugs.webkit.org/show_bug.cgi?id=147945 rdar://problem/22206433 Reviewed by Beth Dakin. When preview is canceled by the action menu gesture, we should not stop interacting with the element, since the information about the element is used for the menu actions. We now expose a new method in the action sheet assistant to know if the action sheed is being shown and we use this as an indication that we should not stop the interaction with the element. * UIProcess/ios/WKActionSheetAssistant.h: * UIProcess/ios/WKActionSheetAssistant.mm: (-[WKActionSheetAssistant isShowingSheet]): Added. * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _interactionStoppedFromPreviewItemController:]): Do not stop the interaction if the sheet is being shown. Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.h trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (188348 => 188349) --- trunk/Source/WebKit2/ChangeLog 2015-08-12 19:23:03 UTC (rev 188348) +++ trunk/Source/WebKit2/ChangeLog 2015-08-12 19:29:29 UTC (rev 188349) @@ -1,3 +1,24 @@ +2015-08-12 Enrica Casucci + +Element interaction should not be canceled when the menu is already being shown. +https://bugs.webkit.org/show_bug.cgi?id=147945 +rdar://problem/22206433 + +Reviewed by Beth Dakin. + +When preview is canceled by the action menu gesture, we should not stop interacting +with the element, since the information about the element is used for the menu actions. +We now expose a new method in the action sheet assistant to know if the action sheed is +being shown and we use this as an indication that we should not stop the interaction +with the element. + +* UIProcess/ios/WKActionSheetAssistant.h: +* UIProcess/ios/WKActionSheetAssistant.mm: +(-[WKActionSheetAssistant isShowingSheet]): Added. +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView _interactionStoppedFromPreviewItemController:]): Do not stop +the interaction if the sheet is being shown. + 2015-08-12 Matt Rajca Fixed the Release build when MEDIA_SESSION is enabled. Modified: trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.h (188348 => 188349) --- trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.h 2015-08-12 19:23:03 UTC (rev 188348) +++ trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.h 2015-08-12 19:29:29 UTC (rev 188349) @@ -67,6 +67,7 @@ - (void)updateSheetPosition; - (RetainPtr)defaultActionsForLinkSheet:(_WKActivatedElementInfo *)elementInfo; - (RetainPtr)defaultActionsForImageSheet:(_WKActivatedElementInfo *)elementInfo; +- (BOOL)isShowingSheet; @end #endif // PLATFORM(IOS) Modified: trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm (188348 => 188349) --- trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm 2015-08-12 19:23:03 UTC (rev 188348) +++ trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm 2015-08-12 19:29:29 UTC (rev 188349) @@ -204,6 +204,11 @@ [_interactionSheet updateSheetPosition]; } +- (BOOL)isShowingSheet +{ +return _interactionSheet != nil; +} + - (void)_createSheetWithElementActions:(NSArray *)actions showLinkTitle:(BOOL)showLinkTitle { auto delegate = _delegate.get(); Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (188348 => 188349) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-08-12 19:23:03 UTC (rev 188348) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-08-12 19:29:29 UTC (rev 188349) @@ -3382,7 +3382,8 @@ { [self _addDefaultGestureRecognizers]; -_page->stopInteraction(); +if (![_actionSheetAssistant isShowingSheet]) +_page->stopInteraction(); } - (void)_previewItemController:(UIPreviewItemController *)controller didDismissPreview:(UIViewController *)viewController committing:(BOOL)committing ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [188109] trunk/Source/WebKit2
Title: [188109] trunk/Source/WebKit2 Revision 188109 Author enr...@apple.com Date 2015-08-06 20:27:23 -0700 (Thu, 06 Aug 2015) Log Message Cleanup action sheet only when long press is canceled (non ended). https://bugs.webkit.org/show_bug.cgi?id=147766 rdar://problem/22181842 Reviewed by Tim Horton. * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _longPressRecognized:]): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (188108 => 188109) --- trunk/Source/WebKit2/ChangeLog 2015-08-07 02:54:46 UTC (rev 188108) +++ trunk/Source/WebKit2/ChangeLog 2015-08-07 03:27:23 UTC (rev 188109) @@ -1,3 +1,14 @@ +2015-08-06 Enrica Casucci + +Cleanup action sheet only when long press is canceled (non ended). +https://bugs.webkit.org/show_bug.cgi?id=147766 +rdar://problem/22181842 + +Reviewed by Tim Horton. + +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView _longPressRecognized:]): + 2015-08-05 Filip Pizlo Lightweight locks should be adaptive Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (188108 => 188109) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-08-07 02:54:46 UTC (rev 188108) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-08-07 03:27:23 UTC (rev 188109) @@ -1091,7 +1091,6 @@ } break; case UIGestureRecognizerStateCancelled: -case UIGestureRecognizerStateEnded: [_actionSheetAssistant cleanupSheet]; break; default: ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [188058] trunk/Source/WebKit2
Title: [188058] trunk/Source/WebKit2 Revision 188058 Author enr...@apple.com Date 2015-08-06 14:03:02 -0700 (Thu, 06 Aug 2015) Log Message Build fix for iOS after http://trac.webkit.org/changeset/188053. Unreviewed. * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _registerPreview]): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (188057 => 188058) --- trunk/Source/WebKit2/ChangeLog 2015-08-06 20:53:33 UTC (rev 188057) +++ trunk/Source/WebKit2/ChangeLog 2015-08-06 21:03:02 UTC (rev 188058) @@ -1,5 +1,14 @@ 2015-08-06 Enrica Casucci +Build fix for iOS after http://trac.webkit.org/changeset/188053. + +Unreviewed. + +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView _registerPreview]): + +2015-08-06 Enrica Casucci + Allow long press to cancel link preview. https://bugs.webkit.org/show_bug.cgi?id=147743 rdar://problem/22128839 Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (188057 => 188058) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-08-06 20:53:33 UTC (rev 188057) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-08-06 21:03:02 UTC (rev 188058) @@ -216,6 +216,10 @@ #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 9 @protocol UISelectionInteractionAssistant; +@interface UIPreviewItemController (StagingToRemove) +@property (strong, nonatomic, readonly) UIGestureRecognizer *presentationSecondaryGestureRecognizer; +@end + #endif @interface WKFormInputSession : NSObject <_WKFormInputSession> @@ -3222,7 +3226,8 @@ _previewItemController = adoptNS([[UIPreviewItemController alloc] initWithView:self]); [_previewItemController setDelegate:self]; _previewGestureRecognizer = _previewItemController.get().presentationGestureRecognizer; -_previewSecondaryGestureRecognizer = _previewItemController.get().presentationSecondaryGestureRecognizer; +if ([_previewItemController respondsToSelector:@selector(presentationSecondaryGestureRecognizer)]) +_previewSecondaryGestureRecognizer = _previewItemController.get().presentationSecondaryGestureRecognizer; } - (void)_unregisterPreview ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [188053] trunk/Source/WebKit2
Title: [188053] trunk/Source/WebKit2 Revision 188053 Author enr...@apple.com Date 2015-08-06 13:14:58 -0700 (Thu, 06 Aug 2015) Log Message Allow long press to cancel link preview. https://bugs.webkit.org/show_bug.cgi?id=147743 rdar://problem/22128839 Reviewed by Tim Horton. We should be able to show the context menu at the beginnig of link preview. * UIProcess/ios/WKContentViewInteraction.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _removeDefaultGestureRecognizers]): (-[WKContentView _addDefaultGestureRecognizers]): (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]): (-[WKContentView _longPressRecognized:]): (-[WKContentView _singleTapRecognized:]): (-[WKContentView _registerPreview]): (-[WKContentView _unregisterPreview]): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (188052 => 188053) --- trunk/Source/WebKit2/ChangeLog 2015-08-06 19:48:29 UTC (rev 188052) +++ trunk/Source/WebKit2/ChangeLog 2015-08-06 20:14:58 UTC (rev 188053) @@ -1,3 +1,23 @@ +2015-08-06 Enrica Casucci + +Allow long press to cancel link preview. +https://bugs.webkit.org/show_bug.cgi?id=147743 +rdar://problem/22128839 + +Reviewed by Tim Horton. + +We should be able to show the context menu at the beginnig of link preview. + +* UIProcess/ios/WKContentViewInteraction.h: +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView _removeDefaultGestureRecognizers]): +(-[WKContentView _addDefaultGestureRecognizers]): +(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]): +(-[WKContentView _longPressRecognized:]): +(-[WKContentView _singleTapRecognized:]): +(-[WKContentView _registerPreview]): +(-[WKContentView _unregisterPreview]): + 2015-08-06 Matt Rajca Media Session: rename isFocusedContentMediaElementPaused and get rid of callback Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h (188052 => 188053) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h 2015-08-06 19:48:29 UTC (rev 188052) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h 2015-08-06 20:14:58 UTC (rev 188053) @@ -117,6 +117,7 @@ RetainPtr _formInputSession; RetainPtr _fileUploadPanel; RetainPtr _previewGestureRecognizer; +RetainPtr _previewSecondaryGestureRecognizer; #if HAVE(LINK_PREVIEW) RetainPtr _previewItemController; #endif Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (188052 => 188053) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-08-06 19:48:29 UTC (rev 188052) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-08-06 20:14:58 UTC (rev 188053) @@ -412,7 +412,6 @@ [self removeGestureRecognizer:_touchEventGestureRecognizer.get()]; [self removeGestureRecognizer:_singleTapGestureRecognizer.get()]; [self removeGestureRecognizer:_highlightLongPressGestureRecognizer.get()]; -[self removeGestureRecognizer:_longPressGestureRecognizer.get()]; [self removeGestureRecognizer:_doubleTapGestureRecognizer.get()]; [self removeGestureRecognizer:_twoFingerDoubleTapGestureRecognizer.get()]; } @@ -422,7 +421,6 @@ [self addGestureRecognizer:_touchEventGestureRecognizer.get()]; [self addGestureRecognizer:_singleTapGestureRecognizer.get()]; [self addGestureRecognizer:_highlightLongPressGestureRecognizer.get()]; -[self addGestureRecognizer:_longPressGestureRecognizer.get()]; [self addGestureRecognizer:_doubleTapGestureRecognizer.get()]; [self addGestureRecognizer:_twoFingerDoubleTapGestureRecognizer.get()]; } @@ -873,6 +871,9 @@ if (isSamePair(gestureRecognizer, otherGestureRecognizer, _singleTapGestureRecognizer.get(), _textSelectionAssistant.get().singleTapGesture)) return YES; +if (isSamePair(gestureRecognizer, otherGestureRecognizer, _highlightLongPressGestureRecognizer.get(), _previewSecondaryGestureRecognizer.get())) +return YES; + if (isSamePair(gestureRecognizer, otherGestureRecognizer, _highlightLongPressGestureRecognizer.get(), _previewGestureRecognizer.get())) return YES; @@ -1073,21 +1074,25 @@ { ASSERT(gestureRecognizer == _longPressGestureRecognizer); -#if HAVE(LINK_PREVIEW) -if ([_previewItemController interactionInProgress]) -return; -#endif - _lastInteractionLocation = gestureRecognizer.startPoint; -if ([gestureRecognizer state] == UIGestureRecognizerStateBegan) { +switch ([gestureRecognizer state]) { +case UIGestureRecognizerStateBegan: +{ SEL action = "" _actionForLongPress]; if (action) { [self per
[webkit-changes] [187565] trunk/Source/WebKit2
Title: [187565] trunk/Source/WebKit2 Revision 187565 Author enr...@apple.com Date 2015-07-29 16:03:25 -0700 (Wed, 29 Jul 2015) Log Message Preview should not start if touch handler prevents default. https://bugs.webkit.org/show_bug.cgi?id=147423 rdar://problem/22061043 Reviewed by Tim Horton. We need to check if _highlightLongPressCanClick has not been reset before we allow the preview. It can be reset by a touch handler preventing default. * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (187564 => 187565) --- trunk/Source/WebKit2/ChangeLog 2015-07-29 22:17:03 UTC (rev 187564) +++ trunk/Source/WebKit2/ChangeLog 2015-07-29 23:03:25 UTC (rev 187565) @@ -1,3 +1,17 @@ +2015-07-29 Enrica Casucci + +Preview should not start if touch handler prevents default. +https://bugs.webkit.org/show_bug.cgi?id=147423 +rdar://problem/22061043 + +Reviewed by Tim Horton. + +We need to check if _highlightLongPressCanClick has not been reset before +we allow the preview. It can be reset by a touch handler preventing default. + +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]): + 2015-07-29 Chris Fleizach AX: iOS: VoiceOver hangs indefinitely when an JS alert appears Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (187564 => 187565) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-07-29 22:17:03 UTC (rev 187564) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-07-29 23:03:25 UTC (rev 187565) @@ -3225,6 +3225,9 @@ - (BOOL)_interactionShouldBeginFromPreviewItemController:(UIPreviewItemController *)controller forPosition:(CGPoint)position { +if (!_highlightLongPressCanClick) +return NO; + [self ensurePositionInformationIsUpToDate:position]; if (_positionInformation.clickableElementName != "A" && _positionInformation.clickableElementName != "IMG") return NO; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [187268] trunk/Source/WebKit2
Title: [187268] trunk/Source/WebKit2 Revision 187268 Author enr...@apple.com Date 2015-07-23 16:16:07 -0700 (Thu, 23 Jul 2015) Log Message Removing one incorrect annotation from the previous change. Unreviewed. * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h Diff Modified: trunk/Source/WebKit2/ChangeLog (187267 => 187268) --- trunk/Source/WebKit2/ChangeLog 2015-07-23 23:08:11 UTC (rev 187267) +++ trunk/Source/WebKit2/ChangeLog 2015-07-23 23:16:07 UTC (rev 187268) @@ -1,5 +1,13 @@ 2015-07-23 Enrica Casucci +Removing one incorrect annotation from the previous change. + +Unreviewed. + +* UIProcess/API/Cocoa/WKUIDelegatePrivate.h: + +2015-07-23 Enrica Casucci + [iOS] Add another preview delegate for didDismissPreview. https://bugs.webkit.org/show_bug.cgi?id=147241 rdar://problem/21664211 Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h (187267 => 187268) --- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h 2015-07-23 23:08:11 UTC (rev 187267) +++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h 2015-07-23 23:16:07 UTC (rev 187268) @@ -57,7 +57,7 @@ #if TARGET_OS_IPHONE - (BOOL)_webView:(WKWebView *)webView shouldIncludeAppLinkActionsForElement:(_WKActivatedElementInfo *)element WK_AVAILABLE(NA, WK_IOS_TBA); -- (NSArray *)_webView:(WKWebView *)webView actionsForElement:(_WKActivatedElementInfo *)element defaultActions:(WK_ARRAY(_WKElementAction *) *)defaultActions WK_AVAILABLE(NA, WK_IOS_TBA); +- (NSArray *)_webView:(WKWebView *)webView actionsForElement:(_WKActivatedElementInfo *)element defaultActions:(WK_ARRAY(_WKElementAction *) *)defaultActions; - (void)_webView:(WKWebView *)webView didNotHandleTapAsClickAtPoint:(CGPoint)point; - (BOOL)_webView:(WKWebView *)webView shouldRequestGeolocationAuthorizationForURL:(NSURL *)url isMainFrame:(BOOL)isMainFrame mainFrameURL:(NSURL *)mainFrameURL; - (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForURL:(NSURL *)url WK_AVAILABLE(NA, WK_IOS_TBA); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [187267] trunk/Source/WebKit2
Title: [187267] trunk/Source/WebKit2 Revision 187267 Author enr...@apple.com Date 2015-07-23 16:08:11 -0700 (Thu, 23 Jul 2015) Log Message [iOS] Add another preview delegate for didDismissPreview. https://bugs.webkit.org/show_bug.cgi?id=147241 rdar://problem/21664211 Reviewed by Tim Horton and Yongjun Zhang. * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _previewItemController:didDismissPreview:committing:]): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (187266 => 187267) --- trunk/Source/WebKit2/ChangeLog 2015-07-23 23:06:44 UTC (rev 187266) +++ trunk/Source/WebKit2/ChangeLog 2015-07-23 23:08:11 UTC (rev 187267) @@ -1,3 +1,15 @@ +2015-07-23 Enrica Casucci + +[iOS] Add another preview delegate for didDismissPreview. +https://bugs.webkit.org/show_bug.cgi?id=147241 +rdar://problem/21664211 + +Reviewed by Tim Horton and Yongjun Zhang. + +* UIProcess/API/Cocoa/WKUIDelegatePrivate.h: +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView _previewItemController:didDismissPreview:committing:]): + 2015-07-23 Dan Bernstein Second pass at [iOS] Keyboard shortcuts that take focus away from the web view end up typing a letter into the newly focused field Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h (187266 => 187267) --- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h 2015-07-23 23:06:44 UTC (rev 187266) +++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h 2015-07-23 23:08:11 UTC (rev 187267) @@ -57,17 +57,18 @@ #if TARGET_OS_IPHONE - (BOOL)_webView:(WKWebView *)webView shouldIncludeAppLinkActionsForElement:(_WKActivatedElementInfo *)element WK_AVAILABLE(NA, WK_IOS_TBA); -- (NSArray *)_webView:(WKWebView *)webView actionsForElement:(_WKActivatedElementInfo *)element defaultActions:(WK_ARRAY(_WKElementAction *) *)defaultActions; +- (NSArray *)_webView:(WKWebView *)webView actionsForElement:(_WKActivatedElementInfo *)element defaultActions:(WK_ARRAY(_WKElementAction *) *)defaultActions WK_AVAILABLE(NA, WK_IOS_TBA); - (void)_webView:(WKWebView *)webView didNotHandleTapAsClickAtPoint:(CGPoint)point; - (BOOL)_webView:(WKWebView *)webView shouldRequestGeolocationAuthorizationForURL:(NSURL *)url isMainFrame:(BOOL)isMainFrame mainFrameURL:(NSURL *)mainFrameURL; -- (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForURL:(NSURL *)url; -- (void)_webView:(WKWebView *)webView commitPreviewedViewController:(UIViewController *)previewedViewController; -- (void)_webView:(WKWebView *)webView willPreviewImageWithURL:(NSURL *)imageURL WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA); -- (void)_webView:(WKWebView *)webView commitPreviewedImageWithURL:(NSURL *)imageURL WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA); -- (void)_webView:(WKWebView *)webView didDismissPreviewViewController:(UIViewController *)previewedViewController; -- (UIEdgeInsets)_webView:(WKWebView *)webView finalObscuredInsetsForScrollView:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset; -- (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForURL:(NSURL *)url defaultActions:(WK_ARRAY(_WKElementAction *) *)actions elementInfo:(_WKActivatedElementInfo *)elementInfo WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA); -- (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForAnimatedImageAtURL:(NSURL *)url defaultActions:(WK_ARRAY(_WKElementAction *) *)actions elementInfo:(_WKActivatedElementInfo *)elementInfo imageSize:(CGSize)imageSize WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA); +- (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForURL:(NSURL *)url WK_AVAILABLE(NA, WK_IOS_TBA); +- (void)_webView:(WKWebView *)webView commitPreviewedViewController:(UIViewController *)previewedViewController WK_AVAILABLE(NA, WK_IOS_TBA); +- (void)_webView:(WKWebView *)webView willPreviewImageWithURL:(NSURL *)imageURL WK_AVAILABLE(NA, WK_IOS_TBA); +- (void)_webView:(WKWebView *)webView commitPreviewedImageWithURL:(NSURL *)imageURL WK_AVAILABLE(NA, WK_IOS_TBA); +- (void)_webView:(WKWebView *)webView didDismissPreviewViewController:(UIViewController *)previewedViewController committing:(BOOL)committing WK_AVAILABLE(NA, WK_IOS_TBA); +- (void)_webView:(WKWebView *)webView didDismissPreviewViewController:(UIViewController *)previewedViewController WK_AVAILABLE(NA, WK_IOS_TBA); +- (UIEdgeInsets)_webView:(WKWebView *)webView finalObscuredInsetsForScrollView:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset WK_AVAILABLE(NA, WK_IOS_TBA); +- (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForURL:(NSURL
[webkit-changes] [187259] trunk/Source/WebKit2
Title: [187259] trunk/Source/WebKit2 Revision 187259 Author enr...@apple.com Date 2015-07-23 15:16:18 -0700 (Thu, 23 Jul 2015) Log Message One more iOS build fix. Unreviewed. * Platform/spi/ios/UIKitSPI.h: * UIProcess/ios/WKContentViewInteraction.h: Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h Diff Modified: trunk/Source/WebKit2/ChangeLog (187258 => 187259) --- trunk/Source/WebKit2/ChangeLog 2015-07-23 22:15:22 UTC (rev 187258) +++ trunk/Source/WebKit2/ChangeLog 2015-07-23 22:16:18 UTC (rev 187259) @@ -1,3 +1,12 @@ +2015-07-23 Enrica Casucci + +One more iOS build fix. + +Unreviewed. + +* Platform/spi/ios/UIKitSPI.h: +* UIProcess/ios/WKContentViewInteraction.h: + 2015-07-23 Matthew Daiter Bridged passing lists of devices between the UIProcess and the WebProcess Modified: trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h (187258 => 187259) --- trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h 2015-07-23 22:15:22 UTC (rev 187258) +++ trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h 2015-07-23 22:16:18 UTC (rev 187259) @@ -74,6 +74,8 @@ #import #import +#import + #if HAVE(LINK_PREVIEW) #import #endif Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h (187258 => 187259) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h 2015-07-23 22:15:22 UTC (rev 187258) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h 2015-07-23 22:16:18 UTC (rev 187259) @@ -44,10 +44,6 @@ #import #import -#if USE(APPLE_INTERNAL_SDK) -#import -#endif - namespace WebCore { class Color; class FloatQuad; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [187253] trunk/Source/WebKit2
Title: [187253] trunk/Source/WebKit2 Revision 187253 Author enr...@apple.com Date 2015-07-23 14:19:28 -0700 (Thu, 23 Jul 2015) Log Message iOS build fix after http://trac.webkit.org/changeset/187238. Unreviewed. * Platform/spi/ios/UIKitSPI.h: Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h Diff Modified: trunk/Source/WebKit2/ChangeLog (187252 => 187253) --- trunk/Source/WebKit2/ChangeLog 2015-07-23 21:17:38 UTC (rev 187252) +++ trunk/Source/WebKit2/ChangeLog 2015-07-23 21:19:28 UTC (rev 187253) @@ -1,3 +1,11 @@ +2015-07-23 Enrica Casucci + +iOS build fix after http://trac.webkit.org/changeset/187238. + +Unreviewed. + +* Platform/spi/ios/UIKitSPI.h: + 2015-07-23 Jer Noble [WK2] Add a WKWebView property for whether the view is displaying a media document Modified: trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h (187252 => 187253) --- trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h 2015-07-23 21:17:38 UTC (rev 187252) +++ trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h 2015-07-23 21:19:28 UTC (rev 187253) @@ -74,7 +74,7 @@ #import #import -#if HAVE(LINK_PREVIEWS) +#if HAVE(LINK_PREVIEW) #import #endif ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [186977] trunk/Source/WebKit2
Title: [186977] trunk/Source/WebKit2 Revision 186977 Author enr...@apple.com Date 2015-07-17 16:59:12 -0700 (Fri, 17 Jul 2015) Log Message [iOS] Implement selectionInteractionAssistant accessor. https://bugs.webkit.org/show_bug.cgi?id=147054 rdar://problem/20864286 Reviewed by Tim Horton. One more change to adopt the new selection interaction model on iOS. * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView selectionInteractionAssistant]): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (186976 => 186977) --- trunk/Source/WebKit2/ChangeLog 2015-07-17 23:55:59 UTC (rev 186976) +++ trunk/Source/WebKit2/ChangeLog 2015-07-17 23:59:12 UTC (rev 186977) @@ -1,3 +1,17 @@ +2015-07-17 Enrica Casucci + +[iOS] Implement selectionInteractionAssistant accessor. +https://bugs.webkit.org/show_bug.cgi?id=147054 +rdar://problem/20864286 + +Reviewed by Tim Horton. + +One more change to adopt the new selection interaction +model on iOS. + +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView selectionInteractionAssistant]): + 2015-07-17 Dan Bernstein REGRESSION (r186964): Crash in WebKit2.CloseFromWithinCreatePage Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (186976 => 186977) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-07-17 23:55:59 UTC (rev 186976) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-07-17 23:59:12 UTC (rev 186977) @@ -218,6 +218,8 @@ @interface UIWebFormAccessory (StagingToRemove) - (id)initWithInputAssistantItem:(UITextInputAssistantItem *)inputAssistantItem; @end + +@protocol UISelectionInteractionAssistant; #endif @interface WKFormInputSession : NSObject <_WKFormInputSession> @@ -2544,6 +2546,14 @@ return _webSelectionAssistant.get(); } +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 9 +- (id)selectionInteractionAssistant +{ +if ([_webSelectionAssistant conformsToProtocol:@protocol(UISelectionInteractionAssistant)]) +return (id)_webSelectionAssistant.get(); +return nil; +} +#endif // NSRange support. Would like to deprecate to the extent possible, although some support // (i.e. selectionRange) has shipped as API. ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [186857] trunk/Source/WebCore
Title: [186857] trunk/Source/WebCore Revision 186857 Author enr...@apple.com Date 2015-07-15 14:07:01 -0700 (Wed, 15 Jul 2015) Log Message [iOS] Should look for RTF and RTFD pasteboard types before plain text. https://bugs.webkit.org/show_bug.cgi?id=146971 rdar://problem/21840845 Reviewed by Sam Weinig. The list of pasteboard types returned by supportedPasteboardTypes determines the order in which WebKit looks for data in the pasteboard to create a fragment. The incorrect order could make plain text to be preferred over rich format. * platform/ios/PasteboardIOS.mm: (WebCore::Pasteboard::supportedPasteboardTypes): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/ios/PasteboardIOS.mm Diff Modified: trunk/Source/WebCore/ChangeLog (186856 => 186857) --- trunk/Source/WebCore/ChangeLog 2015-07-15 21:06:16 UTC (rev 186856) +++ trunk/Source/WebCore/ChangeLog 2015-07-15 21:07:01 UTC (rev 186857) @@ -1,3 +1,19 @@ +2015-07-15 Enrica Casucci + +[iOS] Should look for RTF and RTFD pasteboard types before plain text. +https://bugs.webkit.org/show_bug.cgi?id=146971 +rdar://problem/21840845 + +Reviewed by Sam Weinig. + +The list of pasteboard types returned by supportedPasteboardTypes +determines the order in which WebKit looks for data in the pasteboard +to create a fragment. The incorrect order could make plain text to +be preferred over rich format. + +* platform/ios/PasteboardIOS.mm: +(WebCore::Pasteboard::supportedPasteboardTypes): + 2015-07-15 Anders Carlsson Private headers that include project headers should also be project headers Modified: trunk/Source/WebCore/platform/ios/PasteboardIOS.mm (186856 => 186857) --- trunk/Source/WebCore/platform/ios/PasteboardIOS.mm 2015-07-15 21:06:16 UTC (rev 186856) +++ trunk/Source/WebCore/platform/ios/PasteboardIOS.mm 2015-07-15 21:07:01 UTC (rev 186857) @@ -246,7 +246,7 @@ NSArray* Pasteboard::supportedPasteboardTypes() { -return @[(id)WebArchivePboardType, (id)kUTTypeHTML, (id)kUTTypePNG, (id)kUTTypeTIFF, (id)kUTTypeJPEG, (id)kUTTypeGIF, (id)kUTTypeURL, (id)kUTTypeText, (id)kUTTypeRTFD, (id)kUTTypeRTF]; +return @[(id)WebArchivePboardType, (id)kUTTypeRTFD, (id)kUTTypeRTF, (id)kUTTypeHTML, (id)kUTTypePNG, (id)kUTTypeTIFF, (id)kUTTypeJPEG, (id)kUTTypeGIF, (id)kUTTypeURL, (id)kUTTypeText]; } bool Pasteboard::hasData() ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [186849] trunk/Source/WebKit2
Title: [186849] trunk/Source/WebKit2 Revision 186849 Author enr...@apple.com Date 2015-07-15 10:52:11 -0700 (Wed, 15 Jul 2015) Log Message [iOS] Add support for updateSelectionWithExtentPoint:withBoundary. https://bugs.webkit.org/show_bug.cgi?id=146951 rdar://problem/20864286 Reviewed by Tim Horton. Add implementation for new method used by text selection engine on iOS. The new function modifies the selection near the given point and snaps it at the boundary of the specified granularity. * UIProcess/WebPageProxy.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView updateSelectionWithExtentPoint:completionHandler:]): (-[WKContentView updateSelectionWithExtentPoint:withBoundary:completionHandler:]): (-[WKContentView _characterBeforeCaretSelection]): * UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::updateSelectionWithExtentPoint): (WebKit::WebPageProxy::updateSelectionWithExtentPointAndBoundary): (WebKit::WebPageProxy::requestDictationContext): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::rangeForGranularityAtPoint): (WebKit::WebPage::selectTextWithGranularityAtPoint): (WebKit::WebPage::updateSelectionWithExtentPointAndBoundary): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/WebPageProxy.h trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (186848 => 186849) --- trunk/Source/WebKit2/ChangeLog 2015-07-15 17:42:06 UTC (rev 186848) +++ trunk/Source/WebKit2/ChangeLog 2015-07-15 17:52:11 UTC (rev 186849) @@ -1,3 +1,31 @@ +2015-07-14 Enrica Casucci + +[iOS] Add support for updateSelectionWithExtentPoint:withBoundary. +https://bugs.webkit.org/show_bug.cgi?id=146951 +rdar://problem/20864286 + +Reviewed by Tim Horton. + +Add implementation for new method used by text selection +engine on iOS. The new function modifies the selection near the given point +and snaps it at the boundary of the specified granularity. + +* UIProcess/WebPageProxy.h: +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView updateSelectionWithExtentPoint:completionHandler:]): +(-[WKContentView updateSelectionWithExtentPoint:withBoundary:completionHandler:]): +(-[WKContentView _characterBeforeCaretSelection]): +* UIProcess/ios/WebPageProxyIOS.mm: +(WebKit::WebPageProxy::updateSelectionWithExtentPoint): +(WebKit::WebPageProxy::updateSelectionWithExtentPointAndBoundary): +(WebKit::WebPageProxy::requestDictationContext): +* WebProcess/WebPage/WebPage.h: +* WebProcess/WebPage/WebPage.messages.in: +* WebProcess/WebPage/ios/WebPageIOS.mm: +(WebKit::WebPage::rangeForGranularityAtPoint): +(WebKit::WebPage::selectTextWithGranularityAtPoint): +(WebKit::WebPage::updateSelectionWithExtentPointAndBoundary): + 2015-07-15 Michael Catanzaro [Linux] SeccompBrokerClient should cache arbitrary file descriptors Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (186848 => 186849) --- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2015-07-15 17:42:06 UTC (rev 186848) +++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2015-07-15 17:52:11 UTC (rev 186849) @@ -488,6 +488,7 @@ void moveSelectionAtBoundaryWithDirection(WebCore::TextGranularity, WebCore::SelectionDirection, std::function); void beginSelectionInDirection(WebCore::SelectionDirection, std::function); void updateSelectionWithExtentPoint(const WebCore::IntPoint, std::function); +void updateSelectionWithExtentPointAndBoundary(const WebCore::IntPoint, WebCore::TextGranularity, std::function); void requestAutocorrectionData(const String& textForAutocorrection, std::function&, const String&, double, uint64_t, CallbackBase::Error)>); void applyAutocorrection(const String& correction, const String& originalText, std::function); bool applyAutocorrection(const String& correction, const String& originalText); Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (186848 => 186849) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-07-15 17:42:06 UTC (rev 186848) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-07-15 17:52:11 UTC (rev 186849) @@ -2043,6 +2043,16 @@ }); } +- (void)updateSelectionWithExtentPoint:(CGPoint)point withBoundary:(UITextGranularity)granularity completionHandler:(void (^)(BOOL selectionEndIsMoving))completionHandler +{ +UIWKSelectionWithDirectionCompletionHandler selectionHandler = [c
[webkit-changes] [186716] trunk/Source/WebKit2
Title: [186716] trunk/Source/WebKit2 Revision 186716 Author enr...@apple.com Date 2015-07-11 14:30:33 -0700 (Sat, 11 Jul 2015) Log Message Remove incorrect overriding of inputAssistantItem in WKContentView. https://bugs.webkit.org/show_bug.cgi?id=146863 rdar://problem/21507154 Reviewed by Sam Weinig. Correction to the patch in r186713. We need to provide the inputAssistantItem from the responder. * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView inputAccessoryView]): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (186715 => 186716) --- trunk/Source/WebKit2/ChangeLog 2015-07-11 20:35:45 UTC (rev 186715) +++ trunk/Source/WebKit2/ChangeLog 2015-07-11 21:30:33 UTC (rev 186716) @@ -1,3 +1,17 @@ +2015-07-11 Enrica Casucci + +Remove incorrect overriding of inputAssistantItem in WKContentView. +https://bugs.webkit.org/show_bug.cgi?id=146863 +rdar://problem/21507154 + +Reviewed by Sam Weinig. + +Correction to the patch in r186713. +We need to provide the inputAssistantItem from the responder. + +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView inputAccessoryView]): + 2015-07-11 Commit Queue Unreviewed, rolling out r186689 and r186710. Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (186715 => 186716) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-07-11 20:35:45 UTC (rev 186715) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-07-11 21:30:33 UTC (rev 186716) @@ -211,6 +211,12 @@ + (BOOL)_addCompletion:(void(^)(BOOL))completion; @end +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 9 +@interface UIWebFormAccessory (StagingToRemove) +- (id)initWithInputAssistantItem:(UITextInputAssistantItem *)inputAssistantItem; +@end +#endif + @interface WKFormInputSession : NSObject <_WKFormInputSession> - (instancetype)initWithContentView:(WKContentView *)view userObject:(NSObject *)userObject; @@ -1251,7 +1257,12 @@ - (UIView *)inputAccessoryView { if (!_formAccessoryView) { -_formAccessoryView = adoptNS([[UIWebFormAccessory alloc] init]); +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 9 +if ([UIWebFormAccessory instancesRespondToSelector:@selector(initWithInputAssistantItem:)]) +_formAccessoryView = adoptNS([[UIWebFormAccessory alloc] initWithInputAssistantItem:[self inputAssistantItem]]); +else +#endif +_formAccessoryView = adoptNS([[UIWebFormAccessory alloc] init]); [_formAccessoryView setDelegate:self]; } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [186713] trunk/Source/WebKit2
Title: [186713] trunk/Source/WebKit2 Revision 186713 Author enr...@apple.com Date 2015-07-11 12:02:25 -0700 (Sat, 11 Jul 2015) Log Message Remove incorrect overriding of inputAssistantItem in WKContentView. https://bugs.webkit.org/show_bug.cgi?id=146863 rdar://problem/21507154 Reviewed by Dan Bernstein. Removing implementation of inputAssistantItem and moving initialization of formAccessoryView to inputAccessoryView to avoid interfering with the keyboard handling of the assistant bar. * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView inputAccessoryView]): (-[WKContentView inputAssistantItem]): Deleted. (-[WKContentView _inputAssistantItem]): Deleted. Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (186712 => 186713) --- trunk/Source/WebKit2/ChangeLog 2015-07-11 18:19:46 UTC (rev 186712) +++ trunk/Source/WebKit2/ChangeLog 2015-07-11 19:02:25 UTC (rev 186713) @@ -1,3 +1,20 @@ +2015-07-10 Enrica Casucci + +Remove incorrect overriding of inputAssistantItem in WKContentView. +https://bugs.webkit.org/show_bug.cgi?id=146863 +rdar://problem/21507154 + +Reviewed by Dan Bernstein. + +Removing implementation of inputAssistantItem and moving initialization +of formAccessoryView to inputAccessoryView to avoid interfering with +the keyboard handling of the assistant bar. + +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView inputAccessoryView]): +(-[WKContentView inputAssistantItem]): Deleted. +(-[WKContentView _inputAssistantItem]): Deleted. + 2015-07-10 Simon Fraser [iOS WK2] Scrolling issues on horizontally scrollable RTL pages Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (186712 => 186713) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-07-11 18:19:46 UTC (rev 186712) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-07-11 19:02:25 UTC (rev 186713) @@ -211,12 +211,6 @@ + (BOOL)_addCompletion:(void(^)(BOOL))completion; @end -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 9 -@interface UIWebFormAccessory (StagingToRemove) -- (UITextInputAssistantItem *)inputAssistantItem; -@end -#endif - @interface WKFormInputSession : NSObject <_WKFormInputSession> - (instancetype)initWithContentView:(WKContentView *)view userObject:(NSObject *)userObject; @@ -1256,33 +1250,17 @@ - (UIView *)inputAccessoryView { -if (![self requiresAccessoryView]) -return nil; - if (!_formAccessoryView) { _formAccessoryView = adoptNS([[UIWebFormAccessory alloc] init]); [_formAccessoryView setDelegate:self]; } + +if (![self requiresAccessoryView]) +return nil; return _formAccessoryView.get(); } -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 9 -- (UITextInputAssistantItem *)inputAssistantItem -{ -if (!_formAccessoryView) { -_formAccessoryView = adoptNS([[UIWebFormAccessory alloc] init]); -[_formAccessoryView setDelegate:self]; -} -return ([_formAccessoryView respondsToSelector:@selector(inputAssistantItem)]) ? [_formAccessoryView inputAssistantItem] : nil; -} - -- (UITextInputAssistantItem *)_inputAssistantItem -{ -return [self inputAssistantItem]; -} -#endif - - (NSArray *)supportedPasteboardTypesForCurrentSelection { if (_page->editorState().selectionIsNone) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [186148] trunk/Source/WebKit2
Title: [186148] trunk/Source/WebKit2 Revision 186148 Author enr...@apple.com Date 2015-06-30 17:08:12 -0700 (Tue, 30 Jun 2015) Log Message WebKit should heuristically exclude scrolling touch events from the user gesture category Reviewed by Benjamin Poulain. * Platform/spi/ios/UIKitSPI.h: * Shared/WebEvent.h: (WebKit::WebTouchEvent::WebTouchEvent): (WebKit::WebTouchEvent::position): (WebKit::WebTouchEvent::isPotentialTap): (WebKit::WebTouchEvent::isGesture): (WebKit::WebTouchEvent::gestureScale): (WebKit::WebTouchEvent::gestureRotation): * Shared/WebEventConversion.cpp: (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent): * Shared/ios/NativeWebTouchEventIOS.mm: (WebKit::NativeWebTouchEvent::NativeWebTouchEvent): * Shared/ios/WebTouchEventIOS.cpp: (WebKit::WebTouchEvent::encode): (WebKit::WebTouchEvent::decode): Pipe isPotentialTap through. Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h trunk/Source/WebKit2/Shared/WebEvent.h trunk/Source/WebKit2/Shared/WebEventConversion.cpp trunk/Source/WebKit2/Shared/ios/NativeWebTouchEventIOS.mm trunk/Source/WebKit2/Shared/ios/WebTouchEventIOS.cpp Diff Modified: trunk/Source/WebKit2/ChangeLog (186147 => 186148) --- trunk/Source/WebKit2/ChangeLog 2015-06-30 23:33:44 UTC (rev 186147) +++ trunk/Source/WebKit2/ChangeLog 2015-07-01 00:08:12 UTC (rev 186148) @@ -1,3 +1,26 @@ +2015-06-30 Enrica Casucci + + WebKit should heuristically exclude scrolling touch events from the user gesture category + +Reviewed by Benjamin Poulain. + +* Platform/spi/ios/UIKitSPI.h: +* Shared/WebEvent.h: +(WebKit::WebTouchEvent::WebTouchEvent): +(WebKit::WebTouchEvent::position): +(WebKit::WebTouchEvent::isPotentialTap): +(WebKit::WebTouchEvent::isGesture): +(WebKit::WebTouchEvent::gestureScale): +(WebKit::WebTouchEvent::gestureRotation): +* Shared/WebEventConversion.cpp: +(WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent): +* Shared/ios/NativeWebTouchEventIOS.mm: +(WebKit::NativeWebTouchEvent::NativeWebTouchEvent): +* Shared/ios/WebTouchEventIOS.cpp: +(WebKit::WebTouchEvent::encode): +(WebKit::WebTouchEvent::decode): +Pipe isPotentialTap through. + 2015-06-30 Carlos Alberto Lopez Perez [GTK] [EFL] Unreviewed build fix after r186118. Modified: trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h (186147 => 186148) --- trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h 2015-06-30 23:33:44 UTC (rev 186147) +++ trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h 2015-07-01 00:08:12 UTC (rev 186148) @@ -586,6 +586,10 @@ struct _UIWebTouchPoint* touchPoints; unsigned touchPointCount; + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 9 +bool isPotentialTap; +#endif }; @protocol UIWebTouchEventsGestureRecognizerDelegate Modified: trunk/Source/WebKit2/Shared/WebEvent.h (186147 => 186148) --- trunk/Source/WebKit2/Shared/WebEvent.h 2015-06-30 23:33:44 UTC (rev 186147) +++ trunk/Source/WebKit2/Shared/WebEvent.h 2015-07-01 00:08:12 UTC (rev 186148) @@ -325,11 +325,12 @@ class WebTouchEvent : public WebEvent { public: WebTouchEvent() { } -WebTouchEvent(WebEvent::Type type, Modifiers modifiers, double timestamp, const Vector& touchPoints, WebCore::IntPoint position, bool isGesture, float gestureScale, float gestureRotation) +WebTouchEvent(WebEvent::Type type, Modifiers modifiers, double timestamp, const Vector& touchPoints, WebCore::IntPoint position, bool isPotentialTap, bool isGesture, float gestureScale, float gestureRotation) : WebEvent(type, modifiers, timestamp) , m_touchPoints(touchPoints) , m_position(position) , m_canPreventNativeGestures(true) +, m_isPotentialTap(isPotentialTap) , m_isGesture(isGesture) , m_gestureScale(gestureScale) , m_gestureRotation(gestureRotation) @@ -341,6 +342,8 @@ WebCore::IntPoint position() const { return m_position; } +bool isPotentialTap() const { return m_isPotentialTap; } + bool isGesture() const { return m_isGesture; } float gestureScale() const { return m_gestureScale; } float gestureRotation() const { return m_gestureRotation; } @@ -358,6 +361,7 @@ WebCore::IntPoint m_position; bool m_canPreventNativeGestures; +bool m_isPotentialTap; bool m_isGesture; float m_gestureScale; float m_gestureRotation; Modified: trunk/Source/WebKit2/Shared/WebEventConversion.cpp (186147 => 186148) --- trunk/Source/WebKit2/Shared/WebEventConversion.cpp 2015-06-30 23:33:44 UTC (rev 186147) +++ trunk/Source/WebKit2/Shared/WebEventConversion.cpp 2015-07-01 00:08:12 UTC (rev 186148) @@ -332,6 +332,7 @@ m_gestureRotation = webEvent.gestureRotation(); m_canPreventNativeGestures = webEvent.canPreventNativeGestures(); m_isGestu
[webkit-changes] [186073] trunk/Source/WebKit2
Title: [186073] trunk/Source/WebKit2 Revision 186073 Author enr...@apple.com Date 2015-06-29 10:43:46 -0700 (Mon, 29 Jun 2015) Log Message [iOS] Hardware Keyboard: All combinations of arrow keys and space key do not scroll the view. https://bugs.webkit.org/show_bug.cgi?id=146290 rdar://problem/18466015 We don't normally get called by the keyboard to handle the event if we are not interacting with editable content. In order to receive all the hardware keyboard events we need to implement _handleKeyUIEvent which is called for every key event when the view is first responder. This gives us the opportunity to send each keystroke to the WebProcess to let any _javascript_ handler intercept it and then perform the default action for the key combination. Unfortunately this mechanism does not provide key repeat, which is implemented in the keyboard layer. In order to have it at least for the arrow keys, we use the keyCommands mechanism only for those. Reviewed by Darin Adler. * Platform/spi/ios/UIKitSPI.h: * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _scrollByOffset:]): * UIProcess/API/Cocoa/WKWebViewInternal.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView canPerformAction:withSender:]): (-[WKContentView keyCommands]): (-[WKContentView _arrowKey:]): (-[WKContentView _handleKeyUIEvent:]): (-[WKContentView handleKeyEvent:]): (-[WKContentView handleKeyWebEvent:]): (-[WKContentView _interpretKeyEvent:isCharEvent:]): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (186072 => 186073) --- trunk/Source/WebKit2/ChangeLog 2015-06-29 17:33:59 UTC (rev 186072) +++ trunk/Source/WebKit2/ChangeLog 2015-06-29 17:43:46 UTC (rev 186073) @@ -1,3 +1,34 @@ +2015-06-29 Enrica Casucci + +[iOS] Hardware Keyboard: All combinations of arrow keys and space key do not scroll the view. +https://bugs.webkit.org/show_bug.cgi?id=146290 +rdar://problem/18466015 + +We don't normally get called by the keyboard to handle the event if we are not +interacting with editable content. In order to receive all the hardware keyboard events +we need to implement _handleKeyUIEvent which is called for every key event +when the view is first responder. This gives us the opportunity to send each keystroke +to the WebProcess to let any _javascript_ handler intercept it and then perform the default +action for the key combination. +Unfortunately this mechanism does not provide key repeat, which is implemented in the +keyboard layer. In order to have it at least for the arrow keys, we use the keyCommands +mechanism only for those. + +Reviewed by Darin Adler. + +* Platform/spi/ios/UIKitSPI.h: +* UIProcess/API/Cocoa/WKWebView.mm: +(-[WKWebView _scrollByOffset:]): +* UIProcess/API/Cocoa/WKWebViewInternal.h: +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView canPerformAction:withSender:]): +(-[WKContentView keyCommands]): +(-[WKContentView _arrowKey:]): +(-[WKContentView _handleKeyUIEvent:]): +(-[WKContentView handleKeyEvent:]): +(-[WKContentView handleKeyWebEvent:]): +(-[WKContentView _interpretKeyEvent:isCharEvent:]): + 2015-06-28 Dan Bernstein Fixed the iOS 8.x build after r186066. Modified: trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h (186072 => 186073) --- trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h 2015-06-29 17:33:59 UTC (rev 186072) +++ trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h 2015-06-29 17:43:46 UTC (rev 186073) @@ -48,6 +48,7 @@ #import #import #import +#import #import #import #import @@ -110,6 +111,26 @@ @end typedef enum { +kUIKeyboardInputRepeat = 1 << 0, +kUIKeyboardInputPopupVariant = 1 << 1, +kUIKeyboardInputMultitap = 1 << 2, +kUIKeyboardInputSkipCandidateSelection = 1 << 3, +kUIKeyboardInputDeadKey= 1 << 4, +kUIKeyboardInputModifierFlagsChanged = 1 << 5, +kUIKeyboardInputFlick = 1 << 6, +kUIKeyboardInputPreProcessed = 1 << 7, +} UIKeyboardInputFlags; + +@interface UIEvent (Details) +@property (nonatomic, readonly) UIKeyboardInputFlags _inputFlags; +- (void *)_hidEvent; +- (NSString *)_unmodifiedInput; +- (NSString *)_modifiedInput; +- (NSInteger)_modifierFlags; +- (BOOL)_isKeyDown; +@end + +typedef enum { UIFontTraitPlain = 0x, } UIFontTrait; @@ -129,6 +150,10 @@ - (id)initWithCGImage:(CGImageRef)CGImage imageOrientation:(UIImageOrientation)imageOrientation; @end +@interface
[webkit-changes] [185092] trunk/Source/WebKit2
Title: [185092] trunk/Source/WebKit2 Revision 185092 Author enr...@apple.com Date 2015-06-01 18:27:05 -0700 (Mon, 01 Jun 2015) Log Message [iOS] Hardware Keyboard: All combinations for arrow keys with Shift do not extend the selection. https://bugs.webkit.org/show_bug.cgi?id=145538 rdar://problem/18504199 Reviewed by Darin Adler. The extend parameter was ignored in all the functions below. * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _moveUp:withHistory:]): (-[WKContentView _moveDown:withHistory:]): (-[WKContentView _moveLeft:withHistory:]): (-[WKContentView _moveRight:withHistory:]): (-[WKContentView _moveToStartOfWord:withHistory:]): (-[WKContentView _moveToStartOfParagraph:withHistory:]): (-[WKContentView _moveToStartOfLine:withHistory:]): (-[WKContentView _moveToStartOfDocument:withHistory:]): (-[WKContentView _moveToEndOfWord:withHistory:]): (-[WKContentView _moveToEndOfParagraph:withHistory:]): (-[WKContentView _moveToEndOfLine:withHistory:]): (-[WKContentView _moveToEndOfDocument:withHistory:]): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (185091 => 185092) --- trunk/Source/WebKit2/ChangeLog 2015-06-02 01:04:32 UTC (rev 185091) +++ trunk/Source/WebKit2/ChangeLog 2015-06-02 01:27:05 UTC (rev 185092) @@ -1,3 +1,27 @@ +2015-06-01 Enrica Casucci + +[iOS] Hardware Keyboard: All combinations for arrow keys with Shift do not extend the selection. +https://bugs.webkit.org/show_bug.cgi?id=145538 +rdar://problem/18504199 + +Reviewed by Darin Adler. + +The extend parameter was ignored in all the functions below. + +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView _moveUp:withHistory:]): +(-[WKContentView _moveDown:withHistory:]): +(-[WKContentView _moveLeft:withHistory:]): +(-[WKContentView _moveRight:withHistory:]): +(-[WKContentView _moveToStartOfWord:withHistory:]): +(-[WKContentView _moveToStartOfParagraph:withHistory:]): +(-[WKContentView _moveToStartOfLine:withHistory:]): +(-[WKContentView _moveToStartOfDocument:withHistory:]): +(-[WKContentView _moveToEndOfWord:withHistory:]): +(-[WKContentView _moveToEndOfParagraph:withHistory:]): +(-[WKContentView _moveToEndOfLine:withHistory:]): +(-[WKContentView _moveToEndOfDocument:withHistory:]): + 2015-06-01 Anders Carlsson Use xpc_connection_set_oneshot_instance where possible Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (185091 => 185092) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-06-02 01:04:32 UTC (rev 185091) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-06-02 01:27:05 UTC (rev 185092) @@ -2659,73 +2659,73 @@ - (UITextInputArrowKeyHistory *)_moveUp:(BOOL)extending withHistory:(UITextInputArrowKeyHistory *)history { -[self executeEditCommandWithCallback:@"moveUp"]; +[self executeEditCommandWithCallback:extending ? @"moveUpAndModifySelection" : @"moveUp"]; return nil; } - (UITextInputArrowKeyHistory *)_moveDown:(BOOL)extending withHistory:(UITextInputArrowKeyHistory *)history { -[self executeEditCommandWithCallback:@"moveDown"]; +[self executeEditCommandWithCallback:extending ? @"moveDownAndModifySelection" : @"moveDown"]; return nil; } -- (UITextInputArrowKeyHistory *)_moveLeft:(BOOL) extending withHistory:(UITextInputArrowKeyHistory *)history +- (UITextInputArrowKeyHistory *)_moveLeft:(BOOL)extending withHistory:(UITextInputArrowKeyHistory *)history { -[self executeEditCommandWithCallback:@"moveLeft"]; +[self executeEditCommandWithCallback:extending? @"moveLeftAndModifySelection" : @"moveLeft"]; return nil; } -- (UITextInputArrowKeyHistory *)_moveRight:(BOOL) extending withHistory:(UITextInputArrowKeyHistory *)history +- (UITextInputArrowKeyHistory *)_moveRight:(BOOL)extending withHistory:(UITextInputArrowKeyHistory *)history { -[self executeEditCommandWithCallback:@"moveRight"]; +[self executeEditCommandWithCallback:extending ? @"moveRightAndModifySelection" : @"moveRight"]; return nil; } - (UITextInputArrowKeyHistory *)_moveToStartOfWord:(BOOL)extending withHistory:(UITextInputArrowKeyHistory *)history { -[self executeEditCommandWithCallback:@"moveWordBackward"]; +[self executeEditCommandWithCallback:extending ? @"moveWordBackwardAndModifySelection" : @"moveWordBackward"]; return nil; } -- (UITextInputArrowKeyHistory *)_moveToStartOfParagraph:(BOOL) extending withHistory:(UITextInputArrowKeyHistory *)history +- (UITextInputArrowKeyHistory *)_moveToStartOfParagraph:(BOOL)extending withHistory:(UITex
[webkit-changes] [185088] trunk/Source/WebKit2
Title: [185088] trunk/Source/WebKit2 Revision 185088 Author enr...@apple.com Date 2015-06-01 16:57:39 -0700 (Mon, 01 Jun 2015) Log Message [iOS] Hardware Keyboard: Command + left arrow does not work. https://bugs.webkit.org/show_bug.cgi?id=145531 rdar://problem/18576402 Reviewed by Anders Carlsson. We were calling a non existent command (moveToStartOfLine) instead of moveToBeginningOfLine. * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _moveToStartOfLine:withHistory:]): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (185087 => 185088) --- trunk/Source/WebKit2/ChangeLog 2015-06-01 23:57:22 UTC (rev 185087) +++ trunk/Source/WebKit2/ChangeLog 2015-06-01 23:57:39 UTC (rev 185088) @@ -1,3 +1,17 @@ +2015-06-01 Enrica Casucci + +[iOS] Hardware Keyboard: Command + left arrow does not work. +https://bugs.webkit.org/show_bug.cgi?id=145531 +rdar://problem/18576402 + +Reviewed by Anders Carlsson. + +We were calling a non existent command (moveToStartOfLine) instead of +moveToBeginningOfLine. + +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView _moveToStartOfLine:withHistory:]): + 2015-06-01 Brady Eidson Add WKTR support for "should open external URLs". Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (185087 => 185088) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-06-01 23:57:22 UTC (rev 185087) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-06-01 23:57:39 UTC (rev 185088) @@ -2695,7 +2695,7 @@ - (UITextInputArrowKeyHistory *)_moveToStartOfLine:(BOOL) extending withHistory:(UITextInputArrowKeyHistory *)history { -[self executeEditCommandWithCallback:@"moveToStartOfLine"]; +[self executeEditCommandWithCallback:@"moveToBeginningOfLine"]; return nil; } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [185013] trunk/Source/WebKit2
Title: [185013] trunk/Source/WebKit2 Revision 185013 Author enr...@apple.com Date 2015-05-29 16:02:56 -0700 (Fri, 29 May 2015) Log Message [iOS] Cursor hidden in text area once it scrolls. https://bugs.webkit.org/show_bug.cgi?id=145451 rdar://problem/20356413 Reviewed by Simon Fraser. This patch fixes both the touch scrolling inside the overflow area as well as the programmatic scroll that occurs when inserting a new line. The first issue is fixed by implementing the chrome client methods didLayout, didStartOverflowScroll and didEndOverflowScroll. The second required changing the implementation of notifyRevealedSelectionByScrollingFrame. We not only need to notify the client to redraw the selection, but we also need to recompute the editorState, because scrolling might have occurred. I've removed the NotifyRevealedSelection message that was not needed any longer, since EditorStateChanged will do exactly what we want. * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::editorStateChanged): (WebKit::WebPageProxy::notifyRevealedSelection): Deleted. * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm: (WebKit::WebChromeClient::notifyRevealedSelectionByScrollingFrame): (WebKit::WebChromeClient::didLayout): (WebKit::WebChromeClient::didStartOverflowScroll): (WebKit::WebChromeClient::didEndOverflowScroll): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/WebPageProxy.h trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (185012 => 185013) --- trunk/Source/WebKit2/ChangeLog 2015-05-29 23:02:36 UTC (rev 185012) +++ trunk/Source/WebKit2/ChangeLog 2015-05-29 23:02:56 UTC (rev 185013) @@ -1,3 +1,34 @@ +2015-05-29 Enrica Casucci + +[iOS] Cursor hidden in text area once it scrolls. +https://bugs.webkit.org/show_bug.cgi?id=145451 +rdar://problem/20356413 + +Reviewed by Simon Fraser. + +This patch fixes both the touch scrolling inside the +overflow area as well as the programmatic scroll that +occurs when inserting a new line. The first issue is fixed by +implementing the chrome client methods didLayout, +didStartOverflowScroll and didEndOverflowScroll. The second +required changing the implementation of notifyRevealedSelectionByScrollingFrame. +We not only need to notify the client to redraw the selection, +but we also need to recompute the editorState, because scrolling +might have occurred. +I've removed the NotifyRevealedSelection message that was not needed +any longer, since EditorStateChanged will do exactly what we want. + +* UIProcess/WebPageProxy.h: +* UIProcess/WebPageProxy.messages.in: +* UIProcess/ios/WebPageProxyIOS.mm: +(WebKit::WebPageProxy::editorStateChanged): +(WebKit::WebPageProxy::notifyRevealedSelection): Deleted. +* WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm: +(WebKit::WebChromeClient::notifyRevealedSelectionByScrollingFrame): +(WebKit::WebChromeClient::didLayout): +(WebKit::WebChromeClient::didStartOverflowScroll): +(WebKit::WebChromeClient::didEndOverflowScroll): + 2015-05-29 Chris Dumez [iOS] Update WebContent process sandbox profile for AWD logging Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (185012 => 185013) --- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2015-05-29 23:02:36 UTC (rev 185012) +++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2015-05-29 23:02:56 UTC (rev 185013) @@ -1390,8 +1390,6 @@ void enableInspectorNodeSearch(); void disableInspectorNodeSearch(); - -void notifyRevealedSelection(); #endif // PLATFORM(IOS) void clearLoadDependentCallbacks(); Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (185012 => 185013) --- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in 2015-05-29 23:02:36 UTC (rev 185012) +++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in 2015-05-29 23:02:56 UTC (rev 185013) @@ -369,8 +369,8 @@ StartAssistingNode(struct WebKit::AssistedNodeInformation information, bool userIsInteracting, bool blurPreviousNode, WebKit::UserData userData) StopAssistingNode() -NotifyRevealedSelection() - +OverflowScrollWillStartScroll() +OverflowScrollDidEndScroll() ShowInspectorHighlight(struct WebCore::Highlight highlight) HideInspectorHighlight() Modified: trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm (185012 => 185013) --- trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm 2015-05-29 23:02:36 UTC (rev 185012) +++ trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm 2015-05-29 23:02:56 UTC (rev 185013) @@ -608,11 +6
[webkit-changes] [184739] trunk/Source/WebKit2
Title: [184739] trunk/Source/WebKit2 Revision 184739 Author enr...@apple.com Date 2015-05-21 17:31:07 -0700 (Thu, 21 May 2015) Log Message [iOS] Crash when taking a snapshot of a large PDF. https://bugs.webkit.org/show_bug.cgi?id=145286 rdar://problem/20892362 Reviewed by Tim Horton. The code for the PDF case was incorrectly computing the snapshot rect. On top of that drawViewHierarchyInRect was ignoring the rect and always creating an image using the view bounds causing the crash. We are now always using the IOSurface if we are parented or an image context when we are not. * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (184738 => 184739) --- trunk/Source/WebKit2/ChangeLog 2015-05-22 00:29:48 UTC (rev 184738) +++ trunk/Source/WebKit2/ChangeLog 2015-05-22 00:31:07 UTC (rev 184739) @@ -1,3 +1,20 @@ +2015-05-21 Enrica Casucci + +[iOS] Crash when taking a snapshot of a large PDF. +https://bugs.webkit.org/show_bug.cgi?id=145286 +rdar://problem/20892362 + +Reviewed by Tim Horton. + +The code for the PDF case was incorrectly computing the snapshot rect. +On top of that drawViewHierarchyInRect was ignoring the rect and +always creating an image using the view bounds causing the crash. +We are now always using the IOSurface if we are parented or +an image context when we are not. + +* UIProcess/API/Cocoa/WKWebView.mm: +(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]): + 2015-05-21 Anders Carlsson Symlink the WebKit dylib instead of just the framework directory Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (184738 => 184739) --- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2015-05-22 00:29:48 UTC (rev 184738) +++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2015-05-22 00:31:07 UTC (rev 184739) @@ -2718,6 +2718,20 @@ CGFloat imageHeight = imageScale * snapshotRectInContentCoordinates.size.height; CGSize imageSize = CGSizeMake(imageWidth, imageHeight); +#if USE(IOSURFACE) +// If we are parented and thus won't incur a significant penalty from paging in tiles, snapshot the view hierarchy directly. +if (self.window) { +auto surface = WebCore::IOSurface::create(WebCore::expandedIntSize(WebCore::FloatSize(imageSize)), WebCore::ColorSpaceDeviceRGB); +CGFloat imageScaleInViewCoordinates = imageWidth / rectInViewCoordinates.size.width; +CATransform3D transform = CATransform3DMakeScale(imageScaleInViewCoordinates, imageScaleInViewCoordinates, 1); +transform = CATransform3DTranslate(transform, -rectInViewCoordinates.origin.x, -rectInViewCoordinates.origin.y, 0); +CARenderServerRenderLayerWithTransform(MACH_PORT_NULL, self.layer.context.contextId, reinterpret_cast(self.layer), surface->surface(), 0, 0, &transform); +completionHandler(surface->createImage().get()); + +return; +} +#endif + if (_customContentView) { UIGraphicsBeginImageContextWithOptions(imageSize, YES, 1); @@ -2725,41 +2739,18 @@ [customContentView.backgroundColor set]; UIRectFill(CGRectMake(0, 0, imageWidth, imageHeight)); -CGRect destinationRect = customContentView.bounds; -destinationRect.origin.x = -snapshotRectInContentCoordinates.origin.x * imageScale; -destinationRect.origin.y = -snapshotRectInContentCoordinates.origin.y * imageScale; -destinationRect.size.width *= imageScale; -destinationRect.size.height *= imageScale; +CGContextRef context = UIGraphicsGetCurrentContext(); +CGContextTranslateCTM(context, -snapshotRectInContentCoordinates.origin.x * imageScale, -snapshotRectInContentCoordinates.origin.y * imageScale); +CGContextScaleCTM(context, imageScale, imageScale); +[customContentView.layer renderInContext:context]; -if ([_customContentView window]) -[customContentView drawViewHierarchyInRect:destinationRect afterScreenUpdates:NO]; -else { -CGContextRef context = UIGraphicsGetCurrentContext(); -CGContextTranslateCTM(context, destinationRect.origin.x, destinationRect.origin.y); -CGContextScaleCTM(context, imageScale, imageScale); -[customContentView.layer renderInContext:context]; -} - completionHandler([UIGraphicsGetImageFromCurrentImageContext() CGImage]); UIGraphicsEndImageContext(); return; } -#if USE(IOSURFACE) -// If we are parented and thus won't incur a significant penalty from paging in tiles, snapshot the view hierarchy directly. -if (self.window) { -auto surface = WebCore::IOSurface::create(WebCore::expanded
[webkit-changes] [184681] trunk/Source
Title: [184681] trunk/Source Revision 184681 Author enr...@apple.com Date 2015-05-20 17:52:33 -0700 (Wed, 20 May 2015) Log Message [iOS] Using CSS viewport units causes incorrect layout. https://bugs.webkit.org/show_bug.cgi?id=145225 rdar://problem/20924495 Reviewed by Benjamin Poulain. Source/WebCore: * page/ViewportConfiguration.cpp: (WebCore::ViewportConfiguration::initialScaleFromSize): (WebCore::ViewportConfiguration::initialScale): (WebCore::ViewportConfiguration::initialScaleIgnoringContentSize): * page/ViewportConfiguration.h: (WebCore::ViewportConfiguration::initialScaleFromSize): (WebCore::ViewportConfiguration::initialScaleIgnoringContentSize): Source/WebKit2: * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::updateViewportSizeForCSSViewportUnits): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/page/ViewportConfiguration.cpp trunk/Source/WebCore/page/ViewportConfiguration.h trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm Diff Modified: trunk/Source/WebCore/ChangeLog (184680 => 184681) --- trunk/Source/WebCore/ChangeLog 2015-05-21 00:51:34 UTC (rev 184680) +++ trunk/Source/WebCore/ChangeLog 2015-05-21 00:52:33 UTC (rev 184681) @@ -1,3 +1,19 @@ +2015-05-20 Enrica Casucci + +[iOS] Using CSS viewport units causes incorrect layout. +https://bugs.webkit.org/show_bug.cgi?id=145225 +rdar://problem/20924495 + +Reviewed by Benjamin Poulain. + +* page/ViewportConfiguration.cpp: +(WebCore::ViewportConfiguration::initialScaleFromSize): +(WebCore::ViewportConfiguration::initialScale): +(WebCore::ViewportConfiguration::initialScaleIgnoringContentSize): +* page/ViewportConfiguration.h: +(WebCore::ViewportConfiguration::initialScaleFromSize): +(WebCore::ViewportConfiguration::initialScaleIgnoringContentSize): + 2015-05-20 Chris Fleizach AX: improve list heuristics (presentational use versus actual lists) Modified: trunk/Source/WebCore/page/ViewportConfiguration.cpp (184680 => 184681) --- trunk/Source/WebCore/page/ViewportConfiguration.cpp 2015-05-21 00:51:34 UTC (rev 184680) +++ trunk/Source/WebCore/page/ViewportConfiguration.cpp 2015-05-21 00:52:33 UTC (rev 184681) @@ -136,30 +136,38 @@ return shouldIgnoreHorizontalScalingConstraints() || shouldIgnoreVerticalScalingConstraints(); } -double ViewportConfiguration::initialScale() const +double ViewportConfiguration::initialScaleFromSize(double width, double height, bool shouldIgnoreScalingConstraints) const { ASSERT(!constraintsAreAllRelative(m_configuration)); // If the document has specified its own initial scale, use it regardless. // This is guaranteed to be sanity checked already, so no need for MIN/MAX. -if (m_configuration.initialScaleIsSet && !shouldIgnoreScalingConstraints()) +if (m_configuration.initialScaleIsSet && !shouldIgnoreScalingConstraints) return m_configuration.initialScale; // If not, it is up to us to determine the initial scale. // We want a scale small enough to fit the document width-wise. const FloatSize& minimumLayoutSize = m_minimumLayoutSize; -double width = m_contentSize.width() > 0 ? m_contentSize.width() : layoutWidth(); double initialScale = 0; if (width > 0 && !shouldIgnoreVerticalScalingConstraints()) initialScale = minimumLayoutSize.width() / width; // Prevent the initial scale from shrinking to a height smaller than our view's minimum height. -double height = m_contentSize.height() > 0 ? m_contentSize.height() : layoutHeight(); if (height > 0 && height * initialScale < minimumLayoutSize.height() && !shouldIgnoreHorizontalScalingConstraints()) initialScale = minimumLayoutSize.height() / height; -return std::min(std::max(initialScale, shouldIgnoreScalingConstraints() ? m_defaultConfiguration.minimumScale : m_configuration.minimumScale), m_configuration.maximumScale); +return std::min(std::max(initialScale, shouldIgnoreScalingConstraints ? m_defaultConfiguration.minimumScale : m_configuration.minimumScale), m_configuration.maximumScale); } +double ViewportConfiguration::initialScale() const +{ +return initialScaleFromSize(m_contentSize.width() > 0 ? m_contentSize.width() : layoutWidth(), m_contentSize.height() > 0 ? m_contentSize.height() : layoutHeight(), shouldIgnoreScalingConstraints()); +} + +double ViewportConfiguration::initialScaleIgnoringContentSize() const +{ +return initialScaleFromSize(layoutWidth(), layoutHeight(), false); +} + double ViewportConfiguration::minimumScale() const { // If we scale to fit, then this is our minimum scale as well. Modified: trunk/Source/WebCore/page/ViewportConfiguration.h (184680 => 184681) --- trunk/Source/WebCore/page/ViewportConfiguration.h 2015-05-21 00:51:34 UTC (rev 184680
[webkit-changes] [183780] trunk/Source/WebKit2
Title: [183780] trunk/Source/WebKit2 Revision 183780 Author enr...@apple.com Date 2015-05-04 16:51:21 -0700 (Mon, 04 May 2015) Log Message [iOS WK2] editorState should include information about selection clipping rectangle. https://bugs.webkit.org/show_bug.cgi?id=144603 rdar://problem/20521252 Reviewed by Chris Dumez. Adding selectionClipRect to the post-layout portion of EditorState. This way we can compute the selection clipping rectangle based on up-to-date information instead of using the rectangle provided when then element was first focused. * Shared/EditorState.cpp: (WebKit::EditorState::PostLayoutData::encode): (WebKit::EditorState::PostLayoutData::decode): * Shared/EditorState.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _selectionClipRect]): * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::platformEditorState): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Shared/EditorState.cpp trunk/Source/WebKit2/Shared/EditorState.h trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (183779 => 183780) --- trunk/Source/WebKit2/ChangeLog 2015-05-04 23:46:44 UTC (rev 183779) +++ trunk/Source/WebKit2/ChangeLog 2015-05-04 23:51:21 UTC (rev 183780) @@ -1,3 +1,25 @@ +2015-05-04 Enrica Casucci + +[iOS WK2] editorState should include information about selection clipping rectangle. +https://bugs.webkit.org/show_bug.cgi?id=144603 +rdar://problem/20521252 + +Reviewed by Chris Dumez. + +Adding selectionClipRect to the post-layout portion of EditorState. +This way we can compute the selection clipping rectangle based on +up-to-date information instead of using the rectangle provided when +then element was first focused. + +* Shared/EditorState.cpp: +(WebKit::EditorState::PostLayoutData::encode): +(WebKit::EditorState::PostLayoutData::decode): +* Shared/EditorState.h: +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView _selectionClipRect]): +* WebProcess/WebPage/ios/WebPageIOS.mm: +(WebKit::WebPage::platformEditorState): + 2015-05-04 Antti Koivisto Network Cache: Support time based cache clearing Modified: trunk/Source/WebKit2/Shared/EditorState.cpp (183779 => 183780) --- trunk/Source/WebKit2/Shared/EditorState.cpp 2015-05-04 23:46:44 UTC (rev 183779) +++ trunk/Source/WebKit2/Shared/EditorState.cpp 2015-05-04 23:51:21 UTC (rev 183780) @@ -111,6 +111,7 @@ #if PLATFORM(IOS) void EditorState::PostLayoutData::encode(IPC::ArgumentEncoder& encoder) const { +encoder << selectionClipRect; encoder << selectionRects; encoder << caretRectAtStart; encoder << caretRectAtEnd; @@ -126,6 +127,8 @@ bool EditorState::PostLayoutData::decode(IPC::ArgumentDecoder& decoder, PostLayoutData& result) { +if (!decoder.decode(result.selectionClipRect)) +return false; if (!decoder.decode(result.selectionRects)) return false; if (!decoder.decode(result.caretRectAtStart)) Modified: trunk/Source/WebKit2/Shared/EditorState.h (183779 => 183780) --- trunk/Source/WebKit2/Shared/EditorState.h 2015-05-04 23:46:44 UTC (rev 183779) +++ trunk/Source/WebKit2/Shared/EditorState.h 2015-05-04 23:51:21 UTC (rev 183780) @@ -61,6 +61,7 @@ String markedText; struct PostLayoutData { +WebCore::IntRect selectionClipRect; Vector selectionRects; WebCore::IntRect caretRectAtStart; WebCore::IntRect caretRectAtEnd; Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (183779 => 183780) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-05-04 23:46:44 UTC (rev 183779) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-05-04 23:51:21 UTC (rev 183780) @@ -818,7 +818,7 @@ { if (_assistedNodeInformation.elementType == InputType::None) return CGRectZero; -return _assistedNodeInformation.elementRect; +return _page->editorState().postLayoutData().selectionClipRect; } - (BOOL)gestureRecognizer:(UIGestureRecognizer *)preventingGestureRecognizer canPreventGestureRecognizer:(UIGestureRecognizer *)preventedGestureRecognizer Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (183779 => 183780) --- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2015-05-04 23:46:44 UTC (rev 183779) +++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2015-05-04 23:51:21 UTC (rev 183780) @@ -186,6 +186,9 @@ postLayoutData.isReplaceAllowed = result.isContentEditable && !result.isInPasswordField && !selectedText.containsOnlyWhitespace(); } if (!selection.isNone()) { +if (m_assistedNode && m_assistedNode->renderer()) +pos
[webkit-changes] [183635] trunk/Source/WebKit2
Title: [183635] trunk/Source/WebKit2 Revision 183635 Author enr...@apple.com Date 2015-04-30 11:21:01 -0700 (Thu, 30 Apr 2015) Log Message [iOS] tapping in the middle of a word in editable content should not select the word. https://bugs.webkit.org/show_bug.cgi?id=144421 rdar://problem/20710948 Reviewed by Tim Horton. Reverting to the original behavior. * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::selectWithGesture): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (183634 => 183635) --- trunk/Source/WebKit2/ChangeLog 2015-04-30 18:20:47 UTC (rev 183634) +++ trunk/Source/WebKit2/ChangeLog 2015-04-30 18:21:01 UTC (rev 183635) @@ -1,3 +1,16 @@ +2015-04-30 Enrica Casucci + +[iOS] tapping in the middle of a word in editable content should not select the word. +https://bugs.webkit.org/show_bug.cgi?id=144421 +rdar://problem/20710948 + +Reviewed by Tim Horton. + +Reverting to the original behavior. + +* WebProcess/WebPage/ios/WebPageIOS.mm: +(WebKit::WebPage::selectWithGesture): + 2015-04-29 Hunseop Jeong Fix the EFL build after r183595 Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (183634 => 183635) --- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2015-04-30 18:20:47 UTC (rev 183634) +++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2015-04-30 18:21:01 UTC (rev 183635) @@ -964,11 +964,13 @@ // Don't cross line boundaries. result = position; } else if (withinTextUnitOfGranularity(position, WordGranularity, DirectionForward)) { -// The position lies within a word, we want to select the word. -if (frame.selection().isCaret()) -range = enclosingTextUnitOfGranularity(position, WordGranularity, DirectionForward); -else if (frame.selection().isRange() && (position < frame.selection().selection().start() || position > frame.selection().selection().end())) -result = position; +// The position lies within a word. +RefPtr wordRange = enclosingTextUnitOfGranularity(position, WordGranularity, DirectionForward); +if (wordRange) { +result = wordRange->startPosition(); +if (distanceBetweenPositions(position, result) > 1) +result = wordRange->endPosition(); +} } else if (atBoundaryOfGranularity(position, WordGranularity, DirectionBackward)) { // The position is at the end of a word. result = position; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [183592] trunk/Source/WebKit2
Title: [183592] trunk/Source/WebKit2 Revision 183592 Author enr...@apple.com Date 2015-04-29 17:21:20 -0700 (Wed, 29 Apr 2015) Log Message Adding the ability to move selection by granularity on iOS. https://bugs.webkit.org/show_bug.cgi?id=144410 rdar://problem/19213337 Reviewed by Benjamin Poulain. This patch also correctly sets _usingGestureForSelection for all the functions that change the selection with a gesture. This way we make sure that the selection drawing is not delayed until the next time we paint. * UIProcess/WebPageProxy.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView moveSelectionAtBoundary:inDirection:completionHandler:]): * UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::moveSelectionAtBoundaryWithDirection): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::moveSelectionAtBoundaryWithDirection): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/WebPageProxy.h trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (183591 => 183592) --- trunk/Source/WebKit2/ChangeLog 2015-04-30 00:12:25 UTC (rev 183591) +++ trunk/Source/WebKit2/ChangeLog 2015-04-30 00:21:20 UTC (rev 183592) @@ -1,3 +1,26 @@ +2015-04-29 Enrica Casucci + +Adding the ability to move selection by granularity on iOS. +https://bugs.webkit.org/show_bug.cgi?id=144410 +rdar://problem/19213337 + +Reviewed by Benjamin Poulain. + +This patch also correctly sets _usingGestureForSelection for all +the functions that change the selection with a gesture. +This way we make sure that the selection drawing is not delayed +until the next time we paint. + +* UIProcess/WebPageProxy.h: +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView moveSelectionAtBoundary:inDirection:completionHandler:]): +* UIProcess/ios/WebPageProxyIOS.mm: +(WebKit::WebPageProxy::moveSelectionAtBoundaryWithDirection): +* WebProcess/WebPage/WebPage.h: +* WebProcess/WebPage/WebPage.messages.in: +* WebProcess/WebPage/ios/WebPageIOS.mm: +(WebKit::WebPage::moveSelectionAtBoundaryWithDirection): + 2015-04-29 Tim Horton UI process sometimes crashes under _takeViewSnapshot when the window is off-screen Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (183591 => 183592) --- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2015-04-30 00:12:25 UTC (rev 183591) +++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2015-04-30 00:21:20 UTC (rev 183592) @@ -470,6 +470,7 @@ void selectTextWithGranularityAtPoint(const WebCore::IntPoint, WebCore::TextGranularity, std::function); void selectPositionAtPoint(const WebCore::IntPoint, std::function); void selectPositionAtBoundaryWithDirection(const WebCore::IntPoint, WebCore::TextGranularity, WebCore::SelectionDirection, std::function); +void moveSelectionAtBoundaryWithDirection(WebCore::TextGranularity, WebCore::SelectionDirection, std::function); void beginSelectionInDirection(WebCore::SelectionDirection, std::function); void updateSelectionWithExtentPoint(const WebCore::IntPoint, std::function); void requestAutocorrectionData(const String& textForAutocorrection, std::function&, const String&, double, uint64_t, CallbackBase::Error)>); Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (183591 => 183592) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-04-30 00:12:25 UTC (rev 183591) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-04-30 00:21:20 UTC (rev 183592) @@ -1974,30 +1974,52 @@ - (void)selectPositionAtPoint:(CGPoint)point completionHandler:(void (^)(void))completionHandler { +_usingGestureForSelection = YES; UIWKSelectionCompletionHandler selectionHandler = [completionHandler copy]; +RetainPtr view = self; -_page->selectPositionAtPoint(WebCore::IntPoint(point), [selectionHandler](WebKit::CallbackBase::Error error) { +_page->selectPositionAtPoint(WebCore::IntPoint(point), [view, selectionHandler](WebKit::CallbackBase::Error error) { selectionHandler(); +view->_usingGestureForSelection = NO; [selectionHandler release]; }); } - (void)selectPositionAtBoundary:(UITextGranularity)granularity inDirection:(UITextDirection)direction fromPoint:(CGPoint)point completionHandler:(void (^)(void))completionHandler { +_usingGestureForSelection = YES; UIWKSelectionCompletionHandler selectionHandler = [completionHandler copy]; +Retain
[webkit-changes] [183503] trunk/Source/WebKit2
Title: [183503] trunk/Source/WebKit2 Revision 183503 Author enr...@apple.com Date 2015-04-28 13:18:36 -0700 (Tue, 28 Apr 2015) Log Message Add support for lookup on iOS. https://bugs.webkit.org/show_bug.cgi?id=144342 rdar://problem/19994090 Reviewed by Tim Horton. * UIProcess/WebPageProxy.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _lookup:]): (-[WKContentView canPerformAction:withSender:]): * UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::getLookupContextAtPoint): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::getLookupContextAtPoint): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/WebPageProxy.h trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (183502 => 183503) --- trunk/Source/WebKit2/ChangeLog 2015-04-28 20:01:13 UTC (rev 183502) +++ trunk/Source/WebKit2/ChangeLog 2015-04-28 20:18:36 UTC (rev 183503) @@ -1,3 +1,22 @@ +2015-04-28 Enrica Casucci + +Add support for lookup on iOS. +https://bugs.webkit.org/show_bug.cgi?id=144342 +rdar://problem/19994090 + +Reviewed by Tim Horton. + +* UIProcess/WebPageProxy.h: +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView _lookup:]): +(-[WKContentView canPerformAction:withSender:]): +* UIProcess/ios/WebPageProxyIOS.mm: +(WebKit::WebPageProxy::getLookupContextAtPoint): +* WebProcess/WebPage/WebPage.h: +* WebProcess/WebPage/WebPage.messages.in: +* WebProcess/WebPage/ios/WebPageIOS.mm: +(WebKit::WebPage::getLookupContextAtPoint): + 2015-04-28 Brady Eidson Consolidate most "frame load" arguments into FrameLoadRequest. Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (183502 => 183503) --- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2015-04-28 20:01:13 UTC (rev 183502) +++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2015-04-28 20:18:36 UTC (rev 183503) @@ -501,6 +501,7 @@ void viewportMetaTagWidthDidChange(float width); void didFinishDrawingPagesToPDF(const IPC::DataReference&); void contentSizeCategoryDidChange(const String& contentSizeCategory); +void getLookupContextAtPoint(const WebCore::IntPoint&, std::function); #endif void didCommitLayerTree(const WebKit::RemoteLayerTreeTransaction&); Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (183502 => 183503) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-04-28 20:01:13 UTC (rev 183502) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-04-28 20:18:36 UTC (rev 183503) @@ -182,11 +182,13 @@ - (void)showTextServiceFor:(NSString *)selectedTerm fromRect:(CGRect)presentationRect; - (void)scheduleChineseTransliterationForText:(NSString *)text; - (void)showShareSheetFor:(NSString *)selectedTerm fromRect:(CGRect)presentationRect; +- (void)lookup:(NSString *)textWithContext fromRect:(CGRect)presentationRect; @end @interface UIWKSelectionAssistant (StagingToRemove) - (void)showTextServiceFor:(NSString *)selectedTerm fromRect:(CGRect)presentationRect; - (void)showShareSheetFor:(NSString *)selectedTerm fromRect:(CGRect)presentationRect; +- (void)lookup:(NSString *)textWithContext fromRect:(CGRect)presentationRect; @end @interface UIKeyboardImpl (StagingToRemove) @@ -1295,6 +1297,24 @@ return (_page->editorState().isContentRichlyEditable) ? richTypes : plainTextTypes; } +- (void)_lookup:(CGPoint)point +{ +RetainPtr view = self; +_page->getLookupContextAtPoint(WebCore::IntPoint(point), [view](const String& string, CallbackBase::Error error) { +if (error != CallbackBase::Error::None) +return; +if (!string) +return; + +CGRect presentationRect = view->_page->editorState().selectionIsRange ? view->_page->editorState().postLayoutData().selectionRects[0].rect() : view->_page->editorState().postLayoutData().caretRectAtStart; + +if (view->_textSelectionAssistant && [view->_textSelectionAssistant respondsToSelector:@selector(lookup:fromRect:)]) +[view->_textSelectionAssistant lookup:string fromRect:presentationRect]; +else if (view->_webSelectionAssistant && [view->_webSelectionAssistant respondsToSelector:@selector(lookup:fromRect:)]) +[view->_webSelectionAssistant lookup:string fromRect:presentationRect]; +}); +} + - (void)_share:(id)sender { RetainPtr view = self; @@ -1443,6 +1463,16 @@ return YES;
[webkit-changes] [183286] trunk/Source/WebCore
Title: [183286] trunk/Source/WebCore Revision 183286 Author enr...@apple.com Date 2015-04-24 15:22:05 -0700 (Fri, 24 Apr 2015) Log Message Make rangeExpandedAroundPositionByCharacters to all platforms. https://bugs.webkit.org/show_bug.cgi?id=144161 Reviewed by Tim Horton. No change in functionality, simply making this available to all platforms. * editing/VisibleUnits.cpp: (WebCore::rangeExpandedAroundPositionByCharacters): * editing/VisibleUnits.h: * editing/mac/DataDetection.mm: * editing/mac/DictionaryLookup.h: * editing/mac/DictionaryLookup.mm: (WebCore::rangeExpandedAroundPositionByCharacters): Deleted. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/editing/VisibleUnits.cpp trunk/Source/WebCore/editing/VisibleUnits.h trunk/Source/WebCore/editing/mac/DataDetection.mm trunk/Source/WebCore/editing/mac/DictionaryLookup.h trunk/Source/WebCore/editing/mac/DictionaryLookup.mm Diff Modified: trunk/Source/WebCore/ChangeLog (183285 => 183286) --- trunk/Source/WebCore/ChangeLog 2015-04-24 22:05:30 UTC (rev 183285) +++ trunk/Source/WebCore/ChangeLog 2015-04-24 22:22:05 UTC (rev 183286) @@ -1,3 +1,21 @@ +2015-04-24 Enrica Casucci + +Make rangeExpandedAroundPositionByCharacters to all platforms. +https://bugs.webkit.org/show_bug.cgi?id=144161 + +Reviewed by Tim Horton. + +No change in functionality, simply making this available +to all platforms. + +* editing/VisibleUnits.cpp: +(WebCore::rangeExpandedAroundPositionByCharacters): +* editing/VisibleUnits.h: +* editing/mac/DataDetection.mm: +* editing/mac/DictionaryLookup.h: +* editing/mac/DictionaryLookup.mm: +(WebCore::rangeExpandedAroundPositionByCharacters): Deleted. + 2015-04-24 Andreas Kling Purge PassRefPtr from NamedNodeMap. Modified: trunk/Source/WebCore/editing/VisibleUnits.cpp (183285 => 183286) --- trunk/Source/WebCore/editing/VisibleUnits.cpp 2015-04-24 22:05:30 UTC (rev 183285) +++ trunk/Source/WebCore/editing/VisibleUnits.cpp 2015-04-24 22:22:05 UTC (rev 183286) @@ -1921,4 +1921,16 @@ return result; } +PassRefPtr rangeExpandedAroundPositionByCharacters(const VisiblePosition& position, int numberOfCharactersToExpand) +{ +Position start = position.deepEquivalent(); +Position end = position.deepEquivalent(); +for (int i = 0; i < numberOfCharactersToExpand; ++i) { +start = start.previous(Character); +end = end.next(Character); +} + +return makeRange(start, end); +} + } Modified: trunk/Source/WebCore/editing/VisibleUnits.h (183285 => 183286) --- trunk/Source/WebCore/editing/VisibleUnits.h 2015-04-24 22:05:30 UTC (rev 183285) +++ trunk/Source/WebCore/editing/VisibleUnits.h 2015-04-24 22:22:05 UTC (rev 183286) @@ -105,6 +105,8 @@ WEBCORE_EXPORT PassRefPtr wordRangeFromPosition(const VisiblePosition& position); WEBCORE_EXPORT VisiblePosition closestWordBoundaryForPosition(const VisiblePosition& position); WEBCORE_EXPORT void charactersAroundPosition(const VisiblePosition&, UChar32& oneAfter, UChar32& oneBefore, UChar32& twoBefore); +WEBCORE_EXPORT PassRefPtr rangeExpandedAroundPositionByCharacters(const VisiblePosition&, int numberOfCharactersToExpand); + } // namespace WebCore #endif // VisibleUnits_h Modified: trunk/Source/WebCore/editing/mac/DataDetection.mm (183285 => 183286) --- trunk/Source/WebCore/editing/mac/DataDetection.mm 2015-04-24 22:05:30 UTC (rev 183285) +++ trunk/Source/WebCore/editing/mac/DataDetection.mm 2015-04-24 22:22:05 UTC (rev 183286) @@ -29,7 +29,6 @@ #if PLATFORM(MAC) #import "DataDetectorsSPI.h" -#import "DictionaryLookup.h" #import "FrameView.h" #import "HitTestResult.h" #import "Node.h" @@ -37,6 +36,7 @@ #import "RenderObject.h" #import "TextIterator.h" #import "VisiblePosition.h" +#import "VisibleUnits.h" #import "htmlediting.h" namespace WebCore { Modified: trunk/Source/WebCore/editing/mac/DictionaryLookup.h (183285 => 183286) --- trunk/Source/WebCore/editing/mac/DictionaryLookup.h 2015-04-24 22:05:30 UTC (rev 183285) +++ trunk/Source/WebCore/editing/mac/DictionaryLookup.h 2015-04-24 22:22:05 UTC (rev 183286) @@ -45,7 +45,6 @@ bool isPositionInRange(const VisiblePosition&, Range*); bool shouldUseSelection(const VisiblePosition&, const VisibleSelection&); -PassRefPtr rangeExpandedAroundPositionByCharacters(const VisiblePosition&, int numberOfCharactersToExpand); WEBCORE_EXPORT PassRefPtr rangeForDictionaryLookupForSelection(const VisibleSelection&, NSDictionary **options); WEBCORE_EXPORT PassRefPtr rangeForDictionaryLookupAtHitTestResult(const HitTestResult&, NSDictionary **options); WEBCORE_EXPORT NSString *dictionaryLookupForPDFSelection(PDFSelection *, NSDictionary **options); Modified: trunk/Source/WebCore/edit
[webkit-changes] [183216] trunk/Source/WebKit2
Title: [183216] trunk/Source/WebKit2 Revision 183216 Author enr...@apple.com Date 2015-04-23 15:20:45 -0700 (Thu, 23 Apr 2015) Log Message iOS build fix after r183208. Unreviewed. * UIProcess/ios/WKContentViewInteraction.mm: Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (183215 => 183216) --- trunk/Source/WebKit2/ChangeLog 2015-04-23 22:02:45 UTC (rev 183215) +++ trunk/Source/WebKit2/ChangeLog 2015-04-23 22:20:45 UTC (rev 183216) @@ -1,3 +1,11 @@ +2015-04-23 Enrica Casucci + +iOS build fix after r183208. + +Unreviewed. + +* UIProcess/ios/WKContentViewInteraction.mm: + 2015-04-22 Alexey Proskuryakov [iOS] WebKit services should inherit environment variables for home Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (183215 => 183216) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-04-23 22:02:45 UTC (rev 183215) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-04-23 22:20:45 UTC (rev 183216) @@ -186,6 +186,7 @@ @interface UIWKSelectionAssistant (StagingToRemove) - (void)showTextServiceFor:(NSString *)selectedTerm fromRect:(CGRect)presentationRect; +- (void)showShareSheetFor:(NSString *)selectedTerm fromRect:(CGRect)presentationRect; @end @interface UIKeyboardImpl (StagingToRemove) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [183208] trunk/Source/WebKit2
Title: [183208] trunk/Source/WebKit2 Revision 183208 Author enr...@apple.com Date 2015-04-23 14:03:46 -0700 (Thu, 23 Apr 2015) Log Message Support share button. https://bugs.webkit.org/show_bug.cgi?id=144077 rdar://problem/19772892 Reviewed by Darin Adler. * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _share:]): (-[WKContentView canPerformAction:withSender:]): (-[WKContentView _define:]): (-[WKContentView accessibilityRetrieveSpeakSelectionContent]): (-[WKContentView moveByOffset:]): (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]): (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]): (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]): (-[WKContentView accessoryTab:]): (-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]): (-[WKContentView executeEditCommandWithCallback:]): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (183207 => 183208) --- trunk/Source/WebKit2/ChangeLog 2015-04-23 20:47:31 UTC (rev 183207) +++ trunk/Source/WebKit2/ChangeLog 2015-04-23 21:03:46 UTC (rev 183208) @@ -1,3 +1,24 @@ +2015-04-23 Enrica Casucci + +Support share button. +https://bugs.webkit.org/show_bug.cgi?id=144077 +rdar://problem/19772892 + +Reviewed by Darin Adler. + +* UIProcess/ios/WKContentViewInteraction.mm: +(-[WKContentView _share:]): +(-[WKContentView canPerformAction:withSender:]): +(-[WKContentView _define:]): +(-[WKContentView accessibilityRetrieveSpeakSelectionContent]): +(-[WKContentView moveByOffset:]): +(-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]): +(-[WKContentView applyAutocorrection:toString:withCompletionHandler:]): +(-[WKContentView requestAutocorrectionContextWithCompletionHandler:]): +(-[WKContentView accessoryTab:]): +(-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]): +(-[WKContentView executeEditCommandWithCallback:]): + 2015-04-23 Carlos Garcia Campos [UNIX] Do not allow copies of IPC::Attachment Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (183207 => 183208) --- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-04-23 20:47:31 UTC (rev 183207) +++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-04-23 21:03:46 UTC (rev 183208) @@ -181,6 +181,7 @@ - (void)scheduleReplacementsForText:(NSString *)text; - (void)showTextServiceFor:(NSString *)selectedTerm fromRect:(CGRect)presentationRect; - (void)scheduleChineseTransliterationForText:(NSString *)text; +- (void)showShareSheetFor:(NSString *)selectedTerm fromRect:(CGRect)presentationRect; @end @interface UIWKSelectionAssistant (StagingToRemove) @@ -1293,6 +1294,24 @@ return (_page->editorState().isContentRichlyEditable) ? richTypes : plainTextTypes; } +- (void)_share:(id)sender +{ +RetainPtr view = self; +_page->getSelectionOrContentsAsString([view](const String& string, CallbackBase::Error error) { +if (error != CallbackBase::Error::None) +return; +if (!string) +return; + +CGRect presentationRect = view->_page->editorState().postLayoutData().selectionRects[0].rect(); + +if (view->_textSelectionAssistant && [view->_textSelectionAssistant respondsToSelector:@selector(showShareSheetFor:fromRect:)]) +[view->_textSelectionAssistant showShareSheetFor:string fromRect:presentationRect]; +else if (view->_webSelectionAssistant && [view->_webSelectionAssistant respondsToSelector:@selector(showShareSheetFor:fromRect:)]) +[view->_webSelectionAssistant showShareSheetFor:string fromRect:presentationRect]; +}); +} + - (void)_addShortcut:(id)sender { if (_textSelectionAssistant && [_textSelectionAssistant respondsToSelector:@selector(showTextServiceFor:fromRect:)]) @@ -1423,6 +1442,18 @@ return YES; } +if (action == @selector(_share:)) { +if (_page->editorState().isInPasswordField || !(hasWebSelection || _page->editorState().selectionIsRange)) +return NO; + +NSUInteger textLength = _page->editorState().postLayoutData().selectedTextLength; +// See FIXME above for _define. +if (!textLength || textLength > 200) +return NO; + +return YES; +} + if (action == @selector(_addShortcut:)) { if (_page->editorState().isInPasswordField || !(hasWebSelection || _page->editorState().selectionIsRange)) return NO; @@ -1563,23 +1594,25 @@ if ([[getMCProfileConnectionClass() sharedConnection] effectiveBoolValueForSetting:MCFeatureDef
[webkit-changes] [182765] trunk/Source/WebKit2
Title: [182765] trunk/Source/WebKit2 Revision 182765 Author enr...@apple.com Date 2015-04-13 16:23:28 -0700 (Mon, 13 Apr 2015) Log Message Clients of WKWebView should be able to override drag functions. https://bugs.webkit.org/show_bug.cgi?id=143618 Reviewed by Darin Adler. WKWebView now implements the drag protocol functions and forwards the calls to the inner WKView. In the page client, when we receive a request to start drag from the WebProcess, we call _dragImageForView in WKView with the target view. The function calls dragImage on the given view, so that its clients can override the dragImage function. * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView draggingEntered:]): (-[WKWebView draggingUpdated:]): (-[WKWebView draggingExited:]): (-[WKWebView prepareForDragOperation:]): (-[WKWebView performDragOperation:]): * UIProcess/API/mac/WKView.mm: (-[WKView _dragImageForView:withImage:at:linkDrag:]): (-[WKView _setDragImage:at:linkDrag:]): Deleted. * UIProcess/API/mac/WKViewInternal.h: * UIProcess/mac/PageClientImpl.mm: (WebKit::PageClientImpl::setDragImage): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (182764 => 182765) --- trunk/Source/WebKit2/ChangeLog 2015-04-13 23:20:18 UTC (rev 182764) +++ trunk/Source/WebKit2/ChangeLog 2015-04-13 23:23:28 UTC (rev 182765) @@ -1,3 +1,30 @@ +2015-04-13 Enrica Casucci + +Clients of WKWebView should be able to override drag functions. +https://bugs.webkit.org/show_bug.cgi?id=143618 + +Reviewed by Darin Adler. + +WKWebView now implements the drag protocol functions and +forwards the calls to the inner WKView. +In the page client, when we receive a request to start drag +from the WebProcess, we call _dragImageForView in WKView with +the target view. The function calls dragImage on the given view, +so that its clients can override the dragImage function. + +* UIProcess/API/Cocoa/WKWebView.mm: +(-[WKWebView draggingEntered:]): +(-[WKWebView draggingUpdated:]): +(-[WKWebView draggingExited:]): +(-[WKWebView prepareForDragOperation:]): +(-[WKWebView performDragOperation:]): +* UIProcess/API/mac/WKView.mm: +(-[WKView _dragImageForView:withImage:at:linkDrag:]): +(-[WKView _setDragImage:at:linkDrag:]): Deleted. +* UIProcess/API/mac/WKViewInternal.h: +* UIProcess/mac/PageClientImpl.mm: +(WebKit::PageClientImpl::setDragImage): + 2015-04-13 Alex Christensen [iOS] Unreviewed build fix after r182760. Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (182764 => 182765) --- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2015-04-13 23:20:18 UTC (rev 182764) +++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2015-04-13 23:23:28 UTC (rev 182765) @@ -1682,6 +1682,31 @@ [_wkView _setIgnoresNonWheelEvents:ignoresNonWheelEvents]; } +- (NSDragOperation)draggingEntered:(id )sender +{ +return [_wkView draggingEntered:sender]; +} + +- (NSDragOperation)draggingUpdated:(id )sender +{ +return [_wkView draggingUpdated:sender]; + +} + +- (void)draggingExited:(id )sender +{ +[_wkView draggingExited:sender]; +} + +- (BOOL)prepareForDragOperation:(id )sender +{ +return [_wkView prepareForDragOperation:sender]; +} + +- (BOOL)performDragOperation:(id )sender +{ +return [_wkView performDragOperation:sender]; +} #endif @end Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (182764 => 182765) --- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2015-04-13 23:20:18 UTC (rev 182764) +++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2015-04-13 23:23:28 UTC (rev 182765) @@ -3444,25 +3444,22 @@ [self _setPluginComplexTextInputState:pluginComplexTextInputState]; } -- (void)_setDragImage:(NSImage *)image at:(NSPoint)clientPoint linkDrag:(BOOL)linkDrag +- (void)_dragImageForView:(NSView *)view withImage:(NSImage *)image at:(NSPoint)clientPoint linkDrag:(BOOL)linkDrag { -IntSize size([image size]); -size.scale(1.0 / _data->_page->deviceScaleFactor()); -[image setSize:size]; - // The call below could release this WKView. RetainPtr protector(self); #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" -[self dragImage:image +[view dragImage:image at:clientPoint offset:NSZeroSize - event:(linkDrag) ? [NSApp currentEvent] :_data->_mouseDownEvent + event:(linkDrag) ? [NSApp currentEvent] : _data->_mouseDownEvent pasteboard:[NSPasteboard pasteboardWithName:NSDragPboard] source:self
[webkit-changes] [182557] trunk/Source/WebKit2
Title: [182557] trunk/Source/WebKit2 Revision 182557 Author enr...@apple.com Date 2015-04-08 11:30:47 -0700 (Wed, 08 Apr 2015) Log Message 32-bit build fix after r182554. * UIProcess/API/mac/WKView.mm: (-[WKView resignFirstResponder]): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (182556 => 182557) --- trunk/Source/WebKit2/ChangeLog 2015-04-08 18:25:25 UTC (rev 182556) +++ trunk/Source/WebKit2/ChangeLog 2015-04-08 18:30:47 UTC (rev 182557) @@ -1,3 +1,10 @@ +2015-04-08 Enrica Casucci + +32-bit build fix after r182554. + +* UIProcess/API/mac/WKView.mm: +(-[WKView resignFirstResponder]): + 2015-04-08 Beth Dakin Force events should not require preventDefault in order to fire Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (182556 => 182557) --- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2015-04-08 18:25:25 UTC (rev 182556) +++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2015-04-08 18:30:47 UTC (rev 182557) @@ -474,6 +474,7 @@ - (BOOL)resignFirstResponder { +#if WK_API_ENABLED // Predict the case where we are losing first responder status only to // gain it back again. We want resignFirstResponder to do nothing in that case. id nextResponder = [[self window] _newFirstResponderAfterResigning]; @@ -481,6 +482,7 @@ _data->_willBecomeFirstResponderAgain = YES; return YES; } +#endif _data->_willBecomeFirstResponderAgain = NO; _data->_inResignFirstResponder = true; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [182554] trunk/Source/WebKit2
Title: [182554] trunk/Source/WebKit2 Revision 182554 Author enr...@apple.com Date 2015-04-08 11:06:58 -0700 (Wed, 08 Apr 2015) Log Message Calling makeFirstResponder on WKWebView doesn't work. https://bugs.webkit.org/show_bug.cgi?id=143482 rdar://problem/20298166 Reviewed by Dan Bernstein. Adding forwarding of the responder status to the WKView. We also need to avoid doing any cleanup in resignFirstResponder if we know we are about to regain responder status again. Same goes for becomeFirstResponder. * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView becomeFirstResponder]): (-[WKWebView acceptsFirstResponder]): * UIProcess/API/mac/WKView.mm: (-[WKView becomeFristResponder]): (-[WKView resignFirstResponder]): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (182553 => 182554) --- trunk/Source/WebKit2/ChangeLog 2015-04-08 17:53:24 UTC (rev 182553) +++ trunk/Source/WebKit2/ChangeLog 2015-04-08 18:06:58 UTC (rev 182554) @@ -1,3 +1,23 @@ +2015-04-08 Enrica Casucci + +Calling makeFirstResponder on WKWebView doesn't work. +https://bugs.webkit.org/show_bug.cgi?id=143482 +rdar://problem/20298166 + +Reviewed by Dan Bernstein. + +Adding forwarding of the responder status to the WKView. +We also need to avoid doing any cleanup in resignFirstResponder +if we know we are about to regain responder status again. +Same goes for becomeFirstResponder. + +* UIProcess/API/Cocoa/WKWebView.mm: +(-[WKWebView becomeFirstResponder]): +(-[WKWebView acceptsFirstResponder]): +* UIProcess/API/mac/WKView.mm: +(-[WKView becomeFristResponder]): +(-[WKView resignFirstResponder]): + 2015-04-07 Tim Horton Fix the build. Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (182553 => 182554) --- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2015-04-08 17:53:24 UTC (rev 182553) +++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2015-04-08 18:06:58 UTC (rev 182554) @@ -1622,6 +1622,16 @@ #if PLATFORM(MAC) +- (BOOL)becomeFirstResponder +{ +return [[self window] makeFirstResponder: _wkView.get()]; +} + +- (BOOL)acceptsFirstResponder +{ +return [_wkView acceptsFirstResponder]; +} + - (void)resizeSubviewsWithOldSize:(NSSize)oldSize { [_wkView setFrame:self.bounds]; Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (182553 => 182554) --- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2015-04-08 17:53:24 UTC (rev 182553) +++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2015-04-08 18:06:58 UTC (rev 182554) @@ -65,6 +65,7 @@ #import "WKTextInputWindowController.h" #import "WKViewInternal.h" #import "WKViewPrivate.h" +#import "WKWebView.h" #import "WebBackForwardList.h" #import "WebEventFactory.h" #import "WebHitTestResult.h" @@ -128,6 +129,7 @@ @interface NSWindow (WKNSWindowDetails) - (NSRect)_intersectBottomCornersWithRect:(NSRect)viewRect; - (void)_maskRoundedBottomCorners:(NSRect)clipRect; +- (id)_newFirstResponderAfterResigning; @end #if USE(ASYNC_NSTEXTINPUTCLIENT) @@ -219,6 +221,7 @@ bool _inBecomeFirstResponder; bool _inResignFirstResponder; +BOOL _willBecomeFirstResponderAgain; NSEvent *_mouseDownEvent; BOOL _ignoringMouseDraggedEvents; @@ -441,6 +444,13 @@ - (BOOL)becomeFirstResponder { +// If we just became first responder again, there is no need to do anything, +// since resignFirstResponder has correctly detected this situation. +if (_data->_willBecomeFirstResponderAgain) { +_data->_willBecomeFirstResponderAgain = NO; +return YES; +} + NSSelectionDirection direction = [[self window] keyViewSelectionDirection]; _data->_inBecomeFirstResponder = true; @@ -464,6 +474,15 @@ - (BOOL)resignFirstResponder { +// Predict the case where we are losing first responder status only to +// gain it back again. We want resignFirstResponder to do nothing in that case. +id nextResponder = [[self window] _newFirstResponderAfterResigning]; +if ([nextResponder isKindOfClass:[WKWebView class]] && self.superview == nextResponder) { +_data->_willBecomeFirstResponderAgain = YES; +return YES; +} + +_data->_willBecomeFirstResponderAgain = NO; _data->_inResignFirstResponder = true; #if USE(ASYNC_NSTEXTINPUTCLIENT) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes