Diff
Modified: branches/safari-608.1.24.20-branch/LayoutTests/ChangeLog (245555 => 245556)
--- branches/safari-608.1.24.20-branch/LayoutTests/ChangeLog 2019-05-21 03:21:24 UTC (rev 245555)
+++ branches/safari-608.1.24.20-branch/LayoutTests/ChangeLog 2019-05-21 03:21:30 UTC (rev 245556)
@@ -1,5 +1,64 @@
2019-05-20 Kocsen Chung <[email protected]>
+ Cherry-pick r245483. rdar://problem/49078202
+
+ Add a website policy to disable the legacy -webkit-overflow-scrolling:touch behavior
+ https://bugs.webkit.org/show_bug.cgi?id=197943
+ <rdar://problem/49078202>
+
+ Reviewed by Brent Fulgham.
+
+ Source/WebCore:
+
+ Tests: fast/scrolling/ipad/overflow-scrolling-touch-enabled-stacking-modern-compatibility-mode.html
+ platform/ipad/fast/css/webkit-overflow-scrolling-parsing-modern-compatibility-mode.html
+
+ * css/parser/CSSParserContext.cpp:
+ (WebCore::CSSParserContext::CSSParserContext):
+ * loader/DocumentLoader.h:
+ (WebCore::DocumentLoader::legacyOverflowScrollingTouchPolicy const):
+ (WebCore::DocumentLoader::setLegacyOverflowScrollingTouchPolicy):
+
+ Source/WebKit:
+
+ * Shared/WebsiteLegacyOverflowScrollingTouchPolicy.h: Added.
+ * Shared/WebsitePoliciesData.cpp:
+ (WebKit::WebsitePoliciesData::encode const):
+ (WebKit::WebsitePoliciesData::decode):
+ (WebKit::WebsitePoliciesData::applyToDocumentLoader):
+ * Shared/WebsitePoliciesData.h:
+ * UIProcess/API/APIWebsitePolicies.cpp:
+ (API::WebsitePolicies::copy const):
+ (API::WebsitePolicies::data):
+ * UIProcess/API/APIWebsitePolicies.h:
+ * WebKit.xcodeproj/project.pbxproj:
+
+ LayoutTests:
+
+ * fast/scrolling/ipad/overflow-scrolling-touch-enabled-stacking-modern-compatibility-mode-expected.html: Added.
+ * fast/scrolling/ipad/overflow-scrolling-touch-enabled-stacking-modern-compatibility-mode.html: Added.
+ * platform/ipad/fast/css/webkit-overflow-scrolling-parsing-modern-compatibility-mode-expected.txt: Added.
+ * platform/ipad/fast/css/webkit-overflow-scrolling-parsing-modern-compatibility-mode.html: Added.
+ * platform/ios/TestExpectations: Skip the new tests since they depend on code in WebKitAdditions.
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-05-17 Antoine Quint <[email protected]>
+
+ Add a website policy to disable the legacy -webkit-overflow-scrolling:touch behavior
+ https://bugs.webkit.org/show_bug.cgi?id=197943
+ <rdar://problem/49078202>
+
+ Reviewed by Brent Fulgham.
+
+ * fast/scrolling/ipad/overflow-scrolling-touch-enabled-stacking-modern-compatibility-mode-expected.html: Added.
+ * fast/scrolling/ipad/overflow-scrolling-touch-enabled-stacking-modern-compatibility-mode.html: Added.
+ * platform/ipad/fast/css/webkit-overflow-scrolling-parsing-modern-compatibility-mode-expected.txt: Added.
+ * platform/ipad/fast/css/webkit-overflow-scrolling-parsing-modern-compatibility-mode.html: Added.
+ * platform/ios/TestExpectations: Skip the new tests since they depend on code in WebKitAdditions.
+
+2019-05-20 Kocsen Chung <[email protected]>
+
Cherry-pick r245465. rdar://problem/50252398
[iOS] Respect scrolling="no" on composited frames
Added: branches/safari-608.1.24.20-branch/LayoutTests/fast/scrolling/ipad/overflow-scrolling-touch-enabled-stacking-modern-compatibility-mode-expected.html (0 => 245556)
--- branches/safari-608.1.24.20-branch/LayoutTests/fast/scrolling/ipad/overflow-scrolling-touch-enabled-stacking-modern-compatibility-mode-expected.html (rev 0)
+++ branches/safari-608.1.24.20-branch/LayoutTests/fast/scrolling/ipad/overflow-scrolling-touch-enabled-stacking-modern-compatibility-mode-expected.html 2019-05-21 03:21:30 UTC (rev 245556)
@@ -0,0 +1,52 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ shouldUseModernCompatibilityMode=true internal:AsyncOverflowScrollingEnabled=true ] -->
+<html>
+<head>
+ <style>
+ .box {
+ position: absolute;
+ height: 200px;
+ width: 200px;
+ background-color: blue;
+ }
+
+ .scroller {
+ margin: 60px;
+ overflow: scroll;
+ border: 1px solid black;
+ width: 220px;
+ height: 220px;
+ }
+
+ .scrolled-contents {
+ height: 1000px;
+ }
+
+ .outside {
+ z-index: 1;
+ top: 20px;
+ left: 20px;
+ background-color: green;
+ }
+
+ .back {
+ z-index: 0;
+ }
+
+ .front {
+ z-index: 2;
+ top: 120px;
+ left: 120px;
+ background-color: orange;
+ }
+ </style>
+</head>
+<body>
+ <div class="outside box"></div>
+ <div class="scroller">
+ <div class="scrolled-contents">
+ <div class="back box"></div>
+ <div class="front box"></div>
+ </div>
+ </div>
+</body>
+</html>
Added: branches/safari-608.1.24.20-branch/LayoutTests/fast/scrolling/ipad/overflow-scrolling-touch-enabled-stacking-modern-compatibility-mode.html (0 => 245556)
--- branches/safari-608.1.24.20-branch/LayoutTests/fast/scrolling/ipad/overflow-scrolling-touch-enabled-stacking-modern-compatibility-mode.html (rev 0)
+++ branches/safari-608.1.24.20-branch/LayoutTests/fast/scrolling/ipad/overflow-scrolling-touch-enabled-stacking-modern-compatibility-mode.html 2019-05-21 03:21:30 UTC (rev 245556)
@@ -0,0 +1,53 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ shouldUseModernCompatibilityMode=true internal:AsyncOverflowScrollingEnabled=true ] -->
+<html>
+<head>
+ <style>
+ .box {
+ position: absolute;
+ height: 200px;
+ width: 200px;
+ background-color: blue;
+ }
+
+ .scroller {
+ margin: 60px;
+ overflow: scroll;
+ border: 1px solid black;
+ width: 220px;
+ height: 220px;
+ -webkit-overflow-scrolling: touch;
+ }
+
+ .scrolled-contents {
+ height: 1000px;
+ }
+
+ .outside {
+ z-index: 1;
+ top: 20px;
+ left: 20px;
+ background-color: green;
+ }
+
+ .back {
+ z-index: 0;
+ }
+
+ .front {
+ z-index: 2;
+ top: 120px;
+ left: 120px;
+ background-color: orange;
+ }
+ </style>
+</head>
+<body>
+ <div class="outside box"></div>
+ <div class="scroller">
+ <div class="scrolled-contents">
+ <div class="back box"></div>
+ <div class="front box"></div>
+ </div>
+ </div>
+</body>
+</html>
Modified: branches/safari-608.1.24.20-branch/LayoutTests/platform/ios/TestExpectations (245555 => 245556)
--- branches/safari-608.1.24.20-branch/LayoutTests/platform/ios/TestExpectations 2019-05-21 03:21:24 UTC (rev 245555)
+++ branches/safari-608.1.24.20-branch/LayoutTests/platform/ios/TestExpectations 2019-05-21 03:21:30 UTC (rev 245556)
@@ -3264,3 +3264,12 @@
# FIXME: Unskip the following test once we have the fix for <rdar://problem/50596032>.
fast/events/ios/submit-form-target-blank-using-return-key.html
+
+# These tests depend on the implementation of "modern compatibility mode" in WebKitAdditions.
+platform/ipad/fast/css/webkit-overflow-scrolling-parsing-modern-compatibility-mode.html [ Skip ]
+fast/scrolling/ipad/overflow-scrolling-touch-enabled-stacking-modern-compatibility-mode.html [ Skip ]
+
+webkit.org/b/197778 [ Debug ] webgl/2.0.0/conformance2/attribs/gl-vertexattribipointer.html [ Slow ]
+
+# Was unskipped, but now has missing results in iOS . Skipping on iOS only.
+media/controls-after-reload.html [ Skip ]
Added: branches/safari-608.1.24.20-branch/LayoutTests/platform/ipad/fast/css/webkit-overflow-scrolling-parsing-modern-compatibility-mode-expected.txt (0 => 245556)
--- branches/safari-608.1.24.20-branch/LayoutTests/platform/ipad/fast/css/webkit-overflow-scrolling-parsing-modern-compatibility-mode-expected.txt (rev 0)
+++ branches/safari-608.1.24.20-branch/LayoutTests/platform/ipad/fast/css/webkit-overflow-scrolling-parsing-modern-compatibility-mode-expected.txt 2019-05-21 03:21:30 UTC (rev 245556)
@@ -0,0 +1,12 @@
+This tests checks parsing of the '-webkit-overflow-scrolling' property.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS test("-webkit-overflow-scrolling: auto", "-webkit-overflow-scrolling") is ""
+PASS test("-webkit-overflow-scrolling: banana", "-webkit-overflow-scrolling") is ""
+PASS test("-webkit-overflow-scrolling: touch", "-webkit-overflow-scrolling") is ""
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: branches/safari-608.1.24.20-branch/LayoutTests/platform/ipad/fast/css/webkit-overflow-scrolling-parsing-modern-compatibility-mode.html (0 => 245556)
--- branches/safari-608.1.24.20-branch/LayoutTests/platform/ipad/fast/css/webkit-overflow-scrolling-parsing-modern-compatibility-mode.html (rev 0)
+++ branches/safari-608.1.24.20-branch/LayoutTests/platform/ipad/fast/css/webkit-overflow-scrolling-parsing-modern-compatibility-mode.html 2019-05-21 03:21:30 UTC (rev 245556)
@@ -0,0 +1,31 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ shouldUseModernCompatibilityMode=true ] -->
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+description("This tests checks parsing of the '-webkit-overflow-scrolling' property.");
+
+function test(declaration, property)
+{
+ var div = document.createElement("div");
+ div.setAttribute("style", declaration);
+ document.body.appendChild(div);
+
+ var result = div.style.getPropertyValue(property);
+ document.body.removeChild(div);
+ return result;
+}
+
+shouldBe('test("-webkit-overflow-scrolling: auto", "-webkit-overflow-scrolling")', '""');
+shouldBe('test("-webkit-overflow-scrolling: banana", "-webkit-overflow-scrolling")', '""');
+shouldBe('test("-webkit-overflow-scrolling: touch", "-webkit-overflow-scrolling")', '""');
+
+var successfullyParsed = true;
+</script>
+<script src=""
+</body>
+</html>
Modified: branches/safari-608.1.24.20-branch/Source/WebCore/ChangeLog (245555 => 245556)
--- branches/safari-608.1.24.20-branch/Source/WebCore/ChangeLog 2019-05-21 03:21:24 UTC (rev 245555)
+++ branches/safari-608.1.24.20-branch/Source/WebCore/ChangeLog 2019-05-21 03:21:30 UTC (rev 245556)
@@ -1,5 +1,67 @@
2019-05-20 Kocsen Chung <[email protected]>
+ Cherry-pick r245483. rdar://problem/49078202
+
+ Add a website policy to disable the legacy -webkit-overflow-scrolling:touch behavior
+ https://bugs.webkit.org/show_bug.cgi?id=197943
+ <rdar://problem/49078202>
+
+ Reviewed by Brent Fulgham.
+
+ Source/WebCore:
+
+ Tests: fast/scrolling/ipad/overflow-scrolling-touch-enabled-stacking-modern-compatibility-mode.html
+ platform/ipad/fast/css/webkit-overflow-scrolling-parsing-modern-compatibility-mode.html
+
+ * css/parser/CSSParserContext.cpp:
+ (WebCore::CSSParserContext::CSSParserContext):
+ * loader/DocumentLoader.h:
+ (WebCore::DocumentLoader::legacyOverflowScrollingTouchPolicy const):
+ (WebCore::DocumentLoader::setLegacyOverflowScrollingTouchPolicy):
+
+ Source/WebKit:
+
+ * Shared/WebsiteLegacyOverflowScrollingTouchPolicy.h: Added.
+ * Shared/WebsitePoliciesData.cpp:
+ (WebKit::WebsitePoliciesData::encode const):
+ (WebKit::WebsitePoliciesData::decode):
+ (WebKit::WebsitePoliciesData::applyToDocumentLoader):
+ * Shared/WebsitePoliciesData.h:
+ * UIProcess/API/APIWebsitePolicies.cpp:
+ (API::WebsitePolicies::copy const):
+ (API::WebsitePolicies::data):
+ * UIProcess/API/APIWebsitePolicies.h:
+ * WebKit.xcodeproj/project.pbxproj:
+
+ LayoutTests:
+
+ * fast/scrolling/ipad/overflow-scrolling-touch-enabled-stacking-modern-compatibility-mode-expected.html: Added.
+ * fast/scrolling/ipad/overflow-scrolling-touch-enabled-stacking-modern-compatibility-mode.html: Added.
+ * platform/ipad/fast/css/webkit-overflow-scrolling-parsing-modern-compatibility-mode-expected.txt: Added.
+ * platform/ipad/fast/css/webkit-overflow-scrolling-parsing-modern-compatibility-mode.html: Added.
+ * platform/ios/TestExpectations: Skip the new tests since they depend on code in WebKitAdditions.
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-05-17 Antoine Quint <[email protected]>
+
+ Add a website policy to disable the legacy -webkit-overflow-scrolling:touch behavior
+ https://bugs.webkit.org/show_bug.cgi?id=197943
+ <rdar://problem/49078202>
+
+ Reviewed by Brent Fulgham.
+
+ Tests: fast/scrolling/ipad/overflow-scrolling-touch-enabled-stacking-modern-compatibility-mode.html
+ platform/ipad/fast/css/webkit-overflow-scrolling-parsing-modern-compatibility-mode.html
+
+ * css/parser/CSSParserContext.cpp:
+ (WebCore::CSSParserContext::CSSParserContext):
+ * loader/DocumentLoader.h:
+ (WebCore::DocumentLoader::legacyOverflowScrollingTouchPolicy const):
+ (WebCore::DocumentLoader::setLegacyOverflowScrollingTouchPolicy):
+
+2019-05-20 Kocsen Chung <[email protected]>
+
Cherry-pick r245472. rdar://problem/50895962
Fix a typo in some user agent string logic
Modified: branches/safari-608.1.24.20-branch/Source/WebCore/css/parser/CSSParserContext.cpp (245555 => 245556)
--- branches/safari-608.1.24.20-branch/Source/WebCore/css/parser/CSSParserContext.cpp 2019-05-21 03:21:24 UTC (rev 245555)
+++ branches/safari-608.1.24.20-branch/Source/WebCore/css/parser/CSSParserContext.cpp 2019-05-21 03:21:30 UTC (rev 245556)
@@ -27,6 +27,7 @@
#include "CSSParserContext.h"
#include "Document.h"
+#include "DocumentLoader.h"
#include "Page.h"
#include "RuntimeEnabledFeatures.h"
#include "Settings.h"
@@ -60,6 +61,12 @@
#endif
#if ENABLE(OVERFLOW_SCROLLING_TOUCH)
legacyOverflowScrollingTouchEnabled = document.settings().legacyOverflowScrollingTouchEnabled();
+ // The legacy -webkit-overflow-scrolling: touch behavior may have been disabled through the website policy,
+ // in that case we want to disable the legacy behavior regardless of what the setting says.
+ if (auto* loader = document.loader()) {
+ if (loader->legacyOverflowScrollingTouchPolicy() == LegacyOverflowScrollingTouchPolicy::Disable)
+ legacyOverflowScrollingTouchEnabled = false;
+ }
#endif
springTimingFunctionEnabled = document.settings().springTimingFunctionEnabled();
constantPropertiesEnabled = document.settings().constantPropertiesEnabled();
Modified: branches/safari-608.1.24.20-branch/Source/WebCore/loader/DocumentLoader.h (245555 => 245556)
--- branches/safari-608.1.24.20-branch/Source/WebCore/loader/DocumentLoader.h 2019-05-21 03:21:24 UTC (rev 245555)
+++ branches/safari-608.1.24.20-branch/Source/WebCore/loader/DocumentLoader.h 2019-05-21 03:21:30 UTC (rev 245556)
@@ -131,6 +131,12 @@
Deny,
};
+enum class LegacyOverflowScrollingTouchPolicy : uint8_t {
+ Default,
+ Disable,
+ Enable,
+};
+
class DocumentLoader
: public RefCounted<DocumentLoader>
, public FrameDestructionObserver
@@ -313,6 +319,9 @@
SimulatedMouseEventsDispatchPolicy simulatedMouseEventsDispatchPolicy() const { return m_simulatedMouseEventsDispatchPolicy; }
void setSimulatedMouseEventsDispatchPolicy(SimulatedMouseEventsDispatchPolicy policy) { m_simulatedMouseEventsDispatchPolicy = policy; }
+ LegacyOverflowScrollingTouchPolicy legacyOverflowScrollingTouchPolicy() const { return m_legacyOverflowScrollingTouchPolicy; }
+ void setLegacyOverflowScrollingTouchPolicy(LegacyOverflowScrollingTouchPolicy policy) { m_legacyOverflowScrollingTouchPolicy = policy; }
+
void addSubresourceLoader(ResourceLoader*);
void removeSubresourceLoader(LoadCompletionType, ResourceLoader*);
void addPlugInStreamLoader(ResourceLoader&);
@@ -596,6 +605,7 @@
MetaViewportPolicy m_metaViewportPolicy { MetaViewportPolicy::Default };
MediaSourcePolicy m_mediaSourcePolicy { MediaSourcePolicy::Default };
SimulatedMouseEventsDispatchPolicy m_simulatedMouseEventsDispatchPolicy { SimulatedMouseEventsDispatchPolicy::Default };
+ LegacyOverflowScrollingTouchPolicy m_legacyOverflowScrollingTouchPolicy { LegacyOverflowScrollingTouchPolicy::Default };
#if ENABLE(SERVICE_WORKER)
Optional<ServiceWorkerRegistrationData> m_serviceWorkerRegistrationData;
Modified: branches/safari-608.1.24.20-branch/Source/WebKit/ChangeLog (245555 => 245556)
--- branches/safari-608.1.24.20-branch/Source/WebKit/ChangeLog 2019-05-21 03:21:24 UTC (rev 245555)
+++ branches/safari-608.1.24.20-branch/Source/WebKit/ChangeLog 2019-05-21 03:21:30 UTC (rev 245556)
@@ -1,5 +1,70 @@
2019-05-20 Kocsen Chung <[email protected]>
+ Cherry-pick r245483. rdar://problem/49078202
+
+ Add a website policy to disable the legacy -webkit-overflow-scrolling:touch behavior
+ https://bugs.webkit.org/show_bug.cgi?id=197943
+ <rdar://problem/49078202>
+
+ Reviewed by Brent Fulgham.
+
+ Source/WebCore:
+
+ Tests: fast/scrolling/ipad/overflow-scrolling-touch-enabled-stacking-modern-compatibility-mode.html
+ platform/ipad/fast/css/webkit-overflow-scrolling-parsing-modern-compatibility-mode.html
+
+ * css/parser/CSSParserContext.cpp:
+ (WebCore::CSSParserContext::CSSParserContext):
+ * loader/DocumentLoader.h:
+ (WebCore::DocumentLoader::legacyOverflowScrollingTouchPolicy const):
+ (WebCore::DocumentLoader::setLegacyOverflowScrollingTouchPolicy):
+
+ Source/WebKit:
+
+ * Shared/WebsiteLegacyOverflowScrollingTouchPolicy.h: Added.
+ * Shared/WebsitePoliciesData.cpp:
+ (WebKit::WebsitePoliciesData::encode const):
+ (WebKit::WebsitePoliciesData::decode):
+ (WebKit::WebsitePoliciesData::applyToDocumentLoader):
+ * Shared/WebsitePoliciesData.h:
+ * UIProcess/API/APIWebsitePolicies.cpp:
+ (API::WebsitePolicies::copy const):
+ (API::WebsitePolicies::data):
+ * UIProcess/API/APIWebsitePolicies.h:
+ * WebKit.xcodeproj/project.pbxproj:
+
+ LayoutTests:
+
+ * fast/scrolling/ipad/overflow-scrolling-touch-enabled-stacking-modern-compatibility-mode-expected.html: Added.
+ * fast/scrolling/ipad/overflow-scrolling-touch-enabled-stacking-modern-compatibility-mode.html: Added.
+ * platform/ipad/fast/css/webkit-overflow-scrolling-parsing-modern-compatibility-mode-expected.txt: Added.
+ * platform/ipad/fast/css/webkit-overflow-scrolling-parsing-modern-compatibility-mode.html: Added.
+ * platform/ios/TestExpectations: Skip the new tests since they depend on code in WebKitAdditions.
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-05-17 Antoine Quint <[email protected]>
+
+ Add a website policy to disable the legacy -webkit-overflow-scrolling:touch behavior
+ https://bugs.webkit.org/show_bug.cgi?id=197943
+ <rdar://problem/49078202>
+
+ Reviewed by Brent Fulgham.
+
+ * Shared/WebsiteLegacyOverflowScrollingTouchPolicy.h: Added.
+ * Shared/WebsitePoliciesData.cpp:
+ (WebKit::WebsitePoliciesData::encode const):
+ (WebKit::WebsitePoliciesData::decode):
+ (WebKit::WebsitePoliciesData::applyToDocumentLoader):
+ * Shared/WebsitePoliciesData.h:
+ * UIProcess/API/APIWebsitePolicies.cpp:
+ (API::WebsitePolicies::copy const):
+ (API::WebsitePolicies::data):
+ * UIProcess/API/APIWebsitePolicies.h:
+ * WebKit.xcodeproj/project.pbxproj:
+
+2019-05-20 Kocsen Chung <[email protected]>
+
Cherry-pick r245480. rdar://problem/50564630
Avoid races in taking networking assertions for downloads by having both Networking and UIProcess do it.
Added: branches/safari-608.1.24.20-branch/Source/WebKit/Shared/WebsiteLegacyOverflowScrollingTouchPolicy.h (0 => 245556)
--- branches/safari-608.1.24.20-branch/Source/WebKit/Shared/WebsiteLegacyOverflowScrollingTouchPolicy.h (rev 0)
+++ branches/safari-608.1.24.20-branch/Source/WebKit/Shared/WebsiteLegacyOverflowScrollingTouchPolicy.h 2019-05-21 03:21:30 UTC (rev 245556)
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2019 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.
+ */
+
+#pragma once
+
+#include <wtf/Forward.h>
+
+namespace WebKit {
+
+enum class WebsiteLegacyOverflowScrollingTouchPolicy : uint8_t {
+ Default,
+ Disable,
+ Enable
+};
+
+}
+
+namespace WTF {
+
+template<> struct EnumTraits<WebKit::WebsiteLegacyOverflowScrollingTouchPolicy> {
+ using values = EnumValues<
+ WebKit::WebsiteLegacyOverflowScrollingTouchPolicy,
+ WebKit::WebsiteLegacyOverflowScrollingTouchPolicy::Default,
+ WebKit::WebsiteLegacyOverflowScrollingTouchPolicy::Disable,
+ WebKit::WebsiteLegacyOverflowScrollingTouchPolicy::Enable
+ >;
+};
+
+} // namespace WTF
Modified: branches/safari-608.1.24.20-branch/Source/WebKit/Shared/WebsitePoliciesData.cpp (245555 => 245556)
--- branches/safari-608.1.24.20-branch/Source/WebKit/Shared/WebsitePoliciesData.cpp 2019-05-21 03:21:24 UTC (rev 245555)
+++ branches/safari-608.1.24.20-branch/Source/WebKit/Shared/WebsitePoliciesData.cpp 2019-05-21 03:21:30 UTC (rev 245556)
@@ -51,6 +51,7 @@
encoder << metaViewportPolicy;
encoder << mediaSourcePolicy;
encoder << simulatedMouseEventsDispatchPolicy;
+ encoder << legacyOverflowScrollingTouchPolicy;
}
Optional<WebsitePoliciesData> WebsitePoliciesData::decode(IPC::Decoder& decoder)
@@ -122,6 +123,11 @@
if (!simulatedMouseEventsDispatchPolicy)
return WTF::nullopt;
+ Optional<WebsiteLegacyOverflowScrollingTouchPolicy> legacyOverflowScrollingTouchPolicy;
+ decoder >> legacyOverflowScrollingTouchPolicy;
+ if (!legacyOverflowScrollingTouchPolicy)
+ return WTF::nullopt;
+
return { {
WTFMove(*contentBlockersEnabled),
WTFMove(*allowedAutoplayQuirks),
@@ -138,6 +144,7 @@
WTFMove(*metaViewportPolicy),
WTFMove(*mediaSourcePolicy),
WTFMove(*simulatedMouseEventsDispatchPolicy),
+ WTFMove(*legacyOverflowScrollingTouchPolicy),
} };
}
@@ -236,6 +243,18 @@
break;
}
+ switch (websitePolicies.legacyOverflowScrollingTouchPolicy) {
+ case WebsiteLegacyOverflowScrollingTouchPolicy::Default:
+ documentLoader.setLegacyOverflowScrollingTouchPolicy(WebCore::LegacyOverflowScrollingTouchPolicy::Default);
+ break;
+ case WebsiteLegacyOverflowScrollingTouchPolicy::Disable:
+ documentLoader.setLegacyOverflowScrollingTouchPolicy(WebCore::LegacyOverflowScrollingTouchPolicy::Disable);
+ break;
+ case WebsiteLegacyOverflowScrollingTouchPolicy::Enable:
+ documentLoader.setLegacyOverflowScrollingTouchPolicy(WebCore::LegacyOverflowScrollingTouchPolicy::Enable);
+ break;
+ }
+
if (websitePolicies.websiteDataStoreParameters) {
if (auto* frame = documentLoader.frame()) {
if (auto* page = frame->page())
Modified: branches/safari-608.1.24.20-branch/Source/WebKit/Shared/WebsitePoliciesData.h (245555 => 245556)
--- branches/safari-608.1.24.20-branch/Source/WebKit/Shared/WebsitePoliciesData.h 2019-05-21 03:21:24 UTC (rev 245555)
+++ branches/safari-608.1.24.20-branch/Source/WebKit/Shared/WebsitePoliciesData.h 2019-05-21 03:21:30 UTC (rev 245556)
@@ -28,6 +28,7 @@
#include "WebsiteAutoplayPolicy.h"
#include "WebsiteAutoplayQuirk.h"
#include "WebsiteDataStoreParameters.h"
+#include "WebsiteLegacyOverflowScrollingTouchPolicy.h"
#include "WebsiteMediaSourcePolicy.h"
#include "WebsiteMetaViewportPolicy.h"
#include "WebsitePopUpPolicy.h"
@@ -65,6 +66,7 @@
WebsiteMetaViewportPolicy metaViewportPolicy { WebsiteMetaViewportPolicy::Default };
WebsiteMediaSourcePolicy mediaSourcePolicy { WebsiteMediaSourcePolicy::Default };
WebsiteSimulatedMouseEventsDispatchPolicy simulatedMouseEventsDispatchPolicy { WebsiteSimulatedMouseEventsDispatchPolicy::Default };
+ WebsiteLegacyOverflowScrollingTouchPolicy legacyOverflowScrollingTouchPolicy { WebsiteLegacyOverflowScrollingTouchPolicy::Default };
void encode(IPC::Encoder&) const;
static Optional<WebsitePoliciesData> decode(IPC::Decoder&);
Modified: branches/safari-608.1.24.20-branch/Source/WebKit/UIProcess/API/APIWebsitePolicies.cpp (245555 => 245556)
--- branches/safari-608.1.24.20-branch/Source/WebKit/UIProcess/API/APIWebsitePolicies.cpp 2019-05-21 03:21:24 UTC (rev 245555)
+++ branches/safari-608.1.24.20-branch/Source/WebKit/UIProcess/API/APIWebsitePolicies.cpp 2019-05-21 03:21:30 UTC (rev 245556)
@@ -60,6 +60,8 @@
policies->setMetaViewportPolicy(m_metaViewportPolicy);
policies->setMediaSourcePolicy(m_mediaSourcePolicy);
policies->setSimulatedMouseEventsDispatchPolicy(m_simulatedMouseEventsDispatchPolicy);
+ policies->setLegacyOverflowScrollingTouchPolicy(m_legacyOverflowScrollingTouchPolicy);
+
Vector<WebCore::HTTPHeaderField> customHeaderFields;
customHeaderFields.reserveInitialCapacity(m_customHeaderFields.size());
for (auto& field : m_customHeaderFields)
@@ -97,6 +99,7 @@
m_metaViewportPolicy,
m_mediaSourcePolicy,
m_simulatedMouseEventsDispatchPolicy,
+ m_legacyOverflowScrollingTouchPolicy,
};
}
Modified: branches/safari-608.1.24.20-branch/Source/WebKit/UIProcess/API/APIWebsitePolicies.h (245555 => 245556)
--- branches/safari-608.1.24.20-branch/Source/WebKit/UIProcess/API/APIWebsitePolicies.h 2019-05-21 03:21:24 UTC (rev 245555)
+++ branches/safari-608.1.24.20-branch/Source/WebKit/UIProcess/API/APIWebsitePolicies.h 2019-05-21 03:21:30 UTC (rev 245556)
@@ -29,6 +29,7 @@
#include "WebCompatibilityMode.h"
#include "WebsiteAutoplayPolicy.h"
#include "WebsiteAutoplayQuirk.h"
+#include "WebsiteLegacyOverflowScrollingTouchPolicy.h"
#include "WebsiteMediaSourcePolicy.h"
#include "WebsiteMetaViewportPolicy.h"
#include "WebsitePopUpPolicy.h"
@@ -101,6 +102,9 @@
WebKit::WebsiteSimulatedMouseEventsDispatchPolicy simulatedMouseEventsDispatchPolicy() const { return m_simulatedMouseEventsDispatchPolicy; }
void setSimulatedMouseEventsDispatchPolicy(WebKit::WebsiteSimulatedMouseEventsDispatchPolicy policy) { m_simulatedMouseEventsDispatchPolicy = policy; }
+ WebKit::WebsiteLegacyOverflowScrollingTouchPolicy legacyOverflowScrollingTouchPolicy() const { return m_legacyOverflowScrollingTouchPolicy; }
+ void setLegacyOverflowScrollingTouchPolicy(WebKit::WebsiteLegacyOverflowScrollingTouchPolicy policy) { m_legacyOverflowScrollingTouchPolicy = policy; }
+
bool allowSiteSpecificQuirksToOverrideCompatibilityMode() const { return m_allowSiteSpecificQuirksToOverrideCompatibilityMode; }
void setAllowSiteSpecificQuirksToOverrideCompatibilityMode(bool value) { m_allowSiteSpecificQuirksToOverrideCompatibilityMode = value; }
@@ -126,6 +130,7 @@
WebKit::WebsiteMetaViewportPolicy m_metaViewportPolicy { WebKit::WebsiteMetaViewportPolicy::Default };
WebKit::WebsiteMediaSourcePolicy m_mediaSourcePolicy { WebKit::WebsiteMediaSourcePolicy::Default };
WebKit::WebsiteSimulatedMouseEventsDispatchPolicy m_simulatedMouseEventsDispatchPolicy { WebKit::WebsiteSimulatedMouseEventsDispatchPolicy::Default };
+ WebKit::WebsiteLegacyOverflowScrollingTouchPolicy m_legacyOverflowScrollingTouchPolicy { WebKit::WebsiteLegacyOverflowScrollingTouchPolicy::Default };
bool m_allowSiteSpecificQuirksToOverrideCompatibilityMode { false };
WTF::String m_applicationNameForUserAgentWithModernCompatibility;
};
Modified: branches/safari-608.1.24.20-branch/Source/WebKit/WebKit.xcodeproj/project.pbxproj (245555 => 245556)
--- branches/safari-608.1.24.20-branch/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2019-05-21 03:21:24 UTC (rev 245555)
+++ branches/safari-608.1.24.20-branch/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2019-05-21 03:21:30 UTC (rev 245556)
@@ -1115,6 +1115,7 @@
6BE969CB1E54D4CF008B7483 /* ResourceLoadStatisticsClassifierCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BE969C91E54D4CF008B7483 /* ResourceLoadStatisticsClassifierCocoa.h */; };
6BE969CD1E54E054008B7483 /* ResourceLoadStatisticsClassifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BE969CC1E54E054008B7483 /* ResourceLoadStatisticsClassifier.h */; };
6EE849C81368D9390038D481 /* WKInspectorPrivateMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE849C61368D92D0038D481 /* WKInspectorPrivateMac.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 711725A9228D564300018514 /* WebsiteLegacyOverflowScrollingTouchPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 711725A8228D563A00018514 /* WebsiteLegacyOverflowScrollingTouchPolicy.h */; };
71FB810B2260627E00323677 /* WebsiteSimulatedMouseEventsDispatchPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 71FB810A2260627A00323677 /* WebsiteSimulatedMouseEventsDispatchPolicy.h */; };
728E86F11795188C0087879E /* WebColorPickerMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 728E86EF1795188C0087879E /* WebColorPickerMac.h */; };
75A8D2C8187CCFAB00C39C9E /* WKWebsiteDataStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 75A8D2C4187CCF9F00C39C9E /* WKWebsiteDataStore.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -3600,6 +3601,7 @@
6BE969CC1E54E054008B7483 /* ResourceLoadStatisticsClassifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceLoadStatisticsClassifier.h; sourceTree = "<group>"; };
6D8A91A511F0EFD100DD01FE /* com.apple.WebProcess.sb.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = com.apple.WebProcess.sb.in; path = WebProcess/com.apple.WebProcess.sb.in; sourceTree = "<group>"; };
6EE849C61368D92D0038D481 /* WKInspectorPrivateMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WKInspectorPrivateMac.h; path = mac/WKInspectorPrivateMac.h; sourceTree = "<group>"; };
+ 711725A8228D563A00018514 /* WebsiteLegacyOverflowScrollingTouchPolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebsiteLegacyOverflowScrollingTouchPolicy.h; sourceTree = "<group>"; };
71FB810A2260627A00323677 /* WebsiteSimulatedMouseEventsDispatchPolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebsiteSimulatedMouseEventsDispatchPolicy.h; sourceTree = "<group>"; };
728E86EF1795188C0087879E /* WebColorPickerMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebColorPickerMac.h; sourceTree = "<group>"; };
728E86F01795188C0087879E /* WebColorPickerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebColorPickerMac.mm; sourceTree = "<group>"; };
@@ -5272,6 +5274,7 @@
5C8DD3811FE455CA00F2A556 /* WebsiteAutoplayQuirk.h */,
511F7D3F1EB1BCEE00E47B83 /* WebsiteDataStoreParameters.cpp */,
511F7D401EB1BCEE00E47B83 /* WebsiteDataStoreParameters.h */,
+ 711725A8228D563A00018514 /* WebsiteLegacyOverflowScrollingTouchPolicy.h */,
F4CB09E4225D5A0300891487 /* WebsiteMediaSourcePolicy.h */,
F430E941224732A9005FE053 /* WebsiteMetaViewportPolicy.h */,
5C3AEA8E1FE1F1DF002318D3 /* WebsitePoliciesData.cpp */,
@@ -9761,6 +9764,7 @@
1A4832D11A9BDC2F008B4DFE /* WebsiteDataRecord.h in Headers */,
1A53C2AA1A325730004E8C70 /* WebsiteDataStore.h in Headers */,
511F7D411EB1BCF500E47B83 /* WebsiteDataStoreParameters.h in Headers */,
+ 711725A9228D564300018514 /* WebsiteLegacyOverflowScrollingTouchPolicy.h in Headers */,
F4CB09E5225D5A0900891487 /* WebsiteMediaSourcePolicy.h in Headers */,
F430E9422247335F005FE053 /* WebsiteMetaViewportPolicy.h in Headers */,
0EDE85032004E75D00030560 /* WebsitePopUpPolicy.h in Headers */,