Timeline



May 30, 2019:

11:45 PM Changeset in webkit [245952] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

Unreviewed. Suppress -Wunused-variable warnings for the unused static
mousePointerID variable by making it a constexpr.

  • platform/PointerID.h:
10:55 PM Changeset in webkit [245951] by bshafiei@apple.com
  • 7 edits in tags/Safari-608.1.25.2/Source

Versioning.

10:50 PM Changeset in webkit [245950] by Simon Fraser
  • 18 edits in trunk/Source

Use an OptionSet<> for GraphicsLayerPaintingPhase
https://bugs.webkit.org/show_bug.cgi?id=198404

Reviewed by Tim Horton.

Replace GraphicsLayerPaintingPhase with OptionSet<GraphicsLayerPaintingPhase>.

No behavior change.

Source/WebCore:

  • page/PageOverlayController.cpp:

(WebCore::PageOverlayController::setPageOverlayNeedsDisplay):
(WebCore::PageOverlayController::paintContents):
(WebCore::PageOverlayController::notifyFlushRequired):

  • page/PageOverlayController.h:
  • page/linux/ResourceUsageOverlayLinux.cpp:
  • page/mac/ServicesOverlayController.h:
  • page/mac/ServicesOverlayController.mm:

(WebCore::ServicesOverlayController::Highlight::paintContents):

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::dumpProperties const):

  • platform/graphics/GraphicsLayer.h:

(WebCore::GraphicsLayer::paintingPhase const):
(WebCore::GraphicsLayer::setPaintingPhase):

  • platform/graphics/GraphicsLayerClient.h:

(WebCore::GraphicsLayerClient::paintContents):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateForegroundLayer):
(WebCore::RenderLayerBacking::updateBackgroundLayer):
(WebCore::RenderLayerBacking::updateMaskingLayer):
(WebCore::RenderLayerBacking::updateChildClippingStrategy):
(WebCore::RenderLayerBacking::updateScrollingLayers):
(WebCore::RenderLayerBacking::paintingPhaseForPrimaryLayer const):
(WebCore::RenderLayerBacking::paintIntoLayer):
(WebCore::RenderLayerBacking::paintContents):

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

(WebCore::RenderLayerCompositor::paintContents):

  • rendering/RenderLayerCompositor.h:

Source/WebKitLegacy/win:

  • WebCoreSupport/AcceleratedCompositingContext.cpp:

(AcceleratedCompositingContext::paintContents):

  • WebCoreSupport/AcceleratedCompositingContext.h:
  • WebView.cpp:

(WebView::paintContents):

  • WebView.h:
10:37 PM Changeset in webkit [245949] by bshafiei@apple.com
  • 1 copy in tags/Safari-608.1.25.2

Tag Safari-608.1.25.2.

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

Fix AVVideoCaptureSource::setFrameRateWithPreset logging
https://bugs.webkit.org/show_bug.cgi?id=198392

Reviewed by Eric Carlson.

Move logging from setFrameRateWithPreset to setSessionSizeAndFrameRate which does the actual job.
This ensures to not log in case of preset being null.
No change of behavior.

  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoCaptureSource::setFrameRateWithPreset):
(WebCore::AVVideoCaptureSource::setSessionSizeAndFrameRate):

9:46 PM Changeset in webkit [245947] by jer.noble@apple.com
  • 10 edits
    2 adds in trunk

Video playback in Safari should continue when CarPlay is plugged in
https://bugs.webkit.org/show_bug.cgi?id=198345
<rdar://problem/45505750>

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/video-isplayingtoautomotiveheadunit.html

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction const):

  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::setIsPlayingToAutomotiveHeadUnit):

  • platform/audio/PlatformMediaSessionManager.h:

(WebCore::PlatformMediaSessionManager::isPlayingToAutomotiveHeadUnit const):

  • platform/audio/ios/MediaSessionManagerIOS.h:
  • platform/audio/ios/MediaSessionManagerIOS.mm:

(WebCore::MediaSessionManageriOS::MediaSessionManageriOS):
(WebCore::MediaSessionManageriOS::carPlayServerDied):
(WebCore::MediaSessionManageriOS::updateCarPlayIsConnected):
(-[WebMediaSessionHelper initWithCallback:]):
(-[WebMediaSessionHelper startMonitoringAirPlayRoutes]):
(-[WebMediaSessionHelper interruption:]):
(-[WebMediaSessionHelper applicationWillEnterForeground:]):
(-[WebMediaSessionHelper applicationDidBecomeActive:]):
(-[WebMediaSessionHelper applicationWillResignActive:]):
(-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]):
(-[WebMediaSessionHelper applicationDidEnterBackground:]):
(-[WebMediaSessionHelper carPlayServerDied:]):
(-[WebMediaSessionHelper carPlayIsConnectedDidChange:]):

  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setIsPlayingToAutomotiveHeadUnit):

  • testing/Internals.h:
  • testing/Internals.idl:

LayoutTests:

  • media/video-isplayingtoautomotiveheadunit-expected.txt: Added.
  • media/video-isplayingtoautomotiveheadunit.html: Added.
9:46 PM Changeset in webkit [245946] by youenn@apple.com
  • 23 edits
    1 copy
    2 adds in trunk

Add an option to mute audio capture automatically when page is not visible
https://bugs.webkit.org/show_bug.cgi?id=198307

Reviewed by Eric Carlson.

Source/WebCore:

Reuse video capture mechanism for audio capture.
In case document gets in the background, interrupt the audio track if the audio factory requires it.
CoreAudioCaptureSourceIOS requires the audio source be interrupted if the app has not the right background mode.
It also allows interrupting the audio capture based on a runtime flag.

Add a runtime flag to control this.
Internals API is used to set it for test purposes, off by default.
For regular cases, the runtime flag is set through web preferences.

Test: platform/ios/mediastream/audio-muted-in-background-tab.html

  • dom/Document.cpp:

(WebCore::Document::notifyMediaCaptureOfVisibilityChanged):

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::interruptAudioOnPageVisibilityChangeEnabled const):
(WebCore::RuntimeEnabledFeatures::setInterruptAudioOnPageVisibilityChangeEnabled):

  • platform/mediastream/RealtimeMediaSourceCenter.cpp:

(WebCore::RealtimeMediaSourceCenter::RealtimeMediaSourceCenter):
(WebCore::RealtimeMediaSourceCenter::initializeShouldInterruptAudioOnPageVisibilityChange):
(WebCore::RealtimeMediaSourceCenter::setCapturePageState):
(WebCore::RealtimeMediaSourceCenter::visibilityDidChange):

  • platform/mediastream/RealtimeMediaSourceCenter.h:

(WebCore::RealtimeMediaSourceCenter::shouldInterruptAudioOnPageVisibilityChange):

  • platform/mediastream/RealtimeMediaSourceFactory.h:

(WebCore::AudioCaptureFactory::setAudioCapturePageState):
(WebCore::VideoCaptureFactory::setVideoCapturePageState):

  • platform/mediastream/ios/CoreAudioCaptureSourceIOS.h:
  • platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm:

(WebCore::CoreAudioCaptureSourceFactory::setAudioCapturePageState):
(WebCore::CoreAudioCaptureSourceFactoryIOS::shouldInterruptAudioOnPageVisibilityChange):

  • platform/mediastream/mac/CoreAudioCaptureSource.h:
  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:

(WebCore::RealtimeMediaSourceCenter::initializeShouldInterruptAudioOnPageVisibilityChange):

  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setShouldInterruptAudioOnPageVisibilityChange):

  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebKit:

Add API to set the new runtime flag.
Make source proxy factories implement this automatic muting.

  • Shared/WebPreferences.yaml:
  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _interruptAudioOnPageVisibilityChangeEnabled]):
(-[WKPreferences _setInterruptAudioOnPageVisibilityChangeEnabled:]):

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:
  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::setAudioCapturePageState):
(WebKit::UserMediaCaptureManager::setVideoCapturePageState):

  • WebProcess/cocoa/UserMediaCaptureManager.h:

LayoutTests:

  • platform/ios/mediastream/audio-muted-in-background-tab-expected.txt: Added.
  • platform/ios/mediastream/audio-muted-in-background-tab.html: Added.
9:31 PM Changeset in webkit [245945] by sbarati@apple.com
  • 19 edits
    3 copies
    9 adds in trunk

[WHLSL] Enforce variable lifetimes
https://bugs.webkit.org/show_bug.cgi?id=195794
<rdar://problem/50746293>

Reviewed by Myles C. Maxfield.

Source/WebCore:

In WHLSL, each variable has global lifetime. So returning a pointer to a
local variable is a legitimate and well specified thing to do. Each local
variable has a unique place in memory. So, for example:

`
thread int* ptr() { int local; return &local; }
thread int* ptrPtr() { return ptr(); }
`

In the above program, ptr() must always return the same value
as ptrPtr(). So, the following would print "42":
`
thread int* p = ptrPtr();
*ptr() = 42;
print(*p);
`

To implement these semantics, this patch introduces a new pass which does the
following transformations:

  • It notes every variable whose address is taken in the program.
  • Each such variable gets defined as a field in a struct.
  • Each function which is an entry point defines this struct.
  • Each non entry point takes a pointer to this struct as its final parameter.
  • Each call to a non-native function is rewritten to pass a pointer to the struct as the last call argument.
  • Each variable reference to "x", where "x" ends up in the struct, is modified to instead be "struct->x". We store to "struct->x" after declaring "x". If "x" is a function parameter, we store to "struct->x" as the first thing we do in the function body.

Tests: webgpu/whlsl-ensure-proper-variable-lifetime-2.html

webgpu/whlsl-ensure-proper-variable-lifetime-3.html
webgpu/whlsl-ensure-proper-variable-lifetime.html
webgpu/whlsl-return-local-variable.html

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

(WebCore::WHLSL::AST::Expression::Expression):
(WebCore::WHLSL::AST::Expression::isGlobalVariableReference const):
(WebCore::WHLSL::AST::Expression::origin const): Deleted.

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

(WebCore::WHLSL::AST::FunctionDeclaration::origin):

  • Modules/webgpu/WHLSL/AST/WHLSLGlobalVariableReference.h: Added.

(WebCore::WHLSL::AST::GlobalVariableReference::GlobalVariableReference):
(WebCore::WHLSL::AST::GlobalVariableReference::structField):
(WebCore::WHLSL::AST::GlobalVariableReference::base):

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

(WebCore::WHLSL::AST::Statement::Statement):
(WebCore::WHLSL::AST::Statement::isStatementList const):
(WebCore::WHLSL::AST::Statement::isWhileLoop const):

  • Modules/webgpu/WHLSL/AST/WHLSLStatementList.h: Added.

(WebCore::WHLSL::AST::StatementList::StatementList):
(WebCore::WHLSL::AST::StatementList::statements):

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

(WebCore::WHLSL::AST::Value::Value):
(WebCore::WHLSL::AST::Value::origin const):

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

(WebCore::WHLSL::AST::VariableDeclaration::VariableDeclaration):
(WebCore::WHLSL::AST::VariableDeclaration::takeInitializer):
(WebCore::WHLSL::AST::VariableDeclaration::origin const): Deleted.

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

(WebCore::WHLSL::AST::VariableReference::wrap):

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

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

  • Modules/webgpu/WHLSL/WHLSLASTDumper.cpp:

(WebCore::WHLSL::ASTDumper::visit):

  • Modules/webgpu/WHLSL/WHLSLASTDumper.h:

(WebCore::WHLSL::dumpASTNode):
(WebCore::WHLSL::dumpAST):
(WebCore::WHLSL::toString): Deleted.

  • Modules/webgpu/WHLSL/WHLSLPrepare.cpp:

(WebCore::WHLSL::prepareShared):

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

(WebCore::WHLSL::EscapedVariableCollector::takeEscapedVariables):
(WebCore::WHLSL::anonymousToken):
(WebCore::WHLSL::PreserveLifetimes::PreserveLifetimes):
(WebCore::WHLSL::PreserveLifetimes::makeStructVariableReference):
(WebCore::WHLSL::preserveVariableLifetimes):

  • Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.h: Added.
  • Modules/webgpu/WHLSL/WHLSLVisitor.cpp:

(WebCore::WHLSL::Visitor::visit):

  • Modules/webgpu/WHLSL/WHLSLVisitor.h:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:

Source/WTF:

  • wtf/PrintStream.h:

LayoutTests:

  • webgpu/whlsl-ensure-proper-variable-lifetime-2-expected.html: Added.
  • webgpu/whlsl-ensure-proper-variable-lifetime-2.html: Added.
  • webgpu/whlsl-ensure-proper-variable-lifetime-3-expected.html: Added.
  • webgpu/whlsl-ensure-proper-variable-lifetime-3.html: Added.
  • webgpu/whlsl-ensure-proper-variable-lifetime-expected.html: Added.
  • webgpu/whlsl-ensure-proper-variable-lifetime.html: Added.
  • webgpu/whlsl-return-local-variable-expected.html: Added.
  • webgpu/whlsl-return-local-variable.html: Added.
8:14 PM Changeset in webkit [245944] by Ryan Haddad
  • 10 edits
    2 deletes in trunk

Unreviewed, rolling out r245890, 245887.

Breaks internal builds.

Reverted changeset:
"Video playback in Safari should continue when CarPlay is plugged in"
https://bugs.webkit.org/show_bug.cgi?id=198345
https://trac.webkit.org/changeset/245887/webkit# Please enter the commit message for your changes. Lines starting

7:19 PM Changeset in webkit [245943] by sihui_liu@apple.com
  • 9 edits in trunk

WKWebsiteDataStore API fails to fetch web storage data for non-persistent data store
https://bugs.webkit.org/show_bug.cgi?id=198317
Source/WebKit:

<rdar://problem/51244662>

Reviewed by Alex Christensen.

Use LocalStorageNameSpace instead of SessionStorageNameSpace for localStorage in ephemeral session or
websiteDataStore.

  • NetworkProcess/WebStorage/StorageManager.cpp:

(WebKit::StorageManager::StorageArea::isEphemeral const):
(WebKit::StorageManager::StorageArea::removeListener):
(WebKit::StorageManager::StorageArea::setItems):
(WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded const):
(WebKit::StorageManager::LocalStorageNamespace::~LocalStorageNamespace):
(WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea):
(WebKit::StorageManager::LocalStorageNamespace::clearAllStorageAreas):
(WebKit::StorageManager::LocalStorageNamespace::ephemeralOrigins const):
(WebKit::StorageManager::LocalStorageNamespace::cloneTo):
(WebKit::StorageManager::StorageManager):
(WebKit::StorageManager::cloneSessionStorageNamespace):
(WebKit::StorageManager::getLocalStorageOrigins):
(WebKit::StorageManager::getLocalStorageOriginDetails):
(WebKit::StorageManager::deleteLocalStorageEntriesForOrigin):
(WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
(WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
(WebKit::StorageManager::createLocalStorageMap):
(WebKit::StorageManager::createTransientLocalStorageMap):
(WebKit::StorageManager::createSessionStorageMap):
(WebKit::StorageManager::destroyStorageMap):
(WebKit::StorageManager::getValues):
(WebKit::StorageManager::setItem):
(WebKit::StorageManager::removeItem):
(WebKit::StorageManager::clear):
(WebKit::StorageManager::suspend):
(WebKit::StorageManager::resume):
(WebKit::StorageManager::StorageArea::isSessionStorage const): Deleted.

  • NetworkProcess/WebStorage/StorageManager.h:

(): Deleted.

  • WebProcess/WebStorage/StorageAreaMap.cpp:

(WebKit::StorageAreaMap::dispatchStorageEvent):
(WebKit::StorageAreaMap::dispatchSessionStorageEvent):
(WebKit::StorageAreaMap::connect):

  • WebProcess/WebStorage/StorageNamespaceImpl.cpp:

(WebKit::StorageNamespaceImpl::createEphemeralLocalStorageNamespace):
(WebKit::StorageNamespaceImpl::createLocalStorageNamespace):

  • WebProcess/WebStorage/StorageNamespaceImpl.h:
  • WebProcess/WebStorage/WebStorageNamespaceProvider.cpp:

(WebKit::WebStorageNamespaceProvider::createLocalStorageNamespace):

Tools:

Reviewed by Alex Christensen.

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm:

(TestWebKitAPI::TEST):

7:03 PM Changeset in webkit [245942] by dino@apple.com
  • 7 edits
    2 copies
    2 moves in trunk

Media documents on iPad are too wide in split screen
https://bugs.webkit.org/show_bug.cgi?id=198405
<rdar://problem/50974548>

Reviewed by Tim Horton.

Source/WebCore:

Media documents on iPad had a minimum width of 700px. This
was fine in full-screen, but didn't work when then window
was smaller, such as split screen or a link preview.

Tests: media/modern-media-controls/media-documents/media-document-video-ipad-sizing.html

media/modern-media-controls/media-documents/media-document-video-iphone-sizing.html

  • Modules/modern-media-controls/controls/media-document.css: Add a media query to

detect small windows.

  • Modules/modern-media-controls/media/media-document-controller.js:

LayoutTests:

Make old test iPhone-specific. Add an iPad-specific test.
And mark all the expectations correctly.

  • media/modern-media-controls/media-documents/media-document-video-ipad-sizing-expected.txt: Copied from LayoutTests/media/modern-media-controls/media-documents/media-document-video-ios-sizing-expected.txt.
  • media/modern-media-controls/media-documents/media-document-video-ipad-sizing.html: Copied from LayoutTests/media/modern-media-controls/media-documents/media-document-video-ios-sizing.html.
  • media/modern-media-controls/media-documents/media-document-video-iphone-sizing-expected.txt: Renamed from LayoutTests/media/modern-media-controls/media-documents/media-document-video-ios-sizing-expected.txt.
  • media/modern-media-controls/media-documents/media-document-video-iphone-sizing.html: Renamed from LayoutTests/media/modern-media-controls/media-documents/media-document-video-ios-sizing.html.
  • platform/ios/TestExpectations:
  • platform/ipad/TestExpectations:
  • platform/mac/TestExpectations:
6:08 PM Changeset in webkit [245941] by Alan Coon
  • 1 edit in branches/safari-607-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa/BundleRetainPagePlugIn.mm

Unreviewed build fix. rdar://problem/51056572

5:46 PM Changeset in webkit [245940] by don.olmstead@sony.com
  • 5 edits in trunk

[CMake] Add WEBKIT_FRAMEWORK_TARGET macro
https://bugs.webkit.org/show_bug.cgi?id=198396

Reviewed by Konstantin Tokarev.

.:

Add a macro to help create the WebKit::targets in CMake.

  • CMakeLists.txt:
  • Source/cmake/WebKitMacros.cmake:

Source/bmalloc:

Use WEBKIT_FRAMEWORK_TARGET.

  • CMakeLists.txt:
5:33 PM Changeset in webkit [245939] by Alan Coon
  • 4 edits in branches/safari-607-branch/Source/JavaScriptCore

Cherry-pick r243237. rdar://problem/51264876

JSC test crash: stress/dont-strength-reduce-regexp-with-compile-error.js.default
https://bugs.webkit.org/show_bug.cgi?id=195906

Reviewed by Mark Lam.

The problem here as that we may successfully parsed a RegExp without running out of stack,
but later run out of stack when trying to JIT compile the same expression.

Added a check for available stack space when we call into one of the parenthesis compilation
functions that recurse. When we don't have enough stack space to recurse, we fail the JIT
compilation and let the interpreter handle the expression.

From code inspection of the YARR interpreter it has the same issue, but I couldn't cause a failure.
Filed a new bug and added a FIXME comment for the Interpreter to have similar checks.
Given that we can reproduce a failure, this is sufficient for now.

This change is covered by the previously added failing test,
JSTests/stress/dont-strength-reduce-regexp-with-compile-error.js.

  • yarr/YarrInterpreter.cpp: (JSC::Yarr::Interpreter::interpret):
  • yarr/YarrJIT.cpp: (JSC::Yarr::YarrGenerator::opCompileParenthesesSubpattern): (JSC::Yarr::YarrGenerator::opCompileParentheticalAssertion): (JSC::Yarr::YarrGenerator::opCompileBody): (JSC::Yarr::dumpCompileFailure):
  • yarr/YarrJIT.h:

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

5:33 PM Changeset in webkit [245938] by mitz@apple.com
  • 9 copies
    1 add in releases/Apple/Safari Technology Preview 83

Added a tag for Safari Technology Preview release 83.

5:33 PM Changeset in webkit [245937] by Alan Coon
  • 1 edit in branches/safari-607-branch/Source/JavaScriptCore/dfg/DFGAbstractValue.cpp

Unreviewed build fix. rdar://problem/51264850

5:33 PM Changeset in webkit [245936] by Alan Coon
  • 8 edits in branches/safari-607-branch

Apply patch. rdar://problem/51056572

5:33 PM Changeset in webkit [245935] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebKit

Apply patch. rdar://problem/51264770

5:30 PM Changeset in webkit [245934] by Alan Coon
  • 12 edits
    2 adds in branches/safari-607-branch

Apply patch. rdar://problem/50753927

Add test coverage for <rdar://problem/49731231> https://bugs.webkit.org/show_bug.cgi?id=196730 <rdar://problem/49731231>

Reviewed by Ryosuke Niwa.

Tools:

Add support for testRunner.abortModal() in macOS's WebKitTestRunner in order
to match DumpRenderTree.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::abortModal):
  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp: (WTR::TestController::runModal):
  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
  • WebKitTestRunner/gtk/TestControllerGtk.cpp: (WTR::TestController::abortModal):
  • WebKitTestRunner/ios/TestControllerIOS.mm: (WTR::TestController::abortModal):
  • WebKitTestRunner/mac/TestControllerMac.mm: (WTR::TestController::abortModal):
  • WebKitTestRunner/win/TestControllerWin.cpp: (WTR::TestController::abortModal):

LayoutTests:

  • http/tests/security/showModalDialog-sync-cross-origin-page-load-expected.txt: Added.
  • http/tests/security/showModalDialog-sync-cross-origin-page-load.html: Added.

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

5:30 PM Changeset in webkit [245933] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/JavaScriptCore

Cherry-pick r245593. rdar://problem/51264876

Unreviewed, add mistakenly ommited initializer.

  • runtime/RegExpInlines.h:

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

5:30 PM Changeset in webkit [245932] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/JavaScriptCore

Cherry-pick r245588. rdar://problem/51264876

Unreviewed build fix add UNUSED_PARAM.

  • runtime/RegExpInlines.h: (JSC::PatternContextBufferHolder::PatternContextBufferHolder):

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

5:30 PM Changeset in webkit [245931] by Alan Coon
  • 3 edits in branches/safari-607-branch/Source/WebKit

Apply patch. rdar://problem/51264847

5:30 PM Changeset in webkit [245930] by Alan Coon
  • 3 edits in branches/safari-607-branch/Source/WebKit

Apply patch. rdar://problem/50857668

5:30 PM Changeset in webkit [245929] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebCore

Apply patch. rdar://problem/50801017

5:30 PM Changeset in webkit [245928] by Alan Coon
  • 3 edits
    1 add in branches/safari-607-branch

Cherry-pick r245815. rdar://problem/51264876

[YARR] Properly handle RegExp's that require large ParenContext space
https://bugs.webkit.org/show_bug.cgi?id=198065

Reviewed by Keith Miller.

JSTests:

New test.

  • stress/regexp-large-paren-context.js: Added. (testLargeRegExp):

Source/JavaScriptCore:

Changed what happens when we exceed VM::patternContextBufferSize when compiling a RegExp
that needs ParenCOntextSpace to fail the RegExp JIT compilation and fall back to the YARR
interpreter. This can save large amounts of JIT memory for a
JIT'ed function that cannot ever succeed.

  • yarr/YarrJIT.cpp: (JSC::Yarr::YarrGenerator::initParenContextFreeList): (JSC::Yarr::YarrGenerator::compile):

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

5:30 PM Changeset in webkit [245927] by Alan Coon
  • 3 edits
    2 adds in branches/safari-607-branch

Cherry-pick r245664. rdar://problem/51264774

Subselectors not searched when determining property whitelist for selector
https://bugs.webkit.org/show_bug.cgi?id=198147
<rdar://problem/50405208>

Reviewed by Zalan Bujtas.

Source/WebCore:

This can cause marker elements get style they shouldn't.

Test: fast/lists/marker-style-subselector-whitelist.html

  • css/RuleSet.cpp: (WebCore::determinePropertyWhitelistType):

Check subselectors too.

LayoutTests:

  • fast/lists/marker-style-subselector-whitelist-expected.txt: Added.
  • fast/lists/marker-style-subselector-whitelist.html: Added.

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

5:30 PM Changeset in webkit [245926] by Alan Coon
  • 7 edits
    2 adds in branches/safari-607-branch

Cherry-pick r245586. rdar://problem/51264876

Cleanup Yarr regexp code around paren contexts.
https://bugs.webkit.org/show_bug.cgi?id=198063

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/regexp-many-named-sequential-capture-groups.js: Added. (i.s):
  • stress/regexp-many-unnamed-sequential-capture-groups.js: Added.

Source/JavaScriptCore:

There are three refactoring changes around paren contexts:

  1. Make EncodedMatchResult the same type as MatchResult on X86_64 and arm64 and uint64_t elsewhere.
  2. All function pointer types for Yarr JIT generated code reserve space for paren contexts.
  3. initParenContextFreeList should bail based on VM::patternContextBufferSize as that's the buffer size anyway.
  • runtime/MatchResult.h: (JSC::MatchResult::MatchResult):
  • runtime/RegExpInlines.h: (JSC::PatternContextBufferHolder::PatternContextBufferHolder): (JSC::PatternContextBufferHolder::~PatternContextBufferHolder): (JSC::PatternContextBufferHolder::size): (JSC::RegExp::matchInline):
  • runtime/VM.h:
  • yarr/YarrJIT.cpp: (JSC::Yarr::YarrGenerator::initParenContextFreeList):
  • yarr/YarrJIT.h: (JSC::Yarr::YarrCodeBlock::execute):

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

5:30 PM Changeset in webkit [245925] by Alan Coon
  • 5 edits
    2 adds in branches/safari-607-branch

Cherry-pick r245538. rdar://problem/50753927

Fix security check in ScriptController::canAccessFromCurrentOrigin()
https://bugs.webkit.org/show_bug.cgi?id=196730
<rdar://problem/49731231>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Fix security check in ScriptController::canAccessFromCurrentOrigin() when there is no
current JS exec state. Instead of returning true unconditionally, we now fall back to
using the accessing document's origin for the security check. The new behavior is
aligned with Blink:
https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/html/html_frame_element_base.cc?rcl=d3f22423d512b45466f1694020e20da9e0c6ee6a&l=62

This fix is based on a patch from Sergei Glazunov <glazunov@google.com>.

Test: http/tests/security/showModalDialog-sync-cross-origin-page-load2.html

  • bindings/js/ScriptController.cpp: (WebCore::ScriptController::canAccessFromCurrentOrigin):
  • bindings/js/ScriptController.h:
  • html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::isURLAllowed const):

