Timeline



Aug 26, 2019:

11:51 PM Changeset in webkit [249133] by ysuzuki@apple.com
  • 3 edits in trunk/Source/WebCore

[WebCore] DataCue should not use gcProtect / gcUnprotect
https://bugs.webkit.org/show_bug.cgi?id=201170

Reviewed by Mark Lam.

JSC::gcProtect and JSC::gcUnprotect are designed for JavaScriptCore.framework and we should not use them in WebCore. It is
checking whether we are holding a JS API lock. But the caller of these API would be the C++ holder's destructor, and this should be
allowed since this destruction must happen in main thread or web thread, and this should not happen while other thread is taking JS API lock.
For example, we are destroying JSC::Strong<>, JSC::Weak<> without taking JS API lock. But since JSC::gcProtect and JSC::gcUnprotect are designed
for JavaScriptCore.framework, they are not accounting this condition, and we are hitting debug assertion in GC stress bot.

Ideally, we should convert this JSValue field to JSValueInWrappedObject. But JSValueInWrappedObject needs extra care. We should
know how the owner and JS wrapper are kept and used to use JSValueInWrappedObject correctly.

As a first step, this patch just replaces raw JSValue + gcProtect/gcUnprotect with JSC::Strong<>.

This change fixes LayoutTests/media/track/track-in-band-metadata-display-order.html crash in GC stress bot. The crash trace is the following.

Thread 0 Crashed
Dispatch queue: com.apple.main-thread 0 com.apple.JavaScriptCore 0x000000010ee3d980 WTFCrash + 16 1 com.apple.JavaScriptCore 0x000000010ee408ab WTFCrashWithInfo(int, char const*, char const*, int) + 27 2 com.apple.JavaScriptCore 0x000000010feb5327 JSC::Heap::unprotect(JSC::JSValue) + 215 3 com.apple.WebCore 0x0000000120f33b53 JSC::gcUnprotect(JSC::JSCell*) + 51 4 com.apple.WebCore 0x0000000120f329fc JSC::gcUnprotect(JSC::JSValue) + 76 5 com.apple.WebCore 0x0000000120f32968 WebCore::DataCue::~DataCue() + 88 6 com.apple.WebCore 0x0000000120f32ac5 WebCore::DataCue::~DataCue() + 21 7 com.apple.WebCore 0x0000000120f32ae9 WebCore::DataCue::~DataCue() + 25 8 com.apple.WebCore 0x0000000120f37ebf WTF::RefCounted<WebCore::TextTrackCue, std::__1::default_delete<WebCore::TextTrackCue> >::deref() const + 95 9 com.apple.WebCore 0x000000012103a345 void WTF::derefIfNotNull<WebCore::TextTrackCue>(WebCore::TextTrackCue*) + 53 10 com.apple.WebCore 0x000000012103a309 WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> >::~RefPtr() + 41 11 com.apple.WebCore 0x000000012102bfc5 WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> >::~RefPtr() + 21 12 com.apple.WebCore 0x00000001210e91df WTF::VectorDestructor<true, WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> > >::destruct(WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> >*, WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> >*) + 47 13 com.apple.WebCore 0x00000001210e913d WTF::VectorTypeOperations<WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> > >::destruct(WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> >*, WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> >*) + 29 14 com.apple.WebCore 0x00000001210e9100 WTF::Vector<WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> >, 0ul, WTF::CrashOnOverflow, 16ul>::~Vector() + 64 15 com.apple.WebCore 0x00000001210e7a25 WTF::Vector<WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> >, 0ul, WTF::CrashOnOverflow, 16ul>::~Vector() + 21 16 com.apple.WebCore 0x00000001210e93d3 WebCore::TextTrackCueList::~TextTrackCueList() + 51
  • html/track/DataCue.cpp:

(WebCore::DataCue::DataCue):
(WebCore::DataCue::~DataCue):
(WebCore::DataCue::setData):
(WebCore::DataCue::value const):
(WebCore::DataCue::setValue):
(WebCore::DataCue::valueOrNull const):

  • html/track/DataCue.h:
10:00 PM Changeset in webkit [249132] by Devin Rousso
  • 85 edits in trunk/Source

Web Inspector: use more C++ keywords for defining agents
https://bugs.webkit.org/show_bug.cgi?id=200959

Reviewed by Joseph Pecoraro.

  • make constructors protected when the agent isn't meant to be constructed directly
  • add virtual destructors that are defined in the *.cpp so forward-declarations work
  • use final wherever possible
  • add comments to indicate where any virtual functions come from

Source/JavaScriptCore:

  • inspector/agents/InspectorAgent.h:
  • inspector/agents/InspectorAgent.cpp:
  • inspector/agents/InspectorAuditAgent.h:
  • inspector/agents/InspectorAuditAgent.cpp:
  • inspector/agents/InspectorConsoleAgent.h:
  • inspector/agents/InspectorConsoleAgent.cpp:
  • inspector/agents/InspectorDebuggerAgent.h:
  • inspector/agents/InspectorDebuggerAgent.cpp:
  • inspector/agents/InspectorHeapAgent.h:
  • inspector/agents/InspectorHeapAgent.cpp:
  • inspector/agents/InspectorRuntimeAgent.h:
  • inspector/agents/InspectorScriptProfilerAgent.h:
  • inspector/agents/InspectorScriptProfilerAgent.cpp:
  • inspector/agents/InspectorTargetAgent.h:
  • inspector/agents/InspectorTargetAgent.cpp:
  • inspector/agents/JSGlobalObjectAuditAgent.h:
  • inspector/agents/JSGlobalObjectAuditAgent.cpp:
  • inspector/agents/JSGlobalObjectDebuggerAgent.h:
  • inspector/agents/JSGlobalObjectDebuggerAgent.cpp:
  • inspector/agents/JSGlobalObjectRuntimeAgent.h:
  • inspector/agents/JSGlobalObjectRuntimeAgent.cpp:

Source/WebCore:

  • inspector/agents/InspectorApplicationCacheAgent.h:
  • inspector/agents/InspectorApplicationCacheAgent.cpp:
  • inspector/agents/InspectorCPUProfilerAgent.h:
  • inspector/agents/InspectorCPUProfilerAgent.cpp:
  • inspector/agents/InspectorCSSAgent.h:
  • inspector/agents/InspectorCSSAgent.cpp:
  • inspector/agents/InspectorCanvasAgent.h:
  • inspector/agents/InspectorCanvasAgent.cpp:
  • inspector/agents/InspectorDOMAgent.h:
  • inspector/agents/InspectorDOMAgent.cpp:
  • inspector/agents/InspectorDOMDebuggerAgent.h:
  • inspector/agents/InspectorDOMDebuggerAgent.cpp:
  • inspector/agents/InspectorDOMStorageAgent.h:
  • inspector/agents/InspectorDOMStorageAgent.cpp:
  • inspector/agents/InspectorDatabaseAgent.h:
  • inspector/agents/InspectorDatabaseAgent.cpp:
  • inspector/agents/InspectorIndexedDBAgent.h:
  • inspector/agents/InspectorIndexedDBAgent.cpp:
  • inspector/agents/InspectorLayerTreeAgent.h:
  • inspector/agents/InspectorLayerTreeAgent.cpp:
  • inspector/agents/InspectorMemoryAgent.h:
  • inspector/agents/InspectorMemoryAgent.cpp:
  • inspector/agents/InspectorNetworkAgent.h:
  • inspector/agents/InspectorNetworkAgent.cpp:
  • inspector/agents/InspectorPageAgent.h:
  • inspector/agents/InspectorPageAgent.cpp:
  • inspector/agents/InspectorTimelineAgent.h:
  • inspector/agents/InspectorTimelineAgent.cpp:
  • inspector/agents/InspectorWorkerAgent.h:
  • inspector/agents/InspectorWorkerAgent.cpp:
  • inspector/agents/WebConsoleAgent.h:
  • inspector/agents/WebConsoleAgent.cpp:
  • inspector/agents/WebDebuggerAgent.h:
  • inspector/agents/WebDebuggerAgent.cpp:
  • inspector/agents/WebHeapAgent.h:
  • inspector/agents/WebHeapAgent.cpp:
  • inspector/agents/page/PageAuditAgent.h:
  • inspector/agents/page/PageAuditAgent.cpp:
  • inspector/agents/page/PageConsoleAgent.h:
  • inspector/agents/page/PageConsoleAgent.cpp:
  • inspector/agents/page/PageDebuggerAgent.h:
  • inspector/agents/page/PageDebuggerAgent.cpp:
  • inspector/agents/page/PageHeapAgent.h:
  • inspector/agents/page/PageHeapAgent.cpp:
  • inspector/agents/page/PageNetworkAgent.h:
  • inspector/agents/page/PageNetworkAgent.cpp:
  • inspector/agents/page/PageRuntimeAgent.h:
  • inspector/agents/page/PageRuntimeAgent.cpp:
  • inspector/agents/worker/ServiceWorkerAgent.h:
  • inspector/agents/worker/ServiceWorkerAgent.cpp:
  • inspector/agents/worker/WorkerAuditAgent.h:
  • inspector/agents/worker/WorkerAuditAgent.cpp:
  • inspector/agents/worker/WorkerConsoleAgent.h:
  • inspector/agents/worker/WorkerConsoleAgent.cpp:
  • inspector/agents/worker/WorkerDebuggerAgent.h:
  • inspector/agents/worker/WorkerNetworkAgent.h:
  • inspector/agents/worker/WorkerNetworkAgent.cpp:
  • inspector/agents/worker/WorkerRuntimeAgent.h:
  • inspector/agents/worker/WorkerRuntimeAgent.cpp:

Source/WebKit:

  • UIProcess/WebPageInspectorTargetAgent.h:
  • UIProcess/WebPageInspectorTargetAgent.cpp:
9:58 PM Changeset in webkit [249131] by mmaxfield@apple.com
  • 114 edits
    2 deletes in trunk

[WHLSL] Rewrite all tests to use WHLSL and delete the isWHLSL flag
https://bugs.webkit.org/show_bug.cgi?id=201162

Reviewed by Saam Barati.

Source/WebCore:

We want to keep the MSL codepath for debugging, so the codepath isn't deleted entirely, but it is no longer web exposed.

  • Modules/webgpu/WebGPUDevice.cpp:

(WebCore::WebGPUDevice::createShaderModule const):

  • Modules/webgpu/WebGPUShaderModuleDescriptor.h:
  • Modules/webgpu/WebGPUShaderModuleDescriptor.idl:
  • platform/graphics/gpu/GPUDevice.h:
  • platform/graphics/gpu/GPUShaderModuleDescriptor.h:
  • platform/graphics/gpu/cocoa/GPUShaderModuleMetal.mm:

(WebCore::GPUShaderModule::tryCreate):

LayoutTests:

  • webgpu/bind-groups.html:
  • webgpu/blend-color-triangle-strip.html:
  • webgpu/blend-triangle-strip.html:
  • webgpu/buffer-command-buffer-races.html:
  • webgpu/color-write-mask-triangle-strip.html:
  • webgpu/compute-pipeline-errors.html:
  • webgpu/depth-enabled-triangle-strip.html:
  • webgpu/draw-indexed-triangles.html:
  • webgpu/msl-harness-test-expected.txt: Removed.
  • webgpu/msl-harness-test.html: Removed.
  • webgpu/render-command-encoding.html:
  • webgpu/render-pipeline-errors.html:
  • webgpu/render-pipelines.html:
  • webgpu/shader-modules.html:
  • webgpu/simple-triangle-strip.html:
  • webgpu/texture-triangle-strip.html:
  • webgpu/vertex-buffer-triangle-strip.html:
  • webgpu/viewport-scissor-rect-triangle-strip.html:
  • webgpu/whlsl/arbitrary-vertex-attribute-locations.html:
  • webgpu/whlsl/buffer-fragment.html:
  • webgpu/whlsl/buffer-length.html:
  • webgpu/whlsl/buffer-vertex.html:
  • webgpu/whlsl/checker-should-set-type-of-read-modify-write-variables.html:
  • webgpu/whlsl/compute.html:
  • webgpu/whlsl/dereference-pointer-should-type-check.html:
  • webgpu/whlsl/device-proper-type-checker.html:
  • webgpu/whlsl/do-while-loop-break.html:
  • webgpu/whlsl/do-while-loop-continue.html:
  • webgpu/whlsl/do-while-loop.html:
  • webgpu/whlsl/dont-crash-parsing-enum.html:
  • webgpu/whlsl/dot-expressions.html:
  • webgpu/whlsl/duplicate-types-should-not-produce-duplicate-ctors.html:
  • webgpu/whlsl/ensure-proper-variable-lifetime-2.html:
  • webgpu/whlsl/ensure-proper-variable-lifetime-3.html:
  • webgpu/whlsl/ensure-proper-variable-lifetime.html:
  • webgpu/whlsl/huge-array.html:
  • webgpu/whlsl/js/test-harness.js:

(convertTypeToArrayType):
(Data):
(Harness):
(Harness.prototype.async.callTypedFunction):
(Harness.prototype.callVoidFunction):
(Harness.prototype.async.checkCompileFail):
(Harness.prototype._setUpArguments):
(Harness.prototype.async._callFunction):
(Harness.prototype.set isWHLSL): Deleted.
(Harness.prototype.get isWHLSL): Deleted.

  • webgpu/whlsl/loops-break.html:
  • webgpu/whlsl/loops-continue.html:
  • webgpu/whlsl/loops.html:
  • webgpu/whlsl/make-array-reference.html:
  • webgpu/whlsl/matrix-2.html:
  • webgpu/whlsl/matrix-memory-layout.html:
  • webgpu/whlsl/matrix.html:
  • webgpu/whlsl/nested-dot-expression-rvalue.html:
  • webgpu/whlsl/nested-loop.html:
  • webgpu/whlsl/null-dereference.html:
  • webgpu/whlsl/oob-access.html:
  • webgpu/whlsl/propertyresolver/ander-abstract-lvalue.html:
  • webgpu/whlsl/propertyresolver/ander-lvalue-3-levels.html:
  • webgpu/whlsl/propertyresolver/ander-lvalue.html:
  • webgpu/whlsl/propertyresolver/ander.html:
  • webgpu/whlsl/propertyresolver/getter.html:
  • webgpu/whlsl/propertyresolver/indexer-ander-abstract-lvalue.html:
  • webgpu/whlsl/propertyresolver/indexer-ander-lvalue-3-levels.html:
  • webgpu/whlsl/propertyresolver/indexer-ander-lvalue.html:
  • webgpu/whlsl/propertyresolver/indexer-ander.html:
  • webgpu/whlsl/propertyresolver/indexer-getter.html:
  • webgpu/whlsl/propertyresolver/indexer-setter-abstract-lvalue-3-levels.html:
  • webgpu/whlsl/propertyresolver/indexer-setter-abstract-lvalue.html:
  • webgpu/whlsl/propertyresolver/indexer-setter-lvalue.html:
  • webgpu/whlsl/propertyresolver/indexer-setter.html:
  • webgpu/whlsl/propertyresolver/setter-abstract-lvalue-3-levels.html:
  • webgpu/whlsl/propertyresolver/setter-abstract-lvalue.html:
  • webgpu/whlsl/propertyresolver/setter-lvalue.html:
  • webgpu/whlsl/read-modify-write-high-zombies.html:
  • webgpu/whlsl/read-modify-write.html:
  • webgpu/whlsl/return-local-variable.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-10.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-11.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-12.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-13.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-14.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-15.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-16.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-17.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-18.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-19.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-2.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-20.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-21.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-22.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-23.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-24.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-25.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-26.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-27.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-3.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-4.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-5.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-6.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-7.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-8.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-9.html:
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules.html:
  • webgpu/whlsl/simple-arrays.html:
  • webgpu/whlsl/store-to-property-updates-properly.html:
  • webgpu/whlsl/textures-getdimensions.html:
  • webgpu/whlsl/textures-load.html:
  • webgpu/whlsl/textures-sample.html:
  • webgpu/whlsl/two-dimensional-array.html:
  • webgpu/whlsl/use-undefined-variable-2.html:
  • webgpu/whlsl/use-undefined-variable.html:
  • webgpu/whlsl/while-loop-break.html:
  • webgpu/whlsl/while-loop-continue.html:
  • webgpu/whlsl/whlsl.html:
  • webgpu/whlsl/zero-initialize-values-2.html:
  • webgpu/whlsl/zero-initialize-values.html:
8:19 PM Changeset in webkit [249130] by Chris Dumez
  • 4 edits in trunk

Change default value of window.open()'s url argument
https://bugs.webkit.org/show_bug.cgi?id=200882

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline WPT test now that it is passing.

  • web-platform-tests/html/browsers/the-window-object/window-open-defaults.window-expected.txt:

Source/WebCore:

Update default URL parameter value for window.open() to be "" instead of "about:blank", as per:

This aligns our behavior with other Web browser engines.

No new tests, rebaselined existing test.

  • page/DOMWindow.idl:
7:20 PM Changeset in webkit [249129] by Devin Rousso
  • 2 edits in trunk/LayoutTests

Unreviewed, fix test failure after r249127

  • inspector/debugger/tail-deleted-frames-this-value.html:
6:02 PM Changeset in webkit [249128] by Devin Rousso
  • 66 edits in trunk

Web Inspector: unify agent command error messages
https://bugs.webkit.org/show_bug.cgi?id=200950

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

Different agents can sometimes have different error messages for commands that have a
similar intended effect. We should make our error messages more similar.

  • inspector/JSGlobalObjectConsoleClient.cpp:
  • inspector/agents/InspectorAgent.cpp:
  • inspector/agents/InspectorAuditAgent.cpp:
  • inspector/agents/InspectorConsoleAgent.cpp:
  • inspector/agents/InspectorDebuggerAgent.cpp:
  • inspector/agents/InspectorHeapAgent.cpp:
  • inspector/agents/InspectorRuntimeAgent.cpp:
  • inspector/agents/InspectorTargetAgent.cpp:
  • inspector/agents/JSGlobalObjectAuditAgent.cpp:
  • inspector/agents/JSGlobalObjectDebuggerAgent.cpp:
  • inspector/agents/JSGlobalObjectRuntimeAgent.cpp:

Elide function lists to avoid an extremely large ChangeLog entry.

Source/WebCore:

Different agents can sometimes have different error messages for commands that have a
similar intended effect. We should make our error messages more similar.

  • inspector/CommandLineAPIHost.cpp:
  • inspector/agents/InspectorApplicationCacheAgent.cpp:
  • inspector/agents/InspectorCSSAgent.cpp:
  • inspector/agents/InspectorCanvasAgent.h:
  • inspector/agents/InspectorCanvasAgent.cpp:
  • inspector/agents/InspectorDOMAgent.cpp:
  • inspector/agents/InspectorDOMDebuggerAgent.cpp:
  • inspector/agents/InspectorDOMStorageAgent.cpp:
  • inspector/agents/InspectorIndexedDBAgent.cpp:
  • inspector/agents/InspectorLayerTreeAgent.cpp:
  • inspector/agents/InspectorMemoryAgent.cpp:
  • inspector/agents/InspectorNetworkAgent.cpp:
  • inspector/agents/InspectorPageAgent.cpp:
  • inspector/agents/InspectorTimelineAgent.cpp:
  • inspector/agents/InspectorWorkerAgent.cpp:
  • inspector/agents/page/PageAuditAgent.cpp:
  • inspector/agents/page/PageConsoleAgent.cpp:
  • inspector/agents/page/PageDebuggerAgent.cpp:
  • inspector/agents/page/PageNetworkAgent.cpp:
  • inspector/agents/page/PageRuntimeAgent.cpp:
  • inspector/agents/worker/WorkerAuditAgent.cpp:
  • inspector/agents/worker/WorkerDebuggerAgent.cpp:
  • inspector/agents/worker/WorkerRuntimeAgent.cpp:

Elide function lists to avoid an extremely large ChangeLog entry.

LayoutTests:

  • http/tests/inspector/network/getSerializedCertificate-expected.txt:
  • http/tests/websocket/tests/hybi/inspector/resolveWebSocket-expected.txt:
  • inspector/audit/setup-expected.txt:
  • inspector/audit/teardown-expected.txt:
  • inspector/canvas/css-canvas-clients-expected.txt:
  • inspector/canvas/recording-expected.txt:
  • inspector/canvas/requestContent-2d-expected.txt:
  • inspector/canvas/requestNode-expected.txt:
  • inspector/canvas/requestShaderSource-expected.txt:
  • inspector/canvas/resolveCanvasContext-2d-expected.txt:
  • inspector/canvas/setShaderProgramDisabled-expected.txt:
  • inspector/canvas/setShaderProgramHighlighted-expected.txt:
  • inspector/canvas/updateShader-expected.txt:
  • inspector/console/webcore-logging-expected.txt:
  • inspector/css/add-rule-expected.txt:
  • inspector/debugger/continueUntilNextRunLoop-expected.txt:
  • inspector/debugger/evaluateOnCallFrame-errors-expected.txt:
  • inspector/debugger/setBreakpoint-expected.txt:
  • inspector/dom-debugger/dom-breakpoints-expected.txt:
  • inspector/dom/breakpoint-for-event-listener-expected.txt:
  • inspector/dom/highlightQuad-expected.txt:
  • inspector/dom/insertAdjacentHTML-expected.txt:
  • inspector/dom/request-child-nodes-depth-expected.txt:
  • inspector/dom/setEventListenerDisabled-expected.txt:
  • inspector/protocol/backend-dispatcher-argument-errors-expected.txt:
  • inspector/runtime/awaitPromise-expected.txt:
  • inspector/runtime/getPreview-expected.txt:
  • inspector/timeline/setInstruments-errors-expected.txt:
5:48 PM Changeset in webkit [249127] by Devin Rousso
  • 2 edits in trunk/LayoutTests

Unreviewed, add extra test failure logging after r200971

  • inspector/debugger/tail-deleted-frames-this-value.html:
5:20 PM Changeset in webkit [249126] by Chris Dumez
  • 15 edits in trunk/Source

Regression: ITP started doing a lot more IPC after its logic was moved to the network process
https://bugs.webkit.org/show_bug.cgi?id=201155

Reviewed by John Wilander.

Source/WebCore:

ITP started doing a lot more IPC after its logic was moved to the network process. Web processes used to
send their statistics to the UIProcess at most every 5 seconds. However, when the logic got moved to the network
process, we started notifying the network process via IPC after every sub resource load. This is bad for performance
and battery life. This patch restores the 5 second delay to address the issue.

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::ResourceLoadObserver):
(WebCore::ResourceLoadObserver::setRequestStorageAccessUnderOpenerCallback):
(WebCore::ResourceLoadObserver::logSubresourceLoading):
(WebCore::ResourceLoadObserver::logWebSocketLoading):
(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
(WebCore::ResourceLoadObserver::scheduleNotificationIfNeeded):
(WebCore::ResourceLoadObserver::updateCentralStatisticsStore):
(WebCore::ResourceLoadObserver::clearState):

  • loader/ResourceLoadObserver.h:

Source/WebKit:

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

5:18 PM Changeset in webkit [249125] by Wenson Hsieh
  • 11 edits in trunk

Remove UIHelper.activateElementAtHumanSpeed
https://bugs.webkit.org/show_bug.cgi?id=201147

Reviewed by Tim Horton.

Tools:

Add plumbing for a new script controller hook to wait for the double tap delay to pass. On non-iOS, this
resolves immediately; on iOS, we inspect the content view for tap gestures that require more than one tap, and
find the value of the maximum double tap delay. We then delay for this amount of time before resolving.

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.h:

(WTR::UIScriptController::doAfterDoubleTapDelay):

  • WebKitTestRunner/ios/UIScriptControllerIOS.h:
  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptControllerIOS::doAfterDoubleTapDelay):

LayoutTests:

This was used in layout tests that simulate repeated taps to work around <webkit.org/b/201129>, and should no
longer be needed after <https://trac.webkit.org/changeset/249112/webkit>. Instead, we can just use UIHelper's
activateElement as intended in cases where successive taps in the test does not result in a double-click; for
the cases where we need to avoid triggering double clicks when tapping (e.g. in several payment tests), use a
new script controller hook to wait for the double tap gesture delay before continuing.

  • fast/forms/ios/file-upload-panel.html:
  • http/tests/adClickAttribution/anchor-tag-attributes-validation-expected.txt:

Rebaseline more line numbers.

  • http/tests/adClickAttribution/anchor-tag-attributes-validation.html:

Refactor this test so that the links are laid out in two (or more) columns to avoid firing the double click
gesture recognizer instead of the synthetic click gesture.

  • http/tests/resources/payment-request.js:

(activateThen):

Instead of using activateElementAtHumanSpeed, wait for the platform double tap delay first, and then simulate
a click using activateElement.

  • resources/ui-helper.js:

(window.UIHelper.waitForDoubleTapDelay):

Add a new UIHelper method to wait for the platform double tap delay. See Tools ChangeLog for more details.

(window.UIHelper):
(window.UIHelper.activateElementAtHumanSpeed.return.new.Promise): Deleted.
(window.UIHelper.activateElementAtHumanSpeed): Deleted.

4:36 PM Changeset in webkit [249124] by zhifei_fang@apple.com
  • 8 edits in trunk/Tools

[results.webkit.org Timline] Add symbols to the timeline dot
https://bugs.webkit.org/show_bug.cgi?id=201105

Reviewed by Jonathan Bedard.

  • resultsdbpy/resultsdbpy/view/static/js/timeline.js:
  • resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js:

(Timeline.CanvasSeriesComponent): Modify the drawDot api to provide user ability to add symbol to the dots, it supports unicode symbol

  • resultsdbpy/resultsdbpy/view/templates/base.html: Add the encoding UTF-8 for the page, so that we can add unicode symbol to the dots
4:20 PM Changeset in webkit [249123] by Chris Dumez
  • 8 edits
    13 adds in trunk/LayoutTests

Resync web-platform-tests/html/browsers/the-window-object from upstream
https://bugs.webkit.org/show_bug.cgi?id=201145

Reviewed by Youenn Fablet.

