⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Timeline



Nov 4, 2019:

11:48 PM Changeset in webkit [252043] by rniwa@webkit.org
  • 2 edits in trunk/LayoutTests

Skip fast/forms/ios/inputmode-change-update-keyboard.html on iPads as this test relies on iPhone's keyboard behavior.

  • platform/ipad/TestExpectations:
9:16 PM Changeset in webkit [252042] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

[iOS] LayoutTest fast/events/touch/ios/double-tap-for-double-click3.html is failing
https://bugs.webkit.org/show_bug.cgi?id=203835
<rdar://problem/56123067>

Unable to reproduce. Inserting a double-tap-delay between the events usually fixes these problems.

Reviewed by Wenson Hsieh.

  • fast/events/touch/ios/double-tap-for-double-click3.html:
9:13 PM Changeset in webkit [252041] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

[iOS] fast/events/touch/ios/content-observation/click-event-suppression-on-content-change.html is failing
https://bugs.webkit.org/show_bug.cgi?id=203838
<rdar://problem/55664976>

Reviewed by Wenson Hsieh.

Unable to reproduce. Replace the magic 50ms timeouts with the more robust UIHelper.waitForDoubleTapDelay().

  • fast/events/touch/ios/content-observation/click-event-suppression-on-content-change.html:
8:48 PM Changeset in webkit [252040] by Alan Coon
  • 5 edits in branches/safari-608-branch/Source

Cherry-pick r252000. rdar://problem/56887517

REGRESSION(r243947) Epson software updater fails to install new version
https://bugs.webkit.org/show_bug.cgi?id=203809
<rdar://problem/56002179>

Patch by Alex Christensen <achristensen@webkit.org> on 2019-11-04
Reviewed by Brady Eidson.

Source/WebCore:

I manually verified this fixes the issue. See the radar.

  • platform/RuntimeApplicationChecks.h:
  • platform/cocoa/RuntimeApplicationChecksCocoa.mm: (WebCore::MacApplication::isEpsonSoftwareUpdater):

Source/WebKitLegacy/mac:

  • Misc/WebDownload.mm: (shouldCallOnNetworkThread): (callOnDelegateThread): (isDelegateThread): (-[WebDownloadInternal downloadDidBegin:]): (-[WebDownloadInternal download:willSendRequest:redirectResponse:]): (-[WebDownloadInternal download:didReceiveAuthenticationChallenge:]): (-[WebDownloadInternal download:didReceiveResponse:]): (-[WebDownloadInternal download:didReceiveDataOfLength:]): (-[WebDownloadInternal download:shouldDecodeSourceDataOfMIMEType:]): (-[WebDownloadInternal download:decideDestinationWithSuggestedFilename:]): (-[WebDownloadInternal download:didCreateDestination:]): (-[WebDownloadInternal downloadDidFinish:]): (-[WebDownloadInternal download:didFailWithError:]):

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

8:48 PM Changeset in webkit [252039] by Alan Coon
  • 3 edits
    2 adds in branches/safari-608-branch

Cherry-pick r251957. rdar://problem/56887511

SVG pair properties must be detached from their owner before it's deleted
https://bugs.webkit.org/show_bug.cgi?id=203545

Reviewed by Simon Fraser.

Source/WebCore:

SVGAnimatedPropertyPairAccessor needs to override its detach() method so
each of its pair properties detaches itself from the owner.
SVGPointerMemberAccessor does the same thing but for a single property
which covers all the list properties as well.

Test: svg/custom/pair-properties-detach.html

  • svg/properties/SVGAnimatedPropertyPairAccessor.h:

LayoutTests:

  • svg/custom/pair-properties-detach-expected.txt: Added.
  • svg/custom/pair-properties-detach.html: Added.

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

8:44 PM Changeset in webkit [252038] by rniwa@webkit.org
  • 2 edits in trunk/LayoutTests

Removed the flaky failure expectation from focusing-element-with-tabindex-by-tap-or-click.html
since it appears to be always passing now.

  • platform/ios/TestExpectations:
8:24 PM Changeset in webkit [252037] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews] Perform validation of patch before retrying API and layout tests
https://bugs.webkit.org/show_bug.cgi?id=203756

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps.py:

(ValidatePatch.init): Added parameters to optionally skip certain validations.
(ValidatePatch.start): Skip certain validations based on the parameters.
(RunWebKitTests.evaluateCommand): Add a ValidatePatch step before retrying.
(ReRunWebKitTests.evaluateCommand): Ditto.
(RunAPITests.evaluateCommand): Ditto.
(ReRunAPITests.evaluateCommand): Ditto.

8:23 PM Changeset in webkit [252036] by Chris Dumez
  • 5 edits
    2 deletes in trunk/Source/WebCore

Drop SuspendableTaskQueue now that it is unused
https://bugs.webkit.org/show_bug.cgi?id=203827

Reviewed by Ryosuke Niwa.

All users have been ported to the HTML5 event loop.

  • PlatformWin.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/SuspendableTaskQueue.cpp: Removed.
  • platform/SuspendableTaskQueue.h: Removed.
  • workers/service/ServiceWorkerContainer.h:
8:05 PM Changeset in webkit [252035] by jiewen_tan@apple.com
  • 5 edits in trunk

[WebAuthn] Guard against unexpected -[_WKWebAuthenticationPanel cancel]
https://bugs.webkit.org/show_bug.cgi?id=203830
<rdar://problem/56797134>

Reviewed by Brent Fulgham .

Source/WebKit:

-[_WKWebAuthenticationPanel cancel] was only expected to be called on behalf of an
explicit user cancel from the UI. However, clients may call it in different other
unexpected scenarios as well. We should guard against that.

To do so, two counter ways are implemented:
1) AuthenticatorManager::cancelRequest is changed to invoke the pending request if there
is no GlobalFrameID. This case can only be reached via calling -[_WKWebAuthenticationPanel cancel]
before AuthenticatorManager::cancelRequest.
2) WebAuthenticationPanelClient::updatePanel and WebAuthenticationPanelClient::dismissPanel
will call delegate methods in the next run loop to prevent -[_WKWebAuthenticationPanel cancel]
being called in the delegates.

Covered by new API tests.

  • UIProcess/WebAuthentication/AuthenticatorManager.cpp:

(WebKit::AuthenticatorManager::cancelRequest):
(WebKit::AuthenticatorManager::createService const):
(WebKit::AuthenticatorManager::invokePendingCompletionHandler):

  • UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.mm:

(WebKit::WebAuthenticationPanelClient::updatePanel const):
(WebKit::WebAuthenticationPanelClient::dismissPanel const):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(-[TestWebAuthenticationPanelDelegate panel:updateWebAuthenticationPanel:]):
(-[TestWebAuthenticationPanelDelegate panel:dismissWebAuthenticationPanelWithResult:]):
(TestWebKitAPI::TEST):

7:16 PM Changeset in webkit [252034] by mmaxfield@apple.com
  • 16 edits in trunk

Rename ui-monospaced to ui-monospace to match the monospace generic font family
https://bugs.webkit.org/show_bug.cgi?id=203602

Reviewed by Simon Fraser.

Source/WebCore:

As per https://github.com/w3c/csswg-drafts/issues/4469

Updated existing tests.

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::platformFontLookupWithFamily):
(WebCore::fontWithFamilySpecialCase):

  • platform/graphics/cocoa/FontDescriptionCocoa.cpp:

(WebCore::matchSystemFontUse):

  • platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:

(WebCore::SystemFontDatabaseCoreText::createDesignSystemUIFont):
(WebCore::SystemFontDatabaseCoreText::cascadeList):
(WebCore::SystemFontDatabaseCoreText::systemFontParameters):

  • platform/graphics/cocoa/SystemFontDatabaseCoreText.h:

LayoutTests:

Updated existing tests.

  • fast/text/design-system-ui-12.html:
  • fast/text/design-system-ui-15.html:
  • fast/text/design-system-ui-2-expected.html:
  • fast/text/design-system-ui-2.html:
  • fast/text/design-system-ui-4-expected-mismatch.html:
  • fast/text/design-system-ui-4.html:
  • fast/text/design-system-ui-7-expected.html:
  • fast/text/design-system-ui-7.html:
  • fast/text/design-system-ui-9-expected-mismatch.html:
  • fast/text/design-system-ui-9.html:
7:03 PM Changeset in webkit [252033] by Chris Dumez
  • 9 edits
    2 adds in trunk

MediaKeySession / WebKitMediaKeySession should not prevent entering the back/forward cache
https://bugs.webkit.org/show_bug.cgi?id=203089

Reviewed by Youenn Fablet.

Source/WebCore:

Port MediaKeySession / WebKitMediaKeySession to the HTML5 event loop instead of using its
own GenericEventQueue / GenericTaskQueue. Because the HTML5 event loop plays nicely with
the back/forward cache, we can now let pages using MediaKeySession / WebKitMediaKeySession
into the back/forward cache.

Test: http/tests/navigation/page-cache-mediakeysession.html

  • Modules/encryptedmedia/MediaKeySession.cpp:

(WebCore::MediaKeySession::MediaKeySession):
(WebCore::MediaKeySession::generateRequest):
(WebCore::MediaKeySession::load):
(WebCore::MediaKeySession::update):
(WebCore::MediaKeySession::close):
(WebCore::MediaKeySession::remove):
(WebCore::MediaKeySession::enqueueMessage):
(WebCore::MediaKeySession::updateKeyStatuses):
(WebCore::MediaKeySession::hasPendingActivity const):
(WebCore::MediaKeySession::activeDOMObjectName const):
(WebCore::MediaKeySession::enqueueTask):
(WebCore::MediaKeySession::enqueueEvent):
(WebCore::MediaKeySession::shouldPreventEnteringBackForwardCache_DEPRECATED const): Deleted.
(WebCore::MediaKeySession::stop): Deleted.

  • Modules/encryptedmedia/MediaKeySession.h:
  • Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:

(WebCore::WebKitMediaKeySession::WebKitMediaKeySession):
(WebCore::WebKitMediaKeySession::~WebKitMediaKeySession):
(WebCore::WebKitMediaKeySession::addKeyTimerFired):
(WebCore::WebKitMediaKeySession::sendMessage):
(WebCore::WebKitMediaKeySession::sendError):
(WebCore::WebKitMediaKeySession::hasPendingActivity const):
(WebCore::WebKitMediaKeySession::enqueueEvent):
(WebCore::WebKitMediaKeySession::shouldPreventEnteringBackForwardCache_DEPRECATED const): Deleted.

  • Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:

LayoutTests:

Add layout test coverage.

  • http/tests/navigation/page-cache-mediakeysession-expected.txt: Added.
  • http/tests/navigation/page-cache-mediakeysession.html: Added.