LayoutTests:

Add layout test coverage.

  • http/tests/security/showModalDialog-sync-cross-origin-page-load2-expected.txt: Added.
  • http/tests/security/showModalDialog-sync-cross-origin-page-load2.html: Added.

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

5:30 PM Changeset in webkit [245924] by Alan Coon
  • 3 edits
    2 adds in branches/safari-607-branch

Cherry-pick r245509. rdar://problem/51264845

Wait to get frame until after layout has been run
https://bugs.webkit.org/show_bug.cgi?id=197999
<rdar://problem/50800345>

Reviewed by Alex Christensen.

Source/WebCore:

The current frame can change when layout runs, so don't bother retrieving
the frame until the final layout pass is complete.

Test: fast/dom/window-inner-width-crash.html

  • page/DOMWindow.cpp: (WebCore::DOMWindow::innerHeight const): Move frame access past the layout operation. (WebCore::DOMWindow::innerWidth const): Ditto. (WebCore::DOMWindow::scrollX const): Ditto. (WebCore::DOMWindow::scrollY const): Ditto.

LayoutTests:

  • fast/dom/window-inner-width-crash-expected.txt: Added.
  • fast/dom/window-inner-width-crash.html: Added.

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

5:30 PM Changeset in webkit [245923] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebCore

Cherry-pick r245464. rdar://problem/51264866

Hardening: Prevent FrameLoader crash due to SetForScope
https://bugs.webkit.org/show_bug.cgi?id=197458
<rdar://problem/50368338>

Reviewed by Chris Dumez.

Since SetForScope takes action during a function returns, it might cause
a crash if its scope is broader than the value it is resetting.

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::loadDifferentDocumentItem):

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

5:30 PM Changeset in webkit [245922] by Alan Coon
  • 4 edits
    2 adds in branches/safari-607-branch

Cherry-pick r245361. rdar://problem/51264842

Do not create a shape object outside of the layout context
https://bugs.webkit.org/show_bug.cgi?id=197926
<rdar://problem/50627858>

Reviewed by Simon Fraser.

Source/WebCore:

ShapeOutside objects are used to compute line constrains during layout (in a strict sense, they are part of the layout context and should only be mutated during layout).
If we don't create one during layout, we probably don't need to know its geometry during paint (or any other non-layout activity) either.

Test: fast/block/float/float-with-shape-outside-crash.html

  • rendering/FloatingObjects.cpp: (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatLeft>::updateOffsetIfNeeded): (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatRight>::updateOffsetIfNeeded):
  • rendering/shapes/ShapeOutsideInfo.cpp: (WebCore::ShapeOutsideInfo::computeDeltasForContainingBlockLine):

LayoutTests:

  • fast/block/float/float-with-shape-outside-crash-expected.txt: Added.
  • fast/block/float/float-with-shape-outside-crash.html: Added.

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

5:30 PM Changeset in webkit [245921] by Alan Coon
  • 3 edits
    3 adds in branches/safari-607-branch

Cherry-pick r245300. rdar://problem/51264763

Do not try to issue repaint while the render tree is being destroyed.
https://bugs.webkit.org/show_bug.cgi?id=197461
<rdar://problem/50368992>

Reviewed by Simon Fraser.

Source/WebCore:

Test: http/tests/svg/crash-on-reload-with-filter.html

We don't need to compute repaint rects when the render tree is getting torn down. We'll issue a full repaint at some point.
Also during full render tree destruction the inline tree state is undefined. We should avoid accessing it.

  • rendering/svg/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::markAllClientLayersForInvalidation):

LayoutTests:

  • http/tests/svg/crash-on-reload-with-filter-expected.txt: Added.
  • http/tests/svg/crash-on-reload-with-filter.html: Added.
  • http/tests/svg/resources/finishTest.html: Added.

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

5:29 PM Changeset in webkit [245920] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebKit

Cherry-pick r245284. rdar://problem/51264857

Protect current WebFrame during form submission
https://bugs.webkit.org/show_bug.cgi?id=197459
<rdar://problem/50368618>

Reviewed by Alex Christensen.

The 'continueWillSubmitForm' method calls a completion handler that
might affect the state of the current frame. Ensure the frame is valid
for the scope of the function.

  • WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::continueWillSubmitForm):

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

5:29 PM Changeset in webkit [245919] by Alan Coon
  • 3 edits
    1 add in branches/safari-607-branch

Cherry-pick r245071. rdar://problem/51264850

Invalid DFG JIT genereation in high CPU usage state
https://bugs.webkit.org/show_bug.cgi?id=197453

Reviewed by Saam Barati.

JSTests:

  • stress/string-ident-use-clears-abstract-value-if-rope-string-constant-is-held.js: Added. (trigger): (main):

Source/JavaScriptCore:

We have a DFG graph like this.

a: JSConstant(rope JSString)
b: CheckStringIdent(Check:StringUse:@a)
... AI think this is unreachable ...

When executing StringUse edge filter onto @a, AbstractValue::filterValueByType clears AbstractValue and makes it None.
This is because @a constant produces SpecString (SpecStringVar | SpecStringIdent) while StringUse edge filter requires
SpecStringIdent. AbstractValue::filterValueByType has an assumption that the JS constant always produces the same
SpeculatedType. So it clears AbstractValue completely.
But this assumption is wrong. JSString can produce SpecStringIdent later if the string is resolved to AtomicStringImpl.
AI think that we always fail. But once the string is resolved to AtomicStringImpl, we pass this check. So we execute
the breakpoint emitted by DFG since DFG think this is unreachable.

In this patch, we just clear the m_value if AbstractValue type filter fails with the held constant, since the constant
may produce a narrower type which can meet the type filter later.

  • dfg/DFGAbstractValue.cpp: (JSC::DFG::AbstractValue::filterValueByType):

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

5:29 PM Changeset in webkit [245918] by Alan Coon
  • 3 edits
    6 adds in branches/safari-607-branch

Cherry-pick r245018. rdar://problem/51264878

tryCachePutByID should not crash if target offset changes
https://bugs.webkit.org/show_bug.cgi?id=197311
<rdar://problem/48033612>

Reviewed by Filip Pizlo.

JSTests:

Add a series of tests related tryCachePutByID. Two of these tests used to crash and were fixed
by this patch: cache-put-by-id-different-attributes.js and cache-put-by-id-different-offset.js

  • stress/cache-put-by-id-delete-prototype.js: Added. (A.prototype.set y): (A): (B.prototype.set y): (B): (C):
  • stress/cache-put-by-id-different-proto.js: Added. (A.prototype.set y): (A): (B1): (B2.prototype.set y): (B2): (C): (D):
  • stress/cache-put-by-id-different-attributes.js: Added. (Foo): (set x):
  • stress/cache-put-by-id-different-offset.js: Added. (Foo): (set x):
  • stress/cache-put-by-id-insert-prototype.js: Added. (A.prototype.set y): (A): (C):
  • stress/cache-put-by-id-poly-proto.js: Added. (Foo): (set _): (createBar.Bar): (createBar):

Source/JavaScriptCore:

When tryCachePutID is called with a cacheable setter, if the target object where the setter was
found is still in the prototype chain and there's no poly protos in the chain, we use
generateConditionsForPrototypePropertyHit to validate that the target object remains the same.
It checks for the absence of the property in every object in the prototype chain from the base
down to the target object and checks that the property is still present in the target object. It
also bails if there are any uncacheable objects, proxies or dictionary objects in the prototype
chain. However, it does not consider two edge cases:

  • It asserts that the property should still be at the same offset in the target object, but this assertion does not hold if the setter deletes properties of the object and causes the structure to be flattened after the deletion. Instead of asserting, we just use the updated offset.
  • It does not check whether the new slot is also a setter, which leads to a crash in case it's not.
  • jit/Repatch.cpp: (JSC::tryCachePutByID):

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

5:29 PM Changeset in webkit [245917] by Alan Coon
  • 15 edits
    1 add in branches/safari-607-branch

Cherry-pick r244950. rdar://problem/51265731

TypedArrays should not store properties that are canonical numeric indices
https://bugs.webkit.org/show_bug.cgi?id=197228
<rdar://problem/49557381>

Reviewed by Saam Barati.

JSTests:

  • stress/array-species-config-array-constructor.js: (test):
  • stress/put-direct-index-broken-2.js:
  • stress/typed-array-canonical-numeric-index-string.js: Added. (makeTest.assert): (makeTest): (const.testInvalidIndices.makeTest.set assert): (const.testInvalidIndices.makeTest): (const.makeTestValidIndex.configurable.set assert): (const.makeTestValidIndex.configurable):
  • stress/typedarray-access-monomorphic-neutered.js: (checkNoException): (testNoException): (testFTLNoException):
  • stress/typedarray-access-neutered.js: (testNoException):
  • stress/typedarray-getownproperty-not-configurable.js: (foo):
  • test262/expectations.yaml:

Source/JavaScriptCore:

According to the spec[1]:

  • TypedArrays should not perform an ordinary GetOwnProperty/SetOwnProperty if the index is a CanonicalNumericIndexString, but invalid according to IntegerIndexedElementGet and similar functions. I.e., there are a few properties that should not be set in a TypedArray, like NaN, Infinity and -0.
  • On DefineOwnProperty, the out-of-bounds check should be performed before validating the property descriptor.
  • On GetOwnProperty, the returned descriptor for numeric properties should have writable set to true.

[1]: https://www.ecma-international.org/ecma-262/9.0/index.html#sec-integer-indexed-exotic-objects-defineownproperty-p-desc

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • runtime/JSGenericTypedArrayViewInlines.h: (JSC::JSGenericTypedArrayView<Adaptor>::getOwnPropertySlot): (JSC::JSGenericTypedArrayView<Adaptor>::put): (JSC::JSGenericTypedArrayView<Adaptor>::defineOwnProperty): (JSC::JSGenericTypedArrayView<Adaptor>::getOwnPropertySlotByIndex): (JSC::JSGenericTypedArrayView<Adaptor>::putByIndex):
  • runtime/PropertyName.h: (JSC::isCanonicalNumericIndexString):

LayoutTests:

  • fast/canvas/canvas-ImageData-behaviour-expected.txt:
  • fast/canvas/canvas-ImageData-behaviour.js:

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

5:29 PM Changeset in webkit [245916] by Alan Coon
  • 31 edits
    2 adds in branches/safari-607-branch

Cherry-pick r244892. rdar://problem/50753927

Setting a frame's src to a javascript URL should not run it synchronously
https://bugs.webkit.org/show_bug.cgi?id=197466

Reviewed by Darin Adler.

Source/WebCore:

When an iframe's src attribute is set to a javascript URL, whether when parsing
or later on via JS, we now execute the URL's JavaScript asynchronously. We used
to execute it synchronously, which was a source of bugs and also did not match
other browsers.

I have verified that our new behavior is aligned with both Firefox and Chrome.

Note that for backward-compatibility and interoperability with Blink
(https://bugs.chromium.org/p/chromium/issues/detail?id=923585), the
"javascript:" URL will still run synchronously. We should consider dropping
this quirk at some point.

Test: fast/dom/frame-src-javascript-url-async.html

  • loader/NavigationScheduler.cpp: (WebCore::ScheduledLocationChange::ScheduledLocationChange): (WebCore::ScheduledLocationChange::~ScheduledLocationChange): (WebCore::NavigationScheduler::scheduleLocationChange):
  • loader/NavigationScheduler.h: (WebCore::NavigationScheduler::scheduleLocationChange):
  • loader/SubframeLoader.cpp: (WebCore::SubframeLoader::requestFrame):

LayoutTests:

  • fast/dom/frame-src-javascript-url-async-expected.txt: Added.
  • fast/dom/frame-src-javascript-url-async.html: Added. Add layout test coverage for the fact that the javascript URL is executed asynchronously whether set during parsing or later via JS. Also makes sure that executing the javascript URL asynchronously does not replace the frame's window. This test passes in both Chrome and Firefox.
  • imported/blink/fast/frames/navigation-in-pagehide.html: Re-sync this test from the Blink repository.
  • fast/dom/Element/id-in-frameset-expected.txt:
  • fast/dom/Element/id-in-frameset.html:
  • fast/dom/insertedIntoDocument-iframe-expected.txt:
  • fast/dom/javascript-url-exception-isolation-expected.txt:
  • fast/dom/javascript-url-exception-isolation.html:
  • fast/dom/no-assert-for-malformed-js-url-attribute-expected.txt:
  • fast/dom/resources/javascript-url-crash-function-iframe.html:
  • fast/frames/adopt-from-created-document.html:
  • fast/frames/out-of-document-iframe-has-child-frame.html:
  • fast/loader/javascript-url-iframe-remove-on-navigate-async-delegate.html:
  • fast/loader/javascript-url-iframe-remove-on-navigate.html:
  • fast/loader/unload-mutation-crash.html:
  • fast/parser/resources/set-parent-to-javascript-url.html:
  • fast/parser/xml-error-adopted.xml:
  • http/tests/navigation/lockedhistory-iframe-expected.txt:
  • http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-javascript-url-iframe-in-iframe-expected.txt:
  • http/tests/security/contentSecurityPolicy/javascript-url-allowed-expected.txt:
  • http/tests/security/contentSecurityPolicy/javascript-url-blocked-by-default-src-star-expected.txt:
  • http/tests/security/contentSecurityPolicy/javascript-url-blocked-expected.txt:
  • http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-sub-frame-2-level.html:
  • http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-sub-frame.html:
  • http/tests/security/javascriptURL/xss-ALLOWED-to-javascript-url-from-javscript-url.html:
  • imported/blink/loader/iframe-sync-loads-expected.txt:
  • js/dom/call-base-resolution.html:
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-javascript-url-iframe-in-iframe-expected.txt: Update / Rebaseline existing tests to reflect behavior change. I ran those tests in Firefox and Chrome to confirm that our behavior is indeed aligned.

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

5:29 PM Changeset in webkit [245915] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebKit

Cherry-pick r244781. rdar://problem/51264871

Long-standing rare crash under -[WKWebView _web_immediateActionAnimationControllerForHitTestResultInternal...]
https://bugs.webkit.org/show_bug.cgi?id=197404
<rdar://problem/24589331>

Reviewed by Wenson Hsieh.

  • UIProcess/mac/WKImmediateActionController.mm: (-[WKImmediateActionController _updateImmediateActionItem]): (-[WKImmediateActionController menuItem:previewItemAtPoint:]): (-[WKImmediateActionController menuItem:itemFrameForPoint:]): (-[WKImmediateActionController _animationControllerForDataDetectedLink]): Add some null checks; _webHitTestResult can be null if we (somehow) get an immediate action gesture without having previously gotten a mouseDidMoveOverElement from the Web Content process. Cover all our bases.

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

5:12 PM Changeset in webkit [245914] by Devin Rousso
  • 22 edits in trunk

Web Inspector: Audit: there should be a default test for WebInspectorAudit.Resources functionality
https://bugs.webkit.org/show_bug.cgi?id=196710
<rdar://problem/49712348>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • inspector/protocol/Audit.json:

Increment Audit version.

Source/WebInspectorUI:

Previously, there was no way to return data from Audit that wasn't a DOM node, a DOM
attribute (which wasn't "shown" anywhere, as it would highlight that attribute on any
returned DOM nodes), or an error string.

In order for Audits to be more flexible with the types of things they test, there needs to
be a way for other types of data to be sent back and displayed in the Audit tab.

This patch makes it so that an Audit result can now contain other keys/values that are all
expected to be JSON serializable. It will take all of the non-"special" (e.g. "domNodes" or
"errors") keys/values and display them as object trees. This way, any JSON serializable data
can be sent with the result and be displayed in the Audit tab.

  • UserInterface/Models/AuditTestBase.js:

(WI.AuditTestBase.prototype.async setup):
(WI.AuditTestBase.prototype.clearResult):

  • UserInterface/Models/AuditTestGroup.js:

(WI.AuditTestCase.prototype.clearResult):
(WI.AuditTestCase.prototype._updateResult):

  • UserInterface/Models/AuditTestCase.js:

(WI.AuditTestCase.prototype.async run):
(WI.AuditTestCase.prototype.async run.async parseResponse):
(WI.AuditTestCase.prototype.async run.async parseResponse.checkResultProperty):
(WI.AuditTestCase.prototype.async run.async parseResponse.checkResultProperty.addErrorForValueType):
(WI.AuditTestCase.prototype.async run.async parseResponse.async resultArrayForEach):
(WI.AuditTestCase.prototype.async run.async parseResponse.inspectedPage_stringify): Added.
Rename ResultCleared to ResultChanged so that it can (semantically) be used whenever a
new result is set in addition to when an existing one is cleared. This is needed so that
AuditTestCaseContentView will refresh each time the result changes, instead of only in the
first layout() after the last result was cleared.

  • UserInterface/Models/AuditTestCaseResult.js:

(WI.AuditTestCaseResult.async fromPayload):
(WI.AuditTestCaseResult.prototype.toJSON):
Drive-by: fix the check for optional data values to still warn if the value is null.

  • UserInterface/Controllers/AuditManager.js:

(WI.AuditManager.prototype._addDefaultTests):
Add a default test "Demo Audit > Result Data > data-custom" as an example how to write an
Audit that returns custom data, as well as how that custom data is shown in the Audit tab.

  • UserInterface/Views/AuditTestContentView.js:

(WI.AuditTestContentView.prototype.shown):
(WI.AuditTestContentView.prototype.handleResultChanged): Added.

  • UserInterface/Views/AuditTestCaseContentView.js:

(WI.AuditTestCaseContentView):
(WI.AuditTestCaseContentView.prototype.layout):
(WI.AuditTestCaseContentView.prototype.handleResultChanged): Added.
Preserve the UI for each section across layout()s, so that expand/collapse states aren't
reset each time the user changes the selected Audit.

  • UserInterface/Views/AuditTestCaseContentView.css:

(.content-view.audit-test-case > section table > tr > td + td): Added.
Drive-by: ensure that the "index" table column is never larger than it needs to be.

  • UserInterface/Views/AuditTreeElement.js:

(WI.AuditTreeElement.prototype.onattach):
(WI.AuditTreeElement.prototype._handleTestResultChanged): Added.
(WI.AuditTreeElement.prototype._handleTestResultCleared): Deleted.

  • Localizations/en.lproj/localizedStrings.js:

LayoutTests:

  • inspector/audit/manager-start-setup.html:
  • inspector/audit/manager-start-setup-expected.txt:
  • inspector/model/auditTestCase-expected.txt:
  • inspector/model/auditTestCaseResult-expected.txt:
  • inspector/model/auditTestGroup-expected.txt:
  • inspector/unit-tests/object-utilities.html:
  • inspector/unit-tests/object-utilities-expected.txt:
5:08 PM Changeset in webkit [245913] by youenn@apple.com
  • 4 edits in trunk/Source/WebKit

REGRESSION (r245873) [Mac WK2] Layout Test http/wpt/service-workers/update-service-worker.https.html is a flaky crash after running new test
https://bugs.webkit.org/show_bug.cgi?id=198379
<rdar://problem/51264361>

Reviewed by Alex Christensen.

This case can happen when network process is crashing.
Given the WebSWClientConnection may be kept alive, it might reregister itself but in that case will never be unregistered.
Remove the WebSWClientConnection from the NetworkProcessConnection corresponding map on destruction time.
Covered by no longer crashing tests.

  • WebProcess/Network/NetworkProcessConnection.cpp:

(WebKit::NetworkProcessConnection::removeSWClientConnection):

  • WebProcess/Network/NetworkProcessConnection.h:
  • WebProcess/Storage/WebSWClientConnection.cpp:

(WebKit::WebSWClientConnection::~WebSWClientConnection):

5:02 PM Changeset in webkit [245912] by commit-queue@webkit.org
  • 11 edits
    4 adds in trunk

Inserting a newline in contenteditable causes two characters to be added instead of one
https://bugs.webkit.org/show_bug.cgi?id=197894
<rdar://problem/49700998>

Patch by Andres Gonzalez <Andres Gonzalez> on 2019-05-30
Reviewed by Wenson Hsieh and Chris Fleizach.

Source/WebCore:

There were two issues with inserting a newline character at the end of
a line that caused problems for accessibility:

  • the first '\n' inserted after text would result in two line breaks

inserted instead of one. createFragmentFromText in markup.cpp was
splitting the string "\n" into two empty strings and creating a <div>
and a <br> respectively. Then the emission code would emit a '\n' for
the empty div and another for the <br>.

  • the second problem is a consequence of <rdar://problem/5192593> and

the workaround is the change in editing.cpp in the function
visiblePositionForIndexUsingCharacterIterator, similar to what is done
in VisibleUnits.cpp for nextBoundary.
The rest of the changes in this patch are accessibility changes to
execute the layout tests.

Tests: accessibility/ios-simulator/set-selected-text-range-after-newline.html

accessibility/set-selected-text-range-after-newline.html

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::setSelectedTextRange):

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper stringForRange:]):
(-[WebAccessibilityObjectWrapper _accessibilitySelectedTextRange]):
(-[WebAccessibilityObjectWrapper accessibilityReplaceRange:withText:]):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

  • editing/Editing.cpp:

(WebCore::visiblePositionForIndexUsingCharacterIterator):

  • editing/markup.cpp:

(WebCore::createFragmentFromText):

Tools:

iOS implementation of several AccessibilityUIElement methods to execute
LayoutTests.

  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:

(WTR::AccessibilityUIElement::selectedTextRange):
(WTR::AccessibilityUIElement::setSelectedTextRange):
(WTR::AccessibilityUIElement::replaceTextInRange):

LayoutTests:

  • accessibility/ios-simulator/set-selected-text-range-after-newline-expected.txt: Added.
  • accessibility/ios-simulator/set-selected-text-range-after-newline.html: Added.
  • accessibility/ios-simulator/text-marker-list-item-expected.txt:
  • accessibility/set-selected-text-range-after-newline-expected.txt: Added.
  • accessibility/set-selected-text-range-after-newline.html: Added.
  • platform/win/TestExpectations:
5:00 PM Changeset in webkit [245911] by Chris Dumez
  • 4 edits in trunk/Source/WebKit

Network process crash when decoding SecItemResponseData
https://bugs.webkit.org/show_bug.cgi?id=198388
<rdar://problem/50408046>

Reviewed by Alex Christensen.

  • Shared/cf/ArgumentCodersCF.cpp:

(IPC::decode):
When decoding the elements inside a CFArrayRef, if decoding was successful but
the CFTypeRef element is still null then skip it instead of trying to append it
to the array. A CFArray container is not allowed to contain null.
Some of our decoders for CFTypeRef types may not initialize the element even if
the decode() function returns true. For example, the decoders for CFArrayRef and
CFDictionaryRef return true if the encoded container was null but do not create
a container.

  • Shared/mac/SecItemResponseData.cpp:

(WebKit::SecItemResponseData::SecItemResponseData):
nit: The wrong parameter was being moved. This is more efficient.

(WebKit::SecItemResponseData::encode const):
nit: Drop unnecessary .get().

  • UIProcess/mac/SecItemShimProxy.cpp:

(WebKit::SecItemShimProxy::secItemRequest):
nit: Use nullptr instead of 0.

4:58 PM Changeset in webkit [245910] by Alan Coon
  • 15 edits
    1 add in branches/safari-607.3.1.2-branch

Cherry-pick r244950. rdar://problem/51271770

TypedArrays should not store properties that are canonical numeric indices
https://bugs.webkit.org/show_bug.cgi?id=197228
<rdar://problem/49557381>

Reviewed by Saam Barati.

JSTests:

  • stress/array-species-config-array-constructor.js: (test):
  • stress/put-direct-index-broken-2.js:
  • stress/typed-array-canonical-numeric-index-string.js: Added. (makeTest.assert): (makeTest): (const.testInvalidIndices.makeTest.set assert): (const.testInvalidIndices.makeTest): (const.makeTestValidIndex.configurable.set assert): (const.makeTestValidIndex.configurable):
  • stress/typedarray-access-monomorphic-neutered.js: (checkNoException): (testNoException): (testFTLNoException):
  • stress/typedarray-access-neutered.js: (testNoException):
  • stress/typedarray-getownproperty-not-configurable.js: (foo):
  • test262/expectations.yaml:

Source/JavaScriptCore:

According to the spec[1]:

  • TypedArrays should not perform an ordinary GetOwnProperty/SetOwnProperty if the index is a CanonicalNumericIndexString, but invalid according to IntegerIndexedElementGet and similar functions. I.e., there are a few properties that should not be set in a TypedArray, like NaN, Infinity and -0.
  • On DefineOwnProperty, the out-of-bounds check should be performed before validating the property descriptor.
  • On GetOwnProperty, the returned descriptor for numeric properties should have writable set to true.

[1]: https://www.ecma-international.org/ecma-262/9.0/index.html#sec-integer-indexed-exotic-objects-defineownproperty-p-desc

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • runtime/JSGenericTypedArrayViewInlines.h: (JSC::JSGenericTypedArrayView<Adaptor>::getOwnPropertySlot): (JSC::JSGenericTypedArrayView<Adaptor>::put): (JSC::JSGenericTypedArrayView<Adaptor>::defineOwnProperty): (JSC::JSGenericTypedArrayView<Adaptor>::getOwnPropertySlotByIndex): (JSC::JSGenericTypedArrayView<Adaptor>::putByIndex):
  • runtime/PropertyName.h: (JSC::isCanonicalNumericIndexString):

LayoutTests:

  • fast/canvas/canvas-ImageData-behaviour-expected.txt:
  • fast/canvas/canvas-ImageData-behaviour.js:

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

4:15 PM Changeset in webkit [245909] by Devin Rousso
  • 7 edits in trunk

Web Inspector: Audit: tests are unable to get the current Audit version
https://bugs.webkit.org/show_bug.cgi?id=198270

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

Expose the Audit version number through the WebInspectorObject that's injected into tests
so that they can decide at runtime whether they're supported (e.g. the unsupported result).

  • inspector/agents/InspectorAuditAgent.h:
  • inspector/agents/InspectorAuditAgent.cpp:

(Inspector::InspectorAuditAgent::populateAuditObject):

LayoutTests:

  • inspector/audit/run.html:
  • inspector/audit/run-expected.txt:
  • inspector/audit/version.html:
4:07 PM Changeset in webkit [245908] by keith_miller@apple.com
  • 10 edits
    1 copy
    1 add
    1 delete in trunk

IsoHeaps don't notice uncommitted VA becoming the first eligible.
https://bugs.webkit.org/show_bug.cgi?id=198301

Reviewed by Yusuke Suzuki.

Source/bmalloc:

IsoDirectory has a firstEligible member that is used as an
optimization to help find the first fit. However if the scavenger
decommitted a page before firstEligible then we wouldn't move
firstEligible. Thus, if no space is ever freed below firstEligible
we will never reused the decommitted memory (e.g. if the VA page
is decommitted). The fix is to make IsoDirectory::didDecommit move
the firstEligible page back if the decommitted page is smaller
than the current firstEligible. As such, this patch renames
firstEligible to firstEligibleOrDecommitted.

