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

Timeline



Jun 19, 2019:

9:41 PM Changeset in webkit [246630] by ysuzuki@apple.com
  • 8 edits in trunk

[bmalloc] IsoHeap's initialization is racy with IsoHeap::isInitialized
https://bugs.webkit.org/show_bug.cgi?id=199053

Reviewed by Saam Barati.

Source/bmalloc:

IsoHeap's initialization code is racy. Let's see the isInitialized and the initialization code.

isInitialized:

template<typename Type>
bool IsoHeap<Type>::isInitialized()
{

std::atomic<unsigned>* atomic =

reinterpret_cast<std::atomic<unsigned>*>(&m_allocatorOffsetPlusOne);

return !!atomic->load(std::memory_order_acquire);

}

initialization:

if (!handle.isInitialized()) {

std::lock_guard<Mutex> locker(handle.m_initializationLock);
if (!handle.isInitialized()) {

auto* heap = new IsoHeapImpl<typename api::IsoHeap<Type>::Config>();
std::atomic_thread_fence(std::memory_order_seq_cst);
handle.setAllocatorOffset(heap->allocatorOffset()); <================= (1)
handle.setDeallocatorOffset(heap->deallocatorOffset());
(2)
handle.m_impl = heap;

}

}

IsoHeap::isInitialized is loading m_allocatorOffsetPlusOne with acquire fence. On the other hand, the initialization
code configures m_allocatorOffsetPlusOne (1) before configuring m_deallocatorOffsetPlusOne (2). Let's consider the following
case.

  1. Thread A is at (1)
  2. Thread B calls handle.isInitialized(). Then B think that handle is already initialized while it lacks m_deallocatorOffsetPlusOne and m_impl pointer.
  3. Thread B uses this handle, and does std::max(handle.allocatorOffset(), handle.deallocatorOffset()). But m_deallocatorOffsetPlusOne is not configured yet. As a result, deallocatorOffset() returns 0xffffffff (b/c it calculates m_deallocatorOffsetPlusOne - 1, and m_deallocatorOffsetPlusOne is first zero-initialized before IsoHeap initialization happens).
  4. std::max returns 0xffffffff as an offset. Of course, this is wrong, and leading to the release assertion.

This patch fixes the above issue by,

  1. Add IsoHeap::initialize() function instead of initializing it in IsoTLS
  2. Change isInitialized() function to load m_impl pointer instead of m_allocatorOffsetPlusOne with acquire fence.
  3. In initialize() function, we store m_heap with release fence at last.
  • bmalloc/IsoHeap.h:
  • bmalloc/IsoHeapInlines.h:

(bmalloc::api::IsoHeap<Type>::isInitialized):
(bmalloc::api::IsoHeap<Type>::initialize):

  • bmalloc/IsoTLSInlines.h:

(bmalloc::IsoTLS::ensureHeap):

Source/WTF:

Add constexpr static functions to generate pseudo random numbers from LINE.

  • wtf/WeakRandom.h:

(WTF::WeakRandom::nextState):
(WTF::WeakRandom::generate):
(WTF::WeakRandom::advance):

Tools:

Added a test stressing IsoHeap with multiple threads.

  • TestWebKitAPI/Tests/WTF/bmalloc/IsoHeap.cpp:

(assertHasObjects):
(assertHasOnlyObjects):
(assertClean):
(TEST):

9:36 PM Changeset in webkit [246629] by commit-queue@webkit.org
  • 4 edits
    1 delete in trunk/LayoutTests

Make preload/link-header-preload-imagesrcset.html work on DPR != 1
https://bugs.webkit.org/show_bug.cgi?id=198533

Patch by Rob Buis <rbuis@igalia.com> on 2019-06-19
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Make the test take DPR into account.

  • web-platform-tests/preload/dynamic-adding-preload-imagesrcset.html:
  • web-platform-tests/preload/link-header-preload-imagesrcset.html:

LayoutTests:

Remove unneeded iOS test expectations.

  • platform/ios-simulator-12-wk2/imported/w3c/web-platform-tests/preload/dynamic-adding-preload-imagesrcset-expected.txt: Removed.
  • platform/ios-simulator-12-wk2/imported/w3c/web-platform-tests/preload/link-header-preload-imagesrcset-expected.txt: Removed.
8:18 PM Changeset in webkit [246628] by Justin Fan
  • 4 edits
    3 adds in trunk

[WHLSL] Create a shading language test harness
https://bugs.webkit.org/show_bug.cgi?id=198978

Reviewed by Myles C. Maxfield.

Source/WebCore:

When creating MTLArgumentEncoders for argument buffers, the user's arguments
must match the order that they are declared in the shader. Move back-end information
such as buffer lengths to the end of the argument arrays.

Test: webgpu/whlsl-harness-test.html

  • Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:

(WebCore::WHLSL::Metal::EntryPointScaffolding::resourceHelperTypes):

  • platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:

(WebCore::GPUBindGroupLayout::tryCreate):

LayoutTests:

Introduce a test harness that can be used to test WebGPU shader compilation and functionality.
Currently using MSL.
Will be replaced with WHLSL as it gains the minimum features needed to support.

  • webgpu/js/whlsl-test-harness.js: Added.

(isVectorType):
(convertTypeToArrayType):
(convertTypeToWHLSLType):
(Data):
(Data.prototype.async.getArrayBuffer):
(Data.prototype.get type):
(Data.prototype.get isPointer):
(Data.prototype.get buffer):
(Data.prototype.get byteLength):
(Harness.prototype._initialize):
(Harness.prototype.async.callTypedFunction):
(Harness.prototype.async.callVoidFunction):
(Harness.prototype._setUpArguments):
(Harness.prototype._callFunction):
(Harness):
(harness._initialize.async):
(makeBool):
(makeInt):
(makeUchar):
(makeUint):
(makeFloat):
(makeFloat4):
(async.callBoolFunction):
(async.callIntFunction):
(async.callUcharFunction):
(async.callUintFunction):
(async.callFloatFunction):
(async.callFloat4Function):
(callVoidFunction):

  • webgpu/whlsl-harness-test-expected.txt: Added.
  • webgpu/whlsl-harness-test.html: Added.
7:18 PM Changeset in webkit [246627] by Alan Bujtas
  • 2 edits in trunk/Tools

[LFC] Expand tests coverage (1126 new tests -> 2324).

  • LayoutReloaded/misc/LFC-passing-tests.txt:
7:17 PM Changeset in webkit [246626] by dino@apple.com
  • 5 edits in trunk/Source

No menu pop-up when long pressing on a link in Firefox app
https://bugs.webkit.org/show_bug.cgi?id=199045
<rdar://problem/51422407>

Reviewed by Tim Horton.

Add a version check for linking on-or-after iOS 13. When
that isn't true, we don't use UIContextMenuInteraction
and instead fall back on the legacy UIPreviewItem API.

  • UIProcess/Cocoa/VersionChecks.h: Add FirstThatHasUIContextMenuInteraction.
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _shouldUseContextMenus]): New method to decide if we should
use context menus or preview items.
(-[WKContentView setupInteraction]): Make the decision at runtime rather than
compile time.
(-[WKContentView _contentsOfUserInterfaceItem:]): Ditto.
(-[WKContentView _registerPreview]): Ditto.
(-[WKContentView _unregisterPreview]): Ditto.

7:05 PM Changeset in webkit [246625] by sbarati@apple.com
  • 5 edits
    2 adds in trunk

[WHLSL] The checker needs to resolve types for the anonymous variables in ReadModifyWrite expressions
https://bugs.webkit.org/show_bug.cgi?id=198988

Reviewed by Dean Jackson and Myles C. Maxfield.

Source/WebCore:

This patch makes it so that the Checker assigns types to the internal variables
in a read modify write expression. These were the only variables that didn't have
types ascribed to them.

This patch also does a fly by fix where we kept pointers to value types
in a HashMap in the checker. This is wrong precisely when the HashMap gets
resized. Instead, we now just store the value itself since we're just
dealing with a simple Variant that wraps either an empty struct or an
enum.

Test: webgpu/whlsl-checker-should-set-type-of-read-modify-write-variables.html

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

(WebCore::WHLSL::AST::VariableDeclaration::setType):
(WebCore::WHLSL::AST::VariableDeclaration::type const):

  • Modules/webgpu/WHLSL/WHLSLASTDumper.cpp: Make it obvious that read

modify write expressions are such by prefixing them with "RMW".
(WebCore::WHLSL::ASTDumper::visit):

  • Modules/webgpu/WHLSL/WHLSLChecker.cpp:

(WebCore::WHLSL::Checker::visit):

LayoutTests:

  • webgpu/whlsl-checker-should-set-type-of-read-modify-write-variables-expected.txt: Added.
  • webgpu/whlsl-checker-should-set-type-of-read-modify-write-variables.html: Added.
6:47 PM Changeset in webkit [246624] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION: Debugger: current call frame indicator isn't vertically centered
https://bugs.webkit.org/show_bug.cgi?id=199015

Reviewed by Matt Baker.

  • UserInterface/Views/CallFrameTreeElement.css:

(.tree-outline .item.call-frame .status):

5:51 PM Changeset in webkit [246623] by Fujii Hironori
  • 6 edits
    1 add in trunk

Add WTF::crossThreadCopy(T&&) to utilize String::isolatedCopy() &&
https://bugs.webkit.org/show_bug.cgi?id=198957

Reviewed by Alex Christensen.

Source/WTF:

&&-qualified String::isolatedCopy() has a optimization path which
does just WTFMove if it isSafeToSendToAnotherThread which means
the object hasOneRef.

However, WTF::crossThreadCopy was using only &-qualified
isolatedCopy. To use the optimization, added
WTF::crossThreadCopy(T&&) overloading.

  • wtf/CrossThreadCopier.h:

(WTF::crossThreadCopy): Added a overload of (T&&).

  • wtf/CrossThreadTask.h:

(WTF::createCrossThreadTask): Removed explicit template arguments of crossThreadCopy.

Tools:

  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/CrossThreadCopier.cpp: Added.
5:50 PM Changeset in webkit [246622] by aestes@apple.com
  • 3 edits in trunk/Source/WebKit

[iOS] Fall back to taking a UIView snapshohot for UITargetedPreviews if InteractionInformationAtPosition does not have an image
https://bugs.webkit.org/show_bug.cgi?id=199038
<rdar://problem/50555810>

Reviewed by Tim Horton.

In -contextMenuInteraction:previewForHighlightingMenuWithConfiguration: and friend, we
should always return a non-nil UITargetedPreview. When we do return nil, UIKit uses the web
view itself as the snapshot view, creating an unsightly animation.

For cases where we fail to create a UITargetedPreview from the information in
InteractionInformationAtPosition, this patch falls back to creating a UITargetedPreview with
a snapshot view obtained from
-[UIView resizableSnapshotViewFromRect:afterScreenUpdates:withCapInsets:].

Also renamed -targetedPreview to -_ensureTargetedPreview and cached the UITargetedPreview
for reuse in -contextMenuInteraction:previewForDismissingMenuWithConfiguration:.

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

(createFallbackTargetedPreview):
(-[WKContentView _ensureTargetedPreview]):
(-[WKContentView contextMenuInteraction:previewForHighlightingMenuWithConfiguration:]):
(-[WKContentView contextMenuInteraction:previewForDismissingMenuWithConfiguration:]):
(-[WKContentView contextMenuInteractionDidEnd:]):
(-[WKContentView _targetedPreview]): Renamed to _ensureTargetedPreview.

5:40 PM Changeset in webkit [246621] by Nikita Vasilyev
  • 5 edits in trunk

REGRESSION(r240946): Web Inspector: Styles: Pasting multiple properties has issues
https://bugs.webkit.org/show_bug.cgi?id=198505
<rdar://problem/51374780>

Reviewed by Matt Baker.

Source/WebInspectorUI:

Since r240946, setting WI.CSSStyleDeclaration.prototype.text updates the text immediately.
When WI.CSSStyleDeclaration.prototype.update gets called after setting text, it exits early
without firing WI.CSSStyleDeclaration.Event.PropertiesChanged.

  • UserInterface/Models/CSSStyleDeclaration.js:

(WI.CSSStyleDeclaration):
(WI.CSSStyleDeclaration.prototype.set text):

LayoutTests:

  • inspector/css/modify-css-property.html:

Listen for PropertiesChanged on the specific inline style declaration.
In Debug, PropertiesChanged may fire on a computed style declaration first,
causing the test to fail.

  • inspector/css/pseudo-element-matches-for-pseudo-element-node.html:

Drive-by: fix trailing white space.

5:38 PM Changeset in webkit [246620] by commit-queue@webkit.org
  • 4 edits in trunk

Optimize resolve method lookup in Promise static methods
https://bugs.webkit.org/show_bug.cgi?id=198864

Patch by Alexey Shvayka <Alexey Shvayka> on 2019-06-19
Reviewed by Yusuke Suzuki.

JSTests:

  • test262/expectations.yaml: Mark 18 test cases as passing.

Source/JavaScriptCore:

Lookup resolve method only once in Promise.{all,allSettled,race}.
(https://github.com/tc39/ecma262/pull/1506)

Already implemented in V8.

  • builtins/PromiseConstructor.js:
5:18 PM Changeset in webkit [246619] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

REGRESSION: ( r246394 ) webgpu/whlsl-buffer-fragment.html and webgpu/whlsl-buffer-vertex.html are failing
https://bugs.webkit.org/show_bug.cgi?id=199012

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations: Limit the failure expectation to High Sierra.
5:15 PM Changeset in webkit [246618] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Remove unused _pendingFilter from NetworkTableContentView
https://bugs.webkit.org/show_bug.cgi?id=199026

Reviewed by Devin Rousso.

This flag is no longer set as of https://trac.webkit.org/changeset/225895.

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView):
(WI.NetworkTableContentView.prototype._processPendingEntries):

5:14 PM Changeset in webkit [246617] by Keith Rollin
  • 7 edits in trunk/Tools

Relocate some test tools in non-mac builds
https://bugs.webkit.org/show_bug.cgi?id=198984
<rdar://problem/51873261>

Reviewed by Andy Estes.

The tools DumpRenderTree, WebKitTestRunner, LayoutTestHelper, and
TestNetscapePlugin get created in
WebKit.framework/Versions/A/Resources on non-mac builds. This is
incorrect, as those bundles are shallow bundles that don't use the
Versions hierarchy. Instead, store these files directly in
WebKit.framework.

Note that getting rid of just the "Versions/A" path components and
putting the files in WebKit.framework/Resources doesn't work as
codesign treats the result as an invalid layout.

The work in this patch involves changing the definition of the custom
build variable WEBKIT_FRAMEWORK_RESOURCES_PATH. The standard build
variable INSTALL_PATH is defined in terms of this variable. In order
to increase visiblity into this relationship, move both of these
variables into .xcconfig files if they weren't already. This
refactoring was done in a way to be the least disruptive and most
compatible with the previous definitions, even at the cost of being
repetitive.

  • DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
  • DumpRenderTree/mac/Configurations/Base.xcconfig:
  • DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig:
  • DumpRenderTree/mac/Configurations/LayoutTestHelper.xcconfig:
  • DumpRenderTree/mac/Configurations/TestNetscapePlugIn.xcconfig:
  • WebKitTestRunner/Configurations/BaseTarget.xcconfig:
