2016-11-27 04:21:49 +00:00
|
|
|
/*
|
2021-03-07 17:41:50 +00:00
|
|
|
* Copyright (C) 2016-2021 Apple Inc. All rights reserved.
|
2016-11-27 04:21:49 +00:00
|
|
|
*
|
|
|
|
* 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 "TestOptions.h"
|
|
|
|
|
2020-10-20 00:52:14 +00:00
|
|
|
#include "TestOptionsGeneratedKeys.h"
|
2016-11-27 04:21:49 +00:00
|
|
|
|
2020-10-12 21:54:50 +00:00
|
|
|
namespace WTR {
|
|
|
|
|
2020-10-28 15:57:35 +00:00
|
|
|
const std::vector<std::string>& TestOptions::supportedBoolWebPreferenceFeatures()
|
|
|
|
{
|
|
|
|
// FIXME: Remove this once there is a viable mechanism for reseting WebPreferences between tests,
|
|
|
|
// at which point, we will not need to manually reset every supported preference for each test.
|
|
|
|
|
|
|
|
static std::vector<std::string> supported = [] {
|
|
|
|
std::vector<std::string> keys;
|
|
|
|
for (const auto& [key, value] : defaults().boolWebPreferenceFeatures)
|
|
|
|
keys.push_back(key);
|
|
|
|
return keys;
|
|
|
|
}();
|
|
|
|
return supported;
|
|
|
|
}
|
|
|
|
|
2020-11-01 20:09:38 +00:00
|
|
|
const std::vector<std::string>& TestOptions::supportedUInt32WebPreferenceFeatures()
|
|
|
|
{
|
|
|
|
// FIXME: Remove this once there is a viable mechanism for reseting WebPreferences between tests,
|
|
|
|
// at which point, we will not need to manually reset every supported preference for each test.
|
|
|
|
|
|
|
|
static std::vector<std::string> supported = [] {
|
|
|
|
std::vector<std::string> keys;
|
|
|
|
for (const auto& [key, value] : defaults().uint32WebPreferenceFeatures)
|
|
|
|
keys.push_back(key);
|
|
|
|
return keys;
|
|
|
|
}();
|
|
|
|
return supported;
|
|
|
|
}
|
|
|
|
|
2020-10-21 15:04:20 +00:00
|
|
|
const TestFeatures& TestOptions::defaults()
|
|
|
|
{
|
|
|
|
static TestFeatures features;
|
|
|
|
if (features.boolWebPreferenceFeatures.empty()) {
|
|
|
|
features.boolWebPreferenceFeatures = {
|
2021-03-07 17:41:50 +00:00
|
|
|
#if PLATFORM(COCOA)
|
|
|
|
// These are non-experimental WebPreference values that must always be set as they
|
|
|
|
// differ from the default set in the WebPreferences*.yaml configuration.
|
|
|
|
{ "AllowsInlineMediaPlayback", true },
|
|
|
|
{ "CanvasUsesAcceleratedDrawing", true },
|
|
|
|
{ "ColorFilterEnabled", true },
|
|
|
|
{ "CustomPasteboardDataEnabled", true },
|
|
|
|
{ "DOMPasteAllowed", true },
|
|
|
|
{ "DeveloperExtrasEnabled", true },
|
|
|
|
{ "DirectoryUploadEnabled", true },
|
|
|
|
{ "DownloadAttributeEnabled", true },
|
|
|
|
{ "EncryptedMediaAPIEnabled", true },
|
|
|
|
{ "FullScreenEnabled", true },
|
|
|
|
{ "GamepadsEnabled", true },
|
|
|
|
{ "HiddenPageCSSAnimationSuspensionEnabled", false },
|
|
|
|
{ "InlineMediaPlaybackRequiresPlaysInlineAttribute", false },
|
|
|
|
{ "JavaEnabled", false },
|
|
|
|
{ "JavaScriptCanAccessClipboard", true },
|
|
|
|
{ "JavaScriptCanOpenWindowsAutomatically", true },
|
|
|
|
{ "LargeImageAsyncDecodingEnabled", false },
|
|
|
|
{ "LinkPreloadEnabled", true },
|
|
|
|
{ "MediaCapabilitiesEnabled", true },
|
|
|
|
{ "MediaDataLoadsAutomatically", true },
|
|
|
|
{ "MediaDevicesEnabled", true },
|
|
|
|
{ "MediaPreloadingEnabled", true },
|
|
|
|
{ "MockScrollbarsEnabled", true },
|
2021-04-28 17:19:32 +00:00
|
|
|
{ "NPAPIPlugInsEnabledForTestingInWebKitLegacy", true },
|
2021-03-07 17:41:50 +00:00
|
|
|
{ "NeedsStorageAccessFromFileURLsQuirk", false },
|
|
|
|
{ "OfflineWebApplicationCacheEnabled", true },
|
|
|
|
{ "RequiresUserGestureForAudioPlayback", false },
|
|
|
|
{ "RequiresUserGestureForMediaPlayback", false },
|
|
|
|
{ "RequiresUserGestureForVideoPlayback", false },
|
|
|
|
{ "ShouldPrintBackgrounds", true },
|
|
|
|
{ "ShrinksStandaloneImagesToFit", true },
|
|
|
|
{ "SubpixelAntialiasedLayerTextEnabled", false },
|
|
|
|
{ "TextAreasAreResizable", true },
|
|
|
|
{ "TextAutosizingEnabled", false },
|
|
|
|
{ "UsesBackForwardCache", false },
|
|
|
|
{ "WebAudioEnabled", true },
|
|
|
|
{ "WebSQLEnabled", true },
|
|
|
|
{ "XSSAuditorEnabled", false },
|
|
|
|
|
|
|
|
// FIXME: These experimental features are currently the only ones not enabled for WebKitLegacy, we
|
|
|
|
// should either enable them or stop exposing them (as we do with with preferences like HTTP3Enabled).
|
|
|
|
// All other experimental features are automatically enabled regardless of their specified defaults.
|
|
|
|
{ "AsyncClipboardAPIEnabled", false },
|
|
|
|
{ "CSSOMViewSmoothScrollingEnabled", false },
|
|
|
|
{ "ContactPickerAPIEnabled", false },
|
|
|
|
{ "CoreMathMLEnabled", false },
|
|
|
|
{ "GenericCueAPIEnabled", false },
|
|
|
|
{ "IntersectionObserverEnabled", false },
|
|
|
|
{ "IsLoggedInAPIEnabled", false },
|
|
|
|
{ "LazyIframeLoadingEnabled", false },
|
|
|
|
{ "LazyImageLoadingEnabled", false },
|
|
|
|
{ "RequestIdleCallbackEnabled", false },
|
|
|
|
{ "ResizeObserverEnabled", false },
|
|
|
|
{ "WebAuthenticationEnabled", false },
|
|
|
|
{ "WebGPUEnabled", false },
|
|
|
|
#elif PLATFORM(WIN)
|
2020-10-21 15:04:20 +00:00
|
|
|
// These are WebPreference values that must always be set as they may
|
|
|
|
// differ from the default set in the WebPreferences*.yaml configuration.
|
2020-10-30 01:17:30 +00:00
|
|
|
{ "AcceleratedDrawingEnabled", false },
|
2020-10-21 15:04:20 +00:00
|
|
|
{ "AllowCrossOriginSubresourcesToAskForCredentials", false },
|
2020-11-01 20:09:38 +00:00
|
|
|
{ "AllowFileAccessFromFileURLs", true },
|
2020-10-21 15:04:20 +00:00
|
|
|
{ "AllowTopNavigationToDataURLs", true },
|
2020-11-01 20:09:38 +00:00
|
|
|
{ "AllowUniversalAccessFromFileURLs", true },
|
2021-02-23 17:50:31 +00:00
|
|
|
{ "AspectRatioEnabled", true },
|
2020-11-01 20:09:38 +00:00
|
|
|
{ "AsyncClipboardAPIEnabled", false },
|
2020-10-21 15:04:20 +00:00
|
|
|
{ "AttachmentElementEnabled", false },
|
2021-03-22 20:51:10 +00:00
|
|
|
{ "CSSContainmentEnabled", false },
|
[css-counter-styles] Parse and add feature flag for @counter-style
https://bugs.webkit.org/show_bug.cgi?id=223150
Patch by Tyler Wilcock <twilco.o@protonmail.com> on 2021-04-16
Reviewed by Darin Adler.
LayoutTests/imported/w3c:
@counter-style and its descriptors are now exposed behind a feature
flag, so pass some tests and fail others for a different reason
because this patch doesn't actually implement descriptor parsing and
setting yet.
* web-platform-tests/css/css-counter-styles/counter-style-additive-symbols-syntax-expected.txt:
* web-platform-tests/css/css-counter-styles/counter-style-fallback-expected.txt:
* web-platform-tests/css/css-counter-styles/counter-style-name-syntax-expected.txt:
* web-platform-tests/css/css-counter-styles/counter-style-negative-syntax-expected.txt:
* web-platform-tests/css/css-counter-styles/counter-style-pad-syntax-expected.txt:
* web-platform-tests/css/css-counter-styles/counter-style-prefix-suffix-syntax-expected.txt:
* web-platform-tests/css/css-counter-styles/counter-style-range-syntax-expected.txt:
* web-platform-tests/css/css-counter-styles/counter-style-speak-as-syntax-expected.txt:
* web-platform-tests/css/css-counter-styles/counter-style-symbols-syntax-expected.txt:
* web-platform-tests/css/css-counter-styles/counter-style-system-syntax-expected.txt:
* web-platform-tests/css/css-counter-styles/idlharness-expected.txt:
* web-platform-tests/css/cssom/CSSCounterStyleRule-expected.txt:
Source/WebCore:
Parse @counter-style (without implementing descriptor parsing) behind
a new feature flag, CSSCounterStyleAtRulesEnabled. A separate feature
flag for @counter-style <image> symbol values has also been added, as
image symbols have extra complexities that we won't want to hold the
entire feature back on.
https://www.w3.org/TR/css-counter-styles-3
The CSSCounterStyleRule IDL interface is also added and implemented,
and similarly feature flagged.
https://www.w3.org/TR/css-counter-styles-3/#apis
Test: webexposed/counter-style-is-not-exposed.html and existing WPTs.
* CMakeLists.txt:
Add CSSCounterStyleRule.idl.
* DerivedSources-input.xcfilelist:
Add CSSCounterStyleRule.idl.
* DerivedSources-output.xcfilelist:
Add JSCSSCounterStyleRule.h and JSCSSCounterStyleRule.cpp.
* DerivedSources.make:
Add CSSCounterStyleRule.idl.
* Sources.txt:
Add CSSCounterStyleRule.cpp and JSCSSCounterStyleRule.cpp.
* WebCore.xcodeproj/project.pbxproj:
Add CounterStyle.h, CounterStyle.cpp, and CounterStyle.idl.
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJSNewlyCreated):
Support CSSCounterStyleRule.
* bindings/js/WebCoreBuiltinNames.h:
Add macro(CSSCounterStyleRule) to generate counter-style built-in
names.
* css/CSSCounterStyleRule.cpp: Added.
(WebCore::StyleRuleCounterStyle::StyleRuleCounterStyle):
(WebCore::StyleRuleCounterStyle::create):
(WebCore::StyleRuleCounterStyle::mutableProperties):
(WebCore::CSSCounterStyleRule::CSSCounterStyleRule):
(WebCore::CSSCounterStyleRule::reattach):
(WebCore::CSSCounterStyleRule::cssText const):
* css/CSSCounterStyleRule.h: Added.
(isType): Add specialized rule.isCounterStyleRule() implementation.
* css/CSSCounterStyleRule.idl: Added.
* css/CSSRule.cpp: Add new StyleRuleType::CounterStyle COMPILE_ASSERT.
* css/CSSRule.h:
Add COUNTER_STYLE_RULE constant. Also add comment `// WebIDL enum` to
disable enum_casing lint, since these values are named to match IDL
attributes.
* css/CSSRule.idl: Add COUNTER_STYLE_RULE constant behind flag.
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::destroy):
(WebCore::StyleRuleBase::copy const):
(WebCore::StyleRuleBase::createCSSOMWrapper const):
Handle newly added StyleRuleType::CounterStyle.
* css/StyleRule.h:
(WebCore::StyleRuleBase::isCounterStyleRule const): Added.
* css/StyleRuleType.h: Add StyleRuleType::CounterStyle
* css/StyleSheetContents.cpp:
(WebCore::traverseRulesInVector):
(WebCore::StyleSheetContents::traverseSubresources const):
If @counter-style image symbols flag is enabled, do traverse
subresources.
* css/parser/CSSAtRuleID.cpp:
If the @counter-style feature flag is enabled, return newly added
CSSAtRuleCounterStyle ID.
(WebCore::cssAtRuleID):
* css/parser/CSSAtRuleID.h:
Add CSSAtRuleCounterStyle ID.
* css/parser/CSSParserContext.cpp:
(WebCore::operator==):
* css/parser/CSSParserContext.h:
(WebCore::CSSParserContextHash::hash):
Add cssCounterStyleAtRulesEnabled and
cssCounterStyleAtRuleImageSymbolsEnabled flags.
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
Refactor to use new CSSPropertyParserHelpers::isPredefinedCounterStyle
method.
* css/parser/CSSParserImpl.cpp:
(WebCore::computeNewAllowedRules):
(WebCore::CSSParserImpl::consumeAtRule):
(WebCore::CSSParserImpl::consumeCounterStyleRule): Added.
(WebCore::CSSParserImpl::consumeDeclarationList):
(WebCore::CSSParserImpl::consumeDeclaration):
* css/parser/CSSParserImpl.h:
Handle new @counter-style rule.
* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::parseValue): Handle
StyleRuleType::CounterStyle.
(WebCore::consumeCounterContent):
Refactor to use new CSSPropertyParserHelpers::isPredefinedCounterStyle
method.
(WebCore::CSSPropertyParser::parseCounterStyleDescriptor):
Add placeholder for future @counter-style descriptor parsing work.
* css/parser/CSSPropertyParser.h:
Add parseCounterStyleDescriptor method
* css/parser/CSSPropertyParserHelpers.h:
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeCustomIdent):
Add new flag that allows consumed custom ident values to be lowercased
on-parse. This is necessary for some <counter-style-name> values.
(WebCore::CSSPropertyParserHelpers::isPredefinedCounterStyle): Added.
(WebCore::CSSPropertyParserHelpers::consumeCounterStyleName):
(WebCore::CSSPropertyParserHelpers::consumeCounterStyleNameInPrelude):
Parse @counter-style names, both in-prelude names and non-prelude
names (e.g. as part of the `extends` descriptor).
Source/WTF:
* Scripts/Preferences/WebPreferencesExperimental.yaml:
Add CSSCounterStyleAtRulesEnabled and CSSCounterStyleAtRuleImageSymbolsEnabled flags.
Tools:
* DumpRenderTree/TestOptions.cpp:
(WTR::TestOptions::defaults):
Add `false` defaults for CSSCounterStyleAtRulesEnabled and
CSSCounterStyleAtRuleImageSymbolsEnabled flags.
LayoutTests:
Add tests ensuring @counter-style is not exposed when feature flag is
disabled.
* webexposed/counter-style-is-not-exposed-expected.txt: Added.
* webexposed/counter-style-is-not-exposed.html: Added.
Canonical link: https://commits.webkit.org/236643@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276152 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-04-16 19:19:04 +00:00
|
|
|
{ "CSSCounterStyleAtRuleImageSymbolsEnabled", false },
|
2021-05-05 16:36:55 +00:00
|
|
|
{ "CSSCounterStyleAtRulesEnabled", false },
|
2020-11-01 20:09:38 +00:00
|
|
|
{ "CSSLogicalEnabled", false },
|
|
|
|
{ "CSSOMViewSmoothScrollingEnabled", false },
|
2021-05-05 16:36:55 +00:00
|
|
|
{ "CanvasColorSpaceEnabled", true },
|
2020-10-21 15:04:20 +00:00
|
|
|
{ "ColorFilterEnabled", false },
|
2020-11-01 20:09:38 +00:00
|
|
|
{ "ContactPickerAPIEnabled", false },
|
|
|
|
{ "CoreMathMLEnabled", false },
|
|
|
|
{ "DOMPasteAllowed", true },
|
|
|
|
{ "DeveloperExtrasEnabled", true },
|
2020-10-30 01:17:30 +00:00
|
|
|
{ "HiddenPageDOMTimerThrottlingEnabled", false },
|
2020-10-21 15:04:20 +00:00
|
|
|
{ "InspectorAdditionsEnabled", false },
|
|
|
|
{ "IntersectionObserverEnabled", false },
|
2020-11-01 20:09:38 +00:00
|
|
|
{ "JavaScriptCanAccessClipboard", true },
|
|
|
|
{ "JavaScriptCanOpenWindowsAutomatically", true },
|
2020-10-30 01:17:30 +00:00
|
|
|
{ "JavaScriptEnabled", true },
|
2020-10-21 15:04:20 +00:00
|
|
|
{ "KeygenElementEnabled", false },
|
2020-11-01 20:09:38 +00:00
|
|
|
{ "LayoutFormattingContextIntegrationEnabled", true },
|
|
|
|
{ "LineHeightUnitsEnabled", false },
|
2020-10-30 01:17:30 +00:00
|
|
|
{ "LoadsImagesAutomatically", true },
|
|
|
|
{ "MainContentUserGestureOverrideEnabled", false },
|
2020-10-21 15:04:20 +00:00
|
|
|
{ "MenuItemElementEnabled", false },
|
|
|
|
{ "ModernMediaControlsEnabled", true },
|
2020-11-01 20:09:38 +00:00
|
|
|
{ "NeedsStorageAccessFromFileURLsQuirk", false },
|
2020-12-10 06:39:21 +00:00
|
|
|
{ "OverscrollBehaviorEnabled", true },
|
Add support for Navigation Timing Level 2
https://bugs.webkit.org/show_bug.cgi?id=184363
Reviewed by Ryosuke Niwa.
LayoutTests/imported/w3c:
* web-platform-tests/navigation-timing/META.yml: Added.
* web-platform-tests/navigation-timing/dom_interactive_image_document-expected.txt: Added.
* web-platform-tests/navigation-timing/dom_interactive_image_document.html: Added.
* web-platform-tests/navigation-timing/dom_interactive_media_document-expected.txt: Added.
* web-platform-tests/navigation-timing/dom_interactive_media_document.html: Added.
* web-platform-tests/navigation-timing/idlharness.window.js:
* web-platform-tests/navigation-timing/nav2_test_attributes_exist-expected.txt: Added.
* web-platform-tests/navigation-timing/nav2_test_attributes_exist.html: Added.
This test fails because we have not implemented transferSize, encodedBodySize, and decodedBodySize as noted in PerformanceResourceTiming.idl
* web-platform-tests/navigation-timing/nav2_test_attributes_values-expected.txt: Added.
* web-platform-tests/navigation-timing/nav2_test_attributes_values.html: Added.
This test fails because we have not implemented transferSize, encodedBodySize, and decodedBodySize as noted in PerformanceResourceTiming.idl
* web-platform-tests/navigation-timing/nav2_test_document_open-expected.txt:
* web-platform-tests/navigation-timing/nav2_test_document_open.html:
* web-platform-tests/navigation-timing/nav2_test_document_replaced-expected.txt:
* web-platform-tests/navigation-timing/nav2_test_document_replaced.html:
* web-platform-tests/navigation-timing/nav2_test_frame_removed-expected.txt:
* web-platform-tests/navigation-timing/nav2_test_instance_accessible_from_the_start-expected.txt:
* web-platform-tests/navigation-timing/nav2_test_instance_accessible_from_the_start.html:
* web-platform-tests/navigation-timing/nav2_test_instance_accessors-expected.txt: Added.
* web-platform-tests/navigation-timing/nav2_test_instance_accessors.html: Added.
* web-platform-tests/navigation-timing/nav2_test_navigate_iframe-expected.txt: Added.
* web-platform-tests/navigation-timing/nav2_test_navigate_iframe.html: Added.
* web-platform-tests/navigation-timing/nav2_test_navigate_within_document-expected.txt:
* web-platform-tests/navigation-timing/nav2_test_navigate_within_document.html:
* web-platform-tests/navigation-timing/nav2_test_navigation_type_backforward-expected.txt:
* web-platform-tests/navigation-timing/nav2_test_navigation_type_backforward.html:
* web-platform-tests/navigation-timing/nav2_test_navigation_type_navigate-expected.txt: Added.
* web-platform-tests/navigation-timing/nav2_test_navigation_type_navigate.html: Added.
* web-platform-tests/navigation-timing/nav2_test_navigation_type_reload-expected.txt:
* web-platform-tests/navigation-timing/nav2_test_navigation_type_reload.html:
* web-platform-tests/navigation-timing/nav2_test_redirect_chain_xserver_final_original_origin-expected.txt: Added.
This test fails because our test infrastructure doesn't support loading from www.localhost.
* web-platform-tests/navigation-timing/nav2_test_redirect_chain_xserver_final_original_origin.html: Copied from LayoutTests/imported/w3c/web-platform-tests/navigation-timing/nav2_test_redirect_chain_xserver_partial_opt_in.html.
* web-platform-tests/navigation-timing/nav2_test_redirect_chain_xserver_partial_opt_in-expected.txt:
This test fails because our test infrastructure doesn't support loading from www.localhost.
* web-platform-tests/navigation-timing/nav2_test_redirect_chain_xserver_partial_opt_in.html:
* web-platform-tests/navigation-timing/nav2_test_redirect_none-expected.txt: Added.
* web-platform-tests/navigation-timing/nav2_test_redirect_none.html: Added.
* web-platform-tests/navigation-timing/nav2_test_redirect_server-expected.txt:
This test failure needs further investigation.
* web-platform-tests/navigation-timing/nav2_test_redirect_server.html:
* web-platform-tests/navigation-timing/nav2_test_redirect_xserver-expected.txt:
This test fails because our test infrastructure doesn't support loading from www.localhost.
* web-platform-tests/navigation-timing/nav2_test_redirect_xserver.html:
* web-platform-tests/navigation-timing/nav2_test_unique_nav_instances-expected.txt: Added.
This test failure needs further investigation.
* web-platform-tests/navigation-timing/nav2_test_unique_nav_instances.html: Added.
* web-platform-tests/navigation-timing/po-navigation-expected.txt: Added.
* web-platform-tests/navigation-timing/po-navigation.html: Added.
* web-platform-tests/navigation-timing/resources/webperftestharness.js:
(test_namespace):
(test_attribute_exists):
(test_enum):
* web-platform-tests/navigation-timing/secure-connection-start-reuse.https-expected.txt: Added.
* web-platform-tests/navigation-timing/secure-connection-start-reuse.https.html: Added.
* web-platform-tests/navigation-timing/secure_connection_start_non_zero.https-expected.txt:
This test has been marked as flaky. It needs to be fixed to not rely on no initial connection reuse.
* web-platform-tests/navigation-timing/supported_navigation_type.any-expected.txt:
* web-platform-tests/navigation-timing/supported_navigation_type.any.worker-expected.txt:
* web-platform-tests/navigation-timing/test_document_onload-expected.txt: Added.
* web-platform-tests/navigation-timing/test_document_onload.html: Added.
This test failure needs further investigation.
* web-platform-tests/navigation-timing/unload-event-same-origin-check-expected.txt:
* web-platform-tests/navigation-timing/unload-event-same-origin-check.html:
* web-platform-tests/performance-timeline/META.yml: Added.
* web-platform-tests/performance-timeline/buffered-flag-after-timeout.any.js: Added.
(async_test.t.t.step_timeout):
* web-platform-tests/performance-timeline/buffered-flag-observer.any.js: Added.
* web-platform-tests/performance-timeline/get-invalid-entries-expected.txt: Added.
* web-platform-tests/performance-timeline/get-invalid-entries.html: Added.
* web-platform-tests/performance-timeline/idlharness.any.js: Added.
(async idl_array):
* web-platform-tests/performance-timeline/multiple-buffered-flag-observers.any.js: Added.
(promise_test):
* web-platform-tests/performance-timeline/not-clonable-expected.txt: Added.
* web-platform-tests/performance-timeline/not-clonable.html: Added.
* web-platform-tests/performance-timeline/observer-buffered-false.any.js: Added.
(async_test.t.t.step_timeout):
* web-platform-tests/performance-timeline/performanceentry-tojson.any.js: Added.
(test):
* web-platform-tests/performance-timeline/po-callback-mutate.any.js: Added.
(async_test):
* web-platform-tests/performance-timeline/po-disconnect-removes-observed-types.any.js: Added.
(async_test):
* web-platform-tests/performance-timeline/po-disconnect.any.js: Added.
(async_test):
(test):
* web-platform-tests/performance-timeline/po-entries-sort.any.js: Added.
(async_test):
* web-platform-tests/performance-timeline/po-getentries.any.js: Added.
(async_test):
* web-platform-tests/performance-timeline/po-mark-measure.any.js: Added.
(async_test):
* web-platform-tests/performance-timeline/po-observe-expected.txt: Added.
* web-platform-tests/performance-timeline/po-observe-repeated-type.any.js: Added.
(async_test):
* web-platform-tests/performance-timeline/po-observe.html: Added.
* web-platform-tests/performance-timeline/po-resource-expected.txt: Added.
* web-platform-tests/performance-timeline/po-resource.html: Added.
* web-platform-tests/performance-timeline/po-takeRecords.any.js: Added.
(async_test):
* web-platform-tests/performance-timeline/resources/postmessage-entry.html: Added.
* web-platform-tests/performance-timeline/resources/worker-invalid-entries.js: Added.
* web-platform-tests/performance-timeline/resources/worker-with-performance-observer.js: Added.
(catch):
* web-platform-tests/performance-timeline/supportedEntryTypes.any-expected.txt:
This test failure needs further investigation. It's a bindings generation problem I've unsuccessfully looked into before.
* web-platform-tests/performance-timeline/supportedEntryTypes.any.js:
(test):
* web-platform-tests/performance-timeline/supportedEntryTypes.any.worker-expected.txt:
* web-platform-tests/performance-timeline/webtiming-resolution.any.js: Added.
(testTimeResolution):
(timeByUserTiming):
* web-platform-tests/performance-timeline/worker-with-performance-observer-expected.txt: Added.
* web-platform-tests/performance-timeline/worker-with-performance-observer.html: Added.
* web-platform-tests/service-workers/service-worker/navigation-timing.https-expected.txt:
This existing test failure needs more investigation. We are probably close to a fix after this patch.
Source/WebCore:
This is basically just a new shape for exposing the same data as window.performance.navigation, but with a shape that fits better into the rest of the
performance timeline measurements that have been added to the web platform since performance.navigation.
I noted that exposing transfer size is problematic, and some of the tests for reading transfer size still fail.
There are still a few relatively minor test failures to fix in future patches. Each one is annotated in the LayoutTests ChangeLogs.
Tests: imported/w3c/web-platform-tests/navigation-timing/dom_interactive_image_document.html
imported/w3c/web-platform-tests/navigation-timing/dom_interactive_media_document.html
imported/w3c/web-platform-tests/navigation-timing/nav2_test_attributes_exist.html
imported/w3c/web-platform-tests/navigation-timing/nav2_test_attributes_values.html
imported/w3c/web-platform-tests/navigation-timing/nav2_test_instance_accessors.html
imported/w3c/web-platform-tests/navigation-timing/nav2_test_navigate_iframe.html
imported/w3c/web-platform-tests/navigation-timing/nav2_test_navigation_type_navigate.html
imported/w3c/web-platform-tests/navigation-timing/nav2_test_redirect_chain_xserver_final_original_origin.html
imported/w3c/web-platform-tests/navigation-timing/nav2_test_redirect_none.html
imported/w3c/web-platform-tests/navigation-timing/nav2_test_unique_nav_instances.html
imported/w3c/web-platform-tests/navigation-timing/po-navigation.html
imported/w3c/web-platform-tests/navigation-timing/secure-connection-start-reuse.https.html
imported/w3c/web-platform-tests/navigation-timing/test_document_onload.html
imported/w3c/web-platform-tests/performance-timeline/get-invalid-entries.html
imported/w3c/web-platform-tests/performance-timeline/not-clonable.html
imported/w3c/web-platform-tests/performance-timeline/po-observe.html
imported/w3c/web-platform-tests/performance-timeline/po-resource.html
imported/w3c/web-platform-tests/performance-timeline/worker-with-performance-observer.html
* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSPerformanceEntryCustom.cpp:
(WebCore::toJSNewlyCreated):
* dom/Document.cpp:
(WebCore::Document::setReadyState):
Sometimes the ready state jumps right to Complete without hitting Interactive along the way.
When this happens, we want to mark both m_documentTiming.domComplete and m_documentTiming.domInteractive.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::notifyFinished):
Call addNavigationTiming in notifyFinished to create the navigation timing object when we are done navigating
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::didFinishLoading):
* loader/ResourceLoader.h:
* loader/ResourceTiming.cpp:
(WebCore::ResourceTiming::fromLoad):
Add a URL parameter. Sometimes we need to use the request's URL and sometimes the response's. Different specs written at different times.
(WebCore::ResourceTiming::populateServerTiming const):
(WebCore::ResourceTiming::populateServerTiming): Deleted.
* loader/ResourceTiming.h:
(WebCore::ResourceTiming::url const):
(WebCore::ResourceTiming::initiator const):
(WebCore::ResourceTiming::loadTiming const):
(WebCore::ResourceTiming::networkLoadMetrics const):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::reportResourceTiming):
* page/Performance.cpp:
(WebCore::Performance::getEntries const):
(WebCore::Performance::getEntriesByType const):
(WebCore::Performance::getEntriesByName const):
(WebCore::Performance::appendBufferedEntriesByType const):
(WebCore::Performance::addNavigationTiming):
(WebCore::Performance::registerPerformanceObserver):
(WebCore::Performance::queueEntry):
(WebCore::Performance::scheduleTaskIfNeeded):
* page/Performance.h:
* page/PerformanceEntry.h:
(WebCore::PerformanceEntry::startTime const):
(WebCore::PerformanceEntry::duration const):
(WebCore::PerformanceEntry::isResource const): Deleted.
(WebCore::PerformanceEntry::isMark const): Deleted.
(WebCore::PerformanceEntry::isMeasure const): Deleted.
(WebCore::PerformanceEntry::isPaint const): Deleted.
* page/PerformanceMark.h:
(isType): Deleted.
SPECIALIZE_TYPE_TRAITS_BEGIN/END doesn't work well with PerformanceNavigationTiming which inherits from PerformanceResourceTiming which both have distinct types.
is<PerformanceResourceTiming> doesn't give us the info we need. I replaced that with "switch (entry->performanceEntryType())" in the one place it's used, and it works like a charm.
Also renamed type to performanceEntryType so it doesn't conflict with PerformanceNavigationTiming::type, which is specified in the idl.
* page/PerformanceMeasure.h:
(isType): Deleted.
* page/PerformanceNavigationTiming.cpp: Added.
(WebCore::toPerformanceNavigationTimingNavigationType):
(WebCore::PerformanceNavigationTiming::PerformanceNavigationTiming):
(WebCore::PerformanceNavigationTiming::millisecondsSinceOrigin const):
(WebCore::PerformanceNavigationTiming::sameOriginCheckFails const):
(WebCore::PerformanceNavigationTiming::unloadEventStart const):
(WebCore::PerformanceNavigationTiming::unloadEventEnd const):
(WebCore::PerformanceNavigationTiming::domInteractive const):
(WebCore::PerformanceNavigationTiming::domContentLoadedEventStart const):
(WebCore::PerformanceNavigationTiming::domContentLoadedEventEnd const):
(WebCore::PerformanceNavigationTiming::domComplete const):
(WebCore::PerformanceNavigationTiming::loadEventStart const):
(WebCore::PerformanceNavigationTiming::loadEventEnd const):
(WebCore::PerformanceNavigationTiming::type const):
(WebCore::PerformanceNavigationTiming::redirectCount const):
(WebCore::PerformanceNavigationTiming::startTime const):
(WebCore::PerformanceNavigationTiming::duration const):
* page/PerformanceNavigationTiming.h: Added.
* page/PerformanceNavigationTiming.idl: Copied from Source/WebCore/page/PerformanceObserver.idl.
* page/PerformanceObserver.cpp:
(WebCore::PerformanceObserver::takeRecords):
(WebCore::PerformanceObserver::disconnect):
(WebCore::PerformanceObserver::deliver):
(WebCore::PerformanceObserver::supportedEntryTypes):
* page/PerformanceObserver.h:
* page/PerformanceObserver.idl:
* page/PerformanceObserverEntryList.cpp:
(WebCore::PerformanceObserverEntryList::getEntriesByName const):
* page/PerformancePaintTiming.h:
(isType): Deleted.
* page/PerformanceResourceTiming.cpp:
(WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
(WebCore::PerformanceResourceTiming::nextHopProtocol const):
(WebCore::PerformanceResourceTiming::redirectStart const):
(WebCore::PerformanceResourceTiming::redirectEnd const):
(WebCore::PerformanceResourceTiming::fetchStart const):
(WebCore::PerformanceResourceTiming::domainLookupStart const):
(WebCore::PerformanceResourceTiming::domainLookupEnd const):
(WebCore::PerformanceResourceTiming::connectStart const):
(WebCore::PerformanceResourceTiming::connectEnd const):
(WebCore::PerformanceResourceTiming::secureConnectionStart const):
(WebCore::PerformanceResourceTiming::requestStart const):
(WebCore::PerformanceResourceTiming::responseStart const):
(WebCore::PerformanceResourceTiming::responseEnd const):
(WebCore::PerformanceResourceTiming::networkLoadTimeToDOMHighResTimeStamp const):
* page/PerformanceResourceTiming.h:
(WebCore::PerformanceResourceTiming::initiatorType const):
(isType): Deleted.
* page/PerformanceResourceTiming.idl:
* platform/network/BlobResourceHandle.cpp:
(WebCore::doNotifyFinish):
* platform/network/NetworkLoadMetrics.h:
* platform/network/ResourceHandleClient.h:
(WebCore::ResourceHandleClient::didFinishLoading):
* platform/network/SynchronousLoaderClient.cpp:
(WebCore::SynchronousLoaderClient::didFinishLoading):
* platform/network/SynchronousLoaderClient.h:
* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading):
Pass metrics including the response end time from NSURLConnection so we don't assert in WebKitLegacy.
* platform/network/cocoa/NetworkLoadMetrics.mm:
(WebCore::copyTimingData):
Use currentRequest instead of passing in the response so we can call it from didFinishLoading, where we don't have a response stored anywhere.
We're just looking for whether it's http or https, so the currentRequest (which is the request after all the redirects) fits our purpose.
* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::handleDataURL):
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connectionDidFinishLoading:]):
Source/WebKit:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):
Mark reused TLS connections in complete metrics like I did in incomplete metrics in r277493.
Source/WebKitLegacy:
* WebCoreSupport/PingHandle.h:
Source/WTF:
* Scripts/Preferences/WebPreferencesExperimental.yaml:
LayoutTests:
* TestExpectations:
Annoyingly secure_connection_start_non_zero.https.html becomes flaky with a correct implementation because it assumes
that no connection is reused. However, when running this test after other tests, another connection is often reused.
* performance-api/paint-timing/performance-observer-first-contentful-paint-expected.txt:
* performance-api/paint-timing/performance-observer-first-contentful-paint.html:
* performance-api/performance-observer-api-expected.txt:
* performance-api/performance-timeline-api-expected.txt:
* performance-api/resources/timeline-api.js:
* platform/mac-wk1/imported/w3c/web-platform-tests/navigation-timing/nav2_test_attributes_values-expected.txt:
Next hop protocol isn't implemented in ResourceHandle. That's probably no big deal because WebKitLegacy is deprecated and not used by Safari.
Canonical link: https://commits.webkit.org/237930@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-20 00:33:02 +00:00
|
|
|
{ "PerformanceNavigationTimingAPIEnabled", true },
|
2021-04-27 18:52:48 +00:00
|
|
|
{ "PluginsEnabled", true },
|
2020-11-12 02:04:28 +00:00
|
|
|
{ "PrivateClickMeasurementEnabled", false },
|
2020-11-01 20:09:38 +00:00
|
|
|
{ "RequestIdleCallbackEnabled", false },
|
|
|
|
{ "ResizeObserverEnabled", false },
|
|
|
|
{ "SelectionAcrossShadowBoundariesEnabled", true },
|
2020-11-12 02:34:10 +00:00
|
|
|
{ "ShrinksStandaloneImagesToFit", true },
|
2020-10-28 18:33:08 +00:00
|
|
|
{ "SpatialNavigationEnabled", false },
|
|
|
|
{ "TabsToLinks", false },
|
2020-11-01 20:09:38 +00:00
|
|
|
{ "TelephoneNumberParsingEnabled", false },
|
2020-10-30 01:17:30 +00:00
|
|
|
{ "UsesBackForwardCache", false },
|
2020-10-21 15:04:20 +00:00
|
|
|
{ "WebGPUEnabled", false },
|
2020-11-01 20:09:38 +00:00
|
|
|
{ "XSSAuditorEnabled", false },
|
2021-05-04 06:33:52 +00:00
|
|
|
#endif
|
|
|
|
#if ENABLE(GPU_PROCESS) && ENABLE(WEBGL)
|
|
|
|
{ "UseGPUProcessForWebGLEnabled", false },
|
2021-03-07 17:41:50 +00:00
|
|
|
#endif
|
2020-10-21 15:04:20 +00:00
|
|
|
};
|
2021-03-07 17:41:50 +00:00
|
|
|
#if PLATFORM(WIN)
|
2020-10-31 16:08:51 +00:00
|
|
|
features.uint32WebPreferenceFeatures = {
|
|
|
|
{ "MinimumFontSize", 0 },
|
|
|
|
};
|
2021-03-07 17:41:50 +00:00
|
|
|
#endif
|
|
|
|
#if PLATFORM(COCOA)
|
|
|
|
features.stringWebPreferenceFeatures = {
|
|
|
|
{ "CursiveFontFamily", "Apple Chancery" },
|
|
|
|
{ "FantasyFontFamily", "Papyrus" },
|
|
|
|
{ "FixedFontFamily", "Courier" },
|
|
|
|
{ "PictographFontFamily", "Apple Color Emoji" },
|
|
|
|
{ "SansSerifFontFamily", "Helvetica" },
|
|
|
|
{ "SerifFontFamily", "Times" },
|
|
|
|
{ "StandardFontFamily", "Times" },
|
|
|
|
};
|
|
|
|
#endif
|
2020-10-21 15:04:20 +00:00
|
|
|
}
|
|
|
|
return features;
|
|
|
|
}
|
|
|
|
|
2020-10-12 21:54:50 +00:00
|
|
|
const std::unordered_map<std::string, TestHeaderKeyType>& TestOptions::keyTypeMapping()
|
2016-11-27 04:21:49 +00:00
|
|
|
{
|
2020-10-13 17:16:15 +00:00
|
|
|
static const std::unordered_map<std::string, TestHeaderKeyType> map {
|
2020-10-20 00:52:14 +00:00
|
|
|
GENERATED_WEB_PREFERENCE_KEY_TYPE_MAPPINGS
|
2016-11-27 04:21:49 +00:00
|
|
|
|
2020-10-13 17:16:15 +00:00
|
|
|
{ "dumpJSConsoleLogInStdErr", TestHeaderKeyType::BoolTestRunner },
|
|
|
|
{ "enableDragDestinationActionLoad", TestHeaderKeyType::BoolTestRunner },
|
|
|
|
{ "layerBackedWebView", TestHeaderKeyType::BoolTestRunner },
|
|
|
|
{ "useEphemeralSession", TestHeaderKeyType::BoolTestRunner },
|
|
|
|
|
|
|
|
{ "additionalSupportedImageTypes", TestHeaderKeyType::StringTestRunner },
|
|
|
|
{ "jscOptions", TestHeaderKeyType::StringTestRunner },
|
2020-10-12 21:54:50 +00:00
|
|
|
};
|
2016-11-27 04:21:49 +00:00
|
|
|
|
2020-10-12 21:54:50 +00:00
|
|
|
return map;
|
2019-12-10 18:51:06 +00:00
|
|
|
}
|
|
|
|
|
2020-11-04 22:22:03 +00:00
|
|
|
bool TestOptions::webViewIsCompatibleWithOptions(const TestOptions& other) const
|
2019-12-10 18:51:06 +00:00
|
|
|
{
|
2020-11-04 22:22:03 +00:00
|
|
|
return m_features == other.m_features;
|
2019-12-10 18:51:06 +00:00
|
|
|
}
|
|
|
|
|
2020-10-21 15:04:20 +00:00
|
|
|
template<typename T> T featureValue(std::string key, T defaultValue, const std::unordered_map<std::string, T>& map)
|
2016-11-27 04:21:49 +00:00
|
|
|
{
|
2020-10-21 15:04:20 +00:00
|
|
|
auto it = map.find(key);
|
|
|
|
if (it != map.end())
|
|
|
|
return it->second;
|
|
|
|
return defaultValue;
|
|
|
|
}
|
2020-10-12 21:54:50 +00:00
|
|
|
|
2020-10-21 15:04:20 +00:00
|
|
|
bool TestOptions::boolTestRunnerFeatureValue(std::string key, bool defaultValue) const
|
|
|
|
{
|
|
|
|
return featureValue(key, defaultValue, m_features.boolTestRunnerFeatures);
|
2016-11-27 04:21:49 +00:00
|
|
|
}
|
2017-05-26 00:42:58 +00:00
|
|
|
|
2020-10-21 15:04:20 +00:00
|
|
|
std::string TestOptions::stringTestRunnerFeatureValue(std::string key, std::string defaultValue) const
|
2017-05-26 00:42:58 +00:00
|
|
|
{
|
2020-10-21 15:04:20 +00:00
|
|
|
return featureValue(key, defaultValue, m_features.stringTestRunnerFeatures);
|
2017-05-26 00:42:58 +00:00
|
|
|
}
|
2020-10-12 21:54:50 +00:00
|
|
|
|
|
|
|
}
|