Also, this patch changes gigacageEnabledForProcess to check if the
process starts with Test rather than just test as TestWTF does.

Lastly, unbeknownst to me IsoHeaps are dependent on gigacage, so
by removing gigacage from arm64 I accidentally disabled
IsoHeaps...

  • bmalloc.xcodeproj/project.pbxproj:
  • bmalloc/IsoDirectory.h:
  • bmalloc/IsoDirectoryInlines.h:

(bmalloc::passedNumPages>::takeFirstEligible):
(bmalloc::passedNumPages>::didBecome):
(bmalloc::passedNumPages>::didDecommit):

  • bmalloc/IsoHeapImpl.h:
  • bmalloc/IsoHeapImplInlines.h:

(bmalloc::IsoHeapImpl<Config>::takeFirstEligible):
(bmalloc::IsoHeapImpl<Config>::didBecomeEligibleOrDecommited):
(bmalloc::IsoHeapImpl<Config>::didCommit):
(bmalloc::IsoHeapImpl<Config>::didBecomeEligible): Deleted.

  • bmalloc/IsoTLS.cpp:

(bmalloc::IsoTLS::determineMallocFallbackState):

  • bmalloc/ProcessCheck.mm:

(bmalloc::gigacageEnabledForProcess):

Tools:

Move testbmalloc.cpp to TestWTF so it runs in automation.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/bmalloc/IsoHeap.cpp: Renamed from Source/bmalloc/test/testbmalloc.cpp.

(TEST):

4:06 PM Changeset in webkit [245907] by Wenson Hsieh
  • 2 edits in trunk/Tools

DragAndDropTests.DataTransferExposePlainTextWithFileURLAsFile API test is failing
https://bugs.webkit.org/show_bug.cgi?id=198389
<rdar://problem/51266096>

Reviewed by Tim Horton.

This test started failing, since the fallback name for a dropped text file changed from "text.txt" to
"Document.txt" on newer iOS SDK versions. We simply fix this test by checking that the name of the file ends
with ".txt", and that the MIME type of the file is "text/plain".

  • TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:

(TestWebKitAPI::TEST):

2:40 PM Changeset in webkit [245906] by ysuzuki@apple.com
  • 42 edits
    2 adds in trunk

[JSC] Implement op_wide16 / op_wide32 and introduce 16bit version bytecode
https://bugs.webkit.org/show_bug.cgi?id=197979

Reviewed by Filip Pizlo.

JSTests:

  • stress/16bit-code.js: Added.

(shouldBe):

  • stress/32bit-code.js: Added.

(shouldBe):

Source/JavaScriptCore:

This patch introduces 16bit bytecode size. Previously, we had two versions of bytecodes, 8bit and 32bit. However,
in Gmail, we found that a lot of bytecodes get 32bit because they do not fit in 8bit. 8bit is very small and large
function easily emits a lot of 32bit bytecodes because of large VirtualRegister number etc. But they almost always
fit in 16bit. If we can have 16bit version of bytecode, we can make most of the current 32bit bytecodes 16bit and
save memory.

We rename rename op_wide to op_wide32 and introduce op_wide16. The mechanism is similar to old op_wide. When we
get op_wide16, the following bytecode data is 16bit, and we execute 16bit version of bytecode in LLInt.

We also disable this op_wide16 feature in Windows CLoop, which is used in AppleWin port. When the code size of
CLoop::execute increases, MSVC starts generating CLoop::execute function with very large stack allocation
requirement. Even before introducing this 16bit bytecode, CLoop::execute in AppleWin takes almost 100KB stack
height. After introducing this, it becomes 160KB. While the semantics of the function is correctly compiled,
such a large stack allocation is not essentially necessary, and this leads to stack overflow errors quite easily,
and tests fail with AppleWin port because it starts throwing stack overflow range error in various places.
In this patch, for now, we just disable op_wide16 feature for AppleWin so that CLoop::execute takes 100KB
stack allocation because this patch is not focusing on fixing AppleWin's CLoop issue. We introduce a new backend
type for LLInt, "C_LOOP_WIN". "C_LOOP_WIN" do not generate wide16 version of code to reduce the code size of
CLoop::execute. In the future, we should investigate whether this MSVC issue is fixed in Visual Studio 2019.
Or we should consider always enabling ASM LLInt for Windows.

This patch improves Gmail by 7MB at least.

  • CMakeLists.txt:
  • bytecode/BytecodeConventions.h:
  • bytecode/BytecodeDumper.cpp:

(JSC::BytecodeDumper<Block>::dumpBlock):

  • bytecode/BytecodeList.rb:
  • bytecode/BytecodeRewriter.h:

(JSC::BytecodeRewriter::Fragment::align):

  • bytecode/BytecodeUseDef.h:

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

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::metadataTable const):

  • bytecode/Fits.h:
  • bytecode/Instruction.h:

(JSC::Instruction::opcodeID const):
(JSC::Instruction::isWide16 const):
(JSC::Instruction::isWide32 const):
(JSC::Instruction::hasMetadata const):
(JSC::Instruction::sizeShiftAmount const):
(JSC::Instruction::size const):
(JSC::Instruction::wide16 const):
(JSC::Instruction::wide32 const):
(JSC::Instruction::isWide const): Deleted.
(JSC::Instruction::wide const): Deleted.

  • bytecode/InstructionStream.h:

(JSC::InstructionStreamWriter::write):

  • bytecode/Opcode.h:
  • bytecode/OpcodeSize.h:
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::alignWideOpcode16):
(JSC::BytecodeGenerator::alignWideOpcode32):
(JSC::BytecodeGenerator::emitGetByVal): Previously, we always emit 32bit op_get_by_val for bytecodes in for-in context because
its operand can be replaced to the other VirtualRegister later. But if we know that replacing VirtualRegister can fit in 8bit / 16bit
a-priori, we should not emit 32bit version. We expose OpXXX::checkWithoutMetadataID to check whether we could potentially compact
the bytecode for the given operands.

(JSC::BytecodeGenerator::emitYieldPoint):
(JSC::StructureForInContext::finalize):
(JSC::BytecodeGenerator::alignWideOpcode): Deleted.

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::write):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • generator/Argument.rb:
  • generator/DSL.rb:
  • generator/Metadata.rb:
  • generator/Opcode.rb: A little bit weird but checkImpl's argument must be reference. We are relying on that BoundLabel is once modified in

this check phase, and the modified BoundLabel will be used when emitting the code. If checkImpl copies the passed BoundLabel, this modification
will be discarded in this checkImpl function and make the code generation broken.

  • generator/Section.rb:
  • jit/JITExceptions.cpp:

(JSC::genericUnwind):

  • llint/LLIntData.cpp:

(JSC::LLInt::initialize):

  • llint/LLIntData.h:

(JSC::LLInt::opcodeMapWide16):
(JSC::LLInt::opcodeMapWide32):
(JSC::LLInt::getOpcodeWide16):
(JSC::LLInt::getOpcodeWide32):
(JSC::LLInt::getWide16CodePtr):
(JSC::LLInt::getWide32CodePtr):
(JSC::LLInt::opcodeMapWide): Deleted.
(JSC::LLInt::getOpcodeWide): Deleted.
(JSC::LLInt::getWideCodePtr): Deleted.

  • llint/LLIntOfflineAsmConfig.h:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LLIntSlowPaths.h:
  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter.cpp:

(JSC::CLoop::execute):

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • offlineasm/arm.rb:
  • offlineasm/arm64.rb:
  • offlineasm/asm.rb:
  • offlineasm/backends.rb:
  • offlineasm/cloop.rb:
  • offlineasm/instructions.rb:
  • offlineasm/mips.rb:
  • offlineasm/x86.rb: Load operation with sign extension should also have the extended size information. For example, loadbs should be

converted to loadbsi for 32bit sign extension (and loadbsq for 64bit sign extension). And use loadbsq / loadhsq for loading VirtualRegister
information in LowLevelInterpreter64 since they will be used for pointer arithmetic and they are using machine register width.

  • parser/ResultType.h:

(JSC::OperandTypes::OperandTypes):
(JSC::OperandTypes::first const):
(JSC::OperandTypes::second const):
(JSC::OperandTypes::bits):
(JSC::OperandTypes::fromBits):
(): Deleted.
(JSC::OperandTypes::toInt): Deleted.
(JSC::OperandTypes::fromInt): Deleted.
We reduce sizeof(OperandTypes) from unsigned to uint16_t, which guarantees that OperandTypes always fit in 16bit bytecode.

2:05 PM Changeset in webkit [245905] by Justin Fan
  • 29 edits
    2 moves in trunk

[Web GPU] Vertex Buffers/Input State API updates
https://bugs.webkit.org/show_bug.cgi?id=194258
<rdar://problem/47806127>

Reviewed by Myles C. Maxfield.

Source/WebCore:

The vertex buffer attributes model for GPURenderPipelines in the WebGPU API has been updated.
Update our implementation to match.

No new tests. Existing tests updated to match new behavior.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Modules/webgpu/GPUVertexAttributeDescriptor.idl:
  • Modules/webgpu/GPUVertexBufferDescriptor.idl: Renamed from Source/WebCore/Modules/webgpu/GPUInputStateDescriptor.idl.
  • Modules/webgpu/GPUVertexInputDescriptor.idl:
  • Modules/webgpu/WebGPURenderPipelineDescriptor.idl:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/gpu/GPURenderPipelineDescriptor.h:
  • platform/graphics/gpu/GPUVertexAttributeDescriptor.h:
  • platform/graphics/gpu/GPUVertexBufferDescriptor.h: Renamed from Source/WebCore/platform/graphics/gpu/GPUInputStateDescriptor.h.
  • platform/graphics/gpu/GPUVertexInputDescriptor.h:
  • platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:

(WebCore::trySetVertexInput): Added. Populate Metal and WHLSL pipeline descriptors with vertex attribute metadata.
(WebCore::trySetColorStates): Added. Populate Metal and WHLSL pipeline descriptors with color attachment metadata.
(WebCore::convertLayout): Moved.
(WebCore::trySetMetalFunctions): Moved.
(WebCore::trySetFunctions): Added. WHLSL compilation to Metal SL happens here, then MSL functions are set on pipeline descriptor.
(WebCore::convertRenderPipelineDescriptor): Repurposed. Convert a GPURenderPipelineDescriptor to Metal and WHLSL versions.
(WebCore::tryCreateMtlRenderPipelineState):
(WebCore::GPURenderPipeline::tryCreate):
(WebCore::trySetMetalFunctionsForPipelineDescriptor): Deleted.
(WebCore::trySetWHLSLFunctionsForPipelineDescriptor): Deleted.
(WebCore::trySetFunctionsForPipelineDescriptor): Deleted.
(WebCore::trySetInputStateForPipelineDescriptor): Deleted.
(WebCore::setColorStatesForColorAttachmentArray): Deleted.

LayoutTests:

Update WebGPU tests for the new vertex buffer attributes model.

  • webgpu/blend-triangle-strip.html:
  • webgpu/buffer-command-buffer-races.html:
  • webgpu/buffer-resource-triangles.html:
  • webgpu/depth-enabled-triangle-strip.html:
  • webgpu/draw-indexed-triangles.html:
  • webgpu/js/webgpu-functions.js:
  • webgpu/texture-triangle-strip.html:
  • webgpu/vertex-buffer-triangle-strip.html:
  • webgpu/whlsl-arbitrary-vertex-attribute-locations.html:
  • webgpu/whlsl-dereference-pointer-should-type-check.html:
  • webgpu/whlsl-dont-crash-parsing-enum.html:
  • webgpu/whlsl-dot-expressions.html:
  • webgpu/whlsl-nested-dot-expression-rvalue.html:
  • webgpu/whlsl.html:
2:00 PM Changeset in webkit [245904] by sihui_liu@apple.com
  • 8 edits
    2 adds in trunk

Stop StorageManager when network process is ready to suspend
https://bugs.webkit.org/show_bug.cgi?id=198201
<rdar://problem/49683172>

Reviewed by Youenn Fablet.

Source/WebKit:

To avoid local storage database operations that can hold lock to database files, suspend thread of
StorageManager when network process is about to suspend.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::actualPrepareToSuspend):
(WebKit::NetworkProcess::resume):

  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::~NetworkSession):

  • NetworkProcess/WebStorage/StorageManager.cpp:

(WebKit::StorageManager::suspend):
(WebKit::StorageManager::resume):

  • NetworkProcess/WebStorage/StorageManager.h:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/local-storage-process-suspends-1.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/local-storage-process-suspends-2.html: Added.
1:34 PM Changeset in webkit [245903] by Alan Coon
  • 7 edits in branches/safari-607.3.1.2-branch/Source

Versioning.

1:06 PM Changeset in webkit [245902] by Wenson Hsieh
  • 5 edits
    2 adds in trunk

Missing caret when focusing an editable field if the selection was set when WKWebView wasn't first responder
https://bugs.webkit.org/show_bug.cgi?id=198356
<rdar://problem/50798593>

Reviewed by Tim Horton.

Source/WebKit:

In this bug, the DOM selection is initially set by script in a web view that is not the first responder. Then,
either the user begins editing by tapping somewhere such that the selection does not change, or an editable
element is programmatically focused and the client allows programmatic focus to show the keyboard. This is
because the selection clipping rect used by the UI process when computing the bounds of the caret view is empty,
causing the entire caret to be clipped.

This is due to two related issues: first, no updated editor state is sent to the UI process after the element is
focused, if the selection has not also changed. This means that while the selection geometry is sent over to the
UI process, the selection clipping rect (a member of the EditorState's PostLayoutData called
"focusedElementRect") becomes stale in the UI process, since the there was no focused element when the
previously computed editor state was sent to the UI process. To fix this, we schedule a full editor state update
when an element is focused, to ensure that the selection is eventually updated in the UI process.

Secondly, even once the editor state update is sent to the UI process, we will actually avoid updating any text
selection views, since there is no change in WKSelectionDrawingInfo, which currently consists of a selection
type, and either a caret rect or a list of selection rects. However, since selection drawing is also affected by
the selection clipping rect, it seems reasonable to add the selection clipping rect to the drawing info, and
trigger a selection update if this selection clipping rect has changed.

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

(WebKit::WKSelectionDrawingInfo::WKSelectionDrawingInfo):

Add selectionClippingRect to WKSelectionDrawingInfo, and check against it when comparing two drawing infos.

(WebKit::operator==):
(WebKit::operator<<):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::elementDidFocus):

Schedule an editor state update when focusing an element. In many cases, an editor state update has already been
scheduled when focusing an element, so this becomes a no-op; however, in this scenario, it delivers updated
selection clipping rects (i.e. the focused element rect) and other updated information to the UI process.

LayoutTests:

Add a new layout test to exercise this scenario.

  • editing/selection/ios/caret-when-focusing-editable-element-with-selection-expected.txt: Added.
  • editing/selection/ios/caret-when-focusing-editable-element-with-selection.html: Added.
12:52 PM Changeset in webkit [245901] by david_quesada@apple.com
  • 7 edits in trunk

REGRESSION (r245756) [Mac] 2 TestWebKitAPI.DownloadProgress* and TestWebKitAPI._WKDownload.DownloadMonitorCancel are flaky timeouts
https://bugs.webkit.org/show_bug.cgi?id=198298
rdar://problem/51182393

Reviewed by Alexey Proskuryakov.

Source/WebKit:

When canceling a download, there has always been a race condition between:

(A) the execution of Download::didCancel() within the block passed to

-[NSURLSessionDownloadTask cancelByProducingResumeData:] within
Download::platformCancelNetworkLoad(), and

(B) the invocation of -[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]

If A happens before B, the block calls didCancel() on the download, which reports the
cancellation to the UI process and tears down the download. When B happens, WKNetworkSessionDelegate
gracefully handles the fact that the Download has been removed from the map, and nothing
else happens. Life is good.

If B happens before A, -URLSession:task:didCompleteWithError: invokes Download::didFail(),
which reports a download failure (*not* a cancellation) to the UI process and tears down
the Download and DownloadProxy. On release builds, this can leave the tests waiting for a
cancellation until they time out. When A happens, the block calls Download::didCancel().
This messages the UI process, which results in a debug assertion failure from an unhandled
message since the DownloadProxy was torn down when the failure was reported. Meanwhile,
the network process hits a debug assertion in DownloadManager::downloadFinished() when
trying to remove the Download *again*.

r245756 made the bad case (B before A) more likely by adding a delay before didCancel()
is called.

Make this race condition impossible by eliminating the didCancel() from the cancellation
block, and instead relying on -URLSession:task:didCompleteWithError: to report the
download as canceled. This also effectively coalesces calls to platformCancelNetworkLoad(),
which, if called multiple times before CFNetwork reports that the download was canceled,
could cause multiple calls to didCancel(), resulting in the same assertion failures seen
in the B-before-A case.

No new tests, as recreating this race condition in the test scenario would require
additional machinery, and is no longer even possible since we don't depend on the calling
of the cancellation handler in order to report the Download as canceled.

  • NetworkProcess/Downloads/Download.cpp:

(WebKit::Download::cancel):

  • NetworkProcess/Downloads/Download.h:

(WebKit::Download::wasCanceled const):

  • NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:

(WebKit::Download::platformCancelNetworkLoad):

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

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

Tools:

Re-enable _WKDownload.DownloadMonitorCancel, which should no longer time out with this fix.

  • TestWebKitAPI/Tests/WebKitCocoa/Download.mm:

(TestWebKitAPI::TEST):

12:41 PM Changeset in webkit [245900] by Alan Bujtas
  • 5 edits
    2 adds in trunk

[iOS] Do not linkify telephone numbers inside <a> elements.
https://bugs.webkit.org/show_bug.cgi?id=198378

Reviewed by Chris Dumez.

Source/WebCore:

Phone number linkifying mutates the DOM in a potentially unexpected way triggering different kinds of failures with JS, CSS selectors etc.
This patch tightens the linkifying rule so that content inside an <a> element won't get linkified even when the <a> has no valid href attribute.

Test: fast/dom/linkify-phone-numbers.html

  • html/parser/HTMLTreeBuilder.cpp:

(WebCore::disallowTelephoneNumberParsing):

LayoutTests:

  • fast/dom/linkify-phone-numbers-expected.html: Added.
  • fast/dom/linkify-phone-numbers.html: Added.
12:34 PM Changeset in webkit [245899] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

[iOS] UIProcess' background task expiration handler may get called after the app is foreground again
https://bugs.webkit.org/show_bug.cgi?id=198380
<rdar://problem/49762471>

Reviewed by Geoffrey Garen.

UIProcess' background task expiration handler may get called after the app is foreground again. When
this happens, we already have a foreground assertion on behalf of the WebContent process, and the view
is visible. We would send the WillSuspendImminently IPC to the WebContent process, which would freeze
its layers, even though it is visible on screen.

To address the issue, we now check if the app is visible in the expiration handler. If it is visible,
we do not notify clients of imminent suspension. Instead, we end the background task right away and
call _updateBackgroundTask asynchronously to start a new background task if necessary.

  • UIProcess/ios/ProcessAssertionIOS.mm:

(-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):

12:02 PM Changeset in webkit [245898] by Keith Rollin
  • 2 edits in trunk/Source/WTF

Fix yet more deprecated uses of -[UIApplication interfaceOrientation]
https://bugs.webkit.org/show_bug.cgi?id=198381
<rdar://problem/51265846>

Reviewed by Wenson Hsieh.

r245267, r245272, and r245874 fixed many instances of this issue; this
change fixes the issue for tvOS.

  • wtf/FeatureDefines.h:
11:43 AM Changeset in webkit [245897] by Truitt Savell
  • 4 edits in trunk/Source/WebCore

Unreviewed, rolling out r245883.

Caused 6 webgpu/ layout test failures.

Reverted changeset:

"[WHLSL] Parsing and lexing the standard library is slow"
https://bugs.webkit.org/show_bug.cgi?id=192890
https://trac.webkit.org/changeset/245883

11:39 AM Changeset in webkit [245896] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

[iOS] Third-party extensions using WKWebView are unable to render anything
https://bugs.webkit.org/show_bug.cgi?id=198359
<rdar://problem/51105015>

Reviewed by Brent Fulgham and Geoff Garen.

Third-party extensions using WKWebView are unable to render anything because we do not get notified
when the extension's visibility changes. Because we do not recognize the extension showing the
WebView to be foreground, we do not take a process assertion on behalf of the child processes and
they get suspended before they get a chance to render anything.

The root of the issue is that WebKit was relying on BKSApplicationStateMonitor.handler to get
notified when the extension's state switches between foreground and background. However, the handler
never gets called unless the extension has an appropriate entitlement.

To address the issue, we now use the same logic for extensions and we do for view services.
I have verified that the _UIViewServiceHostDidEnterBackgroundNotification / _UIViewServiceHostWillEnterForegroundNotification
notifications get sent to the extensions (even third-party). We also properly detect MobileSafari as
host application and are able to get MobileSafari's foreground state accurately.

  • UIProcess/ApplicationStateTracker.mm:
11:06 AM Changeset in webkit [245895] by Justin Michaud
  • 5 edits in trunk

oss-fuzz: jsc: Issue 15016: jsc: Abrt in JSC::Wasm::AirIRGenerator::addLocal (15016)
https://bugs.webkit.org/show_bug.cgi?id=198355

Reviewed by Saam Barati.

JSTests:

  • wasm/references/is_null.js:

Source/JavaScriptCore:

Fix missing anyref case in addLocal.

  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::addLocal):

11:05 AM Changeset in webkit [245894] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

Rare crash under WebPage::shouldIgnoreMetaViewport const when shrinking to fit content
https://bugs.webkit.org/show_bug.cgi?id=198374
<rdar://problem/51261348>

Reviewed by Tim Horton.

This is a speculative fix for the crash; what appears to be happening is that the shrink-to-fit-content timer
is somehow being scheduled after the page has already been closed. We can probably fix this by bailing when
scheduling shrink-to-fit-content if m_isClosed is true.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::scheduleShrinkToFitContent):
(WebKit::WebPage::immediatelyShrinkToFitContent):

10:19 AM Changeset in webkit [245893] by Ryan Haddad
  • 2 edits in branches/safari-607-branch/Tools

Cherry-pick r245880. rdar://problem/50625279

Build fix for branch.
<rdar://problem/50625279>

  • TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:

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

10:02 AM Changeset in webkit [245892] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Move some HistoricalVelocityData code into the cpp file
https://bugs.webkit.org/show_bug.cgi?id=198353

Reviewed by Tim Horton.

Now that we have VelocityData.cpp put the non-trivial HistoricalVelocityData::velocityForNewData()
into it. append() can become a lambda function.

  • platform/graphics/VelocityData.cpp:

(WebCore::HistoricalVelocityData::velocityForNewData):

  • platform/graphics/VelocityData.h:

(WebCore::HistoricalVelocityData::velocityForNewData): Deleted.
(WebCore::HistoricalVelocityData::append): Deleted.

9:58 AM Changeset in webkit [245891] by Truitt Savell
  • 9 edits in trunk

Unreviewed, rolling out r245881.

Broke 13 Layout tests on WK2

Reverted changeset:

"WKWebsiteDataStore API fails to fetch web storage data for
non-persistent data store"
https://bugs.webkit.org/show_bug.cgi?id=198317
https://trac.webkit.org/changeset/245881

9:55 AM Changeset in webkit [245890] by Truitt Savell
  • 2 edits in trunk/Source/WebCore

Fix the iOS build after r245887
https://bugs.webkit.org/show_bug.cgi?id=198345

Unreviewed build fix.

  • platform/audio/ios/MediaSessionManagerIOS.mm:

(WebCore::MediaSessionManageriOS::updateCarPlayIsConnected):

9:49 AM Changeset in webkit [245889] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

ASSERTION FAILED: m_scriptExecutionContext under WebCore::AudioContext::isPlayingAudioDidChange()
https://bugs.webkit.org/show_bug.cgi?id=181597
<rdar://problem/36474088>

Reviewed by Eric Carlson.

Because document() is usually null-checked before using (and we can add null-checks where missing),
there's no good reason to debug-assert that m_scriptExecutionContext is non-null before downcast<>ing
to Document*.

  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::constructCommon):
(WebCore::AudioContext::stop):
(WebCore::AudioContext::document const):
(WebCore::AudioContext::visibilityStateChanged):
(WebCore::AudioContext::willBeginPlayback):
(WebCore::AudioContext::willPausePlayback):
(WebCore::AudioContext::pageMutedStateDidChange):

9:36 AM Changeset in webkit [245888] by stephan.szabo@sony.com
  • 4 edits in trunk/JSTests

[PlayStation] Skip additional tests on PlayStation
https://bugs.webkit.org/show_bug.cgi?id=198352

Reviewed by Don Olmstead.

Skip pow test on PlayStation due to behavior difference in standard library.
Skip incremental marking test due to OOM on PlayStation systems.

  • stress/incremental-marking-should-not-dead-lock-in-new-property-transition.js:
  • stress/math-pow-with-constants.js:
  • stress/pow-with-constants.js:
9:29 AM Changeset in webkit [245887] by jer.noble@apple.com
  • 10 edits
    2 adds in trunk

Video playback in Safari should continue when CarPlay is plugged in
https://bugs.webkit.org/show_bug.cgi?id=198345
<rdar://problem/45505750>

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/video-isplayingtoautomotiveheadunit.html

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction const):

  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::setIsPlayingToAutomotiveHeadUnit):

  • platform/audio/PlatformMediaSessionManager.h:

(WebCore::PlatformMediaSessionManager::isPlayingToAutomotiveHeadUnit const):

  • platform/audio/ios/MediaSessionManagerIOS.h:
  • platform/audio/ios/MediaSessionManagerIOS.mm:

(WebCore::MediaSessionManageriOS::MediaSessionManageriOS):
(WebCore::MediaSessionManageriOS::carPlayServerDied):
(WebCore::MediaSessionManageriOS::updateCarPlayIsConnected):
(-[WebMediaSessionHelper initWithCallback:]):
(-[WebMediaSessionHelper startMonitoringAirPlayRoutes]):
(-[WebMediaSessionHelper interruption:]):
(-[WebMediaSessionHelper applicationWillEnterForeground:]):
(-[WebMediaSessionHelper applicationDidBecomeActive:]):
(-[WebMediaSessionHelper applicationWillResignActive:]):
(-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]):
(-[WebMediaSessionHelper applicationDidEnterBackground:]):
(-[WebMediaSessionHelper carPlayServerDied:]):
(-[WebMediaSessionHelper carPlayIsConnectedDidChange:]):

  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setIsPlayingToAutomotiveHeadUnit):

  • testing/Internals.h:
  • testing/Internals.idl:

LayoutTests:

  • media/video-isplayingtoautomotiveheadunit-expected.txt: Added.
  • media/video-isplayingtoautomotiveheadunit.html: Added.
9:17 AM Changeset in webkit [245886] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] Update configuration to share bots across queues
https://bugs.webkit.org/show_bug.cgi?id=198370

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/config.json: Share bots across builder and API tester queues.

