Timeline



Oct 11, 2020:

11:29 PM Changeset in webkit [268342] by weinig@apple.com
  • 22 edits
    1 add in trunk

[Preferences] Introduce string based SPI for WKPreferences to allow tests to change internal behavior without always adding additional SPI
https://bugs.webkit.org/show_bug.cgi?id=217582

Reviewed by Darin Adler.

Source/WebKit:

Add SPI for setting any WebKit preference using the key as defined in the WebPreferences*.yaml
files. This will allow adding testing of non-default behavior that we don't necessarily want to
expose via its own API or SPI.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Scripts/PreferencesTemplates/WebPreferencesGetterSetters.cpp.erb: Added.
  • WebKit.xcodeproj/project.pbxproj:

Add new generated file, WebPreferencesGetterSetters.cpp.

  • Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb:
  • Scripts/PreferencesTemplates/WebPreferencesInternalDebugFeatures.cpp.erb:

Moved getter/setter definitions to WebPreferencesGetterSetters.cpp.erb

  • UIProcess/WebPreferences.cpp:
  • UIProcess/WebPreferences.h:
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetBoolValueForKey):
(WKPreferencesSetDoubleValueForKey):
(WKPreferencesSetUInt32ValueForKey):
(WKPreferencesSetStringValueForKey):

  • UIProcess/API/C/WKPreferencesRefPrivate.h:

Expose new SPI.

Tools:

Adopt new WebKit SPI to set preferences using the keys defined in the WebPreferences*.yaml
files.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::initialize):
Remove need for m_shouldUseAcceleratedDrawing by merging it into the global feature set.

(WTR::TestController::createWebViewWithOptions):
Move WKHTTPCookieStoreDeleteAllCookies() call out of resetPreferencesToConsistentValues
where it did not make sense.

(WTR::TestController::resetPreferencesToConsistentValues):
Replace preference setters that used values from TestOptions with use of the new
WKPreferencesSetBoolValueForKey SPI. Also removes some unnecessary #ifdefs, as the API
it was guarding is always available, though may just be a no-op if the feature is disabled.

(WTR::TestController::resetStateToConsistentValues):
Move Cocoa specific call to WebCoreTestSupport::setAdditionalSupportedImageTypesForTesting to
TestControllerCocoa.mm and Gtk specific call to WKTextCheckerContinuousSpellCheckingEnabledStateChanged
to TestControllerGtk.cpp.

  • WebKitTestRunner/TestController.h:

Remove unimplemented globalFeatureDefaultsForTest() function and now unused m_shouldUseAcceleratedDrawing
member variable.

  • WebKitTestRunner/TestOptions.cpp:

(WTR::TestOptions::boolWKPreferences const):
Add helper to get all the bool options in TestOptions that correspond with WebKit preferences.

  • WebKitTestRunner/TestOptions.h:

(WTR::TestOptions::useAcceleratedDrawing const): Deleted.
(WTR::TestOptions::useMockScrollbars const): Deleted.
(WTR::TestOptions::needsSiteSpecificQuirks const): Deleted.
(WTR::TestOptions::enableIntersectionObserver const): Deleted.
(WTR::TestOptions::enableMenuItemElement const): Deleted.
(WTR::TestOptions::enableKeygenElement const): Deleted.
(WTR::TestOptions::enableModernMediaControls const): Deleted.
(WTR::TestOptions::enablePointerLock const): Deleted.
(WTR::TestOptions::enableWebAuthentication const): Deleted.
(WTR::TestOptions::enableWebAuthenticationLocalAuthenticator const): Deleted.
(WTR::TestOptions::enableInspectorAdditions const): Deleted.
(WTR::TestOptions::allowCrossOriginSubresourcesToAskForCredentials const): Deleted.
(WTR::TestOptions::domPasteAllowed const): Deleted.
(WTR::TestOptions::enableColorFilter const): Deleted.
(WTR::TestOptions::checkForWorldLeaks const): Deleted.
(WTR::TestOptions::shouldIgnoreMetaViewport const): Deleted.
(WTR::TestOptions::enableServiceControls const): Deleted.
(WTR::TestOptions::enableAppNap const): Deleted.
(WTR::TestOptions::enableBackForwardCache const): Deleted.
(WTR::TestOptions::enableCaptureVideoInUIProcess const): Deleted.
(WTR::TestOptions::enableCaptureVideoInGPUProcess const): Deleted.
(WTR::TestOptions::enableCaptureAudioInUIProcess const): Deleted.
(WTR::TestOptions::enableCaptureAudioInGPUProcess const): Deleted.
Remove all getters that are now replaced by boolWKPreferences.
Also, sorts all the lists to make it easier to find things.

  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::initializeWebViewConfiguration):
(WTR::TestController::platformCreateWebView):
Remove setting of configuration values that also covered by boolWKPreferences.

(WTR::TestController::cocoaResetStateToConsistentValues):
Move Cocoa specific call here.

  • WebKitTestRunner/gtk/TestControllerGtk.cpp:

(WTR::TestController::platformResetStateToConsistentValues):
Move Gtk specific call here.

  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformResetPreferencesToConsistentValues):
(WTR::TestController::platformConfigureViewForTest):
Remove setting of configuration values that also covered by boolWKPreferences.

  • WebKitTestRunner/win/TestControllerWin.cpp:

(WTR::TestController::platformResetStateToConsistentValues):
Moved default no-op implementation from TestController.cpp now that not all
non-Cocoa platforms use the same implementation.

  • WebKitTestRunner/wpe/TestControllerWPE.cpp:

(WTR::TestController::platformResetStateToConsistentValues):
Moved default no-op implementation from TestController.cpp now that not all
non-Cocoa platforms use the same implementation.

9:58 PM Changeset in webkit [268341] by bshafiei@apple.com
  • 1 copy in tags/Safari-611.1.3.1

Tag Safari-611.1.3.1.

9:35 PM Changeset in webkit [268340] by bshafiei@apple.com
  • 1 copy in tags/Safari-610.3.2

Tag Safari-610.3.2.

7:21 PM Changeset in webkit [268339] by Kocsen Chung
  • 20 edits in branches/safari-611.1.3-branch/Source

Cherry-pick r268330. rdar://problem/70188497

Strip patch version from TARGET_MAC_OS_X_VERSION_MAJOR when building for macOS Big Sur
or later
https://bugs.webkit.org/show_bug.cgi?id=217594
rdar://70188497

Patch by Luming Yin <luming_yin@apple.com> on 2020-10-11
Reviewed by Darin Adler.

To ensure successful Mac Catalyst WebKit builds, strip the patch version from
TARGET_MAC_OS_X_VERSION_MAJOR by using two base:s on MACOSX_DEPLOYMENT_TARGET.

  • Configurations/Base.xcconfig:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268330 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7:21 PM Changeset in webkit [268338] by Kocsen Chung
  • 20 edits in branches/safari-611.1.3-branch/Source

Cherry-pick r268327. rdar://problem/70168426

Ignore deployment suffix and identifier when computing major OS version for macOS
Big Sur and newer
https://bugs.webkit.org/show_bug.cgi?id=217584
rdar://70168426

Patch by Luming Yin <luming_yin@apple.com> on 2020-10-11
Reviewed by Darin Adler.

Stop using MACOSX_DEPLOYMENT_TARGET:suffix:identifier to compute major OS versions.
Only use the deployment target base for macOS Big Sur and newer. Keep the manual
definitions for legacy versions of macOS.

  • Configurations/Base.xcconfig:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268327 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7:15 PM Changeset in webkit [268337] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

-Wdeprecated-declarations caused by WKTR using WKBundlePostSynchronousMessage
https://bugs.webkit.org/show_bug.cgi?id=217591

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-10-11
Reviewed by Darin Adler.

Use ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END.

  • WebKitTestRunner/InjectedBundle/InjectedBundle.h:

(WTR::postSynchronousMessage):

7:14 PM Changeset in webkit [268336] by Kocsen Chung
  • 8 edits in branches/safari-611.1.3-branch/Source

Versioning.

WebKit-7611.1.3.1

7:02 PM Changeset in webkit [268335] by Kocsen Chung
  • 8 edits in branches/safari-610-branch/Source

Versioning.

WebKit-7610.3.2

6:38 PM Changeset in webkit [268334] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

GeneratePreferences.rb is noisy
https://bugs.webkit.org/show_bug.cgi?id=217589

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-10-11
Reviewed by Sam Weinig.

Don't print anything when the script is successful. Since it runs during the build, it
should only print errors.

  • Scripts/GeneratePreferences.rb:
6:34 PM Changeset in webkit [268333] by Kocsen Chung
  • 20 edits in branches/safari-610-branch/Source

Cherry-pick r268330. rdar://problem/70189394

Strip patch version from TARGET_MAC_OS_X_VERSION_MAJOR when building for macOS Big Sur
or later
https://bugs.webkit.org/show_bug.cgi?id=217594
rdar://70188497

Patch by Luming Yin <luming_yin@apple.com> on 2020-10-11
Reviewed by Darin Adler.

To ensure successful Mac Catalyst WebKit builds, strip the patch version from
TARGET_MAC_OS_X_VERSION_MAJOR by using two base:s on MACOSX_DEPLOYMENT_TARGET.

  • Configurations/Base.xcconfig:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268330 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6:34 PM Changeset in webkit [268332] by Kocsen Chung
  • 20 edits in branches/safari-610-branch/Source

Cherry-pick r268327. rdar://problem/70189401

Ignore deployment suffix and identifier when computing major OS version for macOS
Big Sur and newer
https://bugs.webkit.org/show_bug.cgi?id=217584
rdar://70168426

Patch by Luming Yin <luming_yin@apple.com> on 2020-10-11
Reviewed by Darin Adler.

Stop using MACOSX_DEPLOYMENT_TARGET:suffix:identifier to compute major OS versions.
Only use the deployment target base for macOS Big Sur and newer. Keep the manual
definitions for legacy versions of macOS.

  • Configurations/Base.xcconfig:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268327 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6:25 PM Changeset in webkit [268331] by Darin Adler
  • 9 edits in trunk

[macOS] Harden more build configurations against macOS versions 11 and higher as well as inclusion of patch versions
https://bugs.webkit.org/show_bug.cgi?id=217595

Reviewed by Alexey Proskuryakov.

PerformanceTests:

  • MediaTime/Configurations/Base.xcconfig: Updated to same idiom used elsewhere.

Tools:

  • ContentExtensionTester/Configurations/Base.xcconfig: Updated to same idiom used elsewhere.
  • DumpRenderTree/mac/Configurations/Base.xcconfig: Ditto.
  • ImageDiff/cg/Configurations/Base.xcconfig: Ditto.
  • WebKitTestRunner/Configurations/Base.xcconfig: Ditto.
  • lldb/lldbWebKitTester/Configurations/Base.xcconfig: Ditto.
  • Scripts/webkitpy/common/config/contributors.json: Added contributor Luming Yin, an engineer who works on Safari at

Apple who has been contributing build fixes like these.

6:11 PM Changeset in webkit [268330] by Darin Adler
  • 20 edits in trunk/Source

Strip patch version from TARGET_MAC_OS_X_VERSION_MAJOR when building for macOS Big Sur
or later
https://bugs.webkit.org/show_bug.cgi?id=217594
rdar://70188497

Patch by Luming Yin <luming_yin@apple.com> on 2020-10-11
Reviewed by Darin Adler.

To ensure successful Mac Catalyst WebKit builds, strip the patch version from
TARGET_MAC_OS_X_VERSION_MAJOR by using two base:s on MACOSX_DEPLOYMENT_TARGET.

  • Configurations/Base.xcconfig:
5:39 PM Changeset in webkit [268329] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

Build failures and warning under Source/WebCore/layout/integration/
https://bugs.webkit.org/show_bug.cgi?id=217593

Unreviewed, fix two build failures caused by missing #includes. (Forward declarations are
not enough here, we need to #include the necessary header.)

Also, fix an unused function warning when LFC is not enabled.

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-10-11

  • layout/integration/LayoutIntegrationLineIterator.cpp:
  • layout/integration/LayoutIntegrationLineIteratorLegacyPath.h:
  • layout/integration/LayoutIntegrationRunIterator.cpp:
5:16 PM Changeset in webkit [268328] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

-Wreorder in MediaPlayerPrivateRemote.cpp
https://bugs.webkit.org/show_bug.cgi?id=217590

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-10-11
Reviewed by Eric Carlson.

Reorder initializer list to avoid misleading initialization order.

It might be nicer to actually reorder the member variables in the class itself, which would
probably be safe, but that would be a behavior change and I'd rather avoid changing
behavior.

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote):

4:34 PM Changeset in webkit [268327] by commit-queue@webkit.org
  • 20 edits in trunk/Source

Ignore deployment suffix and identifier when computing major OS version for macOS
Big Sur and newer
https://bugs.webkit.org/show_bug.cgi?id=217584
rdar://70168426

Patch by Luming Yin <luming_yin@apple.com> on 2020-10-11
Reviewed by Darin Adler.

Stop using MACOSX_DEPLOYMENT_TARGET:suffix:identifier to compute major OS versions.
Only use the deployment target base for macOS Big Sur and newer. Keep the manual
definitions for legacy versions of macOS.

  • Configurations/Base.xcconfig:
4:11 PM Changeset in webkit [268326] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

-Wunused-param in MediaRecorder.cpp
https://bugs.webkit.org/show_bug.cgi?id=217587

Unreviewed, fix build warning

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-10-11

  • Modules/mediarecorder/MediaRecorder.cpp:

(WebCore::MediaRecorder::isTypeSupported):

2:54 PM Changeset in webkit [268325] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, mark missing custom getter and setters
https://bugs.webkit.org/show_bug.cgi?id=217500

  • tools/JSDollarVM.cpp:
12:16 PM Changeset in webkit [268324] by commit-queue@webkit.org
  • 4 edits
    4 adds in trunk

Various test-cases from Gecko assert with ASSERTION FAILED: tagName == mmultiscriptsTag or ASSERTION FAILED: tagName == mrootTag
https://bugs.webkit.org/show_bug.cgi?id=202804

Patch by Rob Buis <rbuis@igalia.com> on 2020-10-11
Reviewed by Frédéric Wang.

Source/WebCore:

Both rootTypeOf and scriptTypeOf were expecting the qualified name
to have no prefix, however it is possible in xhtml that prefixes are
set, as seen in the Gecko test cases. Failing to detect the qname
would hit an ASSERT in both cases. So use QualifiedName.matches
which ignores prefixes.

Tests: mathml/scripts-with-prefixes.xhtml

mathml/square-roots-with-prefixes.xhtml

  • mathml/MathMLRootElement.cpp:

(WebCore::rootTypeOf):

  • mathml/MathMLScriptsElement.cpp:

(WebCore::scriptTypeOf):

LayoutTests:

Reduce Gecko test crashes into two tests.

  • mathml/scripts-with-prefixes-expected.txt: Added.
  • mathml/scripts-with-prefixes.xhtml: Added.
  • mathml/square-roots-with-prefixes-expected.txt: Added.
  • mathml/square-roots-with-prefixes.xhtml: Added.
11:21 AM Changeset in webkit [268323] by ysuzuki@apple.com
  • 8 edits
    1 add in trunk

[JSC] arguments.callee should become ThrowTypeError if function has non simple parameter list
https://bugs.webkit.org/show_bug.cgi?id=217574

Reviewed by Darin Adler.

JSTests:

  • stress/arguments-and-non-simple-parameters.js: Added.

(shouldBe):
(ThrowTypeError.Object.getOwnPropertyDescriptor):
(testUnmappedArguments):
(testMappedArguments):
(argumentGenerator2.inner):
(argumentGenerator2):
(argumentGenerator3.inner):
(argumentGenerator3):
(argumentGenerator4):
(argumentGenerator5.inner.inner2):
(argumentGenerator5.inner):
(argumentGenerator5):
(argumentGenerator6):
(argumentGenerator7.inner):
(argumentGenerator7):
(argumentGenerator8.inner):
(argumentGenerator8):
(argumentGenerator9.inner):
(argumentGenerator9):
(argumentGenerator10.inner.inner2):
(argumentGenerator10.inner):
(argumentGenerator10):

  • test262/expectations.yaml:

Source/JavaScriptCore:

We should set ThrowTypeError in ClonedArguments when the callee is strict mode or callee has non simple parameter list[1].
We propagate NonSimpleParameterList information from parser and use it when materializing "callee" property of ClonedArguments.

[1]: https://tc39.es/ecma262/#sec-functiondeclarationinstantiation

  • parser/Nodes.h:

(JSC::ScopeNode::isStrictMode const):
(JSC::ScopeNode::usesNonSimpleParameterList const):
(JSC::ScopeNode::setFeatures): Deleted.
(JSC::ScopeNode::setUsesArguments): Deleted.

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseInner):

  • parser/ParserModes.h:
  • runtime/ClonedArguments.cpp:

(JSC::ClonedArguments::getOwnPropertySlot):
(JSC::ClonedArguments::materializeSpecials):

  • runtime/ScriptExecutable.h:

(JSC::ScriptExecutable::usesNonSimpleParameterList const):

11:14 AM Changeset in webkit [268322] by ysuzuki@apple.com
  • 4 edits
    1 add in trunk

[JSC] BigInt constructor should be constructible while it always throws an error
https://bugs.webkit.org/show_bug.cgi?id=217575

Reviewed by Darin Adler.

JSTests:

  • stress/is-constructor.js:
  • stress/non-constructable-constructors.js: Added.

(shouldThrow):

Source/JavaScriptCore:

In terms of the spec, BigInt constructor should be a constructor. So we should put constructBigIntConstructor function instead of nullptr.
But it should always throw a TypeError. Error message looks a bit awkward ("TypeError: function is not a constructor..."), but this looks
most intuitive to users. Note that V8 and SpiderMonkey throw similar messages ("is not a constructor").

  • runtime/BigIntConstructor.cpp:

(JSC::BigIntConstructor::BigIntConstructor):
(JSC::JSC_DEFINE_HOST_FUNCTION):

11:03 AM Changeset in webkit [268321] by Darin Adler
  • 7 edits
    1 add
    4 deletes in trunk

REGRESSION (r267761): editing/mac/spelling/autocorrection-contraction.html is a constant timeout on macOS wk2 Debug
https://bugs.webkit.org/show_bug.cgi?id=217548

Reviewed by Alexey Proskuryakov.

Tools:

  • TestRunnerShared/Bindings/JSBasics.cpp:

(WTR::objectProperty): Use JSValueIsObject instead of JSValueToObject. The latter
function is *very* slow when passed undefined or null, creating an exception object
every time, even when we pass nullptr to indicate that we don't want the exception
object, and also invoking debugging machinery to inform the "inspector" about this
exception, which results in logging to the console while running tests. This
inefficiency is something we can fix in JavaScriptCore if we like, and makes it a
bad idea to call the function on undefined and null. And also points out the problem
with passing exceptions to anyone except the caller: there's no reason the inspector
needs to know about the exception in a case like this. Because the uses of this
function in the test runners don't need that behavior of converting non-object values
to objects, it was best just to stop using JSValueToObject entirely.

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::didReceiveMessageToPage): Use uint64Value here. Just something
missed in my earlier refactoring and spotted while debugging.

LayoutTests:

  • editing/mac/spelling/autocorrection-contraction-expected.html: Added.
  • editing/mac/spelling/autocorrection-contraction-expected.png: Removed.
  • editing/mac/spelling/autocorrection-contraction-expected.txt: Removed.
  • editing/mac/spelling/autocorrection-contraction.html: Simplified this and changed it to a ref test.
  • platform/mac-wk2/editing/mac/spelling/autocorrection-contraction-expected.png: Removed.
  • platform/mac-wk2/editing/mac/spelling/autocorrection-contraction-expected.txt: Removed.
  • platform/win/editing/mac/spelling/autocorrection-contraction-expected.txt: Removed.
  • platform/mac/TestExpectations: Remove failure and timeout expectations for autocorrection-contraction.html.

Both because the slowness in WebKitTestRunner causing the timeout issue was fixed, and because the new
reference test is unlikely to be flaky.

  • platform/wk2/TestExpectations: Removed timeout expectations for two other tests affected by the same

bug in WebKitTestRunner.

9:33 AM Changeset in webkit [268320] by Wenson Hsieh
  • 6 edits in trunk/Source/WebCore

[MotionMark] Computing the fast bounding rect of an arc should not materialize a CGPathRef
https://bugs.webkit.org/show_bug.cgi?id=217563

Reviewed by Darin Adler.

Avoid hitting the slow case when asking for the fast bounding rect of a Path, in the case where the path
consists of a single circular arc. This fast bounding rect is intended to be a conservative way to estimate the
bounds of the path, such that the actual bounds of the path must lie within the bounds of this fast rect. At the
cost of being less accurate, we can make this fast computation much cheaper in the case of a circular arc by
simply returning the bounding rect of the circle containing the arc.

  • platform/graphics/InlinePathData.h:

(WebCore::ArcData::encode const):
(WebCore::ArcData::decode):

Additionally rename what is currently ArcData's offset member to start instead, and hasOffset to
hasStart for clarity. This point optionally provides the starting point of a line segment that is connected to
the circular arc defined by the center point, radius, and start and end angles. Note that this starting point
needs to be included in the fast bounding rect computation for this reason (see above).

  • platform/graphics/Path.cpp:

(WebCore::Path::addArc):
(WebCore::Path::fastBoundingRect const):
(WebCore::Path::fastBoundingRectFromInlineData const):
(WebCore::Path::boundingRectFromInlineData const):

  • platform/graphics/Path.h:
  • platform/graphics/cg/PathCG.cpp:

(WebCore::Path::createCGPath const):

  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::StrokePath::localBounds const):

Also, use the fast bounding rect when estimating localBounds of the StrokePath item; these local bounds are
only used in an optimization that skips display list items during playback, based on the extent of the item, so
it's safe to use extents that are potentially inflated. Using the fast bounding rect also helps in the case of
the more complex paths encountered in the Canvas Paths subtest of MotionMark, where each Path contains multiple
components and cannot be expressed solely with inline path data.

9:12 AM Changeset in webkit [268319] by Jonathan Bedard
  • 4 edits in trunk/Tools

[webkitscmpy] Support json encoding of Commit object
https://bugs.webkit.org/show_bug.cgi?id=217533
<rdar://problem/70151709>

Reviewed by Dewei Zhu.

  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/commit.py:

(Commit.repr): Support identifiers being 0.
(Commit.Encoder): Encode commit as dictionary.

  • Scripts/libraries/webkitscmpy/webkitscmpy/test/commit_unittest.py:
3:26 AM Changeset in webkit [268318] by ysuzuki@apple.com
  • 4 edits in trunk

[JSC] LowerCase when LanguageTag checks duplicate variants
https://bugs.webkit.org/show_bug.cgi?id=217571

Reviewed by Ross Kirsling.

JSTests:

  • stress/intl-language-tag.js:

Source/JavaScriptCore:

Since Unicode LanguageTag is case insensitive, we need to recognize "VARIANT0" and "variant0" are the same language tag variants.
To achieve that, we perform toASCIILower when computing VariantCode.

  • runtime/IntlObject.cpp:

(JSC::parseVariantCode):

1:48 AM Changeset in webkit [268317] by ysuzuki@apple.com
  • 2 edits in trunk/Tools

Unreviewed, fix WK2 Debug test failures
https://bugs.webkit.org/show_bug.cgi?id=217500

WebKitTestRunner also uses WebCoreTestSupport's JIT operations so we need to populate them too.

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::initialize):

Oct 10, 2020:

10:27 PM Changeset in webkit [268316] by ysuzuki@apple.com
  • 27 edits in trunk

[JSC] Assert Operation and HostFunction are in JITOperationsList
https://bugs.webkit.org/show_bug.cgi?id=217500

Reviewed by Saam Barati.

Source/JavaScriptCore:

We make JSC PtrTag more restricted. We add the following information for each PtrTag.

  1. What code target is tagged with this PtrTag? Native or JIT.
  2. What uses this PtrTag when invoking code? Native, JIT, or None.

And we will verify via JIT-caging.

This patch adds HostFunctionPtrTag and sign host functions with it. Previously, it was signed with JSEntryPtrTag,
and this is wrong since it is used for JS entry thunks. And we introduce assertion that function is registered in
JITOperationList when signing function with OperationPtrTag or HostFunctionPtrTag.

We also annotate all operations in testb3 so that testb3 can work with OperationPtrTag / HostFunctionPtrTag assertions.

  • assembler/JITOperationList.cpp:

(JSC::addPointers):

  • assembler/JITOperationList.h:
  • b3/testb3_1.cpp:

(main):

  • b3/testb3_5.cpp:

(JSC_DEFINE_JIT_OPERATION):
(simpleFunction): Deleted.
(functionWithHellaArguments): Deleted.
(functionWithHellaArguments2): Deleted.
(functionWithHellaArguments3): Deleted.
(simpleFunctionDouble): Deleted.
(simpleFunctionFloat): Deleted.
(functionWithHellaDoubleArguments): Deleted.
(functionWithHellaFloatArguments): Deleted.

  • b3/testb3_6.cpp:

(JSC_DEFINE_JIT_OPERATION):
(interpreterPrint): Deleted.

  • b3/testb3_7.cpp:

(JSC_DEFINE_JIT_OPERATION):
(oneFunction): Deleted.
(noOpFunction): Deleted.
(functionNineArgs): Deleted.

  • dfg/DFGOSREntry.cpp:

(JSC::DFG::prepareOSREntry):

  • dfg/DFGOperations.cpp:
  • jit/JITOperations.cpp:
  • jit/ThunkGenerators.cpp:

(JSC::nativeForGenerator):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/JSCPtrTag.cpp:

(JSC::tagForPtr):
(JSC::ptrTagName):

  • runtime/JSCPtrTag.h:

(JSC::tagJSCCodePtrImpl):
(JSC::untagJSCCodePtrImpl):

  • runtime/NativeFunction.h:

(JSC::TaggedNativeFunction::TaggedNativeFunction):
(JSC::TaggedNativeFunction::operator NativeFunction):

  • wasm/WasmOperations.cpp:

(JSC::Wasm::doOSREntry):

Source/WebCore:

  • testing/js/WebCoreTestSupport.cpp:

(WebCoreTestSupport::populateJITOperations):

  • testing/js/WebCoreTestSupport.h:

Source/WTF:

This patch makes tagCodePtr etc. take PtrTag only from template parameter.
As a result, we can easily customize special verification process for specific PtrTag.
By leveraging this feature, we introduce HostFunction / JITOperation assertions for HostFunctionPtrTag and OperationPtrTag.

We also add tagCodePtrWithStackPointerForJITCall and untagCodePtrWithStackPointerForJITCall, they are used only when we need
to tag a pointer with stack pointer which is a dynamic PtrTag.

  • wtf/PtrTag.cpp:

(WTF::tagForPtr):

  • wtf/PtrTag.h:

(WTF::tagNativeCodePtrImpl):
(WTF::untagNativeCodePtrImpl):
(WTF::PtrTagTraits::tagCodePtr):
(WTF::PtrTagTraits::untagCodePtr):
(WTF::registerPtrTagLookup):
(WTF::reportBadTag):
(WTF::removeCodePtrTag):
(WTF::tagCodePtrImpl):
(WTF::tagCodePtr):
(WTF::untagCodePtrImpl):
(WTF::untagCodePtr):
(WTF::retagCodePtrImplHelper):
(WTF::retagCodePtrImpl):
(WTF::retagCodePtr):
(WTF::assertIsCFunctionPtr):
(WTF::isTaggedWith):
(WTF::tagCFunctionPtrImpl):
(WTF::tagCFunctionPtr):
(WTF::tagCFunction):
(WTF::untagCFunctionPtrImpl):
(WTF::untagCFunctionPtr):
(WTF::tagArrayPtr):
(WTF::untagArrayPtr):
(WTF::removeArrayPtrTag):
(WTF::retagArrayPtr):
(WTF::tagCodePtrWithStackPointerForJITCall):
(WTF::untagCodePtrWithStackPointerForJITCall):
(WTF::untagCodePtrImplHelper): Deleted.

Tools:

This patch turned out that WebCoreTestSupport has its own JIT operations. So we need to populate them in test harness specially.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(dumpRenderTree):

  • DumpRenderTree/win/DumpRenderTree.cpp:

(main):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::initialize):

6:30 PM Changeset in webkit [268315] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] Rename LineBox::InlineBox to InlineLevelBox
https://bugs.webkit.org/show_bug.cgi?id=217562

Reviewed by Simon Fraser.

Let's use spec terms (https://www.w3.org/TR/css-inline-3/) where applicable.

InlineLevelBox -> box generated by an inline level element (replaced, non-replaced etc). LineBox contains a list of InlineLevelBoxes.
InlineBox -> A non-replaced InlineLevelBox. The contents of an inline box participate in the

same inline formatting context as the inline box itself (e.g. <span>this content is in the same IFC as the span box</span>).

RootInlineBox -> a special, anonymous inline box for all the IFC content (e.g. <div>this content is part of the root inline box</div>).

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):

  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

(WebCore::Layout::LineBoxBuilder::build):
(WebCore::Layout::LineBoxBuilder::constructInlineLevelBoxes):
(WebCore::Layout::LineBoxBuilder::adjustInlineBoxesLogicalHeight):
(WebCore::Layout::LineBoxBuilder::alignInlineLevelBoxesVerticallyAndComputeLineBoxHeight):
(WebCore::Layout::InlineFormattingContext::Geometry::computedLineLogicalRect const):
(WebCore::Layout::LineBoxBuilder::constructInlineBoxes): Deleted.
(WebCore::Layout::LineBoxBuilder::computeInlineBoxesLogicalHeight): Deleted.
(WebCore::Layout::LineBoxBuilder::alignInlineBoxesVerticallyAndComputeLineBoxHeight): Deleted.

  • layout/inlineformatting/InlineLineBox.cpp:

(WebCore::Layout::LineBox::InlineLevelBox::InlineLevelBox):
(WebCore::Layout::m_type):
(WebCore::Layout::LineBox::addRootInlineBox):
(WebCore::Layout::LineBox::addInlineLevelBox):
(WebCore::Layout::LineBox::logicalRectForTextRun const):
(WebCore::Layout::LineBox::InlineBox::InlineBox): Deleted.
(WebCore::Layout::m_baseline): Deleted.
(): Deleted.
(WebCore::Layout::LineBox::addInlineBox): Deleted.

  • layout/inlineformatting/InlineLineBox.h:

(WebCore::Layout::LineBox::InlineLevelBox::isInlineBox const):
(WebCore::Layout::LineBox::inlineLevelBoxForLayoutBox const):
(WebCore::Layout::LineBox::inlineLevelBoxList const):
(WebCore::Layout::LineBox::containsInlineLevelBox const):
(WebCore::Layout::LineBox::rootInlineBox):
(WebCore::Layout::LineBox::nonRootInlineLevelBoxes const):
(WebCore::Layout::LineBox::inlineLevelBoxForLayoutBox):
(WebCore::Layout::LineBox::InlineLevelBox::createRootInlineBox):
(WebCore::Layout::LineBox::InlineLevelBox::createAtomicInlineLevelBox):
(WebCore::Layout::LineBox::InlineLevelBox::createInlineBox):
(WebCore::Layout::LineBox::InlineBox::logicalRect const): Deleted.
(WebCore::Layout::LineBox::InlineBox::logicalTop const): Deleted.
(WebCore::Layout::LineBox::InlineBox::logicalBottom const): Deleted.
(WebCore::Layout::LineBox::InlineBox::logicalLeft const): Deleted.
(WebCore::Layout::LineBox::InlineBox::logicalWidth const): Deleted.
(WebCore::Layout::LineBox::InlineBox::logicalHeight const): Deleted.
(WebCore::Layout::LineBox::InlineBox::baseline const): Deleted.
(WebCore::Layout::LineBox::InlineBox::descent const): Deleted.
(WebCore::Layout::LineBox::InlineBox::isEmpty const): Deleted.
(WebCore::Layout::LineBox::InlineBox::setIsNonEmpty): Deleted.
(WebCore::Layout::LineBox::InlineBox::lineSpacing const): Deleted.
(WebCore::Layout::LineBox::InlineBox::fontMetrics const): Deleted.
(WebCore::Layout::LineBox::InlineBox::layoutBox const): Deleted.
(WebCore::Layout::LineBox::InlineBox::setLogicalTop): Deleted.
(WebCore::Layout::LineBox::InlineBox::setLogicalWidth): Deleted.
(WebCore::Layout::LineBox::InlineBox::setLogicalHeight): Deleted.
(WebCore::Layout::LineBox::InlineBox::setBaseline): Deleted.
(WebCore::Layout::LineBox::InlineBox::setDescent): Deleted.
(WebCore::Layout::LineBox::InlineBox::setLineSpacing): Deleted.
(WebCore::Layout::LineBox::inlineBoxForLayoutBox const): Deleted.
(WebCore::Layout::LineBox::inlineBoxList const): Deleted.
(WebCore::Layout::LineBox::nonRootInlineBoxes const): Deleted.
(WebCore::Layout::LineBox::inlineBoxForLayoutBox): Deleted.
(WebCore::Layout::LineBox::InlineBox::createBoxForRootInlineBox): Deleted.
(WebCore::Layout::LineBox::InlineBox::createBoxForAtomicInlineLevelBox): Deleted.
(WebCore::Layout::LineBox::InlineBox::createBoxForInlineBox): Deleted.