Resync web-platform-tests/html/browsers/the-window-object from upstream 552bd3bf8bc1be.

  • resources/resource-files.json:
  • web-platform-tests/html/browsers/the-window-object/*:
4:01 PM Changeset in webkit [249122] by Devin Rousso
  • 3 edits in trunk/LayoutTests

Unreviewed, fix test failure after r200971

  • inspector/timeline/line-column-expected.txt:
  • inspector/debugger/tail-deleted-frames-this-value.html:

Add messages to all InspectorTest.assert so we can know which one is firing on the bots.

3:31 PM Changeset in webkit [249121] by ysuzuki@apple.com
  • 2 edits in trunk/Source/bmalloc

[bmalloc] Disable IsoHeap completely if DebugHeap is enabled
https://bugs.webkit.org/show_bug.cgi?id=201154

Reviewed by Simon Fraser.

Previously we had the guarantee that IsoHeap is disabled when DebugHeap is enabled.
But this is guaranteed in a bit tricky way: when DebugHeap is enabled, Gigacage is disabled.
And IsoHeap is disabled when Gigacage is disabled. However r249065 enabled IsoHeap even if
Gigacage is disabled. This accidentally enabled IsoHeap even if DebugHeap is enabled.

Currently, this is incorrect. When DebugHeap is enabled, we do not start bmalloc::Scavenger.
So IsoHeap does not work. In addition, when DebugHeap is enabled, we want to investigate the Malloc data.
However IsoHeap wipes these information for IsoHeaped objects. Moreover enabling IsoHeap is not free
in terms of memory usage: bmalloc::Scavenger starts working.

So we should not enable IsoHeap in such an accidental way for DebugHeap environment. If we consider enabling
IsoHeap even if Malloc=1 is specified, we should first examine how memory is used by this change because
the users of Malloc=1 requires explicitly tight memory usage.

In this patch, we remove the accidental enabling of IsoHeap for DebugHeap by checking DebugHeap status in IsoTLS.

  • bmalloc/IsoTLS.cpp:

(bmalloc::IsoTLS::determineMallocFallbackState):

3:21 PM Changeset in webkit [249120] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Optimize computation of AbsoluteClipRects clip rects
https://bugs.webkit.org/show_bug.cgi?id=201148

Reviewed by Zalan Bujtas.

When adding layers to the compositing overlap map, we compute AbsoluteClipRects for every
layer which is expensive. This was more expensive than necessary because we converted them
to TemporaryClipRects when crossing painting boundaries, but AbsoluteClipRects don't
care about painting boundaries, so don't do this.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects const):

3:16 PM Changeset in webkit [249119] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Drop WEBCORE_EXPORT from ChromeClient class
https://bugs.webkit.org/show_bug.cgi?id=201146

Reviewed by Alex Christensen.

Drop WEBCORE_EXPORT from ChromeClient class. All its methods and either pure virtual or inlined in the header.

  • page/ChromeClient.h:
2:59 PM Changeset in webkit [249118] by Devin Rousso
  • 9 edits
    2 deletes in trunk/Source/WebInspectorUI

Web Inspector: decrease horizontal padding of WI.ScopeBar to have more room
https://bugs.webkit.org/show_bug.cgi?id=201090

Reviewed by Joseph Pecoraro.

There's a lot of "wasted" padding space around each item that we could reuse (or "move") for
other navigation items.

  • UserInterface/Views/FilterBar.css:

(.filter-bar > .navigation-bar > .item.scope-bar):

  • UserInterface/Views/RadioButtonNavigationItem.css:

(.navigation-bar .item.radio.button.text-only):

  • UserInterface/Views/ScopeBar.css:

(.scope-bar):
(body[dir=ltr] .scope-bar > li.multiple > select):
(body[dir=rtl] .scope-bar > li.multiple > select):
(.scope-bar > li.multiple > .arrows):

  • UserInterface/Views/RadioButtonNavigationItem.js:

(WI.RadioButtonNavigationItem):
(WI.RadioButtonNavigationItem.prototype.update): Deleted.
There's no reason to forcibly set the min-width since all instances are just text.

  • UserInterface/Views/AuditTestGroupContentView.js:

(WI.AuditTestGroupContentView.prototype.initialLayout):

  • UserInterface/Views/AuditTestGroupContentView.css:

(.content-view.audit-test-group > header > nav:not(:empty):before): Deleted.
Remove the unnecessary "Showing: " prefix before the WI.ScopeBar.

  • UserInterface/Views/ScopeRadioButtonNavigationItem.js: Removed.
  • UserInterface/Views/ScopeRadioButtonNavigationItem.css: Removed.

These classes were never used.

  • Localizations/en.lproj/localizedStrings.js:
2:09 PM Changeset in webkit [249117] by Ross Kirsling
  • 9 edits in trunk

[JSC] Ensure x?.y ?? z is fast
https://bugs.webkit.org/show_bug.cgi?id=200875

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/nullish-coalescing.js:

Source/JavaScriptCore:

We anticipate x?.y ?? z to quickly become a common idiom in JS. With a little bytecode rearrangement,
we can avoid the "load undefined and check it" dance in the middle and just turn this into two jumps.

Before:

(get x)

----- jundefined_or_null
| (get y)
| --- jmp

| (load undefined)

  • jnundefined_or_null

| (get z)

end

After:

(get x)

--- jundefined_or_null
| (get y)
| - jnundefined_or_null

| (get z)
end

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::popOptionalChainTarget): Added specialization.

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

(JSC::CoalesceNode::emitBytecode):
(JSC::OptionalChainNode::emitBytecode):

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::makeDeleteNode):
(JSC::ASTBuilder::makeCoalesceNode): Added.
(JSC::ASTBuilder::makeBinaryNode):

  • parser/NodeConstructors.h:

(JSC::CoalesceNode::CoalesceNode):

  • parser/Nodes.h:

(JSC::ExpressionNode::isDeleteNode const): Added. (Replaces OptionalChainNode::m_isDelete.)

1:42 PM Changeset in webkit [249116] by ysuzuki@apple.com
  • 2 edits in trunk/Tools

Unreviewed, remove useMaximalFlushInsertionPhase use
https://bugs.webkit.org/show_bug.cgi?id=201036

  • Scripts/run-jsc-stress-tests:
1:26 PM Changeset in webkit [249115] by ddkilzer@apple.com
  • 4 edits
    1 add in trunk

Don't compute upconverted characters twice in buildQuery() in DataDetection.mm
<https://webkit.org/b/201144>
<rdar://problem/54689399>

Reviewed by Brent Fulgham.

Source/WebCore:

  • editing/cocoa/DataDetection.mm:

(WebCore::buildQuery): Extract common variables to prevent double
conversion for 8-bit strings.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add

DataDetectorsTestIOS.mm to the project.

  • TestWebKitAPI/Tests/ios/DataDetectorsTestIOS.mm: Add a new

test for Data Detectors for phone numbers.

1:22 PM Changeset in webkit [249114] by Alan Coon
  • 1 copy in tags/Safari-608.1.49

Tag Safari-608.1.49.

12:58 PM Changeset in webkit [249113] by Wenson Hsieh
  • 2 edits in trunk/LayoutTests

Unreviewed, unmark two datalist tests as timing out on iOS 13 after r249112

  • platform/ios/TestExpectations:
12:37 PM Changeset in webkit [249112] by Wenson Hsieh
  • 23 edits in trunk

REGRESSION (iOS 13): Tests that simulate multiple back-to-back single taps fail or time out
https://bugs.webkit.org/show_bug.cgi?id=201129
<rdar://problem/51857277>

Reviewed by Tim Horton.

Source/WebKit:

Adds a new SPI hook in WebKit to let clients know when a synthetic tap gesture that has ended has been reset.
See Tools/ChangeLog and LayoutTests/ChangeLog for more details.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _doAfterResettingSingleTapGesture:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _singleTapDidReset:]):
(-[WKContentView _doAfterResettingSingleTapGesture:]):

Tools:

The tests in editing/pasteboard/ios were timing out on iOS 13 before this change. This is because they simulate
back-to-back single taps; while this is recognized as two single taps on iOS 12 and prior, only the first single
tap is recognized on iOS 13 (and the second is simply dropped on the floor). This occurs because the synthetic
single tap gesture is reset slightly later on iOS 13 compared to iOS 12, so when the second tap is dispatched,
the gesture recognizer is still in "ended" state after the first tap on iOS 13, which means the gesture isn't
capable of recognizing further touches yet.

In UIKit, a gesture recognizer is only reset once its UIGestureEnvironment's containing dependency subgraph no
longer contains gestures that are active. In iOS 12, the synthetic click gesture is a part of a dependency
subgraph that contains only itself and the normal (blocking) double tap gesture which requires the click to fail
before it can be recognized; immediately after simulating the tap, both these gestures are inactive, which
allows both of them to be reset.

However, in iOS 13, the synthetic click gesture is part of a gesture dependency graph that contains the double
tap for double click gesture, as well as the non-blocking double tap gesture, both of which are still active
immediately after sending the first tap. This change in dependencies is caused by the introduction of
UIUndoGestureInteraction's single and double three-finger tap gestures, which (in -[UIUndoGestureInteraction
gestureRecognizer:shouldBeRequiredToFailByGestureRecognizer:]) explicitly add all other taps as failure
requirements. This effectively links the synthetic single tap gesture to most of the other gestures in
WKContentView's dependency graph by way of these tap gestures for the undo interaction.

All this means that there is now a short (~50 ms) delay after the synthetic single tap gestures is recognized,
before it can be recognized again. To account for this new delay in our test infrastructure, simply wait for
single tap gestures that have ended to reset before attempting to send subsequent single taps. We do this by
introducing WebKit testing SPI to invoke a completion handler after resetting the synthetic click gesture (only
if necessary - i.e., if the gesture is in ended state when we are about to begin simulating the tap). This
allows calls to UIScriptController::singleTapAtPoint to be reliably recognized as single taps without
requiring arbitrary 120 ms "human speed" delays.

This fixes a number of flaky or failing layout tests, including the tests in editing/pasteboard/ios.

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.h:

(WTR::UIScriptController::doubleTapAtPoint):

Add a delay parameter to doubleTapAtPoint. A number of layout tests were actually simulating double click
gestures by simulating two back-to-back single taps; this is done for the purposes of being able to add a "human
speed" delay prior to the second single tap gesture. After the change to wait for the single tap gesture to
reset before attempting to simulate the next tap, this strategy no longer works, since the second gesture is
recognized only as a single tap instead of a double tap.

Instead, we add a delay parameter to UIScriptController::doubleTapAtPoint, which the "human speed" double tap
gestures use instead to wait after simulating the first tap.

  • WebKitTestRunner/ios/HIDEventGenerator.h:
  • WebKitTestRunner/ios/HIDEventGenerator.mm:

(-[HIDEventGenerator _waitFor:]):
(-[HIDEventGenerator sendTaps:location:withNumberOfTouches:delay:completionBlock:]):

Plumb the tap gesture delay through to this helper method.

(-[HIDEventGenerator tap:completionBlock:]):
(-[HIDEventGenerator doubleTap:delay:completionBlock:]):
(-[HIDEventGenerator twoFingerTap:completionBlock:]):
(-[HIDEventGenerator sendTaps:location:withNumberOfTouches:completionBlock:]): Deleted.
(-[HIDEventGenerator doubleTap:completionBlock:]): Deleted.

  • WebKitTestRunner/ios/UIScriptControllerIOS.h:
  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptControllerIOS::waitForSingleTapToReset const):

Add a new helper to wait for the content view's single tap gesture to reset if needed; call this before
attempting to simulate single taps (either using a stylus, or with a regular touch).

(WTR::UIScriptControllerIOS::singleTapAtPointWithModifiers):
(WTR::UIScriptControllerIOS::doubleTapAtPoint):
(WTR::UIScriptControllerIOS::stylusTapAtPointWithModifiers):

LayoutTests:

Adjusts a few layout tests after changes to UIScriptController::doubleTapAtPoint and
UIScriptController::singleTapAtPoint.

  • editing/selection/ios/change-selection-by-tapping.html:

Tweak this test to tap the page 12 times instead of 20 (which seems to cause occasional timeouts locally, when
running all layout tests with a dozen active simulators).

  • fast/events/ios/double-tap-zoom.html:
  • fast/events/ios/viewport-device-width-allows-double-tap-zoom-out.html:
  • fast/events/ios/viewport-shrink-to-fit-allows-double-tap.html:

Augment a few call sites of doubleTapAtPoint with a 0 delay. Ideally, these should just use ui-helper.js, but
we can refactor these tests as a part of folding basic-gestures.js into ui-helper.js.

  • http/tests/adClickAttribution/anchor-tag-attributes-validation-expected.txt:
  • http/tests/security/anchor-download-block-crossorigin-expected.txt:

Rebaseline these layout tests, due to change in line numbers.

  • platform/ipad/TestExpectations:

Unskip these tests on iPad, now that they should pass.

  • pointerevents/utils.js:

(const.ui.new.UIController.prototype.doubleTapToZoom):

  • resources/basic-gestures.js:

(return.new.Promise.):
(return.new.Promise):

Adjust some more call sites of doubleTapAtPoint. Ideally, these should use just ui-helper.js too.

  • resources/ui-helper.js:

(window.UIHelper.doubleTapAt.return.new.Promise):
(window.UIHelper.doubleTapAt):
(window.UIHelper.humanSpeedDoubleTapAt):
(window.UIHelper.humanSpeedZoomByDoubleTappingAt):

Add a delay parameter to doubleTapAt to specify a delay after each simulated tap. By default, this is 0, but
the humanSpeed* helpers add a delay of 120 milliseconds. Additionally, these helpers were previously calling
singleTapAtPoint twice, with a timeout in between to add a delay. Instead, call doubleTapAtPoint with a
nonzero delay; otherwise, we'll end up waiting in singleTapAtPoint for the gesture subgraph containing both
the double tap gestures and the synthetic single tap gesture to reset, which causes these two single taps to no
longer be recognized as a double tap gesture.

(window.UIHelper.zoomByDoubleTappingAt):

12:18 PM Changeset in webkit [249111] by Jonathan Bedard
  • 3 edits in trunk/Tools

results.webkit.org: Allow clicking on the tooltip arrow
https://bugs.webkit.org/show_bug.cgi?id=201103

Rubber-stamped by Aakash Jain.

By design, the arrow sits above the canvas and intercepts mouse events from it.
This will often make an element that has a tooltip unclickable.

  • resultsdbpy/resultsdbpy/view/static/js/timeline.js:

(xAxisFromScale):
(TimelineFromEndpoint.prototype.render.onDotEnterFactory):
(TimelineFromEndpoint.prototype.render):

  • resultsdbpy/resultsdbpy/view/static/js/tooltip.js:

(_ToolTip):
(_ToolTip.prototype.toString): Trigger onClick callback when the arrow is clicked.
(_ToolTip.prototype.set): Set the onClick callback.

12:08 PM Changeset in webkit [249110] by Brent Fulgham
  • 23 edits in trunk/Source

[FTW] Go back to ID2D1Bitmap as our NativeImage type
https://bugs.webkit.org/show_bug.cgi?id=201122

Reviewed by Alex Christensen.

In Bug 200093 I switched the OS type of NativeImagePtr from ID2D1Bitmap to IWICBitmap.
However, this was an ill-advised approach, because it dramatically harmed performance due
to the heavy use of software rendering.

I originally made this change because I thought this was the only way to get to the backing
bits of the bitmaps, but it turns out that a more recent Direct2D data type (ID2D1Bitmap1)
has the ability to map its memory to CPU-accessible memory, allowing software filter effects.

This patch switches back to the ID2D1Bitap data type, and hooks up the ID2D1Bitmap1 data type
to access the underlying memory of the bitmaps when software filter effects are used.

Source/WebCore:

  • platform/graphics/ImageBuffer.h:
  • platform/graphics/NativeImage.h:
  • platform/graphics/texmap/BitmapTextureGL.cpp:
  • platform/graphics/win/Direct2DOperations.cpp:
  • platform/graphics/win/Direct2DOperations.h:
  • platform/graphics/win/Direct2DUtilities.cpp:

(WebCore::Direct2D::writeDiagnosticPNGToPath):
(WebCore::Direct2D::writeImageToDiskAsPNG): Deleted.

  • platform/graphics/win/Direct2DUtilities.h:
  • platform/graphics/win/GraphicsContextDirect2D.cpp:
  • platform/graphics/win/ImageBufferDataDirect2D.cpp:
  • platform/graphics/win/ImageBufferDataDirect2D.h:
  • platform/graphics/win/ImageBufferDirect2D.cpp:
  • platform/graphics/win/ImageDecoderDirect2D.cpp:
  • platform/graphics/win/NativeImageDirect2D.cpp:
  • platform/graphics/win/PatternDirect2D.cpp:
  • svg/graphics/SVGImage.cpp:

Source/WebKit:

Reviewed by Alex Christensen.

  • Shared/ShareableBitmap.h:
  • Shared/win/ShareableBitmapDirect2D.cpp:
  • UIProcess/win/BackingStoreDirect2D.cpp:
  • WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:
11:58 AM Changeset in webkit [249109] by weinig@apple.com
  • 5 edits in trunk/Source/WebCore

[WHLSL] TypeNamer can be simplified by replacing BaseTypeNameNode with uniqued AST::UnnamedTypes
https://bugs.webkit.org/show_bug.cgi?id=200632

Reviewed by Saam Barati.

There is no longer a reason to keep a parallel tree of the UnnamedType-like objects
BaseTypeNameNodes. Instead, we can store a single HashMap mapping from UnnamedTypeKeys
to MangledTypeName, and use the the UnnamedType stored in the UnnamedTypeKey while
emitting the metal code. This removes the parallel BaseTypeNameNode type hierarchy
and removes an extra allocation for each UnnamedType.

  • Modules/webgpu/WHLSL/AST/WHLSLUnnamedTypeHash.h:

Define HashTraits and DefaultHash specializations for UnnamedTypeKey to simplify
uses of UnnamedTypeKey as a key in HashMap/HashSet.

  • Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.h:
  • Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:

(WebCore::WHLSL::Metal::TypeNamer::insert): Deleted.
(WebCore::WHLSL::Metal::TypeNamer::generateUniquedTypeName):
Replace old insert function with generateUniquedTypeName, which uniques and generates
names for the UnnamedType and any 'parent' UnnamedTypes.

(WebCore::WHLSL::Metal::BaseTypeNameNode): Deleted.
Remove BaseTypeNameNode and subclasses.

(WebCore::WHLSL::Metal::TypeNamer::find): Deleted.
(WebCore::WHLSL::Metal::TypeNamer::createNameNode): Deleted.
We no longer need the find or createNameNode functions, as the UnnamedTypes can be now be
used directly everywhere.

(WebCore::WHLSL::Metal::TypeNamer::emitUnnamedTypeDefinition):
Switch to directly using the UnnamedType and always have the caller pass in the mangled
name, since in the main emit loop, we always have access to the them. Also, inline the
the recursive calls to emitNamedTypeDefinition for 'parent' types to avoid unnecessary
extra switch over the kind getting the parent, and avoid it entirely for TypeReference
which never has a parent.

(WebCore::WHLSL::Metal::TypeNamer::emitNamedTypeDefinition):
Switches to now passing in the neighbors, since they are always available in the main
emit loop. Also move to a switch statement rather than ifs for consistency.

(WebCore::WHLSL::Metal::TypeNamer::emitMetalTypeDefinitions):
Pass keys and values into the emit functions to avoid double lookups.

(WebCore::WHLSL::Metal::TypeNamer::mangledNameForType):
Update to hash lookup.

  • Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:

Take advantage of default HashTraits and DefaultHash for UnnamedTypeKey.

11:43 AM Changeset in webkit [249108] by jiewen_tan@apple.com
  • 18 edits in trunk

[WebAuthn] Support HID authenticators on iOS
https://bugs.webkit.org/show_bug.cgi?id=201084
<rdar://problem/51908390>

Reviewed by Youenn Fablet.

Source/WebCore/PAL:

  • pal/spi/cocoa/IOKitSPI.h:

Move IOHIDDevice.h and IOHIDManager.h to IOKitSPI.h given they are in iOS.

Source/WebKit:

This patch makes the macOS HID implementation available in iOS as well.
Mostly, it removes the PLATFORM(MAC) compile time flag.

  • UIProcess/WebAuthentication/AuthenticatorManager.cpp:

(WebKit::AuthenticatorManagerInternal::collectTransports):

  • UIProcess/WebAuthentication/AuthenticatorTransportService.cpp:

(WebKit::AuthenticatorTransportService::create):
(WebKit::AuthenticatorTransportService::createMock):

  • UIProcess/WebAuthentication/Cocoa/HidConnection.h:
  • UIProcess/WebAuthentication/Cocoa/HidConnection.mm:
  • UIProcess/WebAuthentication/Cocoa/HidService.h:
  • UIProcess/WebAuthentication/Cocoa/HidService.mm:
  • UIProcess/WebAuthentication/Cocoa/NfcConnection.mm:

(WebKit::NfcConnection::NfcConnection):
A tentative solution before there is an official UI.

  • UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:
  • UIProcess/WebAuthentication/Mock/MockHidConnection.h:
  • UIProcess/WebAuthentication/Mock/MockHidService.cpp:
  • UIProcess/WebAuthentication/Mock/MockHidService.h:
  • UIProcess/WebAuthentication/fido/CtapHidDriver.cpp:
  • UIProcess/WebAuthentication/fido/CtapHidDriver.h:

LayoutTests:

  • platform/ios-wk2/TestExpectations:

Unskips HID tests for iOS.

11:41 AM Changeset in webkit [249107] by jiewen_tan@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed, test gardening

  • platform/mac-wk2/TestExpectations:

Skip WebAuthn tests for HighSierra and Mojave.

11:03 AM Changeset in webkit [249106] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

REGRESSION (18E140): “return streaming movie to real time” suggesting “resume real time streaming”
https://bugs.webkit.org/show_bug.cgi?id=201108
<rdar://problem/46372525>

Patch by Peng Liu <Peng Liu> on 2019-08-26
Reviewed by Eric Carlson.

Update Localizable.strings.

No new test.

  • en.lproj/Localizable.strings:
  • platform/LocalizedStrings.cpp:

(WebCore::localizedMediaControlElementHelpText):

10:51 AM Changeset in webkit [249105] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

CacheStorageConnection::computeRealBodySize is not thread-safe
https://bugs.webkit.org/show_bug.cgi?id=201074

Reviewed by Chris Dumez.

In case of a form data, the size computation might require sync IPC to the network process which is not thread-safe
In that case, hop to the main thread to compute the size of the body.
Covered by existing service worker tests in Debug mode.

  • Modules/cache/CacheStorageConnection.cpp:

(WebCore::formDataSize):
(WebCore::CacheStorageConnection::computeRealBodySize):

10:48 AM Changeset in webkit [249104] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[EWS] Do not append additional '(failure)' string at the end of custom failure message in EWS Buildbot
https://bugs.webkit.org/show_bug.cgi?id=201140

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps.py:

(TestWithFailureCount.getResultSummary): Do not append (failure) when in case of custom status.

  • BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests accordingly.
10:36 AM Changeset in webkit [249103] by commit-queue@webkit.org
  • 1 edit
    1 add in trunk/Source/ThirdParty/ANGLE

Add a script to update ANGLE
https://bugs.webkit.org/show_bug.cgi?id=201109

Patch by James Darpinian <jdarpinian@google.com> on 2019-08-26
Reviewed by Alex Christensen.

  • update-angle.sh: Added.
10:21 AM Changeset in webkit [249102] by Jonathan Bedard
  • 2 edits in trunk/Tools

run-webkit-tests: Cap the number of automatically booted simulators at 12
https://bugs.webkit.org/show_bug.cgi?id=201139

Reviewed by Aakash Jain.

To make local development with simulators more pleasant, machines should
never automatically boot more than 12 simulators.

  • Scripts/webkitpy/xcode/simulated_device.py:

(SimulatedDeviceManager.max_supported_simulators):

10:12 AM Changeset in webkit [249101] by russell_e@apple.com
  • 6 edits
    5 deletes in trunk

Unreviewed, rolling out r248961.

Same patch was re-landed after being rolled out. Patch is
causing Catalina/iOS 13 test failures. Rolling out.

Reverted changeset:

"Verify Prefetch and credential behavior"
https://bugs.webkit.org/show_bug.cgi?id=200000
https://trac.webkit.org/changeset/248961

10:08 AM Changeset in webkit [249100] by aakash_jain@apple.com
  • 6 edits in trunk/Tools

[ews] Add EWS queue for applying watchlist
https://bugs.webkit.org/show_bug.cgi?id=201072

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps.py:

(ApplyWatchList): Build step to apply watchlist.
(ApplyWatchList.init): Set logEnviron to False.
(ApplyWatchList.getResultSummary): Updated the description in case of failure.

  • BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
  • BuildSlaveSupport/ews-build/factories.py:

(WatchListFactory): Build factory for WatchList.

  • BuildSlaveSupport/ews-build/loadConfig.py:
  • BuildSlaveSupport/ews-build/config.json:
9:57 AM Changeset in webkit [249099] by russell_e@apple.com
  • 2 edits in trunk/LayoutTests

rdar://51857070 (iPad: Many fast/text-autosizing layout tests are consistently failing)

Unreviewed Test Gardening.
Tests are no longer failing. Removing test expectations.

  • platform/ipad/TestExpectations:
9:48 AM Changeset in webkit [249098] by achristensen@apple.com
  • 1 edit
    1 delete in trunk

Remove NPAPI Examples
https://bugs.webkit.org/show_bug.cgi?id=201089

Reviewed by Alexey Proskuryakov.

We are only supporting NPAPI for flash until its upcoming end of life.
We don't need to encourage the creation of new NPAPI plugins by having examples.

  • Examples: Removed.
8:07 AM Changeset in webkit [249097] by Adrian Perez de Castro
  • 3 edits in releases/WebKitGTK/webkit-2.24/Source/JavaScriptCore

Merged r249095 - Missing media controls when WebKit is built with Python3
https://bugs.webkit.org/show_bug.cgi?id=194367

Reviewed by Carlos Garcia Campos.

The JavaScript minifier script jsmin.py expects a text stream
with text type as input, but the script make-js-file-arrays.py
was passing to it a FileIO() object. So, when the jsmin script
called read() over this object, python3 was returning a type of
bytes, but for python2 it returns type str.

This caused two problems: first that jsmin failed to do any minifying
because it was comparing strings with a variable of type bytes.
The second major problem was in the write() function, when the
jsmin script tried to convert a byte character to text by calling
str() on it. Because what this does is not to convert from byte
type to string, but to simply generate a string with the format b'c'.
So the jsmin script was returning back as minified JS complete
garbage in the form of "b't'b'h'b'h'b'i" for python3.

Therefore, when WebKit was built with python3 this broke everything
that depended on the embedded JS code that make-js-file-arrays.py
was supposed to generate, like the media controls and the WebDriver
atoms.

Fix this by reworking the code in make-js-file-arrays script to
read the data from the file using a TextIOWrapper in python 3
with decoding for 'utf-8'. This ensures that the jsmin receives
a text type. For python2 keep using the same FileIO class.

On the jsmin.py script remove the problematic call to str() inside
the write() function when running with python3.
On top of that, add an extra check in jsmin.py script to make it
fail if the character type read is not the one expected. This
will cause the build to fail instead of failing silently like
now. I did some tests and the runtime cost of this extra check
is almost zero.

  • Scripts/jsmin.py:

(JavascriptMinify.minify.write):
(JavascriptMinify):

  • Scripts/make-js-file-arrays.py:

(main):

8:00 AM Changeset in webkit [249096] by youenn@apple.com
  • 37 edits
    2 copies
    3 adds in trunk

Add a WebsiteDataStore delegate to handle AuthenticationChallenge that do not come from pages
https://bugs.webkit.org/show_bug.cgi?id=196870
LayoutTests/imported/w3c:

<rdar://problem/54593556>

Reviewed by Alex Christensen.

  • web-platform-tests/service-workers/service-worker/websocket-in-service-worker.https-expected.txt:

Source/WebKit:

Reviewed by Alex Christensen.

Make NetworkProcess provide the session ID for any authentication challenge.
In case there is no associated page for the authentication challenge or this is related to a service worker,
ask the website data store to take a decision.
Add website data store delegate to allow applications to make the decision.
Restrict using the delegate to server trust evaluation only.

Make ping loads reuse the same mechanism.

Covered by service worker tests and updated beacon test.

  • NetworkProcess/NetworkCORSPreflightChecker.cpp:

(WebKit::NetworkCORSPreflightChecker::didReceiveChallenge):

  • NetworkProcess/NetworkDataTask.cpp:

(WebKit::NetworkDataTask::sessionID const):

  • NetworkProcess/NetworkDataTask.h:
  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::didReceiveChallenge):

  • NetworkProcess/NetworkLoadChecker.h:

(WebKit::NetworkLoadChecker::networkProcess):

  • NetworkProcess/PingLoad.cpp:

(WebKit::PingLoad::didReceiveChallenge):

  • Shared/Authentication/AuthenticationManager.cpp:

(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):

  • Shared/Authentication/AuthenticationManager.h:
  • Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.h: Copied from Tools/WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.h.
  • Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.mm: Copied from Source/WebKit/Shared/Authentication/cocoa/ClientCertificateAuthenticationXPCConstants.h.

(WebKit::toAuthenticationChallengeDisposition):

  • SourcesCocoa.txt:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(WebsiteDataStoreClient::WebsiteDataStoreClient):

  • UIProcess/API/Cocoa/_WKWebsiteDataStoreDelegate.h:
  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::NavigationClient::didReceiveAuthenticationChallenge):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::didReceiveAuthenticationChallenge):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
  • UIProcess/ServiceWorkerProcessProxy.cpp:
  • UIProcess/ServiceWorkerProcessProxy.h:
  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::isServiceWorkerPageID const):

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebsiteData/WebsiteDataStoreClient.h:

(WebKit::WebsiteDataStoreClient::didReceiveAuthenticationChallenge):

  • WebKit.xcodeproj/project.pbxproj:

Tools:

Reviewed by Alex Christensen.

Implement the new delegate by respecting the value set by testRunner.setAllowsAnySSLCertificate
Accept any server certificate by default.

  • WebKitTestRunner/TestController.cpp:
  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::cocoaResetStateToConsistentValues):
(WTR::TestController::setAllowsAnySSLCertificate):

  • WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.h:
  • WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.mm:

(-[TestWebsiteDataStoreDelegate didReceiveAuthenticationChallenge:completionHandler:]):
(-[TestWebsiteDataStoreDelegate setAllowAnySSLCertificate:]):

LayoutTests:

Reviewed by Alex Christensen.

Add tests to validate that the delegate decision is respected for beacons and service worker loads.

  • http/wpt/beacon/cors/crossorigin-arraybufferview-no-preflight-expected.txt:
  • http/wpt/beacon/cors/crossorigin-arraybufferview-no-preflight.html:
  • http/wpt/beacon/resources/beacon-preflight.py:

(main):

  • http/wpt/service-workers/resources/lengthy-pass.py:

(main):

  • http/wpt/service-workers/server-trust-evaluation.https-expected.txt: Added.
  • http/wpt/service-workers/server-trust-evaluation.https.html: Added.
  • http/wpt/service-workers/server-trust-worker.js: Added.
  • http/tests/ssl/certificate-validation.html: Remove unneeded setting call

since we deny server trust requests if SSL certificates are not all allowed.

7:58 AM WebKitGTK/2.24.x edited by Adrian Perez de Castro
(diff)
7:54 AM WebKitGTK/2.24.x edited by Adrian Perez de Castro
(diff)
7:36 AM Changeset in webkit [249095] by clopez@igalia.com
  • 3 edits in trunk/Source/JavaScriptCore

Missing media controls when WebKit is built with Python3
https://bugs.webkit.org/show_bug.cgi?id=194367

Reviewed by Carlos Garcia Campos.

The JavaScript minifier script jsmin.py expects a text stream
with text type as input, but the script make-js-file-arrays.py
was passing to it a FileIO() object. So, when the jsmin script
called read() over this object, python3 was returning a type of
bytes, but for python2 it returns type str.

This caused two problems: first that jsmin failed to do any minifying
because it was comparing strings with a variable of type bytes.
The second major problem was in the write() function, when the
jsmin script tried to convert a byte character to text by calling
str() on it. Because what this does is not to convert from byte
type to string, but to simply generate a string with the format b'c'.
So the jsmin script was returning back as minified JS complete
garbage in the form of "b't'b'h'b'h'b'i" for python3.

Therefore, when WebKit was built with python3 this broke everything
that depended on the embedded JS code that make-js-file-arrays.py
was supposed to generate, like the media controls and the WebDriver
atoms.

Fix this by reworking the code in make-js-file-arrays script to
read the data from the file using a TextIOWrapper in python 3
with decoding for 'utf-8'. This ensures that the jsmin receives
a text type. For python2 keep using the same FileIO class.

On the jsmin.py script remove the problematic call to str() inside
the write() function when running with python3.
On top of that, add an extra check in jsmin.py script to make it
fail if the character type read is not the one expected. This
will cause the build to fail instead of failing silently like
now. I did some tests and the runtime cost of this extra check
is almost zero.

  • Scripts/jsmin.py:

(JavascriptMinify.minify.write):
(JavascriptMinify):

  • Scripts/make-js-file-arrays.py:

(main):

2:41 AM Changeset in webkit [249094] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

MessagePort should be WeakPtrFactoryInitialization::Eager
https://bugs.webkit.org/show_bug.cgi?id=201073

Reviewed by Chris Dumez.

Covered by existing layout tests.

  • dom/MessagePort.h:

Aug 25, 2019:

11:16 PM Changeset in webkit [249093] by Simon Fraser
  • 19 edits
    1 add in trunk/Source/WebKit

[iOS WK2] Make a strongly-typed TransactionID to replace uint64_t transactionIDs
https://bugs.webkit.org/show_bug.cgi?id=199983

Reviewed by Dean Jackson.

Add TransactionID which is a MonotonicObjectIdentifier<TransactionIDType>. This is modeled
after ObjectIdentifier<>, but we can't use that because it doesn't have a guarantee of
values always increasing by 1 (all derived classes share the same value source). Also, we
need a per-RemoteLayerTreeDrawingArea set of values, but a static seed would cause values to
be incremented by all RemoteLayerTreeDrawingAreas in a WebProcess.

Replace all the bare uint64_t with TransactionID, fixing message generation codegen.

  • Scripts/webkit/messages.py:
  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:

(WebKit::RemoteLayerTreeTransaction::transactionID const):
(WebKit::RemoteLayerTreeTransaction::setTransactionID):

  • Shared/TransactionID.h: Added.

(WebKit::MonotonicObjectIdentifier::MonotonicObjectIdentifier):
(WebKit::MonotonicObjectIdentifier::isHashTableDeletedValue const):
(WebKit::MonotonicObjectIdentifier::encode const):
(WebKit::MonotonicObjectIdentifier::decode):
(WebKit::MonotonicObjectIdentifier::operator== const):
(WebKit::MonotonicObjectIdentifier::operator> const):
(WebKit::MonotonicObjectIdentifier::operator>= const):
(WebKit::MonotonicObjectIdentifier::operator< const):
(WebKit::MonotonicObjectIdentifier::operator<= const):
(WebKit::MonotonicObjectIdentifier::operator!= const):
(WebKit::MonotonicObjectIdentifier::increment):
(WebKit::MonotonicObjectIdentifier::next const):
(WebKit::MonotonicObjectIdentifier::toUInt64 const):
(WebKit::MonotonicObjectIdentifier::operator bool const):
(WebKit::MonotonicObjectIdentifier::loggingString const):
(WebKit::MonotonicObjectIdentifier::hashTableDeletedValue):
(WebKit::MonotonicObjectIdentifier::isValidIdentifier):
(WebKit::operator<<):

  • Shared/VisibleContentRectUpdateInfo.h:

(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::lastLayerTreeTransactionID const):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _processWillSwapOrDidExit]):

  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.messages.in:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::willCommitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::resetState):

  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView cleanupInteraction]):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::commitPotentialTap):
(WebKit::WebPageProxy::handleTap):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:

(WebKit::RemoteLayerTreeDrawingArea::nextTransactionID const):
(WebKit::RemoteLayerTreeDrawingArea::lastCommittedTransactionID const):
(WebKit::RemoteLayerTreeDrawingArea::takeNextTransactionID):

  • WebProcess/WebPage/WebFrame.h:

(WebKit::WebFrame::firstLayerTreeTransactionIDAfterDidCommitLoad const):
(WebKit::WebFrame::setFirstLayerTreeTransactionIDAfterDidCommitLoad):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::handleTap):
(WebKit::WebPage::handlePotentialDoubleTapForDoubleClickAtPoint):
(WebKit::WebPage::commitPotentialTap):

6:51 PM Changeset in webkit [249092] by Fujii Hironori
  • 2 edits in trunk/Source/WTF

Regression(r248533) Assertion hit in isMainThread() for some clients using WTF because the main thread is not initialized
https://bugs.webkit.org/show_bug.cgi?id=201083
<rdar://problem/54651993>

Unreviewed build fox for Windows.

  • wtf/win/MainThreadWin.cpp:

(WTF::isMainThreadInitialized): Added.

Aug 24, 2019:

7:14 PM Changeset in webkit [249091] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Have RenderLayer::calculateClipRects() use offsetFromAncestor() when possible
https://bugs.webkit.org/show_bug.cgi?id=201066

Reviewed by Dean Jackson.

offsetFromAncestor() is a layer tree walk, so faster than localToContainerPoint(),
but we can't use it when there are transforms on the layer and intermediates up
to the ancestor.

canUseConvertToLayerCoords() was trying to answer the question about whether it's
OK to use offsetFromAncestor() (which calls convertToLayerCoords() internally), but
it has insufficient information to make a determination. Leave this issue alone, but
at least rename canUseConvertToLayerCoords().

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::updateLayerPositions):
(WebCore::RenderLayer::calculateClipRects const):

  • rendering/RenderLayer.h:
2:42 PM Changeset in webkit [249090] by Simon Fraser
  • 3 edits
    2 adds in trunk

Page crashes under CGPathAddUnevenCornersRoundedRect
https://bugs.webkit.org/show_bug.cgi?id=201117

Reviewed by Dean Jackson.
Source/WebCore:

Fix crash on https://onehtmlpagechallenge.com/entries/pure-css-still-life-water-lemon.html
We were passing CG radius values where the sum of two radii was greater than the height or
width, caused by rounding when converting from floats to doubles.

Test: fast/borders/renderable-uneven-rounded-rects.html

  • platform/graphics/cg/PathCG.cpp:

(WebCore::Path::platformAddPathForRoundedRect):

LayoutTests:

  • fast/borders/renderable-uneven-rounded-rects-expected.txt: Added.
  • fast/borders/renderable-uneven-rounded-rects.html: Added.
11:21 AM Changeset in webkit [249089] by Devin Rousso
  • 5 edits in trunk

Web Inspector: "Copy Rule" menu item does not propagate comments properly
https://bugs.webkit.org/show_bug.cgi?id=201095

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

  • UserInterface/Models/CSSProperty.js:

(WI.CSSProperty.prototype.commentOut):
(WI.CSSProperty.prototype.get formattedText):
Wrap the text in /* ${text} */ if the WI.CSSProperty isn't enabled (e.g. commented out).