Also use ews119 instead of ews120 for mac API tests, as ews120 seems to have some issues as
noted in https://bugs.webkit.org/show_bug.cgi?id=197571#c1

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

webkitpy: Switch run-webkit-tests to tailspin (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=198144
<rdar://problem/32463212>

Unreviewed infrastructure fix.

  • Scripts/webkitpy/port/darwin.py:

(DarwinPort.look_for_new_samples): Use tailspin_file_path instead of spindump_file_path.

7:52 AM Changeset in webkit [245884] by Philippe Normand
  • 2 edits in trunk/Source/WebKit

Unreviewed, WPE without a11y support build fix.

  • UIProcess/wpe/WebPageProxyWPE.cpp: Include atk headers only when enabled.

May 29, 2019:

8:41 PM Changeset in webkit [245883] by rmorisset@apple.com
  • 4 edits in trunk/Source/WebCore

[WHLSL] Parsing and lexing the standard library is slow
https://bugs.webkit.org/show_bug.cgi?id=192890
<rdar://problem/50746335>

Reviewed by Myles Maxfield.

The main idea is to avoid backtracking by instead peeking at the next token (and occasionally at the one after that).
This implies a few things:

  • We can replace the stack of tokens by a trivial ring buffer of size 2 (holding the next token and the one after, or WTF::nullopt if we are at the end of the file).
  • We now have "completeFooExpression" functions, to avoid having to reparse the prefix of some expression, if we find half-way through what it is.

I also fixed the following parser bug:

which was due to a mistake I made in the grammar

Finally I added two new macros: CONSUME_TYPE and PARSE to eliminate about 500 lines of error propagation boilerplate.

There are still lots of ways of improving the parser and lexer, such as:

  • finishing the conversion of tokens in the lexer, not bothering with allocating string views
  • make two special tokens Invalid and EOF, to remove the overhead of Optional
  • make peekTypes and consumeTypes use templates to avoid constructing a Vector and calling find on it.
  • Turn the entire lexer into a proper automata, not going through the same characters again and again (this is certainly the largest win by far)
  • Remove the last few pieces of backtracking from the parser.

The current patch is already enough to make parsing the full standard library (something like 85k lines) approximately 260ms.
This is still longer than I would like, but nowhere near the bottleneck any longer because of some other parts of the compiler.

  • Modules/webgpu/WHLSL/WHLSLLexer.h:

(WebCore::WHLSL::Lexer::Lexer):
(WebCore::WHLSL::Lexer::consumeToken):
(WebCore::WHLSL::Lexer::peek):
(WebCore::WHLSL::Lexer::peekFurther):
(WebCore::WHLSL::Lexer::state const):
(WebCore::WHLSL::Lexer::setState):
(WebCore::WHLSL::Lexer::unconsumeToken): Deleted.

  • Modules/webgpu/WHLSL/WHLSLParser.cpp:

(WebCore::WHLSL::Parser::parse):
(WebCore::WHLSL::Parser::peek):
(WebCore::WHLSL::Parser::peekTypes):
(WebCore::WHLSL::Parser::tryType):
(WebCore::WHLSL::Parser::tryTypes):
(WebCore::WHLSL::Parser::consumeTypes):
(WebCore::WHLSL::Parser::parseConstantExpression):
(WebCore::WHLSL::Parser::parseTypeArgument):
(WebCore::WHLSL::Parser::parseTypeArguments):
(WebCore::WHLSL::Parser::parseTypeSuffixAbbreviated):
(WebCore::WHLSL::Parser::parseTypeSuffixNonAbbreviated):
(WebCore::WHLSL::Parser::parseType):
(WebCore::WHLSL::Parser::parseTypeDefinition):
(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::parseComputeFunctionDeclaration):
(WebCore::WHLSL::Parser::parseVertexFragmentFunctionDeclaration):
(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::parseExpression):
(WebCore::WHLSL::Parser::parseTernaryConditional):
(WebCore::WHLSL::Parser::completeTernaryConditional):
(WebCore::WHLSL::Parser::parseAssignment):
(WebCore::WHLSL::Parser::completeAssignment):
(WebCore::WHLSL::Parser::parsePossibleTernaryConditional):
(WebCore::WHLSL::Parser::parsePossibleLogicalBinaryOperation):
(WebCore::WHLSL::Parser::completePossibleLogicalBinaryOperation):
(WebCore::WHLSL::Parser::parsePossibleRelationalBinaryOperation):
(WebCore::WHLSL::Parser::completePossibleRelationalBinaryOperation):
(WebCore::WHLSL::Parser::parsePossibleShift):
(WebCore::WHLSL::Parser::completePossibleShift):
(WebCore::WHLSL::Parser::parsePossibleAdd):
(WebCore::WHLSL::Parser::completePossibleAdd):
(WebCore::WHLSL::Parser::parsePossibleMultiply):
(WebCore::WHLSL::Parser::completePossibleMultiply):
(WebCore::WHLSL::Parser::parsePossiblePrefix):
(WebCore::WHLSL::Parser::parsePossibleSuffix):
(WebCore::WHLSL::Parser::parseCallExpression):
(WebCore::WHLSL::Parser::parseTerm):
(WebCore::WHLSL::Parser::parseAddressSpaceType): Deleted.
(WebCore::WHLSL::Parser::parseNonAddressSpaceType): Deleted.
(WebCore::WHLSL::Parser::parseEntryPointFunctionDeclaration): Deleted.
(WebCore::WHLSL::Parser::parseEffectfulPrefix): Deleted.
(WebCore::WHLSL::Parser::parseEffectfulSuffix): Deleted.

  • Modules/webgpu/WHLSL/WHLSLParser.h:

(WebCore::WHLSL::Parser::Error::dump const):

7:41 PM Changeset in webkit [245882] by Wenson Hsieh
  • 7 edits in trunk

Remove some logic to suppress the text selection assistant during drop
https://bugs.webkit.org/show_bug.cgi?id=198354

Reviewed by Tim Horton.

Source/WebKit:

This logic was originally added to hide the ranged selection after performing a drop in editable content.
However, after r245803, we (1) no longer show the keyboard and/or text selection views when dropping, and (2)
the final selection is now a caret, so it's no longer necessary to suppress the selection assistant.

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

(-[WKContentView dropInteraction:performDrop:]):
(-[WKContentView dropInteraction:concludeDrop:]):

Tools:

Adjust some API tests that currently check whether or not the selection assistant was suppressed during drop.

  • TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/cocoa/DragAndDropSimulator.h:
  • TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:

(-[DragAndDropSimulator _resetSimulatedState]):
(-[DragAndDropSimulator _webView:dataInteractionOperationWasHandled:forSession:itemProviders:]):

5:23 PM Changeset in webkit [245881] by sihui_liu@apple.com
  • 9 edits in trunk

WKWebsiteDataStore API fails to fetch web storage data for non-persistent data store
https://bugs.webkit.org/show_bug.cgi?id=198317

Reviewed by Alex Christensen.

Source/WebKit:

Use LocalStorageNameSpace instead of SessionStorageNameSpace for localStorage in ephemeral session or
websiteDataStore.

  • NetworkProcess/WebStorage/StorageManager.cpp:

(WebKit::StorageManager::StorageArea::isEphemeral const):
(WebKit::StorageManager::StorageArea::removeListener):
(WebKit::StorageManager::StorageArea::setItems):
(WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded const):
(WebKit::StorageManager::LocalStorageNamespace::~LocalStorageNamespace):
(WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea):
(WebKit::StorageManager::LocalStorageNamespace::clearAllStorageAreas):
(WebKit::StorageManager::LocalStorageNamespace::ephemeralOrigins const):
(WebKit::StorageManager::LocalStorageNamespace::cloneTo):
(WebKit::StorageManager::StorageManager):
(WebKit::StorageManager::cloneSessionStorageNamespace):
(WebKit::StorageManager::getLocalStorageOrigins):
(WebKit::StorageManager::getLocalStorageOriginDetails):
(WebKit::StorageManager::deleteLocalStorageEntriesForOrigin):
(WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
(WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
(WebKit::StorageManager::createLocalStorageMap):
(WebKit::StorageManager::createTransientLocalStorageMap):
(WebKit::StorageManager::createSessionStorageMap):
(WebKit::StorageManager::destroyStorageMap):
(WebKit::StorageManager::getValues):
(WebKit::StorageManager::setItem):
(WebKit::StorageManager::removeItem):
(WebKit::StorageManager::clear):
(WebKit::StorageManager::StorageArea::isSessionStorage const): Deleted.

  • NetworkProcess/WebStorage/StorageManager.h:

(): Deleted.

  • WebProcess/WebStorage/StorageAreaMap.cpp:

(WebKit::StorageAreaMap::dispatchStorageEvent):
(WebKit::StorageAreaMap::dispatchSessionStorageEvent):
(WebKit::StorageAreaMap::connect):

  • WebProcess/WebStorage/StorageNamespaceImpl.cpp:

(WebKit::StorageNamespaceImpl::createEphemeralLocalStorageNamespace):
(WebKit::StorageNamespaceImpl::createLocalStorageNamespace):

  • WebProcess/WebStorage/StorageNamespaceImpl.h:
  • WebProcess/WebStorage/WebStorageNamespaceProvider.cpp:

(WebKit::WebStorageNamespaceProvider::createLocalStorageNamespace):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm:

(TestWebKitAPI::TEST):

5:14 PM Changeset in webkit [245880] by achristensen@apple.com
  • 2 edits in trunk/Tools

Build fix for branch.
<rdar://problem/50625279>

  • TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:
4:53 PM Changeset in webkit [245879] by Justin Michaud
  • 2 edits in trunk/Tools

Attempt to fix JSC test timeouts after adding collectContinuously to WASM tests.
https://bugs.webkit.org/show_bug.cgi?id=198322

Rubber-stamped by Michael Saboff. Disable running the new collectContinuously tests on debug builds.
This matches what we do for other jsc tests.

  • Scripts/run-jsc-stress-tests:
4:30 PM Changeset in webkit [245878] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, update WebAuthN to "Supported In Preview"

  • features.json:
4:23 PM Changeset in webkit [245877] by commit-queue@webkit.org
  • 4 edits in trunk/LayoutTests

REGRESSION (r244182) [Mac WK2] Layout Test imported/w3c/web-platform-tests/visual-viewport/viewport-resize-event-on-load-overflowing-page.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=197286

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-05-29
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

This is a time sensitive test. It expects to receive a resize event within
two frames after the page load. Scheduling the page update through the
RenderingUpdate made updating the page for the first time happens not
immediately after the page load but after an additional frame.

So we need to wait for this additional frame before checking whether the
'resize' event was fired.

  • web-platform-tests/visual-viewport/viewport-resize-event-on-load-overflowing-page.html:

LayoutTests:

  • platform/mac-wk2/TestExpectations:
4:07 PM Changeset in webkit [245876] by ddkilzer@apple.com
  • 4 edits in trunk/Source/WTF

Clean up a few #include statements in WTF
<https://webkit.org/b/198351>

Reviewed by Alex Christensen.

  • benchmarks/HashSetDFGReplay.cpp:
  • Add missing "config.h" include.
  • wtf/ParallelJobsGeneric.cpp:
  • Replace include of ParallelJobs.h with ParallelJobsGeneric.h.
  • wtf/StackBounds.cpp:
  • Fix include ordering of StackBounds.h.
4:05 PM Changeset in webkit [245875] by don.olmstead@sony.com
  • 18 edits in trunk

Remove ENABLE definitions from WebKit config files
https://bugs.webkit.org/show_bug.cgi?id=197858

Reviewed by Simon Fraser.

.:

Add ENABLE flags into WebKitFeatures.cmake and set the values for GTK and WPE according
to what was present in the config files.

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:
  • Source/cmake/WebKitFeatures.cmake:

Source/JavaScriptCore:

Sync FeatureDefines.xcconfig.

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Sync FeatureDefines.xcconfig.

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

Remove ENABLE flags that were present in the config files. Add the ENABLE flags
to FeatureDefines.xcconfig instead.

  • Configurations/FeatureDefines.xcconfig:
  • WebKit2Prefix.h:
  • config.h:

Source/WebKitLegacy/mac:

Sync FeatureDefines.xcconfig.

  • Configurations/FeatureDefines.xcconfig:

Tools:

Sync FeatureDefines.xcconfig.

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
4:01 PM Changeset in webkit [245874] by Keith Rollin
  • 2 edits in trunk/Source/WTF

Followup to r245267 and r245272: fix even more deprecated uses of -[UIApplication interfaceOrientation]
https://bugs.webkit.org/show_bug.cgi?id=198348
<rdar://problem/51234077>

Reviewed by Wenson Hsieh.

r245267 and r245272 fixed many instances of this issue; this change
fixes the issue for watchOS.

  • wtf/FeatureDefines.h:
3:21 PM Changeset in webkit [245873] by youenn@apple.com
  • 12 edits
    2 adds in trunk

Reestablish WebSWClientConnection in case of network process crash
https://bugs.webkit.org/show_bug.cgi?id=198333

Reviewed by Alex Christensen.

Source/WebCore:

Refactor DocumentLoader to no longer take a ref to the SWClientConnection.
Instead, store the sessionID and get the SWClientConnection from it.
Remove unused code from ServiceWorkerContainer.

Test: http/wpt/service-workers/service-worker-networkprocess-crash.html

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::registerTemporaryServiceWorkerClient):
(WebCore::DocumentLoader::unregisterTemporaryServiceWorkerClient):

  • loader/DocumentLoader.h:
  • workers/service/ServiceWorkerContainer.cpp:
  • workers/service/ServiceWorkerContainer.h:
  • workers/service/ServiceWorkerJobClient.h:

Source/WebKit:

WebSWClientConnection now takes a RefPtr<IPC::Connection> so that on network process crash, it will set it back to null.
On the next call that needs the connection, WebSWClientConnection will reinitialize its underlying IPC connection and its own identifier.
Make sure that all code paths requiring this initialization are covered.

  • WebProcess/Network/NetworkProcessConnection.cpp:

(WebKit::NetworkProcessConnection::didClose):
(WebKit::NetworkProcessConnection::serviceWorkerConnectionForSession):
(WebKit::NetworkProcessConnection::isRegisteredActiveSWClientConnection):
(WebKit::NetworkProcessConnection::initializeSWClientConnection):

  • WebProcess/Network/NetworkProcessConnection.h:
  • WebProcess/Storage/WebSWClientConnection.cpp:

(WebKit::WebSWClientConnection::WebSWClientConnection):
(WebKit::WebSWClientConnection::~WebSWClientConnection):
(WebKit::WebSWClientConnection::initializeConnectionIfNeeded):
(WebKit::WebSWClientConnection::ensureConnectionAndSend):
(WebKit::WebSWClientConnection::scheduleJobInServer):
(WebKit::WebSWClientConnection::finishFetchingScriptInServer):
(WebKit::WebSWClientConnection::addServiceWorkerRegistrationInServer):
(WebKit::WebSWClientConnection::removeServiceWorkerRegistrationInServer):
(WebKit::WebSWClientConnection::registerServiceWorkerClient):
(WebKit::WebSWClientConnection::unregisterServiceWorkerClient):
(WebKit::WebSWClientConnection::didResolveRegistrationPromise):
(WebKit::WebSWClientConnection::matchRegistration):
(WebKit::WebSWClientConnection::runOrDelayTaskForImport):
(WebKit::WebSWClientConnection::whenRegistrationReady):
(WebKit::WebSWClientConnection::getRegistrations):
(WebKit::WebSWClientConnection::startFetch):
(WebKit::WebSWClientConnection::cancelFetch):
(WebKit::WebSWClientConnection::continueDidReceiveFetchResponse):
(WebKit::WebSWClientConnection::connectionToServerLost):
(WebKit::WebSWClientConnection::syncTerminateWorker):
(WebKit::WebSWClientConnection::serverConnectionIdentifier const):
(WebKit::WebSWClientConnection::updateThrottleState):

  • WebProcess/Storage/WebSWClientConnection.h:

LayoutTests:

  • http/wpt/service-workers/service-worker-networkprocess-crash-expected.txt: Added.
  • http/wpt/service-workers/service-worker-networkprocess-crash.html: Added.
3:07 PM Changeset in webkit [245872] by commit-queue@webkit.org
  • 4 edits in trunk

[iOS] WebPage::positionInformation() may set InteractionInformationAtPosition.isImage to true but leave image unset
https://bugs.webkit.org/show_bug.cgi?id=198202

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-05-29
Reviewed by Tim Horton.

Source/WebKit:

r192037 added the flags isLink and isImage to InteractionInformationAtPosition.
It also made WebPage::positionInformation() set isImage to true but before
ensuring there is a valid image at the position.

Safari WebKit additions assumes if isImage is true then the image has to
hold a valid ShareableBitmap pointer. Since WebPage::positionInformation()
is the only place that sets isImage, the fix is to set isImage to true
only after passing all the image validation checks.

Since WebPage::positionInformation() is a little bit difficult to read
(182 lines), It was re-factored by splitting it to static functions.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::focusedElementPositionInformation):
(WebKit::linkIndicatorPositionInformation):
(WebKit::dataDetectorLinkPositionInformation):
(WebKit::imagePositionInformation):
(WebKit::boundsPositionInformation):
(WebKit::elementPositionInformation):
(WebKit::selectionPositionInformation):
(WebKit::textInteractionPositionInformation):
(WebKit::WebPage::positionInformation):

Tools:

The new test ensures InteractionInformationAtPosition::isImage will not
be to true for a broken image.

  • TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm:

(TestWebKitAPI::TEST):

3:07 PM Changeset in webkit [245871] by ddkilzer@apple.com
  • 5 edits in trunk/Source

IndexedDatabase Server thread in com.apple.WebKit.Networking process leaks objects into an autoreleasePool that's never cleared
<https://webkit.org/b/198346>
<rdar://problem/50895658>

Reviewed by Brent Fulgham.

Source/WebCore:

  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::IDBServer):

  • Pass AutodrainedPoolForRunLoop::Use when creating CrossThreadTaskHandler to fix the bug.

Source/WTF:

  • wtf/CrossThreadTaskHandler.cpp:

(WTF::CrossThreadTaskHandler::CrossThreadTaskHandler):

  • Add optional second argument to enable use of an AutodrainedPool when running the runloop.

(WTF::CrossThreadTaskHandler::taskRunLoop):

  • Create an AutodrainedPool if requested when CrossThreadTaskHandler was created.
  • wtf/CrossThreadTaskHandler.h:

(WTF::CrossThreadTaskHandler::AutodrainedPoolForRunLoop):

  • Add enum class for enabling an AutodrainedPool for CrossThreadTaskHandler::taskRunLoop().

(WTF::CrossThreadTaskHandler::CrossThreadTaskHandler):

  • Add optional second argument to enable use of an AutodrainedPool when running the runloop.
3:04 PM Changeset in webkit [245870] by ddkilzer@apple.com
  • 3 edits in trunk/Tools

check-webkit-style reports false-positive build/include_order warning in WTF C++ source files
<https://webkit.org/b/198349>

Reviewed by Alex Christensen.

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

(_classify_include): Don't return early for <wtf/Header.h>
includes.

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

(OrderOfIncludesTest.test_primary_header): Add tests for
<wtf/Header.h> includes.

2:28 PM Changeset in webkit [245869] by dino@apple.com
  • 6 edits in trunk

Implement Promise.allSettled
https://bugs.webkit.org/show_bug.cgi?id=197600
<rdar://problem/50483885>

Reviewed by Keith Miller.

JSTests:

Start testing Promise.allSettled. We pass most of the tests.
The ones that fail are similar to the Promise.all tests we already fail.

  • test262/config.yaml: Remove Promise.allSettled from skipped tests.
  • test262/expectations.yaml: Add new expectations for allSettled tests.

Source/JavaScriptCore:

Implement Promise.allSettled
https://github.com/tc39/proposal-promise-allSettled/

Shipping in Firefox since version 68.
Shipping in V8 since https://chromium.googlesource.com/v8/v8.git/+/1f6d27e8df819b448712dface6ad367fb8de426b

  • builtins/PromiseConstructor.js:

(allSettled.newResolveRejectElements.resolveElement):
(allSettled.newResolveRejectElements.rejectElement):
(allSettled.newResolveRejectElements):
(allSettled): Added.

  • runtime/JSPromiseConstructor.cpp: Add ref to allSettled.
2:15 PM Changeset in webkit [245868] by ggaren@apple.com
  • 53 edits in trunk

WeakPtr breaks vtables when upcasting to base classes
https://bugs.webkit.org/show_bug.cgi?id=188799

Reviewed by Youenn Fablet.

Source/WebCore:

  • Modules/encryptedmedia/MediaKeySession.cpp:

(WebCore::MediaKeySession::MediaKeySession):

  • Modules/encryptedmedia/MediaKeySession.h: Adopted modern WeakPtr APIs.

Removed redundant WeakPtrFactory.

  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::existingWrapper):

  • css/CSSFontFace.h: Moved functions out of line to avoid #include

explosion for .get().

  • dom/ContainerNode.h:
  • dom/Document.h:
  • dom/Element.h: Moved CanMakeWeakPtr to ContainerNode because all

subclasses except for DocumentFragment were already so, and we have
code that uses WeakPtr<ContainerNode>, which, now that WeakPtr is
type-safe, is awkward to do when ContainerNode isn't CanMakeWeakPtr.

  • dom/FullscreenManager.cpp:

(WebCore::FullscreenManager::fullscreenRenderer const):

  • dom/FullscreenManager.h:

(WebCore::FullscreenManager::fullscreenRenderer const): Deleted.

  • html/FormAssociatedElement.cpp:

(WebCore::FormAssociatedElement::form const):

  • html/FormAssociatedElement.h:

(WebCore::FormAssociatedElement::form const): Deleted. Moved functions
out of line to avoid #include explosion for .get().

  • html/HTMLMediaElement.h: It takes an extra using declaration

to disambiguate multiple CanMakeWeakPtr base classes now.

  • loader/MediaResourceLoader.cpp:

(WebCore::MediaResourceLoader::requestResource): Removed redundant .get().

  • page/DOMWindowProperty.cpp:

(WebCore::DOMWindowProperty::window const):

  • page/DOMWindowProperty.h:

(WebCore::DOMWindowProperty::window const): Deleted.

  • page/FrameViewLayoutContext.cpp:

(WebCore::FrameViewLayoutContext::subtreeLayoutRoot const):

  • page/FrameViewLayoutContext.h:

(WebCore::FrameViewLayoutContext::subtreeLayoutRoot const): Deleted.

  • page/UndoItem.cpp:

(WebCore::UndoItem::undoManager const):

  • page/UndoItem.h:

(WebCore::UndoItem::undoManager const): Deleted. Moved functions out of
line to avoid #include explosion for .get().

  • platform/ScrollView.h: It takes an extra using declaration

to disambiguate multiple CanMakeWeakPtr base classes now.

  • platform/Widget.cpp:

(WebCore::Widget::parent const):

  • platform/Widget.h:

(WebCore::Widget::parent const): Deleted. Moved functions out of line to avoid #include
explosion for .get().

  • platform/encryptedmedia/CDMInstanceSession.h: Made

CDMInstanceSessionClient CanMakeWeakPtr because we use WeakPtr<CDMInstanceSessionClient>.

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

CanMakeWeakPtr is inherited now.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
(WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cdmSession const): Deleted.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::createWeakPtr): Deleted.

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

(WebCore::CMTimebaseEffectiveRateChangedCallback):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::play):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pause):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationChanged):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cdmSession const):

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

(WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
(WebCore::SourceBufferPrivateAVFObjC::setCDMSession):
(WebCore::SourceBufferPrivateAVFObjC::flushVideo):
(WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
(WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples):
(WebCore::SourceBufferPrivateAVFObjC::setVideoLayer):
(WebCore::SourceBufferPrivateAVFObjC::setDecompressionSession): Modernized WeakPtr API usage.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::multiColumnFlowSlowCase const):

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::multiColumnFlow const):

  • rendering/RenderMultiColumnFlow.cpp:

(WebCore::RenderMultiColumnFlow::findColumnSpannerPlaceholder const):

  • rendering/RenderMultiColumnFlow.h:
  • rendering/RenderTable.cpp:

(WebCore::RenderTable::header const):
(WebCore::RenderTable::footer const):
(WebCore::RenderTable::firstBody const):
(WebCore::RenderTable::topSection const):

  • rendering/RenderTable.h:

(WebCore::RenderTable::header const): Deleted.
(WebCore::RenderTable::footer const): Deleted.
(WebCore::RenderTable::firstBody const): Deleted.
(WebCore::RenderTable::topSection const): Deleted. Moved functions out
of line to avoid #include explosion for .get().

Source/WebKit:

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::networkSession):

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
  • Shared/WebBackForwardListItem.cpp:

(WebKit::WebBackForwardListItem::suspendedPage const):

  • Shared/WebBackForwardListItem.h:

(WebKit::WebBackForwardListItem::suspendedPage const): Deleted. Moved
functions out of line to avoid #include explosion for .get().

  • UIProcess/Authentication/cocoa/SecKeyProxyStore.h:

(WebKit::SecKeyProxyStore::get const):
(WebKit::SecKeyProxyStore::weakPtrFactory const): Deleted. Adopted
CanMakeWeakPtr.

  • UIProcess/WebAuthentication/AuthenticatorManager.h:
  • UIProcess/WebProcessProxy.cpp: It takes an extra using declaration

to disambiguate multiple CanMakeWeakPtr base classes now.

(WebKit::WebProcessProxy::processPool const):

  • UIProcess/WebProcessProxy.h:

(WebKit::WebProcessProxy::processPool const): Deleted. Moved
functions out of line to avoid #include explosion for .get().

Source/WTF:

This patch switches from reinterpret_cast to static_cast when loading
from WeakReference storage.

We know which type to cast *to* because it's specified by the type of
the calling WeakPtr.

We know which type to cast *from* because it's specified by a typedef
in CanMakeWeakPtr.

(Our convention is that we store a pointer to the class that derives
from CanMakeWeakPtr. We cast from that pointer to derived pointers when
we get(). This means that #include of the derived type header is now
required in order to get() the pointer.)

  • wtf/WeakHashSet.h:

(WTF::HashTraits<Ref<WeakReference>>::isReleasedWeakValue): Definition
is now eagerly required because WeakReference is not a template anymore.

(WTF::WeakHashSet::WeakHashSetConstIterator::get const):
(WTF::WeakHashSet::WeakHashSetConstIterator::skipEmptyBuckets):
(WTF::WeakHashSet::remove):
(WTF::WeakHashSet::contains const):
(WTF::WeakHashSet::computesEmpty const):
(WTF::WeakHashSet::hasNullReferences const):
(WTF::WeakHashSet::computeSize const):
(WTF::HashTraits<Ref<WeakReference<T>>>::isReleasedWeakValue): Deleted.
Updated for new WeakReference get() API.

  • wtf/WeakPtr.h: Use a macro for TestAPI support. We can't use template

specialization because WeakReference is not a class template anymore.
(Or maybe we could have kept it working with a dummy template argument?
Felt weird, so I switched.)