5:13 PM Changeset in webkit [246616] by Devin Rousso
  • 8 edits in trunk/Source

Web Inspector: Network: replace CFNetwork SPI with new API where able
https://bugs.webkit.org/show_bug.cgi?id=198762

Reviewed by Timothy Hatcher.

Source/WebCore:

  • platform/network/NetworkLoadMetrics.h:

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):

Source/WTF:

  • wtf/Platform.h:
4:36 PM Changeset in webkit [246615] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

DownloadMonitor::measuredThroughputRate should approach zero with no throughput
https://bugs.webkit.org/show_bug.cgi?id=198981
<rdar://problem/51456914>

Patch by Alex Christensen <achristensen@webkit.org> on 2019-06-19
Reviewed by Geoffrey Garen.

When the timer fires to approximate the download rate, add a new timestamp with 0 bytes received since the last time we received bytes.
Then, if there's only one timestamp, assume the throughput rate is 0 instead of infinite.
This will prevent false positives estimating large download rates based on old data when the throughput drops to 0.

  • NetworkProcess/Downloads/DownloadMonitor.cpp:

(WebKit::DownloadMonitor::measuredThroughputRate const):
(WebKit::DownloadMonitor::timerFired):

4:30 PM Changeset in webkit [246614] by Truitt Savell
  • 2 edits in trunk/LayoutTests

Layout Tests in imported/w3c/web-platform-tests/websockets/ are flakey failures after r246406.
https://bugs.webkit.org/show_bug.cgi?id=199013

Unreviewed Test Gardening.

Patch by Russell Epstein <russell_e@apple.com> on 2019-06-19

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

[ews-build] Patch link should open the pretty patch
https://bugs.webkit.org/show_bug.cgi?id=199031

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps.py:

(ConfigureBuild.getPatchURL): Use the prettypatch url for patch.

2:47 PM Changeset in webkit [246612] by Simon Fraser
  • 18 edits in trunk

Source/WebCore:
REGRESSION (246538): Newyorker.com header scrolls on page

Revert parts of r246538 so that frame scrolling is reverted to using layer positions.
Overflow scroll will still scroll by changing boundsOrigin.

The bug was caused by confusion about insetClipLayer and scrollContainerLayer; macOS
positions the clip layer using FrameView::yPositionForInsetClipLayer(), so it's not just
a simple scroll container, and this change broke positioning for fixed position layers.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::reconcileScrollPosition):

  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::insetClipLayerForFrameView):

  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:

(WebCore::ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::~RenderLayerCompositor):
(WebCore::RenderLayerCompositor::frameViewDidChangeSize):
(WebCore::RenderLayerCompositor::updateScrollLayerPosition):
(WebCore::RenderLayerCompositor::updateScrollLayerClipping):
(WebCore::RenderLayerCompositor::frameViewDidScroll):
(WebCore::RenderLayerCompositor::updateRootLayerPosition):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
(WebCore::RenderLayerCompositor::ensureRootLayer):
(WebCore::RenderLayerCompositor::destroyRootLayer):
(WebCore::RenderLayerCompositor::updateScrollingNodeLayers):
(WebCore::RenderLayerCompositor::updateLayersForScrollPosition): Deleted.
(WebCore::RenderLayerCompositor::updateScrollContainerGeometry): Deleted.

  • rendering/RenderLayerCompositor.h:

LayoutTests:
Revert parts of r246538 so that frame scrolling is reverted to using layer positions.
Overflow scroll will still scroll by changing boundsOrigin.

The bug was caused by confusion about insetClipLayer and scrollContainerLayer; macOS
positions the clip layer using FrameView::yPositionForInsetClipLayer(), so it's not just
a simple scroll container, and this change broke positioning for fixed position layers.

  • compositing/iframes/scrolling-iframe-expected.txt:
  • compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt:
  • compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt:
  • platform/ios-wk2/compositing/iframes/scrolling-iframe-expected.txt:
  • platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt:
  • platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt:
  • platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt:
  • platform/mac-sierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt:
  • platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt:
  • platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt:
  • scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt:
2:33 PM Changeset in webkit [246611] by jer.noble@apple.com
  • 13 edits
    4 adds in trunk

iOS 12.2 Drawing portrait video to canvas is sideways
https://bugs.webkit.org/show_bug.cgi?id=196772
<rdar://problem/49781802>

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/video-orientation-canvas.html

Move rotation code into its own ImageRotationSessionVT class for re-use across
all existing classes with rotation operations. Should slightly increase performance
for painting rotated media files, as the rotation only occurs once per frame, rather
than once per drawing operation.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h:

(WebCore::ImageDecoderAVFObjC::RotationProperties::isIdentity const): Deleted.

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

(WebCore::ImageDecoderAVFObjC::readTrackMetadata):
(WebCore::ImageDecoderAVFObjC::storeSampleBuffer):
(WebCore::ImageDecoderAVFObjC::setTrack):
(WebCore::transformToRotationProperties): Deleted.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastPixelBuffer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):

  • platform/graphics/cv/ImageRotationSessionVT.h: Added.

(WebCore::ImageRotationSessionVT::RotationProperties::isIdentity const):
(WebCore::ImageRotationSessionVT::rotationProperties const):
(WebCore::ImageRotationSessionVT::rotatedSize):

  • platform/graphics/cv/ImageRotationSessionVT.mm: Added.

(WebCore::transformToRotationProperties):
(WebCore::ImageRotationSessionVT::ImageRotationSessionVT):
(WebCore::ImageRotationSessionVT::rotate):

  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:
  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h:
  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm:

(WebCore::rotationToAngle):
(WebCore::RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer):
(WebCore::computeRotatedWidthAndHeight): Deleted.

LayoutTests:

  • media/content/no-rotation.mp4:
  • media/media-source/only-bcp47-language-tags-accepted-as-valid-expected.txt:
  • media/video-orientation-canvas-expected.html: Added.
  • media/video-orientation-canvas.html: Added.
  • media/video-test.js:

(waitFor):

2:29 PM Changeset in webkit [246610] by Tadeu Zagallo
  • 2 edits in trunk/Source/JavaScriptCore

Some of the ASSERTs in CachedTypes.cpp should be RELEASE_ASSERTs
https://bugs.webkit.org/show_bug.cgi?id=199030

Reviewed by Mark Lam.

These assertions represent strong assumptions that the cache makes so
it's not safe to keep executing if they fail.

  • runtime/CachedTypes.cpp:

(JSC::Encoder::malloc):
(JSC::Encoder::Page::alignEnd):
(JSC::Decoder::ptrForOffsetFromBase):
(JSC::Decoder::handleForEnvironment const):
(JSC::Decoder::setHandleForEnvironment):
(JSC::CachedPtr::get const):
(JSC::CachedOptional::encode):
(JSC::CachedOptional::decodeAsPtr const): Deleted.

1:49 PM Changeset in webkit [246609] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] Add step to analyze Compile WebKit failures
https://bugs.webkit.org/show_bug.cgi?id=199025

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps.py:

(CompileWebKit.evaluateCommand): Add AnalyzeCompileWebKitResults step.
(CompileWebKitToT): set haltOnFailure to False since we need to run AnalyzeCompileWebKitResults step.
(AnalyzeCompileWebKitResults): Class to analyze compile webkit steps results.
(AnalyzeCompileWebKitResults.start): If ToT fails to build, retry the build, else marked the build as failed. Note that
this step is run only when compile-webkit failed.

1:34 PM Changeset in webkit [246608] by sihui_liu@apple.com
  • 3 edits in trunk/Source/WebKit

Remove unused originsWithCredentials from WebsiteData
https://bugs.webkit.org/show_bug.cgi?id=199020

Reviewed by Geoffrey Garen.

  • Shared/WebsiteData/WebsiteData.cpp:

(WebKit::WebsiteData::encode const):
(WebKit::WebsiteData::decode):

  • Shared/WebsiteData/WebsiteData.h:
1:28 PM Changeset in webkit [246607] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] Send email notifications for failures
https://bugs.webkit.org/show_bug.cgi?id=198919

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/master.cfg:
12:44 PM Changeset in webkit [246606] by sihui_liu@apple.com
  • 4 edits in trunk/Source/WebKit

Crash at com.apple.WebKit: WebKit::WebsiteDataStore::processPools const
https://bugs.webkit.org/show_bug.cgi?id=198935
<rdar://problem/51549308>

Reviewed by Geoffrey Garen.

When WebProcessProxy is in WebProcessCache or is pre-warmed, it does not hold a strong reference of
WebProcessPool. In this case, we should not store the raw pointer of WebProcessPool and perform websiteDataStore
operations with it.
This patch should fix the crash at dereferencing null pointer of WebProcessPool in
WebsiteDataStore::processPools, but it is unclear why websiteDataStore comes to observe cached or prewarmed web
process that should not have web page. The release log may help us find the cause.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::processPoolIfExists const):

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

(WebKit::WebsiteDataStore::processPools const):

12:28 PM Changeset in webkit [246605] by achristensen@apple.com
  • 12 edits in trunk

Add a unit test for client certificate authentication
https://bugs.webkit.org/show_bug.cgi?id=197800

Reviewed by Youenn Fablet.

Source/WebKit:

  • Shared/cf/ArgumentCodersCF.cpp:

Move SPI declarations to SecuritySPI.h.

Source/WTF:

  • wtf/spi/cocoa/SecuritySPI.h:

Move declarations from ArgumentCodersCF.cpp so they can be shared.

Tools:

Make better abstractions for reading and writing from/to TCPServer.
Add a unit test that causes a client certificate authentication challenge to happen.

  • TestWebKitAPI/TCPServer.cpp:

(TestWebKitAPI::TCPServer::TCPServer):
(TestWebKitAPI::TCPServer::read):
(TestWebKitAPI::TCPServer::write):
(TestWebKitAPI::TCPServer::respondWithChallengeThenOK):
(TestWebKitAPI::TCPServer::respondWithOK):

  • TestWebKitAPI/TCPServer.h:
  • TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:

(credentialWithIdentity):
(-[ChallengeDelegate webView:didReceiveAuthenticationChallenge:completionHandler:]):
(TEST):
(-[ClientCertificateDelegate webView:didFinishNavigation:]):
(-[ClientCertificateDelegate webView:didReceiveAuthenticationChallenge:completionHandler:]):
(-[ClientCertificateDelegate challengeCount]):
(TestWebKitAPI::TEST):
(respondWithChallengeThenOK): Deleted.
(credentialWithIdentityAndKeychainPath): Deleted.

  • TestWebKitAPI/Tests/WebKitCocoa/PDFLinkReferrer.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/WKNavigationResponse.mm:

(TEST):
(readRequest): Deleted.
(writeResponse): Deleted.

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm:

(TestWebKitAPI::TEST):
(TestWebKitAPI::respondWithChallengeThenOK): Deleted.

12:21 PM Changeset in webkit [246604] by aboya@igalia.com
  • 2 edits in trunk/LayoutTests

[GTK] Unreviewed test gardening
https://bugs.webkit.org/show_bug.cgi?id=199021

  • platform/gtk/TestExpectations:
12:00 PM Changeset in webkit [246603] by Kocsen Chung
  • 29 edits in tags/Safari-608.1.30

Revert r246538. rdar://problem/51905737

11:59 AM Changeset in webkit [246602] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'sourceCodePosition.lineNumber')
https://bugs.webkit.org/show_bug.cgi?id=199019

Reviewed by Matt Baker.

  • UserInterface/Base/Main.js:

(WI.linkifyLocation):

11:45 AM Changeset in webkit [246601] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Correct the error object link color in dark mode.
https://bugs.webkit.org/show_bug.cgi?id=198033

Patch by Zhifei Fang <zhifei_fang@apple.com> on 2019-06-19
Reviewed by Devin Rousso.

  • UserInterface/Views/ErrorObjectView.css:

(@media (prefers-dark-interface)):
(.error-object-link-container):

11:33 AM Changeset in webkit [246600] by Kocsen Chung
  • 7 edits in trunk/Source

Versioning.

11:26 AM Changeset in webkit [246599] by Kocsen Chung
  • 1 copy in tags/Safari-608.1.30

Tag Safari-608.1.30.

11:01 AM Changeset in webkit [246598] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Update preview API deprecation message.
https://bugs.webkit.org/show_bug.cgi?id=198974

  • UIProcess/API/Cocoa/WKUIDelegate.h:
10:42 AM Changeset in webkit [246597] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WebKit

[GTK] Fix compilation errors for the GTK2 plugin process
https://bugs.webkit.org/show_bug.cgi?id=199000

Reviewed by Michael Catanzaro.

  • Shared/gtk/WebEventFactory.cpp: Use the GdkEvent union fields

when directly accessing event struct fields.
(WebKit::buttonForEvent):
(WebKit::WebEventFactory::createWebMouseEvent):
(WebKit::WebEventFactory::createWebKeyboardEvent):

10:42 AM Changeset in webkit [246596] by Adrian Perez de Castro
  • 29 edits in trunk/Source

[WPE][GTK] Fix build with unified sources disabled
https://bugs.webkit.org/show_bug.cgi?id=198752

Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

  • runtime/WeakObjectRefConstructor.h: Add missing inclusion of InternalFunction.h

and forward declaration of WeakObjectRefPrototype.

  • wasm/js/WebAssemblyFunction.cpp: Add missing inclusion of JSWebAssemblyHelpers.h

Source/WebCore:

No new tests needed.

  • Modules/indexeddb/server/UniqueIDBDatabase.h: Add missing forward declaration for IDBGetRecordData,

replace inclusion of UniqueIDBDatabaseConnection.h with a forward declaration.

  • Modules/indexeddb/server/UniqueIDBDatabaseConnection.h: Remove unneeded inclusion of

UniqueIDBDatabaseTransaction.h, add missing inclusion of UniqueIDBDatabase.h

  • Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h: Remove unneeded inclusion of

UniqueIDBDatabaseConnection.h inclusion.

  • bridge/c/c_class.cpp: Add inclusion of JSCJSValueInlines.h to avoid linker errors due

to missing JSValue inline functions.

  • dom/DocumentParser.h: Replace forward declaration of Document with inclusion of Document.h,

to avoid error due to usage of incomplete type in template expansion.

  • dom/Microtasks.h: Add missing forward declaration of JSC::VM
  • editing/markup.cpp: Add missing inclusion of PasteboardItemInfo.h
  • page/Quirks.h: Add missing forward declaration of WebCore::EventTarget
  • page/RuntimeEnabledFeatures.h: Add missing inclusion of wtf/Optional.h to avoid error due to

expansion of undefined template.

  • page/SocketProvider.h: Add missing forward declaration for Document.
  • platform/graphics/GraphicsLayerClient.h: Add missing inclusion of wtf/OptionSet.h to avoid

error due to expansion of undefined template.

  • rendering/RenderMultiColumnSpannerPlaceholder.h: Replace forward declaration of RenderMultiColumnFlow