LayoutTests:

  • inspector/css/generateCSSRuleString.html:
  • inspector/css/generateCSSRuleString-expected.txt:
10:35 AM Changeset in webkit [249088] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

RenderLayer::updateLayerPositions() doesn't propagate the ancestor flags correctly
https://bugs.webkit.org/show_bug.cgi?id=201115

Reviewed by Zalan Bujtas.

When an updateLayerPositions() traversal starts at a non-root layer, we failed to populate
the ancestor-related UpdateLayerPositionsFlag flags, leaving layers with missing flags
(e.g. the m_hasTransformedAncestor flag). This is detected by the patch in bug 201066.

Fix by having updateLayerPositionsAfterStyleChange() and updateLayerPositionsAfterLayout()
initialize the flags from the parent layer.

This is a behavior change not detected by any existing test, but will be exercised once
the patch from bug 201066 lands.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::flagsForUpdateLayerPositions):
(WebCore::RenderLayer::updateLayerPositionsAfterStyleChange):
(WebCore::RenderLayer::updateLayerPositionsAfterLayout):
(WebCore::outputPaintOrderTreeLegend):
(WebCore::outputPaintOrderTreeRecursive): Log hasTransformedAncestor().

  • rendering/RenderLayer.h:
9:02 AM Changeset in webkit [249087] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Make CacheStorageEngineCaches's decodeCachesNames() more robust against bad input data
https://bugs.webkit.org/show_bug.cgi?id=201102

Reviewed by Antti Koivisto.

Use Vector::tryReserveCapacity() instead of Vector::reserveInitialCapacity() in CacheStorage::decodeCachesNames()
since the size is read from disk and thus cannot be trusted. If the size is too large, reserveInitialCapacity()
would end up crashing the network process. Now, we merely discard the data if tryReserveCapacity() fails because
the size is too large.

  • NetworkProcess/cache/CacheStorageEngineCaches.cpp:

(WebKit::CacheStorage::decodeCachesNames):

6:36 AM Changeset in webkit [249086] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][TFC] Add section renderers to the layout tree (THEAD/TBODY/TFOOT)
https://bugs.webkit.org/show_bug.cgi?id=201114
<rdar://problem/54664992>

Reviewed by Antti Koivisto.

Section renderers (THEAD/TBODY/TFOOT) are direct children of the RenderTable. Let's include them in the layout tree as well.

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::TreeBuilder::createTableStructure):
(WebCore::Layout::outputInlineRuns):

6:34 AM Changeset in webkit [249085] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC] Box::isAnonymous() can not rely on the lack of ElementType.
https://bugs.webkit.org/show_bug.cgi?id=201106
<rdar://problem/54660287>

Reviewed by Antti Koivisto.

Add bool m_isAnonymous member to mark anonymous layout boxes. Anonymous boxes are not rare enough to include this variable in RareData.

  • layout/layouttree/LayoutBox.h:

(WebCore::Layout::Box::setIsAnonymous):

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::TreeBuilder::createLayoutBox):

6:31 AM Changeset in webkit [249084] by Antti Koivisto
  • 4 edits
    2 adds in trunk/Source/WebCore

Implement layout system independent text box iterator
https://bugs.webkit.org/show_bug.cgi?id=201076

Reviewed by Zalan Bujtas.

Add a generic way to traverse line layout without caring about the details of the underlying layout system.

This patch adds basic support for traversing text boxes and uses it to remove layout path specific branches in RenderTreeAsText.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • rendering/RenderTreeAsText.cpp:

(WebCore::RenderTreeAsText::writeRenderObject):
(WebCore::writeTextBox):
(WebCore::write):
(WebCore::writeTextRun): Deleted.
(WebCore::writeSimpleLine): Deleted.

  • rendering/line/LineLayoutInterfaceTextBoxes.cpp: Added.

(WebCore::LineLayoutInterface::TextBox::rect const):
(WebCore::LineLayoutInterface::TextBox::logicalRect const):
(WebCore::LineLayoutInterface::TextBox::hasHyphen const):
(WebCore::LineLayoutInterface::TextBox::isLeftToRightDirection const):
(WebCore::LineLayoutInterface::TextBox::dirOverride const):
(WebCore::LineLayoutInterface::TextBox::text const):
(WebCore::LineLayoutInterface::TextBoxIterator::TextBoxIterator):
(WebCore::LineLayoutInterface::TextBoxIterator::traverseNext):
(WebCore::LineLayoutInterface::TextBoxIterator::operator== const):
(WebCore::LineLayoutInterface::simpleLineRunResolverForText):
(WebCore::LineLayoutInterface::rangeForText):
(WebCore::LineLayoutInterface::TextBoxRange::TextBoxRange):
(WebCore::LineLayoutInterface::textBoxes):

  • rendering/line/LineLayoutInterfaceTextBoxes.h: Added.

(WebCore::LineLayoutInterface::TextBox::TextBox):
(WebCore::LineLayoutInterface::TextBoxIterator::operator++):
(WebCore::LineLayoutInterface::TextBoxIterator::operator!= const):
(WebCore::LineLayoutInterface::TextBoxIterator::operator* const):
(WebCore::LineLayoutInterface::TextBoxRange::begin const):
(WebCore::LineLayoutInterface::TextBoxRange::end const):

6:24 AM Changeset in webkit [249083] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][BFC] Non-inline formatting context(table, grid etc) root container should not collapse through.
https://bugs.webkit.org/show_bug.cgi?id=201099
<rdar://problem/54658946>

Reviewed by Antti Koivisto.

I didn't manage to find it in the spec, but surely formatting contexts like table, grid and flex should behave like
block so that their vertical margins are not adjoining, when they have at least one inflow child.

  • layout/blockformatting/BlockMarginCollapse.cpp:

(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough):

6:17 AM Changeset in webkit [249082] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC] Add THEAD/TBODY/TFOOT output to Layout::showLayoutTree
https://bugs.webkit.org/show_bug.cgi?id=201113
<rdar://problem/54664134>

Reviewed by Antti Koivisto.

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::outputLayoutBox):

6:16 AM Changeset in webkit [249081] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC] Remove redundant Layout::Box::ElementType::TableRowGroup
https://bugs.webkit.org/show_bug.cgi?id=201112
<rdar://problem/54663833>

Reviewed by Antti Koivisto.

Use Layout::Box::ElementType::TableBodyGroup instead.

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::isPaddingApplicable const):

  • layout/layouttree/LayoutBox.h:
  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::TreeBuilder::createLayoutBox):

Aug 23, 2019:

8:31 PM Changeset in webkit [249080] by Simon Fraser
  • 5 edits in trunk/Source/WebCore

RenderLayerModelObject should not call private RenderLayer functions
https://bugs.webkit.org/show_bug.cgi?id=201111

Reviewed by Zalan Bujtas.

Make RenderLayerModelObject no longer a friend class of RenderLayer, giving it a public
willRemoveChildWithBlendMode() function to call. Also make the UpdateLayerPositionsFlag
enum private, providing a updateLayerPositionsAfterStyleChange() for RenderLayerModelObject,
and changing the arguments of updateLayerPositionsAfterLayout() for FrameView.

No behavior change.

  • page/FrameView.cpp:

(WebCore::FrameView::didLayout):
(WebCore::updateLayerPositionFlags): Deleted.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::updateLayerPositionsAfterStyleChange):
(WebCore::RenderLayer::updateLayerPositionsAfterLayout):
(WebCore::RenderLayer::willRemoveChildWithBlendMode):

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

(WebCore::RenderLayerModelObject::styleDidChange):

7:22 PM Changeset in webkit [249079] by rniwa@webkit.org
  • 6 edits
    2 adds in trunk

Implement StaticRange constructor
https://bugs.webkit.org/show_bug.cgi?id=201055

Reviewed by Wenson Hsieh.

LayoutTests/imported/w3c:

Added a test from https://github.com/web-platform-tests/wpt/pull/18619
with my review comment addressed.

  • web-platform-tests/dom/interfaces-expected.txt: Rebaselined.
  • web-platform-tests/dom/ranges/StaticRange-constructor-expected.txt: Added.
  • web-platform-tests/dom/ranges/StaticRange-constructor.html: Added.

Source/WebCore:

Added the constructor to StaticRange per https://github.com/whatwg/dom/pull/778.

Test: imported/w3c/web-platform-tests/dom/ranges/StaticRange-constructor.html

  • dom/StaticRange.cpp:

(WebCore::isDocumentTypeOrAttr):
(WebCore::StaticRange::create):

  • dom/StaticRange.h:
  • dom/StaticRange.idl:
5:46 PM Changeset in webkit [249078] by Devin Rousso
  • 10 edits in trunk

Web Inspector: create additional command line api functions for other console methods
https://bugs.webkit.org/show_bug.cgi?id=200971

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

Expose all console.* functions in the command line API, since they're all already able to
be referenced via the console object.

Provide a simpler interface for other injected scripts to modify the command line API.

  • inspector/InjectedScriptModule.cpp:

(Inspector::InjectedScriptModule::ensureInjected):

  • inspector/InjectedScriptSource.js:

(InjectedScript.prototype.inspectObject):
(InjectedScript.prototype.addCommandLineAPIGetter): Added.
(InjectedScript.prototype.addCommandLineAPIMethod): Added.
(InjectedScript.prototype.hasInjectedModule): Added.
(InjectedScript.prototype.injectModule):
(InjectedScript.prototype._evaluateOn):
(InjectedScript.CommandLineAPI): Added.
(InjectedScript.prototype.module): Deleted.
(InjectedScript.prototype._savedResult): Deleted.
(bind): Deleted.
(BasicCommandLineAPI): Deleted.
(clear): Deleted.
(table): Deleted.
(profile): Deleted.
(profileEnd): Deleted.
(keys): Deleted.
(values): Deleted.
(queryInstances): Deleted.
(queryObjects): Deleted.
(queryHolders): Deleted.

Source/WebCore:

Expose all console.* functions in the command line API, since they're all already able to
be referenced via the console object.

Provide a simpler interface for other injected scripts to modify the command line API.

  • inspector/CommandLineAPIModuleSource.js:

(injectedScript._inspectObject): Added.
(normalizeEventTypes): Added.
(logEvent): Added.
(canQuerySelectorOnNode): Added.
(bind): Deleted.
(value): Deleted.
(this.method.toString): Deleted.
(CommandLineAPI): Deleted.
(CommandLineAPIImpl): Deleted.
(CommandLineAPIImpl.prototype): Deleted.
(CommandLineAPIImpl.prototype._canQuerySelectorOnNode): Deleted.
(CommandLineAPIImpl.prototype.x): Deleted.
(CommandLineAPIImpl.prototype.dir): Deleted.
(CommandLineAPIImpl.prototype.dirxml): Deleted.
(CommandLineAPIImpl.prototype.keys): Deleted.
(CommandLineAPIImpl.prototype.values): Deleted.
(CommandLineAPIImpl.prototype.profile): Deleted.
(CommandLineAPIImpl.prototype.profileEnd): Deleted.
(CommandLineAPIImpl.prototype.table): Deleted.
(CommandLineAPIImpl.prototype.screenshot): Deleted.
(CommandLineAPIImpl.prototype.monitorEvents): Deleted.
(CommandLineAPIImpl.prototype.unmonitorEvents): Deleted.
(CommandLineAPIImpl.prototype.inspect): Deleted.
(CommandLineAPIImpl.prototype.queryInstances): Deleted.
(CommandLineAPIImpl.prototype.queryObjects): Deleted.
(CommandLineAPIImpl.prototype.queryHolders): Deleted.
(CommandLineAPIImpl.prototype.copy): Deleted.
(CommandLineAPIImpl.prototype.clear): Deleted.
(CommandLineAPIImpl.prototype.getEventListeners): Deleted.
(CommandLineAPIImpl.prototype._inspectedObject): Deleted.
(CommandLineAPIImpl.prototype._normalizeEventTypes): Deleted.
(CommandLineAPIImpl.prototype._logEvent): Deleted.
(CommandLineAPIImpl.prototype._inspect): Deleted.

Source/WebInspectorUI:

Expose all console.* functions in the command line API, since they're all already able to
be referenced via the console object.

Provide a simpler interface for other injected scripts to modify the command line API.

  • UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:

(WI.JavaScriptRuntimeCompletionProvider.prototype.get _commandLineAPIKeys): Added.
(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.updateLastPropertyNames):
(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedPropertyNames):

LayoutTests:

  • http/tests/inspector/dom/cross-domain-inspected-node-access-expected.txt:
  • inspector/console/command-line-api-expected.txt:
5:24 PM Changeset in webkit [249077] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Crash under TimerBase::setNextFireTime() in the NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=201097
<rdar://problem/54658339>

Reviewed by Ryosuke Niwa.

NetworkStateNotifier is a WebCore/platform class used by both WebKitLegacy and WebKit2 in the NetworkProcess.
On iOS, the lambda in the implementation of NetworkStateNotifier::startObserving() may get called by the
underlying framework on a non-main thread and we therefore want to go back to the main thread before calling
NetworkStateNotifier::singleton().updateStateSoon(). This is important because updateStateSoon() will schedule
a WebCore::Timer. The issue is that the code was using WebThreadRun() to go back the the main thread. While
this works fine in iOS WK1, it does not do what we want in WebKit2 in the network process. Indeed, before there
is no WebThread in the network process, WebThreadRun() will simply run the block on whatever thread we're one.
This would lead to crashes when trying to schedule the Timer in updateStateSoon(). To address the issue, we now
use callOnMainThread().

  • platform/network/ios/NetworkStateNotifierIOS.mm:

(WebCore::NetworkStateNotifier::startObserving):

5:20 PM Changeset in webkit [249076] by rniwa@webkit.org
  • 3 edits in trunk/Source/WebCore

REGRESSION (r248807): Objects stored in ElementRareData are leaked
https://bugs.webkit.org/show_bug.cgi?id=200954

Reviewed by David Kilzer.

NodeRareData didn't have a virtual destructor. As a result, member variables
of ElementRareData did not get destructed properly.

  • dom/NodeRareData.cpp:
  • dom/NodeRareData.h:

(WebCore::NodeRareData::~NodeRareData):

4:08 PM Changeset in webkit [249075] by Tadeu Zagallo
  • 23 edits
    2 deletes in trunk

Remove MaximalFlushInsertionPhase
https://bugs.webkit.org/show_bug.cgi?id=201036

Reviewed by Saam Barati.

JSTests:

Remove all the references to maximal flush

  • stress/arith-ceil-on-various-types.js:

(checkCompileCountForUselessNegativeZero):

  • stress/arith-floor-on-various-types.js:

(checkCompileCountForUselessNegativeZero):

  • stress/arith-negate-on-various-types.js:

(checkCompileCountForUselessNegativeZero):

  • stress/arith-round-on-various-types.js:

(checkCompileCountForUselessNegativeZero):

  • stress/arith-trunc-on-various-types.js:

(checkCompileCountForUselessNegativeZero):

  • stress/dfg-compare-eq-via-nonSpeculativeNonPeepholeCompareNullOrUndefined.js:
  • stress/has-indexed-property-should-accept-non-int32.js:
  • stress/has-indexed-property-with-worsening-array-mode.js:
  • stress/known-int32-cant-be-used-across-bytecode-boundary.js:
  • stress/read-dead-bytecode-locals-in-must-handle-values1.js:
  • stress/read-dead-bytecode-locals-in-must-handle-values2.js:
  • stress/rest-parameter-many-arguments.js:
  • stress/set-argument-maybe-maximal-flush-should-not-extend-liveness-2.js:
  • stress/set-argument-maybe-maximal-flush-should-not-extend-liveness.js:
  • stress/to-index-string-should-not-assume-incoming-value-is-uint32.js:

Source/JavaScriptCore:

Maximal flush has found too many false positives recently, so we decided it's finally time
to remove it instead of hacking it to fix the most recent false positive.

The most recent false positive was caused by a LoadVarargs followed by a SetArgumentDefinitely
for the argument count that was being flushed in a much later block. Now, since that block was
the head of a loop, and there was a SetLocal in the same block to the same variable, this
generated a Phi of both values, which then led to the unification of their VariableAccessData
in the unification phase. This caused AI to assign the Int52 type to argument count, which
broke the AI’s assumption that it should always be an Int32.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleVarargsInlining):

  • dfg/DFGMaximalFlushInsertionPhase.cpp: Removed.
  • dfg/DFGMaximalFlushInsertionPhase.h: Removed.
  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::compileInThreadImpl):

  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

  • runtime/Options.h:
4:00 PM Changeset in webkit [249074] by Wenson Hsieh
  • 6 edits
    2 adds in trunk

[iOS] [WebKit2] Tapping on the “I’m” text suggestion after typing “i’” does nothing
https://bugs.webkit.org/show_bug.cgi?id=201085
<rdar://problem/53056118>

Reviewed by Tim Horton.

Source/WebCore:

Exposes an existing quote folding function as a helper on TextIterator, and also adjusts foldQuoteMarks to take
a const String& rather than a String. See WebKit ChangeLog for more details.

  • editing/TextIterator.cpp:

(WebCore::foldQuoteMarks):
(WebCore::SearchBuffer::SearchBuffer):

  • editing/TextIterator.h:

Source/WebKit:

Currently, logic in applyAutocorrectionInternal only selects the range to autocorrect if the text of the range
matches the string to replace (delivered to us from UIKit). In the case of changing "I’" to "I’m", the string to
replace is "I'" (with a straight quote rather than an apostrophe), even though the DOM contains an apostrophe.

This is because kbd believes that the document context contains straight quotes (rather than apostrophes). For
native text views, this works out because UIKit uses relative UITextPositions to determine the replacement
range rather than by checking against the contents of the document. However, WKWebView does not have the ability
to synchronously compute and reason about arbitrary UITextPositions relative to the selection, so we instead
search for the string near the current selection when applying autocorrections.

Of course, this doesn't work in this scenario because the replacement string contains a straight quote, yet the
text node contains an apostrophe, so we bail and don't end up replacing any text. To address this, we repurpose
TextIterator helpers currently used to allow find-in-page to match straight quotes against apostrophes; instead
of matching the replacement string exactly, we instead match the quote-folded versions of these strings when
finding the range to replace.

Test: fast/events/ios/autocorrect-with-apostrophe.html

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::applyAutocorrectionInternal):

LayoutTests:

Add a new layout test to verify that "I’" can be autocorrected to "I’m".

  • fast/events/ios/autocorrect-with-apostrophe-expected.txt: Added.
  • fast/events/ios/autocorrect-with-apostrophe.html: Added.
3:56 PM Changeset in webkit [249073] by Ross Kirsling
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed WinCairo build fix following r249058.

  • API/tests/testapi.cpp:

(TestAPI::callFunction):
WinCairo chokes on JSValueRef args[sizeof...(arguments)] when there are no arguments, but AppleWin does not...
MSVC must have changed somehow.

3:54 PM Changeset in webkit [249072] by timothy_horton@apple.com
  • 2 edits in trunk/LayoutTests

REGRESSION (r248974): fast/events/ios/key-command-delete-to-end-of-paragraph.html is timing out on iOS
https://bugs.webkit.org/show_bug.cgi?id=201091
<rdar://problem/54647731>

Reviewed by Megan Gardner.

  • fast/events/ios/key-command-delete-to-end-of-paragraph.html:

The test as-written doesn't actually wait for the tap to complete before
continuing on with the test - it starts immediately when the focus event
fires. This results in the selection being changed by the single click
handler *after* focusing the field.

Rewrite the test to await completion of the tap before moving forward
instead of waiting for focus.

3:17 PM Changeset in webkit [249071] by Kocsen Chung
  • 1 copy in tags/Safari-608.2.9

Tag Safari-608.2.9.

2:37 PM Changeset in webkit [249070] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Remove IDBDatabaseIdentifier::m_mainFrameOrigin
https://bugs.webkit.org/show_bug.cgi?id=201078

Reviewed by Darin Adler.

No change of behavior.

  • Modules/indexeddb/IDBDatabaseIdentifier.h:
2:33 PM Changeset in webkit [249069] by Justin Michaud
  • 4 edits in trunk

[WASM-References] Do not overwrite argument registers in jsCallEntrypoint
https://bugs.webkit.org/show_bug.cgi?id=200952

Reviewed by Saam Barati.

JSTests:

  • wasm/references/func_ref.js:

(assert.throws):

Source/JavaScriptCore:

The c call that we emitted was incorrect. If we had an int argument that was supposed to be placed in GPR0 by this loop,
we would clobber it while making the call (among many other possible registers). To fix this, we just inline the call
to isWebassemblyHostFunction.

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::WebAssemblyFunction::jsCallEntrypointSlow):

2:21 PM Changeset in webkit [249068] by jiewen_tan@apple.com
  • 4 edits in trunk/Source

Unreviewed, build fix after r249059

Source/WebKit:

  • UIProcess/WebAuthentication/Cocoa/NfcConnection.mm:

(WebKit::NfcConnection::NfcConnection):
Remove the HAVE() macro.

Source/WTF:

  • wtf/Platform.h:

Make HAVE_NEAR_FIELD available only on iOS 13+ and macOS Catalina+.

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

Increase log level for watchlist result
https://bugs.webkit.org/show_bug.cgi?id=201081

Reviewed by Jonathan Bedard.

  • Scripts/webkitpy/tool/steps/applywatchlist.py: Increased log level.
  • Scripts/webkitpy/tool/steps/applywatchlist_unittest.py: Updated unit-tests.
  • Scripts/webkitpy/tool/commands/applywatchlistlocal_unittest.py: Ditto.
1:58 PM Changeset in webkit [249066] by Chris Dumez
  • 57 edits
    1 copy
    7 moves
    2 adds
    1 delete in trunk

[geolocation] Rename interfaces and remove [NoInterfaceObject]
https://bugs.webkit.org/show_bug.cgi?id=200885

Reviewed by Alex Christensen.

Source/WebCore:

Rename Geolocation interfaces and expose them on the global Window object to match the
latest specification:

Test: fast/dom/Geolocation/exposed-geolocation-interfaces.html

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Headers.cmake:
  • Modules/geolocation/GeoNotifier.cpp:

(WebCore::GeoNotifier::setFatalError):
(WebCore::GeoNotifier::runSuccessCallback):
(WebCore::GeoNotifier::runErrorCallback):
(WebCore::GeoNotifier::timerFired):

  • Modules/geolocation/GeoNotifier.h:
  • Modules/geolocation/Geolocation.cpp:

(WebCore::createGeolocationPosition):
(WebCore::createGeolocationPositionError):
(WebCore::Geolocation::lastPosition):
(WebCore::Geolocation::startRequest):
(WebCore::Geolocation::requestUsesCachedPosition):
(WebCore::Geolocation::makeCachedPositionCallbacks):
(WebCore::Geolocation::haveSuitableCachedPosition):
(WebCore::Geolocation::setIsAllowed):
(WebCore::Geolocation::sendError):
(WebCore::Geolocation::sendPosition):
(WebCore::Geolocation::cancelRequests):
(WebCore::Geolocation::handleError):
(WebCore::Geolocation::makeSuccessCallbacks):
(WebCore::Geolocation::positionChanged):
(WebCore::Geolocation::setError):
(WebCore::Geolocation::handlePendingPermissionNotifiers):

  • Modules/geolocation/Geolocation.h:
  • Modules/geolocation/Geolocation.idl:
  • Modules/geolocation/GeolocationClient.h:
  • Modules/geolocation/GeolocationController.cpp:

(WebCore::GeolocationController::positionChanged):
(WebCore::GeolocationController::lastPosition):

  • Modules/geolocation/GeolocationController.h:
  • Modules/geolocation/GeolocationCoordinates.cpp: Renamed from Source/WebCore/Modules/geolocation/Coordinates.cpp.

(WebCore::GeolocationCoordinates::GeolocationCoordinates):

  • Modules/geolocation/GeolocationCoordinates.h: Renamed from Source/WebCore/Modules/geolocation/Coordinates.h.

(WebCore::GeolocationCoordinates::create):
(WebCore::GeolocationCoordinates::isolatedCopy const):

  • Modules/geolocation/GeolocationCoordinates.idl: Renamed from Source/WebCore/Modules/geolocation/Coordinates.idl.
  • Modules/geolocation/GeolocationPosition.h:

(WebCore::GeolocationPosition::create):
(WebCore::GeolocationPosition::isolatedCopy const):
(WebCore::GeolocationPosition::timestamp const):
(WebCore::GeolocationPosition::coords const):
(WebCore::GeolocationPosition::GeolocationPosition):

  • Modules/geolocation/GeolocationPosition.idl: Renamed from Source/WebCore/Modules/geolocation/Geoposition.idl.
  • Modules/geolocation/GeolocationPositionData.h: Copied from Source/WebCore/Modules/geolocation/GeolocationPosition.h.

(WebCore::GeolocationPositionData::GeolocationPositionData):
(WebCore::GeolocationPositionData::encode const):
(WebCore::GeolocationPositionData::decode):
(WebCore::GeolocationPositionData::isValid const):

  • Modules/geolocation/GeolocationPositionError.h: Renamed from Source/WebCore/Modules/geolocation/PositionError.h.

(WebCore::GeolocationPositionError::create):
(WebCore::GeolocationPositionError::GeolocationPositionError):

  • Modules/geolocation/GeolocationPositionError.idl: Renamed from Source/WebCore/Modules/geolocation/PositionError.idl.
  • Modules/geolocation/Geoposition.h: Removed.
  • Modules/geolocation/PositionCallback.h:
  • Modules/geolocation/PositionCallback.idl:
  • Modules/geolocation/PositionErrorCallback.h:
  • Modules/geolocation/PositionErrorCallback.idl:
  • Modules/geolocation/ios/GeolocationPositionDataIOS.mm: Renamed from Source/WebCore/Modules/geolocation/ios/GeolocationPositionIOS.mm.

(WebCore::GeolocationPositionData::GeolocationPositionData):

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/mock/GeolocationClientMock.cpp:

(WebCore::GeolocationClientMock::setPosition):
(WebCore::GeolocationClientMock::lastPosition):

  • platform/mock/GeolocationClientMock.h:

Source/WebKit:

  • Shared/WebGeolocationPosition.cpp:

(WebKit::WebGeolocationPosition::create):

  • Shared/WebGeolocationPosition.h:

(WebKit::WebGeolocationPosition::corePosition const):
(WebKit::WebGeolocationPosition::WebGeolocationPosition):

  • UIProcess/API/C/WKGeolocationPosition.cpp:

(WKGeolocationPositionCreate_c):

  • UIProcess/WebGeolocationManagerProxy.h:

(WebKit::WebGeolocationManagerProxy::lastPosition const):

  • UIProcess/ios/WKGeolocationProviderIOS.mm:

(-[WKLegacyCoreLocationProvider positionChanged:]):

  • WebProcess/Geolocation/WebGeolocationManager.cpp:

(WebKit::WebGeolocationManager::didChangePosition):

  • WebProcess/Geolocation/WebGeolocationManager.h:
  • WebProcess/Geolocation/WebGeolocationManager.messages.in:
  • WebProcess/WebCoreSupport/WebGeolocationClient.cpp:

(WebKit::WebGeolocationClient::lastPosition):

  • WebProcess/WebCoreSupport/WebGeolocationClient.h:

Source/WebKitLegacy/ios:

  • Misc/WebGeolocationCoreLocationProvider.h:
  • Misc/WebGeolocationCoreLocationProvider.mm:

(-[WebGeolocationCoreLocationProvider sendLocation:]):

  • Misc/WebGeolocationProviderIOS.mm:

(-[_WebCoreLocationUpdateThreadingProxy positionChanged:]):

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebGeolocationClient.h:
  • WebCoreSupport/WebGeolocationClient.mm:

(WebGeolocationClient::lastPosition):

  • WebView/WebGeolocationPosition.mm:

(-[WebGeolocationPositionInternal initWithCoreGeolocationPosition:]):
(core):
(-[WebGeolocationPosition initWithTimestamp:latitude:longitude:accuracy:]):
(-[WebGeolocationPosition initWithGeolocationPosition:]):

  • WebView/WebGeolocationPositionInternal.h:

Tools:

  • DumpRenderTree/mac/TestRunnerMac.mm:

(TestRunner::setMockGeolocationPosition):

LayoutTests:

Add layout test coverage.

  • fast/dom/Geolocation/exposed-geolocation-interfaces-expected.txt: Added.
  • fast/dom/Geolocation/exposed-geolocation-interfaces.html: Added.
  • fast/dom/Geolocation/position-string-expected.txt:
  • fast/dom/Geolocation/position-string.html:
1:55 PM Changeset in webkit [249065] by mark.lam@apple.com
  • 6 edits in trunk/Source/bmalloc

Undo disabling of IsoHeaps when Gigacage is off.
https://bugs.webkit.org/show_bug.cgi?id=201061
<rdar://problem/54622500>

Reviewed by Saam Barati and Michael Saboff.

  • CMakeLists.txt:
  • bmalloc.xcodeproj/project.pbxproj:
  • bmalloc/IsoTLS.cpp:

(bmalloc::IsoTLS::determineMallocFallbackState):

  • bmalloc/PerThread.cpp: Removed.
  • bmalloc/PerThread.h:
1:31 PM Changeset in webkit [249064] by Chris Dumez
  • 5 edits in trunk/Source/WTF

Regression(r248533) Assertion hit in isMainThread() for some clients using WTF because the main thread is not initialized
https://bugs.webkit.org/show_bug.cgi?id=201083

Reviewed by Alex Christensen.

An assertion is hit in isMainThread() for some clients using WTF because the main thread is not initialized, since r248533.
Clients can work around this by calling WTF::initializeMainThread() before using WTF but it seems unfortunate to force them
to do so. I propose we disable the assertion until the main thread is initialized.

  • wtf/MainThread.h:
  • wtf/RefCounted.h:

(WTF::RefCountedBase::RefCountedBase):
(WTF::RefCountedBase::applyRefDerefThreadingCheck const):

  • wtf/cocoa/MainThreadCocoa.mm:

(WTF::isMainThreadInitialized):

  • wtf/generic/MainThreadGeneric.cpp:

(WTF::isMainThreadInitialized):

1:23 PM Changeset in webkit [249063] by Ryan Haddad
  • 34 edits
    5 deletes in trunk

Unreviewed, rolling out r249001.

Caused one layout test to fail on all configurations and
another to time out on Catalina / iOS 13.

Reverted changeset:

"Add a WebsiteDataStore delegate to handle
AuthenticationChallenge that do not come from pages"
https://bugs.webkit.org/show_bug.cgi?id=196870
https://trac.webkit.org/changeset/249001

12:35 PM Changeset in webkit [249062] by BJ Burg
  • 5 edits in trunk/Source/WebKit

REGRESSION(r248713): WebDriver commands which target the implicit main frame now hit an ASSERT
https://bugs.webkit.org/show_bug.cgi?id=200793
<rdar://problem/54516988>

Reviewed by Chris Dumez.

SimulatedInputDispatcher and its callers need to support Optional<FrameIdentifier>
and WTF::nullopt as an encoding for the implicit main frame.

  • UIProcess/Automation/SimulatedInputDispatcher.h:
  • UIProcess/Automation/SimulatedInputDispatcher.cpp:

(WebKit::SimulatedInputDispatcher::resolveLocation):
(WebKit::SimulatedInputDispatcher::run):

  • UIProcess/Automation/WebAutomationSession.h:
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::viewportInViewCenterPointOfElement):
(WebKit::WebAutomationSession::performInteractionSequence):
(WebKit::WebAutomationSession::cancelInteractionSequence):

12:25 PM Changeset in webkit [249061] by Jonathan Bedard
  • 3 edits in trunk/Tools

results.webkit.org: Escape html in changelog
https://bugs.webkit.org/show_bug.cgi?id=201025
<rdar://problem/54564837>

Reviewed by Darin Adler.

  • resultsdbpy/resultsdbpy/view/commit_view.py:

(CommitView.commit): Output a dictionary instead of a JSON encoded string.

  • resultsdbpy/resultsdbpy/view/templates/commit.html: Unpack commits dictionary

directly into a JavaScript dictionary.

12:21 PM Changeset in webkit [249060] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

REGRESSION: fast/events/pointer/ios/drag-gives-pointerdown-pointermove-pointerup.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=201075
<rdar://problem/54491246>

Patch by Antoine Quint <Antoine Quint> on 2019-08-23
Reviewed by Daniel Bates.

This test was written very early on in the process of implementing Pointer Events and assumed events would keep
firing when scrolling occured. We need to add "touch-action: none" to ensure we get pointermove and pointerup
events. We also need to ensure that the interaction occurs over content otherwise events won't fire. Finally, we
pretty up the test a bit.

  • fast/events/pointer/ios/drag-gives-pointerdown-pointermove-pointerup-expected.txt:
  • fast/events/pointer/ios/drag-gives-pointerdown-pointermove-pointerup.html:
11:56 AM Changeset in webkit [249059] by jiewen_tan@apple.com
  • 31 edits
    9 copies
    16 adds in trunk

[WebAuthn] Support NFC authenticators for iOS
https://bugs.webkit.org/show_bug.cgi?id=188624
<rdar://problem/43354214>

Reviewed by Chris Dumez.

Source/WebCore:

Tests: http/wpt/webauthn/ctap-nfc-failure.https.html

http/wpt/webauthn/public-key-credential-create-failure-nfc.https.html
http/wpt/webauthn/public-key-credential-create-success-nfc.https.html
http/wpt/webauthn/public-key-credential-get-failure-nfc.https.html
http/wpt/webauthn/public-key-credential-get-success-nfc.https.html

  • Modules/webauthn/apdu/ApduResponse.h:

Adds a new method to support moving m_data.

  • Modules/webauthn/fido/FidoConstants.h:

Adds constants for NFC applet selection.

Source/WebKit:

This patch implements support for NFC authenticators including both FIDO2 and U2F ones. It utilizes a private
framework called NearField instead of CoreNFC to be able to supply a custom UI later if necessary.

The patch follows almost the same flow as previous HID and Local authenticator support.
1) Discovery is via NfcService which will invoke NFHardwareManager to start a generic NFC reader session.
2) Once a reader session is established, a NfcConnection is created to start the polling and register the WKNFReaderSessionDelegate
to wait for 'didDetectTags'.
3) When tags are detected, NfcConnection will determine if it meets our requriements: { type, connectability, fido applet availability }.
The first tag that meets all requirement will then be returned for WebAuthn operations.
4) The first WebAuthn operation is to send authenticatorGetInfo command to determine the supported protocol, and then initialize corresponding
authenticators. Noted, the sending/receiving of this command is now abstracted into FidoService which will be shared across HidService and NfcService.
5) From then, the actual WebAuthn request, either makeCredential or getAssertion will be sent.

For testing, this patch follows the same flow as well.
1) MockNfcService overrides NfcService to mock the behavior of NFC Tags discovery.
2) The same class also swizzles methods from NFReaderSession to mock tag connection and communication.

  • Platform/spi/Cocoa/NearFieldSPI.h: Added.
  • Sources.txt:
  • SourcesCocoa.txt:
  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreSetWebAuthenticationMockConfiguration):

  • UIProcess/WebAuthentication/AuthenticatorManager.cpp:

(WebKit::AuthenticatorManagerInternal::collectTransports):

  • UIProcess/WebAuthentication/AuthenticatorTransportService.cpp:

(WebKit::AuthenticatorTransportService::create):
(WebKit::AuthenticatorTransportService::createMock):

  • UIProcess/WebAuthentication/Cocoa/HidService.h:
  • UIProcess/WebAuthentication/Cocoa/HidService.mm:

(WebKit::HidService::HidService):
(WebKit::HidService::deviceAdded):
(WebKit::HidService::continueAddDeviceAfterGetInfo): Deleted.

  • UIProcess/WebAuthentication/Cocoa/NearFieldSoftLink.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
  • UIProcess/WebAuthentication/Cocoa/NearFieldSoftLink.mm: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
  • UIProcess/WebAuthentication/Cocoa/NfcConnection.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
  • UIProcess/WebAuthentication/Cocoa/NfcConnection.mm: Added.

(WebKit::fido::compareVersion):
(WebKit::NfcConnection::NfcConnection):
(WebKit::NfcConnection::~NfcConnection):
(WebKit::NfcConnection::transact const):
(WebKit::NfcConnection::didDetectTags const):

  • UIProcess/WebAuthentication/Cocoa/NfcService.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
  • UIProcess/WebAuthentication/Cocoa/NfcService.mm: Added.

(WebKit::NfcService::NfcService):
(WebKit::NfcService::~NfcService):
(WebKit::NfcService::didConnectTag):
(WebKit::NfcService::startDiscoveryInternal):
(WebKit::NfcService::platformStartDiscovery):

  • UIProcess/WebAuthentication/Cocoa/WKNFReaderSessionDelegate.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
  • UIProcess/WebAuthentication/Cocoa/WKNFReaderSessionDelegate.mm: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.

(-[WKNFReaderSessionDelegate initWithConnection:]):
(-[WKNFReaderSessionDelegate readerSession:didDetectTags:]):

  • UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:

(WebKit::MockHidConnection::send):
(WebKit::MockHidConnection::registerDataReceivedCallbackInternal):
(WebKit::MockHidConnection::parseRequest):
(WebKit::MockHidConnection::feedReports):
(WebKit::MockHidConnection::shouldContinueFeedReports):

  • UIProcess/WebAuthentication/Mock/MockNfcService.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
  • UIProcess/WebAuthentication/Mock/MockNfcService.mm: Added.

(-[WKMockNFTag type]):
(-[WKMockNFTag initWithNFTag:]):
(-[WKMockNFTag description]):
(-[WKMockNFTag isEqualToNFTag:]):
(-[WKMockNFTag initWithType:]):
(WebKit::MockNfcService::MockNfcService):
(WebKit::MockNfcService::transceive):
(WebKit::MockNfcService::platformStartDiscovery):
(WebKit::MockNfcService::detectTags const):

  • UIProcess/WebAuthentication/Mock/MockWebAuthenticationConfiguration.h:
  • UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp:
  • UIProcess/WebAuthentication/fido/CtapAuthenticator.h:
  • UIProcess/WebAuthentication/fido/CtapNfcDriver.cpp: Added.

(WebKit::CtapNfcDriver::CtapNfcDriver):
(WebKit::CtapNfcDriver::transact):
(WebKit::CtapNfcDriver::respondAsync const):

  • UIProcess/WebAuthentication/fido/CtapNfcDriver.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
  • UIProcess/WebAuthentication/fido/FidoService.cpp: Added.

(WebKit::FidoService::FidoService):
(WebKit::FidoService::getInfo):
(WebKit::FidoService::continueAfterGetInfo):

  • UIProcess/WebAuthentication/fido/FidoService.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
  • UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp:
  • UIProcess/WebAuthentication/fido/U2fAuthenticator.h:
  • UIProcess/ios/WebPageProxyIOS.mm:
  • WebKit.xcodeproj/project.pbxproj:

Source/WTF:

  • wtf/Platform.h:

Add a feature flag for NearField.

Tools:

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setWebAuthenticationMockConfiguration):
Setup NFC mock testing configuration.

LayoutTests:

  • http/wpt/webauthn/ctap-nfc-failure.https-expected.txt: Added.
  • http/wpt/webauthn/ctap-nfc-failure.https.html: Added.
  • http/wpt/webauthn/public-key-credential-create-failure-nfc.https-expected.txt: Added.
  • http/wpt/webauthn/public-key-credential-create-failure-nfc.https.html: Added.
  • http/wpt/webauthn/public-key-credential-create-success-hid.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-success-hid.https.html:

This patch replaces the "local" keyword with "hid".

  • http/wpt/webauthn/public-key-credential-create-success-nfc.https-expected.txt: Added.
  • http/wpt/webauthn/public-key-credential-create-success-nfc.https.html: Added.
  • http/wpt/webauthn/public-key-credential-get-failure-nfc.https-expected.txt: Added.
  • http/wpt/webauthn/public-key-credential-get-failure-nfc.https.html: Added.
  • http/wpt/webauthn/public-key-credential-get-success-nfc.https-expected.txt: Added.
  • http/wpt/webauthn/public-key-credential-get-success-nfc.https.html: Added.
  • http/wpt/webauthn/resources/util.js:
  • platform/ios-simulator-wk2/TestExpectations:

Skip NFC tests for simulators.

11:51 AM Changeset in webkit [249058] by Ross Kirsling
  • 11 edits in trunk/Source

JSC should have public API for unhandled promise rejections
https://bugs.webkit.org/show_bug.cgi?id=197172

Reviewed by Keith Miller.

Source/JavaScriptCore:

This patch makes it possible to register a unhandled promise rejection callback via the JSC API.
Since there is no event loop in such an environment, this callback fires off of the microtask queue.
The callback receives the promise and rejection reason as arguments and its return value is ignored.

  • API/JSContextRef.cpp:

(JSGlobalContextSetUnhandledRejectionCallback): Added.

  • API/JSContextRefPrivate.h:

Add new C++ API call.

  • API/tests/testapi.cpp:

(TestAPI::promiseResolveTrue): Clean up test output.
(TestAPI::promiseRejectTrue): Clean up test output.
(TestAPI::promiseUnhandledRejection): Added.
(TestAPI::promiseUnhandledRejectionFromUnhandledRejectionCallback): Added.
(TestAPI::promiseEarlyHandledRejections): Added.
(testCAPIViaCpp):
Add new C++ API test.

  • jsc.cpp:

(GlobalObject::finishCreation):
(functionSetUnhandledRejectionCallback): Added.
Add corresponding global to JSC shell.

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::setUnhandledRejectionCallback): Added.
(JSC::JSGlobalObject::unhandledRejectionCallback const): Added.
Keep a strong reference to the callback.

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncHostPromiseRejectionTracker):
Add default behavior.

  • runtime/VM.cpp:

(JSC::VM::callPromiseRejectionCallback): Added.
(JSC::VM::didExhaustMicrotaskQueue): Added.
(JSC::VM::promiseRejected): Added.
(JSC::VM::drainMicrotasks):
When microtask queue is exhausted, deal with any pending unhandled rejections
(in a manner based on RejectedPromiseTracker's reportUnhandledRejections),
then make sure this didn't cause any new microtasks to be added to the queue.

  • runtime/VM.h:

Store unhandled rejections.
(This collection will always be empty in the presence of WebCore.)

Source/WebCore:

  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::JSDOMGlobalObject::promiseRejectionTracker):
Move JSInternalPromise early-out to JSC side.

11:29 AM Changeset in webkit [249057] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: transparency checkerboard is too bright in dark mode
https://bugs.webkit.org/show_bug.cgi?id=201067

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/Main.css:

(@media (prefers-color-scheme: dark) :matches(img, canvas).show-grid):

  • UserInterface/Views/ConsoleMessageView.css:

(.console-message-body > .show-grid):

11:14 AM Changeset in webkit [249056] by commit-queue@webkit.org
  • 9 edits in trunk/Source

Support ITP on a per-session basis (198923)
https://bugs.webkit.org/show_bug.cgi?id=198923

Patch by Kate Cheney <Kate Cheney> on 2019-08-23
Reviewed by Chris Dumez.

Source/WebCore:

This patch updated the data structure used to collect resource load
statistics in order to support ITP data collection on a per session
basis. Each sessionID is stored as a key-value pair with its own map
of ResourceLoadStatistics.

It also updated the statisticsForURL function call to perform lookups
of URL data based on sessionID.

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::setStatisticsUpdatedCallback):
(WebCore::ResourceLoadObserver::shouldLog const):
(WebCore::ResourceLoadObserver::logSubresourceLoading):
(WebCore::ResourceLoadObserver::logWebSocketLoading):
(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
(WebCore::ResourceLoadObserver::logFontLoad):
(WebCore::ResourceLoadObserver::logCanvasRead):
(WebCore::ResourceLoadObserver::logCanvasWriteOrMeasure):
(WebCore::ResourceLoadObserver::logNavigatorAPIAccessed):
(WebCore::ResourceLoadObserver::logScreenAPIAccessed):
(WebCore::ResourceLoadObserver::ensureResourceStatisticsForRegistrableDomain):
(WebCore::ResourceLoadObserver::statisticsForURL):
(WebCore::ResourceLoadObserver::takeStatistics):
(WebCore::ResourceLoadObserver::clearState):

  • loader/ResourceLoadObserver.h:
  • testing/Internals.cpp:

(WebCore::Internals::resourceLoadStatisticsForURL):

Source/WebKit:

The original implementation of resourceLoadStatisticsUpdated
did not allow for ITP on a per session basis due to the sessionID
not being passed to the resourceLoadStatisticsUpdated function.
This patch allows access of the correct networkSession by passing
all resourceLoadStatistics in a new data structure of key-value
pairs, where the sessionID is the key.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated):

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • WebProcess/WebProcess.cpp:
10:53 AM Changeset in webkit [249055] by Alan Coon
  • 3 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r248969. rdar://problem/54643450

Crash under StringImpl::~StringImpl() in IDBServer::computeSpaceUsedForOrigin()
https://bugs.webkit.org/show_bug.cgi?id=200989
<rdar://problem/54565546>

Reviewed by Alex Christensen.

Make sure we call isolatedCopy() on IDBServer::m_databaseDirectoryPath before using it from
background threads.

  • Modules/indexeddb/server/IDBServer.cpp: (WebCore::IDBServer::IDBServer::createBackingStore): (WebCore::IDBServer::IDBServer::performGetAllDatabaseNames): (WebCore::IDBServer::IDBServer::removeDatabasesModifiedSinceForVersion): (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesModifiedSince): (WebCore::IDBServer::IDBServer::removeDatabasesWithOriginsForVersion): (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesForOrigins): (WebCore::IDBServer::IDBServer::computeSpaceUsedForOrigin): (WebCore::IDBServer::IDBServer::upgradeFilesIfNecessary):
  • Modules/indexeddb/server/IDBServer.h: (WebCore::IDBServer::IDBServer::databaseDirectoryPath const):

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

10:53 AM Changeset in webkit [249054] by Alan Coon
  • 3 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r248971. rdar://problem/54643440

Crash under StringImpl::endsWith() in SQLiteIDBBackingStore::fullDatabaseDirectoryWithUpgrade()
https://bugs.webkit.org/show_bug.cgi?id=200990
<rdar://problem/54566439>

Reviewed by Alex Christensen.

Make sure we call isolatedCopy() on SQLiteIDBBackingStore::m_databaseRootDirectory before using
it from background threads.

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: (WebCore::IDBServer::SQLiteIDBBackingStore::fullDatabaseDirectoryWithUpgrade): (WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForOrigin const): (WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):
  • Modules/indexeddb/server/SQLiteIDBBackingStore.h: (WebCore::IDBServer::SQLiteIDBBackingStore::databaseRootDirectory const):

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

10:53 AM Changeset in webkit [249053] by Alan Coon
  • 3 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r248967. rdar://problem/54643456

Crash under StringImpl::endsWith() in RegistrationDatabase::openSQLiteDatabase()
https://bugs.webkit.org/show_bug.cgi?id=200991
<rdar://problem/54566689>

Reviewed by Geoffrey Garen.

Make sure we call isolatedCopy() on RegistrationDatabase::m_databaseDirectory before using
it from background threads.

  • workers/service/server/RegistrationDatabase.cpp: (WebCore::RegistrationDatabase::openSQLiteDatabase): (WebCore::RegistrationDatabase::clearAll):
  • workers/service/server/RegistrationDatabase.h: (WebCore::RegistrationDatabase::databaseDirectory const):

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

10:21 AM Changeset in webkit [249052] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

VirtualRegister::dump() can use more informative CallFrame header slot names.
https://bugs.webkit.org/show_bug.cgi?id=201062

Reviewed by Tadeu Zagallo.

For example, it currently dumps head3 instead of callee. This patch changes the
dump as follows (for 64-bit addressing):

head0 => callerFrame
head1 => returnPC
head2 => codeBlock
head3 => callee
head4 => argumentCount

Now, one might be wondering when would bytecode ever access callerFrame and
returnPC? The answer is never. However, I don't think its the role of the
dumper to catch a bug where these header slots are being used. The dumper's role
is to clearly report them so that we can see that these unexpected values are
being used.

  • bytecode/VirtualRegister.cpp:

(JSC::VirtualRegister::dump const):

10:15 AM Changeset in webkit [249051] by russell_e@apple.com
  • 12 edits
    7 deletes in trunk

Unreviewed, rolling out r249031.

Causes multiple test failures on iOS simulator

Reverted changeset:

"[iOS] Should show input view when became first responder if
keyboard was showing when the view was resigned"
https://bugs.webkit.org/show_bug.cgi?id=200902
https://trac.webkit.org/changeset/249031

10:06 AM Changeset in webkit [249050] by Ryan Haddad
  • 6 edits in branches/safari-608-branch/LayoutTests

Cherry-pick r249042. rdar://problem/54622280

Revert delete-in-input-in-iframe.html and typing-in-input-in-iframe.html to original behaviour after r248977 and make associated test autoscroll-input-when-very-zoomed.html more stable
https://bugs.webkit.org/show_bug.cgi?id=201058

Reviewed by Simon Fraser.

delete-in-input-in-iframe and typing-in-input-in-iframe were changed when scrolling was made to work differently in r244141.
They actually did find a bug, and that bug was fixed in r248977, so we put the tests back to test that scolls do not happen.
Also update autoscroll-input-when-very-zoomed which was added to test r248977 to be more robust.

  • fast/forms/ios/delete-in-input-in-iframe-expected.txt:
  • fast/forms/ios/delete-in-input-in-iframe.html:
  • fast/forms/ios/typing-in-input-in-iframe-expected.txt:
  • fast/forms/ios/typing-in-input-in-iframe.html:
  • fast/scrolling/ios/autoscroll-input-when-very-zoomed.html:

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

10:06 AM Changeset in webkit [249049] by Ryan Haddad
  • 2 edits in branches/safari-608-branch/LayoutTests

Cherry-pick r249028. rdar://problem/54614691

REGRESSION (r248974): fast/events/ios/select-all-with-existing-selection.html fails
https://bugs.webkit.org/show_bug.cgi?id=201050

Reviewed by Wenson Hsieh.

  • fast/events/ios/select-all-with-existing-selection.html: The test as-written doesn't actually wait for the tap to complete before continuing on with the test - it starts immediately when the focus event fires. This results in the selection being changed by the single click handler *after* focusing the field.

Rewrite the test to await completion of the tap before moving forward
instead of waiting for focus.

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

10:06 AM Changeset in webkit [249048] by Ryan Haddad
  • 4 edits in branches/safari-608-branch/LayoutTests

Cherry-pick r249017. rdar://problem/54564878

Rebaseline some editing tests after r248974
https://bugs.webkit.org/show_bug.cgi?id=200999
<rdar://problem/54564878>

  • platform/ios/editing/deleting/smart-delete-003-expected.txt:
  • platform/ios/editing/deleting/smart-delete-004-expected.txt:
  • platform/ios/editing/pasteboard/smart-paste-008-expected.txt:

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

9:53 AM Changeset in webkit [249047] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Remove unnecessary call to enclosingClippingScopes()
https://bugs.webkit.org/show_bug.cgi?id=201063

Reviewed by Zalan Bujtas.

This line of code did nothing, and was left in by mistake. Remove it.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateOverlapMap const):

8:47 AM Changeset in webkit [249046] by aakash_jain@apple.com
  • 5 edits in trunk/Tools

[ews] Enable Style queue on new EWS
https://bugs.webkit.org/show_bug.cgi?id=201071

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/config.json: Enabled the scheduler for Style queue.
  • BuildSlaveSupport/ews-app/ews/views/statusbubble.py: Enabled style queue bubble on new EWS.
  • QueueStatusServer/config/queues.py: Removed style queue from old EWS.
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:

(BubbleQueueServer): Removed style queue from bot-watcher's dashboard.

8:31 AM Changeset in webkit [249045] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Cache hasCompositedScrollableOverflow as a bit on RenderLayer
https://bugs.webkit.org/show_bug.cgi?id=201065

Reviewed by Zalan Bujtas.

hasCompositedScrollableOverflow() is pretty hot on some compositing-related code paths, and isn't
super cheap, as it checks a Setting and calls into renderer code. Optimize by computing it in
computeScrollDimensions().

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::hasCompositedScrollableOverflow const):
(WebCore::RenderLayer::computeScrollDimensions):

  • rendering/RenderLayer.h:
8:14 AM Changeset in webkit [249044] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Don't call clipCrossesPaintingBoundary() when not necessary
https://bugs.webkit.org/show_bug.cgi?id=201064

Reviewed by Zalan Bujtas.

clipCrossesPaintingBoundary() does some RenderLayer ancestor walks, so avoid
calling it when we already know that the clip rects are TemporaryClipRects.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects const):

3:53 AM Changeset in webkit [249043] by Philippe Normand
  • 3 edits in trunk/Source/WebCore

[GStreamer] Hole-punch build is broken
https://bugs.webkit.org/show_bug.cgi?id=200972

Reviewed by Žan Doberšek.

This patch fixes link issues when building with
USE_GSTREAMER_HOLEPUNCH enabled, the hole punch client destructor
was missing.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

Remove FAST_ALLOCATED annotation, because:

  • platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:

it's now in the base class, along with a default destructor.

12:25 AM Changeset in webkit [249042] by Megan Gardner
  • 6 edits in trunk/LayoutTests

Revert delete-in-input-in-iframe.html and typing-in-input-in-iframe.html to original behaviour after r248977 and make associated test autoscroll-input-when-very-zoomed.html more stable
https://bugs.webkit.org/show_bug.cgi?id=201058

Reviewed by Simon Fraser.

delete-in-input-in-iframe and typing-in-input-in-iframe were changed when scrolling was made to work differently in r244141.
They actually did find a bug, and that bug was fixed in r248977, so we put the tests back to test that scolls do not happen.
Also update autoscroll-input-when-very-zoomed which was added to test r248977 to be more robust.

  • fast/forms/ios/delete-in-input-in-iframe-expected.txt:
  • fast/forms/ios/delete-in-input-in-iframe.html:
  • fast/forms/ios/typing-in-input-in-iframe-expected.txt:
  • fast/forms/ios/typing-in-input-in-iframe.html:
  • fast/scrolling/ios/autoscroll-input-when-very-zoomed.html:

Aug 22, 2019:

9:34 PM Changeset in webkit [249041] by Alan Coon
  • 7 edits in branches/safari-608-branch/Source

Versioning.

7:06 PM Changeset in webkit [249040] by Fujii Hironori
  • 3 edits
    4 adds in trunk

[SVG] -webkit-clip-path treats url(abc#xyz) as url(#xyz) because it checks only URL fragment part
https://bugs.webkit.org/show_bug.cgi?id=201030

Reviewed by Ryosuke Niwa.

Source/WebCore:

Tests: svg/clip-path/clip-path-invalid-reference-001-expected.svg

svg/clip-path/clip-path-invalid-reference-001.svg
svg/clip-path/clip-path-invalid-reference-002-expected.svg
svg/clip-path/clip-path-invalid-reference-002.svg

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertClipPath): Use
SVGURIReference::fragmentIdentifierFromIRIString to get fragment
identifier from -webkit-clip-path.

LayoutTests:

  • svg/clip-path/clip-path-invalid-reference-001-expected.svg: Added.
  • svg/clip-path/clip-path-invalid-reference-001.svg: Added.
  • svg/clip-path/clip-path-invalid-reference-002-expected.svg: Added.
  • svg/clip-path/clip-path-invalid-reference-002.svg: Added.
6:59 PM Changeset in webkit [249039] by Fujii Hironori
  • 11 edits in trunk/Tools

[Win][MiniBrowser] URL bar should be updated for in-page navigations
https://bugs.webkit.org/show_bug.cgi?id=201032

Reviewed by Darin Adler.

  • MiniBrowser/win/BrowserWindow.h: Added activeURLChanged to BrowserWindowClient interface.
  • MiniBrowser/win/MainWindow.cpp:

(MainWindow::init):
(MainWindow::activeURLChanged): Added.

  • MiniBrowser/win/MainWindow.h:
  • MiniBrowser/win/MiniBrowserWebHost.cpp:

(MiniBrowserWebHost::didCommitLoadForFrame):
(MiniBrowserWebHost::didChangeLocationWithinPageForFrame): Added.
(MiniBrowserWebHost::updateAddressBar): Deleted.
(MiniBrowserWebHost::loadURL): Deleted.

  • MiniBrowser/win/MiniBrowserWebHost.h:

(MiniBrowserWebHost::MiniBrowserWebHost):
(MiniBrowserWebHost::didCommitLoadForFrame): Deleted.
(MiniBrowserWebHost::didChangeLocationWithinPageForFrame): Deleted.

  • MiniBrowser/win/PrintWebUIDelegate.cpp:
  • MiniBrowser/win/WebKitBrowserWindow.cpp:

(WebKitBrowserWindow::create):
(WebKitBrowserWindow::WebKitBrowserWindow):
(WebKitBrowserWindow::didChangeIsLoading): Removed an unused variable.
(WebKitBrowserWindow::didChangeActiveURL): Added.
(WebKitBrowserWindow::createNewPage):
(WebKitBrowserWindow::didCommitNavigation): Deleted.

  • MiniBrowser/win/WebKitBrowserWindow.h: Removed m_urlBarWnd.
  • MiniBrowser/win/WebKitLegacyBrowserWindow.cpp:

(WebKitLegacyBrowserWindow::create):
(WebKitLegacyBrowserWindow::WebKitLegacyBrowserWindow):
(WebKitLegacyBrowserWindow::init):
(WebKitLegacyBrowserWindow::navigateToHistory):

  • MiniBrowser/win/WebKitLegacyBrowserWindow.h: Removed m_urlBarWnd.
6:43 PM Changeset in webkit [249038] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Console: automatically select the "Evaluations" filter whenever running commands
https://bugs.webkit.org/show_bug.cgi?id=201060

Reviewed by Timothy Hatcher.

If the Console is actively being filtered (e.g. not "All"), it can be confusing to run a
command, only to not see any results. We should automatically enable the "Evaluations"
filter in addition to any other existing filters in these cases.

  • UserInterface/Views/LogContentView.js:

(WI.LogContentView.prototype.didAppendConsoleMessageView):

  • UserInterface/Views/ScopeBarItem.js:

(WI.ScopeBarItem.prototype.set selected):
(WI.ScopeBarItem.prototype.toggle): Added.

6:07 PM Changeset in webkit [249037] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION(r248485): stack overflow when viewing a source map generated from inline content
https://bugs.webkit.org/show_bug.cgi?id=201042
<rdar://problem/54509750>

Reviewed by Antoine Quint.

In r248485, WI.ResourceClusterContentView was changed to requestContent whenever the
given resource finished loading (by listening for WI.Resource.Event.LoadingDidFinish).

Even though retrieving a source map's contents uses Promises, in the case that the content
was inlined in the "original" source code, the code path would mark the source map as being
finished (which would fire a WI.Resource.Event.LoadingDidFinish) _before_ it could return
a Promise, which would've been cached (WI.SourceCode.prototype.requestContent) and
preventend any reentrancy.

Wrapping the inline code path in a Promise.resolve() gives the WI.SourceCode a chance to
cache the Promise before any events are fired.

  • UserInterface/Models/SourceMapResource.js:

(WI.SourceMapResource.prototype.requestContentFromBackend):

4:54 PM Changeset in webkit [249036] by aestes@apple.com
  • 14 edits in trunk

[watchOS] Disable Content Filtering in the simulator build
https://bugs.webkit.org/show_bug.cgi?id=201047

Reviewed by Tim Horton.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WTF:

  • wtf/Platform.h:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
4:28 PM Changeset in webkit [249035] by Chris Dumez
  • 5 edits
    1 add in trunk

Try to recover nicely when getting an unexpected schema in the service workers database
https://bugs.webkit.org/show_bug.cgi?id=201002
<rdar://problem/54574991>

Reviewed by Youenn Fablet.

Source/WebCore:

Try to recover nicely when getting an unexpected schema in the service workers database instead
of crashing the network process. To recover, we delete the database file and re-create it.

  • workers/service/server/RegistrationDatabase.cpp:

(WebCore::RegistrationDatabase::openSQLiteDatabase):
(WebCore::RegistrationDatabase::ensureValidRecordsTable):

Tools:

Add API test coverage.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
4:17 PM Changeset in webkit [249034] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: console.dir should expand objects
https://bugs.webkit.org/show_bug.cgi?id=152039
<rdar://problem/23816853>

Reviewed by Joseph Pecoraro.

Expand objects logged by console.dir but keep them collapsed when logged by console.log.

  • UserInterface/Views/ConsoleMessageView.js:

(WI.ConsoleMessageView.prototype.render):

3:51 PM Changeset in webkit [249033] by Keith Rollin
  • 8 edits in trunk

Remove support for tvOS < 13.0
https://bugs.webkit.org/show_bug.cgi?id=200963
<rdar://problem/54541355>

Reviewed by Tim Horton.

Update conditionals that reference TV_OS_VERSION_MIN_REQUIRED and
TV_OS_VERSION_MAX_ALLOWED, assuming that they both have values >=

  1. This means that expressions like "TV_OS_VERSION_MIN_REQUIRED

< 130000" are always False and "TV_OS_VERSION_MIN_REQUIRED >=
130000" are always True.

Source/WebCore/PAL:

  • pal/spi/cocoa/NSKeyedArchiverSPI.h:
  • pal/spi/cocoa/NSProgressSPI.h:

Source/WTF:

  • wtf/FeatureDefines.h:
  • wtf/Platform.h:

Tools:

  • TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm:

(TestWebKitAPI::TEST):

3:27 PM Changeset in webkit [249032] by Alan Coon
  • 1 copy in tags/Safari-608.2.8

Tag Safari-608.2.8.

3:22 PM Changeset in webkit [249031] by dbates@webkit.org
  • 12 edits
    7 adds in trunk

[iOS] Should show input view when became first responder if keyboard was showing when the view was resigned
https://bugs.webkit.org/show_bug.cgi?id=200902
<rdar://problem/54231756>

Reviewed by Wenson Hsieh.

Source/WebKit:

When resigning first responder save whether the peripheral host has an input view on screen,
including the software keyboard, so that we show the input view(s) again when the WKWebView
is made first responder. In Safari, this avoids the need for a person to explicitly focus an
editable element again to bring up the keyboard when returning to a tab they were previously
typing in. It also makes the behavior of switching tabs in Safari with a software keyboard
match the behavior of doing the same thing when a hardware keyboard attached.

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::focusedElementDidChangeInputMode):
Pass a diff of the activity state from the web process to the UI process so that we can
differentiate between an inputmode change as a result of page deactivation vs a change
caused by some other means. We need to differentiate these cases because we want to
ignore a page that sets inputmode "none" (i.e. a request to hide the keyboard) from inside
a focus event handler if the handler was called as part of the process of page activation
(i.e. switching to the tab). Google Docs is one example of a web site that sets inputmode
to "none" as a result of the page activation process.

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView cleanupInteraction]): Clear out state.
(-[WKContentView resignFirstResponderForWebView]): Save whether the peripheral host is on screen
into a local before ending the editing session. We then copy the local into the ivar if we
actually will resign. This ordering is explicitly done because:

  1. Ending the editing session may dismiss the keyboard => we need to query the peripheral host first.
  2. If the view is being resigned as a result of a keyboard dismissal (i.e. a person pressed the hide keyboard button on iPad) then the user has indicated that they are finished with the keyboard and we do not want to show the keyboard on page re-activation => we do not want to copy the local to the ivar.
  3. If the view refuses to resign itself then it does not make sense to save the keyboard state as responder status hasn't changed.