1:39 PM Changeset in webkit [268314] by Darin Adler
  • 5 edits in trunk

replaceChildren() (with no arguments) silently does nothing rather than removing the children
https://bugs.webkit.org/show_bug.cgi?id=217537

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/dom/nodes/ParentNode-replaceChildren-expected.txt:
  • web-platform-tests/dom/nodes/ParentNode-replaceChildren.html:

Added a test of replaceChildren without any argument, on a parent having a child.

Source/WebCore:

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::replaceChildren): Removed incorrect early return when the
node is null, instead added some null checks around the parts of the algorithm that
should be skipped in that case.

12:49 PM Changeset in webkit [268313] by weinig@apple.com
  • 26 edits in trunk/Source

Use WebPreference definitions from shared configuration files in WebCore (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=217551

Reviewed by Darin Adler.

Source/WebCore:

This begins using the WebPreferences*.yaml files for the generation of
WebCore's Settings and InternalSettings classes. In this first part, we
only are moving settings that already exist in the WebPreferences*.yaml
files. A subsequent change will migrate the remaining additional settings
over.

  • Configurations/WebCore.xcconfig:

Add variable (already used by WebKit) to access the WTF build scripts
directory for access to the WebPreferences*.yaml files in DerivedSources.make

  • DerivedSources-input.xcfilelist:

Update with new input files, the WebPreferences*.yaml files.

  • WebCoreMacros.cmake:
  • DerivedSources.make:

Update GenerateSettings.rb call with new parameters.

  • Scripts/GenerateSettings.rb:

Adds support for generating Settings based on preferences in the
WebPreferences*.yaml files while maintaining support for the additional
settings from Settings.yaml. Adds support for a new key, 'webcoreImplementation'
to continue supporting custom implementations in SettingsBase.

  • Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb:
  • Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb:
  • Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb:
  • Scripts/SettingsTemplates/Settings.cpp.erb:
  • Scripts/SettingsTemplates/Settings.h.erb:

Update to account for new names (@allSettingsSet) and differentiation
between custom and non-custom implementations.

  • editing/EditorCommand.cpp:
  • page/Frame.cpp:

Update for new name. DOMPasteAllowed -> domPasteAllowed, which matches convention.

  • page/Settings.yaml:

Moved settings that were bound by WebPreferences to WebPreferences. Sorted remaining
ones left.

  • page/SettingsDefaultValues.h:

Remove defaults that were the same on all platforms. These are now hardcoded in
WebPreferences.

  • style/StyleFontSizeFunctions.cpp:

(WebCore::Style::fontSizeForKeyword):
Add explicit type, now that minimumLogicalFontSize is a double, not an int in WebCore
(it was already a double at the WebKit/WebKitLegacy level).

Source/WebKit:

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::sendViewportAttributesChanged):
Add explicit type to support layoutFallbackWidth now being an unsigned int
in Settings (it was already an unsigned int at the WebKit level).

Source/WTF:

This begins using the WebPreferences*.yaml files for the generation of
WebCore's Settings and InternalSettings classes. In this first part, we
only are moving settings that already exist in the WebPreferences*.yaml
files. A subsequent change will migrate the remaining additional settings
over.

To do this we must add default values for 'WebCore', which are unfortunately
still needed for things like the empty client based SVGImage and sanitizing
web content functionality. We only need default WebCore values for preferences
that are bound to WebCore::Settings. It would be good to eliminate the need
for these eventually, but that is not a goal of this change.

This also adds some new keys from WebCore's Settings.yaml:

  • 'webcoreOnChange: *' called by WebCore::Settings when the setting changes.
  • 'inspectorOverride: true' used to allow the inspector to override the setting.
  • 'webcoreImplementation: custom' used to indicate that WebCore::SettingsBase implements the setting.
  • 'webcoreGetter: *' used to provide an alternate name for the getter in WebCore::Settings.
  • 'webcoreExcludeFromInternalSettings: true' used to exclude from WebCore's InternalSettings bindings.
  • Scripts/GeneratePreferences.rb:

Adds check that if the preference is bound to WebCore, it includes defaults for all
three front generators, 'WebKit', WebKitLegacy', and 'WebCore'.

  • Scripts/Preferences/WebPreferences.yaml:
  • Scripts/Preferences/WebPreferencesDebug.yaml:
  • Scripts/Preferences/WebPreferencesExperimental.yaml:
  • Scripts/Preferences/WebPreferencesInternal.yaml:

Migrates defaults and additional keys from Settings.yaml.

12:46 PM Changeset in webkit [268312] by Adrian Perez de Castro
  • 11 edits in trunk/Source

[GTK] Build broken with ENABLE_GAMEPAD enabled
https://bugs.webkit.org/show_bug.cgi?id=217226

Reviewed by Darin Adler.

Source/WebCore:

No new tests needed.

  • Headers.cmake: List SharedGamepadValue.h in WebCore_PRIVATE_FRAMEWORK_HEADERS, which

was missing.

  • platform/gamepad/EmptyGamepadProvider.h: Mark class as final, because the destructor

is final itself.

  • platform/gamepad/manette/ManetteGamepad.cpp:

(WebCore::ManetteGamepad::ManetteGamepad): Adapt to use SharedGamepadValue.
(WebCore::ManetteGamepad::buttonPressedOrReleased): Ditto.
(WebCore::ManetteGamepad::absoluteAxisChanged): Ditto.

  • platform/gamepad/manette/ManetteGamepad.h: Ditto.
  • platform/gamepad/manette/ManetteGamepadProvider.cpp: Rename m_connectionDelayTimer

to m_initialGamepadsConnectedTimer, which better reflects the usage and also makes the
provider a bit more similar to HIDGamepadProvider (from the Mac port). Arrange to use
the EventMakesGamepadsVisible flag.
(WebCore::ManetteGamepadProvider::ManetteGamepadProvider): Remove the loop that iterates
over the pre-detected gamepads because they are being added too early before any client
has had the chance to be attached.
(WebCore::ManetteGamepadProvider::startMonitoringGamepads): The loop that iterates and
adds pre-detected gamepads is moved here, once there is at least a client. This solves
hitting an assertion later on when UIGamepadProvider checks that the number of gamepads
it has been notified of matches the amount tracked by ManetteGamepadProvider.
(WebCore::ManetteGamepadProvider::stopMonitoringGamepads):
(WebCore::ManetteGamepadProvider::deviceConnected):
(WebCore::ManetteGamepadProvider::deviceDisconnected):
(WebCore::ManetteGamepadProvider::initialGamepadsConnectedTimerFired):
(WebCore::ManetteGamepadProvider::inputNotificationTimerFired):

  • platform/gamepad/manette/ManetteGamepadProvider.h: Ditto.

Source/WebKit:

  • UIProcess/Gamepad/UIGamepadProvider.h: Mark class as final, because the destructor is

final itself.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::numberOfConnectedGamepadsForTesting): Reorganize PLATFORM(MAC)
guards to use GameControllerGamepadProvider only on macOS, as it is unavailable on other
ports.

  • WebProcess/Gamepad/WebGamepadProvider.h: Mark class as final, because the destructor

is final itself.

12:42 PM Changeset in webkit [268311] by Simon Fraser
  • 5 edits in trunk/Source/WebCore

[LFC Display] Only dump the trees when the log channel is enabled
https://bugs.webkit.org/show_bug.cgi?id=217560

Reviewed by Zalan Bujtas.

Only dump the layout and display trees when the FormattingContextLayout log channel
is enabled. Add ability to get the trees as a String for logging.

  • display/DisplayTreeBuilder.cpp:

(WebCore::Display::TreeBuilder::build const):
(WebCore::Display::displayTreeAsText):
(WebCore::Display::showDisplayTree):

  • display/DisplayTreeBuilder.h:
  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::layoutTreeAsText):
(WebCore::Layout::showLayoutTree):

  • layout/layouttree/LayoutTreeBuilder.h:
5:50 AM Changeset in webkit [268310] by Oriol Brufau
  • 2 edits
    1 delete in trunk/LayoutTests

Fix mac expectations for text-selection.html
https://bugs.webkit.org/show_bug.cgi?id=217475

Reviewed by Alexey Proskuryakov.

In Mojave this test produces a different result than in other platforms.
r268233 already added a Mojave-specific expected.txt, this patch removes
the failure from TestExpectations and removes the Mac-specific
expected.txt, which is identical to the non-platform-specific one.

  • platform/mac/TestExpectations:
  • platform/mac/imported/w3c/web-platform-tests/css/css-pseudo/text-selection-expected.txt: Removed.
5:49 AM Changeset in webkit [268309] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][Integration] Turn parent/first child check into establishesInlineFormattingContext in canUseForLineLayoutWithReason
https://bugs.webkit.org/show_bug.cgi?id=217545

Reviewed by Antti Koivisto.

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForLineLayoutWithReason):

  • layout/integration/LayoutIntegrationCoverage.h:

Oct 9, 2020:

9:37 PM Changeset in webkit [268308] by jer.noble@apple.com
  • 5 edits in trunk/Source/WebCore

[Mac] AirPlay menu does not show up when AirPlay button is clicked
https://bugs.webkit.org/show_bug.cgi?id=217536
<rdar://problem/69973777>

Reviewed by Eric Carlson.

Source/WebCore:

PAL tries to soft-link the AVRoutePickerView from the AVFoundation framework, rather than the (correct)
AVKit framework. Remove AVRoutePickerView from AVFoundationSoftLink.h and use the already declared version
inside AVRoutePickerViewTargetPicker.mm.

  • platform/graphics/avfoundation/objc/AVRoutePickerViewTargetPicker.mm:

(WebCore::AVRoutePickerViewTargetPicker::isAvailable):

Source/WebCore/PAL:

  • pal/cocoa/AVFoundationSoftLink.h:
  • pal/cocoa/AVFoundationSoftLink.mm:
9:12 PM Changeset in webkit [268307] by Alan Bujtas
  • 7 edits
    1 delete in trunk/Source/WebCore

[LFC][Display] Remove the WK1-only display painter
https://bugs.webkit.org/show_bug.cgi?id=217553

Reviewed by Simon Fraser.

This is replaced by /WebCode/display/css/DisplayCSSPainter.

  • CMakeLists.txt:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • layout/LayoutContext.cpp:

(WebCore::Layout::LayoutContext::paint): Deleted.

  • layout/LayoutContext.h:
  • layout/displaytree/DisplayPainter.cpp: Removed.
  • layout/displaytree/DisplayPainter.h: Removed.
  • page/FrameView.cpp:

(WebCore::FrameView::paintContents):

7:47 PM Changeset in webkit [268306] by Kocsen Chung
  • 1 copy in tags/Safari-610.3.1

Tag Safari-610.3.1.

6:32 PM Changeset in webkit [268305] by Hector Lopez
  • 2 edits
    1 add in trunk/LayoutTests

[ macOS wk2 Debug ] editing/mac/spelling/autocorrection-contraction.html is a constant timeout
https://bugs.webkit.org/show_bug.cgi?id=217548

Unreviewed test gardening.

  • platform/mac/TestExpectations:
5:41 PM Changeset in webkit [268304] by mmaxfield@apple.com
  • 4 edits in trunk/Source/WebCore

[GPU Process] Delete DisplayList::DrawGlyphs::m_blockLocation because it's always 0
https://bugs.webkit.org/show_bug.cgi?id=217541

Reviewed by Wenson Hsieh.

There's no reason for it to exist.

No new tests because there is no behavior change.

  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::DrawGlyphs::DrawGlyphs):
(WebCore::DisplayList::DrawGlyphs::computeBounds):
(WebCore::DisplayList::DrawGlyphs::localBounds const):
(WebCore::DisplayList::operator<<):

  • platform/graphics/displaylists/DisplayListItems.h:

(WebCore::DisplayList::DrawGlyphs::create):
(WebCore::DisplayList::DrawGlyphs::localAnchor const):
(WebCore::DisplayList::DrawGlyphs::anchorPoint const):
(WebCore::DisplayList::DrawGlyphs::encode const):
(WebCore::DisplayList::DrawGlyphs::decode):
(WebCore::DisplayList::DrawGlyphs::blockLocation const): Deleted.
(WebCore::DisplayList::DrawGlyphs::setBlockLocation): Deleted.

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::drawGlyphs):

5:20 PM Changeset in webkit [268303] by Hector Lopez
  • 2 edits in trunk/LayoutTests

[ macOS ] webaudio/OfflineAudioContext/onstatechange.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=217543

Unreviewed test gardening.

  • platform/mac/TestExpectations:
5:17 PM Changeset in webkit [268302] by Kocsen Chung
  • 1 copy in tags/Safari-610.2.11.1.1

Tag Safari-610.2.11.1.1.

5:10 PM Changeset in webkit [268301] by Hector Lopez
  • 2 edits in trunk/LayoutTests

REGRESSION(r268161?): [ macOS ] imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/processing-after-resume.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=217542

Unreviewed test gardening.

  • platform/mac/TestExpectations:
5:08 PM Changeset in webkit [268300] by mmaxfield@apple.com
  • 3 edits in trunk/Source/WebCore

[GPU Process] Mechanical cleanup in DisplayListRecorder
https://bugs.webkit.org/show_bug.cgi?id=217539

Reviewed by Sam Weinig.

Move duplicated code into a helper function.

No new tests because there is no behavior change.

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::drawGlyphs):
(WebCore::DisplayList::Recorder::drawImage):
(WebCore::DisplayList::Recorder::drawTiledImage):
(WebCore::DisplayList::Recorder::drawNativeImage):
(WebCore::DisplayList::Recorder::drawPattern):
(WebCore::DisplayList::Recorder::beginTransparencyLayer):
(WebCore::DisplayList::Recorder::drawRect):
(WebCore::DisplayList::Recorder::drawLine):
(WebCore::DisplayList::Recorder::drawLinesForText):
(WebCore::DisplayList::Recorder::drawDotsForDocumentMarker):
(WebCore::DisplayList::Recorder::drawEllipse):
(WebCore::DisplayList::Recorder::drawPath):
(WebCore::DisplayList::Recorder::drawFocusRing):
(WebCore::DisplayList::Recorder::fillRect):
(WebCore::DisplayList::Recorder::fillRoundedRect):
(WebCore::DisplayList::Recorder::fillRectWithRoundedHole):
(WebCore::DisplayList::Recorder::fillPath):
(WebCore::DisplayList::Recorder::fillEllipse):
(WebCore::DisplayList::Recorder::strokeRect):
(WebCore::DisplayList::Recorder::strokePath):
(WebCore::DisplayList::Recorder::strokeEllipse):
(WebCore::DisplayList::Recorder::clearRect):
(WebCore::DisplayList::Recorder::appendItemAndUpdateExtent):

  • platform/graphics/displaylists/DisplayListRecorder.h:
4:39 PM Changeset in webkit [268299] by Wenson Hsieh
  • 11 edits in trunk

[GPU Process] Add additional support for painting video elements to 2D contexts
https://bugs.webkit.org/show_bug.cgi?id=217532

Reviewed by Tim Horton.

Source/WebCore:

Add support for using video elements as sources for createImageBitmap and createPattern by ensuring that
we use display-list-backed image buffers for painting when using the GPU process for media. See below for more
details.

Tests: fast/canvas/canvas-createPattern-video-loading.html

fast/canvas/canvas-createPattern-video-modify.html
imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/canvas-createImageBitmap-video-resize.html
imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-drawImage.html
imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-flipY.html

  • html/HTMLVideoElement.cpp:

(WebCore::HTMLVideoElement::createBufferForPainting const):

  • html/HTMLVideoElement.h:

Add a helper function to create an ImageBuffer compatible with this video element, for the purpose of
painting video frames. In particular, if GPU process for media is enabled, we'll create a display-list-backed
remote image buffer.

  • html/ImageBitmap.cpp:

(WebCore::ImageBitmap::createPromise):

Call into HTMLVideoElement::createBufferForPainting to construct the ImageBuffer.

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::createPattern):

Call into HTMLVideoElement::createBufferForPainting to construct the ImageBuffer.

  • platform/graphics/RenderingMode.h:

Add a "purpose" enum value for media painting.

  • platform/graphics/displaylists/DisplayListImageBuffer.h:

Adjust this to avoid forcing the platform context to be created in the case where there are no display list
items to flush. Needed to avoid crashing when creating CanvasPattern with a video element.

Source/WebKit:

See WebCore/ChangeLog for more details.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::shouldUseRemoteRenderingFor):

LayoutTests:

Unskip several layout tests that pass after this change.

  • gpu-process/TestExpectations:
4:34 PM Changeset in webkit [268298] by Hector Lopez
  • 2 edits in trunk/LayoutTests

imported/w3c/web-platform-tests/mediacapture-record/idlharness.window.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=217525

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
4:26 PM Changeset in webkit [268297] by Karl Rackler
  • 2 edits in trunk/LayoutTests

REGRESSION (r266972): [ Mojave+ debug wk2 ] compositing/animation/repaint-after-clearing-shared-backing.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=217540

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
4:17 PM Changeset in webkit [268296] by Hector Lopez
  • 2 edits in trunk/LayoutTests

[ iOS Debug ] imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-stop.html is a constant timeout
https://bugs.webkit.org/show_bug.cgi?id=217538

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
4:06 PM Changeset in webkit [268295] by Kocsen Chung
  • 1 copy in tags/Safari-611.1.3

Tag Safari-611.1.3.

4:02 PM Changeset in webkit [268294] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][Integration] Enable overflow hidden.
https://bugs.webkit.org/show_bug.cgi?id=217488

Reviewed by Antti Koivisto.

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForStyle):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::collectOverflow):

3:24 PM Changeset in webkit [268293] by Jonathan Bedard
  • 3 edits in trunk/Tools

[webkitscmpy] Handle svn info run from directory
https://bugs.webkit.org/show_bug.cgi?id=217521
<rdar://problem/70144173>

Reviewed by Dewei Zhu.

  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py:

(Svn.init): Set the root_path, so that svn info is run from the top level.
(Svn.info): Rely on root_path, not path.
(Svn.root_path): Use self._root_path instead of self.info() call.
(Svn.list): Rely on root_path, not path.
(Svn._cache_revisions): Ditto.
(Svn.remote): The repository root will not change during a single command invocation.
(Svn._branch_for): Handle initial branch commits, which. may have non-standard change lists.
(Svn.commit): Rely on root_path, not path, certain svn info calls will not change during
the invocation of a single program.

3:15 PM Changeset in webkit [268292] by Peng Liu
  • 3 edits in trunk/Source/WebKit

[Media in GPU Process] Enable audio routing arbitration on Mac
https://bugs.webkit.org/show_bug.cgi?id=217528

Reviewed by Eric Carlson.

Use the audio routing arbitration implementation in the Web process and UI process
before moving AudioSessionRoutingArbitratorProxy to the GPU process (which will
require some sandbox changes).

  • WebProcess/GPU/media/RemoteAudioSession.cpp:

(WebKit::RemoteAudioSession::setCategory):
(WebKit::RemoteAudioSession::category const):

  • WebProcess/GPU/media/RemoteAudioSession.h:
2:48 PM Changeset in webkit [268291] by Kocsen Chung
  • 1 copy in tags/Safari-610.2.11.0.1

Tag Safari-610.2.11.0.1.

2:45 PM Changeset in webkit [268290] by Ryan Haddad
  • 2 edits in trunk/Source/WebKit

Promote WKWebView media playback SPI to API
https://bugs.webkit.org/show_bug.cgi?id=217335

Unreviewed build fix for macCatalyst.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::isUserFacingChanged):

2:32 PM Changeset in webkit [268289] by Russell Epstein
  • 1 edit in branches/safari-610.2.11.1-branch/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.h

Unreviewed build fix, rdar://problem/70142496

2:07 PM Changeset in webkit [268288] by Ryan Haddad
  • 12 edits
    1 delete in trunk/Source

Unreviewed, reverting r267539.

Causes WebContent process crash in certain configurations

Reverted changeset:

"Add libwebrtc.dylib version check"
https://bugs.webkit.org/show_bug.cgi?id=216884
https://trac.webkit.org/changeset/267539

1:56 PM Changeset in webkit [268287] by Simon Fraser
  • 9 edits
    2 adds in trunk/Source

Refactor wheel event coalescing into its own class
https://bugs.webkit.org/show_bug.cgi?id=217523

Reviewed by Sam Weinig.
Source/WebCore:

Export the TextStream outputter.

  • platform/PlatformWheelEvent.h:

Source/WebKit:

WebPageProxy had some confusing code for coalescing wheel events, first added in r116466.
To prepare this code for partial re-use in another place, factor it into its own class, WebWheelEventCoalescer.

WebWheelEventCoalescer holds a queue of pending NativeWebWheelEvents, and a queue of sequences of
NativeWebWheelEvents, where each sequence has been coalesced into a single WebWeelEvent which was
sent to the Web Process.

When the UI process receives a message back from the Web Process, it calls takeOldestEventBeingProcessed()
which removes the first sequence from m_eventsBeingProcessed. This code has to track NativeWebWheelEvents, because
we need to dig the NSEvent out of the NativeWebWheelEvent at this stage.

  • Platform/Logging.h: Add a WheelEvents log channel.
  • Shared/NativeWebWheelEvent.h:
  • Shared/WebWheelEventCoalescer.cpp: Added.

(WebKit::operator<<):
(WebKit::WebWheelEventCoalescer::canCoalesce):
(WebKit::WebWheelEventCoalescer::coalesce):
(WebKit::WebWheelEventCoalescer::shouldDispatchEventNow const):
(WebKit::WebWheelEventCoalescer::nextEventToDispatch):
(WebKit::WebWheelEventCoalescer::shouldDispatchEvent):
(WebKit::WebWheelEventCoalescer::takeOldestEventBeingProcessed):
(WebKit::WebWheelEventCoalescer::clear):

  • Shared/WebWheelEventCoalescer.h: Added.

(WebKit::WebWheelEventCoalescer::hasEventsBeingProcessed const):

  • Sources.txt:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::handleWheelEvent):
(WebKit::WebPageProxy::wheelEventCoalescer):
(WebKit::WebPageProxy::didReceiveEvent):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
(WebKit::canCoalesce): Deleted.
(WebKit::coalesce): Deleted.
(WebKit::coalescedWheelEvent): Deleted.
(WebKit::WebPageProxy::processNextQueuedWheelEvent): Deleted.
(WebKit::WebPageProxy::shouldProcessWheelEventNow const): Deleted.

  • UIProcess/WebPageProxy.h:
  • WebKit.xcodeproj/project.pbxproj:
1:53 PM Changeset in webkit [268286] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

REGRESSION: [Mac Release] 2 Cookie API are failing
https://bugs.webkit.org/show_bug.cgi?id=217393

Patch by Alex Christensen <achristensen@webkit.org> on 2020-10-09
Reviewed by Chris Dumez.

If bad things happen when running API tests, the TestWebKitAPI default cookie storage can get stuck with
a cookie accept policy of never, which causes future tests to fail. All existing tests restore the cookie
accept policy to what it was before the test started, but once a machine gets into a bad state, there's nothing
to reset it to the default state. Some of our test bots have gotten into this bad state, causing 2 cookie API
tests to fail. To fix this, set the cookie accept policy to its default value before running these two tests.
I verified this works by getting my computer into this bad state, verifying repeated API test runs don't fix it,
and verified this brings the computer back into a good state and causes the API tests to pass again.

  • TestWebKitAPI/Tests/WebKitCocoa/CookiePrivateBrowsing.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:

(TestWebKitAPI::TEST):

1:05 PM Changeset in webkit [268285] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][Integration] Overflow clip blocks visual overflow
https://bugs.webkit.org/show_bug.cgi?id=217526

Reviewed by Antti Koivisto.

This is in preparation for enabling 'overflow: hidden' for IFC.

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::collectOverflow):

1:04 PM Changeset in webkit [268284] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Enable WeakRefs/FinalizationRegistries by default.
https://bugs.webkit.org/show_bug.cgi?id=215789

Reviewed by Yusuke Suzuki.

  • runtime/OptionsList.h:
1:03 PM Changeset in webkit [268283] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][Integration] Expand the line content width with the caret when applicable
https://bugs.webkit.org/show_bug.cgi?id=217527

Reviewed by Antti Koivisto.

This patch is in preparation for enabling 'overflow: hidden' for IFC.

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::constructContent):

1:02 PM Changeset in webkit [268282] by Russell Epstein
  • 12 edits
    1 delete in branches/safari-611.1.3-branch/Source

Revert r267539. rdar://problem/70148261

12:55 PM Changeset in webkit [268281] by Fujii Hironori
  • 5 edits in trunk

[WinCairo][GraphicsLayerTextureMapper] backdrop-filter support
https://bugs.webkit.org/show_bug.cgi?id=217081

Reviewed by Don Olmstead.

.:

  • Source/cmake/OptionsWin.cmake: Turn ENABLE_FILTERS_LEVEL_2 on for WinCairo.

Source/WebCore:

r264968 added TextureMapper backdrop-filter support for
Coordinated Graphics. This change enables it for
GraphicsLayerTextureMapper.

Existing backdrop-filter tests cover this change, but WinCairo DRT
and WTR don't support pixel dump in AC mode yet (Bug 215041).

  • platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:

(WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
(WebCore::GraphicsLayerTextureMapper::flushCompositingState):
(WebCore::GraphicsLayerTextureMapper::setBackdropFilters):
(WebCore::GraphicsLayerTextureMapper::setBackdropFiltersRect):

  • platform/graphics/texmap/GraphicsLayerTextureMapper.h:
12:51 PM Changeset in webkit [268280] by Fujii Hironori
  • 3 edits in trunk/Source/WebCore

[WinCairo][GraphicsLayerTextureMapper] Image layers are entirely clipped since r260174
https://bugs.webkit.org/show_bug.cgi?id=217507

Reviewed by Don Olmstead.

r260174 added contentsClippingRect to TextureMapperLayer::State to
clip the content. However, it implemented setContentsClippingRect
only for CoordinatedGraphicsLayer but for
GraphicsLayerTextureMapper. Because the initial value of
contentsClippingRect is empty, entire image layers are clipped in
GraphicsLayerTextureMapper.

Existing compositing/images tests covers this change, but WinCairo
DRT and WTR don't support pixel dump in AC mode at the moment (Bug 215041).

  • platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:

(WebCore::GraphicsLayerTextureMapper::setContentsClippingRect): Added.
(WebCore::GraphicsLayerTextureMapper::commitLayerChanges):

  • platform/graphics/texmap/GraphicsLayerTextureMapper.h:
12:49 PM Changeset in webkit [268279] by Russell Epstein
  • 2 edits in branches/safari-611.1.3-branch/Source/WebKit

Cherry-pick r268273. rdar://problem/70148870

Change RELEASE_ASSERT to ASSERT in networkProcessesSet
https://bugs.webkit.org/show_bug.cgi?id=217524
<rdar://problem/70115841>

Reviewed by Tim Horton.

  • UIProcess/Network/NetworkProcessProxy.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268273 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12:35 PM Changeset in webkit [268278] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[GPU Process] Use correct GPU runtime settings when creating the dynamic IOKit sandbox extensions for the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=217491
<rdar://problem/70066087>

Reviewed by Youenn Fablet.

Currently, the creation of the dynamic IOKit sandbox extensions for the WebContent process is incorrectly using the same GPU
runtime settings as when creating Media related dynamic mach-lookup extensions. There are several other GPU runtime flags
that needs to be checked before creating the extensions.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):

12:34 PM Changeset in webkit [268277] by Chris Fleizach
  • 2 edits in trunk/Source/WebKit

AX: Mark malware safe browser as a header for VoiceOver
https://bugs.webkit.org/show_bug.cgi?id=217505

Reviewed by Sam Weinig.

Mark this UI element as a header for VoiceOver on iOS.

  • UIProcess/Cocoa/WKSafeBrowsingWarning.mm:

(makeLabel):

12:33 PM Changeset in webkit [268276] by Aditya Keerthi
  • 6 edits
    7 adds in trunk

[macOS] Add editability to input type=month
https://bugs.webkit.org/show_bug.cgi?id=217481
<rdar://problem/70097164>

Reviewed by Sam Weinig.

Source/WebCore:

This patch adds editability to input type=month by leveraging existing
logic to add editable components to date/time inputs.

Tests: fast/forms/month/month-editable-components/month-editable-components-focus-and-blur-events.html

fast/forms/month/month-editable-components/month-editable-components-keyboard-events.html
fast/forms/month/month-editable-components/month-editable-components-mouse-events.html

  • html/MonthInputType.cpp:

(WebCore::MonthInputType::formatDateTimeFieldsState const):
(WebCore::MonthInputType::setupLayoutParameters const):

  • platform/text/cocoa/LocaleCocoa.mm:

(WebCore::LocaleCocoa::shortMonthFormat):

Update presented month format string to match AppKit.

LayoutTests:

  • TestExpectations:
  • fast/forms/month/month-editable-components/month-editable-components-focus-and-blur-events-expected.txt: Added.
  • fast/forms/month/month-editable-components/month-editable-components-focus-and-blur-events.html: Added.
  • fast/forms/month/month-editable-components/month-editable-components-keyboard-events-expected.txt: Added.
  • fast/forms/month/month-editable-components/month-editable-components-keyboard-events.html: Added.
  • fast/forms/month/month-editable-components/month-editable-components-mouse-events-expected.txt: Added.
  • fast/forms/month/month-editable-components/month-editable-components-mouse-events.html: Added.
  • platform/mac-wk2/TestExpectations:
12:19 PM Changeset in webkit [268275] by Jonathan Bedard
  • 4 edits in trunk/Tools

[webkitscmpy] Support unicode contributor names
https://bugs.webkit.org/show_bug.cgi?id=217520
<rdar://problem/70143490>

Reviewed by Dewei Zhu.

  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/contributor.py:

(Contributor.init): Standardize name and emails as unicode.
(Contributor.repr): Ensure native string representation.

  • Scripts/libraries/webkitscmpy/webkitscmpy/test/contributor_unittest.py:

(TestContributor):
(TestContributor.test_unicode):

12:15 PM Changeset in webkit [268274] by Hector Lopez
  • 2 edits in trunk/LayoutTests

ASSERTION FAILED: REGRESSION(r268052?): WTF::CompletionHandler<void ()>::~CompletionHandler(): Completion handler should always be called !m_function
https://bugs.webkit.org/show_bug.cgi?id=217525

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
11:52 AM Changeset in webkit [268273] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Change RELEASE_ASSERT to ASSERT in networkProcessesSet
https://bugs.webkit.org/show_bug.cgi?id=217524
<rdar://problem/70115841>

Reviewed by Tim Horton.

  • UIProcess/Network/NetworkProcessProxy.cpp:
11:40 AM Changeset in webkit [268272] by Russell Epstein
  • 6 edits in branches/safari-610.2.11.1-branch/Source

Cherry-pick r268003. rdar://problem/70142496

Make NetscapePlugInStreamLoaderClient a weak pointer on NetscapePlugInStreamLoader
<https://webkit.org/b/217237>
<rdar://problem/69776714>

Reviewed by Alex Christensen.

Source/WebCore:

Could not write a test since reproducing a crash requires
rapidly reloading a URL to a PDF at random points during the
previous load.

Make NetscapePlugInStreamLoaderClient a WeakPtr on
NetscapePlugInStreamLoader, and add nullptr checks for
NetscapePlugInStreamLoader.m_client as needed.

  • loader/NetscapePlugInStreamLoader.cpp: (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader): (WebCore::NetscapePlugInStreamLoader::willSendRequest): (WebCore::NetscapePlugInStreamLoader::didReceiveResponse): (WebCore::NetscapePlugInStreamLoader::didReceiveDataOrBuffer): (WebCore::NetscapePlugInStreamLoader::didFinishLoading): (WebCore::NetscapePlugInStreamLoader::didFail): (WebCore::NetscapePlugInStreamLoader::willCancel):
  • loader/NetscapePlugInStreamLoader.h:

Source/WebKit:

Making NetscapePlugInStreamLoaderClient inherit from
CanMakeWeakPtr<> caused PDFPlugin to fail to compile because one
of its parent classes already inherited from CanMakeWeakPtr<>.
To fix this, extract a PDFPluginStreamLoaderClient class from
PDFPlugin and link the lifetime of PDFPluginStreamLoaderClient
to PDFPlugin.