with inclusion of RenderMultiColumnFlow.h to avoid error due to usage of undefined class.

Source/WebKit:

  • NetworkProcess/NetworkHTTPSUpgradeChecker.cpp:

(WebKit::NetworkHTTPSUpgradeChecker::NetworkHTTPSUpgradeChecker): Qualify SQLiteDatabase
with its namespace.

  • UIProcess/WebFrameProxy.h: Replace forward declaration of WebPageProxy with inclusion

of WebPageProxy.h to avoid build error due to usage of undefined class. Moved DataCallback
definition from WebPageProxy.h to avoid code using the type before its declaration.

  • UIProcess/WebPageProxy.h: Remove definition of DataCallback.
  • UIProcess/wpe/WebInspectorProxyWPE.cpp: Add missing forward declaration of

WebCore::FloatRect.
(WebKit::WebInspectorProxy::platformSetSheetRect): Qualify FloatRect with its namespace.

  • WebProcess/Automation/WebAutomationSessionProxy.cpp: Qualify all occurrences of

PageIdentifier with its namespace.
(WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction):
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithOrdinal):
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithNodeHandle):
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithName):
(WebKit::WebAutomationSessionProxy::resolveParentFrame):
(WebKit::WebAutomationSessionProxy::focusFrame):
(WebKit::WebAutomationSessionProxy::computeElementLayout):
(WebKit::WebAutomationSessionProxy::selectOptionElement):
(WebKit::WebAutomationSessionProxy::takeScreenshot):
(WebKit::WebAutomationSessionProxy::getCookiesForFrame):
(WebKit::WebAutomationSessionProxy::deleteCookie):

  • WebProcess/Cache/WebCacheStorageConnection.cpp: Ditto.

(WebKit::WebCacheStorageConnection::open):
(WebKit::WebCacheStorageConnection::remove):
(WebKit::WebCacheStorageConnection::retrieveCaches):
(WebKit::WebCacheStorageConnection::retrieveRecords):
(WebKit::WebCacheStorageConnection::batchDeleteOperation):
(WebKit::WebCacheStorageConnection::batchPutOperation):

  • WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: Add missing inclusion of WebPage.h
  • WebProcess/WebPage/gtk/WebPageGtk.cpp: Add missing inclusion of gtk/gtk.h
  • WebProcess/WebPage/wpe/WebPageWPE.cpp: Add missing inclusion of WebPageProxy.h

Source/WTF:

  • wtf/text/StringBuilder.h: Add missing include of StringConcatenateNumbers.h
10:38 AM Changeset in webkit [246595] by Truitt Savell
  • 2 edits in trunk/LayoutTests

webgpu/blend-color-triangle-strip.html is a flakey failure since introduction.
https://bugs.webkit.org/show_bug.cgi?id=198921

Unreviewed Test Gardening.

Patch by Russell Epstein <russell_e@apple.com> on 2019-06-19

  • platform/mac-wk2/TestExpectations:
10:29 AM Changeset in webkit [246594] by Truitt Savell
  • 3 edits in trunk/LayoutTests

Layout Test imported/w3c/web-platform-tests/websockets/Create-Secure-verify-url-set-non-default-port.any.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=199013

Unreviewed Test Gardening.

Patch by Russell Epstein <russell_e@apple.com> on 2019-06-19

  • platform/ios-wk2/TestExpectations:
  • platform/mac/TestExpectations:
10:21 AM Changeset in webkit [246593] by Antti Koivisto
  • 17 edits
    2 adds in trunk

RequestedScrollPosition shouldn't be applied after node reattach
https://bugs.webkit.org/show_bug.cgi?id=198994
<rdar://problem/51439685>

Reviewed by Simon Fraser.

Source/WebCore:

Test: scrollingcoordinator/ios/scroll-position-after-reattach.html

If a scrolling node gets reattached, its scroll position resets to (0,0) or whatever the previous
requestedScrollPosition was, and the current position is lost.

  • page/scrolling/ScrollingStateFixedNode.cpp:

(WebCore::ScrollingStateFixedNode::setPropertyChangedBitsAfterReattach):
(WebCore::ScrollingStateFixedNode::setAllPropertiesChanged): Deleted.

Rename to better reflect what this is for.

  • page/scrolling/ScrollingStateFixedNode.h:
  • page/scrolling/ScrollingStateFrameHostingNode.cpp:

(WebCore::ScrollingStateFrameHostingNode::setPropertyChangedBitsAfterReattach):
(WebCore::ScrollingStateFrameHostingNode::setAllPropertiesChanged): Deleted.

  • page/scrolling/ScrollingStateFrameHostingNode.h:
  • page/scrolling/ScrollingStateFrameScrollingNode.cpp:

(WebCore::ScrollingStateFrameScrollingNode::setPropertyChangedBitsAfterReattach):
(WebCore::ScrollingStateFrameScrollingNode::setAllPropertiesChanged): Deleted.

  • page/scrolling/ScrollingStateFrameScrollingNode.h:
  • page/scrolling/ScrollingStateNode.cpp:

(WebCore::ScrollingStateNode::setPropertyChangedBitsAfterReattach):
(WebCore::ScrollingStateNode::setAllPropertiesChanged): Deleted.

  • page/scrolling/ScrollingStateNode.h:
  • page/scrolling/ScrollingStatePositionedNode.cpp:

(WebCore::ScrollingStatePositionedNode::setPropertyChangedBitsAfterReattach):
(WebCore::ScrollingStatePositionedNode::setAllPropertiesChanged): Deleted.

  • page/scrolling/ScrollingStatePositionedNode.h:
  • page/scrolling/ScrollingStateScrollingNode.cpp:

(WebCore::ScrollingStateScrollingNode::setPropertyChangedBitsAfterReattach):

Don't set RequestedScrollPosition. It is a special property that is applied only once on request
and shouldn't get reapplied. Nodes should keep their existing scroll position on reattach.

(WebCore::ScrollingStateScrollingNode::setAllPropertiesChanged): Deleted.

  • page/scrolling/ScrollingStateScrollingNode.h:
  • page/scrolling/ScrollingStateStickyNode.cpp:

(WebCore::ScrollingStateStickyNode::setPropertyChangedBitsAfterReattach):
(WebCore::ScrollingStateStickyNode::setAllPropertiesChanged): Deleted.

  • page/scrolling/ScrollingStateStickyNode.h:
  • page/scrolling/ScrollingStateTree.cpp:

(WebCore::ScrollingStateTree::nodeWasReattachedRecursive):

LayoutTests:

  • scrollingcoordinator/ios/scroll-position-after-reattach-expected.html: Added.
  • scrollingcoordinator/ios/scroll-position-after-reattach.html: Added.
10:13 AM Changeset in webkit [246592] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebKit

[GTK] Page blinks after navigation swipe if it triggered PSON
https://bugs.webkit.org/show_bug.cgi?id=198996

Patch by Alexander Mikhaylenko <exalm7659@gmail.com> on 2019-06-19
Reviewed by Michael Catanzaro.

Disconnect and then reconnect ViewGestureController during process swap
instead of destroying and re-creating it.

  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::PageClientImpl::processWillSwap): Added.
(WebKit::PageClientImpl::PageClientImpl::processDidExit): Implemented.

  • UIProcess/API/gtk/PageClientImpl.h:
  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseWillSwapWebProcess): Added.
Disconnect ViewGestureController if it exists.
(webkitWebViewBaseDidExitWebProcess): Added.
Destroy ViewGestureController.
(webkitWebViewBaseDidRelaunchWebProcess):
Reconnect the ViewGestureController if it exists.

  • UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
9:59 AM Changeset in webkit [246591] by Truitt Savell
  • 2 edits in trunk/LayoutTests

REGRESSION: ( r246394 ) webgpu/whlsl-buffer-fragment.html and webgpu/whlsl-buffer-vertex.html are failing
https://bugs.webkit.org/show_bug.cgi?id=199012

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
8:41 AM Changeset in webkit [246590] by Michael Catanzaro
  • 2 edits in trunk/Tools

Unreviewed, fix build warnings in TestWebKitAPIInjectedBundle

System headers are being included without SYSTEM again here.

  • TestWebKitAPI/PlatformGTK.cmake:
8:36 AM Changeset in webkit [246589] by Justin Michaud
  • 53 edits in trunk

[WASM-References] Rename anyfunc to funcref
https://bugs.webkit.org/show_bug.cgi?id=198983

Reviewed by Yusuke Suzuki.

JSTests:

  • wasm/function-tests/basic-element.js:
  • wasm/function-tests/context-switch.js:

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):
(makeInstance):
(assert.eq.makeInstance):

  • wasm/function-tests/exceptions.js:

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):

  • wasm/function-tests/grow-memory-2.js:

(assert.eq.instance.exports.foo):

  • wasm/function-tests/nameSection.js:

(const.compile):

  • wasm/function-tests/stack-overflow.js:

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):
(assertOverflows.makeInstance):

  • wasm/function-tests/table-basic-2.js:

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):

  • wasm/function-tests/table-basic.js:

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):

  • wasm/function-tests/trap-from-start-async.js:
  • wasm/function-tests/trap-from-start.js:
  • wasm/js-api/Module.exports.js:

(assert.truthy):

  • wasm/js-api/Module.imports.js:

(assert.truthy):

  • wasm/js-api/call-indirect.js:

(const.oneTable):
(const.multiTable):
(multiTable.const.makeTable):
(multiTable):
(multiTable.Polyphic2Import):
(multiTable.VirtualImport):

  • wasm/js-api/element-data.js:
  • wasm/js-api/element.js:

(assert.throws.new.WebAssembly.Module.builder.WebAssembly):
(assert.throws):
(badInstantiation.makeModule):
(badInstantiation.test):
(badInstantiation):

  • wasm/js-api/extension-MemoryMode.js:
  • wasm/js-api/table.js:

(new.WebAssembly.Module):
(assert.throws):
(assertBadTableImport):
(assert.throws.WebAssembly.Table.prototype.grow):
(new.WebAssembly.Table):
(assertBadTable):
(assert.truthy):

  • wasm/js-api/test_basic_api.js:

(const.c.in.constructorProperties.switch):

  • wasm/js-api/unique-signature.js:

(CallIndirectWithDuplicateSignatures):

  • wasm/js-api/wrapper-function.js:
  • wasm/modules/table.wat:
  • wasm/modules/wasm-imports-js-re-exports-wasm-exports/imports.wat:
  • wasm/modules/wasm-imports-js-re-exports-wasm-exports/sum.wat:
  • wasm/modules/wasm-imports-wasm-exports/imports.wat:
  • wasm/modules/wasm-imports-wasm-exports/sum.wat:
  • wasm/references/anyref_table.js:
  • wasm/references/anyref_table_import.js:

(doSet):
(assert.throws):

  • wasm/references/func_ref.js:

(makeFuncrefIdent):
(assert.eq.instance.exports.fix):
(GetLocal.0.I32Const.0.TableSet.0.End.End.WebAssembly.assert.throws):
(GetLocal.0.I32Const.0.TableSet.0.End.End.WebAssembly):
(let.importedFun.of):
(makeAnyfuncIdent): Deleted.
(makeAnyfuncIdent.fun): Deleted.

  • wasm/references/multitable.js:

(assert.eq):
(assert.throws):

  • wasm/references/table_misc.js:

(GetLocal.0.TableFill.0.End.End.WebAssembly):

  • wasm/references/validation.js:

(assert.throws.new.WebAssembly.Module.bin):
(assert.throws):

  • wasm/spec-harness/index.js:
  • wasm/spec-harness/wasm-constants.js:
  • wasm/spec-harness/wasm-module-builder.js:

(WasmModuleBuilder.prototype.toArray):

  • wasm/spec-harness/wast.js:

(elem_type):
(string_of_elem_type):
(string_of_table_type):

  • wasm/spec-tests/jsapi.js:
  • wasm/stress/wasm-table-grow-initialize.js:
  • wasm/wasm.json:

Source/JavaScriptCore:

Anyfunc should become funcref since it was renamed in the spec. We should also support the string 'anyfunc' in the table constructor since this is
the only non-binary-format place where it is exposed to users.

  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::gFuncref):
(JSC::Wasm::AirIRGenerator::tmpForType):
(JSC::Wasm::AirIRGenerator::emitCCall):
(JSC::Wasm::AirIRGenerator::moveOpForValueType):
(JSC::Wasm::AirIRGenerator::AirIRGenerator):
(JSC::Wasm::AirIRGenerator::addLocal):
(JSC::Wasm::AirIRGenerator::addConstant):
(JSC::Wasm::AirIRGenerator::addRefFunc):
(JSC::Wasm::AirIRGenerator::addReturn):
(JSC::Wasm::AirIRGenerator::gAnyfunc): Deleted.

  • wasm/WasmCallingConvention.h:

(JSC::Wasm::CallingConventionAir::marshallArgument const):
(JSC::Wasm::CallingConventionAir::setupCall const):

  • wasm/WasmExceptionType.h:
  • wasm/WasmFormat.h:

(JSC::Wasm::isValueType):
(JSC::Wasm::isSubtype):
(JSC::Wasm::TableInformation::wasmType const):

  • wasm/WasmFunctionParser.h:

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

  • wasm/WasmSectionParser.cpp:

(JSC::Wasm::SectionParser::parseTableHelper):
(JSC::Wasm::SectionParser::parseElement):
(JSC::Wasm::SectionParser::parseInitExpr):

  • wasm/WasmValidate.cpp:

(JSC::Wasm::Validate::addRefFunc):

  • wasm/js/JSToWasm.cpp:

(JSC::Wasm::createJSToWasmWrapper):

  • wasm/js/WasmToJS.cpp:

(JSC::Wasm::wasmToJS):

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::callWebAssemblyFunction):
(JSC::WebAssemblyFunction::jsCallEntrypointSlow):

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::link):

  • wasm/js/WebAssemblyTableConstructor.cpp:

(JSC::constructJSWebAssemblyTable):

  • wasm/wasm.json:
8:11 AM Changeset in webkit [246588] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[Curl] CurlRequestScheduler doesn't terminate worker thread in a certain situation.
https://bugs.webkit.org/show_bug.cgi?id=198993

Cancel CurlRequest before invalidation to remove tasks from CurlRequestScheduler certainly in ~NetworkDataTaskCurl.

Patch by Takashi Komori <Takashi.Komori@sony.com> on 2019-06-19
Reviewed by Fujii Hironori.

  • NetworkProcess/curl/NetworkDataTaskCurl.cpp:

(WebKit::NetworkDataTaskCurl::~NetworkDataTaskCurl):

8:07 AM Changeset in webkit [246587] by Fujii Hironori
  • 2 edits in trunk/Source/JavaScriptCore

[CMake][Win] CombinedDomains.json is generated twice in JavaScriptCore_CopyPrivateHeaders and JavaScriptCore projects
https://bugs.webkit.org/show_bug.cgi?id=198853

Reviewed by Don Olmstead.