(-[WKContentView shouldShowAutomaticKeyboardUI]): Ignore inputmode="none", if needed.
(-[WKContentView _didCommitLoadForMainFrame]): Clear out state.
(-[WKContentView isFirstResponderOrBecomingFirstResponder]): Added.
(-[WKContentView shouldShowInputViewOnPageActivation:]): Added.
(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:]):
Update ivar if this element is being focused as a result of page activation.
(-[WKContentView _didUpdateInputMode:activityStateChanges:]): Modified to take the activity state
diff. If the input mode was changed as a result of page activation then we want to update our ivar
so that when we call -reloadInputViews and UIKit calls us back in -shouldShowAutomaticKeyboardUI we
will know to ignore inputmode set to "none" when determining whether to show the automatic keyboard UI.
Note that we do not need to check/track whether an earlier -_elementDidFocus actually started an
input session as part of updating the value of our ivar because if an input session was not started,
say the embedding client disallowed it, then we would not have a focused element => we early return from
this function. Also remove duplication and improve code readbility by making use of the convenience function
hasFocusedElement() instead of duplicating what it does.
(-[WKContentView _didUpdateInputMode:]): Deleted.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::focusedElementDidChangeInputMode): Modified to take the activity state diff
and pass it through.
(WebKit::WebPageProxy::didReleaseAllTouchPoints): Pass the empty set for the activity state diff to
keep our current behavior.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::focusedElementDidChangeInputMode): Send the activity state diff to the UI process.

LayoutTests:

Add tests to ensure that we show the keyboard when becoming first responder if the view resigned with the
keyboard on screen. Also add a test to ensure that we keep our current behavior and do NOT show the keyboard
for an autofocused text field when the view becomes first responder.

  • fast/events/ios/resources/check-keyboard-on-screen.js: Added.

(async.checkKeyboardOnScreen):
(async.checkKeyboardNotOnScreen):

  • fast/events/ios/should-not-show-keyboard-for-autofocused-field-when-becoming-first-responder-after-navigation-expected.txt: Added.
  • fast/events/ios/should-not-show-keyboard-for-autofocused-field-when-becoming-first-responder-after-navigation.html: Added.
  • fast/events/ios/show-keyboard-when-becoming-first-responder-despite-inputmode-none-expected.txt: Added.
  • fast/events/ios/show-keyboard-when-becoming-first-responder-despite-inputmode-none.html: Added.
  • fast/events/ios/show-keyboard-when-becoming-first-responder-expected.txt: Added.
  • fast/events/ios/show-keyboard-when-becoming-first-responder.html: Added.
  • resources/ui-helper.js:

(window.UIHelper.waitForKeyboardToShow.return.new.Promise): Added.
(window.UIHelper.waitForKeyboardToShow): Added.
(window.UIHelper.becomeFirstResponder): Added.

3:06 PM Changeset in webkit [249030] by dbates@webkit.org
  • 3 edits in trunk/Tools

[lldb-webkit] OptionSet summary shows size 0 sometimes for non-empty set
https://bugs.webkit.org/show_bug.cgi?id=200742

Reviewed by Simon Fraser.

The OptionSet synthetic provider must respond to requests for the value of m_storage
(i.e. GetChildMemberWithName('m_storage')) to avoid interfering with the computation
of the type summary.

Synthetic providers substitute alternative debug information (children) for the default
information for a variable. The OptionSet type summary is implemented in terms of the
OptionSet synthetic provider to maximize code reuse. If LLDB instantiates the provider
before invoking the type summary handler then evaluating GetChildMemberWithName() on
the SBValue passed to the type summary handler will access the substitute information
instead of the original debug information. As a result OptionSet's synthetic provider's
get_child_index('m_storage') returns None hence SBValue.GetChildMemberWithName('m_storage')
returned an invalid value; => WTFOptionSetProvider._bitmask() returns 0; => the size
reported in the type summary for the OptionSet is 0. Instead get_child_index('m_storage')
should return a valid value.

  • lldb/lldb_webkit.py:

(FlagEnumerationProvider.init):
(FlagEnumerationProvider):
(FlagEnumerationProvider._get_child_index): Added. WTFOptionSetProvider will override.
(FlagEnumerationProvider._get_child_at_index): Added. WTFOptionSetProvider will override.
(FlagEnumerationProvider.size): Added.
(FlagEnumerationProvider.get_child_index): Modified to call _get_child_index().
(FlagEnumerationProvider.get_child_at_index): Modified to call _get_child_at_index().
(FlagEnumerationProvider.update): Moved initialization of self._elements to the constructor
and removed self.size. For the latter we can just expose a getter that returns the size of
the list self._elements.
(WTFOptionSetProvider._get_child_index): Added. Return the index for LLDB to query for the
value of m_storage.
(WTFOptionSetProvider):
(WTFOptionSetProvider._get_child_at_index): Added. Return the value for m_storage if it
matches the specified index.

  • lldb/lldb_webkit_unittest.py:

(TestSummaryProviders.serial_test_WTFOptionSetProvider_empty): Update expected result now
that we return the value of m_storage as the last synthetic child.

2:43 PM Changeset in webkit [249029] by Keith Rollin
  • 2 edits in trunk/Source/WebKit

Remove logging that contains a URL
https://bugs.webkit.org/show_bug.cgi?id=201052
<rdar://problem/54613204>

Reviewed by Chris Dumez.

checkURLReceivedFromWebProcess in WebProcessProxy.cpp contains an old
logging line that logs a URL. We don't log URLs any more for privacy
reasons, so remove this.

A search for WTFLogAlways.*url turns up other matches, but those are
either false positives or cases where the URLs are logged only on
demand by the developer as part of debugging.
checkURLReceivedFromWebProcess is the only place where a URL is logged
as a matter of course.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::checkURLReceivedFromWebProcess):

2:30 PM Changeset in webkit [249028] by timothy_horton@apple.com
  • 2 edits in trunk/LayoutTests

REGRESSION (r248974): fast/events/ios/select-all-with-existing-selection.html fails
https://bugs.webkit.org/show_bug.cgi?id=201050

Reviewed by Wenson Hsieh.

  • fast/events/ios/select-all-with-existing-selection.html:

The test as-written doesn't actually wait for the tap to complete before
continuing on with the test - it starts immediately when the focus event
fires. This results in the selection being changed by the single click
handler *after* focusing the field.

Rewrite the test to await completion of the tap before moving forward
instead of waiting for focus.

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

Logging in FileSystem::deleteFile should avoid logging unsurprising errors
https://bugs.webkit.org/show_bug.cgi?id=200831

Patch by Kate Cheney <Kate Cheney> on 2019-08-22
Reviewed by Chris Dumez.

To avoid overlogging unnecessary information, added a check to avoid logging
ENOENT (file not found) errors.

  • wtf/posix/FileSystemPOSIX.cpp:

(WTF::FileSystemImpl::deleteFile):

2:13 PM Changeset in webkit [249026] by Said Abou-Hallawa
  • 3 edits
    2 adds in trunk

Crash may happen when an SVG <feImage> element references the root <svg> element
https://bugs.webkit.org/show_bug.cgi?id=201014

Reviewed by Ryosuke Niwa.

Source/WebCore:

When an <feImage> references an <svg> element as its target image but
this <svg> element is also one of the ancestors of the <feImage>, the
parent <filter> should not be applied.

Test: svg/filters/filter-image-ref-root.html

  • svg/SVGFEImageElement.cpp:

(WebCore::SVGFEImageElement::build const):

LayoutTests:

Ensure the cyclic reference between the <feImage> renderer and its
ancestor <svg> root renderer is broken.

  • svg/filters/filter-image-ref-root-expected.txt: Added.
  • svg/filters/filter-image-ref-root.html: Added.
12:25 PM Changeset in webkit [249025] by rniwa@webkit.org
  • 5 edits in trunk/Source/WebCore

Make ImageBuffer and SVG's FilterData isoheap'ed
https://bugs.webkit.org/show_bug.cgi?id=201029

Reviewed by Simon Fraser.

Made ImageBuffer and RenderSVGResourceFilter use IsoHeap.

  • platform/graphics/ImageBuffer.cpp:
  • platform/graphics/ImageBuffer.h:
  • rendering/svg/RenderSVGResourceFilter.cpp:
  • rendering/svg/RenderSVGResourceFilter.h:
12:09 PM Changeset in webkit [249024] by Jonathan Bedard
  • 2 edits in trunk/Tools

results.webkit.org: Remove branch and repository information from commit tooltip
https://bugs.webkit.org/show_bug.cgi?id=201035

Reviewed by Aakash Jain.

  • resultsdbpy/resultsdbpy/view/static/js/timeline.js:

(xAxisFromScale): Remove branch and repository information from tooltip.

12:04 PM Changeset in webkit [249023] by Jonathan Bedard
  • 4 edits in trunk/Tools

run-webkit-tests: Use -noBulkSymbolication when calling spindump
https://bugs.webkit.org/show_bug.cgi?id=201000
<rdar://problem/53778938>

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/port/darwin.py:

(DarwinPort.sample_process): Attempt to symbolicate with -noBulkSymbolication first.

  • Scripts/webkitpy/port/darwin_testcase.py:

(DarwinTest.test_tailspin):
(DarwinTest.test_get_crash_log): Deleted.

  • Scripts/webkitpy/port/ios_device_unittest.py:

(IOSDeviceTest.test_tailspin):

11:54 AM Changeset in webkit [249022] by Adrian Perez de Castro
  • 8 edits in trunk/Source

[GTK][WPE] Fixes for non-unified builds after r248547
https://bugs.webkit.org/show_bug.cgi?id=201044

Reviewed by Philippe Normand.

Source/JavaScriptCore:

  • b3/B3ReduceLoopStrength.cpp: Add missing inclusions of B3BasicBlockInlines.h,

B3InsertionSet.h, and B3NaturalLoops.h

  • wasm/WasmOMGForOSREntryPlan.h: Include WasmCallee.h instead of forward-declaring

BBQCallee in order to avoid build failure due to incomplete definition on template
expansions.

Source/WebCore:

  • platform/audio/AudioResamplerKernel.h: Add missing inclusion of wtf/Noncopyable.h

Source/WebKit:

  • NetworkProcess/WebStorage/LocalStorageDatabaseTracker.cpp: Add missing inclusion of

the wtf/CrossThreadCopier.h header.

  • WebProcess/WebStorage/StorageNamespaceImpl.h: Add missing inclusion of the

WebCore/PageIdentifier.h header.

11:50 AM Changeset in webkit [249021] by zhifei_fang@apple.com
  • 5 edits in trunk/Tools

[results.webkit.org Webkit.css] Change input's disable style
The disable input style will always show the label like it has a value
https://bugs.webkit.org/show_bug.cgi?id=200998

Reviewed by Jonathan Bedard.

  • resultsdbpy/resultsdbpy/view/static/library/css/docs.yaml: Adding a new example for disabled input that already has a value

*resultsdbpy/resultsdbpy/view/static/library/css/generate-webkit-css-docs:

  • resultsdbpy/resultsdbpy/view/static/library/css/index.html:
  • resultsdbpy/resultsdbpy/view/static/library/css/webkit.css:

(.input>input[type="text"][required][disabled],.input>input[type="number"][required][disabled],):When disabling a text input element even without a value, the style should match the style of a text input element with a value
(.input>input[type="text"][required][disabled]~label, .input>input[type="number"][required][disabled]~label,):
(@media (prefers-color-scheme: dark)):

11:18 AM Changeset in webkit [249020] by Justin Michaud
  • 3 edits
    1 add in trunk

Add missing exception check in canonicalizeLocaleList
https://bugs.webkit.org/show_bug.cgi?id=201021

Reviewed by Mark Lam.

JSTests:

  • stress/missing-exception-check-in-canonicalizeLocaleList.js: Added.

(catch):

Source/JavaScriptCore:

  • runtime/IntlObject.cpp:

(JSC::canonicalizeLocaleList):

11:13 AM Changeset in webkit [249019] by commit-queue@webkit.org
  • 8 edits in trunk/Source

Disable legacy TLS versions and add a temporary default to re-enable it
https://bugs.webkit.org/show_bug.cgi?id=200945

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

Source/WebKit:

  • NetworkProcess/NetworkSessionCreationParameters.cpp:

(WebKit::NetworkSessionCreationParameters::privateSessionParameters):
(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):

  • NetworkProcess/NetworkSessionCreationParameters.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeNetworkProcess):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::parameters):

Source/WTF:

  • wtf/Platform.h:
11:01 AM Changeset in webkit [249018] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

Make MediaStreamTrackPrivate WeakPtrFactoryInitialization::Eager
https://bugs.webkit.org/show_bug.cgi?id=201037

Reviewed by Darin Adler.

No change of behavior, replacing m_weakThis by the more convenient Eager.

  • platform/mediastream/MediaStreamTrackPrivate.cpp:

(WebCore::MediaStreamTrackPrivate::audioSamplesAvailable):
(WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate): Deleted.

  • platform/mediastream/MediaStreamTrackPrivate.h:
10:35 AM Changeset in webkit [249017] by timothy_horton@apple.com
  • 4 edits in trunk/LayoutTests

Rebaseline some editing tests after r248974
https://bugs.webkit.org/show_bug.cgi?id=200999
<rdar://problem/54564878>

  • platform/ios/editing/deleting/smart-delete-003-expected.txt:
  • platform/ios/editing/deleting/smart-delete-004-expected.txt:
  • platform/ios/editing/pasteboard/smart-paste-008-expected.txt:
10:23 AM Changeset in webkit [249016] by Joseph Pecoraro
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Cleanup some unused code
https://bugs.webkit.org/show_bug.cgi?id=201041

Reviewed by Alex Christensen.

  • UserInterface/Views/CPUUsageCombinedView.css:

(.cpu-usage-combined-view > .graph > .stacked-area-chart):

  • UserInterface/Views/CPUUsageCombinedView.js:

(WI.CPUUsageCombinedView):

  • UserInterface/Views/MediaTimelineOverviewGraph.js:

(WI.MediaTimelineOverviewGraph):

9:50 AM Changeset in webkit [249015] by Darin Adler
  • 3 edits in trunk/Source/WTF

Rename StringBuilder functions to avoid unclear "append uninitialized" terminology
https://bugs.webkit.org/show_bug.cgi?id=201020

Reviewed by Alex Christensen.

  • wtf/text/StringBuilder.cpp:

(WTF::StringBuilder::allocateBuffer): Use std::memcpy instead of just memcpy.
(WTF::StringBuilder::extendBufferForAppending): Renamed.
(WTF::StringBuilder::extendBufferForAppendingWithoutOverflowCheck): Ditto.
(WTF::StringBuilder::extendBufferForAppending8): Ditto.
(WTF::StringBuilder::extendBufferForAppending16): Ditto.
(WTF::StringBuilder::extendBufferForAppendingSlowPath): Ditto.
(WTF::StringBuilder::appendCharacters): Updated for new names.

  • wtf/text/StringBuilder.h: Updated for new names.
9:42 AM Changeset in webkit [249014] by Joseph Pecoraro
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Provide an engineering option to log protocol traffic as text
https://bugs.webkit.org/show_bug.cgi?id=200969

Reviewed by Devin Rousso.

  • UserInterface/Base/Setting.js:
  • UserInterface/Protocol/LoggingProtocolTracer.js:

(WI.LoggingProtocolTracer.prototype._processEntry):
(WI.LoggingProtocolTracer):

  • UserInterface/Views/SettingsTabContentView.js:

(WI.SettingsTabContentView.prototype._createDebugSettingsView):

9:26 AM Changeset in webkit [249013] by Darin Adler
  • 41 edits in trunk

Use makeString and multi-argument StringBuilder::append instead of less efficient multiple appends
https://bugs.webkit.org/show_bug.cgi?id=200862

Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

  • runtime/ExceptionHelpers.cpp:

(JSC::createUndefinedVariableError): Got rid of unnecessary local variable.
(JSC::notAFunctionSourceAppender): Use single append instead of multiple.
Eliminate unneeded and unconventional use of makeString on a single string literal.
(JSC::invalidParameterInstanceofNotFunctionSourceAppender): Ditto.
(JSC::invalidParameterInstanceofhasInstanceValueNotFunctionSourceAppender): Ditto.
(JSC::createInvalidFunctionApplyParameterError): Ditto.
(JSC::createInvalidInParameterError): Ditto.
(JSC::createInvalidInstanceofParameterErrorNotFunction): Ditto.
(JSC::createInvalidInstanceofParameterErrorHasInstanceValueNotFunction): Ditto.

  • runtime/FunctionConstructor.cpp:

(JSC::constructFunctionSkippingEvalEnabledCheck): Use single append instead of multiple.

  • runtime/Options.cpp:

(JSC::Options::dumpOption): Ditto.

  • runtime/TypeProfiler.cpp:

(JSC::TypeProfiler::typeInformationForExpressionAtOffset): Ditto.

  • runtime/TypeSet.cpp:

(JSC::StructureShape::stringRepresentation): Ditto. Also use a modern for loop.

Source/WebCore:

  • Modules/indexeddb/shared/IDBDatabaseInfo.cpp:

(WebCore::IDBDatabaseInfo::loggingString const): Use one append instead of multiple.

  • Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:

(WebCore::IDBObjectStoreInfo::loggingString const): Ditto.

  • Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:

(WebCore::toRTCCodecParameters): Ditto.

  • Modules/plugins/YouTubePluginReplacement.cpp:

(WebCore::YouTubePluginReplacement::youTubeURLFromAbsoluteURL): Ditto.

  • Modules/webdatabase/DatabaseTracker.cpp:

(WebCore::generateDatabaseFileName): Ditto.

  • Modules/websockets/WebSocketExtensionDispatcher.cpp:

(WebCore::WebSocketExtensionDispatcher::createHeaderValue const): Ditto.
(WebCore::WebSocketExtensionDispatcher::appendAcceptedExtension): Ditto.

  • Modules/websockets/WebSocketHandshake.cpp:

(WebCore::WebSocketHandshake::clientLocation const): Use makeString instead of
StringBuilder.

  • bindings/js/JSDOMExceptionHandling.cpp:

(WebCore::appendArgumentMustBe): Use one append instead of multiple.
(WebCore::throwArgumentMustBeEnumError): Ditto.
(WebCore::throwArgumentTypeError): Ditto.

  • contentextensions/CombinedURLFilters.cpp:

(WebCore::ContentExtensions::recursivePrint): Ditto.

  • css/CSSBasicShapes.cpp:

(WebCore::buildCircleString): Ditto.
(WebCore::buildEllipseString): Ditto.
(WebCore::buildPolygonString): Ditto.
(WebCore::buildInsetString): Ditto.

  • css/CSSCalculationValue.cpp:

(WebCore::buildCssText): Deleted.
(WebCore::CSSCalcValue::customCSSText const): Use makeString.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::CSSComputedStyleDeclaration::cssText const): Use one append instead of multiple.

  • css/CSSCrossfadeValue.cpp:

(WebCore::CSSCrossfadeValue::customCSSText const): Use makeString.

  • css/CSSFilterImageValue.cpp:

(WebCore::CSSFilterImageValue::customCSSText const): Ditto.

  • css/CSSFontFaceRule.cpp:

(WebCore::CSSFontFaceRule::cssText const): Ditto.

  • css/CSSFontFaceSrcValue.cpp:

(WebCore::CSSFontFaceSrcValue::customCSSText const): Ditto.

  • css/CSSGradientValue.cpp:

(WebCore::appendGradientStops): Moved code here from CSSLinearGradientValue::customCSSText
so it can be shared with CSSRadialGradientValue::customCSSText. Use one append per stop.
(WebCore::CSSLinearGradientValue::customCSSText const): Use one append instead of multiple.
(WebCore::CSSRadialGradientValue::customCSSText const): Ditto.
(WebCore::CSSConicGradientValue::customCSSText const): Ditto.

  • css/CSSMediaRule.cpp:

(WebCore::CSSMediaRule::cssText const): Ditto.

  • css/CSSNamespaceRule.cpp:

(WebCore::CSSNamespaceRule::cssText const): Ditto.

  • css/CSSPageRule.cpp:

(WebCore::CSSPageRule::selectorText const): Use makeString.

  • css/CSSPrimitiveValue.cpp:

(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const):
Use one append instead of multiple.

  • css/CSSPropertySourceData.cpp:

(WebCore::CSSPropertySourceData::CSSPropertySourceData): Initialize in the
structure definition instead of the constructor.
(WebCore::CSSPropertySourceData::toString const): Use makeString.

  • css/CSSPropertySourceData.h: Initialize in the structure definition.
  • css/CSSStyleRule.cpp:

(WebCore::CSSStyleRule::cssText const): Use makeString.

  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseFontFaceDescriptor): Use makeString.

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::font const): Use one append instead of multiple.

Source/WebKit:

  • Shared/mac/AuxiliaryProcessMac.mm:

(WebKit::setAndSerializeSandboxParameters): Use one append instead of multiple.

Source/WTF:

  • wtf/DateMath.cpp:

(WTF::makeRFC2822DateString): Use one append instead of multiple.

  • wtf/JSONValues.cpp:

(WTF::appendDoubleQuotedString): Ditto.

Tools:

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::statisticsDidRunTelemetryCallback): Use makeString.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::findAndDumpWebKitProcessIdentifiers): Ditto.
(WTR::TestController::downloadDidReceiveServerRedirectToURL): Ditto.
(WTR::TestController::downloadDidFail): Ditto.

9:20 AM Changeset in webkit [249012] by Alan Coon
  • 16 edits
    2 adds in branches/safari-608-branch

Cherry-pick r249006. rdar://problem/54600921

Typing Korean in title field after typing in the body inserts extraneous characters on blog.naver.com
https://bugs.webkit.org/show_bug.cgi?id=201023
<rdar://problem/54294794>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Ensures that we recognize the blog editor on blog.naver.com to be a hidden editable area. This website places
focus inside an editable body element of a subframe that is completely empty (width: 0 and border: 0). See the
WebKit ChangeLog for more details.

Test: editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe.html

  • rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects const):

Source/WebKit:

After r242833, we began to avoid sending redundant ElementDidFocus updates in the case where a focused element
was blurred and refocused within the same runloop. This was done to prevent the input view from flickering due
to input view reloading, as well as scrolling to reveal the focused element, when tapping to change selection on
Microsoft Word online.

However, on blog.naver.com, these ElementDidFocus messages were necessary in order to ensure that the platform
input context changes when moving between the title and body fields, or when tapping to change selection. This
is because blog.naver.com uses a hidden contenteditable area under a subframe (see WebCore ChangeLog for more
detail here). While text is never directly inserted into this hidden contenteditable, the events are observed
and used to "play back" editing in the main visible content area.

Thus, when moving between the title and body fields (or when changing selection within either), the only hint we
get is that the hidden editable element is blurred and immediately refocused. Since we no longer send
ElementDidFocus updates in this scenario, UIKeyboardImpl and kbd are not aware that the page has effectively
changed input contexts.

Combined with the fact that Korean IME on iOS may insert additional text given the document context (i.e. text
that the input manager, kbd, thinks we've previously inserted), this means that when typing several characters
into the body field on naver and then switching to edit the title, initial keystrokes may insert unexpected
text in the title field.

To fix this, we add some hooks to notify the UI process when an element that was blurred has been immediately
refocused. Upon receiving this message, the UI process then tells UIKeyboardImpl to re-retrieve its input
context, which calls into -requestAutocorrectionContextWithCompletionHandler: in WKContentView. While notorious
for being synchronous IPC, this is mitigated by (1) being limiting to only instances where we have a hidden
editable area, and (2) being limited by a batching mechanism in the web process, such that if the focused
element is blurred, refocused, re-blurred, and refocused many times in the same runloop, we'll only send a
single UpdateInputContextAfterBlurringAndRefocusingElement message (as opposed to the many ElementDidFocus
messages we would've sent in previous releases).

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:

Add a new mechanism to update the platform input context (on iOS, UIKeyboardImpl's document state) when focus
moves away from and immediately returns to a hidden editable element.

  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::updateInputContextAfterBlurringAndRefocusingElement):
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _updateInputContextAfterBlurringAndRefocusingElement]):

Tell the active UIKeyboardImpl to refetch document state from the WKContentView. While this does result in a new
autocorrection context request (which, unfortunately, triggers synchronous IPC to the web process), this request
would've still happened anyways in the case where we would previously have sent an ElementDidFocus message.

  • UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::updateInputContextAfterBlurringAndRefocusingElement):
  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::elementDidFocus):

In the case where we avoid sending a full ElementDidFocus message to the UI process due to refocusing the same
element, we should still notify the UI process so that it can synchronize state between the application process
and kbd. See above for more details.

(WebKit::WebPage::elementDidBlur):
(WebKit::WebPage::updateInputContextAfterBlurringAndRefocusingElementIfNeeded):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::updateInputContextAfterBlurringAndRefocusingElementIfNeeded):

LayoutTests:

Add a new layout test to verify that we suppress text interactions when focusing an editable element inside an
empty, borderless subframe.

  • editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe-expected.txt: Added.
  • editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe.html: Added.

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

8:47 AM Changeset in webkit [249011] by Kocsen Chung
  • 4 edits
    2 adds in branches/safari-608-branch

Cherry-pick r248977. rdar://problem/54599960

Do not adjust viewport if editing selection is already visible
https://bugs.webkit.org/show_bug.cgi?id=200907
<rdar://problem/53903417>

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/scrolling/ios/autoscroll-input-when-very-zoomed.html

Currently due to scrolling being mostly handled by integers, we are getting
issues with rounding errors when trying to adjust the viewport while
editing text when we are significantly zoomed in. The real fix would be to
start dealing with scrolling with floats/doubles, but until such time,
we should early out of adjusting selections that we are certain are currently
visible.

  • rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollRectToVisible):

LayoutTests:

  • fast/scrolling/ios/autoscroll-input-when-very-zoomed-expected.txt: Added.
  • fast/scrolling/ios/autoscroll-input-when-very-zoomed.html: Added.
  • resources/ui-helper.js: (window.UIHelper.immediateZoomToScale):

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

8:45 AM Changeset in webkit [249010] by Kocsen Chung
  • 2 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r248997. rdar://problem/54579627

Unreviewed build fix; add a 'final' declaration on shouldOverridePauseDuringRouteChange().

  • Modules/mediastream/MediaStream.h:

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

8:45 AM Changeset in webkit [249009] by Kocsen Chung
  • 3 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r248978. rdar://problem/54579627

Adopt AVSystemController_ActiveAudioRouteDidChangeNotification
https://bugs.webkit.org/show_bug.cgi?id=200992
<rdar://problem/54408993>

Reviewed by Eric Carlson.

Follow-up to r248962: When the active audio route changes, and the
system instructs us to pause, only pause the currently audible sessions.

  • platform/audio/ios/MediaSessionManagerIOS.h:
  • platform/audio/ios/MediaSessionManagerIOS.mm: (WebCore::MediaSessionManageriOS::activeAudioRouteDidChange): (-[WebMediaSessionHelper activeAudioRouteDidChange:]): (WebCore::MediaSessionManageriOS::activeRouteDidChange): Deleted.

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

8:45 AM Changeset in webkit [249008] by Kocsen Chung
  • 6 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r248962. rdar://problem/54579627

Adopt AVSystemController_ActiveAudioRouteDidChangeNotification
https://bugs.webkit.org/show_bug.cgi?id=200992
<rdar://problem/54408993>

Reviewed by Eric Carlson.

When the system notifies us that the active audio route has changed in such a way
that necessitates pausing, pause all media sessions, exempting those that are
associated with WebRTC, since "pausing" an active audio conference isn't really
possible.

  • Modules/mediastream/MediaStream.h:
  • platform/audio/PlatformMediaSession.cpp: (WebCore::PlatformMediaSession::shouldOverridePauseDuringRouteChange const):
  • platform/audio/PlatformMediaSession.h: (WebCore::PlatformMediaSessionClient::shouldOverridePauseDuringRouteChange const):
  • platform/audio/ios/MediaSessionManagerIOS.h:
  • platform/audio/ios/MediaSessionManagerIOS.mm: (WebCore::MediaSessionManageriOS::activeRouteDidChange): (-[WebMediaSessionHelper initWithCallback:]): (-[WebMediaSessionHelper activeAudioRouteDidChange:]):

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

8:34 AM Changeset in webkit [249007] by commit-queue@webkit.org
  • 7 edits in trunk

Pass conformance/attribs WebGL conformance tests
https://bugs.webkit.org/show_bug.cgi?id=200901

Patch by Kai Ninomiya <kainino@chromium.org> on 2019-08-22
Reviewed by Alex Christensen.

Tested by
LayoutTests/webgl/*/conformance/attribs/gl-vertexattribpointer.html,
LayoutTests/webgl/2.0.0/conformance/more/functions/vertexAttribPointerBadArgs.html,
and other conformance/attribs/* tests not included in LayoutTests.
LayoutTests/webgl/1.0.2/conformance/more/functions/vertexAttribPointerBadArgs.html
fails as expected because it is an old snapshot of an incorrect test.

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::validateVertexAttributes):
(WebCore::WebGLRenderingContextBase::vertexAttribPointer):

  • html/canvas/WebGLVertexArrayObjectBase.cpp:

(WebCore::WebGLVertexArrayObjectBase::setVertexAttribState):

  • html/canvas/WebGLVertexArrayObjectBase.h:
8:09 AM Changeset in webkit [249006] by Wenson Hsieh
  • 16 edits
    2 adds in trunk

Typing Korean in title field after typing in the body inserts extraneous characters on blog.naver.com
https://bugs.webkit.org/show_bug.cgi?id=201023
<rdar://problem/54294794>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Ensures that we recognize the blog editor on blog.naver.com to be a hidden editable area. This website places
focus inside an editable body element of a subframe that is completely empty (width: 0 and border: 0). See the
WebKit ChangeLog for more details.

Test: editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects const):

Source/WebKit:

After r242833, we began to avoid sending redundant ElementDidFocus updates in the case where a focused element
was blurred and refocused within the same runloop. This was done to prevent the input view from flickering due
to input view reloading, as well as scrolling to reveal the focused element, when tapping to change selection on
Microsoft Word online.

However, on blog.naver.com, these ElementDidFocus messages were necessary in order to ensure that the platform
input context changes when moving between the title and body fields, or when tapping to change selection. This
is because blog.naver.com uses a hidden contenteditable area under a subframe (see WebCore ChangeLog for more
detail here). While text is never directly inserted into this hidden contenteditable, the events are observed
and used to "play back" editing in the main visible content area.

Thus, when moving between the title and body fields (or when changing selection within either), the only hint we
get is that the hidden editable element is blurred and immediately refocused. Since we no longer send
ElementDidFocus updates in this scenario, UIKeyboardImpl and kbd are not aware that the page has effectively
changed input contexts.

Combined with the fact that Korean IME on iOS may insert additional text given the document context (i.e. text
that the input manager, kbd, thinks we've previously inserted), this means that when typing several characters
into the body field on naver and then switching to edit the title, initial keystrokes may insert unexpected
text in the title field.

To fix this, we add some hooks to notify the UI process when an element that was blurred has been immediately
refocused. Upon receiving this message, the UI process then tells UIKeyboardImpl to re-retrieve its input
context, which calls into -requestAutocorrectionContextWithCompletionHandler: in WKContentView. While notorious
for being synchronous IPC, this is mitigated by (1) being limiting to only instances where we have a hidden
editable area, and (2) being limited by a batching mechanism in the web process, such that if the focused
element is blurred, refocused, re-blurred, and refocused many times in the same runloop, we'll only send a
single UpdateInputContextAfterBlurringAndRefocusingElement message (as opposed to the many ElementDidFocus
messages we would've sent in previous releases).

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:

Add a new mechanism to update the platform input context (on iOS, UIKeyboardImpl's document state) when focus
moves away from and immediately returns to a hidden editable element.

  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::updateInputContextAfterBlurringAndRefocusingElement):

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _updateInputContextAfterBlurringAndRefocusingElement]):

Tell the active UIKeyboardImpl to refetch document state from the WKContentView. While this does result in a new
autocorrection context request (which, unfortunately, triggers synchronous IPC to the web process), this request
would've still happened anyways in the case where we would previously have sent an ElementDidFocus message.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::updateInputContextAfterBlurringAndRefocusingElement):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::elementDidFocus):

In the case where we avoid sending a full ElementDidFocus message to the UI process due to refocusing the same
element, we should still notify the UI process so that it can synchronize state between the application process
and kbd. See above for more details.

(WebKit::WebPage::elementDidBlur):
(WebKit::WebPage::updateInputContextAfterBlurringAndRefocusingElementIfNeeded):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::updateInputContextAfterBlurringAndRefocusingElementIfNeeded):

LayoutTests:

Add a new layout test to verify that we suppress text interactions when focusing an editable element inside an
empty, borderless subframe.

  • editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe-expected.txt: Added.
  • editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe.html: Added.
6:42 AM Changeset in webkit [249005] by mitz@apple.com
  • 9 copies
    1 add in releases/Apple/Safari Technology Preview/Safari Technology Preview 90

Added a tag for Safari Technology Preview release 90.

4:41 AM Changeset in webkit [249004] by clopez@igalia.com
  • 3 edits in trunk/Tools

[GTK][WPE] Support for command "--version" on the MiniBrowser (follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=200978

Unreviewed follow-up fix.

Update the string format specifier for unsigned it.

Patch by clopez@igalia.com <clopez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc> on 2019-08-22

  • MiniBrowser/gtk/main.c:

(main):

  • MiniBrowser/wpe/main.cpp:

(main):

4:18 AM Changeset in webkit [249003] by clopez@igalia.com
  • 3 edits in trunk/Tools

[GTK][WPE] Support for command "--version" on the MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=200978

Reviewed by Žan Doberšek.

Printing the engine version used from the MiniBrowser is useful.
For example, the test scripts on WPT can use this info to better
tag the generated results.

  • MiniBrowser/gtk/main.c: Print the engine version when called with --version or -v.

(main):

  • MiniBrowser/wpe/main.cpp: Ditto.

(main):

4:05 AM Changeset in webkit [249002] by youenn@apple.com
  • 5 edits in trunk/Source/WebCore

CaptureDeviceManager does not need to be CanMakeWeakPtr
https://bugs.webkit.org/show_bug.cgi?id=200936

Reviewed by Alex Christensen.

CaptureDeviceManager does not need to create a weak pointer in deviceChanged
since it directly calls RealtimeMediaSourceCenter singleton.

CoreAudioCaptureDeviceManager does not need to create a weak pointer since its only
instance is NeverDestroyed.
No change of behavior.

  • platform/mediastream/CaptureDeviceManager.cpp:

(WebCore::CaptureDeviceManager::deviceChanged):

  • platform/mediastream/CaptureDeviceManager.h:
  • platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:

(WebCore::createAudioObjectPropertyListenerBlock):
(WebCore::CoreAudioCaptureDeviceManager::coreAudioCaptureDevices):
(WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices):

  • platform/mediastream/mac/CoreAudioCaptureDeviceManager.h:
4:05 AM Changeset in webkit [249001] by youenn@apple.com
  • 34 edits
    2 copies
    3 adds in trunk

Add a WebsiteDataStore delegate to handle AuthenticationChallenge that do not come from pages
https://bugs.webkit.org/show_bug.cgi?id=196870

Reviewed by Alex Christensen.

Source/WebKit:

Make NetworkProcess provide the session ID for any authentication challenge.
In case there is no associated page for the authentication challenge or this is related to a service worker,
ask the website data store to take a decision.
Add website data store delegate to allow applications to make the decision.
Restrict using the delegate to server trust evaluation only.

Make ping loads reuse the same mechanism.

Covered by service worker tests and updated beacon test.

  • NetworkProcess/NetworkCORSPreflightChecker.cpp:

(WebKit::NetworkCORSPreflightChecker::didReceiveChallenge):

  • NetworkProcess/NetworkDataTask.cpp:

(WebKit::NetworkDataTask::sessionID const):

  • NetworkProcess/NetworkDataTask.h:
  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::didReceiveChallenge):

  • NetworkProcess/NetworkLoadChecker.h:

(WebKit::NetworkLoadChecker::networkProcess):

  • NetworkProcess/PingLoad.cpp:

(WebKit::PingLoad::didReceiveChallenge):

  • Shared/Authentication/AuthenticationManager.cpp:

(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):

  • Shared/Authentication/AuthenticationManager.h:
  • Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.h: Copied from Tools/WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.h.
  • Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.mm: Copied from Source/WebKit/Shared/Authentication/cocoa/ClientCertificateAuthenticationXPCConstants.h.

(WebKit::toAuthenticationChallengeDisposition):

  • SourcesCocoa.txt:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(WebsiteDataStoreClient::WebsiteDataStoreClient):

  • UIProcess/API/Cocoa/_WKWebsiteDataStoreDelegate.h:
  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::NavigationClient::didReceiveAuthenticationChallenge):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::didReceiveAuthenticationChallenge):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
  • UIProcess/ServiceWorkerProcessProxy.cpp:
  • UIProcess/ServiceWorkerProcessProxy.h:
  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::isServiceWorkerPageID const):

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebsiteData/WebsiteDataStoreClient.h:

(WebKit::WebsiteDataStoreClient::didReceiveAuthenticationChallenge):

  • WebKit.xcodeproj/project.pbxproj:

Tools:

Implement the new delegate by respecting the value set by testRunner.setAllowsAnySSLCertificate
Accept any server certificate by default.

  • WebKitTestRunner/TestController.cpp:
  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::cocoaResetStateToConsistentValues):
(WTR::TestController::setAllowsAnySSLCertificate):

  • WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.h:
  • WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.mm:

(-[TestWebsiteDataStoreDelegate didReceiveAuthenticationChallenge:completionHandler:]):
(-[TestWebsiteDataStoreDelegate setAllowAnySSLCertificate:]):

LayoutTests:

Add tests to validate that the delegate decision is respected for beacons and service worker loads.

  • http/wpt/beacon/cors/crossorigin-arraybufferview-no-preflight-expected.txt:
  • http/wpt/beacon/cors/crossorigin-arraybufferview-no-preflight.html:
  • http/wpt/beacon/resources/beacon-preflight.py:

(main):

  • http/wpt/service-workers/resources/lengthy-pass.py:

(main):

  • http/wpt/service-workers/server-trust-evaluation.https-expected.txt: Added.
  • http/wpt/service-workers/server-trust-evaluation.https.html: Added.
  • http/wpt/service-workers/server-trust-worker.js: Added.
2:41 AM Changeset in webkit [249000] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Fix unsafe usage of MediaStreamTrackPrivate from background thread in MediaStreamTrackPrivate::audioSamplesAvailable()
https://bugs.webkit.org/show_bug.cgi?id=200924

Reviewed by Youenn Fablet.

MediaStreamTrackPrivate is constructed / destructed on the main thread but its MediaStreamTrackPrivate::audioSamplesAvailable()
gets called on a background thread. The audioSamplesAvailable() method may get called until the MediaStreamTrackPrivate
destructor unregisters |this| as an observer from m_source. Event though MediaStreamTrackPrivate subclasses ThreadSafeRefCounted,
ref'ing |this| on the background thread inside audioSamplesAvailable() is still unsafe as the destructor may already be running
on the main thread.

  • platform/mediastream/MediaStreamTrackPrivate.cpp:

(WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate):
(WebCore::MediaStreamTrackPrivate::~MediaStreamTrackPrivate):
(WebCore::MediaStreamTrackPrivate::audioSamplesAvailable):

  • platform/mediastream/MediaStreamTrackPrivate.h:
2:40 AM Changeset in webkit [248999] by Claudio Saavedra
  • 2 edits in trunk/Source/WebKit

[SOUP] NetworkProcessSoup does not initialize CacheOptions correctly
https://bugs.webkit.org/show_bug.cgi?id=200886

Reviewed by Philippe Normand.

r247567 wrongly initializes CacheOptions in a local variable that is never used
instead of using NetworkProcess's member variable, that is later used by the
NetworkSession to initialize the cache.

  • NetworkProcess/soup/NetworkProcessSoup.cpp:

(WebKit::NetworkProcess::platformInitializeNetworkProcess):

2:12 AM Changeset in webkit [248998] by Fujii Hironori
  • 9 edits in trunk/Source/WebCore

Remove the dead code of ScalableImageDecoder for scaling
https://bugs.webkit.org/show_bug.cgi?id=200498

Reviewed by Daniel Bates.

No ports are using the down scaling feature of
ScalableImageDecoder now. Removed it.

No behavior change.

  • platform/image-decoders/ScalableImageDecoder.cpp:

(WebCore::ScalableImageDecoder::prepareScaleDataIfNecessary): Deleted.
(WebCore::ScalableImageDecoder::upperBoundScaledX): Deleted.
(WebCore::ScalableImageDecoder::lowerBoundScaledX): Deleted.
(WebCore::ScalableImageDecoder::upperBoundScaledY): Deleted.
(WebCore::ScalableImageDecoder::lowerBoundScaledY): Deleted.
(WebCore::ScalableImageDecoder::scaledY): Deleted.

  • platform/image-decoders/ScalableImageDecoder.h:

(WebCore::ScalableImageDecoder::scaledSize): Deleted.

  • platform/image-decoders/gif/GIFImageDecoder.cpp:

(WebCore::GIFImageDecoder::setSize):
(WebCore::GIFImageDecoder::findFirstRequiredFrameToDecode):
(WebCore::GIFImageDecoder::haveDecodedRow):
(WebCore::GIFImageDecoder::frameComplete):
(WebCore::GIFImageDecoder::initFrameBuffer):

  • platform/image-decoders/jpeg/JPEGImageDecoder.cpp:

(WebCore::JPEGImageDecoder::outputScanlines):
(WebCore::JPEGImageDecoder::setSize): Deleted.

  • platform/image-decoders/jpeg/JPEGImageDecoder.h:
  • platform/image-decoders/jpeg2000/JPEG2000ImageDecoder.cpp:

(WebCore::JPEG2000ImageDecoder::decode):

  • platform/image-decoders/png/PNGImageDecoder.cpp:

(WebCore::PNGImageDecoder::rowAvailable):
(WebCore::PNGImageDecoder::initFrameBuffer):
(WebCore::PNGImageDecoder::frameComplete):
(WebCore::PNGImageDecoder::setSize): Deleted.

  • platform/image-decoders/png/PNGImageDecoder.h:
Note: See TracTimeline for information about the timeline view.