After moving the NetscapePlugInStreamLoaderClient virtual
methods from PDFPlugin to PDFPluginStreamLoaderClient, add some
simple methods to PDFPlugin so that PDFPluginStreamLoaderClient
doesn't access the instance variables directly. Also make use
of these new methods in other parts of PDFPlugin.

  • WebProcess/Plugins/PDF/PDFPlugin.h: (WebKit::PDFPlugin::documentFinishedLoading): Add. (WebKit::PDFPlugin::identifierForLoader): Add. (WebKit::PDFPlugin::removeOutstandingByteRangeRequest): Add. (WebKit::PDFPlugin::PDFPluginStreamLoaderClient): Add class.
  • WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::PDFPlugin): (WebKit::PDFPlugin::receivedNonLinearizedPDFSentinel): (WebKit::PDFPlugin::getResourceBytesAtPosition): (WebKit::PDFPlugin::PDFPluginStreamLoaderClient::willSendRequest): Move from PDFPlugin. (WebKit::PDFPlugin::PDFPluginStreamLoaderClient::didReceiveResponse): Ditto. (WebKit::PDFPlugin::PDFPluginStreamLoaderClient::didReceiveData): Ditto. (WebKit::PDFPlugin::PDFPluginStreamLoaderClient::didFail): Ditto. (WebKit::PDFPlugin::PDFPluginStreamLoaderClient::didFinishLoading): Ditto. (WebKit::PDFPlugin::byteRangeRequestForLoader): (WebKit::PDFPlugin::forgetLoader): (WebKit::PDFPlugin::willSendRequest): Move to PDFPluginStreamLoaderClient. (WebKit::PDFPlugin::didReceiveResponse): Ditto. (WebKit::PDFPlugin::didReceiveData): Ditto. (WebKit::PDFPlugin::didFail): Ditto. (WebKit::PDFPlugin::didFinishLoading): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268003 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11:10 AM Changeset in webkit [268271] by keith_miller@apple.com
  • 25 edits in trunk

Finalizers shouldn't run if events can't fire
https://bugs.webkit.org/show_bug.cgi?id=214508

Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

This patch makes it so the DeferredWorkTimer won't run scheduled
tasks if those would not have run if they were scheduled in
WebCore. To do this there is now a concept of a
ScriptExecutionOwner. The ScriptExecutionOwner is almost always
the same as the global object of the pending task (referred to as
the ticket). The only exception to this is if the global object
is a JSDOMWindowBase, then the ScriptExecutionOwner is the
Document's JS wrapper. To tell the status of a
ScriptExecutionOwner, the DeferredWorkTimer calls a virtual
function on the global object of the ticket, for JSC-only this
just always returns Running. For WebCore, we ask the
ScriptExecutionContext associated with the ScriptExecutionOwner.

  • API/JSAPIGlobalObject.cpp:
  • API/JSAPIGlobalObject.mm:
  • jsc.cpp:
  • runtime/DeferredWorkTimer.cpp:

(JSC::DeferredWorkTimer::doWork):
(JSC::DeferredWorkTimer::addPendingWork):
(JSC::DeferredWorkTimer::hasDependancyInPendingWork):
(JSC::DeferredWorkTimer::didResumeScriptExecutionOwner):

  • runtime/DeferredWorkTimer.h:
  • runtime/JSFinalizationRegistry.cpp:

(JSC::JSFinalizationRegistry::create):
(JSC::JSFinalizationRegistry::finishCreation):

  • runtime/JSFinalizationRegistry.h:
  • runtime/JSGlobalObject.cpp:
  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::currentScriptExecutionOwner):
(JSC::JSGlobalObject::scriptExecutionStatus):

Source/WebCore:

This patch makes it so the DeferredWorkTimer won't run scheduled
tasks if those would not have run if they were scheduled in
WebCore. To do this there is now a concept of a
ScriptExecutionOwner. The ScriptExecutionOwner is almost always
the same as the global object of the pending task (referred to as
the ticket). The only exception to this is if the global object
is a JSDOMWindowBase, then the ScriptExecutionOwner is the
Document's JS wrapper. To tell the status of a
ScriptExecutionOwner, the DeferredWorkTimer calls a virtual
function on the global object of the ticket, for JSC-only this
just always returns Running. For WebCore, we ask the
ScriptExecutionContext associated with the ScriptExecutionOwner.

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowBase::currentScriptExecutionOwner):
(WebCore::JSDOMWindowBase::scriptExecutionStatus):

  • bindings/js/JSDOMWindowBase.h:
  • bindings/js/JSDOMWrapperCache.h:
  • bindings/js/JSRemoteDOMWindowBase.cpp:
  • bindings/js/JSWorkerGlobalScopeBase.cpp:

(WebCore::JSWorkerGlobalScopeBase::scriptExecutionStatus):

  • bindings/js/JSWorkerGlobalScopeBase.h:
  • bindings/js/JSWorkletGlobalScopeBase.cpp:

(WebCore::JSWorkletGlobalScopeBase::scriptExecutionStatus):

  • bindings/js/JSWorkletGlobalScopeBase.h:
  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::contextIdentifier const):
(WebCore::ScriptExecutionContext::removeFromContextsMap):
(WebCore::ScriptExecutionContext::~ScriptExecutionContext):
(WebCore::ScriptExecutionContext::jscScriptExecutionStatus const):
(WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
(WebCore::ScriptExecutionContext::postTaskTo):

  • dom/ScriptExecutionContext.h:

Source/WTF:

Add a DropLockScope to make it easier to drop a lock for a short
piece of code. Also, instead of deleting int Locker constructor
we should just delete the underlying type of the
NoLockingNecessary enum.

  • wtf/Locker.h:

(WTF::Locker::~Locker):
(WTF::Locker::unlockEarly):
(WTF::Locker::Locker):
(WTF::Locker::operator=):
(WTF::Locker::unlock):
(WTF::DropLockForScope::DropLockForScope):
(WTF::DropLockForScope::~DropLockForScope):

LayoutTests:

Add tests that check we don't run any tasks from JSC's event loop while contexts
are suspended/stopped. Also skip the WASM tests on Win because WASM doesn't work
there.

  • fast/frames/detached-frame-wasm-resolve-expected.txt: Added.
  • fast/frames/detached-frame-wasm-resolve.html: Added.
  • fast/history/page-cache-active-finalization-registry-callback-expected.txt: Added.
  • fast/history/page-cache-active-finalization-registry-callback.html: Added.
  • fast/history/page-cache-wasm-promise-resolve-expected.txt: Added.
  • fast/history/page-cache-wasm-promise-resolve.html: Added.
  • platform/win/TestExpectations:
11:07 AM Changeset in webkit [268270] by pvollan@apple.com
  • 7 edits in trunk/Source/WebKit

[macOS] Issue sandbox extension for icon service when attachment element is enabled
https://bugs.webkit.org/show_bug.cgi?id=217483
<rdar://problem/70099680>

Reviewed by Brent Fulgham.

This has previously been done on iOS, and should be done on macOS as well.

  • Shared/WebPageCreationParameters.cpp:

(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):

  • Shared/WebPageCreationParameters.h:
  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):

  • Shared/WebProcessCreationParameters.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::creationParameters):

  • UIProcess/WebProcessProxy.h:
  • WebProcess/WebPage/WebPage.cpp:
  • WebProcess/com.apple.WebProcess.sb.in:
11:03 AM Changeset in webkit [268269] by achristensen@apple.com
  • 10 edits in trunk/Source/WebKit

Merge DownloadProxy::DidReceiveResponse and DownloadProxy::DecideDestinationWithSuggestedFilename into one message
https://bugs.webkit.org/show_bug.cgi?id=217519

Reviewed by Youenn Fablet.

No change in behavior. The current API has them as separate callbacks so we can have them as separate messages,
but future API probably won't, so let's merge them.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::findPendingDownloadLocation):

  • UIProcess/API/APIDownloadClient.h:

(API::DownloadClient::didReceiveAuthenticationChallenge):
(API::DownloadClient::decideDestinationWithSuggestedFilename):
(API::DownloadClient::didReceiveResponse): Deleted.

  • UIProcess/API/C/WKContext.cpp:

(WKContextSetDownloadClient):

  • UIProcess/Cocoa/LegacyDownloadClient.h:
  • UIProcess/Cocoa/LegacyDownloadClient.mm:

(WebKit::LegacyDownloadClient::decideDestinationWithSuggestedFilename):

  • UIProcess/Downloads/DownloadProxy.cpp:

(WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
(WebKit::DownloadProxy::didReceiveResponse): Deleted.

  • UIProcess/Downloads/DownloadProxy.h:
  • UIProcess/Downloads/DownloadProxy.messages.in:
10:37 AM Changeset in webkit [268268] by Kate Cheney
  • 20 edits
    2 adds in trunk

Promote WKWebView media playback SPI to API
https://bugs.webkit.org/show_bug.cgi?id=217335
<rdar://problem/63406100>

Reviewed by Jer Noble.

Source/WebCore:

Change stopAllMediaPlayback to be more aptly named
pauseAllMediaPlayback because it is possible to resume
playing media after this is called. 'Stop' implies more permanence.
Add a function to the Document and Page objects to see if media playback
exists, is paused, or is suspended to determine media playback state.

  • dom/Document.cpp:

(WebCore::Document::~Document):
(WebCore::Document::mediaPlaybackExists):
(WebCore::Document::mediaPlaybackIsPaused):
(WebCore::Document::pauseAllMediaPlayback):
(WebCore::Document::stopAllMediaPlayback): Deleted.

  • dom/Document.h:
  • page/Page.cpp:

(WebCore::Page::mediaPlaybackExists):
(WebCore::Page::mediaPlaybackIsPaused):
(WebCore::Page::pauseAllMediaPlayback):
(WebCore::Page::stopAllMediaPlayback): Deleted.

  • page/Page.h:
  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::pauseAllMediaPlaybackForDocument):
(WebCore::PlatformMediaSessionManager::mediaPlaybackIsPaused):
(WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForDocument): Deleted.

  • platform/audio/PlatformMediaSessionManager.h:

Source/WebKit:

Currently the only way to interact with video in WKWebView is by injecting
JavaScript into a page. It would be useful to promote various media
playback SPI to API to make this easier for clients, including adding
completion handlers to the new API calls. Along with this,
we should add new API to check for media playback state.
This patch keeps the SPI around for compatibility.

  • Shared/API/Cocoa/WebKit.h:
  • Shared/MediaPlaybackState.h: Added.
  • UIProcess/API/Cocoa/WKMediaPlaybackState.h: Added.
  • UIProcess/API/Cocoa/WKWebView.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView closeAllMediaPresentations]):
(-[WKWebView pauseAllMediaPlayback:]):
(-[WKWebView suspendAllMediaPlayback:]):
(-[WKWebView resumeAllMediaPlayback:]):
(toWKMediaPlaybackState):
(-[WKWebView requestMediaPlaybackState:]):
(-[WKWebView _closeAllMediaPresentations]):
(-[WKWebView _stopAllMediaPlayback]):
(-[WKWebView _suspendAllMediaPlayback]):
(-[WKWebView _resumeAllMediaPlayback]):

  • UIProcess/ios/fullscreen/WKFullScreenViewController.mm:

(-[WKFullScreenViewController _showPhishingAlert]):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::requestMediaPlaybackState):
(WebKit::WebPageProxy::pauseAllMediaPlayback):
(WebKit::WebPageProxy::suspendAllMediaPlayback):
(WebKit::WebPageProxy::resumeAllMediaPlayback):
(WebKit::WebPageProxy::stopAllMediaPlayback): Deleted.

  • UIProcess/WebPageProxy.h:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::requestMediaPlaybackState):
(WebKit::WebPage::pauseAllMediaPlayback):
(WebKit::WebPage::suspendAllMediaPlayback):
(WebKit::WebPage::resumeAllMediaPlayback):
(WebKit::WebPage::stopAllMediaPlayback): Deleted.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Tools:

Add API testing coverage for new API. Also converted testing to
use the new API instead of SPI.

  • TestWebKitAPI/Tests/WebKitCocoa/StopSuspendResumeAllMedia.mm:

(TestWebKitAPI::TEST):

10:33 AM Changeset in webkit [268267] by Jonathan Bedard
  • 4 edits in trunk/Tools

[webkitpy] Use webkitcorepy's auto installer for pytest packages
https://bugs.webkit.org/show_bug.cgi?id=215895
<rdar://problem/67885471>

Rubber-stamped by Aakash Jain.

  • Scripts/webkitpy/init.py: Add pytest and it's dependencies.
  • Scripts/webkitpy/thirdparty/init.py:

(AutoinstallImportHook.find_module): Remove pytest and pytest_timeout.
(AutoinstallImportHook._install_pytest_timeout): Deleted.
(AutoinstallImportHook._install_pytest): Deleted.

  • Scripts/webkitpy/webdriver_tests/pytest_runner.py: Implicitly use webkitcorepy's autoinstaller.
10:10 AM Changeset in webkit [268266] by Peng Liu
  • 3 edits
    8 moves in trunk/Source/WebCore

Move some audio buffer management related files from folder "mac" to folder "cocoa"
https://bugs.webkit.org/show_bug.cgi?id=217497

Reviewed by Youenn Fablet.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/audio/cocoa/AudioSampleBufferList.cpp: Renamed from Source/WebCore/platform/audio/mac/AudioSampleBufferList.cpp.
  • platform/audio/cocoa/AudioSampleBufferList.h: Renamed from Source/WebCore/platform/audio/mac/AudioSampleBufferList.h.
  • platform/audio/cocoa/AudioSampleDataSource.h: Renamed from Source/WebCore/platform/audio/mac/AudioSampleDataSource.h.
  • platform/audio/cocoa/AudioSampleDataSource.mm: Renamed from Source/WebCore/platform/audio/mac/AudioSampleDataSource.mm.
  • platform/audio/cocoa/CAAudioStreamDescription.cpp: Renamed from Source/WebCore/platform/audio/mac/CAAudioStreamDescription.cpp.

(WebCore::CAAudioStreamDescription::sampleRate const):
(WebCore::CAAudioStreamDescription::isPCM const):
(WebCore::CAAudioStreamDescription::isInterleaved const):
(WebCore::CAAudioStreamDescription::isSignedInteger const):
(WebCore::CAAudioStreamDescription::isFloat const):
(WebCore::CAAudioStreamDescription::isNativeEndian const):
(WebCore::CAAudioStreamDescription::numberOfInterleavedChannels const):
(WebCore::CAAudioStreamDescription::numberOfChannelStreams const):
(WebCore::CAAudioStreamDescription::numberOfChannels const):
(WebCore::CAAudioStreamDescription::sampleWordSize const):
(WebCore::CAAudioStreamDescription::bytesPerFrame const):
(WebCore::CAAudioStreamDescription::bytesPerPacket const):
(WebCore::CAAudioStreamDescription::formatFlags const):
(WebCore::CAAudioStreamDescription::operator== const):
(WebCore::CAAudioStreamDescription::operator!= const):
(WebCore::CAAudioStreamDescription::streamDescription const):
(WebCore::CAAudioStreamDescription::streamDescription):
Move the inline function definitions out-of-line to fix styling issues.

  • platform/audio/cocoa/CAAudioStreamDescription.h: Renamed from Source/WebCore/platform/audio/mac/CAAudioStreamDescription.h.
  • platform/audio/cocoa/CARingBuffer.cpp: Renamed from Source/WebCore/platform/audio/mac/CARingBuffer.cpp.
  • platform/audio/cocoa/CARingBuffer.h: Renamed from Source/WebCore/platform/audio/mac/CARingBuffer.h.
9:55 AM Changeset in webkit [268265] by Russell Epstein
  • 2 edits in branches/safari-610-branch/Source/WebKit

Cherry-pick r268257. rdar://problem/70142057

Switch Allow/Don't Allow buttons in getUserMedia prompt
https://bugs.webkit.org/show_bug.cgi?id=217513
<rdar://problem/70134429>

Reviewed by Eric Carlson.

Return NotAllowedError instead of SecurityError in case user denies with default prompt.
Make sure to have the Allow button in iOS prompt on the right instead of the left.
Tested in MiniBrowser and MobileMiniBrowser.

  • UIProcess/Cocoa/UserMediaPermissionRequestProxy.mm: (WebKit::UserMediaPermissionRequestProxy::doDefaultAction):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268257 268f45cc-cd09-0410-ab3c-d52691b4dbfc

9:55 AM Changeset in webkit [268264] by Russell Epstein
  • 6 edits in branches/safari-610-branch/Source/WebKit

Cherry-pick r268256. rdar://problem/70142054

Implement TCC checks in UserMediaPermissionRequestManagerProxy
https://bugs.webkit.org/show_bug.cgi?id=217508
<rdar://problem/70129993>

Reviewed by Eric Carlson.

TCC checks must be done before asking the page client to decide whether to grant or not camera and/or microphone.
This ensures that, should the default action be done (default prompt), for instance in case the WKWebView application does not provide any delegate,
the TCC checks will happen before the default prompt.

For that reason, we move the TCC checks from UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest to UserMediaPermissionRequestManagerProxy::requestSystemValidation.

Manually tested in Safari and MiniBrowser.

  • UIProcess/Cocoa/UIDelegate.mm: (WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest): (WebKit::requestUserMediaAuthorizationForFrame): Deleted. (WebKit::requestAVCaptureAccessForMediaType): Deleted.
  • UIProcess/Cocoa/UserMediaPermissionRequestManagerProxy.mm: (WebKit::requestAVCaptureAccessForMediaType): (WebKit::UserMediaPermissionRequestManagerProxy::requestSystemValidation):
  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp: (WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionValidRequest): (WebKit::UserMediaPermissionRequestManagerProxy::decidePolicyForUserMediaPermissionRequest): (WebKit::UserMediaPermissionRequestManagerProxy::requestSystemValidation):
  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
  • UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::preferences const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268256 268f45cc-cd09-0410-ab3c-d52691b4dbfc

9:26 AM Changeset in webkit [268263] by graouts@webkit.org
  • 10 edits
    2 adds in trunk

CSS transform computed style should not reflect individual transform properties
https://bugs.webkit.org/show_bug.cgi?id=217473
<rdar://problem/70091605>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Add a newly-authored WPT test to check that setting individual transform properties does not interfere with the
computed style for the "transform" property.

  • web-platform-tests/css/css-transforms/transform-and-individual-transform-properties-computed-style-expected.txt: Added.
  • web-platform-tests/css/css-transforms/transform-and-individual-transform-properties-computed-style.html: Added.

Source/WebCore:

Because RenderStyle::applyTransform() accounts for the new rotate, scale and translate properties, we need a way to call this
method from computedTransform() without accounting for those properties. While we used to only have the option to include or
exclude transform-origin, we now allow for multiple options to be specified using a new TransformOperationOption enum and
passing an OptionSet<TransformOperationOption> to RenderStyle::applyTransform().

Test: imported/w3c/web-platform-tests/css/css-transforms/transform-and-individual-transform-properties-computed-style.html

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::computeTransformedExtentViaMatrix const):

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::computedTransform):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::updateTransform):
(WebCore::RenderLayer::currentTransform const):

  • rendering/RenderLayer.h:
  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateTransform):
(WebCore::RenderLayerBacking::getCurrentTransform const):

  • rendering/style/RenderStyle.cpp:

(WebCore::requireTransformOrigin):
(WebCore::RenderStyle::applyTransform const):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::applyTransform):

  • svg/SVGTextElement.cpp:

(WebCore::SVGTextElement::animatedLocalTransform const):

9:25 AM Changeset in webkit [268262] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][Integration] Enable FlowTextIsEmpty case
https://bugs.webkit.org/show_bug.cgi?id=217512

Reviewed by Antti Koivisto.

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::appendTextContent): A zero length content is not considered
whitespace content (it does not really have type) but it still collapses completely (does not generate a run).
and it does not really have a type

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForFontAndText):

  • layout/integration/LayoutIntegrationCoverage.h:
9:24 AM Changeset in webkit [268261] by achristensen@apple.com
  • 20 edits in trunk

Use sendWithAsyncReply for NetworkProcess::CancelDownload
https://bugs.webkit.org/show_bug.cgi?id=217420

Reviewed by Youenn Fablet.

Source/WebKit:

This paves the way for a good download API that has a completion handler when you call cancel that gives you the resume data if it can.
Currently you have to call cancel on the download, wait for didCancel on the delegate, then get the resume data from the download again.
This has the side effect of DownloadMonitor cancellations calling didFailWithError instead of didCancel, which makes sense and shouldn't
cause any problems in practice. Safari is the only API client that uses this, and it behaves similarly in didCancel and didFailWithError.

  • NetworkProcess/Downloads/Download.cpp:

(WebKit::Download::cancel):
(WebKit::Download::didCancel):

  • NetworkProcess/Downloads/Download.h:
  • NetworkProcess/Downloads/DownloadManager.cpp:

(WebKit::DownloadManager::cancelDownload):

  • NetworkProcess/Downloads/DownloadManager.h:
  • NetworkProcess/Downloads/DownloadMonitor.cpp:

(WebKit::DownloadMonitor::timerFired):

  • NetworkProcess/Downloads/PendingDownload.cpp:

(WebKit::PendingDownload::cancel):

  • NetworkProcess/Downloads/PendingDownload.h:
  • NetworkProcess/Downloads/cocoa/WKDownloadProgress.mm:

(-[WKDownloadProgress performCancel]):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::cancelDownload):
(WebKit::NetworkProcess::findPendingDownloadLocation):
(WebKit::NetworkProcess::pendingDownloadCanceled): Deleted.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • UIProcess/Downloads/DownloadProxy.cpp:

(WebKit::createData):
(WebKit::DownloadProxy::cancel):
(WebKit::DownloadProxy::didCancel): Deleted.

  • UIProcess/Downloads/DownloadProxy.h:
  • UIProcess/Downloads/DownloadProxy.messages.in:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/Download.mm:

(-[WaitUntilDownloadCanceledDelegate _download:didFailWithError:]):
(-[DownloadMonitorTestDelegate _download:didFailWithError:]):
(-[DownloadMonitorTestDelegate waitForDidFail]):
(-[DownloadMonitorTestDelegate stopWaitingForDidFail]):
(TestWebKitAPI::monitorDelegate):
(TestWebKitAPI::webViewWithDownloadMonitorSpeedMultiplier):
(TestWebKitAPI::downloadAtRate):
(TestWebKitAPI::TEST):
(-[WaitUntilDownloadCanceledDelegate _downloadDidCancel:]): Deleted.
(-[DownloadMonitorTestDelegate _downloadDidCancel:]): Deleted.

9:21 AM Changeset in webkit [268260] by Antti Koivisto
  • 11 edits in trunk/Source/WebCore

[LFC][Integration] Add a way to get runs from line iterator
https://bugs.webkit.org/show_bug.cgi?id=217518

Reviewed by Zalan Bujtas.

And use it in startPositionForLine/endPositionForLine functions in RenderedPosition.

  • editing/RenderedPosition.h:

(WebCore::RenderedPosition::line const):

  • editing/VisibleUnits.cpp:

(WebCore::startPositionForLine):
(WebCore::endPositionForLine):

  • layout/integration/LayoutIntegrationLine.h:

(WebCore::LayoutIntegration::Line::Line):
(WebCore::LayoutIntegration::Line::firstRunIndex const):
(WebCore::LayoutIntegration::Line::runCount const):

Lines now track the first run and the run count.

  • layout/integration/LayoutIntegrationLineIterator.cpp:

(WebCore::LayoutIntegration::LineIterator::firstRun const):
(WebCore::LayoutIntegration::LineIterator::lastRun const):
(WebCore::LayoutIntegration::LineIterator::logicalStartRunWithNode const):
(WebCore::LayoutIntegration::LineIterator::logicalEndRunWithNode const):

  • layout/integration/LayoutIntegrationLineIterator.h:
  • layout/integration/LayoutIntegrationLineIteratorLegacyPath.h:

(WebCore::LayoutIntegration::LineIteratorLegacyPath::firstRun const):
(WebCore::LayoutIntegration::LineIteratorLegacyPath::lastRun const):
(WebCore::LayoutIntegration::LineIteratorLegacyPath::logicalStartRunWithNode const):
(WebCore::LayoutIntegration::LineIteratorLegacyPath::logicalEndRunWithNode const):

  • layout/integration/LayoutIntegrationLineIteratorModernPath.h:

(WebCore::LayoutIntegration::LineIteratorModernPath::firstRun const):
(WebCore::LayoutIntegration::LineIteratorModernPath::lastRun const):
(WebCore::LayoutIntegration::LineIteratorModernPath::logicalStartRunWithNode const):
(WebCore::LayoutIntegration::LineIteratorModernPath::logicalEndRunWithNode const):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::constructContent):

  • layout/integration/LayoutIntegrationPagination.cpp:

(WebCore::LayoutIntegration::makeAdjustedContent):

  • layout/integration/LayoutIntegrationRunIteratorModernPath.h:

(WebCore::LayoutIntegration::RunIteratorModernPath::RunIteratorModernPath):

8:52 AM Changeset in webkit [268259] by Chris Dumez
  • 8 edits in trunk/Source/WebCore

Add proper implementation for WorkletGlobalScope::isContextThread()
https://bugs.webkit.org/show_bug.cgi?id=217486

Reviewed by Sam Weinig.

Add proper implementation for WorkletGlobalScope::isContextThread() to enable more threading
checks in AudioWorklet code.

  • Modules/webaudio/AudioWorkletGlobalScope.cpp:

(WebCore::AudioWorkletGlobalScope::AudioWorkletGlobalScope):
(WebCore::AudioWorkletGlobalScope::thread const):

  • Modules/webaudio/AudioWorkletGlobalScope.h:

(WebCore::AudioWorkletGlobalScope::thread): Deleted.

  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::createdMessagePort):
(WebCore::ScriptExecutionContext::destroyedMessagePort):

  • workers/WorkerGlobalScope.h:
  • workers/WorkerOrWorkletGlobalScope.h:
  • worklets/WorkletGlobalScope.cpp:

(WebCore::WorkletGlobalScope::WorkletGlobalScope):
(WebCore::WorkletGlobalScope::isContextThread const):

  • worklets/WorkletGlobalScope.h:
8:33 AM Changeset in webkit [268258] by Lauro Moura
  • 2 edits in trunk/Tools

[GLIB] Fix tests compilation warnings with deprecated API
https://bugs.webkit.org/show_bug.cgi?id=217504

Reviewed by Carlos Garcia Campos.

webkit_web_context_set_network_proxy_settings() is deprecated in favor of
webkit_website_data_manager_set_network_proxy_settings().

  • TestWebKitAPI/Tests/WebKitGLib/TestAuthentication.cpp:

(ProxyAuthenticationTest::ProxyAuthenticationTest):

7:11 AM Changeset in webkit [268257] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Switch Allow/Don't Allow buttons in getUserMedia prompt
https://bugs.webkit.org/show_bug.cgi?id=217513
<rdar://problem/70134429>

Reviewed by Eric Carlson.

Return NotAllowedError instead of SecurityError in case user denies with default prompt.
Make sure to have the Allow button in iOS prompt on the right instead of the left.
Tested in MiniBrowser and MobileMiniBrowser.

  • UIProcess/Cocoa/UserMediaPermissionRequestProxy.mm:

(WebKit::UserMediaPermissionRequestProxy::doDefaultAction):

7:06 AM Changeset in webkit [268256] by youenn@apple.com
  • 6 edits in trunk/Source/WebKit

Implement TCC checks in UserMediaPermissionRequestManagerProxy
https://bugs.webkit.org/show_bug.cgi?id=217508
<rdar://problem/70129993>

Reviewed by Eric Carlson.

TCC checks must be done before asking the page client to decide whether to grant or not camera and/or microphone.
This ensures that, should the default action be done (default prompt), for instance in case the WKWebView application does not provide any delegate,
the TCC checks will happen before the default prompt.

For that reason, we move the TCC checks from UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest to UserMediaPermissionRequestManagerProxy::requestSystemValidation.

Manually tested in Safari and MiniBrowser.

  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):
(WebKit::requestUserMediaAuthorizationForFrame): Deleted.
(WebKit::requestAVCaptureAccessForMediaType): Deleted.

  • UIProcess/Cocoa/UserMediaPermissionRequestManagerProxy.mm:

(WebKit::requestAVCaptureAccessForMediaType):
(WebKit::UserMediaPermissionRequestManagerProxy::requestSystemValidation):

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionValidRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::decidePolicyForUserMediaPermissionRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::requestSystemValidation):

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::preferences const):

4:49 AM Changeset in webkit [268255] by svillar@igalia.com
  • 7 edits in trunk/Source/WebCore

[WebXR] Make enumerateImmersiveXRDevices() asynchronnous
https://bugs.webkit.org/show_bug.cgi?id=217172

Reviewed by Youenn Fablet.

The call to enumerateImmersiveXRDevices() can block the main thread and thus it should be asynchronous. The specs
clearly state that it should be run "in parallel". The list of available devices will be provided to the callback
(a CompletionHandler). Note that the OpenXR code is still running on the main thread but it will be migrated in
a follow up patch.

This change forced us to modify the whole chain of calls that end in enumerateImmersiveXRDevices() in the WebXR code.
Good news is that it allowed us to remove some calls to postTask() or queueTaskKeepingObjectAlive() because code is
already running "in parallel" after moving to an asynchronnous paradigm so they were redundant.

No new tests required as there is no change in behaviour.

  • Modules/webxr/WebXRSystem.cpp:

(WebCore::WebXRSystem::ensureImmersiveXRDeviceIsSelected): Added a callback parameter. Moved most of the code
to the callback provided to enumerateImmersiveXRDevices().
(WebCore::WebXRSystem::obtainCurrentDevice): Returns void and accepts a new callback paramater. Had to migrate it
because it can eventually call ensureImmersiveXRDeviceIsSelected().
(WebCore::WebXRSystem::isSessionSupported): Removed postTask(), ensureImmersiveXRDeviceIsSelected()
is run in parallel.
(WebCore::WebXRSystem::requestSession): Removed queueTaskKeepingObjectAlive() as obtainCurrentDevice()
is run in parallel.

  • Modules/webxr/WebXRSystem.h:
  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::createContextWebGL): Pass a no-op callback to ensureImmersiveXRDeviceIsSelected().

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::makeXRCompatible): Moved most of the code into the callback
of ensureImmersiveXRDeviceIsSelected().

  • platform/xr/PlatformXR.h:

(PlatformXR::Instance::immersiveXRDevices const): Deleted.

  • platform/xr/openxr/PlatformXROpenXR.cpp:

(PlatformXR::Instance::enumerateImmersiveXRDevices): Receives a new callback parameter, returns the list of
immersive devices to the callback as a const parameter.

4:42 AM Changeset in webkit [268254] by Andres Gonzalez
  • 6 edits in trunk

Fix for accessibility tests keyevents-posted-for-increment-actions.html and keyevents-for-increment-actions-with-node-removal.html in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=217501

Reviewed by Chris Fleizach.

Source/WebCore:

Implementation of AXIsolatedObject::increment/decrement.

  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::increment):
(WebCore::AXIsolatedObject::decrement):

  • accessibility/isolatedtree/AXIsolatedObject.h:

LayoutTests:

  • accessibility/keyevents-for-increment-actions-with-node-removal.html:

Removed extra <html> tag and minor spacing and reordering to make it
more consistent with other accessibility tests.

  • accessibility/keyevents-posted-for-increment-actions.html:

Corrected number of expected key events from 4 to 8.
Same minor spacing and ordering changes.

4:26 AM Changeset in webkit [268253] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][Integration] Remove redundant AvoidanceReason values
https://bugs.webkit.org/show_bug.cgi?id=217510

Reviewed by Antti Koivisto.

Remove both FlowTextHasSoftHyphen (should have removed when it got enabled) and the redundant FlowHasLineBreak.

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForStyle):

  • layout/integration/LayoutIntegrationCoverage.h:
4:24 AM Changeset in webkit [268252] by Antti Koivisto
  • 9 edits in trunk/Source/WebCore

[LFC][Integration] Rename iterator path variant structs for consistency
https://bugs.webkit.org/show_bug.cgi?id=217511

Reviewed by Zalan Bujtas.

ModernPath -> RunIteratorModernPath
LegacyPath -> RunIteratorLegacyPath
ModernLinePath -> LineIteratorModernPath
LegacyLinePath -> LineIteratorLegacyPath

  • layout/integration/LayoutIntegrationLineIterator.h:

(WebCore::LayoutIntegration::LineIterator::LineIterator):

  • layout/integration/LayoutIntegrationLineIteratorLegacyPath.h:

(WebCore::LayoutIntegration::LineIteratorLegacyPath::LineIteratorLegacyPath):
(WebCore::LayoutIntegration::LineIteratorLegacyPath::operator== const):
(WebCore::LayoutIntegration::LegacyLinePath::LegacyLinePath): Deleted.
(WebCore::LayoutIntegration::LegacyLinePath::top const): Deleted.
(WebCore::LayoutIntegration::LegacyLinePath::bottom const): Deleted.
(WebCore::LayoutIntegration::LegacyLinePath::selectionTop const): Deleted.
(WebCore::LayoutIntegration::LegacyLinePath::selectionTopForHitTesting const): Deleted.
(WebCore::LayoutIntegration::LegacyLinePath::selectionBottom const): Deleted.
(WebCore::LayoutIntegration::LegacyLinePath::traverseNext): Deleted.
(WebCore::LayoutIntegration::LegacyLinePath::traversePrevious): Deleted.
(WebCore::LayoutIntegration::LegacyLinePath::operator== const): Deleted.
(WebCore::LayoutIntegration::LegacyLinePath::atEnd const): Deleted.
(WebCore::LayoutIntegration::LegacyLinePath::setAtEnd): Deleted.

  • layout/integration/LayoutIntegrationLineIteratorModernPath.h:

(WebCore::LayoutIntegration::LineIteratorModernPath::LineIteratorModernPath):
(WebCore::LayoutIntegration::LineIteratorModernPath::operator== const):
(WebCore::LayoutIntegration::ModernLinePath::ModernLinePath): Deleted.
(WebCore::LayoutIntegration::ModernLinePath::top const): Deleted.
(WebCore::LayoutIntegration::ModernLinePath::bottom const): Deleted.
(WebCore::LayoutIntegration::ModernLinePath::selectionTop const): Deleted.
(WebCore::LayoutIntegration::ModernLinePath::selectionTopForHitTesting const): Deleted.
(WebCore::LayoutIntegration::ModernLinePath::selectionBottom const): Deleted.
(WebCore::LayoutIntegration::ModernLinePath::traverseNext): Deleted.
(WebCore::LayoutIntegration::ModernLinePath::traversePrevious): Deleted.
(WebCore::LayoutIntegration::ModernLinePath::operator== const): Deleted.
(WebCore::LayoutIntegration::ModernLinePath::atEnd const): Deleted.
(WebCore::LayoutIntegration::ModernLinePath::setAtEnd): Deleted.
(WebCore::LayoutIntegration::ModernLinePath::lines const): Deleted.
(WebCore::LayoutIntegration::ModernLinePath::line const): Deleted.

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::textRunsFor const):
(WebCore::LayoutIntegration::LineLayout::runFor const):

  • layout/integration/LayoutIntegrationRunIterator.cpp:

(WebCore::LayoutIntegration::RunIterator::line const):
(WebCore::LayoutIntegration::firstTextRunFor):
(WebCore::LayoutIntegration::firstTextRunInTextOrderFor):
(WebCore::LayoutIntegration::runFor):
(WebCore::LayoutIntegration::PathRun::modernPath const):
(WebCore::LayoutIntegration::PathRun::legacyPath const):
(WebCore::LayoutIntegration::PathRun::modernPath): Deleted.
(WebCore::LayoutIntegration::PathRun::legacyPath): Deleted.

  • layout/integration/LayoutIntegrationRunIterator.h:

(WebCore::LayoutIntegration::RunIterator::RunIterator):

  • layout/integration/LayoutIntegrationRunIteratorLegacyPath.h:

(WebCore::LayoutIntegration::RunIteratorLegacyPath::RunIteratorLegacyPath):
(WebCore::LayoutIntegration::RunIteratorLegacyPath::operator== const):
(WebCore::LayoutIntegration::RunIteratorLegacyPath::nextInlineTextBoxInTextOrder const):
(WebCore::LayoutIntegration::LegacyPath::LegacyPath): Deleted.
(WebCore::LayoutIntegration::LegacyPath::isText const): Deleted.
(WebCore::LayoutIntegration::LegacyPath::rect const): Deleted.
(WebCore::LayoutIntegration::LegacyPath::isHorizontal const): Deleted.
(WebCore::LayoutIntegration::LegacyPath::dirOverride const): Deleted.
(WebCore::LayoutIntegration::LegacyPath::isLineBreak const): Deleted.
(WebCore::LayoutIntegration::LegacyPath::baseline const): Deleted.
(WebCore::LayoutIntegration::LegacyPath::minimumCaretOffset const): Deleted.
(WebCore::LayoutIntegration::LegacyPath::maximumCaretOffset const): Deleted.
(WebCore::LayoutIntegration::LegacyPath::bidiLevel const): Deleted.
(WebCore::LayoutIntegration::LegacyPath::useLineBreakBoxRenderTreeDumpQuirk const): Deleted.
(WebCore::LayoutIntegration::LegacyPath::hasHyphen const): Deleted.
(WebCore::LayoutIntegration::LegacyPath::text const): Deleted.
(WebCore::LayoutIntegration::LegacyPath::localStartOffset const): Deleted.
(WebCore::LayoutIntegration::LegacyPath::localEndOffset const): Deleted.
(WebCore::LayoutIntegration::LegacyPath::length const): Deleted.
(WebCore::LayoutIntegration::LegacyPath::offsetForPosition const): Deleted.
(WebCore::LayoutIntegration::LegacyPath::isLastTextRunOnLine const): Deleted.
(WebCore::LayoutIntegration::LegacyPath::isLastTextRun const): Deleted.
(WebCore::LayoutIntegration::LegacyPath::renderer const): Deleted.
(WebCore::LayoutIntegration::LegacyPath::traverseNextTextRun): Deleted.
(WebCore::LayoutIntegration::LegacyPath::traverseNextTextRunInTextOrder): Deleted.
(WebCore::LayoutIntegration::LegacyPath::traverseNextOnLine): Deleted.
(WebCore::LayoutIntegration::LegacyPath::traversePreviousOnLine): Deleted.
(WebCore::LayoutIntegration::LegacyPath::operator== const): Deleted.
(WebCore::LayoutIntegration::LegacyPath::atEnd const): Deleted.
(WebCore::LayoutIntegration::LegacyPath::setAtEnd): Deleted.
(WebCore::LayoutIntegration::LegacyPath::legacyInlineBox const): Deleted.
(WebCore::LayoutIntegration::LegacyPath::rootInlineBox const): Deleted.
(WebCore::LayoutIntegration::LegacyPath::inlineTextBox const): Deleted.
(WebCore::LayoutIntegration::LegacyPath::nextInlineTextBoxInTextOrder const): Deleted.

  • layout/integration/LayoutIntegrationRunIteratorModernPath.h:

(WebCore::LayoutIntegration::RunIteratorModernPath::RunIteratorModernPath):
(WebCore::LayoutIntegration::RunIteratorModernPath::operator== const):
(WebCore::LayoutIntegration::ModernPath::ModernPath): Deleted.
(WebCore::LayoutIntegration::ModernPath::isText const): Deleted.
(WebCore::LayoutIntegration::ModernPath::rect const): Deleted.
(WebCore::LayoutIntegration::ModernPath::baseline const): Deleted.
(WebCore::LayoutIntegration::ModernPath::isHorizontal const): Deleted.
(WebCore::LayoutIntegration::ModernPath::dirOverride const): Deleted.
(WebCore::LayoutIntegration::ModernPath::isLineBreak const): Deleted.
(WebCore::LayoutIntegration::ModernPath::minimumCaretOffset const): Deleted.
(WebCore::LayoutIntegration::ModernPath::maximumCaretOffset const): Deleted.
(WebCore::LayoutIntegration::ModernPath::bidiLevel const): Deleted.
(WebCore::LayoutIntegration::ModernPath::useLineBreakBoxRenderTreeDumpQuirk const): Deleted.
(WebCore::LayoutIntegration::ModernPath::hasHyphen const): Deleted.
(WebCore::LayoutIntegration::ModernPath::text const): Deleted.
(WebCore::LayoutIntegration::ModernPath::localStartOffset const): Deleted.
(WebCore::LayoutIntegration::ModernPath::localEndOffset const): Deleted.
(WebCore::LayoutIntegration::ModernPath::length const): Deleted.
(WebCore::LayoutIntegration::ModernPath::offsetForPosition const): Deleted.
(WebCore::LayoutIntegration::ModernPath::isLastTextRunOnLine const): Deleted.
(WebCore::LayoutIntegration::ModernPath::isLastTextRun const): Deleted.
(WebCore::LayoutIntegration::ModernPath::renderer const): Deleted.
(WebCore::LayoutIntegration::ModernPath::traverseNextTextRun): Deleted.
(WebCore::LayoutIntegration::ModernPath::traverseNextTextRunInTextOrder): Deleted.
(WebCore::LayoutIntegration::ModernPath::traverseNextOnLine): Deleted.
(WebCore::LayoutIntegration::ModernPath::traversePreviousOnLine): Deleted.
(WebCore::LayoutIntegration::ModernPath::operator== const): Deleted.
(WebCore::LayoutIntegration::ModernPath::atEnd const): Deleted.
(WebCore::LayoutIntegration::ModernPath::setAtEnd): Deleted.
(WebCore::LayoutIntegration::ModernPath::legacyInlineBox const): Deleted.
(WebCore::LayoutIntegration::ModernPath::runs const): Deleted.
(WebCore::LayoutIntegration::ModernPath::run const): Deleted.
(WebCore::LayoutIntegration::ModernPath::line const): Deleted.

3:14 AM Changeset in webkit [268251] by Paulo Matos
  • 2 edits in trunk/Tools

Add armv8l arch to generic arm umbrella architecture variable
https://bugs.webkit.org/show_bug.cgi?id=217470

Reviewed by Adrian Perez de Castro.

The armv8l architecture specifies a system running an arm64 kernel
but running in 32bit user land. Therefore for JSC purposes armv8l and
armv7l are arm (32bit) architectures.

  • Scripts/webkitdirs.pm:

(determineNativeArchitecture):

1:28 AM Changeset in webkit [268250] by commit-queue@webkit.org
  • 8 edits
    168 adds in trunk/LayoutTests

Import scroll-snap WPT tests from upstream
https://bugs.webkit.org/show_bug.cgi?id=217467

Patch by Martin Robinson <Martin Robinson> on 2020-10-09
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • resources/import-expectations.json: Add scroll snap import directive.
  • resources/resource-files.json:
  • web-platform-tests/css/css-scroll-snap/META.yml: Added.
  • web-platform-tests/css/css-scroll-snap/inheritance-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/inheritance.html: Added.
  • web-platform-tests/css/css-scroll-snap/input/keyboard-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/input/keyboard.html: Added.
  • web-platform-tests/css/css-scroll-snap/input/w3c-import.log: Added.
  • web-platform-tests/css/css-scroll-snap/nested-scrollIntoView-snaps-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/nested-scrollIntoView-snaps.html: Added.
  • web-platform-tests/css/css-scroll-snap/no-snap-position-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/no-snap-position.html: Added.
  • web-platform-tests/css/css-scroll-snap/overflowing-snap-areas-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/overflowing-snap-areas.html: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-margin-block-inline-computed-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-margin-block-inline-computed.html: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-margin-block-inline-invalid-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-margin-block-inline-invalid.html: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-margin-block-inline-shorthand-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-margin-block-inline-shorthand.html: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-margin-block-inline-valid-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-margin-block-inline-valid.html: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-margin-computed-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-margin-computed.html: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-margin-invalid-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-margin-invalid.html: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-margin-shorthand-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-margin-shorthand.html: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-margin-valid-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-margin-valid.html: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-padding-block-inline-computed-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-padding-block-inline-computed.html: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-padding-block-inline-invalid-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-padding-block-inline-invalid.html: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-padding-block-inline-shorthand-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-padding-block-inline-shorthand.html: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-padding-block-inline-valid-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-padding-block-inline-valid.html: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-padding-computed-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-padding-computed.html: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-padding-invalid-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-padding-invalid.html: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-padding-shorthand-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-padding-shorthand.html: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-padding-valid-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-padding-valid.html: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-align-computed-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-align-computed.html: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-align-invalid-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-align-invalid.html: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-align-valid-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-align-valid.html: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-stop-computed-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-stop-computed.html: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-stop-invalid-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-stop-invalid.html: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-stop-valid-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-stop-valid.html: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-type-computed-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-type-computed.html: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-type-invalid-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-type-invalid.html: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-type-valid-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-type-valid.html: Added.
  • web-platform-tests/css/css-scroll-snap/parsing/w3c-import.log: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-margin-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-margin.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-padding-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-padding.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-snap-stop-change-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-snap-stop-change.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-snap-stop-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-snap-stop.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-snap-type-change-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-snap-type-change.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-snap-type-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-snap-type-on-root-element-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-snap-type-on-root-element.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-snap-type.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-align-001-expected.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-align-001.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-align-002-expected.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-align-002.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-align-003-expected.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-align-003.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-margin-001-expected.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-margin-001.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-margin-002-expected.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-margin-002.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-margin-003-expected.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-margin-003.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-margin-004-expected.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-margin-004.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-padding-001-expected.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-padding-001.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-padding-002-expected.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-padding-002.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-padding-003-expected.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-padding-003.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-snap-001-expected.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-snap-001.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-snap-002-expected.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-snap-002.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-snap-003-expected.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-snap-003.html: Added.
  • web-platform-tests/css/css-scroll-snap/scrollTo-scrollBy-snaps-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/scrollTo-scrollBy-snaps.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/direction-rtl-expected.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/direction-rtl.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/w3c-import.log: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/writing-mode-horizontal-tb-expected.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/writing-mode-horizontal-tb.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/writing-mode-vertical-lr-expected.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/writing-mode-vertical-lr.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/writing-mode-vertical-rl-expected.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/writing-mode-vertical-rl.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-relayout/adding-only-snap-area-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-relayout/adding-only-snap-area.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-relayout/adding-snap-area-while-snapped-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-relayout/adding-snap-area-while-snapped.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-relayout/changing-scroll-snap-align-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-relayout/changing-scroll-snap-align.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-relayout/changing-scroll-snap-type-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-relayout/changing-scroll-snap-type.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-relayout/move-current-target-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-relayout/move-current-target.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-relayout/remove-current-target-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-relayout/remove-current-target.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-relayout/snap-to-different-targets-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-relayout/snap-to-different-targets.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-relayout/w3c-import.log: Added.
  • web-platform-tests/css/css-scroll-snap/snap-area-capturing-add-scroll-container-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/snap-area-capturing-add-scroll-container.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-area-capturing-remove-scroll-container-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/snap-area-capturing-remove-scroll-container.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-inline-block-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/snap-inline-block.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-to-transformed-target-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/snap-to-transformed-target.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-to-visible-areas-both-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/snap-to-visible-areas-both.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-to-visible-areas-margin-both-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/snap-to-visible-areas-margin-both.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-to-visible-areas-margin-x-axis-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/snap-to-visible-areas-margin-x-axis.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-to-visible-areas-margin-y-axis-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/snap-to-visible-areas-margin-y-axis.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-to-visible-areas-x-axis-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/snap-to-visible-areas-x-axis.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-to-visible-areas-y-axis-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/snap-to-visible-areas-y-axis.html: Added.
  • web-platform-tests/css/css-scroll-snap/support/common.css: Added.

(body):
(#scroller):
(.snap):
(#space):
(.left):
(.top):
(.right):
(.bottom):

  • web-platform-tests/css/css-scroll-snap/support/common.js: Added.

(async keyPress):
(waitForAnimationEnd.):
(waitForAnimationEnd):

  • web-platform-tests/css/css-scroll-snap/support/scroll-target-align-001-iframe.html: Added.
  • web-platform-tests/css/css-scroll-snap/support/scroll-target-margin-001-iframe.html: Added.
  • web-platform-tests/css/css-scroll-snap/support/scroll-target-padding-001-iframe.html: Added.
  • web-platform-tests/css/css-scroll-snap/support/scroll-target-snap-001-iframe.html: Added.
  • web-platform-tests/css/css-scroll-snap/support/w3c-import.log: Added.
  • web-platform-tests/css/css-scroll-snap/unreachable-snap-positions-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/unreachable-snap-positions.html: Added.
  • web-platform-tests/css/css-scroll-snap/w3c-import.log: Added.

LayoutTests:

  • TestExpectations: Add failing reference tests.
  • platform/gtk/TestExpectations: Skip tests on platform that does not support scroll-snap.
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/css-scroll-snap/scroll-snap-type-on-root-element-expected.txt: Added.
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/css-scroll-snap/scrollTo-scrollBy-snaps-expected.txt: Added.
  • platform/win/TestExpectations: Ditto.
  • platform/wpe/TestExpectations: Ditto.
1:19 AM Changeset in webkit [268249] by Noam Rosenthal
  • 7 edits
    9 adds in trunk

CSS image-orientation: none should be ignored for cross-origin images
https://bugs.webkit.org/show_bug.cgi?id=217294

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-images/image-orientation/image-orientation-none-cross-origin-expected.html: Added.
  • web-platform-tests/css/css-images/image-orientation/image-orientation-none-cross-origin.html: Added.

Imported a new W3C test for remote image with image-orientation.

Source/WebCore:

Per the new spec in https://github.com/w3c/csswg-drafts/issues/5165,
the orientation should be baked into the image if the image is cross origin, to avoid
exposing remote image orientation to embedders.

The meaning of it in practice is that image-orientation: none would have no effect on remote,
image as it's the only web-facing feature exposing image-orientation.

This change disables image-orientation override for remote images.

Tests: http/wpt/css/css-images/image-orientation/image-orientation-none-cross-origin-canvas.html
imported/w3c/web-platform-tests/css/css-images/image-orientation/image-orientation-none-cross-origin.html

  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::allowsOrientationOverride const):

  • html/HTMLImageElement.h:

Add a check whether an element is allowed to override/expose orientation.

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::drawImage):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::imageOrientation const):
Only apply orientation for eligible images.

LayoutTests:

  • http/wpt/css/css-images/image-orientation/image-orientation-none-cross-origin-canvas.html: Added.
  • http/wpt/css/css-images/image-orientation/image-orientation-none-cross-origin-canvas-expected.html: Added.

Oct 8, 2020:

10:16 PM Changeset in webkit [268248] by jiewen_tan@apple.com
  • 2 edits
    7 adds in trunk/Source/WebKit

[WebAuthn] Implement a dummy WebAuthenticationAgent
https://bugs.webkit.org/show_bug.cgi?id=217401
<rdar://problem/70012011>

Reviewed by Darin Adler.

Part 1.

This patch introduces a new dummy WebAuthenticationAgent where in the future it will take over all WebAuthn operations
from the UI Process such that we can isolate high privileged entitlements to this standalone daemon and therefore are able
offer WebAuthn to third party WKWebView clients. One of the future feautres will require this new process to listen to
LaunchEvents, which only daemons can do. That's why it is implemented as a user agent instead of a XPC service.

This is the first part of establishing such a dummy daemon. What it does is to set up a new build target for the daemon and
hook it up with WebKit's build system. One can manually load the launchd plist and load the daemon to verify this change.

Commands are:
launchctl load /to/your/path/com.apple.webkit.WebAuthenticationAgent.plist
launchctl start com.apple.webkit.WebAuthenticationAgent.Development

Covered by manual tests.

  • Configurations/WebAuthenticationAgent.xcconfig: Added.

Somehow the executable has a suffix .Development for debug/release builds. Will fix that in the later part.

  • Daemons/WebAuthenticationAgent/Info.plist: Added.
  • Daemons/WebAuthenticationAgent/WebAuthenticationAgent.entitlements: Added.
  • Daemons/WebAuthenticationAgent/com.apple.webkit.WebAuthenticationAgent.plist: Added.

The executable location is hardcoded for now. It will be fixed in Part 2 to dynamically point to the right binary.

  • Daemons/WebAuthenticationAgent/main.mm: Added.

(main):

  • WebKit.xcodeproj/project.pbxproj:

Not sure why libWTF.a is needed. Will fix that in the later part.

10:08 PM Changeset in webkit [268247] by ysuzuki@apple.com
  • 27 edits in trunk/Source

Unreviewed, reland r268170
https://bugs.webkit.org/show_bug.cgi?id=217460

Source/JavaScriptCore:

Fixed missing wrong OperationPtrTag use in Repatch.cpp.

  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::getLinkerAddress):

  • assembler/AssemblerBuffer.h:

(JSC::ARM64EHash::update):
(JSC::ARM64EHash::finalHash const):

  • assembler/JITOperationList.cpp:

(JSC::addPointers):

  • assembler/MacroAssemblerARM64.cpp:

(JSC::MacroAssembler::probe):

  • assembler/MacroAssemblerCodeRef.h:

(JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
(JSC::MacroAssemblerCodePtr::createFromExecutableAddress):

  • assembler/testmasm.cpp:

(JSC::testProbeModifiesProgramCounter):

  • b3/air/testair.cpp:
  • ftl/FTLOutput.h:

(JSC::FTL::Output::callWithoutSideEffects):
(JSC::FTL::Output::operation):

  • ftl/FTLSlowPathCall.cpp:

(JSC::FTL::SlowPathCallContext::makeCall):

  • jit/JITCode.cpp:

(JSC::JITCodeWithCodeRef::executableAddressAtOffset):

  • jit/JITExceptions.cpp:

(JSC::genericUnwind):

  • jit/JITOperations.cpp:
  • jit/Repatch.cpp:

(JSC::readPutICCallTarget):
(JSC::ftlThunkAwareRepatchCall):
(JSC::tryCacheGetBy):
(JSC::tryCachePutByID):

  • llint/LLIntData.cpp:

(JSC::LLInt::initialize):

  • llint/LLIntPCRanges.h:

(JSC::LLInt::isLLIntPC):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::setUpCall):

  • llint/LLIntThunks.cpp:

(JSC::LLInt::generateThunkWithJumpTo):

  • runtime/JSCPtrTag.h:
  • runtime/MachineContext.h:

(JSC::MachineContext::instructionPointer):

  • runtime/NativeExecutable.cpp:

(JSC::NativeExecutable::finishCreation):

  • runtime/PutPropertySlot.h:

(JSC::PutPropertySlot::setCustomValue):
(JSC::PutPropertySlot::setCustomAccessor):
(JSC::PutPropertySlot::customSetter const):

  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::emitCCall):

  • wasm/WasmSlowPaths.cpp:

Source/WTF:

  • wtf/PlatformRegisters.cpp:

(WTF::threadStateLRInternal):
(WTF::threadStatePCInternal):

  • wtf/PtrTag.h:

(WTF::tagCodePtr):
(WTF::untagCodePtr):
(WTF::assertIsCFunctionPtr):
(WTF::assertIsNullOrCFunctionPtr):
(WTF::assertIsNotTagged):
(WTF::assertIsTagged):
(WTF::assertIsNullOrTagged):
(WTF::isTaggedWith):
(WTF::assertIsTaggedWith):
(WTF::assertIsNullOrTaggedWith):
(WTF::tagCFunctionPtr):
(WTF::tagCFunction):
(WTF::untagCFunctionPtr):
(WTF::tagInt):

9:02 PM Changeset in webkit [268246] by Chris Fleizach
  • 3 edits in trunk/Source/WebKit

AX: Website Warning page is inaccessible
https://bugs.webkit.org/show_bug.cgi?id=217489

Reviewed by Zalan Bujtas.

If we have a safe browsing window, we need to use that instead of the content view.

  • UIProcess/Cocoa/WKSafeBrowsingWarning.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::accessibilityAttributeValue):

8:13 PM Changeset in webkit [268245] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

Nil-check results of -[AVPlayerItemVideoOutput initWithPixelBufferAttributes:]
https://bugs.webkit.org/show_bug.cgi?id=217498
<rdar://problem59666003>

Reviewed by Jer Noble.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput): Log an error and
return immediately if -[AVPlayerItemVideoOutput initWithPixelBufferAttributes:]
returns nil.

8:05 PM Changeset in webkit [268244] by mmaxfield@apple.com
  • 4 edits
    2 adds in trunk

Stop clamping text-underline-offset to 0
https://bugs.webkit.org/show_bug.cgi?id=217455

Reviewed by Simon Fraser.

Source/WebCore:

As per the CSSWG resolution at
https://github.com/w3c/csswg-drafts/issues/4059

Test: fast/text/negative-underline-position.html

  • style/InlineTextBoxStyle.cpp:

(WebCore::computeUnderlineOffset):

LayoutTests:

  • fast/text/negative-underline-position-expected-mismatch.html: Added.
  • fast/text/negative-underline-position.html: Added.
  • fast/css3-text/css3-text-decoration/text-underline-negative-expected.html: Update.
7:31 PM Changeset in webkit [268243] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION (r267763): SHOULD NEVER BE REACHED in WebKit::contentRuleListsFromIdentifier
https://bugs.webkit.org/show_bug.cgi?id=217499

There was an invalid assertion. NBD.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::contentRuleListsFromIdentifier):

7:26 PM Changeset in webkit [268242] by Matt Lewis
  • 2 edits in trunk/Tools

Move EWS to new SDKs: tvOS 14, and watchOS 7.
https://bugs.webkit.org/show_bug.cgi?id=217145

Reviewed by Aakash Jain.

  • BuildSlaveSupport/ews-build/config.json:
6:18 PM Changeset in webkit [268241] by commit-queue@webkit.org
  • 27 edits in trunk/Source

Unreviewed, reverting r268170 and r268190.
https://bugs.webkit.org/show_bug.cgi?id=217502

Crash on ARM64E exclusively

Reverted changesets:

"[JSC] Restrict more ptr-tagging and avoid using
OperationPtrTag for JIT code"
https://bugs.webkit.org/show_bug.cgi?id=217460
https://trac.webkit.org/changeset/268170

"Unreviewed, build fix for ARM64E"
https://bugs.webkit.org/show_bug.cgi?id=217460
https://trac.webkit.org/changeset/268190

6:17 PM Changeset in webkit [268240] by Wenson Hsieh
  • 3 edits in trunk/Source/WebCore

[MotionMark] Add a fast path for GraphicsContext::strokePath in the case where the path is a line
https://bugs.webkit.org/show_bug.cgi?id=217496

Reviewed by Tim Horton.

When running the Canvas Lines subtest with GPU process enabled, we currently suffer from increased memory usage
in the GPU process. Much of this increased memory usage is due to the allocation of approximately 35 million
CGPathRefs over the course of the subtest, which ends up dirtying a large number of pages; this also adds a
nontrivial amount of overhead due to creating and destroying these platform CGPathRefs.

We can mitigate most of this overhead in the GPU process by avoiding platform CGPathRef allocation entirely
when stroking simple line segments in GraphicsContext::strokePath. Rather than reifying Path::m_path and
then using CGContextDrawPathDirect, we can simply use CGContextStrokeLineSegments with a fixed array of
2 CGPoints.

No change in behavior.

  • platform/graphics/Path.h:

(WebCore::Path::inlineData const):

  • platform/graphics/cg/GraphicsContextCG.cpp:

(WebCore::GraphicsContext::strokePath):

5:48 PM Changeset in webkit [268239] by rniwa@webkit.org
  • 16 edits
    3 adds in trunk

Make it possible to send an arbitrary IPC message from JavaScript
https://bugs.webkit.org/show_bug.cgi?id=217423
<rdar://problem/69969351>

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Added a helper function to get uint64_t out of BigInt.

  • runtime/JSBigInt.cpp:

(JSC::JSBigInt::toUint64Heap): Added.

  • runtime/JSBigInt.h:

(JSC::JSBigInt::toUint64): Added.

Source/WebKit:

This patch introduces the JavaScript API (window.IPC) to send IPC out of WebContent process.
The feature is compiled in under ASAN and Debug builds and can be enabled at runtime.

window.IPC has two methods: sendMessage and sendSyncMessage which sends an async and sync IPC respectively.
It takes the destination process name (UI, GPU, or Networking), the destination ID (e.g. WebPageProxy ID),
message ID, timeout for sendSyncMessage, and optionally IPC message arguments. The message arguments can be
passed in as a TypedArray or ArrayBuffer, or a JavaScript array that recursively describes encoded objects.

Each object can be either a TypedArray or ArrayBuffer, which will be treated as encoded message, an array
which will be encoded as a Vector with each item within the array encoded recursively, or a dictionary which
describes a specific type.

When a specific type is described via a dictionary, "value" is encoed based on "type" as follows:

  • When "type" is "String", "value" is encoded as a WTF::String, treating null or undefined as a null string.
  • When "type" is "bool", "int8_t", "int16_t", "int32_t", "int64_t", "uint8_t", "uint16_t", "uint32_t", or "uint64_t", "value" (which can be BigInt or a number) is encoded as the respective C++ type.
  • When "type" is "RGBA", "value" is used as PackedColor::RGBA to construct WebCore::Color to be encoded.
  • When "type" is "IntRect" or "FloatRect", "x", "y", "width", and "height" are treated as respective values of IntRect or FloatRect C++ objects, and the constructed *Rect is encoded.
  • When "type" is "FrameInfoData", the context object's WebFrame's FrameInfoData is encoded.

The list of IPC messages are exposed on window.IPC.messages, and VisitedLinkStore ID, WebPageProxy ID,
and frame identifiers are also exposed as static variables on window.IPC.

  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld): Inject the API if enabled.

  • WebProcess/WebPage/IPCTestingAPI.cpp: Added.

(WebKit::IPCTestingAPI::JSIPC::create): Added.
(WebKit::IPCTestingAPI::JSIPC::webFrame): Added.
(WebKit::IPCTestingAPI::JSIPC::JSIPC): Added.
(WebKit::IPCTestingAPI::JSIPC::wrapperClass): Added.
(WebKit::IPCTestingAPI::JSIPC::unwrap): Added.
(WebKit::IPCTestingAPI::JSIPC::toWrapped): Added.
(WebKit::IPCTestingAPI::JSIPC::initialize): Added.
(WebKit::IPCTestingAPI::JSIPC::finalize): Added.
(WebKit::IPCTestingAPI::JSIPC::staticFunctions): Added.
(WebKit::IPCTestingAPI::JSIPC::staticValues): Added.
(WebKit::IPCTestingAPI::convertToUint64): Added.
(WebKit::IPCTestingAPI::processTargetFromArgument): Added.
(WebKit::IPCTestingAPI::destinationIDFromArgument): Added.
(WebKit::IPCTestingAPI::messageIDFromArgument): Added.
(WebKit::IPCTestingAPI::encodeTypedArray): Added.
(WebKit::IPCTestingAPI::createTypeError): Added.
(WebKit::IPCTestingAPI::encodeRectType): Added.
(WebKit::IPCTestingAPI::encodeIntegralType): Added.
(WebKit::IPCTestingAPI::VectorEncodeHelper::encode const): Added.
(WebKit::IPCTestingAPI::encodeArgument): Added.
(WebKit::IPCTestingAPI::JSIPC::sendMessage): Added.
(WebKit::IPCTestingAPI::JSIPC::sendSyncMessage): Added.
(WebKit::IPCTestingAPI::JSIPC::visitedLinkStoreID): Added.
(WebKit::IPCTestingAPI::JSIPC::webPageProxyID): Added.
(WebKit::IPCTestingAPI::JSIPC::frameIdentifier): Added.
(WebKit::IPCTestingAPI::JSIPC::retrieveID): Added.
(WebKit::IPCTestingAPI::JSIPC::messages): Added.
(WebKit::IPCTestingAPI::inject):

  • WebProcess/WebPage/IPCTestingAPI.h: Added.
  • WebProcess/WebPage/WebFrame.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_limitsNavigationsToAppBoundDomains):
(WebKit::WebPage::updatePreferences):

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::ipcTestingAPIEnabled const):
(WebKit::WebPage::webPageProxyID const):
(WebKit::WebPage::visitedLinkTableID const):

Source/WTF:

Added a compile time flag (ENABLE_IPC_TESTING_API) and a runtime flag (IPCTestingAPIEnabled)
for the JavaScript API to test IPC.

  • Scripts/GeneratePreferences.rb:

(Preference::nameLower): Keep IPC uppercase.

  • Scripts/Preferences/WebPreferencesInternal.yaml: Added IPCTestingAPIEnabled.
  • wtf/PlatformEnable.h: Added ENABLE_IPC_TESTING_API.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm: Added.