JavaScriptCore_CopyPrivateHeaders target needs to have a direct or
indirect dependency of JavaScriptCore target for CMake Visual
Studio generator to eliminate duplicated custom commands.

  • CMakeLists.txt: Added JavaScriptCore as a dependency of JavaScriptCore_CopyPrivateHeaders.
5:03 AM Changeset in webkit [246586] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WTF

USE_ANGLE macro can be evaluated without being defined
https://bugs.webkit.org/show_bug.cgi?id=198991

Reviewed by Carlos Garcia Campos.

  • wtf/Platform.h: On platforms not yet defining USE_ANGLE, the

incompatibility check with some other flags leads to the macro being
evaluated even when it was not defined, producing compiler warnings.
To avoid this, the macro should be defined to 0 before the check in
case it was not defined already.

5:02 AM Changeset in webkit [246585] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebKit

[Nicosia] Invalidate SceneIntegration in LayerTreeHost::invalidate()
https://bugs.webkit.org/show_bug.cgi?id=198992

Reviewed by Carlos Garcia Campos.

  • WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:

(WebKit::LayerTreeHost::invalidate): Invalidate the
Nicosia::SceneIntegration object. This should properly disassociate
the now-invalited LayerTreeHost (a SceneIntegration client) from the
SceneIntegration object that can still be shared with platform layers
originating from this LayerTreeHost.

3:54 AM Changeset in webkit [246584] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

resize-observer/element-leak.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=198666

Patch by Cathie Chen <cathiechen> on 2019-06-19
Reviewed by Frédéric Wang.

It takes a very long time to construct iframes which create and remove 1000 elements. This would cause timeout sometimes.
In order to make it more effective, reduce the number of elements to 200 and put them into a container first,
then attach the container to DOM tree.

  • resize-observer/resources/element-leak-frame.html:
2:43 AM Changeset in webkit [246583] by dino@apple.com
  • 10 edits in trunk/Source

UIContextMenuInteraction implementation for WKContentView
https://bugs.webkit.org/show_bug.cgi?id=198986
<rdar://problem/51875189>

Reviewed by Andy Estes.

Source/WebCore/PAL:

Include + soft link DDContextMenuAction.

  • pal/spi/ios/DataDetectorsUISPI.h:

Source/WebKit:

Implement UIContextMenuInteraction and its delegate as a
replacement for UIPreviewItemController in iOS 13.

In order to preserve existing behaviour as much as possible,
we check for the implementation of new WebKit API to configure
the menu. If that is not present, we attempt to convert
the results of the existing WebKit WKPreviewAction delegates
into something that works with UIContextMenus.

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

(-[WKContentView setupInteraction]):
(-[WKContentView _contentsOfUserInterfaceItem:]):
(-[WKContentView _registerPreview]):
(-[WKContentView _unregisterPreview]):
(-[WKContentView _showLinkPreviewsPreferenceChanged:]):
(needsDeprecatedPreviewAPI):
(uiActionForPreviewAction):
(menuFromPreviewOrDefaults):
(titleForMenu):
(-[WKContentView assignLegacyDataForContextMenuInteraction]):
(-[WKContentView contextMenuInteraction:configurationForMenuAtLocation:]):
(-[WKContentView _contextMenuInteraction:configurationForMenuAtLocation:completion:]):
(-[WKContentView continueContextMenuInteraction:]):
(uiImageForImage):
(createTargetedPreview):
(-[WKContentView _targetedPreview]):
(-[WKContentView contextMenuInteraction:previewForHighlightingMenuWithConfiguration:]):
(-[WKContentView contextMenuInteractionWillPresent:]):
(-[WKContentView contextMenuInteraction:previewForDismissingMenuWithConfiguration:]):
(-[WKContentView contextMenuInteraction:willCommitWithAnimator:]):
(-[WKContentView contextMenuInteractionDidEnd:]):
(-[WKContentView shouldUsePreviewForLongPress]): Deleted.

Source/WTF:

Add USE_UICONTEXTMENU for iOS 13+.

  • wtf/Platform.h:

Jun 18, 2019:

11:55 PM Changeset in webkit [246582] by Megan Gardner
  • 2 edits in trunk/LayoutTests

Text Selection gesture has changed behavior, change test to match new behavior
https://bugs.webkit.org/show_bug.cgi?id=198980
<rdar://problem/51713918>

Reviewed by Wenson Hsieh.

Long press and drag now starts a selection and entends the range, rather than changing
the start of the text selection. Update the test to match the new behavior.

  • fast/events/touch/ios/long-press-then-drag-to-select-text.html:
10:12 PM Changeset in webkit [246581] by Dewei Zhu
  • 5 edits in trunk/Websites/perf.webkit.org

Customizable test group form should allow user to supply a revision prefix of a commit and revision starts with 'r'.
https://bugs.webkit.org/show_bug.cgi?id=198940

Reviewed by Ryosuke Niwa.

Customizable test group form should adapt prefix matching when fetching for a commit.

  • browser-tests/customizable-test-group-form-tests.js: Updated and added unit tests.
  • public/v3/components/customizable-test-group-form.js: Removed loggings those a unintentionally committed.
  • public/v3/models/commit-set.js: Adapted prefix matching API when fetching a commit.

(IntermediateCommitSet.prototype._fetchCommitLogAndOwnedCommits):

  • unit-tests/commit-set-tests.js: Updated unit tests accordingly.
9:44 PM Changeset in webkit [246580] by Ryan Haddad
  • 3 edits in trunk/Source/WebKit

Unreviewed, rolling out r246575.

Breaks internal builds.

Reverted changeset:

"Update WebKit API to separately retrieve actions and use
context menus"
https://bugs.webkit.org/show_bug.cgi?id=198974
https://trac.webkit.org/changeset/246575

7:36 PM Changeset in webkit [246579] by sbarati@apple.com
  • 7 edits
    4 adds in trunk

[WHLSL] Support matrices
https://bugs.webkit.org/show_bug.cgi?id=198876
<rdar://problem/51768882>

Reviewed by Dean Jackson and Myles Maxfield.

Source/WebCore:

This patch adds in support for matrices to WHLSL. Most matrix related code
is defined by the standard library. This patch just needed to add support
for the native functions operator[] and operator[]= on matrix types. The only
native functions that are named operator[] and operator[]= are for matrix
operations, so we strongly assume when generating code for native operator[] and
operator[]= that we're dealing with matrix types.

operator[]= ignores the write if the index is out of bounds. operator[]
returns a zeroed vector if the index is out of bounds.

This patch also incorporates two bug fixes:

  1. This patch takes Robin's patch in https://bugs.webkit.org/show_bug.cgi?id=198313 to ensure

we don't have pointers to values in a hash map. This was needed in this patch
otherwise we'd crash parsing the standard library.

  1. This patch fixes how we handle "break" in metal codegen. When I first

implemented break, I strongly assumed we were in a loop. However, break
can be either from a loop or from switch. This patch teaches the metal code
generator to track which context we're in and to emit code accordingly.

Tests: webgpu/whlsl-matrix-2.html

webgpu/whlsl-matrix.html

  • Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:

(WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitLoop):

  • Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.cpp:

(WebCore::WHLSL::Metal::generateMetalCodeShared):

  • Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:

(WebCore::WHLSL::Metal::writeNativeFunction):

  • Modules/webgpu/WHLSL/WHLSLChecker.cpp:

(WebCore::WHLSL::Checker::assignTypes):
(WebCore::WHLSL::Checker::getInfo):
(WebCore::WHLSL::Checker::assignType):
(WebCore::WHLSL::Checker::forwardType):

  • Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:

LayoutTests:

  • webgpu/whlsl-matrix-2-expected.txt: Added.
  • webgpu/whlsl-matrix-2.html: Added.
  • webgpu/whlsl-matrix-expected.txt: Added.
  • webgpu/whlsl-matrix.html: Added.
6:19 PM Changeset in webkit [246578] by ysuzuki@apple.com
  • 9 edits
    1 add in trunk

[JSC] JSLock should be WebThread aware
https://bugs.webkit.org/show_bug.cgi?id=198911

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Since WebKitLegacy content rendering is done in WebThread instead of the main thread in iOS, user of WebKitLegacy (e.g. UIWebView) needs
to grab the WebThread lock (which is a recursive lock) in the main thread when touching the WebKitLegacy content.
But, WebKitLegacy can expose JSContext for the web view. And we can interact with the JS content through JavaScriptCore APIs. However,
since WebThread is a concept in WebCore, JavaScriptCore APIs do not grab the WebThread lock. As a result, WebKitLegacy web content can be
modified from the main thread without grabbing the WebThread lock through JavaScriptCore APIs.

This patch makes JSC aware of WebThread: JSLock grabs the WebThread lock before grabbing JS's lock. While this seems layering violation,
we already have many USE(WEB_THREAD) and WebThread aware code in WTF. Eventually, we should move WebThread code from WebCore to WTF since
JSC and WTF need to be aware of WebThread. But, for now, we just use the function pointer exposed by WebCore.

Since both JSLock and the WebThread lock are recursive locks, nested locking is totally OK. The possible problem is the order of locking.
We ensure that we always grab locks in (1) the WebThread lock and (2) JSLock order.

In JSLock, we take the WebThread lock, but we do not unlock it. This is how we use the WebThread lock: the WebThread lock is released
automatically when RunLoop finishes the current cycle, and in WebKitLegacy, we do not call unlocking function of the WebThread lock except
for some edge cases.

  • API/JSVirtualMachine.mm:

(-[JSVirtualMachine isWebThreadAware]):

  • API/JSVirtualMachineInternal.h:
  • runtime/JSLock.cpp:

(JSC::JSLockHolder::JSLockHolder):
(JSC::JSLock::lock):
(JSC::JSLockHolder::init): Deleted.

  • runtime/JSLock.h:

(JSC::JSLock::makeWebThreadAware):
(JSC::JSLock::isWebThreadAware const):

Source/WebCore:

  • bindings/js/CommonVM.cpp:

(WebCore::commonVMSlow):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitLegacy/ios/JSLockTakesWebThreadLock.mm: Added.

(TestWebKitAPI::TEST):

6:18 PM Changeset in webkit [246577] by Justin Michaud
  • 13 edits
    1 add in trunk

[WASM-References] Add support for Table.size, grow and fill instructions
https://bugs.webkit.org/show_bug.cgi?id=198761

Reviewed by Yusuke Suzuki.

JSTests:

  • wasm/Builder_WebAssemblyBinary.js:

(const.putOp):

  • wasm/references/table_misc.js: Added.

(TableSize.End.End.WebAssembly):
(GetLocal.0.GetLocal.1.TableGrow.End.End.WebAssembly):

  • wasm/wasm.json:

Source/JavaScriptCore:

Add support for Table.size, grow and fill instructions. This also required
adding support for two-byte opcodes to the ops generator.

  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::gAnyref):
(JSC::Wasm::AirIRGenerator::tmpForType):
(JSC::Wasm::AirIRGenerator::addTableSize):
(JSC::Wasm::AirIRGenerator::addTableGrow):
(JSC::Wasm::AirIRGenerator::addTableFill):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::addTableSize):
(JSC::Wasm::B3IRGenerator::addTableGrow):
(JSC::Wasm::B3IRGenerator::addTableFill):

  • wasm/WasmExceptionType.h:
  • wasm/WasmFormat.h:

(JSC::Wasm::TableInformation::wasmType const):

  • wasm/WasmFunctionParser.h:

(JSC::Wasm::FunctionParser<Context>::parseExpression):
(JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression):

  • wasm/WasmInstance.cpp:

(JSC::Wasm::doWasmTableGrow):
(JSC::Wasm::doWasmTableFill):

  • wasm/WasmInstance.h:
  • wasm/WasmTable.cpp:

(JSC::Wasm::Table::grow):

  • wasm/WasmValidate.cpp:

(JSC::Wasm::Validate::addTableSize):
(JSC::Wasm::Validate::addTableGrow):
(JSC::Wasm::Validate::addTableFill):

  • wasm/generateWasmOpsHeader.py:

(opcodeMacroizer):
(ExtTableOpType):

  • wasm/wasm.json:
4:08 PM Changeset in webkit [246576] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Layout Test imported/w3c/web-platform-tests/content-security-policy/reporting/report-only-in-meta.sub.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=198977

Unreviewed Test Gardening.

Patch by Russell Epstein <russell_e@apple.com> on 2019-06-18

  • platform/mac-wk1/TestExpectations:
3:55 PM Changeset in webkit [246575] by achristensen@apple.com
  • 3 edits in trunk/Source/WebKit

Update WebKit API to separately retrieve actions and use context menus
https://bugs.webkit.org/show_bug.cgi?id=198974
<rdar://problem/50735687>

Reviewed by Tim Horton.

Update API and SPI, and add infrastructure for asynchronously requesting interaction information.

  • UIProcess/API/Cocoa/WKUIDelegate.h:
  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
3:31 PM Changeset in webkit [246574] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

Layout test http/tests/websocket/tests/hybi/send-object-tostring-check.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=176030

Unreviewed Test Gardening.

Patch by Russell Epstein <russell_e@apple.com> on 2019-06-18

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
3:29 PM Changeset in webkit [246573] by Joseph Pecoraro
  • 2 edits in trunk/Source/WebCore

WebSocketDeflater uses an unnecessarily constrained compression memory level
https://bugs.webkit.org/show_bug.cgi?id=198973

Reviewed by Alex Christensen.

  • Modules/websockets/WebSocketDeflater.cpp:

Set the memLevel to the deflateInit2 default value, not a minimum value.

3:24 PM Changeset in webkit [246572] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix signature of currentWeakRefVersion to return an uintptr_t.

  • runtime/VM.h:

(JSC::VM::currentWeakRefVersion const):

3:01 PM Changeset in webkit [246571] by Justin Michaud
  • 26 edits
    1 add in trunk

[WASM-References] Add support for multiple tables
https://bugs.webkit.org/show_bug.cgi?id=198760

Reviewed by Saam Barati.

JSTests:

  • wasm/Builder.js:
  • wasm/js-api/call-indirect.js:

(const.oneTable):
(const.multiTable):
(multiTable):
(multiTable.Polyphic2Import):
(multiTable.VirtualImport):
(const.wasmModuleWhichImportJS): Deleted.
(const.makeTable): Deleted.
(): Deleted.
(Polyphic2Import): Deleted.
(VirtualImport): Deleted.

  • wasm/js-api/table.js:

(new.WebAssembly.Module):
(assert.throws):
(assertBadTableImport):
(assert.truthy):
(assert.throws.new.WebAssembly.Module.builder.WebAssembly): Deleted.

  • wasm/references/anyref_table.js:
  • wasm/references/anyref_table_import.js:

(makeImport):
(string_appeared_here.fullGC.assert.eq.1.exports.get_tbl.makeImport):
(string_appeared_here.fullGC.assert.eq.1.exports.get_tbl):

  • wasm/references/multitable.js: Added.

(assert.throws.1.exports.set_tbl0):
(assert.throws):
(assert.eq):

  • wasm/references/validation.js:

(assert.throws.new.WebAssembly.Module.bin):
(assert.throws):

  • wasm/spec-tests/imports.wast.js:
  • wasm/wasm.json:
  • wasm/Builder.js:
  • wasm/js-api/call-indirect.js:

(const.oneTable):
(const.multiTable):
(multiTable):
(multiTable.Polyphic2Import):
(multiTable.VirtualImport):
(const.wasmModuleWhichImportJS): Deleted.
(const.makeTable): Deleted.
(): Deleted.
(Polyphic2Import): Deleted.
(VirtualImport): Deleted.

  • wasm/js-api/table.js:

(new.WebAssembly.Module):
(assert.throws):
(assertBadTableImport):
(assert.truthy):
(assert.throws.new.WebAssembly.Module.builder.WebAssembly): Deleted.

  • wasm/references/anyref_table.js:
  • wasm/references/anyref_table_import.js:

(makeImport):
(string_appeared_here.fullGC.assert.eq.1.exports.get_tbl.makeImport):
(string_appeared_here.fullGC.assert.eq.1.exports.get_tbl):

  • wasm/references/func_ref.js:

(GetLocal.0.I32Const.0.TableSet.End.End.WebAssembly.fun): Deleted.
(GetLocal.0.I32Const.0.TableSet.End.End.WebAssembly.assert.throws): Deleted.
(GetLocal.0.I32Const.0.TableSet.End.End.WebAssembly): Deleted.

  • wasm/references/multitable.js: Added.

(assert.throws.1.exports.set_tbl0):
(assert.throws):
(assert.eq):
(string_appeared_here.tableInsanity):
(I32Const.0.GetLocal.0.TableSet.1.End.End.WebAssembly.):
(I32Const.0.GetLocal.0.TableSet.1.End.End.WebAssembly):

  • wasm/references/validation.js:

(assert.throws.new.WebAssembly.Module.bin):
(assert.throws):

  • wasm/spec-tests/imports.wast.js:
  • wasm/wasm.json:

Source/JavaScriptCore:

Support multiple wasm tables. We turn tableInformation into a tables array, and update all of the
existing users to give a table index. The array of Tables in Wasm::Instance is hung off the tail
to make it easier to use from jit code.

  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::AirIRGenerator):
(JSC::Wasm::AirIRGenerator::addTableGet):
(JSC::Wasm::AirIRGenerator::addTableSet):
(JSC::Wasm::AirIRGenerator::addCallIndirect):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::addTableGet):
(JSC::Wasm::B3IRGenerator::addTableSet):
(JSC::Wasm::B3IRGenerator::addCallIndirect):

  • wasm/WasmExceptionType.h:
  • wasm/WasmFormat.h:

(JSC::Wasm::Element::Element):

  • wasm/WasmFunctionParser.h:

(JSC::Wasm::FunctionParser<Context>::parseExpression):
(JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression):

  • wasm/WasmInstance.cpp:

(JSC::Wasm::Instance::Instance):
(JSC::Wasm::Instance::create):
(JSC::Wasm::Instance::extraMemoryAllocated const):
(JSC::Wasm::Instance::table):
(JSC::Wasm::Instance::setTable):

  • wasm/WasmInstance.h:

(JSC::Wasm::Instance::updateCachedMemory):
(JSC::Wasm::Instance::offsetOfGlobals):
(JSC::Wasm::Instance::offsetOfTablePtr):
(JSC::Wasm::Instance::allocationSize):
(JSC::Wasm::Instance::table): Deleted.
(JSC::Wasm::Instance::setTable): Deleted.
(JSC::Wasm::Instance::offsetOfTable): Deleted.

  • wasm/WasmModuleInformation.h:

(JSC::Wasm::ModuleInformation::tableCount const):

  • wasm/WasmSectionParser.cpp:

(JSC::Wasm::SectionParser::parseImport):
(JSC::Wasm::SectionParser::parseTableHelper):
(JSC::Wasm::SectionParser::parseTable):
(JSC::Wasm::SectionParser::parseElement):

  • wasm/WasmTable.h:

(JSC::Wasm::Table::owner const):

  • wasm/WasmValidate.cpp:

(JSC::Wasm::Validate::addTableGet):
(JSC::Wasm::Validate::addTableSet):
(JSC::Wasm::Validate::addCallIndirect):

  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::JSWebAssemblyInstance):
(JSC::JSWebAssemblyInstance::visitChildren):

  • wasm/js/JSWebAssemblyInstance.h:
  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::link):
(JSC::WebAssemblyModuleRecord::evaluate):

  • wasm/wasm.json:
2:50 PM Changeset in webkit [246570] by dbates@webkit.org
  • 4 edits
    2 adds in trunk

REGRESSION (r240757): Cannot dismiss the keyboard on http://apple.com/apple-tv-plus
https://bugs.webkit.org/show_bug.cgi?id=198922
<rdar://problem/50300056>

Reviewed by Wenson Hsieh.

Source/WebKit:

Actually dismiss the keyboard as intended in r240757. Do not wait for the round-trip
to the WebProcess to run through the -elementDidBlur steps in the UIProcess and hide
the keyboard when a person explicitly dismisses the keyboard via the Done button (iPhone)
or hide keyboard button (iPad).

Note that r240757 revealed another bug in this code, <https://bugs.webkit.org/show_bug.cgi?id=198928>.
I am unclear of the implications of that bug, but it is clear for this bug that it
never makes sense to round-trip to the WebProcess when the keyboard is dismissed by
a user gesture.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView endEditingAndUpdateFocusAppearanceWithReason:]): Invoke -_elementDidBlur
to blur the element in the UIProcess and hide the keyboard.
(-[WKContentView _elementDidBlur]): Prevent duplicate invocations of -didEndFormControlInteraction
and setIsShowingInputViewForFocusedElement messages by only doing these actions when
editablity changes. This covers the case where -_elementDidBlur may be invoked a second
time (the reply in the round-trip). In that case we don't need to do these actions.

LayoutTests:

Add a test to ensure that pressing Done hides the keyboard after tapping outside the focused
element's frame.

  • fast/events/ios/should-be-able-to-dismiss-form-accessory-after-tapping-outside-iframe-with-focused-field-expected.txt: Added.
  • fast/events/ios/should-be-able-to-dismiss-form-accessory-after-tapping-outside-iframe-with-focused-field.html: Added.
  • resources/ui-helper.js:

(window.UIHelper.dismissFormAccessoryView): Added.

2:40 PM Changeset in webkit [246569] by commit-queue@webkit.org
  • 11 edits in trunk/Source/WebKit

NetworkSession::networkStorageSession can return null
https://bugs.webkit.org/show_bug.cgi?id=198947
<rdar://problem/51394449>

Patch by Alex Christensen <achristensen@webkit.org> on 2019-06-18
Reviewed by Youenn Fablet.

We are seeing evidence of crashes from the map owning NetworkSessions and the map owning NetworkStorageSessions becoming out of sync
because NetworkSession is refcounted but NetworkStorageSession is not. I started the complete fix in https://bugs.webkit.org/show_bug.cgi?id=194926
but for now let's add less risky null checks to prevent fallout.

  • NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:

(WebKit::ResourceLoadStatisticsStore::updateClientSideCookiesAgeCap):

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::hasStorageAccessForFrame):
(WebKit::WebResourceLoadStatisticsStore::callHasStorageAccessForFrameHandler):
(WebKit::WebResourceLoadStatisticsStore::grantStorageAccess):
(WebKit::WebResourceLoadStatisticsStore::removeAllStorageAccess):
(WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCap):
(WebKit::WebResourceLoadStatisticsStore::callUpdatePrevalentDomainsToBlockCookiesForHandler):
(WebKit::WebResourceLoadStatisticsStore::removePrevalentDomains):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::initializeNetworkProcess):

  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::networkStorageSession const):

  • NetworkProcess/NetworkSession.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::applyCookieBlockingPolicy):
(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
(WebKit::NetworkDataTaskCocoa::tryPasswordBasedAuthentication):

2:30 PM Changeset in webkit [246568] by beidson@apple.com
  • 3 edits in trunk/Source/WebKit

Handle NSProgress calling our cancellation handler on background threads (and calling it more than once).
<rdar://problem/51392926> and https://bugs.webkit.org/show_bug.cgi?id=198945

Reviewed by Alex Christensen.

If you have a download in progress and quickly tap the button to cancel it multiple times, then:

  • NSProgress calls our cancellation handler on a non-main thread, which we can't handle.
  • They do it more than once, which is also bad.
  • They might even do it multiple times concurrently (on different background dispatch queues)

Let's work around these.

  • NetworkProcess/Downloads/Download.cpp:

(WebKit::Download::cancel): Double check we're on the main thread, and handle being called twice.

  • NetworkProcess/Downloads/cocoa/WKDownloadProgress.mm:

(-[WKDownloadProgress performCancel]): Actually cancel the WebKit::Download if we still have one.
(-[WKDownloadProgress progressCancelled]): Called when NSProgress calls the cancellation handler, no matter

which thread it does it on. By leveraging std::call_once we handle multiple calls as well as being called
concurrently from different threads. call_once punts the *actual* cancel operation off to the main thread.

(-[WKDownloadProgress initWithDownloadTask:download:URL:sandboxExtension:]): The cancellation handler is

now simply calling 'progressCancelled' on self, assuming the weak pointer for self is still valid.

2:21 PM Changeset in webkit [246567] by commit-queue@webkit.org
  • 24 edits
    3 adds in trunk

[ESNExt] String.prototype.matchAll
https://bugs.webkit.org/show_bug.cgi?id=186694

Patch by Alexey Shvayka <Alexey Shvayka> on 2019-06-18
Reviewed by Yusuke Suzuki.

Implement String.prototype.matchAll.
(https://tc39.es/ecma262/#sec-string.prototype.matchall)

JSTests:

  • test262/config.yaml:

Source/JavaScriptCore:

Also rename @globalPrivate @constructor functions and C++ variables holding them.

Shipping in Chrome since version 73.
Shipping in Firefox since version 67.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources.make:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Scripts/wkbuiltins/builtins_generate_combined_header.py:

(get_var_name):
(generate_section_for_global_private_code_name_macro):

  • Sources.txt:
  • builtins/ArrayPrototype.js:

(globalPrivate.ArrayIterator):
(values):
(keys):
(entries):
(globalPrivate.createArrayIterator): Deleted.

  • builtins/AsyncFromSyncIteratorPrototype.js:

(globalPrivate.createAsyncFromSyncIterator):
(globalPrivate.AsyncFromSyncIterator):
(globalPrivate.AsyncFromSyncIteratorConstructor): Deleted.

  • builtins/BuiltinNames.h:
  • builtins/MapPrototype.js:

(globalPrivate.MapIterator):
(values):
(keys):
(entries):
(globalPrivate.createMapIterator): Deleted.

  • builtins/RegExpPrototype.js:

(globalPrivate.RegExpStringIterator):
(overriddenName.string_appeared_here.matchAll):

  • builtins/RegExpStringIteratorPrototype.js: Added.

(next):

  • builtins/SetPrototype.js:

(globalPrivate.SetIterator):
(values):
(entries):
(globalPrivate.createSetIterator): Deleted.

  • builtins/StringPrototype.js:

(matchAll):

  • builtins/TypedArrayPrototype.js:

(values):
(keys):
(entries):

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

(JSC::JSGlobalObject::init):

  • runtime/RegExpPrototype.cpp:

(JSC::RegExpPrototype::finishCreation):

  • runtime/RegExpStringIteratorPrototype.cpp: Added.

(JSC::RegExpStringIteratorPrototype::finishCreation):

  • runtime/RegExpStringIteratorPrototype.h: Added.
  • runtime/StringPrototype.cpp:

LayoutTests:

  • js/Object-getOwnPropertyNames-expected.txt:
  • js/script-tests/Object-getOwnPropertyNames.js:
2:11 PM Changeset in webkit [246566] by keith_miller@apple.com
  • 2 edits in trunk/Tools

webkit-patch should allow for a bugzilla url not just bugzilla id
https://bugs.webkit.org/show_bug.cgi?id=198972

Reviewed by Dewei Zhu.

When prompting for a bugzilla id or a new title we should also
allow for a bugzilla url.

  • Scripts/webkitpy/tool/steps/promptforbugortitle.py:

(PromptForBugOrTitle.run):

2:02 PM Changeset in webkit [246565] by keith_miller@apple.com
  • 17 edits
    18 adds in trunk

Add support for WeakRef
https://bugs.webkit.org/show_bug.cgi?id=198710

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

Add support for WeakRefs which are now at stage 3
(https://tc39.es/proposal-weakrefs). This patch doesn't add
support for FinalizationGroups, which I'll add in another patch.

Some other things of interest. Per the spec, we cannot collect a
weak refs target unless it has not been dereffed (or created) in
the current microtask turn. i.e. WeakRefs are only allowed to be
collected at the end of a drain of the Microtask queue. My
understanding for this behavior is to reduce implementation
dependence on specific GC behavior in a given browser.

We track if a WeakRef is retaining its target by using a version
number on each WeakRef as well as on the VM. Whenever a WeakRef is
derefed we update its version number to match the VM's then
WriteBarrier ourselves. During marking if the VM and the WeakRef
have the same version number, the target is visited.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • heap/Heap.cpp:

(JSC::Heap::finalizeUnconditionalFinalizers):

  • jsc.cpp:

(GlobalObject::finishCreation):
(functionReleaseWeakRefs):

  • runtime/CommonIdentifiers.h:
  • runtime/JSGlobalObject.cpp:
  • runtime/JSGlobalObject.h:
  • runtime/JSWeakObjectRef.cpp: Added.

(JSC::JSWeakObjectRef::finishCreation):
(JSC::JSWeakObjectRef::visitChildren):
(JSC::JSWeakObjectRef::finalizeUnconditionally):
(JSC::JSWeakObjectRef::toStringName):

  • runtime/JSWeakObjectRef.h: Added.
  • runtime/VM.cpp:

(JSC::VM::drainMicrotasks):

  • runtime/VM.h:

(JSC::VM::setOnEachMicrotaskTick):
(JSC::VM::finalizeSynchronousJSExecution):
(JSC::VM::currentWeakRefVersion const):

  • runtime/WeakObjectRefConstructor.cpp: Added.

(JSC::WeakObjectRefConstructor::finishCreation):
(JSC::WeakObjectRefConstructor::WeakObjectRefConstructor):
(JSC::callWeakRef):
(JSC::constructWeakRef):

  • runtime/WeakObjectRefConstructor.h: Added.

(JSC::WeakObjectRefConstructor::create):
(JSC::WeakObjectRefConstructor::createStructure):

  • runtime/WeakObjectRefPrototype.cpp: Added.

(JSC::WeakObjectRefPrototype::finishCreation):
(JSC::getWeakRef):
(JSC::protoFuncWeakRefDeref):

  • runtime/WeakObjectRefPrototype.h: Added.

Source/WebCore:

We need to make sure the Web MicrotaskQueue notifies the JSC VM
that it has finished performing a microtask checkpoint. This lets
the JSC VM know it is safe to collect referenced WeakRefs. Since
there was no way to get the VM from the MicrotaskQueue I have
added a RefPtr to the queue's VM. For the main thread the VM lives
forever so is fine. For workers the queue and the VM share an
owner so this shouldn't matter either.

Tests: js/weakref-async-is-collected.html

js/weakref-eventually-collects-values.html
js/weakref-microtasks-dont-collect.html
js/weakref-weakset-consistency.html

  • dom/Microtasks.cpp:

(WebCore::MicrotaskQueue::MicrotaskQueue):
(WebCore::MicrotaskQueue::mainThreadQueue):
(WebCore::MicrotaskQueue::performMicrotaskCheckpoint):

  • dom/Microtasks.h:

(WebCore::MicrotaskQueue::vm const):

  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::WorkerGlobalScope):

LayoutTests:

Add an asyncTestStart that mirrors the asyncTestStart behavior in
the JSC cli.

  • http/tests/resources/js-test-pre.js:

(asyncTestStart):

  • js/script-tests/weakref-async-is-collected.js: Added.

(makeWeakRef):
(turnEventLoop):
(async.foo):
(async.test):

  • js/script-tests/weakref-eventually-collects-values.js: Added.

(makeWeakRef):
(turnEventLoop):
(let.weakRefs.async.test):

  • js/script-tests/weakref-microtasks-dont-collect.js: Added.

(asyncTestStart.1.makeWeakRef):
(turnEventLoop):
(async.foo):
(async.test):

  • js/script-tests/weakref-weakset-consistency.js: Added.

(makeWeakRef):
(turnEventLoop):
(async.foo):
(async.test):

  • js/weakref-async-is-collected-expected.txt: Added.
  • js/weakref-async-is-collected.html: Added.
  • js/weakref-eventually-collects-values-expected.txt: Added.
  • js/weakref-eventually-collects-values.html: Added.
  • js/weakref-microtasks-dont-collect-expected.txt: Added.
  • js/weakref-microtasks-dont-collect.html: Added.
  • js/weakref-weakset-consistency-expected.txt: Added.
  • js/weakref-weakset-consistency.html: Added.
  • resources/js-test-pre.js:

(asyncTestStart):

1:59 PM Changeset in webkit [246564] by dbates@webkit.org
  • 3 edits
    2 adds in trunk

[iOS] Pressing key while holding Command should not insert character
https://bugs.webkit.org/show_bug.cgi?id=198925
<rdar://problem/51778811>

Reviewed by Brent Fulgham.

Source/WebKit:

Do not insert a character for an unhandled key command that has a Command modifier.
For example, pressing Command + Shift + v, which is an unhandled key command (at the
time of writing) should not insert v. This matches iOS and Mac platform conventions.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _interpretKeyEvent:isCharEvent:]):