6:52 PM Changeset in webkit [252032] by ysuzuki@apple.com
  • 34 edits
    1 move
    1 add
    1 delete in trunk

[JSC] Introduce LinkTimeConstant mechanism
https://bugs.webkit.org/show_bug.cgi?id=153792

Reviewed by Saam Barati.

Source/JavaScriptCore:

We are using private-name-variables of JSGlobalObject as a way to access to constants that are materialized per JSGlobalObject.
And we also have special-pointers and old link-time-constants to access to per JSGlobalObject constants.
We have bytecode intrinsic constants, but it is only available for per VM values.

However, these ones have multiple problems.

  1. private-name-variables is too costly. We need to have an entry in JSGlobalObject's variable, this makes SymbolTable of JSGlobalObject large. It also requires WatchpointSet to make it constant-fold in DFG. And accessing these variables from builtin JS takes op_resolve_scope and op_get_from_scope, enlarging bytecode and slow in interpreter and baseline compared to just getting them as a constant register.
  2. special-pointers are tailored to op_jne_ptr opcode, and not usable in the other bytecode since this is completely separate from VirtualRegister.
  3. Old link-time-constants implementation is putting array of all link-time-constants on each UnlinkedCodeBlock, even if it is not used. If you increase # of link-time-constant, it increases sizeof(UnlinkedCodeBlock).

In this patch, we introduce a new link-time-constant mechanism and remove the above old ones mostly. (private-name-variables still exists for WebCore and @assert).
We manage link-time-constants in BytecodeIntrinsicRegistry, and emit Int32:LinkTimeConstantID constant when generating an UnlinkedCodeBlock. Later, this constant
is alternated to an actual value when we link UnlinkedCodeBlock to CodeBlock with specific JSGlobalObject. private-name-variables accesses are now converted to
constant register so that it is very efficiently accessed and it reduces memory used for SymbolTable and WatchpointSet. op_jne_ptr takes link-time-constant
VirtualRegisters instead of special-pointers, so that we can remove special-pointers mechanism. We also replace old link-time-constants with new one, which reduces
sizeof(UnlinkedCodeBlock).

Furthermore, new link-time-constant supports lazy initialization by using LazyProperty in JSGlobalObject. This allows us to lazily generate many internal functions
that are previously initialized eagerly. This reduces # of allocated JSFunction significantly when initializing JSGlobalObject.

This patch also manually adds 256 to MarkedSpace's size-class. We empirically know that adding 256 here makes sequence of size-class better for memory consumption.
But this was achieved by adding sizeof(UnlinkedFunctionCodeBlock). Now sizeof(UnlinkedFunctionCodeBlock) is changed by this patch, and this patch unintentionally
breaks that sequence. We should explicitly add 256 instead of adding sizeof(UnlinkedFunctionCodeBlock) adhocly.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Scripts/wkbuiltins/builtins_generate_combined_header.py:

(generate_section_for_global_private_code_name_macro):

  • Sources.txt:
  • builtins/BuiltinNames.h:
  • builtins/PromiseConstructor.js:

(nakedConstructor.Promise):
(nakedConstructor.InternalPromise):
(nakedConstructor.Promise.reject): Deleted.
(nakedConstructor.InternalPromise.reject): Deleted.

  • bytecode/BytecodeDumper.cpp:

(JSC::CodeBlockBytecodeDumper<Block>::dumpConstants):

  • bytecode/BytecodeIntrinsicRegistry.cpp:

(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):
(JSC::BytecodeIntrinsicRegistry::lookup const):

  • bytecode/BytecodeIntrinsicRegistry.h:

(JSC::BytecodeIntrinsicRegistry::Entry::Entry):
(JSC::BytecodeIntrinsicRegistry::Entry::type const):
(JSC::BytecodeIntrinsicRegistry::Entry::linkTimeConstant const):
(JSC::BytecodeIntrinsicRegistry::Entry::emitter const):

  • bytecode/BytecodeList.rb:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::setConstantRegisters):

  • bytecode/Fits.h:
  • bytecode/LinkTimeConstant.cpp: Renamed from Source/JavaScriptCore/bytecode/SpecialPointer.h.

(WTF::printInternal):

  • bytecode/LinkTimeConstant.h: Added.
  • bytecode/SpecialPointer.cpp: Removed.
  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::addConstant):
(JSC::UnlinkedCodeBlock::registerIndexForLinkTimeConstant): Deleted.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
(JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
(JSC::BytecodeGenerator::emitExpectedFunctionSnippet):
(JSC::BytecodeGenerator::emitCallDefineProperty):
(JSC::BytecodeGenerator::emitGetAsyncIterator):

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::ImportNode::emitBytecode):
(JSC::BytecodeIntrinsicNode::emitBytecode):
(JSC::promiseInternalFieldIndex):
(JSC::generatorInternalFieldIndex):
(JSC::asyncGeneratorInternalFieldIndex):
(JSC::FunctionNode::emitBytecode):
(JSC::ObjectPatternNode::bindValue const):
(JSC::ObjectSpreadExpressionNode::emitBytecode):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • heap/MarkedSpace.cpp:
  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_jneq_ptr):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_jneq_ptr):

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • parser/ASTBuilder.h:

(JSC::ASTBuilder::createResolve):
(JSC::ASTBuilder::makeFunctionCallNode):

  • parser/NodeConstructors.h:

(JSC::BytecodeIntrinsicNode::BytecodeIntrinsicNode):

  • parser/Nodes.h:
  • runtime/CachedTypes.cpp:

(JSC::CachedCodeBlock<CodeBlockType>::decode const):
(JSC::CachedCodeBlock<CodeBlockType>::encode):

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

(JSC::JSGlobalObject::JSGlobalObject):
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::linkTimeConstant const):
(JSC::JSGlobalObject::callFunction const): Deleted.
(JSC::JSGlobalObject::applyFunction const): Deleted.
(JSC::JSGlobalObject::throwTypeErrorFunction const): Deleted.
(JSC::JSGlobalObject::newPromiseCapabilityFunction const): Deleted.
(JSC::JSGlobalObject::resolvePromiseFunction const): Deleted.
(JSC::JSGlobalObject::rejectPromiseFunction const): Deleted.
(JSC::JSGlobalObject::promiseProtoThenFunction const): Deleted.
(JSC::JSGlobalObject::regExpProtoExecFunction const): Deleted.
(JSC::JSGlobalObject::regExpProtoGlobalGetter const): Deleted.
(JSC::JSGlobalObject::regExpProtoUnicodeGetter const): Deleted.
(JSC::JSGlobalObject::actualPointerFor): Deleted.
(JSC::JSGlobalObject::jsCellForLinkTimeConstant): Deleted.

  • runtime/JSGlobalObjectInlines.h:

(JSC::JSGlobalObject::throwTypeErrorFunction const):
(JSC::JSGlobalObject::newPromiseCapabilityFunction const):
(JSC::JSGlobalObject::resolvePromiseFunction const):
(JSC::JSGlobalObject::rejectPromiseFunction const):
(JSC::JSGlobalObject::promiseProtoThenFunction const):
(JSC::JSGlobalObject::regExpProtoExecFunction const):
(JSC::JSGlobalObject::regExpProtoGlobalGetter const):
(JSC::JSGlobalObject::regExpProtoUnicodeGetter const):

LayoutTests:

  • inspector/debugger/tail-deleted-frames/tail-deleted-frames-this-value-expected.txt:
6:44 PM Changeset in webkit [252031] by Jonathan Bedard
  • 2 edits in trunk/Tools

webkitpy: Build ImageDiff if it is missing
https://bugs.webkit.org/show_bug.cgi?id=183422

Reviewed by Alexey Proskuryakov.

ImageDiff is built with a different SDK than the rest of the WebKit
stack, and this frequently causes infrastructure failures where ImageDiff
is missing on testers. To address this, we should automatically build
ImageDiff if it is missing.

  • Scripts/webkitpy/port/base.py:

(Port.check_build): Unconditionally build ImageDiff if it is missing.
(Port.check_image_diff): Use _build_path since _path_to_image_diff will
attempt to use a back-up location.
(Port._path_to_image_diff): If the provided path to ImageDiff does not
exist, use the path of the one we built.

4:54 PM Changeset in webkit [252030] by Ross Kirsling
  • 19 edits in trunk/Source

Unreviewed fix for non-unified build.

Source/JavaScriptCore:

  • jit/JITOperations.cpp:
  • runtime/CommonSlowPaths.cpp:

Add missing includes.

Source/WebCore:

  • style/PropertyCascade.cpp:

(WebCore::Style::isValidVisitedLinkProperty): Deleted.

  • style/PropertyCascade.h:

(WebCore::Style::isValidVisitedLinkProperty): Added.
This is being used from StyleBuilder.cpp; it can't just be static inline in a .cpp file.

  • Modules/cache/DOMCacheStorage.cpp:
  • css/DOMCSSRegisterCustomProperty.cpp:
  • inspector/InspectorInstrumentation.cpp:
  • style/StyleBuilder.cpp:
  • style/StyleBuilderState.cpp:
  • workers/service/ServiceWorkerProvider.cpp:
  • worklets/WorkletGlobalScope.h:

Add missing includes.

Source/WebKit:

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
  • NetworkProcess/NetworkResourceLoader.cpp:
  • Shared/ServiceWorkerInitializationData.cpp:
  • UIProcess/API/APIAttachment.cpp:
  • WebProcess/Storage/WebServiceWorkerProvider.h:

Add missing includes.

4:33 PM Changeset in webkit [252029] by Alan Coon
  • 11 edits in branches/safari-608-branch

Apply patch. rdar://problem/56864381

4:30 PM Changeset in webkit [252028] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed attempt to fix wincairo build after r252016.

  • css/FontFaceSet.h:
4:26 PM Changeset in webkit [252027] by yurys@chromium.org
  • 3 edits in trunk/LayoutTests

[GTK] Inspector protocol tests timing out on the bots
https://bugs.webkit.org/show_bug.cgi?id=122571

Reviewed by Devin Rousso.

Mark more inspector tests as passing on GTK.

  • inspector/dom/focus.html: Remove 'focus' event listener before closing dummy inspector

window. Otherwise it triggers a WebPage::setActivityState which in turn triggers focus
event on the page and on the focused element which results in two extra 'focus' lines printed.
To be clear this only avoids the extra text output that could be added to the output. Timeout
and crash problems must have been fixed before (likely by the recent changes in local inspector
client).

  • platform/gtk/TestExpectations:
4:18 PM Changeset in webkit [252026] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: "Toggle Visibility" does not work for element inside Shadow DOM
https://bugs.webkit.org/show_bug.cgi?id=202218
<rdar://problem/55713078>

Reviewed by Brian Burg.

  • UserInterface/Views/DOMTreeElement.js:

(WI.DOMTreeElement.prototype.toggleElementVisibility.inspectedPage_node_injectStyleAndToggleClass):
If the node is inside a shadow tree, store the <style> inside the shadow root instead of
always using document.head.

4:09 PM Changeset in webkit [252025] by Alan Coon
  • 7 edits in branches/safari-608-branch/Source

Versioning.

3:57 PM Changeset in webkit [252024] by sbarati@apple.com
  • 13 edits
    2 adds in trunk

Don't use memmove/memcpy/memset for memory that can be scanned concurrently
https://bugs.webkit.org/show_bug.cgi?id=203228
<rdar://problem/56401852>

Reviewed by Robin Morisset.

JSTests:

  • stress/torn-js-value-concurrent-collector.js: Added.

(foo):

Source/JavaScriptCore:

We had code inside various places of the runtime which would call into system
memcpy/memmove/memset when updating a live butterfly. This means that the
concurrent collector could be scanning such butterflies while a memcpy/memmove/memset
was running. Those functions don't guarantee anything about the minimum
alignment of the stores they do. And implementations for them frequently have
byte copy loops for low byte copy counts. This lead to us seeing torn JSValues
inside the concurrent collector during Array.prototype.splice. This patch
introduces new functions for doing memcpy/memmove/memset for data structures
which may be concurrently scanned. The loops are written using inline assembly
for gcc compatible compilers on 64 bit platforms. The inline assembly
ensures we never write to memory using instructions that store fewer
than 8 bytes. On other platforms, we just use a volatile pointer to
ensure the compiler doesn't turn the loop into a function call or a
series of stores which may be smaller than 8 bytes.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • heap/GCMemoryOperations.h: Added.

(JSC::gcSafeMemcpy):
(JSC::gcSafeMemmove):
(JSC::gcSafeZeroMemory):

  • heap/Heap.h:
  • runtime/ArrayConventions.cpp:

(JSC::clearArrayMemset):

  • runtime/ArrayPrototype.cpp:

(JSC::copyElements):

  • runtime/ButterflyInlines.h:

(JSC::Butterfly::tryCreate):
(JSC::Butterfly::createOrGrowPropertyStorage):
(JSC::Butterfly::growArrayRight):
(JSC::Butterfly::reallocArrayRightIfPossible):
(JSC::Butterfly::resizeArray):
(JSC::Butterfly::unshift):
(JSC::Butterfly::shift):

  • runtime/JSArray.cpp:

(JSC::JSArray::unshiftCountSlowCase):
(JSC::JSArray::appendMemcpy):
(JSC::JSArray::fastSlice):
(JSC::JSArray::shiftCountWithArrayStorage):
(JSC::JSArray::shiftCountWithAnyIndexingType):
(JSC::JSArray::unshiftCountWithArrayStorage):

  • runtime/JSObject.cpp:

(JSC::JSObject::constructConvertedArrayStorageWithoutCopyingElements):
(JSC::JSObject::convertFromCopyOnWrite):
(JSC::JSObject::shiftButterflyAfterFlattening):

  • runtime/JSObject.h:
  • runtime/RegExpMatchesArray.h:

(JSC::createRegExpMatchesArray):

  • runtime/Structure.cpp:

(JSC::Structure::flattenDictionaryStructure):

3:55 PM Changeset in webkit [252023] by dbates@webkit.org
  • 5 edits
    2 adds in trunk/Tools

Add Googletest assertion support for CGRect and NSRect
https://bugs.webkit.org/show_bug.cgi?id=203817

Reviewed by Myles C. Maxfield.

Add operator== and operator<< overloads for CGRect and NSRect so that these types can be
passed to EXPECT_EQ() and other Googletest assertions.

To make use of these overloads Cocoa tests should include #import "TestCocoa.h" instead of
"Test.h". TestCocoa.h imports Test.h. With these overloads an assertion like this:

EXPECT_EQ(CGRectMake(0, 0, 23, 24), rects[0].CGRectValue);

will produce output like this when it fails:

Expected equality of these values:

CGRectMake(138, 0, 23, 24)

Which is: (origin = (x = 138, y = 0), size = (width = 23, height = 24))

rects.firstObject.CGRectValue

Which is: (origin = (x = 96, y = 0), size = (width = 16, height = 17))

  • TestWebKitAPI/SourcesCocoa.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

Add source files.

  • TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm:

Write in terms of EXPECT_EQ() now that it just works when passed CGRects.

  • TestWebKitAPI/cocoa/TestCocoa.h: Added.
  • TestWebKitAPI/cocoa/TestCocoa.mm: Added.

(ostreamRectCommon):
(operator<<):
(operator==):

3:48 PM Changeset in webkit [252022] by Wenson Hsieh
  • 4 edits in trunk/Source/WebCore

REGRESSION (r248750): Drop-down menu for Walgreens 2FA unresponsive to touch
https://bugs.webkit.org/show_bug.cgi?id=203821
<rdar://problem/56550488>

Reviewed by Zalan Bujtas.

The dropdown in question in the Walgreens app uses UIWebView. In this report, tapping the dropdown menu (which
installs DOMTimers upon touchstart) no longer dispatches a click event. This reproduces in WebKit1, but not in
WebKit2.

After r248750, we no longer transition from IndeterminateChange to NoChange before calling out to the client
layer to report a deferred content observation change (in legacy WebKit, this is a call to the delegate method
-webView:didObserveDeferredContentChange:forFrame:).

In WebKit2, logic in WebPage::handleSyntheticClick handles indeterminate content changes after dispatching
mousemove by starting a fixed 32ms content observation timer, after the end of which we transition from
indeterminate to either NoChange or VisibilityChange, and call out to the client. This logic is absent in
WebKitLegacy, where we directly report the current content observation state to the client.

As such, the content change is still indeterminate when we finally call out to the client layer in the runloop
after dispatching the mousemove event in EventHandler::mouseMoved(). Client code in UIKit does not expect this,
and assumes that the given WKContentChange must either be NoChange or VisibilityChange; thus, it handles
indeterminate change as VisibilityChange and does not dispatch a click.

This legacy-WebKit-specific call to didFinishContentChangeObserving is intended to act as a failsafe to stop
content observation after mousemove, if any active timers scheduled during touchstart have already finished
executing. To fix this bug, instead of calling out to WebChromeClient::didFinishContentChangeObserving directly,
add a new method to ContentChangeObserver to inform it that a mousemove event has been handled; here, we call
notifyClientIfNeeded, which will transition the content change state from indeterminate to NoChange if needed
before calling out to the client.

No new test, because we don't have any mechanism for simulating user interaction in UIWebView (and inventing one
at this stage would have diminishing returns at best).

  • page/ios/ContentChangeObserver.cpp:

(WebCore::ContentChangeObserver::willNotProceedWithFixedObservationTimeWindow):
(WebCore::ContentChangeObserver::adjustObservedState):

  • page/ios/ContentChangeObserver.h:
  • page/ios/EventHandlerIOS.mm:

(WebCore::EventHandler::mouseMoved):

Replace the call to WebChromeClient::didFinishContentChangeObserving with a ContentChangeObserver method that
turns around and calls into notifyClientIfNeeded, via ContentChangeObserver::adjustObservedState.

3:47 PM Changeset in webkit [252021] by Truitt Savell
  • 46 edits in trunk/Source/JavaScriptCore

Unreviewed, rolling out r252015.

Broke the Windows build

Reverted changeset:

"Split ArithProfile into a Unary and a Binary version"
https://bugs.webkit.org/show_bug.cgi?id=202832
https://trac.webkit.org/changeset/252015

3:31 PM Changeset in webkit [252020] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

Fix crash caused by syscall sandbox violation
https://bugs.webkit.org/show_bug.cgi?id=203826
<rdar://problem/56332491>

Reviewed by Brent Fulgham.

A new syscall needs to be allowed in the WebContent process' sandbox.

  • WebProcess/com.apple.WebProcess.sb.in:
3:29 PM Changeset in webkit [252019] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Set isn't correct with respect to the spec and Proxy
https://bugs.webkit.org/show_bug.cgi?id=155012

Patch by Alexey Shvayka <Alexey Shvayka> on 2019-11-04
Reviewed by Saam Barati.

This patch merely removes a FIXME comment, as JavaScriptCore has already correct
implementation of ordinary Set. In step 2.b of https://tc39.es/ecma262/#sec-ordinarysetwithowndescriptor,
if parent is a Proxy, the algorithm returns result of Proxy's Set method call.
It is up to the author of "set" trap (if any) to consult the prototype chain.

All browsers pass https://test262.report/browse/built-ins/Proxy/set/call-parameters-prototype.js,
which asserts that no traps besides "set" are invoked on Proxies in prototype chain during Set.

  • runtime/JSObject.cpp:

(JSC::JSObject::putInlineSlow):

3:25 PM Changeset in webkit [252018] by Alan Coon
  • 1 copy in tags/Safari-608.4.8

Tag Safari-608.4.8.

3:06 PM Changeset in webkit [252017] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews] Status bubble should be white for CANCELLED builds
https://bugs.webkit.org/show_bug.cgi?id=201204

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
2:57 PM Changeset in webkit [252016] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

Port FontFaceSet to the HTML5 event loop
https://bugs.webkit.org/show_bug.cgi?id=203769

Reviewed by Ryosuke Niwa.

  • css/FontFaceSet.cpp:

(WebCore::FontFaceSet::didFirstLayout):
(WebCore::FontFaceSet::completedLoading):
(WebCore::FontFaceSet::faceFinished):
(WebCore::FontFaceSet::enqueueTask):

  • css/FontFaceSet.h:
  • dom/AbstractEventLoop.h:
2:20 PM Changeset in webkit [252015] by rmorisset@apple.com
  • 46 edits in trunk/Source/JavaScriptCore

Split ArithProfile into a Unary and a Binary version
https://bugs.webkit.org/show_bug.cgi?id=202832
<rdar://problem/56266847>

Reviewed by Keith Miller.

ArithProfile was for a long time only used for add/sub/mul/div, but recently it started being used for negate. And it will soon also have to be used for inc and dec due to BigInt.
So in this patch I make a separate version that only has the data for a single argument, and thus takes half as much memory.

After discussing this change with Phil I realized that the ResultType(s) that were taking space in ArithProfile are not needed: they never change and a copy is already in the bytecode instruction itself.
Removing them allowed shrinking both kinds of ArithProfile to fit in 16 bits (9 and 13 respectively).
I kept the two kinds separate because they may shrink or grow independently in the future.

This also required adding the "orh" instruction to the offline assembler, to set bits in the ArithProfile.
This in turn motivated the addition of "storeh", as on RISC platforms "orh" on a memory location is actually loadh -> orh -> storeh.

  • bytecode/ArithProfile.cpp:

(JSC::ArithProfile<BitfieldType>::emitObserveResult):
(JSC::ArithProfile<BitfieldType>::shouldEmitSetDouble const):
(JSC::ArithProfile<BitfieldType>::emitSetDouble const):
(JSC::ArithProfile<BitfieldType>::shouldEmitSetNonNumeric const):
(JSC::ArithProfile<BitfieldType>::shouldEmitSetBigInt const):
(JSC::ArithProfile<BitfieldType>::emitSetNonNumeric const):
(JSC::ArithProfile<BitfieldType>::emitSetBigInt const):
(WTF::printInternal):

  • bytecode/ArithProfile.h:

(JSC::ArithProfile::didObserveNonInt32 const):
(JSC::ArithProfile::didObserveDouble const):
(JSC::ArithProfile::didObserveNonNegZeroDouble const):
(JSC::ArithProfile::didObserveNegZeroDouble const):
(JSC::ArithProfile::didObserveNonNumeric const):
(JSC::ArithProfile::didObserveBigInt const):
(JSC::ArithProfile::didObserveInt32Overflow const):
(JSC::ArithProfile::didObserveInt52Overflow const):
(JSC::ArithProfile::setObservedNonNegZeroDouble):
(JSC::ArithProfile::setObservedNegZeroDouble):
(JSC::ArithProfile::setObservedNonNumeric):
(JSC::ArithProfile::setObservedBigInt):
(JSC::ArithProfile::setObservedInt32Overflow):
(JSC::ArithProfile::setObservedInt52Overflow):
(JSC::ArithProfile::observeResult):
(JSC::ArithProfile::addressOfBits const):
(JSC::ArithProfile::bits const):
(JSC::ArithProfile::ArithProfile):
(JSC::ArithProfile::hasBits const):
(JSC::ArithProfile::setBit):
(JSC::UnaryArithProfile::UnaryArithProfile):
(JSC::UnaryArithProfile::observedIntBits):
(JSC::UnaryArithProfile::observedNumberBits):
(JSC::UnaryArithProfile::argObservedType const):
(JSC::UnaryArithProfile::setArgObservedType):
(JSC::UnaryArithProfile::argSawInt32):
(JSC::UnaryArithProfile::argSawNumber):
(JSC::UnaryArithProfile::argSawNonNumber):
(JSC::UnaryArithProfile::observeArg):
(JSC::UnaryArithProfile::isObservedTypeEmpty):
(JSC::BinaryArithProfile::BinaryArithProfile):
(JSC::BinaryArithProfile::observedIntIntBits):
(JSC::BinaryArithProfile::observedNumberIntBits):
(JSC::BinaryArithProfile::observedIntNumberBits):
(JSC::BinaryArithProfile::observedNumberNumberBits):
(JSC::BinaryArithProfile::setLhsObservedType):
(JSC::BinaryArithProfile::setRhsObservedType):
(JSC::BinaryArithProfile::observeLHS):
(JSC::BinaryArithProfile::observeLHSAndRHS):
(JSC::BinaryArithProfile::isObservedTypeEmpty):

  • bytecode/BytecodeList.rb:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::addJITAddIC):
(JSC::CodeBlock::addJITMulIC):
(JSC::CodeBlock::addJITSubIC):
(JSC::CodeBlock::addJITNegIC):
(JSC::CodeBlock::binaryArithProfileForBytecodeOffset):
(JSC::CodeBlock::unaryArithProfileForBytecodeOffset):
(JSC::CodeBlock::binaryArithProfileForPC):
(JSC::CodeBlock::unaryArithProfileForPC):
(JSC::CodeBlock::couldTakeSpecialFastCase):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::addMathIC):

  • bytecode/Fits.h:
  • bytecode/MethodOfGettingAValueProfile.cpp:

(JSC::MethodOfGettingAValueProfile::emitReportValue const):
(JSC::MethodOfGettingAValueProfile::reportValue):

  • bytecode/MethodOfGettingAValueProfile.h:

(JSC::MethodOfGettingAValueProfile::MethodOfGettingAValueProfile):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitUnaryOp):

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::UnaryOpNode::emitBytecode):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::makeSafe):
(JSC::DFG::ByteCodeParser::makeDivSafe):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::methodOfGettingAValueProfileFor):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileValueAdd):
(JSC::DFG::SpeculativeJIT::compileValueSub):
(JSC::DFG::SpeculativeJIT::compileValueNegate):
(JSC::DFG::SpeculativeJIT::compileValueMul):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileValueAdd):
(JSC::FTL::DFG::LowerDFGToB3::compileValueSub):
(JSC::FTL::DFG::LowerDFGToB3::compileValueMul):
(JSC::FTL::DFG::LowerDFGToB3::compileUnaryMathIC):
(JSC::FTL::DFG::LowerDFGToB3::compileBinaryMathIC):
(JSC::FTL::DFG::LowerDFGToB3::compileArithAddOrSub):
(JSC::FTL::DFG::LowerDFGToB3::compileValueNegate):

  • jit/JIT.h:
  • jit/JITAddGenerator.cpp:

(JSC::JITAddGenerator::generateInline):
(JSC::JITAddGenerator::generateFastPath):

  • jit/JITAddGenerator.h:
  • jit/JITArithmetic.cpp:

(JSC::JIT::emit_op_negate):
(JSC::JIT::emit_op_add):
(JSC::JIT::emitMathICFast):
(JSC::JIT::emitMathICSlow):
(JSC::JIT::emit_op_div):
(JSC::JIT::emit_op_mul):
(JSC::JIT::emit_op_sub):

  • jit/JITDivGenerator.cpp:

(JSC::JITDivGenerator::generateFastPath):

  • jit/JITDivGenerator.h:

(JSC::JITDivGenerator::JITDivGenerator):

  • jit/JITInlines.h:

(JSC::JIT::copiedArithProfile):

  • jit/JITMathIC.h:

(JSC::JITMathIC::JITMathIC):
(JSC::JITMathIC::generateInline):
(JSC::JITMathIC::arithProfile const):
(JSC::isBinaryProfileEmpty):
(JSC::JITBinaryMathIC::JITBinaryMathIC):
(JSC::isUnaryProfileEmpty):
(JSC::JITUnaryMathIC::JITUnaryMathIC):

  • jit/JITMulGenerator.cpp:

(JSC::JITMulGenerator::generateInline):
(JSC::JITMulGenerator::generateFastPath):

  • jit/JITMulGenerator.h:
  • jit/JITNegGenerator.cpp:

(JSC::JITNegGenerator::generateInline):
(JSC::JITNegGenerator::generateFastPath):

  • jit/JITNegGenerator.h:
  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • jit/JITSubGenerator.cpp:

(JSC::JITSubGenerator::generateInline):
(JSC::JITSubGenerator::generateFastPath):

  • jit/JITSubGenerator.h:
  • llint/LLIntData.cpp:

(JSC::LLInt::Data::performAssertions):

  • llint/LLIntOffsetsExtractor.cpp:

(JSC::LLIntOffsetsExtractor::dummy):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • parser/ResultType.h:

(JSC::ResultType::ResultType):

  • runtime/CommonSlowPaths.cpp:

(JSC::updateArithProfileForUnaryArithOp):
(JSC::updateArithProfileForBinaryArithOp):
(JSC::SLOW_PATH_DECL):

2:13 PM Changeset in webkit [252014] by wilander@apple.com
  • 20 edits in trunk

Resource Load Statistics: Flush the shared ResourceLoadObserver when the webpage is closed by JavaScript
https://bugs.webkit.org/show_bug.cgi?id=203623
<rdar://problem/56756427>

Reviewed by Alex Christensen.

Source/WebCore:

New API test added.

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::shared):

Now returns its own empty observer if no shared one has been set.

  • loader/ResourceLoadObserver.h:

(WebCore::ResourceLoadObserver::logSubresourceLoadingForTesting):

Test function to seed the web process' observer.

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::close):

Now flushes the shared observer.

Source/WebKit:

This patch adds flushing of pending statistics when a window is closed by JavaScript,
when a webpage is removed from the web process, and when the web process prepares to
suspend.

New API test added.

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):

Now calls logTestingEvent() so that the test infrastructure can wait for updates.

  • UIProcess/API/Cocoa/WKProcessPool.mm:

(-[WKProcessPool _seedResourceLoadStatisticsForTestingWithFirstParty:thirdParty:shouldScheduleNotification:completionHandler:]):

Test infrastructure to seed every web process' WebCore::ResourceLoadObserver with test data.

  • UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _clearResourceLoadStatistics:]):
(-[WKWebsiteDataStore _isRegisteredAsSubresourceUnderFirstParty:thirdParty:completionHandler:]):

Test infrastructure.

  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::seedResourceLoadStatisticsForTesting):

Test infrastructure.

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

(WebKit::WebsiteDataStore::isRegisteredAsSubresourceUnder):

Made sure the completion handler is called even if there is no network process.

(WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):

Now tells all web processes to turn ITP on or off.

  • WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp:

(WebKit::WebResourceLoadObserver::~WebResourceLoadObserver):
(WebKit::WebResourceLoadObserver::logSubresourceLoadingForTesting):

Test infrastructure to seed the observer with test data.

  • WebProcess/WebCoreSupport/WebResourceLoadObserver.h:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::setWebsiteDataStoreParameters):

Now checks whether a shared observer already exists before setting one.

(WebKit::WebProcess::removeWebPage):
(WebKit::WebProcess::prepareToSuspend):

These two functions now call WebProcess::flushResourceLoadStatistics().

(WebKit::WebProcess::setResourceLoadStatisticsEnabled):

This function now sets the process' shared WebCore::ResourceLoadObserver if none exists.

(WebKit::WebProcess::flushResourceLoadStatistics):

This function tells the shared WebCore::ResourceLoadObserver to send any pending
statistics to the central ITP store.

(WebKit::WebProcess::seedResourceLoadStatisticsForTesting):

Test infrastructure to seed the shared observer with test data.

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

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:

(TEST):

1:55 PM Changeset in webkit [252013] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Collect all documents before iterating in Page::forEachDocument
https://bugs.webkit.org/show_bug.cgi?id=203811
<rdar://problem/56832747>

Patch by Alex Christensen <achristensen@webkit.org> on 2019-11-04
Reviewed by Ryosuke Niwa.

Some calls to forEachDocument, notably those introduced in r251930, can mutate the frames and documents as they are being iterated.
This causes problems that can be avoided by iterating, keeping all Documents referenced, then iterating the referenced Documents.

  • page/Page.cpp:

(WebCore::Page::forEachDocument):

1:49 PM Changeset in webkit [252012] by Wenson Hsieh
  • 4 edits
    2 adds in trunk/Tools