(-[IPCTestingAPIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(TEST):

5:45 PM Changeset in webkit [268238] by weinig@apple.com
  • 21 edits in trunk

Refactor TestOptions code in WebKitTestRunner to make it easier to rationalize and extend
https://bugs.webkit.org/show_bug.cgi?id=217390

Reviewed by Darin Adler.

Refactors TestOptions code in WebKitTestRunner to make it clear how options coming in at
different levels are treated and what precedence each has. The order is (from least to most):

  • Global features passed to WebKitTestRunner via the command line (e.g. --show-touches)
  • Hardcoded features based on the path of the test being run (hopefully we can remove all soon)
  • Hardcoded platform specific defaults (currently only used by macOS for useThreadedScrolling).
  • Features from the test headers within the test itself.
  • Finally, a second chance for more platform specific defaults (currenly only used the Cocoa ports for setting enableProcessSwapOnNavigation and enableProcessSwapOnWindowOpen based on NSUserDefaults.)

To make this change work, and pave the way for future autogeneration of some of these test options,
the TestOptions struct (now class) was overhauled. Instead of storing the state itself, TestOptions
is now an immutable owner of a TestFeatures object. TestFeatures is a simple struct that contains maps
of option keys to values and can be merged with other TestFeatures objects. TestOptions takes a
TestFeatures at construction, and exposes getters for all keys, as well as defaults for when they are
not in the maps. In future changes, I would like to remove many of these (the ones that correspond
with WebKit preferences anyway) and have the keys and values automatically dealt with by WKPreferences.

  • WebKitTestRunner/Options.cpp:
  • WebKitTestRunner/Options.h:

Switch to std::unordered_map for consistency and ease of conversion.

  • WebKitTestRunner/PlatformWebView.h:

(WTR::PlatformWebView::viewSupportsOptions const):
Update to call new TestOptions functions.

  • WebKitTestRunner/StringFunctions.h:

(WTR::toWK):
(WTR::toWTFString):
Add conversions for std::string.

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::initialize):
Replace some bools with a new global TestFeatures instance that forms the base of
all TestFeatures merges.

(WTR::TestController::generateContextConfiguration const):
(WTR::TestController::generatePageConfiguration):
(WTR::TestController::createWebViewWithOptions):
(WTR::TestController::ensureViewSupportsOptionsForTest):
(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::TestController::resetStateToConsistentValues):
Update to call new TestOptions functions.

(WTR::TestController::createTestURL):
Expose as a static member function on TestController for use in other files.

(WTR::TestController::testOptionsForTest const):
Rework to be a sequence of TestFeatures merges.

(WTR::TestController::updateWebViewSizeForTest):
(WTR::TestController::updateWindowScaleForTest):
Update to call new TestOptions functions.

(WTR::createTestURL): Deleted.
(WTR::parseBooleanTestHeaderValue): Deleted.
(WTR::parseStringTestHeaderValueAsRelativePath): Deleted.
(WTR::parseStringTestHeaderValueAsURL): Deleted.
(WTR::updateTestOptionsFromTestHeader): Deleted.
(WTR::TestController::platformAddTestOptions const): Deleted.
Moved TestOptions parsing to TestOptions.cpp

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::createTestSettingsDictionary):
Update to call new TestOptions functions.

  • WebKitTestRunner/TestOptions.h:

Reworks TestOptions to be an immutable owner of a TestFeatures struct, which is a set
of maps that map feature string keys, to values of type bool, double, string or string vector.

  • WebKitTestRunner/TestOptions.cpp:

(WTR::merge):
Merges two TestFeatures objects. If both contain the same key, the 'additional'
TestFeatures overrides the 'base' TestFeatures.

(WTR::dumpFeatures):
Helper to dump features to stderr, useful for debugging.

(WTR::keyType):
Helper for parser to know which value parser to use.

(WTR::parseBooleanTestHeaderValue):
(WTR::parseStringTestHeaderValueAsRelativePath):
(WTR::parseStringTestHeaderValueAsURL):
Value parsers moved from TestController.cpp

(WTR::parseTestHeader):
Header parser moved from TestController.cpp. Update to now return
a TestFeatures object and use keyType to pick value parser rather
than inlining the if statements.

(WTR::hardcodedFeaturesBasedOnPathForTest):
Moved from the TestOptions contructor and reworked to return a TestFeatures
object to be merged by the caller.

(WTR::featureDefaultsFromTestHeaderForTest):
Creates a TestFeatures for the test headers of the current test.

  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::platformSpecificFeatureOverridesDefaultsForTest const):
Reworked to now return a TestFeatures object that will be merged, rather than updating
a TestOptions. Moves enableInAppBrowserPrivacy work to TestController::platformWillRunTest
where it is more appropriate.

(WTR::TestController::platformInitializeDataStore):
(WTR::TestController::platformCreateWebView):
(WTR::TestController::finishCreatingPlatformWebView):
(WTR::TestController::setApplicationBundleIdentifier):
(WTR::TestController::cocoaResetStateToConsistentValues):
(WTR::contentMode):
Update to call new TestOptions functions.

  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformResetStateToConsistentValues):
(WTR::TestController::platformConfigureViewForTest):
Update to call new TestOptions functions.

(WTR::TestController::platformSpecificFeatureDefaultsForTest const):
(WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted.
Moved GeneratedTouchesDebugWindow work to TestController::platformConfigureViewForTest
where it is more appropriate and removed shouldShowTouches setting as that is done
globally now.

  • WebKitTestRunner/mac/PlatformWebViewMac.mm:

(WTR::PlatformWebView::PlatformWebView):
Update to call new TestOptions functions.

  • WebKitTestRunner/mac/TestControllerMac.mm:

(WTR::TestController::platformSpecificFeatureDefaultsForTest const):
(WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted.
Remove shouldUseRemoteLayerTree and shouldShowWebView, as those are now done globally,
and re-implemented useThreadedScrolling to use boolFeatures.

  • WebKitTestRunner/win/TestControllerWin.cpp:

(WTR::TestController::platformSpecificFeatureDefaultsForTest const):
(WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted.
Updated for new signature.

  • WebKitTestRunner/wpe/TestControllerWPE.cpp:

(WTR::TestController::platformSpecificFeatureDefaultsForTest const):
(WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted.
Updated for new signature.

  • WebKitTestRunner/gtk/TestControllerGTK.cpp:

(WTR::TestController::platformSpecificFeatureDefaultsForTest const):
(WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted.
Updated for new signature.

5:34 PM Changeset in webkit [268237] by Russell Epstein
  • 3 edits in branches/safari-610.2.11.0-branch/Source/WebCore

Apply patch. rdar://problem/70104437

5:27 PM Changeset in webkit [268236] by Wenson Hsieh
  • 2 edits in trunk/LayoutTests

Unreviewed, unskip several canvas-related layout test directories when enabling GPU process

The vast majority of tests in these directories now pass; we can now enable these directories by default, and
track the remaining tests as individual failures.

  • gpu-process/TestExpectations:
5:26 PM Changeset in webkit [268235] by Russell Epstein
  • 3 edits in branches/safari-610.2.11.1-branch/Source/WebCore

Apply patch. rdar://problem/69594474

5:24 PM Changeset in webkit [268234] by James Darpinian
  • 15 edits
    10 adds in trunk

Support EXT_texture_compression_rgtc WebGL extension
https://bugs.webkit.org/show_bug.cgi?id=217198

Reviewed by Kenneth Russell.

Source/WebCore:

Test: webgl/conformance/extensions/ext-texture-compression-rgtc.html

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSDOMConvertWebGL.cpp:

(WebCore::convertToJSValue):

  • html/canvas/EXTTextureCompressionRGTC.cpp: Added.

(WebCore::EXTTextureCompressionRGTC::EXTTextureCompressionRGTC):
(WebCore::EXTTextureCompressionRGTC::getName const):

  • html/canvas/EXTTextureCompressionRGTC.h: Added.
  • html/canvas/EXTTextureCompressionRGTC.idl: Added.
  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::getExtension):
(WebCore::WebGL2RenderingContext::getSupportedExtensions):

  • html/canvas/WebGLExtension.h:
  • html/canvas/WebGLRenderingContext.cpp:

(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::getSupportedExtensions):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::extensionIsEnabled):
(WebCore::WebGLRenderingContextBase::validateCompressedTexFuncData):
(WebCore::WebGLRenderingContextBase::loseExtensions):

  • html/canvas/WebGLRenderingContextBase.h:
  • platform/graphics/ExtensionsGL.h:

LayoutTests:

  • webgl/conformance/extensions/ext-texture-compression-rgtc-expected.txt: Added.
  • webgl/conformance/extensions/ext-texture-compression-rgtc.html: Added.
  • webgl/conformance/extensions/s3tc-and-rgtc-expected.txt: Added.
  • webgl/conformance/extensions/s3tc-and-rgtc.html: Added.
  • webgl/resources/webgl_test_files/conformance/extensions/ext-texture-compression-rgtc.html: Added.
  • webgl/resources/webgl_test_files/conformance/extensions/s3tc-and-rgtc.html: Added.
  • webgl/resources/webgl_test_files/js/tests/compressed-texture-utils.js: Added.
5:15 PM Changeset in webkit [268233] by Hector Lopez
  • 1 edit
    2 adds in trunk/LayoutTests

Add Mojave specific result
https://bugs.webkit.org/show_bug.cgi?id=167729

Unreviewed test gardening.

  • platform/mac-mojave/imported/w3c/web-platform-tests/css/css-pseudo/text-selection-expected.txt: Added.
5:03 PM Changeset in webkit [268232] by achristensen@apple.com
  • 7 edits in trunk

FileReader.result should return null if it isn't done yet
https://bugs.webkit.org/show_bug.cgi?id=217484

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

  • web-platform-tests/FileAPI/reading-data-section/filereader_result-expected.txt:

Source/WebCore:

This matches Chrome and Firefox.
Covered by newly passing web platform tests.

  • fileapi/FileReader.cpp:

(WebCore::FileReader::result const):

LayoutTests:

  • fast/files/read-file-async-expected.txt:
  • fast/files/workers/worker-read-file-async-expected.txt:
4:44 PM Changeset in webkit [268231] by Peng Liu
  • 4 edits in trunk

[Media in GPU Process] Cannot activate or deactivate an audio session
https://bugs.webkit.org/show_bug.cgi?id=217492

Reviewed by Eric Carlson.

Source/WebKit:

No new tests, covered by existing tests.

  • WebProcess/GPU/media/RemoteAudioSession.cpp:

(WebKit::RemoteAudioSession::tryToSetActiveInternal):

LayoutTests:

  • gpu-process/TestExpectations:
4:28 PM Changeset in webkit [268230] by Alan Coon
  • 1 edit in branches/safari-610-branch/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm

Build fix for makeBlockPtr.

4:28 PM Changeset in webkit [268229] by Alan Coon
  • 4 edits in branches/safari-610-branch/Source

Cherry-pick r268052. rdar://problem/70097377

Enable video capture in WebProcess by default on MacOS
https://bugs.webkit.org/show_bug.cgi?id=217385
<rdar://problem/69999542>

Reviewed by Sam Weinig.

Source/WebKit:

Manually tested in MiniBrowser.

  • Shared/WebPreferencesDefaultValues.cpp:
  • Shared/WebPreferencesDefaultValues.h:

Source/WTF:

  • Scripts/Preferences/WebPreferencesInternal.yaml:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268052 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4:28 PM Changeset in webkit [268228] by achristensen@apple.com
  • 16 edits
    5 adds in trunk

Implement Blob.stream
https://bugs.webkit.org/show_bug.cgi?id=217457

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/FileAPI/blob/Blob-stream.any-expected.txt:
  • web-platform-tests/FileAPI/blob/Blob-stream.any.worker-expected.txt:
  • web-platform-tests/FileAPI/idlharness-expected.txt:
  • web-platform-tests/FileAPI/idlharness.worker-expected.txt:

Source/WebCore:

It's implemented in Chrome and Firefox.

  • Modules/async-clipboard/ClipboardItemBindingsDataSource.h:
  • bindings/js/ReadableStream.h:

(WebCore::toJSNewlyCreated):

  • bindings/scripts/CodeGeneratorJS.pm:

(AddToIncludesForIDLType):

  • fileapi/Blob.cpp:

(WebCore::Blob::stream):

  • fileapi/Blob.h:
  • fileapi/Blob.idl:
  • fileapi/FileReaderLoader.cpp:

(WebCore::FileReaderLoader::FileReaderLoader):
(WebCore::FileReaderLoader::takeRawData):

  • fileapi/FileReaderLoader.h:
  • fileapi/FileReaderLoaderClient.h:

LayoutTests:

  • fast/files/blob-stream-error-expected.txt: Added.
  • fast/files/blob-stream-error.html: Added.
  • fast/files/blob-stream-frame-expected.txt: Added.
  • fast/files/blob-stream-frame.html: Added.
  • fast/files/resources/blob-stream-iframe.html: Added.
4:28 PM Changeset in webkit [268227] by Alan Coon
  • 3 edits in branches/safari-610-branch/Tools

Cherry-pick r268023. rdar://problem/70056589

Disable media capture if an app's entitlements won't allow access to capture devices
https://bugs.webkit.org/show_bug.cgi?id=217319
<rdar://problem/69956112>

Unreviewed, address post-review comments.

  • MiniBrowser/mac/Info.plist: Update media capture usage strings.
  • MobileMiniBrowser/MobileMiniBrowser/Info.plist: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268023 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4:28 PM Changeset in webkit [268226] by Alan Coon
  • 8 edits in branches/safari-610-branch

Cherry-pick r268012. rdar://problem/70056589

Disable media capture if an app's entitlements won't allow access to capture devices
https://bugs.webkit.org/show_bug.cgi?id=217319
<rdar://problem/69956112>

Reviewed by Youenn Fablet.

Source/WebKit:

No new tests, tested manually with MiniBrowser and Safari.

  • UIProcess/Cocoa/UserMediaPermissionRequestManagerProxy.mm: (WebKit::UserMediaPermissionRequestManagerProxy::permittedToCaptureAudio): If the app is sandboxed, check for the entitlement required for audio capture. Don't bother checking for usage string if TCC has already authorized capture. (WebKit::UserMediaPermissionRequestManagerProxy::permittedToCaptureVideo): Ditto for video capture.
  • UIProcess/Cocoa/WebPreferencesCocoa.mm: (WebKit::WebPreferences::platformInitializeStore): Initialize mediaDevicesEnabled manually because its default value is always false in the WebProcess and may be true in the UIProcess. WebPreferences assumes the default will always be the same in both processes, and so has an optimization that only sends values to the WebProcess if they differ from the default value. This means if the default in the UIProcess is true it won't be pushed to the WebProcess, so capture won't work.
  • Platform/spi/ios/TCCSPI.h: Update TCCAccessPreflightResult.

Tools:

  • MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj:
  • MiniBrowser/mac/AppDelegate.m: (-[BrowserAppDelegate defaultConfiguration]): Don't set configuration._mediaCaptureEnabled, it should no longer be necessary.
  • MiniBrowser/mac/Info.plist: Remove unneeded keys.
  • MobileMiniBrowser/MobileMiniBrowser/Info.plist: Ditto. Add usage strings.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268012 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4:28 PM Changeset in webkit [268225] by Alan Coon
  • 10 edits
    1 add in branches/safari-610-branch

Cherry-pick r267844. rdar://problem/70056601

Prevent media capture unless the application has correct data for system permission prompt
https://bugs.webkit.org/show_bug.cgi?id=217104
<rdar://problem/69761929>

Reviewed by Darin Adler.

Source/WebKit:

Tested manually with MiniBrowser.

  • SourcesCocoa.txt:
  • UIProcess/Cocoa/UIDelegate.mm: (WebKit::requestAVCaptureAccessForMediaType): Renamed from requestAccessForMediaType. (WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest): Deny requests of the application is not permitted to capture. Restructure logic to make it easier to understand. (WebKit::requestAccessForMediaType): Deleted.
  • UIProcess/Cocoa/UserMediaPermissionRequestManagerProxy.mm: Added. (WebKit::UserMediaPermissionRequestManagerProxy::permittedToCaptureAudio): Check for required Info.plist string. (WebKit::UserMediaPermissionRequestManagerProxy::permittedToCaptureVideo): Ditto.
  • UIProcess/Cocoa/WebPageProxyCocoa.mm: Update for unified build.
  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp: (WebKit::UserMediaPermissionRequestManagerProxy::permittedToCaptureAudio): (WebKit::UserMediaPermissionRequestManagerProxy::permittedToCaptureVideo):
  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
  • WebKit.xcodeproj/project.pbxproj:

Tools:

  • MiniBrowser/mac/Info.plist: Add necessary entitlements and usage strings.
  • MobileMiniBrowser/MobileMiniBrowserFramework/WebViewController.m: (-[WebViewController createWebView]): Setting the private capture preference is not necessary because we set configuration._mediaCaptureEnabled.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267844 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4:28 PM Changeset in webkit [268224] by Alan Coon
  • 3 edits in branches/safari-610-branch/Source/WebKit

Cherry-pick r267698. rdar://problem/70056601

Make sure our calls to AVCaptureDevice requestAccessForMediaType do processing on the main thread
https://bugs.webkit.org/show_bug.cgi?id=216974

Reviewed by Darin Adler.

The completion handler to [AVCaptureDeviceClass requestAccessForMediaType:] may sometimes be called in a background thread on iOS.
Make sure to hop to the main thread if that is the case.
Also make sure to ref/weakref lambda captured variables.

  • UIProcess/Cocoa/UIDelegate.h:
  • UIProcess/Cocoa/UIDelegate.mm: (WebKit::requestAccessForMediaType): (WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267698 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4:28 PM Changeset in webkit [268223] by Alan Coon
  • 16 edits in branches/safari-610-branch

Cherry-pick r267563. rdar://problem/70056594

Introduce WKWebViewConfiguration mediaCaptureEnabled
https://bugs.webkit.org/show_bug.cgi?id=216872

Reviewed by Alex Christensen.

Source/WebKit:

Add a new boolean configuration to enable/disable mediaDevices exposure.
Value is off by default.
A future patch will remove the mediaDevices WebPreferences based API, given there is no need
to enable/disable mediaDevices during the lifetime of a page.

Covered by existing tests.

  • UIProcess/API/APIPageConfiguration.cpp: (API::PageConfiguration::copy const):
  • UIProcess/API/APIPageConfiguration.h: (API::PageConfiguration::setMediaDevicesEnabled): (API::PageConfiguration::mediaDevicesEnabled const):
  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _setupPageConfiguration:]):
  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration _mediaDevicesEnabled]): (-[WKWebViewConfiguration _setMediaDevicesEnabled:]):
  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:

Tools:

Make use of new configuration boolean instead of mediaDevicesEnabled WebPreferences API.

  • MiniBrowser/mac/AppDelegate.m: (-[BrowserAppDelegate defaultConfiguration]):
  • TestWebKitAPI/Tests/WebKit/GetUserMedia.mm: (TestWebKitAPI::TEST):
  • TestWebKitAPI/Tests/WebKit/GetUserMediaNavigation.mm: (TestWebKitAPI::TEST):
  • TestWebKitAPI/Tests/WebKit/GetUserMediaReprompt.mm: (TestWebKitAPI::TEST):
  • TestWebKitAPI/Tests/WebKit/MediaStreamTrackDetached.mm: (TestWebKitAPI::TEST):
  • TestWebKitAPI/Tests/WebKitCocoa/GetDisplayMedia.mm: (TestWebKitAPI::GetDisplayMediaTest::SetUp):
  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/UserMediaDisabled.mm: (MediaCaptureDisabledTest::SetUp):
  • TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm: (MediaCaptureSimulateFailedSandbox::SetUp):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267563 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4:28 PM Changeset in webkit [268222] by Alan Coon
  • 13 edits in branches/safari-610-branch

Cherry-pick r267081. rdar://problem/70056594

End of media capture should not be reported before 3 seconds of the start of capture
https://bugs.webkit.org/show_bug.cgi?id=216415
Source/WebCore:

Reviewed by Eric Carlson.

Add a timer that allows taking a function and a delay as parameter.
Covered by added API test.

  • platform/Timer.h: (WebCore::DeferrableTaskTimer::fired): (WebCore::DeferrableTaskTimer::doTask): (WebCore::DeferrableTaskTimer::cancel):

Source/WebKit:

<rdar://problem/68512358>

Reviewed by Eric Carlson.

Add support for delaying of end of capture notification to the application.
This allows to ensure that a capture indicator stays for long enough for the user to notice it.
A capture indicator should be visible to the user for at least three seconds.

A timer is scheduled when starting a capture and there is no ongoing capture.
As long as the timer is active, the capture state cannot be transitioned to no capture.
Other transitions are allowed.
Once the timer kicks in, any capture state update is done synchronously.
Ensure to update the capture state when the timer kicks in.

Note that even navigations will not allow transitioning the capture state sooner.
This is done to ensure a page does not try to capture one frame before navigating to another page.
In practice, very few pages should navigate quickly after starting capture.

  • UIProcess/API/C/WKPage.cpp: (WKPageGetMediaState): (WKPageSetMediaCaptureReportingDelayForTesting):
  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _mediaCaptureState]):
  • UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
  • UIProcess/API/Cocoa/WKWebViewTesting.mm: (-[WKWebView _mediaCaptureReportingDelayForTesting]): (-[WKWebView _setMediaCaptureReportingDelayForTesting:]):
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::updatePlayingMediaDidChange): (WebKit::WebPageProxy::updateReportedMediaCaptureState):
  • UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::reportedMediaCaptureState const): (WebKit::WebPageProxy::mediaCaptureReportingDelay const): (WebKit::WebPageProxy::setMediaCaptureReportingDelay):

Tools:

Reviewed by Eric Carlson.

  • TestWebKitAPI/Tests/WebKit/GetUserMedia.mm: (TestWebKitAPI::TEST):
  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: (-[GetUserMediaUIDelegate _webView:mediaCaptureStateDidChange:]): Add a notCapturing boolean and wait for the notification before going back to the capturing page. Decrease delay to 1 second to make the test run faster.
  • WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): Make sure to set media capture state delay to zero.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267081 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4:28 PM Changeset in webkit [268221] by Alan Coon
  • 6 edits
    2 adds in branches/safari-610-branch

Cherry-pick r267838. rdar://problem/70056580

getUserMedia with sampleRate constraints may fail
https://bugs.webkit.org/show_bug.cgi?id=217147
<rdar://problem/69831144>

Reviewed by Eric Carlson.

In case of new capture, make sure to reset sample rate and volume to default values.
This ensures that a sample rate that will fail the capture will not stick for other pages.
Manually tested.

  • platform/mediastream/mac/BaseAudioSharedUnit.cpp: (WebCore::BaseAudioSharedUnit::prepareForNewCapture):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267838 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4:28 PM Changeset in webkit [268220] by Alan Coon
  • 10 edits
    1 move
    1 delete in branches/safari-610-branch

Cherry-pick r267568. rdar://problem/70056584

Implement default behavior for getUserMedia requests in case where there is no delegate set
https://bugs.webkit.org/show_bug.cgi?id=216968

Reviewed by Eric Carlson.

Source/WebKit:

In case page UIDelegate is not set, make the getUserMedia request do its default action.
In case there is a UIDelegate but no getUserMedia specific delegates, make the getUserMedia request do its default action.
Default action is deny for getDisplayMedia and for non cocoa ports.
For cocoa ports, a prompt is shown.

Manually tested with MiniBrowser and MobileMiniBrowser.

  • SourcesCocoa.txt:
  • UIProcess/API/APIUIClient.h: (API::UIClient::decidePolicyForUserMediaPermissionRequest):
  • UIProcess/Cocoa/UIDelegate.mm: (WebKit::requestUserMediaAuthorizationForFrame):
  • UIProcess/Cocoa/UserMediaPermissionRequestProxy.mm: Renamed from Source/WebKit/UIProcess/Cocoa/WKUserMediaCaptureAccessAlert.mm. (WebKit::alertMessageText): (WebKit::UserMediaPermissionRequestProxy::doDefaultAction):
  • UIProcess/Cocoa/WKUserMediaCaptureAccessAlert.h: Removed.
  • UIProcess/UserMediaPermissionRequestProxy.cpp: (WebKit::UserMediaPermissionRequestProxy::doDefaultAction):
  • UIProcess/UserMediaPermissionRequestProxy.h:
  • WebKit.xcodeproj/project.pbxproj:

Tools:

Add camera and microphone entitlements to MobileMiniBrowser.
Expose mediaDevices to web pages and use mock devices.

  • MobileMiniBrowser/MobileMiniBrowser/Info.plist:
  • MobileMiniBrowser/MobileMiniBrowserFramework/WebViewController.m: (-[WebViewController createWebView]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267568 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4:28 PM Changeset in webkit [268219] by Alan Coon
  • 11 edits
    2 adds in branches/safari-610-branch

Cherry-pick r267414. rdar://problem/70056613

Implement a default prompt for getUserMedia
https://bugs.webkit.org/show_bug.cgi?id=216821

Reviewed by Eric Carlson.

Source/WebCore:

Manually tested by running Minibrowser.

  • en.lproj/Localizable.strings:

Source/WebKit:

Move preferences used by WebRTC develop menu to internals.
This allows having them in MiniBrowser.

Enable video capture in UIProcess by default for non Safari applications.
Add support for a getUserMedia prompt, very similar to iOS current prompt.
Use the prompt in case the application does not implement any of the two delegates.

  • Shared/WebPreferences.yaml:
  • Shared/WebPreferencesDefaultValues.cpp: (WebKit::defaultCaptureVideoInUIProcessEnabled):
  • Shared/WebPreferencesDefaultValues.h:
  • Shared/WebPreferencesExperimental.yaml:
  • Shared/WebPreferencesInternal.yaml:
  • UIProcess/Cocoa/UIDelegate.h:
  • UIProcess/Cocoa/UIDelegate.mm: (WebKit::UIDelegate::setDelegate): (WebKit::requestUserMediaAuthorizationForFrame): (WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):
  • UIProcess/Cocoa/WKUserMediaCaptureAccessAlert.h: Added.
  • UIProcess/Cocoa/WKUserMediaCaptureAccessAlert.mm: Added. (WebKit::visibleDomain): (WebKit::alertMessageText): (WebKit::presentUserMediaCaptureAccessAlert):
  • WebKit.xcodeproj/project.pbxproj:

Tools:

Remove getUserMedia delegate implementations to use WebKit built-in prompt.
Add camera and microphone entitlements to allow using real cameras and microphones.
Keep using mock devices as the default.

  • MiniBrowser/MiniBrowser.entitlements:
  • MiniBrowser/mac/WK2BrowserWindowController.m: (-[WK2BrowserWindowController _webView:requestMediaCaptureAuthorization:decisionHandler:]): Deleted. (-[WK2BrowserWindowController _webView:includeSensitiveMediaDeviceDetails:]): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267414 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4:27 PM Changeset in webkit [268218] by Alan Coon
  • 6 edits in branches/safari-610-branch/Source/WebKit

Cherry-pick r267237. rdar://problem/70056605

Unified build fixes in media code
https://bugs.webkit.org/show_bug.cgi?id=216691

Reviewed by Sam Weinig.

Add missing includes and/or missing undef.
No change of behavior.

  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRenderer.cpp:
  • GPUProcess/webrtc/RemoteMediaRecorder.cpp:
  • WebProcess/WebPage/WebPageOverlay.h:
  • WebProcess/cocoa/RemoteRealtimeMediaSource.cpp:
  • WebProcess/cocoa/RemoteRealtimeMediaSource.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267237 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4:05 PM Changeset in webkit [268217] by Hector Lopez
  • 2 edits
    2 deletes in trunk/Source/WebKit

Unreviewed, reverting r268155.

This reverts r268155 becasue it broke internal builds

Reverted changeset:

"[WebAuthn] Implement a dummy WebAuthenticationAgent"
https://bugs.webkit.org/show_bug.cgi?id=217401
https://trac.webkit.org/changeset/268155

3:33 PM Changeset in webkit [268216] by Russell Epstein
  • 1 copy in branches/safari-610.2.11.3-branch

New branch.

3:33 PM Changeset in webkit [268215] by Russell Epstein
  • 1 copy in branches/safari-610.2.11.2-branch

New branch.

3:20 PM Changeset in webkit [268214] by commit-queue@webkit.org
  • 16 edits in trunk

REGRESSION (r267763): [ iOS wk2 ] http/tests/in-app-browser-privacy/non-app-bound-domain-does-not-get-app-bound-session.html is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=217386

Patch by Alex Christensen <achristensen@webkit.org> on 2020-10-08
Reviewed by Brent Fulgham.

Source/WebKit:

Use SPI instead of NSUserDefaults to turn on test mode for app browser privacy.
This is more reliable with the timing change of when a WebsiteDataStore's parameters are sent to the network process.

  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:

(-[_WKWebsiteDataStoreConfiguration enableInAppBrowserPrivacyForTesting]):
(-[_WKWebsiteDataStoreConfiguration setEnableInAppBrowserPrivacyForTesting:]):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::platformSetNetworkParameters):
(WebKit::WebsiteDataStore::ensureAppBoundDomains const):

  • UIProcess/WebsiteData/WebsiteDataStore.h:
  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:

(WebKit::WebsiteDataStoreConfiguration::copy const):

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:

(WebKit::WebsiteDataStoreConfiguration::enableInAppBrowserPrivacyForTesting const):
(WebKit::WebsiteDataStoreConfiguration::setEnableInAppBrowserPrivacyForTesting):

Source/WTF:

  • Scripts/Preferences/WebPreferencesDebug.yaml:

Tools:

  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::platformAddTestOptions const):
(WTR::TestController::platformInitializeDataStore):

  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformResetStateToConsistentValues):

LayoutTests:

  • platform/ios-simulator-wk2/TestExpectations:
2:41 PM Changeset in webkit [268213] by Russell Epstein
  • 5 edits in branches/safari-610.2.11.0-branch

Cherry-pick r268117. rdar://problem/70097482

Presidential Executive Order pages not accessible with Safari.
https://bugs.webkit.org/show_bug.cgi?id=217415

Reviewed by Chris Fleizach.

Source/WebCore:

Test: accessibility/aria-modal.html.

These pages have a dialog modal element of the form

<div class="popover" role="dialog" aria-modal="true">

with style visible and a display value different from none. This makes
WebCore/accessibility to treat it as if the dialog were always visible,
and thus do not convey the content of the page outside the dialog to
VoiceOver. The author controls the visibility of the dialog using the
style opacity. This patch adds the check for the opacity to determine
whether an element is visible or not.

  • accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::isNodeVisible const):

LayoutTests:

Expanded this test to cover the case whether the modal dialog visibility
is controlled by its opacity. Cleaned up JS code and made it work in
isolated tree mode.

  • accessibility/aria-modal-expected.txt:
  • accessibility/aria-modal.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268117 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2:40 PM Changeset in webkit [268212] by Russell Epstein
  • 4 edits in branches/safari-610.2.11.1-branch/Source/WebCore/dom

Cherry-pick f9437de2cd47. rdar://problem/69101091

Fix the build after cherry-picking r266909.

2:40 PM Changeset in webkit [268211] by Russell Epstein
  • 8 edits
    2 adds in branches/safari-610.2.11.1-branch

Cherry-pick r266909. rdar://problem/69101091

Source/WebCore:
Text replacements at the beginning of a second line are replaced too early
https://bugs.webkit.org/show_bug.cgi?id=216327
<rdar://problem/68170353>

Reviewed by Darin Adler.

In the changes in r258871, using SimpleRanges instead of Range causing some side effects
when the replacements at the beginning of lines. The ranges that we are counting are backwards
and the return characters are being counted instead of being ignored. There is almost
certainly a better fix than this, but this patch restores the original logic that
was present when Range was being used, until a better fix can be worked out.

Test: editing/spelling/text-replacement-first-word-second-line.html

  • editing/Editor.cpp: (WebCore::Editor::markAndReplaceFor):
  • editing/TextCheckingHelper.cpp: (WebCore::TextCheckingParagraph::automaticReplacementStart const): (WebCore::TextCheckingParagraph::automaticReplacementLength const):
  • editing/TextCheckingHelper.h:

LayoutTests:
Overlapping text replacements at the beginning of a line are replaced too early
https://bugs.webkit.org/show_bug.cgi?id=216327

Reviewed by Darin Adler.

  • editing/spelling/text-replacement-first-word-second-line-expected.txt: Added.
  • editing/spelling/text-replacement-first-word-second-line.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266909 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2:39 PM Changeset in webkit [268210] by Russell Epstein
  • 4 edits
    2 adds in branches/safari-610.2.11.1-branch

Cherry-pick r268162. rdar://problem/70097353

REGRESSION: Safari unable to load PDF in <embed> (docs.legalconnect.com)
https://bugs.webkit.org/show_bug.cgi?id=217451
<rdar://problem/69767043>

Reviewed by Alex Christensen.

Source/WebCore:

Test: fast/replaced/pdf-as-embed-with-no-mime-type-is-not-blank.html

If plugins are enabled, we'll always let the request go through, and WebKit will
guess that files with PDFPlugin-handled extensions should instantiate PDFPlugin,
even if no other plugins are available.

However, if plugins are disabled, requestPlugin() will early return if the explicitly
specified MIME type is not handled by an application plugin (even though the downstream
WebKit code would have happily instantiated an application plugin for us).