LayoutTests:

Add a test that Command + Shift + v does not insert a v as we don't expect it
to as of the time of writing. A more comprehensive test would be needed to
ensure that all unhandled key commands with Command modifiers do not insert
a character. For now, the added test seems good enough.

  • fast/events/ios/command+shift+v-should-not-insert-v-expected.txt: Added.
  • fast/events/ios/command+shift+v-should-not-insert-v.html: Added.
1:53 PM Changeset in webkit [246563] by Tadeu Zagallo
  • 3 edits in trunk/Source/JavaScriptCore

Add missing mutator fence in compileNewFunction
https://bugs.webkit.org/show_bug.cgi?id=198849
<rdar://problem/51733890>

Reviewed by Saam Barati.

Follow-up after r246553. Saam pointed out that we still need a mutator
fence before allocating the FunctionRareData, since the allocation
might trigger a slow path call.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileNewFunctionCommon):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNewFunction):

1:43 PM Changeset in webkit [246562] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[iOS] Layout Test http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html is frequently failing or timing out.
https://bugs.webkit.org/show_bug.cgi?id=198185.

Unreviewed Test Gardening.

Patch by Russell Epstein <russell_e@apple.com> on 2019-06-18

  • platform/ios-wk2/TestExpectations:
1:22 PM Changeset in webkit [246561] by wilander@apple.com
  • 5 edits in trunk/Source/WebKit

Change log channel name from ResourceLoadStatisticsDebug to ITPDebug and remove unnecessary #if !RELEASE_LOG_DISABLED
https://bugs.webkit.org/show_bug.cgi?id=198970
<rdar://problem/51855836>

Reviewed by Brent Fulgham.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccess):
(WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccessUnderOpener):
(WebKit::ResourceLoadStatisticsDatabaseStore::ensurePrevalentResourcesForDebugMode):
(WebKit::ResourceLoadStatisticsDatabaseStore::updateCookieBlocking):

  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:

(WebKit::ResourceLoadStatisticsMemoryStore::requestStorageAccess):
(WebKit::ResourceLoadStatisticsMemoryStore::requestStorageAccessUnderOpener):
(WebKit::ResourceLoadStatisticsMemoryStore::ensurePrevalentResourcesForDebugMode):
(WebKit::ResourceLoadStatisticsMemoryStore::updateCookieBlocking):

  • NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:

(WebKit::domainsToString):
(WebKit::ResourceLoadStatisticsStore::removeDataRecords):
(WebKit::ResourceLoadStatisticsStore::setResourceLoadStatisticsDebugMode):
(WebKit::ResourceLoadStatisticsStore::debugLogDomainsInBatches):

  • Platform/Logging.h:
12:50 PM Changeset in webkit [246560] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Network: detail view shouldn't stay open when the related entry is removed
https://bugs.webkit.org/show_bug.cgi?id=198951

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.prototype._mainResourceDidChange):
Hide the detail view if the main resource changes and we aren't preserving the log.

  • UserInterface/Views/Table.js:

(WI.Table.prototype.reloadVisibleColumnCells):
Only attempt to populate cells for rows that the _dataSource actually has. Without this,
the _delegate may be asked to populate a cell for a row it doesn't have, which would error.

12:37 PM Changeset in webkit [246559] by Devin Rousso
  • 5 edits in trunk

Web Inspector: parseQueryParameters fails to successfully parse query parameter values that contain "="
https://bugs.webkit.org/show_bug.cgi?id=198971
<rdar://problem/51852782>

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

  • UserInterface/Base/URLUtilities.js:

(parseQueryString):

LayoutTests:

  • inspector/unit-tests/url-utilities.html:
  • inspector/unit-tests/url-utilities-expected.txt:
12:33 PM Changeset in webkit [246558] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION: Heap: subsequent snapshots taken manually don't appear in the list
https://bugs.webkit.org/show_bug.cgi?id=198941

Reviewed by Joseph Pecoraro.

Since heap snapshot records can be added at any time, including when not actively recording,
when the "Entire Recording" range is selected, make sure to set the filterEndTime to be an
effectively infinite number so that records added later aren't filtered out.

This isn't done for other timeline views as they may have graphs that don't expect to render
from time 0 till infinity, not to mention being unable to add records when not recording.

  • UserInterface/Views/TimelineRecordingContentView.js:

(WI.TimelineRecordingContentView.prototype._updateTimelineViewTimes):

12:13 PM Changeset in webkit [246557] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION: Canvas: cannot select saved recordings
https://bugs.webkit.org/show_bug.cgi?id=198953

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/TreeElement.js:

(WI.TreeElement.treeElementToggled):
Don't early return if the TreeElement isn't selectable as the owner TreeOutline may
want to dispatch an event that it was clicked.

12:13 PM Changeset in webkit [246556] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Canvas: the initial state should be selected when processing a new/imported recording if the navigation sidebar is collapsed
https://bugs.webkit.org/show_bug.cgi?id=198952

Reviewed by Joseph Pecoraro.

Prevent any content from being generated until initialLayout is called, as otherwise it's
possible for the CanvasNavigationSidebar to update the current action index before the
preview element has been created, which would throw an error.

  • UserInterface/Views/RecordingContentView.js:

(WI.RecordingContentView.prototype.updateActionIndex):
(WI.RecordingContentView.prototype.initialLayout):
(WI.RecordingContentView.prototype._updateSliderValue):
(WI.RecordingContentView.prototype._handleRecordingProcessedAction):
Drive-by: update the slider max each time the selected action index is changed.

12:09 PM Changeset in webkit [246555] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Canvas: imported recordings aren't selectable from the overview if there are no canvases in the page
https://bugs.webkit.org/show_bug.cgi?id=198955

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/CanvasOverviewContentView.js:

(WI.CanvasOverviewContentView.prototype._addSavedRecording):
Hide the content placeholder when a recording is imported. It won't be shown again because
the subviews list will never be empty, as there's no way to remove an imported recording.

  • UserInterface/Views/CollectionContentView.js:

(WI.CollectionContentView.prototype.addContentViewForItem):
(WI.CollectionContentView.prototype.removeContentViewForItem):
(WI.CollectionContentView.prototype.showContentPlaceholder): Added.
(WI.CollectionContentView.prototype.hideContentPlaceholder): Added.
(WI.CollectionContentView.prototype.initialLayout):
(WI.CollectionContentView.prototype._selectItem):
(WI.CollectionContentView.prototype._showContentPlaceholder): Deleted.
(WI.CollectionContentView.prototype._hideContentPlaceholder): Deleted.
Make showContentPlaceholder/hideContentPlaceholder protected for any subclasses to call.

12:01 PM Changeset in webkit [246554] by dino@apple.com
  • 20 edits
    2 copies
    5 adds in trunk/Source

Add preliminary ANGLE backend to WebCore
https://bugs.webkit.org/show_bug.cgi?id=197755

Patch by Kenneth Russell <kbr@chromium.org> on 2019-06-18
Reviewed by Dean Jackson.

Source/ThirdParty/ANGLE:

Add a build step which processes ANGLE's copied public headers so they
can all be referred to under the <ANGLE/xyz.h> prefix. This avoids
touching ANGLE's headers and allows WebCore to include them with no
additional include path modifications.

  • ANGLE.xcodeproj/project.pbxproj:
  • adjust-angle-include-paths.sh: Added.

Source/WebCore:

Add new files supplying an ANGLE version of GraphicsContext3D and
Extensions3D, conditionalized under USE_ANGLE. Update Xcode project to
build these files. This option compiles and links successfully.

FIXMEs remain in several common files which will be addressed in
subsequent patches.

This work will be tested with the preexisting WebGL conformance
suite.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/ANGLEWebKitBridge.h:
  • platform/graphics/GraphicsContext3D.h:
  • platform/graphics/GraphicsContext3DManager.cpp:

(WebCore::GraphicsContext3DManager::updateAllContexts):
(WebCore::GraphicsContext3DManager::updateHighPerformanceState):
(WebCore::GraphicsContext3DManager::disableHighPerformanceGPUTimerFired):

  • platform/graphics/angle/Extensions3DANGLE.cpp: Copied from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp.

(WebCore::Extensions3DANGLE::Extensions3DANGLE):
(WebCore::Extensions3DANGLE::supports):
(WebCore::Extensions3DANGLE::ensureEnabled):
(WebCore::Extensions3DANGLE::isEnabled):
(WebCore::Extensions3DANGLE::getGraphicsResetStatusARB):
(WebCore::Extensions3DANGLE::getTranslatedShaderSourceANGLE):
(WebCore::Extensions3DANGLE::initializeAvailableExtensions):
(WebCore::Extensions3DANGLE::readnPixelsEXT):
(WebCore::Extensions3DANGLE::getnUniformfvEXT):
(WebCore::Extensions3DANGLE::getnUniformivEXT):
(WebCore::Extensions3DANGLE::blitFramebuffer):
(WebCore::Extensions3DANGLE::renderbufferStorageMultisample):
(WebCore::Extensions3DANGLE::createVertexArrayOES):
(WebCore::Extensions3DANGLE::deleteVertexArrayOES):
(WebCore::Extensions3DANGLE::isVertexArrayOES):
(WebCore::Extensions3DANGLE::bindVertexArrayOES):
(WebCore::Extensions3DANGLE::insertEventMarkerEXT):
(WebCore::Extensions3DANGLE::pushGroupMarkerEXT):
(WebCore::Extensions3DANGLE::popGroupMarkerEXT):
(WebCore::Extensions3DANGLE::supportsExtension):
(WebCore::Extensions3DANGLE::drawBuffersEXT):
(WebCore::Extensions3DANGLE::drawArraysInstanced):
(WebCore::Extensions3DANGLE::drawElementsInstanced):
(WebCore::Extensions3DANGLE::vertexAttribDivisor):
(WebCore::Extensions3DANGLE::getExtensions):

  • platform/graphics/angle/Extensions3DANGLE.h: Added.
  • platform/graphics/angle/GraphicsContext3DANGLE.cpp: Copied from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp.