Consolidate forEachViewInHierarchy and findAllViewsInHierarchyOfType into common helper file
https://bugs.webkit.org/show_bug.cgi?id=203777

Reviewed by Tim Horton.

  • TestRunnerShared/cocoa/PlatformViewHelpers.h: Added.
  • TestRunnerShared/cocoa/PlatformViewHelpers.mm: Added.

Add a new Cocoa helper file, PlatformViewHelpers, to make it easier to traverse platform view hierarchies
(NSView and UIView) for testing purposes. This is minor refactoring, before I try to create some new testing
primitives to make webkit.org/b/203116 testable.

(forEachViewInHierarchy):

  • WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
  • WebKitTestRunner/ios/UIScriptControllerIOS.h:
  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptControllerIOS::findEditableImageCanvas const):
(WTR::forEachViewInHierarchy): Deleted.
(WTR::findEditableImageCanvas): Deleted.

1:36 PM Changeset in webkit [252011] by Chris Dumez
  • 16 edits in trunk/Source/WebKit

[iOS][WK2] Simplify process assertion handling for the network process and service worker processes
https://bugs.webkit.org/show_bug.cgi?id=203633

Reviewed by Alex Christensen.

Simplify process assertion handling for the network process and service worker processes.
In particular, the following changes were made:

  1. Put the NetworkProcessProxy in charge of keeping the network process runnable instead of relying on the WebProcessPool to do it.
  2. Put the WebProcessProxy in charge of keeping the web process runnable due to service worker activity, instead of relying on the WebProcessPool to do it.
  3. Introduce a new Variant data type which can store a foreground activity, a background activity or no activity. This avoid having 2 separate and mutually-exclusive data members for foreground and background activities.
  4. The new code is a bit more correct because it makes sure the the activity we're holding is valid, instead of simply checking that it has an activity. This means that if the process assertion was previously invalidated, we will now properly take a new activity, which will re-take a process assertion.

This patch also reduces the #ifdefing for IOS_FAMILY, since ProcessThrottler and
ProcessAssertion exist on all platforms.

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::updateProcessAssertion):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/ProcessThrottler.cpp:

(WebKit::ProcessThrottler::isValidBackgroundActivity):
(WebKit::ProcessThrottler::isValidForegroundActivity):

  • UIProcess/ProcessThrottler.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::m_backgroundWebProcessCounter):
(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::networkProcessCrashed):
(WebKit::WebProcessPool::establishWorkerContextConnectionToNetworkProcess):
(WebKit::WebProcessPool::disconnectProcess):
(WebKit::WebProcessPool::terminateNetworkProcess):
(WebKit::WebProcessPool::updateProcessAssertions):

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::didSetAssertionState):
(WebKit::WebProcessProxy::updateServiceWorkerProcessAssertion):
(WebKit::WebProcessProxy::enableServiceWorkers):

  • UIProcess/WebProcessProxy.h:

(WebKit::WebProcessProxy::isStandaloneServiceWorkerProcess const):

1:21 PM Changeset in webkit [252010] by Alan Coon
  • 28 edits in branches/safari-608-branch

Cherry-pick r248552. rdar://problem/56868427

Replace multiparameter overloads of append() in StringBuilder as a first step toward standardizinging on the flexibleAppend() implementation
https://bugs.webkit.org/show_bug.cgi?id=200614

Reviewed by Darin Adler.

Renames StringBuilder::append(const LChar*, unsigned), StringBuilder::append(const UChar*, unsigned) and
StringBuilder::append(const char*, unsigned) to StringBuilder::appendCharacters(...).

Renames StringBuilder::append(const String& string, unsigned offset, unsigned length) to
StringBuilder::appendSubstring(...).

Source/JavaScriptCore:

  • dfg/DFGStrengthReductionPhase.cpp: (JSC::DFG::StrengthReductionPhase::handleNode):
  • runtime/ConfigFile.cpp: (JSC::ConfigFile::parse):
  • runtime/LiteralParser.cpp: (JSC::LiteralParser<CharType>::Lexer::lexStringSlow):
  • tools/FunctionOverrides.cpp: (JSC::parseClause): Update for renames.

Source/WebCore:

  • dom/Range.cpp: (WebCore::Range::toString const):
  • editing/Editing.cpp: (WebCore::stringWithRebalancedWhitespace):
  • editing/MarkupAccumulator.cpp: (WebCore::appendCharactersReplacingEntitiesInternal):
  • editing/TextIterator.cpp: (WebCore::TextIteratorCopyableText::appendToStringBuilder const):
  • html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks const):
  • html/parser/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::bufferedCharacters const):
  • platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: (WebCore::InbandTextTrackPrivateAVF::processNativeSamples):
  • platform/text/SegmentedString.cpp: (WebCore::SegmentedString::Substring::appendTo const):
  • platform/text/TextCodecICU.cpp: (WebCore::TextCodecICU::decode):
  • xml/XSLTProcessorLibxslt.cpp: (WebCore::writeToStringBuilder): Update for renames.

Source/WebKit:

  • Shared/mac/AuxiliaryProcessMac.mm: (WebKit::setAndSerializeSandboxParameters):
  • UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::didReceiveInvalidMessage): Update for renames.

Source/WTF:

  • wtf/HexNumber.h: (WTF::appendUnsignedAsHexFixedSize): Add overload that explicitly takes a StringBuilder to work around rename from append to appendCharacters.
  • wtf/text/StringBuilder.cpp: (WTF::StringBuilder::appendCharacters): (WTF::StringBuilder::append):
  • wtf/text/StringBuilder.h: (WTF::StringBuilder::appendCharacters): (WTF::StringBuilder::append): (WTF::StringBuilder::appendSubstring): (WTF::StringBuilder::appendLiteral): (WTF::IntegerToStringConversionTrait<StringBuilder>::flush): Update for renames.

Tools:

  • TestWebKitAPI/Tests/WTF/StringBuilder.cpp: (TestWebKitAPI::TEST): Update for renames.

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

12:59 PM Changeset in webkit [252009] by Oriol Brufau
  • 2 edits
    6 adds in trunk/LayoutTests/imported/w3c

[css-lists] Import parsing tests for list-style-type: <string>
https://bugs.webkit.org/show_bug.cgi?id=203807

Reviewed by Manuel Rego Casasnovas.

Import WPT tests.

  • resources/import-expectations.json:
  • web-platform-tests/css/css-lists/parsing/list-style-type-computed-expected.txt: Added.
  • web-platform-tests/css/css-lists/parsing/list-style-type-computed.html: Added.
  • web-platform-tests/css/css-lists/parsing/list-style-type-valid-expected.txt: Added.
  • web-platform-tests/css/css-lists/parsing/list-style-type-valid.html: Added.
  • web-platform-tests/css/css-lists/parsing/w3c-import.log: Added.
12:58 PM Changeset in webkit [252008] by Truitt Savell
  • 6 edits
    2 deletes in trunk

Unreviewed, rolling out r251993.

Broke platform/mac/media/encrypted-media/fps-
generateRequest.html on Mojave+

Reverted changeset:

"MediaKeySession / WebKitMediaKeySession should not prevent
entering the back/forward cache"
https://bugs.webkit.org/show_bug.cgi?id=203089
https://trac.webkit.org/changeset/251993

12:36 PM Changeset in webkit [252007] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Port WebAnimation to the HTML5 event loop
https://bugs.webkit.org/show_bug.cgi?id=203797

Reviewed by Ryosuke Niwa.

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::WebAnimation):
(WebCore::WebAnimation::enqueueAnimationPlaybackEvent):
(WebCore::WebAnimation::stop):
(WebCore::WebAnimation::hasPendingActivity const):

  • animation/WebAnimation.h:
11:23 AM Changeset in webkit [252006] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Surpress ASAN in SamplingProfiler's FrameWalker::resetAtMachineFrame().
https://bugs.webkit.org/show_bug.cgi?id=203819
<rdar://problem/56840002>

Reviewed by Saam Barati.

  • runtime/SamplingProfiler.cpp:

(JSC::FrameWalker::resetAtMachineFrame):

11:19 AM Changeset in webkit [252005] by Alan Coon
  • 2 edits in branches/safari-608-branch/Source/WebKit

Cherry-pick r251979. rdar://problem/56864383

[WebAuthn] CtapAuthenticator::tryDowngrade should distinguish requestData().options
https://bugs.webkit.org/show_bug.cgi?id=203771
<rdar://problem/56832618>

Reviewed by Brent Fulgham.

CtapAuthenticator::tryDowngrade assumes the request is a getAssertion request. This is true
for most cases but not for Google's registration. For Google's registration, a quirk is
implemented to use U2F commands for registration if GoogleLegacyAppIdSupportExtension asks
us to do so.

No tests given there is no way to simulate google.com in our test infrastructures.

  • UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp: (WebKit::CtapAuthenticator::tryDowngrade):

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

11:19 AM Changeset in webkit [252004] by Alan Coon
  • 4 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r251827. rdar://problem/56868427

Add fullscreen style quirk for reddit.com
https://bugs.webkit.org/show_bug.cgi?id=203635
<rdar://problem/55813774>

Reviewed by Eric Carlson.

