Diff
Modified: branches/safari-605-branch/LayoutTests/ChangeLog (227325 => 227326)
--- branches/safari-605-branch/LayoutTests/ChangeLog 2018-01-22 17:58:24 UTC (rev 227325)
+++ branches/safari-605-branch/LayoutTests/ChangeLog 2018-01-22 17:58:28 UTC (rev 227326)
@@ -1,5 +1,19 @@
2018-01-22 Jason Marcell <jmarc...@apple.com>
+ Cherry-pick r227240. rdar://problem/36722464
+
+ 2018-01-19 Dean Jackson <d...@apple.com>
+
+ REGRESSION (r221092): Swipe actions are hard to perform in FastMail app
+ https://bugs.webkit.org/show_bug.cgi?id=181817
+ <rdar://problem/35274055>
+
+ Reviewed by Simon Fraser.
+
+ * fast/events/touch/ios/passive-by-default-on-document-and-window-expected.txt:
+
+2018-01-22 Jason Marcell <jmarc...@apple.com>
+
Cherry-pick r227238. rdar://problem/36722424
2018-01-19 Daniel Bates <daba...@apple.com>
Modified: branches/safari-605-branch/LayoutTests/fast/events/touch/ios/passive-by-default-on-document-and-window-expected.txt (227325 => 227326)
--- branches/safari-605-branch/LayoutTests/fast/events/touch/ios/passive-by-default-on-document-and-window-expected.txt 2018-01-22 17:58:24 UTC (rev 227325)
+++ branches/safari-605-branch/LayoutTests/fast/events/touch/ios/passive-by-default-on-document-and-window-expected.txt 2018-01-22 17:58:28 UTC (rev 227326)
@@ -1,13 +1,13 @@
-touchstart on body - cancelable: false defaultPrevented: false
-touchstart on documentElement - cancelable: false defaultPrevented: false
-touchstart on document - cancelable: false defaultPrevented: false
-touchstart on window - cancelable: false defaultPrevented: false
-touchmove on body - cancelable: false defaultPrevented: false
-touchmove on documentElement - cancelable: false defaultPrevented: false
-touchmove on document - cancelable: false defaultPrevented: false
-touchmove on window - cancelable: false defaultPrevented: false
-touchend on body - cancelable: false defaultPrevented: false
-touchend on documentElement - cancelable: false defaultPrevented: false
-touchend on document - cancelable: false defaultPrevented: false
-touchend on window - cancelable: false defaultPrevented: false
+touchstart on body - cancelable: true defaultPrevented: true
+touchstart on documentElement - cancelable: true defaultPrevented: true
+touchstart on document - cancelable: true defaultPrevented: true
+touchstart on window - cancelable: true defaultPrevented: true
+touchmove on body - cancelable: true defaultPrevented: true
+touchmove on documentElement - cancelable: true defaultPrevented: true
+touchmove on document - cancelable: true defaultPrevented: true
+touchmove on window - cancelable: true defaultPrevented: true
+touchend on body - cancelable: true defaultPrevented: true
+touchend on documentElement - cancelable: true defaultPrevented: true
+touchend on document - cancelable: true defaultPrevented: true
+touchend on window - cancelable: true defaultPrevented: true
Done
Modified: branches/safari-605-branch/Source/WebCore/ChangeLog (227325 => 227326)
--- branches/safari-605-branch/Source/WebCore/ChangeLog 2018-01-22 17:58:24 UTC (rev 227325)
+++ branches/safari-605-branch/Source/WebCore/ChangeLog 2018-01-22 17:58:28 UTC (rev 227326)
@@ -1,5 +1,24 @@
2018-01-22 Jason Marcell <jmarc...@apple.com>
+ Cherry-pick r227240. rdar://problem/36722464
+
+ 2018-01-19 Dean Jackson <d...@apple.com>
+
+ REGRESSION (r221092): Swipe actions are hard to perform in FastMail app
+ https://bugs.webkit.org/show_bug.cgi?id=181817
+ <rdar://problem/35274055>
+
+ Add a setting for controlling whether touch listeners are passive
+ by default on document/window/body.
+
+ Updated existing test.
+
+ * dom/EventTarget.cpp:
+ (WebCore::EventTarget::addEventListener):
+ * page/Settings.yaml:
+
+2018-01-22 Jason Marcell <jmarc...@apple.com>
+
Cherry-pick r227238. rdar://problem/36722424
2018-01-19 Daniel Bates <daba...@apple.com>
Modified: branches/safari-605-branch/Source/WebCore/dom/EventTarget.cpp (227325 => 227326)
--- branches/safari-605-branch/Source/WebCore/dom/EventTarget.cpp 2018-01-22 17:58:24 UTC (rev 227325)
+++ branches/safari-605-branch/Source/WebCore/dom/EventTarget.cpp 2018-01-22 17:58:28 UTC (rev 227326)
@@ -39,6 +39,7 @@
#include "JSEventListener.h"
#include "ScriptController.h"
#include "ScriptDisallowedScope.h"
+#include "Settings.h"
#include "WebKitAnimationEvent.h"
#include "WebKitTransitionEvent.h"
#include <wtf/MainThread.h>
@@ -62,12 +63,14 @@
auto passive = options.passive;
if (!passive.has_value() && eventNames().isTouchScrollBlockingEventType(eventType)) {
- if (is<DOMWindow>(*this))
- passive = true;
- else if (is<Node>(*this)) {
+ if (is<DOMWindow>(*this)) {
+ auto& window = downcast<DOMWindow>(*this);
+ if (auto* document = window.document())
+ passive = document->settings().passiveTouchListenersAsDefaultOnDocument();
+ } else if (is<Node>(*this)) {
auto& node = downcast<Node>(*this);
if (is<Document>(node) || node.document().documentElement() == &node || node.document().body() == &node)
- passive = true;
+ passive = node.document().settings().passiveTouchListenersAsDefaultOnDocument();
}
}
Modified: branches/safari-605-branch/Source/WebCore/page/Settings.yaml (227325 => 227326)
--- branches/safari-605-branch/Source/WebCore/page/Settings.yaml 2018-01-22 17:58:24 UTC (rev 227325)
+++ branches/safari-605-branch/Source/WebCore/page/Settings.yaml 2018-01-22 17:58:28 UTC (rev 227326)
@@ -698,6 +698,9 @@
initial: false
getter: needsAcrobatFrameReloadingQuirk
+passiveTouchListenersAsDefaultOnDocument:
+ initial: true
+
touchEventEmulationEnabled:
initial: false
getter: isTouchEventEmulationEnabled
Modified: branches/safari-605-branch/Source/WebKit/CMakeLists.txt (227325 => 227326)
--- branches/safari-605-branch/Source/WebKit/CMakeLists.txt 2018-01-22 17:58:24 UTC (rev 227325)
+++ branches/safari-605-branch/Source/WebKit/CMakeLists.txt 2018-01-22 17:58:28 UTC (rev 227326)
@@ -208,6 +208,7 @@
Shared/WebPageGroupData.cpp
Shared/WebPlatformTouchPoint.cpp
Shared/WebPopupItem.cpp
+ Shared/WebPreferencesDefaultValues.cpp
Shared/WebPreferencesStore.cpp
Shared/WebProcessCreationParameters.cpp
Shared/WebRenderLayer.cpp
Modified: branches/safari-605-branch/Source/WebKit/ChangeLog (227325 => 227326)
--- branches/safari-605-branch/Source/WebKit/ChangeLog 2018-01-22 17:58:24 UTC (rev 227325)
+++ branches/safari-605-branch/Source/WebKit/ChangeLog 2018-01-22 17:58:28 UTC (rev 227326)
@@ -1,5 +1,27 @@
2018-01-22 Jason Marcell <jmarc...@apple.com>
+ Cherry-pick r227240. rdar://problem/36722464
+
+ 2018-01-19 Dean Jackson <d...@apple.com>
+
+ REGRESSION (r221092): Swipe actions are hard to perform in FastMail app
+ https://bugs.webkit.org/show_bug.cgi?id=181817
+ <rdar://problem/35274055>
+
+ Reviewed by Simon Fraser.
+
+ Add a linked-on-or-after check to set passive touch listeners on document in WebCore.
+
+ * CMakeLists.txt:
+ * Shared/WebPreferences.yaml:
+ * Shared/WebPreferencesDefaultValues.cpp: Copied from Source/WebKit/UIProcess/Cocoa/VersionChecks.h.
+ (defaultPassiveTouchListenersAsDefaultOnDocument):
+ * Shared/WebPreferencesDefaultValues.h:
+ * UIProcess/Cocoa/VersionChecks.h:
+ * WebKit.xcodeproj/project.pbxproj:
+
+2018-01-22 Jason Marcell <jmarc...@apple.com>
+
Cherry-pick r227216. rdar://problem/36722508
2018-01-19 Chris Dumez <cdu...@apple.com>
Modified: branches/safari-605-branch/Source/WebKit/Shared/WebPreferences.yaml (227325 => 227326)
--- branches/safari-605-branch/Source/WebKit/Shared/WebPreferences.yaml 2018-01-22 17:58:24 UTC (rev 227325)
+++ branches/safari-605-branch/Source/WebKit/Shared/WebPreferences.yaml 2018-01-22 17:58:28 UTC (rev 227326)
@@ -968,6 +968,10 @@
defaultValue: 24
webcoreBinding: none
+PassiveTouchListenersAsDefaultOnDocument:
+ type: bool
+ defaultValue: defaultPassiveTouchListenersAsDefaultOnDocument()
+ webcoreName: passiveTouchListenersAsDefaultOnDocument
# Debug Preferences
Copied: branches/safari-605-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp (from rev 227325, branches/safari-605-branch/Source/WebKit/UIProcess/Cocoa/VersionChecks.h) (0 => 227326)
--- branches/safari-605-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp (rev 0)
+++ branches/safari-605-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp 2018-01-22 17:58:28 UTC (rev 227326)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebPreferencesDefaultValues.h"
+
+#if PLATFORM(IOS)
+#include "VersionChecks.h"
+#endif
+
+bool defaultPassiveTouchListenersAsDefaultOnDocument()
+{
+#if PLATFORM(IOS)
+ return linkedOnOrAfter(WebKit::SDKVersion::FirstThatDefaultsToPassiveTouchListenersOnDocument);
+#else
+ return true;
+#endif
+}
Modified: branches/safari-605-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.h (227325 => 227326)
--- branches/safari-605-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.h 2018-01-22 17:58:24 UTC (rev 227325)
+++ branches/safari-605-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.h 2018-01-22 17:58:28 UTC (rev 227326)
@@ -184,3 +184,5 @@
#else
#define DEFAULT_SERVICE_WORKERS_ENABLED false
#endif
+
+bool defaultPassiveTouchListenersAsDefaultOnDocument();
Modified: branches/safari-605-branch/Source/WebKit/UIProcess/Cocoa/VersionChecks.h (227325 => 227326)
--- branches/safari-605-branch/Source/WebKit/UIProcess/Cocoa/VersionChecks.h 2018-01-22 17:58:24 UTC (rev 227325)
+++ branches/safari-605-branch/Source/WebKit/UIProcess/Cocoa/VersionChecks.h 2018-01-22 17:58:28 UTC (rev 227326)
@@ -37,6 +37,7 @@
FirstToExcludeLocalStorageFromBackup = DYLD_IOS_VERSION_11_0,
FirstWithExpiredOnlyReloadBehavior = DYLD_IOS_VERSION_11_0,
FirstThatDisallowsSettingAnyXHRHeaderFromFileURLs = DYLD_IOS_VERSION_11_3,
+ FirstThatDefaultsToPassiveTouchListenersOnDocument = DYLD_IOS_VERSION_11_3,
#elif PLATFORM(MAC)
FirstWithNetworkCache = DYLD_MACOSX_VERSION_10_11,
FirstWithExceptionsForDuplicateCompletionHandlerCalls = DYLD_MACOSX_VERSION_10_13,
Modified: branches/safari-605-branch/Source/WebKit/WebKit.xcodeproj/project.pbxproj (227325 => 227326)
--- branches/safari-605-branch/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2018-01-22 17:58:24 UTC (rev 227325)
+++ branches/safari-605-branch/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2018-01-22 17:58:28 UTC (rev 227326)
@@ -728,6 +728,7 @@
2F8336871FA13A1E00C6E080 /* TouchBarMenuData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2FD43B921FA006A30083F51C /* TouchBarMenuData.cpp */; };
31099973146C75A20029DEB9 /* WebNotificationClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31099971146C759B0029DEB9 /* WebNotificationClient.cpp */; };
310999C7146C9E3D0029DEB9 /* WebNotificationClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 31099968146C71F50029DEB9 /* WebNotificationClient.h */; };
+ 3110ED6320127CB300350B20 /* WebPreferencesDefaultValues.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3110ED6220127CB300350B20 /* WebPreferencesDefaultValues.cpp */; };
312C0C4A146DDC8A0016C911 /* WKNotificationProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 312C0C49146DDC8A0016C911 /* WKNotificationProvider.h */; settings = {ATTRIBUTES = (Private, ); }; };
3131261E148FF82C00BA2A39 /* NotificationPermissionRequestManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31312619148FF82B00BA2A39 /* NotificationPermissionRequestManager.cpp */; };
3131261F148FF82C00BA2A39 /* NotificationPermissionRequestManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 3131261A148FF82B00BA2A39 /* NotificationPermissionRequestManager.h */; };
@@ -3050,6 +3051,7 @@
2FD43B921FA006A30083F51C /* TouchBarMenuData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TouchBarMenuData.cpp; sourceTree = "<group>"; };
31099968146C71F50029DEB9 /* WebNotificationClient.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebNotificationClient.h; sourceTree = "<group>"; };
31099971146C759B0029DEB9 /* WebNotificationClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebNotificationClient.cpp; sourceTree = "<group>"; };
+ 3110ED6220127CB300350B20 /* WebPreferencesDefaultValues.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebPreferencesDefaultValues.cpp; sourceTree = "<group>"; };
312C0C49146DDC8A0016C911 /* WKNotificationProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNotificationProvider.h; sourceTree = "<group>"; };
31312619148FF82B00BA2A39 /* NotificationPermissionRequestManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NotificationPermissionRequestManager.cpp; sourceTree = "<group>"; };
3131261A148FF82B00BA2A39 /* NotificationPermissionRequestManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NotificationPermissionRequestManager.h; sourceTree = "<group>"; };
@@ -5204,6 +5206,7 @@
BC5744ED12638FB3006F0F12 /* WebPopupItem.cpp */,
BC5744EE12638FB3006F0F12 /* WebPopupItem.h */,
7CDE739F1F9DA37A00390312 /* WebPreferences.yaml */,
+ 3110ED6220127CB300350B20 /* WebPreferencesDefaultValues.cpp */,
7CDE73A01F9DA37B00390312 /* WebPreferencesDefaultValues.h */,
BCD598AB112B7FDF00EC8C23 /* WebPreferencesStore.cpp */,
BCD598AA112B7FDF00EC8C23 /* WebPreferencesStore.h */,
@@ -9168,6 +9171,7 @@
1A4832D11A9BDC2F008B4DFE /* WebsiteDataRecord.h in Headers */,
1A53C2AA1A325730004E8C70 /* WebsiteDataStore.h in Headers */,
511F7D411EB1BCF500E47B83 /* WebsiteDataStoreParameters.h in Headers */,
+ 0EDE85032004E75D00030560 /* WebsitePopUpPolicy.h in Headers */,
836034A01ACB34D600626549 /* WebSQLiteDatabaseTracker.h in Headers */,
1A52C0F81A38CDC70016160A /* WebStorageNamespaceProvider.h in Headers */,
517A53051F4793C600DCDC0A /* WebSWClientConnection.h in Headers */,
@@ -10789,6 +10793,7 @@
BCC43AC7127B99DE00317F16 /* WebPopupMenuMac.mm in Sources */,
BC5750981268F3C6006F0F12 /* WebPopupMenuProxyMac.mm in Sources */,
BCD59800112B57BE00EC8C23 /* WebPreferences.cpp in Sources */,
+ 3110ED6320127CB300350B20 /* WebPreferencesDefaultValues.cpp in Sources */,
7CEB00DD1FA69ABE0065473B /* WebPreferencesExperimentalFeatures.cpp in Sources */,
7CB100F11FA3858A001729EE /* WebPreferencesKeys.cpp in Sources */,
BC84EB1812A7100C0083F2DA /* WebPreferencesMac.mm in Sources */,
Modified: branches/safari-605-branch/Source/WebKitLegacy/mac/ChangeLog (227325 => 227326)
--- branches/safari-605-branch/Source/WebKitLegacy/mac/ChangeLog 2018-01-22 17:58:24 UTC (rev 227325)
+++ branches/safari-605-branch/Source/WebKitLegacy/mac/ChangeLog 2018-01-22 17:58:28 UTC (rev 227326)
@@ -1,5 +1,23 @@
2018-01-22 Jason Marcell <jmarc...@apple.com>
+ Cherry-pick r227240. rdar://problem/36722464
+
+ 2018-01-19 Dean Jackson <d...@apple.com>
+
+ REGRESSION (r221092): Swipe actions are hard to perform in FastMail app
+ https://bugs.webkit.org/show_bug.cgi?id=181817
+ <rdar://problem/35274055>
+
+ Reviewed by Simon Fraser.
+
+ Add a linked-on-or-after check to set passive touch listeners on document in WebCore.
+
+ * Misc/WebKitVersionChecks.h:
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:]):
+
+2018-01-22 Jason Marcell <jmarc...@apple.com>
+
Cherry-pick r227079. rdar://problem/36722442
2018-01-17 Youenn Fablet <you...@apple.com>
Modified: branches/safari-605-branch/Source/WebKitLegacy/mac/Misc/WebKitVersionChecks.h (227325 => 227326)
--- branches/safari-605-branch/Source/WebKitLegacy/mac/Misc/WebKitVersionChecks.h 2018-01-22 17:58:24 UTC (rev 227325)
+++ branches/safari-605-branch/Source/WebKitLegacy/mac/Misc/WebKitVersionChecks.h 2018-01-22 17:58:28 UTC (rev 227326)
@@ -75,6 +75,7 @@
enum class SDKVersion : uint32_t {
#if PLATFORM(IOS)
FirstToExcludeLocalStorageFromBackup = DYLD_IOS_VERSION_11_0,
+ FirstThatDefaultsToPassiveTouchListenersOnDocument = DYLD_IOS_VERSION_11_3,
#else
FirstWithDropToNavigateDisallowedByDefault = DYLD_MACOSX_VERSION_10_13,
FirstWithWebIconDatabaseWarning = DYLD_MACOSX_VERSION_10_13,
Modified: branches/safari-605-branch/Source/WebKitLegacy/mac/WebView/WebView.mm (227325 => 227326)
--- branches/safari-605-branch/Source/WebKitLegacy/mac/WebView/WebView.mm 2018-01-22 17:58:24 UTC (rev 227325)
+++ branches/safari-605-branch/Source/WebKitLegacy/mac/WebView/WebView.mm 2018-01-22 17:58:28 UTC (rev 227326)
@@ -1489,6 +1489,10 @@
#endif
#if PLATFORM(IOS)
+ _private->page->settings().setPassiveTouchListenersAsDefaultOnDocument(linkedOnOrAfter(SDKVersion::FirstThatDefaultsToPassiveTouchListenersOnDocument));
+#endif
+
+#if PLATFORM(IOS)
// Preserve the behavior we had before <rdar://problem/7580867>
// by enforcing a 5MB limit for session storage.
_private->page->settings().setSessionStorageQuota(5 * 1024 * 1024);