(WebCore::GraphicsContext3D::releaseShaderCompiler):
(WebCore::wipeAlphaChannelFromPixels):
(WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
(WebCore::GraphicsContext3D::validateAttributes):
(WebCore::GraphicsContext3D::reshapeFBOs):
(WebCore::GraphicsContext3D::attachDepthAndStencilBufferIfNeeded):
(WebCore::GraphicsContext3D::resolveMultisamplingIfNecessary):
(WebCore::GraphicsContext3D::renderbufferStorage):
(WebCore::GraphicsContext3D::getIntegerv):
(WebCore::GraphicsContext3D::getShaderPrecisionFormat):
(WebCore::GraphicsContext3D::texImage2D):
(WebCore::GraphicsContext3D::depthRange):
(WebCore::GraphicsContext3D::clearDepth):
(WebCore::GraphicsContext3D::getExtensions):
(WebCore::GraphicsContext3D::readPixels):
(WebCore::setCurrentNameHashMapForShader):
(WebCore::nameHashForShader):
(WebCore::GraphicsContext3D::validateDepthStencil):
(WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
(WebCore::GraphicsContext3D::paintCompositedResultsToCanvas):
(WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
(WebCore::GraphicsContext3D::prepareTexture):
(WebCore::GraphicsContext3D::readRenderingResults):
(WebCore::GraphicsContext3D::reshape):
(WebCore::GraphicsContext3D::checkVaryingsPacking const):
(WebCore::GraphicsContext3D::precisionsMatch const):
(WebCore::GraphicsContext3D::getInternalFramebufferSize const):
(WebCore::GraphicsContext3D::activeTexture):
(WebCore::GraphicsContext3D::attachShader):
(WebCore::GraphicsContext3D::bindAttribLocation):
(WebCore::GraphicsContext3D::bindBuffer):
(WebCore::GraphicsContext3D::bindFramebuffer):
(WebCore::GraphicsContext3D::bindRenderbuffer):
(WebCore::GraphicsContext3D::bindTexture):
(WebCore::GraphicsContext3D::blendColor):
(WebCore::GraphicsContext3D::blendEquation):
(WebCore::GraphicsContext3D::blendEquationSeparate):
(WebCore::GraphicsContext3D::blendFunc):
(WebCore::GraphicsContext3D::blendFuncSeparate):
(WebCore::GraphicsContext3D::bufferData):
(WebCore::GraphicsContext3D::bufferSubData):
(WebCore::GraphicsContext3D::mapBufferRange):
(WebCore::GraphicsContext3D::unmapBuffer):
(WebCore::GraphicsContext3D::copyBufferSubData):
(WebCore::GraphicsContext3D::getInternalformativ):
(WebCore::GraphicsContext3D::renderbufferStorageMultisample):
(WebCore::GraphicsContext3D::texStorage2D):
(WebCore::GraphicsContext3D::texStorage3D):
(WebCore::GraphicsContext3D::getActiveUniforms):
(WebCore::GraphicsContext3D::checkFramebufferStatus):
(WebCore::GraphicsContext3D::clearColor):
(WebCore::GraphicsContext3D::clear):
(WebCore::GraphicsContext3D::clearStencil):
(WebCore::GraphicsContext3D::colorMask):
(WebCore::GraphicsContext3D::compileShader):
(WebCore::GraphicsContext3D::compileShaderDirect):
(WebCore::GraphicsContext3D::copyTexImage2D):
(WebCore::GraphicsContext3D::copyTexSubImage2D):
(WebCore::GraphicsContext3D::cullFace):
(WebCore::GraphicsContext3D::depthFunc):
(WebCore::GraphicsContext3D::depthMask):
(WebCore::GraphicsContext3D::detachShader):
(WebCore::GraphicsContext3D::disable):
(WebCore::GraphicsContext3D::disableVertexAttribArray):
(WebCore::GraphicsContext3D::drawArrays):
(WebCore::GraphicsContext3D::drawElements):
(WebCore::GraphicsContext3D::enable):
(WebCore::GraphicsContext3D::enableVertexAttribArray):
(WebCore::GraphicsContext3D::finish):
(WebCore::GraphicsContext3D::flush):
(WebCore::GraphicsContext3D::framebufferRenderbuffer):
(WebCore::GraphicsContext3D::framebufferTexture2D):
(WebCore::GraphicsContext3D::frontFace):
(WebCore::GraphicsContext3D::generateMipmap):
(WebCore::GraphicsContext3D::getActiveAttribImpl):
(WebCore::GraphicsContext3D::getActiveAttrib):
(WebCore::GraphicsContext3D::getActiveUniformImpl):
(WebCore::GraphicsContext3D::getActiveUniform):
(WebCore::GraphicsContext3D::getAttachedShaders):
(WebCore::generateHashedName):
(WebCore::GraphicsContext3D::mappedSymbolInShaderSourceMap):
(WebCore::GraphicsContext3D::mappedSymbolName):
(WebCore::GraphicsContext3D::originalSymbolInShaderSourceMap):
(WebCore::GraphicsContext3D::originalSymbolName):
(WebCore::GraphicsContext3D::getAttribLocation):
(WebCore::GraphicsContext3D::getAttribLocationDirect):
(WebCore::GraphicsContext3D::getContextAttributes):
(WebCore::GraphicsContext3D::moveErrorsToSyntheticErrorList):
(WebCore::GraphicsContext3D::getError):
(WebCore::GraphicsContext3D::getString):
(WebCore::GraphicsContext3D::hint):
(WebCore::GraphicsContext3D::isBuffer):
(WebCore::GraphicsContext3D::isEnabled):
(WebCore::GraphicsContext3D::isFramebuffer):
(WebCore::GraphicsContext3D::isProgram):
(WebCore::GraphicsContext3D::isRenderbuffer):
(WebCore::GraphicsContext3D::isShader):
(WebCore::GraphicsContext3D::isTexture):
(WebCore::GraphicsContext3D::lineWidth):
(WebCore::GraphicsContext3D::linkProgram):
(WebCore::GraphicsContext3D::pixelStorei):
(WebCore::GraphicsContext3D::polygonOffset):
(WebCore::GraphicsContext3D::sampleCoverage):
(WebCore::GraphicsContext3D::scissor):
(WebCore::GraphicsContext3D::shaderSource):
(WebCore::GraphicsContext3D::stencilFunc):
(WebCore::GraphicsContext3D::stencilFuncSeparate):
(WebCore::GraphicsContext3D::stencilMask):
(WebCore::GraphicsContext3D::stencilMaskSeparate):
(WebCore::GraphicsContext3D::stencilOp):
(WebCore::GraphicsContext3D::stencilOpSeparate):
(WebCore::GraphicsContext3D::texParameterf):
(WebCore::GraphicsContext3D::texParameteri):
(WebCore::GraphicsContext3D::uniform1f):
(WebCore::GraphicsContext3D::uniform1fv):
(WebCore::GraphicsContext3D::uniform2f):
(WebCore::GraphicsContext3D::uniform2fv):
(WebCore::GraphicsContext3D::uniform3f):
(WebCore::GraphicsContext3D::uniform3fv):
(WebCore::GraphicsContext3D::uniform4f):
(WebCore::GraphicsContext3D::uniform4fv):
(WebCore::GraphicsContext3D::uniform1i):
(WebCore::GraphicsContext3D::uniform1iv):
(WebCore::GraphicsContext3D::uniform2i):
(WebCore::GraphicsContext3D::uniform2iv):
(WebCore::GraphicsContext3D::uniform3i):
(WebCore::GraphicsContext3D::uniform3iv):
(WebCore::GraphicsContext3D::uniform4i):
(WebCore::GraphicsContext3D::uniform4iv):
(WebCore::GraphicsContext3D::uniformMatrix2fv):
(WebCore::GraphicsContext3D::uniformMatrix3fv):
(WebCore::GraphicsContext3D::uniformMatrix4fv):
(WebCore::GraphicsContext3D::useProgram):
(WebCore::GraphicsContext3D::validateProgram):
(WebCore::GraphicsContext3D::vertexAttrib1f):
(WebCore::GraphicsContext3D::vertexAttrib1fv):
(WebCore::GraphicsContext3D::vertexAttrib2f):
(WebCore::GraphicsContext3D::vertexAttrib2fv):
(WebCore::GraphicsContext3D::vertexAttrib3f):
(WebCore::GraphicsContext3D::vertexAttrib3fv):
(WebCore::GraphicsContext3D::vertexAttrib4f):
(WebCore::GraphicsContext3D::vertexAttrib4fv):
(WebCore::GraphicsContext3D::vertexAttribPointer):
(WebCore::GraphicsContext3D::viewport):
(WebCore::GraphicsContext3D::createVertexArray):
(WebCore::GraphicsContext3D::deleteVertexArray):
(WebCore::GraphicsContext3D::isVertexArray):
(WebCore::GraphicsContext3D::bindVertexArray):
(WebCore::GraphicsContext3D::getBooleanv):
(WebCore::GraphicsContext3D::getBufferParameteriv):
(WebCore::GraphicsContext3D::getFloatv):
(WebCore::GraphicsContext3D::getInteger64v):
(WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv):
(WebCore::GraphicsContext3D::getProgramiv):
(WebCore::GraphicsContext3D::getNonBuiltInActiveSymbolCount):
(WebCore::GraphicsContext3D::getUnmangledInfoLog):
(WebCore::GraphicsContext3D::getProgramInfoLog):
(WebCore::GraphicsContext3D::getRenderbufferParameteriv):
(WebCore::GraphicsContext3D::getShaderiv):
(WebCore::GraphicsContext3D::getShaderInfoLog):
(WebCore::GraphicsContext3D::getShaderSource):
(WebCore::GraphicsContext3D::getTexParameterfv):
(WebCore::GraphicsContext3D::getTexParameteriv):
(WebCore::GraphicsContext3D::getUniformfv):
(WebCore::GraphicsContext3D::getUniformiv):
(WebCore::GraphicsContext3D::getUniformLocation):
(WebCore::GraphicsContext3D::getVertexAttribfv):
(WebCore::GraphicsContext3D::getVertexAttribiv):
(WebCore::GraphicsContext3D::getVertexAttribOffset):
(WebCore::GraphicsContext3D::texSubImage2D):
(WebCore::GraphicsContext3D::compressedTexImage2D):
(WebCore::GraphicsContext3D::compressedTexSubImage2D):
(WebCore::GraphicsContext3D::createBuffer):
(WebCore::GraphicsContext3D::createFramebuffer):
(WebCore::GraphicsContext3D::createProgram):
(WebCore::GraphicsContext3D::createRenderbuffer):
(WebCore::GraphicsContext3D::createShader):
(WebCore::GraphicsContext3D::createTexture):
(WebCore::GraphicsContext3D::deleteBuffer):
(WebCore::GraphicsContext3D::deleteFramebuffer):
(WebCore::GraphicsContext3D::deleteProgram):
(WebCore::GraphicsContext3D::deleteRenderbuffer):
(WebCore::GraphicsContext3D::deleteShader):
(WebCore::GraphicsContext3D::deleteTexture):
(WebCore::GraphicsContext3D::synthesizeGLError):
(WebCore::GraphicsContext3D::markContextChanged):
(WebCore::GraphicsContext3D::markLayerComposited):
(WebCore::GraphicsContext3D::layerComposited const):
(WebCore::GraphicsContext3D::forceContextLost):
(WebCore::GraphicsContext3D::recycleContext):
(WebCore::GraphicsContext3D::dispatchContextChangedNotification):
(WebCore::GraphicsContext3D::texImage2DDirect):
(WebCore::GraphicsContext3D::drawArraysInstanced):
(WebCore::GraphicsContext3D::drawElementsInstanced):
(WebCore::GraphicsContext3D::vertexAttribDivisor):

  • platform/graphics/angle/TemporaryANGLESetting.cpp: Added.

(WebCore::TemporaryANGLESetting::TemporaryANGLESetting):
(WebCore::TemporaryANGLESetting::~TemporaryANGLESetting):

  • platform/graphics/angle/TemporaryANGLESetting.h: Added.
  • platform/graphics/cocoa/GraphicsContext3DCocoa.mm:

(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::~GraphicsContext3D):
(WebCore::GraphicsContext3D::makeContextCurrent):
(WebCore::GraphicsContext3D::checkGPUStatus):
(WebCore::GraphicsContext3D::screenDidChange):

  • platform/graphics/cocoa/WebGLLayer.h:
  • platform/graphics/cocoa/WebGLLayer.mm:

(-[WebGLLayer display]):

  • platform/graphics/cv/TextureCacheCV.mm:

(WebCore::TextureCacheCV::create):
(WebCore::TextureCacheCV::textureFromImage):

  • platform/graphics/cv/VideoTextureCopierCV.cpp:

(WebCore::enumToStringMap):
(WebCore::VideoTextureCopierCV::initializeContextObjects):
(WebCore::VideoTextureCopierCV::initializeUVContextObjects):
(WebCore::VideoTextureCopierCV::copyImageToPlatformTexture):
(WebCore::VideoTextureCopierCV::copyVideoTextureToPlatformTexture):

  • platform/graphics/opengl/Extensions3DOpenGL.cpp:
  • platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
  • platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
  • platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:

Source/WTF:

Add a USE_ANGLE definition to wtf/Platform.h (currently disabled)
which, when enabled, uses ANGLE instead of the OpenGL or OpenGL ES
backend.

  • wtf/Platform.h:
11:56 AM Changeset in webkit [246553] by Tadeu Zagallo
  • 13 edits
    1 add in trunk

DFG code should not reify the names of builtin functions with private names
https://bugs.webkit.org/show_bug.cgi?id=198849
<rdar://problem/51733890>

Reviewed by Filip Pizlo.

JSTests:

  • stress/builtin-private-function-name.js: Added.

(then):
(PromiseLike):

Source/JavaScriptCore:

Builtin functions that have a private name call setHasReifiedName from finishCreation.
When compiled with DFG and FTL, that does not get called and the function ends up reifying
its name. In order to fix that, we initialize FunctionRareData and set m_hasReifiedName to
true from compileNewFunction in both DFG and FTL.

  • bytecode/InternalFunctionAllocationProfile.h:

(JSC::InternalFunctionAllocationProfile::offsetOfStructure):

  • bytecode/ObjectAllocationProfile.h:

(JSC::ObjectAllocationProfileWithPrototype::offsetOfPrototype):

  • bytecode/UnlinkedFunctionExecutable.h:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileNewFunctionCommon):

  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNewFunction):

  • runtime/FunctionExecutable.h:
  • runtime/FunctionRareData.h:
  • runtime/JSFunction.cpp:

(JSC::JSFunction::finishCreation):

  • runtime/JSFunction.h:
  • runtime/JSFunctionInlines.h:

(JSC::JSFunction::isAnonymousBuiltinFunction const):

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

StorageManager::removeAllowedSessionStorageNamespaceConnection should make sure its storageNamespaceID is valid
https://bugs.webkit.org/show_bug.cgi?id=198966
rdar://problem/51352080

Reviewed by Alex Christensen.

Make sure the namespace ID is a key of the map before using the value.
The namespace ID is coming straight from IPC so should not be trusted.
Also, namespace IDs are added/removed based on web pages being created/deleted.
Namespace IDs are supposed to be scoped by session IDs.
Using page IDs for namespace IDs works as long as the page does not change of session ID during its lifetime, which is not guaranteed.

  • NetworkProcess/WebStorage/StorageManager.cpp:

(WebKit::StorageManager::removeAllowedSessionStorageNamespaceConnection):

10:51 AM Changeset in webkit [246551] by david_quesada@apple.com
  • 2 edits in trunk/Source/WebKit

Network process crash in SandboxExtension::consume() via Download::publishProgress
https://bugs.webkit.org/show_bug.cgi?id=198968
rdar://problem/51732997

Reviewed by Alex Christensen.

Add an early return if the network process fails to resolve a sandbox extension handle for publishing
progress on a download. Creating the NSProgress doesn't do much since the progress reporting service
won't honor the attempt to publish progress on a URL the process does not have access to, and nothing
else in the Network process makes any use of the progress.

  • NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:

(WebKit::Download::publishProgress):

10:49 AM Changeset in webkit [246550] by sbarati@apple.com
  • 26 edits
    2 adds in trunk

[WHLSL] Do not generate duplicate constructors/copy constructors in synthesizeConstructors
https://bugs.webkit.org/show_bug.cgi?id=198580

Reviewed by Robin Morisset.

Source/WebCore:

Prior to this patch, we were generating duplicate constructors
for unnamed types. This is bad for two reasons:

  1. It's inefficient, since we'd generate a constructor for every place in

the AST where we'd visit this unnamed type.

  1. It made it impossible to resolve function overloads to call

the default constructor. This made it so that the autoInitializeVariables
pass would crash if we ever generated more than one of these functions
for the same type.

To make this work, this patch splits up what used to be the resolveNamesInFunctions
pass. Previously, this pass would both resolve calls and resolve type names.
Synthesize constructors would run before this, since resolving calls meant we
may resolve a call to one of these synthesized constructors. However, synthesize
constructors now needs to test for the equality unnamed types, so it now requires
running the type resolution part of resolveNamesInFunctions before it runs.

This patch splits resolveNamesInFunctions into two parts:
resolveTypeNamesInFunctions and resolveCallsInFunctions.

So we used to run:
synthesizeConstructors
resolveNamesInFunctions

And now we run:
resolveTypeNamesInFunctions
synthesizeConstructors
resolveCallsInFunctions

Test: webgpu/whlsl-duplicate-types-should-not-produce-duplicate-ctors.html

  • Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
  • Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
  • Modules/webgpu/WHLSL/AST/WHLSLBooleanLiteral.h:

(WebCore::WHLSL::AST::BooleanLiteral::clone const):

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

(WebCore::WHLSL::AST::EnumerationMemberLiteral::clone const):

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

(WebCore::WHLSL::AST::Expression::copyTypeTo const):

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

(WebCore::WHLSL::AST::FloatLiteral::clone const):

  • Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.cpp:

(WebCore::WHLSL::AST::FloatLiteralType::clone const):

  • Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.h:
  • Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteral.h:

(WebCore::WHLSL::AST::IntegerLiteral::clone const):

  • Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.cpp:

(WebCore::WHLSL::AST::IntegerLiteralType::clone const):

  • Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.h:
  • Modules/webgpu/WHLSL/AST/WHLSLNullLiteral.h:

(WebCore::WHLSL::AST::NullLiteral::clone const):

  • Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
  • Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
  • Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:
  • Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteral.h:

(WebCore::WHLSL::AST::UnsignedIntegerLiteral::clone const):

  • Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.cpp:

(WebCore::WHLSL::AST::UnsignedIntegerLiteralType::clone const):

  • Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.h:
  • Modules/webgpu/WHLSL/WHLSLASTDumper.h:
  • Modules/webgpu/WHLSL/WHLSLInferTypes.cpp:

(WebCore::WHLSL::matches):

  • Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:

(WebCore::WHLSL::NameResolver::NameResolver):
(WebCore::WHLSL::NameResolver::visit):
(WebCore::WHLSL::resolveTypeNamesInFunctions):
(WebCore::WHLSL::resolveCallsInFunctions):
(WebCore::WHLSL::resolveNamesInFunctions): Deleted.

  • Modules/webgpu/WHLSL/WHLSLNameResolver.h:

(WebCore::WHLSL::NameResolver::setIsResolvingCalls):

  • Modules/webgpu/WHLSL/WHLSLPrepare.cpp:

(WebCore::WHLSL::prepareShared):

  • Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:

(WebCore::WHLSL::UnnamedTypeKey::UnnamedTypeKey):
(WebCore::WHLSL::UnnamedTypeKey::isEmptyValue const):
(WebCore::WHLSL::UnnamedTypeKey::isHashTableDeletedValue const):
(WebCore::WHLSL::UnnamedTypeKey::hash const):
(WebCore::WHLSL::UnnamedTypeKey::operator== const):
(WebCore::WHLSL::UnnamedTypeKey::unnamedType const):
(WebCore::WHLSL::UnnamedTypeKey::Hash::hash):
(WebCore::WHLSL::UnnamedTypeKey::Hash::equal):
(WebCore::WHLSL::UnnamedTypeKey::Traits::isEmptyValue):
(WebCore::WHLSL::FindAllTypes::takeUnnamedTypes):
(WebCore::WHLSL::FindAllTypes::appendNamedType):
(WebCore::WHLSL::synthesizeConstructors):

LayoutTests:

  • webgpu/whlsl-duplicate-types-should-not-produce-duplicate-ctors-expected.txt: Added.
  • webgpu/whlsl-duplicate-types-should-not-produce-duplicate-ctors.html: Added.
10:26 AM Changeset in webkit [246549] by keith_miller@apple.com
  • 3 edits
    1 add in trunk

MaybeParseAsGeneratorForScope sometimes loses track of its scope ref
https://bugs.webkit.org/show_bug.cgi?id=198969
<rdar://problem/51620714>

Reviewed by Tadeu Zagallo.

JSTests:

  • stress/nested-yield-in-arrow-function-should-be-a-syntax-error.js: Added.

(catch):

Source/JavaScriptCore:

Sometimes if the parser has enough nested scopes
MaybeParseAsGeneratorForScope can lose track of the ScopeRef it
should be tracking. This is because the parser sometimes relocates
its ScopeRefs. To fix this MaybeParseAsGeneratorForScope should
hold the scope ref it's watching.

  • parser/Parser.cpp:

(JSC::Scope::MaybeParseAsGeneratorForScope::MaybeParseAsGeneratorForScope):
(JSC::Scope::MaybeParseAsGeneratorForScope::~MaybeParseAsGeneratorForScope):

10:20 AM Changeset in webkit [246548] by david_quesada@apple.com
  • 2 edits in trunk/Tools

REGRESSION: _WKDownload.OriginatingWebView and _WKDownload.CrashAfterDownloadDidFinishWhenDownloadProxyHoldsTheLastRefOnWebProcessPool failing
https://bugs.webkit.org/show_bug.cgi?id=198954
rdar://problem/51711556

Reviewed by Alex Christensen.

For these tests, kill the web process after the download starts. This makes the deallocation
of the download-originating web views, which these tests depend on, more reliable.

  • TestWebKitAPI/Tests/WebKitCocoa/Download.mm:

(-[OriginatingWebViewDownloadDelegate _downloadDidStart:]):
(-[WaitUntilDownloadCanceledDelegate _downloadDidStart:]):

10:19 AM Changeset in webkit [246547] by Adrian Perez de Castro
  • 4 edits in trunk

Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.25.1 release

.:

  • Source/cmake/OptionsWPE.cmake: Bump version numbers.

Source/WebKit:

  • wpe/NEWS: Add release notes for 2.25.1
10:02 AM Changeset in webkit [246546] by timothy_horton@apple.com
  • 5 edits in trunk/Source/WebKit

Expose DataDetectors context generation on WKContentViewInteraction
https://bugs.webkit.org/show_bug.cgi?id=198950
<rdar://problem/51116021>

Reviewed by Andy Estes.

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

(-[WKActionSheetAssistant currentPositionInformation]):
(-[WKActionSheetAssistant showDataDetectorsSheet]):

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

(-[WKContentView dataDetectionContextForPositionInformation:]):
(-[WKContentView dataDetectionContextForActionSheetAssistant:]):
For use by other clients, add -dataDetectionContextForPositionInformation:
and make -dataDetectionContextForActionSheetAssistant: use it.
Also, pull the code to augment the context with surrounding text out of
from WKActionSheetAssistant.

9:52 AM Changeset in webkit [246545] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WebKit

[WPE] Fix building the documentation

Unreviewed.

  • UIProcess/API/wpe/docs/wpe-docs.sgml: Fix typo "2.62" -> "2.26"
9:48 AM Changeset in webkit [246544] by Truitt Savell
  • 5 edits in trunk/Source/WebKit

Unreviewed, rolling out r246531.

Broke internal builds.

Reverted changeset:

"Expose DataDetectors context generation on
WKContentViewInteraction"
https://bugs.webkit.org/show_bug.cgi?id=198950
https://trac.webkit.org/changeset/246531

9:44 AM Changeset in webkit [246543] by Truitt Savell
  • 4 edits in trunk/Source/WebCore

Unreviewed, rolling out r246524.

Caused 45 webgpu/ crashes.

Reverted changeset:

"[WHLSL] The name resolver does not deal with
nativeFunctionDeclaration"
https://bugs.webkit.org/show_bug.cgi?id=198306
https://trac.webkit.org/changeset/246524

9:41 AM Changeset in webkit [246542] by Truitt Savell
  • 4 edits
    1 add in trunk/Source/WebCore/PAL

Link to the new AppSSO private framework
https://bugs.webkit.org/show_bug.cgi?id=198949
<rdar://problem/51281897>

Patch by Jiewen Tan <jiewen_tan@apple.com> on 2019-06-18
Reviewed by Brent Fulgham.

  • PAL.xcodeproj/project.pbxproj:
  • pal/cocoa/AppSSOSoftLink.h:
  • pal/cocoa/AppSSOSoftLink.mm:
  • pal/spi/cocoa/AppSSOSPI.h: Added.
9:36 AM Changeset in webkit [246541] by Truitt Savell
  • 4 edits
    1 delete in trunk/Source/WebCore/PAL

Unreviewed, rolling out r246534.

Caused 45 webgpu/ tests to crash.

Reverted changeset:

"Link to the new AppSSO private framework"
https://bugs.webkit.org/show_bug.cgi?id=198949
https://trac.webkit.org/changeset/246534

9:04 AM Changeset in webkit [246540] by Alan Bujtas
  • 9 edits
    1 add in trunk/Source/WebCore

[LFC][IFC] Inline quirks should have their dedicated class.
https://bugs.webkit.org/show_bug.cgi?id=198962
<rdar://problem/51848170>

Reviewed by Antti Koivisto.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • layout/LayoutState.h:
  • layout/inlineformatting/InlineFormattingContext.h:
  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::InlineFormattingContext::LineLayout::createDisplayRuns const):

  • layout/inlineformatting/InlineFormattingContextQuirks.cpp: Added.