Reddit.com expects the UA stylesheet to give the fullscreen element
a "width:100%; height:100%;" style.

  • css/CSSDefaultStyleSheets.cpp: (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
  • page/Quirks.cpp: (WebCore::Quirks::needsFullWidthHeightFullscreenStyleQuirk const):
  • page/Quirks.h:

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

10:56 AM Changeset in webkit [252003] by Chris Dumez
  • 5 edits
    2 adds in trunk

MediaRecorder should not prevent entering the back/forward cache
https://bugs.webkit.org/show_bug.cgi?id=203093
<rdar://problem/56748870>

Reviewed by Eric Carlson.

Source/WebCore:

Let pages using MediaRecorder enter the back/forward cache. On suspension, we
stop recording and we queue an error event which will get dispatched upon
resuming.

Test: fast/history/page-cache-media-recorder.html

  • Modules/mediarecorder/MediaRecorder.cpp:

(WebCore::MediaRecorder::document const):
(WebCore::MediaRecorder::suspend):
(WebCore::MediaRecorder::activeDOMObjectName const):
(WebCore::MediaRecorder::scheduleDeferredTask):
(WebCore::MediaRecorder::shouldPreventEnteringBackForwardCache_DEPRECATED const): Deleted.

  • Modules/mediarecorder/MediaRecorder.h:

LayoutTests:

Add layout test coverage.

  • fast/history/page-cache-media-recorder-expected.txt: Added.
  • fast/history/page-cache-media-recorder.html: Added.
10:46 AM Changeset in webkit [252002] by Alan Coon
  • 5 edits in tags/Safari-609.1.9

Cherry-pick r251991. rdar://problem/56795440

REGRESSION (r251623): When downloading a QuickLook file, the web view navigates to a "The URL can't be shown" error page instead of staying on the current page
https://bugs.webkit.org/show_bug.cgi?id=203790
<rdar://problem/56795440>

Reviewed by Alex Christensen.

Source/WebCore:

When a PreviewConverter fails updating due to a call to PreviewConverter::failedUpdating(),
we should not dispatch previewConverterDidFailUpdating. LegacyPreviewLoader handles that
callback by calling ResourceLoader::didFail() with a WebKitErrorCannotShowURL error code,
but when downloading or cancelling we must fail with a
WebKitErrorFrameLoadInterruptedByPolicyChange error code instead.

This patch teaches PreviewConverter to distinguish between internal updating errors and
external calls to failedUpdating(), only dispatching previewConverterDidFailUpdating in the
former case.

Updated QuickLook API tests.

  • platform/PreviewConverter.cpp: (WebCore::PreviewConverter::updateMainResource): (WebCore::PreviewConverter::failedUpdating): (WebCore::PreviewConverter::didFailUpdating):
  • platform/PreviewConverter.h:

Tools:

Tested that "download" and "cancel" policy decisions for QuickLook files result in a
provisional navigation failure with error code WebKitErrorFrameLoadInterruptedByPolicyChange.

  • TestWebKitAPI/Tests/WebKitCocoa/QuickLook.mm: (-[QuickLookDelegate navigationError]): (-[QuickLookDelegate _webView:didFailNavigation:withError:userInfo:]): (-[QuickLookDelegate webView:didFailProvisionalNavigation:withError:]): (TEST):

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

10:45 AM Changeset in webkit [252001] by Alan Coon
  • 5 edits in tags/Safari-609.1.10

Cherry-pick r251991. rdar://problem/56795440

REGRESSION (r251623): When downloading a QuickLook file, the web view navigates to a "The URL can't be shown" error page instead of staying on the current page
https://bugs.webkit.org/show_bug.cgi?id=203790
<rdar://problem/56795440>

Reviewed by Alex Christensen.

Source/WebCore:

When a PreviewConverter fails updating due to a call to PreviewConverter::failedUpdating(),
we should not dispatch previewConverterDidFailUpdating. LegacyPreviewLoader handles that
callback by calling ResourceLoader::didFail() with a WebKitErrorCannotShowURL error code,
but when downloading or cancelling we must fail with a
WebKitErrorFrameLoadInterruptedByPolicyChange error code instead.

This patch teaches PreviewConverter to distinguish between internal updating errors and
external calls to failedUpdating(), only dispatching previewConverterDidFailUpdating in the
former case.

Updated QuickLook API tests.

  • platform/PreviewConverter.cpp: (WebCore::PreviewConverter::updateMainResource): (WebCore::PreviewConverter::failedUpdating): (WebCore::PreviewConverter::didFailUpdating):
  • platform/PreviewConverter.h:

Tools:

Tested that "download" and "cancel" policy decisions for QuickLook files result in a
provisional navigation failure with error code WebKitErrorFrameLoadInterruptedByPolicyChange.

  • TestWebKitAPI/Tests/WebKitCocoa/QuickLook.mm: (-[QuickLookDelegate navigationError]): (-[QuickLookDelegate _webView:didFailNavigation:withError:userInfo:]): (-[QuickLookDelegate webView:didFailProvisionalNavigation:withError:]): (TEST):

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

10:20 AM Changeset in webkit [252000] by commit-queue@webkit.org
  • 5 edits in trunk/Source

REGRESSION(r243947) Epson software updater fails to install new version
https://bugs.webkit.org/show_bug.cgi?id=203809
<rdar://problem/56002179>

Patch by Alex Christensen <achristensen@webkit.org> on 2019-11-04
Reviewed by Brady Eidson.

Source/WebCore:

I manually verified this fixes the issue. See the radar.

  • platform/RuntimeApplicationChecks.h:
  • platform/cocoa/RuntimeApplicationChecksCocoa.mm:

(WebCore::MacApplication::isEpsonSoftwareUpdater):

Source/WebKitLegacy/mac:

  • Misc/WebDownload.mm:

(shouldCallOnNetworkThread):
(callOnDelegateThread):
(isDelegateThread):
(-[WebDownloadInternal downloadDidBegin:]):
(-[WebDownloadInternal download:willSendRequest:redirectResponse:]):
(-[WebDownloadInternal download:didReceiveAuthenticationChallenge:]):
(-[WebDownloadInternal download:didReceiveResponse:]):
(-[WebDownloadInternal download:didReceiveDataOfLength:]):
(-[WebDownloadInternal download:shouldDecodeSourceDataOfMIMEType:]):
(-[WebDownloadInternal download:decideDestinationWithSuggestedFilename:]):
(-[WebDownloadInternal download:didCreateDestination:]):
(-[WebDownloadInternal downloadDidFinish:]):
(-[WebDownloadInternal download:didFailWithError:]):

10:18 AM Changeset in webkit [251999] by Ross Kirsling
  • 2 edits in trunk/Source/WebCore

Unreviewed WinCairo build fix for r251934.

  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):

10:12 AM Changeset in webkit [251998] by yurys@chromium.org
  • 2 edits in trunk/LayoutTests

[GTK] inspector/runtime/getPreview.html timing out
https://bugs.webkit.org/show_bug.cgi?id=180096

Unreviewed. Mark the test as always passing on GTK (1k iterations passed with
no issues locally).

  • platform/gtk/TestExpectations:
9:58 AM Changeset in webkit [251997] by Devin Rousso
  • 2 edits in trunk/LayoutTests

Unreviewed, fix test failure after r251959

Reviewed by NOBODY (OOPS!).

  • inspector/timeline/timeline-recording.html:

WI.TimelineRecording.import was made async, so add an await.

9:50 AM Changeset in webkit [251996] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Flaky API Test TestWebKitAPI.WebKit.UploadDirectory
https://bugs.webkit.org/show_bug.cgi?id=203652

Patch by Alex Christensen <achristensen@webkit.org> on 2019-11-04
Reviewed by Alexey Proskuryakov.

It is not important that the directory to upload does not exist before the test starts.
Make the test more robust to state left behind by previous iterations of this test by removing the check.
The important check in this test is the uploaded body size.

  • TestWebKitAPI/Tests/WebKitCocoa/UploadDirectory.mm:

(TEST):

9:34 AM Changeset in webkit [251995] by Kate Cheney
  • 2 edits in trunk/Tools

updated email in contributors.json to match bugzilla.

  • Scripts/webkitpy/common/config/contributors.json:
9:23 AM Changeset in webkit [251994] by Said Abou-Hallawa
  • 2 edits in trunk/LayoutTests

Flaky Test: imported/w3c/web-platform-tests/svg/text/visualtests/text-inline-size-003-visual.svg
https://bugs.webkit.org/show_bug.cgi?id=203172

Unreviewed Test Gardening.

Mark the test as flaky.

8:51 AM Changeset in webkit [251993] by Chris Dumez
  • 6 edits
    2 adds in trunk

MediaKeySession / WebKitMediaKeySession should not prevent entering the back/forward cache
https://bugs.webkit.org/show_bug.cgi?id=203089

Reviewed by Youenn Fablet.

Source/WebCore:

Port MediaKeySession / WebKitMediaKeySession to the HTML5 event loop instead of using its
own GenericEventQueue / GenericTaskQueue. Because the HTML5 event loop plays nicely with
the back/forward cache, we can now let pages using MediaKeySession / WebKitMediaKeySession
into the back/forward cache.

Test: http/tests/navigation/page-cache-mediakeysession.html

  • Modules/encryptedmedia/MediaKeySession.cpp:

(WebCore::MediaKeySession::MediaKeySession):
(WebCore::MediaKeySession::generateRequest):
(WebCore::MediaKeySession::load):
(WebCore::MediaKeySession::update):
(WebCore::MediaKeySession::close):
(WebCore::MediaKeySession::remove):
(WebCore::MediaKeySession::enqueueMessage):
(WebCore::MediaKeySession::updateKeyStatuses):
(WebCore::MediaKeySession::hasPendingActivity const):
(WebCore::MediaKeySession::activeDOMObjectName const):
(WebCore::MediaKeySession::enqueueTask):
(WebCore::MediaKeySession::enqueueEvent):
(WebCore::MediaKeySession::shouldPreventEnteringBackForwardCache_DEPRECATED const): Deleted.
(WebCore::MediaKeySession::stop): Deleted.

  • Modules/encryptedmedia/MediaKeySession.h:
  • Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:

(WebCore::WebKitMediaKeySession::WebKitMediaKeySession):
(WebCore::WebKitMediaKeySession::~WebKitMediaKeySession):
(WebCore::WebKitMediaKeySession::addKeyTimerFired):
(WebCore::WebKitMediaKeySession::sendMessage):
(WebCore::WebKitMediaKeySession::sendError):
(WebCore::WebKitMediaKeySession::hasPendingActivity const):
(WebCore::WebKitMediaKeySession::enqueueEvent):
(WebCore::WebKitMediaKeySession::shouldPreventEnteringBackForwardCache_DEPRECATED const): Deleted.

  • Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:

LayoutTests:

Add layout test coverage.

  • http/tests/navigation/page-cache-mediakeysession-expected.txt: Added.
  • http/tests/navigation/page-cache-mediakeysession.html: Added.
8:42 AM Changeset in webkit [251992] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

enumerateDevices() doesn't return correct list of devices after device was changed by user in a system preferences
https://bugs.webkit.org/show_bug.cgi?id=203407
<rdar://problem/56648063>

Reviewed by Youenn Fablet.

Tested manually as this doesn't reproduce with mock capture devices.

  • platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:

(WebCore::CoreAudioCaptureDeviceManager::coreAudioCaptureDevices): Refresh the list of capture
devices when the default input device changes.
(WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices): Assert if not called
on the main thread.

8:32 AM Changeset in webkit [251991] by aestes@apple.com
  • 5 edits in trunk

REGRESSION (r251623): When downloading a QuickLook file, the web view navigates to a "The URL can't be shown" error page instead of staying on the current page
https://bugs.webkit.org/show_bug.cgi?id=203790
<rdar://problem/56795440>

Reviewed by Alex Christensen.

Source/WebCore:

When a PreviewConverter fails updating due to a call to PreviewConverter::failedUpdating(),
we should not dispatch previewConverterDidFailUpdating. LegacyPreviewLoader handles that
callback by calling ResourceLoader::didFail() with a WebKitErrorCannotShowURL error code,
but when downloading or cancelling we must fail with a
WebKitErrorFrameLoadInterruptedByPolicyChange error code instead.