Application plugins shouldn't depend on the plugin enablement setting.
To fix this, have SubframeLoader guess the MIME type if not explicitly specified
(matching WebKit's behavior), and allow the request if it matches an application plugin.

  • loader/SubframeLoader.cpp: (WebCore::findPluginMIMETypeFromURL): Improve this previously logging-only function to use the lastPathComponent of the URL instead of randomly looking at the end of the URL, to ignore query strings and fragments when looking for the file extension.

(WebCore::FrameLoader::SubframeLoader::requestPlugin):
Make use of findPluginMIMETypeFromURL to guess the MIME type if it's not
explicitly specified. If the guessed MIME type is one that is handled
by application plugins, allow the request to go out to WebKit (which
may then instantiate a PDFPlugin, for example).

(WebCore::logPluginRequest):
(WebCore::FrameLoader::SubframeLoader::requestObject):
(WebCore::FrameLoader::SubframeLoader::createJavaAppletWidget):
Pass the URL instead of stringifying it, so we can lastPathComponent as above.

LayoutTests:

  • fast/replaced/pdf-as-embed-with-no-mime-type-is-not-blank-expected-mismatch.html: Added.
  • fast/replaced/pdf-as-embed-with-no-mime-type-is-not-blank.html: Added. Add a test ensuring that <embed> with no specified MIME type still renders the PDF.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268162 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2:39 PM Changeset in webkit [268209] by Russell Epstein
  • 5 edits in branches/safari-610.2.11.1-branch

Cherry-pick r268117. rdar://problem/70104128

Presidential Executive Order pages not accessible with Safari.
https://bugs.webkit.org/show_bug.cgi?id=217415

Reviewed by Chris Fleizach.

Source/WebCore:

Test: accessibility/aria-modal.html.

These pages have a dialog modal element of the form

<div class="popover" role="dialog" aria-modal="true">

with style visible and a display value different from none. This makes
WebCore/accessibility to treat it as if the dialog were always visible,
and thus do not convey the content of the page outside the dialog to
VoiceOver. The author controls the visibility of the dialog using the
style opacity. This patch adds the check for the opacity to determine
whether an element is visible or not.

  • accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::isNodeVisible const):

LayoutTests:

Expanded this test to cover the case whether the modal dialog visibility
is controlled by its opacity. Cleaned up JS code and made it work in
isolated tree mode.

  • accessibility/aria-modal-expected.txt:
  • accessibility/aria-modal.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268117 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2:17 PM Changeset in webkit [268208] by Fujii Hironori
  • 3 edits in trunk/Source/WebCore

[WinCairo] ASSERTION FAILED: m_renderingUpdateRemainingSteps.last().isEmpty() in WebCore::Page::finalizeRenderingUpdate since r268075
https://bugs.webkit.org/show_bug.cgi?id=217490

Reviewed by Simon Fraser.

When the assertion failed, m_renderingUpdateRemainingSteps was
0x2000 (ScrollingTreeUpdate). The flag ScrollingTreeUpdate should
be used only if ENABLE(ASYNC_SCROLLING).

  • page/Page.cpp:

(WebCore::operator<<):

  • page/Page.h:

Conditioned out ScrollingTreeUpdate by ENABLE(ASYNC_SCROLLING).

2:07 PM Changeset in webkit [268207] by Jonathan Bedard
  • 2 edits in trunk/Tools

[webkitpy] Support custom version information
https://bugs.webkit.org/show_bug.cgi?id=217485
<rdar://problem/70069051>

Rubber-stamped by Aakash Jain.

  • Scripts/webkitpy/common/system/platforminfo.py:

(PlatformInfo.init):

1:20 PM Changeset in webkit [268206] by Andres Gonzalez
  • 4 edits in trunk

Presidential Executive Order pages not accessible with Safari.
https://bugs.webkit.org/show_bug.cgi?id=217415
<rdar://problem/69922416>

Reviewed by Chris Fleizach and Simon Fraser.

Follow up to the previous change for this bug per Simon Fraser's comment.
Check not only the visibility and opacity of the object in question but
also of its ancestors.
Expanded the test accessibility/aria-modal.html to include the case
where the visibility of the modal dialog is determined by the opacity of
its parent object.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::isNodeVisible const):

12:53 PM Changeset in webkit [268205] by Russell Epstein
  • 8 edits in branches/safari-610.2.11.0-branch/Source

Versioning.

WebKit-7610.2.11.0.1

12:47 PM Changeset in webkit [268204] by Russell Epstein
  • 8 edits in branches/safari-610.2.11.1-branch/Source

Versioning.

WebKit-7610.2.11.1.1

12:29 PM Changeset in webkit [268203] by Russell Epstein
  • 1 copy in branches/safari-610.2.11.1-branch

New branch.

12:29 PM Changeset in webkit [268202] by Alan Bujtas
  • 10 edits in trunk

[LFC][Integration] Enable float clear for <br>
https://bugs.webkit.org/show_bug.cgi?id=217450

Reviewed by Antti Koivisto.

Source/WebCore:

This patch enables IFC layout for <br clear> content.

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForLineLayoutWithReason):

  • layout/integration/LayoutIntegrationInlineContent.h:
  • layout/integration/LayoutIntegrationLine.h:
  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::constructContent):
(WebCore::LayoutIntegration::LineLayout::contentLogicalHeight const):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::clearFloats): Match the floored position of the float boxes in the search tree.

LayoutTests:

  • platform/ios-wk1/fast/css/word-space-extra-expected.txt: Rebaselining.
  • platform/ios/fast/css/word-space-extra-expected.txt:
  • platform/mac/fast/css/word-space-extra-expected.txt:
12:23 PM Changeset in webkit [268201] by Russell Epstein
  • 1 copy in branches/safari-610.2.11.0-branch

New branch.

12:10 PM Changeset in webkit [268200] by Keith Rollin
  • 6 edits
    2 deletes in trunk

Remove copy-webkitlibraries-to-product-directory
https://bugs.webkit.org/show_bug.cgi?id=217465
<rdar://problem/70082193>

Reviewed by Darin Adler.

This script no longer does anything, so remove it along with the
scaffolding around it that invokes it during the build.

.:

  • Makefile:

Tools:

  • Scripts/build-jsc:
  • Scripts/build-webkit:
  • Scripts/copy-webkitlibraries-to-product-directory: Removed.

WebKitLibraries:

  • Makefile: Removed.
12:03 PM Changeset in webkit [268199] by Chris Dumez
  • 4 edits in trunk

Crash under WebKit::WebProcessCache::clear()
https://bugs.webkit.org/show_bug.cgi?id=217480

Reviewed by Geoffrey Garen.

Source/WebKit:

Protect |process| in the responsiveness check lambda in WebProcessCache::addProcessIfPossible().
If we fail to do so and WebProcessCache::clear() gets called while the responsiveness check is
pending, the WebProcessProxy destructor may get called while clear() clears m_pendingAddRequests,
which would resolve the responsiveness check with responsive=false, and cause the lambda to
try and remove the entry from m_pendingAddRequests (while clear() is clearing it).

  • UIProcess/WebProcessCache.cpp:

(WebKit::WebProcessCache::addProcessIfPossible):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
11:56 AM Changeset in webkit [268198] by commit-queue@webkit.org
  • 28 edits
    3 deletes in trunk/Source/WebCore

Mac: Remove OpenGL and OpenGL ES backends
https://bugs.webkit.org/show_bug.cgi?id=217374

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2020-10-08
Reviewed by Darin Adler.

Remove macOS OpenGL (CGL) and iOS OpenGL ES (EAGL)
implementations of GraphicsContextGLOpenGL. These
are not used anymore and cannot be used for conformant
WebGL. The two removed backends would just create
maintainance burden.

Removes TextureCacheCV, this was not implemented for
ANGLE and in comments it was said to be disabled in
the platform.

Fixes a bug where iOS apps on Mac Apple Silicon would
not use correct texture target to convert the video
frames in VideoTextureCopierCV.

Fixes few instances of using GL types in WebGL implementation
instead of WebCore defined GCGL types. This is needed
now that the includes are (a bit) more correct.

No new tests, a refactoring.

  • PlatformMac.cmake:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • html/canvas/ANGLEInstancedArrays.cpp:

(WebCore::ANGLEInstancedArrays::supported):

  • html/canvas/WebGL2RenderingContext.h:
  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::create):
(WebCore::WebGLRenderingContextBase::readPixels):

  • platform/graphics/GraphicsContextGL.cpp:
  • platform/graphics/GraphicsContextGL.h:
  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLOpenGL::reshapeFBOs):
(WebCore::GraphicsContextGLOpenGL::paintRenderingResultsToCanvas):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):
(WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL):
(WebCore::GraphicsContextGLOpenGL::IOSurfaceTextureTarget):
(WebCore::GraphicsContextGLOpenGL::IOSurfaceTextureTargetQuery):
(WebCore::GraphicsContextGLOpenGL::EGLIOSurfaceTextureTarget):
(WebCore::GraphicsContextGLOpenGL::makeContextCurrent):
(WebCore::GraphicsContextGLOpenGL::checkGPUStatus):
(WebCore::GraphicsContextGLOpenGL::setContextVisibility):
(WebCore::GraphicsContextGLOpenGL::screenDidChange):

  • platform/graphics/cocoa/WebGLLayer.h:
  • platform/graphics/cocoa/WebGLLayer.mm:

(-[WebGLLayer initWithGraphicsContextGL:]):
(-[WebGLLayer setAnchorPoint:]):
(-[WebGLLayer copyImageSnapshotWithColorSpace:]):
(-[WebGLLayer prepareForDisplay]):
(-[WebGLLayer display]):
(-[WebGLLayer releaseGLResources]):
(-[WebGLLayer allocateIOSurfaceBackingStoreWithSize:usingAlpha:]):
(-[WebGLLayer bindFramebufferToNextAvailableSurface]):

  • platform/graphics/cv/TextureCacheCV.h: Removed.
  • platform/graphics/cv/TextureCacheCV.mm: Removed.
  • platform/graphics/cv/VideoTextureCopierCV.cpp:

(WebCore::VideoTextureCopierCV::initializeContextObjects):
(WebCore::VideoTextureCopierCV::initializeUVContextObjects):
(WebCore::VideoTextureCopierCV::attachIOSurfaceToTexture):
(WebCore::VideoTextureCopierCV::detachIOSurfaceFromTexture):
(WebCore::VideoTextureCopierCV::copyImageToPlatformTexture):
(WebCore::VideoTextureCopierCV::copyVideoTextureToPlatformTexture):

  • platform/graphics/cv/VideoTextureCopierCV.h:
  • platform/graphics/ios/GraphicsContextGLOpenGLESIOS.h: Removed.
  • platform/graphics/opengl/ExtensionsGLOpenGL.cpp:

(WebCore::ExtensionsGLOpenGL::blitFramebuffer):
(WebCore::ExtensionsGLOpenGL::createVertexArrayOES):
(WebCore::ExtensionsGLOpenGL::deleteVertexArrayOES):
(WebCore::ExtensionsGLOpenGL::isVertexArrayOES):
(WebCore::ExtensionsGLOpenGL::bindVertexArrayOES):
(WebCore::ExtensionsGLOpenGL::supportsExtension):
(WebCore::ExtensionsGLOpenGL::drawBuffersEXT):
(WebCore::ExtensionsGLOpenGL::drawArraysInstanced):
(WebCore::ExtensionsGLOpenGL::drawElementsInstanced):
(WebCore::ExtensionsGLOpenGL::vertexAttribDivisor):

  • platform/graphics/opengl/ExtensionsGLOpenGL.h:
  • platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp:

(WebCore::ExtensionsGLOpenGLCommon::initializeAvailableExtensions):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:

(WebCore::GraphicsContextGLOpenGL::setContextVisibility):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
  • platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp:

(WebCore::GraphicsContextGLOpenGL::readPixelsAndConvertToBGRAIfNecessary):
(WebCore::GraphicsContextGLOpenGL::reshapeFBOs):
(WebCore::GraphicsContextGLOpenGL::resolveMultisamplingIfNecessary):
(WebCore::GraphicsContextGLOpenGL::getIntegerv):
(WebCore::GraphicsContextGLOpenGL::depthRange):
(WebCore::GraphicsContextGLOpenGL::clearDepth):
(WebCore::GraphicsContextGLOpenGL::getExtensions):
(WebCore::GraphicsContextGLOpenGL::readPixels):

  • platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:

(WebCore::GraphicsContextGLOpenGL::paintRenderingResultsToCanvas):
(WebCore::GraphicsContextGLOpenGL::copyTexImage2D):
(WebCore::GraphicsContextGLOpenGL::copyTexSubImage2D):
(WebCore::GraphicsContextGLOpenGL::finish):
(WebCore::GraphicsContextGLOpenGL::flush):
(WebCore::GraphicsContextGLOpenGL::deleteTexture):

  • platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp:
  • platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp:

(WebCore::GraphicsContextGLOpenGLManager::updateAllContexts):
(WebCore::GraphicsContextGLOpenGLManager::updateHighPerformanceState):
(WebCore::GraphicsContextGLOpenGLManager::disableHighPerformanceGPUTimerFired):

  • platform/graphics/opengl/GraphicsContextGLOpenGLManager.h:
11:50 AM Changeset in webkit [268197] by david_quesada@apple.com
  • 2 edits in trunk/Source/WebKit

WKWebViewConfiguration._shouldRelaxThirdPartyCookieBlocking should be available on iOS
https://bugs.webkit.org/show_bug.cgi?id=217443
rdar://problem/69900089

Reviewed by Youenn Fablet.

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration _setShouldRelaxThirdPartyCookieBlocking:]):

Allow this method to be used by Safari and SafariViewService on iOS-family platforms.

11:18 AM Changeset in webkit [268196] by Peng Liu
  • 6 edits in trunk

RemoteAudioSession::category() returns an incorrect value after category changing
https://bugs.webkit.org/show_bug.cgi?id=217459

Reviewed by Youenn Fablet.

Source/WebKit:

No new tests, covered by existing tests.

  • WebProcess/GPU/media/RemoteAudioSession.cpp:

(WebKit::RemoteAudioSession::setCategory): Update m_configuration.category
and m_configuration.routeSharingPolicy so that RemoteAudioSession::category()
will return the correct value.

  • WebProcess/GPU/media/RemoteAudioSession.h:

LayoutTests:

  • gpu-process/TestExpectations: Minor clean-up and unskip some tests after fixing

the bug of RemoteAudioSession::category().

  • platform/mac/media/audio-session-category-audio-autoplay.html:
11:18 AM Changeset in webkit [268195] by Antti Koivisto
  • 11 edits in trunk/Source/WebCore

[LFC][Integration] Convert RenderText::positionForPoint use iterator
https://bugs.webkit.org/show_bug.cgi?id=217468

Reviewed by Zalan Bujtas.

Replace InlineBox traversal code with a generic version.

  • layout/integration/LayoutIntegrationLineIterator.cpp:

(WebCore::LayoutIntegration::LineIterator::operator== const):

  • layout/integration/LayoutIntegrationLineIterator.h:

(WebCore::LayoutIntegration::LineIterator::operator!= const):
(WebCore::LayoutIntegration::PathLine::top const):
(WebCore::LayoutIntegration::PathLine::bottom const):
(WebCore::LayoutIntegration::PathLine::selectionTop const):
(WebCore::LayoutIntegration::PathLine::selectionTopForHitTesting const):
(WebCore::LayoutIntegration::PathLine::selectionBottom const):
(WebCore::LayoutIntegration::PathLine::operator!= const): Deleted.
(WebCore::LayoutIntegration::PathLine::rect const): Deleted.
(WebCore::LayoutIntegration::PathLine::operator== const): Deleted.

  • layout/integration/LayoutIntegrationLineIteratorLegacyPath.h:

(WebCore::LayoutIntegration::LegacyLinePath::top const):
(WebCore::LayoutIntegration::LegacyLinePath::bottom const):
(WebCore::LayoutIntegration::LegacyLinePath::selectionTop const):
(WebCore::LayoutIntegration::LegacyLinePath::selectionTopForHitTesting const):
(WebCore::LayoutIntegration::LegacyLinePath::selectionBottom const):
(WebCore::LayoutIntegration::LegacyLinePath::rect const): Deleted.

  • layout/integration/LayoutIntegrationLineIteratorModernPath.h:

(WebCore::LayoutIntegration::ModernLinePath::top const):
(WebCore::LayoutIntegration::ModernLinePath::bottom const):
(WebCore::LayoutIntegration::ModernLinePath::selectionTop const):
(WebCore::LayoutIntegration::ModernLinePath::selectionTopForHitTesting const):
(WebCore::LayoutIntegration::ModernLinePath::selectionBottom const):
(WebCore::LayoutIntegration::ModernLinePath::traversePrevious):
(WebCore::LayoutIntegration::ModernLinePath::rect const): Deleted.

  • layout/integration/LayoutIntegrationRunIterator.h:

(WebCore::LayoutIntegration::PathTextRun::offsetForPosition const):

  • layout/integration/LayoutIntegrationRunIteratorLegacyPath.h:

(WebCore::LayoutIntegration::LegacyPath::offsetForPosition const):

  • layout/integration/LayoutIntegrationRunIteratorModernPath.h:

(WebCore::LayoutIntegration::ModernPath::offsetForPosition const):
(WebCore::LayoutIntegration::ModernPath::traversePreviousOnLine):

  • rendering/RenderText.cpp:

(WebCore::lineDirectionPointFitsInBox):
(WebCore::createVisiblePositionForBox):
(WebCore::createVisiblePositionAfterAdjustingOffsetForBiDi):
(WebCore::RenderText::positionForPoint):

  • rendering/RenderTextLineBoxes.cpp:

(): Deleted.
(WebCore::lineDirectionPointFitsInBox): Deleted.
(WebCore::createVisiblePositionForBox): Deleted.
(WebCore::createVisiblePositionAfterAdjustingOffsetForBiDi): Deleted.
(WebCore::RenderTextLineBoxes::positionForPoint const): Deleted.

  • rendering/RenderTextLineBoxes.h:
11:01 AM Changeset in webkit [268194] by Alan Coon
  • 8 edits in branches/safari-611.1.3-branch

Cherry-pick r268012. rdar://problem/70100644

Disable media capture if an app's entitlements won't allow access to capture devices
https://bugs.webkit.org/show_bug.cgi?id=217319
<rdar://problem/69956112>

Reviewed by Youenn Fablet.

Source/WebKit:

No new tests, tested manually with MiniBrowser and Safari.

  • UIProcess/Cocoa/UserMediaPermissionRequestManagerProxy.mm: (WebKit::UserMediaPermissionRequestManagerProxy::permittedToCaptureAudio): If the app is sandboxed, check for the entitlement required for audio capture. Don't bother checking for usage string if TCC has already authorized capture. (WebKit::UserMediaPermissionRequestManagerProxy::permittedToCaptureVideo): Ditto for video capture.
  • UIProcess/Cocoa/WebPreferencesCocoa.mm: (WebKit::WebPreferences::platformInitializeStore): Initialize mediaDevicesEnabled manually because its default value is always false in the WebProcess and may be true in the UIProcess. WebPreferences assumes the default will always be the same in both processes, and so has an optimization that only sends values to the WebProcess if they differ from the default value. This means if the default in the UIProcess is true it won't be pushed to the WebProcess, so capture won't work.
  • Platform/spi/ios/TCCSPI.h: Update TCCAccessPreflightResult.

Tools:

  • MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj:
  • MiniBrowser/mac/AppDelegate.m: (-[BrowserAppDelegate defaultConfiguration]): Don't set configuration._mediaCaptureEnabled, it should no longer be necessary.
  • MiniBrowser/mac/Info.plist: Remove unneeded keys.
  • MobileMiniBrowser/MobileMiniBrowser/Info.plist: Ditto. Add usage strings.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268012 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11:00 AM Changeset in webkit [268193] by Alan Coon
  • 8 edits in branches/safari-611.1.3-branch/Source

Versioning.

WebKit-7611.1.3

10:59 AM Changeset in webkit [268192] by sihui_liu@apple.com
  • 5 edits
    1 add in trunk

Adjust heuristic for checking whether view reaches visually non-empty state
https://bugs.webkit.org/show_bug.cgi?id=217400

Reviewed by Geoffrey Garen.

Source/WebCore:

We decide that view reaches visually non-empty state and fire corresponding events when main document is parsed
and no more content (font or css resources) is to be loaded. An edge case is when the page has an empty document
and depends on async scripts to fill content (like wpt.fyi), then we may fire the events too early. To mitigate
this issue, now we don't set the state if content is completely empty and there are scripts to be loaded. Also,
because lazily loading elements need rendering update to decide if they can be loaded, we should not wait for
scripts where there are such elements.

API Test: WebKit.FirstVisuallyNonEmptyMilestoneWithDeferredScriptInEmptyDocument

  • page/FrameView.cpp:

(WebCore::FrameView::checkAndDispatchDidReachVisuallyNonEmptyState):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/deferred-script-load-in-empty-document.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/FirstVisuallyNonEmptyMilestone.mm:

(-[RenderingProgressNavigationDelegate _webView:renderingProgressDidChange:]):
(TEST):

10:58 AM Changeset in webkit [268191] by Alan Coon
  • 1 copy in branches/safari-611.1.3-branch

New branch.

10:56 AM Changeset in webkit [268190] by ysuzuki@apple.com
  • 2 edits in trunk/Source/WTF

Unreviewed, build fix for ARM64E
https://bugs.webkit.org/show_bug.cgi?id=217460

  • wtf/PtrTag.h:

(WTF::tagCodePtr):
(WTF::untagCodePtr):
(WTF::assertIsCFunctionPtr):
(WTF::assertIsNullOrCFunctionPtr):
(WTF::assertIsNotTagged):
(WTF::assertIsTagged):
(WTF::assertIsNullOrTagged):
(WTF::isTaggedWith):
(WTF::assertIsTaggedWith):
(WTF::assertIsNullOrTaggedWith):

10:40 AM Changeset in webkit [268189] by Russell Epstein
  • 4 edits
    2 adds in branches/safari-610.2-branch

Cherry-pick r268162. rdar://problem/70097353

REGRESSION: Safari unable to load PDF in <embed> (docs.legalconnect.com)
https://bugs.webkit.org/show_bug.cgi?id=217451
<rdar://problem/69767043>

Reviewed by Alex Christensen.

Source/WebCore:

Test: fast/replaced/pdf-as-embed-with-no-mime-type-is-not-blank.html

If plugins are enabled, we'll always let the request go through, and WebKit will
guess that files with PDFPlugin-handled extensions should instantiate PDFPlugin,
even if no other plugins are available.

However, if plugins are disabled, requestPlugin() will early return if the explicitly
specified MIME type is not handled by an application plugin (even though the downstream
WebKit code would have happily instantiated an application plugin for us).

Application plugins shouldn't depend on the plugin enablement setting.
To fix this, have SubframeLoader guess the MIME type if not explicitly specified
(matching WebKit's behavior), and allow the request if it matches an application plugin.

  • loader/SubframeLoader.cpp: (WebCore::findPluginMIMETypeFromURL): Improve this previously logging-only function to use the lastPathComponent of the URL instead of randomly looking at the end of the URL, to ignore query strings and fragments when looking for the file extension.

(WebCore::FrameLoader::SubframeLoader::requestPlugin):
Make use of findPluginMIMETypeFromURL to guess the MIME type if it's not
explicitly specified. If the guessed MIME type is one that is handled
by application plugins, allow the request to go out to WebKit (which
may then instantiate a PDFPlugin, for example).

(WebCore::logPluginRequest):
(WebCore::FrameLoader::SubframeLoader::requestObject):
(WebCore::FrameLoader::SubframeLoader::createJavaAppletWidget):
Pass the URL instead of stringifying it, so we can lastPathComponent as above.

LayoutTests:

  • fast/replaced/pdf-as-embed-with-no-mime-type-is-not-blank-expected-mismatch.html: Added.
  • fast/replaced/pdf-as-embed-with-no-mime-type-is-not-blank.html: Added. Add a test ensuring that <embed> with no specified MIME type still renders the PDF.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268162 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:40 AM Changeset in webkit [268188] by Russell Epstein
  • 5 edits in branches/safari-610.2-branch

Cherry-pick r268117. rdar://problem/70097482

Presidential Executive Order pages not accessible with Safari.
https://bugs.webkit.org/show_bug.cgi?id=217415

Reviewed by Chris Fleizach.

Source/WebCore:

Test: accessibility/aria-modal.html.

These pages have a dialog modal element of the form

<div class="popover" role="dialog" aria-modal="true">

with style visible and a display value different from none. This makes
WebCore/accessibility to treat it as if the dialog were always visible,
and thus do not convey the content of the page outside the dialog to
VoiceOver. The author controls the visibility of the dialog using the
style opacity. This patch adds the check for the opacity to determine
whether an element is visible or not.

  • accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::isNodeVisible const):

LayoutTests:

Expanded this test to cover the case whether the modal dialog visibility
is controlled by its opacity. Cleaned up JS code and made it work in
isolated tree mode.

  • accessibility/aria-modal-expected.txt:
  • accessibility/aria-modal.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268117 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:29 AM Changeset in webkit [268187] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

AudioParamMap.idl has the Exposed extended attribute twice. (With the same value)
https://bugs.webkit.org/show_bug.cgi?id=217472

Patch by Tuomas Karkkainen <tuomas.webkit@apple.com> on 2020-10-08
Reviewed by Antti Koivisto.

This commit removes one of the two identical Exposed=Window extended
attributes from the IDL files.

  • Modules/webaudio/AudioParamMap.idl:
9:52 AM Changeset in webkit [268186] by Karl Rackler
  • 3 edits in trunk/LayoutTests

Move test expectations from ios-wk2 to ios-simulator-wk2
https://bugs.webkit.org/show_bug.cgi?id=217357
https://bugs.webkit.org/show_bug.cgi?id=217412

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
  • platform/ios-wk2/TestExpectations:
9:49 AM Changeset in webkit [268185] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

Rename AudioParamTimeline::valuesForTimeRangeImpl() and split it into separate functions
https://bugs.webkit.org/show_bug.cgi?id=217453

Reviewed by Eric Carlson.

Rename AudioParamTimeline::valuesForTimeRangeImpl() to valuesForFrameRangeImpl() since
the function takes start / end frames in argument nowadays (This changed fairly recently).

Also split event processing into separate function for each event type. This reduces the
size of AudioParamTimeline::valuesForTimeRangeImpl() as the function was getting huge.
The size will also increase in the future when we vectorize processing for more event
types.

This change is based on the corresponding Blink implementation:

No new tests, no behavior change.

  • Modules/webaudio/AudioParam.cpp:

(WebCore::AudioParam::calculateTimelineValues):

  • Modules/webaudio/AudioParamTimeline.cpp:

(WebCore::AudioParamTimeline::valueForContextTime):
(WebCore::AudioParamTimeline::valuesForFrameRange):
(WebCore::AudioParamTimeline::valuesForFrameRangeImpl):
(WebCore::AudioParamTimeline::processLinearRamp):
(WebCore::AudioParamTimeline::processExponentialRamp):
(WebCore::AudioParamTimeline::processCancelValues):
(WebCore::AudioParamTimeline::processSetTarget):
(WebCore::AudioParamTimeline::processSetValueCurve):

  • Modules/webaudio/AudioParamTimeline.h:

(WebCore::AudioParamTimeline::ParamEvent::curve const):

  • WebCore.xcodeproj/project.pbxproj:
9:11 AM Changeset in webkit [268184] by Hector Lopez
  • 2 edits in trunk/LayoutTests

Test expectation correction
https://bugs.webkit.org/show_bug.cgi?id=167729

Unreviewed test gardening.

  • platform/mac/TestExpectations:
9:07 AM Changeset in webkit [268183] by Karl Rackler
  • 2 edits in trunk/LayoutTests

REGRESSION (r268138): [ Mojave+ wk1 ] imported/w3c/web-platform-tests/css/css-masking/clip-path/clip-path-descendant-text-mutated-001.html is a flaky image failure
https://bugs.webkit.org/show_bug.cgi?id=217478

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
8:10 AM Changeset in webkit [268182] by Aditya Keerthi
  • 3 edits
    2 adds in trunk

[iOS] Blurring a text input and focusing a date input changes the scrollable area
https://bugs.webkit.org/show_bug.cgi?id=217325
<rdar://problem/69979171>

Reviewed by Wenson Hsieh.

Source/WebKit:

iOS 14 changed the presentation style of date/time pickers on iPhones.
Previously, date/time pickers would show up in the keyboard view. Now,
pickers are shown in UIContextMenus.

When the change was made, shouldShowKeyboardForElement in WKContentViewInteraction
was not updated to reflect the new behavior, and continued to return
true for date/time inputs.

This inaccuracy led to WKContentView ignoring the UIKeyboardWillHideNotification
when blurring a text input and focusing a date input, since it assumed
the keyboard would stay presented. Consequently, the UIScrollView
adjustments made when presenting the keyboard for the text input are not
reverted when presenting the date picker, leading to a permanent change
in the scrollable area.

To fix, update shouldShowKeyboardForElement to return false for date/time
inputs. Note that the original patch which changed the behavior
correctly updated [WKContentView requiresAccessoryView] but did not
update shouldShowKeyboardForElement. To prevent a similar mistake from
happening again, the logic which determines which input types have a
keyboard view was moved into elementTypeRequiresAccessoryView.

Test: fast/forms/ios/constant-scroll-area-when-moving-focus-between-fields.html

  • UIProcess/ios/WKContentViewInteraction.mm:

(elementTypeRequiresAccessoryView):
(-[WKContentView requiresAccessoryView]):
(shouldShowKeyboardForElement):

LayoutTests:

Added a regression test which focuses a text input, then focuses a date
input, and finally attempts to scroll the content.

  • fast/forms/ios/constant-scroll-area-when-moving-focus-between-fields-expected.txt: Added.
  • fast/forms/ios/constant-scroll-area-when-moving-focus-between-fields.html: Added.
6:45 AM Changeset in webkit [268181] by pvollan@apple.com
  • 5 edits in trunk

[macOS] Deny access to performance analysis service in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=217452
Source/WebKit:

<rdar://problem/68878318>

Reviewed by Youenn Fablet.

It has been confirmed that mach-lookup to 'com.apple.PerformanceAnalysis.animationperfd' can be denied in the WebContent process on macOS.

Test: fast/sandbox/sandbox-mach-lookup.html

  • WebProcess/com.apple.WebProcess.sb.in:

LayoutTests:

Reviewed by Youenn Fablet.

  • fast/sandbox/mac/sandbox-mach-lookup-expected.txt:
  • fast/sandbox/mac/sandbox-mach-lookup.html:
6:23 AM Changeset in webkit [268180] by Noam Rosenthal
  • 2 edits in trunk/LayoutTests

REGRESSION (r268138): [ iOS Mojave+ ] imported/w3c/web-platform-tests/css/css-masking/clip-path/svg-clipPath.svg is missing expected results
https://bugs.webkit.org/show_bug.cgi?id=217461
<rdar://problem/70074200>

Unreviewed, skipping a test resource file.

6:17 AM Changeset in webkit [268179] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Using the mixture of LayoutUnit and InlineLayoutUnit types causes ASSERT(verticalGap >= 0)
https://bugs.webkit.org/show_bug.cgi?id=217458

Reviewed by Antti Koivisto.

Line gap computation can produce an incorrect result when the LayoutUnit based lineLogicalTop
holds LayoutUnit::max() value while lineLogicalRect.bottom() (float atm) holds a larger value.
(This is a great opportunity to transition the line logical constraints to InlineRect(FloatRect)).

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::lineLayout):

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::layoutInlineContent):
(WebCore::Layout::LineBuilder::constraintsForLine):

  • layout/inlineformatting/InlineLineBuilder.h:
5:49 AM Changeset in webkit [268178] by commit-queue@webkit.org
  • 4 edits in trunk

Fix image-loading-lazy-multiple-times.html
https://bugs.webkit.org/show_bug.cgi?id=216979

Patch by Rob Buis <rbuis@igalia.com> on 2020-10-08
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Add improved test result.

  • web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-multiple-times-expected.txt:

Source/WebCore:

Once an image has been lazy loaded, it should be possible
to trigger a new lazy load through relevant mutations.

Test: imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-multiple-times.html

  • loader/ImageLoader.cpp:

(WebCore::ImageLoader::updateFromElement):

5:42 AM Changeset in webkit [268177] by youenn@apple.com
  • 3 edits in trunk/LayoutTests

Add a test case to verify WebRTC getCapabilities expose H264 profiles
https://bugs.webkit.org/show_bug.cgi?id=217464

Reviewed by Eric Carlson.

Validate the exposed profiles in sender/receiver getCapabilities.

  • webrtc/video-h264-expected.txt:
  • webrtc/video-h264.html:
5:40 AM Changeset in webkit [268176] by Lauro Moura
  • 6 edits in trunk

[GTK][WPE] Missing Exif Orientation support
https://bugs.webkit.org/show_bug.cgi?id=95299

Reviewed by Carlos Alberto Lopez Perez.

Source/WebCore:

CairoOperations::drawSurface is not taking 90/270 degrees orientation
changes in account correctly.

As in these operations the size of the surfaces will be the same but
not exactly equal (by transposing width and height), drawSurface
currently wrongly presumes the need for some some padding. The same
happens to the scale factors.

Covered by existing tests.

  • platform/graphics/cairo/CairoOperations.cpp:

(WebCore::Cairo::drawNativeImage): Forward usesWidthAsHeight to
drawSurface.
(WebCore::Cairo::drawSurface): use correct scaling/padding when
getting surfaces from images rotated 90/270 degrees.

  • platform/graphics/cairo/CairoOperations.h: Add new enum to forward

Orientation.usesWidthAsHeight.

LayoutTests:

Update expectations after partial EXIF support

  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