(WebCore::Layout::InlineFormattingContext::Quirks::collapseLineDescent):

  • layout/inlineformatting/InlineLine.cpp:

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

  • layout/inlineformatting/InlineLineBreaker.cpp:
  • layout/inlineformatting/InlineLineBreaker.h:
8:23 AM Changeset in webkit [246539] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] Line::append() should take care of all the inline types.
https://bugs.webkit.org/show_bug.cgi?id=198961
<rdar://problem/51847712>

Reviewed by Antti Koivisto.

Make all the existing Line::append* functions private.

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::staticHorizontalPositionForOutOfFlowPositioned): fix a typo.

  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::append):

  • layout/inlineformatting/InlineLine.h:
8:16 AM Changeset in webkit [246538] by Simon Fraser
  • 29 edits in trunk

Convert macOS to scroll by changing layer boundsOrigin
https://bugs.webkit.org/show_bug.cgi?id=198917

Reviewed by Antti Koivisto.

Source/WebCore:

macOS did frame and overflow scrolling by changing the position of the scrolled
contents layer. iOS scrolls by changing the boundsOrigin of the scrollContainer layer
(which it has to, to match how UIScrollView works).

The iOS approach removes the need for an extra layer whose only role is for
scroll positioning, so migrate macOS to the same approach. A later patch can remove
m_scrolledContentsLayer.

We can remove RenderLayerCompositor::m_clipLayer since m_scrollContainerLayer has exactly
the same role now.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::reconcileScrollPosition):

  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::insetClipLayerForFrameView):

  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:

(WebCore::ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers):

  • page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:

(WebCore::ScrollingTreeOverflowScrollingNodeMac::repositionScrollingLayers):

  • platform/graphics/cocoa/WebCoreCALayerExtras.h:
  • platform/graphics/cocoa/WebCoreCALayerExtras.mm:

(-[CALayer _web_setLayerBoundsOrigin:]):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateGeometry):
(WebCore::RenderLayerBacking::setLocationOfScrolledContents):
(WebCore::RenderLayerBacking::updateScrollOffset):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::~RenderLayerCompositor):
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::RenderLayerCompositor::frameViewDidChangeSize):
(WebCore::RenderLayerCompositor::updateLayersForScrollPosition):
(WebCore::RenderLayerCompositor::updateScrollContainerGeometry):
(WebCore::RenderLayerCompositor::frameViewDidScroll):
(WebCore::RenderLayerCompositor::updateRootLayerPosition):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
(WebCore::RenderLayerCompositor::ensureRootLayer):
(WebCore::RenderLayerCompositor::destroyRootLayer):
(WebCore::RenderLayerCompositor::updateScrollingNodeLayers):
(WebCore::RenderLayerCompositor::updateScrollLayerPosition): Deleted.
(WebCore::RenderLayerCompositor::updateScrollLayerClipping): Deleted.

  • rendering/RenderLayerCompositor.h:

Source/WebKit:

Remove unreached and confusing code.

  • UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm:

(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::repositionScrollingLayers):

LayoutTests:

  • compositing/iframes/scrolling-iframe-expected.txt:
  • compositing/overflow/textarea-scroll-touch-expected.txt:
  • compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt:
  • compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt:
  • compositing/repaint/scroller-with-foreground-layer-repaints-expected.txt:
  • compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt:
  • scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt:
7:47 AM Changeset in webkit [246537] by Philippe Normand
  • 3 edits in trunk/Source/WebCore

[GStreamer] Identify elements with monotonically increasing counters
https://bugs.webkit.org/show_bug.cgi?id=198916

Reviewed by Xabier Rodriguez-Calvar.

Those ids tend to be shorter, easier to read for humans and for
diff tools :) Underscores were also replaced by dashes, for
consistency with the usual GStreamer element naming untold
conventions.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::load):
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):

  • platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:

(WebCore::GStreamerVideoEncoder::makeElement):
(WebCore::GStreamerVideoEncoder::InitEncode):

3:52 AM Changeset in webkit [246536] by zandobersek@gmail.com
  • 5 edits in trunk

[WebGL] Extensions3DOpenGLES::bindVertexArrayOES() should allow zero array object
https://bugs.webkit.org/show_bug.cgi?id=198929

Reviewed by Carlos Garcia Campos.

Source/WebCore:

A 0 object parameter for the glBindVertexArrayOES() call is a valid
value since it binds the default vertex array object for any updates and
draws. As such the Extensions3DOpenGLES implementation shouldn't return
early if the object value is 0.

No new tests -- covered by existing tests.

  • platform/graphics/opengl/Extensions3DOpenGLES.cpp:

(WebCore::Extensions3DOpenGLES::bindVertexArrayOES):

LayoutTests:

Enable the passing tests and update one baseline.

  • platform/wpe/TestExpectations:
  • platform/wpe/webgl/2.0.0/conformance/extensions/oes-vertex-array-object-expected.txt:
3:46 AM Changeset in webkit [246535] by dino@apple.com
  • 3 edits in trunk/Source/WebKit

Attachment elements are missing context menu previews
https://bugs.webkit.org/show_bug.cgi?id=198946

Reviewed by Tim Horton.

When requesting position information on an <attachment> element,
we were not providing a snapshot image.

  • WebProcess/WebPage/WebPage.h: New common method to take a snapshot.
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::shareableBitmapSnapshotForNode): New helper.
(WebKit::WebPage::positionInformation): If the element is an attachment,
then ask for a snapshot.

1:17 AM Changeset in webkit [246534] by jiewen_tan@apple.com
  • 4 edits
    1 add in trunk/Source/WebCore/PAL

Link to the new AppSSO private framework
https://bugs.webkit.org/show_bug.cgi?id=198949
<rdar://problem/51281897>

Reviewed by Brent Fulgham.

  • PAL.xcodeproj/project.pbxproj:
  • pal/cocoa/AppSSOSoftLink.h:
  • pal/cocoa/AppSSOSoftLink.mm:
  • pal/spi/cocoa/AppSSOSPI.h: Added.
1:11 AM Changeset in webkit [246533] by mitz@apple.com
  • 2 edits in trunk/Tools

Revert workaround for bug 198904 from run-webkit-archive
https://bugs.webkit.org/show_bug.cgi?id=198931

Reviewed by Alexey Proskuryakov.

Reverted r245965, now that the load commands in the XPC service binaries make them correctly
pick up the built frameworks.

  • WebKitArchiveSupport/run-webkit-archive:

(set_dyld_framework_path):

Note: See TracTimeline for information about the timeline view.