(WTF::WeakReference::create):
(WTF::WeakReference::~WeakReference):
(WTF::WeakReference::get const):
(WTF::WeakReference::operator bool const):
(WTF::WeakReference::WeakReference): WeakReference is just a void* now.
It's the caller's responsibility, when creating and getting, to use
a consistent storage type. We ensure a canonical storage type using a
typedef inside CanMakeWeakPtr.

(WTF::WeakPtr::WeakPtr):
(WTF::WeakPtr::get const):
(WTF::WeakPtr::operator bool const):
(WTF::WeakPtr::operator-> const):
(WTF::WeakPtr::operator* const): Adopted new WeakReference API.

(WTF::WeakPtrFactory::createWeakPtr const): No need for reinterpret_cast.

(WTF::weak_reference_cast): This isn't required for correctness, but it's
nice to show a complier error at WeakPtr construction sites when you know
that the types won't work. Otherwise, you get compiler errors at
dereference sites, which are slightly more mysterious ways of saying that
you constructed your WeakPtr incorrectly.

(WTF::WeakPtr<T>::WeakPtr):
(WTF::=):
(WTF::makeWeakPtr):
(WTF::weak_reference_upcast): Deleted.
(WTF::weak_reference_downcast): Deleted.

Tools:

  • TestWebKitAPI/Tests/WTF/WeakPtr.cpp: Adopt the new macro API instead

of template specialization for observing weak references.

(TestWebKitAPI::Int::Int):
(TestWebKitAPI::Int::operator int const):
(TestWebKitAPI::Int::operator== const): Use a class for integer tests
because WeakPtr doesn't naturally support pointing to non-class objects
now.

(TestWebKitAPI::Base::foo):
(TestWebKitAPI::Derived::foo): Inherit from CanMakeWeakPtr to enable
deduction of the weak pointer type.

(TestWebKitAPI::TEST): Updated to use Int.

(TestWebKitAPI::Base::weakPtrFactory const): Deleted.
(WTF::WeakReference<TestWebKitAPI::Base>::WeakReference): Deleted.
(WTF::WeakReference<TestWebKitAPI::Base>::~WeakReference): Deleted.

2:04 PM Changeset in webkit [245867] by commit-queue@webkit.org
  • 6 edits in trunk

[Pointer Events] toElement and fromElement should be null
https://bugs.webkit.org/show_bug.cgi?id=198338

Patch by Antoine Quint <Antoine Quint> on 2019-05-29
Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark WPT progressions now that we return the correct values for toElement and fromElement.

  • web-platform-tests/pointerevents/pointerevent_pointerenter_does_not_bubble-expected.txt:
  • web-platform-tests/pointerevents/pointerevent_pointerleave_does_not_bubble-expected.txt:

Source/WebCore:

  • dom/MouseEvent.h:
  • dom/PointerEvent.h:
1:45 PM Changeset in webkit [245866] by Alan Coon
  • 2 edits in tags/Safari-608.1.26/Source/WebKitLegacy/mac

Cherry-pick r245862. rdar://problem/51128946

Fix internal watchOS build
https://bugs.webkit.org/show_bug.cgi?id=198344
<rdar://problem/51128965>

Reviewed by Geoff Garen.

  • Misc/WebDownload.h: Fix watchOS like we did iosmac in r245596

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

1:29 PM Changeset in webkit [245865] by Kocsen Chung
  • 7 edits in trunk/Source

Versioning.

1:25 PM Changeset in webkit [245864] by Kocsen Chung
  • 1 copy in tags/Safari-608.1.26

Tag Safari-608.1.26.

1:07 PM Changeset in webkit [245863] by Ryan Haddad
  • 53 edits in trunk

Unreviewed, rolling out r245857.

Breaks internal builds.

Reverted changeset:

"WeakPtr breaks vtables when upcasting to base classes"
https://bugs.webkit.org/show_bug.cgi?id=188799
https://trac.webkit.org/changeset/245857

12:37 PM Changeset in webkit [245862] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKitLegacy/mac

Fix internal watchOS build
https://bugs.webkit.org/show_bug.cgi?id=198344
<rdar://problem/51128965>

Reviewed by Geoff Garen.

  • Misc/WebDownload.h:

Fix watchOS like we did iosmac in r245596

12:16 PM Changeset in webkit [245861] by Keith Rollin
  • 2 edits in trunk/Source/WebCore

Fix builds that don't use makeWindowFromView
https://bugs.webkit.org/show_bug.cgi?id=198342
<rdar://problem/51228563>

Reviewed by Wenson Hsieh.

In some configurations, VideoFullscreenInterfaceAVKit.mm declares but
does not use makeWindowFromView. Fix by conditionalizing the the
declaration on the same symbol as point where it's used.

No new tests -- no new functionality.

  • platform/ios/VideoFullscreenInterfaceAVKit.mm:
12:15 PM Changeset in webkit [245860] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

[iOS] The WebContent process needs proper entitlement to do secure drawing
https://bugs.webkit.org/show_bug.cgi?id=198343
<rdar://problem/50671257>

Reviewed by Tim Horton.

The WebContent process needs proper entitlement to do secure drawing on iOS.

  • Configurations/WebContent-iOS.entitlements:
11:51 AM Changeset in webkit [245859] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

UserMediaCaptureManager should remove a source from its map once the source is ended
https://bugs.webkit.org/show_bug.cgi?id=198337

Reviewed by Eric Carlson.

When the source is stopped, for instance using MediaStreamTrack.stop,
remove the source from UserMediaCaptureManager sources map.
This makes sure the map will not grow over time.
Add an if check to ensure that the source is still there before processing an incoming IPC call.

When UIProcess tells us the capture is finished (typically capture failed), remove the entry on WebProcess side as well.

  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::createCaptureSource):
(WebKit::UserMediaCaptureManager::sourceStopped):
(WebKit::UserMediaCaptureManager::captureFailed):
(WebKit::UserMediaCaptureManager::sourceMutedChanged):
(WebKit::UserMediaCaptureManager::sourceSettingsChanged):
(WebKit::UserMediaCaptureManager::storageChanged):
(WebKit::UserMediaCaptureManager::ringBufferFrameBoundsChanged):
(WebKit::UserMediaCaptureManager::audioSamplesAvailable):
(WebKit::UserMediaCaptureManager::remoteVideoSampleAvailable):
(WebKit::UserMediaCaptureManager::sourceEnded):
(WebKit::UserMediaCaptureManager::applyConstraintsSucceeded):
(WebKit::UserMediaCaptureManager::applyConstraintsFailed):

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

UserMediaCaptureManagerProxy::SourceProxy should directly have access to its IPC connection
https://bugs.webkit.org/show_bug.cgi?id=198335

Reviewed by Eric Carlson.

Previously, SourceProxy was getting its IPC connection by going through its manager, then its process proxy.
As some calls can be done from a background thread, it is safer to directly make SourceProxy own a Ref of its IPC connection.

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::SourceProxy::SourceProxy):
(WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):

11:22 AM Changeset in webkit [245857] by ggaren@apple.com
  • 53 edits in trunk

WeakPtr breaks vtables when upcasting to base classes
https://bugs.webkit.org/show_bug.cgi?id=188799

Reviewed by Youenn Fablet.

Source/WebCore:

  • Modules/encryptedmedia/MediaKeySession.cpp:

(WebCore::MediaKeySession::MediaKeySession):

  • Modules/encryptedmedia/MediaKeySession.h: Adopted modern WeakPtr APIs.

Removed redundant WeakPtrFactory.

  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::existingWrapper):

  • css/CSSFontFace.h: Moved functions out of line to avoid #include

explosion for .get().

  • dom/ContainerNode.h:
  • dom/Document.h:
  • dom/Element.h: Moved CanMakeWeakPtr to ContainerNode because all

subclasses except for DocumentFragment were already so, and we have
code that uses WeakPtr<ContainerNode>, which, now that WeakPtr is
type-safe, is awkward to do when ContainerNode isn't CanMakeWeakPtr.

  • dom/FullscreenManager.cpp:

(WebCore::FullscreenManager::fullscreenRenderer const):

  • dom/FullscreenManager.h:

(WebCore::FullscreenManager::fullscreenRenderer const): Deleted.

  • html/FormAssociatedElement.cpp:

(WebCore::FormAssociatedElement::form const):

  • html/FormAssociatedElement.h:

(WebCore::FormAssociatedElement::form const): Deleted. Moved functions
out of line to avoid #include explosion for .get().

  • html/HTMLMediaElement.h: It takes an extra using declaration

to disambiguate multiple CanMakeWeakPtr base classes now.

  • loader/MediaResourceLoader.cpp:

(WebCore::MediaResourceLoader::requestResource): Removed redundant .get().

  • page/DOMWindowProperty.cpp:

(WebCore::DOMWindowProperty::window const):

  • page/DOMWindowProperty.h:

(WebCore::DOMWindowProperty::window const): Deleted.

  • page/FrameViewLayoutContext.cpp:

(WebCore::FrameViewLayoutContext::subtreeLayoutRoot const):

  • page/FrameViewLayoutContext.h:

(WebCore::FrameViewLayoutContext::subtreeLayoutRoot const): Deleted.

  • page/UndoItem.cpp:

(WebCore::UndoItem::undoManager const):

  • page/UndoItem.h:

(WebCore::UndoItem::undoManager const): Deleted. Moved functions out of
line to avoid #include explosion for .get().

  • platform/ScrollView.h: It takes an extra using declaration

to disambiguate multiple CanMakeWeakPtr base classes now.

  • platform/Widget.cpp:

(WebCore::Widget::parent const):

  • platform/Widget.h:

(WebCore::Widget::parent const): Deleted. Moved functions out of line to avoid #include
explosion for .get().

  • platform/encryptedmedia/CDMInstanceSession.h: Made

CDMInstanceSessionClient CanMakeWeakPtr because we use WeakPtr<CDMInstanceSessionClient>.

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

CanMakeWeakPtr is inherited now.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
(WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cdmSession const): Deleted.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::createWeakPtr): Deleted.

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

(WebCore::CMTimebaseEffectiveRateChangedCallback):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::play):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pause):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationChanged):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cdmSession const):

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

(WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
(WebCore::SourceBufferPrivateAVFObjC::setCDMSession):
(WebCore::SourceBufferPrivateAVFObjC::flushVideo):
(WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
(WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples):
(WebCore::SourceBufferPrivateAVFObjC::setVideoLayer):
(WebCore::SourceBufferPrivateAVFObjC::setDecompressionSession): Modernized WeakPtr API usage.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::multiColumnFlowSlowCase const):

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::multiColumnFlow const):

  • rendering/RenderMultiColumnFlow.cpp:

(WebCore::RenderMultiColumnFlow::findColumnSpannerPlaceholder const):

  • rendering/RenderMultiColumnFlow.h:
  • rendering/RenderTable.cpp:

(WebCore::RenderTable::header const):
(WebCore::RenderTable::footer const):
(WebCore::RenderTable::firstBody const):
(WebCore::RenderTable::topSection const):

  • rendering/RenderTable.h:

(WebCore::RenderTable::header const): Deleted.
(WebCore::RenderTable::footer const): Deleted.
(WebCore::RenderTable::firstBody const): Deleted.
(WebCore::RenderTable::topSection const): Deleted. Moved functions out
of line to avoid #include explosion for .get().

Source/WebKit:

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::networkSession):

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
  • Shared/WebBackForwardListItem.cpp:

(WebKit::WebBackForwardListItem::suspendedPage const):

  • Shared/WebBackForwardListItem.h:

(WebKit::WebBackForwardListItem::suspendedPage const): Deleted. Moved
functions out of line to avoid #include explosion for .get().

  • UIProcess/Authentication/cocoa/SecKeyProxyStore.h:

(WebKit::SecKeyProxyStore::get const):
(WebKit::SecKeyProxyStore::weakPtrFactory const): Deleted. Adopted
CanMakeWeakPtr.

  • UIProcess/WebAuthentication/AuthenticatorManager.h:
  • UIProcess/WebProcessProxy.cpp: It takes an extra using declaration

to disambiguate multiple CanMakeWeakPtr base classes now.

(WebKit::WebProcessProxy::processPool const):

  • UIProcess/WebProcessProxy.h:

(WebKit::WebProcessProxy::processPool const): Deleted. Moved
functions out of line to avoid #include explosion for .get().

Source/WTF:

This patch switches from reinterpret_cast to static_cast when loading
from WeakReference storage.

We know which type to cast *to* because it's specified by the type of
the calling WeakPtr.

We know which type to cast *from* because it's specified by a typedef
in CanMakeWeakPtr.

(Our convention is that we store a pointer to the class that derives
from CanMakeWeakPtr. We cast from that pointer to derived pointers when
we get(). This means that #include of the derived type header is now
required in order to get() the pointer.)

  • wtf/WeakHashSet.h:

(WTF::HashTraits<Ref<WeakReference>>::isReleasedWeakValue): Definition
is now eagerly required because WeakReference is not a template anymore.

(WTF::WeakHashSet::WeakHashSetConstIterator::get const):
(WTF::WeakHashSet::WeakHashSetConstIterator::skipEmptyBuckets):
(WTF::WeakHashSet::remove):
(WTF::WeakHashSet::contains const):
(WTF::WeakHashSet::computesEmpty const):
(WTF::WeakHashSet::hasNullReferences const):
(WTF::WeakHashSet::computeSize const):
(WTF::HashTraits<Ref<WeakReference<T>>>::isReleasedWeakValue): Deleted.
Updated for new WeakReference get() API.

  • wtf/WeakPtr.h: Use a macro for TestAPI support. We can't use template

specialization because WeakReference is not a class template anymore.
(Or maybe we could have kept it working with a dummy template argument?
Felt weird, so I switched.)

(WTF::WeakReference::create):
(WTF::WeakReference::~WeakReference):
(WTF::WeakReference::get const):
(WTF::WeakReference::operator bool const):
(WTF::WeakReference::WeakReference): WeakReference is just a void* now.
It's the caller's responsibility, when creating and getting, to use
a consistent storage type. We ensure a canonical storage type using a
typedef inside CanMakeWeakPtr.

(WTF::WeakPtr::WeakPtr):
(WTF::WeakPtr::get const):
(WTF::WeakPtr::operator bool const):
(WTF::WeakPtr::operator-> const):
(WTF::WeakPtr::operator* const): Adopted new WeakReference API.

(WTF::WeakPtrFactory::createWeakPtr const): No need for reinterpret_cast.

(WTF::weak_reference_cast): This isn't required for correctness, but it's
nice to show a complier error at WeakPtr construction sites when you know
that the types won't work. Otherwise, you get compiler errors at
dereference sites, which are slightly more mysterious ways of saying that
you constructed your WeakPtr incorrectly.

(WTF::WeakPtr<T>::WeakPtr):
(WTF::=):
(WTF::makeWeakPtr):
(WTF::weak_reference_upcast): Deleted.
(WTF::weak_reference_downcast): Deleted.

Tools:

  • TestWebKitAPI/Tests/WTF/WeakPtr.cpp: Adopt the new macro API instead

of template specialization for observing weak references.

(TestWebKitAPI::Int::Int):
(TestWebKitAPI::Int::operator int const):
(TestWebKitAPI::Int::operator== const): Use a class for integer tests
because WeakPtr doesn't naturally support pointing to non-class objects
now.

(TestWebKitAPI::Base::foo):
(TestWebKitAPI::Derived::foo): Inherit from CanMakeWeakPtr to enable
deduction of the weak pointer type.

(TestWebKitAPI::TEST): Updated to use Int.

(TestWebKitAPI::Base::weakPtrFactory const): Deleted.
(WTF::WeakReference<TestWebKitAPI::Base>::WeakReference): Deleted.
(WTF::WeakReference<TestWebKitAPI::Base>::~WeakReference): Deleted.

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

Modernize getting proxies of UserMediaCaptureManagerProxy
https://bugs.webkit.org/show_bug.cgi?id=198336

Reviewed by Eric Carlson.

No change of behavior, use HashMap::get instead of find.

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::startProducingData):
(WebKit::UserMediaCaptureManagerProxy::stopProducingData):
(WebKit::UserMediaCaptureManagerProxy::capabilities):
(WebKit::UserMediaCaptureManagerProxy::setMuted):
(WebKit::UserMediaCaptureManagerProxy::applyConstraints):

10:59 AM Changeset in webkit [245855] by aestes@apple.com
  • 2 edits in trunk/Source/WebKit

[watchOS] Remove an unneeded #import
https://bugs.webkit.org/show_bug.cgi?id=198339
<rdar://problem/51195415>

Reviewed by Wenson Hsieh.

  • UIProcess/ios/forms/WKTimePickerViewController.mm:
10:41 AM Changeset in webkit [245854] by Antti Koivisto
  • 3 edits
    3 adds in trunk

Scrolling node ordering wrong when a layer has both positioning and fixed/sticky node
https://bugs.webkit.org/show_bug.cgi?id=198329

Reviewed by Darin Adler.

Source/WebCore:

Test: scrollingcoordinator/scrolling-tree/sticky-in-overflow.html

With sticky positioning in non-stacking context overflow you currently get structure like

FrameScrollingNode

OverflowScrollingNode
StickyNode

PositionedNode

where StickyNode and PositionedNode reference the same layer. Sticky doesn't get applied at all when the overflow moves.

This patch reverses the order of sticky and positioned. It doesn't fix sticky positioning during scrolling yet,
but it does make it less jumpy. It is a prerequisite for the full fix.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateScrollCoordinationForLayer):

LayoutTests:

  • platform/ios-wk2/scrollingcoordinator/scrolling-tree/sticky-in-overflow-expected.txt: Added.
  • scrollingcoordinator/scrolling-tree/sticky-in-overflow-expected.txt: Added.
  • scrollingcoordinator/scrolling-tree/sticky-in-overflow.html: Added.
10:23 AM Changeset in webkit [245853] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Prepend KEY_ to the last key alias in PlatformEventKeyboardGtk
https://bugs.webkit.org/show_bug.cgi?id=198331

Patch by Ludovico de Nittis <ludovico.denittis@collabora.com> on 2019-05-29
Reviewed by Michael Catanzaro.

No behavior change.

With the commit
https://bugs.webkit.org/show_bug.cgi?id=198326
A gdk key slipped away from the renaming.

  • platform/gtk/PlatformKeyboardEventGtk.cpp:

(WebCore::modifiersForGdkKeyEvent):

10:05 AM Changeset in webkit [245852] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

Correct flaky WebAuthN test cases
https://bugs.webkit.org/show_bug.cgi?id=198308
<rdar://problem/48677219>

Reviewed by David Kilzer.

Correct offset math in the MockHidConnection implementation. The write position of
the payload buffer was computed using the value of 'size()', which is set to the full
capacity of the vector after a 'grow()' operation.

Tests: http/wpt/webauthn

  • UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:

(WebKit::MockHidConnection::feedReports):

9:58 AM Changeset in webkit [245851] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Disable Flaky API Test TestWebKitAPI._WKDownload.DownloadMonitorCancel
https://bugs.webkit.org/show_bug.cgi?id=198328

Reviewed by Alexey Proskuryakov.

  • TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
9:07 AM Changeset in webkit [245850] by Alan Bujtas
  • 8 edits
    2 adds in trunk/Source/WebCore

[LFC][IFC] Move Line class to a dedicated file
https://bugs.webkit.org/show_bug.cgi?id=198332
<rdar://problem/51221403>

Reviewed by Antti Koivisto.

An upcoming refactoring requires the Line class to be in a .h.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • layout/displaytree/DisplayRun.h:
  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::InlineFormattingContext::LineLayout::initializeLine const):
(WebCore::Layout::InlineFormattingContext::LineLayout::computedIntrinsicWidth const):
(WebCore::Layout::halfLeadingMetrics): Deleted.
(WebCore::Layout::Line::availableWidth const): Deleted.
(WebCore::Layout::Line::contentLogicalRight const): Deleted.
(WebCore::Layout::Line::contentLogicalWidth const): Deleted.
(WebCore::Layout::Line::logicalTop const): Deleted.
(WebCore::Layout::Line::logicalLeft const): Deleted.
(WebCore::Layout::Line::logicalRight const): Deleted.
(WebCore::Layout::Line::logicalBottom const): Deleted.
(WebCore::Layout::Line::logicalWidth const): Deleted.
(WebCore::Layout::Line::logicalHeight const): Deleted.
(WebCore::Layout::Line::LineItem::LineItem): Deleted.
(WebCore::Layout::Line::Line): Deleted.
(WebCore::Layout::Line::reset): Deleted.
(WebCore::Layout::Line::close): Deleted.
(WebCore::Layout::Line::removeTrailingTrimmableContent): Deleted.
(WebCore::Layout::Line::moveLogicalLeft): Deleted.
(WebCore::Layout::Line::moveLogicalRight): Deleted.
(WebCore::Layout::isTrimmableContent): Deleted.
(WebCore::Layout::Line::trailingTrimmableWidth const): Deleted.
(WebCore::Layout::Line::hasContent const): Deleted.
(WebCore::Layout::Line::appendNonBreakableSpace): Deleted.
(WebCore::Layout::Line::appendInlineContainerStart): Deleted.
(WebCore::Layout::Line::appendInlineContainerEnd): Deleted.
(WebCore::Layout::Line::appendTextContent): Deleted.
(WebCore::Layout::Line::appendNonReplacedInlineBox): Deleted.
(WebCore::Layout::Line::appendReplacedInlineBox): Deleted.
(WebCore::Layout::Line::appendHardLineBreak): Deleted.

  • layout/inlineformatting/InlineTextItem.h:
  • layout/inlineformatting/text/TextUtil.cpp:

(WebCore::Layout::TextUtil::isTrimmableContent):

  • layout/inlineformatting/text/TextUtil.h:
6:07 AM Changeset in webkit [245849] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

PlatformEventKeyboardGtk still uses old key aliases
https://bugs.webkit.org/show_bug.cgi?id=198326

Patch by Ludovico de Nittis <ludovico.denittis@collabora.com> on 2019-05-29
Reviewed by Carlos Garcia Campos.

No behavior change.

Use the new key names convention prepending "KEY_".

  • platform/gtk/PlatformKeyboardEventGtk.cpp:

(WebCore::PlatformKeyboardEvent::keyIdentifierForGdkKeyCode):
(WebCore::PlatformKeyboardEvent::windowsKeyCodeForGdkKeyCode):
(WebCore::PlatformKeyboardEvent::singleCharacterString):
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):

May 28, 2019:

11:00 PM Changeset in webkit [245848] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

[MSE][GStreamer] update the readyState correctly in MediaPlayerPrivateGStreamerMSE
https://bugs.webkit.org/show_bug.cgi?id=197834

Patch by Yacine Bandou <yacine.bandou@softathome.com> on 2019-05-28
Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

The buffering state and the m_downloadFinished boolean aren't supported in the MSE case.
When the readyState is already "HaveEnoughData", we don't want to revert it to "HaveFutureData",
or else the MediaPlayer would send a "canplay" event instead of a "canplaythrough".

Test: media/media-source/media-source-canplaythrough-event.html

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

(WebCore::MediaPlayerPrivateGStreamerMSE::updateStates):

LayoutTests:

Add a new test that checks if the MediaElement receives the "canplaythrough"
event when the media content is entirely injected to MSE sourceBuffer.

  • media/media-source/media-source-canplaythrough-event-expected.txt: Added.
  • media/media-source/media-source-canplaythrough-event.html: Added.
9:40 PM Changeset in webkit [245847] by Fujii Hironori
  • 2 edits in trunk/Source/WebKit

[WinCairo] REGRESSION(r245186) Crash in NetworkCache::IOChannel::read in http/tests/IndexedDB some tests
https://bugs.webkit.org/show_bug.cgi?id=197941

Reviewed by Don Olmstead.

http/tests/IndexedDB some tests were crashing in
NetworkCache::IOChannel::read in order to allocate a buffer with
std::numeric_limits<size_t>::max() as the size.

IOChannel::read should check the file size, and calculate the read
size.

  • NetworkProcess/cache/NetworkCacheIOChannelCurl.cpp:

(WebKit::NetworkCache::IOChannel::read): Limit the read buffer
size by calling FileSystem::getFileSize.

9:38 PM Changeset in webkit [245846] by Fujii Hironori
  • 3 edits in trunk/Source/WebCore

[WinCairo] ASSERTION FAILED: !m_preparingToPlay in MediaPlayerPrivateMediaFoundation::prepareToPlay
https://bugs.webkit.org/show_bug.cgi?id=190747

Reviewed by Alex Christensen.

HTMLMediaElement::prepareToPlay had a assertion ensuring that it
was not called twice. However, it was called twice. The first from
HTMLMediaElement::load, the second from
MediaPlayerPrivateMediaFoundation::onTopologySet.

prepareToPlay started loading. And, loading should be started
after onTopologySet is called back.

Covered by existing tests.

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:

(WebCore::MediaPlayerPrivateMediaFoundation::onTopologySet): Moved code from prepareToPlay.
(WebCore::MediaPlayerPrivateMediaFoundation::prepareToPlay): Deleted and moved the code to onTopologySet.

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.h: Removed prepareToPlay declaration.
9:33 PM Changeset in webkit [245845] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

[WinCairo][MediaFoundation] Assertion failure in MediaPlayerPrivateMediaFoundation::Direct3DPresenter::presentSample
https://bugs.webkit.org/show_bug.cgi?id=198290

Reviewed by Per Arne Vollan.

Covered by existing tests.

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:

(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::presentSample):
Call clear() of m_memSurface before assigning new value.

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

[WHLSL] Type of dereference is the type of the thing we point to, not a pointer to that type
https://bugs.webkit.org/show_bug.cgi?id=198321

Reviewed by Myles C. Maxfield.

Source/WebCore:

Consider this program:
`
thread int* x;
*x = 42
`

In the Checker, we were saying the type of "*x" was "int*" instead of "int".

Test: webgpu/whlsl-dereference-pointer-should-type-check.html

  • Modules/webgpu/WHLSL/WHLSLChecker.cpp:

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

LayoutTests:

  • webgpu/whlsl-dereference-pointer-should-type-check-expected.html: Added.
  • webgpu/whlsl-dereference-pointer-should-type-check.html: Added.
8:27 PM Changeset in webkit [245843] by Justin Michaud
  • 2 edits in trunk/Tools

Attempt to fix JSC test timeouts after adding collectContinuously to WASM tests.
https://bugs.webkit.org/show_bug.cgi?id=198322

Reviewed by Saam Barati.

Increases the collection period from 1 to slightly higher to try to speed up the tests. Any higher and
the test runner does not detect the bug that required the memset in Wasm::Instance::Instance().

  • Scripts/run-jsc-stress-tests:
8:08 PM Changeset in webkit [245842] by Alan Coon
  • 7 edits in branches/safari-608.1.24.20-branch/Source

Versioning.

8:02 PM Changeset in webkit [245841] by Alan Coon
  • 1 copy in tags/Safari-608.1.24.20.7

Tag Safari-608.1.24.20.7.

