Timeline



Jan 18, 2019:

11:53 PM Changeset in webkit [240199] by rniwa@webkit.org
  • 19 edits
    2 adds in trunk

iOS: Updating input mode should update the software keyboard
https://bugs.webkit.org/show_bug.cgi?id=193565
<rdar://problem/47376334>

Reviewed by Wenson Hsieh.

Source/WebCore:

Let the chrome client know that the focused element's inputmode had changed.

Test: fast/forms/ios/inputmode-none-removed.html

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::parseAttribute):

  • page/ChromeClient.h:

Source/WebKit:

Update the software keyboard when the inputmode content attribute on the focused element had been mutated.

  • Scripts/webkit/messages.py:
  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::focusedElementDidChangeInputMode):

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

(-[WKContentView _didUpdateInputMode:]):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::focusedElementDidChangeInputMode):

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::focusedElementDidChangeInputMode):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::focusedElementDidChangeInputMode):

  • WebProcess/WebPage/WebPage.h:

LayoutTests:

Added a regression test for removing inputmode content attribute with the value of "none".

The test methodology is different between testRunner and in-browser since we don't force
software keyboard while running layout tests inside simulator which can elimiate
the visual viewport difference inside the test runner, and in-browser testing obviously
doesn't have access to the internal keyboard metrics.

  • fast/forms/ios/inputmode-none-removed-expected.txt: Added.
  • fast/forms/ios/inputmode-none-removed.html: Added.
9:42 PM Changeset in webkit [240198] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Adjust WKDrawingView protocol method name
https://bugs.webkit.org/show_bug.cgi?id=193604

Reviewed by Wenson Hsieh.

  • UIProcess/ios/WKDrawingView.mm:

(-[WKDrawingView canvasViewDrawingDidChange:]):
(-[WKDrawingView drawingDidChange:]): Deleted.

9:28 PM Changeset in webkit [240197] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

[WebKit] Change Xcode folders to map to folders on disk

  • WebKit.xcodeproj/project.pbxproj: Update these folders:
  • Shared/Authentication
  • Shared/Authentication/cocoa
9:28 PM Changeset in webkit [240196] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore/PAL

[PAL] Change Xcode folders to map to folders on disk

Found by tidy-Xcode-project-file script (see Bug 188754).

  • PAL.xcodeproj/project.pbxproj: Update these folders:
  • pal/avfoundation
  • pal/crypto/commoncrypto
  • pal/ios
8:22 PM Changeset in webkit [240195] by BJ Burg
  • 8 edits in trunk/Source

Automation.computeElementLayout should return visual viewport-aware coordinates
https://bugs.webkit.org/show_bug.cgi?id=193598
<rdar://problem/35325644>

Reviewed by Simon Fraser.

Source/WebCore:

  • page/FrameView.h: export symbol to be usable from WebKit.
  • page/FrameView.cpp:

(WebCore::FrameView::clientToLayoutViewportRect const): Added.
Do the same thing as clientToLayoutViewportPoint with a rect instead.

Source/WebKit:

Previously I added CoordinateSystem::VisualViewport to stub out this for iOS.
But I think that it's a mistake for safaridriver to care about VisualViewport
being enabled or not, because it is a runtime-switchable setting.

This patch removes CoordinateSystem::VisualViewport. Make the existing
CoordinateSystem::LayoutViewport use visual viewport semantics if needed.

This is tested by WebDriver element clicking tests. There should not be any
difference in behavior until it is possible to zoom with gestures via WebDriver.

  • Shared/CoordinateSystem.h:
  • UIProcess/Automation/Automation.json:
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::protocolStringToCoordinateSystem):

  • WebProcess/Automation/WebAutomationSessionProxy.cpp:

(WebKit::WebAutomationSessionProxy::computeElementLayout):

7:35 PM Changeset in webkit [240194] by keith_miller@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

JSScript API should only take ascii files.
https://bugs.webkit.org/show_bug.cgi?id=193420

Reviewed by Saam Barati.

This patch leaves the UTF8 method for binary compatablity, which
will be removed later.

  • API/JSScript.h:
  • API/JSScript.mm:

(fillBufferWithContentsOfFile):
(+[JSScript scriptFromASCIIFile:inVirtualMachine:withCodeSigning:andBytecodeCache:]):
(+[JSScript scriptFromUTF8File:inVirtualMachine:withCodeSigning:andBytecodeCache:]):

  • API/tests/testapi.mm:

(-[JSContextFileLoaderDelegate context:fetchModuleForIdentifier:withResolveHandler:andRejectHandler:]):

7:27 PM Changeset in webkit [240193] by keith_miller@apple.com
  • 4 edits in trunk/Source/bmalloc

gigacage slide should randomize both start and end
https://bugs.webkit.org/show_bug.cgi?id=193601

Reviewed by Yusuke Suzuki.

This patch makes it so that the gigacade slide has an arbitrary
distance from the end as well as the start. This is done by
picking a random size then based on that size picking an random
starting offset.

  • bmalloc/Gigacage.h:
  • bmalloc/Heap.cpp:

(bmalloc::Heap::Heap):

7:05 PM Changeset in webkit [240192] by sbarati@apple.com
  • 3 edits in trunk/PerformanceTests

Use scores everywhere in JetStream2's UI
https://bugs.webkit.org/show_bug.cgi?id=193593

Reviewed by Keith Miller.

  • JetStream2/JetStreamDriver.js:

(DefaultBenchmark.prototype.processResults):
(DefaultBenchmark.prototype.get score):
(DefaultBenchmark.scoreDescription):
(WSLBenchmark.prototype.processResults):
(WSLBenchmark.prototype.get score):
(WSLBenchmark.scoreDescription):
(WasmBenchmark.prototype.processResults):
(WasmBenchmark.prototype.get score):
(WasmBenchmark.scoreDescription):

  • JetStream2/index.html:
5:06 PM Changeset in webkit [240191] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Disable the run-jsc-stress-test remote host key check [second round].
https://bugs.webkit.org/show_bug.cgi?id=192988

Patch by Zhifei FANG <zhifei_fang@apple.com> on 2019-01-18
Reviewed by Dewei Zhu.

  • Scripts/run-jsc-stress-tests:
4:22 PM Changeset in webkit [240190] by eric.carlson@apple.com
  • 7 edits
    4 adds in trunk/Source

Revert r238815, it broke WK1 video fullscreen on Mac
https://bugs.webkit.org/show_bug.cgi?id=193586
<rdar://problem/47358941>

Reviewed by Jer Noble.

Source/WebCore:

  • PlatformMac.cmake:
  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:

(WebCore::MediaPlayerPrivateAVFoundation::supportsFullscreen const):

Source/WebKitLegacy:

  • WebKitLegacy.xcodeproj/project.pbxproj:

Source/WebKitLegacy/mac:

  • WebView/WebVideoFullscreenController.h: Added.
  • WebView/WebVideoFullscreenController.mm: Added.

(SOFT_LINK_CLASS):
(-[WebVideoFullscreenController init]):
(-[WebVideoFullscreenController dealloc]):
(-[WebVideoFullscreenController fullscreenWindow]):
(-[WebVideoFullscreenController windowDidLoad]):
(-[WebVideoFullscreenController videoElement]):
(-[WebVideoFullscreenController setVideoElement:]):
(-[WebVideoFullscreenController clearFadeAnimation]):
(-[WebVideoFullscreenController windowDidExitFullscreen]):
(-[WebVideoFullscreenController windowDidEnterFullscreen]):
(-[WebVideoFullscreenController videoElementRect]):
(-[WebVideoFullscreenController applicationDidResignActive:]):
(frameExpandedToRatioOfFrame):
(createBackgroundFullscreenWindow):
(-[WebVideoFullscreenController setupFadeAnimationIfNeededAndFadeIn:]):
(-[WebVideoFullscreenController enterFullscreen:]):
(-[WebVideoFullscreenController exitFullscreen]):
(-[WebVideoFullscreenController applicationDidChangeScreenParameters:]):
(-[WebVideoFullscreenController updateMenuAndDockForFullscreen]):
(-[WebVideoFullscreenController _requestExit]):
(-[WebVideoFullscreenController requestExitFullscreenWithAnimation:]):
(-[WebVideoFullscreenController requestExitFullscreen]):
(-[WebVideoFullscreenController fadeHUDIn]):
(-[WebVideoFullscreenController observeValueForKeyPath:ofObject:change:context:]):
(-[WebVideoFullscreenController rateChanged:]):
(-[WebVideoFullscreenWindow initWithContentRect:styleMask:backing:defer:]):
(-[WebVideoFullscreenWindow dealloc]):
(-[WebVideoFullscreenWindow resignFirstResponder]):
(-[WebVideoFullscreenWindow canBecomeKeyWindow]):
(-[WebVideoFullscreenWindow mouseDown:]):
(-[WebVideoFullscreenWindow cancelOperation:]):
(-[WebVideoFullscreenWindow animatedResizeDidEnd]):
(-[WebVideoFullscreenWindow animateFromRect:toRect:withSubAnimation:controllerAction:]):
(-[WebVideoFullscreenWindow animationDidEnd:]):
(-[WebVideoFullscreenWindow mouseMoved:]):

  • WebView/WebVideoFullscreenHUDWindowController.h: Added.
  • WebView/WebVideoFullscreenHUDWindowController.mm: Added.

(-[WebVideoFullscreenHUDWindow initWithContentRect:styleMask:backing:defer:]):
(-[WebVideoFullscreenHUDWindow canBecomeKeyWindow]):
(-[WebVideoFullscreenHUDWindow cancelOperation:]):
(-[WebVideoFullscreenHUDWindow center]):
(-[WebVideoFullscreenHUDWindow keyDown:]):
(-[WebVideoFullscreenHUDWindow resignFirstResponder]):
(-[WebVideoFullscreenHUDWindow performKeyEquivalent:]):
(-[WebVideoFullscreenHUDWindowController init]):
(-[WebVideoFullscreenHUDWindowController dealloc]):
(-[WebVideoFullscreenHUDWindowController setArea:]):
(-[WebVideoFullscreenHUDWindowController keyDown:]):
(-[WebVideoFullscreenHUDWindowController delegate]):
(-[WebVideoFullscreenHUDWindowController setDelegate:]):
(-[WebVideoFullscreenHUDWindowController scheduleTimeUpdate]):
(-[WebVideoFullscreenHUDWindowController unscheduleTimeUpdate]):
(-[WebVideoFullscreenHUDWindowController fadeWindowIn]):
(-[WebVideoFullscreenHUDWindowController fadeWindowOut]):
(-[WebVideoFullscreenHUDWindowController closeWindow]):
(createMediaUIControl):
(createControlWithMediaUIControlType):
(createTimeTextField):
(createMediaUIBackgroundView):
(-[WebVideoFullscreenHUDWindowController windowDidLoad]):
(-[WebVideoFullscreenHUDWindowController updateVolume]):
(-[WebVideoFullscreenHUDWindowController updateTime]):
(-[WebVideoFullscreenHUDWindowController endScrubbing]):
(-[WebVideoFullscreenHUDWindowController timelinePositionChanged:]):
(-[WebVideoFullscreenHUDWindowController currentTime]):
(-[WebVideoFullscreenHUDWindowController setCurrentTime:]):
(-[WebVideoFullscreenHUDWindowController duration]):
(-[WebVideoFullscreenHUDWindowController maxVolume]):
(-[WebVideoFullscreenHUDWindowController volumeChanged:]):
(-[WebVideoFullscreenHUDWindowController setVolumeToZero:]):
(-[WebVideoFullscreenHUDWindowController setVolumeToMaximum:]):
(-[WebVideoFullscreenHUDWindowController decrementVolume]):
(-[WebVideoFullscreenHUDWindowController incrementVolume]):
(-[WebVideoFullscreenHUDWindowController volume]):
(-[WebVideoFullscreenHUDWindowController setVolume:]):
(-[WebVideoFullscreenHUDWindowController updatePlayButton]):
(-[WebVideoFullscreenHUDWindowController updateRate]):
(-[WebVideoFullscreenHUDWindowController togglePlaying:]):
(-[WebVideoFullscreenHUDWindowController playing]):
(-[WebVideoFullscreenHUDWindowController setPlaying:]):
(timeToString):
(-[WebVideoFullscreenHUDWindowController remainingTimeText]):
(-[WebVideoFullscreenHUDWindowController elapsedTimeText]):
(-[WebVideoFullscreenHUDWindowController mouseEntered:]):
(-[WebVideoFullscreenHUDWindowController mouseExited:]):
(-[WebVideoFullscreenHUDWindowController rewind:]):
(-[WebVideoFullscreenHUDWindowController fastForward:]):
(-[WebVideoFullscreenHUDWindowController exitFullscreen:]):
(-[WebVideoFullscreenHUDWindowController windowDidExpose:]):
(-[WebVideoFullscreenHUDWindowController windowDidClose:]):

  • WebView/WebView.mm:

(-[WebView _enterVideoFullscreenForVideoElement:mode:]):
(-[WebView _exitVideoFullscreen]):

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

[build.webkit.org] unit-test failure Builder GTK Linux 32-bit Release doesn't exist
https://bugs.webkit.org/show_bug.cgi?id=193597

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
4:13 PM Changeset in webkit [240188] by Devin Rousso
  • 3 edits in trunk/Source/WebCore

Web Inspector: Audit: don't keep the injected sub-objects alive between runs
https://bugs.webkit.org/show_bug.cgi?id=193594
<rdar://problem/47398091>

Reviewed by Joseph Pecoraro.

Rather than save the InspectorAuditAccessibilityObject and InspectorAuditDOMObject
between individual Audit.setup invocations, we should only keep them alive so long as the
injected WebInspectorAudit object is alive (e.g. from Audit.setup to Audit.teardown).

This change fixes inspector/audit/run-accessibility.html.

  • inspector/agents/page/PageAuditAgent.h:
  • inspector/agents/page/PageAuditAgent.cpp:

(WebCore::PageAuditAgent::populateAuditObject):

4:10 PM Changeset in webkit [240187] by aakash_jain@apple.com
  • 4 edits in trunk/Tools

[build.webkit.org] api tests failures are incorrectly named as unit test failures
https://bugs.webkit.org/show_bug.cgi?id=193595

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/build.webkit.org-config/factories.py: Renamed RunUnitTests to RunAPITests.
  • BuildSlaveSupport/build.webkit.org-config/steps.py: Ditto.
  • BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: Ditto.
4:08 PM Changeset in webkit [240186] by ddkilzer@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Follow-up: Gigacages should start allocations from a slide
<https://bugs.webkit.org/show_bug.cgi?id=193523>
<rdar://problem/44958707>

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::caged): Add UNUSED_PARAM(kind) to
fix the build.

3:45 PM Changeset in webkit [240185] by dbates@webkit.org
  • 2 edits in trunk/Source/WebCore

Another attempt to fix the iOS build following <https://trac.webkit.org/changeset/240174>
(https://bugs.webkit.org/show_bug.cgi?id=193583)

Substitute ENABLE(FULL_KEYBOARD_ACCESS) for PLATFORM(MAC). On Mac, we always build with
ENABLE(FULL_KEYBOARD_ACCESS) enabled.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::paintFocusRing):

3:44 PM Changeset in webkit [240184] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore/PAL

Follow-up: Override the session configuration for cookieAcceptPolicy
<https://bugs.webkit.org/show_bug.cgi?id=190925>
<rdar://problem/45497382>

Discussed with John Wilander.

  • pal/spi/cf/CFNetworkSPI.h: Declare new SPI for the internal

macOS 10.12 Sierra SDK since it will never appear in those
headers. This fixes the build for trunk WebKit on Sierra.

3:34 PM Changeset in webkit [240183] by dbates@webkit.org
  • 5 edits in trunk/Source

Fix some build issues.

Source/WebCore:

Including UIKitSoftLinking.h is not compatible with unified builds.

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

Source/WebKit:

Include missing header WKDrawingCoordinator.

  • UIProcess/ios/WKInkPickerView.mm:
3:26 PM Changeset in webkit [240182] by Dewei Zhu
  • 3 edits in trunk/Websites/perf.webkit.org

Test group results notification should not say a build request to build had failed even when it had successfully completed.
https://bugs.webkit.org/show_bug.cgi?id=193064

Reviewed by Ryosuke Niwa.

Should show 'Build completed' or 'Build failed' for build type build requests.

  • browser-tests/test-group-result-page-tests.js: Added a unit test to guard this bug.
  • tools/js/test-group-result-page.js: Show 'Build completed' or 'Build failed' for build type build requests.
3:15 PM Changeset in webkit [240181] by timothy_horton@apple.com
  • 10 edits in trunk/Source

Get rid of ADVANCED_SPELL_CHECKING
https://bugs.webkit.org/show_bug.cgi?id=193592

Reviewed by Wenson Hsieh.

Source/WebCore/PAL:

  • pal/spi/mac/NSSpellCheckerSPI.h:

It's always true on macOS, and all but one use of it is already inside PLATFORM(MAC)

Source/WebKit:

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::requestCandidatesForSelectionIfNeeded):
(WebKit::WebViewImpl::insertText):

  • UIProcess/mac/TextCheckerMac.mm:

(WebKit::TextChecker::checkTextOfParagraph):
(WebKit::TextChecker::getGuessesForWord):

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebEditorClient.mm:

(insertionPointFromCurrentSelection):
(WebEditorClient::checkTextOfParagraph):
(WebEditorClient::getGuessesForWord):
(WebEditorClient::requestCandidatesForSelection):
(WebEditorClient::requestCheckingOfString):

  • WebView/WebHTMLView.mm:

(-[WebHTMLView insertText:]):

Source/WTF:

  • wtf/Platform.h:
3:09 PM Changeset in webkit [240180] by Justin Fan
  • 19 edits
    2 adds in trunk

(WIP) [WebGPU] WebGPUProgrammablePassEncoder::setBindGroup prototype
https://bugs.webkit.org/show_bug.cgi?id=193457
<rdar://problem/47296678>

Reviewed by Dean Jackson.

Source/WebCore:

Enable WebGPU developers to assign buffer bind groups and access them via render pipeline.

Test: webgpu/buffer-resource-triangles.html

  • Modules/webgpu/WebGPUBindGroup.h:

(WebCore::WebGPUBindGroup::bindGroup const): Added getter.

  • Modules/webgpu/WebGPUProgrammablePassEncoder.cpp:

(WebCore::WebGPUProgrammablePassEncoder::setBindGroup const): Added. Delegates call to GPUProgrammablePassEncoder.

  • Modules/webgpu/WebGPUProgrammablePassEncoder.h: Enable setBindGroup.
  • Modules/webgpu/WebGPUProgrammablePassEncoder.idl: ditto.
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/gpu/GPUBindGroup.h:

(WebCore::GPUBindGroup::layout const): Added getter.
(WebCore::GPUBindGroup::bindings const): ditto.

  • platform/graphics/gpu/GPUBindGroupLayout.h: Added ArgumentEncoderBuffer struct to retain ptr to both MTLArgumentEncoders and their argument MTLBuffers.

(WebCore::GPUBindGroupLayout::ArgumentEncoderBuffer::operator! const):
(WebCore::GPUBindGroupLayout::vertexArguments const): Added. Getter.
(WebCore::GPUBindGroupLayout::fragmentArguments const): ditto.
(WebCore::GPUBindGroupLayout::computeArguments const): ditto.

  • platform/graphics/gpu/GPUDevice.cpp: Refactored unnecessary header include.
  • platform/graphics/gpu/GPUDevice.h: ditto.
  • platform/graphics/gpu/GPUProgrammablePassEncoder.h:

(WebCore::GPUProgrammablePassEncoder::setVertexBuffer): Added. Delegates to MTLCommandEncoder call.
(WebCore::GPUProgrammablePassEncoder::setFragmentBuffer): ditto.

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

(WebCore::tryCreateArgumentEncoderAndBuffer): Replace newEncoder(). Now create an ArgumentEncoderBuffer object from an array of MTLArgumentDescriptors, if able.
(WebCore::GPUBindGroupLayout::tryCreate): Refactor to support ArgumentEncoderBuffers, and allocate MTLBuffers for argument encoders.
(WebCore::GPUBindGroupLayout::GPUBindGroupLayout): Support ArgumentEncoderBuffers.
(WebCore::newEncoder): Deleted.

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

(WebCore::GPUCommandBuffer::GPUCommandBuffer):

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

(WebCore::GPUProgrammablePassEncoder::setResourceAsBufferOnEncoder): Set a buffer resource on the MTLArgumentEncoder, and call useResource on the command encoder.
(WebCore::GPUProgrammablePassEncoder::setBindGroup): Parses the bind group to assign each resource on its matching MTLArgumentEncoder.

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

(WebCore::GPURenderPassEncoder::useResource): Resolves call from GPUProgrammablePassEncoder to call on MTLRenderCommandEncoder.
(WebCore::GPURenderPassEncoder::setVertexBuffer): ditto.
(WebCore::GPURenderPassEncoder::setFragmentBuffer): ditto.

LayoutTests:

Draw 3 triangles via WebGPU to create a green square canvas, with reference.
Each vertex is stored in its own WebGPUBuffer and they are mix/matched per bind group.
This tests multiple resource bindings in one bind group as well as setting multiple
bind groups per draw call and per command encoder.

  • webgpu/buffer-resource-triangles-expected.html: Added. Reference generated using 2D canvas.
  • webgpu/buffer-resource-triangles.html: Added.

1) Draw top two triangles using two bind groups in one draw call.
2) Swap first bind group and issue second draw call to draw middle triangle.

  • webgpu/js/webgpu-functions.js:

(createBasicPipeline): Now handles new primitive topologies.

3:05 PM Changeset in webkit [240179] by dbates@webkit.org
  • 3 edits in trunk/Source/WebCore

Another attempt to fix the iOS build following <https://trac.webkit.org/changeset/240174>
(https://bugs.webkit.org/show_bug.cgi?id=193583)

Only override RenderTheme::platformFocusRingColor() when building with ENABLE(FULL_KEYBOARD_ACCESS)
enabled.

  • rendering/RenderThemeIOS.h:
  • rendering/RenderThemeIOS.mm:
3:02 PM Changeset in webkit [240178] by Chris Dumez
  • 4 edits in trunk

Regression(PSON) Content blockers are sometimes lost on back navigation cross-site
https://bugs.webkit.org/show_bug.cgi?id=193588
<rdar://problem/47131566>

Reviewed by Alex Christensen.

Source/WebKit:

When the WebPageProxy needs to create initialization parameters for its WebPage in the
WebContent process, it calls WebProcessProxy::addWebUserContentControllerProxy()
which calls WebUserContentControllerProxy::addProcess(). This last call is supposed to
register the WebProcessProxy with the WebUserContentControllerProxy and adding the
contentRuleLists to the WebPageCreationParameters. The issue is that if the
WebUserContentControllerProxy already knows about this WebProcessProxy, it would return
early and not populate the WebPageCreationParameters.

In PSON world, when navigating back to a page that failed to enter page cache, we reuse
the process where we previously loaded the page but re-create a new WebPage on the
WebContent process site. When this happens, WebUserContentControllerProxy would not
add the contentRuleLists to the WebPageCreationParameters and the new WebPage in the
previously-suspended process would be missing them.

  • UIProcess/UserContent/WebUserContentControllerProxy.cpp:

(WebKit::WebUserContentControllerProxy::addProcess):

Tools:

Add layout test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2:55 PM Changeset in webkit [240177] by dbates@webkit.org
  • 2 edits in trunk/Source/WebCore

Attempt to fix the iOS build following <https://trac.webkit.org/changeset/240174>
(https://bugs.webkit.org/show_bug.cgi?id=193583)

Namespace qualify call to getUIColorClass().

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::platformFocusRingColor const):

2:53 PM Changeset in webkit [240176] by jer.noble@apple.com
  • 39 edits
    22 adds in trunk

SDK_VARIANT build destinations should be separate from non-SDK_VARIANT builds
https://bugs.webkit.org/show_bug.cgi?id=189553

Reviewed by Tim Horton.

.:

  • Makefile.shared:

PerformanceTests:

  • MediaTime/Configurations/Base.xcconfig:
  • MediaTime/Configurations/SDKVariant.xcconfig: Added.

Source/bmalloc:

  • Configurations/Base.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.

Source/JavaScriptCore:

  • Configurations/Base.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.

Source/ThirdParty/ANGLE:

  • Configurations/Base.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.

Source/ThirdParty/libwebrtc:

  • Configurations/Base.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.

Source/WebCore:

  • Configurations/Base.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.
  • Configurations/WebCore.xcconfig:

Source/WebCore/PAL:

  • Configurations/Base.xcconfig:
  • Configurations/PAL.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.

Source/WebInspectorUI:

  • Configurations/Base.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.

Source/WebKit:

  • Configurations/Base.xcconfig:
  • Configurations/BaseTarget.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.

Source/WebKitLegacy/mac:

  • Configurations/Base.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.
  • Configurations/WebKitLegacy.xcconfig:

Source/WTF:

  • Configurations/Base.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.

Tools:

Add a check-webkit-style check that ensures all SDKVariant.xcconfig files match.

  • ContentExtensionTester/Configurations/Base.xcconfig:
  • ContentExtensionTester/Configurations/SDKVariant.xcconfig: Added.
  • DumpRenderTree/mac/Configurations/Base.xcconfig:
  • DumpRenderTree/mac/Configurations/SDKVariant.xcconfig: Added.
  • ImageDiff/cg/Configurations/Base.xcconfig:
  • ImageDiff/cg/Configurations/SDKVariant.xcconfig: Added.
  • MiniBrowser/Configurations/Base.xcconfig:
  • MiniBrowser/Configurations/SDKVariant.xcconfig: Added.
  • MobileMiniBrowser/Configurations/Base.xcconfig:
  • MobileMiniBrowser/Configurations/SDKVariant.xcconfig: Added.
  • Scripts/webkitpy/style/checker.py:

(_all_categories):
(FileType):
(CheckerDispatcher._file_type):
(CheckerDispatcher._create_checker):

  • Scripts/webkitpy/style/checkers/sdkvariant.py: Added.

(SDKVariantChecker):
(SDKVariantChecker.init):
(SDKVariantChecker.check):

  • TestWebKitAPI/Configurations/Base.xcconfig:
  • TestWebKitAPI/Configurations/SDKVariant.xcconfig: Added.
  • WebEditingTester/Configurations/Base.xcconfig:
  • WebEditingTester/Configurations/SDKVariant.xcconfig: Added.
  • WebKitLauncher/Configurations/SDKVariant.xcconfig: Added.
  • WebKitTestRunner/Configurations/Base.xcconfig:
  • WebKitTestRunner/Configurations/SDKVariant.xcconfig: Added.
  • lldb/lldbWebKitTester/Configurations/Base.xcconfig:
  • lldb/lldbWebKitTester/Configurations/SDKVariant.xcconfig: Added.
2:48 PM Changeset in webkit [240175] by keith_miller@apple.com
  • 11 edits in trunk/Source

Gigacages should start allocations from a slide
https://bugs.webkit.org/show_bug.cgi?id=193523

Reviewed by Mark Lam.

Source/bmalloc:

This patch makes it so that Gigacage Heaps slide the start of the
cage by some random amount. We still ensure that there is always
at least 4/2GB, on MacOS/iOS respectively, of VA space available
for allocation.

Also, this patch changes some macros into constants since macros
are the devil.

  • bmalloc/Gigacage.cpp:

(Gigacage::bmalloc::protectGigacageBasePtrs):
(Gigacage::bmalloc::unprotectGigacageBasePtrs):
(Gigacage::bmalloc::runwaySize):
(Gigacage::ensureGigacage):
(Gigacage::shouldBeEnabled):

  • bmalloc/Gigacage.h:

(Gigacage::name):
(Gigacage::gigacageSizeToMask):
(Gigacage::size):
(Gigacage::mask):
(Gigacage::basePtr):
(Gigacage::ensureGigacage):
(Gigacage::wasEnabled):
(Gigacage::isCaged):
(Gigacage::isEnabled):
(Gigacage::caged):
(Gigacage::disableDisablingPrimitiveGigacageIfShouldBeEnabled):
(Gigacage::canPrimitiveGigacageBeDisabled):
(Gigacage::disablePrimitiveGigacage):
(Gigacage::addPrimitiveDisableCallback):
(Gigacage::removePrimitiveDisableCallback):

  • bmalloc/Heap.cpp:

(bmalloc::Heap::Heap):

  • bmalloc/Sizes.h:

(bmalloc::Sizes::maskSizeClass):
(bmalloc::Sizes::maskObjectSize):
(bmalloc::Sizes::logSizeClass):
(bmalloc::Sizes::logObjectSize):
(bmalloc::Sizes::sizeClass):
(bmalloc::Sizes::objectSize):
(bmalloc::Sizes::pageSize):

Source/JavaScriptCore:

This patch changes some macros into constants since macros are the
devil.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::caged):

  • llint/LowLevelInterpreter64.asm:

Source/WTF:

This patch changes some macros into constants since macros are the
devil.

  • wtf/Gigacage.cpp:
  • wtf/Gigacage.h:
2:26 PM Changeset in webkit [240174] by dbates@webkit.org
  • 11 edits
    2 adds in trunk/Source/WebCore

CSS auto focus-ring outlines don't render on iOS
https://bugs.webkit.org/show_bug.cgi?id=193583
<rdar://problem/6508697>

Reviewed by Simon Fraser.

Source/WebCore:

Implement support for drawing focus rings on iOS when built with ENABLE(FULL_KEYBOARD_ACCESS)
enabled.

For now the focus ring drawing for iOS is tangled up into the Mac-specific code to draw
animated focus rings. I will fix this in <https://bugs.webkit.org/show_bug.cgi?id=193591>.

  • SourcesCocoa.txt: Add file ColorIOS.mm.
  • WebCore.xcodeproj/project.pbxproj: Add files ColorIOS.{h, mm}.
  • platform/graphics/GraphicsContext.h:
  • platform/graphics/cocoa/GraphicsContextCocoa.mm:

(WebCore::drawFocusRingAtTime):
(WebCore::GraphicsContext::drawFocusRing):
Compile focus ring drawing code when building with ENABLE(FULL_KEYBOARD_ACCESS) enabled.
This is always enabled on Mac.

  • platform/ios/ColorIOS.h: Added.
  • platform/ios/ColorIOS.mm: Added.

(WebCore::colorFromUIColor): Convert a UIColor to a WebCore::Color.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::paintFocusRing):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::paintAreaElementFocusRing):
Compile focus ring drawing code when building with ENABLE(FULL_KEYBOARD_ACCESS) enabled.
This is always enabled on Mac.

  • rendering/RenderThemeIOS.h:
  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::platformFocusRingColor const): Implement this override for iOS.
(WebCore::RenderThemeIOS::supportsFocusRing const): Implement this override for iOS to always
return false - the iOS theme code does not support painting focus rings. By returning false we
will use the platform-independent, non-theme code path to draw focus rings.

Source/WebCore/PAL:

Forward declare some IPI.

  • pal/spi/ios/UIKitSPI.h:
2:21 PM Changeset in webkit [240173] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

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

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.prototype.get supportsSave):
(WI.NetworkTableContentView.prototype._HARResources):

1:33 PM Changeset in webkit [240172] by Kocsen Chung
  • 1 copy in tags/Safari-607.1.25

Tag Safari-607.1.25.

1:32 PM Changeset in webkit [240171] by Matt Lewis
  • 10 edits in trunk/Source

Unreviewed, rolling out r240160.

This broke multiple internal builds.

Reverted changeset:

"Gigacages should start allocations from a slide"
https://bugs.webkit.org/show_bug.cgi?id=193523
https://trac.webkit.org/changeset/240160

1:30 PM Changeset in webkit [240170] by Kocsen Chung
  • 2 edits in branches/safari-607-branch

Cherry-pick r240118. rdar://problem/47394122

[Win] gperf command not found
https://bugs.webkit.org/show_bug.cgi?id=193538
<rdar://problem/47250549>

Reviewed by Brent Fulgham.

CMake only searches for gperf if ENABLE_WEBCORE is on. ENABLE_WEBCORE needs to be set to ON.

  • Source/cmake/OptionsAppleWin.cmake:

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

1:16 PM Changeset in webkit [240169] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

Follow-up: Switch remaining UIKit soft-linking in WebCore, WebKitLegacy over to UIKitSoftLink.{cpp,h}
<https://webkit.org/b/193568>
<rdar://problem/47381130>

  • editing/cocoa/DictionaryLookup.mm:

(-[WebRevealHighlight drawHighlightContentForItem:context:]):
Fix the build by changing getUIApplicationClass() to
PAL::getUIApplicationClass().

12:41 PM Changeset in webkit [240168] by ddkilzer@apple.com
  • 30 edits in trunk

Switch remaining UIKit soft-linking in WebCore, WebKitLegacy over to UIKitSoftLink.{cpp,h}
<https://webkit.org/b/193568>
<rdar://problem/47381130>

Reviewed by Alex Christensen.

Source/WebCore:

This does the following:

  • Removes local soft-linking of UIKit.
  • Switches to using PAL functions for soft-linking.
  • SourcesCocoa.txt: Add 4 source files to UnifiedSources.
  • WebCore.xcodeproj/project.pbxproj: Remove 4 sources files

from WebCore target now that they are in UnifiedSources.

  • editing/cocoa/DictionaryLookup.mm:
  • editing/cocoa/HTMLConverter.mm: Move SPI to UIKitSPI.h. Remove

declarations in public headers.
(_fontForNameAndSize): Change use of getUIFontClass() to
PlatformFontClass.
(HTMLConverter::_processElement): Add cast here since compiler
finds the wrong selector for +clearColor and thinks it returns a
CIColor * object. The same cast already exists in
VideoFullscreenInterfaceAVKit.mm.

  • page/cocoa/SettingsBaseCocoa.mm:

(WebCore::SettingsBase::defaultTextAutosizingEnabled):

  • platform/audio/ios/MediaSessionManagerIOS.mm:

(-[WebMediaSessionHelper initWithCallback:]):

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

(WebCore::exernalDeviceDisplayNameForPlayer):

  • platform/graphics/cocoa/FontCascadeCocoa.mm:

(WebCore::showLetterpressedGlyphsWithAdvances):

  • platform/ios/DragImageIOS.mm:

(WebCore::scaleDragImage):
(WebCore::createDragImageFromImage):
(WebCore::cascadeForSystemFont):
(WebCore::createDragImageForLink):
(WebCore::createDragImageForSelection):
(WebCore::createDragImageForRange):
(WebCore::createDragImageForColor):

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::PlatformPasteboard):
(WebCore::PlatformPasteboard::color):
(WebCore::registerItemToPasteboard):
(WebCore::PlatformPasteboard::setColor):

  • platform/ios/ThemeIOS.mm:

(WebCore::ThemeIOS::userPrefersReducedMotion const):

  • platform/ios/UserAgentIOS.mm:

(WebCore::isClassic):
(WebCore::isClassicPad):
(WebCore::isClassicPhone):

  • platform/ios/ValidationBubbleIOS.mm:

(-[WebValidationBubbleTapRecognizer initWithPopoverController:]):
(WebCore::ValidationBubble::ValidationBubble):
(WebCore::ValidationBubble::show):
(WebCore::fallbackViewController):

  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(clearUIColor):
(allocWebAVPictureInPicturePlayerLayerViewInstance):
(WebAVPlayerLayerView_videoView):
(fallbackViewController):
(VideoFullscreenInterfaceAVKit::doSetup):

  • platform/ios/WebEvent.mm:

(+[WebEvent modifierFlags]):

  • platform/ios/WebItemProviderPasteboard.mm:

(allLoadableClasses):

  • platform/ios/WebVideoFullscreenControllerAVKit.mm:

(VideoFullscreenControllerContext::setUpFullscreen):

  • platform/network/mac/WebCoreURLResponse.mm: Add missing header

after unified sources were updated.

  • rendering/RenderThemeIOS.mm:

(WebCore::contentSizeCategoryDidChange):
(WebCore::RenderThemeIOS::RenderThemeIOS):
(WebCore::RenderThemeIOS::contentSizeCategory):
(WebCore::RenderThemeIOS::systemColor const):
(WebCore::attachmentActionColor):
(WebCore::attachmentTitleColor):
(WebCore::attachmentSubtitleColor):
(WebCore::iconForAttachment):

  • testing/Internals.mm:

(WebCore::Internals::userPrefersReducedMotion const):

Source/WebCore/PAL:

  • pal/ios/UIKitSoftLink.h:
  • pal/ios/UIKitSoftLink.mm:
  • Add constants, classes and functions that were previously soft-linked in separate source files.
  • UIAccessibilityAnnouncementNotification is declared as a variable because this constant is not marked as const in UIKit.
  • pal/spi/ios/UIKitSPI.h:
  • Move SPI declarations from HTMLConverter.mm to here.

Source/WebKitLegacy/mac:

  • WebView/WebView.mm:
  • Remove unused soft-linking macros.

(-[WebUITextIndicatorData initWithImage:textIndicatorData:scale:]):
(-[WebUITextIndicatorData initWithImage:scale:]):

  • Update to use exported PAL functions.

Tools:

Make sure no one re-introduces UIKit soft-linking by adding a
style rule.

  • Scripts/webkitpy/style/checkers/cpp.py:

(check_language): Add softlink/uikit check.
(CppChecker): Enable softlink/uikit check.

  • Scripts/webkitpy/style/checkers/cpp_unittest.py:

(CppStyleTest): Add test for softlink/uikit.

12:39 PM Changeset in webkit [240167] by commit-queue@webkit.org
  • 24 edits in trunk/Websites/bugs.webkit.org

Update Bugzilla running on bugs.webkit.org and bugs.webkit-uat.org to version 5.0.4
https://bugs.webkit.org/show_bug.cgi?id=193477
<rdar://problem/37618737>

Patch by Ling Ho <lingho@apple.com> on 2019-01-18
Reviewed by Lucas Forschler.

  • Bugzilla/Config.pm:

(write_params):
(read_param_file):

  • Bugzilla/Constants.pm:
  • Bugzilla/DB/Sqlite.pm:

(sql_date_format):

  • Bugzilla/Install/Filesystem.pm:

(update_filesystem):
(_update_old_mining_filenames):

  • Bugzilla/Install/Requirements.pm:

(REQUIRED_MODULES):

  • Bugzilla/JobQueue.pm:

(subprocess_worker):
(kill_worker):

  • Bugzilla/Migrate.pm:

(parse_date):

  • Bugzilla/Template.pm:

(_concatenate_css):
(_concatenate_js):

  • Bugzilla/Util.pm:

(read_text):
(write_text):
(datetime_from):

  • contrib/jb2bz.py:

(process_reply_file):
(maybe_add_attachment):
(process_text_plain):
(process_multi_part):
(process_jitterbug):
(process_mime_body): Deleted.

  • docs/en/rst/conf.py:
  • docs/en/rst/installing/linux.rst:
  • docs/en/rst/installing/mac-os-x.rst:
  • docs/en/rst/installing/migrating-from-2.inc.rst:
  • docs/en/rst/installing/migrating.rst:
  • docs/en/rst/installing/quick-start.rst:
  • docs/en/rst/installing/upgrading-with-git.rst:
  • docs/en/rst/installing/windows.rst:
  • docs/en/rst/integrating/extensions.rst:
  • docs/en/rst/integrating/skins.rst:
  • editflagtypes.cgi:

(get_products_and_components):

  • taskgraph.json:
  • template/en/default/pages/release-notes.html.tmpl:
12:39 PM Changeset in webkit [240166] by timothy_horton@apple.com
  • 8 edits
    2 deletes in branches/safari-607-branch/Source/WebKit

REGRESSION (r236935): Holding down arrow key does not cause repeated DOM keydown events on device
https://bugs.webkit.org/show_bug.cgi?id=191408
<rdar://problem/45895135>

Rubber-stamped by Simon Fraser.

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

(-[WKWebView _scrollByContentOffset:]):

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

(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView scrollViewWillStartPanOrPinchGesture]):
(-[WKContentView canPerformActionForWebView:withSender:]):
(-[WKContentView keyCommands]):
(-[WKContentView _arrowKeyForWebView:]):
(-[WKContentView _didHandleKeyEvent:eventWasHandled:]):
(-[WKContentView _scrollOffsetForEvent:]):
(-[WKContentView _interpretKeyEvent:isCharEvent:]):
(-[WKContentView isScrollableForKeyboardScrollViewAnimator:]): Deleted.
(-[WKContentView keyboardScrollViewAnimator:distanceForIncrement:]): Deleted.
(-[WKContentView keyboardScrollViewAnimatorWillScroll:]): Deleted.
(-[WKContentView keyboardScrollViewAnimatorDidFinishScrolling:]): Deleted.

  • UIProcess/ios/WKKeyboardScrollingAnimator.h: Removed.
  • UIProcess/ios/WKKeyboardScrollingAnimator.mm: Removed.
  • UIProcess/ios/WKPDFView.mm:

(-[WKPDFView dealloc]):
(-[WKPDFView web_handleKeyEvent:]):
(-[WKPDFView web_initWithFrame:webView:mimeType:]):

  • WebKit.xcodeproj/project.pbxproj:

Revert WKKeyboardScrollingAnimator.

12:38 PM Changeset in webkit [240165] by jdiggs@igalia.com
  • 2 edits in trunk/Tools

[GTK] install-dependencies tool looks for libunistring-dev for dnf
https://bugs.webkit.org/show_bug.cgi?id=193584

Change "-dev" to "-devel".

Reviewed by Michael Catanzaro.

  • gtk/install-dependencies:
12:28 PM Changeset in webkit [240164] by Michael Catanzaro
  • 5 edits in releases/WebKitGTK/webkit-2.22

Merge r240158 - FetchResponse::url should return the empty string for tainted responses
https://bugs.webkit.org/show_bug.cgi?id=193553

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/fetch/api/basic/mode-no-cors.sub.any.js:

(fetchNoCors):

Source/WebCore:

Check whether the response is tainted in FetchResponse::url, to match
the behavior described in https://fetch.spec.whatwg.org/#concept-filtered-response-opaque.

  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::url const):

LayoutTests:

  • http/wpt/fetch/response-opaque-clone.html:
12:12 PM Changeset in webkit [240163] by Jonathan Bedard
  • 4 edits in trunk/Tools

webkitpy: Add iPhone and iPad ports
https://bugs.webkit.org/show_bug.cgi?id=193537
<rdar://problem/47353390>

Reviewed by Lucas Forschler.

Add --iphone-simulator and --ipad-simulator commands to run-webkit-tests which separate iPhone and iPad into separate
ports. Note that this separation is optional, the --ios-simulator command remains.

  • Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:

(RunTest.test_device_type_test_division): Drive-by fix.
(RunTest.test_device_type_specific_listing): Ditto.
(RunTest.test_ipad_test_division):
(RunTest):
(RunTest.test_ipad_listing):

  • Scripts/webkitpy/port/factory.py:

(platform_options): Add --iphone-simulator and --ipad-simulator flags.
(PortFactory):

  • Scripts/webkitpy/port/ios_simulator.py:

(IPhoneSimulatorPort):
(IPadSimulatorPort):

12:07 PM Changeset in webkit [240162] by Antti Koivisto
  • 12 edits
    2 adds in trunk

Implement asynchronous frame scrolling for iOS
https://bugs.webkit.org/show_bug.cgi?id=193539
<rdar://problem/47379873>

Reviewed by Simon Fraser.

Source/WebCore:

This patch implements UIScrollView based frame scrolling on iOS, enabled by the "Async Frame Scrolling"
internal setting (still off by default).

  • page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:

(WebCore::ScrollingTreeFrameScrollingNodeIOS::scrollLayer const): Deleted.

  • page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:

(WebCore::ScrollingTreeFrameScrollingNodeIOS::setScrollPosition):

Export ScrollingTreeFrameScrollingNodeIOS.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::visibleRectForLayerFlushing const):
(WebCore::RenderLayerCompositor::frameViewDidChangeSize):
(WebCore::RenderLayerCompositor::updateScrollLayerClipping):

If we don't have a separate clip layer, just resize and position the scroll layer.

(WebCore::RenderLayerCompositor::updateRootLayerPosition):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
(WebCore::RenderLayerCompositor::ensureRootLayer):

Use GraphicsLayer::Type::Scrolling as the scroll layer type when async frame scrolling is enabled.
Don't create a separate clip layer since the scroll layer will handle clipping.

  • rendering/RenderLayerCompositor.h:

Source/WebKit:

Add a scrolling node type that can handle UIScrollView backed frames.
It basically just instantiates and forwards to the existing ScrollingTreeScrollingNodeDelegateIOS.

  • UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:

(WebKit::RemoteScrollingTree::createScrollingTreeNode):

  • UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:

(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):

  • UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.h: Added.
  • UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm: Added.

(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::create):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::ScrollingTreeFrameScrollingNodeRemoteIOS):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::~ScrollingTreeFrameScrollingNodeRemoteIOS):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateBeforeChildren):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateAfterChildren):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::updateLayersAfterAncestorChange):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::scrollPosition const):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::setScrollLayerPosition):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::updateLayersAfterDelegatedScroll):

  • WebKit.xcodeproj/project.pbxproj:

LayoutTests:

  • platform/ios-wk2/compositing/tiling/tiled-drawing-async-frame-scrolling-expected.txt:
11:47 AM Changeset in webkit [240161] by Chris Dumez
  • 9 edits in trunk

Regression(PSON) Scroll position is not always restored properly when navigating back
https://bugs.webkit.org/show_bug.cgi?id=193578
<rdar://problem/47386331>

Reviewed by Tim Horton.

Source/WebKit:

Fix issues causing the scroll position to not be restored at all (or incorrectly) when
navigating back cross-site with PSON enabled. Also make sure that the swipe gesture
snapshot really stays up until we've restored the scroll position.

Note that even after those changes, I can still sometimes reproduce a white flash when
swiping back to Google search results (scroll position being correct now). This is
tracked by <rdar://problem/47071684> and happens even if I disable PSON entirely.

  • Shared/SessionState.cpp:

(WebKit::FrameState::encode const):
(WebKit::FrameState::decode):

  • Shared/SessionState.h:
  • WebProcess/WebCoreSupport/SessionStateConversion.cpp:

(WebKit::toFrameState):
(WebKit::applyFrameState):
obscuredInsets is present on the HistoryItem in the WebProcess but was never passed to
or stored by the UIProcess on the WebBackForwardListItem. obscuredInsets is needed to
properly restore the scrollPosition (position was 70px off on my iPad without this).
With PSON enabled, if you swipe back cross-process and the previous page was not put
into PageCache, then the HistoryItem is gone on the WebProcess side. What happens is
that the UIProcess sends its WebBackForwardListItem to the WebProcess, which restores
the HistoryItem there, and then asks it to load it. The obscuredInsets was getting lost
in the process since the UIProcess never knew about it.

  • UIProcess/Cocoa/ViewGestureController.cpp:

(WebKit::ViewGestureController::didReachMainFrameLoadTerminalState):
Drop logic that was causing the ViewGestureController to not wait for the scroll position
to be restored before taking down the snapshot, when UI-side compositing is enabled.
If you look at the comment above the code, you'll see that the code in question was meant
to impact only the non-UI side compositing code path. As a matter of fact, when the code
was reviewed at https://bugs.webkit.org/show_bug.cgi?id=151224, it was protected by a
#if PLATFORM(MAC), before getting modified the wrong way before landing. In practice, we
would have often restored the scroll position by the time the load is finished so it would
not cause a flash in most cases. However, with PSON enabled and the layer tree freezing we
do on process-swap, the first post-scroll restoration layer tree commit may now occur a
little bit later and we would lose the race more often.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::updateBackForwardItem):

  • UIProcess/WebProcessProxy.h:

When adding PageCache support to PSON, we used to navigate the "suspended" page to
about:blank. This would lead to unwanted WebProcessProxy::updateBackForwardItem()
calls from the WebProcess which we wanted to ignore. We thus added logic to ignore
updateBackForwardItem() IPC from the old WebProcess after a swap. The issue with this
is that we sometimes miss/ignore legit updates to the HistoryItem from the old process,
in particular with regards to the scroll position and the pageScaleFactor. So if you
swiped and then quickly enough did a cross-site navigation, the UIProcess'
WebBackForwardList would not get updated with the latest scroll position and we would
thus fail to restore it later on. To address the issue, we now stop ignoring updates
from the old WebProcess after a swap. This logic is no longer needed since we no longer
navigate the old page to about:blank after a swap, we merely suspend it "in place".

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
11:38 AM Changeset in webkit [240160] by keith_miller@apple.com
  • 10 edits in trunk/Source

Gigacages should start allocations from a slide
https://bugs.webkit.org/show_bug.cgi?id=193523

Reviewed by Mark Lam.

Source/bmalloc:

This patch makes it so that Gigacage Heaps slide the start of the
cage by some random amount. We still ensure that there is always
at least 4/2GB, on MacOS/iOS respectively, of VA space available
for allocation.

Also, this patch changes some macros into constants since macros
are the devil.

  • bmalloc/Gigacage.cpp:

(Gigacage::bmalloc::protectGigacageBasePtrs):
(Gigacage::bmalloc::unprotectGigacageBasePtrs):
(Gigacage::bmalloc::runwaySize):
(Gigacage::ensureGigacage):
(Gigacage::shouldBeEnabled):

  • bmalloc/Gigacage.h:

(Gigacage::name):
(Gigacage::gigacageSizeToMask):
(Gigacage::size):
(Gigacage::mask):
(Gigacage::basePtr):
(Gigacage::ensureGigacage):
(Gigacage::wasEnabled):
(Gigacage::isCaged):
(Gigacage::caged):
(Gigacage::disableDisablingPrimitiveGigacageIfShouldBeEnabled):
(Gigacage::disablePrimitiveGigacage):
(Gigacage::addPrimitiveDisableCallback):
(Gigacage::removePrimitiveDisableCallback):

  • bmalloc/Heap.cpp:

(bmalloc::Heap::Heap):

  • bmalloc/Sizes.h:

(bmalloc::Sizes::maskSizeClass):
(bmalloc::Sizes::maskObjectSize):
(bmalloc::Sizes::logSizeClass):
(bmalloc::Sizes::logObjectSize):
(bmalloc::Sizes::sizeClass):
(bmalloc::Sizes::objectSize):
(bmalloc::Sizes::pageSize):

Source/JavaScriptCore:

This patch changes some macros into constants since macros are the
devil.

  • llint/LowLevelInterpreter64.asm:

Source/WTF:

This patch changes some macros into constants since macros are the
devil.

  • wtf/Gigacage.cpp:
  • wtf/Gigacage.h:
11:10 AM Changeset in webkit [240159] by Wenson Hsieh
  • 4 edits in trunk/Source/WebKit

Remove some last vestiges of assisted node terminology in WebKit
https://bugs.webkit.org/show_bug.cgi?id=193572

Reviewed by Tim Horton.

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

(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
(-[WKContentView _showKeyboard]):
(-[WKContentView _hideKeyboard]):

Add a FIXME about invoking -reloadInputViews on watchOS when the focused element is blurred.

(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
(-[WKContentView _elementDidBlur]):
(-[WKContentView updateCurrentFocusedElementInformation:]):
(-[WKContentView _startAssistingKeyboard]): Deleted.
(-[WKContentView _stopAssistingKeyboard]): Deleted.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::getFocusedElementInformation):

10:44 AM Changeset in webkit [240158] by ajuma@chromium.org
  • 6 edits in trunk

FetchResponse::url should return the empty string for tainted responses
https://bugs.webkit.org/show_bug.cgi?id=193553

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/fetch/api/basic/mode-no-cors.sub.any.js:

(fetchNoCors):

Source/WebCore:

Check whether the response is tainted in FetchResponse::url, to match
the behavior described in https://fetch.spec.whatwg.org/#concept-filtered-response-opaque.

  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::url const):

LayoutTests:

  • http/wpt/fetch/response-opaque-clone.html:
10:37 AM Changeset in webkit [240157] by Jonathan Bedard
  • 1 edit
    1 delete in trunk/LayoutTests

webkitpy: Implement device type specific expected results (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=192162
<rdar://problem/46345449>

Unreviewed test gardening.

  • tiled-drawing/ios/iphone7: Removed.
10:19 AM Changeset in webkit [240156] by youenn@apple.com
  • 19 edits
    4 copies in trunk

Add a new SPI to request for cache storage quota increase
https://bugs.webkit.org/show_bug.cgi?id=193323

Reviewed by Alex Christensen.

Source/WebKit:

Add a delegate on the WebSiteDataStore for WebKit to ask for quota update.
The current SPI is currently CacheStorage specific but future work should
make it so that other storage like IDB use the same mechanism.
By default, quota remains unchanged if delegate is not implemented.

  • NetworkProcess/NetworkProcess.cpp:
  • UIProcess/API/Cocoa/WKStorageQuotaDelegatePrivate.h: Added.
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(WebsiteDataStoreQuotaManager::WebsiteDataStoreQuotaManager):
(-[WKWebsiteDataStore _quotaDelegate]):
(-[WKWebsiteDataStore set_quotaDelegate:]):

  • UIProcess/API/Cocoa/WKWebsiteDataStoreInternal.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::requestCacheStorageSpace):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::WebsiteDataStore):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

(WebKit::WebsiteDataStore::quotaManager):
(WebKit::WebsiteDataStore::setQuotaManager):

  • UIProcess/WebsiteData/WebsiteDataStoreQuotaManager.h: Added.

(WebKit::WebsiteDataStoreQuotaManager::~WebsiteDataStoreQuotaManager):
(WebKit::WebsiteDataStoreQuotaManager::requestCacheStorageSpace):

  • WebKit.xcodeproj/project.pbxproj:

Tools:

Implement WebsiteDataStore quota delegate to handle quota requests.
By default, do not update quota.
Update quota if test calls the new testRunner.allowCacheStorageQuotaIncrease method.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::allowCacheStorageQuotaIncrease):

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

(WTR::TestController::allowCacheStorageQuotaIncrease):

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

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(-[CacheStorageQuotaManager init]):
(-[CacheStorageQuotaManager _requestCacheStorageSpace:frameOrigin:quota:currentSize:spaceRequired:decisionHandler:]):
(WTR::initializeWebViewConfiguration):
(WTR::TestController::cocoaResetStateToConsistentValues):
(WTR::TestController::allowCacheStorageQuotaIncrease):

LayoutTests:

Use new testRunner method to bump the cache quota and verify adding a
cache entry works when bumping the cache quota.

  • http/wpt/cache-storage/cache-quota.any.js:

(promise_test):

10:16 AM Changeset in webkit [240155] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] Pass owner to the triggered builds
https://bugs.webkit.org/show_bug.cgi?id=193574

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/factories.py:

(BuildFactory.propertiesToPassToTriggers):

10:14 AM Changeset in webkit [240154] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-app] Send patch author as a build property
https://bugs.webkit.org/show_bug.cgi?id=193560

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-app/ews/fetcher.py:

(BugzillaPatchFetcher.fetch):

9:54 AM Changeset in webkit [240153] by Jonathan Bedard
  • 2 edits in trunk/Tools

webkitpy: Implement device type specific expected results (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=192162
<rdar://problem/46345449>

Unreviewed infrastructure fix.

  • Scripts/webkitpy/layout_tests/controllers/manager.py:

(Manager.run): Don't boot a device if no tests are available to run on it.

9:19 AM Changeset in webkit [240152] by youenn@apple.com
  • 5 edits
    2 adds in trunk

A track source should be unmuted whenever reenabled after setDirection changes
https://bugs.webkit.org/show_bug.cgi?id=193554
<rdar://problem/47366196>

Reviewed by Eric Carlson.

Source/WebCore:

Ensure that track gets unmuted after being fired as part of track event.
Test is triggering some existing issues with MediaPlayerPrivateMediaStreamAVFObjC.
Given the enqueuing of samples happens in a different frame than the thread used to update media stream and the active video track,
some enqueued samples might not be from the right active video track or there might be no active video track.

Test: webrtc/video-setDirection.html

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::fireTrackEvent):

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::requestNotificationWhenReadyForVideoData):

LayoutTests:

  • webrtc/video-setDirection-expected.txt: Added.
  • webrtc/video-setDirection.html: Added.
8:54 AM Changeset in webkit [240151] by Jonathan Bedard
  • 2 edits in trunk/Tools

webkitpy: Implement device type specific expected results (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=192162
<rdar://problem/46345449>

Unreviewed infrastructure fix.

  • Scripts/webkitpy/api_tests/manager.py:

(Manager._initialize_devices): Use DEVICE_TYPE when running API tests.

8:37 AM Changeset in webkit [240150] by Jonathan Bedard
  • 24 edits
    62 adds
    43 deletes in trunk

webkitpy: Implement device type specific expected results (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=192162
<rdar://problem/46345449>

Rubber-stamped by Aakash Jain.

Tools:

This change uses device_type to select a different set of TestExpectation files based on the type of device running
tests. This requires multiple baseline search paths to be used in a single instantiation of run-webkit-tests. Note
that while multiple baseline search paths are used, any single test will only ever be run on a single device type.

  • Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py:

(LayoutTestFinder.find_tests): Pass device_type through.

  • Scripts/webkitpy/layout_tests/controllers/layout_test_finder_unittest.py:

(LayoutTestFinderTests.test_touched_but_skipped_test): Allow device_type to be passed in.

  • Scripts/webkitpy/layout_tests/controllers/manager.py:

(Manager.init): Make _expectations an OrderedDict indexed by device_type, add current_device_type.
(Manager._collect_tests): Pass device type to test finder.
(Manager._needs_web_platform_test):
(Manager._prepare_lists): Index _expectations by device type.
(Manager._test_input_for_file):
(Manager._test_is_slow): Ditto.
(Manager._test_should_dump_jsconsolelog_in_stderr):
(Manager._test_should_dump_jsconsolelog_in_stderr): Ditto.
(Manager._get_test_inputs):
(Manager._update_worker_count):
(Manager._set_up_run): Use current_device_type instead of passing device_type in.
(Manager.run): Re-write function to gather and parse expectations from multiple baseline search paths. In the event
that a test can be run on multiple device types, the first device in the device type list which is eligible will be
the one which runs the test.
(Manager._run_test_subset):
(Manager._run_tests): Index _expectations by current_device_type.
(Manager._print_expectation_line_for_test): Ditto.
(Manager._print_expectations_for_subset): Ditto.
(Manager.print_expectations): Re-write function to gather and parse expectations from multiple baseline search paths.
Unlike run, this function will behave the same regardless of what devices are available.
(Manager._custom_device_for_test): Deleted.

  • Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:

(ManagerTest.test_uses_custom_device): Deleted.
(ManagerTest.test_uses_custom_device.get_manager): Deleted.

  • Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py:

(JSONLayoutResultsGenerator.init): Pass expectations as a dictionary indexed by device type.
(JSONLayoutResultsGenerator._insert_failure_summaries): The number of fixable tests must take into consideration
all of the expectations.

  • Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py:

(FakePort.skipped_layout_tests): Allow device_type to be passed in.

  • Scripts/webkitpy/layout_tests/models/test_expectations.py:

(TestExpectations.init): Allow device_type to be passed through.
(TestExpectations.parse_all_expectations): Pick expectations_dict by device type.

  • Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py: Allow device_type to be passed in.
  • Scripts/webkitpy/layout_tests/models/test_run_results.py:

(summarize_results):

  • Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py:

(summarized_results): Expectations are stored in a dictionary indexed by device_type. When determining the expectation
a test ran with, one must check all expectations to find the first non-skip expectation.

  • Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:

(RunTest.test_device_type_test_division):
(RunTest):
(RunTest.test_device_type_specific_listing):

  • Scripts/webkitpy/port/base.py:

(Port): Add default values for DEVICE_TYPE and DEFAULT_DEVICE_TYPES.
(Port.supported_device_types): The result of this function will change based on what devices are available.

  • Scripts/webkitpy/port/device_port.py:

(DevicePort._device_type_with_version): Replace DEFAULT_DEVICE_TYPE with DEVICE_TYPE.
(DevicePort.default_child_processes): DEVICE_TYPE is a general type, so the built-in comparison of the DeviceType object
can be used.
(DevicePort.supported_device_types): Generates a list of device types determined by the available devices, if there are
any, or the DEFAULT_DEVICE_TYPES of the port.

  • Scripts/webkitpy/port/ios.py:

(IOSPort): Change DEFAULT_DEVICE_TYPE to DEVICE_TYPE.

  • Scripts/webkitpy/port/ios_simulator.py:

(IOSSimulatorPort): Set the DEFAULT_DEVICE_TYPES to the devices currently used to run layout tests.

  • Scripts/webkitpy/port/watch.py:

(WatchPort): Change DEFAULT_DEVICE_TYPE to DEVICE_TYPE.

  • Scripts/webkitpy/port/watch_simulator.py:

(WatchSimulatorPort): Set the DEFAULT_DEVICE_TYPES to the device currently used to run layout tests.

  • Scripts/webkitpy/xcode/device_type.py:

(DeviceType):
(DeviceType.hash): Allow DeviceType to be used as a dictionary index.

LayoutTests:

Move iPad and iPhone 7 tests to their respective platform specific directories.

  • TestExpectations:
  • fast/events/touch/ios/iphone7: Removed.
  • fast/forms/ios/ipad: Removed.
  • fast/text-autosizing/ios/ipad: Removed.
  • fast/viewport/ios/ipad: Removed.
  • media/controls/ipad: Removed.
  • media/modern-media-controls/media-documents/ipad: Removed.
  • media/modern-media-controls/pip-support/ipad: Removed.
  • platform/ios-wk1/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/ipad: Added.
  • platform/ipad/fast: Added.
  • platform/ipad/fast/forms: Added.
  • platform/ipad/fast/forms/choose-select-option-expected.txt: Added.
  • platform/ipad/fast/forms/choose-select-option.html: Added.
  • platform/ipad/fast/forms/focus-input-via-button-expected.txt: Added.
  • platform/ipad/fast/forms/focus-input-via-button.html: Added.
  • platform/ipad/fast/forms/multiple-select-updates-renderer-expected.txt: Added.
  • platform/ipad/fast/forms/multiple-select-updates-renderer.html: Added.
  • platform/ipad/fast/forms/select-form-run-twice-expected.txt: Added.
  • platform/ipad/fast/forms/select-form-run-twice.html: Added.
  • platform/ipad/fast/forms/select-with-title-expected.txt: Added.
  • platform/ipad/fast/forms/select-with-title.html: Added.
  • platform/ipad/fast/forms/unfocus-inside-fixed-hittest-expected.txt: Added.
  • platform/ipad/fast/forms/unfocus-inside-fixed-hittest.html: Added.
  • platform/ipad/fast/text-autosizing: Added.
  • platform/ipad/fast/text-autosizing/programmatic-text-size-adjust-expected.txt: Added.
  • platform/ipad/fast/text-autosizing/programmatic-text-size-adjust.html: Added.
  • platform/ipad/fast/text-autosizing/text-size-adjust-inline-style-expected.html: Added.
  • platform/ipad/fast/text-autosizing/text-size-adjust-inline-style.html: Added.
  • platform/ipad/fast/viewport: Added.
  • platform/ipad/fast/viewport/empty-meta-expected.txt: Added.
  • platform/ipad/fast/viewport/empty-meta.html: Added.
  • platform/ipad/fast/viewport/meta-viewport-ignored-expected.txt: Added.
  • platform/ipad/fast/viewport/meta-viewport-ignored.html: Added.
  • platform/ipad/fast/viewport/viewport-overriden-by-minimum-effective-width-if-ignore-meta-viewport-expected.txt: Added.
  • platform/ipad/fast/viewport/viewport-overriden-by-minimum-effective-width-if-ignore-meta-viewport.html: Added.
  • platform/ipad/fast/viewport/viewport-unchanged-by-minimum-effective-width-if-not-ignore-meta-viewport-expected.txt: Added.
  • platform/ipad/fast/viewport/viewport-unchanged-by-minimum-effective-width-if-not-ignore-meta-viewport.html: Added.
  • platform/ipad/fast/viewport/width-is-device-width-expected.txt: Added.
  • platform/ipad/fast/viewport/width-is-device-width.html: Added.
  • platform/ipad/media: Added.
  • platform/ipad/media/controls: Added.
  • platform/ipad/media/controls/close-page-with-picture-in-picture-video-assertion-failure-expected.txt: Added.
  • platform/ipad/media/controls/close-page-with-picture-in-picture-video-assertion-failure.html: Added.
  • platform/ipad/media/controls/resources: Added.
  • platform/ipad/media/controls/resources/picture-in-picture.html: Added.
  • platform/ipad/media/modern-media-controls: Added.
  • platform/ipad/media/modern-media-controls/media-documents: Added.
  • platform/ipad/media/modern-media-controls/media-documents/media-document-audio-ios-sizing-expected.txt: Added.
  • platform/ipad/media/modern-media-controls/media-documents/media-document-audio-ios-sizing.html: Added.
  • platform/ipad/media/modern-media-controls/media-documents/media-document-video-ios-sizing-expected.txt: Added.
  • platform/ipad/media/modern-media-controls/media-documents/media-document-video-ios-sizing.html: Added.
  • platform/ipad/media/modern-media-controls/pip-support: Added.
  • platform/ipad/media/modern-media-controls/pip-support/pip-support-enabled-expected.txt: Added.
  • platform/ipad/media/modern-media-controls/pip-support/pip-support-enabled.html: Added.
  • platform/ipad/media/modern-media-controls/pip-support/pip-support-tap-expected.txt: Added.
  • platform/ipad/media/modern-media-controls/pip-support/pip-support-tap.html: Added.
  • platform/iphone-7: Added.
  • platform/iphone-7/fast: Added.
  • platform/iphone-7/fast/events: Added.
  • platform/iphone-7/fast/events/touch: Added.
  • platform/iphone-7/fast/events/touch/force-press-event-expected.txt: Added.
  • platform/iphone-7/fast/events/touch/force-press-event.html: Added.
  • platform/iphone-7/fast/events/touch/force-press-on-link-expected.txt: Added.
  • platform/iphone-7/fast/events/touch/force-press-on-link.html: Added.
  • platform/iphone-7/fast/events/touch/prevent-default-touchmove-prevents-scrolling-expected.txt: Added.
  • platform/iphone-7/fast/events/touch/prevent-default-touchmove-prevents-scrolling.html: Added.
  • platform/iphone-7/tiled-drawing: Added.
  • platform/iphone-7/tiled-drawing/compositing-layers-deep-color-expected.txt: Added.
  • platform/iphone-7/tiled-drawing/compositing-layers-deep-color.html: Added.
  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
  • tiled-drawing/ios: Removed.
8:12 AM Changeset in webkit [240149] by Philippe Normand
  • 2 edits in trunk/Tools

[WPE] run-qt-wpe-minibrowser needlessly expects a --wpe argument
https://bugs.webkit.org/show_bug.cgi?id=193575

Reviewed by Michael Catanzaro.

Allow the script to run without explicit port argument because
it's specific to the WPE port anyway.

  • Scripts/run-qt-wpe-minibrowser: Manually insert --wpe in argv

and simplify the rest of the code accordingly.

7:59 AM Changeset in webkit [240148] by cturner@igalia.com
  • 11 edits in trunk

[GStreamer][EME][ClearKey] Request keys from CDMInstance rather than passing via bus messages
https://bugs.webkit.org/show_bug.cgi?id=192229

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Covered by existing tests.

  • platform/encryptedmedia/clearkey/CDMClearKey.cpp:

(WebCore::parseLicenseFormat): There is a defect in some C++11
compiles where they will copy this return value since the type
doesn't exactly match. Force a move with WTFMove.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::dispatchDecryptionKey):
Deleted. No longer used by anything.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: Ditto.
  • platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:

Rename these methods to avoid "namespacing names".
(webkit_media_clear_key_decrypt_class_init):
(finalize):
(handleKeyResponse): This is a temporary fix, we need some more
reorganisation to be full driven by CDMInstance APIs for decryption.
(findAndSetKey):
(decrypt):
(webKitMediaClearKeyDecryptorFinalize): Deleted.
(webKitMediaClearKeyDecryptorHandleKeyResponse): Deleted.
(webKitMediaClearKeyDecryptorFindAndSetKey): Deleted.
(webKitMediaClearKeyDecryptorDecrypt): Deleted.

  • platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp: Ditto.

(webkit_media_common_encryption_decrypt_class_init):
(finalize):
(transformCaps):
(transformInPlace):
(isCDMInstanceAvailable):
(sinkEventHandler):
(queryHandler):
(changeState):
(setContext):
(webKitMediaCommonEncryptionDecryptorFinalize): Deleted.
(webkitMediaCommonEncryptionDecryptTransformCaps): Deleted.
(webkitMediaCommonEncryptionDecryptTransformInPlace): Deleted.
(webkitMediaCommonEncryptionDecryptIsCDMInstanceAvailable): Deleted.
(webkitMediaCommonEncryptionDecryptSinkEventHandler): Deleted.
(webkitMediaCommonEncryptionDecryptorQueryHandler): Deleted.
(webKitMediaCommonEncryptionDecryptorChangeState): Deleted.
(webKitMediaCommonEncryptionDecryptorSetContext): Deleted.

  • platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h:
  • platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:

(WebCore::MediaPlayerPrivateGStreamerMSE::attemptToDecryptWithLocalInstance):
Deleted. No longer passing key information over bus messages.

  • platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:

Tools:

  • MiniBrowser/wpe/main.cpp:

(main): Enable encrypted-media by default.

7:40 AM Changeset in webkit [240147] by Philippe Normand
  • 2 edits in trunk/Tools

[Flatpak] Missing KeyboardInterrupt exception handler
https://bugs.webkit.org/show_bug.cgi?id=193570

Reviewed by Michael Catanzaro.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.run_in_sandbox): Basic KeyboardInterrupt handling.

6:42 AM Changeset in webkit [240146] by Alan Bujtas
  • 5 edits
    2 adds in trunk

[LFC][BFC][MarginCollapsing] Collapsing through should not ignore floats.
https://bugs.webkit.org/show_bug.cgi?id=193564

Reviewed by Antti Koivisto.

Source/WebCore:

Float boxes prevent collapsing through.

Test: fast/block/float/float-in-descendant-formatting-context.html

  • layout/blockformatting/BlockMarginCollapse.cpp:

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

Tools:

  • LayoutReloaded/misc/LFC-passing-tests.txt:

LayoutTests:

  • fast/block/float/float-in-descendant-formatting-context-expected.txt: Added.
  • fast/block/float/float-in-descendant-formatting-context.html: Added.
6:39 AM Changeset in webkit [240145] by Alan Bujtas
  • 5 edits in trunk

[LFC] Do not skip float boxes that are not part of the current formatting context when computing bottom.
https://bugs.webkit.org/show_bug.cgi?id=193562

Reviewed by Antti Koivisto.

Source/WebCore:

The current floating context's (float) boxes could belong to descendant formatting contexts.
We need to include them as well when computing height (bottom) (we essentially need to skip ancestor floats only).

<div id=container style="overflow: hidden"><div>foo<div style="float: left">bar</div></div></div>
While computing the height for "container", the float box needs to be taken into account even though
it is part of another (descendant) formatting context (the inline formatting context established by its parent div).

  • layout/floats/FloatingState.cpp:

(WebCore::Layout::FloatingState::bottom const):

  • layout/floats/FloatingState.h:

(WebCore::Layout::FloatingState::FloatItem::isDescendantOfFormattingRoot const):
(WebCore::Layout::FloatingState::FloatItem::inFormattingContext const): Deleted.

Tools:

  • LayoutReloaded/misc/LFC-passing-tests.txt:
6:25 AM Changeset in webkit [240144] by Alan Bujtas
  • 5 edits in trunk

[LFC][BFC] Check for inflow children while computing height for block formatting context roots.
https://bugs.webkit.org/show_bug.cgi?id=193555

Reviewed by Antti Koivisto.

Source/WebCore:

This patch also extends areEssentiallyEqual to 0.125px to be able to match (essentially equal) inline runs.

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::contentHeightForFormattingContextRoot):

  • layout/Verification.cpp:

(WebCore::Layout::areEssentiallyEqual):

  • page/FrameViewLayoutContext.cpp:

(WebCore::layoutUsingFormattingContext):

Tools:

  • LayoutReloaded/misc/LFC-passing-tests.txt:
6:12 AM Changeset in webkit [240143] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[WebAudio] Release the AudioDestination when uninitializing DefaultAudioDestinationNode
https://bugs.webkit.org/show_bug.cgi?id=192590

Patch by Yacine Bandou <yacine.bandou@softathome.com> on 2019-01-18
Reviewed by Philippe Normand.

When we uninitialize DefaultAudioDestinationNode, the AudioDestination is stopped but not destroyed.

On some platforms the resources are allocated and released with the AudioDestination, thus when we uninitialize
DefaultAudioDestinationNode we don't release resources because the AudioDestination is not destroyed.

  • Modules/webaudio/DefaultAudioDestinationNode.cpp:

(WebCore::DefaultAudioDestinationNode::uninitialize):

5:46 AM Changeset in webkit [240142] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[WebAudio] Call AudioContext::uninitialize() immediately when the AudioContext is stopped
https://bugs.webkit.org/show_bug.cgi?id=192586

Patch by Yacine Bandou <yacine.bandou@softathome.com> on 2019-01-18
Reviewed by Philippe Normand.

When WebProcess is killed, AudioContext::uninitialize() is not called immediately in the stop so
the AudioDestinationNode is not destroyed.

In my case, I have a resource device manager, the output audio device is reserved when AudioDestinationNode
is instantiated and it is released when AudioDestinationNode is destroyed, thus when the webprocess is killed,
the resources leak.

AudioContext::uninitialize() is not called immediately since r94608.
This modification can now be reverted without regression in WebAudio tests.

Test: webaudio/mediaelementaudiosourcenode-gc.html

  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::stop):

5:07 AM Changeset in webkit [240141] by Philippe Normand
  • 15 edits
    1 copy
    24 adds in trunk

[WPE] Add Qt extension
https://bugs.webkit.org/show_bug.cgi?id=191464

Reviewed by Carlos Garcia Campos.

.:

  • Source/cmake/OptionsWPE.cmake: Add ENABLE_WPE_QT_API CMake option. Disabled by default.

Source/WebKit:

This new extension is a QML plugin embedding a WPE ViewBackend
implementation. It provides a public API very similar to Qt's
WebView module. It comes with a simple mini-browser implemented in
QML.

QtWPE is known to work with the Wayland-EGL (in GNOME and Weston
compositors) and EGLFS QPAs.

  • PlatformWPE.cmake:
  • UIProcess/API/wpe/qt/WPEQmlExtensionPlugin.cpp: Added.

(WPEQmlExtensionPlugin::registerTypes):

  • UIProcess/API/wpe/qt/WPEQmlExtensionPlugin.h: Added.
  • UIProcess/API/wpe/qt/WPEQtView.cpp: Added.

(WPEQtView::WPEQtView):
(WPEQtView::~WPEQtView):
(WPEQtView::geometryChanged):
(WPEQtView::configureWindow):
(WPEQtView::createOffscreen):
(WPEQtView::backendCreated):
(WPEQtView::notifyUrlChangedCallback):
(WPEQtView::notifyTitleChangedCallback):
(WPEQtView::notifyLoadProgressCallback):
(WPEQtView::notifyLoadChangedCallback):
(WPEQtView::notifyLoadFailedCallback):
(WPEQtView::updatePaintNode):
(WPEQtView::url const):
(WPEQtView::setUrl):
(WPEQtView::loadProgress const):
(WPEQtView::title const):
(WPEQtView::canGoBack const):
(WPEQtView::isLoading const):
(WPEQtView::canGoForward const):
(WPEQtView::goBack):
(WPEQtView::goForward):
(WPEQtView::reload):
(WPEQtView::stop):
(WPEQtView::loadHtml):
(WPEQtView::jsAsyncReadyCallback):
(WPEQtView::handleJsResult):
(WPEQtView::runJavaScript):
(WPEQtView::mousePressEvent):
(WPEQtView::mouseReleaseEvent):
(WPEQtView::hoverEnterEvent):
(WPEQtView::hoverLeaveEvent):
(WPEQtView::hoverMoveEvent):
(WPEQtView::wheelEvent):
(WPEQtView::keyPressEvent):
(WPEQtView::keyReleaseEvent):
(WPEQtView::touchEvent):

  • UIProcess/API/wpe/qt/WPEQtView.h: Added.
  • UIProcess/API/wpe/qt/WPEQtViewBackend.cpp: Added.

(configureCallback):
(WPEQtViewBackend::WPEQtViewBackend):
(WPEQtViewBackend::~WPEQtViewBackend):
(WPEQtViewBackend::configureGlibEglDisplay):
(WPEQtViewBackend::configureEglDisplay):
(WPEQtViewBackend::initialize):
(WPEQtViewBackend::backend const):
(WPEQtViewBackend::resize):
(WPEQtViewBackend::getTexture):
(WPEQtViewBackend::initSurface):
(WPEQtViewBackend::displayImage):
(WPEQtViewBackend::modifiers const):
(WPEQtViewBackend::dispatchHoverEnterEvent):
(WPEQtViewBackend::dispatchHoverLeaveEvent):
(WPEQtViewBackend::dispatchHoverMoveEvent):
(WPEQtViewBackend::dispatchMousePressEvent):
(WPEQtViewBackend::dispatchMouseReleaseEvent):
(WPEQtViewBackend::dispatchWheelEvent):
(WPEQtViewBackend::dispatchKeyEvent):
(WPEQtViewBackend::dispatchTouchEvent):

  • UIProcess/API/wpe/qt/WPEQtViewBackend.h: Added.
  • UIProcess/API/wpe/qt/WPEQtViewLoadRequest.cpp: Added.

(WPEQtViewLoadRequest::WPEQtViewLoadRequest):
(WPEQtViewLoadRequest::~WPEQtViewLoadRequest):
(WPEQtViewLoadRequest::url const):
(WPEQtViewLoadRequest::status const):
(WPEQtViewLoadRequest::errorString const):

  • UIProcess/API/wpe/qt/WPEQtViewLoadRequest.h: Added.
  • UIProcess/API/wpe/qt/WPEQtViewLoadRequestPrivate.h: Added.

(WPEQtViewLoadRequestPrivate::WPEQtViewLoadRequestPrivate):
(WPEQtViewLoadRequestPrivate::~WPEQtViewLoadRequestPrivate):

  • UIProcess/API/wpe/qt/qmldir: Added.

Tools:

MiniBrowser and API tests for the WPE Qt API. To run the
MiniBrowser a new script is introduced. Example invocation:

$ run-qt-wpe-minibrowser -platform wayland https://webkit.org

Also note-worthy is the introduction of the python2-subprocess32
dependency to run the GLib API tests.

  • MiniBrowser/wpe/CMakeLists.txt:
  • MiniBrowser/wpe/qt/CMakeLists.txt: Added.
  • MiniBrowser/wpe/qt/main.cpp: Added.

(main):

  • MiniBrowser/wpe/qt/main.qml: Added.
  • MiniBrowser/wpe/qt/qml.qrc: Added.
  • Scripts/run-gtk-tests:

(GtkTestRunner.is_google_test):
(GtkTestRunner):
(GtkTestRunner.is_qt_test):

  • Scripts/run-qt-wpe-minibrowser: Added.
  • Scripts/run-wpe-tests:

(WPETestRunner):
(WPETestRunner.is_google_test):
(WPETestRunner.is_qt_test):

  • TestWebKitAPI/Tests/WPEQt/TestLoad.cpp: Added.

(TestLoad::main):

  • TestWebKitAPI/Tests/WPEQt/TestLoadHtml.cpp: Added.

(TestLoadHtml::main):

  • TestWebKitAPI/Tests/WPEQt/TestLoadRequest.cpp: Added.

(TestLoadRequest::main):

  • TestWebKitAPI/Tests/WPEQt/TestRunJavaScript.cpp: Added.

(TestRunJavaScript::main):

  • TestWebKitAPI/Tests/WPEQt/WPEQtTest.cpp: Added.

(waitForSignal):

  • TestWebKitAPI/Tests/WPEQt/WPEQtTest.h: Added.

(LoadSpy::LoadSpy):
(LoadSpy::~LoadSpy):
(LoadSpy::onLoadingChanged):
(LoadStartedCatcher::LoadStartedCatcher):
(LoadStartedCatcher::~LoadStartedCatcher):
(LoadStartedCatcher::onLoadingChanged):
(waitForLoadSucceeded):
(waitForLoadFailed):

  • TestWebKitAPI/glib/CMakeLists.txt:
  • flatpak/flatpakutils.py:

(WebkitFlatpak.load_from_args):
(WebkitFlatpak.init):
(WebkitFlatpak.clean_args):
(WebkitFlatpak.run_in_sandbox):

  • flatpak/org.webkit.CommonModules.yaml:
  • flatpak/org.webkit.WPE.yaml:
  • flatpak/org.webkit.WPEModules.yaml:
  • flatpak/org.webkit.WPEQT.yaml: Copied from Tools/flatpak/org.webkit.WebKit.yaml.
  • flatpak/org.webkit.WebKit.yaml:
  • glib/api_test_runner.py:

(TestRunner._run_test_qt):
(TestRunner.is_qt_test):
(TestRunner._run_test):

12:07 AM Changeset in webkit [240140] by Simon Fraser
  • 5 edits in trunk/Source/WebCore

ScrollingCoordinator::scrollableAreaScrollLayerDidChange() can be removed
https://bugs.webkit.org/show_bug.cgi?id=193559

Reviewed by Antti Koivisto.

ScrollingCoordinator::scrollableAreaScrollLayerDidChange() existed for CoordinatedGraphics,
but the code that used it was removed in webkit.org/r229318 so we can remove it and
code that calls it.

  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::willDestroyScrollableArea):
(WebCore::ScrollingCoordinator::scrollableAreaScrollLayerDidChange): Deleted.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateGeometry):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
(WebCore::RenderLayerCompositor::didAddScrollingLayer):
(WebCore::RenderLayerCompositor::scrollingLayerDidChange): Deleted.

  • rendering/RenderLayerCompositor.h:

Jan 17, 2019:

8:15 PM Changeset in webkit [240139] by Wenson Hsieh
  • 23 edits
    4 adds in trunk

[iOS] Content offset jumps erratically when autoscrolling near scroll view content inset areas
https://bugs.webkit.org/show_bug.cgi?id=193494
<rdar://problem/46859627>

Reviewed by Simon Fraser and Tim Horton.

Source/WebCore:

When computing the content offset to scroll to when revealing a given rect in content coordinates, we currently
just use the unobscured content rect. As a result, when scrolling to reveal a rect, we'll clamp the final scroll
position such that only content is visible. For example, when asked to reveal the rect (0, 0, 1, 1), we adjust
the scroll position to be the origin.

However, consider the case where a client (e.g. Mail on iOS) has added a content inset to the web view's scroll
view. If we're asked to reveal a rect that is outside the content area but within a content inset, we will still
end up clamping the scroll position to the unobscured rect. This manifests in a bug where selecting text and
autoscrolling in iOS Mail compose while the scroll view is scrolled all the way to the top to reveal the To/Cc/
Subject fields causes the content offset to jump to the origin, rather than staying at (0, -topContentInset).

To fix this, we teach RenderLayer::scrollRectToVisible about content insets that are visible. Rather than use
the content rects as-is, expand to encompass visible content insets as well. This ensures that revealing a
position which is already visible won't cause us to scroll away the content inset area and only show the
unobscured rect.

Tests: editing/selection/ios/autoscroll-with-top-content-inset.html

fast/scrolling/ios/scroll-into-view-with-top-content-inset.html

  • page/FrameView.cpp:

(WebCore::FrameView::unobscuredContentRectExpandedByContentInsets const):

Introduce a helper method that expands the unobscured content rect to include surrounding content insets.

  • page/FrameView.h:
  • page/Page.h:

(WebCore::Page::contentInsets const):
(WebCore::Page::setContentInsets):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::scrollRectToVisible):
(WebCore::RenderLayer::getRectToExpose const):

Source/WebKit:

Adds contentInsets to VisibleContentRectUpdateInfo. This keeps track of the visible content insets
surrounding the unobscured content rect. See WebCore ChangeLog for more details.

  • Shared/VisibleContentRectUpdateInfo.cpp:

(WebKit::VisibleContentRectUpdateInfo::encode const):
(WebKit::VisibleContentRectUpdateInfo::decode):
(WebKit::operator<<):

  • Shared/VisibleContentRectUpdateInfo.h:

(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::contentInsets const):
(WebKit::operator==):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _computedObscuredInset]):
(-[WKWebView _computedContentInset]):
(-[WKWebView _computedUnobscuredSafeAreaInset]):

We don't care about source compatibility with iOS 10 and below anymore, so we should change these >= iOS 11
target checks to simply PLATFORM(IOS).

(-[WKWebView _updateVisibleContentRects]):

Compute the visible content insets on all sides of the unobscured content rect. These insets are scaled to
content coordinates.

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

(floatBoxExtent):

Add a helper to convert UIEdgeInsets to WebCore::FloatBoxExtent, and use it in a few places below.

(-[WKContentView didUpdateVisibleRect:unobscuredRect:contentInsets:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]): Deleted.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::updateVisibleContentRects):

Update the Page's content insets.

Tools:

Add a new test option to add a top content inset to the test runner's WKWebView's scroll view, and automatically
scroll to reveal this top content inset area when beginning the test (i.e., scroll to (0, -topContentInset)).

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::contentOffsetX const):
(WTR::UIScriptController::contentOffsetY const):

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

(WTR::UIScriptController::contentOffsetX const):
(WTR::UIScriptController::contentOffsetY const):

  • TestRunnerShared/UIScriptContext/UIScriptController.h:

Also add new UIScriptController methods to ask for the content offset of the platform scroll view.

  • WebKitTestRunner/TestController.cpp:

(WTR::updateTestOptionsFromTestHeader):

  • WebKitTestRunner/TestOptions.h:

(WTR::TestOptions::hasSameInitializationOptions const):

  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformResetStateToConsistentValues):

  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::contentOffsetX const):
(WTR::UIScriptController::contentOffsetY const):

LayoutTests:

  • editing/selection/ios/autoscroll-with-top-content-inset-expected.txt: Added.
  • editing/selection/ios/autoscroll-with-top-content-inset.html: Added.

Add a new test to verify that moving the selection by autoscrolling near the top content inset area does not
cause the scroll view's content offset to jump.

  • fast/scrolling/ios/scroll-into-view-with-top-content-inset-expected.txt: Added.
  • fast/scrolling/ios/scroll-into-view-with-top-content-inset.html: Added.

Add a new test to verify that programmatically scrolling an element that's already visible into view does not
scroll away the scroll view's content inset.

  • resources/ui-helper.js:

(window.UIHelper.contentOffset):
(window.UIHelper):

6:11 PM Changeset in webkit [240138] by mark.lam@apple.com
  • 24 edits in trunk/Source/JavaScriptCore

Audit bytecode fields and ensure that LLInt instructions for accessing them are appropriate.
https://bugs.webkit.org/show_bug.cgi?id=193557
<rdar://problem/47369125>

Reviewed by Yusuke Suzuki.

  1. Rename some bytecode fields so that it's easier to discern whether the LLInt is accessing them the right way:
    • distinguish between targetVirtualRegister and targetLabel.
    • name all StructureID fields as structureID (oldStructureID, newStructureID) instead of structure (oldStructure, newStructure).
  1. Use bitwise_cast in struct Fits when sizeof(T) == size. This prevents potential undefined behavior issues arising from doing assignments with reinterpret_cast'ed pointers.
  1. Make Special::Pointer an unsigned type (previously int). Make ResolveType an unsigned type (previously int).
  1. In LowLevelInterpreter*.asm:
  • rename the op macro argument to opcodeName or opcodeStruct respectively. This makes it clearer which argument type the macro is working with.
  • rename the name macro argument to opcodeName.
  • fix operator types to match the field type being accessed. The following may have resulted in bugs before:
  1. The following should be read with getu() instead of get() because they are unsigned ints:

OpSwitchImm::m_tableIndex
OpSwitchChar::m_tableIndex
OpGetFromArguments::m_index
OpPutToArguments::m_index
OpGetRestLength::m_numParametersToSkip

OpJneqPtr::m_specialPointer should also be read with getu() though this
wasn't a bug because it was previously an int by default, and is only
changed to an unsigned int in this patch.

2.The following should be read with loadi (not loadp) because they are of

unsigned type (not a pointer):

OpResolveScope::Metadata::m_resolveType
CodeBlock::m_numParameters (see prepareForTailCall)

  1. OpPutToScope::Metadata::m_operand should be read with loadp (not loadis) because it is a uintptr_t.
  1. The following should be read with loadi (not loadis) because they are unsigned ints:

OpNegate::Metadata::m_arithProfile + ArithProfile::m_bits
OpPutById::Metadata::m_oldStructureID
OpPutToScope::Metadata::m_getPutInfo + GetPutInfo::m_operand

These may not have manifested in bugs because the operations that follow
the load are 32-bit instructions which ignore the high word.

  1. Give class GetPutInfo a default constructor so that we can use bitwise_cast on it. Also befriend LLIntOffsetsExtractor so that we can take the offset of m_operand in it.
  • bytecode/ArithProfile.h:
  • bytecode/BytecodeList.rb:
  • bytecode/BytecodeUseDef.h:

(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::finalizeLLIntInlineCaches):

  • bytecode/Fits.h:
  • bytecode/GetByIdMetadata.h:
  • bytecode/GetByIdStatus.cpp:

(JSC::GetByIdStatus::computeFromLLInt):

  • bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp:

(JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint::clearLLIntGetByIdCache):

  • bytecode/PreciseJumpTargetsInlines.h:

(JSC::jumpTargetForInstruction):
(JSC::updateStoredJumpTargetsForInstruction):

  • bytecode/PutByIdStatus.cpp:

(JSC::PutByIdStatus::computeFromLLInt):

  • bytecode/SpecialPointer.h:
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::Label::setLocation):

  • dfg/DFGByteCodeParser.cpp:

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

  • jit/JITArithmetic.cpp:

(JSC::JIT::emit_compareAndJump):
(JSC::JIT::emit_compareUnsignedAndJump):
(JSC::JIT::emit_compareAndJumpSlow):

  • jit/JITArithmetic32_64.cpp:

(JSC::JIT::emit_compareAndJump):
(JSC::JIT::emit_compareUnsignedAndJump):
(JSC::JIT::emit_compareAndJumpSlow):
(JSC::JIT::emitBinaryDoubleOp):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_jmp):
(JSC::JIT::emit_op_jfalse):
(JSC::JIT::emit_op_jeq_null):
(JSC::JIT::emit_op_jneq_null):
(JSC::JIT::emit_op_jneq_ptr):
(JSC::JIT::emit_op_jeq):
(JSC::JIT::emit_op_jtrue):
(JSC::JIT::emit_op_jneq):
(JSC::JIT::compileOpStrictEqJump):
(JSC::JIT::emitSlow_op_jstricteq):
(JSC::JIT::emitSlow_op_jnstricteq):
(JSC::JIT::emit_op_check_tdz):
(JSC::JIT::emitSlow_op_jeq):
(JSC::JIT::emitSlow_op_jneq):
(JSC::JIT::emit_op_profile_type):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_jmp):
(JSC::JIT::emit_op_jfalse):
(JSC::JIT::emit_op_jtrue):
(JSC::JIT::emit_op_jeq_null):
(JSC::JIT::emit_op_jneq_null):
(JSC::JIT::emit_op_jneq_ptr):
(JSC::JIT::emit_op_jeq):
(JSC::JIT::emitSlow_op_jeq):
(JSC::JIT::emit_op_jneq):
(JSC::JIT::emitSlow_op_jneq):
(JSC::JIT::compileOpStrictEqJump):
(JSC::JIT::emitSlow_op_jstricteq):
(JSC::JIT::emitSlow_op_jnstricteq):
(JSC::JIT::emit_op_check_tdz):
(JSC::JIT::emit_op_profile_type):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::setupGetByIdPrototypeCache):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/CommonSlowPaths.cpp:
  • runtime/GetPutInfo.h:
4:53 PM Changeset in webkit [240137] by Kocsen Chung
  • 7 edits in branches/safari-607-branch/Source

Versioning.

4:43 PM Changeset in webkit [240136] by Truitt Savell
  • 39 edits
    22 deletes in trunk

Unreviewed, rolling out r240124.

This commit broke an internal build.

Reverted changeset:

"SDK_VARIANT build destinations should be separate from non-
SDK_VARIANT builds"
https://bugs.webkit.org/show_bug.cgi?id=189553
https://trac.webkit.org/changeset/240124

4:19 PM Changeset in webkit [240135] by Devin Rousso
  • 2 edits in trunk/Source/WebCore

Web Inspector: fix Xcode project file list after r239976
https://bugs.webkit.org/show_bug.cgi?id=193474

Reviewed by Timothy Hatcher.

  • WebCore.xcodeproj/project.pbxproj:
4:17 PM Changeset in webkit [240134] by Kocsen Chung
  • 7 edits in trunk/Source

Versioning.

4:09 PM Changeset in webkit [240133] by Kocsen Chung
  • 1 copy in tags/Safari-607.1.24

Tag Safari-607.1.24.

2:54 PM Changeset in webkit [240132] by Ross Kirsling
  • 2 edits in trunk/Source/WebCore

Unreviewed WinCairo fix -- hundreds of tests crash after r240031.

  • platform/network/curl/ResourceHandleCurl.cpp:

(WebCore::ResourceHandle::createCurlRequest):
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::receivedCredential):
(WebCore::ResourceHandle::getCredential):

1:45 PM Changeset in webkit [240131] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKitLegacy/win

[Win][HighDPI] Repaint glitches when scrolling.
https://bugs.webkit.org/show_bug.cgi?id=173152
<rdar://problem/45269953>

Reviewed by Brent Fulgham.

Non-integral device scale factors are causing repaint glitches, because the computation of the scroll
delta in pixel coordinates from the scroll delta in logical coordinates will not always be correct.
Instead of blitting the scroll rectangle, repaint the entire region affected by scrolling.

  • WebView.cpp:

(WebView::scrollBackingStore):

1:38 PM Changeset in webkit [240130] by achristensen@apple.com
  • 2 edits in trunk/Tools

Fix string concatenation API test after r239920
https://bugs.webkit.org/show_bug.cgi?id=193551
<rdar://problem/47359304>

Reviewed by Youenn Fablet.

  • TestWebKitAPI/Tests/WTF/StringConcatenate.cpp:

(TestWebKitAPI::TEST):
Cocoa platforms' interpretation of UChar/unsigned short equality is not affected by ICU's recent change of UChar's type
in WebKit's build configuration like it apparently is on Linux.

1:36 PM Changeset in webkit [240129] by wilander@apple.com
  • 11 edits in trunk

Add infrastructure to enable/disable ITP Debug Mode through Preferences
https://bugs.webkit.org/show_bug.cgi?id=193510
<rdar://problem/47330969>

Reviewed by Dean Jackson.

Source/WebCore:

No new tests. These changes are purely for settings/preferences.

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setItpDebugModeEnabled):
(WebCore::RuntimeEnabledFeatures::itpDebugModeEnabled const):
(WebCore::RuntimeEnabledFeatures::setResourceLoadStatisticsDebugMode): Deleted.
(WebCore::RuntimeEnabledFeatures::resourceLoadStatisticsDebugMode const): Deleted.

Renamed.

  • page/Settings.yaml:

Removed since this particular setting should not be persisted for privacy
reasons.

Source/WebKit:

  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:

(WebKit::ResourceLoadStatisticsMemoryStore::ensurePrevalentResourcesForDebugMode):
(WebKit::ResourceLoadStatisticsMemoryStore::setResourceLoadStatisticsDebugMode):
(WebKit::ResourceLoadStatisticsMemoryStore::setPrevalentResourceForDebugMode):

These functions are now suited for runtime switching of ITP Debug Mode.

  • Shared/WebPreferences.yaml:

Changed name from ResourceLoadStatisticsDebugMode to ItpDebugModeEnabled.

  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _setItpDebugModeEnabled:]):
(-[WKPreferences _itpDebugModeEnabled]):

New private preferences functions.

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:
  • UIProcess/Cocoa/ResourceLoadStatisticsMemoryStoreCocoa.mm:

(WebKit::ResourceLoadStatisticsMemoryStore::registerUserDefaultsIfNeeded):

Removed support for old experimental user default. Added a new one that's
not connected to any UI, i.e. merely for command line debugging where
ITP Debug Mode needs to be on all the time.

LayoutTests:

  • http/tests/resourceLoadStatistics/set-custom-prevalent-resource-in-debug-mode.html:

Changed the order of function calls since testRunner.setStatisticsPrevalentResourceForDebugMode()
now has to be called before testRunner.setStatisticsDebugMode().

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

[ews-build] validate-patch should handle the case when bug_id is None
https://bugs.webkit.org/show_bug.cgi?id=193547

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/steps.py:

(ValidatePatch._is_bug_closed): Gracefully handle the case when bug_id is None.
(ValidatePatch.start): If bug_id is set as None in build properties, fetch it from the patch.

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

[ews-build] Add patch author information in build
https://bugs.webkit.org/show_bug.cgi?id=193465

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/steps.py:

(ValidatePatch._is_patch_obsolete):

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

[ews-build] Pass bug_id to the triggered builds
https://bugs.webkit.org/show_bug.cgi?id=193548

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/factories.py:

(BuildFactory.propertiesToPassToTriggers):

1:12 PM Changeset in webkit [240125] by timothy_horton@apple.com
  • 4 edits in trunk/Source

Adopt NSTextCheckingSuppressInitialCapitalizationKey
https://bugs.webkit.org/show_bug.cgi?id=193545

Reviewed by Dean Jackson.

Source/WebCore/PAL:

  • pal/spi/mac/NSSpellCheckerSPI.h:

Source/WebKit:

  • UIProcess/mac/TextCheckerMac.mm:

(WebKit::TextChecker::checkTextOfParagraph):
(WebKit::TextChecker::getGuessesForWord):

12:46 PM Changeset in webkit [240124] by jer.noble@apple.com
  • 39 edits
    22 adds in trunk

SDK_VARIANT build destinations should be separate from non-SDK_VARIANT builds
https://bugs.webkit.org/show_bug.cgi?id=189553

Reviewed by Tim Horton.

.:

  • Makefile.shared:

PerformanceTests:

  • MediaTime/Configurations/Base.xcconfig:
  • MediaTime/Configurations/SDKVariant.xcconfig: Added.

Source/bmalloc:

  • Configurations/Base.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.

Source/JavaScriptCore:

  • Configurations/Base.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.

Source/ThirdParty/ANGLE:

  • Configurations/Base.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.

Source/ThirdParty/libwebrtc:

  • Configurations/Base.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.

Source/WebCore:

  • Configurations/Base.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.
  • Configurations/WebCore.xcconfig:

Source/WebCore/PAL:

  • Configurations/Base.xcconfig:
  • Configurations/PAL.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.

Source/WebInspectorUI:

  • Configurations/Base.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.

Source/WebKit:

  • Configurations/Base.xcconfig:
  • Configurations/BaseTarget.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.

Source/WebKitLegacy/mac:

  • Configurations/Base.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.
  • Configurations/WebKitLegacy.xcconfig:

Source/WTF:

  • Configurations/Base.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.

Tools:

Add a check-webkit-style check that ensures all SDKVariant.xcconfig files match.

  • ContentExtensionTester/Configurations/Base.xcconfig:
  • ContentExtensionTester/Configurations/SDKVariant.xcconfig: Added.
  • DumpRenderTree/mac/Configurations/Base.xcconfig:
  • DumpRenderTree/mac/Configurations/SDKVariant.xcconfig: Added.
  • ImageDiff/cg/Configurations/Base.xcconfig:
  • ImageDiff/cg/Configurations/SDKVariant.xcconfig: Added.
  • MiniBrowser/Configurations/Base.xcconfig:
  • MiniBrowser/Configurations/SDKVariant.xcconfig: Added.
  • MobileMiniBrowser/Configurations/Base.xcconfig:
  • MobileMiniBrowser/Configurations/SDKVariant.xcconfig: Added.
  • Scripts/webkitpy/style/checker.py:

(_all_categories):
(FileType):
(CheckerDispatcher._file_type):
(CheckerDispatcher._create_checker):

  • Scripts/webkitpy/style/checkers/sdkvariant.py: Added.

(SDKVariantChecker):
(SDKVariantChecker.init):
(SDKVariantChecker.check):

  • TestWebKitAPI/Configurations/Base.xcconfig:
  • TestWebKitAPI/Configurations/SDKVariant.xcconfig: Added.
  • WebEditingTester/Configurations/Base.xcconfig:
  • WebEditingTester/Configurations/SDKVariant.xcconfig: Added.
  • WebKitLauncher/Configurations/SDKVariant.xcconfig: Added.
  • WebKitTestRunner/Configurations/Base.xcconfig:
  • WebKitTestRunner/Configurations/SDKVariant.xcconfig: Added.
  • lldb/lldbWebKitTester/Configurations/Base.xcconfig:
  • lldb/lldbWebKitTester/Configurations/SDKVariant.xcconfig: Added.
12:24 PM Changeset in webkit [240123] by jer.noble@apple.com
  • 7 edits in trunk/Source/WebCore

MediaPlayerPrivateAVFoundationObjC can return incorrect paused information
https://bugs.webkit.org/show_bug.cgi?id=193499

Reviewed by Eric Carlson.

MediaPlayerPrivateAVFoundation uses rate() as an indicator of whether the player
is paused or not. This is incorrect when playback is stalled waiting for more data.
For MPPAVFObjC, use the timeControlStatus as a more accurate indicator of whether
the player is playing.

Now that we have correct play state information, we can remove the handlePlaybackCommand()
path when playing remotely for a more direct approach of notifying the HTMLMediaElement
that the play state has changed.

Drive-by fix: Before throwing away the AVPlayer, clear its output context. This keeps
remote devices from keeping the AVPlayer alive.

Drive-by fix #2: The NullMediaPlayer should always return "true" for paused(), not "false",
since it can't possibly play anything.

  • platform/graphics/MediaPlayer.cpp:
  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:

(WebCore::MediaPlayerPrivateAVFoundation::paused const):

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:

(WebCore::MediaPlayerPrivateAVFoundation::platformPaused const):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformPaused const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::timeControlStatusDidChange):

11:34 AM Changeset in webkit [240122] by jiewen_tan@apple.com
  • 3 edits in trunk/Source/WebCore

[Mac] Add a new quirk to HTMLFormControlElement::isMouseFocusable
https://bugs.webkit.org/show_bug.cgi?id=193478
<rdar://problem/34368591>

Reviewed by Brent Fulgham.

By default in macOS, submit buttons (controls) are not focusable. WebKit follows this system convention
as suggested by the spec: https://html.spec.whatwg.org/multipage/interaction.html#focusable-area. This
is also the convention Firefox respects. However, Chrome doesn't. ceac.state.gov is by far the only
website that assumes submit buttons are focusable, and will prohibit users from completing immigration
forms, such as DS160 if buttons are not. To help immigrations, we decide to add a new quirk to
HTMLFormControlElement::isMouseFocusable such that submit buttons are mouse focusable.

This quirk is for ceac.state.gov specifically, and therefore no tests.

  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::isMouseFocusable const):
(WebCore::HTMLFormControlElement::needsSiteSpecificQuirks const):

  • html/HTMLFormControlElement.h:
11:32 AM Changeset in webkit [240121] by achristensen@apple.com
  • 3 edits in trunk/Source/WebCore

Fix WinCairo build after r240117
https://bugs.webkit.org/show_bug.cgi?id=193529

  • PlatformWin.cmake:
  • platform/network/curl/SocketStreamHandleImplCurl.cpp:
11:23 AM Changeset in webkit [240120] by youenn@apple.com
  • 17 edits in trunk/Source/WebCore

Add release logging for incoming and outgoing webrtc audio tracks
https://bugs.webkit.org/show_bug.cgi?id=185545

Reviewed by Eric Carlson.

Add logging of audio tracks. When doing a WebRTC call,
one log line is added each second for each audio track.
Validated that logging is done through manual testing.

Refactored code to use LogHelper and apply it to video sources as well.

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::addTrack):
(WebCore::LibWebRTCMediaEndpoint::sourceFromNewReceiver):
(WebCore::sourceFromNewReceiver): Deleted.

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
  • platform/mediastream/RealtimeIncomingAudioSource.cpp:

(WebCore::RealtimeIncomingAudioSource::RealtimeIncomingAudioSource):
(WebCore::RealtimeIncomingAudioSource::logChannel const):
(WebCore::RealtimeIncomingAudioSource::logger const):

  • platform/mediastream/RealtimeIncomingAudioSource.h:

(WebCore::RealtimeIncomingAudioSource::setLogger):

  • platform/mediastream/RealtimeIncomingVideoSource.cpp:

(WebCore::RealtimeIncomingVideoSource::RealtimeIncomingVideoSource):
(WebCore::RealtimeIncomingVideoSource::logChannel const):
(WebCore::RealtimeIncomingVideoSource::logger const):

  • platform/mediastream/RealtimeIncomingVideoSource.h:

(WebCore::RealtimeIncomingVideoSource::setLogger):

  • platform/mediastream/RealtimeOutgoingAudioSource.cpp:

(WebCore::RealtimeOutgoingAudioSource::RealtimeOutgoingAudioSource):
(WebCore::RealtimeOutgoingAudioSource::sendAudioFrames):
(WebCore::RealtimeOutgoingAudioSource::logChannel const):
(WebCore::RealtimeOutgoingAudioSource::logger const):

  • platform/mediastream/RealtimeOutgoingAudioSource.h:

(WebCore::RealtimeOutgoingAudioSource::setLogger):

  • platform/mediastream/RealtimeOutgoingVideoSource.cpp:

(WebCore::RealtimeOutgoingVideoSource::RealtimeOutgoingVideoSource):
(WebCore::RealtimeOutgoingVideoSource::sendBlackFramesIfNeeded):
(WebCore::RealtimeOutgoingVideoSource::sendOneBlackFrame):
(WebCore::RealtimeOutgoingVideoSource::logChannel const):
(WebCore::RealtimeOutgoingVideoSource::logger const):

  • platform/mediastream/RealtimeOutgoingVideoSource.h:

(WebCore::RealtimeOutgoingVideoSource::setLogger):

  • platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:

(WebCore::RealtimeIncomingAudioSourceCocoa::OnData):

  • platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.h:
  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:

(WebCore::RealtimeIncomingVideoSourceCocoa::pixelBufferPool):
(WebCore::RealtimeIncomingVideoSourceCocoa::pixelBufferFromVideoFrame):
(WebCore::RealtimeIncomingVideoSourceCocoa::OnFrame):

  • platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.cpp:
  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:

(WebCore::RealtimeOutgoingVideoSourceCocoa::sampleBufferUpdated):

  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm:

(WebCore::RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer):

11:15 AM Changeset in webkit [240119] by dino@apple.com
  • 7 edits
    2 adds in trunk

(iPad) Link tapping is sluggish on many sites
https://bugs.webkit.org/show_bug.cgi?id=193522
<rdar://problem/47102987>

Reviewed by Wenson Hsieh.

Source/WebKit:

Some WKWebView clients might set the initial zoom scale of the page to
something other than 1, which disables the "fast tap" behaviour.
The fix is very simple -- just check against the initial scale rather
than 1.

The most likely regression from this would be pages designed for desktop,
but provide a viewport tag saying width=device-width and initial-scale.
They might stop allowing double-tap-to-zoom.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _allowsDoubleTapGestures]): Check against initial page scale.

LayoutTests:

Add a test that checks a double tap will trigger a click
event on a page that is at initial scale.

Extra bonus: for some reason adding this test, or making this code
change, uncovered a couple of bugs in existing tests. The
viewport-zooms-from-element-to-initial-scale test was completely wrong
because it was expecting the incorrect result, which was triggered by
the zoom callback firing early at a forced scale value. The
viewport-no-width-value-allows-double-tap test was triggering a JS
error in its UI script. I modernised both of these to use UIHelper instead.

  • fast/events/ios/fast-click-double-tap-sends-click-when-initial-scale-expected.txt: Added.
  • fast/events/ios/fast-click-double-tap-sends-click-when-initial-scale.html: Added.
  • fast/events/ios/viewport-no-width-value-allows-double-tap.html:
  • fast/events/ios/viewport-zooms-from-element-to-initial-scale-expected.txt:
  • fast/events/ios/viewport-zooms-from-element-to-initial-scale.html:
  • resources/ui-helper.js: Add doubleTapAt and zoomByDoubleTapAt helpers. Remove the

unnecessary "Done" return value from many of the callbacks. Give zoomToScale a return
value.
(window.UIHelper.tapAt.return.new.Promise):
(window.UIHelper.tapAt):
(window.UIHelper.doubleTapAt.return.new.Promise):
(window.UIHelper.doubleTapAt):
(window.UIHelper.zoomByDoubleTappingAt):
(window.UIHelper.activateAt.return.new.Promise):
(window.UIHelper.activateAt):
(window.UIHelper.toggleCapsLock):
(window.UIHelper.ensurePresentationUpdate.return.new.Promise):
(window.UIHelper.ensurePresentationUpdate):
(window.UIHelper.activateAndWaitForInputSessionAt.return.new.Promise.):
(window.UIHelper.activateFormControl.return.new.Promise.):
(window.UIHelper.replaceTextAtRange):
(window.UIHelper.zoomToScale):
(window.UIHelper.stylusTapAt.return.new.Promise):
(window.UIHelper.stylusTapAt):

11:13 AM Changeset in webkit [240118] by pvollan@apple.com
  • 2 edits in trunk

[Win] gperf command not found
https://bugs.webkit.org/show_bug.cgi?id=193538
<rdar://problem/47250549>

Reviewed by Brent Fulgham.

CMake only searches for gperf if ENABLE_WEBCORE is on. ENABLE_WEBCORE needs to be set to ON.

  • Source/cmake/OptionsAppleWin.cmake:
11:10 AM Changeset in webkit [240117] by achristensen@apple.com
  • 33 edits
    3 adds in trunk/Source

Stop using NetworkStorageSession::storageSession in WebCore
https://bugs.webkit.org/show_bug.cgi?id=193529

Reviewed by Tim Horton.

Source/WebCore:

Ownership of the map that NetworkStorageSession::storageSession searches needs to move to the WebKit/WebKitLegacy layer,
so when WebCore used to look in this map it needs to call a client function to ask the layer above it for the storage object.
I've called this client StorageSessionProvider::storageSession. Right now it just looks in NetworkStorageSession::storageSession,
but this added abstraction makes it possible to move the currently process-global map to be a member of the NetworkProcess object.

  • Modules/websockets/WebSocketChannel.cpp:

(WebCore::WebSocketChannel::connect):

  • WebCore.xcodeproj/project.pbxproj:
  • loader/CookieJar.cpp:

(WebCore::CookieJar::create):
(WebCore::CookieJar::CookieJar):
(WebCore::CookieJar::cookies const):
(WebCore::CookieJar::setCookies):
(WebCore::CookieJar::cookiesEnabled const):
(WebCore::CookieJar::cookieRequestHeaderFieldValue const):
(WebCore::CookieJar::getRawCookies const):
(WebCore::CookieJar::deleteCookie):

  • loader/CookieJar.h:
  • loader/EmptyClients.cpp:

(WebCore::pageConfigurationWithEmptyClients):

  • page/Page.h:
  • page/SocketProvider.cpp:

(WebCore::SocketProvider::createSocketStreamHandle):

  • page/SocketProvider.h:
  • platform/network/NetworkingContext.h:
  • platform/network/SocketStreamHandleImpl.cpp:

(WebCore::cookieDataForHandshake):
(WebCore::SocketStreamHandleImpl::platformSendHandshake):

  • platform/network/StorageSessionProvider.h: Added.

(WebCore::StorageSessionProvider::~StorageSessionProvider):

  • platform/network/cf/SocketStreamHandleImpl.h:

(WebCore::SocketStreamHandleImpl::create):

  • platform/network/cf/SocketStreamHandleImplCFNet.cpp:

(WebCore::SocketStreamHandleImpl::SocketStreamHandleImpl):
(WebCore::SocketStreamHandleImpl::getStoredCONNECTProxyCredentials):

  • platform/network/curl/SocketStreamHandleImpl.h:

(WebCore::SocketStreamHandleImpl::create):

  • platform/network/soup/SocketStreamHandleImpl.h:
  • platform/network/soup/SocketStreamHandleImplSoup.cpp:

(WebCore::SocketStreamHandleImpl::create):

Source/WebKit:

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::createSocketStream):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkSocketStream.cpp:

(WebKit::NetworkSocketStream::create):
(WebKit::NetworkSocketStream::NetworkSocketStream):

  • NetworkProcess/NetworkSocketStream.h:
  • NetworkProcess/NetworkStorageSessionProvider.h: Added.
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Network/WebSocketProvider.cpp:

(WebKit::WebSocketProvider::createSocketStreamHandle):

  • WebProcess/Network/WebSocketProvider.h:
  • WebProcess/WebPage/WebCookieJar.cpp:

(WebKit::WebCookieJar::WebCookieJar):

  • WebProcess/WebPage/WebCookieJar.h:

Source/WebKitLegacy:

  • WebCoreSupport/PageStorageSessionProvider.h: Added.
  • WebKitLegacy.xcodeproj/project.pbxproj:

Source/WebKitLegacy/mac:

  • Misc/WebCache.mm:

(+[WebCache addImageToCache:forURL:forFrame:]):

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

Source/WebKitLegacy/win:

  • WebView.cpp:

(WebView::initWithFrame):

11:03 AM Changeset in webkit [240116] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

Layout Test js/dfg-int-overflow-in-loop.html is failing
https://bugs.webkit.org/show_bug.cgi?id=193540

Unreviewed test gardening.

  • platform/win/TestExpectations:
10:34 AM Changeset in webkit [240115] by Ross Kirsling
  • 9 edits
    5 deletes in trunk/LayoutTests

Get rid of Sputnik tests.
https://bugs.webkit.org/show_bug.cgi?id=193464

Rubber stamped by Saam Barati.

  • sputnik/: Removed.
  • platform/gtk/sputnik/: Removed.
  • platform/ios/sputnik/: Removed.
  • platform/mac/sputnik/: Removed.
  • platform/wpe/sputnik/: Removed.
  • TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/ios-wk2/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/win/TestExpectations:
  • platform/wincairo/TestExpectations:
  • platform/wpe/TestExpectations:

Remove all sputnik/ lines.

9:50 AM Changeset in webkit [240114] by sbarati@apple.com
  • 19 edits
    1 add
    1 delete in trunk

StringObjectUse should not be a structure check for the original string object structure
https://bugs.webkit.org/show_bug.cgi?id=193483
<rdar://problem/47280522>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/cant-eliminate-string-object-structure-check-when-string-object-is-proven.js: Added.

(foo):
(a.valueOf.0):

Source/JavaScriptCore:

Prior to this patch, the use kind for StringObjectUse implied that we
do a StructureCheck on the input operand for the *original* StringObject
structure. This is generally not how we use UseKinds, so it's no surprise
that this is buggy. A UseKind should map to a set of SpeculatedTypes, not an
actual set of structures. This patch changes the meaning of StringObjectUse
to mean an object where jsDynamicCast<StringObject*> would succeed.

This patch also fixes a bug that was caused by the old and weird usage of the
UseKind to mean StructureCheck. Consider a program like this:
`
S1 = Original StringObject structure
S2 = Original StringObject structure with the field "f" added

a: GetLocal()
b: CheckStructure(@a, {S2})
c: ToString(StringObject:@a)
`

According to AI, in the above program, we would exit at @c, since
StringObject:@a implies a structure check of {S1}, and the intersection
of {S1} and {S2} is {}. So, we'd convert the program to be:
`
a: GetLocal()
b: CheckStructure(@a, {S2})
c: Check(StringObject:@a)
d: Unreachable
`

However, AI would set the proof status of the StringObject:@a edge
to be proven, since the SpeculatedType for @a is SpecStringObject.
This was incorrect of AI to do because the SpeculatedType itself
didn't capture the full power of StringObjectUse. However, having
a UseKind mean CheckStructure is weird precisely because what AI was
doing is a natural fit to how we typically we think about UseKinds.

So the above program would then incorrectly be converted to this, and
we'd crash when reaching the Unreachable node:
`
a: GetLocal()
b: CheckStructure(@a, {S2})
d: Unreachable
`

This patch makes it so that StringObjectUse just means that the object that
filters through a StringObjectUse check must !!jsDynamicCast<StringObject*>.
This is now in line with all other UseKinds. It also lets us simplify a bunch
of other code that had weird checks for the StringObjectUse UseKind.

This patch also makes it so that anywhere where we used to rely on
StringObjectUse implying a structure check we actually emit an explicit
CheckStructure node.

(JSC::exitKindToString):

  • bytecode/ExitKind.h:
  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGCSEPhase.cpp:
  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGEdgeUsesStructure.h: Removed.
  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::attemptToForceStringArrayModeByToStringConversion):
(JSC::DFG::FixupPhase::addCheckStructureForOriginalStringObjectUse):
(JSC::DFG::FixupPhase::fixupToPrimitive):
(JSC::DFG::FixupPhase::fixupToStringOrCallStringConstructor):
(JSC::DFG::FixupPhase::attemptToMakeFastStringAdd):
(JSC::DFG::FixupPhase::isStringObjectUse): Deleted.

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::canOptimizeStringObjectAccess):

  • dfg/DFGMayExit.cpp:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileToStringOrCallStringConstructorOrStringValueOf):
(JSC::DFG::SpeculativeJIT::speculateStringObject):
(JSC::DFG::SpeculativeJIT::speculateStringOrStringObject):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::speculateStringObjectForStructure): Deleted.

  • dfg/DFGUseKind.h:

(JSC::DFG::alreadyChecked):
(JSC::DFG::usesStructure): Deleted.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileToStringOrCallStringConstructorOrStringValueOf):
(JSC::FTL::DFG::LowerDFGToB3::speculateStringObject):
(JSC::FTL::DFG::LowerDFGToB3::speculateStringOrStringObject):
(JSC::FTL::DFG::LowerDFGToB3::speculateStringObjectForCell):
(JSC::FTL::DFG::LowerDFGToB3::speculateStringObjectForStructureID): Deleted.

  • runtime/JSType.cpp:

(WTF::printInternal):

  • runtime/JSType.h:
  • runtime/StringObject.h:

(JSC::StringObject::createStructure):

  • runtime/StringPrototype.h:
9:32 AM Changeset in webkit [240113] by yusukesuzuki@slowstart.org
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Add generateHeapSnapshotForGCDebugging function to dump GCDebugging data
https://bugs.webkit.org/show_bug.cgi?id=193526

Reviewed by Michael Saboff.

This patch adds generateHeapSnapshotForGCDebugging to JSC shell to dump heap snapshot JSON string with GCDebugging option.
GCDebuggingSnapshot mode is slightly different from InspectorSnapshot in terms of both the output data and the behavior.
It always takes full snapshot, and it reports internal data too. This is useful to view the live heap objects after running
the code. Also, generateHeapSnapshotForGCDebugging returns String instead of parsing it to JSObject internally by calling
JSON.parse. If we convert the String to bunch of objects by using JSON.parse, it is difficult to call generateHeapSnapshotForGCDebugging
multiple times for debugging. Currently, it only generates a large string, which is easily distinguishable in the heap inspector tool.

  • jsc.cpp:

(GlobalObject::finishCreation):
(functionGenerateHeapSnapshotForGCDebugging):

8:36 AM Changeset in webkit [240112] by jonlee@apple.com
  • 2 edits in trunk/Source/WebCore

[EME] Remove Amazon Prime Video from quirks list
https://bugs.webkit.org/show_bug.cgi?id=193514
rdar://problem/47295330

Reviewed by Jer Noble.

  • page/Quirks.cpp:

(WebCore::Quirks::hasBrokenEncryptedMediaAPISupportQuirk const):

8:24 AM Changeset in webkit [240111] by Alan Bujtas
  • 4 edits in trunk

[LFC][BFC] An element with transform is a containing block for positioned descendants.
https://bugs.webkit.org/show_bug.cgi?id=193534

Reviewed by Antti Koivisto.

Source/WebCore:

"For elements whose layout is governed by the CSS box model, any value other than none for the transform
property also causes the element to establish a containing block for all descendants."
https://www.w3.org/TR/css-transforms-1/

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::containingBlock const):

Tools:

  • LayoutReloaded/misc/LFC-passing-tests.txt:
8:07 AM Changeset in webkit [240110] by Simon Fraser
  • 6 edits in trunk/Source/WebCore

ScrollingCoordinator: separate updating node geometry from node layers
https://bugs.webkit.org/show_bug.cgi?id=193527

Reviewed by Antti Koivisto.

Updating scrolling tree node layers happens in a different code path from updating geometry;
the former has to be post-flush, when GraphicsLayer has made tiled or structural layers.
Geometry only needs to be updated after layout, and soon we'll do this via compositing updates.

We can also clean up the ScrollingCoordinator API and have a single function that updates
node layers (handling different node types), and separate functions for pushing viewport-constrained
and scrolling node geometry.

No observable behavior change.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::setNodeLayers):
(WebCore::AsyncScrollingCoordinator::setScrollingNodeGeometry):
(WebCore::AsyncScrollingCoordinator::setViewportConstraintedNodeGeometry):
(WebCore::AsyncScrollingCoordinator::updateFrameScrollingNode): Deleted.
(WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode): Deleted.
(WebCore::AsyncScrollingCoordinator::updateNodeLayer): Deleted.
(WebCore::AsyncScrollingCoordinator::updateNodeViewportConstraints): Deleted.

  • page/scrolling/AsyncScrollingCoordinator.h:
  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::setNodeLayers):
(WebCore::ScrollingCoordinator::setScrollingNodeGeometry):
(WebCore::ScrollingCoordinator::setViewportConstraintedNodeGeometry):
(WebCore::ScrollingCoordinator::updateNodeLayer): Deleted.
(WebCore::ScrollingCoordinator::updateNodeViewportConstraints): Deleted.
(WebCore::ScrollingCoordinator::updateFrameScrollingNode): Deleted.
(WebCore::ScrollingCoordinator::updateOverflowScrollingNode): Deleted.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame):
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):

  • rendering/RenderLayerCompositor.h:
8:06 AM Changeset in webkit [240109] by Alan Bujtas
  • 5 edits in trunk

[LFC][BFC][Quirk] Take body padding and border into account when stretching height.
https://bugs.webkit.org/show_bug.cgi?id=193528

Reviewed by Antti Koivisto.

Source/WebCore:

  • layout/blockformatting/BlockFormattingContextQuirks.cpp:

(WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):

  • layout/displaytree/DisplayBox.h:

(WebCore::Display::Box::verticalBorder const):
(WebCore::Display::Box::horizontalBorder const):
(WebCore::Display::Box::verticalPadding const):
(WebCore::Display::Box::horizontalPadding const):

  • page/FrameViewLayoutContext.cpp:

(WebCore::layoutUsingFormattingContext):

Tools:

  • LayoutReloaded/misc/LFC-passing-tests.txt:
8:00 AM Changeset in webkit [240108] by Alan Bujtas
  • 4 edits in trunk

Source/WebCore:
[LFC][BFC] For height computation, the bottom edge of the last line box value should not include top border/padding
https://bugs.webkit.org/show_bug.cgi?id=193520

Reviewed by Antti Koivisto.

This is similar to the other "10.6.3" cases. The bottom edge of the last inline box is in the coordinate systyem
of the containing block's border box (and for content height computation it needs to be mapped to the containing block's content box instead).

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):

Tools:
[LFC][BFC] For height computation, the bottom edge of the last line box value should include top border/padding
https://bugs.webkit.org/show_bug.cgi?id=193520

Reviewed by Antti Koivisto.

  • LayoutReloaded/misc/LFC-passing-tests.txt:
5:52 AM Changeset in webkit [240107] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] unapply-patch step should not update source
https://bugs.webkit.org/show_bug.cgi?id=193234

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/steps.py:

(CleanWorkingDirectory): Use clean-webkit script to clean the working directory.
(UnApplyPatchIfRequired): Use CleanWorkingDirectory as base class.

12:10 AM Changeset in webkit [240106] by yusukesuzuki@slowstart.org
  • 4 edits
    1 add in trunk

[JSC] ToThis omission in DFGByteCodeParser is wrong
https://bugs.webkit.org/show_bug.cgi?id=193513
<rdar://problem/45842236>

Reviewed by Saam Barati.

JSTests:

  • stress/to-this-omission-with-different-strict-modes.js: Added.

(thisA):
(thisAStrictWrapper):

Source/JavaScriptCore:

DFGByteCodeParser omitted ToThis node when we have ToThis(ToThis(value)). This semantics is wrong if ToThis has different semantics
in the sloppy mode and the strict mode. If we convert ToThisInSloppyMode(ToThisInStrictMode(boolean)) to ToThisInStrictMode(boolean),
we get boolean instead of BooleanObject.

This optimization is introduced more than 7 years ago, and from that, we have several optimizations that can remove such ToThis nodes
in BytecodeParser, AI, and Fixup. Furthermore, this optimization is simply wrong since toThis() function of JSCell can be defined
as they want. Before ensuring all the toThis function is safe, we should not fold ToThis(ToThis(value)) => ToThis(value).
This patch just removes the problematic optimization. The performance numbers look neutral.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

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

Jan 16, 2019:

11:46 PM Changeset in webkit [240105] by Simon Fraser
  • 10 edits
    1 copy
    1 add in trunk/Source/WebCore

Stub out scrolling tree classes for overflow scrolling nodes on macOS
https://bugs.webkit.org/show_bug.cgi?id=193524

Reviewed by Antti Koivisto.

Add an empty implementation of ScrollingTreeOverflowScrollingNodeMac for macOS. Change
ScrollingTreeMac::createScrollingTreeNode() to create these nodes.

Minor refactor of RenderLayerCompositor::useCoordinatedScrollingForLayer() code to ask
the scrolling coordinator if it can coordinate scrolling for this layer; no behavior
change for existing code paths.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::coordinatesScrollingForOverflowLayer const):

  • page/scrolling/ScrollingCoordinator.h:
  • page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm:
  • page/scrolling/mac/ScrollingTreeMac.cpp:

(ScrollingTreeMac::createScrollingTreeNode):

  • page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h: Copied from Source/WebCore/page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm.
  • page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm: Added.

(WebCore::ScrollingTreeOverflowScrollingNodeMac::create):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::ScrollingTreeOverflowScrollingNodeMac):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::~ScrollingTreeOverflowScrollingNodeMac):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::commitStateBeforeChildren):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::commitStateAfterChildren):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::updateLayersAfterAncestorChange):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::scrollPosition const):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::setScrollLayerPosition):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::updateLayersAfterDelegatedScroll):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::usesAsyncScrolling const):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::useCoordinatedScrollingForLayer const):

  • rendering/RenderLayerCompositor.h:
9:56 PM Changeset in webkit [240104] by Dewei Zhu
  • 6 edits
    1 add in trunk/Websites/perf.webkit.org

Add UI in analysis task page to show commit testability information.
https://bugs.webkit.org/show_bug.cgi?id=192972

Reviewed by Ryosuke Niwa.

Add UI in custom analysis task configuration and customizable test group form to show testability information.
Fix a bug in 'CustomAnalysisTaskConfigurator._updateCommitSetMap' that 'currentComparison' is incorrectly set.
SQL to update existing database:

ALTER TABLE commits ADD COLUMN IF NOT EXISTS commit_testability varchar(128) DEFAULT NULL;

  • browser-tests/custom-analysis-task-configurator-tests.js: Added a unit test for the bug in

'CustomAnalysisTaskConfigurator._updateCommitSetMap'.
Added a unit test to make sure 'CustomAnalysisTaskConfigurator' still works when commit fetching never returns.

  • browser-tests/index.html: Imported custom-analysis-task-configurator-tests.js'.
  • init-database.sql: Increase 'commit_testability' field length from 64 characters to 128.
  • public/v3/components/custom-analysis-task-configurator.js: Added UI to show testability information.

(CustomAnalysisTaskConfigurator):
(CustomAnalysisTaskConfigurator.prototype._didUpdateSelectedPlatforms): Should reset related field for corresponding
repositories that user does not specify revision.
(CustomAnalysisTaskConfigurator.prototype._updateMapFromSpecifiedRevisionsForConfiguration): A helper function
to update '_specifiedCommits' and '_invalidRevisionsByConfiguration' per '_specifiedRevisions'.
(CustomAnalysisTaskConfigurator.prototype.render):
(CustomAnalysisTaskConfigurator.prototype._updateCommitSetMap): Fixed a bug that 'currentComparison' is incorrectly set.
(CustomAnalysisTaskConfigurator.prototype._computeCommitSet):
(CustomAnalysisTaskConfigurator.prototype.async._fetchCommitsForConfiguration):
(CustomAnalysisTaskConfigurator.prototype.async._resolveRevision):
(CustomAnalysisTaskConfigurator.prototype._buildRevisionTable):
(CustomAnalysisTaskConfigurator.prototype._buildTestabilityList):
(CustomAnalysisTaskConfigurator.prototype._selectRepositoryGroup):
(CustomAnalysisTaskConfigurator.prototype._buildRevisionInput):
(CustomAnalysisTaskConfigurator.cssTemplate):

  • public/v3/components/customizable-test-group-form.js: Added UI to show testability information.

(CustomizableTestGroupForm.prototype._renderCustomRevisionTable):
(CustomizableTestGroupForm.prototype._constructTestabilityRows.):
(CustomizableTestGroupForm.prototype._constructTestabilityRows):
(CustomizableTestGroupForm.prototype._constructRevisionRadioButtons):
Changing either revision editor or radio button should trigger a re-render as testability
information for updated revision may change.
(CustomizableTestGroupForm.cssTemplate):

  • public/v3/models/commit-set.js:

(IntermediateCommitSet.prototype.commitsWithTestability): Renamed from 'commitsWithTestabilityWarnings'.
(IntermediateCommitSet.prototype.commitsWithTestabilityWarnings): Deleted.

7:19 PM Changeset in webkit [240103] by Kocsen Chung
  • 1 edit in branches/safari-607-branch/Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidDriver.cpp

[WebAuthN] Change the nonce in the CTAP kInit command to weak random values
https://bugs.webkit.org/show_bug.cgi?id=192061
<rdar://problem/46471091>

Reviewed by Chris Dumez.

Change the nonce in the CTAP kInit command to weak random values as the nonce is mainly
for being a probabilistically unique global identifier for hand shakes, instead of
preventing replay attacks. Otherwise, it might exhaust system entropy unnecessarily.

The patch also removes all logging when debugging the test case flakiness.

  • UIProcess/WebAuthentication/AuthenticatorManager.cpp:

(WebKit::AuthenticatorManager::respondReceived):
(WebKit::AuthenticatorManager::initTimeOutTimer):
(WebKit::AuthenticatorManager::timeOutTimerFired):

  • UIProcess/WebAuthentication/Cocoa/HidService.mm:

(WebKit::HidService::deviceAdded):

  • UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.cpp:

(WebKit::MockAuthenticatorManager::respondReceivedInternal):

  • UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:

(WebKit::MockHidConnection::send):

  • UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp:

(WebKit::CtapHidAuthenticator::makeCredential):
(WebKit::CtapHidAuthenticator::getAssertion):

  • UIProcess/WebAuthentication/fido/CtapHidDriver.cpp:

(WebKit::CtapHidDriver::Worker::write):
(WebKit::CtapHidDriver::Worker::read):
(WebKit::CtapHidDriver::Worker::returnMessage):
(WebKit::CtapHidDriver::transact):
(WebKit::CtapHidDriver::continueAfterChannelAllocated):
(WebKit::CtapHidDriver::continueAfterResponseReceived):

5:37 PM Changeset in webkit [240102] by aboya@igalia.com
  • 4 edits
    4 adds in trunk/LayoutTests

Unreviewed GTK and WPE test gardening.
https://bugs.webkit.org/show_bug.cgi?id=193521

  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/fetch/security/dangling-markup-mitigation-data-url.tentative.sub-expected.txt: Added.
  • platform/gtk/inspector/canvas/recording-bitmaprenderer-expected.txt:
  • platform/wpe/TestExpectations:
  • platform/wpe/imported/w3c/web-platform-tests/fetch/security/dangling-markup-mitigation-data-url.tentative.sub-expected.txt: Added.
5:35 PM Changeset in webkit [240101] by Justin Fan
  • 4 edits in trunk

[WebGPU] Update vertex-buffer-triangle-strip.html to actually use vertex buffer
https://bugs.webkit.org/show_bug.cgi?id=193473

Reviewed by Dean Jackson and Myles Maxfield.

Source/WebCore:

Also, switch to using the inputSlot instead of the shaderLocation field, as this seems more correct.
As of now I cannot determine an analog for WebGPU's shaderLocation in Metal.

Test: Covered by vertex-buffer-triangle-strip.html. No change in behavior.

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

(WebCore::setInputStateForPipelineDescriptor): Use the inputSlot instead of shaderLocation as bufferIndex.

LayoutTests:

Refactor the vertex shader to use the vertex stage input, rather than buffer resources.

  • webgpu/vertex-buffer-triangle-strip.html:
5:18 PM Changeset in webkit [240100] by youenn@apple.com
  • 21 edits
    2 adds in trunk

Add a new SPI for controlling getUserMedia
https://bugs.webkit.org/show_bug.cgi?id=192793

Reviewed by Eric Carlson.

Source/WebKit:

Some weaknesses of the current getUserMedia/enumerateDevices SPI were found.
In particular:

  • The hash salt should be handled by WebKit not by apps using WebKit.
  • No need to expose the frame URL, only the top level origin is needed.
  • The names of the callback are changed to improve the intent of these callbacks.

Addressed these by creating a new SPI which will replace the current one.
The current SPI will be removed later on.

Did some refactoring by making the callbacks not return false.
Instead, implement the default behavior inside the request objects as deny methods.
Some further refactoring will be done as a follow-up to better align the C API with the Cocoa API.

  • UIProcess/API/APIUIClient.h:

(API::UIClient::decidePolicyForUserMediaPermissionRequest):
(API::UIClient::checkUserMediaPermissionForOrigin):

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageUIClient):

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _mediaCaptureState]):
(-[WKWebView _setMediaCaptureMuted:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/glib/WebKitUIClient.cpp:
  • UIProcess/Cocoa/MediaCaptureUtilities.h: Added.
  • UIProcess/Cocoa/MediaCaptureUtilities.mm: Added.
  • UIProcess/Cocoa/UIDelegate.h:
  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::setDelegate):
(WebKit::requestUserMediaAuthorizationForFrame):
(WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):
(WebKit::UIDelegate::UIClient::checkUserMediaPermissionForOrigin):
(WebKit::UIDelegate::UIClient::mediaCaptureStateDidChange):

  • UIProcess/UserMediaPermissionCheckProxy.h:

(WebKit::UserMediaPermissionCheckProxy::deny):

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
(WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo):

  • UIProcess/UserMediaPermissionRequestProxy.h:

Tools:

  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController _webView:requestUserMediaAuthorizationForFrame:devices:decisionHandler:]):
(-[WK2BrowserWindowController _webView:isMediaCaptureAuthorizedForFrame:decisionHandler:]):

  • TestWebKitAPI/Tests/WebKit/GetUserMediaNavigation.mm:

(-[NavigationWhileGetUserMediaPromptDisplayedUIDelegate _webView:requestMediaCaptureAuthorizationForFrame:devices:decisionHandler:]):

  • TestWebKitAPI/Tests/WebKit/GetUserMediaReprompt.mm:

(-[GetUserMediaRepromptUIDelegate _webView:requestMediaCaptureAuthorizationForFrame:devices:decisionHandler:]):

  • TestWebKitAPI/Tests/WebKit/MediaStreamTrackDetached.mm:

(-[MediaStreamTrackDetachedUIDelegate _webView:requestMediaCaptureAuthorizationForFrame:devices:decisionHandler:]):

  • TestWebKitAPI/Tests/WebKitCocoa/UserMediaDisabled.mm:

(-[UserMediaUIDelegate _webView:requestMediaCaptureAuthorizationForFrame:devices:decisionHandler:]):
(-[UserMediaUIDelegate _webView:isMediaCaptureAuthorizedForFrame:decisionHandler:]):

  • TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm:

(-[SimulateFailedSandboxUIDelegate _webView:requestMediaCaptureAuthorizationForFrame:devices:decisionHandler:]):
(-[SimulateFailedSandboxUIDelegate _webView:isMediaCaptureAuthorizedForFrame:decisionHandler:]):

5:16 PM Changeset in webkit [240099] by youenn@apple.com
  • 12 edits in trunk/Source/WebKit

Pipe cache quota request from Network Process to UIProcess
https://bugs.webkit.org/show_bug.cgi?id=193296

Reviewed by Alex Christensen.

When cache storage hits quota for a given origin, pipe the request back to NetworkProcess.
No record will be put until the quota request is answered.
The request is sent from CacheStorage::Caches to CacheStorage::Engine and to NetworkProcess.
NetworkProcess then sends it to NetworkProcessProxy.
Currently NetworkProcessProxy just answers by keeping the quota as it is.
In the future, NetworkProcessProxy should make a delegate call to let the app using WebKit
make a decision on the quota. This will allow prompting user to bump it as done for other data.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::requestCacheStorageSpace):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::Engine::~Engine):
(WebKit::CacheStorage::Engine::from):
(WebKit::CacheStorage::Engine::Engine):
(WebKit::CacheStorage::Engine::requestSpace):
(WebKit::CacheStorage::Engine::requestSpaceCompleted):

  • NetworkProcess/cache/CacheStorageEngine.h:
  • NetworkProcess/cache/CacheStorageEngineCache.cpp:

(WebKit::CacheStorage::Cache::put):
(WebKit::CacheStorage::Cache::retryPuttingPendingRecords):

  • NetworkProcess/cache/CacheStorageEngineCache.h:
  • NetworkProcess/cache/CacheStorageEngineCaches.cpp:

(WebKit::CacheStorage::Caches::requestSpace):
(WebKit::CacheStorage::Caches::notifyCachesOfRequestSpaceEnd):

  • NetworkProcess/cache/CacheStorageEngineCaches.h:

(WebKit::CacheStorage::Caches::isRequestingSpace const):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::requestCacheStorageSpace):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
5:08 PM Changeset in webkit [240098] by mmaxfield@apple.com
  • 5 edits
    2 adds in trunk/Source/WebCore

[WHLSL] Add the function stage checker
https://bugs.webkit.org/show_bug.cgi?id=193479

Reviewed by Dean Jackson and Robin Morisset.

This is a translation of https://github.com/gpuweb/WHLSL/blob/master/Source/CheckNativeFuncStages.mjs into C++.

No new tests because it isn't hooked up yet. Not enough of the compiler exists to have any meaningful sort
of test. When enough of the compiler is present, I'll port the reference implementation's test suite.

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

(WebCore::WHLSL::AST::CallExpression::function):

  • Modules/webgpu/WHLSL/WHLSLFunctionStageChecker.cpp: Added.

(WebCore::WHLSL::FunctionStageChecker::FunctionStageChecker):
(WebCore::WHLSL::checkFunctionStages):

  • Modules/webgpu/WHLSL/WHLSLFunctionStageChecker.h: Added.
  • Modules/webgpu/WHLSL/WHLSLIntrinsics.cpp:

(WebCore::WHLSL::Intrinsics::add):

  • Modules/webgpu/WHLSL/WHLSLIntrinsics.h:

(WebCore::WHLSL::Intrinsics::ddx const):
(WebCore::WHLSL::Intrinsics::ddy const):
(WebCore::WHLSL::Intrinsics::allMemoryBarrier const):
(WebCore::WHLSL::Intrinsics::deviceMemoryBarrier const):
(WebCore::WHLSL::Intrinsics::groupMemoryBarrier const):
(WebCore::WHLSL::Intrinsics::WTF_ARRAY_LENGTH):

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
4:59 PM Changeset in webkit [240097] by mmaxfield@apple.com
  • 10 edits in trunk/Source/WebCore

[WHLSL] Delete the 'restricted' keyword
https://bugs.webkit.org/show_bug.cgi?id=193469

Reviewed by Dean Jackson and Robin Morisset.

This change mirrors https://github.com/gpuweb/WHLSL/pull/304 in the reference implementation.

No new tests because it isn't hooked up yet. Not enough of the compiler exists to have any meaningful sort
of test. When enough of the compiler is present, I'll port the reference implementation's test suite.

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

(WebCore::WHLSL::AST::FunctionDefinition::FunctionDefinition):
(WebCore::WHLSL::AST::FunctionDefinition::block):
(WebCore::WHLSL::AST::FunctionDefinition::restricted const): Deleted.

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

(WebCore::WHLSL::AST::NativeFunctionDeclaration::NativeFunctionDeclaration):
(WebCore::WHLSL::AST::NativeFunctionDeclaration::restricted const): Deleted.

  • Modules/webgpu/WHLSL/WHLSLChecker.cpp:

(WebCore::WHLSL::resolveWithOperatorAnderIndexer):
(WebCore::WHLSL::resolveWithOperatorLength):
(WebCore::WHLSL::resolveWithReferenceComparator):

  • Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.cpp:

(WebCore::WHLSL::resolveFunctionOverloadImpl):

  • Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp:

(WebCore::WHLSL::synthesizeArrayOperatorLength):

  • Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:

(WebCore::WHLSL::synthesizeConstructors):

  • Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp:

(WebCore::WHLSL::synthesizeEnumerationFunctions):

  • Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp:

(WebCore::WHLSL::synthesizeStructureAccessors):

4:53 PM Changeset in webkit [240096] by mmaxfield@apple.com
  • 4 edits
    2 adds in trunk/Source/WebCore

[WHLSL] Implement the recursion checker
https://bugs.webkit.org/show_bug.cgi?id=193436

Reviewed by Saam Barati.

This is a translation of https://github.com/gpuweb/WHLSL/blob/master/Source/RecursionChecker.mjs into C++.

No new tests because it isn't hooked up yet. Not enough of the compiler exists to have any meaningful sort
of test. When enough of the compiler is present, I'll port the reference implementation's test suite.

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

(WebCore::WHLSL::AST::CallExpression::function):

  • Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp: Copied from Source/WebCore/Modules/webgpu/WHLSL/WHLSLRecursiveTypeChecker.cpp.

(WebCore::WHLSL::checkRecursion):

  • Modules/webgpu/WHLSL/WHLSLRecursionChecker.h: Added.
  • Modules/webgpu/WHLSL/WHLSLRecursiveTypeChecker.cpp:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
4:31 PM Changeset in webkit [240095] by mmaxfield@apple.com
  • 7 edits
    1 copy
    1 add in trunk/Source/WebCore

[WHLSL] Add the literal type checker
https://bugs.webkit.org/show_bug.cgi?id=193430

Reviewed by Dean Jackson.

This is a translation of https://github.com/gpuweb/WHLSL/blob/master/Source/LiteralTypeChecker.mjs into C++.

No new tests because it isn't hooked up yet. Not enough of the compiler exists to have any meaningful sort
of test. When enough of the compiler is present, I'll port the reference implementation's test suite.

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

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

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

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

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

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

  • Modules/webgpu/WHLSL/WHLSLLiteralTypeChecker.cpp: Added.

(WebCore::WHLSL::getNativeTypeDeclaration):
(WebCore::WHLSL::LiteralTypeChecker::visit):
(WebCore::WHLSL::checkLiteralTypes):

  • Modules/webgpu/WHLSL/WHLSLLiteralTypeChecker.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.h.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
4:20 PM Changeset in webkit [240094] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

sendBeacon to previously-unvisited https domain always fails
https://bugs.webkit.org/show_bug.cgi?id=193508

Reviewed by Geoffrey Garen.

  • NetworkProcess/PingLoad.cpp:

(WebKit::PingLoad::didReceiveChallenge):
If a ping load is doing a TLS handshake, continue if the server has good certificates.

4:17 PM Changeset in webkit [240093] by Alan Bujtas
  • 4 edits in trunk

[LFC][BFC] Inflow non-replaced used width should not be negative.
https://bugs.webkit.org/show_bug.cgi?id=193495

Reviewed by Antti Koivisto.

Source/WebCore:

min-width (initial value 0) enforces non-negative used width.

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::computeWidthAndMargin const):

Tools:

  • LayoutReloaded/misc/LFC-passing-tests.txt:
4:14 PM Changeset in webkit [240092] by mmaxfield@apple.com
  • 7 edits in trunk/Source/WebCore

[WHLSL] Add a handwritten parser
https://bugs.webkit.org/show_bug.cgi?id=192355

Reviewed by Dean Jackson.

The parser is a mechanical representation of WHLSL's ANTLR grammar at
https://github.com/gpuweb/WHLSL/blob/master/Spec/WHLSL.g4. The parser
uses Expected<> to return an appropriate Error string when parsing fails.

This patch doesn't include the AST nodes themselves - those are in
https://bugs.webkit.org/show_bug.cgi?id=192991. I split up the patch to
aid easier reviewing.

No new tests because the parser isn't hooked up yet.

  • Modules/webgpu/WHLSL/WHLSLParser.cpp:

(WebCore::WHLSL::Parser::Parser):
(WebCore::WHLSL::Parser::parse):
(WebCore::WHLSL::Parser::fail):
(WebCore::WHLSL::Parser::peek):
(WebCore::WHLSL::Parser::tryType):
(WebCore::WHLSL::Parser::tryTypes):
(WebCore::WHLSL::Parser::consumeType):
(WebCore::WHLSL::Parser::consumeTypes):
(WebCore::WHLSL::digitValue):
(WebCore::WHLSL::intLiteralToInt):
(WebCore::WHLSL::uintLiteralToUint):
(WebCore::WHLSL::floatLiteralToFloat):
(WebCore::WHLSL::Parser::consumeIntegralLiteral):
(WebCore::WHLSL::Parser::consumeNonNegativeIntegralLiteral):
(WebCore::WHLSL::recognizeSimpleUnsignedInteger):
(WebCore::WHLSL::Parser::parseConstantExpression):
(WebCore::WHLSL::Parser::parseTypeArgument):
(WebCore::WHLSL::Parser::parseTypeArguments):
(WebCore::WHLSL::Parser::parseTypeSuffixAbbreviated):
(WebCore::WHLSL::Parser::parseTypeSuffixNonAbbreviated):
(WebCore::WHLSL::Parser::parseAddressSpaceType):
(WebCore::WHLSL::Parser::parseNonAddressSpaceType):
(WebCore::WHLSL::Parser::parseType):
(WebCore::WHLSL::Parser::parseTypeDefinition):
(WebCore::WHLSL::Parser::parseBuiltInSemantic):
(WebCore::WHLSL::Parser::parseResourceSemantic):
(WebCore::WHLSL::Parser::parseSpecializationConstantSemantic):
(WebCore::WHLSL::Parser::parseStageInOutSemantic):
(WebCore::WHLSL::Parser::parseSemantic):
(WebCore::WHLSL::Parser::parseQualifiers):
(WebCore::WHLSL::Parser::parseStructureElement):
(WebCore::WHLSL::Parser::parseStructureDefinition):
(WebCore::WHLSL::Parser::parseEnumerationDefinition):
(WebCore::WHLSL::Parser::parseEnumerationMember):
(WebCore::WHLSL::Parser::parseNativeTypeDeclaration):
(WebCore::WHLSL::Parser::parseNumThreadsFunctionAttribute):
(WebCore::WHLSL::Parser::parseAttributeBlock):
(WebCore::WHLSL::Parser::parseParameter):
(WebCore::WHLSL::Parser::parseParameters):
(WebCore::WHLSL::Parser::parseFunctionDefinition):
(WebCore::WHLSL::Parser::parseEntryPointFunctionDeclaration):
(WebCore::WHLSL::Parser::parseRegularFunctionDeclaration):
(WebCore::WHLSL::Parser::parseOperatorFunctionDeclaration):
(WebCore::WHLSL::Parser::parseFunctionDeclaration):
(WebCore::WHLSL::Parser::parseNativeFunctionDeclaration):
(WebCore::WHLSL::Parser::parseBlock):
(WebCore::WHLSL::Parser::parseBlockBody):
(WebCore::WHLSL::Parser::parseIfStatement):
(WebCore::WHLSL::Parser::parseSwitchStatement):
(WebCore::WHLSL::Parser::parseSwitchCase):
(WebCore::WHLSL::Parser::parseForLoop):
(WebCore::WHLSL::Parser::parseWhileLoop):
(WebCore::WHLSL::Parser::parseDoWhileLoop):
(WebCore::WHLSL::Parser::parseVariableDeclaration):
(WebCore::WHLSL::Parser::parseVariableDeclarations):
(WebCore::WHLSL::Parser::parseStatement):
(WebCore::WHLSL::Parser::parseEffectfulExpression):
(WebCore::WHLSL::Parser::parseEffectfulAssignment):
(WebCore::WHLSL::Parser::parseEffectfulPrefix):
(WebCore::WHLSL::Parser::parseEffectfulSuffix):
(WebCore::WHLSL::Parser::parseLimitedSuffixOperator):
(WebCore::WHLSL::Parser::parseSuffixOperator):
(WebCore::WHLSL::Parser::parseExpression):
(WebCore::WHLSL::Parser::parseTernaryConditional):
(WebCore::WHLSL::Parser::parseAssignment):
(WebCore::WHLSL::Parser::parsePossibleTernaryConditional):
(WebCore::WHLSL::Parser::parsePossibleLogicalBinaryOperation):
(WebCore::WHLSL::Parser::parsePossibleRelationalBinaryOperation):
(WebCore::WHLSL::Parser::parsePossibleShift):
(WebCore::WHLSL::Parser::parsePossibleAdd):
(WebCore::WHLSL::Parser::parsePossibleMultiply):
(WebCore::WHLSL::Parser::parsePossiblePrefix):
(WebCore::WHLSL::Parser::parsePossibleSuffix):
(WebCore::WHLSL::Parser::parseCallExpression):
(WebCore::WHLSL::Parser::parseTerm):

  • Modules/webgpu/WHLSL/WHLSLParser.h:

(WebCore::WHLSL::Parser::Error::Error):
(WebCore::WHLSL::Parser::backtrackingScope):
(WebCore::WHLSL::Parser::SuffixExpression::SuffixExpression):
(WebCore::WHLSL::Parser::SuffixExpression::operator bool const):

3:54 PM Changeset in webkit [240091] by Alan Coon
  • 2 edits in tags/Safari-608.1.1/Source/WebKit

Cherry-pick r240087. rdar://problem/47297304

Revert r239938
https://bugs.webkit.org/show_bug.cgi?id=193267
<rdar://problem/47297304>

  • Configurations/WebContent-iOS.entitlements:

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

3:52 PM Changeset in webkit [240090] by sihui_liu@apple.com
  • 2 edits in trunk/Source/WebCore

IndexedDB: UniqueIDBDatabase should not be freed if the database task queue is not empty.
https://bugs.webkit.org/show_bug.cgi?id=193093

Reviewed by Brady Eidson.

performUnconditionalDeleteBackingStore killed the database task queue immediately, but performPrefetchCursor
task may be scheduled behind performUnconditionalDeleteBackingStore on database thread.

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::shutdownForClose):
(WebCore::IDBServer::UniqueIDBDatabase::performPrefetchCursor):
(WebCore::IDBServer::UniqueIDBDatabase::isDoneWithHardClose):

3:50 PM Changeset in webkit [240089] by youenn@apple.com
  • 4 edits in trunk/Source/WebKit

ASSERTION FAILED: m_networkLoadInformationByID.contains(identifier) in WebKit::NetworkConnectionToWebProcess::addNetworkLoadInformationMetrics
https://bugs.webkit.org/show_bug.cgi?id=189097
<rdar://problem/43856423>

Reviewed by Alex Christensen.

In case where the inspector is launched, it will instruct the NetworkConnectionToWebProcess to start capturing network metrics.
If this happens in the middle of a load, addNetworkLoadInformationMetrics might fail since addNetworkLoadInformation will not be called.
To fix this issue, store whether to capture metrics at NetworkResourceLoader level.

To ensure that the case of switching back and forth capture of metrics, disable loader capture of metrics whenver NetworkConnectionToWebProcess is asked to.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::setCaptureExtraNetworkLoadMetricsEnabled):

  • NetworkProcess/NetworkConnectionToWebProcess.h:

(WebKit::NetworkConnectionToWebProcess::addNetworkLoadInformationMetrics):

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::m_shouldCaptureExtraNetworkLoadMetrics):
(WebKit::NetworkResourceLoader::shouldCaptureExtraNetworkLoadMetrics const):

  • NetworkProcess/NetworkResourceLoader.h:
3:50 PM Changeset in webkit [240088] by Alan Coon
  • 1 copy in tags/Safari-608.1.1

Tag Safari-608.1.1.

3:32 PM Changeset in webkit [240087] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Revert r239938
https://bugs.webkit.org/show_bug.cgi?id=193267
<rdar://problem/47297304>

  • Configurations/WebContent-iOS.entitlements:
3:28 PM Changeset in webkit [240086] by Alan Coon
  • 3 edits in branches/safari-607-branch/Source/WebCore

Apply patch. rdar://problem/47260377

Cherry-pick r240039. rdar://problem/47260377

IndexedDB: leak WebIDBConnectionToClient for retain cycle
https://bugs.webkit.org/show_bug.cgi?id=193097
<rdar://problem/46899601>

Reviewed by David Kilzer.

Fix API test failure after r239887. After removing the retain cycle, IDBConnectionToClient will no longer live
forever so make sure it is not destructed before UniqueIDBDatabaseConnection unregisters itself.

  • Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp: (WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection): (WebCore::IDBServer::UniqueIDBDatabaseConnection::~UniqueIDBDatabaseConnection): (WebCore::IDBServer::UniqueIDBDatabaseConnection::fireVersionChangeEvent): (WebCore::IDBServer::UniqueIDBDatabaseConnection::didAbortTransaction): (WebCore::IDBServer::UniqueIDBDatabaseConnection::didCommitTransaction): (WebCore::IDBServer::UniqueIDBDatabaseConnection::didCreateObjectStore): (WebCore::IDBServer::UniqueIDBDatabaseConnection::didDeleteObjectStore): (WebCore::IDBServer::UniqueIDBDatabaseConnection::didRenameObjectStore): (WebCore::IDBServer::UniqueIDBDatabaseConnection::didClearObjectStore): (WebCore::IDBServer::UniqueIDBDatabaseConnection::didCreateIndex): (WebCore::IDBServer::UniqueIDBDatabaseConnection::didDeleteIndex): (WebCore::IDBServer::UniqueIDBDatabaseConnection::didRenameIndex):
  • Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:

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

3:28 PM Changeset in webkit [240085] by Alan Coon
  • 8 edits in branches/safari-607-branch/Source

Apply patch. rdar://problem/47260377

Cherry-pick r239887. rdar://problem/47260377

IndexedDB: leak WebIDBConnectionToClient for retain cycle
https://bugs.webkit.org/show_bug.cgi?id=193097
<rdar://problem/46899601>

Reviewed by Brady Eidson.

Source/WebCore:

Let IDBConnectionToClient hold a WeakPtr of IDBConnectionToClientDelegate.

  • Modules/indexeddb/server/IDBConnectionToClient.cpp: (WebCore::IDBServer::IDBConnectionToClient::IDBConnectionToClient): (WebCore::IDBServer::IDBConnectionToClient::identifier const): (WebCore::IDBServer::IDBConnectionToClient::didDeleteDatabase): (WebCore::IDBServer::IDBConnectionToClient::didOpenDatabase): (WebCore::IDBServer::IDBConnectionToClient::didAbortTransaction): (WebCore::IDBServer::IDBConnectionToClient::didCreateObjectStore): (WebCore::IDBServer::IDBConnectionToClient::didDeleteObjectStore): (WebCore::IDBServer::IDBConnectionToClient::didRenameObjectStore): (WebCore::IDBServer::IDBConnectionToClient::didClearObjectStore): (WebCore::IDBServer::IDBConnectionToClient::didCreateIndex): (WebCore::IDBServer::IDBConnectionToClient::didDeleteIndex): (WebCore::IDBServer::IDBConnectionToClient::didRenameIndex): (WebCore::IDBServer::IDBConnectionToClient::didPutOrAdd): (WebCore::IDBServer::IDBConnectionToClient::didGetRecord): (WebCore::IDBServer::IDBConnectionToClient::didGetAllRecords): (WebCore::IDBServer::IDBConnectionToClient::didGetCount): (WebCore::IDBServer::IDBConnectionToClient::didDeleteRecord): (WebCore::IDBServer::IDBConnectionToClient::didOpenCursor): (WebCore::IDBServer::IDBConnectionToClient::didIterateCursor): (WebCore::IDBServer::IDBConnectionToClient::didCommitTransaction): (WebCore::IDBServer::IDBConnectionToClient::fireVersionChangeEvent): (WebCore::IDBServer::IDBConnectionToClient::didStartTransaction): (WebCore::IDBServer::IDBConnectionToClient::didCloseFromServer): (WebCore::IDBServer::IDBConnectionToClient::notifyOpenDBRequestBlocked): (WebCore::IDBServer::IDBConnectionToClient::didGetAllDatabaseNames):
  • Modules/indexeddb/server/IDBConnectionToClient.h:
  • Modules/indexeddb/server/IDBConnectionToClientDelegate.h:

Source/WebKit:

Let WebIDBConnectionToClient hold reference to IPC::Connection instead of NetworkConnectionToWebProcess to break
the cycle.

  • NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp: (WebKit::WebIDBConnectionToClient::create): (WebKit::WebIDBConnectionToClient::WebIDBConnectionToClient): (WebKit::WebIDBConnectionToClient::messageSenderConnection):
  • NetworkProcess/IndexedDB/WebIDBConnectionToClient.h:
  • NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::establishIDBConnectionToServer):

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

3:28 PM Changeset in webkit [240084] by Alan Coon
  • 3 edits
    1 copy
    1 add in branches/safari-607-branch/LayoutTests

Cherry-pick r239958. rdar://problem/47260195

Unreviewed, test fixes after r239852.

  • http/wpt/webauthn/public-key-credential-create-success-hid.https.html:
  • http/wpt/webauthn/public-key-credential-create-success-u2f.https.html:
  • http/wpt/webauthn/public-key-credential-get-success-hid.https.html:
  • http/wpt/webauthn/public-key-credential-get-success-u2f.https.html:

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

3:28 PM Changeset in webkit [240083] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebKit

Cherry-pick r239852. rdar://problem/47260195

[WebAuthN] Change the nonce in the CTAP kInit command to weak random values
https://bugs.webkit.org/show_bug.cgi?id=192061
<rdar://problem/46471091>

Reviewed by Chris Dumez.

Change the nonce in the CTAP kInit command to weak random values as the nonce is mainly
for being a probabilistically unique global identifier for hand shakes, instead of
preventing replay attacks. Otherwise, it might exhaust system entropy unnecessarily.

The patch also removes all logging when debugging the test case flakiness.

  • UIProcess/WebAuthentication/AuthenticatorManager.cpp: (WebKit::AuthenticatorManager::respondReceived): (WebKit::AuthenticatorManager::initTimeOutTimer): (WebKit::AuthenticatorManager::timeOutTimerFired):
  • UIProcess/WebAuthentication/Cocoa/HidService.mm: (WebKit::HidService::deviceAdded):
  • UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.cpp: (WebKit::MockAuthenticatorManager::respondReceivedInternal):
  • UIProcess/WebAuthentication/Mock/MockHidConnection.cpp: (WebKit::MockHidConnection::send):
  • UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp: (WebKit::CtapHidAuthenticator::makeCredential): (WebKit::CtapHidAuthenticator::getAssertion):
  • UIProcess/WebAuthentication/fido/CtapHidDriver.cpp: (WebKit::CtapHidDriver::Worker::write): (WebKit::CtapHidDriver::Worker::read): (WebKit::CtapHidDriver::Worker::returnMessage): (WebKit::CtapHidDriver::transact): (WebKit::CtapHidDriver::continueAfterChannelAllocated): (WebKit::CtapHidDriver::continueAfterResponseReceived):

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

3:28 PM Changeset in webkit [240082] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebKit

Cherry-pick r239757. rdar://problem/47260195

[Mac] Layout Test http/wpt/webauthn/public-key-credential-create-success-hid.https.html and http/wpt/webauthn/public-key-credential-get-success-hid.https.html are flaky
https://bugs.webkit.org/show_bug.cgi?id=192061

Reviewed by Dewei Zhu.

Part 6.

Add some additional temporary logging info to determine if data is actually sent.
Once the bug is determined and fixed, we should remove all logging added in this patch.

  • UIProcess/WebAuthentication/Mock/MockHidConnection.cpp: (WebKit::MockHidConnection::send):

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

3:28 PM Changeset in webkit [240081] by Alan Coon
  • 6 edits in branches/safari-607-branch/Source/WebKit

[WebAuthN] Change the nonce in the CTAP kInit command to weak random values
https://bugs.webkit.org/show_bug.cgi?id=192061
<rdar://problem/46471091>

Reviewed by Chris Dumez.

Change the nonce in the CTAP kInit command to weak random values as the nonce is mainly
for being a probabilistically unique global identifier for hand shakes, instead of
preventing replay attacks. Otherwise, it might exhaust system entropy unnecessarily.

The patch also removes all logging when debugging the test case flakiness.

  • UIProcess/WebAuthentication/AuthenticatorManager.cpp:

(WebKit::AuthenticatorManager::respondReceived):
(WebKit::AuthenticatorManager::initTimeOutTimer):
(WebKit::AuthenticatorManager::timeOutTimerFired):

  • UIProcess/WebAuthentication/Cocoa/HidService.mm:

(WebKit::HidService::deviceAdded):

  • UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.cpp:

(WebKit::MockAuthenticatorManager::respondReceivedInternal):

  • UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:

(WebKit::MockHidConnection::send):

  • UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp:

(WebKit::CtapHidAuthenticator::makeCredential):
(WebKit::CtapHidAuthenticator::getAssertion):

  • UIProcess/WebAuthentication/fido/CtapHidDriver.cpp:

(WebKit::CtapHidDriver::Worker::write):
(WebKit::CtapHidDriver::Worker::read):
(WebKit::CtapHidDriver::Worker::returnMessage):
(WebKit::CtapHidDriver::transact):
(WebKit::CtapHidDriver::continueAfterChannelAllocated):
(WebKit::CtapHidDriver::continueAfterResponseReceived):

3:28 PM Changeset in webkit [240080] by Alan Coon
  • 7 edits in branches/safari-607-branch/Source

Versioning.

3:28 PM Changeset in webkit [240079] by Alan Coon
  • 26 edits
    7 adds in branches/safari-607-branch

Cherry-pick r239904. rdar://problem/47260304

Have prefers-color-scheme: light always match on macOS versions before Mojave.
https://bugs.webkit.org/show_bug.cgi?id=191655
rdar://problem/46074680

Reviewed by Megan Gardner.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig: ENABLE_DARK_MODE_CSS_macosx for all OS versions.

Source/WebCore:

Tests: css-dark-mode/older-systems/prefers-color-scheme.html

css-dark-mode/older-systems/supported-color-schemes-css.html
css-dark-mode/older-systems/supported-color-schemes.html

Use new HAVE(OS_DARK_MODE_SUPPORT) to make it easier to find code.
Added HAVE(OS_DARK_MODE_SUPPORT) around more bits to make it work on older systems.

  • Configurations/FeatureDefines.xcconfig:
  • dom/Document.cpp: (WebCore::Document::useDarkAppearance const):
  • inspector/agents/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::enable):
  • page/Page.cpp: (WebCore::Page::setUseDarkAppearance): (WebCore::Page::useDarkAppearance const): (WebCore::Page::setUseDarkAppearanceOverride):
  • platform/mac/LocalDefaultSystemAppearance.h: (WebCore::LocalDefaultSystemAppearance::usingDarkAppearance const):
  • platform/mac/LocalDefaultSystemAppearance.mm: (WebCore::LocalDefaultSystemAppearance::LocalDefaultSystemAppearance): (WebCore::LocalDefaultSystemAppearance::~LocalDefaultSystemAppearance):
  • platform/mac/ScrollAnimatorMac.mm:
  • rendering/RenderThemeMac.mm: (-[WebCoreTextFieldCell _adjustedCoreUIDrawOptionsForDrawingBordersOnly:]): (-[WebListButtonCell drawWithFrame:inView:]): (WebCore::RenderThemeMac::platformInactiveSelectionBackgroundColor const): (WebCore::RenderThemeMac::platformInactiveSelectionForegroundColor const): (WebCore::RenderThemeMac::platformActiveListBoxSelectionBackgroundColor const): (WebCore::RenderThemeMac::platformInactiveListBoxSelectionBackgroundColor const): (WebCore::RenderThemeMac::platformInactiveListBoxSelectionForegroundColor const): (WebCore::RenderThemeMac::systemColor const):

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig: ENABLE_DARK_MODE_CSS_macosx for all OS versions.

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig: ENABLE_DARK_MODE_CSS_macosx for all OS versions.
  • UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::effectiveAppearanceIsDark):
  • UIProcess/RemoteLayerTree/mac/ScrollerMac.mm:

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig: ENABLE_DARK_MODE_CSS_macosx for all OS versions.
  • WebView/WebView.mm: (-[WebView _effectiveAppearanceIsDark]):

Source/WTF:

  • wtf/Platform.h: Define HAVE_OS_DARK_MODE_SUPPORT on macOS 10.14.

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig: ENABLE_DARK_MODE_CSS_macosx for all OS versions.
  • TestWebKitAPI/Tests/WebKit/mac/ForceLightAppearanceInBundle.mm:

LayoutTests:

  • css-dark-mode/older-systems/prefers-color-scheme-expected.txt: Added.
  • css-dark-mode/older-systems/prefers-color-scheme.html: Added.
  • css-dark-mode/older-systems/supported-color-schemes-css-expected.txt: Added.
  • css-dark-mode/older-systems/supported-color-schemes-css.html: Added.
  • css-dark-mode/older-systems/supported-color-schemes-expected.txt: Added.
  • css-dark-mode/older-systems/supported-color-schemes.html: Added.
  • platform/mac/TestExpectations:

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

3:28 PM Changeset in webkit [240078] by Alan Coon
  • 4 edits in branches/safari-607-branch/Source/JavaScriptCore

Cherry-pick r239898. rdar://problem/47260206

Unreviewed, fix scope check assertions
https://bugs.webkit.org/show_bug.cgi?id=193308

  • bytecode/CodeBlock.cpp: (JSC::CodeBlock::notifyLexicalBindingShadowing):
  • runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::notifyLexicalBindingShadowing):
  • runtime/ProgramExecutable.cpp: (JSC::ProgramExecutable::initializeGlobalProperties):

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

3:28 PM Changeset in webkit [240077] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WTF

Cherry-pick r239894. rdar://problem/47260353

Follow-up: WorkQueue::concurrentApply() passes a raw pointer to a temporary String to Thread::create().
https://bugs.webkit.org/show_bug.cgi?id=191350

  • wtf/WorkQueue.cpp: (WTF::WorkQueue::concurrentApply): Fix whitespace.

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

3:28 PM Changeset in webkit [240076] by Alan Coon
  • 3 edits in branches/safari-607-branch/Source/WebCore

Cherry-pick r239889. rdar://problem/47260233

REGRESSION(r239419): Crash in AudioSourceProviderAVFObjC::~AudioSourceProviderAVFObjC()
https://bugs.webkit.org/show_bug.cgi?id=193342
<rdar://problem/47119836>

Reviewed by Eric Carlson.

Make the TapStorage used by AudioSourceProviderAVFObjC thread-safe RefCounted.

  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h:
  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm: (WebCore::AudioSourceProviderAVFObjC::initCallback): (WebCore::AudioSourceProviderAVFObjC::finalizeCallback):

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

3:28 PM Changeset in webkit [240075] by Alan Coon
  • 19 edits in branches/safari-607-branch

Cherry-pick r239888. rdar://problem/47260286

Compile out Web API Statistics Collection
https://bugs.webkit.org/show_bug.cgi?id=193370
<rdar://problem/45388584>

Reviewed by Brent Fulgham.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Defined ENABLE_WEB_API_STATISTICS, off by default.

Source/WebCore:

No new tests. This patch disables functionality. The associated tests
are skipped.

These functions are now no-ops unless web API statistics is enabled.

  • Configurations/FeatureDefines.xcconfig:
  • loader/ResourceLoadObserver.cpp: (WebCore::ResourceLoadObserver::logFontLoad): (WebCore::ResourceLoadObserver::logCanvasRead): (WebCore::ResourceLoadObserver::logCanvasWriteOrMeasure): (WebCore::ResourceLoadObserver::logNavigatorAPIAccessed): (WebCore::ResourceLoadObserver::logScreenAPIAccessed):
  • loader/ResourceLoadStatistics.cpp: (WebCore::ResourceLoadStatistics::encode const): (WebCore::ResourceLoadStatistics::decode): (WebCore::ResourceLoadStatistics::toString const): (WebCore::ResourceLoadStatistics::merge):
  • loader/ResourceLoadStatistics.h:

The associated struct members are skipped unless web API
statistics is enabled.

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Defined ENABLE_WEB_API_STATISTICS, off by default.

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:

Defined ENABLE_WEB_API_STATISTICS, off by default.

  • Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<ResourceLoadStatistics>::encode):

Skipped encoding of web API statistics.

(IPC::ArgumentCoder<ResourceLoadStatistics>::decode):

Skipped decoding of web API statistics.

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Defined ENABLE_WEB_API_STATISTICS, off by default.

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

Defined ENABLE_WEB_API_STATISTICS, off by default.

LayoutTests:

  • platform/ios-wk2/TestExpectations:

http/tests/webAPIStatistics skipped.

  • platform/mac-wk2/TestExpectations:

http/tests/webAPIStatistics skipped.

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

3:28 PM Changeset in webkit [240074] by Alan Coon
  • 5 edits
    1 add in branches/safari-607-branch

Cherry-pick r239882. rdar://problem/47260361

DFG combined liveness can be wrong for terminal basic blocks
https://bugs.webkit.org/show_bug.cgi?id=193304
<rdar://problem/45268632>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/dfg-combined-liveness-consider-terminal-blocks-bytecode-liveness.js: Added.

Source/JavaScriptCore:

If a block doesn't have any successors, it can't rely on the typical
backwards liveness propagation that CombinedLiveness was doing. The phase
first got what was live in bytecode and IR at the heads of each block. Then
for each block, it made the live at tail the union of the live at head for
each successor. For a terminal block though, this could be wrong. We could
end up saying nothing is live even though many things may be live in bytecode.
We must account for what's bytecode live at the end of the block. Consider a
block that ends with:
`
ForceOSRExit
Unreachable
`

Things may definitely be live in bytecode at the tail. However, we'll
report nothing as being alive. This probably subtly breaks many analyses,
but we have a test case of it breaking the interference analysis that
the ArgumentsEliminationPhase performs.

  • dfg/DFGBasicBlock.h: (JSC::DFG::BasicBlock::last const):
  • dfg/DFGCombinedLiveness.cpp: (JSC::DFG::addBytecodeLiveness): (JSC::DFG::liveNodesAtHead): (JSC::DFG::CombinedLiveness::CombinedLiveness):
  • dfg/DFGCombinedLiveness.h:

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

3:27 PM Changeset in webkit [240073] by Alan Coon
  • 7 edits in branches/safari-607-branch/Source

Cherry-pick r239880. rdar://problem/47260310

REGRESSION (PSON): Firefox app lacks Open in New Tab in menu
https://bugs.webkit.org/show_bug.cgi?id=193366
<rdar://problem/46097212>

Reviewed by Simon Fraser.

Source/WebCore:

  • platform/RuntimeApplicationChecks.h:
  • platform/cocoa/RuntimeApplicationChecksCocoa.mm: (WebCore::IOSApplication::isFirefox): Add a Firefox Mobile bundle check.

Source/WebKit:

A pair of unrelated changes broke Firefox's use of WKWebView internals
to override the long-press menu. Maintain binary compatibility by
introducing linked-on-or-after checks.

  • UIProcess/Cocoa/VersionChecks.h:
  • UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::createWebPage): Disable PSON in Firefox when linked against an SDK where PSON wasn't enabled by default. Because gestures are very stateful, we always swap them out when swapping processes (changing that behavior is fairly risky). Also, we don't always inform the client when we swap processes (only when the process actually crashes), so they currently don't re-adjust the gesture recognizers when a PSON swap occurs.
  • UIProcess/ios/WKContentView.mm: (-[WKContentView _commonInitializationWithProcessPool:configuration:]): Synchronously install gesture recognizers under -init when linked against an SDK before the version that introduces lazy gesture recognizer installation. r237331 is an optimization that made us lazily install gestures when the view is parented, but Firefox (and potentially other clients) depend on them being installed synchronously in order to find and override them.

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

3:27 PM Changeset in webkit [240072] by Alan Coon
  • 16 edits
    15 adds in branches/safari-607-branch

Cherry-pick r239879. rdar://problem/47260206

[JSC] Global lexical bindings can shadow global variables if it is configurable = true
https://bugs.webkit.org/show_bug.cgi?id=193308
<rdar://problem/45546542>

Reviewed by Saam Barati.

JSTests:

  • stress/const-lexical-binding-shadow-existing-global-property-ftl.js: Added. (shouldThrow): (shouldBe): (foo): (get shouldThrow):
  • stress/const-lexical-binding-shadow-existing-global-property-tdz-ftl.js: Added. (shouldThrow): (shouldBe): (foo): (get shouldBe): (get shouldThrow): (get return):
  • stress/const-lexical-binding-shadow-existing-global-property-tdz.js: Added. (shouldThrow): (shouldBe): (foo): (get shouldBe): (get shouldThrow):
  • stress/const-lexical-binding-shadow-existing-global-property.js: Added. (shouldThrow): (shouldBe): (foo):
  • stress/const-lexical-binding-shadowing-global-properties-and-eval-injection.js: Added. (shouldThrow): (shouldBe): (foo):
  • stress/global-add-function-should-not-be-shadowed-by-lexical-bindings.js: Added. (shouldThrow):
  • stress/global-static-variables-should-not-be-shadowed-by-lexical-bindings.js: Added. (shouldThrow):
  • stress/let-lexical-binding-shadow-existing-global-property-ftl.js: Added. (shouldThrow): (shouldBe): (foo):
  • stress/let-lexical-binding-shadow-existing-global-property-tdz-ftl.js: Added. (shouldThrow): (shouldBe): (foo): (get shouldBe): (get shouldThrow): (get return):
  • stress/let-lexical-binding-shadow-existing-global-property-tdz.js: Added. (shouldThrow): (shouldBe): (foo): (get shouldBe): (get shouldThrow):
  • stress/let-lexical-binding-shadow-existing-global-property.js: Added. (shouldThrow): (shouldBe): (foo):
  • stress/let-lexical-binding-shadowing-global-properties-and-eval-injection.js: Added. (shouldThrow): (shouldBe): (foo):

Source/JavaScriptCore:

Previously, we assumed that lexical bindings in JSGlobalLexicalEnvironment cannot shadow existing global properties.
However, it is wrong. According to the spec, we can shadow global properties if a property's attribute is configurable = true.
For example, we execute two scripts.

script1.js

bar = 42;
function load() { return bar; }
print(bar); 42
print(load());
42

script2.js

let bar = 0; This lexical binding can shadow the global.bar defined in script1.js
print(bar);
0
print(load()); 0

In JSC, we cache GlobalProperty resolve type and its associated information in op_resolve_type, op_get_from_scope, and op_put_to_scope.
They attempt to load a property from JSGlobalObject directly. However, once the newly added lexical binding starts shadowing this, our existing instructions
become invalid since they do not respect JSGlobalLexicalEnvironment.

In this patch, we fix this issue by introducing the following mechanisms.

  1. We have a HashMap<property name, watchpoint set> in JSGlobalObject. DFG and FTL create a watchpoint set with the property name if the generated code depends on GlobalProperty condition of op_resolve_scope etc. These watchpoint will be fired when the shadowing happens, so that our generated DFG and FTL code will be invalidated if it depends on the condition which is no longer valid.
  1. When we detect shadowing, we iterate all the live CodeBlocks which globalObject is the target one. And we rewrite instructions in them from GlobalProperty to GlobalLexicalVar (or Dynamic precisely). So, the subsequent LLInt code just works well. "Dynamic" conversion happens when your op_put_to_scope attempts to put a value onto a const lexical binding. This fails and it should throw a type error.
  1. GlobalProperty scope operations in Baseline JIT start checking ResolveType in metadata, and emit code for GlobalProperty and GlobalLexicalVar. Once the rewrite happens, baseline JIT continues working because it checks the rewritten metadata's ResolveType.

We use this mechanism (which is similar to haveABadTime() thing) because,

  1. Shadowing should be super rare. Before r214145, we made these cases as SytaxError. Thus, before r214145, this type of code cannot be executed in WebKit. And the number of the live CodeBlocks for the given JSGlobalObject should be small. This supports introducing rather simple (but not so efficient) mechanism instead of the complicated one.
  1. Rewriting instructions immediately forces GlobalProperty => GlobalLexicalVar / Dynamic conversion in all the possible CodeBlock. This allows us to avoid compilation failure loop in DFG and FTL: DFG and FTL codes are invalidated by the watchpoint, but we may attempt to compile the code with the invalidated watchpoint and GlobalProperty status if we do not rewrite it. One possible other implementation is having and checking a counter in instruction, and every time we introduce a new shadow binding, bump the counter. And eventually executed instruction will go to the slow path and rewrite itself. However, this way leaves the not-executed-again-yet instructions as is, and DFG and FTL repeatedly fail to compile if we just watch the invalidated watchpoint for that. Rewriting all the existing GlobalProperty immediately avoids this situation easily.
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • bytecode/CodeBlock.cpp: (JSC::CodeBlock::notifyLexicalBindingShadowing):
  • bytecode/CodeBlock.h: (JSC::CodeBlock::scriptMode const):
  • bytecode/Watchpoint.h: (JSC::WatchpointSet::create):
  • dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::parseBlock):
  • dfg/DFGDesiredGlobalProperties.cpp: Added. (JSC::DFG::DesiredGlobalProperties::isStillValidOnMainThread): (JSC::DFG::DesiredGlobalProperties::reallyAdd):
  • dfg/DFGDesiredGlobalProperties.h: Added. (JSC::DFG::DesiredGlobalProperties::addLazily): We need this DesiredGlobalProperties mechanism since we do not want to ref() the UniquedStringImpl in DFG and FTL thread. We keep JSGlobalObject* and identifierNumber, and materialize WatchpointSets for each JSGlobalObject's property referenced from DFG and FTL and inject CodeBlock jettison watchpoints in the main thread.
  • dfg/DFGDesiredGlobalProperty.h: Added. (JSC::DFG::DesiredGlobalProperty::DesiredGlobalProperty): (JSC::DFG::DesiredGlobalProperty::globalObject const): (JSC::DFG::DesiredGlobalProperty::identifierNumber const): (JSC::DFG::DesiredGlobalProperty::operator== const): (JSC::DFG::DesiredGlobalProperty::operator!= const): (JSC::DFG::DesiredGlobalProperty::isHashTableDeletedValue const): (JSC::DFG::DesiredGlobalProperty::hash const): (JSC::DFG::DesiredGlobalProperty::dumpInContext const): (JSC::DFG::DesiredGlobalProperty::dump const): (JSC::DFG::DesiredGlobalPropertyHash::hash): (JSC::DFG::DesiredGlobalPropertyHash::equal):
  • dfg/DFGGraph.h: (JSC::DFG::Graph::globalProperties):
  • dfg/DFGPlan.cpp: (JSC::DFG::Plan::reallyAdd): (JSC::DFG::Plan::isStillValidOnMainThread): (JSC::DFG::Plan::finalizeWithoutNotifyingCallback): (JSC::DFG::Plan::cancel):
  • dfg/DFGPlan.h: (JSC::DFG::Plan::globalProperties):
  • jit/JITPropertyAccess.cpp: (JSC::JIT::emit_op_resolve_scope): (JSC::JIT::emit_op_get_from_scope): (JSC::JIT::emit_op_put_to_scope):
  • jit/JITPropertyAccess32_64.cpp: (JSC::JIT::emit_op_resolve_scope): (JSC::JIT::emit_op_get_from_scope): (JSC::JIT::emit_op_put_to_scope):
  • runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::addStaticGlobals): (JSC::JSGlobalObject::notifyLexicalBindingShadowing): (JSC::JSGlobalObject::getReferencedPropertyWatchpointSet): (JSC::JSGlobalObject::ensureReferencedPropertyWatchpointSet):
  • runtime/JSGlobalObject.h:
  • runtime/ProgramExecutable.cpp: (JSC::hasRestrictedGlobalProperty): (JSC::ProgramExecutable::initializeGlobalProperties):

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

3:27 PM Changeset in webkit [240071] by Alan Coon
  • 3 edits
    2 adds in branches/safari-607-branch

Cherry-pick r239877. rdar://problem/47260302

Release assert when removing element with a map element in the shadow tree
https://bugs.webkit.org/show_bug.cgi?id=193351
<rdar://problem/47208807>

Reviewed by Ryosuke Niwa.

Source/WebCore:

When a shadow host that has a map element in the shadow tree is removed from the document, we try
to remove the map from the scope of the host.

Test: fast/shadow-dom/image-map-tree-scope.html

  • html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::insertedIntoAncestor): (WebCore::HTMLMapElement::removedFromAncestor):

Add and remove image maps when the scope changes, not when the document changes.
This matches how id/name/etc updates work in the HTMLElement.

LayoutTests:

  • fast/shadow-dom/image-map-tree-scope-expected.txt: Added.
  • fast/shadow-dom/image-map-tree-scope.html: Added.

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

3:27 PM Changeset in webkit [240070] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WTF

Cherry-pick r239873. rdar://problem/47260353

WorkQueue::concurrentApply() passes a raw pointer to a temporary String to Thread::create().
https://bugs.webkit.org/show_bug.cgi?id=191350

Reviewed by Brent Fulgham.

The non COCOA version of WorkQueue::concurrentApply() creates a temporary
String for the threadName and passes the raw pointer of this String to
Thread::create(). After freeing this String, Thread::entryPoint() uses
the raw char pointer to internally initialize the thread.

The fix is to use a single literal string for all the threads' names since
they are created for a thread-pool.

  • wtf/WorkQueue.cpp: (WTF::WorkQueue::concurrentApply):

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

3:27 PM Changeset in webkit [240069] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebInspectorUI

Cherry-pick r239870. rdar://problem/47260266

Web Inspector: REGRESSION: deleting an audit puts selection in a selected but invisible state
https://bugs.webkit.org/show_bug.cgi?id=192917
<rdar://problem/46875285>

Reviewed by Devin Rousso.

SelectionController should not be notified of removed children until the
child items have been removed from the TreeOutline. Doing so at this stage
is unsafe, since this method checks this.selectedTreeElement, which could
return the adjusted index from the SelectionController before anything has
actually been removed from the TreeOutline.

The number of calls to SelectionController.prototype.didRemoveItems is also
reduced somewhat, since we're no longer calling it for every TreeElement.

  • UserInterface/Views/TreeOutline.js: (WI.TreeOutline.prototype.removeChildAtIndex): (WI.TreeOutline.prototype.removeChildren): (WI.TreeOutline.prototype._forgetTreeElement): (WI.TreeOutline.prototype._indexesForSubtree): Added.

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

3:27 PM Changeset in webkit [240068] by Alan Coon
  • 2 edits in branches/safari-607-branch/Tools

Cherry-pick r239866. rdar://problem/47260326

Unreviewed, fix #ifdef in API test added in r239851.
https://bugs.webkit.org/show_bug.cgi?id=193327
rdar://problem/47093222

  • TestWebKitAPI/Tests/WebKit/mac/ForceLightAppearanceInBundle_Bundle.mm:

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

3:27 PM Changeset in webkit [240067] by Alan Coon
  • 4 edits in branches/safari-607-branch/Source/WebCore

Cherry-pick r239865. rdar://problem/47260332

IndexedDB: leak IDBTransaction, TransactionOperation and IDBRequest in layout tests
https://bugs.webkit.org/show_bug.cgi?id=193167
<rdar://problem/46891688>

Reviewed by Geoffrey Garen.

Do some cleanup to break retain cycle when context is stopped.

  • Modules/indexeddb/IDBOpenDBRequest.cpp: (WebCore::IDBOpenDBRequest::cancelForStop):
  • Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::abortOnServerAndCancelRequests): (WebCore::IDBTransaction::stop): (WebCore::IDBTransaction::removeRequest):
  • Modules/indexeddb/client/TransactionOperation.h: (WebCore::IDBClient::TransactionOperation::doComplete):

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

3:27 PM Changeset in webkit [240066] by Alan Coon
  • 5 edits in branches/safari-607-branch/Source/WebCore

Cherry-pick r239857. rdar://problem/47260358

<video> elements do not enter 'paused' state when playing to end over AirPlay
https://bugs.webkit.org/show_bug.cgi?id=193295
<rdar://problem/46708670>

Reviewed by Eric Carlson.

Adopt the -[AVPlayer timeControlStatus] API, which reports whether the AVPlayer is paused, playing, or blocked waiting
for more data before playing. AirPlay devices report this state back from the remote device, and this allows the
MediaPlayerPrivateAVFoundationObjC to differentiate between user-generated pauses and simple stalling.

Adopting this API allows us to remove the heuristic from rateChanged() which inteprets a rate change when the
readyState > HAVE_ENOUGH as an intentional pause.

Drive-by fix: MediaPlayerPrivateAVFoundation had some code to delay calling platformPlay()
until the first frame became available. But this code was entirely undermined by the previous
behavior of setRate(). Fixing setRate()/setRateDouble() to only start playback if playback was
actually requested started making this code work for the first time, and broke some API tests.
Thus, we're removing this previously dead code.

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation): (WebCore::MediaPlayerPrivateAVFoundation::play): (WebCore::MediaPlayerPrivateAVFoundation::pause): (WebCore::MediaPlayerPrivateAVFoundation::rateChanged): (WebCore::MediaPlayerPrivateAVFoundation::updateStates):
  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): (WebCore::MediaPlayerPrivateAVFoundationObjC::didEnd): (WebCore::MediaPlayerPrivateAVFoundationObjC::platformPlay): (WebCore::MediaPlayerPrivateAVFoundationObjC::platformPause): (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): (WebCore::MediaPlayerPrivateAVFoundationObjC::setRateDouble): (WebCore::MediaPlayerPrivateAVFoundationObjC::setPlayerRate): (WebCore::MediaPlayerPrivateAVFoundationObjC::timeControlStatusDidChange): (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldObserveTimeControlStatus): (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):

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

3:27 PM Changeset in webkit [240065] by Alan Coon
  • 5 edits
    3 adds in branches/safari-607-branch

Cherry-pick r239851. rdar://problem/47260326

Add WKBundlePage SPI to temporarily force light or dark appearance on a page.
https://bugs.webkit.org/show_bug.cgi?id=193327
rdar://problem/47093222

Reviewed by Tim Horton.

Source/WebKit:

Tests: WebKit.ForceLightAppearanceInBundle API Test

  • WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageSetUseDarkAppearance): Added. (WKBundlePageIsUsingDarkAppearance): Added.
  • WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/mac/ForceLightAppearanceInBundle.mm: Added. (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::didReceiveMessageFromInjectedBundle): (TestWebKitAPI::TEST):
  • TestWebKitAPI/Tests/WebKit/mac/ForceLightAppearanceInBundle_Bundle.mm: Added. (TestWebKitAPI::ForceLightAppearanceInBundleTest::ForceLightAppearanceInBundleTest): (TestWebKitAPI::ForceLightAppearanceInBundleTest::didCreatePage): (TestWebKitAPI::ForceLightAppearanceInBundleTest::didReceiveMessage):
  • TestWebKitAPI/Tests/WebKit/mac/dark-mode.html: Added.

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

3:27 PM Changeset in webkit [240064] by Alan Coon
  • 5 edits in branches/safari-607-branch/Source/WebKit

Cherry-pick r239850. rdar://problem/47260243

DeviceID hash salt manager can be NULL
https://bugs.webkit.org/show_bug.cgi?id=193334
<rdar://problem/47179650>

Reviewed by Youenn Fablet.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp: (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): No need to NULL-check websiteDataStore.deviceIdHashSaltStorage, it is a Ref. (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Ditto. (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo): Ditto. (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): Ditto.
  • UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::WebsiteDataStore): m_deviceIdHashSaltStorage is a Ref. (WebKit::WebsiteDataStore::fetchDataAndApply): Ditto. (WebKit::WebsiteDataStore::removeData): Ditto.
  • UIProcess/WebsiteData/WebsiteDataStore.h: (WebKit::WebsiteDataStore::deviceIdHashSaltStorage): Ditto.

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

3:27 PM Changeset in webkit [240063] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebCore

Cherry-pick r239847. rdar://problem/47260246

Fix rare crash under ScrollbarThemeMac::paintScrollCorner()
https://bugs.webkit.org/show_bug.cgi?id=193337
rdar://problem/47179993

Reviewed by Zalan Bujtas.

Async image decoding can trigger a FrameView::traverseForPaintInvalidation() fake paint,
which creates a GraphicsContext with no platform context. However, we could hit ScrollView::paintScrollbars()
which tried to get at the platform context, and then crashed.

So protect two functions in ScrollbarThemeMac with if (context.paintingDisabled()) checks. I verified
that other scrollbar-related painting code paths were already protected.

Hard to test because it depends on async image decoding timing.

  • platform/mac/ScrollbarThemeMac.mm: (WebCore::ScrollbarThemeMac::paint): (WebCore::ScrollbarThemeMac::paintScrollCorner):

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

3:27 PM Changeset in webkit [240062] by Alan Coon
  • 11 edits in branches/safari-607-branch/Source

Cherry-pick r239843. rdar://problem/47260277

REGRESSION (r237658): Tap highlight limits cause the highlight to no longer show with legitimate button sizes
https://bugs.webkit.org/show_bug.cgi?id=193294
<rdar://problem/46006678>

Reviewed by Simon Fraser.

Input type elements should always paint tap highlight (ignore size heuristic).

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::didGetTapHighlightGeometries):
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _showTapHighlight]): (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:nodeHasBuiltInClickHandling:]): (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]): Deleted.
  • UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::didGetTapHighlightGeometries):
  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::sendTapHighlightForNodeIfNecessary):

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

3:27 PM Changeset in webkit [240061] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebCore

Cherry-pick r239833. rdar://problem/47260274

Safari Crashing in Version 12.0.1 (14606.2.104.1.1) WebCore::GraphicsLayerCA::updateBackdropFilters
https://bugs.webkit.org/show_bug.cgi?id=193309
<rdar://problem/45279224>

Reviewed by Antoine Quint.

A speculative fix for a CheckedArithmetic crash triggered in updateBackdropFilters.

The crash log indicates we crash in a Checked<> class that is not recording
overflow i.e. it is crashing due to an overflow. The only place in this function
where that could happen is when we convert the FloatRect for the backdrop
region into a Checked<unsigned> for width and height. This suggests that either
the width or height are negative, or the float values are too large for integers,
or the product of the two overflows.

Avoid this by using RecordOverflow, but also changing the code a little to
bail if the rectangle is incorrect.

  • platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::updateBackdropFilters):

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

3:27 PM Changeset in webkit [240060] by Alan Coon
  • 19 edits
    4 adds in branches/safari-607-branch

Cherry-pick r239832. rdar://problem/47260343

Override the session configuration for cookieAcceptPolicy
https://bugs.webkit.org/show_bug.cgi?id=190925
<rdar://problem/45497382>

Patch by John Wilander <wilander@apple.com> on 2019-01-10
Reviewed by Alexey Proskuryakov and Alex Christensen.

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:

Declaration of _overrideSessionCookieAcceptPolicy on NSHTTPCookieStorage.

Source/WebKit:

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm: (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

Now sets cookieStorage._overrideSessionCookieAcceptPolicy to YES.

Source/WTF:

  • wtf/Platform.h:

Definition of HAVE_CFNETWORK_OVERRIDE_SESSION_COOKIE_ACCEPT_POLICY.

Tools:

Test infrastructure for setting a first-party-only cookie policy.

  • DumpRenderTree/TestRunner.cpp: (setOnlyAcceptFirstPartyCookiesCallback): (TestRunner::staticFunctions):
  • DumpRenderTree/TestRunner.h:
  • DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::setOnlyAcceptFirstPartyCookies):
  • DumpRenderTree/win/TestRunnerWin.cpp: (TestRunner::setOnlyAcceptFirstPartyCookies):
  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setOnlyAcceptFirstPartyCookies):
  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

Skipped since this cookie policy is only supported on Cocoa platforms.

  • http/tests/cookies/only-accept-first-party-cookies-expected.txt: Added.
  • http/tests/cookies/only-accept-first-party-cookies.html: Added.
  • http/tests/cookies/resources/reset-cookies.html: Added.

To support reset of third-party cookies in an iframe.

  • http/tests/cookies/resources/set-cookie-and-redirect-back.php: Added.

A simple bounce to set a cookie.

  • platform/ios/TestExpectations:

Skipped for now. Will be fixed in <rdar://problem/47165939>.

  • platform/mac/TestExpectations:

Skipped for now. Will be fixed in <rdar://problem/47165939>.

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

3:26 PM Changeset in webkit [240059] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/ThirdParty/libwebrtc

Cherry-pick r239829. rdar://problem/47260340

VPModuleInitialize should be called when VCP is enabled
https://bugs.webkit.org/show_bug.cgi?id=193299

Reviewed by Eric Carlson.

Add the necessary include to make sure ENABLE_VCP_ENCODER is defined appropriately.

  • Source/webrtc/sdk/WebKit/WebKitUtilities.mm:

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

3:26 PM Changeset in webkit [240058] by Alan Coon
  • 6 edits in branches/safari-607-branch/Source/WebCore

Cherry-pick r239814. rdar://problem/47260367

ThreadTimers should not store a raw pointer in its heap
https://bugs.webkit.org/show_bug.cgi?id=192975
<rdar://problem/46893946>

Reviewed by Geoffrey Garen.

Right now, ThreadTimers's heap data structure stores a raw pointer to TimerBase. In order to harden the timer code,
this patch replaces it with ThreadTimerHeapItem, a newly introduced struct, which effectively acks like
WeakReference<TimerBase*> as the timer heap and TimerBase both store RefPtr to it, and TimerBase's destructor clears
the raw pointer back to TimerBase*.

This approach was taken instead of an out-right adoptation of WeakPtr since the heap data structure requires each node
in the heap to have a fixed "priority" yet WeakPtr with no valid pointer back to TimerBase would effectively lose its
"priority" thereby corrupting the heap data structure. That is, each item in the heap must remember its fire time and
insertion order even when the underlying TimerBase had gone away (this should never happen but the whole point of this
hardening is to make it work even in the precense of such a bug).

This patch also moves the heap index in TimerBase to ThreadTimerHeapItem, and replaces the pointer to the heap vector
in TimerBase by a reference to ThreadTimers in ThreadTimerHeapItem. Note that ThreadTimers is a per-thread singleton.

The correctness of this hardening was tested by commenting out the call to stop() and !isInHeap() assertion in
TimerBase::~TimerBase() as well as the !isInHeap() assertion in ThreadTimerHeapItem::clearTimer() and observing that
layout tests run successfully without hitting any debug assertions.

No new tests since there should be no observable behavior difference.

  • WebCore.xcodeproj/project.pbxproj: Export ThreadTimers.h as a private header since it's now included in Timer.h
  • platform/ThreadTimers.cpp: (WebCore::ThreadTimers::updateSharedTimer): Delete ThreadTimerHeapItem's with nullptr TimerBase* (TimerBase had already been deleted). This should only happen when TimerBase's destructor failed to remove itself from the timer heap, which should never happen. (WebCore::ThreadTimers::sharedTimerFiredInternal): Ditto. Also removed the redundant code which had removed the timer from the heap since setNextFireTime does the removal already.
  • platform/ThreadTimers.h: Outdented the whole file. (WebCore::ThreadTimers::timerHeap): We use Vector<RefPtr<ThreadTimerHeapItem>> instead of Vector<Ref<~>> since Ref<~> doesn't have a copy constructor which is used by std::push_heap. (WebCore::ThreadTimerHeapItem): Added. (WebCore::ThreadTimerHeapItem::hasTimer const): Added. (WebCore::ThreadTimerHeapItem::setNotInHeap): Added. ThreadTimerHeapItem uses unsigned -1 as the single value which signifies the item not being in the heap instead of all negative values as in the old code in TimerBase. (WebCore::ThreadTimerHeapItem::isInHeap const): Added. (WebCore::ThreadTimerHeapItem::isFirstInHeap const): Added. (WebCore::ThreadTimerHeapItem::timer): Added. (WebCore::ThreadTimerHeapItem::clearTimer): Added. (WebCore::ThreadTimerHeapItem::heapIndex const): Added. (WebCore::ThreadTimerHeapItem::setHeapIndex): Added. (WebCore::ThreadTimerHeapItem::timerHeap const): Added.
  • platform/Timer.cpp: (WebCore::threadGlobalTimerHeap): This function is now only used in assertions. (WebCore::ThreadTimerHeapItem::ThreadTimerHeapItem): Added. (WebCore::ThreadTimerHeapItem::create): Added. (WebCore::TimerHeapPointer::TimerHeapPointer): (WebCore::TimerHeapPointer::operator-> const): (WebCore::TimerHeapReference::TimerHeapReference): Added a copy constructor. (WebCore::TimerHeapReference::copyRef const): Added. (WebCore::TimerHeapReference::operator RefPtr<ThreadTimerHeapItem>& const): (WebCore::TimerHeapPointer::operator* const): (WebCore::TimerHeapReference::operator=): Use move assignment operator. (WebCore::TimerHeapReference::swapWith): (WebCore::TimerHeapReference::updateHeapIndex): Extracted to share code between two verions of operator=. (WebCore::swap): (WebCore::TimerHeapIterator::TimerHeapIterator): (WebCore::TimerHeapIterator::operator-> const): (WebCore::TimerHeapLessThanFunction::compare): Added variants which take RefPtr<ThreadTimerHeapItem>. (WebCore::TimerHeapLessThanFunction::operator() const): (WebCore::TimerBase::TimerBase): (WebCore::TimerBase::~TimerBase):Clear the raw pointer in ThreadTimerHeapItem. (WebCore::TimerBase::stop): (WebCore::TimerBase::nextFireInterval const): (WebCore::TimerBase::checkHeapIndex const): Added the consistency check for other items in the heap. (WebCore::TimerBase::checkConsistency const): (WebCore::TimerBase::heapDecreaseKey): (WebCore::TimerBase::heapDelete): (WebCore::TimerBase::heapDeleteMin): (WebCore::TimerBase::heapIncreaseKey): (WebCore::TimerBase::heapInsert): (WebCore::TimerBase::heapPop): (WebCore::TimerBase::heapPopMin): (WebCore::TimerBase::heapDeleteNullMin): Added. Used to delete ThreadTimerHeapItem which no longer has a valid TimerBase. (WebCore::parentHeapPropertyHolds): (WebCore::childHeapPropertyHolds): (WebCore::TimerBase::hasValidHeapPosition const): (WebCore::TimerBase::updateHeapIfNeeded): Tweaked the heap index assertion as heapIndex() itself would assert when called on an item with an invalid (-1) heap index. (WebCore::TimerBase::setNextFireTime): Create ThreadTimerHeapItem. Note m_heapItem is never cleared until this TimerBase is deleted. (WebCore::TimerHeapReference::operator TimerBase* const): Deleted.
  • platform/Timer.h: (WebCore::TimerBase): Replaced m_nextFireTime, m_heapIndex, m_heapInsertionOrder, and m_cachedThreadGlobalTimerHeap by m_heapItem, RefPtr to an ThreadTimerHeapItem. (WebCore::TimerBase::augmentFireInterval): (WebCore::TimerBase::inHeap const): (WebCore::TimerBase::nextFireTime const): (WebCore::TimerBase::isActive const): (WebCore::TimerBase:: const): Deleted.

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

3:26 PM Changeset in webkit [240057] by Alan Coon
  • 9 edits in branches/safari-607-branch/Source

Cherry-pick r239787. rdar://problem/47260350

Gigacage disabling checks should handle the GIGACAGE_ALLOCATION_CAN_FAIL case properly.
https://bugs.webkit.org/show_bug.cgi?id=193292
<rdar://problem/46485450>

Reviewed by Yusuke Suzuki.

Source/bmalloc:

Previously, when GIGACAGE_ALLOCATION_CAN_FAIL is true, we allow the Gigacage to
be disabled if we fail to allocate memory for it. However, Gigacage::primitiveGigacageDisabled()
still always assumes that the Gigacage is always enabled after ensureGigacage() is
called.

This patch updates Gigacage::primitiveGigacageDisabled() to allow the Gigacage to
already be disabled if GIGACAGE_ALLOCATION_CAN_FAIL is true and wasEnabled() is
false.

In this patch, we also put the wasEnabled flag in the 0th slot of the
g_gigacageBasePtrs buffer to ensure that it is also protected against writes just
like the Gigacage base pointers.

To achieve this, we do the following:

  1. Added a reservedForFlags field in struct BasePtrs.
  2. Added a ReservedForFlagsAndNotABasePtr Gigacage::Kind.
  3. Added assertions to ensure that the BasePtrs::primitive is at the offset matching the offset computed from Gigacage::Primitive. Ditto for BasePtrs::jsValue and Gigacage::JSValue.
  4. Added assertions to ensure that Gigacage::ReservedForFlagsAndNotABasePtr is not used for fetching a Gigacage base pointer.
  5. Added RELEASE_BASSERT_NOT_REACHED() to implement such assertions in bmalloc.

No test added because this issue requires Gigacage allocation to fail in order to
manifest. I've tested it manually by modifying the code locally to force an
allocation failure.

  • bmalloc/BAssert.h:
  • bmalloc/Gigacage.cpp: (Gigacage::ensureGigacage): (Gigacage::primitiveGigacageDisabled):
  • bmalloc/Gigacage.h: (Gigacage::wasEnabled): (Gigacage::setWasEnabled): (Gigacage::name): (Gigacage::basePtr): (Gigacage::size):
  • bmalloc/HeapKind.h: (bmalloc::heapKind):

Source/JavaScriptCore:

  • runtime/VM.h: (JSC::VM::gigacageAuxiliarySpace):

Source/WTF:

Update the USE_SYSTEM_MALLOC version of Gigacage.h to match the bmalloc version.

  • wtf/Gigacage.h:

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

3:26 PM Changeset in webkit [240056] by Alan Coon
  • 5 edits
    2 adds in branches/safari-607-branch

Cherry-pick r239786. rdar://problem/47260219

[Datalist] Crash when input with datalist is dynamically added.
https://bugs.webkit.org/show_bug.cgi?id=193012
<rdar://problem/45923457>

Reviewed by Brent Fulgham.

Source/WebCore:

In certain cases (cloning, setAttribute), it's too early to check for the list attribute in createShadowSubtree
to see whether the input needs datalist related items. The list attribute is simply not set yet.
This patch only addresses the obvious crash. m_dataListDropdownIndicator clearly lacks proper lifecycle management (see webkit.org/b/193032).

Test: fast/forms/datalist/datalist-crash-when-dynamic.html

  • html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::createShadowSubtree): (WebCore::TextFieldInputType::attributeChanged): (WebCore::TextFieldInputType::createDataListDropdownIndicator):
  • html/TextFieldInputType.h:

LayoutTests:

  • fast/forms/datalist/datalist-crash-when-dynamic-expected.txt: Added.
  • fast/forms/datalist/datalist-crash-when-dynamic.html: Added.

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

3:17 PM Changeset in webkit [240055] by Chris Dumez
  • 4 edits in trunk/Source/WebKit

Regression(r240046) Several API tests are crashing
https://bugs.webkit.org/show_bug.cgi?id=193509

Reviewed by Geoffrey Garen.

The crashes would happen because loadRequestShared() would take a WebProcessProxy& in parameter but
then call reattachToWebProcess() if the page is not valid, which would replace m_process and invalidate
our process reference.

To address the issue, move the reattachToWebProcess() call to loadRequest(), before calling
loadRequestShared(). Also, update *Shared() methods to take a Ref<WebProcessProxy>&& instead
of a WebProcessProxy& in parameter. Since we call client delegates, we need to make sure
our process stays alive.

  • UIProcess/ProvisionalPageProxy.cpp:

(WebKit::ProvisionalPageProxy::loadData):
(WebKit::ProvisionalPageProxy::loadRequest):
(WebKit::ProvisionalPageProxy::didCreateMainFrame):
(WebKit::ProvisionalPageProxy::didPerformClientRedirect):
(WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame):
(WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame):
(WebKit::ProvisionalPageProxy::didNavigateWithNavigationData):
(WebKit::ProvisionalPageProxy::didChangeProvisionalURLForFrame):
(WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionAsync):
(WebKit::ProvisionalPageProxy::decidePolicyForResponse):
(WebKit::ProvisionalPageProxy::startURLSchemeTask):
(WebKit::ProvisionalPageProxy::backForwardGoToItem):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::loadRequest):
(WebKit::WebPageProxy::loadRequestWithNavigationShared):
(WebKit::WebPageProxy::loadData):
(WebKit::WebPageProxy::loadDataWithNavigationShared):
(WebKit::WebPageProxy::didPerformDragControllerAction):
(WebKit::WebPageProxy::findPlugin):
(WebKit::WebPageProxy::didCreateMainFrame):
(WebKit::WebPageProxy::didCreateSubframe):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::willPerformClientRedirectForFrame):
(WebKit::WebPageProxy::didCancelClientRedirectForFrame):
(WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
(WebKit::WebPageProxy::didChangeProvisionalURLForFrameShared):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::didReceiveTitleForFrame):
(WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
(WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
(WebKit::WebPageProxy::didRunInsecureContentForFrame):
(WebKit::WebPageProxy::frameDidBecomeFrameSet):
(WebKit::WebPageProxy::decidePolicyForNavigationActionAsync):
(WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::decidePolicyForResponseShared):
(WebKit::WebPageProxy::unableToImplementPolicy):
(WebKit::WebPageProxy::willSubmitForm):
(WebKit::WebPageProxy::didNavigateWithNavigationData):
(WebKit::WebPageProxy::didNavigateWithNavigationDataShared):
(WebKit::WebPageProxy::didPerformClientRedirect):
(WebKit::WebPageProxy::didPerformClientRedirectShared):
(WebKit::WebPageProxy::didPerformServerRedirect):
(WebKit::WebPageProxy::didUpdateHistoryTitle):
(WebKit::WebPageProxy::createNewPage):
(WebKit::WebPageProxy::runJavaScriptAlert):
(WebKit::WebPageProxy::runJavaScriptConfirm):
(WebKit::WebPageProxy::runJavaScriptPrompt):
(WebKit::WebPageProxy::unavailablePluginButtonClicked):
(WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
(WebKit::WebPageProxy::runOpenPanel):
(WebKit::WebPageProxy::printFrame):
(WebKit::WebPageProxy::backForwardGoToItem):
(WebKit::WebPageProxy::backForwardGoToItemShared):
(WebKit::WebPageProxy::learnWord):
(WebKit::WebPageProxy::ignoreWord):
(WebKit::WebPageProxy::didReceiveEvent):
(WebKit::WebPageProxy::editingRangeCallback):
(WebKit::WebPageProxy::rectForCharacterRangeCallback):
(WebKit::WebPageProxy::focusedFrameChanged):
(WebKit::WebPageProxy::frameSetLargestFrameChanged):
(WebKit::WebPageProxy::exceededDatabaseQuota):
(WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
(WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
(WebKit::WebPageProxy::enumerateMediaDevicesForFrame):
(WebKit::WebPageProxy::startURLSchemeTask):
(WebKit::WebPageProxy::startURLSchemeTaskShared):
(WebKit::WebPageProxy::stopURLSchemeTask):
(WebKit::WebPageProxy::loadSynchronousURLSchemeTask):

  • UIProcess/WebPageProxy.h:
2:52 PM Changeset in webkit [240054] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Internal build fix.

  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(WebCore::layerContentsFormat):

2:44 PM Changeset in webkit [240053] by ddkilzer@apple.com
  • 16 edits
    1 add in trunk/Source/ThirdParty/libwebrtc

clang-tidy: Fix unnecessary copy/ref churn of for loop variables in libwebrtc
<https://webkit.org/b/193498>

Reviewed by Youenn Fablet.

Fix unwanted copying/ref churn of loop variables by making them
const references.

  • Source/webrtc/modules/bitrate_controller/loss_based_bandwidth_estimation.cc:
  • Source/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc:
  • Source/webrtc/p2p/base/mdns_message.cc:
  • Source/webrtc/p2p/base/port.cc:
  • Source/webrtc/p2p/base/stunrequest.cc:
  • Source/webrtc/pc/jseptransportcontroller.cc:
  • Source/webrtc/pc/peerconnection.cc:
  • Source/webrtc/pc/rtcstatscollector.cc:
  • Source/webrtc/pc/rtpreceiver.cc:
  • Source/webrtc/pc/rtptransceiver.cc:
  • Source/webrtc/pc/statscollector.cc:
  • Source/webrtc/pc/trackmediainfomap.cc:
  • Source/webrtc/rtc_base/filerotatingstream.cc:
  • Source/webrtc/rtc_base/opensslsessioncache.cc:
  • Source/webrtc/video/receive_statistics_proxy.cc:
  • WebKit/0002-libwebrtc-fix-unnecessary-copy-of-for-loop-variables.diff: Added.
2:08 PM Changeset in webkit [240052] by Kocsen Chung
  • 1 copy in tags/Safari-607.1.23

Tag Safari-607.1.23.

2:04 PM Changeset in webkit [240051] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Fix TreeOutline TypeError:​ this._indexesForSubtree is not a function
https://bugs.webkit.org/show_bug.cgi?id=193501
<rdar://problem/47323967>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/TreeOutline.js:

(WI.TreeOutline.prototype.removeChildAtIndex):

1:06 PM Changeset in webkit [240050] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore/PAL

Unreviewed build fix.

  • pal/spi/ios/UIKitSPI.h:

I don't even.

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

ServiceWorkerContainer is leaking due to a ref cycle
https://bugs.webkit.org/show_bug.cgi?id=193462
<rdar://problem/47026303>

Reviewed by Brady Eidson.

ServiceWorkerContainer keeps a reference to its ready promise.
The ready promise keeps a ref to its value which is a ServiceWorkerRegistration.
ServiceWorkerRegistration keeps a ref to ServiceWorkerContainer.

To break the reference cycle, set the ready promise to zero when ServiceWorkerContainer is stopped.

Covered by imported/w3c/web-platform-tests/service-workers/service-worker/ready.https.html no longer leaking.

  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::ServiceWorkerContainer::stop):

12:48 PM Changeset in webkit [240048] by Megan Gardner
  • 2 edits in trunk/Source/WebCore/PAL

Build fix for iOSMac Reveal
https://bugs.webkit.org/show_bug.cgi?id=193503

Unreviewed build fix.

  • pal/spi/ios/UIKitSPI.h:
12:40 PM Changeset in webkit [240047] by Simon Fraser
  • 8 edits in trunk/Source/WebCore

Make didCommitChangesForLayer() explicitly about the platform layer changing because of tile/non-tile swapping
https://bugs.webkit.org/show_bug.cgi?id=193290

Reviewed by Tim Horton.

RenderLayerCompositor::didFlushChangesForLayer() triggers updates scrolling tree nodes for
the flushed layer, but it's not clear what has changed at this point.

didCommitChangesForLayer()/didFlushChangesForLayer() were added to explicitly handle the
case where the underlying platform layer for a GraphicsLayer changes because the layer swaps
between tiled and non-tiled, and structural layer changes; we need to push the new layer to
the scrolling tree because it operates on platform layers. So the only work that
didFlushChangesForLayer() should do is to update layers on scrolling tree nodes; it doesn't
need to do any geometry updating. Move towards that goal by renaming this callback to
didChangePlatformLayerForLayer() to make its function more explicit.

  • platform/graphics/GraphicsLayerClient.h:

(WebCore::GraphicsLayerClient::didChangePlatformLayerForLayer):
(WebCore::GraphicsLayerClient::didCommitChangesForLayer const): Deleted.

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly):
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):

  • platform/graphics/ca/GraphicsLayerCA.h:
  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::didChangePlatformLayerForLayer):
(WebCore::RenderLayerBacking::didCommitChangesForLayer const): Deleted.

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

(WebCore::RenderLayerCompositor::didChangePlatformLayerForLayer):
(WebCore::LegacyWebKitScrollingLayerCoordinator::didChangePlatformLayerForLayer):
(WebCore::RenderLayerCompositor::didFlushChangesForLayer): Deleted.
(WebCore::RenderLayerCompositor::didCommitChangesForLayer const): Deleted.
(WebCore::LegacyWebKitScrollingLayerCoordinator::didFlushChangesForLayer): Deleted.

  • rendering/RenderLayerCompositor.h:
12:40 PM Changeset in webkit [240046] by Chris Dumez
  • 55 edits
    2 adds in trunk

Regression(PSON) View becomes blank after click a cross-site download link
https://bugs.webkit.org/show_bug.cgi?id=193361
<rdar://problem/47099573>

Reviewed by Geoffrey Garen.

Source/WebCore:

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::commitProvisionalLoad):
When restoring from PageCache, make sure we notify the client that the load was committed
*before* we tell it that the navigation is complete. This would confuse the ProvisionalPageProxy
logic in the UIProcess.

Source/WebKit:

The issue tracked by rdar://problem/47099573 is that a provisional load may get
canceled (or converted into a download) *after* we've decided to process-swap.
In such cases, the view should keep displaying the current site and it should
still be interactive. However, with the previous PSON model, the view (pageProxy)
would have already swapped to the new process and would end up displaying the
initially empty document.

To address the issue, this patch introduces the concept of a provisional load
in the UIProcess, handled by a ProvisionalPageProxy which has its own privisional
process. The WebPageProxy owns the ProvisionalPageProxy but we do not commit the
provisional page until after the load was committed in the new process. This means
that the view / WebPageProxy keeps using the old process and displays the current
content until a load has committed in the provisional page. If no load commits
in the provisional process (e.g. because the load is cancelled or converted into
a download), then we merely destroy the ProvisionalPageProxy and terminate its
process, without impacting the WebPageProxy.

  • Shared/WebPageCreationParameters.cpp:

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

  • Shared/WebPageCreationParameters.h:

Rename isSwapFromSuspended to isProcessSwap for clarity as we always want to
delay attaching the drawing area in case of a process-swap, no matter what
now that the previous process is kept alive until the provisional load is
committed in the new process.

  • Shared/WebPolicyAction.h:

Drop Suspend policy action. At decidePolicyForNavigationAction time, in case of
process-swap, we now tell the previous process to simply ignore the load, while
we create a ProvisionalPageProxy to do the new load in a new process.
Suspension of the previous page in the old process, happens later, when a load
is actually committed in the new process.

  • Sources.txt:

Add new ProvisionalPageProxy file.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _killWebContentProcessAndResetState]):
When calling _killWebContentProcessAndResetState on a WKWebView, kill both the current
process and the provisional one, to maintain previous behavior in our API tests.

  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::createDrawingAreaProxy):

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

(WebKit::PageClientImpl::createDrawingAreaProxy):

  • UIProcess/API/wpe/PageClientImpl.h:
  • UIProcess/AcceleratedDrawingAreaProxy.cpp:

(WebKit::AcceleratedDrawingAreaProxy::AcceleratedDrawingAreaProxy):
(WebKit::AcceleratedDrawingAreaProxy::didUpdateBackingStoreState):
(WebKit::AcceleratedDrawingAreaProxy::sendUpdateBackingStoreState):
(WebKit::AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState):
(WebKit::AcceleratedDrawingAreaProxy::setNativeSurfaceHandleForCompositing):
(WebKit::AcceleratedDrawingAreaProxy::destroyNativeSurfaceHandleForCompositing):

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

(WebKit::WebViewImpl::createDrawingAreaProxy):

  • UIProcess/DrawingAreaProxy.cpp:

(WebKit::DrawingAreaProxy::DrawingAreaProxy):
(WebKit::DrawingAreaProxy::~DrawingAreaProxy):
(WebKit::DrawingAreaProxy::viewExposedRectChangedTimerFired):

  • UIProcess/DrawingAreaProxy.h:

(WebKit::DrawingAreaProxy::process):

  • UIProcess/DrawingAreaProxyImpl.cpp:

(WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
(WebKit::DrawingAreaProxyImpl::update):

  • UIProcess/DrawingAreaProxyImpl.h:
  • UIProcess/PageClient.h:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::deviceScaleFactorDidChange):
(WebKit::RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry):
(WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart):
(WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidEnd):
(WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
(WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState):
(WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):

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

(WebKit::PageClientImpl::createDrawingAreaProxy):

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

(-[WKContentView _createDrawingAreaProxy:]):

  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::createDrawingAreaProxy):

  • UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
  • UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:

(WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy):
(WebKit::TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange):
(WebKit::TiledCoreAnimationDrawingAreaProxy::colorSpaceDidChange):
(WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateActivityState):
(WebKit::TiledCoreAnimationDrawingAreaProxy::createFence):
(WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
(WebKit::TiledCoreAnimationDrawingAreaProxy::adjustTransientZoom):
(WebKit::TiledCoreAnimationDrawingAreaProxy::commitTransientZoom):
(WebKit::TiledCoreAnimationDrawingAreaProxy::dispatchAfterEnsuringDrawing):

  • UIProcess/mac/WebPageProxyMac.mm:
  • UIProcess/win/PageClientImpl.cpp:

(WebKit::PageClientImpl::createDrawingAreaProxy):

  • UIProcess/win/PageClientImpl.h:
  • UIProcess/win/PageClientImpl.cpp:

(WebKit::PageClientImpl::createDrawingAreaProxy):

  • UIProcess/win/PageClientImpl.h:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
Pass the drawing area's associated process when constructing it and store it as a member
in addition to the page. This is necessary now that a page can be associated with 2
WebProcesses at a time, each having its own drawing area.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::createSandboxExtensionsIfNeeded):
Pass the process.

  • UIProcess/ProvisionalPageProxy.cpp: Added.

(WebKit::ProvisionalPageProxy::ProvisionalPageProxy):
(WebKit::ProvisionalPageProxy::~ProvisionalPageProxy):
(WebKit::ProvisionalPageProxy::processDidTerminate):
(WebKit::ProvisionalPageProxy::takeDrawingArea):
(WebKit::ProvisionalPageProxy::cancel):
(WebKit::ProvisionalPageProxy::processDidFinishLaunching):
(WebKit::ProvisionalPageProxy::finishInitializingWebPageAfterProcessLaunch):
(WebKit::ProvisionalPageProxy::initializeWebPage):
(WebKit::ProvisionalPageProxy::loadData):
(WebKit::ProvisionalPageProxy::loadRequest):
(WebKit::ProvisionalPageProxy::goToBackForwardItem):
(WebKit::ProvisionalPageProxy::didCreateMainFrame):
(WebKit::ProvisionalPageProxy::didPerformClientRedirect):
(WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame):
(WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame):
(WebKit::ProvisionalPageProxy::didCommitLoadForFrame):
(WebKit::ProvisionalPageProxy::didNavigateWithNavigationData):
(WebKit::ProvisionalPageProxy::didChangeProvisionalURLForFrame):
(WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionAsync):
(WebKit::ProvisionalPageProxy::decidePolicyForResponse):
(WebKit::ProvisionalPageProxy::startURLSchemeTask):
(WebKit::ProvisionalPageProxy::backForwardGoToItem):
(WebKit::ProvisionalPageProxy::didReceiveMessage):
(WebKit::ProvisionalPageProxy::didReceiveSyncMessage):

  • UIProcess/ProvisionalPageProxy.h: Added.

(WebKit::ProvisionalPageProxy::page):
(WebKit::ProvisionalPageProxy::mainFrame const):
(WebKit::ProvisionalPageProxy::process):
(WebKit::ProvisionalPageProxy::processSwapRequestedByClient const):
(WebKit::ProvisionalPageProxy::navigationID const):
(WebKit::ProvisionalPageProxy::drawingArea const):
New WebPageProxy-like class which is owned by the WebPageProxy and proxies IPC from
the provisional process.

  • UIProcess/SuspendedPageProxy.cpp:

(WebKit::SuspendedPageProxy::~SuspendedPageProxy):
(WebKit::SuspendedPageProxy::unsuspend):
(WebKit::SuspendedPageProxy::didProcessRequestToSuspend):
Unregister the SuspendedPageProxy as an IPC message receiver a little bit earlier
when we're going to unsuspend it. This avoids conflicting with the ProvisionalPageProxy
which tries to register itself as an IPC message receiver for the same pageID when
a process-swap occurs and we're switching to a suspended page.

  • UIProcess/WebFrameProxy.cpp:

(WebKit::WebFrameProxy::isMainFrame const):
WebFrameProxy::isMainFrame() relies on checking that the frame is the WebPageProxy's m_mainFrame.
Now that the WebPageProxy can have a ProvisionalPageProxy, also check if it is the ProvisionalPageProxy's
m_mainFrame to maintain previous behavior.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::provisionalDrawingArea const):
Add getter for the provisional drawing area. We normally only deal with the page's current drawing area, but
the ViewGestureController needs access to the provisional once to display the swipe gesture snapshot.

(WebKit::WebPageProxy::swapToWebProcess):
swapToWebProcess() no longer takes care of unsuspending the SuspendedPage because we now call swapToWebProcess()
later, when a load is actually committed in the provisional page / process. swapToWebProcess() now also needs
to initialize some data members such as the drawing area and the main frame as it is transferring them over from
the ProvisionalPageProxy which started the provisional load.

(WebKit::WebPageProxy::finishAttachingToWebProcess):
We no longer need IsSwapFromSuspended parameter as this is called later now, after a load has actually been
committed in the provisional process.

(WebKit::WebPageProxy::setDrawingArea):
(WebKit::WebPageProxy::initializeWebPage):

  • We no longer need IsSwapFromSuspended parameter as this is called later now, after a load has actually been committed in the provisional process.
  • Factor some code out to WebPageProxy::setDrawingArea() so that it can be shared with swapToWebProcess().

(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
(WebKit::WebPageProxy::loadRequest):
(WebKit::WebPageProxy::loadRequestWithNavigationShared):
Only call setPendingAPIRequestURL() in loadRequestWithNavigation() only if ShouldTreatAsContinuingLoad is not
Yes. This avoids hitting some assertions as this was already called during the first API call if needed.

(WebKit::WebPageProxy::loadData):
(WebKit::WebPageProxy::loadDataWithNavigationShared):
(WebKit::WebPageProxy::stopLoading):
(WebKit::WebPageProxy::reload):
(WebKit::WebPageProxy::didPerformDragControllerAction):
(WebKit::WebPageProxy::findPlugin):
(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
In case of process swap, tell the previous process to ignore the load instead of suspending it right away.
Suspension now happens later, only if we end up committing the provisional load in the new process.
Also discard the SuspendedPage if it failed to suspend (we only reuse its process in this case). This used
to happen a bit later but it is clearer if we do this as early as possible I think.

(WebKit::WebPageProxy::commitProvisionalPage):
When the load is committed in the new process, we call WebPageProxy::commitProvisionalPage(). It takes care of:

  • Actually swapping the WebPageProxy to the new process by calling processDidTerminate() / swapToWebProcess().
  • Suspending the current page.
  • Letting the client know the load is comitted
  • Destroy the ProvisionalPageProxy.

This work used to happen earlier in continueNavigationInNewProcess().

(WebKit::WebPageProxy::continueNavigationInNewProcess):
Moved some of the logic to commitProvisionalPage(). We now merely start the load in a new ProvisionalPageProxy,
without actually having the WebPageProxy switch to the new process yet.

(WebKit::WebPageProxy::didCreateMainFrame):
(WebKit::WebPageProxy::didCreateSubframe):
(WebKit::WebPageProxy::didCreateWindow):
Drop some code that is no longer needed, now that the ProvisionalPageProxy takes care of this.

(WebKit::WebPageProxy::didDestroyNavigation):
On process-swap, when telling the previous process to ignore the load and starting the new load in a new
ProvisionalPageProxy, the previous WebPage attempts to destroy the navigation. In this case, we ignore
the call since the navigation is merely taken over by the ProvisionalPageProxy.

(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
Moved some PSON logic to the ProvisionalPageProxy instead.

(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::willPerformClientRedirectForFrame):
(WebKit::WebPageProxy::didCancelClientRedirectForFrame):
(WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
(WebKit::WebPageProxy::didChangeProvisionalURLForFrameShared):

(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
When didFailProvisionalLoadForFrame() is called for a ProvisionalPageProxy, destroy it.

(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::didReceiveTitleForFrame):
(WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
(WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
(WebKit::WebPageProxy::didRunInsecureContentForFrame):
(WebKit::WebPageProxy::frameDidBecomeFrameSet):
(WebKit::WebPageProxy::decidePolicyForNavigationActionAsync):
(WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::decidePolicyForResponseShared):
(WebKit::WebPageProxy::unableToImplementPolicy):
(WebKit::WebPageProxy::willSubmitForm):
(WebKit::WebPageProxy::didNavigateWithNavigationData):
(WebKit::WebPageProxy::didNavigateWithNavigationDataShared):
(WebKit::WebPageProxy::didPerformClientRedirect):
(WebKit::WebPageProxy::didPerformClientRedirectShared):
(WebKit::WebPageProxy::didPerformServerRedirect):
(WebKit::WebPageProxy::didUpdateHistoryTitle):
(WebKit::WebPageProxy::createNewPage):
(WebKit::WebPageProxy::runJavaScriptAlert):
(WebKit::WebPageProxy::runJavaScriptConfirm):
(WebKit::WebPageProxy::runJavaScriptPrompt):
(WebKit::WebPageProxy::unavailablePluginButtonClicked):
(WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
(WebKit::WebPageProxy::runOpenPanel):
(WebKit::WebPageProxy::printFrame):
(WebKit::WebPageProxy::backForwardGoToItem):
(WebKit::WebPageProxy::backForwardGoToItemShared):
(WebKit::WebPageProxy::learnWord):
(WebKit::WebPageProxy::ignoreWord):
(WebKit::WebPageProxy::didReceiveEvent):
(WebKit::WebPageProxy::editingRangeCallback):
(WebKit::WebPageProxy::rectForCharacterRangeCallback):
(WebKit::WebPageProxy::focusedFrameChanged):
(WebKit::WebPageProxy::frameSetLargestFrameChanged):

(WebKit::WebPageProxy::provisionalProcessDidTerminate):
Cancel the provisiona load and destroy the ProvisionalPageProxy if
the provisional process crashes.

(WebKit::WebPageProxy::resetState):
Drop some code that is no longer needed.

(WebKit::WebPageProxy::creationParameters):

  • Move the hasRegisteredServiceWorkers flag initialization from the call site to here now that we have

more than one call site. This was just some bad factoring.

  • Take the process in parameter now that we page can be associated with several processes at a time.

(WebKit::WebPageProxy::exceededDatabaseQuota):
(WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
(WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
(WebKit::WebPageProxy::enumerateMediaDevicesForFrame):
(WebKit::WebPageProxy::startURLSchemeTask):
(WebKit::WebPageProxy::startURLSchemeTaskShared):
(WebKit::WebPageProxy::stopURLSchemeTask):
(WebKit::WebPageProxy::loadSynchronousURLSchemeTask):
(WebKit::WebPageProxy::checkURLReceivedFromCurrentOrPreviousWebProcess):
(WebKit::WebPageProxy::willAcquireUniversalFileReadSandboxExtension):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::visitedLinkStore):
(WebKit::WebPageProxy::provisionalPageProxy const):

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::hasProvisionalPageWithID const):
(WebKit::WebProcessProxy::updateBackForwardItem):
(WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch):
(WebKit::WebProcessProxy::didFinishLaunching):
(WebKit::WebProcessProxy::canTerminateChildProcess):

  • UIProcess/WebProcessProxy.h:

(WebKit::WebProcessProxy::addProvisionalPageProxy):
(WebKit::WebProcessProxy::removeProvisionalPageProxy):
Before updating a BackForwardListItem, we normally make sure the process has a WebPageProxy with the
item's pageID. We have to tweak the logic because there may now be no WebPageProxy with this pageID
associated with this process yet, because it is still a ProvisionalPageProxy.

  • UIProcess/WebURLSchemeHandler.cpp:

(WebKit::WebURLSchemeHandler::startTask):

  • UIProcess/WebURLSchemeHandler.h:
  • UIProcess/WebURLSchemeTask.cpp:

(WebKit::WebURLSchemeTask::create):
(WebKit::WebURLSchemeTask::WebURLSchemeTask):
(WebKit::WebURLSchemeTask::didPerformRedirection):
(WebKit::WebURLSchemeTask::didReceiveResponse):
(WebKit::WebURLSchemeTask::didReceiveData):
(WebKit::WebURLSchemeTask::didComplete):
(WebKit::WebURLSchemeTask::pageDestroyed):

  • UIProcess/WebURLSchemeTask.h:

Pass the process when constructing a WebURLSchemeTask and store it as a data member in addition to
the page. This is necessary now that a WebPageProxy can be associated with several WebProcesses.

  • UIProcess/ios/ViewGestureControllerIOS.mm:

(WebKit::ViewGestureController::endSwipeGesture):
Use the provisional drawing area to display the swipe snapshot as it may differ from the one currently
associated with the page in case of process swap.

  • WebKit.xcodeproj/project.pbxproj:

Add ProvisionalPageProxy class.

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::toPolicyAction):
(WebKit::WebFrame::didReceivePolicyDecision):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_shouldAttachDrawingAreaOnPageTransition):
(WebKit::WebPage::reinitializeWebPage):
(WebKit::WebPage::didReceivePolicyDecision):
Stop dealing with WebPolicyAction::Suspend as it no longer exists.

(WebKit::WebPage::didCompletePageTransition):

(WebKit::WebPage::setIsSuspended):
Suspend the Page when setIsSuspended(true) is called, now that there is no longer a WebPolicyAction::Suspend.
setIsSuspended(true) IPC is sent when we actually commit the provisional page.

  • WebProcess/WebPage/WebPage.h:

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

(-[PSONNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):

LayoutTests:

Skip test testing the cross-process DOMWindow API as I broke it with this patch.
The feature is far from ready and off by default anyway. I will add support back
in a follow-up.

  • platform/wk2/TestExpectations:
12:35 PM Changeset in webkit [240045] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Frequent null-deref under TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded()
https://bugs.webkit.org/show_bug.cgi?id=193468
<rdar://problem/38645869>

Reviewed by Zalan Bujtas.

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
Adjust the null-check a bit; Zalan pointed out that the layout could
be responsible for the Frame/RenderView going away, so we should bail
*after* layout, not before.

11:56 AM Changeset in webkit [240044] by Devin Rousso
  • 2 edits in trunk/Source/WebCore

Web Inspector: extend overlay element bounds lines to the right/below as well
https://bugs.webkit.org/show_bug.cgi?id=193336

Reviewed by Matt Baker.

This patch is purely a visual change for WebInspector, and doesn't affect anything else.

  • inspector/InspectorOverlayPage.js:

(_drawBounds):

11:08 AM Changeset in webkit [240043] by keith_miller@apple.com
  • 6 edits
    1 copy in trunk/Source

bmalloc should use JSC VM tag for gigacage
https://bugs.webkit.org/show_bug.cgi?id=193496

Reviewed by Mark Lam.

Source/bmalloc:

This patch moves the VMTag info from WTF to bmalloc so that we can
tag gigacage memory with the unused JSC memory tag. The JSC memory
tag was previously used for wasm but since wasm is now allocated
out of the primitive cage it was unused.

  • bmalloc.xcodeproj/project.pbxproj:
  • bmalloc/BVMTags.h: Copied from Source/WTF/wtf/VMTags.h.
  • bmalloc/Gigacage.cpp:

(Gigacage::ensureGigacage):

  • bmalloc/VMAllocate.h:

(bmalloc::tryVMAllocate):
(bmalloc::vmZeroAndPurge):

Source/WTF:

Move most of the macros for vm tagging to bmalloc.

  • wtf/VMTags.h:
11:07 AM Changeset in webkit [240042] by youenn@apple.com
  • 7 edits in trunk/Source/WebCore

Prevent WorkerRunLoop::runInMode from spinning in nested cases
https://bugs.webkit.org/show_bug.cgi?id=193359
<rdar://problem/46345353>

Reviewed by Joseph Pecoraro.

Speculative fix for some cases where service worker is spinning and consuming a lot of CPU.
The hypothesis is that:

  • Service Worker is checking for its script freshness through WorkerScriptLoader.

This triggers the worker run loop to be nested.

  • The run loop timer is active and needs to fire immediately.

The hypothesis is that this happens in some cases like restarting a device after sleep mode.

WorkerRunLoop::runInMode will then compute a 0 timeout value for getting a message.
This will trigger a timeout while waiting for the message queue.
Since the run loop is nested, the run loop timer will not be able to fire,
and it will keep ask to fire immediately.
runInMode will return timeout as a result and WorkerRunLoop::run will call it immediately.

The fix is to prevent the shared timer to fire only when the run loop is being debugged through the web inspector.
We compute this by checking the run loop mode as debuggerMode().
Did some refactoring by introducing helper routines for running the loop and posting task in debugger mode.

  • inspector/WorkerScriptDebugServer.cpp:

(WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):

  • workers/WorkerInspectorProxy.cpp:

(WebCore::WorkerInspectorProxy::resumeWorkerIfPaused):
(WebCore::WorkerInspectorProxy::connectToWorkerInspectorController):
(WebCore::WorkerInspectorProxy::disconnectFromWorkerInspectorController):
(WebCore::WorkerInspectorProxy::sendMessageToWorkerInspectorController):

  • workers/WorkerRunLoop.cpp:

(WebCore::ModePredicate::ModePredicate):
(WebCore::WorkerRunLoop::WorkerRunLoop):
(WebCore::debuggerMode):
(WebCore::RunLoopSetup::RunLoopSetup):
(WebCore::RunLoopSetup::~RunLoopSetup):
(WebCore::WorkerRunLoop::run):
(WebCore::WorkerRunLoop::runInDebuggerMode):
(WebCore::WorkerRunLoop::runInMode):
(WebCore::WorkerRunLoop::Task::performTask):

  • workers/WorkerRunLoop.h:

(WebCore::WorkerRunLoop::isBeingDebugged const):

  • workers/WorkerThread.cpp:

(WebCore::WorkerThread::startRunningDebuggerTasks):

  • workers/service/context/ServiceWorkerInspectorProxy.cpp:

(WebCore::ServiceWorkerInspectorProxy::connectToWorker):
(WebCore::ServiceWorkerInspectorProxy::disconnectFromWorker):
(WebCore::ServiceWorkerInspectorProxy::sendMessageToWorker):

10:44 AM Changeset in webkit [240041] by mark.lam@apple.com
  • 35 edits in trunk/Source/JavaScriptCore

Refactor new bytecode structs so that the fields are prefixed with "m_".
https://bugs.webkit.org/show_bug.cgi?id=193467

Reviewed by Saam Barati and Tadeu Zagallo.

This makes it easier to do a manual audit of type correctness of the LLInt
instructions used to access these fields. Without this change, it would be
difficult (and error prone) to distinguish the difference between field names and
macro variables. This audit will be done after this patch lands.

  • bytecode/BytecodeGeneratorification.cpp:

(JSC::BytecodeGeneratorification::BytecodeGeneratorification):

  • bytecode/BytecodeUseDef.h:

(JSC::computeUsesForBytecodeOffset):

  • bytecode/CallLinkStatus.cpp:

(JSC::CallLinkStatus::computeFromLLInt):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::finalizeLLIntInlineCaches):
(JSC::CodeBlock::ensureCatchLivenessIsComputedForBytecodeOffset):
(JSC::CodeBlock::ensureCatchLivenessIsComputedForBytecodeOffsetSlow):
(JSC::CodeBlock::getArrayProfile):
(JSC::CodeBlock::notifyLexicalBindingShadowing):
(JSC::CodeBlock::tryGetValueProfileForBytecodeOffset):
(JSC::CodeBlock::arithProfileForPC):
(JSC::CodeBlock::insertBasicBlockBoundariesForControlFlowProfiler):

  • bytecode/CodeBlockInlines.h:

(JSC::CodeBlock::forEachValueProfile):
(JSC::CodeBlock::forEachArrayProfile):
(JSC::CodeBlock::forEachArrayAllocationProfile):
(JSC::CodeBlock::forEachObjectAllocationProfile):
(JSC::CodeBlock::forEachLLIntCallLinkInfo):

  • bytecode/GetByIdStatus.cpp:

(JSC::GetByIdStatus::computeFromLLInt):

  • bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp:

(JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint::clearLLIntGetByIdCache):

  • bytecode/PreciseJumpTargetsInlines.h:

(JSC::jumpTargetForInstruction):
(JSC::extractStoredJumpTargetsForInstruction):
(JSC::updateStoredJumpTargetsForInstruction):

  • bytecode/PutByIdStatus.cpp:

(JSC::PutByIdStatus::computeFromLLInt):

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::dumpLineColumnEntry):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::fuseCompareAndJump):
(JSC::BytecodeGenerator::fuseTestAndJmp):
(JSC::BytecodeGenerator::emitEqualityOp):
(JSC::BytecodeGenerator::endSwitch):
(JSC::StructureForInContext::finalize):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::handleVarargsCall):
(JSC::DFG::ByteCodeParser::parseGetById):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::handlePutByVal):
(JSC::DFG::ByteCodeParser::handlePutAccessorById):
(JSC::DFG::ByteCodeParser::handlePutAccessorByVal):
(JSC::DFG::ByteCodeParser::handleNewFunc):
(JSC::DFG::ByteCodeParser::handleNewFuncExp):

  • dfg/DFGOSREntry.cpp:

(JSC::DFG::prepareCatchOSREntry):

  • ftl/FTLOperations.cpp:

(JSC::FTL::operationMaterializeObjectInOSR):

  • generator/Argument.rb:
  • generator/Metadata.rb:
  • generator/Opcode.rb:
  • jit/JIT.h:
  • jit/JITArithmetic.cpp:

(JSC::JIT::emit_op_unsigned):
(JSC::JIT::emit_compareAndJump):
(JSC::JIT::emit_compareUnsignedAndJump):
(JSC::JIT::emit_compareUnsigned):
(JSC::JIT::emit_compareAndJumpSlow):
(JSC::JIT::emit_op_inc):
(JSC::JIT::emit_op_dec):
(JSC::JIT::emit_op_mod):
(JSC::JIT::emit_op_negate):
(JSC::JIT::emitBitBinaryOpFastPath):
(JSC::JIT::emit_op_bitnot):
(JSC::JIT::emitRightShiftFastPath):
(JSC::JIT::emit_op_add):
(JSC::JIT::emitMathICFast):
(JSC::JIT::emitMathICSlow):
(JSC::JIT::emit_op_div):
(JSC::JIT::emit_op_mul):
(JSC::JIT::emit_op_sub):

  • jit/JITArithmetic32_64.cpp:

(JSC::JIT::emit_compareAndJump):
(JSC::JIT::emit_compareUnsignedAndJump):
(JSC::JIT::emit_compareUnsigned):
(JSC::JIT::emit_compareAndJumpSlow):
(JSC::JIT::emit_op_unsigned):
(JSC::JIT::emit_op_inc):
(JSC::JIT::emit_op_dec):
(JSC::JIT::emitBinaryDoubleOp):
(JSC::JIT::emit_op_mod):

  • jit/JITCall.cpp:

(JSC::JIT::emitPutCallResult):
(JSC::JIT::compileSetupFrame):
(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileTailCall):
(JSC::JIT::compileOpCall):

  • jit/JITCall32_64.cpp:

(JSC::JIT::emitPutCallResult):
(JSC::JIT::emit_op_ret):
(JSC::JIT::compileSetupFrame):
(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCall):

  • jit/JITInlines.h:

(JSC::JIT::emitValueProfilingSiteIfProfiledOpcode):
(JSC::JIT::emitValueProfilingSite):
(JSC::JIT::copiedGetPutInfo):
(JSC::JIT::copiedArithProfile):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_mov):
(JSC::JIT::emit_op_end):
(JSC::JIT::emit_op_jmp):
(JSC::JIT::emit_op_new_object):
(JSC::JIT::emitSlow_op_new_object):
(JSC::JIT::emit_op_overrides_has_instance):
(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof):
(JSC::JIT::emit_op_is_empty):
(JSC::JIT::emit_op_is_undefined):
(JSC::JIT::emit_op_is_undefined_or_null):
(JSC::JIT::emit_op_is_boolean):
(JSC::JIT::emit_op_is_number):
(JSC::JIT::emit_op_is_cell_with_type):
(JSC::JIT::emit_op_is_object):
(JSC::JIT::emit_op_ret):
(JSC::JIT::emit_op_to_primitive):
(JSC::JIT::emit_op_set_function_name):
(JSC::JIT::emit_op_not):
(JSC::JIT::emit_op_jfalse):
(JSC::JIT::emit_op_jeq_null):
(JSC::JIT::emit_op_jneq_null):
(JSC::JIT::emit_op_jneq_ptr):
(JSC::JIT::emit_op_eq):
(JSC::JIT::emit_op_jeq):
(JSC::JIT::emit_op_jtrue):
(JSC::JIT::emit_op_neq):
(JSC::JIT::emit_op_jneq):
(JSC::JIT::emit_op_throw):
(JSC::JIT::compileOpStrictEq):
(JSC::JIT::compileOpStrictEqJump):
(JSC::JIT::emitSlow_op_jstricteq):
(JSC::JIT::emitSlow_op_jnstricteq):
(JSC::JIT::emit_op_to_number):
(JSC::JIT::emit_op_to_string):
(JSC::JIT::emit_op_to_object):
(JSC::JIT::emit_op_catch):
(JSC::JIT::emit_op_get_parent_scope):
(JSC::JIT::emit_op_switch_imm):
(JSC::JIT::emit_op_switch_char):
(JSC::JIT::emit_op_switch_string):
(JSC::JIT::emit_op_debug):
(JSC::JIT::emit_op_eq_null):
(JSC::JIT::emit_op_neq_null):
(JSC::JIT::emit_op_get_scope):
(JSC::JIT::emit_op_to_this):
(JSC::JIT::emit_op_create_this):
(JSC::JIT::emit_op_check_tdz):
(JSC::JIT::emitSlow_op_eq):
(JSC::JIT::emitSlow_op_neq):
(JSC::JIT::emitSlow_op_jeq):
(JSC::JIT::emitSlow_op_jneq):
(JSC::JIT::emitSlow_op_instanceof_custom):
(JSC::JIT::emit_op_new_regexp):
(JSC::JIT::emitNewFuncCommon):
(JSC::JIT::emitNewFuncExprCommon):
(JSC::JIT::emit_op_new_array):
(JSC::JIT::emit_op_new_array_with_size):
(JSC::JIT::emit_op_has_structure_property):
(JSC::JIT::emit_op_has_indexed_property):
(JSC::JIT::emitSlow_op_has_indexed_property):
(JSC::JIT::emit_op_get_direct_pname):
(JSC::JIT::emit_op_enumerator_structure_pname):
(JSC::JIT::emit_op_enumerator_generic_pname):
(JSC::JIT::emit_op_profile_type):
(JSC::JIT::emit_op_log_shadow_chicken_prologue):
(JSC::JIT::emit_op_log_shadow_chicken_tail):
(JSC::JIT::emit_op_profile_control_flow):
(JSC::JIT::emit_op_argument_count):
(JSC::JIT::emit_op_get_rest_length):
(JSC::JIT::emit_op_get_argument):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_mov):
(JSC::JIT::emit_op_end):
(JSC::JIT::emit_op_jmp):
(JSC::JIT::emit_op_new_object):
(JSC::JIT::emitSlow_op_new_object):
(JSC::JIT::emit_op_overrides_has_instance):
(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof_custom):
(JSC::JIT::emit_op_is_empty):
(JSC::JIT::emit_op_is_undefined):
(JSC::JIT::emit_op_is_undefined_or_null):
(JSC::JIT::emit_op_is_boolean):
(JSC::JIT::emit_op_is_number):
(JSC::JIT::emit_op_is_cell_with_type):
(JSC::JIT::emit_op_is_object):
(JSC::JIT::emit_op_to_primitive):
(JSC::JIT::emit_op_set_function_name):
(JSC::JIT::emit_op_not):
(JSC::JIT::emit_op_jfalse):
(JSC::JIT::emit_op_jtrue):
(JSC::JIT::emit_op_jeq_null):
(JSC::JIT::emit_op_jneq_null):
(JSC::JIT::emit_op_jneq_ptr):
(JSC::JIT::emit_op_eq):
(JSC::JIT::emitSlow_op_eq):
(JSC::JIT::emit_op_jeq):
(JSC::JIT::emitSlow_op_jeq):
(JSC::JIT::emit_op_neq):
(JSC::JIT::emitSlow_op_neq):
(JSC::JIT::emit_op_jneq):
(JSC::JIT::emitSlow_op_jneq):
(JSC::JIT::compileOpStrictEq):
(JSC::JIT::compileOpStrictEqJump):
(JSC::JIT::emitSlow_op_jstricteq):
(JSC::JIT::emitSlow_op_jnstricteq):
(JSC::JIT::emit_op_eq_null):
(JSC::JIT::emit_op_neq_null):
(JSC::JIT::emit_op_throw):
(JSC::JIT::emit_op_to_number):
(JSC::JIT::emit_op_to_string):
(JSC::JIT::emit_op_to_object):
(JSC::JIT::emit_op_catch):
(JSC::JIT::emit_op_get_parent_scope):
(JSC::JIT::emit_op_switch_imm):
(JSC::JIT::emit_op_switch_char):
(JSC::JIT::emit_op_switch_string):
(JSC::JIT::emit_op_debug):
(JSC::JIT::emit_op_get_scope):
(JSC::JIT::emit_op_create_this):
(JSC::JIT::emit_op_to_this):
(JSC::JIT::emit_op_check_tdz):
(JSC::JIT::emit_op_has_structure_property):
(JSC::JIT::emit_op_has_indexed_property):
(JSC::JIT::emitSlow_op_has_indexed_property):
(JSC::JIT::emit_op_get_direct_pname):
(JSC::JIT::emit_op_enumerator_structure_pname):
(JSC::JIT::emit_op_enumerator_generic_pname):
(JSC::JIT::emit_op_profile_type):
(JSC::JIT::emit_op_log_shadow_chicken_prologue):
(JSC::JIT::emit_op_log_shadow_chicken_tail):

  • jit/JITOperations.cpp:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emitGetByValWithCachedId):
(JSC::JIT::emitSlow_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emitGenericContiguousPutByVal):
(JSC::JIT::emitArrayStoragePutByVal):
(JSC::JIT::emitPutByValWithCachedId):
(JSC::JIT::emitSlow_op_put_by_val):
(JSC::JIT::emit_op_put_getter_by_id):
(JSC::JIT::emit_op_put_setter_by_id):
(JSC::JIT::emit_op_put_getter_setter_by_id):
(JSC::JIT::emit_op_put_getter_by_val):
(JSC::JIT::emit_op_put_setter_by_val):
(JSC::JIT::emit_op_del_by_id):
(JSC::JIT::emit_op_del_by_val):
(JSC::JIT::emit_op_try_get_by_id):
(JSC::JIT::emitSlow_op_try_get_by_id):
(JSC::JIT::emit_op_get_by_id_direct):
(JSC::JIT::emitSlow_op_get_by_id_direct):
(JSC::JIT::emit_op_get_by_id):
(JSC::JIT::emit_op_get_by_id_with_this):
(JSC::JIT::emitSlow_op_get_by_id):
(JSC::JIT::emitSlow_op_get_by_id_with_this):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emitSlow_op_put_by_id):
(JSC::JIT::emit_op_in_by_id):
(JSC::JIT::emitSlow_op_in_by_id):
(JSC::JIT::emit_op_resolve_scope):
(JSC::JIT::emit_op_get_from_scope):
(JSC::JIT::emitSlow_op_get_from_scope):
(JSC::JIT::emit_op_put_to_scope):
(JSC::JIT::emit_op_get_from_arguments):
(JSC::JIT::emit_op_put_to_arguments):
(JSC::JIT::emitIntTypedArrayPutByVal):
(JSC::JIT::emitFloatTypedArrayPutByVal):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_put_getter_by_id):
(JSC::JIT::emit_op_put_setter_by_id):
(JSC::JIT::emit_op_put_getter_setter_by_id):
(JSC::JIT::emit_op_put_getter_by_val):
(JSC::JIT::emit_op_put_setter_by_val):
(JSC::JIT::emit_op_del_by_id):
(JSC::JIT::emit_op_del_by_val):
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emitGetByValWithCachedId):
(JSC::JIT::emitSlow_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emitGenericContiguousPutByVal):
(JSC::JIT::emitArrayStoragePutByVal):
(JSC::JIT::emitPutByValWithCachedId):
(JSC::JIT::emitSlow_op_put_by_val):
(JSC::JIT::emit_op_try_get_by_id):
(JSC::JIT::emitSlow_op_try_get_by_id):
(JSC::JIT::emit_op_get_by_id_direct):
(JSC::JIT::emitSlow_op_get_by_id_direct):
(JSC::JIT::emit_op_get_by_id):
(JSC::JIT::emitSlow_op_get_by_id):
(JSC::JIT::emit_op_get_by_id_with_this):
(JSC::JIT::emitSlow_op_get_by_id_with_this):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emitSlow_op_put_by_id):
(JSC::JIT::emit_op_in_by_id):
(JSC::JIT::emitSlow_op_in_by_id):
(JSC::JIT::emit_op_resolve_scope):
(JSC::JIT::emit_op_get_from_scope):
(JSC::JIT::emitSlow_op_get_from_scope):
(JSC::JIT::emit_op_put_to_scope):
(JSC::JIT::emit_op_get_from_arguments):
(JSC::JIT::emit_op_put_to_arguments):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::setupGetByIdPrototypeCache):
(JSC::LLInt::getByVal):
(JSC::LLInt::genericCall):
(JSC::LLInt::varargsSetup):
(JSC::LLInt::commonCallEval):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/CommonSlowPaths.cpp:

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

  • runtime/CommonSlowPaths.h:

(JSC::CommonSlowPaths::tryCachePutToScopeGlobal):
(JSC::CommonSlowPaths::tryCacheGetFromScopeGlobal):

10:10 AM Changeset in webkit [240040] by mark.lam@apple.com
  • 6 edits
    4 adds in trunk

JSFunction::canUseAllocationProfile() should account for builtin functions with no own prototypes.
https://bugs.webkit.org/show_bug.cgi?id=193423
<rdar://problem/46209355>

Reviewed by Saam Barati.

JSTests:

  • microbenchmarks/sinkable-new-object-with-builtin-constructor.js: Added.
  • stress/constructing-builtin-functions-with-getter-prototype-should-only-call-getter-once-per-new-1.js: Added.
  • stress/constructing-builtin-functions-with-getter-prototype-should-only-call-getter-once-per-new-2.js: Added.
  • stress/jsfunction-cannot-use-allocation-profile-with-builtin-functions-with-no-prototype.js: Added.

Source/JavaScriptCore:

JSFunction::canUseAllocationProfile() should return false for most builtins
because the majority of them have no prototype property. The only exception to
this is the few builtin functions that are explicitly used as constructors.

For these builtin constructors, JSFunction::canUseAllocationProfile() should also
return false if the prototype property is a getter or custom getter because
getting the prototype would then be effectful.

  • dfg/DFGOperations.cpp:
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/JSFunctionInlines.h:

(JSC::JSFunction::canUseAllocationProfile):

  • runtime/PropertySlot.h:
9:11 AM Changeset in webkit [240039] by sihui_liu@apple.com
  • 3 edits in trunk/Source/WebCore

IndexedDB: leak WebIDBConnectionToClient for retain cycle
https://bugs.webkit.org/show_bug.cgi?id=193097
<rdar://problem/46899601>

Reviewed by David Kilzer.

Fix API test failure after r239887. After removing the retain cycle, IDBConnectionToClient will no longer live
forever so make sure it is not destructed before UniqueIDBDatabaseConnection unregisters itself.

  • Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:

(WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::~UniqueIDBDatabaseConnection):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::fireVersionChangeEvent):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::didAbortTransaction):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::didCommitTransaction):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::didCreateObjectStore):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::didDeleteObjectStore):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::didRenameObjectStore):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::didClearObjectStore):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::didCreateIndex):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::didDeleteIndex):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::didRenameIndex):

  • Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
8:32 AM Changeset in webkit [240038] by berto@igalia.com
  • 2 edits in trunk/Source/WTF

[WTF] Compilation fails with system malloc
https://bugs.webkit.org/show_bug.cgi?id=172445

Reviewed by Michael Catanzaro.

Follow-up to r217270. The sysinfo() system call is specific to
Linux so update the #ifdef checks accordingly.

  • wtf/RAMSize.cpp:

(WTF::computeRAMSize):

8:03 AM Changeset in webkit [240037] by Antti Koivisto
  • 5 edits in trunk/Source/WebCore

Add more assertions to find root cause for release assert hit in StyleResolver
https://bugs.webkit.org/show_bug.cgi?id=193488
<rdar://problem/30983040>

Reviewed by Zalan Bujtas.

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::~StyleResolver):

Release assert we are not resolving tree style.

  • dom/Document.cpp:

(WebCore::Document::setIsResolvingTreeStyle):

  • dom/Document.h:

(WebCore::Document::isResolvingTreeStyle const):

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::Scope::Scope):
(WebCore::Style::TreeResolver::Scope::~Scope):

Set isResolvingTreeStyle bit when we have a tree resolver scope.

7:23 AM Changeset in webkit [240036] by Alan Bujtas
  • 5 edits
    2 adds in trunk

[LFC][Out-of-flow] Set used vertical margin values when top/height/bottom are non-auto.
https://bugs.webkit.org/show_bug.cgi?id=193470

Reviewed by Antti Koivisto.

Source/WebCore:

Non-auto vertical margin values (which is mostly the case) should be set as used values.

Test: fast/block/block-only/non-auto-top-bottom-height-with-margins.html

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):

Tools:

  • LayoutReloaded/misc/LFC-passing-tests.txt:

LayoutTests:

  • fast/block/block-only/non-auto-top-bottom-height-with-margins-expected.txt: Added.
  • fast/block/block-only/non-auto-top-bottom-height-with-margins.html: Added.
6:52 AM Changeset in webkit [240035] by Alan Bujtas
  • 5 edits
    2 adds in trunk

[LFC] Adjust margin box verification.
https://bugs.webkit.org/show_bug.cgi?id=193482

Source/WebCore:

Reviewed by Antti Koivisto.

In certain cases, like out-of-flow boxes with margin auto, marginBoxRect() returns 0. It's clearly incorrect,
so let's check the individual margin values instead (and at this point we know that all other boxes match).

Test: fast/block/block-only/non-auto-top-bottom-height-with-auto-margins.html

  • layout/Verification.cpp:

(WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):

Tools:

Reviewed by Antti Koivisto.

  • LayoutReloaded/misc/LFC-passing-tests.txt:

LayoutTests:

Reviewed by Antti Koivisto.

  • fast/block/block-only/non-auto-top-bottom-height-with-auto-margins-expected.txt: Added.
  • fast/block/block-only/non-auto-top-bottom-height-with-auto-margins.html: Added.
3:05 AM Changeset in webkit [240034] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

[FreeType] Cache the zero-width space glyph in GlyphPage::fill()
https://bugs.webkit.org/show_bug.cgi?id=193485

Reviewed by Carlos Garcia Campos.

In FreeType's implementation of GlyphPage::fill(), we can cache the
zero-width space glyph upon first retrieval through the
FcFreeTypeCharIndex() entrypoint, avoiding any subsequent calls
for other ignorable characters.

  • platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp:

(WebCore::GlyphPage::fill):

2:53 AM Changeset in webkit [240033] by mmaxfield@apple.com
  • 3 edits
    2 adds in trunk/Source/WebCore

[WHLSL] Add the high zombie finder
https://bugs.webkit.org/show_bug.cgi?id=193432

Reviewed by Robin Morisset and Saam Barati.

This is a translation of https://github.com/gpuweb/WHLSL/blob/master/Source/HighZombieFinder.mjs into C++.

No new tests because it isn't hooked up yet. Not enough of the compiler exists to have any meaningful sort
of test. When enough of the compiler is present, I'll port the reference implementation's test suite.

  • Modules/webgpu/WHLSL/WHLSLHighZombieFinder.cpp: Added.

(WebCore::WHLSL::findHighZombies):

  • Modules/webgpu/WHLSL/WHLSLHighZombieFinder.h: Added.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:

Jan 15, 2019:

10:40 PM Changeset in webkit [240032] by Fujii Hironori
  • 4 edits in trunk/Source

Unreviewed WinCairo build fix.

Source/WebCore:

  • platform/network/curl/ResourceHandleCurl.cpp:

(WebCore::ResourceHandle::createCurlRequest):
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::receivedCredential):
(WebCore::ResourceHandle::getCredential):

Source/WebKit:

  • WebProcess/WebPage/WebPageInspectorTargetController.cpp:

(WebKit::WebPageInspectorTargetController::connectInspector): Use 'auto' instead of unprefixed InspectorTarget.
(WebKit::WebPageInspectorTargetController::disconnectInspector): Ditto.
(WebKit::WebPageInspectorTargetController::sendMessageToTargetBackend): Ditto.

9:03 PM Changeset in webkit [240031] by achristensen@apple.com
  • 16 edits in trunk/Source

Reduce use of NetworkStorageSession::defaultStorageSession in WebCore
https://bugs.webkit.org/show_bug.cgi?id=193368

Reviewed by Geoff Garen.

Source/WebCore:

The NetworkStorageSession ownership needs to move to the WebKit/WebKitLegacy layer instead of being a process-global static map.

  • loader/EmptyClients.cpp:
  • platform/network/CredentialStorage.cpp:

(WebCore::CredentialStorage::defaultCredentialStorage): Deleted.

  • platform/network/CredentialStorage.h:
  • platform/network/NetworkStorageSession.h:
  • platform/network/cf/NetworkStorageSessionCFNet.cpp:

(WebCore::NetworkStorageSession::switchToNewTestingSession):
(WebCore::NetworkStorageSession::ensureSession):

  • platform/network/cf/NetworkStorageSessionCFNetWin.cpp:

(WebCore::createPrivateStorageSession):

  • platform/network/curl/ResourceHandleCurl.cpp:

(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::receivedCredential):
(WebCore::ResourceHandle::getCredential):

Source/WebKit:

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::getAuthenticationInfo):

Source/WebKitLegacy/mac:

  • Misc/WebCache.mm:

(+[WebCache clearCachedCredentials]):

  • Misc/WebDownload.mm:

(-[WebDownloadInternal download:didReceiveAuthenticationChallenge:]):

  • Plugins/WebBaseNetscapePluginView.mm:

(WebKit::getAuthenticationInfo):

Source/WebKitLegacy/win:

  • WebDownloadCFNet.cpp:

(WebDownload::didReceiveAuthenticationChallenge):

8:57 PM Changeset in webkit [240030] by achristensen@apple.com
  • 5 edits in trunk/Source/WebKit

Remove more NetworkProcess::singleton use
https://bugs.webkit.org/show_bug.cgi?id=193484

Reviewed by Geoffrey Garen.

This removes the use of NetworkProcess::singleton in the LegacyCustomProtocolManager.
This is the kind of awful duct tape code that keeps me awake at night, but it's necessary
because we can't quite remove LegacyCustomProtocolManager yet but we need to allow more than
one NetworkProcess object. To make it work well enough until we remove LegacyCustomProtocolManager,
use the last NetworkProcess object that has been created.

  • NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm:

(newestNetworkProcess):
(LegacyCustomProtocolManager::networkProcessCreated):
(+[WKCustomProtocol canInitWithRequest:]):
(-[WKCustomProtocol initWithRequest:cachedResponse:client:]):
(-[WKCustomProtocol startLoading]):
(-[WKCustomProtocol stopLoading]):

  • NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.cpp:

(WebKit::LegacyCustomProtocolManager::LegacyCustomProtocolManager):
(WebKit::LegacyCustomProtocolManager::startLoading):
(WebKit::LegacyCustomProtocolManager::stopLoading):

  • NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::NetworkProcess):

8:27 PM Changeset in webkit [240029] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Fix WinCairo build after r240014
https://bugs.webkit.org/show_bug.cgi?id=161106

  • NetworkProcess/curl/NetworkDataTaskCurl.cpp:
8:20 PM Changeset in webkit [240028] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKitLegacy/win

Fix Windows build after r240014
https://bugs.webkit.org/show_bug.cgi?id=161106

  • WebView.cpp:
7:35 PM Changeset in webkit [240027] by rniwa@webkit.org
  • 7 edits
    2 adds in trunk

VisualViewport API should be updated upon opening of keyboard
https://bugs.webkit.org/show_bug.cgi?id=193475

Reviewed by Simon Fraser.

Source/WebCore:

Added a function to update the visual viewport API and schedule a resize event to FrameView.

Test: fast/visual-viewport/ios/resize-event-for-keyboard.html

  • page/FrameView.cpp:

(WebCore::FrameView::didUpdateViewportOverrideRects):

  • page/FrameView.h:

Source/WebKit:

The bug was caused by the changes to unobscuredContentRectRespectingInputViewBounds not updating the visual viewport
unless it caused a layout to happen. Added a code to update the visual viewport in WebPage::updateVisibleContentRects.

Also fixed the bug that VisibleContentRectUpdateInfo::operator== was not checking differences in
unobscuredContentRectRespectingInputViewBounds which resulted in the visual viewport override not getting updated
while the keyboard is getting brought up.

  • Shared/VisibleContentRectUpdateInfo.h:

(WebKit::operator==):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::updateVisibleContentRects):

LayoutTests:

Added a regression test.

  • fast/visual-viewport/ios/resize-event-for-keyboard-expected.txt: Added.
  • fast/visual-viewport/ios/resize-event-for-keyboard.html: Added.
7:27 PM Changeset in webkit [240026] by mmaxfield@apple.com
  • 3 edits in trunk/Source/WebCore

Fix build after r240018
https://bugs.webkit.org/show_bug.cgi?id=193434

Unreviewed.

  • Modules/webgpu/WHLSL/WHLSLLoopChecker.cpp:

(WebCore::WHLSL::checkLoops):
(WebCore::WHLSL::findHighZombies): Deleted.

  • Modules/webgpu/WHLSL/WHLSLLoopChecker.h:
7:09 PM Changeset in webkit [240025] by sihui_liu@apple.com
  • 3 edits in trunk/Tools

Fix API test WebKit.WebsiteDataStoreCustomPathsWithoutPrewarming after 193354
https://bugs.webkit.org/show_bug.cgi?id=193451

Reviewed by Geoffrey Garen.

  • TestWebKitAPI/Tests/WebKitCocoa/DuplicateCompletionHandlerCalls.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:

(runWebsiteDataStoreCustomPaths):

6:17 PM Changeset in webkit [240024] by yusukesuzuki@slowstart.org
  • 5 edits
    2 adds in trunk

[JSC] Use KnownStringUse for GetByVal(Array::String) since AI would offer wider type information and offer non-string type after removing Check(String)
https://bugs.webkit.org/show_bug.cgi?id=193438
<rdar://problem/45581249>

Reviewed by Saam Barati and Keith Miller.

JSTests:

Under the heavy load (like, compiling WebKit), AI in this code can broaden type information after the 1st run.
Then, GetByVal(String) crashed.

  • stress/string-get-by-val-lowering.js: Added.

(shouldBe):
(test):

  • stress/type-for-get-by-val-can-be-widen-after-ai.js: Added.

(Hello):
(foo):

Source/JavaScriptCore:

GetByVal(Array::String) emits Check(String) before that. But AI can broaden type constraint in the second run.
After the first run removes Check(String), it would happen that AI starts saying the type of 1st child is not String.
To claim that it *is* a String type, we should use KnownStringUse here.

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode): StringCharAt and GetByVal(Array::String) share the underlying compiler code. We should
change StringUse => KnownStringUse for StringCharAt too. And StringCharAt and StringCharCodeAt potentially have the same
problem. This patch fixes it too.

  • dfg/DFGSSALoweringPhase.cpp:

(JSC::DFG::SSALoweringPhase::lowerBoundsCheck):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileStringCharAt):
(JSC::FTL::DFG::LowerDFGToB3::compileStringCharCodeAt):

5:41 PM Changeset in webkit [240023] by sbarati@apple.com
  • 46 edits
    12 deletes in trunk/Source/JavaScriptCore

Try ripping out inferred types because it might be a performance improvement
https://bugs.webkit.org/show_bug.cgi?id=190906

Reviewed by Yusuke Suzuki.

This patch removes inferred types from JSC. Initial evidence shows that
this might be around a ~1% speedup on Speedometer2 and JetStream2.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • bytecode/AccessCase.cpp:

(JSC::AccessCase::generateImpl):

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

(WTF::printInternal):

  • bytecode/PutByIdFlags.h:
  • bytecode/PutByIdStatus.cpp:

(JSC::PutByIdStatus::computeFromLLInt):
(JSC::PutByIdStatus::computeForStubInfo):
(JSC::PutByIdStatus::computeFor):

  • bytecode/PutByIdVariant.cpp:

(JSC::PutByIdVariant::operator=):
(JSC::PutByIdVariant::replace):
(JSC::PutByIdVariant::transition):
(JSC::PutByIdVariant::setter):
(JSC::PutByIdVariant::attemptToMerge):
(JSC::PutByIdVariant::dumpInContext const):

  • bytecode/PutByIdVariant.h:

(JSC::PutByIdVariant::requiredType const): Deleted.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGAbstractValue.cpp:

(JSC::DFG::AbstractValue::isType const): Deleted.

  • dfg/DFGAbstractValue.h:
  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleGetByOffset):
(JSC::DFG::ByteCodeParser::handlePutByOffset):
(JSC::DFG::ByteCodeParser::load):
(JSC::DFG::ByteCodeParser::store):
(JSC::DFG::ByteCodeParser::handlePutById):
(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):
(JSC::DFG::ConstantFoldingPhase::emitGetByOffset):
(JSC::DFG::ConstantFoldingPhase::emitPutByOffset):

  • dfg/DFGDesiredInferredType.h: Removed.
  • dfg/DFGDesiredWatchpoints.cpp:

(JSC::DFG::DesiredWatchpoints::reallyAdd):
(JSC::DFG::DesiredWatchpoints::areStillValid const):
(JSC::DFG::DesiredWatchpoints::dumpInContext const):
(JSC::DFG::InferredTypeAdaptor::add): Deleted.

  • dfg/DFGDesiredWatchpoints.h:

(JSC::DFG::DesiredWatchpoints::isWatched):
(JSC::DFG::InferredTypeAdaptor::hasBeenInvalidated): Deleted.
(JSC::DFG::InferredTypeAdaptor::dumpInContext): Deleted.

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::dump):
(JSC::DFG::Graph::inferredValueForProperty):
(JSC::DFG::Graph::inferredTypeFor): Deleted.

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::registerInferredType): Deleted.
(JSC::DFG::Graph::inferredTypeForProperty): Deleted.

  • dfg/DFGInferredTypeCheck.cpp: Removed.
  • dfg/DFGInferredTypeCheck.h: Removed.
  • dfg/DFGNode.h:
  • dfg/DFGObjectAllocationSinkingPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileMultiPutByOffset):
(JSC::FTL::DFG::LowerDFGToB3::checkInferredType): Deleted.

  • generator/DSL.rb:
  • heap/Heap.cpp:

(JSC::Heap::finalizeUnconditionalFinalizers):

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::branchIfNotType): Deleted.

  • jit/AssemblyHelpers.h:
  • jit/Repatch.cpp:

(JSC::tryCachePutByID):

  • llint/LLIntOffsetsExtractor.cpp:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/InferredStructure.cpp:

(JSC::InferredStructure::InferredStructure): Deleted.

  • runtime/InferredStructure.h:

(): Deleted.

  • runtime/InferredStructureWatchpoint.cpp:

(JSC::InferredStructureWatchpoint::fireInternal): Deleted.

  • runtime/InferredType.cpp: Removed.
  • runtime/InferredType.h: Removed.
  • runtime/InferredTypeInlines.h: Removed.
  • runtime/InferredTypeTable.cpp: Removed.
  • runtime/InferredTypeTable.h: Removed.
  • runtime/JSObjectInlines.h:

(JSC::JSObject::putDirectInternal):

  • runtime/Structure.cpp:

(JSC::Structure::materializePropertyTable):
(JSC::Structure::addNewPropertyTransition):
(JSC::Structure::removePropertyTransition):
(JSC::Structure::willStoreValueSlow):
(JSC::Structure::visitChildren):

  • runtime/Structure.h:

(JSC::PropertyMapEntry::PropertyMapEntry):

  • runtime/StructureInlines.h:

(JSC::Structure::get):

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
5:35 PM Changeset in webkit [240022] by Jonathan Bedard
  • 2 edits in trunk/Tools

webkitpy: Support boolean simctl isAvailable
https://bugs.webkit.org/show_bug.cgi?id=193472
<rdar://problem/47296150>

Reviewed by Ryosuke Niwa.

  • Scripts/webkitpy/xcode/simulated_device.py:

(SimulatedDeviceManager._create_runtimes):
(SimulatedDeviceManager._create_device_with_runtime):

5:19 PM Changeset in webkit [240021] by Megan Gardner
  • 12 edits in trunk/Source

Add Reveal support in iOSMac
https://bugs.webkit.org/show_bug.cgi?id=193408
<rdar://problem/47300699>

Reviewed by Tim Horton.

Source/WebCore:

iOSMac and Reveal are currently not testable.

Add support for the reveal SPI specifically for iOSMac.
Show the controller when called, and implement the delegate to
correctly re-paint the content with the auto-generated highlight from
the reveal framework.

  • Configurations/WebCore.xcconfig:
  • editing/cocoa/DictionaryLookup.mm:

(-[WebRevealHighlight initWithHighlightRect:view:]):
(-[WebRevealHighlight setImage:]):
(-[WebRevealHighlight highlightRectsForItem:]):
(-[WebRevealHighlight startHighlightingItem:]):
(-[WebRevealHighlight highlightItem:withProgress:]):
(-[WebRevealHighlight completeHighlightingItem:]):
(-[WebRevealHighlight stopHighlightingItem:]):
(-[WebRevealHighlight highlightRangeChangedForItem:]):
(-[WebRevealHighlight highlighting]):
(-[WebRevealHighlight drawHighlightContentForItem:context:]):
(WebCore::showPopupOrCreateAnimationController):
(WebCore::DictionaryLookup::showPopup):

  • editing/mac/DictionaryLookup.h:

Source/WebCore/PAL:

Add additional needed SPI.

  • pal/spi/cocoa/RevealSPI.h:

Source/WebKit:

Add calls to DictionaryLookup from the appropriate places.

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

(WebKit::PageClientImpl::didPerformDictionaryLookup):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::didPerformDictionaryLookup):

  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:

(WebKit::WebPage::dictionaryPopupInfoForRange):

5:14 PM Changeset in webkit [240020] by mmaxfield@apple.com
  • 24 edits in trunk/Source/WebCore

[WHLSL] Add ending namespace comments to make namespace boundaries more clear
https://bugs.webkit.org/show_bug.cgi?id=193471

Reviewed by Saam Barati.

This patch only adds the comments to the files that are too long to fit on a single screen in my editor.

No new tests because there is no behavior change.

  • Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp:
  • Modules/webgpu/WHLSL/WHLSLChecker.cpp:
  • Modules/webgpu/WHLSL/WHLSLGatherEntryPointItems.cpp:
  • Modules/webgpu/WHLSL/WHLSLGatherEntryPointItems.h:
  • Modules/webgpu/WHLSL/WHLSLInferTypes.cpp:
  • Modules/webgpu/WHLSL/WHLSLIntrinsics.cpp:
  • Modules/webgpu/WHLSL/WHLSLIntrinsics.h:
  • Modules/webgpu/WHLSL/WHLSLLexer.cpp:
  • Modules/webgpu/WHLSL/WHLSLLexer.h:
  • Modules/webgpu/WHLSL/WHLSLLoopChecker.cpp:
  • Modules/webgpu/WHLSL/WHLSLNameContext.cpp:
  • Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:
  • Modules/webgpu/WHLSL/WHLSLNameResolver.h:
  • Modules/webgpu/WHLSL/WHLSLParser.h:
  • Modules/webgpu/WHLSL/WHLSLProgram.h:
  • Modules/webgpu/WHLSL/WHLSLRecursiveTypeChecker.cpp:
  • Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.cpp:
  • Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp:
  • Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:
  • Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp:
  • Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp:
  • Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
  • Modules/webgpu/WHLSL/WHLSLVisitor.h:
4:35 PM Changeset in webkit [240019] by achristensen@apple.com
  • 3 edits in trunk/Source/WebKit

[SOUP] Remove usage of NetworkProcess::singleton()
https://bugs.webkit.org/show_bug.cgi?id=193444

Patch by Claudio Saavedra <Claudio Saavedra> on 2019-01-15
Reviewed by Michael Catanzaro.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::download):
(WebKit::NetworkDataTaskSoup::didWriteDownload):
(WebKit::NetworkDataTaskSoup::didFinishDownload):
(WebKit::NetworkDataTaskSoup::didFailDownload):

  • NetworkProcess/soup/NetworkSessionSoup.cpp:

(WebKit::NetworkSessionSoup::NetworkSessionSoup):

4:27 PM Changeset in webkit [240018] by mmaxfield@apple.com
  • 4 edits
    2 adds in trunk/Source/WebCore

[WHLSL] Implement the loop checker
https://bugs.webkit.org/show_bug.cgi?id=193434

Reviewed by Saam Barati.

This is a translation of https://github.com/gpuweb/WHLSL/blob/master/Source/LoopChecker.mjs into C++.

No new tests because it isn't hooked up yet. Not enough of the compiler exists to have any meaningful sort
of test. When enough of the compiler is present, I'll port the reference implementation's test suite.

  • Modules/webgpu/WHLSL/WHLSLLoopChecker.cpp: Added.

(WebCore::WHLSL::findHighZombies):

  • Modules/webgpu/WHLSL/WHLSLLoopChecker.h: Added.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
4:08 PM Changeset in webkit [240017] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebKit

Fix incorrect ASSERT added in r239840
https://bugs.webkit.org/show_bug.cgi?id=193466
<rdar://problem/47095142>

Reviewed by Youenn Fablet.

  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::Source::Source):

3:55 PM Changeset in webkit [240016] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Frequent null-deref under TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded()
https://bugs.webkit.org/show_bug.cgi?id=193468
<rdar://problem/38645869>

Reviewed by Beth Dakin.

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
I'm not sure why this got *worse*, but we should null-check RenderView.
It's OK to bail from scaleViewToFitDocumentIfNeeded, we'll re-do it
the next time we paint (which will surely happen if we gain a RenderView).

3:48 PM Changeset in webkit [240015] by Chris Dumez
  • 24 edits
    2 deletes in trunk

Unreviewed, rolling out r239993, r239995, r239997, and
r239999.

Caused assertions under
ViewGestureController::disconnectFromProcess()

Reverted changesets:

"Regression(PSON) View becomes blank after click a cross-site
download link"
https://bugs.webkit.org/show_bug.cgi?id=193361
https://trac.webkit.org/changeset/239993

"Unreviewed iOS build fix after r239993."
https://trac.webkit.org/changeset/239995

"Fix iOS build after r239993"
https://bugs.webkit.org/show_bug.cgi?id=193361
https://trac.webkit.org/changeset/239997

"Unreviewed, revert part of r239997 as it is not needed to fix
the build."
https://trac.webkit.org/changeset/239999

3:31 PM Changeset in webkit [240014] by achristensen@apple.com
  • 78 edits
    2 adds
    1 delete in trunk/Source

Stop using CookiesStrategy
https://bugs.webkit.org/show_bug.cgi?id=161106

Reviewed by Don Olmstead and Antti Koivisto.

Source/WebCore:

CookiesStrategy is process-global and makes it difficult to switch NetworkStorageSession from having a process-global map.
Instead, use a CookieJar object in the WebProcess. This has the additional benefit of making it more clear which code
is used in the WebProcess and which code is used in the NetworkProcess.

  • Modules/beacon/NavigatorBeacon.cpp:
  • Modules/websockets/WebSocketChannel.cpp:

(WebCore::WebSocketChannel::processBuffer):

  • Modules/websockets/WebSocketHandshake.cpp:

(WebCore::WebSocketHandshake::clientHandshakeRequest const):
(WebCore::WebSocketHandshake::clientHandshakeCookieRequestHeaderFieldProxy const):

  • WebCore.xcodeproj/project.pbxproj:
  • css/StyleRuleImport.cpp:

(WebCore::StyleRuleImport::requestStyleSheet):

  • dom/Document.cpp:

(WebCore::Document::cookie):
(WebCore::Document::setCookie):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaPlayerGetRawCookies const):

  • inspector/agents/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::getCookies):
(WebCore::InspectorPageAgent::deleteCookie):

  • loader/CookieJar.cpp:

(WebCore::CookieJar::shouldIncludeSecureCookies):
(WebCore::CookieJar::sameSiteInfo):
(WebCore::CookieJar::create):
(WebCore::CookieJar::cookies const):
(WebCore::CookieJar::cookieRequestHeaderFieldProxy):
(WebCore::CookieJar::setCookies):
(WebCore::CookieJar::cookiesEnabled const):
(WebCore::CookieJar::cookieRequestHeaderFieldValue const):
(WebCore::CookieJar::getRawCookies const):
(WebCore::CookieJar::deleteCookie):
(WebCore::shouldIncludeSecureCookies): Deleted.
(WebCore::sameSiteInfo): Deleted.
(WebCore::cookies): Deleted.
(WebCore::cookieRequestHeaderFieldProxy): Deleted.
(WebCore::setCookies): Deleted.
(WebCore::cookiesEnabled): Deleted.
(WebCore::cookieRequestHeaderFieldValue): Deleted.
(WebCore::getRawCookies): Deleted.
(WebCore::deleteCookie): Deleted.

  • loader/CookieJar.h:
  • loader/EmptyClients.cpp:

(WebCore::pageConfigurationWithEmptyClients):

  • loader/ImageLoader.cpp:

(WebCore::ImageLoader::updateFromElement):

  • loader/cache/CachedApplicationManifest.cpp:

(WebCore::CachedApplicationManifest::CachedApplicationManifest):

  • loader/cache/CachedApplicationManifest.h:
  • loader/cache/CachedCSSStyleSheet.cpp:

(WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):

  • loader/cache/CachedCSSStyleSheet.h:
  • loader/cache/CachedFont.cpp:

(WebCore::CachedFont::CachedFont):

  • loader/cache/CachedFont.h:
  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::CachedImage):

  • loader/cache/CachedImage.h:
  • loader/cache/CachedRawResource.cpp:

(WebCore::CachedRawResource::CachedRawResource):

  • loader/cache/CachedRawResource.h:
  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::CachedResource):
(WebCore::CachedResource::setResponse):
(WebCore::CachedResource::varyHeaderValuesMatch):

  • loader/cache/CachedResource.h:

(WebCore::CachedResource::cookieJar const):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::createResource):
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::updateCachedResourceWithCurrentRequest):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::revalidateResource):
(WebCore::CachedResourceLoader::loadResource):

  • loader/cache/CachedResourceLoader.h:
  • loader/cache/CachedSVGDocument.cpp:

(WebCore::CachedSVGDocument::CachedSVGDocument):

  • loader/cache/CachedSVGDocument.h:
  • loader/cache/CachedSVGFont.cpp:

(WebCore::CachedSVGFont::CachedSVGFont):

  • loader/cache/CachedSVGFont.h:
  • loader/cache/CachedScript.cpp:

(WebCore::CachedScript::CachedScript):

  • loader/cache/CachedScript.h:
  • loader/cache/CachedTextTrack.cpp:

(WebCore::CachedTextTrack::CachedTextTrack):

  • loader/cache/CachedTextTrack.h:
  • loader/cache/CachedXSLStyleSheet.cpp:

(WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):

  • loader/cache/CachedXSLStyleSheet.h:
  • loader/cache/MemoryCache.cpp:

(WebCore::MemoryCache::addImageToCache):

  • loader/cache/MemoryCache.h:
  • page/Navigator.cpp:

(WebCore::Navigator::cookieEnabled const):

  • page/Page.cpp:

(WebCore::Page::Page):

  • page/Page.h:

(WebCore::Page::cookieJar):

  • page/PageConfiguration.cpp:

(WebCore::PageConfiguration::PageConfiguration):

  • page/PageConfiguration.h:
  • platform/CookiesStrategy.h: Removed.
  • platform/PlatformStrategies.h:

(WebCore::PlatformStrategies::cookiesStrategy): Deleted.

  • platform/network/CacheValidation.cpp:

(WebCore::cookieRequestHeaderFieldValue):
(WebCore::collectVaryingRequestHeaders):
(WebCore::verifyVaryingRequestHeaders):

  • platform/network/CacheValidation.h:
  • platform/network/CookieRequestHeaderFieldProxy.h:
  • platform/network/cf/NetworkStorageSessionCFNetWin.cpp:
  • platform/network/cocoa/NetworkStorageSessionCocoa.mm:
  • platform/network/curl/ResourceHandleCurl.cpp:
  • rendering/RenderSnapshottedPlugIn.cpp:

(WebCore::RenderSnapshottedPlugIn::updateSnapshot):

  • testing/Internals.cpp:

(WebCore::Internals::getCookies const):

Source/WebKit:

  • NetworkProcess/NetworkProcessPlatformStrategies.cpp:

(WebKit::NetworkProcessPlatformStrategies::createCookiesStrategy): Deleted.

  • NetworkProcess/NetworkProcessPlatformStrategies.h:
  • NetworkProcess/curl/NetworkDataTaskCurl.cpp:
  • Scripts/webkit/messages.py:
  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Automation/WebAutomationSessionProxy.cpp:

(WebKit::WebAutomationSessionProxy::getCookiesForFrame):
(WebKit::WebAutomationSessionProxy::deleteCookie):

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::cookiesForURL):
(WebKit::PluginView::setCookiesForURL):

  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

(WebKit::WebPlatformStrategies::createCookiesStrategy): Deleted.
(WebKit::WebPlatformStrategies::cookiesForDOM): Deleted.
(WebKit::WebPlatformStrategies::setCookiesFromDOM): Deleted.
(WebKit::WebPlatformStrategies::cookiesEnabled): Deleted.
(WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue): Deleted.
(WebKit::WebPlatformStrategies::getRawCookies): Deleted.
(WebKit::WebPlatformStrategies::deleteCookie): Deleted.

  • WebProcess/WebCoreSupport/WebPlatformStrategies.h:
  • WebProcess/WebPage/WebCookieJar.cpp: Added.

(WebKit::WebCookieJar::cookies const):
(WebKit::WebCookieJar::setCookies):
(WebKit::WebCookieJar::cookiesEnabled const):
(WebKit::WebCookieJar::cookieRequestHeaderFieldValue const):
(WebKit::WebCookieJar::getRawCookies const):
(WebKit::WebCookieJar::deleteCookie):

  • WebProcess/WebPage/WebCookieJar.h: Added.
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_shouldAttachDrawingAreaOnPageTransition):

Source/WebKitLegacy/mac:

  • Misc/WebCache.mm:

(+[WebCache addImageToCache:forURL:forFrame:]):

  • Plugins/Hosted/NetscapePluginInstanceProxy.mm:

(WebKit::NetscapePluginInstanceProxy::getCookies):
(WebKit::NetscapePluginInstanceProxy::setCookies):

  • Plugins/WebNetscapePluginView.mm:

(-[WebNetscapePluginView getVariable:forURL:value:length:]):
(-[WebNetscapePluginView setVariable:forURL:value:length:]):

  • WebCoreSupport/WebPlatformStrategies.h:
  • WebCoreSupport/WebPlatformStrategies.mm:

(WebPlatformStrategies::createCookiesStrategy): Deleted.
(WebPlatformStrategies::cookiesForDOM): Deleted.
(WebPlatformStrategies::setCookiesFromDOM): Deleted.
(WebPlatformStrategies::cookiesEnabled): Deleted.
(WebPlatformStrategies::cookieRequestHeaderFieldValue): Deleted.
(WebPlatformStrategies::getRawCookies): Deleted.
(WebPlatformStrategies::deleteCookie): Deleted.

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

Source/WebKitLegacy/win:

  • Plugins/PluginView.cpp:

(WebCore::PluginView::getValueForURL):
(WebCore::PluginView::setValueForURL):

  • WebCoreSupport/WebPlatformStrategies.cpp:

(WebPlatformStrategies::createBlobRegistry):
(WebPlatformStrategies::createCookiesStrategy): Deleted.
(WebPlatformStrategies::cookiesForDOM): Deleted.
(WebPlatformStrategies::setCookiesFromDOM): Deleted.
(WebPlatformStrategies::cookiesEnabled): Deleted.
(WebPlatformStrategies::cookieRequestHeaderFieldValue): Deleted.
(WebPlatformStrategies::getRawCookies): Deleted.
(WebPlatformStrategies::deleteCookie): Deleted.

  • WebCoreSupport/WebPlatformStrategies.h:
  • WebView.cpp:

(WebView::initWithFrame):

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

Remove reporting for iOS mach lookups confirmed in-use
https://bugs.webkit.org/show_bug.cgi?id=193455
<rdar://problem/47259551>

Reviewed by Brent Fulgham.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
3:06 PM Changeset in webkit [240012] by Simon Fraser
  • 9 edits in trunk/Source/WebCore

Animations should only trigger layer recomposite when necessary
https://bugs.webkit.org/show_bug.cgi?id=193450

Reviewed by Antoine Quint.

Animations only need to trigger compositing updates when their states change in a way
that affects compositing. RenderLayerCompositor::requiresCompositingForAnimation() checks for
running animations of properties that can be accelerated, so this patch fixes the legacy
animation logic to only set 'shouldRecompositeLayer' in TreeResolver::createAnimatedElementUpdate()
when the running state of such an animation changes.

ImplicitAnimation::animate() and KeyframeAnimation::animate() now return OptionSet<AnimateChange>.
This contains information about whether the running state changed, so CompositeAnimation::animate()
asks about whether the running state of an accelerated property changed, and returns this in
the AnimationUpdate result.

  • page/animation/AnimationBase.h:

(WebCore::AnimationBase::isPausedState):
(WebCore::AnimationBase::isRunningState):
(WebCore::AnimationBase::inPausedState const):
(WebCore::AnimationBase::inRunningState const):
(WebCore::AnimationBase::isAnimatingProperty const):

  • page/animation/CSSAnimationController.h:
  • page/animation/CompositeAnimation.cpp:

(WebCore::CompositeAnimation::animate):

  • page/animation/ImplicitAnimation.cpp:

(WebCore::ImplicitAnimation::animate):
(WebCore::ImplicitAnimation::affectsAcceleratedProperty const):

  • page/animation/ImplicitAnimation.h:
  • page/animation/KeyframeAnimation.cpp:

(WebCore::KeyframeAnimation::KeyframeAnimation):
(WebCore::KeyframeAnimation::animate):
(WebCore::KeyframeAnimation::computeStackingContextImpact): Deleted.

  • page/animation/KeyframeAnimation.h:
  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::createAnimatedElementUpdate):

2:57 PM Changeset in webkit [240011] by Simon Fraser
  • 8 edits in trunk/Source/WebCore

Clean up code related to the updating of Dashboard and touch event regions
https://bugs.webkit.org/show_bug.cgi?id=193460

Reviewed by Zalan Bujtas.

In preparation for layout testing that can count the number of event region
updates, move the code related to updating "annotated" (Dashboard) regions, and
touch event regions into bottleneck functions in Document.

Updating these two kinds of regions is generally similar, but there are some code paths
that eagerly update annotated regions.

No behavior change.

  • dom/Document.cpp:

(WebCore::Document::updateAnnotatedRegions): Moved from FrameView.
(WebCore::Document::invalidateRenderingDependentRegions):
(WebCore::Document::invalidateScrollbarDependentRegions):
(WebCore::Document::updateZOrderDependentRegions):

  • dom/Document.h:

(WebCore::Document::setAnnotatedRegionsDirty):
(WebCore::Document::annotatedRegionsDirty const):
(WebCore::Document::hasAnnotatedRegions const):

  • page/FrameView.cpp:

(WebCore::FrameView::didLayout):
(WebCore::FrameView::didPaintContents):
(WebCore::FrameView::updateAnnotatedRegions): Deleted.

  • page/FrameView.h:
  • rendering/RenderElement.cpp: Drive-by header cleanup.

(WebCore::RenderElement::styleWillChange):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::scrollTo):
(WebCore::RenderLayer::setHasHorizontalScrollbar):
(WebCore::RenderLayer::setHasVerticalScrollbar):
(WebCore::RenderLayer::updateScrollbarsAfterLayout):
(WebCore::RenderLayer::calculateClipRects const):

  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::setHasVerticalScrollbar):

2:53 PM Changeset in webkit [240010] by timothy_horton@apple.com
  • 21 edits
    2 copies
    1 add in trunk

Cannot tab out of WKWebView on macOS
https://bugs.webkit.org/show_bug.cgi?id=161448
<rdar://problem/28100085>

Reviewed by Dean Jackson.

Source/WebCore/PAL:

  • pal/spi/mac/NSViewSPI.h:
  • pal/spi/mac/NSWindowSPI.h:

Move some SPI declarations in here from WebKitLegacy.

Source/WebKit:

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::takeFocus):
If the UIDelegate doesn't implement takeFocus, provide a simple default
implementation that just uses AppKit's key view loop to move the focus.

  • UIProcess/API/APIUIClient.h:

(API::UIClient::takeFocus):

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageUIClient):

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

(WebKit::UIDelegate::UIClient::takeFocus):
Make API::UIClient's takeFocus return a bool indicating whether the
client implements it or not.

  • UIProcess/PageClient.h:
  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::takeFocus):
Plumb takeFocus to WebViewImpl.

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

(WebKit::WebViewImpl::takeFocus):
Borrow the relevant portion of WebKitLegacy's implementation of takeFocus,
shifting focus to the next/previous key view in the window.

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebChromeClient.mm:
  • WebView/WebView.mm:

Make use of SPI headers.

Tools:

Add a test that tabbing into and out of WKWebView works correctly.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/CommandBackForward.mm:

(WebKit2_CommandBackForwardTest::SetUp):
(-[CommandBackForwardOffscreenWindow isKeyWindow]): Deleted.
(-[CommandBackForwardOffscreenWindow isVisible]): Deleted.

  • TestWebKitAPI/Tests/WebKitCocoa/TabOutOfWebView.mm: Added.

(-[FocusableView canBecomeKeyView]):
(TEST):

  • TestWebKitAPI/mac/OffscreenWindow.h: Added.
  • TestWebKitAPI/mac/OffscreenWindow.mm: Added.

(-[OffscreenWindow initWithSize:]):
(-[OffscreenWindow isKeyWindow]):
(-[OffscreenWindow isVisible]):

  • TestWebKitAPI/mac/PlatformWebViewMac.mm:

(TestWebKitAPI::PlatformWebView::initialize):
(-[ActiveOffscreenWindow isKeyWindow]): Deleted.
(-[ActiveOffscreenWindow isVisible]): Deleted.
Factor ActiveOffscreenWindow out into OffscreenWindow and share it.

2:34 PM Changeset in webkit [240009] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Remove the specific handling of ephemeral sessions from CacheStorage::Engine::from
https://bugs.webkit.org/show_bug.cgi?id=193400

Reviewed by Alex Christensen.

It is no longer needed as we correctly handle ephemeral sessions removal.

  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::Engine::from):

2:21 PM Changeset in webkit [240008] by Alan Coon
  • 1 copy in tags/Safari-607.1.22

Tag Safari-607.1.22.

2:19 PM Changeset in webkit [240007] by Alan Coon
  • 1 delete in tags/Safari-607.1.22

Delete tag Safari-607.1.22.

2:17 PM Changeset in webkit [240006] by Ryan Haddad
  • 2 edits in trunk/Tools

Adjust the arguments passed to run-javascriptcore-tests for the 32-bit JSC bot
https://bugs.webkit.org/show_bug.cgi?id=193459

Reviewed by Mark Lam.

  • BuildSlaveSupport/build.webkit.org-config/steps.py:

(Run32bitJSCTests): This queue should not run JIT, testair, testb3, or testmasm.

2:13 PM Changeset in webkit [240005] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

Let Xcode have its way with the WebCore project

  • WebCore.xcodeproj/project.pbxproj:
  • Change the lastKnownFileType for *.gperf and *.idl files from "file" to "text".
  • Resort source files into UUID order.
2:13 PM Changeset in webkit [240004] by ddkilzer@apple.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

REGRESSION (r239510): Remove duplicate copy of srtpsession.cc from 'webrtcpcrtc' target in Xcode project

Fixes the following Xcode warning:

warning: Skipping duplicate build file in Compile Sources build phase: Source/ThirdParty/libwebrtc/Source/webrtc/pc/srtpsession.cc (in target 'webrtcpcrtc')

  • libwebrtc.xcodeproj/project.pbxproj: Remove duplicate copy of

srtpsession.cc from 'webrtcpcrtc' target.

2:10 PM Changeset in webkit [240003] by Alan Coon
  • 1 copy in tags/Safari-607.1.22

Tag Safari-607.1.22.

2:09 PM Changeset in webkit [240002] by Alan Coon
  • 7 edits in branches/safari-607-branch/Source

Versioning.

1:47 PM Changeset in webkit [240001] by ddkilzer@apple.com
  • 4 edits in trunk/Source/ThirdParty/ANGLE

clang-tidy: Fix unnecessary copy of for loop variables in ANGLE
<https://webkit.org/b/193443>

Reviewed by Alex Christensen.

Fix unwanted copying of loop variables by making them const
references.

  • src/compiler/preprocessor/MacroExpander.cpp:

(pp::MacroExpander::ScopedMacroReenabler::~ScopedMacroReenabler):

  • Prevents copy and reference churn of std::shared_ptr<Macro> objects.
  • src/compiler/translator/Compiler.cpp:

(sh::TCompiler::useAllMembersInUnusedStandardAndSharedBlocks):

  • Prevents copy of sh::InterfaceBlock structs.

(sh::TCompiler::initializeOutputVariables):

  • Prevents copy of sh::Varying structs.
  • src/libANGLE/Program.cpp:

(gl::(anonymous namespace)::IncludeSameArrayElement):

  • Prevents copy of std::string objects.
1:21 PM Changeset in webkit [240000] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

Correctly handle rotation for local video playback
https://bugs.webkit.org/show_bug.cgi?id=193412

Reviewed by Eric Carlson.

Update AVVideoCaptureSource to compute the size given to settings after rotating the sample.
This ensures computing the size of video elements appropriately.
Also makes sure to notify observers of size change whenever rotation happens as settings() call will provide a different size.
Covered by manual testing as we do not have yet emulation of local capture with rotation.

  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::setIntrinsicSize):

  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoCaptureSource::settings):
(WebCore::AVVideoCaptureSource::computeSampleRotation):

1:16 PM Changeset in webkit [239999] by Chris Dumez
  • 2 edits in trunk/Source/WTF

Unreviewed, revert part of r239997 as it is not needed to fix the build.

  • wtf/RefCounter.h:
12:34 PM Changeset in webkit [239998] by Alan Coon
  • 4 edits in branches/safari-607-branch/Source/WebKit

Apply patch. rdar://problem/47260255

12:29 PM Changeset in webkit [239997] by achristensen@apple.com
  • 5 edits in trunk/Source

Fix iOS build after r239993
https://bugs.webkit.org/show_bug.cgi?id=193361

Source/WebKit:

  • UIProcess/ProvisionalPageProxy.h:
  • UIProcess/SuspendedPageProxy.h:

Source/WTF:

  • wtf/RefCounter.h:
12:28 PM Changeset in webkit [239996] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Adjust logging policy in WebKit's sandbox
https://bugs.webkit.org/show_bug.cgi?id=193454
<rdar://problem/47256325>

Reviewed by Brent Fulgham.

  • WebProcess/com.apple.WebProcess.sb.in:
12:04 PM Changeset in webkit [239995] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed iOS build fix after r239993.

  • UIProcess/SuspendedPageProxy.h:
11:34 AM Changeset in webkit [239994] by pvollan@apple.com
  • 4 edits in trunk/Source/WebKit

Add allow directive for MTLCompilerService.xpc to PluginProcess and WebContent
https://bugs.webkit.org/show_bug.cgi?id=193453
<rdar://problem/47268166>

Reviewed by Brent Fulgham.

  • PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebProcess/com.apple.WebProcess.sb.in:
11:01 AM Changeset in webkit [239993] by Chris Dumez
  • 24 edits
    2 adds in trunk

Regression(PSON) View becomes blank after click a cross-site download link
https://bugs.webkit.org/show_bug.cgi?id=193361
<rdar://problem/47099573>

Reviewed by Geoff Garen.

Source/WebCore:

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::commitProvisionalLoad):
When restoring from PageCache, make sure we notify the client that the load was committed
*before* we tell it that the navigation is complete. This would confuse the ProvisionalPageProxy
logic in the UIProcess.

Source/WebKit:

The issue tracked by rdar://problem/47099573 is that a provisional load may get
canceled (or converted into a download) *after* we've decided to process-swap.
In such cases, the view should keep displaying the current site and it should
still be interactive. However, with the previous PSON model, the view (pageProxy)
would have already swapped to the new process and would end up displaying the
initially empty document.

To address the issue, this patch introduces the concept of a provisional load
in the UIProcess, handled by a ProvisionalPageProxy which has its own privisional
process. The WebPageProxy owns the ProvisionalPageProxy but we do not commit the
provisional page until after the load was committed in the new process. This means
that the view / WebPageProxy keeps using the old process and displays the current
content until a load has committed in the provisional page. If no load commits
in the provisional process (e.g. because the load is cancelled or converted into
a download), then we merely destroy the ProvisionalPageProxy and terminate its
process, without impacting the WebPageProxy.

  • Shared/WebPageCreationParameters.cpp:

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

  • Shared/WebPageCreationParameters.h:

Rename isSwapFromSuspended to isProcessSwap for clarity as we always want to
delay attaching the drawing area in case of a process-swap, no matter what
now that the previous process is kept alive until the provisional load is
committed in the new process.

  • Shared/WebPolicyAction.h:

Drop Suspend policy action. At decidePolicyForNavigationAction time, in case of
process-swap, we now tell the previous process to simply ignore the load, while
we create a ProvisionalPageProxy to do the new load in a new process.
Suspension of the previous page in the old process, happens later, when a load
is actually committed in the new process.

  • Sources.txt:

Add new ProvisionalPageProxy file.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _killWebContentProcessAndResetState]):
When calling _killWebContentProcessAndResetState on a WKWebView, kill both the current
process and the provisional one, to maintain previous behavior in our API tests.

  • UIProcess/PageClient.h:

Tiny build fix.

  • UIProcess/ProvisionalPageProxy.cpp: Added.

(WebKit::ProvisionalPageProxy::ProvisionalPageProxy):
(WebKit::ProvisionalPageProxy::~ProvisionalPageProxy):
(WebKit::ProvisionalPageProxy::takeDrawingArea):
(WebKit::ProvisionalPageProxy::cancel):
(WebKit::ProvisionalPageProxy::initializeWebPage):
(WebKit::ProvisionalPageProxy::loadDataWithNavigation):
(WebKit::ProvisionalPageProxy::loadRequestWithNavigation):
(WebKit::ProvisionalPageProxy::goToBackForwardItem):
(WebKit::ProvisionalPageProxy::didCreateMainFrame):
(WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame):
(WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame):
(WebKit::ProvisionalPageProxy::didCommitLoadForFrame):
(WebKit::ProvisionalPageProxy::didReceiveMessage):
(WebKit::ProvisionalPageProxy::didReceiveSyncMessage):

  • UIProcess/ProvisionalPageProxy.h: Added.

(WebKit::ProvisionalPageProxy::page):
(WebKit::ProvisionalPageProxy::mainFrame const):
(WebKit::ProvisionalPageProxy::process):
(WebKit::ProvisionalPageProxy::processSwapRequestedByClient const):
(WebKit::ProvisionalPageProxy::navigationID const):
Add new ProvisionalPageProxy class to wrap the provisional load in the new process
after a swap. The provisional page is owned by the WebPageProxy and we only commit
the provisional page when the load is committed. Until then, the WebPageProxy keeps
using the old process and displaying the current content.

  • UIProcess/SuspendedPageProxy.cpp:

(WebKit::SuspendedPageProxy::~SuspendedPageProxy):
(WebKit::SuspendedPageProxy::unsuspend):
(WebKit::SuspendedPageProxy::didProcessRequestToSuspend):
Unregister the SuspendedPageProxy as an IPC message receiver a little bit earlier
when we're going to unsuspend it. This avoids conflicting with the ProvisionalPageProxy
which tries to register itself as an IPC message receiver for the same pageID when
a process-swap occurs and we're switching to a suspended page.

  • UIProcess/WebFrameProxy.cpp:

(WebKit::WebFrameProxy::isMainFrame const):
WebFrameProxy::isMainFrame() relies on checking that the frame is the WebPageProxy's m_mainFrame.
Now that the WebPageProxy can have a ProvisionalPageProxy, also check if it is the ProvisionalPageProxy's
m_mainFrame to maintain previous behavior.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::swapToWebProcess):
swapToWebProcess() no longer takes care of unsuspending the SuspendedPage because we now call swapToWebProcess()
later, when a load is actually committed in the provisional page / process. swapToWebProcess() now also needs
to initialize some data members such as the drawing area and the main frame as it is transferring them over from
the ProvisionalPageProxy which started the provisional load.

(WebKit::WebPageProxy::finishAttachingToWebProcess):
We no longer need IsSwapFromSuspended parameter as this is called later now, after a load has actually been
committed in the provisional process.

(WebKit::WebPageProxy::initializeWebPage):

  • We no longer need IsSwapFromSuspended parameter as this is called later now, after a load has actually been committed in the provisional process.
  • Factor some code out to WebPageProxy::setDrawingArea() so that it can be shared with swapToWebProcess().

(WebKit::WebPageProxy::loadRequestWithNavigation):
Only call setPendingAPIRequestURL() in loadRequestWithNavigation() only if ShouldTreatAsContinuingLoad is not
Yes. This avoids hitting some assertions as this was already called during the first API call if needed.

(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
In case of process swap, tell the previous process to ignore the load instead of suspending it right away.
Suspension now happens later, only if we end up committing the provisional load in the new process.
Also discard the SuspendedPage if it failed to suspend (we only reuse its process in this case). This used
to happen a bit later but it is clearer if we do this as early as possible I think.

(WebKit::WebPageProxy::commitProvisionalPage):
When the load is committed in the new process, we call WebPageProxy::commitProvisionalPage(). It takes care of:

  • Actually swapping the WebPageProxy to the new process by calling processDidTerminate() / swapToWebProcess().
  • Suspending the current page.
  • Letting the client know the load is comitted
  • Destroy the ProvisionalPageProxy.

This work used to happen earlier in continueNavigationInNewProcess().

(WebKit::WebPageProxy::continueNavigationInNewProcess):
Moved some of the logic to commitProvisionalPage(). We now merely start the load in a new ProvisionalPageProxy,
without actually having the WebPageProxy switch to the new process yet.

(WebKit::WebPageProxy::didCreateMainFrame):
(WebKit::WebPageProxy::didCreateWindow):
Drop some code that is no longer needed, now that the ProvisionalPageProxy takes care of this.

(WebKit::WebPageProxy::didDestroyNavigation):
On process-swap, when telling the previous process to ignore the load and starting the new load in a new
ProvisionalPageProxy, the previous WebPage attempts to destroy the navigation. In this case, we ignore
the call since the navigation is merely taken over by the ProvisionalPageProxy.

(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
Moved some PSON logic to the ProvisionalPageProxy instead.

(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
When didFailProvisionalLoadForFrame() is called for a ProvisionalPageProxy, destroy it.

(WebKit::WebPageProxy::decidePolicyForNavigationActionAsync):
(WebKit::WebPageProxy::decidePolicyForResponse):
Capture the process in the lambda, to make sure we send the policy decision to the same process that
asked for it, so as to not get confused by process swaps.

(WebKit::WebPageProxy::resetState):
Drop some code that is no longer needed.

(WebKit::WebPageProxy::creationParameters):
Move the hasRegisteredServiceWorkers flag initialization from the call site to here now that we have
more than one call site. This was just some bad factoring.

(WebKit::WebPageProxy::PageProcessOverride::PageProcessOverride):
(WebKit::WebPageProxy::PageProcessOverride::~PageProcessOverride):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::temporarilyOverrideProcess):
Add utility class to temporarily override the WebPageProxy's m_process with the provisional one when
the ProvisionalPageProxy interacts with the WebPageProxy.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::hasProvisionalPageWithID const):
(WebKit::WebProcessProxy::updateBackForwardItem):
Before updating a BackForwardListItem, we normally make sure the process has a WebPageProxy with the
item's pageID. We have to tweak the logic because there may now be no WebPageProxy with this pageID
associated with this process yet, because it is still a ProvisionalPageProxy.

(WebKit::WebProcessProxy::canTerminateChildProcess):
Do not terminate the WebProcess if there are ProvisionalPageProxy objects using it.

  • UIProcess/WebProcessProxy.h:

(WebKit::WebProcessProxy::addProvisionalPageProxy):
(WebKit::WebProcessProxy::removeProvisionalPageProxy):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::toPolicyAction):
(WebKit::WebFrame::didReceivePolicyDecision):
Stop dealing with WebPolicyAction::Suspend as it no longer exists.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::reinitializeWebPage):
(WebKit::WebPage::didReceivePolicyDecision):

(WebKit::WebPage::setIsSuspended):
Suspend the Page when setIsSuspended(true) is called, now that there is no longer a WebPolicyAction::Suspend.
setIsSuspended(true) IPC is sent when we actually commit the provisional page.

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

(-[PSONNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):

LayoutTests:

Skip test testing the cross-process DOMWindow API as I broke it with this patch.
The feature is far from ready and off by default anyway. I will add support back
in a follow-up.

  • platform/wk2/TestExpectations:
10:28 AM Changeset in webkit [239992] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebKit

Revert r239446. rdar://problem/47125351

10:27 AM Changeset in webkit [239991] by Alan Bujtas
  • 5 edits
    2 adds in trunk

[LFC][Out-of-flow] Ignore bottom when the vertical values are over-constrained
https://bugs.webkit.org/show_bug.cgi?id=193448

Reviewed by Antti Koivisto.

Source/WebCore:

Add missing check. We should only resolve auto values.

Test: fast/block/block-only/non-auto-top-bottom-left-right-widht-height-out-of-flow.html

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):

Tools:

  • LayoutReloaded/misc/LFC-passing-tests.txt:

LayoutTests:

  • fast/block/block-only/non-auto-top-bottom-left-right-widht-height-out-of-flow-expected.txt: Added.
  • fast/block/block-only/non-auto-top-bottom-left-right-widht-height-out-of-flow.html: Added.
10:03 AM Changeset in webkit [239990] by Devin Rousso
  • 2 edits in trunk/LayoutTests

Unreviewed, test fix after r239976.

  • inspector/model/remote-object-expected.txt:
9:46 AM Changeset in webkit [239989] by Jonathan Bedard
  • 19 edits in trunk/Tools

webkitpy: Implement device type specific expected results (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=192162

Reviewed by Lucas Forschler.

Device type specific expected results covers two related ideas. The first (covered by this change)
is where to search for -expected.* files. The second is which tests to run based on the
TestExpectations.txt file.

After this change, the baseline search path will be determined by the type of device running a
test. Device type will be passed into any function which picks a file based on the baseline search
path.

  • Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:

(Worker._update_test_input): Pass device_type to self._port.reference_files(...).

  • Scripts/webkitpy/layout_tests/controllers/manager.py:

(Manager.run): Print baseline search path for each round of devices.

  • Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:

(SingleTestRunner.init): Pass device_type into expected_*(...).
(SingleTestRunner._expected_driver_output): Ditto.
(SingleTestRunner._driver_input): Ditto.

  • Scripts/webkitpy/layout_tests/views/printing.py:

(Printer.print_config): Move printing of baseline search path to a separate function.
(Printer.print_baseline_search_path): Moved from Printer.print_config.

  • Scripts/webkitpy/layout_tests/views/printing_unittest.py:

(Testprinter.test_print_config):
(Testprinter.test_print_baseline_search_path):

  • Scripts/webkitpy/port/base.py:

(Port.baseline_search_path): Pass device_type through.
(Port._expected_baselines_for_suffixes): Ditto.
(Port.expected_baselines): Ditto.
(Port.expected_filename): Ditto.
(Port.expected_checksum): Ditto.
(Port.expected_image): Ditto.
(Port.expected_audio): Ditto.
(Port.expected_text): Ditto.
(Port.reference_files): Ditto.
(Port.tests): Ditto.
(Port._expanded_paths): Ditto.
(Port.skipped_layout_tests): Ditto.
(Port.expectations_dict): Ditto.
(Port._port_specific_expectations_files): Ditto.
(Port.expectations_files): Ditto.
(Port.test_search_path): Ditto.
(Port._tests_for_other_platforms): Ditto.

  • Scripts/webkitpy/port/base_unittest.py:

(PortTest.test_additional_platform_directory): Accept, but do not use, device_type.
(PortTest.test_nonexistant_expectations): Ditto.
(test_ref_tests_platform_directory): Ditto.

  • Scripts/webkitpy/port/darwin.py:

(DarwinPort._port_specific_expectations_files): Accept device_type.

  • Scripts/webkitpy/port/driver.py:

(DriverProxy):
(DriverProxy.host): Expose _target_host for device_type information.

  • Scripts/webkitpy/port/gtk.py:

(GtkPort._port_specific_expectations_files): Accept, but do not use, device_type.

  • Scripts/webkitpy/port/ios.py:

(IOSPort. default_baseline_search_path): Remove memoized, since it does not accept kwargs.

  • Scripts/webkitpy/port/mac.py:

(MacPort. default_baseline_search_path): Ditto.

  • Scripts/webkitpy/port/port_testcase.py:

(TestWebKitPort._tests_for_other_platforms): Accept, but do not use, device_type.

  • Scripts/webkitpy/port/test.py:
  • Scripts/webkitpy/port/watch.py:

(WatchPort. default_baseline_search_path): Remove memoized, since it does not accept kwargs.

  • Scripts/webkitpy/port/win.py:

(WinPort.test_search_path): Accept, but do not use, device_type.

  • Scripts/webkitpy/port/wpe.py:

(WPEPort._port_specific_expectations_files): Ditto.

  • Scripts/webkitpy/tool/servers/rebaselineserver.py:

(get_test_baselines.AllPlatformsPort.baseline_search_path): Ditto.

9:15 AM Changeset in webkit [239988] by BJ Burg
  • 8 edits in trunk/Source/WebKit

WebDriver: update Create Window implementation to support newest specification
https://bugs.webkit.org/show_bug.cgi?id=193333
<rdar://problem/45649489>

Reviewed by Carlos Garcia Campos.

Spec link: https://w3c.github.io/webdriver/#create-window

The command as specified returns a value indicating whether the new browsing context
was presented as a new tab or new window. Add a new delegate method to query the current
'presentation' of the browsing context. The presentation can change over time due to
things such as screen orientation, so the value that is returned by the command only
reflects how the browsing context was initially presented to the user.

This is covered by existing WPT and internal tests. More will be added when Selenium
exposes this command in its various bindings.

  • UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h:

Add new SPI delegate method to query the 'presentation' (tab or window) for an automated WKWebView.

  • UIProcess/API/APIAutomationSessionClient.h:

(API::AutomationSessionClient::currentPresentationOfPage):

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

(WebKit::AutomationSessionClient::AutomationSessionClient):
(WebKit::toImpl):
(WebKit::AutomationSessionClient::currentPresentationOfPage):

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::toProtocol):
(WebKit::WebAutomationSession::createBrowsingContext):
Add plumbing between ObjC delegate and C++.

  • UIProcess/Automation/Automation.json:

Include the initial presentation in the createBrowsingContext command result.

8:31 AM Changeset in webkit [239987] by Devin Rousso
  • 5 edits
    2 adds in trunk

Web Inspector: Audit: provide a way to determine whether a give node has event listeners
https://bugs.webkit.org/show_bug.cgi?id=193226
<rdar://problem/46800005>

Reviewed by Joseph Pecoraro.

Source/WebCore:

Test: inspector/audit/run-dom.html

  • inspector/InspectorAuditDOMObject.idl:
  • inspector/InspectorAuditDOMObject.h:
  • inspector/InspectorAuditDOMObject.cpp:

(WebCore::InspectorAuditDOMObject::hasEventListeners): Added.

LayoutTests:

  • inspector/audit/run-dom.html: Added.
  • inspector/audit/run-dom-expected.txt: Added.
8:28 AM Changeset in webkit [239986] by Devin Rousso
  • 5 edits
    2 adds in trunk

Web Inspector: Audit: provide a way to query for all nodes with a given computed Accessibility role
https://bugs.webkit.org/show_bug.cgi?id=193228
<rdar://problem/46787787>

Reviewed by Joseph Pecoraro.

Source/WebCore:

Test: inspector/audit/run-accessibility.html

  • inspector/InspectorAuditAccessibilityObject.idl:
  • inspector/InspectorAuditAccessibilityObject.h:
  • inspector/InspectorAuditAccessibilityObject.cpp:

(WebCore::accessiblityObjectForNode): Added.
(WebCore::InspectorAuditAccessibilityObject::getElementsByComputedRole): Added.

LayoutTests:

  • inspector/audit/run-accessibility.html: Added.
  • inspector/audit/run-accessibility-expected.txt: Added.
8:24 AM Changeset in webkit [239985] by Simon Fraser
  • 10 edits in trunk/Source/WebCore

Simplify isRunningAnimationOnRenderer()
https://bugs.webkit.org/show_bug.cgi?id=193435

Reviewed by Darin Adler.

All callers of CSSAnimationController::isRunningAnimationOnRenderer() pass AnimationBase::Running | AnimationBase::Paused,
so we can remove the parameter and just hardcode this behavior.

This will simplify a later patch that needs to consider state changes between running and not running.

No behavior change.

  • page/animation/AnimationBase.h:

(WebCore::AnimationBase::isAnimatingProperty const):

  • page/animation/CSSAnimationController.cpp:

(WebCore::CSSAnimationControllerPrivate::isRunningAnimationOnRenderer const):
(WebCore::CSSAnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer const):
(WebCore::CSSAnimationControllerPrivate::computeExtentOfAnimation const):
(WebCore::CSSAnimationController::isRunningAnimationOnRenderer const):
(WebCore::CSSAnimationController::isRunningAcceleratedAnimationOnRenderer const):

  • page/animation/CSSAnimationController.h:
  • page/animation/CSSAnimationControllerPrivate.h:
  • page/animation/CompositeAnimation.cpp:

(WebCore::CompositeAnimation::isAnimatingProperty const):

  • page/animation/CompositeAnimation.h:
  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::currentTransform const):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateGeometry):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::requiresCompositingForAnimation const):
(WebCore::RenderLayerCompositor::isRunningTransformAnimation const):

7:46 AM Changeset in webkit [239984] by Antti Koivisto
  • 6 edits in trunk/Source/WebCore

Remove unused fields from Scrollbar
https://bugs.webkit.org/show_bug.cgi?id=193442

Reviewed by Zalan Bujtas.

  • platform/Scrollbar.cpp:

(WebCore::Scrollbar::Scrollbar):

  • platform/Scrollbar.h:

(WebCore::Scrollbar::isCustomScrollbar const):

Make virtual so it doesn't need a bit.

(WebCore::Scrollbar::isAlphaLocked const): Deleted.
(WebCore::Scrollbar::setIsAlphaLocked): Deleted.

  • platform/mac/ScrollAnimatorMac.mm:

(WebCore::ScrollAnimatorMac::shouldScrollbarParticipateInHitTesting):

  • rendering/RenderScrollbar.cpp:

(WebCore::RenderScrollbar::RenderScrollbar):

  • rendering/RenderScrollbar.h:
6:48 AM Changeset in webkit [239983] by Alan Bujtas
  • 6 edits
    2 adds in trunk

[LFC] Use the containing block's padding box to position out-of-flow elements.
https://bugs.webkit.org/show_bug.cgi?id=193431

Reviewed by Antti Koivisto.

Source/WebCore:

If the element has 'position: absolute', the containing block is established by the nearest ancestor
with a 'position' of 'absolute', 'relative' or 'fixed', in the following way:

  1. In the case that the ancestor is an inline element, the containing block is the bounding box around the padding

boxes of the first and the last inline boxes generated for that element. In CSS 2.2, if the inline element is split
across multiple lines, the containing block is undefined.

  1. Otherwise, the containing block is formed by the padding edge of the ancestor.

This patch covers #2.

Test: fast/block/block-only/out-of-flow-with-containing-block-border-padding.html

  • layout/displaytree/DisplayBox.h:

(WebCore::Display::Box::width const):
(WebCore::Display::Box::height const):
(WebCore::Display::Box::contentBoxTop const):
(WebCore::Display::Box::contentBoxLeft const):
(WebCore::Display::Box::paddingBoxTop const):
(WebCore::Display::Box::paddingBoxLeft const):
(WebCore::Display::Box::paddingBoxBottom const):
(WebCore::Display::Box::paddingBoxRight const):
(WebCore::Display::Box::paddingBoxHeight const):
(WebCore::Display::Box::paddingBoxWidth const):

  • page/FrameViewLayoutContext.cpp:

(WebCore::layoutUsingFormattingContext):

Tools:

  • LayoutReloaded/misc/LFC-passing-tests.txt:

LayoutTests:

  • fast/block/block-only/out-of-flow-with-containing-block-border-padding-expected.txt: Added.
  • fast/block/block-only/out-of-flow-with-containing-block-border-padding.html: Added.
5:14 AM Changeset in webkit [239982] by tpopela@redhat.com
  • 2 edits in trunk/JSTests

Unreviewed, skip JIT tests if it's not enabled

  • stress/bit-op-with-object-returning-int32.js:
4:34 AM Changeset in webkit [239981] by tpopela@redhat.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed: Fix the -Wformat compiler warnings

  • jsc.cpp:

(jscmain):

2:14 AM Changeset in webkit [239980] by Caio Lima
  • 7 edits
    1 add in trunk

DFGByteCodeParser rules for bitwise operations should consider type of their operands
https://bugs.webkit.org/show_bug.cgi?id=192966

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/bit-op-with-object-returning-int32.js: Added.

Source/JavaScriptCore:

This patch is changing the logic how we lower bitwise operations, to
consider only the type of input nodes and fix them during FixupPhase,
if necessary. We are also changing the prediction propagation rules
for ValueBitOp to use getHeapPrediction().

  • dfg/DFGBackwardsPropagationPhase.cpp:

(JSC::DFG::BackwardsPropagationPhase::isWithinPowerOfTwo):
(JSC::DFG::BackwardsPropagationPhase::propagate):

  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGNode.h:

(JSC::DFG::Node::hasInt32Result):
(JSC::DFG::Node::hasNumberOrAnyIntResult):
(JSC::DFG::Node::hasHeapPrediction):

  • dfg/DFGPredictionPropagationPhase.cpp:
1:51 AM Changeset in webkit [239979] by guijemont@igalia.com
  • 4 edits in trunk

Skip a slow test and a flakey test on arm

Unreviewed gardening.

JSTests:

  • typeProfiler/getter-richards.js:

this test always times out, it used to be always skipped on arm and
mips, but got accidentally enabled by r237919 now that we have DFG on
arm. Also skipping on mips as we plan to soon enable DFG for it too.

LayoutTests:

  • js/script-tests/stack-overflow-regexp.js: flakey on arm.
12:30 AM Changeset in webkit [239978] by graouts@webkit.org
  • 14 edits
    1 add in trunk/Source/WebCore

Support parsing of additional values for the touch-action property
https://bugs.webkit.org/show_bug.cgi?id=193314
<rdar://problem/47176519>

Reviewed by Dean Jackson.

We add parsing support for the "none", "pan-x", "pan-y" and "pinch-zoom" values of the CSS "touch-action" property.

  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::touchActionFlagsToCSSValue):
(WebCore::ComputedStyleExtractor::valueForPropertyinStyle):

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator OptionSet<TouchAction> const):
(WebCore::CSSPrimitiveValue::operator TouchAction const): Deleted.

  • css/CSSProperties.json:
  • css/CSSValueKeywords.in:
  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertTouchAction):

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeTouchAction):

  • dom/Element.cpp:

(WebCore::Element::allowsDoubleTapGesture const):

  • platform/TouchAction.h: Added.
  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::touchActions const):
(WebCore::RenderStyle::setTouchActions):
(WebCore::RenderStyle::initialTouchActions):
(WebCore::RenderStyle::touchAction const): Deleted.
(WebCore::RenderStyle::setTouchAction): Deleted.
(WebCore::RenderStyle::initialTouchAction): Deleted.

  • rendering/style/RenderStyleConstants.h:
  • rendering/style/StyleRareNonInheritedData.cpp:

(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator== const):

  • rendering/style/StyleRareNonInheritedData.h:
12:27 AM Changeset in webkit [239977] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Web Inspector: Generate the DOMDebugger domain for Augmenting Agents (ObjC protocol)
https://bugs.webkit.org/show_bug.cgi?id=193409
<rdar://problem/44349411>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2019-01-15
Reviewed by Devin Rousso.

  • inspector/scripts/codegen/objc_generator.py:

(ObjCGenerator):
Generate DOMDebugger domain ObjC interfaces.

12:25 AM Changeset in webkit [239976] by Devin Rousso
  • 39 edits
    21 adds in trunk

Web Inspector: Audit: create new IDL type for exposing special functionality in test context
https://bugs.webkit.org/show_bug.cgi?id=193149
<rdar://problem/46801218>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

Create a new AuditAgent (and various subclasses for different inspection targets)

  • inspector/protocol/Audit.json: Added.

Add a run command that is a simpler version of Runtime.evaluate, except that it expects
a function string instead of an arbitrary JavaScript expression.
Add setup and teardown commands that create a JavaScript object that will be passed in
to the test as an argument. Keep this object alive so that tests can add to the object and
have later tests use what was added.

  • inspector/agents/InspectorAuditAgent.h: Added.
  • inspector/agents/InspectorAuditAgent.cpp: Added.

(Inspector::InspectorAuditAgent::InspectorAuditAgent):
(Inspector::InspectorAuditAgent::didCreateFrontendAndBackend):
(Inspector::InspectorAuditAgent::willDestroyFrontendAndBackend):
(Inspector::InspectorAuditAgent::setup):
(Inspector::InspectorAuditAgent::run):
(Inspector::InspectorAuditAgent::teardown):
(Inspector::InspectorAuditAgent::hasActiveAudit):
(Inspector::InspectorAuditAgent::populateAuditObject):

  • inspector/agents/JSGlobalObjectAuditAgent.h: Added.
  • inspector/agents/JSGlobalObjectAuditAgent.cpp: Added.

(Inspector::JSGlobalObjectAuditAgent::JSGlobalObjectAuditAgent):
(Inspector::JSGlobalObjectAuditAgent::injectedScriptForEval):

  • inspector/JSGlobalObjectInspectorController.h:
  • inspector/JSGlobalObjectInspectorController.cpp:

(Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
(Inspector::JSGlobalObjectInspectorController::connectFrontend):
(Inspector::JSGlobalObjectInspectorController::jsAgentContext): Added.
(Inspector::JSGlobalObjectInspectorController::createLazyAgents): Added.

  • inspector/InjectedScript.h:
  • inspector/InjectedScript.cpp:

(Inspector::InjectedScript::execute): Added.
(Inspector::InjectedScript::arrayFromVector): Added.
Create a version of evaluate that accepts a list of values to be passed in as arguments
to the function that was created by the eval of the given functionString.

  • inspector/InjectedScriptSource.js:

(InjectedScript.prototype.execute): Added.
(InjectedScript.prototype.evaluate):
(InjectedScript.prototype.evaluateOnCallFrame):
(InjectedScript.prototype._evaluateAndWrap):
(InjectedScript.prototype._wrapAndSaveCall): Added.
(InjectedScript.prototype._wrapCall): Added.
(InjectedScript.prototype._evaluateOn):
Refactor the eval and saveResult logic to allow for more flexibility for other callers.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources.make:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • UnifiedSources-input.xcfilelist:

Source/WebCore:

Tests: inspector/audit/run.html

inspector/audit/setup.html
inspector/audit/teardown.html

Create a new AuditAgent (and various subclasses for different inspection targets), as well
as InspectorAuditAccessibilityObject and InspectorAuditDOMObject objects that will
be injected into the test function to allow for more advanced testing.

  • inspector/InspectorAuditAccessibilityObject.idl: Added.
  • inspector/InspectorAuditAccessibilityObject.h: Added.

(WebCore::InspectorAuditAccessibilityObject::create):

  • inspector/InspectorAuditAccessibilityObject.cpp: Added.

(WebCore::InspectorAuditAccessibilityObject::InspectorAuditAccessibilityObject):

  • inspector/InspectorAuditDOMObject.idl: Added.
  • inspector/InspectorAuditDOMObject.h: Added.

(WebCore::InspectorAuditDOMObject::create):

  • inspector/InspectorAuditDOMObject.cpp: Added.

(WebCore::InspectorAuditDOMObject::InspectorAuditDOMObject):

  • inspector/agents/page/PageAuditAgent.h: Added.
  • inspector/agents/page/PageAuditAgent.cpp: Added.

(WebCore::PageAuditAgent::PageAuditAgent):
(WebCore::PageAuditAgent::injectedScriptForEval):
(WebCore::PageAuditAgent::populateAuditObject):
(WebCore::PageAuditAgent::muteConsole):
(WebCore::PageAuditAgent::unmuteConsole):

  • inspector/agents/worker/WorkerAuditAgent.h: Added.
  • inspector/agents/worker/WorkerAuditAgent.cpp: Added.

(WebCore::WorkerAuditAgent::WorkerAuditAgent):
(WebCore::WorkerAuditAgent::injectedScriptForEval):

  • inspector/InspectorController.cpp:

(WebCore::InspectorController::createLazyAgents):

  • inspector/WorkerInspectorController.cpp:

(WebCore::WorkerInspectorController::createLazyAgents):

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Sources.txt:
  • UnifiedSources-input.xcfilelist:
  • WebCore.xcodeproj/project.pbxproj:

Source/WebInspectorUI:

Add AuditAgent getters and plumbing.

  • UserInterface/Protocol/Target.js:

(WI.Target.prototype.get AuditAgent): Added.

  • UserInterface/Models/AuditTestCase.js:

(WI.AuditTestCase.prototype.async run):

  • UserInterface/Controllers/AuditManager.js:

(WI.AuditManager.prototype.async start):

  • .eslintrc:

LayoutTests:

  • inspector/audit/resources/audit-utilities.js:

(TestPage.registerInitializer.InspectorTest.Audit.setupAudit): Added.
(TestPage.registerInitializer.InspectorTest.Audit.teardownAudit): Added.

  • inspector/audit/run.html: Added.
  • inspector/audit/run-expected.txt: Added.
  • inspector/audit/setup.html: Added.
  • inspector/audit/setup-expected.txt: Added.
  • inspector/audit/teardown.html: Added.
  • inspector/audit/teardown-expected.txt: Added.
  • inspector/canvas/create-context-2d-expected.txt:
  • inspector/canvas/create-context-bitmaprenderer-expected.txt:
  • inspector/canvas/create-context-webgl-expected.txt:
  • inspector/canvas/create-context-webgl2-expected.txt:
  • inspector/canvas/create-context-webmetal-expected.txt:
  • inspector/canvas/recording-2d-expected.txt:
  • inspector/canvas/recording-webgl-expected.txt:
  • inspector/canvas/recording-webgl-snapshots-expected.txt:
  • inspector/model/remote-object-expected.txt:
  • inspector/model/stack-trace-expected.txt:

Jan 14, 2019:

10:01 PM Changeset in webkit [239975] by mmaxfield@apple.com
  • 3 edits
    4 adds in trunk/Source/WebCore

[WHLSL] Implement the Type Checker
https://bugs.webkit.org/show_bug.cgi?id=193080

Reviewed by Dean Jackson.

This is a translation of https://github.com/gpuweb/WHLSL/blob/master/Source/Checker.mjs into C++.

The Checker passes types between nested expressions. An inner expression figures out what type it is, and
passes that information up to an outer expression. This is done via reading/writing into a HashMap,
because all the type information needs to be saved so that the Metal codegen can emit the correct types.

These types can have two forms: A regular type (like "int[]") or a ResolvableType. ResolvableTypes
represent literals, since a literal needs to know its context before it knows what type it should be. So,
if you have a function like "void foo(int x)" and you have a call like "foo(3)", the 3's ResolvableType
gets passed to the CallExpression, which then unifies it with the function's parameter type, thereby
resolving the 3 to be an int.

There are a few examples where multiple expressions will have the same type: "return (foo, 3)." If those
types are regular types, then it's no problem; we can just clone() the type and stick both in the HashMap.
However, if the type is a ResolvableType, an outer expression will only resolve that type once, so the two
ResolvableTypes can't be distinct. The Checker solves this problem by making a reference-counted wrapper
around ResolvableTypes and using that in the HashMap instead.

Once all the ResolvableTypes have been resolved, a second pass runs through the entire HashMap and assigns
the known types to all the expressions. LValues and their associated address spaces are held in a parallel
HashMap, and are assigned to the expression at the same time. The type is an Optional<AddressSpace> because
address spaces are only relevant if the value is an lvalue; if it's nullopt then that means the expression
is an rvalue.

No new tests because it isn't hooked up yet. Not enough of the compiler exists to have any meaningful sort
of test. When enough of the compiler is present, I'll port the reference implementation's test suite.

  • Modules/webgpu/WHLSL/WHLSLChecker.cpp: Added.

(WebCore::WHLSL::resolveWithOperatorAnderIndexer):
(WebCore::WHLSL::resolveWithOperatorLength):
(WebCore::WHLSL::resolveWithReferenceComparator):
(WebCore::WHLSL::resolveByInstantiation):
(WebCore::WHLSL::checkSemantics):
(WebCore::WHLSL::checkOperatorOverload):
(WebCore::WHLSL::Checker::Checker):
(WebCore::WHLSL::Checker::visit):
(WebCore::WHLSL::Checker::assignTypes):
(WebCore::WHLSL::Checker::checkShaderType):
(WebCore::WHLSL::matchAndCommit):
(WebCore::WHLSL::Checker::recurseAndGetInfo):
(WebCore::WHLSL::Checker::getInfo):
(WebCore::WHLSL::Checker::assignType):
(WebCore::WHLSL::Checker::forwardType):
(WebCore::WHLSL::getUnnamedType):
(WebCore::WHLSL::Checker::finishVisitingPropertyAccess):
(WebCore::WHLSL::Checker::recurseAndWrapBaseType):
(WebCore::WHLSL::Checker::isBoolType):
(WebCore::WHLSL::Checker::recurseAndRequireBoolType):
(WebCore::WHLSL::check):

  • Modules/webgpu/WHLSL/WHLSLChecker.h: Added.
  • Modules/webgpu/WHLSL/WHLSLGatherEntryPointItems.cpp: Added.

(WebCore::WHLSL::Gatherer::Gatherer):
(WebCore::WHLSL::Gatherer::reset):
(WebCore::WHLSL::Gatherer::takeEntryPointItems):
(WebCore::WHLSL::Gatherer::visit):
(WebCore::WHLSL::gatherEntryPointItems):

  • Modules/webgpu/WHLSL/WHLSLGatherEntryPointItems.h: Added.

(WebCore::WHLSL::EntryPointItem::EntryPointItem):

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
9:15 PM Changeset in webkit [239974] by achristensen@apple.com
  • 6 edits in trunk/Source

Split headerValueForVary into specialized functions for NetworkProcess and WebProcess/WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=193429

Reviewed by Joseph Pecoraro.

Source/WebCore:

headerValueForVary is a strange function that is causing trouble with my NetworkProcess global state removal project.
It currently accesses the cookie storage to see if there's a match in two different ways currently written as fallbacks.
In the WebProcess or in WebKitLegacy, it uses cookiesStrategy to access cookies via IPC or directly, respectively,
depending on the PlatformStrategies implementation of cookiesStrategy for that process.
In the NetworkProcess, it uses WebCore::NetworkStorageSession to access cookies directly.
Both of these cookie accessing methods use global state in the process, and I must split them to refactor them separately.
This patch does the split by passing in the method of cookie access: a CookiesStrategy& or a NetworkStorageSession&.
Further refactoring will be done in bug 193368 and bug 161106 to build on this and replace the global state with
member variables of the correct containing objects.

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::setResponse):
(WebCore::CachedResource::varyHeaderValuesMatch):

  • platform/network/CacheValidation.cpp:

(WebCore::cookieRequestHeaderFieldValue):
(WebCore::headerValueForVary):
(WebCore::collectVaryingRequestHeaders):
(WebCore::verifyVaryingRequestHeaders):

  • platform/network/CacheValidation.h:

Source/WebKit:

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::makeUseDecision):
(WebKit::NetworkCache::Cache::retrieve):
(WebKit::NetworkCache::Cache::makeEntry):
(WebKit::NetworkCache::Cache::makeRedirectEntry):
(WebKit::NetworkCache::Cache::update):

8:11 PM Changeset in webkit [239973] by timothy_horton@apple.com
  • 2 edits in trunk/Tools

Move a test implementation file that got misplaced in the Xcode project

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
8:03 PM Changeset in webkit [239972] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Fix a style mistake in PageClientImplMac

  • UIProcess/mac/PageClientImplMac.h:

Somehow these methods ended up above the members.

7:31 PM Changeset in webkit [239971] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Only run the node comparison code in FrameSelection::respondToNodeModification() for range selections
https://bugs.webkit.org/show_bug.cgi?id=193416

Reviewed by Wenson Hsieh.

The code inside the m_selection.firstRange() clause needs to only run for non-collapsed selections, and
it shows up on Speedometer profiles so optimize to only run this code if we have a selection range.

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::respondToNodeModification):

7:26 PM Changeset in webkit [239970] by Michael Catanzaro
  • 2 edits in trunk/Source/WTF

Use unorm2_normalize instead of precomposedStringWithCanonicalMapping in userVisibleString
https://bugs.webkit.org/show_bug.cgi?id=192945

Reviewed by Alex Christensen.

Replace use of the nice NSString function precomposedStringWithCanonicalMapping with the ICU
API unorm2_normalize. This is to prep the code for translation to cross-platform C++. Of
course this is much worse than the preexisting code, but this is just a transitional
measure and not the final state of the code. It wouldn't make sense to do this if the code
were to remain Objective C++.

  • wtf/cocoa/NSURLExtras.mm:

(WTF::toNormalizationFormC):
(WTF::userVisibleString):

7:01 PM Changeset in webkit [239969] by msaboff@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Add option to JSC to dump memory footprint on script completion
https://bugs.webkit.org/show_bug.cgi?id=193422

Reviewed by Mark Lam.

Added the --footprint option to dump peak and current memory usage. This uses the same
OS calls added in r2362362.

  • jsc.cpp:

(printUsageStatement):
(CommandLine::parseArguments):
(jscmain):

6:37 PM Changeset in webkit [239968] by keith_miller@apple.com
  • 2 edits in trunk/JSTests

Skip type-check-hoisting-phase-hoist... with no jit
https://bugs.webkit.org/show_bug.cgi?id=193421

Reviewed by Mark Lam.

It's timing out the 32-bit bots and takes 330 seconds
on my machine when run by itself.

  • stress/type-check-hoisting-phase-hoist-check-structure-on-tdz-this-value.js:
6:14 PM Changeset in webkit [239967] by achristensen@apple.com
  • 5 edits in trunk

Bulgarian TLD should not punycode-encode URLs with Bulgarian Cyrillic characters
https://bugs.webkit.org/show_bug.cgi?id=193411
<rdar://problem/47215929>

Reviewed by Alexey Proskuryakov.

Source/WTF:

  • wtf/cocoa/NSURLExtras.mm:

(WTF::allCharactersAllowedByTLDRules):

LayoutTests:

  • fast/url/user-visible/cyrillic-NFD-expected.txt:
  • fast/url/user-visible/cyrillic-NFD.html:
5:51 PM Changeset in webkit [239966] by wilander@apple.com
  • 3 edits in trunk/LayoutTests

Restructure http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html to address flakiness
https://bugs.webkit.org/show_bug.cgi?id=191211
<rdar://problem/45818606>

Unreviewed test gardening.

This test is flaky on the MacOS WK2 bot. The patch avoids a page navigation and
redirect which may avoid the code that changed in
https://trac.webkit.org/changeset/237735/webkit and made the test more flaky.

  • http/tests/resourceLoadStatistics/remove-blocking-in-redirect-expected.txt:
  • http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html:
5:31 PM Changeset in webkit [239965] by Simon Fraser
  • 12 edits in trunk

Animation and other code is too aggressive about invalidating layer composition
https://bugs.webkit.org/show_bug.cgi?id=193343

Reviewed by Antoine Quint.

Source/WebCore:

We used to have the concept of a "SyntheticStyleChange", which was used to trigger
style updates for animation, and also to get compositing updated.

That morphed into a call to Element::invalidateStyleAndLayerComposition(), which causes
a style update to result in a "RecompositeLayer" diff, which in turn triggers compositing work,
and dirties DOM touch event regions (which can be expensive to update).

However, not all the callers of Element::invalidateStyleAndLayerComposition() need to trigger
compositing, and doing so from animations caused excessive touch event regions on yahoo.com,
which has several visibility:hidden elements with background-position animation.

So fix callers of invalidateStyleAndLayerComposition() which don't care about compositing to instead
call just invalidateStyle().

Also fix KeyframeAnimation::animate to correctly return true when animation state changes—it failed to
do so, because fireAnimationEventsIfNeeded() can run the state machine and change state.

  • animation/KeyframeEffect.cpp:

(WebCore::invalidateElement):

  • page/animation/AnimationBase.cpp:

(WebCore::AnimationBase::setNeedsStyleRecalc):

  • page/animation/CSSAnimationController.cpp:

(WebCore::CSSAnimationControllerPrivate::updateAnimations):
(WebCore::CSSAnimationControllerPrivate::fireEventsAndUpdateStyle):
(WebCore::CSSAnimationControllerPrivate::pauseAnimationAtTime):
(WebCore::CSSAnimationControllerPrivate::pauseTransitionAtTime):
(WebCore::CSSAnimationController::cancelAnimations):

  • page/animation/KeyframeAnimation.cpp:

(WebCore::KeyframeAnimation::animate):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::imageChanged):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects const):

  • rendering/svg/SVGResourcesCache.cpp:

(WebCore::SVGResourcesCache::clientStyleChanged):

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::createAnimatedElementUpdate):

  • svg/SVGAnimateElementBase.cpp:

(WebCore::applyCSSPropertyToTarget):
(WebCore::removeCSSPropertyFromTarget):

LayoutTests:

This test was clobbering the 'box' class on the animating element and therefore making it disappear.

  • legacy-animation-engine/compositing/animation/animation-compositing.html:
5:26 PM Changeset in webkit [239964] by yusukesuzuki@slowstart.org
  • 4 edits
    1 add in trunk

[JSC] AI should check the given constant's array type when folding GetByVal into constant
https://bugs.webkit.org/show_bug.cgi?id=193413
<rdar://problem/46092389>

Reviewed by Keith Miller.

JSTests:

This test is super flaky. It causes crash in r238109, but it does not crash with --useConcurrentJIT=false.
It does not cause any crashes on the latest revision too. Basically, it highly depends on the timing, and
without this patch, the root cause is not fixed yet. If GetLocal is turned into JSConstant in AI,
but GetByVal does not have appropriate ArrayModes, JSC crashes.

  • stress/ai-should-perform-array-check-on-get-by-val-constant-folding.js: Added.

(compareArray):

Source/JavaScriptCore:

If GetByVal's DFG::ArrayMode's type is Array::Double, we expect that the result of GetByVal is Double, since we already performed CheckStructure or CheckArray
to ensure this array type. But this assumption on the given value becomes wrong in AI, since CheckStructure may not perform filtering. And the proven AbstractValue
in GetByVal would not be expected one.

We have the graph before performing constant folding.

53:<!0:-> GetLocal(Check:Untyped:@77, JS|MustGen|UseAsOther, Array, arg2(C<Array>/FlushedCell), R:Stack(7), bc#37, ExitValid) predicting Array
54:< 1:-> JSConstant(JS|PureNum|UseAsOther|UseAsInt|ReallyWantsInt, BoolInt32, Int32: 0, bc#37, ExitValid)
93:<!0:-> CheckStructure(Cell:@53, MustGen, [%C7:Array], R:JSCell_structureID, Exits, bc#37, ExitValid)
94:< 1:-> GetButterfly(Check:Cell:@53, Storage|PureInt, R:JSObject_butterfly, Exits, bc#37, ExitValid)
55:<!0:-> GetByVal(Check:KnownCell:@53, Check:Int32:@54, Check:Untyped:@94, Double|MustGen|VarArgs|PureInt, AnyIntAsDouble|NonIntAsdouble, Double+OriginalCopyOnWriteArray+SaneChain+AsIs+Read, R:Butterfly_publicLength,IndexedDoubleProperties, Exits, bc#37, ExitValid) predicting StringIdent|NonIntAsdouble

And 53 is converted to JSConstant in the constant folding. It leads to constant folding attempt in GetByVal.

53:< 1:-> JSConstant(JS|UseAsOther, Array, Weak:Object: 0x117fb4370 with butterfly 0x8000e4050 (Structure %BV:Array), StructureID: 104, bc#37, ExitValid)
54:< 1:-> JSConstant(JS|PureNum|UseAsOther|UseAsInt|ReallyWantsInt, BoolInt32, Int32: 0, bc#37, ExitValid)
93:<!0:-> CheckStructure(Cell:@53, MustGen, [%C7:Array], R:JSCell_structureID, Exits, bc#37, ExitValid)
94:< 1:-> GetButterfly(Check:Cell:@53, Storage|PureInt, R:JSObject_butterfly, Exits, bc#37, ExitValid)
55:<!0:-> GetByVal(Check:KnownCell:@53, Check:Int32:@54, Check:Untyped:@94, Double|MustGen|VarArgs|PureInt, AnyIntAsDouble|NonIntAsdouble, Double+OriginalCopyOnWriteArray+SaneChain+AsIs+Read, R:Butterfly_publicLength,IndexedDoubleProperties, Exits, bc#37, ExitValid) predicting StringIdent|NonIntAsdouble

GetByVal gets constant Array from @53, and attempt to perform constant folding by leverating CoW state: if the given array's butterfly is CoW and we performed CoW array check for this GetByVal, the array would not be changed as long as the check works.
However, CheckStructure for @53 does not filter anything at AI. So, if @53 is CopyOnWrite | Contiguous array (not CopyOnWrite | Double array!), GetByVal will get a JSValue. But it does not meet the requirement of GetByVal since it has Double Array mode, and says it returns Double.
Here, CheckStructure is valid because structure of the constant object would be changed. What we should do is additional CoW & ArrayShape check in GetByVal when folding since this node leverages CoW's interesting feature,
"If CoW array check (CheckStructure etc.) is emitted by GetByVal's DFG::ArrayMode, the content is not changed from the creation!".

This patch adds ArrayShape check in addition to CoW status check in GetByVal.

Unfortunately, this crash is very flaky. In the above case, if @53 stays GetLocal after the constant folding phase, this issue does not occur. We can see this crash in r238109, but it is really hard to reproduce it in the current ToT.
I verified this fix works in r238109 with the attached test.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGAbstractValue.cpp:

(JSC::DFG::AbstractValue::fixTypeForRepresentation):

4:55 PM Changeset in webkit [239963] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Remove reporting for mach lookups confirmed in-use
https://bugs.webkit.org/show_bug.cgi?id=193415
<rdar://problem/47266542>

Reviewed by Brent Fulgham.

Also, start denying the services which have not been confirmed to be in use.

  • WebProcess/com.apple.WebProcess.sb.in:
4:49 PM Changeset in webkit [239962] by Alan Coon
  • 7 edits in tags/Safari-607.1.20.2/Source

Versioning.

4:39 PM Changeset in webkit [239961] by Caio Lima
  • 3 edits
    1 add in trunk

[BigInt] Literal parsing is crashing when used inside a Object Literal
https://bugs.webkit.org/show_bug.cgi?id=193404

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/big-int-literal-inside-literal-object.js: Added.

Source/JavaScriptCore:

Former implementation was relying into token.m_data.radix after the
call of next() into Parser.cpp. This is not safe because next
clobbers token.m_data.radix in some cases (e.g is CLOSEBRACE).
Now we get radix value before calling next() into parser and store
in a local variable.

  • parser/Parser.cpp:

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

4:19 PM Changeset in webkit [239960] by sihui_liu@apple.com
  • 2 edits in trunk/Source/WebCore

IndexedDB: When deleting databases, some open databases might be missed
https://bugs.webkit.org/show_bug.cgi?id=193090

Reviewed by Brady Eidson.

We should close all databases with an open backing store instead of looking at which ones have an open database
connection. This is because a database might be in the process of getting a backing store before its connection
has been created.

  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesModifiedSince):
(WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesForOrigins):

4:00 PM Changeset in webkit [239959] by commit-queue@webkit.org
  • 19 edits
    1 copy
    3 moves
    35 adds
    4 deletes in trunk/LayoutTests

Import current Resource-Timing WPTs
https://bugs.webkit.org/show_bug.cgi?id=193302

Patch by Charles Vazac <cvazac@akamai.com> on 2019-01-14
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/resource-timing/SyntheticResponse.py:

(main):

  • web-platform-tests/resource-timing/buffer-full-add-after-full-event-expected.txt: Added.
  • web-platform-tests/resource-timing/buffer-full-add-after-full-event.html: Added.
  • web-platform-tests/resource-timing/buffer-full-add-entries-during-callback-expected.txt: Added.
  • web-platform-tests/resource-timing/buffer-full-add-entries-during-callback-that-drop.html: Added.
  • web-platform-tests/resource-timing/buffer-full-add-entries-during-callback.html: Added.
  • web-platform-tests/resource-timing/buffer-full-add-then-clear-expected.txt: Added.
  • web-platform-tests/resource-timing/buffer-full-add-then-clear.html: Added.
  • web-platform-tests/resource-timing/buffer-full-decrease-buffer-during-callback.html: Added.
  • web-platform-tests/resource-timing/buffer-full-increase-buffer-during-callback-expected.txt: Added.
  • web-platform-tests/resource-timing/buffer-full-increase-buffer-during-callback.html: Added.
  • web-platform-tests/resource-timing/buffer-full-inspect-buffer-during-callback-expected.txt: Added.
  • web-platform-tests/resource-timing/buffer-full-inspect-buffer-during-callback.html: Added.
  • web-platform-tests/resource-timing/buffer-full-set-to-current-buffer-expected.txt: Added.
  • web-platform-tests/resource-timing/buffer-full-set-to-current-buffer.html: Added.
  • web-platform-tests/resource-timing/buffer-full-store-and-clear-during-callback-expected.txt: Added.
  • web-platform-tests/resource-timing/buffer-full-store-and-clear-during-callback.html: Added.
  • web-platform-tests/resource-timing/buffer-full-then-increased-expected.txt: Added.
  • web-platform-tests/resource-timing/buffer-full-then-increased.html: Added.
  • web-platform-tests/resource-timing/buffer-full-when-populate-entries-expected.txt: Added.
  • web-platform-tests/resource-timing/buffer-full-when-populate-entries.html: Added.
  • web-platform-tests/resource-timing/document-domain-no-impact-loader.sub-expected.txt: Added.
  • web-platform-tests/resource-timing/document-domain-no-impact-loader.sub.html: Added.
  • web-platform-tests/resource-timing/no-entries-for-cross-origin-css-fetched.sub-expected.txt: Added.
  • web-platform-tests/resource-timing/no-entries-for-cross-origin-css-fetched.sub.html: Added.
  • web-platform-tests/resource-timing/resource-timing-level1.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource-timing.js.

(assertInvariants):
(window.onload):

  • web-platform-tests/resource-timing/resource-timing-level1.sub-expected.txt: Added.
  • web-platform-tests/resource-timing/resource-timing-level1.sub.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource-timing.html.
  • web-platform-tests/resource-timing/resource_connection_reuse.html:
  • web-platform-tests/resource-timing/resource_timing.worker.js:
  • web-platform-tests/resource-timing/resource_timing_buffer_full_when_populate_entries-expected.txt: Removed.
  • web-platform-tests/resource-timing/resource_timing_buffer_full_when_populate_entries.html: Removed.
  • web-platform-tests/resource-timing/resource_timing_store_and_clear_during_callback-expected.txt: Removed.
  • web-platform-tests/resource-timing/resource_timing_store_and_clear_during_callback.html: Removed.
  • web-platform-tests/resource-timing/resources/buffer-full-utilities.js: Added.

(let.appendScript):
(let.waitForNextTask):
(let.waitForEventToFire.return.new.Promise):
(let.waitForEventToFire):

  • web-platform-tests/resource-timing/resources/document-domain-no-impact.sub.html: Added.
  • web-platform-tests/resource-timing/resources/iframe-setdomain.sub.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/iframe-setdomain.sub.html.
  • web-platform-tests/resource-timing/resources/w3c-import.log:
  • web-platform-tests/resource-timing/resources/webperftestharness.js:

(wp_test):
(test_namespace):

  • web-platform-tests/resource-timing/resources/webperftestharnessextension.js:

(test_resource_entries):
(performance_entrylist_checker): Deleted.

  • web-platform-tests/resource-timing/single-entry-per-resource.html:
  • web-platform-tests/resource-timing/supported_resource_type.any-expected.txt: Added.
  • web-platform-tests/resource-timing/supported_resource_type.any.html: Added.
  • web-platform-tests/resource-timing/supported_resource_type.any.js: Added.

(test):

  • web-platform-tests/resource-timing/supported_resource_type.any.worker-expected.txt: Added.
  • web-platform-tests/resource-timing/supported_resource_type.any.worker.html: Added.
  • web-platform-tests/resource-timing/test_resource_timing.https-expected.txt: Added.
  • web-platform-tests/resource-timing/test_resource_timing.https.html: Added.
  • web-platform-tests/resource-timing/test_resource_timing.js:

(resource_load):

  • web-platform-tests/resource-timing/w3c-import.log:

LayoutTests:

3:45 PM Changeset in webkit [239958] by jiewen_tan@apple.com
  • 5 edits in trunk/LayoutTests

Unreviewed, test fixes after r239852.

  • http/wpt/webauthn/public-key-credential-create-success-hid.https.html:
  • http/wpt/webauthn/public-key-credential-create-success-u2f.https.html:
  • http/wpt/webauthn/public-key-credential-get-success-hid.https.html:
  • http/wpt/webauthn/public-key-credential-get-success-u2f.https.html:
3:24 PM Changeset in webkit [239957] by Michael Catanzaro
  • 9 edits in releases/WebKitGTK/webkit-2.22/Source

Merge r239787 - Gigacage disabling checks should handle the GIGACAGE_ALLOCATION_CAN_FAIL case properly.
https://bugs.webkit.org/show_bug.cgi?id=193292
<rdar://problem/46485450>

Reviewed by Yusuke Suzuki.

Source/bmalloc:

Previously, when GIGACAGE_ALLOCATION_CAN_FAIL is true, we allow the Gigacage to
be disabled if we fail to allocate memory for it. However, Gigacage::primitiveGigacageDisabled()
still always assumes that the Gigacage is always enabled after ensureGigacage() is
called.

This patch updates Gigacage::primitiveGigacageDisabled() to allow the Gigacage to
already be disabled if GIGACAGE_ALLOCATION_CAN_FAIL is true and wasEnabled() is
false.

In this patch, we also put the wasEnabled flag in the 0th slot of the
g_gigacageBasePtrs buffer to ensure that it is also protected against writes just
like the Gigacage base pointers.

To achieve this, we do the following:

  1. Added a reservedForFlags field in struct BasePtrs.
  2. Added a ReservedForFlagsAndNotABasePtr Gigacage::Kind.
  3. Added assertions to ensure that the BasePtrs::primitive is at the offset matching the offset computed from Gigacage::Primitive. Ditto for BasePtrs::jsValue and Gigacage::JSValue.
  4. Added assertions to ensure that Gigacage::ReservedForFlagsAndNotABasePtr is not used for fetching a Gigacage base pointer.
  5. Added RELEASE_BASSERT_NOT_REACHED() to implement such assertions in bmalloc.

No test added because this issue requires Gigacage allocation to fail in order to
manifest. I've tested it manually by modifying the code locally to force an
allocation failure.

  • bmalloc/BAssert.h:
  • bmalloc/Gigacage.cpp:

(Gigacage::ensureGigacage):
(Gigacage::primitiveGigacageDisabled):

  • bmalloc/Gigacage.h:

(Gigacage::wasEnabled):
(Gigacage::setWasEnabled):
(Gigacage::name):
(Gigacage::basePtr):
(Gigacage::size):

  • bmalloc/HeapKind.h:

(bmalloc::heapKind):

Source/JavaScriptCore:

  • runtime/VM.h:

(JSC::VM::gigacageAuxiliarySpace):

Source/WTF:

Update the USE_SYSTEM_MALLOC version of Gigacage.h to match the bmalloc version.

  • wtf/Gigacage.h:
3:24 PM Changeset in webkit [239956] by Michael Catanzaro
  • 2 edits in releases/WebKitGTK/webkit-2.22/Source/bmalloc

Merge r239245 - Gigacage runway should immediately follow the primitive cage
https://bugs.webkit.org/show_bug.cgi?id=192733

Reviewed by Saam Barati.

This patch makes sure that the Gigacage runway is always
immediately after the primitive cage. Since writing outside the
primitive gigacage is likely to be more dangerous than the JSValue
cage. The ordering of the cages is still random however.

  • bmalloc/Gigacage.cpp:

(Gigacage::ensureGigacage):

3:22 PM Changeset in webkit [239955] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Event breakpoints: typing uppercase "DOM" doesn't show completions for events that start with "DOM"
https://bugs.webkit.org/show_bug.cgi?id=193384

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/EventBreakpointPopover.js:

(WI.EventBreakpointPopover.prototype.show):

2:59 PM Changeset in webkit [239954] by Alan Coon
  • 1 copy in tags/Safari-607.1.20.2

New tag.

2:52 PM Changeset in webkit [239953] by Devin Rousso
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Event breakpoints: text field and completion popover fonts should match
https://bugs.webkit.org/show_bug.cgi?id=193249

Reviewed by Matt Baker.

  • UserInterface/Views/EventBreakpointPopover.css:

(.popover .event-breakpoint-content > .event-type > input): Added.
(.popover .event-breakpoint-content > .event-type > input::placeholder): Added.

  • UserInterface/Views/EventBreakpointPopover.js:

(WI.EventBreakpointPopover.prototype.show):
(WI.EventBreakpointPopover.prototype._showSuggestionsView):
Subtract the <input> border and padding from the bounds position so the <input> text lines
up with the WI.CompletionSuggestionsView text.

  • UserInterface/Views/CompletionSuggestionsView.js:

(WI.CompletionSuggestionsView):
Drive-by: force dir=ltr to match the text-align: left; CSS styling.

2:51 PM Changeset in webkit [239952] by rniwa@webkit.org
  • 15 edits in trunk/Source/WebCore

Remove redundant check for alignAttr and hiddenAttr in various isPresentationAttribute overrides
https://bugs.webkit.org/show_bug.cgi?id=193410

Reviewed by Simon Fraser.

Removed redundant checks for check for alignAttr and hiddenAttr in isPresentationAttribute overrides
in HTMLElement subclasses since HTMLElement::isPresentationAttribute already checks for those attributes.

  • html/HTMLDivElement.cpp:

(WebCore::HTMLDivElement::isPresentationAttribute const): Deleted.

  • html/HTMLDivElement.h:
  • html/HTMLEmbedElement.cpp:

(WebCore::HTMLEmbedElement::isPresentationAttribute const): Deleted.

  • html/HTMLEmbedElement.h:
  • html/HTMLHRElement.cpp:

(WebCore::HTMLHRElement::isPresentationAttribute const):

  • html/HTMLIFrameElement.cpp:

(WebCore::HTMLIFrameElement::isPresentationAttribute const):

  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::isPresentationAttribute const):

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::isPresentationAttribute const):

  • html/HTMLParagraphElement.cpp:

(WebCore::HTMLParagraphElement::isPresentationAttribute const): Deleted.

  • html/HTMLParagraphElement.h:
  • html/HTMLTableCaptionElement.cpp:

(WebCore::HTMLTableCaptionElement::isPresentationAttribute const): Deleted.

  • html/HTMLTableCaptionElement.h:
  • html/HTMLTableElement.cpp:

(WebCore::HTMLTableElement::isPresentationAttribute const):

  • html/HTMLTablePartElement.cpp:

(WebCore::HTMLTablePartElement::isPresentationAttribute const):

2:31 PM Changeset in webkit [239951] by yusukesuzuki@slowstart.org
  • 13 edits
    1 add in trunk

[JSC] Do not use asArrayModes() with Structures because it discards TypedArray information
https://bugs.webkit.org/show_bug.cgi?id=193372

Reviewed by Saam Barati.

JSTests:

  • stress/typed-array-array-modes-profile.js: Added.

(foo):

Source/JavaScriptCore:

When RegisteredStructureSet is filtered with AbstractValue, we use structure, SpeculationType, and ArrayModes.
However, we use asArrayModes() function with IndexingMode to compute the ArrayModes in AbstractValue. This is
wrong since this discards TypedArray ArrayModes. As a result, if RegisteredStructureSet with TypedArrays is
filtered with ArrayModes of AbstractValue populated from TypedArrays, we filter all the structures out since
AbstractValue's ArrayModes become NonArray, which is wrong with the TypedArrays' ArrayModes. This leads to
incorrect FTL code generation with MultiGetByOffset etc. nodes because,

  1. AI think that this MultiGetByOffset never succeeds since all the values of RegisteredStructureSet are filtered out by the AbstractValue.
  2. AI says the state of MultiGetByOffset is invalid since AI think it never succeeds.
  3. So subsequent code becomes FTL crash code since AI think the execution should do OSR exit.
  4. Then, FTL emits the code for MultiGetByOffset, and emits crash after that.
  5. But in reality, the incoming value can match to the one of the RegisteredStructureSet value since (1)'s structures are incorrectly filtered by the incorrect ArrayModes.
  6. Then, the execution goes on, and falls into the FTL crash.

This patch fixes the incorrect ArrayModes calculation by the following changes

  1. Rename asArrayModes to asArrayModesIgnoringTypedArrays.
  2. Fix incorrect asArrayModesIgnoringTypedArrays use in our code. Use arrayModesFromStructure instead.
  3. Fix OSR exit code which stores incorrect ArrayModes to the profiles.
  • bytecode/ArrayProfile.cpp:

(JSC::dumpArrayModes):
(JSC::ArrayProfile::computeUpdatedPrediction):

  • bytecode/ArrayProfile.h:

(JSC::asArrayModesIgnoringTypedArrays):
(JSC::arrayModesFromStructure):
(JSC::arrayModesIncludeIgnoringTypedArrays):
(JSC::shouldUseSlowPutArrayStorage):
(JSC::shouldUseFastArrayStorage):
(JSC::shouldUseContiguous):
(JSC::shouldUseDouble):
(JSC::shouldUseInt32):
(JSC::asArrayModes): Deleted.
(JSC::arrayModeFromStructure): Deleted.
(JSC::arrayModesInclude): Deleted.

  • dfg/DFGAbstractValue.cpp:

(JSC::DFG::AbstractValue::observeTransitions):
(JSC::DFG::AbstractValue::set):
(JSC::DFG::AbstractValue::mergeOSREntryValue):
(JSC::DFG::AbstractValue::contains const):

  • dfg/DFGAbstractValue.h:

(JSC::DFG::AbstractValue::observeTransition):
(JSC::DFG::AbstractValue::validate const):
(JSC::DFG::AbstractValue::observeIndexingTypeTransition):

  • dfg/DFGArrayMode.cpp:

(JSC::DFG::ArrayMode::fromObserved):
(JSC::DFG::ArrayMode::alreadyChecked const):

  • dfg/DFGArrayMode.h:

(JSC::DFG::ArrayMode::structureWouldPassArrayModeFiltering):
(JSC::DFG::ArrayMode::arrayModesThatPassFiltering const):
(JSC::DFG::ArrayMode::arrayModesWithIndexingShape const):

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::OSRExit::executeOSRExit):
(JSC::DFG::OSRExit::compileExit):

  • dfg/DFGRegisteredStructureSet.cpp:

(JSC::DFG::RegisteredStructureSet::filterArrayModes):
(JSC::DFG::RegisteredStructureSet::arrayModesFromStructures const):

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileStub):

  • jit/JITInlines.h:

(JSC::JIT::chooseArrayMode):
(JSC::arrayProfileSaw): Deleted.

  • runtime/JSType.h:

(JSC::isTypedArrayType):

2:23 PM Changeset in webkit [239950] by Michael Catanzaro
  • 2 edits in releases/WebKitGTK/webkit-2.22/Source/WTF

Merge r239873 - WorkQueue::concurrentApply() passes a raw pointer to a temporary String to Thread::create().
https://bugs.webkit.org/show_bug.cgi?id=191350

Reviewed by Brent Fulgham.

The non COCOA version of WorkQueue::concurrentApply() creates a temporary
String for the threadName and passes the raw pointer of this String to
Thread::create(). After freeing this String, Thread::entryPoint() uses
the raw char pointer to internally initialize the thread.

The fix is to use a single literal string for all the threads' names since
they are created for a thread-pool.

  • wtf/WorkQueue.cpp:

(WTF::WorkQueue::concurrentApply):

2:23 PM Changeset in webkit [239949] by Michael Catanzaro
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.22

Merge r239642 - Parsed protocol of javascript URLs with embedded newlines and carriage returns do not match parsed protocol in Chrome and Firefox
https://bugs.webkit.org/show_bug.cgi?id=193155
<rdar://problem/40230982>

Reviewed by Chris Dumez.

Source/WebCore:

Test: fast/loader/comment-only-javascript-url.html

Make a special case for URLs beginning with 'javascript:'. We should always
treat these as JS URLs, even if the content contained within the URL
string might match other parts of the URL parsing spec.

  • html/URLUtils.h:

(WebCore::URLUtils<T>::protocol const):

LayoutTests:

  • fast/loader/comment-only-javascript-url-expected.txt: Added.
  • fast/loader/comment-only-javascript-url.html: Added.
2:19 PM Changeset in webkit [239948] by commit-queue@webkit.org
  • 49 edits in trunk

Unreviewed, rolling out r239901, r239909, r239910, r239912,
r239913, and r239914.
https://bugs.webkit.org/show_bug.cgi?id=193407

These revisions caused an internal failure (Requested by
Truitt on #webkit).

Reverted changesets:

"[Cocoa] Avoid importing directly from subumbrella frameworks"
https://bugs.webkit.org/show_bug.cgi?id=186016
https://trac.webkit.org/changeset/239901

"Tried to fix USE(APPLE_INTERNAL_SDK) builds after r239901."
https://trac.webkit.org/changeset/239909

"Tried to fix the build."
https://trac.webkit.org/changeset/239910

"Fixed iOS builds after r239910."
https://trac.webkit.org/changeset/239912

"More build fixing."
https://trac.webkit.org/changeset/239913

"Tried to fix USE(APPLE_INTERNAL_SDK) 32-bit builds."
https://trac.webkit.org/changeset/239914

2:16 PM Changeset in webkit [239947] by mark.lam@apple.com
  • 14 edits in trunk

Re-enable ability to build --cloop builds.
https://bugs.webkit.org/show_bug.cgi?id=192955
Source/JavaScriptCore:

<rdar://problem/46882363>

Reviewed by Saam barati and Keith Miller.

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Reviewed by Saam barati and Keith Miller.

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

<rdar://problem/46882363>

Reviewed by Saam barati and Keith Miller.

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

<rdar://problem/46882363>

Reviewed by Saam barati and Keith Miller.

  • Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

<rdar://problem/46882363>

Reviewed by Saam barati and Keith Miller.

  • Configurations/FeatureDefines.xcconfig:

Tools:

<rdar://problem/46882363>

Reviewed by Saam barati and Keith Miller.

The --cloop build option was being ignored this whole time since r236381.
This patch makes it possible to build CLoop builds again.

  • Scripts/build-jsc:
  • Scripts/webkitperl/FeatureList.pm:
  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2:10 PM Changeset in webkit [239946] by jer.noble@apple.com
  • 3 edits in trunk/Source/WebCore

https://bugs.webkit.org/show_bug.cgi?id=193403
<rdar://problem/46750743>

Continue fix in r239711 by using WeakPtr in SourceBufferPrivateAVFObjC.

Reviewed by Eric Carlson.

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

(WebCore::SourceBufferPrivateAVFObjC::setCDMSession):

2:02 PM Changeset in webkit [239945] by Jonathan Bedard
  • 6 edits in trunk/Tools

webkitpy: Expose device_type from host-like objects
https://bugs.webkit.org/show_bug.cgi?id=193406
<rdar://problem/47262305>

Reviewed by Lucas Forschler.

Devices should expose device_type. As a result, all host objects should
provide a device_type property, even if they do not yet define a device_type.

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

(SystemHost):
(SystemHost.device_type):

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

(MockSystemHost):
(MockSystemHost.device_type):

  • Scripts/webkitpy/port/device.py:

(Device):
(Device.device_type):

  • Scripts/webkitpy/xcode/simulated_device.py:

(SimulatedDeviceManager._find_exisiting_device_for_request):
(SimulatedDeviceManager._disambiguate_device_type):
(SimulatedDeviceManager._does_fulfill_request):
(SimulatedDeviceManager.device_count_for_type):
(SimulatedDeviceManager.initialize_devices):

  • Scripts/webkitpy/xcode/simulated_device_unittest.py:

(test_available_devices):
(test_swapping_devices):

1:56 PM Changeset in webkit [239944] by Justin Fan
  • 8 edits in trunk

[WebGPU] Map WebGPUBindGroupLayoutBindings from the BindGroupLayoutDescriptor for error checking and later referencing
https://bugs.webkit.org/show_bug.cgi?id=193405

Reviewed by Dean Jackson.

Source/WebCore:

When creating a WebGPUBindGroupLayout, cache the WebGPUBindGroupLayoutDescriptor's list of BindGroupLayoutBindings
in a HashMap, keyed by binding number, for quick reference during the WebGPUProgrammablePassEncoder::setBindGroups
implementation to follow. Also add error-checking e.g. detecting duplicate binding numbers in the same WebGPUBindGroupLayout
and non-existent binding numbers when creating the WebGPUBindGroup.

No new tests. BindGroups and BindGroupLayouts reflect the (canonical?) strategy of returning empty
objects upon creation failure and reporting errors elswhere. Since error reporting is not yet implemented,
the error checks aren't testable from LayoutTests right now. Expected behavior unchanged and covered by existing tests.

  • Modules/webgpu/WebGPUDevice.cpp:

(WebCore::WebGPUDevice::createBindGroup const):

Number of bindings must be consistent between bindings and layout bindings.
BindGroupBindings should only refer to existing BindGroupLayoutBindings.

  • platform/graphics/gpu/GPUBindGroup.h:
  • platform/graphics/gpu/GPUBindGroupLayout.h:

(WebCore::GPUBindGroupLayout::bindingsMap const): Added. Cache map of BindGroupLayoutBindings.

  • platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm: Disallow duplicate binding numbers in BindGroupLayoutBindings.

(WebCore::GPUBindGroupLayout::tryCreate):
(WebCore::GPUBindGroupLayout::GPUBindGroupLayout):

LayoutTests:

Small fixes that do not alter behavior.

  • webgpu/bind-groups.html:
  • webgpu/pipeline-layouts.html:
1:44 PM Changeset in webkit [239943] by Alan Coon
  • 1 copy in tags/Safari-606.4.5.3.1

Tag Safari-606.4.5.3.1.

1:41 PM Changeset in webkit [239942] by Alan Coon
  • 7 edits in branches/safari-606.4.5.3-branch/Source

Versioning.

1:35 PM Changeset in webkit [239941] by Ryan Haddad
  • 2 edits in branches/safari-607-branch/Tools

Cherry-pick r239939. rdar://problem/47255372

webkitpy: Support alternate simctl device list output (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=193362
<rdar://problem/47122965>

Rubber-stamped by Lucas Forschler.

  • Scripts/webkitpy/xcode/simulated_device.py: (SimulatedDeviceManager.populate_available_devices):

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

1:34 PM Changeset in webkit [239940] by mark.lam@apple.com
  • 9 edits in trunk

Fix all CLoop JSC test failures (including some LLInt bugs due to recent bytecode format change).
https://bugs.webkit.org/show_bug.cgi?id=193402
<rdar://problem/46012309>

Reviewed by Keith Miller.

JSTests:

  • stress/regexp-compile-oom.js:
  • Skip this test for !$jitTests because it is tuned for stack usage when the JIT is enabled. As a result, it will fail on cloop builds though there is no bug.

Source/JavaScriptCore:

The CLoop builds via build-jsc were previously completely disabled after our
change to enable ASM LLInt build without the JIT. As a result, JSC tests have
regressed on CLoop builds. The CLoop builds and tests will be re-enabled when
the fix for https://bugs.webkit.org/show_bug.cgi?id=192955 lands. This patch
fixes all the regressions (and some old bugs) so that the CLoop test bots won't
be red when CLoop build gets re-enabled.

In this patch, we do the following:

  1. Change CLoopStack::grow() to set the new CLoop stack top at the maximum allocated capacity (after discounting the reserved zone) as opposed to setting it only at the level that the client requested.

This fixes a small performance bug that I happened to noticed when I was
debugging a stack issue. It does not affect correctness.

  1. In LowLevelInterpreter32_64.asm:
  1. Fix loadConstantOrVariableTag() to use subi for computing the constant index because the VirtualRegister offset and FirstConstantRegisterIndex values it is operating on are both signed ints. This is just to be pedantic. The previous use of subu will still produce a correct value.
  1. Fix llintOpWithReturn() to use getu (instead of get) for reading OpIsCellWithType::type because it is of type JSType, which is a uint8_t.
  1. Fix llintOpWithMetadata() to use loadis for loading OpGetById::Metadata::modeMetadata.protoLoadMode.cachedOffset[t5] because it is of type PropertyOffset, which is a signed int.
  1. Fix commonCallOp() to use getu for loading fields argv and argc because they are of type unsigned for OpCall, OpConstruct, and OpTailCall, which are the clients of commonCallOp.
  1. Fix llintOpWithMetadata() and getClosureVar() to use loadp for loading OpGetFromScope::Metadata::operand because it is of type uintptr_t.
  1. In LowLevelInterpreter64.asm:
  1. Fix llintOpWithReturn() to use getu for reading OpIsCellWithType::type because it is of type JSType, which is a uint8_t.
  1. Fix llintOpWithMetadata() to use loadi for loading OpGetById::Metadata::modeMetadata.protoLoadMode.structure[t2] because it is of type StructureID, which is a uint32_t.

Fix llintOpWithMetadata() to use loadis for loading
OpGetById::Metadata::modeMetadata.protoLoadMode.cachedOffset[t2] because it
is of type PropertyOffset, which is a signed int.

  1. commonOp() should reload the metadataTable for op_catch because unlike for the ASM LLInt, the exception unwinding code is not able to restore "callee saved registers" for the CLoop interpreter because the CLoop uses pseudo-registers (see the CLoopRegister class).

This was the source of many exotic Cloop failures after the bytecode format
change (which introduced the metadataTable callee saved register). Hence,
we fix it by reloading metadataTable's value on re-entry via op_catch for
exception handling. We already take care of restoring it in op_ret.

  1. Fix llintOpWithMetadata() and getClosureVar() to use loadp for loading OpGetFromScope::Metadata::operand because it is of type uintptr_t.
  1. In LowLevelInterpreter.asm:

Fix metadata() to use loadi for loading metadataTable offsets because they are
of type unsigned. This was also a source of many exotic CLoop test failures.

  1. Change CLoopRegister into a class with a uintptr_t as its storage element. Previously, we were using a union to convert between various value types that we would store in this pseudo-register. This method of type conversion is undefined behavior according to the C++ spec. As a result, the C++ compiler may choose to elide some CLoop statements, thereby resulting in some exotic bugs.

We fix this by now always using accessor methods and assignment operators to
ensure that we use bitwise_cast to do the type conversions. Since bitwise_cast
uses a memcpy, this ensures that there's no undefined behavior, and that CLoop
statements won't get elided willy-nilly by the compiler.

Ditto for the CloopDobleRegisters.

Similarly, use bitwise_cast for ints2Double() and double2Ints() utility
functions.

Also use bitwise_cast (instead of reinterpret_cast) for the CLoop CAST macro.

  1. Fix cloop.rb to use the new CLoopRegister and CLoopDoubleRegister classes.

Add a clLValue accessor for offlineasm operand types to distinguish
LValue use of the operands from RValue uses.

Replace the use of clearHighWord() with simply casting to uint32_t. This is
more efficient for the C++ compiler (and help speed up debug build runs).

Also fix 32-bit arithmetic operations to only set the lower 32-bit value of
the pseudo registers. This fixes some CLoop JSC test failures.

This patch has been manually tested with the JSC tests on the following builds:
64bit X86 ASM LLLint (without JIT), 64bit and 32bit X86 CLoop, and ARMv7 Cloop.

  • interpreter/CLoopStack.cpp:

(JSC::CLoopStack::grow):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter.cpp:

(JSC::CLoopRegister::i const):
(JSC::CLoopRegister::u const):
(JSC::CLoopRegister::i32 const):
(JSC::CLoopRegister::u32 const):
(JSC::CLoopRegister::i8 const):
(JSC::CLoopRegister::u8 const):
(JSC::CLoopRegister::ip const):
(JSC::CLoopRegister::i8p const):
(JSC::CLoopRegister::vp const):
(JSC::CLoopRegister::cvp const):
(JSC::CLoopRegister::callFrame const):
(JSC::CLoopRegister::execState const):
(JSC::CLoopRegister::instruction const):
(JSC::CLoopRegister::vm const):
(JSC::CLoopRegister::cell const):
(JSC::CLoopRegister::protoCallFrame const):
(JSC::CLoopRegister::nativeFunc const):
(JSC::CLoopRegister::i64 const):
(JSC::CLoopRegister::u64 const):
(JSC::CLoopRegister::encodedJSValue const):
(JSC::CLoopRegister::opcode const):
(JSC::CLoopRegister::operator ExecState*):
(JSC::CLoopRegister::operator const Instruction*):
(JSC::CLoopRegister::operator JSCell*):
(JSC::CLoopRegister::operator ProtoCallFrame*):
(JSC::CLoopRegister::operator Register*):
(JSC::CLoopRegister::operator VM*):
(JSC::CLoopRegister::operator=):
(JSC::CLoopRegister::bitsAsDouble const):
(JSC::CLoopRegister::bitsAsInt64 const):
(JSC::CLoopDoubleRegister::operator T const):
(JSC::CLoopDoubleRegister::d const):
(JSC::CLoopDoubleRegister::bitsAsInt64 const):
(JSC::CLoopDoubleRegister::operator=):
(JSC::LLInt::ints2Double):
(JSC::LLInt::double2Ints):
(JSC::LLInt::decodeResult):
(JSC::CLoop::execute):
(JSC::LLInt::Ints2Double): Deleted.
(JSC::LLInt::Double2Ints): Deleted.
(JSC::CLoopRegister::CLoopRegister): Deleted.
(JSC::CLoopRegister::clearHighWord): Deleted.

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • offlineasm/cloop.rb:
1:32 PM Changeset in webkit [239939] by Jonathan Bedard
  • 2 edits in trunk/Tools

webkitpy: Support alternate simctl device list output (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=193362
<rdar://problem/47122965>

Rubber-stamped by Lucas Forschler.

  • Scripts/webkitpy/xcode/simulated_device.py:

(SimulatedDeviceManager.populate_available_devices):

1:27 PM Changeset in webkit [239938] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Remove unused networking entitlement from iOS WebProcess entitlements
https://bugs.webkit.org/show_bug.cgi?id=193267

Patch by Alex Christensen <achristensen@webkit.org> on 2019-01-14
Reviewed by Dean Jackson.

  • Configurations/WebContent-iOS.entitlements:

This gave access to VPN stuff. It's not needed any more.

1:17 PM Changeset in webkit [239937] by Alan Coon
  • 1 copy in branches/safari-606.4.5.3-branch

New branch.

1:13 PM Changeset in webkit [239936] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Enable MDNS ICE candidate support by default
https://bugs.webkit.org/show_bug.cgi?id=193358

Reviewed by Geoffrey Garen.

  • Shared/WebPreferences.yaml:
1:07 PM Changeset in webkit [239935] by Nikita Vasilyev
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Styles: pressing Down key on empty value field shouldn't discard completion popover
https://bugs.webkit.org/show_bug.cgi?id=193098
<rdar://problem/47016036>

Reviewed by Devin Rousso.

Hide CompletionSuggestionsView when SpreadsheetTextField moves, e.g. by scrolling or resizing the sidebar.
Update CompletionSuggestionsView position after pressing Up or Down key, because SpreadsheetTextField may
move from wrapping text.

  • UserInterface/Views/CompletionSuggestionsView.js:

(WI.CompletionSuggestionsView.prototype.hide):
(WI.CompletionSuggestionsView.prototype.show):
(WI.CompletionSuggestionsView.prototype.showUntilAnchorMoves): Removed.
(WI.CompletionSuggestionsView.prototype.hideWhenElementMoves): Added.
(WI.CompletionSuggestionsView.prototype._stopMoveTimer): Added.
(WI.CompletionSuggestionsView):

  • UserInterface/Views/SpreadsheetTextField.js:

(WI.SpreadsheetTextField.prototype.set suggestionHint):
(WI.SpreadsheetTextField.prototype.completionSuggestionsSelectedCompletion):
(WI.SpreadsheetTextField.prototype._handleKeyDownForSuggestionView):
(WI.SpreadsheetTextField.prototype._updateCompletions):
(WI.SpreadsheetTextField.prototype._showSuggestionsView): Added.

(WI.SpreadsheetTextField.prototype._reAttachSuggestionHint):
Drive-by: abstract out repeating code into a private method.

1:01 PM Changeset in webkit [239934] by mrajca@apple.com
  • 3 edits in trunk/Source/WebKit

Expose preference for site-specific quirks on iOS
https://bugs.webkit.org/show_bug.cgi?id=193353

Reviewed by Dean Jackson.

  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _setNeedsSiteSpecificQuirks:]):
(-[WKPreferences _needsSiteSpecificQuirks]):

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:
12:27 PM Changeset in webkit [239933] by keith_miller@apple.com
  • 22 edits
    3 copies
    5 adds in trunk/Source/JavaScriptCore

JSC should have a module loader API
https://bugs.webkit.org/show_bug.cgi?id=191121

Reviewed by Michael Saboff.

This patch adds a new delegate to JSContext that is called to fetch
any resolved module. The resolution of a module identifier is computed
as if it were a URL on the web with the caveat that it must be a file URL.

A new class JSScript has also been added that is similar to JSScriptRef.
Right now all JSScripts are copied into memory. In the future we should
mmap the provided file into memory so the OS can evict it to disk under
pressure. Additionally, the API does not make use of the code signing path
nor the bytecode caching path, which we will add in subsequent patches.

Lastly, a couple of new convenience methods have been added. C API
conversion, can now toRef a JSValue with just a vm rather than
requiring an ExecState. Secondly, there is now a call wrapper that
does not require CallData and CallType since many places don't
care about this.

  • API/APICast.h:

(toRef):

  • API/JSAPIGlobalObject.cpp: Copied from Source/JavaScriptCore/API/JSVirtualMachineInternal.h.
  • API/JSAPIGlobalObject.h: Added.

(JSC::JSAPIGlobalObject::create):
(JSC::JSAPIGlobalObject::createStructure):
(JSC::JSAPIGlobalObject::JSAPIGlobalObject):

  • API/JSAPIGlobalObject.mm: Added.

(JSC::JSAPIGlobalObject::moduleLoaderResolve):
(JSC::JSAPIGlobalObject::moduleLoaderImportModule):
(JSC::JSAPIGlobalObject::moduleLoaderFetch):
(JSC::JSAPIGlobalObject::moduleLoaderCreateImportMetaProperties):

  • API/JSAPIValueWrapper.h:

(JSC::jsAPIValueWrapper): Deleted.

  • API/JSContext.h:
  • API/JSContext.mm:

(-[JSContext moduleLoaderDelegate]):
(-[JSContext setModuleLoaderDelegate:]):

  • API/JSContextInternal.h:
  • API/JSContextPrivate.h:
  • API/JSContextRef.cpp:

(JSGlobalContextCreateInGroup):

  • API/JSScript.h: Added.
  • API/JSScript.mm: Added.

(+[JSScript scriptWithSource:inVirtualMachine:]):
(fillBufferWithContentsOfFile):
(+[JSScript scriptFromUTF8File:inVirtualMachine:withCodeSigning:andBytecodeCache:]):
(getJSScriptSourceCode):

  • API/JSScriptInternal.h: Copied from Source/JavaScriptCore/API/JSVirtualMachineInternal.h.
  • API/JSValueInternal.h:
  • API/JSVirtualMachineInternal.h:
  • API/tests/testapi.mm:

(+[JSContextFetchDelegate contextWithBlockForFetch:]):
(-[JSContextFetchDelegate context:fetchModuleForIdentifier:withResolveHandler:andRejectHandler:]):
(checkModuleCodeRan):
(checkModuleWasRejected):
(testFetch):
(testFetchWithTwoCycle):
(testFetchWithThreeCycle):
(testLoaderResolvesAbsoluteScriptURL):
(testLoaderRejectsNilScriptURL):
(testLoaderRejectsFailedFetch):
(testImportModuleTwice):
(+[JSContextFileLoaderDelegate newContext]):
(resolvePathToScripts):
(-[JSContextFileLoaderDelegate context:fetchModuleForIdentifier:withResolveHandler:andRejectHandler:]):
(testLoadBasicFile):
(testObjectiveCAPI):

  • API/tests/testapiScripts/basic.js: Copied from Source/JavaScriptCore/API/JSVirtualMachineInternal.h.
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • SourcesCocoa.txt:
  • config.h:
  • postprocess-headers.sh:
  • runtime/CallData.cpp:

(JSC::call):

  • runtime/CallData.h:
  • runtime/Completion.cpp:

(JSC::loadAndEvaluateModule):

  • runtime/Completion.h:
  • runtime/JSCast.h:

(JSC::jsSecureCast):

  • runtime/JSGlobalObject.cpp:

(JSC::createProxyProperty):

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

Web Inspector: Settings: group titles should vertically align with the first editor
https://bugs.webkit.org/show_bug.cgi?id=193391

Reviewed by Dean Jackson.

  • UserInterface/Views/SettingsTabContentView.css:

(.content-view.settings > .settings-view > .container):
(.content-view.settings > .settings-view > .container > .editor-group > .editor): Added.
(.content-view.settings > .settings-view > .container > .editor-group > .editor:first-child > *): Added.
(.content-view.settings > .settings-view > .container > .editor-group > .editor select):
(.content-view.settings > .settings-view > .container > .editor-group > .editor input[type="number"]):

12:09 PM Changeset in webkit [239931] by Wenson Hsieh
  • 10 edits in trunk

[iOS] Expose SPI to access the current sentence boundary and selection state
https://bugs.webkit.org/show_bug.cgi?id=193398
<rdar://problem/45893108>

Reviewed by Dean Jackson.

Source/WebKit:

Expose SPI on WKWebView for internal clients to grab information about attributes at the current selection; so
far, this only includes whether the selection is a caret or a range, and whether or not the start of the
selection is at the start of a new sentence.

Test: EditorStateTests.ObserveSelectionAttributeChanges

  • Shared/EditorState.cpp:

(WebKit::EditorState::PostLayoutData::encode const):
(WebKit::EditorState::PostLayoutData::decode):

  • Shared/EditorState.h:

Add a new bit in EditorState on iOS to compute whether or not the start of the selection is at the start of a
new sentence. This is computed and set when sending post-layout data in WebPageIOS.mm.

  • UIProcess/API/Cocoa/WKWebView.mm:

(selectionAttributes):
(-[WKWebView _didChangeEditorState]):
(-[WKWebView _selectionAttributes]):

Make the new SPI property support KVO by invoking -willChangeValueForKey: and -didChangeValueForKey:
whenever the selection attributes change.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::platformEditorState const):

Tools:

Add an API test to verify that an SPI client can observe changes in the @"_selectionAttributes" key path on
WKWebView, and that inserting text, deleting, and changing the selection cause selection attributes to change as
expected.

  • TestWebKitAPI/EditingTestHarness.h:
  • TestWebKitAPI/EditingTestHarness.mm:

(-[EditingTestHarness moveBackward]):
(-[EditingTestHarness moveForward]):
(-[EditingTestHarness moveForwardAndExpectEditorStateWith:]):

Add a couple of new helper methods on EditingTestHarness.

  • TestWebKitAPI/Tests/WebKitCocoa/EditorStateTests.mm:

(-[SelectionChangeObserver initWithWebView:]):
(-[SelectionChangeObserver webView]):
(-[SelectionChangeObserver observeValueForKeyPath:ofObject:change:context:]):
(-[SelectionChangeObserver currentSelectionAttributes]):

11:21 AM Changeset in webkit [239930] by mmaxfield@apple.com
  • 55 edits
    2 copies
    1 delete in trunk/Source/WebCore

[WHLSL] Assorted cleanup
https://bugs.webkit.org/show_bug.cgi?id=193389

Reviewed by Dean Jackson.

This is a bunch of non-behavior-changing cleanup.

  • The compiler uses UniqueRef all over the place, and UniqueRef has an implicit operator T&. Therefore, we don't need to static_cast<T&> everywhere.
  • ConstantExpressionEnumerationMemberReference is the exact same thing as EnumerationMemberLiteral, so this patch deletes the longer-named class in favor of the shorter-named class.
  • Because of the header dependency tree, this patch moves EntryPointType into its own file so it can be used by files that FunctionDeclaration depends on. Same thing for AddressSpace.
  • EnumTypes have to have non-null base types. The parser will make sure this is always true.

No new tests because there is no behavior change.

  • Modules/webgpu/WHLSL/AST/WHLSLAddressSpace.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLBaseSemantic.h.
  • Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:

(WebCore::WHLSL::AST::ArrayType::type const):
(WebCore::WHLSL::AST::ArrayType::type):

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

(WebCore::WHLSL::AST::AssignmentExpression::left):
(WebCore::WHLSL::AST::AssignmentExpression::right):

  • Modules/webgpu/WHLSL/AST/WHLSLBaseSemantic.h:
  • Modules/webgpu/WHLSL/AST/WHLSLBuiltInSemantic.cpp:

(WebCore::WHLSL::AST::BuiltInSemantic::isAcceptableForShaderItemDirection const):

  • Modules/webgpu/WHLSL/AST/WHLSLBuiltInSemantic.h:
  • Modules/webgpu/WHLSL/AST/WHLSLConstantExpression.h:

(WebCore::WHLSL::AST::ConstantExpression::ConstantExpression):
(WebCore::WHLSL::AST::ConstantExpression::clone const):
(WebCore::WHLSL::AST::ConstantExpression::matches const):

  • Modules/webgpu/WHLSL/AST/WHLSLConstantExpressionEnumerationMemberReference.h: Removed.
  • Modules/webgpu/WHLSL/AST/WHLSLDereferenceExpression.h:

(WebCore::WHLSL::AST::DereferenceExpression::pointer):

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

(WebCore::WHLSL::AST::DoWhileLoop::body):
(WebCore::WHLSL::AST::DoWhileLoop::conditional):

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

(WebCore::WHLSL::AST::EffectfulExpressionStatement::effectfulExpression):

  • Modules/webgpu/WHLSL/AST/WHLSLEntryPointType.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLBaseSemantic.h.
  • Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h:

(WebCore::WHLSL::AST::EnumerationDefinition::EnumerationDefinition):
(WebCore::WHLSL::AST::EnumerationDefinition::type):

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

(WebCore::WHLSL::AST::EnumerationMemberLiteral::EnumerationMemberLiteral):
(WebCore::WHLSL::AST::EnumerationMemberLiteral::wrap):
(WebCore::WHLSL::AST::EnumerationMemberLiteral::left const):
(WebCore::WHLSL::AST::EnumerationMemberLiteral::right const):
(WebCore::WHLSL::AST::EnumerationMemberLiteral::clone const):
(WebCore::WHLSL::AST::EnumerationMemberLiteral::enumerationDefinition):
(WebCore::WHLSL::AST::EnumerationMemberLiteral::enumerationDefinition const):
(WebCore::WHLSL::AST::EnumerationMemberLiteral::enumerationMember):
(WebCore::WHLSL::AST::EnumerationMemberLiteral::enumerationMember const):
(WebCore::WHLSL::AST::EnumerationMemberLiteral::setEnumerationMember):

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

(WebCore::WHLSL::AST::Expression::type):
(WebCore::WHLSL::AST::Expression::setType):
(WebCore::WHLSL::AST::Expression::addressSpace const):
(WebCore::WHLSL::AST::Expression::setAddressSpace):

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

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

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

(WebCore::WHLSL::AST::FloatLiteralType::preferredType):

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

(WebCore::WHLSL::AST::ForLoop::condition):
(WebCore::WHLSL::AST::ForLoop::increment):
(WebCore::WHLSL::AST::ForLoop::body):

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

(WebCore::WHLSL::AST::FunctionDeclaration::type const):
(WebCore::WHLSL::AST::FunctionDeclaration::type):

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

(WebCore::WHLSL::AST::IfStatement::conditional):
(WebCore::WHLSL::AST::IfStatement::body):
(WebCore::WHLSL::AST::IfStatement::elseBody):

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

(WebCore::WHLSL::AST::IndexExpression::indexExpression):

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

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

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

(WebCore::WHLSL::AST::IntegerLiteralType::preferredType):

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

(WebCore::WHLSL::AST::LogicalExpression::left):
(WebCore::WHLSL::AST::LogicalExpression::right):

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

(WebCore::WHLSL::AST::LogicalNotExpression::operand):

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

(WebCore::WHLSL::AST::MakeArrayReferenceExpression::lValue):

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

(WebCore::WHLSL::AST::MakePointerExpression::lValue):

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

(WebCore::WHLSL::AST::PropertyAccessExpression::base):

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

(WebCore::WHLSL::AST::ReadModifyWriteExpression::lValue):
(WebCore::WHLSL::AST::ReadModifyWriteExpression::newValueExpression):
(WebCore::WHLSL::AST::ReadModifyWriteExpression::resultExpression):

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

(WebCore::WHLSL::AST::ReferenceType::elementType const):
(WebCore::WHLSL::AST::ReferenceType::elementType):

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

(WebCore::WHLSL::AST::ResolvableType::resolvedType const):
(WebCore::WHLSL::AST::ResolvableType::resolvedType):

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

(WebCore::WHLSL::AST::ResourceSemantic::isAcceptableType const):
(WebCore::WHLSL::AST::ResourceSemantic::isAcceptableForShaderItemDirection const):

  • Modules/webgpu/WHLSL/AST/WHLSLResourceSemantic.h:
  • Modules/webgpu/WHLSL/AST/WHLSLReturn.h:

(WebCore::WHLSL::AST::Return::value):

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

(WebCore::WHLSL::AST::SpecializationConstantSemantic::isAcceptableForShaderItemDirection const):

  • Modules/webgpu/WHLSL/AST/WHLSLSpecializationConstantSemantic.h:
  • Modules/webgpu/WHLSL/AST/WHLSLStageInOutSemantic.cpp:

(WebCore::WHLSL::AST::StageInOutSemantic::isAcceptableForShaderItemDirection const):

  • Modules/webgpu/WHLSL/AST/WHLSLStageInOutSemantic.h:
  • Modules/webgpu/WHLSL/AST/WHLSLStructureElement.h:

(WebCore::WHLSL::AST::StructureElement::type):

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

(WebCore::WHLSL::AST::SwitchStatement::value):

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

(WebCore::WHLSL::AST::TernaryExpression::predicate):
(WebCore::WHLSL::AST::TernaryExpression::bodyExpression):
(WebCore::WHLSL::AST::TernaryExpression::elseExpression):

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

(WebCore::WHLSL::AST::TypeDefinition::type):

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

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

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

(WebCore::WHLSL::AST::UnsignedIntegerLiteralType::preferredType):

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

(WebCore::WHLSL::AST::VariableDeclaration::type):
(WebCore::WHLSL::AST::VariableDeclaration::initializer):
(WebCore::WHLSL::AST::VariableDeclaration::isAnonymous const):

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

(WebCore::WHLSL::AST::WhileLoop::conditional):
(WebCore::WHLSL::AST::WhileLoop::body):

  • Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp:

(WebCore::WHLSL::checkDuplicateFunctions):

  • Modules/webgpu/WHLSL/WHLSLInferTypes.cpp:

(WebCore::WHLSL::commit):
(WebCore::WHLSL::inferTypesForTypeArguments):
(WebCore::WHLSL::inferTypesForCall):

  • Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:

(WebCore::WHLSL::NameResolver::visit):
(WebCore::WHLSL::resolveNamesInTypes):
(WebCore::WHLSL::resolveNamesInFunctions):

  • Modules/webgpu/WHLSL/WHLSLNameResolver.h:
  • Modules/webgpu/WHLSL/WHLSLParser.h:
  • Modules/webgpu/WHLSL/WHLSLProgram.h:

(WebCore::WHLSL::Program::append):

  • Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp:

(WebCore::WHLSL::synthesizeEnumerationFunctions):

  • Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp:

(WebCore::WHLSL::synthesizeStructureAccessors):

  • Modules/webgpu/WHLSL/WHLSLVisitor.cpp:

(WebCore::WHLSL::Visitor::visit):

  • Modules/webgpu/WHLSL/WHLSLVisitor.h:
  • WebCore.xcodeproj/project.pbxproj:
10:41 AM Changeset in webkit [239929] by dinfuehr@igalia.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix property access on ARM with the baseline JIT
https://bugs.webkit.org/show_bug.cgi?id=193393

Reviewed by Yusuke Suzuki.

Code was still using currentInstruction[4] to access the instruction's metadata.
Updated to use metadata.getPutInfo and metadata.resolveType.

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_resolve_scope):
(JSC::JIT::emit_op_get_from_scope):
(JSC::JIT::emit_op_put_to_scope):

10:00 AM Changeset in webkit [239928] by Ryan Haddad
  • 2 edits in branches/safari-607-branch/Tools

Cherry-pick r239878. rdar://problem/47255372

webkitpy: Support alternate simctl device list output
https://bugs.webkit.org/show_bug.cgi?id=193362
<rdar://problem/47122965>

Reviewed by Lucas Forschler.

  • Scripts/webkitpy/xcode/simulated_device.py: (SimulatedDeviceManager.populate_available_devices):

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

7:51 AM Changeset in webkit [239927] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

DOMCacheStorage: use-after-move in doSequentialMatch()
https://bugs.webkit.org/show_bug.cgi?id=193396

Reviewed by Youenn Fablet.

Depending on the platform- and compiler-specific calling conventions,
the doSequentialMatch() code can move out the Vector<Ref<DOMCache>>
object into the callback lambda before the DOMCache object at the
specified index is retrieved for the DOMCache::doMatch() invocation.

This problem is now avoided by retrieving reference to the target
DOMCache object in an earlier expression.

  • Modules/cache/DOMCacheStorage.cpp:

(WebCore::doSequentialMatch):

7:42 AM Changeset in webkit [239926] by Alan Bujtas
  • 6 edits
    2 adds in trunk

[LFC][BFC] Add basic box-sizing support.
https://bugs.webkit.org/show_bug.cgi?id=193392

Reviewed by Antti Koivisto.

Source/WebCore:

No min/max support yet.

Test: fast/block/block-only/box-sizing-inflow-out-of-flow-simple.html

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):

  • page/FrameViewLayoutContext.cpp:

(WebCore::layoutUsingFormattingContext):

Tools:

  • LayoutReloaded/misc/LFC-passing-tests.txt:

LayoutTests:

  • fast/block/block-only/box-sizing-inflow-out-of-flow-simple-expected.txt: Added.
  • fast/block/block-only/box-sizing-inflow-out-of-flow-simple.html: Added.
7:22 AM Changeset in webkit [239925] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[GStreamer][WebRTC] Override DeviceType() in RealtimeMediaSource implementations
https://bugs.webkit.org/show_bug.cgi?id=193397

This was necessary but wasn't done.

Patch by Thibault Saunier <tsaunier@igalia.com> on 2019-01-14
Reviewed by Philippe Normand.

No test required as this fixes a regression in all WebRTC tests when built in debug mode.

  • platform/mediastream/gstreamer/GStreamerAudioCaptureSource.h:
  • platform/mediastream/gstreamer/GStreamerVideoCaptureSource.h:
7:09 AM Changeset in webkit [239924] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

Unreviewed WPE debug build fix after r239921.

  • platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:

(webKitMediaClearKeyDecryptorDecrypt): Fix the assert that checks the
size of the mapped buffer containing IV data.

4:41 AM Changeset in webkit [239923] by zandobersek@gmail.com
  • 67 edits
    5 adds in trunk/LayoutTests

Unreviewed WPE gardening. Updating baselines for failures that in
majority of cases can be tracked down to the test fonts bump in r239436.

  • platform/wpe/animations/lineheight-animation-expected.txt:
  • platform/wpe/animations/simultaneous-start-transform-expected.txt:
  • platform/wpe/animations/width-using-ems-expected.txt:
  • platform/wpe/css1/font_properties/font-expected.txt:
  • platform/wpe/css3/unicode-bidi-isolate-basic-expected.txt:
  • platform/wpe/fast/css/line-height-determined-by-primary-font-expected.txt:
  • platform/wpe/fast/css/rtl-ordering-expected.txt:
  • platform/wpe/fast/css/text-overflow-ellipsis-bidi-expected.txt:
  • platform/wpe/fast/css/text-overflow-ellipsis-expected.txt:
  • platform/wpe/fast/css/text-overflow-ellipsis-strict-expected.txt:
  • platform/wpe/fast/css/word-space-extra-expected.txt:
  • platform/wpe/fast/dom/34176-expected.txt:
  • platform/wpe/fast/dom/52776-expected.txt:
  • platform/wpe/fast/inline/inline-box-background-expected.txt:
  • platform/wpe/fast/inline/inline-box-background-long-image-expected.txt:
  • platform/wpe/fast/inline/inline-box-background-repeat-x-expected.txt:
  • platform/wpe/fast/inline/inline-box-background-repeat-y-expected.txt:
  • platform/wpe/fast/inline/inline-content-with-float-and-margin-expected.txt: Added.
  • platform/wpe/fast/inline/simple-inline-inflow-positioned-expected.txt: Added.
  • platform/wpe/fast/inline/simple-inline-with-out-of-flow-descendant-expected.txt: Added.
  • platform/wpe/fast/inline/simple-inline-with-out-of-flow-descendant2-expected.txt: Added.
  • platform/wpe/svg/W3C-I18N/text-anchor-dirLTR-anchorEnd-expected.txt:
  • platform/wpe/svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle-expected.txt:
  • platform/wpe/svg/W3C-I18N/text-anchor-dirLTR-anchorStart-expected.txt:
  • platform/wpe/svg/W3C-I18N/text-anchor-dirNone-anchorEnd-expected.txt:
  • platform/wpe/svg/W3C-I18N/text-anchor-dirNone-anchorMiddle-expected.txt:
  • platform/wpe/svg/W3C-I18N/text-anchor-dirNone-anchorStart-expected.txt:
  • platform/wpe/svg/W3C-I18N/text-anchor-dirRTL-anchorEnd-expected.txt:
  • platform/wpe/svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle-expected.txt:
  • platform/wpe/svg/W3C-I18N/text-anchor-dirRTL-anchorStart-expected.txt:
  • platform/wpe/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd-expected.txt:
  • platform/wpe/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle-expected.txt:
  • platform/wpe/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart-expected.txt:
  • platform/wpe/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd-expected.txt:
  • platform/wpe/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle-expected.txt:
  • platform/wpe/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart-expected.txt:
  • platform/wpe/svg/W3C-I18N/text-anchor-no-markup-expected.txt:
  • platform/wpe/svg/W3C-SVG-1.1-SE/svgdom-over-01-f-expected.txt:
  • platform/wpe/svg/W3C-SVG-1.1-SE/text-intro-02-b-expected.txt:
  • platform/wpe/svg/W3C-SVG-1.1-SE/text-intro-09-b-expected.txt:
  • platform/wpe/svg/W3C-SVG-1.1/text-tselect-02-f-expected.txt:
  • platform/wpe/svg/custom/glyph-selection-bidi-mirror-expected.txt:
  • platform/wpe/svg/custom/svg-fonts-fallback-expected.txt:
  • platform/wpe/svg/hixie/perf/007-expected.txt:
  • platform/wpe/svg/text/bidi-embedded-direction-expected.txt:
  • platform/wpe/svg/text/bidi-reorder-value-lists-expected.txt: Added.
  • platform/wpe/svg/text/bidi-text-anchor-direction-expected.txt:
  • platform/wpe/svg/text/text-tselect-02-f-expected.txt:
  • platform/wpe/tables/mozilla/marvin/backgr_layers-opacity-expected.txt:
  • platform/wpe/tables/mozilla/marvin/backgr_position-table-expected.txt:
  • platform/wpe/tables/mozilla/marvin/backgr_simple-table-cell-expected.txt:
  • platform/wpe/tables/mozilla/marvin/backgr_simple-table-column-expected.txt:
  • platform/wpe/tables/mozilla/marvin/backgr_simple-table-column-group-expected.txt:
  • platform/wpe/tables/mozilla/marvin/backgr_simple-table-expected.txt:
  • platform/wpe/tables/mozilla/marvin/backgr_simple-table-row-expected.txt:
  • platform/wpe/tables/mozilla/marvin/backgr_simple-table-row-group-expected.txt:
  • platform/wpe/tables/mozilla_expected_failures/marvin/backgr_border-table-cell-expected.txt:
  • platform/wpe/tables/mozilla_expected_failures/marvin/backgr_border-table-column-expected.txt:
  • platform/wpe/tables/mozilla_expected_failures/marvin/backgr_border-table-column-group-expected.txt:
  • platform/wpe/tables/mozilla_expected_failures/marvin/backgr_border-table-expected.txt:
  • platform/wpe/tables/mozilla_expected_failures/marvin/backgr_border-table-quirks-expected.txt:
  • platform/wpe/tables/mozilla_expected_failures/marvin/backgr_border-table-row-expected.txt:
  • platform/wpe/tables/mozilla_expected_failures/marvin/backgr_border-table-row-group-expected.txt:
  • platform/wpe/tables/mozilla_expected_failures/marvin/backgr_fixed-bg-expected.txt:
  • platform/wpe/tables/mozilla_expected_failures/marvin/backgr_layers-hide-expected.txt:
  • platform/wpe/tables/mozilla_expected_failures/marvin/backgr_layers-show-expected.txt:
  • platform/wpe/tables/mozilla_expected_failures/marvin/backgr_position-table-cell-expected.txt:
  • platform/wpe/tables/mozilla_expected_failures/marvin/backgr_position-table-column-expected.txt:
  • platform/wpe/tables/mozilla_expected_failures/marvin/backgr_position-table-column-group-expected.txt:
  • platform/wpe/tables/mozilla_expected_failures/marvin/backgr_position-table-row-expected.txt:
  • platform/wpe/tables/mozilla_expected_failures/marvin/backgr_position-table-row-group-expected.txt:
4:41 AM Changeset in webkit [239922] by cturner@igalia.com
  • 2 edits in trunk/Tools

[WPE] API test gardening
https://bugs.webkit.org/show_bug.cgi?id=193319

Reviewed by Michael Catanzaro.

  • TestWebKitAPI/glib/TestExpectations.json: Remove some now

passing tests.

4:31 AM Changeset in webkit [239921] by cturner@igalia.com
  • 16 edits
    4 adds in trunk

[GStreamer] Add sharedBuffer utility to GstMappedBuffer, and a testsuite
https://bugs.webkit.org/show_bug.cgi?id=192977

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Add a utility method on GstMappedBuffer to return a SharedBuffer
view over the mapped data with no copies.

This patch also introduces a new gstreamer port API test
directory, and includes some tests for GstMappedBuffer.

New tests in the API section.

  • platform/SharedBuffer.cpp: Add a new overload for

GstMappedBuffer that allows sharing the mapped GStreamer buffers
with zero copies.
(WebCore::SharedBuffer::create):
(WebCore::SharedBuffer::SharedBuffer):
(WebCore::SharedBuffer::DataSegment::data const):
(WebCore::SharedBuffer::DataSegment::size const):

  • platform/SharedBuffer.h:
  • platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:

(webKitWebAudioSrcAllocateBuffersAndRenderAudio): Update to new
API.

  • platform/graphics/gstreamer/GStreamerCommon.cpp:

(WebCore::GstMappedBuffer::createSharedBuffer): Return a shared
buffer sharing this mapped buffer. The buffer must be shareable to
use this method.

  • platform/graphics/gstreamer/GStreamerCommon.h:

(WebCore::GstMappedBuffer::create): Make GstMappedBuffer RefCounted
(WebCore::GstMappedBuffer::~GstMappedBuffer):
(WebCore::GstMappedBuffer::data):
(WebCore::GstMappedBuffer::data const):
(WebCore::GstMappedBuffer::size const):
(WebCore::GstMappedBuffer::isSharable const): New predicate to
check whether this buffer can be shared (i.e., is not writable)
(WebCore::GstMappedBuffer::GstMappedBuffer):
(WebCore::GstMappedBuffer::operator bool const): Deleted.

  • platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:

(WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):
Update to use new API.

  • platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h:

(WebCore::InitData::InitData): Ditto.

  • platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:

(webKitMediaClearKeyDecryptorFindAndSetKey): Ditto.
(webKitMediaClearKeyDecryptorDecrypt): Ditto.

  • platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.cpp:

(WebCore::WrappedMockRealtimeAudioSource::render): Ditto.

  • platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.cpp:

(WebCore::RealtimeOutgoingAudioSourceLibWebRTC::pullAudioData): Ditto.

  • platform/mediastream/gstreamer/RealtimeOutgoingVideoSourceLibWebRTC.cpp:

(WebCore::RealtimeOutgoingVideoSourceLibWebRTC::createBlackFrame): Ditto.

  • platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:

(WebCore::GStreamerVideoEncoder::Fragmentize): Ditto.

Tools:

  • TestWebKitAPI/PlatformGTK.cmake: Build the new GStreamer test harness
  • TestWebKitAPI/PlatformWPE.cmake: Ditto.
  • TestWebKitAPI/Tests/WebCore/gstreamer/GStreamerTest.cpp: Added.

(TestWebKitAPI::GStreamerTest::SetUp):
(TestWebKitAPI::GStreamerTest::TearDown):

  • TestWebKitAPI/Tests/WebCore/gstreamer/GStreamerTest.h: Added.
  • TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: Added.

(TestWebKitAPI::TEST_F):

2:59 AM Changeset in webkit [239920] by cturner@igalia.com
  • 2 edits in trunk/Tools

[WPE] Workaround for incorrect template specialization being selected when UChar=char16_t
https://bugs.webkit.org/show_bug.cgi?id=193332

Reviewed by Michael Catanzaro.

  • TestWebKitAPI/Tests/WTF/StringConcatenate.cpp: When UChar is

defined as a char16_t, which changed in ICU 59, the
StringTypeAdapter<UnsignedInt, ...> overload catches casts to
unsigned short. This test is relying on the behaviour that
UChar=unsigned short, which doesn't hold across platforms and ICU
library versions. The full fix would be a special syntax for
literal characters so that these ambiguities do not arise. That
work is proposed in https://bugs.webkit.org/show_bug.cgi?id=193101.
(TestWebKitAPI::TEST):

2:32 AM Changeset in webkit [239919] by commit-queue@webkit.org
  • 3 edits
    11 adds in trunk

[GTK][WPE] Graphic issue with invalidations on composited layers with subpixel positions
https://bugs.webkit.org/show_bug.cgi?id=193239

Patch by Karl Leplat <karl.leplat_ext@softathome.com> on 2019-01-14
Reviewed by Žan Doberšek.

Source/WebCore:

Test: compositing/repaint/invalidations-on-composited-layers-with-subpixel-positions.html

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::updateContentBuffers): Use enclosed dirty rect values
when invalidating the CoordinatedBackingStore areas.

LayoutTests:

  • compositing/repaint/invalidations-on-composited-layers-with-subpixel-positions.html: Added.
  • platform/gtk/compositing/repaint/invalidations-on-composited-layers-with-subpixel-positions-expected.png: Added.
  • platform/gtk/compositing/repaint/invalidations-on-composited-layers-with-subpixel-positions-expected.txt: Added.
  • platform/ios/compositing/repaint/invalidations-on-composited-layers-with-subpixel-positions-expected.png: Added.
  • platform/ios/compositing/repaint/invalidations-on-composited-layers-with-subpixel-positions-expected.txt: Added.
  • platform/mac/compositing/repaint/invalidations-on-composited-layers-with-subpixel-positions-expected.png: Added.
  • platform/mac/compositing/repaint/invalidations-on-composited-layers-with-subpixel-positions-expected.txt: Added.
  • platform/wpe/compositing/repaint/invalidations-on-composited-layers-with-subpixel-positions-expected.png: Added.
  • platform/wpe/compositing/repaint/invalidations-on-composited-layers-with-subpixel-positions-expected.txt: Added.
1:29 AM Changeset in webkit [239918] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.23.3

WebKitGTK+ 2.23.3

1:28 AM Changeset in webkit [239917] by Carlos Garcia Campos
  • 4 edits in trunk

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.23.3 release

.:

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

Source/WebKit:

  • gtk/NEWS: Add release notes for 2.23.3.
12:24 AM Changeset in webkit [239916] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

Unreviewed. [GTK][WPE] Run distcheck with gtkdoc and MiniBrowser enabled

  • Scripts/make-dist:

(Distcheck.configure):

Note: See TracTimeline for information about the timeline view.