This patch teaches PreviewConverter to distinguish between internal updating errors and
external calls to failedUpdating(), only dispatching previewConverterDidFailUpdating in the
former case.

Updated QuickLook API tests.

  • platform/PreviewConverter.cpp:

(WebCore::PreviewConverter::updateMainResource):
(WebCore::PreviewConverter::failedUpdating):
(WebCore::PreviewConverter::didFailUpdating):

  • platform/PreviewConverter.h:

Tools:

Tested that "download" and "cancel" policy decisions for QuickLook files result in a
provisional navigation failure with error code WebKitErrorFrameLoadInterruptedByPolicyChange.

  • TestWebKitAPI/Tests/WebKitCocoa/QuickLook.mm:

(-[QuickLookDelegate navigationError]):
(-[QuickLookDelegate _webView:didFailNavigation:withError:userInfo:]):
(-[QuickLookDelegate webView:didFailProvisionalNavigation:withError:]):
(TEST):

8:22 AM Changeset in webkit [251990] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Cannot run WebKit layout tests on iOS devices
https://bugs.webkit.org/show_bug.cgi?id=203796

Patch by Peng Liu <Peng Liu> on 2019-11-04
Reviewed by Jonathan Bedard.

Fix the error to parse iOS version numbers like "xx.yy".

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

(PlatformInfo.init):

7:46 AM Changeset in webkit [251989] by youenn@apple.com
  • 6 edits in trunk/Source/WebCore

RealtimeOutgoingAudioSource/RealtimeOutgoingVideoSource should unobserve before destruction time
https://bugs.webkit.org/show_bug.cgi?id=203802

Reviewed by Eric Carlson.

These classes are used by LibWebRTCRtpSenderBackend.
When the backend is destroyed, notify the sources to unobserve before unrefing them.
Add debug assertions to ensure this is done correctly.
Covered by existing tests.

  • Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:

(WebCore::LibWebRTCRtpSenderBackend::~LibWebRTCRtpSenderBackend):

  • Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h:

Fixed Variant Move issue.

  • platform/mediastream/MediaStreamTrackPrivate.h:

(WebCore::MediaStreamTrackPrivate::hasObserver const):

  • platform/mediastream/RealtimeOutgoingAudioSource.cpp:

(WebCore::RealtimeOutgoingAudioSource::~RealtimeOutgoingAudioSource):

  • platform/mediastream/RealtimeOutgoingVideoSource.cpp:

(WebCore::RealtimeOutgoingVideoSource::~RealtimeOutgoingVideoSource):

7:38 AM Changeset in webkit [251988] by cathiechen
  • 2 edits in trunk/Source/WebCore

Build error: redefinition of TransferFunction
https://bugs.webkit.org/show_bug.cgi?id=203742

Reviewed by Jer Noble.

TransferFunction defined in both VideoTextureCopierCV.cpp and TransferFunction.h.
Renamed TransferFunction in VideoTextureCopierCV.cpp to TransferFunctionCV.

  • platform/graphics/cv/VideoTextureCopierCV.cpp:

(WebCore::transferFunctionFromString):
(WebCore::YCbCrToRGBMatrixForRangeAndTransferFunction):

7:27 AM November 2019 Meeting edited by Jon Davis
(diff)
7:26 AM Simons5YearPlanRetrospective created by Jon Davis
5:51 AM Changeset in webkit [251987] by youenn@apple.com
  • 2 edits in trunk/LayoutTests

Layout Test webrtc/filtering-ice-candidate-after-reload.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=174471

Unreviewed.

  • platform/wk2/TestExpectations:

Test is no longer flaky.

5:33 AM Changeset in webkit [251986] by youenn@apple.com
  • 2 edits in trunk/LayoutTests

Layout Test http/wpt/webrtc/third-party-frame-ice-candidate-filtering.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=183801

Unreviewed.

  • platform/wk2/TestExpectations:

Test is no longer a flaky failure.

5:31 AM Changeset in webkit [251985] by youenn@apple.com
  • 5 edits
    3 adds in trunk

Order of postMessage and fetch events should be preserved when going from client to service worker
https://bugs.webkit.org/show_bug.cgi?id=203236

Reviewed by Chris Dumez.

Source/WebCore:

Now that post message is going through network process, we can make the order predictable.
Remove unnecessary task posting when firing events in service worker context and when posting message from a client.
Test: http/wpt/service-workers/service-worker/postMessage-fetch-order.https.html

  • workers/service/ServiceWorker.cpp:

(WebCore::ServiceWorker::swConnection):
(WebCore::ServiceWorker::postMessage):

  • workers/service/ServiceWorker.h:
  • workers/service/context/ServiceWorkerThread.cpp:

(WebCore::ServiceWorkerThread::postFetchTask):
(WebCore::ServiceWorkerThread::fireInstallEvent):
(WebCore::ServiceWorkerThread::fireActivateEvent):

LayoutTests:

  • http/wpt/service-workers/service-worker/postMessage-fetch-order-worker.js: Added.
  • http/wpt/service-workers/service-worker/postMessage-fetch-order.https-expected.txt: Added.
  • http/wpt/service-workers/service-worker/postMessage-fetch-order.https.html: Added.
4:12 AM Changeset in webkit [251984] by Oriol Brufau
  • 5 edits
    18 adds in trunk/LayoutTests

[css-lists] Import tests for list-style-type: <string>
https://bugs.webkit.org/show_bug.cgi?id=203759

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Import WPT tests.

  • resources/import-expectations.json:
  • web-platform-tests/css/css-lists/list-style-type-string-001a-expected.html: Added.
  • web-platform-tests/css/css-lists/list-style-type-string-001a.html: Added.
  • web-platform-tests/css/css-lists/list-style-type-string-001b-expected.html: Added.
  • web-platform-tests/css/css-lists/list-style-type-string-001b.html: Added.
  • web-platform-tests/css/css-lists/list-style-type-string-002-expected.html: Added.
  • web-platform-tests/css/css-lists/list-style-type-string-002.html: Added.
  • web-platform-tests/css/css-lists/list-style-type-string-003-expected.html: Added.
  • web-platform-tests/css/css-lists/list-style-type-string-003.html: Added.
  • web-platform-tests/css/css-lists/list-style-type-string-004-expected.html: Added.
  • web-platform-tests/css/css-lists/list-style-type-string-004.html: Added.
  • web-platform-tests/css/css-lists/list-style-type-string-005a-expected.html: Added.
  • web-platform-tests/css/css-lists/list-style-type-string-005a.html: Added.
  • web-platform-tests/css/css-lists/list-style-type-string-005b-expected.html: Added.
  • web-platform-tests/css/css-lists/list-style-type-string-005b.html: Added.
  • web-platform-tests/css/css-lists/list-style-type-string-006-expected.html: Added.
  • web-platform-tests/css/css-lists/list-style-type-string-006.html: Added.
  • web-platform-tests/css/css-lists/list-style-type-string-007-expected.html: Added.
  • web-platform-tests/css/css-lists/list-style-type-string-007.html: Added.
  • web-platform-tests/css/css-lists/w3c-import.log:

LayoutTests:

Most tests fail because the feature hasn't been implemented yet
(https://bugs.webkit.org/show_bug.cgi?id=167729).

3:36 AM Changeset in webkit [251983] by youenn@apple.com
  • 401 edits
    23 copies
    129 adds
    10 deletes in trunk/Source/ThirdParty/libwebrtc

Update libwebrtc third-party boringssl to M78
https://bugs.webkit.org/show_bug.cgi?id=202731

Reviewed by Alex Christensen.

  • CMakeLists.txt:
  • Source/third_party/boringssl: Updated.
  • libwebrtc.xcodeproj/project.pbxproj:
3:35 AM Changeset in webkit [251982] by youenn@apple.com
  • 1 edit
    2 adds in trunk/LayoutTests

Add a test verifying video plays well when switching from MediaStreams to regular videos
https://bugs.webkit.org/show_bug.cgi?id=203421

Reviewed by Geoffrey Garen.

  • fast/mediastream/stream-switch-expected.txt: Added.
  • fast/mediastream/stream-switch.html: Added.
3:01 AM Changeset in webkit [251981] by youenn@apple.com
  • 1 edit
    1 delete in trunk/Source/ThirdParty/libwebrtc

Unreviewed.
Revert https://trac.webkit.org/changeset/251980 since commit queue actually succeeded to land it previously.

  • Source/third_party/yasm-1.3.0: removed.
2:51 AM Changeset in webkit [251980] by youenn@apple.com
  • 1 edit
    117 adds in trunk/Source/ThirdParty/libwebrtc

Rename yasm-1.3.0 folder to yasm
https://bugs.webkit.org/show_bug.cgi?id=202725

Reviewed by Eric Carlson.

To align with upstream repository.

  • Configurations/yasm.xcconfig:
  • Source/third_party/yasm: Renamed from Source/ThirdParty/libwebrtc/Source/third_party/yasm-1.3.0.
  • libwebrtc.xcodeproj/project.pbxproj:

Nov 3, 2019:

11:33 PM Changeset in webkit [251979] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WebKit

[WebAuthn] CtapAuthenticator::tryDowngrade should distinguish requestData().options
https://bugs.webkit.org/show_bug.cgi?id=203771
<rdar://problem/56832618>

Reviewed by Brent Fulgham.

CtapAuthenticator::tryDowngrade assumes the request is a getAssertion request. This is true
for most cases but not for Google's registration. For Google's registration, a quirk is
implemented to use U2F commands for registration if GoogleLegacyAppIdSupportExtension asks
us to do so.

No tests given there is no way to simulate google.com in our test infrastructures.

  • UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp:

(WebKit::CtapAuthenticator::tryDowngrade):

8:11 PM Changeset in webkit [251978] by Tadeu Zagallo
  • 7 edits
    1 add in trunk

LLIntGenerator should not allocate temporaries in between variables
https://bugs.webkit.org/show_bug.cgi?id=203787

Reviewed by Yusuke Suzuki.

JSTests:

  • wasm/stress/local-ref.js: Added.

Source/JavaScriptCore:

The BytecodeGenerator requires that all variables must be allocated contiguously, before any
temporaries are allocated. Currently, we might end up allocating a temporary to materialize
the null constant to initialize locals of type Anyref/Funcref. Fix it by keeping track of the
locals that need to be initialized and adding a new callback to notify when we have finished
parsing locals. Only then we perform the delayed initialization of local refs.

  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::didFinishParsingLocals):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::didFinishParsingLocals):

  • wasm/WasmFunctionParser.h:

(JSC::Wasm::FunctionParser<Context>::parse):

  • wasm/WasmLLIntGenerator.cpp:

(JSC::Wasm::LLIntGenerator::addLocal):
(JSC::Wasm::LLIntGenerator::didFinishParsingLocals):

  • wasm/WasmValidate.cpp:

(JSC::Wasm::Validate::didFinishParsingLocals):

3:39 PM Changeset in webkit [251977] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][Verification] Forced line break display runs don't have TextContext
https://bugs.webkit.org/show_bug.cgi?id=203779
<rdar://problem/56839710>

Reviewed by Antti Koivisto.

Display::Run's optional TextContext is not available for forced line breaks (since they are not text runs).

  • layout/Verification.cpp:

(WebCore::Layout::checkForMatchingTextRuns):

12:34 PM Changeset in webkit [251976] by timothy_horton@apple.com
  • 9 edits
    1 add
    2 deletes in trunk

WKWebView can get stuck blank (Web Content process thinks the app is backgrounded)
https://bugs.webkit.org/show_bug.cgi?id=203774
<rdar://problem/53399054>

Reviewed by Chris Dumez.

Source/WebKit:

With careful timing, if a WKWebView swaps out its content view in the
background, the incoming view can fail to inform the Web Content process
when the app comes to the foreground, leaving the layer tree frozen.

This occurs because the last-sent state is stored per-WKApplicationStateTrackingView,
and the content view is the WKApplicationStateTrackingView, so it is possible
for e.g. a WKPDFView to be in the hierarchy, keeping the correct state,
with an initialized-but-never-parented WKContentView hanging off the WKWebView.

If it is never parented, WKContentView will think that the current application
state is foreground (_lastObservedStateWasBackground is initialized to NO).

If you go into the background with a WKPDFView as the current content view,
it will inform the Web Content process that the application has backgrounded.

If, still in the background, WKWebView swaps from the WKPDFView to
the WKContentView, and then comes into the foreground, when we get the
notification that the app came to the foreground, we will not forward it
to the Web Content process, because WKContentView's _lastObservedStateWasBackground
remains NO.

To fix this, move _lastObservedStateWasBackground to WebPageProxy, so that
it always tracks the most recently sent state, regardless of which content view
is active.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::resetState):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::lastObservedStateWasBackground const):

  • UIProcess/ios/WKApplicationStateTrackingView.mm:

(-[WKApplicationStateTrackingView willMoveToWindow:]):
(-[WKApplicationStateTrackingView didMoveToWindow]):
(-[WKApplicationStateTrackingView _applicationDidEnterBackground]):
(-[WKApplicationStateTrackingView _applicationWillEnterForeground]):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::applicationDidEnterBackground):
(WebKit::WebPageProxy::applicationWillEnterForeground):

Tools:

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

(TEST):
(isBackground):
(createHostViewForExtensionIdentifier):

  • TestWebKitAPI/Tests/WebKitCocoa/WKPDFViewResizeCrash.mm: Removed.
  • TestWebKitAPI/Tests/WebKitCocoa/WKPDFViewStablePresentationUpdateCallback.mm: Removed.
  • TestWebKitAPI/cocoa/TestNavigationDelegate.h:
  • TestWebKitAPI/cocoa/TestNavigationDelegate.mm:

(-[WKWebView _test_waitForDidFinishNavigationWithoutPresentationUpdate]):
Merge existing WKPDFView tests into one file, and add one for this bug.

12:01 PM Changeset in webkit [251975] by rniwa@webkit.org
  • 8 edits
    1 copy in trunk/Source/WebCore

Add a helper function to schedule a task to dispatch an event to ActiveDOMObject
https://bugs.webkit.org/show_bug.cgi?id=203714

Reviewed by Chris Dumez.

Added two helper static member functions queueTaskKeepingObjectAlive and queueTaskToDispatchEvent
to ActiveDOMObject and deployed them in ServiceWorkerContainer.

No new tests since there should be no behavioral changes.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/AbstractEventLoop.h:
  • dom/ActiveDOMObject.cpp:

(WebCore::ActiveDOMObject::queueTaskInEventLoop): Added.

  • dom/ActiveDOMObject.h:

(WebCore::ActiveDOMObject::queueTaskKeepingObjectAlive): Added.
(WebCore::ActiveDOMObject::queueTaskToDispatchEvent): Added.

  • dom/TaskSource.h: Added.
  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::ServiceWorkerContainer::ready):
(WebCore::ServiceWorkerContainer::getRegistration):
(WebCore::ServiceWorkerContainer::getRegistrations):
(WebCore::ServiceWorkerContainer::jobFailedWithException):
(WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
(WebCore::ServiceWorkerContainer::jobResolvedWithUnregistrationResult):
(WebCore::ServiceWorkerContainer::jobFailedLoadingScript):
(WebCore::ServiceWorkerContainer::fireControllerChangeEvent):
(WebCore::ServiceWorkerContainer::enqueueTask): Deleted.

  • workers/service/ServiceWorkerContainer.h:
10:28 AM Changeset in webkit [251974] by Andres Gonzalez
  • 15 edits in trunk/Source/WebCore

Make AXIsolatedTreeNode a subclass of AXCoreObject.
https://bugs.webkit.org/show_bug.cgi?id=203717

Reviewed by Chris Fleizach.

No new tests needed, no new functionality.

  • AXIsolatedTreeNOde derives from AXCoreObject.
  • AccessibilityObjectWrapper can now have a single pointer to a AXCoreObject instead of one for the live object and one for the isolated object.
  • Simplified wrapper code by making it agnostic of the nature of the underlying AXCoreObject.
  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::characterOffsetForPoint):
(WebCore::AXObjectCache::characterOffsetForIndex):
(WebCore::AXObjectCache::createIsolatedAccessibilityTreeHierarchy):
(WebCore::AXObjectCache::generateIsolatedAccessibilityTree):

  • accessibility/AXObjectCache.h:
  • accessibility/atk/AXObjectCacheAtk.cpp:

(WebCore::AXObjectCache::attachWrapper):

  • accessibility/ios/AXObjectCacheIOS.mm:

(WebCore::AXObjectCache::attachWrapper):

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(AccessibilityUnignoredAncestor):
(-[WebAccessibilityTextMarker initWithData:accessibilityObject:]):
(-[WebAccessibilityObjectWrapper initWithAccessibilityObject:]):
(-[WebAccessibilityObjectWrapper _accessibilityTreeAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityListAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityArticleAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityLandmarkAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityIsInTableCell]):
(-[WebAccessibilityObjectWrapper _accessibilityFieldsetAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityFrameAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):
(-[WebAccessibilityObjectWrapper tableCellParent]):
(-[WebAccessibilityObjectWrapper tableParent]):
(-[WebAccessibilityObjectWrapper accessibilityTitleElement]):
(-[WebAccessibilityObjectWrapper accessibilityDatetimeValue]):
(-[WebAccessibilityObjectWrapper detailParentForSummaryObject:]):
(-[WebAccessibilityObjectWrapper detailParentForObject:]):
(-[WebAccessibilityObjectWrapper treeItemParentForObject:]):
(AXAttributeStringSetStyle):
(-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
(-[WebAccessibilityObjectWrapper accessibilitySupportsARIAExpanded]):
(-[WebAccessibilityObjectWrapper accessibilityIsExpanded]):

  • accessibility/isolatedtree/AXIsolatedTree.cpp:

(WebCore::AXIsolatedTree::setRoot):
(WebCore::AXIsolatedTree::applyPendingChanges):
(WebCore::AXIsolatedTree::setRootNodeID): Deleted.

  • accessibility/isolatedtree/AXIsolatedTree.h:
  • accessibility/isolatedtree/AXIsolatedTreeNode.cpp:

(WebCore::AXIsolatedTreeNode::AXIsolatedTreeNode):
(WebCore::AXIsolatedTreeNode::create):
(WebCore::AXIsolatedTreeNode::initializeAttributeData):
(WebCore::AXIsolatedTreeNode::appendChild):
(WebCore::AXIsolatedTreeNode::children):
(WebCore::AXIsolatedTreeNode::parentObjectUnignored const):
(WebCore::AXIsolatedTreeNode::accessibilityHitTest const):
(WebCore::AXIsolatedTreeNode::updateBackingStore):
(WebCore::AXIsolatedTreeNode::parentObjectInterfaceUnignored const): Deleted.

  • accessibility/isolatedtree/AXIsolatedTreeNode.h:
  • accessibility/mac/AXObjectCacheMac.mm:

(WebCore::AXObjectCache::attachWrapper):
(WebCore::AXObjectCache::associateIsolatedTreeNode): Deleted.

  • accessibility/mac/WebAccessibilityObjectWrapperBase.h:
  • accessibility/mac/WebAccessibilityObjectWrapperBase.mm:

(convertToNSArray):
(-[WebAccessibilityObjectWrapperBase initWithAccessibilityObject:]):
(-[WebAccessibilityObjectWrapperBase detach]):
(-[WebAccessibilityObjectWrapperBase updateObjectBackingStore]):
(-[WebAccessibilityObjectWrapperBase accessibilityObject]):
(-[WebAccessibilityObjectWrapperBase axBackingObject]):
(accessibilitySearchCriteriaForSearchPredicateParameterizedAttribute):
(-[WebAccessibilityObjectWrapperBase isolatedTreeNode]): Deleted.

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
(convertToVector):
(-[WebAccessibilityObjectWrapper childrenVectorSize]):
(-[WebAccessibilityObjectWrapper childrenVectorArray]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):

  • accessibility/win/AXObjectCacheWin.cpp:

(WebCore::AXObjectCache::attachWrapper):

7:10 AM Changeset in webkit [251973] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Runs collapsed to zero advanced width are not always whitespace collapsed
https://bugs.webkit.org/show_bug.cgi?id=203778
<rdar://problem/56839642>

Reviewed by Antti Koivisto.

Just because a run collapses to zero advanced width, it does not necessarily mean it is a collapsed run (in whitespace collapsing sense)
e.g. trimmed trailing whitespace (m_collapsedToZeroAdvanceWidth should probably be renamed to something other than "collapsed" to avoid confusion).

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::close):
(WebCore::Layout::Line::appendTextContent):

  • layout/inlineformatting/InlineLine.h:

(WebCore::Layout::Line::Run::setCollapsesToZeroAdvanceWidth):

7:08 AM Changeset in webkit [251972] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Pre-wrap: Overflown whitespace should stay on the current line
https://bugs.webkit.org/show_bug.cgi?id=203780
<rdar://problem/56839822>

Reviewed by Antti Koivisto.

white-space: pre-wrap needs clarification. According to CSS Text Module Level 3, content wrapping is as 'normal'
but apparently we need to keep the overlapping whitespace on the line (and hang it I'd assume).

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::isTrailingWhitespaceWithPreWrap):
(WebCore::Layout::LineBreaker::breakingContextForInlineContent):

Note: See TracTimeline for information about the timeline view.