8:00 PM Changeset in webkit [245840] by Alan Coon
  • 7 edits in branches/safari-608.1.24.20-branch/Source

Versioning.

7:56 PM Changeset in webkit [245839] by Wenson Hsieh
  • 7 edits in trunk

[iOS] Respect NSItemProvider's registered types when dropping files that are loaded in-place
https://bugs.webkit.org/show_bug.cgi?id=198315
<rdar://problem/51183762>

Reviewed by Tim Horton.

Source/WebCore:

Currently, logic in PasteboardIOS.mm and WebContentReaderCocoa.mm attempts to deduce the content type from the
file path when dropping attachments on iOS. Instead, we should be plumbing the content type through to the
reader.

Test: WKAttachmentTestsIOS.InsertDroppedImageWithNonImageFileExtension

  • editing/WebContentReader.h:
  • editing/cocoa/WebContentReaderCocoa.mm:

(WebCore::typeForAttachmentElement):

Add a helper method to determine which type to use in attachment elements. This makes the paste
(attachmentForData) and drop (attachmentForFilePaths) behave the same way, with respect to the type attribute
used to represent the attachment.

(WebCore::attachmentForFilePath):

Use the content type, if specified; otherwise, fall back to deducing it from the file path.

(WebCore::attachmentForData):
(WebCore::WebContentReader::readFilePath):

  • platform/Pasteboard.h:

(WebCore::PasteboardWebContentReader::readFilePath):

Pass the highest fidelity representation's content type to the web content reader.

  • platform/ios/PasteboardIOS.mm:

(WebCore::Pasteboard::readRespectingUTIFidelities):

Tools:

Adds a new API test to verify that when dropping a file that is loaded in-place with a file extension that is
not a .png (but was registered to the item provider as "public.png"), the resulting attachment is contained in
an image element, and the resulting attachment info indicates that the dropped attachment is a png file.

Additionally, rebaseline some existing tests.

  • TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:

(runTestWithTemporaryImageFile):
(TestWebKitAPI::TEST):

7:27 PM Changeset in webkit [245838] by mmaxfield@apple.com
  • 16 edits
    5 adds
    2 deletes in trunk

Move idempotent text autosizing to StyleTreeResolver
https://bugs.webkit.org/show_bug.cgi?id=197808
<rdar://problem/50283983>

Reviewed by Antti Koivisto.

Source/WebCore:

This patch migrates the idempotent text autosizing code to live inside style resolution. This is almost
the same as the algorithm that uses the result of layout to calculate autosizing, but this version only
operates on style (and thus doesn't require double layouts). Because it is being run in an environment
with less information, autosizing is occurring in more places, so the curves have been adjusted to make
autosizing not boost as much as the previous implementation did. The new algorithm is modelled after
text-decorations-in-effect. I've claimed 4 of the unused bits in RenderStyle to contain the state of the
autosizing algorithm. StyleResolver::adjustRenderStyle() is where the algorithm is implemented:

  • Look at the inherited bits
  • Interogate the element's RenderStyle
  • Compute new bits for the element, and set them in its RenderStyle
  • Based on the newly computed bits, determine whether we should increase the text size
  • If so, determine how much using the specified font size, and apply the result to the computed font size

This works because StyleBuilderCustom::applyInheritFontSize() inherits from the specified font size, not
the computed font size.

This patch also will disable autosizing using the other methods (so there aren't two methods of autosizing
fighting each other) and will honor text-size-adjust:none. However, it won't honor text-size-adjust:100%.
If content says text-size-adjust:100%, we will disregard it and take this code path.

Tests: fast/text-autosizing/ios/idempotentmode/css-exposure.html

fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-skip.html
fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-identity.html
fast/text-autosizing/ios/idempotentmode/idempotent-autosizing.html

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyinStyle):

  • css/CSSProperties.json:
  • css/StyleBuilderCustom.h:

(WebCore::computeBaseSpecifiedFontSize):
(WebCore::computeLineHeightMultiplierDueToFontSize):

  • css/StyleResolver.cpp:

(WebCore::idempotentTextSize):
(WebCore::hasTextChildren):
(WebCore::StyleResolver::adjustRenderStyle):
(WebCore::StyleResolver::checkForTextSizeAdjust):

  • page/FrameViewLayoutContext.cpp:

(WebCore::FrameViewLayoutContext::applyTextSizingIfNeeded):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::adjustComputedFontSizes):
(WebCore::idempotentTextSize): Deleted.

  • rendering/RenderBlockFlow.h:
  • rendering/RenderElement.cpp:

(WebCore::includeNonFixedHeight):
(WebCore::RenderElement::adjustComputedFontSizesOnBlocks):
(WebCore::RenderElement::resetTextAutosizing):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::RenderStyle):
(WebCore::RenderStyle::autosizeStatus const):
(WebCore::RenderStyle::setAutosizeStatus):

  • rendering/style/RenderStyle.h:
  • rendering/style/TextSizeAdjustment.cpp: Added.

(WebCore::AutosizeStatus::AutosizeStatus):
(WebCore::AutosizeStatus::contains const):
(WebCore::AutosizeStatus::modifiedStatus const):
(WebCore::AutosizeStatus::shouldSkipSubtree const):

  • rendering/style/TextSizeAdjustment.h:

LayoutTests:

  • fast/text-autosizing/ios/idempotentmode/css-exposure-expected.txt: Added.
  • fast/text-autosizing/ios/idempotentmode/css-exposure.html: Added.
  • fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-skip-expected.html: Added.
  • fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-skip.html: Added.
  • platform/ipad/fast/text-autosizing/text-size-adjust-inline-style-expected.html: Removed.
  • platform/ipad/fast/text-autosizing/text-size-adjust-inline-style.html: Removed.

We're intentionally not honoring percentages, because this is the most common way that
text autosizing is disabled (by setting it to 100%) on the Web today. However, Web authors
that have done this did it without knowing the full extent of the behavior change, and
the new idempotent text autosizing code path seems to be a progression in most cases
we've seen.

6:07 PM Changeset in webkit [245837] by Simon Fraser
  • 9 edits
    7 adds in trunk

Use scroll-velocity-based tile coverage for overflow:scroll
https://bugs.webkit.org/show_bug.cgi?id=198294
rdar://problem/48942184

Reviewed by Tim Horton.

Source/WebCore:

Start using a velocity-based tile coverage computation on layers with Type::ScrolledContents,
which is the content layers for overflow:scroll when they get big enough to get tiled.

Move legacy macOS coverage code into adjustTileCoverageForDesktopPageScrolling() because
I don't want to change its behavior in this patch. Use TileController::adjustTileCoverageRectForScrolling()
for iOS and macOS overflow scrolling. Since only iOS page scrolling gets velocity data from the UI
process, compute velocity in TileController using the visible rect top-left.

For overflow scroll, we have to plumb horizontal and vertical coverage in from
RenderLayerBacking.

Tests: tiled-drawing/scrolling/overflow/overflow-scrolled-down-tile-coverage.html

tiled-drawing/scrolling/overflow/overflow-scrolled-up-tile-coverage.html
tiled-drawing/scrolling/overflow/overflow-tile-coverage.html

  • platform/graphics/TiledBacking.h:
  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::adjustCoverageRect const):

  • platform/graphics/ca/PlatformCALayer.h:
  • platform/graphics/ca/TileController.cpp:

(WebCore::TileController::setVelocity):
(WebCore::TileController::adjustTileCoverageRect):
(WebCore::TileController::adjustTileCoverageForDesktopPageScrolling const):
(WebCore::TileController::adjustTileCoverageWithScrollingVelocity const):
(WebCore::TileController::adjustTileCoverageRectForScrolling):
(WebCore::expandRectWithinRect): Deleted.
(WebCore::TileController::adjustTileCoverageRect const): Deleted.
(WebCore::TileController::adjustTileCoverageRectForScrolling const): Deleted.

  • platform/graphics/ca/TileController.h:
  • rendering/RenderLayer.h:
  • rendering/RenderLayerBacking.cpp:

(WebCore::computePageTiledBackingCoverage):
(WebCore::computeOverflowTiledBackingCoverage):
(WebCore::RenderLayerBacking::adjustTiledBackingCoverage):
(WebCore::RenderLayerBacking::updateGeometry):

LayoutTests:

  • tiled-drawing/scrolling/overflow/overflow-scrolled-down-tile-coverage-expected.txt: Added.
  • tiled-drawing/scrolling/overflow/overflow-scrolled-down-tile-coverage.html: Added.
  • tiled-drawing/scrolling/overflow/overflow-scrolled-up-tile-coverage-expected.txt: Added.
  • tiled-drawing/scrolling/overflow/overflow-scrolled-up-tile-coverage.html: Added.
  • tiled-drawing/scrolling/overflow/overflow-tile-coverage-expected.txt: Added.
  • tiled-drawing/scrolling/overflow/overflow-tile-coverage.html: Added.
6:05 PM Changeset in webkit [245836] by ysuzuki@apple.com
  • 2 edits in trunk/Tools

GCHeapInspector should accept weird filename
https://bugs.webkit.org/show_bug.cgi?id=198314

Reviewed by Simon Fraser.

GCHeapInspector filenameForPath should have a fallback path if regexp does not match against the given path.

  • GCHeapInspector/script/interface.js:

(filenameForPath):

5:34 PM Changeset in webkit [245835] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

Fix sandbox violation when using QuickLook on iOS
https://bugs.webkit.org/show_bug.cgi?id=198312
<rdar://problem/51134351>

Reviewed by Alexey Proskuryakov.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
5:20 PM Changeset in webkit [245834] by Alan Coon
  • 1 copy in tags/Safari-608.1.24.20.6

Tag Safari-608.1.24.20.6.

5:14 PM Changeset in webkit [245833] by Devin Rousso
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Timelines: spacing around pie chart is different between CPU and Memory
https://bugs.webkit.org/show_bug.cgi?id=198299

Reviewed by Matt Baker.

"Style Resolution" is a much longer string than any of the legend strings in the Memory
timeline, and causes the CPU timeline legend to shift as a result.

Rename "Script" to "JavaScript" and "Style Resolution" to "Styles" so that the strings are
roughly the same length between the CPU and Memory timelines, meaning that they will appear
in the same spot with similar sizing.

  • UserInterface/Views/CPUTimelineView.js:

(WI.CPUTimelineView.displayNameForSampleType):
(WI.CPUTimelineView.prototype.initialLayout):
(WI.CPUTimelineView.prototype._computeStatisticsData):
Drive-by: remove the WI prefix from all CPUTimelineView.SampleType since it's within the
same class.

  • UserInterface/Views/CPUTimelineView.css:

(.timeline-view.cpu > .content > .overview .legend > .row > .swatch.sample-type-javascript): Added.
(.timeline-view.cpu > .content > .overview .legend > .row > .swatch.sample-type-script): Deleted.
Drive-by: move the .overview rules lower to be in the same area as the .overview * rules.

  • UserInterface/Views/MemoryTimelineView.css:

(.timeline-view.memory > .content > .overview):
Drive-by: remove duplicate CSS rule.

  • Localizations/en.lproj/localizedStrings.js:
4:57 PM Changeset in webkit [245832] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebKit

Horizontal scrollbar flashes after scrolling vertically with keyboard
https://bugs.webkit.org/show_bug.cgi?id=197942
<rdar://problem/46169578>

Reviewed by Dean Jackson.

  • UIProcess/ios/WKKeyboardScrollingAnimator.mm:

(axesForDelta):
(-[WKKeyboardScrollViewAnimator scrollToContentOffset:animated:]):
Only flash relevant axes.

  • Platform/spi/ios/UIKitSPI.h:
4:40 PM Changeset in webkit [245831] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Build Fix.

  • UIProcess/WKImagePreviewViewController.mm:

(-[WKImagePreviewViewController IGNORE_WARNINGS_END]):
(-[WKImagePreviewViewController previewActionItems]): Deleted.

4:27 PM Changeset in webkit [245830] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION(r245795): causing internal testers to exit early after 50 crashes.
https://bugs.webkit.org/show_bug.cgi?id=198310
<rdar://problem/51192535>

Reviewed by Simon Fraser.

  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:

(WebKit::touchActionsForPoint):
Initialize hitView to nil.

4:13 PM Changeset in webkit [245829] by youenn@apple.com
  • 3 edits
    3 adds in trunk

createAnswer() SDP Rejected by setLocalDescription()
https://bugs.webkit.org/show_bug.cgi?id=195930
<rdar://problem/49030489>

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

Make sure to check packetization mode parameter when matching H264 video codec.

  • Source/webrtc/media/base/codec.cc:
  • WebKit/0001-fix-195930.patch: Added.

LayoutTests:

  • webrtc/h264-packetization-mode-expected.txt: Added.
  • webrtc/h264-packetization-mode.html: Added.
3:41 PM Changeset in webkit [245828] by eric.carlson@apple.com
  • 2 edits in trunk/Tools

[MacOS] Filter GVA warning logged to stdout
https://bugs.webkit.org/show_bug.cgi?id=198303
<rdar://problem/50098041>

Reviewed by Jer Noble.

  • Scripts/webkitpy/port/mac.py:

(MacPort.logging_patterns_to_strip): Filter GVA warnings.

3:22 PM Changeset in webkit [245827] by Nikita Vasilyev
  • 20 edits in trunk

Web Inspector: Provide UIString descriptions to improve localizations
https://bugs.webkit.org/show_bug.cgi?id=195132
<rdar://problem/48457817>

Reviewed by Devin Rousso.

Source/WebInspectorUI:

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Base/LoadLocalizedStrings.js:

(WI.UIString):
(WI.repeatedUIString.timelineRecordLayout):
(WI.repeatedUIString.timelineRecordPaint):
(WI.repeatedUIString.timelineRecordComposite):
(WI.repeatedUIString.allExceptions):
(WI.repeatedUIString.uncaughtExceptions):
(WI.repeatedUIString.assertionFailures):
(WI.repeatedUIString.allRequests):
(WI.repeatedUIString.fetch):
(WI.repeatedUIString.revealInDOMTree):

  • UserInterface/Models/LayoutTimelineRecord.js:

(WI.LayoutTimelineRecord.displayNameForEventType):

  • UserInterface/Models/RenderingFrameTimelineRecord.js:

(WI.RenderingFrameTimelineRecord.displayNameForTaskType):

  • UserInterface/Models/Resource.js:

(WI.Resource.displayNameForType):

  • UserInterface/Views/AuditTestGroupContentView.js:

(WI.AuditTestGroupContentView.prototype.layout):

  • UserInterface/Views/CPUTimelineView.js:

(WI.CPUTimelineView.displayNameForSampleType):

  • UserInterface/Views/ContextMenuUtilities.js:
  • UserInterface/Views/DOMBreakpointTreeElement.js:

(WI.DOMBreakpointTreeElement.displayNameForType):

  • UserInterface/Views/DOMNodeTreeElement.js:

(WI.DOMNodeTreeElement.prototype.populateContextMenu):
(WI.DOMNodeTreeElement):

  • UserInterface/Views/DOMTreeElement.js:

(WI.DOMTreeElement.prototype.populateDOMNodeContextMenu):

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WI.DebuggerSidebarPanel.prototype._addBreakpoint):
(WI.DebuggerSidebarPanel.prototype._handleCreateBreakpointMouseDown):
(WI.DebuggerSidebarPanel):

  • UserInterface/Views/LayerTreeDetailsSidebarPanel.js:

(WI.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.shortDisplayNameForResourceType):
(WI.NetworkTableContentView.prototype.initialLayout):

  • UserInterface/Views/SourcesNavigationSidebarPanel.js:

(WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
(WI.SourcesNavigationSidebarPanel.prototype._handleCreateBreakpointMouseDown):

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:

(WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector):

  • UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:

(WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):

Tools:

Allow WI.UIString to take:

  • WI.UIString(string, key, comment)
  • WI.UIString(string, comment)
  • WI.UIString(string)
  • Scripts/extract-localizable-js-strings:
2:55 PM Changeset in webkit [245826] by Dewei Zhu
  • 3 edits in trunk/Tools

Limit run-benchmark http server to specific interface.
https://bugs.webkit.org/show_bug.cgi?id=198247

Reviewed by Ryosuke Niwa.

Add '--interface' option to 'twisted_http_server.py'.
'SimpleHTTPServerDriver' should specify interface for http server.
Update regex that determines http server port from 'lsof' output to support ipv6 address.

  • Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py:

Added '--interface' argument.

  • Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py:

Limited http server to a specific interfce.
Added '-P' option to 'lsof' invocation to inhibits the conversion of port numbers to port name so script won't
fail if it's listening on a 'well-known' port.
Abstracted '_check_http_server_is_running' to allow potential child class to have its own implementation.
(SimpleHTTPServerDriver.serve): Updated regex that determines http server port from 'lsof' output to support ipv6 address.
(SimpleHTTPServerDriver.kill_server): Added null check for 'self._server_process'.

2:10 PM Changeset in webkit [245825] by Shawn Roberts
  • 15 edits
    29 deletes in trunk

Unreviewed, rolling out r245475.

Newly imported test is flaky. Features need flags.

Reverted changeset:

"Implement imagesrcset and imagesizes attributes on link
rel=preload"
https://bugs.webkit.org/show_bug.cgi?id=192950
https://trac.webkit.org/changeset/245475

2:04 PM Changeset in webkit [245824] by commit-queue@webkit.org
  • 4 edits in trunk/Tools

webkitpy: Switch run-webkit-tests to tailspin
https://bugs.webkit.org/show_bug.cgi?id=198144
<rdar://problem/32463212>

Patch by David Xiong <w_xiong@apple.com> on 2019-05-28
Reviewed by Jonathan Bedard.

Changes run-webkit-tests to run tailspin on test time out
rather than spindump, and edited tests to look for tailspin logs
instead.

  • Scripts/webkitpy/port/darwin.py:

(DarwinPort.sample_process): Replaced spindump with tailspin (+ symbolication)
(DarwinPort):
(DarwinPort.tailspin_file_path):
(DarwinTest.spindump_file_path): Deleted.

  • Scripts/webkitpy/port/darwin_testcase.py:

(DarwinTest.test_tailspin): Changed spindump test (below) to test for tailspin instead
(DarwinTest.test_spindump): Deleted.
(DarwinTest.test_spindump.logging_run_command): Deleted.

  • Scripts/webkitpy/port/ios_device_unittest.py:

(IOSDeviceTest.test_tailspin): Changed spindump tests (inc. below) to test for tailspin instead
(IOSDeviceTest.test_sample_process.logging_run_command):
(IOSDeviceTest.test_sample_process_exception.throwing_run_command):
(IOSDeviceTest.test_spindump): Deleted.
(IOSDeviceTest.test_spindump.logging_run_command): Deleted.

2:02 PM Changeset in webkit [245823] by Brent Fulgham
  • 18 edits in trunk/Source

Protect frames during style and layout changes
https://bugs.webkit.org/show_bug.cgi?id=198047
<rdar://problem/50954082>

Reviewed by Zalan Bujtas.

Be more careful about the scope and lifetime of objects that participate in layout or
style updates. If a method decides a layout or style update is needed, it needs to
confirm that the elements it was operating on are still valid and needed in the
current operation.

Source/WebCore:

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::getOrCreate):

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::accessibilityHitTest const):

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyinStyle):

  • css/CSSComputedStyleDeclaration.h:
  • css/SVGCSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::svgPropertyValue):

  • dom/Document.cpp:

(WebCore::Document::setFocusedElement):

  • editing/TypingCommand.cpp:

(WebCore::TypingCommand::insertTextRunWithoutNewlines):
(WebCore::TypingCommand::insertLineBreak):
(WebCore::TypingCommand::insertParagraphSeparator):
(WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent):

  • editing/ios/EditorIOS.mm:

(WebCore::Editor::setDictationPhrasesAsChildOfElement):

  • html/HTMLLabelElement.cpp:

(WebCore::HTMLLabelElement::focus):

  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::appendFormData):

  • html/ImageDocument.cpp:

(WebCore::ImageDocument::imageClicked):

  • html/ValidationMessage.cpp:

(WebCore::ValidationMessage::buildBubbleTree):

  • page/FrameView.cpp:

(WebCore::FrameView::autoSizeIfEnabled):
(WebCore::FrameView::trackedRepaintRectsAsText const):

  • page/PrintContext.cpp:

(WebCore::PrintContext::pageProperty):
(WebCore::PrintContext::numberOfPages):
(WebCore::PrintContext::spoolAllPagesWithBoundaries):

Source/WebKitLegacy/mac:

  • DOM/DOM.mm:

(-[DOMRange renderedImageForcingBlackText:renderedImageForcingBlackText:]):

  • WebView/WebHTMLView.mm:

(-[WebHTMLView _selectionDraggingImage]):
(-[WebHTMLView selectionImageForcingBlackText:selectionImageForcingBlackText:]):

12:29 PM Changeset in webkit [245822] by Brent Fulgham
  • 4 edits in trunk/Source/WebKit

Remove dead code from sandboxes
https://bugs.webkit.org/show_bug.cgi?id=198300

Reviewed by Alexey Proskuryakov.

SSIA.

  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
12:10 PM Changeset in webkit [245821] by Devin Rousso
  • 4 edits in trunk/LayoutTests

REGRESSION (r244182): inspector/canvas/recording-webgl-snapshots.html became flaky on WK1
https://bugs.webkit.org/show_bug.cgi?id=196875
<rdar://problem/49873252>

Reviewed by Said Abou-Hallawa.

Remove the frameLimit configuration on these tests, as they're short enough that when
running in debug, the timing between the InspectorCanvasAgent automatically stopping the
recording and the test page's LastFrame event (which will manually stop the recording) is
too close and can result in a race condition.

Instead, just wait for the test page to say "done" (LastFrame) before stopping the
recording, ensuring that the full "flow" of the recording is under the control of the test.

This isn't an issue when using Web Inspector "normally" (e.g. not in a test), because the
frontend UI will "ignore" these types of errors, not to mention it would be much harder for
a person to get the timing just right to even encounter this situation.

  • inspector/canvas/recording-webgl-snapshots.html:
  • inspector/canvas/recording-webgl2-snapshots.html:
  • platform/mac/TestExpectations:
12:08 PM Changeset in webkit [245820] by commit-queue@webkit.org
  • 5 edits in trunk/LayoutTests

[Pointer Events WPT] Unflake imported/w3c/web-platform-tests/pointerevents/pointerevent_suppress_compat_events_on_drag_mouse.html
https://bugs.webkit.org/show_bug.cgi?id=197008

Patch by Antoine Quint <Antoine Quint> on 2019-05-28
Reviewed by Jon Lee.

We raised an issue on the WPT test which was testing the event timestamp in an invalid manner (see https://github.com/w3c/pointerevents/issues/284
and https://github.com/web-platform-tests/wpt/issues/170160). As a result this test now passes reliably, so we can update the expected out and
the TestExpectations.

LayoutTests/imported/w3c:

  • web-platform-tests/pointerevents/pointerevent_suppress_compat_events_on_drag_mouse-expected.txt:
  • web-platform-tests/pointerevents/pointerevent_suppress_compat_events_on_drag_mouse.html:

LayoutTests:

  • platform/mac/TestExpectations:
12:06 PM Changeset in webkit [245819] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

webkitpy: Using sudo on iOS device during timeout spindumps
https://bugs.webkit.org/show_bug.cgi?id=198142

Patch by David Xiong <w_xiong@apple.com> on 2019-05-28
Reviewed by Jonathan Bedard.

  • Scripts/webkitpy/port/darwin.py:

(DarwinPort.sample_process): Check target host instead of source host for sudo command.

11:11 AM Changeset in webkit [245818] by Antti Koivisto
  • 20 edits
    4 adds in trunk

[async scrolling] Fixed positioning inside stacking context overflow scroll is jumpy
https://bugs.webkit.org/show_bug.cgi?id=198292

Reviewed by Darin Adler.

Source/WebCore:

Tests: scrollingcoordinator/ios/fixed-in-stacking-context-overflow-scroll-2.html

scrollingcoordinator/ios/fixed-in-stacking-context-overflow-scroll.html

We were computing delta from the layout scroll position in ScrollingTree::notifyRelatedNodesAfterScrollPositionChange
based on the passed in node only. If any other node had deltas they were not taken into account at all. This would occur
frequently since the function is always invoked for the root node after layer tree commit.

Fix by moving the delta computation (and fetching layoutViewport) to ScrollingTreeFixedNode.

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::applyLayerPositions):

No need to pass offset and layoutViewport around anymore.

(WebCore::ScrollingTree::applyLayerPositionsRecursive):
(WebCore::ScrollingTree::notifyRelatedNodesAfterScrollPositionChange):

Remove the offset and layoutViewport computations.

(WebCore::ScrollingTree::notifyRelatedNodesRecursive):

  • page/scrolling/ScrollingTree.h:
  • page/scrolling/ScrollingTreeFrameHostingNode.cpp:

(WebCore::ScrollingTreeFrameHostingNode::applyLayerPositions):

  • page/scrolling/ScrollingTreeFrameHostingNode.h:
  • page/scrolling/ScrollingTreeNode.cpp:

(WebCore::ScrollingTreeNode::relatedNodeScrollPositionDidChange):

  • page/scrolling/ScrollingTreeNode.h:
  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::applyLayerPositions):

  • page/scrolling/ScrollingTreeScrollingNode.h:
  • page/scrolling/cocoa/ScrollingTreeFixedNode.h:
  • page/scrolling/cocoa/ScrollingTreeFixedNode.mm:

(WebCore::ScrollingTreeFixedNode::applyLayerPositions):

Compute them here instead, always taking all overflow scrollers up to the closest frame into account.

  • page/scrolling/cocoa/ScrollingTreePositionedNode.h:
  • page/scrolling/cocoa/ScrollingTreePositionedNode.mm:

(WebCore::ScrollingTreePositionedNode::applyLayerPositions):
(WebCore::ScrollingTreePositionedNode::relatedNodeScrollPositionDidChange):

  • page/scrolling/cocoa/ScrollingTreeStickyNode.h:
  • page/scrolling/cocoa/ScrollingTreeStickyNode.mm:

(WebCore::ScrollingTreeStickyNode::applyLayerPositions):

LayoutTests:

  • scrollingcoordinator/ios/fixed-in-stacking-context-overflow-scroll-2-expected.html: Added.
  • scrollingcoordinator/ios/fixed-in-stacking-context-overflow-scroll-2.html: Added.
  • scrollingcoordinator/ios/fixed-in-stacking-context-overflow-scroll-expected.html: Added.
  • scrollingcoordinator/ios/fixed-in-stacking-context-overflow-scroll.html: Added.
10:33 AM Changeset in webkit [245817] by Brent Fulgham
  • 3 edits in trunk/Source/WebKit

Update sandbox rules for more News use cases
https://bugs.webkit.org/show_bug.cgi?id=198236
<rdar://problem/50054027>

Reviewed by Alexey Proskuryakov.

Update the WebContent and Network process sandboxes so that News has the same set of allowed
service access as regular WebKit views.

  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