12:57 AM Changeset in webkit [268175] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Replace unqualified use of PlatformDisplayID in WebViewImpl
https://bugs.webkit.org/show_bug.cgi?id=217422

Patch by Saagar Jha <saagar@saagarjha.com> on 2020-10-08
Reviewed by Youenn Fablet.

WebViewImpl utilizes things from WebCore but doesn't use the namespace, instead choosing to
qualify each reference. However, there is one use of WebCore::PlatformDisplayID that
doesn't use the the namespace qualifier. Usually this "works" because the code is in the
WebKit namespace, and other files that get included above this one often contain code of
the form

namespace WebKit {
using WebCore;
code
}

which hides the issue by making PlatformDisplayID visible to this file as well without the
prefix. If we use auto none of this matters because it'll deduce the prefix even if
WebViewImpl.mm ends up near the top of a unified source file, before another file with the
using declaration shows up.

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::windowDidChangeScreen): Replace PlatformDisplayID with auto.

12:54 AM Changeset in webkit [268174] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

Web Inspector: inspector/cpu-profiler/threads.html, use only 4 decimal digits to compare total and workers usage
https://bugs.webkit.org/show_bug.cgi?id=195134

Reviewed by Darin Adler.

  • inspector/cpu-profiler/threads.html:
12:11 AM Changeset in webkit [268173] by graouts@webkit.org
  • 19 edits in trunk

Add support for non-accelerated animation of individual transform properties
https://bugs.webkit.org/show_bug.cgi?id=217429
<rdar://problem/70046645>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update WPT expectations after adding support for animating the rotate, scale and translate properties.

  • web-platform-tests/css/css-transforms/animation/rotate-composition-expected.txt:
  • web-platform-tests/css/css-transforms/animation/rotate-interpolation-expected.txt:
  • web-platform-tests/css/css-transforms/animation/scale-composition-expected.txt:
  • web-platform-tests/css/css-transforms/animation/scale-interpolation-expected.txt:
  • web-platform-tests/css/css-transforms/animation/translate-composition-expected.txt:
  • web-platform-tests/css/css-transforms/animation/translate-interpolation-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:

Source/WebCore:

We add support for animating the rotate, scale and translate properties. The required changes were mainly to
add the relevant wrappers and blendFunc() implementations in CSSPropertyAnimation.cpp as well as improving
the computed style for those properties to match the "shortest serialization principle" from CSSOM so that
WPT tests would pass and not fail due to some incorrect computed style output.

We also had to update the rareNonInheritedDataChangeRequiresLayout() method such that layout may be required
when RenderStyle::diff() is called with changing values for rotate, scale or translate.

Additionally, since the rotate, scale and translate properties are currently enabled by a setting, we needed
to make sure that setting properties and values on the MutableStyleProperties objects during parsing of styles
provided through the Web Animations JS API had a CSSParserContext with knowledge of the current document
to access the settings.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::blendFunc):
(WebCore::PropertyWrapperScale::PropertyWrapperScale):
(WebCore::PropertyWrapperRotate::PropertyWrapperRotate):
(WebCore::PropertyWrapperTranslate::PropertyWrapperTranslate):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

  • animation/KeyframeEffect.cpp:

(WebCore::processIterableKeyframes):
(WebCore::processPropertyIndexedKeyframes):

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::computedTranslate):
(WebCore::computedScale):
(WebCore::computedRotate):

  • platform/graphics/transforms/RotateTransformOperation.h:
  • platform/graphics/transforms/ScaleTransformOperation.h:
  • platform/graphics/transforms/TranslateTransformOperation.h:
  • rendering/style/RenderStyle.cpp:

(WebCore::rareNonInheritedDataChangeRequiresLayout):

  • rendering/style/StyleRareNonInheritedData.cpp:

(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator== const):

Oct 7, 2020:

10:26 PM Changeset in webkit [268172] by jh718.park@samsung.com
  • 2 edits in trunk/Source/WebKit

Unreviewed. Remove the build warning below since r238330.
warning: unused variable ‘connectionIdentifier’ [-Wunused-variable]

No new tests, no new behaviors.

  • WebProcess/Inspector/WebInspectorUI.cpp:

(WebKit::WebInspectorUI::updateConnection):

9:56 PM Changeset in webkit [268171] by Hector Lopez
  • 2 edits in trunk/LayoutTests

Rebaseline test result
https://bugs.webkit.org/show_bug.cgi?id=167729

Unreviewed test gardening.

  • platform/mac/imported/w3c/web-platform-tests/css/css-pseudo/text-selection-expected.txt:
9:18 PM Changeset in webkit [268170] by ysuzuki@apple.com
  • 27 edits in trunk/Source

[JSC] Restrict more ptr-tagging and avoid using OperationPtrTag for JIT code
https://bugs.webkit.org/show_bug.cgi?id=217460

Reviewed by Saam Barati.

Source/JavaScriptCore:

This patch makes tagging / untagging pointer functions solid by using PtrTag in template parameter.
Later, we will introduce compile time behavior change for different kind of PtrTag so that we can insert OperationPtrTag validation
when tagging a function with OperationPtrTag.

We also found that FTL is tagging JIT code with OperationPtrTag wrongly. We should tag it with JITThunkPtrTag.

  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::getLinkerAddress):

  • assembler/AssemblerBuffer.h:

(JSC::ARM64EHash::update):
(JSC::ARM64EHash::finalHash const):

  • assembler/JITOperationList.cpp:

(JSC::addPointers):

  • assembler/MacroAssemblerARM64.cpp:

(JSC::MacroAssembler::probe):

  • assembler/MacroAssemblerCodeRef.h:

(JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
(JSC::MacroAssemblerCodePtr::createFromExecutableAddress):

  • assembler/testmasm.cpp:

(JSC::testProbeModifiesProgramCounter):

  • b3/air/testair.cpp:
  • ftl/FTLOutput.h:

(JSC::FTL::Output::callWithoutSideEffects):
(JSC::FTL::Output::operation):

  • ftl/FTLSlowPathCall.cpp:

(JSC::FTL::SlowPathCallContext::makeCall):

  • jit/JITCode.cpp:

(JSC::JITCodeWithCodeRef::executableAddressAtOffset):

  • jit/JITExceptions.cpp:

(JSC::genericUnwind):

  • jit/JITOperations.cpp:
  • jit/Repatch.cpp:

(JSC::readPutICCallTarget):
(JSC::ftlThunkAwareRepatchCall):
(JSC::tryCacheGetBy):
(JSC::tryCachePutByID):

  • llint/LLIntData.cpp:

(JSC::LLInt::initialize):

  • llint/LLIntPCRanges.h:

(JSC::LLInt::isLLIntPC):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::setUpCall):

  • llint/LLIntThunks.cpp:

(JSC::LLInt::generateThunkWithJumpTo):

  • runtime/MachineContext.h:

(JSC::MachineContext::instructionPointer):

  • runtime/NativeExecutable.cpp:

(JSC::NativeExecutable::finishCreation):

  • runtime/PutPropertySlot.h:

(JSC::PutPropertySlot::setCustomValue):
(JSC::PutPropertySlot::setCustomAccessor):
(JSC::PutPropertySlot::customSetter const):

  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::emitCCall):

  • wasm/WasmSlowPaths.cpp:

Source/WTF:

  • wtf/PlatformRegisters.cpp:

(WTF::threadStateLRInternal):
(WTF::threadStatePCInternal):

  • wtf/PtrTag.h:

(WTF::tagCFunctionPtr):
(WTF::tagCFunction):
(WTF::untagCFunctionPtr):
(WTF::tagInt):
(WTF::isTaggedWith):
(WTF::assertIsTaggedWith):
(WTF::assertIsNullOrTaggedWith):

8:19 PM Changeset in webkit [268169] by Aditya Keerthi
  • 2 edits in trunk/Tools

REGRESSION(r268123): [ iOS ] 4 TestWebKitAPI.WebKitLegacy failures: File name unavailable. Unknown C++ exception thrown in the test body.
https://bugs.webkit.org/show_bug.cgi?id=217445
<rdar://problem/70063370>

Reviewed by Wenson Hsieh.

The patch which introduced these tests swizzled [UIDatePicker setDatePickerMode:]
to avoid a crash within UIKit, resulting from the fact that TestWebKitAPI isn't
actually an app.

However, this was not a reliable solution since UIKit was still attempting to
create a QoS interval. To fix, swizzle out a method much closer to the source
of the exception: [UITableView cellForRowAtIndexPath:].

  • TestWebKitAPI/Tests/WebKitLegacy/ios/DateTimeInputsAccessoryViewTests.mm:

(cellForRowAtIndexPath):
(runTestWithInputType):

7:11 PM Changeset in webkit [268168] by Hector Lopez
  • 2 edits in trunk/LayoutTests

REGRESSION(r267940): [ macOS Catalina ] imported/w3c/web-platform-tests/css/css-pseudo/text-selection.html is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=167729#add_comment

Unreviewed test gardening.

  • platform/mac/TestExpectations:
6:52 PM Changeset in webkit [268167] by Karl Rackler
  • 2 edits in trunk/LayoutTests

REGRESSION (iOS 14): [ iOS wk2 ] imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-add.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=217462

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
6:35 PM Changeset in webkit [268166] by Karl Rackler
  • 3 edits
    3 adds in trunk/LayoutTests

REGRESSION (r268138): [ iOS Mojave+ ] imported/w3c/web-platform-tests/css/css-masking/clip-path/svg-clipPath.svg is missing expected results
https://bugs.webkit.org/show_bug.cgi?id=217461

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
  • platform/mac/TestExpectations:
5:59 PM Changeset in webkit [268165] by Ross Kirsling
  • 9 edits in trunk

[JSC] Revert String.prototype.item
https://bugs.webkit.org/show_bug.cgi?id=217449

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/item-method.js:
  • test262/config.yaml:

Source/JavaScriptCore:

This patch reverts the String part of r267814, as it has been shown to be web-incompatible:
https://github.com/tc39/proposal-item-method/issues/31

Thankfully, this was the inessential part of the proposal; the core parts (Array and %TypedArray%) remain for now.

  • builtins/StringPrototype.js:

(item): Deleted.

  • runtime/StringPrototype.cpp:

LayoutTests:

  • js/Object-getOwnPropertyNames-expected.txt:
  • js/script-tests/Object-getOwnPropertyNames.js:
5:27 PM Changeset in webkit [268164] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Unreviewed, fix Windows build after r268161.

  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::createdMessagePort):
(WebCore::ScriptExecutionContext::destroyedMessagePort):

  • workers/WorkerOrWorkletGlobalScope.h:

(isType):

5:23 PM Changeset in webkit [268163] by Keith Rollin
  • 12 edits in trunk/Source

Update post-processing rules for headers to not unnecessarily change timestamps
https://bugs.webkit.org/show_bug.cgi?id=217371
<rdar://problem/69992230>

Reviewed by Darin Adler.

Under XCBuild, the scripts employed in custom build rules can be
invoked in innocuous situations. A common example is when the user is
building from the command-line and they change the make output from
stdout to a file, or vice-versa. Changing the output changes the
setting of the COLOR_DIAGNOSTICS environment variable, which is enough
to cause XCBuild to think something is different and that the custom
build rule needs to be invoked. For the script's part, nothing
significant has changed, yet it post-processes the header files,
causing their modification dates to change, causing downstream
rebuilds to occur.

Fix this problem by adopting an approach that doesn't modify the
post-processed header files unless their contents actually change.

Source/JavaScriptCore:

  • Scripts/postprocess-header-rule:

Source/ThirdParty/ANGLE:

  • adjust-angle-include-paths-rule:

Source/ThirdParty/libwebrtc:

  • libwebrtc.xcodeproj/project.pbxproj:

Source/WebKit:

No new tests -- this is a build change only.

  • Scripts/postprocess-header-rule:

Source/WebKitLegacy:

  • scripts/postprocess-header-rule:

Source/WTF:

  • Scripts/GeneratePreferences.rb:
5:01 PM Changeset in webkit [268162] by timothy_horton@apple.com
  • 4 edits
    2 adds in trunk

REGRESSION: Safari unable to load PDF in <embed> (docs.legalconnect.com)
https://bugs.webkit.org/show_bug.cgi?id=217451
<rdar://problem/69767043>

Reviewed by Alex Christensen.

Source/WebCore:

Test: fast/replaced/pdf-as-embed-with-no-mime-type-is-not-blank.html

If plugins are enabled, we'll always let the request go through, and WebKit will
guess that files with PDFPlugin-handled extensions should instantiate PDFPlugin,
even if no other plugins are available.

However, if plugins are disabled, requestPlugin() will early return if the explicitly
specified MIME type is not handled by an application plugin (even though the downstream
WebKit code would have happily instantiated an application plugin for us).

Application plugins shouldn't depend on the plugin enablement setting.
To fix this, have SubframeLoader guess the MIME type if not explicitly specified
(matching WebKit's behavior), and allow the request if it matches an application plugin.

  • loader/SubframeLoader.cpp:

(WebCore::findPluginMIMETypeFromURL):
Improve this previously logging-only function to use the lastPathComponent
of the URL instead of randomly looking at the end of the URL, to ignore
query strings and fragments when looking for the file extension.

(WebCore::FrameLoader::SubframeLoader::requestPlugin):
Make use of findPluginMIMETypeFromURL to guess the MIME type if it's not
explicitly specified. If the guessed MIME type is one that is handled
by application plugins, allow the request to go out to WebKit (which
may then instantiate a PDFPlugin, for example).

(WebCore::logPluginRequest):
(WebCore::FrameLoader::SubframeLoader::requestObject):
(WebCore::FrameLoader::SubframeLoader::createJavaAppletWidget):
Pass the URL instead of stringifying it, so we can lastPathComponent as above.

LayoutTests:

  • fast/replaced/pdf-as-embed-with-no-mime-type-is-not-blank-expected-mismatch.html: Added.
  • fast/replaced/pdf-as-embed-with-no-mime-type-is-not-blank.html: Added.

Add a test ensuring that <embed> with no specified MIME type still renders the PDF.

4:31 PM Changeset in webkit [268161] by Chris Dumez
  • 35 edits
    1 copy in trunk

Constructing a AudioWorkletNode should construct an AudioWorkletProcessor on the Worklet thread
https://bugs.webkit.org/show_bug.cgi?id=217442

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that we are passing more checks.

  • web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/processing-after-resume.https-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-messageport.https-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletglobalscope-timing-info.https-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-options.https-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processor-construction-port.https-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/suspended-context-messageport.https-expected.txt:

Source/WebCore:

Constructing a AudioWorkletNode should construct an AudioWorkletProcessor on the Worklet thread:

No new tests, rebaselined existing tests.

  • Modules/webaudio/AudioWorklet.cpp:

(WebCore::AudioWorklet::createProcessor):
Add createProcessor() function to AudioWorklet which takes care of hopping to the worklet thread
in order to call createProcessor() on the AudioWorkletGlobalScope.

  • Modules/webaudio/AudioWorklet.h:
  • Modules/webaudio/AudioWorkletGlobalScope.cpp:

(WebCore::AudioWorkletGlobalScope::createProcessor):
Construct an AudioWorkletProcessor, as specified here:

(WebCore::AudioWorkletGlobalScope::takePendingProcessorConstructionData):
A function to take the pending ProcessorConstructionData. This construction
data gets initialized in createProcessor() and gets consumed by
AudioWorkletProcessor::create().

  • Modules/webaudio/AudioWorkletGlobalScope.h:
  • Modules/webaudio/AudioWorkletNode.cpp:

(WebCore::AudioWorkletNode::create):
Improve AudioWorkletNode constructor to actually cause the construction of
the AudioWorkletProcessor on the worklet thread, passing it the options and
the MessagePort. This is as per the specification here:

(WebCore::AudioWorkletNode::AudioWorkletNode):
(WebCore::AudioWorkletNode::~AudioWorkletNode):

(WebCore::AudioWorkletNode::setProcessor):
Once the AudioWorkletProcessor is created on the worklet thread, this gets
called so that the AudioWorkletNode has a reference to the processor. This
will be needed later on once AudioWorkletNode::process() starts doing audio
processing through the AudioWorkletProcessor.

(WebCore::AudioWorkletNode::process):
Improve comment.

  • Modules/webaudio/AudioWorkletNode.h:
  • Modules/webaudio/AudioWorkletNode.idl:

Pass the global object to the constructor. It is needed now that the constructor
serializes script values to pass them to the worklet thread.

  • Modules/webaudio/AudioWorkletNodeOptions.idl:

Add [JSGenerateToJSObject] to AudioWorkletNodeOptions dictionary so that a
convertDictionaryToJS() function gets generated for this dictionary. This function
is called by the AudioWorkletNode constructor.

  • Modules/webaudio/AudioWorkletProcessor.cpp:

(WebCore::AudioWorkletProcessor::create):
(WebCore::AudioWorkletProcessor::AudioWorkletProcessor):

  • Modules/webaudio/AudioWorkletProcessor.h:

(WebCore::AudioWorkletProcessor::name const):
(WebCore::AudioWorkletProcessor::port):
Implement AudioWorkletProcessor constructor so that its retrieves the pending
construction data from the AudioWorkletGlobalScope and properly initializes
its name and port. The specification for this is here:

  • Modules/webaudio/AudioWorkletProcessor.idl:

Indicate that the constructor may throw an exception as per the specification:

Also pass the ScriptExecutionContext to the constructor since the constructor
needs to retrieve the pending construction data from it:

  • Modules/webaudio/AudioWorkletProcessorConstructionData.h:

(WebCore::AudioWorkletProcessorConstructionData::AudioWorkletProcessorConstructionData):
(WebCore::AudioWorkletProcessorConstructionData::name const):
(WebCore::AudioWorkletProcessorConstructionData::port const):
Add class to wrap the AudioWorkletProcess's construction data:

  • Modules/webaudio/AudioWorkletThread.h:

Move ThreadSafeRefCounted from this class to the parent class (WorkerOrWorkletThread)
since WorkerMessagePortChannelProvider needs to protect a WorkerOrWorkletThread now.

  • WebCore.xcodeproj/project.pbxproj:

Add new header to project.

  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::toJSDOMGlobalObject):
Properly handle WorkletGlobalScope.

  • dom/MessagePort.cpp:

(WebCore::MessagePort::disentangle):
(WebCore::MessagePort::disentanglePorts):
(WebCore::MessagePort::entanglePorts):
(WebCore::MessagePort::entangle):

  • dom/MessagePort.h:

Tweak MessagePort API to support disentangling/entangling a single
MessagePort. Previously we had to pass an array of ports.

  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::createdMessagePort):
(WebCore::ScriptExecutionContext::destroyedMessagePort):
Tweak assertions to handle AudioWorkletGlobalScopes.

  • dom/messageports/MessagePortChannelProvider.cpp:

(WebCore::MessagePortChannelProvider::fromContext):

  • dom/messageports/MessageWithMessagePorts.h:
  • dom/messageports/WorkerMessagePortChannelProvider.cpp:

(WebCore::WorkerMessagePortChannelProvider::WorkerMessagePortChannelProvider):
(WebCore::WorkerMessagePortChannelProvider::takeAllMessagesForPort):
(WebCore::WorkerMessagePortChannelProvider::checkRemotePortForActivity):

  • dom/messageports/WorkerMessagePortChannelProvider.h:

Update WorkerMessagePortChannelProvider to use WorkerOrWorkletScope instead
or WorkerGlobalScope. This allows us to reuse this class for AudioWorklets
so that MessagePort communication between the main thread and the worklet
thread now works.

  • workers/WorkerOrWorkletThread.h:

Move ThreadSafeRefCounted from subclasses to this class so that
WorkerMessagePortChannelProvider can protect a WorkerOrWorkletThread.

  • workers/WorkerThread.h:
  • worklets/WorkletGlobalScope.cpp:

(WebCore::WorkletGlobalScope::notifyFinished):
Only evaluate the script if we have not already evaluated it in this worklet.
I am assuming this is needed because we are not treating the script as a module
yet (due to lack of support in workers). Without this changes, the worklet's
script would get in a bad state when importing several times the same module
(which is something the WPT tests do).

(WebCore::WorkletGlobalScope::messagePortChannelProvider):
Instantiate WorkerMessagePortChannelProvider if needed. This is needed for
MessagePort communication is AudioWorklets.

  • worklets/WorkletGlobalScope.h:

LayoutTests:

Unskip a few tests that are no longer timing out.

3:49 PM Changeset in webkit [268160] by Russell Epstein
  • 1 copy in tags/Safari-610.2.8.1.1

Tag Safari-610.2.8.1.1.

3:44 PM Changeset in webkit [268159] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Crash under JSAudioWorkletProcessorConstructor::~JSAudioWorkletProcessorConstructor()
https://bugs.webkit.org/show_bug.cgi?id=217448
<rdar://problem/70059902>

Reviewed by Geoffrey Garen.

Make sure we clear out m_processorConstructorMap in AudioWorkletGlobalScope::prepareForTermination()
since this map keeps JS wrappers alive.

No new tests, already covered by existing tests that are crashing on ASAN bots.

  • Modules/webaudio/AudioWorkletGlobalScope.cpp:

(WebCore::AudioWorkletGlobalScope::prepareForTermination):

3:42 PM Changeset in webkit [268158] by commit-queue@webkit.org
  • 5 edits in trunk

background-clip:var(--a) invalidates -webkit-background-clip:text when --a:text
https://bugs.webkit.org/show_bug.cgi?id=199410

Patch by Tyler Wilcock <Tyler Wilcock> on 2020-10-07
Reviewed by Darin Adler.

Source/WebCore:

Parse the text value (CSSValueText) for the background-clip
property. While the bug this patch is associated with is about CSS
variable interactions, the underlying issue is that we weren't parsing
the text value for background-clip.

https://www.w3.org/TR/2017/CR-css-backgrounds-3-20171017/#the-background-clip

This patch also removes the ability to parse the -webkit-text value
for the background-origin (CSSPropertyBackgroundOrigin) property by
removing CSSValueWebkitText from consumeBackgroundBox. Neither
-webkit-text nor the unprefixed text are valid values for this property.

https://www.w3.org/TR/2017/CR-css-backgrounds-3-20171017/#the-background-origin

Updated existing fast/css/background-clip-text.html test.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeBackgroundBox): Removed CSSValueWebkitText.
(WebCore::consumeBackgroundClip): Added.
(WebCore::consumeBackgroundComponent): Use consumeBackgroundClip for
the CSSPropertyBackgroundClip property case.

LayoutTests:

We now parse the text value for the background-clip property, so
update this test to reflect that.

  • fast/css/background-clip-text-expected.txt:
  • fast/css/background-clip-text.html: Parse text value.
3:41 PM Changeset in webkit [268157] by commit-queue@webkit.org
  • 3 edits
    4 adds in trunk

Using CSS wide keywords as a fallback for variable substitution works inconsistently.
https://bugs.webkit.org/show_bug.cgi?id=197158

Patch by Tyler Wilcock <Tyler Wilcock> on 2020-10-07
Reviewed by Darin Adler.

Source/WebCore:

Enable CSS-wide keywords to be used as variable fallbacks.

See spec-issue for further discussion:
https://github.com/w3c/csswg-drafts/issues/5325

Patch inspired by Chromium's implementation:
https://bugs.chromium.org/p/chromium/issues/detail?id=954963#c5

Tests: fast/css/variables/css-wide-keywords-in-fallback-inherited-property.html

fast/css/variables/css-wide-keywords-in-fallback-non-inherited-property.html

  • css/parser/CSSPropertyParser.cpp: Add maybeConsumeCSSWideKeyword

function.
(WebCore::CSSPropertyParser::parseSingleValue): Before trying to parse
the property-specific values for the input property, first try parsing the
CSS-wide keywords via maybeConsumeCSSWideKeyword.
(WebCore::CSSPropertyParser::consumeCSSWideKeyword): Refactor to use
maybeConsumeCSSWideKeyword.

LayoutTests:

Add tests ensuring CSS-wide keywords are functional as variable
fallbacks.

  • fast/css/variables/css-wide-keywords-in-fallback-inherited-property-expected.html: Added.
  • fast/css/variables/css-wide-keywords-in-fallback-inherited-property.html: Added.
  • fast/css/variables/css-wide-keywords-in-fallback-non-inherited-property-expected.html: Added.
  • fast/css/variables/css-wide-keywords-in-fallback-non-inherited-property.html: Added.
3:29 PM Changeset in webkit [268156] by Russell Epstein
  • 1 copy in tags/Safari-610.2.8.0.2

Tag Safari-610.2.8.0.2.

3:27 PM Changeset in webkit [268155] by jiewen_tan@apple.com
  • 2 edits
    7 adds in trunk/Source/WebKit

[WebAuthn] Implement a dummy WebAuthenticationAgent
https://bugs.webkit.org/show_bug.cgi?id=217401
<rdar://problem/70012011>

Reviewed by Darin Adler.

Part 1.

This patch introduces a new dummy WebAuthenticationAgent where in the future it will take over all WebAuthn operations
from the UI Process such that we can isolate high privileged entitlements to this standalone daemon and therefore are able
offer WebAuthn to third party WKWebView clients. One of the future feautres will require this new process to listen to
LaunchEvents, which only daemons can do. That's why it is implemented as a user agent instead of a XPC service.

This is the first part of establishing such a dummy daemon. What it does is to set up a new build target for the daemon and
hook it up with WebKit's build system. One can manually load the launchd plist and load the daemon to verify this change.

Commands are:
launchctl load /to/your/path/com.apple.webkit.WebAuthenticationAgent.plist
launchctl start com.apple.webkit.WebAuthenticationAgent.Development

Covered by manual tests.

  • Configurations/WebAuthenticationAgent.xcconfig: Added.

Somehow the executable has a suffix .Development for debug/release builds. Will fix that in the later part.

  • Daemons/WebAuthenticationAgent/Info.plist: Added.
  • Daemons/WebAuthenticationAgent/WebAuthenticationAgent.entitlements: Added.
  • Daemons/WebAuthenticationAgent/com.apple.webkit.WebAuthenticationAgent.plist: Added.

The executable location is hardcoded for now. It will be fixed in Part 2 to dynamically point to the right binary.

  • Daemons/WebAuthenticationAgent/main.mm: Added.

(main):

  • WebKit.xcodeproj/project.pbxproj:

Not sure why libWTF.a is needed. Will fix that in the later part.

3:09 PM Changeset in webkit [268154] by aakash_jain@apple.com
  • 5 edits in trunk/Tools

[build.webkit.org] Ensure that builder names are valid Buildbot identifiers
https://bugs.webkit.org/show_bug.cgi?id=217434

Reviewed by Dewei Zhu.

  • BuildSlaveSupport/build.webkit.org-config/config.json: Updated builder names.
  • BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: Ditto.
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js: Ditto.
  • BuildSlaveSupport/build.webkit.org-config/loadConfig.py: Ensure that unit-tests fail when any builder name does

not follow required naming convention.

2:50 PM Changeset in webkit [268153] by Jonathan Bedard
  • 3 edits in trunk/Tools

REGRESSION (r268080): [test-webkitpy] Mojave bots failing to install python-dateutil-2.8.1
https://bugs.webkit.org/show_bug.cgi?id=217438

Reviewed by Dewei Zhu.

  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py: Include wheel package.
  • Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:

(Package.install): The wheel package may be needed by setup tools.

2:38 PM Changeset in webkit [268152] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][Integration] Use display structures (InlineContent) to provide content height and baseline used values
https://bugs.webkit.org/show_bug.cgi?id=217437

Reviewed by Antti Koivisto.

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::contentLogicalHeight const):
(WebCore::LayoutIntegration::LineLayout::lineCount const):
(WebCore::LayoutIntegration::LineLayout::firstLineBaseline const):
(WebCore::LayoutIntegration::LineLayout::lastLineBaseline const):

2:18 PM Changeset in webkit [268151] by Peng Liu
  • 3 edits in trunk/LayoutTests

[Media in GPU Process] Unskip some layout tests

Unreviewed test gardening.

  • gpu-process/TestExpectations:

Unskip the tests that are marked as failure or timeout when the "Media in GPU Process"
is not enabled.

  • media/video-size-intrinsic-scale.html:
2:04 PM Changeset in webkit [268150] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Add std::max to make sure the line gap is always larger than 0 (see FIXME).

Reviewed by Antti Koivisto.

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::lineLayout):

2:03 PM Changeset in webkit [268149] by Konstantin Tokarev
  • 3 edits in trunk/Tools

[GTK][WPE] Remove Apache's mod_bw from install-dependencies
https://bugs.webkit.org/show_bug.cgi?id=217441

Reviewed by Carlos Alberto Lopez Perez.

It is not activated in any of Apache configs in LayoutTests, and is not
referenced anywhere else.

  • gtk/install-dependencies:
  • wpe/install-dependencies:
1:56 PM Changeset in webkit [268148] by Devin Rousso
  • 5 edits in trunk/Source

Add missing #define for PENCILKIT_TEXT_INPUT flag
https://bugs.webkit.org/show_bug.cgi?id=217436
<rdar://problem/69720219>

Reviewed by Wenson Hsieh.

Source/WebKit:

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView setUpInteraction]):
(-[WKContentView cleanUpInteraction]):
(-[WKContentView _shouldSimulateKeyboardInputOnTextInsertion]):
Change from ENABLE to HAVE.

Source/WTF:

  • wtf/PlatformHave.h:
1:33 PM Changeset in webkit [268147] by Wenson Hsieh
  • 2 edits in trunk/LayoutTests

Unreviewed, unskip a few dozen canvas-related tests that now pass after recent changes

  • gpu-process/TestExpectations:

Unskip a number of tests that were skipped when enabling GPU process. Additionally, remove some erroneous test
expectation lines that were targeting HTML files that are resources or ref test.

1:17 PM Changeset in webkit [268146] by Karl Rackler
  • 2 edits in trunk/LayoutTests

Remove test expectation for fast/images/image-orientation-none-canvas.html while the issue is investigated.
https://bugs.webkit.org/show_bug.cgi?id=217435

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
1:13 PM Changeset in webkit [268145] by Wenson Hsieh
  • 24 edits in trunk/Source

[GPU Process] Support CanvasRenderingContext2D.drawImage() with HTMLVideoElement
https://bugs.webkit.org/show_bug.cgi?id=217339
<rdar://problem/69409029>

Reviewed by Darin Adler.

Source/WebCore:

Implements support for painting the current video frame into a canvas 2D graphics context. See below for more
details.

  • html/HTMLVideoElement.cpp:

(WebCore::HTMLVideoElement::paintCurrentFrameInContext):

Flip this around to call GraphicsContext::paintFrameForMedia with the MediaPlayer, instead of calling into
MediaPlayer with the graphics context. See changes below.

  • platform/graphics/GraphicsContext.cpp:

(WebCore::GraphicsContext::paintFrameForMedia):

  • platform/graphics/GraphicsContext.h:

Add a paintFrameForMedia method that takes a MediaPlayer representing a video, and paints the current frame
of the video into the context. If the graphics context is backed by an platform context (i.e. m_impl is
nullptr), then we simply call through to MediaPlayer's private impl to paint into the context. Otherwise, we
forward the call to the GraphicsContextImpl (see the changes to DisplayListRecorder.cpp below).

  • platform/graphics/GraphicsContextImpl.h:

Add a new virtual function to paint the current frame of the given MediaPlayer into the destination rect.

  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::playerPrivate const):
(WebCore::MediaPlayer::playerPrivate):
(WebCore::MediaPlayer::paintCurrentFrameInContext): Deleted.

  • platform/graphics/MediaPlayer.h:

Remove the existing paintCurrentFrameInContext method on MediaPlayer, which currently takes a graphics
context. Instead, move paintCurrentFrameInContext to GraphicsContext, rename it to paintFrameForMedia, and
pass it a MediaPlayer. Additionally, expose a helper method to get a non-const MediaPlayerPrivateInterface,
and move both method definitions to the implementation file to avoid style checker errors due to MediaPlayer
itself being WEBCORE_EXPORT-ed.

  • platform/graphics/cairo/GraphicsContextImplCairo.cpp:

(WebCore::GraphicsContextImplCairo::paintFrameForMedia):

  • platform/graphics/cairo/GraphicsContextImplCairo.h:
  • platform/graphics/displaylists/DisplayList.h:
  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::Item::sizeInBytes):
(WebCore::DisplayList::PaintFrameForMedia::create):
(WebCore::DisplayList::PaintFrameForMedia::PaintFrameForMedia):
(WebCore::DisplayList::PaintFrameForMedia::apply const):
(WebCore::DisplayList::operator<<):

  • platform/graphics/displaylists/DisplayListItems.h:

(WebCore::DisplayList::PaintFrameForMedia::destination const):
(WebCore::DisplayList::PaintFrameForMedia::identifier const):
(WebCore::DisplayList::PaintFrameForMedia::encode const):
(WebCore::DisplayList::PaintFrameForMedia::decode):
(WebCore::DisplayList::Item::encode const):
(WebCore::DisplayList::Item::decode):

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::paintFrameForMedia):

  • platform/graphics/displaylists/DisplayListRecorder.h:

Add a new display list item, PaintFrameForMedia, that paints the current frame of a given MediaPlayer. This
works by serializing and then deserializing a MediaPlayerHandle and destination rect; similar to
PutImageData, the replayer delegate is responsible for applying this item by mapping the MediaPlayerHandle
to a concrete MediaPlayer instance.

  • platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:

(Nicosia::CairoOperationRecorder::paintFrameForMedia):

  • platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h:
  • platform/graphics/win/GraphicsContextImplDirect2D.cpp:

(WebCore::GraphicsContextImplDirect2D::paintFrameForMedia):

  • platform/graphics/win/GraphicsContextImplDirect2D.h:
  • rendering/RenderVideo.cpp:

(WebCore::RenderVideo::paintReplaced):

Source/WebKit:

Implements support for painting the current video frame into a canvas 2D graphics context. See below (and
Source/WebCore/ChangeLog) for more details.

  • GPUProcess/graphics/RemoteImageBufferMessageHandlerProxy.h:

(WebKit::RemoteImageBufferMessageHandlerProxy::backend):

  • GPUProcess/graphics/RemoteImageBufferProxy.h:

(WebKit::RemoteImageBufferProxy::apply):

Refactor apply so that it treats PutImageData and PaintFrameForMedia as special cases, and otherwise
returns false by default. Implement apply in the case where the display list item is PaintFrameForMedia by
using the MediaPlayerIdentifier to look up the platform MediaPlayer instance, and then calling
GraphicsContext::paintFrameForMedia with this MediaPlayer.

  • GPUProcess/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::gpuConnectionToWebProcess const):

  • GPUProcess/graphics/RemoteRenderingBackendProxy.h:
1:10 PM Changeset in webkit [268144] by Aditya Keerthi
  • 3 edits
    2 adds in trunk

[Contact Picker API] Add support for ContactsManager.getProperties()
https://bugs.webkit.org/show_bug.cgi?id=217354
<rdar://problem/69862099>

Reviewed by Youenn Fablet.

Source/WebCore:

ContactsManager.getProperties() returns a list of properties supported
by the API. These currently include name, email and tel.

Test: contact-picker/contacts-manager-get-properties.html

  • Modules/contact-picker/ContactsManager.cpp:

(WebCore::ContactsManager::getProperties):

LayoutTests:

Added a layout test to exercise the method.

  • contact-picker/contacts-manager-get-properties-expected.txt: Added.
  • contact-picker/contacts-manager-get-properties.html: Added.
1:10 PM Changeset in webkit [268143] by Karl Rackler
  • 19 edits in trunk/Tools

Unreviewed, reverting r268115.

This reverts commit r268115 while investigating ews test
failure.

Reverted changeset:

"Refactor TestOptions code in WebKitTestRunner to make it
easier to rationalize and extend"
https://bugs.webkit.org/show_bug.cgi?id=217390
https://trac.webkit.org/changeset/268115

1:08 PM Changeset in webkit [268142] by Caio Lima
  • 2 edits in trunk/JSTests

[MIPS] Flaky test stress/array-species-create-should-handle-masquerader.js
https://bugs.webkit.org/show_bug.cgi?id=217433

Unreviewed test gardening.

  • stress/array-species-create-should-handle-masquerader.js:
12:58 PM Changeset in webkit [268141] by Karl Rackler
  • 2 edits in trunk/LayoutTests

REGRESSION (r268115?): [ iOS wk2 EWS ] fast/images/image-orientation-none-canvas.html is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=217435

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
12:42 PM Changeset in webkit [268140] by Russell Epstein
  • 8 edits in branches/safari-610.2.8.0-branch/Source

Versioning.

WebKit-7610.2.8.0.2

12:23 PM Changeset in webkit [268139] by Russell Epstein
  • 8 edits in branches/safari-610.2-branch/Source

Versioning.

WebKit-7610.2.12

11:54 AM Changeset in webkit [268138] by Noam Rosenthal
  • 10 edits
    141 adds in trunk

clip-path: path() ignores page zooming (Command-+)
https://bugs.webkit.org/show_bug.cgi?id=217311
<rdar://problem/69977271>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Imported all clip-path web platform tests.
Some of them don't pass yet for unrelated reasons, skipped in TestExpectations.

  • web-platform-tests/css/css-masking/clip-path/clip-path-path-interpolation-with-zoom-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-path-interpolation-with-zoom.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-path-with-zoom-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-path-with-zoom-hittest-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-path-with-zoom-hittest.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-path-with-zoom.html: Added.

These tests test the actual zoom-related issues.

  • resources/import-expectations.json:
  • web-platform-tests/css/css-masking: Added.
  • web-platform-tests/css/css-masking/clip-path: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-circle-001-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-circle-001.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-circle-002-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-circle-002.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-circle-003-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-circle-003.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-circle-004-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-circle-004.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-circle-005-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-circle-005.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-circle-006-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-circle-006.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-circle-007-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-circle-007.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-circle-008-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-circle-008.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-columns-shape-001-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-columns-shape-001.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-columns-shape-002-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-columns-shape-002.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-descendant-text-mutated-001-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-descendant-text-mutated-001.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-document-element-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-document-element-will-change-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-document-element-will-change.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-document-element.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-element-userSpaceOnUse-001-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-element-userSpaceOnUse-001.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-element-userSpaceOnUse-002-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-element-userSpaceOnUse-002.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-element-userSpaceOnUse-003-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-element-userSpaceOnUse-003.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-element-userSpaceOnUse-004-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-element-userSpaceOnUse-004.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-ellipse-001-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-ellipse-001.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-ellipse-002-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-ellipse-002.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-ellipse-003-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-ellipse-003.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-ellipse-004-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-ellipse-004.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-ellipse-005-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-ellipse-005.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-ellipse-006-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-ellipse-006.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-ellipse-007-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-ellipse-007.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-ellipse-008-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-ellipse-008.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-filter-order-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-filter-order.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-filter-radius-clips-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-filter-radius-clips.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-fixed-nested-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-fixed-nested.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-inline-001-expected.xht: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-inline-001.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-inline-002-expected.xht: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-inline-002.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-inline-003-expected.xht: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-inline-003.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-path-001-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-path-001.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-path-002-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-path-002.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-path-interpolation-001-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-path-interpolation-001.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-path-interpolation-002-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-path-interpolation-002.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-polygon-001-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-polygon-001.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-polygon-002-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-polygon-002.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-polygon-003-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-polygon-003.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-polygon-004-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-polygon-004.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-polygon-005-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-polygon-005.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-polygon-006-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-polygon-006.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-polygon-007-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-polygon-007.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-polygon-008-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-polygon-008.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-polygon-009-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-polygon-009.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-polygon-010-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-polygon-010.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-polygon-011-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-polygon-011.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-polygon-012-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-polygon-012.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-polygon-013-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-polygon-013.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-reference-box-001-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-reference-box-001.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-reference-box-002-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-reference-box-002.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-reference-box-003-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-reference-box-003.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-reference-box-004-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-reference-box-004.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-reference-restore-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-reference-restore.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-rotated-will-change-transform-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-rotated-will-change-transform.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-scroll-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-scroll.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-svg-invalidate-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-svg-invalidate.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-transform-mutated-001-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-transform-mutated-001.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-transform-mutated-002-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-transform-mutated-002.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-url-reference-change-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-url-reference-change-from-empty-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-url-reference-change-from-empty.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-url-reference-change.html: Added.
  • web-platform-tests/css/css-masking/clip-path/interpolation-expected.txt: Added.
  • web-platform-tests/css/css-masking/clip-path/interpolation.html: Added.
  • web-platform-tests/css/css-masking/clip-path/reference: Added.
  • web-platform-tests/css/css-masking/clip-path/reference-local-url-with-base-001-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/reference-local-url-with-base-001.html: Added.
  • web-platform-tests/css/css-masking/clip-path/reference-mutated-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/reference-mutated.html: Added.
  • web-platform-tests/css/css-masking/clip-path/reference-nonexisting-existing-local-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/reference-nonexisting-existing-local.html: Added.
  • web-platform-tests/css/css-masking/clip-path/reference/clip-path-path-with-zoom-hittest-ref.html: Added.
  • web-platform-tests/css/css-masking/clip-path/reference/w3c-import.log: Added.
  • web-platform-tests/css/css-masking/clip-path/svg-clipPath.svg: Added.
  • web-platform-tests/css/css-masking/clip-path/w3c-import.log: Added.

Source/WebCore:

Added a zoom property to BasicShapePath.

When BasicShapePath is created from a clip-path, the shape's zoom received the effective zoom.
The internal cache in BasicShapePath now uses the zoom as an additional cache key, in addition
to windRule, offset and byteStream. Renamed SVGPathTranslatedByteStream to SVGPathTransformedByteStream.

Tests:

imported/w3c/web-platform-tests/css/css-masking/clip-path/clip-path-path-interpolation-with-zoom.html
imported/w3c/web-platform-tests/css/css-masking/clip-path/clip-path-path-with-zoom-hittest.html
imported/w3c/web-platform-tests/css/css-masking/clip-path/clip-path-path-with-zoom.html

Also imported the rest of the w3c clip-path tests.

  • css/BasicShapeFunctions.cpp:

(WebCore::basicShapeForValue):

  • css/BasicShapeFunctions.h:
  • rendering/style/BasicShapes.cpp:

(WebCore::SVGPathTransformedByteStream::SVGPathTransformedByteStream):
(WebCore::SVGPathTransformedByteStream::operator== const):
(WebCore::SVGPathTransformedByteStream::operator!= const):
(WebCore::SVGPathTransformedByteStream::path const):
(WebCore::TransformedByteStreamPathPolicy::isKeyNull):
(WebCore::TransformedByteStreamPathPolicy::createValueForKey):
(WebCore::cachedTransformedByteStreamPath):
(WebCore::BasicShapePath::path):
(WebCore::BasicShapePath::operator== const):
(WebCore::BasicShapePath::blend const):
(WebCore::SVGPathTranslatedByteStream::SVGPathTranslatedByteStream): Deleted.
(WebCore::SVGPathTranslatedByteStream::operator== const): Deleted.
(WebCore::SVGPathTranslatedByteStream::operator!= const): Deleted.
(WebCore::SVGPathTranslatedByteStream::isEmpty const): Deleted.
(WebCore::SVGPathTranslatedByteStream::path const): Deleted.
(WebCore::TranslatedByteStreamPathPolicy::isKeyNull): Deleted.
(WebCore::TranslatedByteStreamPathPolicy::createValueForKey): Deleted.
(WebCore::cachedTranslatedByteStreamPath): Deleted.

Add zoom to BasicShapePath and related internal structure.

  • rendering/style/BasicShapes.h:
  • style/StyleBuilderConverter.h:

(WebCore::Style::BuilderConverter::convertClipPath):

Read zoom from current style when creating a BasicShapeClipPath.

LayoutTests:

Marked newly imported clip-path w3c tests that don't pass yet as expected failure.
Some of them have open bugs, the others need triage.

11:39 AM Changeset in webkit [268137] by Russell Epstein
  • 8 edits in trunk/Source

Versioning.

WebKit-7611.1.4

11:07 AM Changeset in webkit [268136] by youenn@apple.com
  • 19 edits in trunk

Add support for BlobEvent.timecode
https://bugs.webkit.org/show_bug.cgi?id=217379

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/mediacapture-record/idlharness.window-expected.txt:

Source/WebCore:

Expose timecode getter for BlobEvent.
Make MediaRecorder backend return the timecode value for each fetch data.
For the real backend, compute the timecode as the current audio timestamp for the next fetch data request,
or the current video timestamp if only video is captured.

Covered by rebased test.

  • Modules/mediarecorder/BlobEvent.cpp:

(WebCore::BlobEvent::BlobEvent):

  • Modules/mediarecorder/BlobEvent.h:
  • Modules/mediarecorder/BlobEvent.idl:
  • Modules/mediarecorder/MediaRecorder.cpp:

(WebCore::createDataAvailableEvent):
(WebCore::MediaRecorder::stopRecording):
(WebCore::MediaRecorder::requestData):
(WebCore::MediaRecorder::fetchData):
(WebCore::MediaRecorder::handleTrackChange):
(WebCore::MediaRecorder::trackEnded):

  • Modules/mediarecorder/MediaRecorder.h:
  • platform/mediarecorder/MediaRecorderPrivate.h:
  • platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp:

(WebCore::MediaRecorderPrivateAVFImpl::fetchData):

  • platform/mediarecorder/MediaRecorderPrivateMock.cpp:

(WebCore::MediaRecorderPrivateMock::fetchData):

  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:

(WebCore::MediaRecorderPrivateWriter::clear):
(WebCore::MediaRecorderPrivateWriter::stopRecording):
(WebCore::MediaRecorderPrivateWriter::fetchData):
(WebCore::MediaRecorderPrivateWriter::updateTimeCode):

Source/WebKit:

Exchange timecode through IPC.

  • GPUProcess/webrtc/RemoteMediaRecorder.cpp:

(WebKit::RemoteMediaRecorder::fetchData):

  • GPUProcess/webrtc/RemoteMediaRecorder.h:
  • GPUProcess/webrtc/RemoteMediaRecorder.messages.in:
  • WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:

(WebKit::MediaRecorderPrivate::fetchData):

  • WebProcess/GPU/webrtc/MediaRecorderPrivate.h:
11:05 AM Changeset in webkit [268135] by Tadeu Zagallo
  • 2 edits in trunk/Source/WTF

Add maximum depth check to RedBlackTree
https://bugs.webkit.org/show_bug.cgi?id=217249
<rdar://problem/69432957>

Reviewed by Saam Barati.

We limit all tree traversals to 128 levels deep. That's a very conservative upper bound that
would work for a tree that used all of the available address space.

  • wtf/RedBlackTree.h:
11:04 AM Changeset in webkit [268134] by basuke.suzuki@sony.com
  • 2 edits in trunk/Tools

[build-webkit] Compare with cmakeargs and unhandled to detect configuration change
https://bugs.webkit.org/show_bug.cgi?id=207012

Reviewed by Carlos Alberto Lopez Perez.

Added command line arguments on top of @featureArgs for comparison with previous build
options. This forces regeneration of CMakeCache.txt when any configuration is changed.

  • Scripts/webkitdirs.pm:

(shouldRemoveCMakeCache):

11:02 AM Changeset in webkit [268133] by Alan Bujtas
  • 6 edits
    2 adds in trunk

[LFC][IFC] Adjust the inline formatting context root's content height when the last line has float clear
https://bugs.webkit.org/show_bug.cgi?id=217432

Reviewed by Antti Koivisto.

Source/WebCore:

This patch expands the support for inline content to clear floats (r268122) by taking the clear gap into
account when it occurs after the last line (e.g. <div>foobar<br clear=left"></div>).
In such cases the inline formatting context's content height needs to be adjusted with the computed clear
gap value.

Test: fast/layoutformattingcontext/float-avoiding-br-last-line.html

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::lineLayout):

  • layout/inlineformatting/InlineFormattingState.h:

(WebCore::Layout::InlineFormattingState::setClearGapAfterLastLine):
(WebCore::Layout::InlineFormattingState::clearGapAfterLastLine const):
(WebCore::Layout::InlineFormattingState::clearLineAndRuns):

LayoutTests:

  • fast/layoutformattingcontext/float-avoiding-br-last-line-expected.html: Added.
  • fast/layoutformattingcontext/float-avoiding-br-last-line.html: Added.
10:09 AM Changeset in webkit [268132] by Alan Coon
  • 3 edits in branches/safari-610-branch/LayoutTests

Apply patch. rdar://problem/70024420

Applied "rebased-expectations-patch".

10:09 AM Changeset in webkit [268131] by Alan Coon
  • 1 edit in branches/safari-610-branch/Source/WebCore/platform/Timer.h

Apply patch. rdar://problem/70024420

Applied "patch-timer".

9:41 AM Changeset in webkit [268130] by youenn@apple.com
  • 23 edits
    2 adds in trunk

Add support for MediaRecorder pause/resume
https://bugs.webkit.org/show_bug.cgi?id=217375

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/mediacapture-record/MediaRecorder-pause-resume-expected.txt:
  • web-platform-tests/mediacapture-record/MediaRecorder-peerconnection.https-expected.txt:
  • web-platform-tests/mediacapture-record/idlharness.window-expected.txt:

Source/WebCore:

Implement pause and resume as per spec.
MediaRecorder basically sends pause/resume order to its backend.
The backend then stops observing tracks when paused and resumed observing at resume time.
For video, we make sure to compute the frame timestamp so that the recorded video continues to play without interruption.

Test: http/wpt/mediarecorder/pause-recording.html

  • Modules/mediarecorder/MediaRecorder.cpp:

(WebCore::MediaRecorder::pauseRecording):
(WebCore::MediaRecorder::resumeRecording):

  • Modules/mediarecorder/MediaRecorder.h:
  • Modules/mediarecorder/MediaRecorder.idl:
  • platform/mediarecorder/MediaRecorderPrivate.cpp:

(WebCore::MediaRecorderPrivate::pause):
(WebCore::MediaRecorderPrivate::resume):

  • platform/mediarecorder/MediaRecorderPrivate.h:
  • platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp:

(WebCore::MediaRecorderPrivateAVFImpl::pauseRecording):
(WebCore::MediaRecorderPrivateAVFImpl::resumeRecording):

  • platform/mediarecorder/MediaRecorderPrivateAVFImpl.h:
  • platform/mediarecorder/MediaRecorderPrivateMock.h:
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:

(WebCore::MediaRecorderPrivateWriter::appendVideoSampleBuffer):
(WebCore::MediaRecorderPrivateWriter::pause):
(WebCore::MediaRecorderPrivateWriter::resume):

Source/WebKit:

Add IPC support for sending pause/resume orders.

  • GPUProcess/webrtc/RemoteMediaRecorder.cpp:

(WebKit::RemoteMediaRecorder::pause):
(WebKit::RemoteMediaRecorder::resume):

  • GPUProcess/webrtc/RemoteMediaRecorder.h:
  • GPUProcess/webrtc/RemoteMediaRecorder.messages.in:
  • WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:

(WebKit::MediaRecorderPrivate::pauseRecording):
(WebKit::MediaRecorderPrivate::resumeRecording):

  • WebProcess/GPU/webrtc/MediaRecorderPrivate.h:

LayoutTests:

fix-217375

  • http/wpt/mediarecorder/pause-recording-expected.txt: Added.
  • http/wpt/mediarecorder/pause-recording.html: Added.
9:39 AM Changeset in webkit [268129] by youenn@apple.com
  • 2 edits in trunk/LayoutTests/imported/w3c

MediaRecorder::create should not need to create a MediaRecorderPrivate to validate it can record properly
https://bugs.webkit.org/show_bug.cgi?id=217387
<rdar://problem/70049616>

Unreviewed.

Rebased test after https://trac.webkit.org/changeset/268125.
We should fix the exact name of the exception based on https://github.com/w3c/mediacapture-record/issues/206.

  • web-platform-tests/mediacapture-record/MediaRecorder-detached-context-expected.txt:
9:01 AM Changeset in webkit [268128] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[build.webkit.org] Ensure that invalid step names are not allowed
https://bugs.webkit.org/show_bug.cgi?id=217431

Reviewed by Darin Adler.

  • BuildSlaveSupport/build.webkit.org-config/loadConfig.py:

(loadBuilderConfig):

8:54 AM Changeset in webkit [268127] by pvollan@apple.com
  • 5 edits in trunk

[macOS] Remove 'com.apple.cookied' from the WebContent process sandbox.
https://bugs.webkit.org/show_bug.cgi?id=206088
Source/WebKit:

<rdar://problem/58489040>

Reviewed by Darin Adler.

It has been confirmed that access to the cookied service can be removed from the WebContent process.

Test: fast/sandbox/sandbox-mach-lookup.html

  • WebProcess/com.apple.WebProcess.sb.in:

LayoutTests:

Reviewed by Darin Adler.

  • fast/sandbox/mac/sandbox-mach-lookup-expected.txt:
  • fast/sandbox/mac/sandbox-mach-lookup.html:
8:52 AM Changeset in webkit [268126] by Aditya Keerthi
  • 2 edits in trunk/Source/WebKit

zappos.com: Dropdown - 'Quantity' option size different
https://bugs.webkit.org/show_bug.cgi?id=217395
<rdar://problem/60261396>

Reviewed by Tim Horton.

The select element used in this instance uses a custom font (Open Sans)
with a 16px font size. When presenting the select dropdown a call to
WebPopupMenuProxyMac::showPopupMenu is made with those attributes.
However, since Open Sans is not a system font, the call to
[NSFont fontWithDescriptor:size:] returns nil. This results in the
presented view falling back to the default font size, which is smaller
than the expected 16px size, leading to smaller options.

While other browsers do not honor custom fonts in their select dropdowns,
they do honor the font size. Consequently, this dropdown appears
different in Safari. To fix, ensure that the font size is always honored
if the corresponding attribute is present.

  • UIProcess/mac/WebPopupMenuProxyMac.mm:

(WebKit::WebPopupMenuProxyMac::showPopupMenu):

8:48 AM Changeset in webkit [268125] by youenn@apple.com
  • 3 edits
    2 adds in trunk

MediaRecorder::create should not need to create a MediaRecorderPrivate to validate it can record properly
https://bugs.webkit.org/show_bug.cgi?id=217387

Reviewed by Darin Adler.

Source/WebCore:

Instead of creating a MediaRecorderPrivate to verify that we can create one, just rely on isTypeSupported.
Add a check that page is not null in the create method.

Remove assertion that we can create a private recorder in start since thgere is no guarantee that the frame might not be detached.

Test: http/wpt/mediarecorder/MediaRecorder-frame.html

  • Modules/mediarecorder/MediaRecorder.cpp:

(WebCore::MediaRecorder::create):
(WebCore::MediaRecorder::createMediaRecorderPrivate):
(WebCore::MediaRecorder::startRecording):

LayoutTests:

  • http/wpt/mediarecorder/MediaRecorder-frame-expected.txt: Added.
  • http/wpt/mediarecorder/MediaRecorder-frame.html: Added.
8:47 AM Changeset in webkit [268124] by Antti Koivisto
  • 9 edits
    4 adds in trunk/Source/WebCore

[LFC][Integration] Add line iterator
https://bugs.webkit.org/show_bug.cgi?id=217427

Reviewed by Zalan Bujtas.

Add line iterator. In this patch it is only used to replace onSameLine function.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/Position.cpp:

(WebCore::Position::rendersInDifferentPosition const):

  • layout/integration/LayoutIntegrationLineIterator.cpp: Added.

(WebCore::LayoutIntegration::LineIterator::LineIterator):
(WebCore::LayoutIntegration::LineIterator::atEnd const):
(WebCore::LayoutIntegration::LineIterator::next const):
(WebCore::LayoutIntegration::LineIterator::previous const):
(WebCore::LayoutIntegration::LineIterator::traverseNext):
(WebCore::LayoutIntegration::LineIterator::traversePrevious):

  • layout/integration/LayoutIntegrationLineIterator.h: Added.

(WebCore::LayoutIntegration::PathLine::operator!= const):
(WebCore::LayoutIntegration::LineIterator::LineIterator):
(WebCore::LayoutIntegration::LineIterator::operator++):
(WebCore::LayoutIntegration::LineIterator::operator bool const):
(WebCore::LayoutIntegration::LineIterator::operator== const):
(WebCore::LayoutIntegration::LineIterator::operator!= const):
(WebCore::LayoutIntegration::LineIterator::operator* const):
(WebCore::LayoutIntegration::LineIterator::operator-> const):
(WebCore::LayoutIntegration::PathLine::PathLine):
(WebCore::LayoutIntegration::PathLine::rect const):
(WebCore::LayoutIntegration::PathLine::operator== const):

  • layout/integration/LayoutIntegrationLineIteratorLegacyPath.h: Added.

(WebCore::LayoutIntegration::LegacyLinePath::LegacyLinePath):
(WebCore::LayoutIntegration::LegacyLinePath::rect const):
(WebCore::LayoutIntegration::LegacyLinePath::traverseNext):
(WebCore::LayoutIntegration::LegacyLinePath::traversePrevious):
(WebCore::LayoutIntegration::LegacyLinePath::operator== const):
(WebCore::LayoutIntegration::LegacyLinePath::atEnd const):
(WebCore::LayoutIntegration::LegacyLinePath::setAtEnd):

  • layout/integration/LayoutIntegrationLineIteratorModernPath.h: Added.

(WebCore::LayoutIntegration::ModernLinePath::ModernLinePath):
(WebCore::LayoutIntegration::ModernLinePath::rect const):
(WebCore::LayoutIntegration::ModernLinePath::traverseNext):
(WebCore::LayoutIntegration::ModernLinePath::traversePrevious):
(WebCore::LayoutIntegration::ModernLinePath::operator== const):
(WebCore::LayoutIntegration::ModernLinePath::atEnd const):
(WebCore::LayoutIntegration::ModernLinePath::setAtEnd):
(WebCore::LayoutIntegration::ModernLinePath::lines const):
(WebCore::LayoutIntegration::ModernLinePath::line const):

  • layout/integration/LayoutIntegrationRunIterator.cpp:

(WebCore::LayoutIntegration::RunIterator::line const):

  • layout/integration/LayoutIntegrationRunIterator.h:

(WebCore::LayoutIntegration::PathRun::logicalLeft const):
(WebCore::LayoutIntegration::PathRun::logicalRight const):
(WebCore::LayoutIntegration::PathRun::logicalWidth const):
(WebCore::LayoutIntegration::PathRun::logicalHeight const):
(WebCore::LayoutIntegration::PathRun::onSameLine const): Deleted.

  • layout/integration/LayoutIntegrationRunIteratorLegacyPath.h:

(WebCore::LayoutIntegration::LegacyPath::operator== const):
(WebCore::LayoutIntegration::LegacyPath::rootInlineBox const):
(WebCore::LayoutIntegration::LegacyPath::onSameLine const): Deleted.

  • layout/integration/LayoutIntegrationRunIteratorModernPath.h:

(WebCore::LayoutIntegration::verticallyRoundedRect):
(WebCore::LayoutIntegration::ModernPath::rect const):
(WebCore::LayoutIntegration::ModernPath::operator== const):
(WebCore::LayoutIntegration::linePosition): Deleted.
(WebCore::LayoutIntegration::ModernPath::onSameLine const): Deleted.

8:20 AM Changeset in webkit [268123] by Aditya Keerthi
  • 4 edits
    1 add in trunk

REGRESSION: Date/time pickers are not displayed in UIWebViews
https://bugs.webkit.org/show_bug.cgi?id=217341
<rdar://problem/66881739>

Reviewed by Wenson Hsieh.

Source/WTF:

Date/time inputs were incorrectly disabled by default on
PLATFORM(IOS_FAMILY) in WebPreferencesInternal.

  • Scripts/Preferences/WebPreferencesInternal.yaml:

Tools:

Added regression tests to ensure this preference is not accidently
modified in the future.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitLegacy/ios/DateTimeInputsAccessoryViewTests.mm: Added.

(-[DateTimeInputsTestsLoadingDelegate webViewDidFinishLoad:]):
(runTestWithInputType):

Note that [UIDatePicker setDatePickerMode:] had to be swizzled to an
empty implementation as the UIKit version on the bots attempts to
create a QoS interval upon setting the initially selected row in
a UITableView when the date picker is presented. This fails because
TestWebKitAPI isn't actually an app. To avoid an exception, the method
is swizzled out.

7:38 AM Changeset in webkit [268122] by Alan Bujtas
  • 10 edits
    2 adds in trunk

[LFC][IFC] Add initial support for inline content to clear intrusive floats
https://bugs.webkit.org/show_bug.cgi?id=217418

Reviewed by Antti Koivisto.

Source/WebCore:

In this patch we introduce the concept of gaps between lines. These gaps are required
to clear intrusive floats when the inline content has the clear property set.
(This behavior changed in CSS2. Now the clear property only applies to block-level elements.)

Adjust the logic in FloatingContext::verticalPositionWithClearance so that it can take an inline level box
and make sure that the next line does not start above the clearance position.

Test: fast/layoutformattingcontext/float-avoiding-br-simple.html

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::geometryForBox const):

  • layout/FormattingContext.h:
  • layout/floats/FloatingContext.cpp:

(WebCore::Layout::FloatingContext::absoluteCoordinates const):
(WebCore::Layout::FloatingContext::mapTopLeftToFloatingStateRoot const):
(WebCore::Layout::FloatingContext::mapPointFromFormattingContextRootToFloatingStateRoot const):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::lineLayout):

  • layout/inlineformatting/InlineFormattingContext.h:
  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

(WebCore::Layout::InlineFormattingContext::Geometry::logicalTopForNextLine const):

LayoutTests:

  • fast/layoutformattingcontext/float-avoiding-br-simple-expected.html: Added.
  • fast/layoutformattingcontext/float-avoiding-br-simple.html: Added.
6:19 AM Changeset in webkit [268121] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[LFC][Floating] Move FloatingState::top/bottom functions over to FloatingContext
https://bugs.webkit.org/show_bug.cgi?id=217411

Reviewed by Antti Koivisto.

FormattingState classes are mostly about setters and getters and they don't have any involved logic.
While both top() and bottom() are both rather lightweight at the moment, it will change with the
upcoming <br clear> feature. Let's just move these function over to FloatingContext.

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
(WebCore::Layout::FormattingContext::Geometry::complicatedCases const):

  • layout/floats/FloatingContext.cpp:

(WebCore::Layout::FloatingContext::positionForFloat const):
(WebCore::Layout::FloatingContext::verticalPositionWithClearance const):
(WebCore::Layout::FloatingContext::bottom const): The check for isInFormattingContextOf() is redundant, so let's not add that back here.
(WebCore::Layout::FloatingContext::top const):

  • layout/floats/FloatingContext.h:

(WebCore::Layout::FloatingContext::leftBottom const):
(WebCore::Layout::FloatingContext::rightBottom const):
(WebCore::Layout::FloatingContext::bottom const):

  • layout/floats/FloatingState.cpp:

(WebCore::Layout::FloatingState::bottom const): Deleted.
(WebCore::Layout::FloatingState::top const): Deleted.

  • layout/floats/FloatingState.h:

(WebCore::Layout::FloatingState::leftBottom const): Deleted.
(WebCore::Layout::FloatingState::rightBottom const): Deleted.
(WebCore::Layout::FloatingState::bottom const): Deleted.

4:01 AM Changeset in webkit [268120] by commit-queue@webkit.org
  • 15 edits
    10 deletes in trunk

Unreviewed, reverting r268085.
https://bugs.webkit.org/show_bug.cgi?id=217424

Added broken test webgl/conformance/extensions/s3tc-and-
rgtc.html

Reverted changeset:

"Support EXT_texture_compression_rgtc WebGL extension"
https://bugs.webkit.org/show_bug.cgi?id=217198
https://trac.webkit.org/changeset/268085

2:22 AM Changeset in webkit [268119] by youenn@apple.com
  • 15 edits in trunk

Make sure to fire the correct set of events in case MediaRecorder stream has track changes
https://bugs.webkit.org/show_bug.cgi?id=217316

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/mediacapture-record/MediaRecorder-error.html:
  • web-platform-tests/mediacapture-record/MediaRecorder-stop-expected.txt:
  • web-platform-tests/mediacapture-record/MediaRecorder-stop.html:

Source/WebCore:

Introduce MediaRecorderPrivate::stop which makes sure to unregister from media sources before stopping.
Update firing events according https://w3c.github.io/mediacapture-record/#dom-mediarecorder-start when track set is changed.
Covered by updated test.

  • Modules/mediarecorder/MediaRecorder.cpp:

(WebCore::MediaRecorder::create):
(WebCore::MediaRecorder::stopRecordingInternal):
(WebCore::MediaRecorder::handleTrackChange):

  • platform/mediarecorder/MediaRecorderPrivate.cpp:

(WebCore::MediaRecorderPrivate::stop):

  • platform/mediarecorder/MediaRecorderPrivate.h:
  • platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp:

(WebCore::MediaRecorderPrivateAVFImpl::~MediaRecorderPrivateAVFImpl):
(WebCore::MediaRecorderPrivateAVFImpl::stopRecording):

  • platform/mediarecorder/MediaRecorderPrivateMock.cpp:

(WebCore::MediaRecorderPrivateMock::~MediaRecorderPrivateMock):
(WebCore::MediaRecorderPrivateMock::stopRecording):

Source/WebKit:

Make sure to not set audio/video tracks if the recorder was stopped.

  • WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:

(WebKit::MediaRecorderPrivate::startRecording):
(WebKit::MediaRecorderPrivate::~MediaRecorderPrivate):
(WebKit::MediaRecorderPrivate::stopRecording):

  • WebProcess/GPU/webrtc/MediaRecorderPrivate.h:

LayoutTests:

  • platform/mac-wk2/TestExpectations:
Note: See TracTimeline for information about the timeline view.