10:29 AM Changeset in webkit [245816] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][Verification] Add additional inline and block checks
https://bugs.webkit.org/show_bug.cgi?id=198252
<rdar://problem/51140687>

Reviewed by Antti Koivisto.

Now we also test the geometry of the blocks with inline formatting contexts.

  • layout/Verification.cpp:

(WebCore::Layout::checkForMatchingTextRuns):
(WebCore::Layout::verifyAndOutputSubtree):

10:19 AM Changeset in webkit [245815] by msaboff@apple.com
  • 3 edits
    1 add in trunk

[YARR] Properly handle RegExp's that require large ParenContext space
https://bugs.webkit.org/show_bug.cgi?id=198065

Reviewed by Keith Miller.

JSTests:

New test.

  • stress/regexp-large-paren-context.js: Added.

(testLargeRegExp):

Source/JavaScriptCore:

Changed what happens when we exceed VM::patternContextBufferSize when compiling a RegExp
that needs ParenCOntextSpace to fail the RegExp JIT compilation and fall back to the YARR
interpreter. This can save large amounts of JIT memory for a
JIT'ed function that cannot ever succeed.

  • yarr/YarrJIT.cpp:

(JSC::Yarr::YarrGenerator::initParenContextFreeList):
(JSC::Yarr::YarrGenerator::compile):

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

[ews-build] Remove unused buildbot tabs
https://bugs.webkit.org/show_bug.cgi?id=198108

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/templates/build.jade: Removed unused 'Changes' and 'Responsible Users' tabs.
9:03 AM Changeset in webkit [245813] by Tadeu Zagallo
  • 4 edits
    1 add in trunk

JITOperations putByVal should mark negative array indices as out-of-bounds
https://bugs.webkit.org/show_bug.cgi?id=198271

Reviewed by Saam Barati.

JSTests:

  • microbenchmarks/get-by-val-negative-array-index.js:

(foo):
Update the getByVal microbenchmark added in r245769. This now shows that r245769
is 4.2x faster than the previous commit.

  • microbenchmarks/put-by-val-negative-array-index.js: Added.

(foo):

Source/JavaScriptCore:

Similar to what was done to getByVal in r245769, we should also mark put_by_val as out-of-bounds
when we exit from DFG for putting to a negative index. This avoids the same scenario where we keep
recompiling a CodeBlock with DFG and exiting at the same bytecode.

This is a 3.7x improvement in the microbenchmark being added: put-by-val-negative-array-index.js.

  • jit/JITOperations.cpp:
8:36 AM Changeset in webkit [245812] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] Decouple line layout and processing inline runs.
https://bugs.webkit.org/show_bug.cgi?id=198282
<rdar://problem/51167954>

Reviewed by Antti Koivisto.

This is in preparation for using "createInlineRunsForLine" logic when computing preferred width.

  • layout/inlineformatting/InlineFormattingContext.h:
  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::UncommittedContent::size const):
(WebCore::Layout::InlineFormattingContext::LineLayout::createInlineRunsForLine const):
(WebCore::Layout::InlineFormattingContext::LineLayout::layout const):
(WebCore::Layout::InlineFormattingContext::LineLayout::processInlineRuns const):
(WebCore::Layout::InlineFormattingContext::LineLayout::closeLine const): Deleted.

  • layout/inlineformatting/InlineFormattingState.h:

(WebCore::Layout::InlineFormattingState::addInlineItem):

  • layout/inlineformatting/InlineTextItem.cpp:

(WebCore::Layout::InlineTextItem::createAndAppendTextItems):

7:51 AM Changeset in webkit [245811] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Move intrinsic width computation from InlineFormattingContext to LineLayout
https://bugs.webkit.org/show_bug.cgi?id=198258

Reviewed by Antti Koivisto.

This is in preparation for sharing even more code between line layout and preferred width computation.

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::layout const):
(WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthConstraints const):

  • layout/inlineformatting/InlineFormattingContext.h:
  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::InlineFormattingContext::LineLayout::initializeLine const):
(WebCore::Layout::InlineFormattingContext::LineLayout::layout const):
(WebCore::Layout::InlineFormattingContext::LineLayout::computedIntrinsicWidth const):
(WebCore::Layout::InlineFormattingContext::LineLayout::closeLine const):

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

[LFC[IFC] Ignore the initial strut's height when the line does not have any content.
https://bugs.webkit.org/show_bug.cgi?id=198268
<rdar://problem/51150057>

Reviewed by Antti Koivisto.

The strut (https://www.w3.org/TR/CSS22/visudet.html#leading) defines the initial logical height
for the line. This height should be ignored though when the line does not have any content.

  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

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

5:33 AM Changeset in webkit [245809] by graouts@webkit.org
  • 4 edits in trunk/Source/WebCore

[Pointer Events] Check that capturing data managed by the PointerCaptureController gets cleared upon navigation
https://bugs.webkit.org/show_bug.cgi?id=198191

Reviewed by Dean Jackson.

When the document of the page's main frame changes, make sure we clear all of the data accumulated for the previous document.
I don't think this particular change is testable as none of the data contained in the PointerIdToCapturingDataMap maintained by
the PointerCaptureController contains any data that could be inspected by the page due to other fixes landed to fix wkb.ug/198129,
but I've checked that removing those fixes and using this patch correctly fixes that bug.

  • page/Page.cpp:

(WebCore::Page::didChangeMainDocument):

  • page/PointerCaptureController.cpp:

(WebCore::PointerCaptureController::PointerCaptureController):
(WebCore::PointerCaptureController::reset):

  • page/PointerCaptureController.h:
1:45 AM Changeset in webkit [245808] by ysuzuki@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

Unreviewed, revert r242070 due to Membuster regression
https://bugs.webkit.org/show_bug.cgi?id=195013

Membuster shows ~0.3% regression.

  • heap/Heap.cpp:

(JSC::Heap::Heap):
(JSC::Heap::runBeginPhase):

  • heap/Heap.h:
  • heap/HeapInlines.h:

(JSC::Heap::forEachSlotVisitor):
(JSC::Heap::numberOfSlotVisitors): Deleted.

  • heap/MarkingConstraintSolver.cpp:

(JSC::MarkingConstraintSolver::didVisitSomething const):

  • heap/SlotVisitor.h:

May 27, 2019:

11:36 PM Changeset in webkit [245807] by Carlos Garcia Campos
  • 49 edits in trunk

[GTK] Use WPEBackend-fdo for accelerating compositing in Wayland instead of the nested compositor
https://bugs.webkit.org/show_bug.cgi?id=197944

Reviewed by Michael Catanzaro.

.:

Add USE_WPE_RENDERER option to use WPEBackend-fdo.

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsPlayStation.cmake:
  • Source/cmake/OptionsWPE.cmake:

Source/WebCore:

  • PlatformGTK.cmake:
  • SourcesGTK.txt:
  • platform/graphics/GLContext.cpp:

(WebCore::GLContext::createContextForWindow): Check current display is X11 before trying to create a GLX context.

  • platform/graphics/PlatformDisplay.cpp:

(WebCore::PlatformDisplay::createPlatformDisplay): Use USE(WPE_RENDERER) instead of USE(LIBWPE).

  • platform/graphics/PlatformDisplay.h:
  • platform/graphics/egl/GLContextEGL.cpp:

(WebCore::GLContextEGL::createWindowContext): Use USE(WPE_RENDERER) instead of PLATFORM(WPE).
(WebCore::GLContextEGL::createContext): Ditto.
(WebCore::GLContextEGL::createSharingContext): Ditto.
(WebCore::GLContextEGL::~GLContextEGL): Ditto.

  • platform/graphics/egl/GLContextEGL.h:
  • platform/graphics/egl/GLContextEGLLibWPE.cpp:
  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext): Ditto.

  • platform/graphics/libwpe/PlatformDisplayLibWPE.cpp:

(WebCore::PlatformDisplayLibWPE::PlatformDisplayLibWPE): In GTK port set the display as the shared one for compositing.

  • platform/graphics/libwpe/PlatformDisplayLibWPE.h:

Source/WebKit:

The WPEBackend-fdo implementation is quite similar to our Wayland nested compositor, but more efficient (using
linux dmabuf, resource caching, etc.). This allows us to share even more code with WPE port too.

  • PlatformGTK.cmake:
  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:

(WebKit::ThreadedCompositor::forceRepaint): WPE doesn't support force repaint yet.

  • Shared/WebPageCreationParameters.cpp:

(WebKit::WebPageCreationParameters::encode const): Use USE(WPE_RENDERER) instead of PLATFORM(WPE).
(WebKit::WebPageCreationParameters::decode): Ditto.

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

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

  • Shared/WebProcessCreationParameters.h:
  • SourcesGTK.txt:
  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::hostFileDescriptor): Implement it when using WPE just calling webkitWebViewBaseRenderHostFileDescriptor().

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

(webkitWebViewBaseCreateWebPage): Initialize the web page after the accelerated backing store is created, since
it's used now during intialization.
(webkitWebViewBaseRenderHostFileDescriptor): Return AcceleratedBackingStore::renderHostFileDescriptor()

  • UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
  • UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::creationParameters): Use USE(WPE_RENDERER) instead of PLATFORM(WPE).

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::initializeNewWebProcess): Remove wayland display name initialization.

  • UIProcess/glib/WebProcessPoolGLib.cpp:

(WebKit::WebProcessPool::platformInitializeWebProcess): Initialize wayland display name when not using WPE here
now. In case of using WPE, initialize hostClientFileDescriptor and implementationLibraryName.

  • UIProcess/glib/WebProcessProxyGLib.cpp:

(WebKit::WebProcessProxy::platformGetLaunchOptions): Remove unused wayland socket command line process parameter.

  • UIProcess/gtk/AcceleratedBackingStore.h:

(WebKit::AcceleratedBackingStore::renderHostFileDescriptor): Return -1 by default.

  • UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:

(WebKit::AcceleratedBackingStoreWayland::create): When using WPE call wpe_fdo_initialize_for_egl_display() and
check we have the required extensions.
(WebKit::AcceleratedBackingStoreWayland::AcceleratedBackingStoreWayland): When using WPE initialize the view backend.
(WebKit::AcceleratedBackingStoreWayland::~AcceleratedBackingStoreWayland): When using WPE release the EGL images
still in use and the view texture.
(WebKit::AcceleratedBackingStoreWayland::renderHostFileDescriptor): Call wpe_view_backend_get_renderer_host_fd().
(WebKit::AcceleratedBackingStoreWayland::displayBuffer): Create the view texture if needed, save the pending
image and schedule a redraw.
(WebKit::AcceleratedBackingStoreWayland::paint): When using WPE commit the pending image and use it as target of
the view texture.

  • UIProcess/gtk/AcceleratedBackingStoreWayland.h:
  • UIProcess/gtk/HardwareAccelerationManager.cpp:

(WebKit::HardwareAccelerationManager::HardwareAccelerationManager): When using WPE disable hardware acceleration
if wpe_fdo_initialize_for_egl_display() fails.

  • UIProcess/gtk/WaylandCompositor.cpp:
  • UIProcess/gtk/WaylandCompositor.h:
  • WebProcess/WebPage/AcceleratedSurface.cpp:

(WebKit::AcceleratedSurface::create): Create an AcceleratedSurfaceLibWPE for GTK port when using WPE and shared
display is Wayland.

  • WebProcess/WebPage/WebPage.cpp:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/libwpe/AcceleratedSurfaceLibWPE.cpp:

(WebKit::AcceleratedSurfaceLibWPE::initialize): Use the shared display for compositing instead of shared display.

  • WebProcess/WebPage/libwpe/AcceleratedSurfaceLibWPE.h:
  • WebProcess/WebProcess.h:
  • WebProcess/glib/WebProcessGLib.cpp:

(WebKit::WebProcess::platformInitializeWebProcess): Initialize the wpe display when using WPE.

Tools:

Add WPEBackend-fdo to jhbuild moduleset.

  • gtk/jhbuild.modules:
9:06 PM Changeset in webkit [245806] by bshafiei@apple.com
  • 7 edits in branches/safari-608.1.24.20-branch

Revert r245775. rdar://problem/35205373

9:06 PM Changeset in webkit [245805] by bshafiei@apple.com
  • 13 edits in branches/safari-608.1.24.20-branch

Revert r245637. rdar://problem/35205373

6:36 PM Changeset in webkit [245804] by bshafiei@apple.com
  • 8 edits in branches/safari-608.1.24.20-branch

Cherry-pick r245803. rdar://problem/51145977

[iOS] Dropping in an editable element should result in a ranged selection
https://bugs.webkit.org/show_bug.cgi?id=198267
<rdar://problem/51145977>

Reviewed by Tim Horton.

Source/WebKit:

When drag and drop was first implemented for iOS in iOS 11, selection behavior when dropping into editable
elements matched that of macOS, by leaving the inserted content selected after performing the drop. However, in
other parts of the platform (e.g. Notes), both the keyboard and selection views are not shown after a drop.

Instead of matching macOS behavior, WebKit on iOS should match the rest of the platform. This is a little
tricky, since we use the selection range after a drop to create a TextIndicator snapshot when creating a drag
preview. To resolve this, we refactor some of the logic introduced in r245778 to remember the DOM range to
snapshot before collapsing the range to the end of the inserted content.

Tested by adjusting some existing API tests.

  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:]):

Remove some logic that currently presents the keyboard while the user is performing a drop that focuses an
editable element.

  • WebProcess/WebPage/WebPage.h:

Add a member variable to keep track of which range should be snapshotted when generating a drop preview.

  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::didConcludeDrop): (WebKit::WebPage::didConcludeEditDrag):

Collapse the selection range to the end after an edit drag (i.e., a drop in an editable area that inserted
content).

(WebKit::WebPage::computeAndSendEditDragSnapshot):

Tools:

Adjust some existing API tests that currently check for selection rects after a drop. Instead of checking for
visible selection rects, simply check for the start caret rect, as determined by WKContentView's
-selectionRange.

  • TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm: (TestWebKitAPI::TEST): (makeCGRectValue): Deleted. (checkSelectionRectsWithLogging): Deleted.
  • TestWebKitAPI/cocoa/DragAndDropSimulator.h:

Replace finalSelectionRects with finalSelectionStartRect.

  • TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm: (-[DragAndDropSimulator _resetSimulatedState]): (-[DragAndDropSimulator runFrom:to:additionalItemRequestLocations:]): (-[DragAndDropSimulator finalSelectionRects]): Deleted.

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

6:03 PM Changeset in webkit [245803] by Wenson Hsieh
  • 8 edits in trunk

[iOS] Dropping in an editable element should result in a ranged selection
https://bugs.webkit.org/show_bug.cgi?id=198267
<rdar://problem/51145977>

Reviewed by Tim Horton.

Source/WebKit:

When drag and drop was first implemented for iOS in iOS 11, selection behavior when dropping into editable
elements matched that of macOS, by leaving the inserted content selected after performing the drop. However, in
other parts of the platform (e.g. Notes), both the keyboard and selection views are not shown after a drop.

Instead of matching macOS behavior, WebKit on iOS should match the rest of the platform. This is a little
tricky, since we use the selection range after a drop to create a TextIndicator snapshot when creating a drag
preview. To resolve this, we refactor some of the logic introduced in r245778 to remember the DOM range to
snapshot before collapsing the range to the end of the inserted content.

Tested by adjusting some existing API tests.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:]):

Remove some logic that currently presents the keyboard while the user is performing a drop that focuses an
editable element.

  • WebProcess/WebPage/WebPage.h:

Add a member variable to keep track of which range should be snapshotted when generating a drop preview.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::didConcludeDrop):
(WebKit::WebPage::didConcludeEditDrag):

Collapse the selection range to the end after an edit drag (i.e., a drop in an editable area that inserted
content).

(WebKit::WebPage::computeAndSendEditDragSnapshot):

Tools:

Adjust some existing API tests that currently check for selection rects after a drop. Instead of checking for
visible selection rects, simply check for the start caret rect, as determined by WKContentView's
-selectionRange.

  • TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:

(TestWebKitAPI::TEST):
(makeCGRectValue): Deleted.
(checkSelectionRectsWithLogging): Deleted.

  • TestWebKitAPI/cocoa/DragAndDropSimulator.h:

Replace finalSelectionRects with finalSelectionStartRect.

  • TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:

(-[DragAndDropSimulator _resetSimulatedState]):
(-[DragAndDropSimulator runFrom:to:additionalItemRequestLocations:]):
(-[DragAndDropSimulator finalSelectionRects]): Deleted.

5:10 PM Changeset in webkit [245802] by commit-queue@webkit.org
  • 6 edits in trunk

[CURL] Fix crashing SocketStreamHandle.
https://bugs.webkit.org/show_bug.cgi?id=197873

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

Source/WebCore:

When NetworkSocketStream was destructed SocketStreamHandleImple::platformClose was called wrongly times.
This is because closed state is not set.

Test: http/tests/websocket/tests/hybi/workers/close.html

  • platform/network/curl/SocketStreamHandleImpl.h:
  • platform/network/curl/SocketStreamHandleImplCurl.cpp:

(WebCore::SocketStreamHandleImpl::platformSendInternal):
(WebCore::SocketStreamHandleImpl::platformClose):
(WebCore::SocketStreamHandleImpl::threadEntryPoint):
(WebCore::SocketStreamHandleImpl::handleError):
(WebCore::SocketStreamHandleImpl::callOnWorkerThread):
(WebCore::SocketStreamHandleImpl::executeTasks):

LayoutTests:

  • platform/wincairo-wk1/TestExpectations:
  • platform/wincairo/TestExpectations:
3:00 PM Changeset in webkit [245801] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed Win Cairo build fix after r245796.

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::getAllStorageAccessEntries):

2:51 PM Changeset in webkit [245800] by Tadeu Zagallo
  • 3 edits in trunk/Source/JavaScriptCore

Fix opensource build of testapi
https://bugs.webkit.org/show_bug.cgi?id=198256

Reviewed by Alexey Proskuryakov.

In r245564, we added custom entitlements to testapi to allow caching
bytecode in data vaults, but we should only use the entitlements for
internal builds. Otherwises, testapi gets killed on launch. Also fix the
formatting for the errors added in the same patch, according to comments
in the bug after the patch had already landed.

  • API/JSScript.mm:

(validateBytecodeCachePath):

  • Configurations/ToolExecutable.xcconfig:
2:50 PM Changeset in webkit [245799] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed Win Cairo build fix after r245796.

  • Shared/WebPageCreationParameters.cpp:

(WebKit::WebPageCreationParameters::decode):

2:27 PM Changeset in webkit [245798] by Oriol Brufau
  • 19 edits
    4 adds in trunk

[css-grid] Preserve repeat() notation when serializing declared values
https://bugs.webkit.org/show_bug.cgi?id=197840

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Import WPT test.

  • web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002-expected.txt: Added.
  • web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002.html: Added.
  • web-platform-tests/css/css-grid/grid-definition/w3c-import.log:

Source/WebCore:

Tests: fast/css-grid-layout/grid-element-auto-repeat-get-set.html

fast/css-grid-layout/grid-repeat-calc.html
fast/css-grid-layout/named-grid-line-get-set.html
imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002.html

Before this change, a repeat() notation with an integral number of
repetitions was expanded at parse time. This was observable when reading
declared values using JS APIs.

This patch makes the parser preserve that notation, like it was already
happening when the number of repetitions was automatic and not integral.

The resolved value in getComputedStyle() will still be expanded, though,
as required by the spec.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSGridIntegerRepeatValue.cpp: Added.

(WebCore::CSSGridIntegerRepeatValue::customCSSText const):
(WebCore::CSSGridIntegerRepeatValue::equals const):

  • css/CSSGridIntegerRepeatValue.h: Added.
  • css/CSSValue.cpp:

(WebCore::CSSValue::equals const):
(WebCore::CSSValue::cssText const):
(WebCore::CSSValue::destroy):

  • css/CSSValue.h:

(WebCore::CSSValue::isGridIntegerRepeatValue const):

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::createGridTrackList):
(WebCore::StyleBuilderConverter::convertGridTrackSizeList):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeGridTrackRepeatFunction):

Tools:

Adapt CSSPropertyParserTest to CSSGridIntegerRepeatValue.

  • TestWebKitAPI/Tests/WebCore/CSSParser.cpp:

(TestWebKitAPI::computeNumberOfTracks):

LayoutTests:

Update test expectations.

  • fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt:
  • fast/css-grid-layout/grid-element-auto-repeat-get-set.html:
  • fast/css-grid-layout/grid-repeat-calc-expected.txt:
  • fast/css-grid-layout/grid-repeat-calc.html:
  • fast/css-grid-layout/named-grid-line-get-set-expected.txt:
  • fast/css-grid-layout/named-grid-line-get-set.html:
2:21 PM Changeset in webkit [245797] by bshafiei@apple.com
  • 7 edits in branches/safari-608.1.24.20-branch/Source

Versioning.

1:30 PM Changeset in webkit [245796] by Chris Dumez
  • 185 edits
    1 copy in trunk/Source

Use a strongly-typed identifier for pages
https://bugs.webkit.org/show_bug.cgi?id=198206

Reviewed by Youenn Fablet.

Source/WebCore:

  • WebCore/*:

Source/WebKit:

  • WebKit/*:

Source/WebKitLegacy:

  • WebCoreSupport/WebResourceLoadScheduler.cpp:

(WebResourceLoadScheduler::pageLoadCompleted):

  • WebCoreSupport/WebResourceLoadScheduler.h:

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebFrameLoaderClient.h:
  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::pageID const):

Source/WTF:

  • wtf/ObjectIdentifier.h:

(WTF::operator<<):

9:19 AM Changeset in webkit [245795] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[Pointer Events] Test at pointerevents/ios/touch-action-none-in-overflow-scrolling-touch.html times out
https://bugs.webkit.org/show_bug.cgi?id=198275
<rdar://problem/50618496>

Patch by Antoine Quint <Antoine Quint> on 2019-05-27
Reviewed by Antti Koivisto.

Only WKCompositingView instances may have associated touch-action data, so we should filter out any hit-testing view
that isn't a WKCompositingView when finding the view that should hit-test when looking for touch-action information.

  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:

(WebKit::touchActionsForPoint):

9:06 AM Changeset in webkit [245794] by Simon Fraser
  • 6 edits in trunk/Source/WebCore

Move GraphicsLayerCA::adjustTiledLayerVisibleRect() to TileController
https://bugs.webkit.org/show_bug.cgi?id=198266

Reviewed by Zalan Bujtas.

GraphicsLayerCA::adjustTiledLayerVisibleRect() was computing tile coverage for a
TiledBacking, just like TileController::adjustTileCoverageRect(), so move the code
into TileController as a first step to unifying more of this code. It's currently
used for tiled compositing layers, including overflow:scroll, and tiled layers
whose coverage may be affected by animations, so it's general-purpose.

TileController::adjustTileCoverageRect() is used for scrollable things, so rename
it to adjustTileCoverageRectForScrolling().

No behavior change.

  • platform/graphics/TiledBacking.h:
  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::adjustCoverageRect const):
(WebCore::GraphicsLayerCA::adjustTiledLayerVisibleRect): Deleted.

  • platform/graphics/ca/GraphicsLayerCA.h:
  • platform/graphics/ca/TileController.cpp:

(WebCore::TileController::adjustTileCoverageRect const):
(WebCore::TileController::adjustTileCoverageRectForScrolling const):

  • platform/graphics/ca/TileController.h:
9:00 AM Changeset in webkit [245793] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Fix Apple Internal builds after r245788.

  • platform/PlatformScreen.h:

(WebCore::screenHasTouchDevice):
(WebCore::screenIsTouchPrimaryInputDevice):

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

[LFC][IFC] Ignore collapsed runs when setting the width on the associated display boxes.
https://bugs.webkit.org/show_bug.cgi?id=198260
<rdar://problem/51145704>

Reviewed by Antti Koivisto.

Collapsed runs don't contribute to the logical width of their containers.

Covered by existing tests.

  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

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

2:55 AM Changeset in webkit [245791] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.25.1

WebKitGTK 2.25.1

2:54 AM Changeset in webkit [245790] by Carlos Garcia Campos
  • 4 edits in trunk

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.25.1 release

.:

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

Source/WebKit:

  • gtk/NEWS: Add release notes for 2.25.1.
2:52 AM Changeset in webkit [245789] by Carlos Garcia Campos
  • 5 edits in trunk/Source

Unreviewed. Fix GTK distcheck

Source/WebCore:

Move mac headers to platform specific makefile.

  • Headers.cmake:
  • PlatformMac.cmake:

Source/WebKit:

Remove symbols that are not longer present in the library.

  • webkitglib-symbols.map:
1:34 AM Changeset in webkit [245788] by Carlos Garcia Campos
  • 11 edits in trunk

Touch support is reported even when the device doesn't have a touch screen
https://bugs.webkit.org/show_bug.cgi?id=139681

Reviewed by Michael Catanzaro.

Source/WebCore:

Add screenHasTouchDevice() and screenIsTouchPrimaryInputDevice() to PlatformScreen and use it to decide whether
to expose touch events functionality or not.

  • bindings/js/WebCoreBuiltinNames.h:
  • css/MediaQueryEvaluator.cpp:

(WebCore::hoverEvaluate): Use screenIsTouchPrimaryInputDevice() when touch events are enabled at build time.
(WebCore::anyHoverEvaluate): Use screenHasTouchDevice() when touch events are enabled at build time.
(WebCore::pointerEvaluate): Use screenIsTouchPrimaryInputDevice() when touch events are enabled at build time.
(WebCore::anyPointerEvaluate): Use screenHasTouchDevice() when touch events are enabled at build time.

  • dom/GlobalEventHandlers.idl: Make touch event attributes enabled at runtime.
  • page/RuntimeEnabledFeatures.cpp:

(WebCore::RuntimeEnabledFeatures::touchEventsEnabled const): Return whether touch events are enabled.

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setTouchEventsEnabled): Force touch events to be enabled or disabled.

  • platform/PlatformScreen.h:

(WebCore::screenHasTouchDevice): Just return true when touch events are enabled at build time for non-gtk ports.
(WebCore::screenIsTouchPrimaryInputDevice): Ditto.

  • platform/gtk/PlatformScreenGtk.cpp:

(WebCore::screenHasTouchDevice):
(WebCore::screenIsTouchPrimaryInputDevice):
(WebCore::isTouchDevice):
(WebCore::deviceAddedCallback):
(WebCore::deviceRemovedCallback):

LayoutTests:

Remove expectations for tests that are passing now.

  • platform/gtk/TestExpectations:

May 26, 2019:

6:12 PM Changeset in webkit [245787] by Simon Fraser
  • 16 edits
    2 adds in trunk/Source

Move VelocityData to WebCore
https://bugs.webkit.org/show_bug.cgi?id=198261

Reviewed by Antti Koivisto.

Move VelocityData and HistoricalVelocityData to WebCore for future use in overflow scroll.
Source/WebCore:

VisibleContentRectUpdateInfo can now store a VelocityData (its timestamp is used as
the timetamp for the entire update).

No behavior change.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • page/FrameView.cpp:

(WebCore::FrameView::setScrollVelocity):

  • page/FrameView.h:
  • platform/graphics/TiledBacking.h:

(WebCore::VelocityData::VelocityData): Deleted.
(WebCore::VelocityData::velocityOrScaleIsChanging const): Deleted.

  • platform/graphics/ca/TileController.cpp:

(WebCore::TileController::adjustTileCoverageRect const):

  • platform/graphics/ca/TileController.h:

Source/WebKit:

VisibleContentRectUpdateInfo can now store a VelocityData (its timestamp is used as
the timetamp for the entire update).

  • Shared/VisibleContentRectUpdateInfo.cpp:

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

  • Shared/VisibleContentRectUpdateInfo.h:

(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::scrollVelocity const):
(WebKit::VisibleContentRectUpdateInfo::enclosedInScrollableAncestorView const):
(WebKit::VisibleContentRectUpdateInfo::timestamp const):
(WebKit::operator==):
(WebKit::VisibleContentRectUpdateInfo::horizontalVelocity const): Deleted.
(WebKit::VisibleContentRectUpdateInfo::verticalVelocity const): Deleted.
(WebKit::VisibleContentRectUpdateInfo::scaleChangeRate const): Deleted.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<VelocityData>::encode):
(IPC::ArgumentCoder<VelocityData>::decode):

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

(-[WKContentView didUpdateVisibleRect:unobscuredRect:contentInsets:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
(WebKit::HistoricalVelocityData::VelocityData::VelocityData): Deleted.
(WebKit::HistoricalVelocityData::HistoricalVelocityData): Deleted.
(WebKit::HistoricalVelocityData::velocityForNewData): Deleted.
(WebKit::HistoricalVelocityData::clear): Deleted.
(WebKit::HistoricalVelocityData::append): Deleted.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::dynamicViewportSizeUpdate):
(WebKit::WebPage::viewportConfigurationChanged):
(WebKit::adjustVelocityDataForBoundedScale):
(WebKit::WebPage::updateVisibleContentRects):

5:10 PM Changeset in webkit [245786] by Simon Fraser
  • 6 edits in trunk/Source/WebCore

Add a GraphicsLayer::Type for ScrolledContents
https://bugs.webkit.org/show_bug.cgi?id=198257

Reviewed by Zalan Bujtas.

This ScrolledContents layer type will be used to choose different tiling behaviors
in a future patch.

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::supportsLayerType):

  • platform/graphics/GraphicsLayer.h:
  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayer::supportsLayerType):
(WebCore::GraphicsLayerCA::initialize):
(WebCore::GraphicsLayerCA::adjustCoverageRect const):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateScrollingLayers):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::ensureRootLayer):

4:16 PM Changeset in webkit [245785] by bshafiei@apple.com
  • 1 copy in tags/Safari-608.1.24.20.5

Tag Safari-608.1.24.20.5.

3:39 PM Changeset in webkit [245784] by wilander@apple.com
  • 22 edits
    3 adds in trunk

Resource Load Statistics: Downgrade document.referrer to the referrer's eTLD+1 if the page was navigated to with a prevalent resource referrer containing link decoration
https://bugs.webkit.org/show_bug.cgi?id=198227
<rdar://problem/51117258>

Reviewed by Alex Christensen.

Source/WebCore:

Test: http/tests/resourceLoadStatistics/downgraded-referrer-for-navigation-with-link-query-from-prevalent-resource.html

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/Document.cpp:

(WebCore::Document::referrer const):

Now checks if the referrer has been overridden.

(WebCore::Document::wasLoadedWithDataTransferFromPrevalentResource):
(WebCore::Document::downgradeReferrerToRegistrableDomain):

  • dom/Document.h:
  • page/CrossSiteNavigationDataTransfer.h: Added.

New option set for the growing number of navigational data transfers we care about.

  • platform/network/NetworkStorageSession.cpp:

(WebCore::NetworkStorageSession::didCommitCrossSiteLoadWithDataTransferFromPrevalentResource):
(WebCore::NetworkStorageSession::committedCrossSiteLoadWithLinkDecoration): Deleted.

New name since we no longer only look for link decoration but also other means of navigational data transfer.

  • platform/network/NetworkStorageSession.h:

Source/WebKit:

This patch adds a call back to the UI process if the network process finds the navigational
data transfer was done by a prevalent resource and we need to adjust something for the page.
Currently, that adjustment is to downgrade document.referrer.

The patch also removes an unused completion handler.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::didCommitCrossSiteLoadWithDataTransfer):
(WebKit::NetworkProcess::committedCrossSiteLoadWithLinkDecoration): Deleted.

New name since we no longer only look for link decoration but also other means of navigational data transfer.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::didCommitCrossSiteLoadWithDataTransfer):
(WebKit::NetworkProcessProxy::didCommitCrossSiteLoadWithDataTransferFromPrevalentResource):
(WebKit::NetworkProcessProxy::committedCrossSiteLoadWithLinkDecoration): Deleted.

New name since we no longer only look for link decoration but also other means of navigational data transfer.

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

(WebKit::checkIfNavigationContainsDataTransfer):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didCommitCrossSiteLoadWithDataTransferFromPrevalentResource):
(WebKit::isNonUniqueNavigationWithLinkDecoration): Deleted.

New name since we no longer only look for link decoration but also other means of navigational data transfer.

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

(WebKit::WebProcessPool::didCommitCrossSiteLoadWithDataTransfer):
(WebKit::WebProcessPool::committedCrossSiteLoadWithLinkDecoration): Deleted.

New name since we no longer only look for link decoration but also other means of navigational data transfer.

  • UIProcess/WebProcessPool.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::wasLoadedWithDataTransferFromPrevalentResource):

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

LayoutTests:

  • http/tests/resourceLoadStatistics/downgraded-referrer-for-navigation-with-link-query-from-prevalent-resource-expected.txt: Added.
  • http/tests/resourceLoadStatistics/downgraded-referrer-for-navigation-with-link-query-from-prevalent-resource.html: Added.
12:56 PM Changeset in webkit [245783] by bshafiei@apple.com
  • 1 edit in branches/safari-608.1.24.20-branch/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h

Build fix after cherry-picking r245778.

12:05 PM Changeset in webkit [245782] by bshafiei@apple.com
  • 13 edits in branches/safari-608.1.24.20-branch

Cherry-pick r245637. rdar://problem/35205373

[Paste] Add support for preferred presentation size when pasting an image
https://bugs.webkit.org/show_bug.cgi?id=198132
<rdar://problem/50886917>

Reviewed by Wenson Hsieh.

Source/WebCore:

Set the pasted <img> width/height attributes when the preferred presentation size is available.

  • editing/WebContentReader.h:
  • editing/cocoa/WebContentReaderCocoa.mm: (WebCore::createFragmentForImageAttachment): (WebCore::WebContentReader::readImage):
  • editing/markup.cpp: (WebCore::createFragmentForImageAndURL):
  • editing/markup.h:
  • platform/Pasteboard.h: (WebCore::PasteboardWebContentReader::readImage):
  • platform/PasteboardItemInfo.h: (WebCore::PasteboardItemInfo::encode const): (WebCore::PasteboardItemInfo::decode):
  • platform/ios/PasteboardIOS.mm: (WebCore::Pasteboard::readPasteboardWebContentDataForType): (WebCore::Pasteboard::read): (WebCore::Pasteboard::readRespectingUTIFidelities):
  • platform/ios/PlatformPasteboardIOS.mm: (WebCore::PlatformPasteboard::informationForItemAtIndex):

Source/WebKit:

  • UIProcess/API/Cocoa/_WKElementAction.mm: (addToReadingList):
  • UIProcess/ios/WKActionSheetAssistant.mm: (-[WKActionSheetAssistant defaultActionsForLinkSheet:]): (-[WKActionSheetAssistant defaultActionsForImageSheet:]):

Tools:

  • TestWebKitAPI/Tests/ios/UIPasteboardTests.mm: (TestWebKitAPI::TEST):

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

11:21 AM Changeset in webkit [245781] by bshafiei@apple.com
  • 36 edits in branches/safari-608.1.24.20-branch

Cherry-pick r245778. rdar://problem/35205373

[iOS] Dropped text, attachments, and images should animate into place
https://bugs.webkit.org/show_bug.cgi?id=198243
<rdar://problem/35205373>

Reviewed by Tim Horton.

Source/WebCore:

Add some hooks to notify the chrome client when an HTMLImageElement's image is finished loading. See WebKit
changelog for more detail.

Test: DragAndDropTests.DropPreviewForImageInEditableArea

  • loader/EmptyClients.h:
  • page/ChromeClient.h:
  • page/Page.cpp: (WebCore::Page::didFinishLoadingImageForElement):
  • page/Page.h:
  • rendering/RenderImage.cpp: (WebCore::RenderImage::notifyFinished):

Source/WebKit:

Adds support for targeted drop animations on iOS in modern WebKit by adopting UIKit SPI introduced in
<rdar://problem/31075005> to allow updating the drop preview mid-flight. To get the animation right, we refactor
and augment existing logic for taking snapshots after performing a drop in an editable content.

Currently, upon dropping in editable content, we first snapshot the web view and temporarily cover the real web
view with this snapshot. When the TextIndicator data arrives that contains (1) a snapshot of the visible part of
the web view ignoring the selection, and (2) a snapshot of just the selected contents after drop, we crossfade
from the web view snapshot to the snapshot in (1) using a hard-coded time delay (~500ms), and target the drop
preview to the drag caret rect. During this process, snapshot (2) is completely ignored.

This was effectively a halfway implemention of the desired effect of animating the dropped content into place
and crossfading to the final content; before UIKit implemented updateable drag previews, the full implementation
was not possible in modern WebKit (without using synchronous IPC).

Now that we're able to update the drag preview in the middle of the drop animation, we can now utilize snapshot
(2) above and clean up some parts of the drop animation in editable content. See below for more details.

  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _doAfterReceivingEditDragSnapshotForTesting:]):

Add a testing hook to perform the given block after any pending edit drag snapshot has been received. See
TestWebKitAPI changes for more detail.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:

Split up the existing DidConcludeEditDrag IPC message into two messages: WillReceiveEditDragSnapshot and
DidReceiveEditDragSnapshot. This allows us to defer cleaning up the drag session state during an edit drop,
until after the final edit drag snapshot has been received.

  • UIProcess/ios/DragDropInteractionState.h:

Add some new methods to help manage the lifecycle of drop preview provider blocks.

  • UIProcess/ios/DragDropInteractionState.mm: (WebKit::createTargetedDragPreview):

Drive-by fix: make this return a RetainPtr.

(WebKit::DragDropInteractionState::prepareForDelayedDropPreview):

Stores a drop preview provider, given to us by UIKit.

(WebKit::DragDropInteractionState::deliverDelayedDropPreview):

Invokes the stored drop preview providers with given text indicator data. This is invoked after snapshots are
taken following an edit drag (this is additionally after all images in the inserted fragment have finished
loading).

(WebKit::DragDropInteractionState::clearAllDelayedItemPreviewProviders):

Invokes all stored drop preview providers with a nil preview. This is invoked in any case where drag session
cleanup occurs earlier than normal (e.g., if the web process crashes during drop), and ensures that the handlers
are always invoked when cleaning up the drag session.

(WebKit::DragDropInteractionState::previewForDragItem const):
(WebKit::DragDropInteractionState::dragAndDropSessionsDidEnd):

Call clearAllDelayedItemPreviewProviders.

  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::willReceiveEditDragSnapshot): (WebKit::PageClientImpl::didReceiveEditDragSnapshot): (WebKit::PageClientImpl::didConcludeEditDrag): Deleted.

More plumbing (see changes to DidConcludeEditDrag above).

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView cleanupInteraction]): (-[WKContentView cleanUpDragSourceSessionState]): (-[WKContentView _willReceiveEditDragSnapshot]): (-[WKContentView _didReceiveEditDragSnapshot:]):

Set _waitingForEditDragSnapshot to YES in the gap between when -_willReceiveEditDragSnapshot is invoked, and
when -_didReceiveEditDragSnapshot is invoked. If _waitingForEditDragSnapshot is YES, we bail out of
-cleanUpDragSourceSessionState, and instead clean up drag session state after the edit drag snapshot is
received.

(-[WKContentView _deliverDelayedDropPreviewIfPossible:]):
(-[WKContentView _didPerformDragOperation:]):
(-[WKContentView textEffectsWindow]):

Drive-by fix to remove a workaround for a deprecation warning.

(-[WKContentView dropInteraction:item:willAnimateDropWithAnimator:]):
(-[WKContentView dropInteraction:concludeDrop:]):

Implement this hook to ensure that the unselected content snapshot view and visible content snapshot view are
guaranteed to be removed from the view after a drop in editable content, even if the drag edit snapshot arrives
after the drop is concluded.

(-[WKContentView dropInteraction:previewForDroppingItem:withDefault:]):
(-[WKContentView _dropInteraction:delayedPreviewProviderForDroppingItem:previewProvider:]):

Implement the new UIKit SPI here. UIKit hands us a preview provider here, which we can invoke at a later time
to update the drop preview. We do this in _didReceiveEditDragSnapshot.

(-[WKContentView _doAfterReceivingEditDragSnapshotForTesting:]):
(-[WKContentView _didConcludeEditDrag:]): Deleted.

  • UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::willReceiveEditDragSnapshot): (WebKit::WebPageProxy::didReceiveEditDragSnapshot): (WebKit::WebPageProxy::didConcludeDrop): (WebKit::WebPageProxy::didConcludeEditDrag): Deleted.
  • WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::didFinishLoadingImageForElement):
  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didFinishLoadingImageForElement):
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::didConcludeDrop):

If an edit drag has been concluded, there's no need to hang on to pending dropped image elements anymore; clear
out the set here.

(WebKit::WebPage::didConcludeEditDrag):

After concluding an edit drag, we try to deliver two web content snapshots to the UI process, so that the UI
process can assemble a targeted drop preview for UIKit. One snapshot is of the visible content area, not
including any selected content. The other snapshot is of the selected content only. However, when dropping
images (or a text selection containing images), these images may not yet have been loaded. If that is the case,
these images will appear to be missing from these snapshots.

To ensure that we don't take this snapshot too early, defer it until all image elements in the dropped content
range have finished loading. We can tell that all dropped images have finished loading by using a new client
hook that is invoked when an image has finished loading.

(WebKit::WebPage::didFinishLoadingImageForElement):
(WebKit::WebPage::computeAndSendEditDragSnapshot):

Snapshot the selected content and send it to the UI process.

Source/WebKitLegacy/mac:

Add a new chrome client method. See other changelogs for more detail.

  • WebCoreSupport/WebChromeClient.h:
  • WebCoreSupport/WebChromeClient.mm: (WebChromeClient::didFinishLoadingImageForElement):

Source/WebKitLegacy/win:

  • WebCoreSupport/WebChromeClient.cpp: (WebChromeClient::didFinishLoadingImageForElement):
  • WebCoreSupport/WebChromeClient.h:

Tools:

Adjusts the iOS dragging simulator, and adds a new API test. See below for more detail.

  • TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm: (TestWebKitAPI::isCompletelyWhite): (TestWebKitAPI::TEST):

Add a test that drags and drops an image into a contenteditable element, and then observes the resulting
UITargetedDragPreviews upon drop.

  • TestWebKitAPI/cocoa/DragAndDropSimulator.h:
  • TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm: (-[DragAndDropSimulator _resetSimulatedState]): (-[DragAndDropSimulator runFrom:to:additionalItemRequestLocations:]): (-[DragAndDropSimulator _concludeDropAndPerformOperationIfNecessary]):

Teach the iOS version of DragAndDropSimulator to invoke -dropInteraction:concludeDrop: on the drop interaction
delegate when the drop finishes. This additionally uses _doAfterReceivingEditDragSnapshotForTesting: to defer
the end of the simulated drag and drop until after drag previews have been received during an edit drag.

(-[DragAndDropSimulator dropPreviews]):
(-[DragAndDropSimulator delayedDropPreviews]):

Have the drag and drop simulator remember which previews were returned by the delegate on drop, as well as which
previews were provided asynchronously.

(-[DragAndDropSimulator _webView:dataInteractionOperationWasHandled:forSession:itemProviders:]):

  • TestWebKitAPI/ios/UIKitSPI.h:

Stage the new private drop interacton delegate method.

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

11:21 AM Changeset in webkit [245780] by bshafiei@apple.com
  • 7 edits in branches/safari-608.1.24.20-branch

Cherry-pick r245775. rdar://problem/35205373

[iOS] Respect -[NSItemProvider preferredPresentationSize] when dropping images
https://bugs.webkit.org/show_bug.cgi?id=198242

Reviewed by Beth Dakin.

Source/WebCore:

Teach the web content reader to respect the -preferredPresentationSize when creating attachment-backed image
elements. See below for more details.

Test: WKAttachmentTestsIOS.InsertDroppedImageWithPreferredPresentationSize

  • editing/WebContentReader.h:
  • editing/cocoa/WebContentReaderCocoa.mm: (WebCore::attachmentForFilePath): (WebCore::attachmentForData):

When creating attachment-backed image elements, additionally set width and height attributes from the preferred
presentation size, if specified.

(WebCore::WebContentReader::readFilePath):

Add a version of readFilePath that takes a single file path, and an optional preferred presentation size.

(WebCore::WebContentReader::readFilePaths):

Reimplement readFilePaths in terms of readFilePath.

(WebCore::WebContentReader::readDataBuffer):

Add more plumbing for preferredPresentationSize.

  • platform/Pasteboard.h: (WebCore::PasteboardWebContentReader::readFilePath): (WebCore::PasteboardWebContentReader::readDataBuffer):
  • platform/ios/PasteboardIOS.mm: (WebCore::Pasteboard::read): (WebCore::Pasteboard::readRespectingUTIFidelities):

Forward PasteboardItemInfo's preferredPresentationSize to the web content reader.

Tools:

Add a new test that simulates dropping an image with a preferred presentation size into an editable element
with attachment elements enabled.

  • TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm: (TestWebKitAPI::TEST):

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

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

[LFC][Verification] Add areEssentiallyEqual for LayoutRect
https://bugs.webkit.org/show_bug.cgi?id=198250
<rdar://problem/51140119>

Reviewed by Antti Koivisto.

WebKit's inline layout is a mix of int/float/LayoutUnit types, while LFC mostly uses LayoutUnit.
When we compute the used size of a block container (based on the inline tree), the final value might go through a few conversions.

  • layout/Verification.cpp:

(WebCore::Layout::areEssentiallyEqual):
(WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):

4:31 AM Changeset in webkit [245778] by Wenson Hsieh
  • 36 edits in trunk

[iOS] Dropped text, attachments, and images should animate into place
https://bugs.webkit.org/show_bug.cgi?id=198243
<rdar://problem/35205373>

Reviewed by Tim Horton.

Source/WebCore:

Add some hooks to notify the chrome client when an HTMLImageElement's image is finished loading. See WebKit
changelog for more detail.

Test: DragAndDropTests.DropPreviewForImageInEditableArea

  • loader/EmptyClients.h:
  • page/ChromeClient.h:
  • page/Page.cpp:

(WebCore::Page::didFinishLoadingImageForElement):

  • page/Page.h:
  • rendering/RenderImage.cpp:

(WebCore::RenderImage::notifyFinished):

Source/WebKit:

Adds support for targeted drop animations on iOS in modern WebKit by adopting UIKit SPI introduced in
<rdar://problem/31075005> to allow updating the drop preview mid-flight. To get the animation right, we refactor
and augment existing logic for taking snapshots after performing a drop in an editable content.

Currently, upon dropping in editable content, we first snapshot the web view and temporarily cover the real web
view with this snapshot. When the TextIndicator data arrives that contains (1) a snapshot of the visible part of
the web view ignoring the selection, and (2) a snapshot of just the selected contents after drop, we crossfade
from the web view snapshot to the snapshot in (1) using a hard-coded time delay (~500ms), and target the drop
preview to the drag caret rect. During this process, snapshot (2) is completely ignored.

This was effectively a halfway implemention of the desired effect of animating the dropped content into place
and crossfading to the final content; before UIKit implemented updateable drag previews, the full implementation
was not possible in modern WebKit (without using synchronous IPC).

Now that we're able to update the drag preview in the middle of the drop animation, we can now utilize snapshot
(2) above and clean up some parts of the drop animation in editable content. See below for more details.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _doAfterReceivingEditDragSnapshotForTesting:]):

Add a testing hook to perform the given block after any pending edit drag snapshot has been received. See
TestWebKitAPI changes for more detail.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:

Split up the existing DidConcludeEditDrag IPC message into two messages: WillReceiveEditDragSnapshot and
DidReceiveEditDragSnapshot. This allows us to defer cleaning up the drag session state during an edit drop,
until after the final edit drag snapshot has been received.

  • UIProcess/ios/DragDropInteractionState.h:

Add some new methods to help manage the lifecycle of drop preview provider blocks.

  • UIProcess/ios/DragDropInteractionState.mm:

(WebKit::createTargetedDragPreview):

Drive-by fix: make this return a RetainPtr.

(WebKit::DragDropInteractionState::prepareForDelayedDropPreview):

Stores a drop preview provider, given to us by UIKit.

(WebKit::DragDropInteractionState::deliverDelayedDropPreview):

Invokes the stored drop preview providers with given text indicator data. This is invoked after snapshots are
taken following an edit drag (this is additionally after all images in the inserted fragment have finished
loading).

(WebKit::DragDropInteractionState::clearAllDelayedItemPreviewProviders):

Invokes all stored drop preview providers with a nil preview. This is invoked in any case where drag session
cleanup occurs earlier than normal (e.g., if the web process crashes during drop), and ensures that the handlers
are always invoked when cleaning up the drag session.

(WebKit::DragDropInteractionState::previewForDragItem const):
(WebKit::DragDropInteractionState::dragAndDropSessionsDidEnd):

Call clearAllDelayedItemPreviewProviders.

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

(WebKit::PageClientImpl::willReceiveEditDragSnapshot):
(WebKit::PageClientImpl::didReceiveEditDragSnapshot):
(WebKit::PageClientImpl::didConcludeEditDrag): Deleted.

More plumbing (see changes to DidConcludeEditDrag above).

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

(-[WKContentView cleanupInteraction]):
(-[WKContentView cleanUpDragSourceSessionState]):
(-[WKContentView _willReceiveEditDragSnapshot]):
(-[WKContentView _didReceiveEditDragSnapshot:]):

Set _waitingForEditDragSnapshot to YES in the gap between when -_willReceiveEditDragSnapshot is invoked, and
when -_didReceiveEditDragSnapshot is invoked. If _waitingForEditDragSnapshot is YES, we bail out of
-cleanUpDragSourceSessionState, and instead clean up drag session state after the edit drag snapshot is
received.

(-[WKContentView _deliverDelayedDropPreviewIfPossible:]):
(-[WKContentView _didPerformDragOperation:]):
(-[WKContentView textEffectsWindow]):

Drive-by fix to remove a workaround for a deprecation warning.

(-[WKContentView dropInteraction:item:willAnimateDropWithAnimator:]):
(-[WKContentView dropInteraction:concludeDrop:]):

Implement this hook to ensure that the unselected content snapshot view and visible content snapshot view are
guaranteed to be removed from the view after a drop in editable content, even if the drag edit snapshot arrives
after the drop is concluded.

(-[WKContentView dropInteraction:previewForDroppingItem:withDefault:]):
(-[WKContentView _dropInteraction:delayedPreviewProviderForDroppingItem:previewProvider:]):

Implement the new UIKit SPI here. UIKit hands us a preview provider here, which we can invoke at a later time
to update the drop preview. We do this in _didReceiveEditDragSnapshot.

(-[WKContentView _doAfterReceivingEditDragSnapshotForTesting:]):
(-[WKContentView _didConcludeEditDrag:]): Deleted.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::willReceiveEditDragSnapshot):
(WebKit::WebPageProxy::didReceiveEditDragSnapshot):
(WebKit::WebPageProxy::didConcludeDrop):
(WebKit::WebPageProxy::didConcludeEditDrag): Deleted.

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::didFinishLoadingImageForElement):

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

(WebKit::WebPage::didFinishLoadingImageForElement):

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

(WebKit::WebPage::didConcludeDrop):

If an edit drag has been concluded, there's no need to hang on to pending dropped image elements anymore; clear
out the set here.

(WebKit::WebPage::didConcludeEditDrag):

After concluding an edit drag, we try to deliver two web content snapshots to the UI process, so that the UI
process can assemble a targeted drop preview for UIKit. One snapshot is of the visible content area, not
including any selected content. The other snapshot is of the selected content only. However, when dropping
images (or a text selection containing images), these images may not yet have been loaded. If that is the case,
these images will appear to be missing from these snapshots.

To ensure that we don't take this snapshot too early, defer it until all image elements in the dropped content
range have finished loading. We can tell that all dropped images have finished loading by using a new client
hook that is invoked when an image has finished loading.

(WebKit::WebPage::didFinishLoadingImageForElement):
(WebKit::WebPage::computeAndSendEditDragSnapshot):

Snapshot the selected content and send it to the UI process.

Source/WebKitLegacy/mac:

Add a new chrome client method. See other changelogs for more detail.

  • WebCoreSupport/WebChromeClient.h:
  • WebCoreSupport/WebChromeClient.mm:

(WebChromeClient::didFinishLoadingImageForElement):

Source/WebKitLegacy/win:

  • WebCoreSupport/WebChromeClient.cpp:

(WebChromeClient::didFinishLoadingImageForElement):

  • WebCoreSupport/WebChromeClient.h:

Tools:

Adjusts the iOS dragging simulator, and adds a new API test. See below for more detail.

  • TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:

(TestWebKitAPI::isCompletelyWhite):
(TestWebKitAPI::TEST):

Add a test that drags and drops an image into a contenteditable element, and then observes the resulting
UITargetedDragPreviews upon drop.

  • TestWebKitAPI/cocoa/DragAndDropSimulator.h:
  • TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:

(-[DragAndDropSimulator _resetSimulatedState]):
(-[DragAndDropSimulator runFrom:to:additionalItemRequestLocations:]):
(-[DragAndDropSimulator _concludeDropAndPerformOperationIfNecessary]):

Teach the iOS version of DragAndDropSimulator to invoke -dropInteraction:concludeDrop: on the drop interaction
delegate when the drop finishes. This additionally uses _doAfterReceivingEditDragSnapshotForTesting: to defer
the end of the simulated drag and drop until after drag previews have been received during an edit drag.

(-[DragAndDropSimulator dropPreviews]):
(-[DragAndDropSimulator delayedDropPreviews]):

Have the drag and drop simulator remember which previews were returned by the delegate on drop, as well as which
previews were provided asynchronously.

(-[DragAndDropSimulator _webView:dataInteractionOperationWasHandled:forSession:itemProviders:]):

  • TestWebKitAPI/ios/UIKitSPI.h:

Stage the new private drop interacton delegate method.

Note: See TracTimeline for information about the timeline view.