Timeline



Jul 29, 2018:

11:40 PM Changeset in webkit [234359] by Basuke Suzuki
  • 2 edits in trunk/LayoutTests

[Curl] Test gardening
https://bugs.webkit.org/show_bug.cgi?id=188155

Unreviewed test gardening.

  • platform/wincairo/TestExpectations:
11:33 PM Changeset in webkit [234358] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebKit

Cherry-pick r234349. rdar://problem/42721129

[Wi-Fi Assertions] Pass a ResumptionReason to resumeWiFiAssertions
https://bugs.webkit.org/show_bug.cgi?id=188142
<rdar://problem/42628842>

Reviewed by Darin Adler.

  • NetworkProcess/cocoa/NetworkProcessCocoa.mm: (WebKit::NetworkProcess::platformProcessDidResume): (WebKit::NetworkProcess::platformProcessDidTransitionToForeground):

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

11:28 PM Changeset in webkit [234357] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebCore

Cherry-pick r234345. rdar://problem/42721217

Reset CompositingPolicyOverride between tests
https://bugs.webkit.org/show_bug.cgi?id=188138

Reviewed by Zalan Bujtas.

WK1 tests were failing after r234330 because the compositing policy override optional
was left set on the Page (WK1 has injected bundle SPI to clear it). Fix by having
Internals::resetToConsistentState clear this state.

  • testing/Internals.cpp: (WebCore::Internals::resetToConsistentState):

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

11:28 PM Changeset in webkit [234356] by bshafiei@apple.com
  • 6 edits
    2 adds in branches/safari-606-branch

Cherry-pick r234340. rdar://problem/42721208

Adjust the color matrix for the inverse apple-invert-lightness() transformation
https://bugs.webkit.org/show_bug.cgi?id=188131
rdar://problem/42673070

Reviewed by Zalan Bujtas.

Source/WebCore:

Use the correct inverse matrix values.

Test: editing/style/inverse-color-filter.html

  • platform/graphics/filters/FilterOperation.cpp: (WebCore::InvertLightnessFilterOperation::inverseTransformColor const):

LayoutTests:

Rebaseline tests that use the filter inversion. Add a new test that does inversion
for a whole range of colors, to get good coverage of the inversion matrix.

  • editing/style/inverse-color-filter-expected.txt: Added.
  • editing/style/inverse-color-filter.html: Added.
  • editing/style/set-backColor-with-color-filter-expected.txt:
  • editing/style/set-foreColor-with-color-filter-expected.txt:
  • platform/win/TestExpectations:

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

11:28 PM Changeset in webkit [234355] by bshafiei@apple.com
  • 25 edits
    2 adds in branches/safari-606-branch

Cherry-pick r234330. rdar://problem/42721217

Be more conservative with compositing layer creation when memory is low
https://bugs.webkit.org/show_bug.cgi?id=187866
rdar://problem/42366345

Reviewed by Zalan Bujtas.

Source/WebCore:

When process physical footprint is above a fraction of the jetsam limit, be more conservative in making
compositing layers. We avoid compositing for these situations:

  1. Layers with 3D transforms which are affine (like translateZ(0)).
  2. Layers with will-change
  3. Layers for canvases (other than WebGL/WebGPU)

We reuse some macOS code in MemoryPressureHandler() but choose different thresholds for iOS,
falling into "conservative mode" at 50% of jetsam limit, and "strict mode" at 65%.
Compositing chooses to be more conservative in either "conservative" or "strict" memory modes.

Plumb through a "compositingPolicyOverride" both so that on-device testing isn't
flakily falling into a different mode, and so that we can impose the conservative
mode for testing.

Test: compositing/layer-creation/compositing-policy.html

  • page/Page.h: (WebCore::Page::compositingPolicyOverride const): (WebCore::Page::setCompositingPolicyOverride):
  • platform/graphics/transforms/Matrix3DTransformOperation.cpp: (WebCore::Matrix3DTransformOperation::isRepresentableIn2D const):
  • platform/graphics/transforms/Matrix3DTransformOperation.h:
  • platform/graphics/transforms/PerspectiveTransformOperation.h:
  • platform/graphics/transforms/RotateTransformOperation.h:
  • platform/graphics/transforms/ScaleTransformOperation.h:
  • platform/graphics/transforms/TransformOperation.h: (WebCore::TransformOperation::isRepresentableIn2D const):
  • platform/graphics/transforms/TransformOperations.h: (WebCore::TransformOperations::has3DOperation const): (WebCore::TransformOperations::isRepresentableIn2D const):
  • platform/graphics/transforms/TranslateTransformOperation.h:
  • rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGeometry):
  • rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags): (WebCore::RenderLayerCompositor::updateCompositingPolicy): (WebCore::RenderLayerCompositor::updateCompositingLayers): (WebCore::RenderLayerCompositor::requiresCompositingForTransform const): (WebCore::RenderLayerCompositor::requiresCompositingForVideo const): (WebCore::RenderLayerCompositor::requiresCompositingForCanvas const): (WebCore::RenderLayerCompositor::requiresCompositingForPlugin const): (WebCore::RenderLayerCompositor::requiresCompositingForWillChange const): (WebCore::RenderLayerCompositor::needsFixedRootBackgroundLayer const): (WebCore::operator<<):
  • rendering/RenderLayerCompositor.h:
  • testing/Internals.cpp: (WebCore::Internals::setCompositingPolicyOverride): (WebCore::Internals::compositingPolicyOverride const):
  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebKit:

When process physical footprint is above a fraction of the jetsam limit, be more conservative in making
compositing layers. We avoid compositing for these situations:

  1. Layers with 3D transforms which are affine (like translateZ(0)).
  2. Layers with will-change
  3. Layers for canvases (other than WebGL/WebGPU)

We reuse some macOS code in MemoryPressureHandler() but choose different thresholds for iOS,
falling into "conservative mode" at 50% of jetsam limit, and "strict mode" at 65%.
Compositing chooses to be more conservative in either "conservative" or "strict" memory modes.

Plumb through a "compositingPolicyOverride" both so that on-device testing isn't
flakily falling into a different mode, and so that we can impose the conservative
mode for testing.

  • WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageSetCompositingPolicyOverride):
  • WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:

Source/WTF:

When process physical footprint is above a fraction of the jetsam limit, be more conservative in making
compositing layers. We avoid compositing for these situations:

  1. Layers with 3D transforms which are affine (like translateZ(0)).
  2. Layers with will-change
  3. Layers for canvases (other than WebGL/WebGPU)

We reuse some macOS code in MemoryPressureHandler() but choose different thresholds for iOS,
falling into "conservative mode" at 50% of jetsam limit, and "strict mode" at 65%.
Compositing chooses to be more conservative in either "conservative" or "strict" memory modes.

Plumb through a "compositingPolicyOverride" both so that on-device testing isn't
flakily falling into a different mode, and so that we can impose the conservative
mode for testing.

  • wtf/MemoryPressureHandler.cpp: (WTF::thresholdForPolicy): (WTF::MemoryPressureHandler::currentMemoryUsagePolicy):
  • wtf/MemoryPressureHandler.h:

Tools:

When process physical footprint is above a fraction of the jetsam limit, be more conservative in making
compositing layers. We avoid compositing for these situations:

  1. Layers with 3D transforms which are affine (like translateZ(0)).
  2. Layers with will-change
  3. Layers for canvases (other than WebGL/WebGPU)

We reuse some macOS code in MemoryPressureHandler() but choose different thresholds for iOS,
falling into "conservative mode" at 50% of jetsam limit, and "strict mode" at 65%.
Compositing chooses to be more conservative in either "conservative" or "strict" memory modes.

Plumb through a "compositingPolicyOverride" both so that on-device testing isn't
flakily falling into a different mode, and so that we can impose the conservative
mode for testing.

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::prepare):

LayoutTests:

  • compositing/layer-creation/compositing-policy-expected.txt: Added.
  • compositing/layer-creation/compositing-policy.html: Added.

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

11:28 PM Changeset in webkit [234354] by bshafiei@apple.com
  • 4 edits in branches/safari-606-branch

Cherry-pick r234329. rdar://problem/42721126

[WK1] ASSERTION FAILED: renderer().repaintLayoutRects().m_repaintRect == renderer().clippedOverflowRectForRepaint(renderer().containerForRepaint()) in WebCore::RenderLayer::updateLayerPositionsAfterScroll
https://bugs.webkit.org/show_bug.cgi?id=188122
<rdar://problem/42584790>

Reviewed by Simon Fraser.

Source/WebCore:

When ScrollView's m_paintsEntireContents flag flips due to layer backing changes, the repaint area transitions from
visual to layout overflow. When this happens the cached repaint rects become invalid and they need to be recomputed.
Currently there's no mechanism to trigger repaint cache invalidation from ScrollView.
Skip assertion for now on WK1 (see webkit.org/b/188121)

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

LayoutTests:

  • platform/mac-wk1/TestExpectations:

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

11:28 PM Changeset in webkit [234353] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/bmalloc

Cherry-pick r234328. rdar://problem/42721215

Explicitly handle memlimit_active < 0
https://bugs.webkit.org/show_bug.cgi?id=188125

Reviewed by Mark Lam.

This may come up during development when someone wants the limit
to be "infinite".

  • bmalloc/AvailableMemory.cpp: (bmalloc::jetsamLimit):

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

11:28 PM Changeset in webkit [234352] by bshafiei@apple.com
  • 7 edits
    1 add in branches/safari-606-branch/Source

Cherry-pick r234326. rdar://problem/42721215

Use SPI to compute the jetsam limit on iOS instead of hardcoding 840MB
https://bugs.webkit.org/show_bug.cgi?id=188091
<rdar://problem/42647697>

Reviewed by Simon Fraser.

Source/bmalloc:

We want bmalloc to dynamically adapt to the jetsam limit of the process
it's running in. WTF::ramSize() is based off bmalloc's availableMemory,
so it will now reflect the result of the real jetsam limit when we can
read it.

Reading the jetsam limit requires an entitlement, so this patch opts in
the WebContent/Storage/Network processes. We fall back to 840MB (the
old hard coded value) when the SPI call fails (e.g, when we're in a
process without the proper entitlement).

  • bmalloc.xcodeproj/project.pbxproj:
  • bmalloc/AvailableMemory.cpp: (bmalloc::jetsamLimit): (bmalloc::computeAvailableMemory):
  • bmalloc/darwin/MemoryStatusSPI.h: Added.

Source/WebKit:

Give the Network/Storage/WebContent process the com.apple.private.memorystatus
entitlement. This allows them to read the process jetsam limit.

  • Configurations/Databases-iOS.entitlements:
  • Configurations/Network-iOS.entitlements:
  • Configurations/WebContent-iOS.entitlements:

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

11:27 PM Changeset in webkit [234351] by bshafiei@apple.com
  • 9 edits in branches/safari-606-branch

Cherry-pick r234125. rdar://problem/42721214

CrashTracer: com.apple.WebKit.Storage at WebCore: WebCore::encodeKey
https://bugs.webkit.org/show_bug.cgi?id=187927
LayoutTests/imported/w3c:

<rdar://problem/42516426>

Reviewed by Chris Dumez.

  • web-platform-tests/IndexedDB/key-conversion-exceptions-expected.txt:

Source/WebCore:

Reviewed by Chris Dumez.

IDBKeyData is valid only when each key of it is valid.

Test: LayoutTests/storage/indexeddb/index-multientry.html

  • Modules/indexeddb/IDBKeyData.cpp: (WebCore::IDBKeyData::isValid const):
  • Modules/indexeddb/IDBKeyData.h: (WebCore::IDBKeyData::isValid const): Deleted.

LayoutTests:

<rdar://problem/42516426>

Reviewed by Chris Dumez.

Add a new test case in existing test file to cover the crash case and update the expecation accordingly.

  • storage/indexeddb/index-multientry-expected.txt:
  • storage/indexeddb/index-multientry-private-expected.txt:
  • storage/indexeddb/resources/index-multientry.js: (addData):

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

10:39 PM Changeset in webkit [234350] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

Fix incorrect guards around a method declaration in PageClient.h
https://bugs.webkit.org/show_bug.cgi?id=188153

Reviewed by Tim Horton.

WebCore::DragItem is forward declared under ENABLE(DRAG_SUPPORT), but startDrag is declared under
PLATFORM(COCOA). If ENABLE(DRAG_SUPPORT) is off but PLATFORM(COCOA) is on, the build breaks.

We fix this by moving startDrag under ENABLE(DRAG_SUPPORT).

  • UIProcess/PageClient.h:

(WebKit::PageClient::startDrag):

3:13 PM Changeset in webkit [234349] by aestes@apple.com
  • 2 edits in trunk/Source/WebKit

[Wi-Fi Assertions] Pass a ResumptionReason to resumeWiFiAssertions
https://bugs.webkit.org/show_bug.cgi?id=188142
<rdar://problem/42628842>

Reviewed by Darin Adler.

  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::platformProcessDidResume):
(WebKit::NetworkProcess::platformProcessDidTransitionToForeground):

2:45 PM Changeset in webkit [234348] by Darin Adler
  • 46 edits in trunk/Source

[Cocoa] Update more WebCore Objective-C code to be ARC compatible
https://bugs.webkit.org/show_bug.cgi?id=188140

Reviewed by Sam Weinig.

Source/WebCore:

This make sure we don't put any Objective-C objects into HashMap/Set
data structures, which doesn't work under ARC at this time. We could
fix that some day, but it's pretty simple to change code not to rely
on it, for now, and not as simple to support it in HashMap/Set.

  • accessibility/mac/WebAccessibilityObjectWrapperBase.mm:

(-[WebAccessibilityObjectWrapperBase updateObjectBackingStore]):
Use CFRetain/CFAutorelease instead of retain/autorelease.

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(createAccessibilityRoleMap): Use CFStringRef in a HashMap rather than
NSString * for string constants.
(roleValueToNSString): Updated for above change.

  • bridge/objc/WebScriptObject.mm:

(-[WebScriptObject stringRepresentation]): Updated since objectValue
is now CFTypeRef rather than NSObject *.

  • bridge/objc/objc_instance.mm:

(ObjcInstance::create): Use CFTypeRef instead of id for the key types
in a HashMap.
(ObjcInstance::~ObjcInstance): Updated for the above change.
(ObjcInstance::invokeObjcMethod): Updated since objectValue is now
CFTypeRef.
(ObjcInstance::invokeDefaultMethod): Ditto.
(ObjcInstance::setValueOfUndefinedField): Ditto.

  • bridge/objc/objc_runtime.mm:

(JSC::Bindings::ObjcArray::setValueAt const): Ditto.

  • bridge/objc/objc_utility.h: Use #pragma once. Use CFTypeRef instead

of NSObject * for objectValue, since it's in a union and ARC does not
support strong Objective-C object pointers in a union.

  • bridge/objc/objc_utility.mm:

(JSC::Bindings::convertValueToObjcValue): Updated since objectValue is
now CFTypeRef.

  • editing/cocoa/HTMLConverter.mm:

(HTMLConverter::_processElement): Use CFTypeRef rather than NSTextTable
for a HashMap.
(HTMLConverter::_exitElement): Ditto.

  • editing/cocoa/WebContentReaderCocoa.mm:

(WebCore::attributesForAttributedStringConversion): Use CFRetain rather
than -[NSObject retain] in a workaround for an overrelease.

  • editing/mac/DictionaryLookup.h: Removed code to make this usable from

non-Objective-C source files. Use tuples rather than out arguments
for the results of the various functions.

  • editing/mac/DictionaryLookup.mm:

(WebCore::DictionaryLookup::rangeForSelection): Return a tuple rather
than using an out argument for options.
(WebCore::DictionaryLookup::rangeAtHitTestResult): Ditto.
(WebCore::DictionaryLookup::stringForPDFSelection): Ditto.
(WebCore::showPopupOrCreateAnimationController): Removed use of typedef
PlatformAnimationController.
(WebCore::DictionaryLookup::animationControllerForPopup): Ditto.

  • html/HTMLMediaElement.h: Put the videoFullscreenLayer function inside

an OBJC ifdef since we can't do the type conversion without the
full Objective-C type.

  • page/mac/EventHandlerMac.mm:

(WebCore::selfRetainingNSScrollViewScrollWheel): Use CFRetain/CFRelease
instead of retain/release.
(WebCore::EventHandler::selectClosestWordFromHitTestResultBasedOnLookup):
Updated to use tuple return value from DictionaryLookup.

  • page/scrolling/ScrollingStateNode.h: Replaced direct use of PlatformLayer*

in a union with use of a "typless" void* pointer and added helper functions
to convert in both directions.

  • page/scrolling/cocoa/ScrollingStateNode.mm:

(WebCore::LayerRepresentation::retainPlatformLayer): Use CFRetain instead
of retain.
(WebCore::LayerRepresentation::releasePlatformLayer): Use CFRelease instead
of release.
(WebCore::LayerRepresentation::makePlatformLayerTyped): Added.
(WebCore::LayerRepresentation::makePlatformLayerTypeless): Ditto.

  • page/scrolling/coordinatedgraphics/ScrollingStateNodeCoordinatedGraphics.cpp:

(WebCore::LayerRepresentation::retainPlatformLayer): Updated argument type.
(WebCore::LayerRepresentation::releasePlatformLayer): Ditto.
(WebCore::LayerRepresentation::makePlatformLayerTyped): Added.
(WebCore::LayerRepresentation::makePlatformLayerTypeless): Ditto.

  • platform/gamepad/cocoa/GameControllerGamepadProvider.h: Use CFTypeRef

instad of GCController * for key type of HashMap.

  • platform/gamepad/cocoa/GameControllerGamepadProvider.mm:

(WebCore::GameControllerGamepadProvider::controllerDidConnect): Updated
for the above change.
(WebCore::GameControllerGamepadProvider::controllerDidDisconnect): Ditto.

  • platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:

Use SOFT_LINK_CONSTANT_MAY_FAIL instead of SOFT_LINK_POINTER_OPTIONAL for
strings, since SOFT_LINK_POINTER_OPTIONAL does not work for Objective-C
types under ARC.
(WebCore::AVTrackPrivateAVFObjCImpl::audioKind const): Added checks
for the constants.
(WebCore::AVTrackPrivateAVFObjCImpl::videoKind const): Ditto.
(WebCore::AVTrackPrivateAVFObjCImpl::label const): Ditto.

  • platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h:

Use #pragma once and use CFTypeRef instead of AVMediaSelectionOption *
in the key to a HashMap.

  • platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:

(WebCore::MediaSelectionGroupAVFObjC::updateOptions): Updated for
the above change.

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

Use SOFT_LINK_CONSTANT_MAY_FAIL instead of SOFT_LINK_POINTER_OPTIONAL for
strings, since SOFT_LINK_POINTER_OPTIONAL does not work for Objective-C
types under ARC.
(WebCore::customSchemeURL): Removed unnecessary use of
NeverDestroyed<RetainPtr>. Can just use a straight pointer without calling
release, and that works with or without ARC.
(WebCore::imageDecoderAssetOptions): Ditto. Here, had to add a retain,
which we'll remove when we turn on ARC. Added canLoad checks, needed
because of SOFT_LINK_CONSTANT_MAY_FAIL.
(WebCore::ImageDecoderAVFObjC::firstEnabledTrack): Added canLoad check,
needed because of SOFT_LINK_CONSTANT_MAY_FAIL.

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

Use CFTypeRef instead of AVAssetResourceLoadingRequest in HashMap.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
Updated for above.
(WebCore::MediaPlayerPrivateAVFoundationObjC::didCancelLoadingRequest): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::didStopLoadingRequest): Ditto.

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

Use CFTypeRef instead of AVSampleBufferAudioRenderer in HashMap.

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

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVolume): Updated for above.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setMuted): Ditto.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setPreservesPitch): Ditto.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableAudioSample): Ditto.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer): Ditto.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer): Ditto.

  • platform/graphics/metal/GPUDrawableMetal.mm: Updated include; under ARC, it's

not safe to call a method on a class without seeing its interface.

  • platform/mac/VideoFullscreenInterfaceMac.mm: Added an explicit

unsafe_unretained for a delegate. Could consider moving to weak, but for now
this preserves the current behavior and compiles under ARC.

  • platform/mac/WebCoreFullScreenPlaceholderView.h: Use strong for the contents,

weak for the target, and changed the action to be hard-coded instead of an
arbitrary selector. If we find we need the flexibility again later, we can do
it with a block, which is more ARC-friendly than calling an arbitrary selector.

  • platform/mac/WebCoreFullScreenPlaceholderView.mm:

(-[WebCoreFullScreenPlaceholderView initWithFrame:]): Call function directly
instead of taking advantage of "using".
(-[WebCoreFullScreenPlaceholderView mouseDown:]): Call cancelOperation: on the
target rather than performing an arbitrary selector.

  • platform/mac/WebCoreObjCExtras.mm:

(WebCoreObjCScheduleDeallocateOnMainThread): Use sel_registerName instead of
@selector, since @selector is not supported under ARC.

  • platform/network/ResourceHandle.h: Use a return value rather than using an

inout argument in applySniffingPoliciesAndStoragePartitionIfNeeded.

  • platform/network/cocoa/CookieStorageObserver.mm:

(WebCore::CookieStorageObserver::startObserving): Removed unnecessary
assertion of repondsToSelector since we are about to dispatch it immediately
after. Call the selector in the conventional way instead of using performSelector.

  • platform/network/cocoa/WebCoreNSURLSession.h: Use #pragma once and use

CFTypeRef instead of an Objective-C type. Also use an explicit unsafe_unretained
for the session in the data task.

  • platform/network/cocoa/WebCoreNSURLSession.mm:

(-[WebCoreNSURLSession dealloc]): Updated for the above.
(-[WebCoreNSURLSession taskCompleted:]): Ditto.
(-[WebCoreNSURLSession invalidateAndCancel]): Ditto.
(-[WebCoreNSURLSession getTasksWithCompletionHandler:]): Ditto.
(-[WebCoreNSURLSession getAllTasksWithCompletionHandler:]): Ditto.
(-[WebCoreNSURLSession dataTaskWithRequest:]): Ditto.
(-[WebCoreNSURLSession dataTaskWithURL:]): Ditto.

  • platform/network/mac/ResourceHandleMac.mm:

(WebCore::ResourceHandle::applySniffingPoliciesAndStoragePartitionIfNeeded):
Use a return value instead of an inout argument. Also use bridging casts.
(WebCore::ResourceHandle::createNSURLConnection): Updated for the change above.
Also use a bridging cast.
(WebCore::ResourceHandle::schedule): Use a bridging cast.
(WebCore::ResourceHandle::unschedule): Ditto.

  • platform/network/mac/WebCoreURLResponse.mm:

(WebCore::adjustMIMETypeIfNecessary): Use a bridging cast.

  • testing/Internals.cpp:

(WebCore::Internals::rangeForDictionaryLookupAtLocation): Moved the macOS
version of this function out of this file ...

  • testing/Internals.mm:

(WebCore::Internals::rangeForDictionaryLookupAtLocation): ... to here.

Source/WebKit:

  • UIProcess/mac/WKFullScreenWindowController.mm:

(-[WKFullScreenWindowController enterFullScreen:]): Removed the call to
setAction: since the full screen placeholder view now always uses the
cancelOperation: method.

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::lookupTextAtLocation): Updated to use the new
DictionaryLookup function that returns a tuple instead of using an out argument.

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::performDictionaryLookupAtLocation): Ditto.
(WebKit::WebPage::performDictionaryLookupForSelection): Ditto.

Source/WebKitLegacy/mac:

  • WebView/WebImmediateActionController.mm:

(-[WebImmediateActionController _animationControllerForText]): Updated to use the
new DictionaryLookup function that returns a tuple instead of using an out argument.

11:13 AM Changeset in webkit [234347] by Yusuke Suzuki
  • 13 edits in trunk/Source/WebCore

Use static global variables instead of static NeverDestroyed inside function if possible
https://bugs.webkit.org/show_bug.cgi?id=188146

Reviewed by Darin Adler.

This patch leverages constexpr constructors / trivial destructors more to remove unnecessary static NeverDestroyed
inside a function. It simplifies the code, removes the unnecessary function, and ensures the initialization at
a program loader phase.

We make StepRange::StepDescription constructor constexpr to remove bunch of static NeverDestroyed<const StepRange::StepDescription>.
And we use static Lock since WTF::Lock has constexpr constructor.

No behavior change.

  • dom/MessagePort.cpp:

(WebCore::MessagePort::deref const):
(WebCore::MessagePort::isExistingMessagePortLocallyReachable):
(WebCore::MessagePort::notifyMessageAvailable):
(WebCore::MessagePort::MessagePort):
(WebCore::MessagePort::~MessagePort):
(WebCore::allMessagePortsLock): Deleted.

  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::contextIdentifier const):
(WebCore::ScriptExecutionContext::removeFromContextsMap):
(WebCore::ScriptExecutionContext::~ScriptExecutionContext):
(WebCore::ScriptExecutionContext::postTaskTo):
(WebCore::allScriptExecutionContextsMapLock): Deleted.

  • html/DateInputType.cpp:

(WebCore::DateInputType::createStepRange const):

  • html/DateTimeInputType.cpp:

(WebCore::DateTimeInputType::createStepRange const):

  • html/DateTimeLocalInputType.cpp:

(WebCore::DateTimeLocalInputType::createStepRange const):

  • html/MonthInputType.cpp:

(WebCore::MonthInputType::createStepRange const):

  • html/RangeInputType.cpp:

(WebCore::RangeInputType::createStepRange const):

  • html/StepRange.h:

(WebCore::StepRange::StepDescription::StepDescription):

  • html/TimeInputType.cpp:

(WebCore::TimeInputType::createStepRange const):

  • html/WeekInputType.cpp:

(WebCore::WeekInputType::createStepRange const):

  • page/SecurityPolicy.cpp:

(WebCore::originAccessMap):
(WebCore::SecurityPolicy::isAccessWhiteListed):
(WebCore::SecurityPolicy::addOriginAccessWhitelistEntry):
(WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry):
(WebCore::SecurityPolicy::resetOriginAccessWhitelists):
(WebCore::originAccessMapLock): Deleted.

  • platform/SchemeRegistry.cpp:

(WebCore::allBuiltinSchemes):
(WebCore::builtinLocalURLSchemes):
(WebCore::localURLSchemes):
(WebCore::displayIsolatedURLSchemes):
(WebCore::builtinSecureSchemes):
(WebCore::secureSchemes):
(WebCore::builtinSchemesWithUniqueOrigins):
(WebCore::schemesWithUniqueOrigins):
(WebCore::builtinCanDisplayOnlyIfCanRequestSchemes):
(WebCore::canDisplayOnlyIfCanRequestSchemes):
(WebCore::SchemeRegistry::registerURLSchemeAsLocal):
(WebCore::SchemeRegistry::removeURLSchemeRegisteredAsLocal):
(WebCore::ContentSecurityPolicyBypassingSchemes):
(WebCore::cachePartitioningSchemes):
(WebCore::serviceWorkerSchemes):
(WebCore::SchemeRegistry::shouldTreatURLSchemeAsLocal):
(WebCore::SchemeRegistry::registerURLSchemeAsNoAccess):
(WebCore::SchemeRegistry::shouldTreatURLSchemeAsNoAccess):
(WebCore::SchemeRegistry::registerURLSchemeAsDisplayIsolated):
(WebCore::SchemeRegistry::shouldTreatURLSchemeAsDisplayIsolated):
(WebCore::SchemeRegistry::registerURLSchemeAsSecure):
(WebCore::SchemeRegistry::shouldTreatURLSchemeAsSecure):
(WebCore::SchemeRegistry::canDisplayOnlyIfCanRequest):
(WebCore::SchemeRegistry::registerAsCanDisplayOnlyIfCanRequest):
(WebCore::SchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy):
(WebCore::SchemeRegistry::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy):
(WebCore::SchemeRegistry::schemeShouldBypassContentSecurityPolicy):
(WebCore::SchemeRegistry::registerURLSchemeAsCachePartitioned):
(WebCore::SchemeRegistry::shouldPartitionCacheForURLScheme):
(WebCore::SchemeRegistry::registerURLSchemeServiceWorkersCanHandle):
(WebCore::SchemeRegistry::canServiceWorkersHandleURLScheme):
(WebCore::SchemeRegistry::isServiceWorkerContainerCustomScheme):
(WebCore::schemeRegistryLock): Deleted.

9:18 AM Changeset in webkit [234346] by Basuke Suzuki
  • 4 edits in trunk

[Curl] Fix the bug when client reject the redirect on WebKitLegacy.
https://bugs.webkit.org/show_bug.cgi?id=188130

Reviewed by Darin Adler.

Source/WebCore:

ResourceHandle for Curl port has a bug when a client returns en empty request which
indicates the redirecti is rejected by the client. It should be quit the task immediately,
but it kept doing the job. Fixed.
NetworkDataTask implementation did the right thing and there's no bug for them.

Test: http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect-expected.txt

  • platform/network/curl/ResourceHandleCurl.cpp:

(WebCore::ResourceHandle::continueAfterWillSendRequest):

LayoutTests:

  • platform/wincairo/TestExpectations:
  • xmlhttprequest/xmlhttprequest-unsafe-redirect-expected.txt: Pass

Jul 28, 2018:

11:39 AM Changeset in webkit [234345] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Reset CompositingPolicyOverride between tests
https://bugs.webkit.org/show_bug.cgi?id=188138

Reviewed by Zalan Bujtas.

WK1 tests were failing after r234330 because the compositing policy override optional
was left set on the Page (WK1 has injected bundle SPI to clear it). Fix by having
Internals::resetToConsistentState clear this state.

  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState):

9:35 AM Changeset in webkit [234344] by mark.lam@apple.com
  • 3 edits in trunk/Source/WTF

Gardening: build fix for internal builds.
https://bugs.webkit.org/show_bug.cgi?id=188123
<rdar://problem/42672268>

Not reviewed.

Some code is relying on RELEASE_ASSERT (without extra crash info arguments)
being purely inlined and not require linkage to an external symbol. This patch
restores this property of the original RELEASE_ASSERT.

This means moving the variant of WTFCrashWithInfo that does not take extra args
to Assertions.h and making it an "inline" function. When compiling with clang,
we also specify attribute((optnone)) to force the function out of being an
inline function (each linkage unit will get a copy of the function). This causes
the 1st 4 arguments of WTFCrashWithInfo (e.g. line number) to still be captured
in the argument registers for crash diagnostics.

  • wtf/Assertions.cpp:

(WTFCrashWithInfo):

  • wtf/Assertions.h:

Jul 27, 2018:

10:22 PM Changeset in webkit [234343] by Simon Fraser
  • 8 edits
    2 adds in trunk

Animation stops with object-fit:contain on an animated 2d canvas
https://bugs.webkit.org/show_bug.cgi?id=187840

Reviewed by Zalan Bujtas.
Source/WebCore:

If a canvas has object-fit: cover or contain, repaints need to mapped through
the rect that is used to position the canvas in the element bounds, which is replacedContentRect().

Add a version of replacedContentRect() that doesn't require passing the intrinsicSize() since
all but RenderVideo just pass the RenderReplaced's intrinsicSize.

Test: fast/repaint/canvas-object-fit.html

  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::didDraw):

  • rendering/RenderHTMLCanvas.cpp:

(WebCore::RenderHTMLCanvas::paintReplaced):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::updateInnerContentRect):
(WebCore::RenderImage::paintReplaced):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::contentsBox const):

  • rendering/RenderReplaced.h:

(WebCore::RenderReplaced::replacedContentRect const):

  • rendering/shapes/ShapeOutsideInfo.cpp:

(WebCore::ShapeOutsideInfo::createShapeForImage const):

LayoutTests:

  • fast/repaint/canvas-object-fit-expected.txt: Added.
  • fast/repaint/canvas-object-fit.html: Added.
7:23 PM Changeset in webkit [234342] by Michael Catanzaro
  • 2 edits in trunk/Tools

Unreviewed, fix typo in test expectations and mark another test as timing out

  • TestWebKitAPI/glib/TestExpectations.json:
5:35 PM Changeset in webkit [234341] by Basuke Suzuki
  • 2 edits
    4 adds in trunk/LayoutTests

[Curl] Test gardening
https://bugs.webkit.org/show_bug.cgi?id=188129

Unreviewed test gardening.

  • platform/wincairo/TestExpectations:
  • platform/wincairo/http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect-expected.txt: Added.
5:35 PM Changeset in webkit [234340] by Simon Fraser
  • 6 edits
    2 adds in trunk

Adjust the color matrix for the inverse apple-invert-lightness() transformation
https://bugs.webkit.org/show_bug.cgi?id=188131
rdar://problem/42673070

Reviewed by Zalan Bujtas.

Source/WebCore:

Use the correct inverse matrix values.

Test: editing/style/inverse-color-filter.html

  • platform/graphics/filters/FilterOperation.cpp:

(WebCore::InvertLightnessFilterOperation::inverseTransformColor const):

LayoutTests:

Rebaseline tests that use the filter inversion. Add a new test that does inversion
for a whole range of colors, to get good coverage of the inversion matrix.

  • editing/style/inverse-color-filter-expected.txt: Added.
  • editing/style/inverse-color-filter.html: Added.
  • editing/style/set-backColor-with-color-filter-expected.txt:
  • editing/style/set-foreColor-with-color-filter-expected.txt:
  • platform/win/TestExpectations:
5:24 PM Changeset in webkit [234339] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

[iOS] Don't deactivate audio session
https://bugs.webkit.org/show_bug.cgi?id=188127
<rdar://problem/42544143>

Reviewed by Jon Lee.

r233435 includes a change that deactivates the shared audio session when there are no more
active media sessions. This is a good in WK2 because it allows other applications to resume
playing audio when WebKit stops playing, but it is potentially bad in WK1 where the host
app may also be playing audio.

  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::removeSession): Don't deactivate the audio session.

5:17 PM Changeset in webkit [234338] by mark.lam@apple.com
  • 2 edits in trunk/Source/bmalloc

Initialize bmalloc::DebugHeap::m_pageSize for non-Darwin builds.
https://bugs.webkit.org/show_bug.cgi?id=188132
<rdar://problem/40401599>

Reviewed by Saam Barati.

  • bmalloc/DebugHeap.cpp:

(bmalloc::DebugHeap::DebugHeap):

4:26 PM Changeset in webkit [234337] by Michael Catanzaro
  • 6 edits in trunk

More unreviewed GTK test gardening

Tools:

  • TestWebKitAPI/glib/TestExpectations.json:

WebDriverTests:

I don't really know what I'm doing with these WebDriver expectations... will this work?

LayoutTests:

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

LayoutTest http/tests/cache/disk-cache/disk-cache-204-status-code.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=162685

Unreviewed test gardening, marked as flaky on iOS Release.

  • platform/ios-wk2/TestExpectations:
3:44 PM Changeset in webkit [234335] by mark.lam@apple.com
  • 8 edits in trunk/Source

Add some crash info to Heap::checkConn() RELEASE_ASSERTs.
https://bugs.webkit.org/show_bug.cgi?id=188123
<rdar://problem/42672268>

Reviewed by Keith Miller.

Source/JavaScriptCore:

  1. Add VM::m_id and Heap::m_lastPhase fields. Both of these fit within existing padding space in VM and Heap, and should not cost any measurable perf to initialize and update.
  1. Add some crash info to the RELEASE_ASSERTs in Heap::checkConn():

worldState tells us the value we failed the assertion on.

m_lastPhase, m_currentPhase, and m_nextPhase tells us the GC phase transition
that led us here.

VM::id(), and VM::numberOfIDs() tells us how many VMs may be in play.

VM::isEntered() tells us if the current VM is currently executing JS code.

Some of this data may be redundant, but the redundancy is intentional so that
we can double check what is really happening at the time of crash.

  • heap/Heap.cpp:

(JSC::asInt):
(JSC::Heap::checkConn):
(JSC::Heap::changePhase):

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

(JSC::VM::nextID):
(JSC::VM::VM):

  • runtime/VM.h:

(JSC::VM::numberOfIDs):
(JSC::VM::id const):
(JSC::VM::isEntered const):

Source/WTF:

  1. Rename STUFF_FOR_CRASH_REGISTERx to CRASH_GPRx. These are only used in locally in Assertions.cpp. There is little to no chance of a name collision, and the shorter names will be much easier to read and grok in the code.
  1. Added an additional 2 registers so that we can pass more info.
  1. Change the WTFCrashWithInfo() implementations to issue only a single asm statement so that the compiler does not inadvertently move values out of the CRASH_GPRs that we want them to be in.
  1. Use register targeting for local variables to get the compiler to put our desired values in specific registers. For how this works, see https://gcc.gnu.org/onlinedocs/gcc/Local-Register-Variables.html#Local-Register-Variables

"The only supported use for this feature is to specify registers for input and
output operands when calling Extended asm (see Extended Asm). This may be
necessary if the constraints for a particular machine don’t provide sufficient
control to select the desired register."

  1. Enhance ASSERT, ASSERT_UNUSED, RELEASE_ASSERT, RELEASE_ASSERT_NOT_REACHED to accept crash info arguments. We no longer need to use an if statement with a call to CRASH_WITH_INFO instead of these assertions. The only case not handled yet is one where we might want to dataLog some info before the crash. I'll add that functionality in a subsequent patch.
  1. Move UNREACHABLE_FOR_PLATFORM to the bottom of Assertions.h because it depends on the definition of RELEASE_ASSERT_NOT_REACHED, which now depends on the definiton of CRASH_WITH_INFO.
  • wtf/Assertions.cpp:

(WTFCrashWithInfo):

  • wtf/Assertions.h:
3:33 PM Changeset in webkit [234334] by Chris Dumez
  • 10 edits in trunk/Source

Fix thread-safety issues related to RealtimeMediaSource::audioSamplesAvailable()
https://bugs.webkit.org/show_bug.cgi?id=188097
<rdar://problem/42558823>

Reviewed by Eric Carlson.

Source/WebCore:

Fix thread-safety issues related to RealtimeMediaSource::audioSamplesAvailable(). RealtimeMediaSource::audioSamplesAvailable()
is called on a background thread but iterates over observers that may get destroyed concurrently on the main thread.

To address the issue:

  • Introduce a Lock to protect m_observer accesses
  • Copy observers to a Vector before iterating over them
  • platform/mediastream/MediaStreamTrackPrivate.cpp:

(WebCore::MediaStreamTrackPrivate::forEachObserver const):
(WebCore::MediaStreamTrackPrivate::addObserver):
(WebCore::MediaStreamTrackPrivate::removeObserver):
(WebCore::MediaStreamTrackPrivate::setEnabled):
(WebCore::MediaStreamTrackPrivate::endTrack):
(WebCore::MediaStreamTrackPrivate::sourceStarted):
(WebCore::MediaStreamTrackPrivate::sourceStopped):
(WebCore::MediaStreamTrackPrivate::sourceMutedChanged):
(WebCore::MediaStreamTrackPrivate::sourceSettingsChanged):
(WebCore::MediaStreamTrackPrivate::videoSampleAvailable):
(WebCore::MediaStreamTrackPrivate::audioSamplesAvailable):
(WebCore::MediaStreamTrackPrivate::updateReadyState):

  • platform/mediastream/MediaStreamTrackPrivate.h:

(WebCore::MediaStreamTrackPrivate::Observer::sampleBufferUpdated):
(WebCore::MediaStreamTrackPrivate::Observer::audioSamplesAvailable):

  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::addObserver):
(WebCore::RealtimeMediaSource::removeObserver):
(WebCore::RealtimeMediaSource::forEachObserver const):
(WebCore::RealtimeMediaSource::notifyMutedObservers const):
(WebCore::RealtimeMediaSource::settingsDidChange):
(WebCore::RealtimeMediaSource::videoSampleAvailable):
(WebCore::RealtimeMediaSource::audioSamplesAvailable):
(WebCore::RealtimeMediaSource::start):
(WebCore::RealtimeMediaSource::requestStop):
(WebCore::RealtimeMediaSource::captureFailed):

  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:

(WebCore::AudioTrackPrivateMediaStreamCocoa::audioSamplesAvailable):

  • platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.cpp:
  • platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:

Source/WebKit:

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
3:32 PM Changeset in webkit [234333] by achristensen@apple.com
  • 25 edits
    1 add in trunk/Source

Don't include WebPageProxy.h just for UndoOrRedo
https://bugs.webkit.org/show_bug.cgi?id=188086

Reviewed by Saam Barati.

Source/WebCore:

  • platform/DragItem.h:

Source/WebKit:

  • Shared/UndoOrRedo.h: Added.
  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::registerEditCommand):

  • UIProcess/PageClient.h:
  • UIProcess/WebEditCommandProxy.cpp:

(WebKit::WebEditCommandProxy::unapply):
(WebKit::WebEditCommandProxy::reapply):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::registerEditCommandForUndo):
(WebKit::WebPageProxy::canUndoRedo):
(WebKit::WebPageProxy::executeUndoRedo):
(WebKit::WebPageProxy::canUndo):
(WebKit::WebPageProxy::canRedo):

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

(WebKit::PageClientImpl::registerEditCommand):
(WebKit::PageClientImpl::canUndoRedo):
(WebKit::PageClientImpl::executeUndoRedo):

  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::registerEditCommand):
(WebKit::PageClientImpl::canUndoRedo):
(WebKit::PageClientImpl::executeUndoRedo):

  • UIProcess/mac/WebContextMenuProxyMac.mm:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebEditorClient.cpp:

(WebKit::WebEditorClient::canUndo const):
(WebKit::WebEditorClient::canRedo const):
(WebKit::WebEditorClient::undo):
(WebKit::WebEditorClient::redo):

3:29 PM Changeset in webkit [234332] by achristensen@apple.com
  • 28 edits in trunk/Source

Make CompletionHandler more const correct
https://bugs.webkit.org/show_bug.cgi?id=186543

Reviewed by Saam Barati.

Source/WebCore:

  • dom/messageports/MessagePortChannel.cpp:

(WebCore::MessagePortChannel::checkRemotePortForActivity):

  • dom/messageports/MessagePortChannelProviderImpl.cpp:

(WebCore::MessagePortChannelProviderImpl::checkRemotePortForActivity):

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::responseReceived):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::loadPostRequest):

  • platform/network/cocoa/WebCoreNSURLSession.mm:

(WebCore::WebCoreNSURLSessionDataTaskClient::redirectReceived):

  • workers/service/server/RegistrationDatabase.cpp:

(WebCore::RegistrationDatabase::pushChanges):
(WebCore::RegistrationDatabase::clearAll):

  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::matchAll):

  • workers/service/server/SWServer.h:
  • workers/service/server/SWServerWorker.cpp:

(WebCore::SWServerWorker::matchAll):

  • workers/service/server/SWServerWorker.h:

Source/WebKit:

  • NetworkProcess/PingLoad.cpp:

(WebKit::PingLoad::willPerformHTTPRedirection):

  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::Engine::clearAllCaches):

  • UIProcess/Automation/SimulatedInputDispatcher.cpp:

(WebKit::SimulatedInputDispatcher::transitionInputSourceToState):

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::simulateMouseInteraction):
(WebKit::WebAutomationSession::simulateKeyboardInteraction):

  • UIProcess/Cocoa/AutomationSessionClient.mm:

(WebKit::AutomationSessionClient::requestNewPageWithOptions):
(WebKit::AutomationSessionClient::requestSwitchToPage):
(WebKit::AutomationSessionClient::requestHideWindowOfPage):
(WebKit::AutomationSessionClient::requestRestoreWindowOfPage):

  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
(WebKit::UIDelegate::UIClient::createNewPage):
(WebKit::UIDelegate::UIClient::runJavaScriptAlert):
(WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
(WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
(WebKit::UIDelegate::UIClient::requestStorageAccessConfirm):
(WebKit::UIDelegate::UIClient::decidePolicyForGeolocationPermissionRequest):
(WebKit::UIDelegate::UIClient::runBeforeUnloadConfirmPanel):
(WebKit::UIDelegate::UIClient::decidePolicyForNotificationPermissionRequest):
(WebKit::UIDelegate::UIClient::runOpenPanel):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::createNewPage):
(WebKit::WebPageProxy::webGLPolicyForURL):
(WebKit::WebPageProxy::resolveWebGLPolicyForURL):
(WebKit::WebPageProxy::getWindowFrame):

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::hasStorageAccess):
(WebKit::WebResourceLoadStatisticsStore::requestStorageAccess):
(WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent):
(WebKit::WebResourceLoadStatisticsStore::updateCookiePartitioning):

Source/WTF:

  • wtf/CompletionHandler.h:

(WTF::CompletionHandler<Out):
Calling a CompletionHandler mutates it. Make the code reflect that.

3:27 PM Changeset in webkit [234331] by Yusuke Suzuki
  • 6 edits
    1 add in trunk

[JSC] Record CoW status in ArrayProfile correctly
https://bugs.webkit.org/show_bug.cgi?id=187949

Reviewed by Saam Barati.

JSTests:

  • stress/array-profile-should-record-copy-on-write.js: Added.

(shouldBe):
(test1):
(test2):
(test3):

Source/JavaScriptCore:

In this patch, we simplify asArrayModes: just shifting the value with IndexingMode.
This is important since our OSR exit compiler records m_observedArrayModes by calculating
ArrayModes with shifting. Since ArrayModes for CoW arrays are incorrectly calculated,
our OSR exit compiler records incorrect results in ArrayProfile. And it leads to
Array::Generic DFG nodes.

  • bytecode/ArrayProfile.h:

(JSC::asArrayModes):
(JSC::ArrayProfile::ArrayProfile):

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::OSRExit::compileExit):

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileStub):

  • runtime/IndexingType.h:
3:20 PM Changeset in webkit [234330] by Simon Fraser
  • 25 edits
    2 adds in trunk

Be more conservative with compositing layer creation when memory is low
https://bugs.webkit.org/show_bug.cgi?id=187866
rdar://problem/42366345

Reviewed by Zalan Bujtas.

Source/WebCore:

When process physical footprint is above a fraction of the jetsam limit, be more conservative in making
compositing layers. We avoid compositing for these situations:

  1. Layers with 3D transforms which are affine (like translateZ(0)).
  2. Layers with will-change
  3. Layers for canvases (other than WebGL/WebGPU)

We reuse some macOS code in MemoryPressureHandler() but choose different thresholds for iOS,
falling into "conservative mode" at 50% of jetsam limit, and "strict mode" at 65%.
Compositing chooses to be more conservative in either "conservative" or "strict" memory modes.

Plumb through a "compositingPolicyOverride" both so that on-device testing isn't
flakily falling into a different mode, and so that we can impose the conservative
mode for testing.

Test: compositing/layer-creation/compositing-policy.html

  • page/Page.h:

(WebCore::Page::compositingPolicyOverride const):
(WebCore::Page::setCompositingPolicyOverride):

  • platform/graphics/transforms/Matrix3DTransformOperation.cpp:

(WebCore::Matrix3DTransformOperation::isRepresentableIn2D const):

  • platform/graphics/transforms/Matrix3DTransformOperation.h:
  • platform/graphics/transforms/PerspectiveTransformOperation.h:
  • platform/graphics/transforms/RotateTransformOperation.h:
  • platform/graphics/transforms/ScaleTransformOperation.h:
  • platform/graphics/transforms/TransformOperation.h:

(WebCore::TransformOperation::isRepresentableIn2D const):

  • platform/graphics/transforms/TransformOperations.h:

(WebCore::TransformOperations::has3DOperation const):
(WebCore::TransformOperations::isRepresentableIn2D const):

  • platform/graphics/transforms/TranslateTransformOperation.h:
  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateGeometry):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
(WebCore::RenderLayerCompositor::updateCompositingPolicy):
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::requiresCompositingForTransform const):
(WebCore::RenderLayerCompositor::requiresCompositingForVideo const):
(WebCore::RenderLayerCompositor::requiresCompositingForCanvas const):
(WebCore::RenderLayerCompositor::requiresCompositingForPlugin const):
(WebCore::RenderLayerCompositor::requiresCompositingForWillChange const):
(WebCore::RenderLayerCompositor::needsFixedRootBackgroundLayer const):
(WebCore::operator<<):

  • rendering/RenderLayerCompositor.h:
  • testing/Internals.cpp:

(WebCore::Internals::setCompositingPolicyOverride):
(WebCore::Internals::compositingPolicyOverride const):

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

Source/WebKit:

When process physical footprint is above a fraction of the jetsam limit, be more conservative in making
compositing layers. We avoid compositing for these situations:

  1. Layers with 3D transforms which are affine (like translateZ(0)).
  2. Layers with will-change
  3. Layers for canvases (other than WebGL/WebGPU)

We reuse some macOS code in MemoryPressureHandler() but choose different thresholds for iOS,
falling into "conservative mode" at 50% of jetsam limit, and "strict mode" at 65%.
Compositing chooses to be more conservative in either "conservative" or "strict" memory modes.

Plumb through a "compositingPolicyOverride" both so that on-device testing isn't
flakily falling into a different mode, and so that we can impose the conservative
mode for testing.

  • WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:

(WKBundlePageSetCompositingPolicyOverride):

  • WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:

Source/WTF:

When process physical footprint is above a fraction of the jetsam limit, be more conservative in making
compositing layers. We avoid compositing for these situations:

  1. Layers with 3D transforms which are affine (like translateZ(0)).
  2. Layers with will-change
  3. Layers for canvases (other than WebGL/WebGPU)

We reuse some macOS code in MemoryPressureHandler() but choose different thresholds for iOS,
falling into "conservative mode" at 50% of jetsam limit, and "strict mode" at 65%.
Compositing chooses to be more conservative in either "conservative" or "strict" memory modes.

Plumb through a "compositingPolicyOverride" both so that on-device testing isn't
flakily falling into a different mode, and so that we can impose the conservative
mode for testing.

  • wtf/MemoryPressureHandler.cpp:

(WTF::thresholdForPolicy):
(WTF::MemoryPressureHandler::currentMemoryUsagePolicy):

  • wtf/MemoryPressureHandler.h:

Tools:

When process physical footprint is above a fraction of the jetsam limit, be more conservative in making
compositing layers. We avoid compositing for these situations:

  1. Layers with 3D transforms which are affine (like translateZ(0)).
  2. Layers with will-change
  3. Layers for canvases (other than WebGL/WebGPU)

We reuse some macOS code in MemoryPressureHandler() but choose different thresholds for iOS,
falling into "conservative mode" at 50% of jetsam limit, and "strict mode" at 65%.
Compositing chooses to be more conservative in either "conservative" or "strict" memory modes.

Plumb through a "compositingPolicyOverride" both so that on-device testing isn't
flakily falling into a different mode, and so that we can impose the conservative
mode for testing.

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::InjectedBundlePage::prepare):

LayoutTests:

  • compositing/layer-creation/compositing-policy-expected.txt: Added.
  • compositing/layer-creation/compositing-policy.html: Added.
3:11 PM Changeset in webkit [234329] by Alan Bujtas
  • 4 edits in trunk

[WK1] ASSERTION FAILED: renderer().repaintLayoutRects().m_repaintRect == renderer().clippedOverflowRectForRepaint(renderer().containerForRepaint()) in WebCore::RenderLayer::updateLayerPositionsAfterScroll
https://bugs.webkit.org/show_bug.cgi?id=188122
<rdar://problem/42584790>

Reviewed by Simon Fraser.

Source/WebCore:

When ScrollView's m_paintsEntireContents flag flips due to layer backing changes, the repaint area transitions from
visual to layout overflow. When this happens the cached repaint rects become invalid and they need to be recomputed.
Currently there's no mechanism to trigger repaint cache invalidation from ScrollView.
Skip assertion for now on WK1 (see webkit.org/b/188121)

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::updateLayerPositionsAfterScroll):

LayoutTests:

  • platform/mac-wk1/TestExpectations:
2:20 PM Changeset in webkit [234328] by sbarati@apple.com
  • 2 edits in trunk/Source/bmalloc

Explicitly handle memlimit_active < 0
https://bugs.webkit.org/show_bug.cgi?id=188125

Reviewed by Mark Lam.

This may come up during development when someone wants the limit
to be "infinite".

  • bmalloc/AvailableMemory.cpp:

(bmalloc::jetsamLimit):

1:50 PM Changeset in webkit [234327] by achristensen@apple.com
  • 5 edits in trunk/Source/WebKit

Add RefCounted CompletionHandler wrapping abstraction for sending policy decisions back to WebProcess
https://bugs.webkit.org/show_bug.cgi?id=188089

Reviewed by Geoffrey Garen.

This will be necessary for when I add an asynchronous parallel step to decidePolicyForNavigationAction.
We will want to wait for that asynchronous step for decidePolicyForNavigationActionSync but not for a client.

No change in behavior.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::PolicyDecisionSender::create):
(WebKit::WebPageProxy::PolicyDecisionSender::operator()):
(WebKit::WebPageProxy::PolicyDecisionSender::PolicyDecisionSender):
(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForNavigationActionAsync):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

1:35 PM Changeset in webkit [234326] by sbarati@apple.com
  • 7 edits
    1 add in trunk/Source

Use SPI to compute the jetsam limit on iOS instead of hardcoding 840MB
https://bugs.webkit.org/show_bug.cgi?id=188091
<rdar://problem/42647697>

Reviewed by Simon Fraser.

Source/bmalloc:

We want bmalloc to dynamically adapt to the jetsam limit of the process
it's running in. WTF::ramSize() is based off bmalloc's availableMemory,
so it will now reflect the result of the real jetsam limit when we can
read it.

Reading the jetsam limit requires an entitlement, so this patch opts in
the WebContent/Storage/Network processes. We fall back to 840MB (the
old hard coded value) when the SPI call fails (e.g, when we're in a
process without the proper entitlement).

  • bmalloc.xcodeproj/project.pbxproj:
  • bmalloc/AvailableMemory.cpp:

(bmalloc::jetsamLimit):
(bmalloc::computeAvailableMemory):

  • bmalloc/darwin/MemoryStatusSPI.h: Added.

Source/WebKit:

Give the Network/Storage/WebContent process the com.apple.private.memorystatus
entitlement. This allows them to read the process jetsam limit.

  • Configurations/Databases-iOS.entitlements:
  • Configurations/Network-iOS.entitlements:
  • Configurations/WebContent-iOS.entitlements:
1:11 PM Changeset in webkit [234325] by Michael Catanzaro
  • 7 edits in trunk

Unreviewed GTK test gardening

Tools:

  • TestWebKitAPI/glib/TestExpectations.json:

WebDriverTests:

LayoutTests:

11:46 AM Changeset in webkit [234324] by Kocsen Chung
  • 7 edits in tags/Safari-606.1.32.1/Source/WebCore

Cherry-pick r234318. rdar://problem/42467016

[WIN] Crash when trying to access store pages
https://bugs.webkit.org/show_bug.cgi?id=188032
<rdar://problem/42467016>

Reviewed by Brent Fulgham.

The Windows implementation of GlyphBuffer has an additional member, m_offsets, which represents
an additional offset to the position to paint each glyph. It also has two add() functions, one
which appends to this vector, and one which doesn't. The one that doesn't append to the vector
should never be called on Windows (because Windows requires this vector to be full).

There were two situations where it was getting called:
1) Inside ComplexTextController
2) Inside display list playback

Windows shouldn't be using ComplexTextController because the Windows implementation of this
class isn't ready yet; instead it should be using UniscribeController. The display list playback
code should be used on Windows.

Rather than fix the function to append an offset, we actually don't need the m_offsets vector
in the first place. Instead, we can do it the same way that the Cocoa ports do it, which is to
bake the offsets into the glyph advances. This is possible because the GlyphBuffer doesn't need
to distinguish between layout advances and paint advances, so we can bake them together and
just put paint advances in the GlyphBuffer. This should be a small (probably within-the-noise)
performance and memory improvement.

  • platform/graphics/ComplexTextController.cpp: (WebCore::ComplexTextController::ComplexTextController): Make sure that ComplexTextController isn't used on Windows.
  • platform/graphics/FontCascade.cpp: (WebCore::FontCascade::widthOfTextRange const): Switch from ComplexTextController to UniscribeController on Windows. (WebCore::FontCascade::drawGlyphBuffer const): After deleting the m_offsets vector, there's no reason to consult it when drawing.
  • platform/graphics/GlyphBuffer.h: Remove m_offsets (WebCore::GlyphBuffer::clear): (WebCore::GlyphBuffer::advanceAt const): (WebCore::GlyphBuffer::add): (WebCore::GlyphBuffer::expandLastAdvance): (WebCore::GlyphBuffer::shrink): (WebCore::GlyphBuffer::swap): (WebCore::GlyphBuffer::offsetAt const): Deleted.
  • platform/graphics/win/FontCGWin.cpp: (WebCore::FontCascade::drawGlyphs): After deleting the m_offsets vector, there's no reason to consult it when drawing.
  • platform/graphics/win/FontCascadeDirect2D.cpp: (WebCore::FontCascade::drawGlyphs): Ditto.
  • platform/graphics/win/UniscribeController.cpp: (WebCore::UniscribeController::shapeAndPlaceItem): Bake in the offsets into the glyph advances.

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

11:44 AM Changeset in webkit [234323] by Kocsen Chung
  • 7 edits in tags/Safari-606.1.32.1/Source

Versioning.

11:39 AM Changeset in webkit [234322] by bshafiei@apple.com
  • 7 edits in branches/safari-606-branch/Source/WebCore

Cherry-pick r234318. rdar://problem/42467016

[WIN] Crash when trying to access store pages
https://bugs.webkit.org/show_bug.cgi?id=188032
<rdar://problem/42467016>

Reviewed by Brent Fulgham.

The Windows implementation of GlyphBuffer has an additional member, m_offsets, which represents
an additional offset to the position to paint each glyph. It also has two add() functions, one
which appends to this vector, and one which doesn't. The one that doesn't append to the vector
should never be called on Windows (because Windows requires this vector to be full).

There were two situations where it was getting called:
1) Inside ComplexTextController
2) Inside display list playback

Windows shouldn't be using ComplexTextController because the Windows implementation of this
class isn't ready yet; instead it should be using UniscribeController. The display list playback
code should be used on Windows.

Rather than fix the function to append an offset, we actually don't need the m_offsets vector
in the first place. Instead, we can do it the same way that the Cocoa ports do it, which is to
bake the offsets into the glyph advances. This is possible because the GlyphBuffer doesn't need
to distinguish between layout advances and paint advances, so we can bake them together and
just put paint advances in the GlyphBuffer. This should be a small (probably within-the-noise)
performance and memory improvement.

  • platform/graphics/ComplexTextController.cpp: (WebCore::ComplexTextController::ComplexTextController): Make sure that ComplexTextController isn't used on Windows.
  • platform/graphics/FontCascade.cpp: (WebCore::FontCascade::widthOfTextRange const): Switch from ComplexTextController to UniscribeController on Windows. (WebCore::FontCascade::drawGlyphBuffer const): After deleting the m_offsets vector, there's no reason to consult it when drawing.
  • platform/graphics/GlyphBuffer.h: Remove m_offsets (WebCore::GlyphBuffer::clear): (WebCore::GlyphBuffer::advanceAt const): (WebCore::GlyphBuffer::add): (WebCore::GlyphBuffer::expandLastAdvance): (WebCore::GlyphBuffer::shrink): (WebCore::GlyphBuffer::swap): (WebCore::GlyphBuffer::offsetAt const): Deleted.
  • platform/graphics/win/FontCGWin.cpp: (WebCore::FontCascade::drawGlyphs): After deleting the m_offsets vector, there's no reason to consult it when drawing.
  • platform/graphics/win/FontCascadeDirect2D.cpp: (WebCore::FontCascade::drawGlyphs): Ditto.
  • platform/graphics/win/UniscribeController.cpp: (WebCore::UniscribeController::shapeAndPlaceItem): Bake in the offsets into the glyph advances.

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

11:31 AM Changeset in webkit [234321] by achristensen@apple.com
  • 2 edits in trunk/Tools

Fix API tests after r234314
https://bugs.webkit.org/show_bug.cgi?id=188077

Make API tests use new delegate method.

  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:

(-[WebsitePoliciesWebsiteDataStoreDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
(-[WebsitePoliciesWebsiteDataStoreDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted.

11:30 AM Changeset in webkit [234320] by achristensen@apple.com
  • 2 edits in trunk/Tools

Fix API tests after r234314
https://bugs.webkit.org/show_bug.cgi?id=188077

Make API tests use new delegate method.

  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:

(-[ContentBlockingWebsitePoliciesDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
(-[AutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
(-[AsyncAutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
(-[CustomHeaderFieldsDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
(-[PopUpPoliciesDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
(-[ContentBlockingWebsitePoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted.
(-[AutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted.
(-[AsyncAutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted.
(-[CustomHeaderFieldsDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted.
(-[PopUpPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted.

11:27 AM Changeset in webkit [234319] by Kocsen Chung
  • 1 copy in tags/Safari-606.1.32.1

New tag.

11:21 AM Changeset in webkit [234318] by mmaxfield@apple.com
  • 7 edits in trunk/Source/WebCore

[WIN] Crash when trying to access store pages
https://bugs.webkit.org/show_bug.cgi?id=188032
<rdar://problem/42467016>

Reviewed by Brent Fulgham.

The Windows implementation of GlyphBuffer has an additional member, m_offsets, which represents
an additional offset to the position to paint each glyph. It also has two add() functions, one
which appends to this vector, and one which doesn't. The one that doesn't append to the vector
should never be called on Windows (because Windows requires this vector to be full).

There were two situations where it was getting called:
1) Inside ComplexTextController
2) Inside display list playback

Windows shouldn't be using ComplexTextController because the Windows implementation of this
class isn't ready yet; instead it should be using UniscribeController. The display list playback
code should be used on Windows.

Rather than fix the function to append an offset, we actually don't need the m_offsets vector
in the first place. Instead, we can do it the same way that the Cocoa ports do it, which is to
bake the offsets into the glyph advances. This is possible because the GlyphBuffer doesn't need
to distinguish between layout advances and paint advances, so we can bake them together and
just put paint advances in the GlyphBuffer. This should be a small (probably within-the-noise)
performance and memory improvement.

  • platform/graphics/ComplexTextController.cpp:

(WebCore::ComplexTextController::ComplexTextController): Make sure that ComplexTextController
isn't used on Windows.

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::widthOfTextRange const): Switch from ComplexTextController to
UniscribeController on Windows.
(WebCore::FontCascade::drawGlyphBuffer const): After deleting the m_offsets vector, there's
no reason to consult it when drawing.

  • platform/graphics/GlyphBuffer.h: Remove m_offsets

(WebCore::GlyphBuffer::clear):
(WebCore::GlyphBuffer::advanceAt const):
(WebCore::GlyphBuffer::add):
(WebCore::GlyphBuffer::expandLastAdvance):
(WebCore::GlyphBuffer::shrink):
(WebCore::GlyphBuffer::swap):
(WebCore::GlyphBuffer::offsetAt const): Deleted.

  • platform/graphics/win/FontCGWin.cpp:

(WebCore::FontCascade::drawGlyphs): After deleting the m_offsets vector, there's no reason
to consult it when drawing.

  • platform/graphics/win/FontCascadeDirect2D.cpp:

(WebCore::FontCascade::drawGlyphs): Ditto.

  • platform/graphics/win/UniscribeController.cpp:

(WebCore::UniscribeController::shapeAndPlaceItem): Bake in the offsets into the glyph advances.

11:19 AM Changeset in webkit [234317] by Basuke Suzuki
  • 4 edits in trunk

[Curl] Crash on synchronous request via ResourceHandle.
https://bugs.webkit.org/show_bug.cgi?id=188033

Reviewed by Alex Christensen.

Source/WebCore:

The timing of instantiation of delegate was wrong. Move it inside delegate getter().
This bug was introduced at r228577.

Test: http/tests/xmlhttprequest/simple-sync.html

  • platform/network/curl/ResourceHandleCurl.cpp:

(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::delegate):

LayoutTests:

bug/188033 Crash sync xmlhttprequest

  • platform/wincairo/TestExpectations:
11:02 AM Changeset in webkit [234316] by david_fenton@apple.com
  • 2 edits in trunk/LayoutTests

Layout Test tiled-drawing/scrolling/fixed/four-bars-zoomed.html is flaky text failure.
https://bugs.webkit.org/show_bug.cgi?id=188096

Unreviewed test gardening, marked test as flaky.

  • platform/mac-wk2/TestExpectations:
11:02 AM Changeset in webkit [234315] by david_fenton@apple.com
  • 2 edits in trunk/Source

Unreviewed, rolling out r233461.

assertions triggered on ios11 Debug wk2

Reverted changeset:

"[iOS] Add assert to catch improper use of WebCore::Timer in
UI Process"
https://bugs.webkit.org/show_bug.cgi?id=185330
https://trac.webkit.org/changeset/233461

10:03 AM Changeset in webkit [234314] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebKit

Remove unused WKNavigationDelegatePrivate decidePolicyForNavigationAction SPI
https://bugs.webkit.org/show_bug.cgi?id=188077

Patch by Alex Christensen <achristensen@webkit.org> on 2018-07-27
Reviewed by Darin Adler.

The one client has moved to the version with userInfo, and it never used the SPI
on old operating systems.

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

(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):

10:02 AM Changeset in webkit [234313] by achristensen@apple.com
  • 6 edits in trunk/Source/WebKit

Begin making WKWebViewConfiguration a wrapper around an API::PageConfiguration
https://bugs.webkit.org/show_bug.cgi?id=188030

Reviewed by Sam Weinig.

Eventually WKWebViewConfiguration should become just a API::ObjectStorage<API::PageConfiguration>.
The transition includes adding fields that exist in WKWebViewConfiguration to API::PageConfiguration
and making WKWebViewConfiguration's getters and setters just call API::PageConfiguration's corresponding methods
instead of having an ivar for each value then copying it to an API::PageConfiguration we construct in
the WKWebView constructor. To transition incrementally, I've added a RefPtr<API::PageConfiguration> ivar to
WKWebViewConfiguration and moved a few ivars to use the values stored in that API::PageConfiguration instead.
I've arbitrarily chosen _treatsSHA1SignedCertificatesAsInsecure and _urlSchemeHandlers as the first two
properties to transition, and I'll continue transitioning each ivar in small, easy-to-review bunches.

  • UIProcess/API/APIPageConfiguration.cpp:

(API::PageConfiguration::copy const):
(API::PageConfiguration::urlSchemeHandlerForURLScheme):
(API::PageConfiguration::setURLSchemeHandlerForURLScheme):

  • UIProcess/API/APIPageConfiguration.h:

(API::PageConfiguration::urlSchemeHandlers):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration setURLSchemeHandler:forURLScheme:]):
(-[WKWebViewConfiguration urlSchemeHandlerForURLScheme:]):
(-[WKWebViewConfiguration copyPageConfiguration]):
(-[WKWebViewConfiguration _treatsSHA1SignedCertificatesAsInsecure]):
(-[WKWebViewConfiguration _setTreatsSHA1SignedCertificatesAsInsecure:]):
(-[WKWebViewConfiguration _urlSchemeHandlers]): Deleted.

  • UIProcess/API/Cocoa/WKWebViewConfigurationInternal.h:
9:58 AM Changeset in webkit [234312] by Chris Dumez
  • 10 edits in trunk/Source/WebCore

[Media] Avoid unnecessarily constructing *TrackList objects
https://bugs.webkit.org/show_bug.cgi?id=188094

Reviewed by Eric Carlson.

Avoid unnecessarily constructing *TrackList objects as this is preventing us from making them
ActiveDOMObjects.

  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::removeSourceBuffer):

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::addAudioTrack):
(WebCore::HTMLMediaElement::addTextTrack):
(WebCore::HTMLMediaElement::addVideoTrack):
(WebCore::HTMLMediaElement::ensureAudioTracks):
(WebCore::HTMLMediaElement::ensureTextTracks):
(WebCore::HTMLMediaElement::ensureVideoTracks):
(WebCore::HTMLMediaElement::setSelectedTextTrack):
(WebCore::HTMLMediaElement::audioTracks): Deleted.
(WebCore::HTMLMediaElement::textTracks): Deleted.
(WebCore::HTMLMediaElement::videoTracks): Deleted.

  • html/HTMLMediaElement.h:

(WebCore::HTMLMediaElement::audioTracks const):
(WebCore::HTMLMediaElement::textTracks const):
(WebCore::HTMLMediaElement::videoTracks const):

  • html/HTMLMediaElement.idl:
  • html/shadow/MediaControlElements.cpp:

(WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
(WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu):
(WebCore::MediaControlTextTrackContainerElement::updateTextStrokeStyle):

  • html/track/TextTrack.cpp:

(WebCore::TextTrack::setKind):
(WebCore::TextTrack::trackIndex):
(WebCore::TextTrack::trackIndexRelativeToRenderedTracks):
(WebCore::TextTrack::setLanguage):

  • html/track/VideoTrack.cpp:

(WebCore::VideoTrack::setKind):
(WebCore::VideoTrack::setLanguage):

  • platform/cocoa/PlaybackSessionModelMediaElement.mm:

(WebCore::PlaybackSessionModelMediaElement::setMediaElement):
(WebCore::PlaybackSessionModelMediaElement::updateMediaSelectionOptions):

9:50 AM Changeset in webkit [234311] by Basuke Suzuki
  • 4 edits in trunk

[Curl] Set correct source info to ResourceResponse.
https://bugs.webkit.org/show_bug.cgi?id=188069

Reviewed by Fujii Hironori.

Source/WebCore:

ResourceResponseBase::Source::Network must be set by each ports. Curl port
didn't set this.

Test: http/tests/cache/disk-cache/disk-cache-302-status-code.html

  • platform/network/curl/ResourceResponseCurl.cpp:

(WebCore::ResourceResponse::ResourceResponse):

LayoutTests:

  • platform/wincairo/TestExpectations:
    • http/tests/cache/disk-cache/disk-cache-302-status-code.html: Pass
9:28 AM Changeset in webkit [234310] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

Loading a file URL and then issuing a reload right away causes the load to fail due to sandboxing
https://bugs.webkit.org/show_bug.cgi?id=188078
<rdar://problem/42562493>

Unreviewed, follow-up fix after r234290 to address assertion hits on the bots. Make the fix
specific to reloads as we know the existing provisional sandbox extension is for the same
URL then.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::reload):
(WebKit::WebPage::SandboxExtensionTracker::beginLoad):
(WebKit::WebPage::SandboxExtensionTracker::beginReload):

  • WebProcess/WebPage/WebPage.h:
3:46 AM Changeset in webkit [234309] by Fujii Hironori
  • 2 edits in trunk/LayoutTests

[WinCairo] Unreviewed test gardening

  • platform/wincairo/TestExpectations:

Enable test cases under http/tests/css.

Jul 26, 2018:

11:02 PM Changeset in webkit [234308] by bshafiei@apple.com
  • 6 edits
    2 adds in branches/safari-606-branch

Cherry-pick r234291. rdar://problem/42650439

[Fullscreen] Do not create composited layers for renderers unless they are part of the fullscreen subtree.
https://bugs.webkit.org/show_bug.cgi?id=188087
<rdar://problem/42632124>

Reviewed by Simon Fraser.

Source/WebCore:

Sibling composited layers prevent battery lifetime optimizations when in fullscreen.

Test: compositing/no-compositing-when-fulll-screen-is-present.html

  • rendering/RenderLayer.cpp: (WebCore::RenderLayer::isDescendantOf const):
  • rendering/RenderLayer.h:
  • rendering/RenderLayerCompositor.cpp: (WebCore::isDescendantOfFullScreenLayer): (WebCore::RenderLayerCompositor::requiresCompositingForWillChange const): (WebCore::RenderLayerCompositor::requiresCompositingForPosition const):

LayoutTests:

  • compositing/no-compositing-when-fulll-screen-is-present-expected.txt: Added.
  • compositing/no-compositing-when-fulll-screen-is-present.html: Added.

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

11:02 PM Changeset in webkit [234307] by bshafiei@apple.com
  • 4 edits
    2 adds in branches/safari-606-branch

Cherry-pick r234275. rdar://problem/42650440

AX: nothing returned for various previous text marker APIs from one div/p node to another
https://bugs.webkit.org/show_bug.cgi?id=188071

Reviewed by Chris Fleizach.

Source/WebCore:

TextIterator is emitting an extra '\n' at the end of the <p> node and there's no
corresponding text node in the DOM tree, so we are not able to handle that for
text markers. Fixed it by ignoring the extra '\n' and anchor the text marker to
the previous child text node.

Test: accessibility/mac/text-marker-p-tags.html

  • accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::traverseToOffsetInRange):

LayoutTests:

  • accessibility/mac/text-marker-p-tags-expected.txt: Added.
  • accessibility/mac/text-marker-p-tags.html: Added.
  • accessibility/mac/text-marker-string-for-document-range-expected.txt:

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

11:02 PM Changeset in webkit [234306] by bshafiei@apple.com
  • 3 edits
    1 add in branches/safari-606-branch

Cherry-pick r234269. rdar://problem/42650430

arrayProtoPrivateFuncConcatMemcpy() should handle copying from an Undecided type array.
https://bugs.webkit.org/show_bug.cgi?id=188065
<rdar://problem/42515726>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-188065.js: Added.

Source/JavaScriptCore:

  • runtime/ArrayPrototype.cpp: (JSC::clearElement): (JSC::copyElements): (JSC::arrayProtoPrivateFuncConcatMemcpy):

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

11:02 PM Changeset in webkit [234305] by bshafiei@apple.com
  • 3 edits in branches/safari-606-branch/Source/WebCore

Cherry-pick r234264. rdar://problem/42650373

Switching tabs should not close PiP window
https://bugs.webkit.org/show_bug.cgi?id=188054
<rdar://problem/41212379>

Reviewed by Jon Lee.

No new tests, fixes an existing test.

Prior to r233926, calling VideoFullscreenInterfaceMac::requestHideAndExitFullscreen was a noop.
In r233926 it was updated to close the PiP window and was called from the PIPViewControllerDelegate
selectors to close the PiP window. requestHideAndExitFullscreen is also called from
WebPageProxy::viewDidLeaveWindow when the web view is removed from it window, so switching
tabs also closed the PiP window. Revert the changes to requestHideAndExitFullscreen, and add
a new method that is only used by the delegate to exit PiP.

  • platform/mac/VideoFullscreenInterfaceMac.h: (WebCore::VideoFullscreenInterfaceMac::requestHideAndExitFullscreen): Make this an empty, do-nothing method.
  • platform/mac/VideoFullscreenInterfaceMac.mm: (-[WebVideoFullscreenInterfaceMacObjC pipShouldClose:]): Call requestHideAndExitPiP. (-[WebVideoFullscreenInterfaceMacObjC pipActionStop:]): Ditto. (WebCore::VideoFullscreenInterfaceMac::requestHideAndExitPiP): Renamed from requestHideAndExitFullscreen. (WebCore::VideoFullscreenInterfaceMac::requestHideAndExitFullscreen): Deleted.

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

11:02 PM Changeset in webkit [234304] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebKit

Cherry-pick r234262. rdar://problem/42650389

Disable Dark Mode in the Plugin process to avoid rendering issues
https://bugs.webkit.org/show_bug.cgi?id=188059
<rdar://problem/42369281>

Reviewed by Tim Horton.

Plugins generally do not support dark mode and this causes rendering issues so
disable dark mode in the plugin process.

  • PluginProcess/mac/PluginProcessMac.mm: (WebKit::PluginProcess::platformInitializePluginProcess):

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

11:02 PM Changeset in webkit [234303] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebKit

Cherry-pick r234223. rdar://problem/42650367

[macOS] Update sandboxes for revised OpenCL calls and streaming media
https://bugs.webkit.org/show_bug.cgi?id=188013
<rdar://problem/42594262>

Reviewed by Eric Carlson.

Testing logs from recent Mojave builds shows that OpenCL is checking more CPU-specific values as part of WebKit
painting operations. We need to allow these checks in the sandbox to support these more optimized drawing operations.

I also corrected some sandbox violations I found while investigating streaming media issues.

  • WebProcess/com.apple.WebProcess.sb.in:

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

11:02 PM Changeset in webkit [234302] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebKit

Cherry-pick r234081. rdar://problem/42490080

REGRESSION(r233925): Can't go into PiP twice
https://bugs.webkit.org/show_bug.cgi?id=187876
<rdar://problem/42444520>

Reviewed by Jon Lee.

We fail to enter PiP the second time because the video fullscreen interface no longer has a
model, and so gives a contentSize of 0x0. This happens because we disassociate the
interface from the model in didCleanupFullscreen. However, the interface and model can still
be re-used if they're kept alive by another client. We should delay disassociating the model
from the interface until just before the model is destroyed in removeClientForContext.

  • UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: (WebKit::VideoFullscreenManagerProxy::removeClientForContext): (WebKit::VideoFullscreenManagerProxy::didCleanupFullscreen):

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

11:02 PM Changeset in webkit [234301] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebCore

Cherry-pick r234078. rdar://problem/42490088

REGRESSION (r233974): Cannot close pip'd video; pops back into PiP.
https://bugs.webkit.org/show_bug.cgi?id=187873

Reviewed by Jon Lee.

When the PIP machinery on Mac wants to close the PIP window (due to the close button being clicked), it does
not consult our -shouldClosePiP handler; it just tells us that we're going to close. So we never setup the
necessary state on the WebProcess side and still think that our "targetIsFullscreen". When we get the "stop"
action, just request exit fullscreen, but set up the _pipState to think we're already exiting (because we are).

  • platform/mac/VideoFullscreenInterfaceMac.mm: (-[WebVideoFullscreenInterfaceMacObjC pipActionStop:]):

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

11:02 PM Changeset in webkit [234300] by bshafiei@apple.com
  • 3 edits in branches/safari-606-branch/Source/WebCore

Cherry-pick r234051. rdar://problem/42451584

First Auto-PiP from Fullscreen too small & animation blocks
https://bugs.webkit.org/show_bug.cgi?id=187745
<rdar://problem/42316583>

Reviewed by Jon Lee.

1) When Auto-PiPing, we don't have the luxury of setting up the fullscreen state
ahead of time; we get notified that PiP has already started. The area of the code
which does this just-in-time setup needs to set the video layer's frame so that the
transform within the PiP window is correct.

2) We generate a placeholder image when going into fullscreen, but we need to do
so synchronously. Create the AVPlayerItemVideoOutput up front at AVPlayerItem creation
time wherever AVPIVO is available.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
  • platform/ios/VideoFullscreenInterfaceAVKit.mm: (VideoFullscreenInterfaceAVKit::doSetup):

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

11:02 PM Changeset in webkit [234299] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebCore

Cherry-pick r234044. rdar://problem/42433225

REGRESSION(r233969): ASSERT in -[WebAVPlayerLayer setVideoGravity:]
https://bugs.webkit.org/show_bug.cgi?id=187814
<rdar://problem/42391869>

Reviewed by Eric Carlson.

After r233969 caused models to disassociate themselves from interfaces, it is now possible that an
VideoFullscreenInterfaceAVKit can have a nil model. We should null-check, not ASSERT, now that the
assertion no longer holds true.

  • platform/ios/VideoFullscreenInterfaceAVKit.mm: (-[WebAVPlayerLayer layoutSublayers]): (-[WebAVPlayerLayer resolveBounds]): (-[WebAVPlayerLayer setVideoGravity:]):

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

11:02 PM Changeset in webkit [234298] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebCore

Cherry-pick r233936. rdar://problem/42354941

Unreviewed API Test fix; restored a line inadventantly removed in r233926.

  • platform/mac/VideoFullscreenInterfaceMac.mm: (-[WebVideoFullscreenInterfaceMacObjC pipDidClose:]):

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

11:02 PM Changeset in webkit [234297] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebCore

Cherry-pick r233930. rdar://problem/42354941

Unreviewed build fix after r233926; BOOL !== bool.

  • platform/ios/VideoFullscreenInterfaceAVKit.mm: (VideoFullscreenInterfaceAVKit::pictureInPictureWasStartedWhenEnteringBackground const):

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

11:01 PM Changeset in webkit [234296] by bshafiei@apple.com
  • 25 edits
    2 adds
    4 deletes in branches/safari-606-branch

Cherry-pick r233926. rdar://problem/42354941

PiP from Element Fullscreen should match AVKit's behavior
https://bugs.webkit.org/show_bug.cgi?id=187623
Source/WebCore:

Reviewed by Jon Lee.

PiP behavior should be defined at the WebKit2 level, and not in HTMLMediaElement:

  • html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::enterFullscreen):

Add an accessor for pictureInPictureWasStartedWhenEnteringBackground():

  • platform/cocoa/VideoFullscreenModelVideoElement.mm: (VideoFullscreenInterfaceAVKit::pictureInPictureWasStartedWhenEnteringBackground const):

Add VideoFullscreenModelClient virutal methods for PiP change notifications:

  • platform/cocoa/VideoFullscreenModel.h: (WebCore::VideoFullscreenModelClient::hasVideoChanged): (WebCore::VideoFullscreenModelClient::videoDimensionsChanged): (WebCore::VideoFullscreenModelClient::willEnterPictureInPicture): (WebCore::VideoFullscreenModelClient::didEnterPictureInPicture): (WebCore::VideoFullscreenModelClient::failedToEnterPictureInPicture): (WebCore::VideoFullscreenModelClient::willExitPictureInPicture): (WebCore::VideoFullscreenModelClient::didExitPictureInPicture): (WebCore::VideoFullscreenModelClient::failedToExitPictureInPicture):
  • platform/cocoa/VideoFullscreenModelVideoElement.h:
  • platform/cocoa/VideoFullscreenModelVideoElement.mm: (VideoFullscreenModelVideoElement::willEnterPictureInPicture): (VideoFullscreenModelVideoElement::didEnterPictureInPicture): (VideoFullscreenModelVideoElement::failedToEnterPictureInPicture): (VideoFullscreenModelVideoElement::willExitPictureInPicture): (VideoFullscreenModelVideoElement::didExitPictureInPicture): (VideoFullscreenModelVideoElement::failedToExitPictureInPicture):
  • platform/ios/VideoFullscreenInterfaceAVKit.h:
  • platform/ios/VideoFullscreenInterfaceAVKit.mm: (-[WebAVPlayerLayer layoutSublayers]): (-[WebAVPlayerLayer resolveBounds]): (-[WebAVPlayerLayer setVideoGravity:]): (VideoFullscreenInterfaceAVKit::setupFullscreen): (VideoFullscreenInterfaceAVKit::presentingViewController): (VideoFullscreenInterfaceAVKit::willStartPictureInPicture): (VideoFullscreenInterfaceAVKit::didStartPictureInPicture): (VideoFullscreenInterfaceAVKit::failedToStartPictureInPicture): (VideoFullscreenInterfaceAVKit::willStopPictureInPicture): (VideoFullscreenInterfaceAVKit::didStopPictureInPicture): (VideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason): (VideoFullscreenInterfaceAVKit::doSetup):
  • platform/ios/WebVideoFullscreenControllerAVKit.mm: (VideoFullscreenControllerContext::willEnterPictureInPicture): (VideoFullscreenControllerContext::didEnterPictureInPicture): (VideoFullscreenControllerContext::failedToEnterPictureInPicture): (VideoFullscreenControllerContext::willExitPictureInPicture): (VideoFullscreenControllerContext::didExitPictureInPicture): (VideoFullscreenControllerContext::failedToExitPictureInPicture):
  • platform/mac/VideoFullscreenInterfaceMac.h: (WebCore::VideoFullscreenInterfaceMac::requestHideAndExitFullscreen): Deleted.
  • platform/mac/VideoFullscreenInterfaceMac.mm: (-[WebVideoFullscreenInterfaceMacObjC invalidateFullscreenState]): (-[WebVideoFullscreenInterfaceMacObjC exitPIP]): (-[WebVideoFullscreenInterfaceMacObjC exitPIPAnimatingToRect:inWindow:]): (-[WebVideoFullscreenInterfaceMacObjC pipShouldClose:]): (-[WebVideoFullscreenInterfaceMacObjC pipDidClose:]): (WebCore::VideoFullscreenInterfaceMac::enterFullscreen): (WebCore::VideoFullscreenInterfaceMac::exitFullscreen): (WebCore::VideoFullscreenInterfaceMac::exitFullscreenWithoutAnimationToMode): (WebCore::VideoFullscreenInterfaceMac::requestHideAndExitFullscreen):

Source/WebCore/PAL:

Reviewed by Jon Lee.

  • pal/spi/mac/PIPSPI.h:

Source/WebKit:

Reviewed by Jon Lee.

  • UIProcess/Cocoa/PlaybackSessionManagerProxy.h: (WebKit::PlaybackSessionManagerProxy::controlsManagerContextId const):
  • UIProcess/Cocoa/VideoFullscreenManagerProxy.h:
  • UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: (WebKit::VideoFullscreenModelContext::willEnterPictureInPicture): (WebKit::VideoFullscreenModelContext::didEnterPictureInPicture): (WebKit::VideoFullscreenModelContext::failedToEnterPictureInPicture): (WebKit::VideoFullscreenModelContext::willExitPictureInPicture): (WebKit::VideoFullscreenModelContext::didExitPictureInPicture): (WebKit::VideoFullscreenModelContext::failedToExitPictureInPicture): (WebKit::VideoFullscreenManagerProxy::controlsManagerInterface):
  • UIProcess/ios/fullscreen/WKFullScreenViewController.mm: (WKFullScreenViewControllerVideoFullscreenModelClient::setParent): (WKFullScreenViewControllerVideoFullscreenModelClient::setInterface): (WKFullScreenViewControllerVideoFullscreenModelClient::interface const): (-[WKFullScreenViewController initWithWebView:]): (-[WKFullScreenViewController dealloc]): (-[WKFullScreenViewController videoControlsManagerDidChange]): (-[WKFullScreenViewController ensurePiPAnimator]): (-[WKFullScreenViewController willEnterPictureInPicture]): (-[WKFullScreenViewController didEnterPictureInPicture]): (-[WKFullScreenViewController failedToEnterPictureInPicture]): (-[WKFullScreenViewController loadView]): (-[WKFullScreenViewController viewWillAppear:]):
  • UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::videoControlsManagerDidChange):
  • UIProcess/mac/WKFullScreenWindowController.h:
  • UIProcess/mac/WKFullScreenWindowController.mm: (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::setParent): (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::setInterface): (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::interface const): (-[WKFullScreenWindowController initWithWindow:webView:page:]): (-[WKFullScreenWindowController dealloc]): (-[WKFullScreenWindowController videoControlsManagerDidChange]): (-[WKFullScreenWindowController willEnterPictureInPicture]):

Tools:

<rdar://problem/41212379>

Reviewed by Jon Lee.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm: Added. (-[ExitFullscreenOnEnterPiPUIDelegate _webView:hasVideoInPictureInPictureDidChange:]): (-[ExitFullscreenOnEnterPiPUIDelegate _webViewDidEnterFullscreen:]): (-[ExitFullscreenOnEnterPiPUIDelegate _webViewDidExitFullscreen:]): (TestWebKitAPI::TEST):

LayoutTests:

Reviewed by Jon Lee.

  • TestExpectations:
  • media/fullscreen-video-going-into-pip-expected.txt: Removed.
  • media/fullscreen-video-going-into-pip.html: Removed.
  • media/video-contained-in-fullscreen-element-going-into-pip-expected.txt: Removed.
  • media/video-contained-in-fullscreen-element-going-into-pip.html: Removed.
  • platform/mac-wk2/TestExpectations:

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

11:01 PM Changeset in webkit [234295] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebKit

Cherry-pick r233925. rdar://problem/42354959

Dissociate the VideoFullscreenInterface from its VideoFullscreenModel before removing it from the manager
https://bugs.webkit.org/show_bug.cgi?id=187775
<rdar://problem/42343229>

Reviewed by Jon Lee.

  • UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: (WebKit::VideoFullscreenManagerProxy::didCleanupFullscreen):

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

10:25 PM Changeset in webkit [234294] by bshafiei@apple.com
  • 7 edits in branches/safari-606-branch/Source

Versioning.

10:06 PM Changeset in webkit [234293] by commit-queue@webkit.org
  • 23 edits in trunk

[INTL] Remove INTL sub-feature compile flags
https://bugs.webkit.org/show_bug.cgi?id=188081

Patch by Andy VanWagoner <andy@vanwagoner.family> on 2018-07-26
Reviewed by Michael Catanzaro.

.:

  • Source/cmake/OptionsJSCOnly.cmake:
  • Source/cmake/WebKitFeatures.cmake:

PerformanceTests:

Removed old and unused i18n flag.

  • StitchMarker/wtf/FeatureDefines.h:

Source/JavaScriptCore:

Removed ENABLE_INTL_NUMBER_FORMAT_TO_PARTS and ENABLE_INTL_PLURAL_RULES flags.
The runtime flags are still present, and should be relied on instead.
The defines for ICU features have also been updated to match HAVE() style.

  • Configurations/FeatureDefines.xcconfig:
  • runtime/IntlPluralRules.cpp:

(JSC::IntlPluralRules::resolvedOptions):
(JSC::IntlPluralRules::select):

  • runtime/IntlPluralRules.h:
  • runtime/Options.h:

Source/WebCore:

Compile time feature flags for INTL sub features were removed, and are covered by existing tests.

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WTF:

Removed INTL sub-feature compile flags, and an old unused i18n flag.

  • wtf/FeatureDefines.h:

Tools:

  • Scripts/webkitperl/FeatureList.pm:
  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
9:13 PM Changeset in webkit [234292] by Basuke Suzuki
  • 2 edits in trunk/LayoutTests

[Curl] Test gardening
https://bugs.webkit.org/show_bug.cgi?id=188090

Unreviewed test gardening.
Rearrange http test section.

  • platform/wincairo/TestExpectations:
9:02 PM Changeset in webkit [234291] by Alan Bujtas
  • 6 edits
    2 adds in trunk

[Fullscreen] Do not create composited layers for renderers unless they are part of the fullscreen subtree.
https://bugs.webkit.org/show_bug.cgi?id=188087
<rdar://problem/42632124>

Reviewed by Simon Fraser.

Source/WebCore:

Sibling composited layers prevent battery lifetime optimizations when in fullscreen.

Test: compositing/no-compositing-when-fulll-screen-is-present.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::isDescendantOf const):

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

(WebCore::isDescendantOfFullScreenLayer):
(WebCore::RenderLayerCompositor::requiresCompositingForWillChange const):
(WebCore::RenderLayerCompositor::requiresCompositingForPosition const):

LayoutTests:

  • compositing/no-compositing-when-fulll-screen-is-present-expected.txt: Added.
  • compositing/no-compositing-when-fulll-screen-is-present.html: Added.
6:50 PM Changeset in webkit [234290] by Chris Dumez
  • 4 edits
    1 add in trunk

Loading a file URL and then issuing a reload right away causes the load to fail due to sandboxing
https://bugs.webkit.org/show_bug.cgi?id=188078
<rdar://problem/42562493>

Reviewed by Geoff Garen.

Source/WebKit:

When WebPageProxy::loadFile() is called, we create a SandboxExtension::Handle for the resource path provided
by the caller and pass it to the WebProcess. WebPage::loadRequest() then calls SandboxExtensionTracker::beginLoad()
to store this handle in m_provisionalSandboxExtension for later consumption.

If a reload is issued before this sandbox extension has been consumed, then the following happens:

  1. WebPageProxy::reload() does NOT create a SandboxExtension::Handle because it has already issued one earlier. maybeInitializeSandboxExtensionHandle() returns early due to m_process->hasAssumedReadAccessToURL(url) check.
  2. WebPage::reload() then calls SandboxExtensionTracker::beginLoad() with a null handle, which overwrites the previous m_provisionalSandboxExtension its needs.
  3. The load fails because the WebContent process is missing the sandbox extension.

To address the issue, SandboxExtensionTracker::beginLoad() is updated to only overwrite m_provisionalSandboxExtension
if the new handle is not null. This avoids inadvertently clearing a valid sandbox extension we may need for the load,
since the UIProcess sends us a null handle if it previously sent us a sandbox extension for the path in question.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::SandboxExtensionTracker::beginLoad):

Tools:

Add API test coverage. It exercises the right code path but unfortunately is not yet a regression
test because TestWebKitAPI does not appear to be sandboxed (rdar://problem/42638129).

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

(-[LoadFileThenReloadDelegate webView:didFinishNavigation:]):
(-[LoadFileThenReloadDelegate webView:didFailProvisionalNavigation:withError:]):
(-[LoadFileThenReloadDelegate webView:didFailNavigation:withError:]):
(TEST):

6:37 PM Changeset in webkit [234289] by Ryan Haddad
  • 22 edits
    7 deletes in trunk

Unreviewed, rolling out r234281.

Broke internal builds.

Reverted changeset:

"[Datalist] Add button to TextFieldInputs with a datalist"
https://bugs.webkit.org/show_bug.cgi?id=187741
https://trac.webkit.org/changeset/234281

6:24 PM Changeset in webkit [234288] by Chris Dumez
  • 6 edits in trunk/Source

It should be possible to use WTF::CallbackAggregator from a background thread
https://bugs.webkit.org/show_bug.cgi?id=188084

Reviewed by Alex Christensen.

Source/WebKit:

This code was passing CallbackAggregator objects for background thread and not being
careful on which thread the CallbackAggregator gets destroyed. This patch fixes this
since the CallbackAggregator destructor no longer takes care of dispatching to the
main thread.

  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::Engine::clearAllCaches):
(WebKit::CacheStorage::Engine::clearCachesForOrigin):

Source/WTF:

Make WTF::CallbackAggregator usable on background threads by updating its destructor to call the
completion handler on whatever thread it is destroyed on, instead of always dispatching to the
main thread before calling the completion handler.

Existing CallbackAggregator users that deal with threads have been updated to make sure they
destroy the CallbackAggregator on the expected thread.

This will allow us to use CallbackAggregator in the ResourceLoadStatisticsMemoryStore, which lives
on a background WorkQueue.

  • wtf/CallbackAggregator.h:

(WTF::CallbackAggregator::~CallbackAggregator):
(WTF::CallbackAggregator::CallbackAggregator):

6:11 PM Changeset in webkit [234287] by bshafiei@apple.com
  • 1 copy in tags/Safari-606.1.32

Tag Safari-606.1.32.

6:11 PM Changeset in webkit [234286] by bshafiei@apple.com
  • 1 delete in tags/Safari-606.1.32

Delete tag

6:02 PM Changeset in webkit [234285] by bshafiei@apple.com
  • 14 edits in branches/safari-606-branch

Cherry-pick r234272. rdar://problem/42645434

Unreviewed, rolling out r234181 and r234189.
https://bugs.webkit.org/show_bug.cgi?id=188075

These are not needed right now (Requested by thorton on
#webkit).

Reverted changesets:

"Enable Web Content Filtering on watchOS"
https://bugs.webkit.org/show_bug.cgi?id=187979
https://trac.webkit.org/changeset/234181

"HAVE(PARENTAL_CONTROLS) should be true on watchOS"
https://bugs.webkit.org/show_bug.cgi?id=187985
https://trac.webkit.org/changeset/234189

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

5:42 PM Changeset in webkit [234284] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Dump IndexingMode in Structure
https://bugs.webkit.org/show_bug.cgi?id=188085

Reviewed by Keith Miller.

Dump IndexingMode instead of IndexingType.

  • runtime/Structure.cpp:

(JSC::Structure::dump const):

4:30 PM Changeset in webkit [234283] by bshafiei@apple.com
  • 1 copy in tags/Safari-606.1.32

Tag Safari-606.1.32.

4:19 PM Changeset in webkit [234282] by aaron_chu@apple.com
  • 2 edits in trunk/Tools

Add Aaron Chu as a committer to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=188066

Unreviwed. Added myself as committer.

  • Scripts/webkitpy/common/config/contributors.json:
4:12 PM Changeset in webkit [234281] by commit-queue@webkit.org
  • 22 edits
    1 copy
    10 adds in trunk

[Datalist] Add button to TextFieldInputs with a datalist
https://bugs.webkit.org/show_bug.cgi?id=187741

Patch by Aditya Keerthi <Aditya Keerthi> on 2018-07-26
Reviewed by Tim Horton.

Source/WebCore:

TextFieldInputs that have an associated datalist element should be drawn as
combo boxes. However, we cannot use NSComboBox for this control, as NSComboBox
is not height-resizable. Furthermore, the input should also be able to contain
additional elements, such as the stepper for type=number and the cancel button
for type=search. For these reasons, we draw a button at the end of the input,
mimicking appearance of a combo box.

The list-button -webkit-appearance value was added to display the new button.

Tests: fast/forms/datalist/datalist-searchinput-appearance.html

fast/forms/datalist/datalist-textinput-appearance.html

  • Resources/ListButtonArrow.png: Added.
  • Resources/ListButtonArrow@2x.png: Added.
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):

  • css/CSSProperties.json:
  • css/CSSValueKeywords.in:
  • css/html.css:

(input::-webkit-list-button):

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::dataListButtonElement const):
(WebCore::HTMLInputElement::isShowingList const):

  • html/HTMLInputElement.h:
  • html/InputType.h:

(WebCore::InputType::dataListButtonElement const):
(WebCore::InputType::isShowingList const):

  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::needsContainer const):
(WebCore::TextFieldInputType::createShadowSubtree):
(WebCore::TextFieldInputType::destroyShadowSubtree):
(WebCore::TextFieldInputType::listAttributeTargetChanged):
(WebCore::TextFieldInputType::dataListButtonElement const):
(WebCore::TextFieldInputType::dataListButtonElementWasClicked):
(WebCore::TextFieldInputType::didCloseSuggestions):
(WebCore::TextFieldInputType::isShowingList const):

  • html/TextFieldInputType.h:
  • html/shadow/DataListButtonElement.cpp: Added.

(WebCore::DataListButtonElement::create):
(WebCore::DataListButtonElement::DataListButtonElement):
(WebCore::DataListButtonElement::~DataListButtonElement):
(WebCore::DataListButtonElement::defaultEventHandler):

  • html/shadow/DataListButtonElement.h: Added.
  • platform/ThemeTypes.h:
  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::adjustStyle):
(WebCore::RenderTheme::adjustListButtonStyle const):

  • rendering/RenderTheme.h:
  • rendering/RenderThemeMac.h:
  • rendering/RenderThemeMac.mm:

(-[WebListButtonCell drawWithFrame:inView:]):
(WebCore::RenderThemeMac::paintListButtonForInput):
(WebCore::RenderThemeMac::adjustListButtonStyle const):
(WebCore::RenderThemeMac::paintTextField):
(WebCore::RenderThemeMac::paintSearchField):
(WebCore::RenderThemeMac::paintSearchFieldCancelButton):
(WebCore::RenderThemeMac::listButton const):

Source/WebCore/PAL:

  • pal/spi/cocoa/NSColorSPI.h: Added NSColorGetUserAccentColor().

Source/WebInspectorUI:

Add keyword completion for 'list-button'.

  • UserInterface/External/CodeMirror/css.js:
  • UserInterface/Models/CSSKeywordCompletions.js:

LayoutTests:

Added tests to verify appearance of TextFieldInputs with a datalist.

  • fast/forms/datalist/datalist-searchinput-appearance.html: Added.
  • fast/forms/datalist/datalist-textinput-appearance.html: Added.
  • platform/mac/fast/forms/datalist/datalist-searchinput-appearance-expected.png: Added.
  • platform/mac/fast/forms/datalist/datalist-searchinput-appearance-expected.txt: Added.
  • platform/mac/fast/forms/datalist/datalist-textinput-appearance-expected.png: Added.
  • platform/mac/fast/forms/datalist/datalist-textinput-appearance-expected.txt: Added.
3:51 PM Changeset in webkit [234280] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews-build] Add build step to run API Tests
https://bugs.webkit.org/show_bug.cgi?id=188079

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/steps.py:

(TestWithFailureCount): Common class for various tests with failure count.
(TestWithFailureCount.start): Configure Buildbot's logobserver.
(TestWithFailureCount.commandComplete): Updates the failure count.
(TestWithFailureCount.evaluateCommand): Set the step status appropriately.
(TestWithFailureCount.getResultSummary): Set the step summary appropriately.
(RunAPITests): Build step to run API tests.
(RunAPITests.countFailures): Count the failures by parsing the output.

  • BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
3:16 PM Changeset in webkit [234279] by graouts@webkit.org
  • 4 edits
    2 adds in trunk

[Web Animations] Accelerated animations don't respect a positive delay value
https://bugs.webkit.org/show_bug.cgi?id=186930
<rdar://problem/41393393>

Reviewed by Dean Jackson.

Source/WebCore:

Test: webanimations/accelerated-animation-with-delay.html

We would mistakenly clear the list of pending accelerated actions in KeyframeEffectReadOnly::applyPendingAcceleratedActions()
even if we failed to proceed because of the target element's renderer not being composited yet. Now, we clear the list after
we've established we can apply them, and if we can't we inform the animation with a call to acceleratedStateDidChange() which
will in turn call into the document timeline so that we may consider these animations on the next tick.

For this to work correctly we must make a change to DocumentTimeline::applyPendingAcceleratedAnimations() which only cleared
its list of pending accelerated animations _after_ iterating through them, which would be problematic since we would now add
animations to this list. That list is now copied and cleared prior to iterating through its members.

We also fix the naming of the m_pendingAcceleratedActions copy in KeyframeEffectReadOnly::applyPendingAcceleratedActions()
to have a more similar name.

  • animation/DocumentTimeline.cpp:

(WebCore::DocumentTimeline::applyPendingAcceleratedAnimations):

  • animation/KeyframeEffectReadOnly.cpp:

(WebCore::KeyframeEffectReadOnly::applyPendingAcceleratedActions):

LayoutTests:

Creating a new test that runs an accelerated animation on a non-positioned element with a small
positive delay. Prior to this patch, the element would move slightly when the delay elapses but
wouldn't animate towards the target value. With this patch, it animatea correctly. To check
that it does animate, we add a cache over the element except for the first 25px which is the area
within which it might have moved prior to this patch. This way the test only passes if the element
is fully hidden by the cache.

  • webanimations/accelerated-animation-with-delay-expected.html: Added.
  • webanimations/accelerated-animation-with-delay.html: Added.
3:00 PM Changeset in webkit [234278] by Ross Kirsling
  • 68 edits in trunk

String(View) should have a splitAllowingEmptyEntries function instead of a flag parameter
https://bugs.webkit.org/show_bug.cgi?id=187963

Reviewed by Alex Christensen.

Source/JavaScriptCore:

  • inspector/InspectorBackendDispatcher.cpp:

(Inspector::BackendDispatcher::dispatch):

  • jsc.cpp:

(ModuleName::ModuleName):
(resolvePath):

  • runtime/IntlObject.cpp:

(JSC::canonicalizeLanguageTag):
(JSC::removeUnicodeLocaleExtension):
Update split/splitAllowingEmptyEntries usage.

Source/WebCore:

  • Modules/applepay/cocoa/PaymentContactCocoa.mm:

(WebCore::convert):

  • Modules/cache/DOMCache.cpp:

(WebCore::hasResponseVaryStarHeaderValue):

  • Modules/cache/DOMCacheEngine.cpp:

(WebCore::DOMCacheEngine::queryCacheMatch):

  • Modules/mediastream/PeerConnectionBackend.cpp:

(WebCore::filterICECandidate):
(WebCore::PeerConnectionBackend::filterSDP const):

  • Modules/websockets/WebSocketHandshake.cpp:

(WebCore::WebSocketHandshake::checkResponseHeaders):

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityObject::determineARIADropEffects):

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::determineARIADropEffects):

  • accessibility/AccessibilityRenderObject.h:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

  • editing/cocoa/DataDetection.mm:

(WebCore::DataDetection::shouldCancelDefaultAction):

  • editing/markup.cpp:

(WebCore::fillContainerFromString):
(WebCore::createFragmentFromText):

  • html/EmailInputType.cpp:

(WebCore::EmailInputType::typeMismatchFor const):
(WebCore::EmailInputType::sanitizeValue const):

  • html/HTMLInputElement.cpp:

(WebCore::parseAcceptAttribute):

  • html/ValidationMessage.cpp:

(WebCore::ValidationMessage::setMessageDOMAndStartTimer):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::compileShader):

  • inspector/agents/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::nodeForPath):

  • loader/FormSubmission.cpp:

(WebCore::encodingFromAcceptCharset):

  • loader/ResourceTiming.cpp:

(WebCore::passesTimingAllowCheck):

  • page/WindowFeatures.cpp:

(WebCore::parseDisabledAdaptations):
(WebCore::parseDialogFeaturesMap):

  • platform/URL.cpp:

(WebCore::isIPv4Address):
(WebCore::isIPv6Address):

  • platform/graphics/GLContext.cpp:

(WebCore::GLContext::version):

  • platform/graphics/freetype/FontCacheFreeType.cpp:

(WebCore::patternToFamilies):

  • platform/graphics/gstreamer/GStreamerCommon.cpp:

(WebCore::extractGStreamerOptionsFromCommandLine):

  • platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:

(WebCore::Extensions3DOpenGLCommon::Extensions3DOpenGLCommon):
(WebCore::Extensions3DOpenGLCommon::initializeAvailableExtensions):

  • platform/gtk/PasteboardHelper.cpp:

(WebCore::PasteboardHelper::fillSelectionData):

  • platform/gtk/SelectionData.cpp:

(WebCore::SelectionData::setURIList):

  • platform/network/CacheValidation.cpp:

(WebCore::collectVaryingRequestHeaders):

  • platform/network/HTTPParsers.cpp:

(WebCore::filenameFromHTTPContentDisposition):
(WebCore::parseXFrameOptionsHeader):
(WebCore::parseAccessControlExposeHeadersAllowList):

  • platform/network/curl/CookieUtil.cpp:

(WebCore::CookieUtil::parseCookieHeader):

  • platform/network/curl/CurlCacheEntry.cpp:

(WebCore::CurlCacheEntry::loadResponseHeaders):

  • platform/network/curl/CurlCacheManager.cpp:

(WebCore::CurlCacheManager::loadIndex):

  • platform/network/soup/CookieJarSoup.cpp:

(WebCore::setCookiesFromDOM):

  • svg/SVGAnimationElement.cpp:

(WebCore::SVGAnimationElement::parseAttribute):

  • svg/SVGToOTFFontConversion.cpp:

(WebCore::SVGToOTFFontConverter::appendOS2Table):

  • svg/animation/SVGSMILElement.cpp:

(WebCore::SVGSMILElement::parseBeginOrEnd):

  • testing/MockCDMFactory.cpp:

(WebCore::MockCDM::sanitizeResponse const):
(WebCore::MockCDMInstance::updateLicense):
Update split/splitAllowingEmptyEntries usage.

Source/WebDriver:

  • WebDriverService.cpp:

(WebDriver::WebDriverService::findCommand):

  • glib/WebDriverServiceGLib.cpp:

(WebDriver::parseVersion):
Update split/splitAllowingEmptyEntries usage.

Source/WebKit:

  • NetworkProcess/cache/CacheStorageEngineCache.cpp:

(WebKit::CacheStorage::updateVaryInformation):

  • NetworkProcess/capture/NetworkCaptureManager.cpp:

(WebKit::NetworkCapture::Manager::fuzzyMatchURLs):

  • Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:

(WebKit::getPluginInfoFromPropertyLists):
(WebKit::PluginVersion::parse):

  • Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp:

(WebKit::NetscapePluginModule::parseMIMEDescription):

  • Shared/Plugins/unix/PluginSearchPath.cpp:

(WebKit::pluginsDirectories):

  • Shared/mac/ChildProcessMac.mm:

(WebKit::ChildProcess::initializeSandbox):

  • UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::fileCanBeAcceptedForUpload):

  • UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:

(WebKit::ProcessLauncher::launchProcess):

  • UIProcess/Launcher/mac/ProcessLauncherMac.mm:

(WebKit::ProcessLauncher::launchProcess):

  • UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:

(WebKit::PluginProcessProxy::scanPlugin):

  • WebProcess/Plugins/Netscape/NetscapePlugin.cpp:

(WebKit::isTransparentSilverlightBackgroundValue):
Update split/splitAllowingEmptyEntries usage.

Source/WebKitLegacy/win:

  • Plugins/PluginPackageWin.cpp:

(WebCore::PluginPackage::fetchInfo):
Update split/splitAllowingEmptyEntries usage.

Source/WTF:

  • wtf/Assertions.cpp:

Update split/splitAllowingEmptyEntries usage.

  • wtf/text/StringView.h:

(WTF::StringView::splitAllowingEmptyEntries const):

  • wtf/text/WTFString.cpp:

(WTF::String::splitInternal const):
(WTF::String::split const):
(WTF::String::splitAllowingEmptyEntries const):

  • wtf/text/WTFString.h:

(WTF::String::split const):
Introduce splitAllowingEmptyEntries instead of boolean or enum parameter.

Tools:

  • TestWebKitAPI/Tests/WTF/WTFString.cpp:

Add tests for String::split and String::splitAllowingEmptyEntries.

  • TestWebKitAPI/Tests/WTF/StringView.cpp:
  • WebKitTestRunner/TestController.cpp:

(WTR::updateTestOptionsFromTestHeader):
Update split/splitAllowingEmptyEntries usage.

2:50 PM Changeset in webkit [234277] by Basuke Suzuki
  • 2 edits in trunk/LayoutTests

[Curl] Test gardening
https://bugs.webkit.org/show_bug.cgi?id=188076

Unreviewed test gardening.

Mark diskcache test "Failure" for upcoming fix:

  • platform/wincairo/TestExpectations:
    • http/tests/cache/disk-cache/disk-cache-302-status-code.html [ Failure ]
2:44 PM Changeset in webkit [234276] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Fix assertions introduced in r234210
https://bugs.webkit.org/show_bug.cgi?id=188074

Reviewed by Chris Dumez.

There is a client that uses WKFramePolicyListenerUseWithPolicies to send website policies as
a response to the WKPageNavigationClient's decidePolicyForNavigationResponse. That is wasting
effort to generate policies that don't change anything. Once that client adopts WKWebView
they won't be able to do this any more, so temporarily remove the assertion.
Also, make the assertion about process swapping a release assert to prevent that client
from adopting WKFramePolicyListenerUseInNewProcessWithPolicies for navigation responses.
It should only be used for navigation actions.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):

2:34 PM Changeset in webkit [234275] by n_wang@apple.com
  • 4 edits
    2 adds in trunk

AX: nothing returned for various previous text marker APIs from one div/p node to another
https://bugs.webkit.org/show_bug.cgi?id=188071

Reviewed by Chris Fleizach.

Source/WebCore:

TextIterator is emitting an extra '\n' at the end of the <p> node and there's no
corresponding text node in the DOM tree, so we are not able to handle that for
text markers. Fixed it by ignoring the extra '\n' and anchor the text marker to
the previous child text node.

Test: accessibility/mac/text-marker-p-tags.html

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::traverseToOffsetInRange):

LayoutTests:

  • accessibility/mac/text-marker-p-tags-expected.txt: Added.
  • accessibility/mac/text-marker-p-tags.html: Added.
  • accessibility/mac/text-marker-string-for-document-range-expected.txt:
2:32 PM Changeset in webkit [234274] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

Remove unused/undefined String::appendInternal
https://bugs.webkit.org/show_bug.cgi?id=188063

Patch by Sam Weinig <sam@webkit.org> on 2018-07-26
Reviewed by Daniel Bates.

  • wtf/text/WTFString.h:

String::appendInternal is declared in WTFString.h, but is never used
and and never even defined. Remove it.

2:14 PM Changeset in webkit [234273] by bshafiei@apple.com
  • 7 edits in tags/Safari-606.1.28.1/Source

Versioning.

2:11 PM Changeset in webkit [234272] by commit-queue@webkit.org
  • 14 edits in trunk

Unreviewed, rolling out r234181 and r234189.
https://bugs.webkit.org/show_bug.cgi?id=188075

These are not needed right now (Requested by thorton on
#webkit).

Reverted changesets:

"Enable Web Content Filtering on watchOS"
https://bugs.webkit.org/show_bug.cgi?id=187979
https://trac.webkit.org/changeset/234181

"HAVE(PARENTAL_CONTROLS) should be true on watchOS"
https://bugs.webkit.org/show_bug.cgi?id=187985
https://trac.webkit.org/changeset/234189

2:05 PM Changeset in webkit [234271] by bshafiei@apple.com
  • 1 copy in tags/Safari-606.1.28.1

New tag.

1:30 PM Changeset in webkit [234270] by timothy@apple.com
  • 4 edits in trunk/Source

Use the Page's appearance when converting pasteboard attributed strings.
https://bugs.webkit.org/show_bug.cgi?id=188067
rdar://problem/42632246

Reviewed by Wenson Hsieh.

Source/WebCore:

  • editing/cocoa/WebContentReaderCocoa.mm:

(WebCore::createFragment): Create a LocalDefaultSystemAppearance based on the Page.

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebEditorClient.mm:

(_WebCreateFragment): Create a LocalDefaultSystemAppearance based on the Page.

12:49 PM Changeset in webkit [234269] by mark.lam@apple.com
  • 3 edits
    1 add in trunk

arrayProtoPrivateFuncConcatMemcpy() should handle copying from an Undecided type array.
https://bugs.webkit.org/show_bug.cgi?id=188065
<rdar://problem/42515726>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-188065.js: Added.

Source/JavaScriptCore:

  • runtime/ArrayPrototype.cpp:

(JSC::clearElement):
(JSC::copyElements):
(JSC::arrayProtoPrivateFuncConcatMemcpy):

12:49 PM Changeset in webkit [234268] by Chris Dumez
  • 8 edits in trunk/Source/WebKit

ERROR: Unhandled web process message 'WebPage:SetUseDarkAppearance' when browsing in dark mode
https://bugs.webkit.org/show_bug.cgi?id=188028

Reviewed by Wenson Hsieh.

The issue was that the WebViewImpl constructor was calling setUseDarkAppearance() *before* calling
initializeWebPage(), which would cause us to send IPC the WebContent process for a pageID that does
not exist on WebProcess side yet.

To address the issue, the WebViewImpl constructor no longer calls setUseDarkAppearance() and WebPageProxy
no longer holds a flag indicates is dark appearance is used. Instead, the WebPageProxy asks the WebView
for the value whenever it needs to, via the PageClient.

  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::effectiveAppearanceDidChange):
(WebKit::WebViewImpl::setUseDarkAppearance): Deleted.

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::useDarkAppearance const):
(WebKit::WebPageProxy::effectiveAppearanceDidChange):
(WebKit::WebPageProxy::showPlaybackTargetPicker):
(WebKit::WebPageProxy::setUseDarkAppearance): Deleted.

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::useDarkAppearance const): Deleted.

  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::effectiveAppearanceIsDark const):

10:50 AM Changeset in webkit [234267] by david_fenton@apple.com
  • 2 edits in trunk/LayoutTests

Layout Test webgl/2.0.0/conformance2/glsl3/compound-assignment-type-combination.html is timing out on mac Debug
https://bugs.webkit.org/show_bug.cgi?id=188061

Unreviewed test gardening.

Marked test as [ Slow ].

  • platform/mac/TestExpectations:
10:09 AM Changeset in webkit [234266] by Ryan Haddad
  • 2 edits in branches/safari-606-branch/LayoutTests

Cherry-pick r234263. rdar://problem/42387347

Unreviewed, update TestExpectations for macOS WK1.

  • platform/mac-wk1/TestExpectations:

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

10:04 AM Changeset in webkit [234265] by sihui_liu@apple.com
  • 2 edits in trunk/Source/WebKit

Remove a forward protocol declaration of '_WKWebViewPrintProvider'
https://bugs.webkit.org/show_bug.cgi?id=188012
<rdar://problem/42309526>

Reviewed by Darin Adler.

@procotol() expressions emit invalid protocol metadata when used with forward @protocol declarations.
Clang is going to make it an error for using a forward-declared protocol in a @protocol expression, so
we need to stop doing this.

  • UIProcess/API/Cocoa/WKWebViewInternal.h:
10:03 AM Changeset in webkit [234264] by eric.carlson@apple.com
  • 3 edits in trunk/Source/WebCore

Switching tabs should not close PiP window
https://bugs.webkit.org/show_bug.cgi?id=188054
<rdar://problem/41212379>

Reviewed by Jon Lee.

No new tests, fixes an existing test.

Prior to r233926, calling VideoFullscreenInterfaceMac::requestHideAndExitFullscreen was a noop.
In r233926 it was updated to close the PiP window and was called from the PIPViewControllerDelegate
selectors to close the PiP window. requestHideAndExitFullscreen is also called from
WebPageProxy::viewDidLeaveWindow when the web view is removed from it window, so switching
tabs also closed the PiP window. Revert the changes to requestHideAndExitFullscreen, and add
a new method that is only used by the delegate to exit PiP.

  • platform/mac/VideoFullscreenInterfaceMac.h:

(WebCore::VideoFullscreenInterfaceMac::requestHideAndExitFullscreen): Make this an empty,
do-nothing method.

  • platform/mac/VideoFullscreenInterfaceMac.mm:

(-[WebVideoFullscreenInterfaceMacObjC pipShouldClose:]): Call requestHideAndExitPiP.
(-[WebVideoFullscreenInterfaceMacObjC pipActionStop:]): Ditto.
(WebCore::VideoFullscreenInterfaceMac::requestHideAndExitPiP): Renamed from requestHideAndExitFullscreen.
(WebCore::VideoFullscreenInterfaceMac::requestHideAndExitFullscreen): Deleted.

10:02 AM Changeset in webkit [234263] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Unreviewed, update TestExpectations for macOS WK1.

  • platform/mac-wk1/TestExpectations:
9:59 AM Changeset in webkit [234262] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Disable Dark Mode in the Plugin process to avoid rendering issues
https://bugs.webkit.org/show_bug.cgi?id=188059
<rdar://problem/42369281>

Reviewed by Tim Horton.

Plugins generally do not support dark mode and this causes rendering issues so
disable dark mode in the plugin process.

  • PluginProcess/mac/PluginProcessMac.mm:

(WebKit::PluginProcess::platformInitializePluginProcess):

9:15 AM Changeset in webkit [234261] by Chris Dumez
  • 9 edits in trunk/Source/WebKit

WebSiteData-related methods should take in CompletionHandlers instead of Functions
https://bugs.webkit.org/show_bug.cgi?id=188027

Reviewed by Alex Christensen.

WebSiteData-related methods should take in CompletionHandlers instead of Functions since
they are need to be called and are only called once.

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::fetchWebsiteData):
(WebKit::NetworkProcessProxy::deleteWebsiteData):
(WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Plugins/PluginProcessProxy.cpp:

(WebKit::PluginProcessProxy::fetchWebsiteData):
(WebKit::PluginProcessProxy::deleteWebsiteData):
(WebKit::PluginProcessProxy::deleteWebsiteDataForHostNames):

  • UIProcess/Plugins/PluginProcessProxy.h:
  • UIProcess/Storage/StorageProcessProxy.cpp:

(WebKit::StorageProcessProxy::fetchWebsiteData):
(WebKit::StorageProcessProxy::deleteWebsiteData):
(WebKit::StorageProcessProxy::deleteWebsiteDataForOrigins):

  • UIProcess/Storage/StorageProcessProxy.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
(WebKit::WebProcessProxy::topPrivatelyControlledDomainsWithWebsiteData):
(WebKit::WebProcessProxy::fetchWebsiteData):
(WebKit::WebProcessProxy::deleteWebsiteData):
(WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):

  • UIProcess/WebProcessProxy.h:
9:01 AM Changeset in webkit [234260] by commit-queue@webkit.org
  • 6 edits
    2 adds
    2 deletes in trunk

JSC: Intl API should ignore encoding when parsing BCP 47 language tag from ISO 15897 locale string (passed via LANG)
https://bugs.webkit.org/show_bug.cgi?id=167991

Patch by Andy VanWagoner <andy@vanwagoner.family> on 2018-07-26
Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

Improved the conversion of ICU locales to BCP47 tags, using their preferred method.
Checked locale.isEmpty() before returning it from defaultLocale, so there should be
no more cases where you might have an invalid locale come back from resolveLocale.

  • runtime/IntlObject.cpp:

(JSC::convertICULocaleToBCP47LanguageTag):
(JSC::defaultLocale):
(JSC::lookupMatcher):

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

(JSC::JSGlobalObject::intlCollatorAvailableLocales):
(JSC::JSGlobalObject::intlDateTimeFormatAvailableLocales):
(JSC::JSGlobalObject::intlNumberFormatAvailableLocales):
(JSC::JSGlobalObject::intlPluralRulesAvailableLocales):

LayoutTests:

Replaced expecting throwing a runtime error to avoid a crash, with testing for good default locale fallback behavior.

  • js/intl-default-locale-expected.txt: Added.
  • js/intl-default-locale.html: Added.
  • js/intl-invalid-locale-crash-expected.txt: Removed.
  • js/intl-invalid-locale-crash.html: Removed.
  • platform/win/TestExpectations:
8:44 AM Changeset in webkit [234259] by magomez@igalia.com
  • 9 edits in trunk/Source/WebKit

[GTK][WPE] Improve the way request displayRefresh notifications
https://bugs.webkit.org/show_bug.cgi?id=188005

Reviewed by Žan Doberšek.

Add a new interface ThreadedDisplayRefreshMonitor::Client and use it to pipe the the
requestDisplayRefreshMonitorUpdate and handleDisplayRefreshMonitorUpdate to the
ThreadedCoordinatedLayerTreeHost.

In response to requestDisplayRefreshMonitorUpdate, the LayerTreeHost will force a layer
flush that in the end causes a repaint, which generates the requested display refresh
event.

In response to handleDisplayRefreshMonitorUpdate, the call to renderNextFrame will happen,
and if the DisplayRefreshMonitor has been rescheduled, renderNextFrame will also force
a new layer flush, causing the repaint that will generate the display refreh event.

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:

(WebKit::ThreadedCompositor::create):
(WebKit::ThreadedCompositor::ThreadedCompositor):
(WebKit::m_displayRefreshMonitor):
(WebKit::ThreadedCompositor::handleDisplayRefreshMonitorUpdate):
(WebKit::ThreadedCompositor::requestDisplayRefreshMonitorUpdate): Deleted.

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp:

(WebKit::ThreadedDisplayRefreshMonitor::ThreadedDisplayRefreshMonitor):
(WebKit::ThreadedDisplayRefreshMonitor::requestRefreshCallback):
(WebKit::ThreadedDisplayRefreshMonitor::dispatchDisplayRefreshCallback):
(WebKit::ThreadedDisplayRefreshMonitor::invalidate):
(WebKit::ThreadedDisplayRefreshMonitor::displayRefreshCallback):

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.h:

(WebKit::ThreadedDisplayRefreshMonitor::create):

  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:

(WebKit::CoordinatedLayerTreeHost::renderNextFrame):
(WebKit::CoordinatedLayerTreeHost::flushLayersAndForceRepaint):

  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
  • WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:

(WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost):
(WebKit::ThreadedCoordinatedLayerTreeHost::requestDisplayRefreshMonitorUpdate):
(WebKit::ThreadedCoordinatedLayerTreeHost::handleDisplayRefreshMonitorUpdate):

  • WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
8:42 AM Changeset in webkit [234258] by Darin Adler
  • 108 edits
    2 copies
    17 moves
    3 adds
    4 deletes in trunk

Improve WebGPU implementation, including using Metal Objective-C protocols more simply and correctly
https://bugs.webkit.org/show_bug.cgi?id=187333

Reviewed by Sam Weinig.

Source/WebCore:

  • Used a new OBJC_PROTOCOL macro to handle things in the Metal API that are protocols. The code previously had used OBJC_CLASS, but that created unrelated classes. Fixing this allows removing many typecasts that were in the existing code, makes it ARC-compatible, and also allowed the compiler to detect a couple mistakes where we were calling methods that don't exist.
  • Eliminated use of separate heap-allocated, reference-counted objects to hold pointers to Metal objects.
  • Reduced the use of the WebGPU wrappers to pass around arguments inside the code. They are now used only as part of the DOM binding; the inner GPU objects are used whenever possible. This cuts down the number of separate functions needed a bit, since we don't always need accessors for the things inside the wrappers.
  • Used references rather than pointers in many cases.
  • Took out three kinds of null checks: 1) Unneeded ones since Objective-C has the "do nothing and return 0" behavior for methods without return values and that return integer scalars. 2) Checks that aren't needed because the code has clear, invariant guarantees that the pointer won't be null. 3) The simplest variant of (2), checks that can be obviated by using reference types instead of pointer types.
  • For Metal-specific functions and data members, used the function name metal() and the data member name m_metal rather than longer wordier names with the word "platform" in them. We could use "platform" if these objects were platform-specific objects used in a cross-platform way that needed a common name. But in this case it's clearer to call them "metal" since we are dropping down to the metal with Metal API, and shared platform-independent code will not be accessing these.
  • Fixed the common mistake of using "unsigned long" in our C++ code to match IDL. The "unsigned long" type in IDL correponds to the "unsigned" type in WebKit code.
  • Used "const" more in the GPU functions that are wrappers around Metal objects to reflect the fact that these have semantics of smart pointers; most operations can be done without changing which object is pointed to. This allows us to use const references to pass things around without reference count churn.
  • Reduced includes.
  • Added "explicit" keywords where appropriate.
  • Removed unused functions. In particular, removed non-Metal stub versions of the functions in the GPU classes: the right way to start a new port is to clone the Metal-specific files and turn the into stubs if needed, it does not make it significantly more convenient to have stubs in the platform independent files, especially ones that are not compiled for any platform.
  • Removed most the WEBCORE_EXPORT in the GPU headers; left only what's needed to support testing with TestWebKitAPI.
  • Fixed two storage leaks in GPUDevice by adding missing adoptNS.
  • PlatformMac.cmake: Moved files from platform/graphics/cocoa to platform/graphics/metal.
  • SourcesCocoa.txt: Ditto.
  • WebCore.xcodeproj/project.pbxproj: Ditto. Fixed paths on some files and groups/directories.

Made the platform files that abstract GPU all be "project" visible, not "private", since
they don't need to be visible outside WebCore. Removed reference to FontSelectionKeywordValues.h,
which does not seem to be a source file, a derived source file, or mentioned in any change log.

  • bindings/js/JSWebGPURenderPassAttachmentDescriptorCustom.cpp:

(WebCore::toJSNewlyCreated): Create the correct wrapper for a
WebGPURenderPassDepthAttachmentDescriptor. The old code would instead
create a WebGPURenderPassAttachmentDescriptor wrapper, which can't be
used to access the clearDepth attribute.

  • html/canvas/WebGPUBuffer.cpp:

(WebCore::WebGPUBuffer::create): Use more references rather than pointers for things
that are never null. Added comment about possibly returning null on failure in future.
(WebCore::WebGPUBuffer::WebGPUBuffer): Updated to store the GPUBuffer inside the class
instead of in a separate reference counted object.

  • html/canvas/WebGPUBuffer.h: Ditto.
  • html/canvas/WebGPUCommandBuffer.cpp:

(WebCore::WebGPUCommandBuffer::create): Use references and lower level types.
(WebCore::WebGPUCommandBuffer::WebGPUCommandBuffer): Store the GPUCommandBuffer
inside the class.
(WebCore::WebGPUCommandBuffer::commit): Removed unneeded null checks.
(WebCore::WebGPUCommandBuffer::presentDrawable): Ditto.
(WebCore::WebGPUCommandBuffer::createRenderCommandEncoderWithDescriptor):
Removed unneeded local variable.
(WebCore::WebGPUCommandBuffer::createComputeCommandEncoder): Ditto.
(WebCore::WebGPUCommandBuffer::completed): Store the DOMPromiseProxy in this
class, not in GPUCommandBuffer.

  • html/canvas/WebGPUCommandBuffer.h: Ditto.
  • html/canvas/WebGPUCommandQueue.cpp:

(WebCore::WebGPUCommandQueue::create): Use references and lower level types.
(WebCore::WebGPUCommandQueue::WebGPUCommandQueue): Store the GPUCommandQueue
inside the class.
(WebCore::WebGPUCommandQueue::createCommandBuffer): Ditto.

  • html/canvas/WebGPUCommandQueue.h: Ditto.
  • html/canvas/WebGPUCommandQueue.idl: The return value of createCommandBuffer

is no longer nullable.

  • html/canvas/WebGPUComputeCommandEncoder.cpp:

(WebCore::WebGPUComputeCommandEncoder::create): More of the same.
(WebCore::WebGPUComputeCommandEncoder::WebGPUComputeCommandEncoder): Ditto.
(WebCore::WebGPUComputeCommandEncoder::setComputePipelineState): Ditto.
(WebCore::WebGPUComputeCommandEncoder::setBuffer): Ditto.
(WebCore::WebGPUComputeCommandEncoder::dispatch): Ditto.
(WebCore::WebGPUComputeCommandEncoder::endEncoding): Ditto.

  • html/canvas/WebGPUComputeCommandEncoder.h: Ditto.
  • html/canvas/WebGPUComputePipelineState.cpp:

(WebCore::WebGPUComputePipelineState::create): More of the same.
(WebCore::WebGPUComputePipelineState::WebGPUComputePipelineState): Ditto.

  • html/canvas/WebGPUComputePipelineState.h: Ditto.
  • html/canvas/WebGPUDepthStencilDescriptor.cpp:

(WebCore::WebGPUDepthStencilDescriptor::create): More of the same.
(WebCore::WebGPUDepthStencilDescriptor::depthWriteEnabled const): Ditto.
(WebCore::WebGPUDepthStencilDescriptor::setDepthWriteEnabled): Ditto.
(WebCore::WebGPUDepthStencilDescriptor::depthCompareFunction const): Ditto.
(WebCore::WebGPUDepthStencilDescriptor::setDepthCompareFunction): Ditto.

  • html/canvas/WebGPUDepthStencilDescriptor.h: Ditto. Also fixed a bug

where m_depthCompareFunction was uninitialized in newly created objects.

  • html/canvas/WebGPUDepthStencilState.cpp:

(WebCore::WebGPUDepthStencilState::create): More of the same.
(WebCore::WebGPUDepthStencilState::WebGPUDepthStencilState): Ditto.
(WebCore::WebGPUDepthStencilState::label const): Ditto.
(WebCore::WebGPUDepthStencilState::setLabel): Ditto.

  • html/canvas/WebGPUDepthStencilState.h: Ditto.
  • html/canvas/WebGPUDrawable.cpp:

(WebCore::WebGPUDrawable::create): More of the same.
(WebCore::WebGPUDrawable::WebGPUDrawable): Ditto.

  • html/canvas/WebGPUDrawable.h: Ditto.
  • html/canvas/WebGPUEnums.cpp: Removed some stray const.
  • html/canvas/WebGPUEnums.h: Ditto.
  • html/canvas/WebGPUFunction.cpp:

(WebCore::WebGPUFunction::create): More of the same.
(WebCore::WebGPUFunction::WebGPUFunction): Ditto.

  • html/canvas/WebGPUFunction.h: Ditto.
  • html/canvas/WebGPULibrary.cpp:

(WebCore::WebGPULibrary::create): More of the same.
(WebCore::WebGPULibrary::WebGPULibrary): Ditto.
(WebCore::WebGPULibrary::functionNames const): Ditto.
(WebCore::WebGPULibrary::functionWithName const): Ditto.

  • html/canvas/WebGPULibrary.h: Ditto.
  • html/canvas/WebGPUObject.cpp:

(WebCore::WebGPUObject::WebGPUObject):
(WebCore::WebGPUObject::deleteObject): Deleted this unused function.
We can bring it back later if we find we need it the way we did with the
WebGL implementation, but currently it's a never-called stub. Also
deleted the isDeleted and m_deleted for the same reason.

  • html/canvas/WebGPUObject.h: Ditto.
  • html/canvas/WebGPURenderCommandEncoder.cpp:

(WebCore::WebGPURenderCommandEncoder::create): More of the same.
(WebCore::WebGPURenderCommandEncoder::WebGPURenderCommandEncoder): Ditto.
(WebCore::WebGPURenderCommandEncoder::setRenderPipelineState): Ditto.
(WebCore::WebGPURenderCommandEncoder::setDepthStencilState): Ditto.
(WebCore::WebGPURenderCommandEncoder::setVertexBuffer): Ditto.
(WebCore::WebGPURenderCommandEncoder::setFragmentBuffer): Ditto.
(WebCore::WebGPURenderCommandEncoder::drawPrimitives): Ditto.
(WebCore::WebGPURenderCommandEncoder::endEncoding): Ditto.

  • html/canvas/WebGPURenderCommandEncoder.h: Ditto.
  • html/canvas/WebGPURenderPassAttachmentDescriptor.cpp:

(WebCore::WebGPURenderPassAttachmentDescriptor::WebGPURenderPassAttachmentDescriptor):
More of the same.
(WebCore::WebGPURenderPassAttachmentDescriptor::loadAction const): Ditto.
(WebCore::WebGPURenderPassAttachmentDescriptor::setLoadAction): Ditto.
(WebCore::WebGPURenderPassAttachmentDescriptor::storeAction const): Ditto.
(WebCore::WebGPURenderPassAttachmentDescriptor::setStoreAction): Ditto.
(WebCore::WebGPURenderPassAttachmentDescriptor::texture const): Ditto.
(WebCore::WebGPURenderPassAttachmentDescriptor::setTexture): Ditto.

  • html/canvas/WebGPURenderPassAttachmentDescriptor.h: Ditto.
  • html/canvas/WebGPURenderPassColorAttachmentDescriptor.cpp:

(WebCore::WebGPURenderPassColorAttachmentDescriptor::create): More of the same.
(WebCore::WebGPURenderPassColorAttachmentDescriptor::WebGPURenderPassColorAttachmentDescriptor): Ditto.
(WebCore::WebGPURenderPassColorAttachmentDescriptor::descriptor const): Ditto.
(WebCore::WebGPURenderPassColorAttachmentDescriptor::clearColor const): Ditto.
(WebCore::WebGPURenderPassColorAttachmentDescriptor::setClearColor): Ditto.

  • html/canvas/WebGPURenderPassColorAttachmentDescriptor.h: Ditto.
  • html/canvas/WebGPURenderPassDepthAttachmentDescriptor.cpp:

(WebCore::WebGPURenderPassDepthAttachmentDescriptor::create): More of the same.
(WebCore::WebGPURenderPassDepthAttachmentDescriptor::WebGPURenderPassDepthAttachmentDescriptor): Ditto.
(WebCore::WebGPURenderPassDepthAttachmentDescriptor::clearDepth const): Ditto.
(WebCore::WebGPURenderPassDepthAttachmentDescriptor::setClearDepth): Ditto.
(WebCore::WebGPURenderPassDepthAttachmentDescriptor::descriptor const): Ditto.

  • html/canvas/WebGPURenderPassDepthAttachmentDescriptor.h: Ditto.
  • html/canvas/WebGPURenderPassDescriptor.cpp:

(WebCore::WebGPURenderPassDescriptor::create): More of the same.
(WebCore::WebGPURenderPassDescriptor::depthAttachment): Ditto.
(WebCore::WebGPURenderPassDescriptor::colorAttachments): Ditto.

  • html/canvas/WebGPURenderPassDescriptor.h: Ditto.
  • html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.cpp:

(WebCore::WebGPURenderPipelineColorAttachmentDescriptor::create): More of the same.
(WebCore::WebGPURenderPipelineColorAttachmentDescriptor::WebGPURenderPipelineColorAttachmentDescriptor): Ditto.
(WebCore::WebGPURenderPipelineColorAttachmentDescriptor::pixelFormat const): Ditto.
(WebCore::WebGPURenderPipelineColorAttachmentDescriptor::setPixelFormat): Ditto.

  • html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.h: Ditto.
  • html/canvas/WebGPURenderPipelineDescriptor.cpp:

(WebCore::WebGPURenderPipelineDescriptor::create): More of the same.
(WebCore::WebGPURenderPipelineDescriptor::vertexFunction const): Ditto.
(WebCore::WebGPURenderPipelineDescriptor::setVertexFunction): Ditto.
(WebCore::WebGPURenderPipelineDescriptor::fragmentFunction const): Ditto.
(WebCore::WebGPURenderPipelineDescriptor::setFragmentFunction): Ditto.
(WebCore::WebGPURenderPipelineDescriptor::colorAttachments): Ditto.
(WebCore::WebGPURenderPipelineDescriptor::depthAttachmentPixelFormat const): Ditto.
(WebCore::WebGPURenderPipelineDescriptor::setDepthAttachmentPixelFormat): Ditto.
(WebCore::WebGPURenderPipelineDescriptor::reset): Ditto.

  • html/canvas/WebGPURenderPipelineDescriptor.h: Ditto.
  • html/canvas/WebGPURenderPipelineState.cpp:

(WebCore::WebGPURenderPipelineState::create): More of the same.
(WebCore::WebGPURenderPipelineState::WebGPURenderPipelineState): Ditto.
(WebCore::WebGPURenderPipelineState::label const): Ditto.
(WebCore::WebGPURenderPipelineState::setLabel): Ditto.

  • html/canvas/WebGPURenderPipelineState.h: Ditto.
  • html/canvas/WebGPURenderingContext.cpp:

(WebCore::WebGPURenderingContext::create): More of the same.
(WebCore::WebGPURenderingContext::WebGPURenderingContext): Ditto.
(WebCore::WebGPURenderingContext::initializeNewContext): Ditto.
(WebCore::WebGPURenderingContext::platformLayer const): Ditto.
(WebCore::WebGPURenderingContext::markLayerComposited): Ditto.
(WebCore::WebGPURenderingContext::reshape): Ditto.
(WebCore::WebGPURenderingContext::createLibrary): Ditto.
(WebCore::WebGPURenderingContext::createRenderPipelineState): Ditto.
(WebCore::WebGPURenderingContext::createDepthStencilState): Ditto.
(WebCore::WebGPURenderingContext::createComputePipelineState): Ditto.
(WebCore::WebGPURenderingContext::createCommandQueue): Ditto.
(WebCore::WebGPURenderingContext::nextDrawable): Ditto.
(WebCore::WebGPURenderingContext::createBuffer): Ditto.
(WebCore::WebGPURenderingContext::createTexture): Ditto.

  • html/canvas/WebGPURenderingContext.h: Made many functions final and

private.

  • html/canvas/WebGPURenderingContext.idl: The return value of most of

the create functions are no longer nullable.

  • html/canvas/WebGPUSize.h: Use "unsigned" instead of "unsigned long".
  • html/canvas/WebGPUTexture.cpp:

(WebCore::WebGPUTexture::createFromDrawableTexture): More of the same.
(WebCore::WebGPUTexture::create): Ditto.
(WebCore::WebGPUTexture::WebGPUTexture): Ditto.

  • html/canvas/WebGPUTexture.h: Ditto.
  • html/canvas/WebGPUTextureDescriptor.cpp:

(WebCore::WebGPUTextureDescriptor::create): More of the same.
(WebCore::WebGPUTextureDescriptor::WebGPUTextureDescriptor): Ditto.
(WebCore::WebGPUTextureDescriptor::width const): Ditto.
(WebCore::WebGPUTextureDescriptor::setWidth): Ditto.
(WebCore::WebGPUTextureDescriptor::height const): Ditto.
(WebCore::WebGPUTextureDescriptor::setHeight): Ditto.
(WebCore::WebGPUTextureDescriptor::sampleCount const): Ditto.
(WebCore::WebGPUTextureDescriptor::setSampleCount): Ditto.
(WebCore::WebGPUTextureDescriptor::textureType const): Ditto.
(WebCore::WebGPUTextureDescriptor::setTextureType): Ditto.
(WebCore::WebGPUTextureDescriptor::storageMode const): Ditto.
(WebCore::WebGPUTextureDescriptor::setStorageMode): Ditto.
(WebCore::WebGPUTextureDescriptor::usage const): Ditto.
(WebCore::WebGPUTextureDescriptor::setUsage): Ditto.

  • html/canvas/WebGPUTextureDescriptor.h: Ditto.
  • platform/graphics/metal/GPUBufferMetal.mm: Moved from "cocoa" directory.

(WebCore::GPUBuffer::GPUBuffer): Simplify code using references and the
"metal" naming.

  • platform/graphics/metal/GPUCommandBufferMetal.mm:

(WebCore::GPUCommandBuffer::GPUCommandBuffer): Take a function to be called as the
completed handler and set it up.
(WebCore::GPUCommandBuffer::presentDrawable const): Ditto.
(WebCore::GPUCommandBuffer::commit const): Ditto.
(WebCore::GPUCommandBuffer::addCompletedHandler): Deleted.

  • platform/graphics/metal/GPUCommandQueueMetal.mm:

(WebCore::GPUCommandQueue::GPUCommandQueue): Ditto. Also rewrote label handling a bit.
(WebCore::GPUCommandQueue::label const): Ditto.
(WebCore::GPUCommandQueue::setLabel const): Ditto.

  • platform/graphics/metal/GPUComputeCommandEncoderMetal.mm:

(WebCore::GPUComputeCommandEncoder::GPUComputeCommandEncoder): Ditto.
(WebCore::GPUComputeCommandEncoder::setComputePipelineState const): Ditto.
(WebCore::GPUComputeCommandEncoder::setBuffer const): Ditto.
(WebCore::GPUComputeCommandEncoder::dispatch const): Ditto.
(WebCore::GPUComputeCommandEncoder::endEncoding const): Ditto.

  • platform/graphics/metal/GPUComputePipelineStateMetal.mm:

(WebCore::GPUComputePipelineState::GPUComputePipelineState): Ditto.

  • platform/graphics/metal/GPUDepthStencilDescriptorMetal.mm:

(WebCore::GPUDepthStencilDescriptor::GPUDepthStencilDescriptor): Ditto.
(WebCore::GPUDepthStencilDescriptor::depthWriteEnabled const): Ditto.
(WebCore::GPUDepthStencilDescriptor::setDepthWriteEnabled const): Ditto.
(WebCore::GPUDepthStencilDescriptor::depthCompareFunction const): Ditto.
(WebCore::GPUDepthStencilDescriptor::setDepthCompareFunction const): Ditto.

  • platform/graphics/metal/GPUDepthStencilStateMetal.mm:

(WebCore::GPUDepthStencilState::GPUDepthStencilState): Ditto.
(WebCore::GPUDepthStencilState::label const): Ditto.
(WebCore::GPUDepthStencilState::setLabel const): Ditto. This is one of the
functions that was calling a method that does not exist. Added a comment.

  • platform/graphics/metal/GPUDeviceMetal.mm:

(WebCore::GPUDevice::GPUDevice): Ditto. Also fixed two storage leaks where
we neglected to do adoptNS on the result of MTLCreateSystemDefaultDevice and
on the result of -[[WebGPULayer alloc] initWithGPUDevice:].
(WebCore::GPUDevice::reshape const): Ditto.
(WebCore::GPUDevice::platformLayer const): Ditto.
(WebCore::GPUDevice::operator! const): Ditto.

  • platform/graphics/metal/GPUDrawableMetal.mm:

(WebCore::GPUDrawable::GPUDrawable): Ditto.
(WebCore::GPUDrawable::release): Ditto.
(WebCore::GPUDrawable::metal const): Ditto.
(WebCore::GPUDrawable::texture const): Ditto.

  • platform/graphics/metal/GPUFunctionMetal.mm:

(WebCore::GPUFunction::GPUFunction): Ditto.
(WebCore::GPUFunction::name const): Ditto.
(WebCore::GPUFunction::metal const): Ditto.
(WebCore::GPUFunction::operator! const): Ditto.

  • platform/graphics/metal/GPULibraryMetal.mm:

(WebCore::GPULibrary::GPULibrary): Ditto.
(WebCore::GPULibrary::label const): Ditto.
(WebCore::GPULibrary::setLabel const): Ditto.
(WebCore::GPULibrary::functionNames const): Ditto.
(WebCore::GPULibrary::metal const): Ditto.

  • platform/graphics/metal/GPURenderCommandEncoderMetal.mm:

(WebCore::GPURenderCommandEncoder::GPURenderCommandEncoder): Ditto.
(WebCore::GPURenderCommandEncoder::setRenderPipelineState const): Ditto.
(WebCore::GPURenderCommandEncoder::setDepthStencilState const): Ditto.
(WebCore::GPURenderCommandEncoder::setVertexBuffer const): Ditto.
(WebCore::GPURenderCommandEncoder::setFragmentBuffer const): Ditto.
(WebCore::GPURenderCommandEncoder::drawPrimitives const): Ditto.
(WebCore::GPURenderCommandEncoder::endEncoding const): Ditto.

  • platform/graphics/metal/GPURenderPassAttachmentDescriptorMetal.mm:

(WebCore::GPURenderPassAttachmentDescriptor::GPURenderPassAttachmentDescriptor): Ditto.
(WebCore::GPURenderPassAttachmentDescriptor::loadAction const): Ditto.
(WebCore::GPURenderPassAttachmentDescriptor::setLoadAction const): Ditto.
(WebCore::GPURenderPassAttachmentDescriptor::storeAction const): Ditto.
(WebCore::GPURenderPassAttachmentDescriptor::setStoreAction const): Ditto.
(WebCore::GPURenderPassAttachmentDescriptor::setTexture const): Ditto.

  • platform/graphics/metal/GPURenderPassColorAttachmentDescriptorMetal.mm:

(WebCore::GPURenderPassColorAttachmentDescriptor::GPURenderPassColorAttachmentDescriptor): Ditto.
(WebCore::GPURenderPassColorAttachmentDescriptor::clearColor const): Ditto.
(WebCore::GPURenderPassColorAttachmentDescriptor::setClearColor const): Ditto.
(WebCore::GPURenderPassColorAttachmentDescriptor::metal const): Ditto.

  • platform/graphics/metal/GPURenderPassDepthAttachmentDescriptorMetal.mm:

(WebCore::GPURenderPassDepthAttachmentDescriptor::GPURenderPassDepthAttachmentDescriptor): Ditto.
(WebCore::GPURenderPassDepthAttachmentDescriptor::clearDepth const): Ditto.
(WebCore::GPURenderPassDepthAttachmentDescriptor::setClearDepth const): Ditto.
(WebCore::GPURenderPassDepthAttachmentDescriptor::metal const): Ditto.

  • platform/graphics/metal/GPURenderPassDescriptorMetal.mm:

(WebCore::GPURenderPassDescriptor::GPURenderPassDescriptor): Ditto.
(WebCore::GPURenderPassDescriptor::colorAttachments const): Ditto.
(WebCore::GPURenderPassDescriptor::depthAttachment const): Ditto.
(WebCore::GPURenderPassDescriptor::metal const): Ditto.

  • platform/graphics/metal/GPURenderPipelineColorAttachmentDescriptorMetal.mm:

(WebCore::GPURenderPipelineColorAttachmentDescriptor::GPURenderPipelineColorAttachmentDescriptor): Ditto.
(WebCore::GPURenderPipelineColorAttachmentDescriptor::pixelFormat const): Ditto.
(WebCore::GPURenderPipelineColorAttachmentDescriptor::setPixelFormat const): Ditto.
(WebCore::GPURenderPipelineColorAttachmentDescriptor::metal const): Ditto.

  • platform/graphics/metal/GPURenderPipelineDescriptorMetal.mm:

(WebCore::GPURenderPipelineDescriptor::GPURenderPipelineDescriptor): Ditto.
(WebCore::GPURenderPipelineDescriptor::depthAttachmentPixelFormat const): Ditto.
(WebCore::GPURenderPipelineDescriptor::setDepthAttachmentPixelFormat const): Ditto.
(WebCore::GPURenderPipelineDescriptor::setVertexFunction const): Ditto.
(WebCore::GPURenderPipelineDescriptor::setFragmentFunction const): Ditto.
(WebCore::GPURenderPipelineDescriptor::colorAttachments const): Ditto.
(WebCore::GPURenderPipelineDescriptor::reset const): Ditto.
(WebCore::GPURenderPipelineDescriptor::metal const): Ditto.

  • platform/graphics/metal/GPURenderPipelineStateMetal.mm:

(WebCore::GPURenderPipelineState::GPURenderPipelineState): Ditto.
(WebCore::GPURenderPipelineState::label const): Ditto.
(WebCore::GPURenderPipelineState::setLabel const): Ditto. This is one of the
functions that was calling a method that does not exist. Added a comment.
(WebCore::GPURenderPipelineState::metal const): Ditto.

  • platform/graphics/metal/GPUTextureDescriptorMetal.mm:

(WebCore::GPUTextureDescriptor::GPUTextureDescriptor): Ditto.
(WebCore::GPUTextureDescriptor::width const): Ditto.
(WebCore::GPUTextureDescriptor::setWidth const): Ditto.
(WebCore::GPUTextureDescriptor::height const): Ditto.
(WebCore::GPUTextureDescriptor::setHeight const): Ditto.
(WebCore::GPUTextureDescriptor::sampleCount const): Ditto.
(WebCore::GPUTextureDescriptor::setSampleCount const): Ditto.
(WebCore::GPUTextureDescriptor::textureType const): Ditto.
(WebCore::GPUTextureDescriptor::setTextureType const): Ditto.
(WebCore::GPUTextureDescriptor::storageMode const): Ditto.
(WebCore::GPUTextureDescriptor::setStorageMode const): Ditto.
(WebCore::GPUTextureDescriptor::usage const): Ditto.
(WebCore::GPUTextureDescriptor::setUsage const): Ditto.
(WebCore::GPUTextureDescriptor::metal const): Ditto.

  • platform/graphics/metal/GPUTextureMetal.mm:

(WebCore::GPUTexture::GPUTexture): Ditto.
(WebCore::GPUTexture::width const): Ditto.
(WebCore::GPUTexture::height const): Ditto.
(WebCore::GPUTexture::metal const): Ditto.

  • platform/graphics/gpu/GPUBuffer.cpp: Removed unused stubs.

(WebCore::GPUBuffer::length const): Moved this function here since it has
a useful platform-independent implementation.

  • platform/graphics/gpu/GPUBuffer.h: Use OBJC_PROTOCOL for MTLBuffer.

Did the other thigs mentioned above: USE(METAL), remove WEBCORE_EXPORT,
no longer be RefCounted, etc.

  • platform/graphics/gpu/GPUCommandBuffer.cpp: Ditto.
  • platform/graphics/gpu/GPUCommandBuffer.h: Ditto. Use OBJC_PROTOCOL

for MTLCommandBuffer.

  • platform/graphics/gpu/GPUCommandQueue.cpp: Ditto.
  • platform/graphics/gpu/GPUCommandQueue.h: Ditto. Use OBJC_PROTOCOL for

MTLCommandQueue.

  • platform/graphics/gpu/GPUComputeCommandEncoder.cpp: Ditto.
  • platform/graphics/gpu/GPUComputeCommandEncoder.h: Ditto. Use OBJC_PROTOCOL for

MTLComputeCommandEncoder.

  • platform/graphics/gpu/GPUComputePipelineState.cpp: Ditto.
  • platform/graphics/gpu/GPUComputePipelineState.h: Ditto. Use OBJC_PROTOCOL for

MTLComputePipelineState.

  • platform/graphics/gpu/GPUDepthStencilDescriptor.cpp: Ditto.
  • platform/graphics/gpu/GPUDepthStencilDescriptor.h: Ditto.
  • platform/graphics/gpu/GPUDepthStencilState.cpp: Ditto.
  • platform/graphics/gpu/GPUDepthStencilState.h: Ditto. Use OBJC_PROTOCOL for

MTLDepthStencilState.

  • platform/graphics/gpu/GPUDevice.cpp: Ditto.
  • platform/graphics/gpu/GPUDevice.h: Ditto. Use OBJC_PROTOCOL for MTLDevice.
  • platform/graphics/gpu/GPUDrawable.cpp: Ditto.
  • platform/graphics/gpu/GPUDrawable.h: Ditto. Use OBJC_PROTOCOL for

MTLDrawable and MTLTexture.

  • platform/graphics/gpu/GPUEnums.h: Tweaked formatting.
  • platform/graphics/gpu/GPUFunction.cpp: Ditto.
  • platform/graphics/gpu/GPUFunction.h: Ditto. Use OBJC_PROTOCOL for

MTLFunction.

  • platform/graphics/gpu/GPULibrary.cpp: Ditto.
  • platform/graphics/gpu/GPULibrary.h: Ditto. Use OBJC_PROTOCOL for

MTLLibrary.

  • platform/graphics/gpu/GPURenderCommandEncoder.cpp: Ditto.
  • platform/graphics/gpu/GPURenderCommandEncoder.h: Ditto.

Use OBJC_PROTOCOL for MTLRenderCommandEncoder.

  • platform/graphics/gpu/GPURenderPassAttachmentDescriptor.cpp: Ditto.
  • platform/graphics/gpu/GPURenderPassAttachmentDescriptor.h: Ditto.
  • platform/graphics/gpu/GPURenderPassColorAttachmentDescriptor.cpp: Ditto.
  • platform/graphics/gpu/GPURenderPassColorAttachmentDescriptor.h: Ditto.
  • platform/graphics/gpu/GPURenderPassDepthAttachmentDescriptor.cpp: Ditto.
  • platform/graphics/gpu/GPURenderPassDepthAttachmentDescriptor.h: Ditto.
  • platform/graphics/gpu/GPURenderPassDescriptor.cpp: Ditto.
  • platform/graphics/gpu/GPURenderPassDescriptor.h: Ditto.
  • platform/graphics/gpu/GPURenderPipelineColorAttachmentDescriptor.cpp: Ditto.
  • platform/graphics/gpu/GPURenderPipelineColorAttachmentDescriptor.h: Ditto.
  • platform/graphics/gpu/GPURenderPipelineDescriptor.cpp: Ditto.
  • platform/graphics/gpu/GPURenderPipelineDescriptor.h: Ditto.
  • platform/graphics/gpu/GPURenderPipelineState.cpp: Ditto.
  • platform/graphics/gpu/GPURenderPipelineState.h: Ditto. Use OBJC_PROTOCOL

for MTLRenderPipelineState.

  • platform/graphics/gpu/GPUSize.h: Use "unsigned" instead of "unsigned long".
  • platform/graphics/gpu/GPUTexture.cpp: Ditto.
  • platform/graphics/gpu/GPUTexture.h: Ditto. Use OBJC_PROTOCOL for

MTLTexture.

  • platform/graphics/gpu/GPUTextureDescriptor.cpp: Ditto.
  • platform/graphics/gpu/GPUTextureDescriptor.h: Ditto.

Source/WTF:

  • wtf/Compiler.h: Added OBJC_PROTOCOL, a macro for convieniently treating an

Objective-C protocol in a way that lets it be mentioned in a C++ source file.
This is the rough equivalent of OBJC_CLASS, but for protocols.

  • wtf/Platform.h: Added USE(METAL), alongside USE(OPENGL) and the like.

Now used in the WebGPU platform layer to guard the Metal-specific code.

Tools:

  • TestWebKitAPI/Tests/WebCore/mac/GPUBuffer.mm: Updated.
  • TestWebKitAPI/Tests/WebCore/mac/GPUCommandQueue.mm: Updated.
  • TestWebKitAPI/Tests/WebCore/mac/GPUDevice.mm: Updated.
  • TestWebKitAPI/Tests/WebCore/mac/GPUFunction.mm: Updated.
  • TestWebKitAPI/Tests/WebCore/mac/GPULibrary.mm: Updated.
8:23 AM WebKitGTK/Gardening/Calendar/2018Logs edited by magomez@igalia.com
(diff)
8:16 AM Changeset in webkit [234257] by magomez@igalia.com
  • 5 edits in trunk/LayoutTests

Unreviewed GTK+ and WPE gardening after r234252.

  • platform/gtk/TestExpectations:
  • platform/gtk/fast/overflow/line-clamp-expected.png:
  • platform/gtk/fast/overflow/line-clamp-expected.txt:
  • platform/wpe/TestExpectations:
7:30 AM Changeset in webkit [234256] by Alan Bujtas
  • 13 edits in trunk/Source/WebCore

[LFC][Floating] Add skeleton for basic positioning.
https://bugs.webkit.org/show_bug.cgi?id=187974

Reviewed by Antti Koivisto.

Add floating boxes to an empty floating context.

  • layout/FloatingContext.cpp:

(WebCore::Layout::FloatingContext::FloatingContext):
(WebCore::Layout::FloatingContext::computePosition):

  • layout/FloatingContext.h:

(WebCore::Layout::FloatingContext::floatingState const):
(WebCore::Layout::FloatingContext::layoutContext const):

  • layout/FloatingState.cpp:

(WebCore::Layout::FloatingState::FloatingState):
(WebCore::Layout::FloatingState::append):

  • layout/FloatingState.h:

(WebCore::Layout::FloatingState::create):
(WebCore::Layout::FloatingState::isEmpty const):
(WebCore::Layout::FloatingState::layoutContext const):

  • layout/FormattingState.h:
  • layout/LayoutContext.cpp:

(WebCore::Layout::LayoutContext::establishedFormattingState):

  • layout/LayoutContext.h:
  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::layout const):
(WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):
(WebCore::Layout::BlockFormattingContext::computeFloatingPosition const):

  • layout/blockformatting/BlockFormattingContext.h:
  • layout/blockformatting/BlockInvalidation.cpp:

(WebCore::Layout::invalidationStopsAtFormattingContextBoundary):

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::isLeftFloatingPositioned const):
(WebCore::Layout::Box::isRightFloatingPositioned const):

  • layout/layouttree/LayoutBox.h:
7:25 AM Changeset in webkit [234255] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][BFC] Do not try to access containing block's height during descendant height computation
https://bugs.webkit.org/show_bug.cgi?id=187970

Reviewed by Antti Koivisto.

Mostly becasue in BFC, we compute the descendents' height first so the containing block's height is probably not computed yet.

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedHeightAndMargin):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):

7:07 AM Changeset in webkit [234254] by fred.wang@free.fr
  • 3 edits in trunk/Source/WebCore

Unreviewed, add bug references into FIXME comments for CSSOM View API

Patch by Frederic Wang <fwang@igalia.com> on 2018-07-26

  • dom/Element.idl:
  • page/ScrollToOptions.idl:
6:45 AM Changeset in webkit [234253] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][BFC] assert-not-implemented-yet on inflow non-replaced height when style is not fixed/auto.
https://bugs.webkit.org/show_bug.cgi?id=187969

Reviewed by Antti Koivisto.

Assert on unsupported height types when computing inflow non-replaced height.

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

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

2:30 AM Changeset in webkit [234252] by Fujii Hironori
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION(r234248) [Win] testapi.c: nonstandard extension used: non-constant aggregate initializer
https://bugs.webkit.org/show_bug.cgi?id=188040

Unreviewed build fix for AppleWin port.

  • API/tests/testapi.c: Disabled warning C4204.

(testMarkingConstraintsAndHeapFinalizers): Added an explicit void* cast for weakRefs.

2:00 AM Changeset in webkit [234251] by tpopela@redhat.com
  • 4 edits in trunk/Source/WTF

[WTF] Coverity scan issues
https://bugs.webkit.org/show_bug.cgi?id=186800

Reviewed by Brent Fulgham.

  • wtf/CheckedArithmetic.h: Swap the operands to multiply().
  • wtf/ThreadSpecific.h: Initialize the m_key variable.
  • wtf/dtoa.cpp: Initialize the next variable.
1:33 AM Changeset in webkit [234250] by graouts@webkit.org
  • 6 edits
    4 adds in trunk

[Web Animations] REGRESSION: transition added immediately after element creation doesn't work
https://bugs.webkit.org/show_bug.cgi?id=187942

Reviewed by Dean Jackson.

Source/WebCore:

Tests: webanimations/accelerated-transition-by-removing-property.html

webanimations/partly-accelerated-transition-by-removing-property.html

The Style::TreeResolver::createAnimatedElementUpdate() function expected a flag to be set that indicates that
running animations on an element should yield a change in composited state for that element's layer. We did not
have code accounting for this flag in the Web Animations engine. We now have a resolveAnimationsForElement()
method on DocumentTimeline which looks at all animations resolved on the element and see if all of them are
running accelerated and whether at least one of them is pending. In that case, we set the shouldRecompositeLayer
flag in createAnimatedElementUpdate() to true which guarantees the element's layer will have a backing when
we attempt to start the animation in KeyframeEffectReadOnly::applyPendingAcceleratedActions() where we would
have previously failed to have layer-backed renderer to perform an accelerated animation on (under certain
circumstances, see test).

  • animation/DocumentTimeline.cpp:

(WebCore::DocumentTimeline::resolveAnimationsForElement):

  • animation/DocumentTimeline.h:
  • animation/KeyframeEffectReadOnly.h:

(WebCore::KeyframeEffectReadOnly::hasPendingAcceleratedAction const):

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::createAnimatedElementUpdate):

LayoutTests:

Creating a new test that runs a transition based on an explicit value being removed in favor
of the implicit value of a property that can be accelerated. To check that we indeed run the
animation, we have a cache that covers the entire range of interpolated values except for the
start and end values and wait 100ms after creating the transition to end the test. Prior to this
patch, the element would be at its start value and a 1px red line would show to the right of the
cache. With this patch, the red line is hidden by the cache as it's animated.

We also add a test that checks that we do not create a composited layer when several transitions,
with only one being potentially accelerated, target the same element.

  • webanimations/accelerated-transition-by-removing-property-expected.html: Added.
  • webanimations/accelerated-transition-by-removing-property.html: Added.
  • webanimations/partly-accelerated-transition-by-removing-property-expected.txt: Added.
  • webanimations/partly-accelerated-transition-by-removing-property.html: Added.
1:04 AM Changeset in webkit [234249] by Basuke Suzuki
  • 2 edits
    2 adds in trunk/LayoutTests

[Curl] Test gardening
https://bugs.webkit.org/show_bug.cgi?id=188034

Unreviewed WinCairo gardening.

Add expected file.

  • http/tests/xmlhttprequest/resources/print-referer.php: Added.
  • http/tests/xmlhttprequest/simple-sync-expected.txt: Added.
  • http/tests/xmlhttprequest/simple-sync.html:
12:38 AM Changeset in webkit [234248] by Fujii Hironori
  • 3 edits in trunk/Source/JavaScriptCore

[JSC API] We should support the symbol type in our C/Obj-C API
https://bugs.webkit.org/show_bug.cgi?id=175836

Unreviewed build fix for Windows port.

r234227 introduced a compilation error unresolved external symbol
"int cdecl testCAPIViaCpp(void)" in testapi for Windows ports.

Windows ports are compiling testapi.c as C++ by using /TP switch.

  • API/tests/testapi.c:

(main): Removed :: prefix of ::SetErrorMode Windows API.
(dllLauncherEntryPoint): Converted into C style.

  • shell/PlatformWin.cmake: Do not use /TP switch for testapi.c
12:15 AM Changeset in webkit [234247] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebCore

Cherry-pick r234222. rdar://problem/42612113

Build fix after r234215. Unreviewed.

  • rendering/RenderTheme.cpp:

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

12:15 AM Changeset in webkit [234246] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebKit

Cherry-pick r234216. rdar://problem/42604537

Mask AVBackgroundView to the corner radius.
https://bugs.webkit.org/show_bug.cgi?id=187976
rdar://problem/41810866

Patch by Jeremy Jones <jeremyj@apple.com> on 2018-07-25
Reviewed by Jon Lee.

This changes sets the appropriate mask to the layer so the corners look correct.

  • UIProcess/ios/fullscreen/WKFullscreenStackView.mm: (-[WKFullscreenStackView init]):

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

12:15 AM Changeset in webkit [234245] by bshafiei@apple.com
  • 30 edits
    2 adds
    15 deletes in branches/safari-606-branch

Cherry-pick r234215. rdar://problem/42604541

REGRESSION(r227577) Text on TV & Movies page doesn't wrap properly in iTunes
https://bugs.webkit.org/show_bug.cgi?id=188018
<rdar://problem/42517520>

Reviewed by Dean Jackson.

Source/WebCore:

Manual rollout of r227577.

Test: fast/overflow/line-clamp-with-text-shadow.html

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
  • css/CSSProperties.json:
  • css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyValueWebkitLinesClamp): Deleted.
  • css/parser/CSSParserContext.cpp: (WebCore::CSSParserContext::CSSParserContext):
  • css/parser/CSSParserContext.h: (WebCore::CSSParserContextHash::hash):
  • css/parser/CSSPropertyParser.cpp: (WebCore::CSSPropertyParser::parseSingleValue): (WebCore::consumeLinesClamp): Deleted.
  • page/Settings.yaml:
  • rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::willCreateColumns const): (WebCore::getHeightForLineCount): (WebCore::RenderBlockFlow::heightForLineCount): (WebCore::RenderBlockFlow::layoutExcludedChildren): (WebCore::RenderBlockFlow::logicalHeightForLineCount): Deleted. (WebCore::RenderBlockFlow::logicalHeightExcludingLineCount): Deleted.
  • rendering/RenderBlockFlow.h:
  • rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
  • rendering/RenderFragmentContainer.cpp: (WebCore::RenderFragmentContainer::pageLogicalHeightForOffset const): Deleted.
  • rendering/RenderFragmentContainer.h:
  • rendering/RenderFragmentedFlow.cpp: (WebCore::RenderFragmentedFlow::validateFragments): (WebCore::RenderFragmentedFlow::pageLogicalHeightForOffset const): (WebCore::RenderFragmentedFlow::pageRemainingLogicalHeightForOffset const):
  • rendering/RenderFragmentedFlow.h:
  • rendering/RenderLinesClampFlow.cpp: Removed.
  • rendering/RenderLinesClampFlow.h: Removed.
  • rendering/RenderLinesClampSet.cpp: Removed.
  • rendering/RenderLinesClampSet.h: Removed.
  • rendering/RenderMultiColumnFlow.cpp: (WebCore::RenderMultiColumnFlow::isColumnSpanningDescendant const): Deleted. (WebCore::RenderMultiColumnFlow::createMultiColumnSet): Deleted.
  • rendering/RenderMultiColumnFlow.h: (WebCore::RenderMultiColumnFlow::multiColumnBlockFlow const): Deleted. (WebCore::RenderMultiColumnFlow::hasColumnSpanner const): Deleted. (WebCore::RenderMultiColumnFlow::findColumnSpannerPlaceholder const): Deleted. (WebCore::RenderMultiColumnFlow::columnCount const): Deleted. (WebCore::RenderMultiColumnFlow::columnWidth const): Deleted. (WebCore::RenderMultiColumnFlow::columnHeightAvailable const): Deleted. (WebCore::RenderMultiColumnFlow::setColumnHeightAvailable): Deleted. (WebCore::RenderMultiColumnFlow::inBalancingPass const): Deleted. (WebCore::RenderMultiColumnFlow::setInBalancingPass): Deleted. (WebCore::RenderMultiColumnFlow::needsHeightsRecalculation const): Deleted. (WebCore::RenderMultiColumnFlow::setNeedsHeightsRecalculation): Deleted. (WebCore::RenderMultiColumnFlow::shouldRelayoutForPagination const): Deleted. (WebCore::RenderMultiColumnFlow::setColumnCountAndWidth): Deleted. (WebCore::RenderMultiColumnFlow::progressionIsInline const): Deleted. (WebCore::RenderMultiColumnFlow::setProgressionIsInline): Deleted. (WebCore::RenderMultiColumnFlow::progressionIsReversed const): Deleted. (WebCore::RenderMultiColumnFlow::setProgressionIsReversed): Deleted. (WebCore::RenderMultiColumnFlow::spannerMap): Deleted.
  • rendering/RenderMultiColumnSet.cpp: (WebCore::RenderMultiColumnSet::collectLayerFragments): (WebCore::RenderMultiColumnSet::columnTranslationForOffset const):
  • rendering/RenderMultiColumnSet.h: (WebCore::RenderMultiColumnSet::multiColumnBlockFlow const): Deleted. (WebCore::RenderMultiColumnSet::multiColumnFlow const): Deleted. (WebCore::RenderMultiColumnSet::logicalTopInFragmentedFlow const): Deleted. (WebCore::RenderMultiColumnSet::logicalBottomInFragmentedFlow const): Deleted. (WebCore::RenderMultiColumnSet::logicalHeightInFragmentedFlow const): Deleted. (WebCore::RenderMultiColumnSet::computedColumnCount const): Deleted. (WebCore::RenderMultiColumnSet::computedColumnWidth const): Deleted. (WebCore::RenderMultiColumnSet::computedColumnHeight const): Deleted. (WebCore::RenderMultiColumnSet::columnHeightComputed const): Deleted. (WebCore::RenderMultiColumnSet::setComputedColumnWidthAndCount): Deleted. (WebCore::RenderMultiColumnSet::updateMinimumColumnHeight): Deleted. (WebCore::RenderMultiColumnSet::minimumColumnHeight const): Deleted. (WebCore::RenderMultiColumnSet::forcedBreaksCount const): Deleted. (WebCore::RenderMultiColumnSet::hasBeenFlowed const): Deleted. (WebCore::RenderMultiColumnSet::skipLayerFragmentCollectionForColumn const): Deleted. (WebCore::RenderMultiColumnSet::customBlockProgressionAdjustmentForColumn const): Deleted. (WebCore::RenderMultiColumnSet::ContentRun::ContentRun): Deleted. (WebCore::RenderMultiColumnSet::ContentRun::assumedImplicitBreaks const): Deleted. (WebCore::RenderMultiColumnSet::ContentRun::assumeAnotherImplicitBreak): Deleted. (WebCore::RenderMultiColumnSet::ContentRun::breakOffset const): Deleted. (WebCore::RenderMultiColumnSet::ContentRun::columnLogicalHeight const): Deleted.
  • rendering/RenderObject.h: (WebCore::RenderObject::isRenderLinesClampFlow const): Deleted. (WebCore::RenderObject::isRenderLinesClampSet const): Deleted.
  • rendering/style/LineClampValue.h: (WebCore::LinesClampValue::LinesClampValue): Deleted. (WebCore::LinesClampValue::isNone const): Deleted. (WebCore::LinesClampValue::operator== const): Deleted. (WebCore::LinesClampValue::operator!= const): Deleted. (WebCore::LinesClampValue::start const): Deleted. (WebCore::LinesClampValue::end const): Deleted. (WebCore::LinesClampValue::center const): Deleted.
  • rendering/style/RenderStyle.h: (WebCore::RenderStyle::lineClamp const): (WebCore::RenderStyle::setLineClamp): (WebCore::RenderStyle::initialLineClamp): (WebCore::RenderStyle::hasInlineColumnAxis const): (WebCore::RenderStyle::linesClamp const): Deleted. (WebCore::RenderStyle::hasLinesClamp const): Deleted. (WebCore::RenderStyle::setLinesClamp): Deleted. (WebCore::RenderStyle::initialLinesClamp): Deleted.
  • rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator== const):
  • rendering/style/StyleRareNonInheritedData.h:
  • rendering/updating/RenderTreeBuilderMultiColumn.cpp: (WebCore::isValidColumnSpanner): (WebCore::RenderTreeBuilder::MultiColumn::createFragmentedFlow): (WebCore::RenderTreeBuilder::MultiColumn::processPossibleSpannerDescendant):

Source/WebKit:

  • WebProcess/WebPage/WebPage.cpp: (WebKit::m_credentialsMessenger):

LayoutTests:

  • fast/block/lines-clamp-advanced-expected.html: Removed.
  • fast/block/lines-clamp-advanced-rl-expected.html: Removed.
  • fast/block/lines-clamp-advanced-rl.html: Removed.
  • fast/block/lines-clamp-advanced.html: Removed.
  • fast/block/lines-clamp-basic-expected.html: Removed.
  • fast/block/lines-clamp-basic-rl-expected.html: Removed.
  • fast/block/lines-clamp-basic-rl.html: Removed.
  • fast/block/lines-clamp-basic.html: Removed.
  • fast/css/lines-clamp-parsing-expected.txt: Removed.
  • fast/css/lines-clamp-parsing.html: Removed.
  • fast/overflow/line-clamp-with-text-shadow-expected.html: Added.
  • fast/overflow/line-clamp-with-text-shadow.html: Added.
  • platform/ios-simulator-wk2/fast/overflow/line-clamp-expected.txt: Removed.

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

12:15 AM Changeset in webkit [234244] by bshafiei@apple.com
  • 4 edits
    2 moves in branches/safari-606-branch/Source/WebKit

Cherry-pick r234195. rdar://problem/42604534

[macOS] PluginProcess needs TCC entitlements for media capture
https://bugs.webkit.org/show_bug.cgi?id=187981
<rdar://problem/42433634>

Reviewed by Chris Dumez.

The changes needed in Bug 185526 are also needed for the plugin process, or else the UIProcess
(e.g., Safari) is not able to pass the user's camera/microphone access permission to the plugin process.

This patch has the following changes:

  1. Rename "WebContent-OSX-restricted.entitlements" to "WebContent-or-Plugin-OSX-restricted.entitlements"
  2. Rename "process-webcontent-entitlements.sh" to "process-webcontent-or-plugin-entitlements.sh"
  3. Add a run-script step to the Plugin.64 and Plugin.32 builds to add the relevant entitlements.
  4. Silence some Flash plugin sandbox exceptions triggered after activating the camera.
  • Configurations/WebContent-or-Plugin-OSX-restricted.entitlements: Renamed from Source/WebKit/Configurations/WebContent-OSX-restricted.entitlements.
  • Resources/PlugInSandboxProfiles/com.macromedia.Flash Player ESR.plugin.sb: Address sandbox violations needed by camera use.
  • Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: Ditto.
  • Scripts/process-webcontent-or-plugin-entitlements.sh: Renamed from Source/WebKit/Scripts/process-webcontent-entitlements.sh.
  • WebKit.xcodeproj/project.pbxproj: Update for renaming, and perform entitlement steps on Plugin process.

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

12:15 AM Changeset in webkit [234243] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WTF

Cherry-pick r234189. rdar://problem/42604524

HAVE(PARENTAL_CONTROLS) should be true on watchOS
https://bugs.webkit.org/show_bug.cgi?id=187985
<rdar://problem/42559346>

Reviewed by Andy Estes.

  • wtf/Platform.h:

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

12:15 AM Changeset in webkit [234242] by bshafiei@apple.com
  • 12 edits in branches/safari-606-branch

Cherry-pick r234181. rdar://problem/42604524

Enable Web Content Filtering on watchOS
https://bugs.webkit.org/show_bug.cgi?id=187979
<rdar://problem/42559346>

Reviewed by Wenson Hsieh.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

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

12:15 AM Changeset in webkit [234241] by bshafiei@apple.com
  • 11 edits
    7 adds in branches/safari-606-branch

Cherry-pick r234149. rdar://problem/42604679

Cannot view PDF's on my.gov.au: "Refused to load https://my.gov.au/attachment/viewAttachment because it
appears in neither the object-src directive nor the default-src directive of the Content Security Policy"
https://bugs.webkit.org/show_bug.cgi?id=187870
<rdar://problem/41190880>

Reviewed by Dean Jackson.

Source/WebCore:

Fixes an issue where opening attachments on my.gov.au would show a "Blocked Plug-in" message.

Opening an attachment on my.gov.au opens a same-origin plugin document in a child window. Currently
same-origin plugin documents inherit their CSP policy from their opener. If the opener's CSP policy
disallows embedding plugins then the plugin document would be blocked from loading a plugin. For now
we relax the inheritance model such that we only inherit the plugin-types and report-uri directives
from the opener.

Developers that want to block plugin content from being loaded in a same-origin child window must now
serve such plugin content with a CSP policy that includes "object-src 'none'". This matches the behavior
described in the second Note in section object-src of the CSP 3 spec: <https://w3c.github.io/webappsec-csp/#directive-object-src>
(Editor's Draft, 10 July 2018). It also makes the behavior in WebKit more closely aligned with the
behavior of Chrome and Firefox.

Tests: http/tests/security/contentSecurityPolicy/same-origin-plugin-document-allowed-in-child-window.html

http/tests/security/contentSecurityPolicy/same-origin-plugin-document-blocked-in-child-window-report.php
http/tests/security/contentSecurityPolicy/same-origin-plugin-document-with-csp-blocked-in-child-window.html

  • dom/Document.cpp: (WebCore::Document::initContentSecurityPolicy): For plugin documents that have an opener call ContentSecurityPolicy::createPolicyForPluginDocumentFrom() to only inherit the plugin-types and report-uri directives from its opener's CSP policy. Otherwise, call ContentSecurityPolicy::copyStateFrom() to inherit all directives from the owner frame as we do now.
  • page/csp/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::createPolicyForPluginDocumentFrom): Create a new policy from the specified policy inheriting only the plugin-types and report-uri directives.
  • page/csp/ContentSecurityPolicy.h: Define a new PolicyFrom enumerator, InheritedForPluginDocument, for plugin documents loaded in a child window.
  • page/csp/ContentSecurityPolicyDirectiveList.cpp: (WebCore::ContentSecurityPolicyDirectiveList::parse): When policyFrom is InheritedForPluginDocument then only recognize the plugin-types and report-uri directives when parsing the policy.

LayoutTests:

Add new tests and fix up the existing test http/tests/security/contentSecurityPolicy/same-origin-plugin-document-blocked-in-child-window.html
so that still tests a scenario where a same-origin plugin document loaded in a child window is blocked from
loading its plugin now that that "object-src: 'none'" is no longer inherited by the plugin document.

  • http/tests/plugins/resources/plugin-document-alert-and-notify-done.pl:
  • http/tests/security/contentSecurityPolicy/resources/checkDidSameOriginChildWindowLoad.js: Added. (checkDidSameOriginChildWindowLoadAndNotifyDone): (checkDidLoad):
  • http/tests/security/contentSecurityPolicy/same-origin-plugin-document-allowed-in-child-window-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/same-origin-plugin-document-allowed-in-child-window.html: Added.
  • http/tests/security/contentSecurityPolicy/same-origin-plugin-document-blocked-in-child-window-expected.txt:
  • http/tests/security/contentSecurityPolicy/same-origin-plugin-document-blocked-in-child-window-report-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/same-origin-plugin-document-blocked-in-child-window-report.php: Added.
  • http/tests/security/contentSecurityPolicy/same-origin-plugin-document-blocked-in-child-window.html:
  • http/tests/security/contentSecurityPolicy/same-origin-plugin-document-with-csp-blocked-in-child-window-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/same-origin-plugin-document-with-csp-blocked-in-child-window.html: Added.
  • platform/ios/TestExpectations: Skip the included tests as we do not support plugins on iOS.
  • platform/win/TestExpectations: Skip the included tests as plugins do not seem to work on Windows. We currently skip many (if not all) plugin tests on Windows despite <rdar://problem/5074411> being marked as Closed (why?).

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

12:14 AM Changeset in webkit [234240] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebCore

Cherry-pick r234140. rdar://problem/42606763

REGRESSION(r234055): inverted return values in MediaPlayer::wouldTaintOrigin()
https://bugs.webkit.org/show_bug.cgi?id=187944

Reviewed by Carlos Garcia Campos.

The MediaPlayer::wouldTaintOrigin(), as introduced in r234055, should
return false when the URL protocol is data:, and should return true
when the given SecurityOrigin cannot access the media URL.

This matches behavior of CanvasRenderingContext::wouldTaintOrigin()
which the new method falls back to when the MediaPlayerPrivate
implementation doesn't or can't determine the would-taint result.

This fixes a bunch of failing and timing-out WebGL test cases on ports
using GStreamer (on which the MediaPlayerPrivate derivate doesn't
implement the wouldTaintOrigin() method).

  • platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::wouldTaintOrigin const):

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

12:14 AM Changeset in webkit [234239] by bshafiei@apple.com
  • 3 edits in branches/safari-606-branch/Source/WebKit

Cherry-pick r234124. rdar://problem/42604550

Crash when loadViewIfRequired called while WKFullScreenViewController is being deallocated.
https://bugs.webkit.org/show_bug.cgi?id=187920
rdar://problem/41324023

Patch by Jeremy Jones <jeremyj@apple.com> on 2018-07-23
Reviewed by Eric Carlson.

Clear dangling weak-ref.
Prevent async playback state calls from instantiating the interface.
Release WKFullScreenViewController when it is no longer needed.

  • UIProcess/ios/fullscreen/WKFullScreenViewController.mm: (-[WKFullScreenViewController dealloc]): (-[WKFullScreenViewController setPlaying:]): (-[WKFullScreenViewController setAnimating:]):
  • UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm: (-[WKFullScreenWindowController _completedExitFullScreen]):

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

12:14 AM Changeset in webkit [234238] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebCore

Cherry-pick r234113. rdar://problem/42604546

WebCore::primaryScreenDisplayID() always return 0
https://bugs.webkit.org/show_bug.cgi?id=187922
<rdar://problem/42286933>

Reviewed by Geoffrey Garen.

This function should return a valid display ID.

No new tests. Testing this requires a dual monitor setup.

  • platform/mac/PlatformScreenMac.mm: (WebCore::primaryScreenDisplayID):

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

12:14 AM Changeset in webkit [234237] by bshafiei@apple.com
  • 4 edits
    2 adds in branches/safari-606-branch

Cherry-pick r234112. rdar://problem/42604514

AX: Press tab to highlight items on a webpage is not working with voiceover enabled
https://bugs.webkit.org/show_bug.cgi?id=187824

Reviewed by Zalan Bujtas.

Source/WebCore:

We are deferring posting focused element change notification when the document needs a
style recalculation. However, we only perform the cache update after a layout is completed.
Added a timer to perform the cache update in the next runloop when non-layout type of mutation
happens.

Test: accessibility/mac/tab-focus-post-notification.html

  • accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::AXObjectCache): (WebCore::AXObjectCache::~AXObjectCache): (WebCore::AXObjectCache::deferFocusedUIElementChangeIfNeeded): (WebCore::AXObjectCache::performCacheUpdateTimerFired):
  • accessibility/AXObjectCache.h: (WebCore::AXObjectCache::AXObjectCache): (WebCore::AXObjectCache::performCacheUpdateTimerFired):

LayoutTests:

  • accessibility/mac/tab-focus-post-notification-expected.txt: Added.
  • accessibility/mac/tab-focus-post-notification.html: Added.

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

12:14 AM Changeset in webkit [234236] by bshafiei@apple.com
  • 12 edits
    1 add in branches/safari-606-branch

Cherry-pick r234111. rdar://problem/42604691

WebResourceLoadStatisticsStore fails to unregister itself as a MessageReceiver in its destructor
https://bugs.webkit.org/show_bug.cgi?id=187910
<rdar://problem/42356526>

Reviewed by Brent Fulgham.

Source/WebCore:

Add internals API that causes the ResourceLoadObserver to notify its observer, and avoid waiting
for the 5 second delay.

  • testing/Internals.cpp: (WebCore::Internals::notifyResourceLoadObserver):
  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebKit:

The WebResourceLoadStatisticsStore was only removing itself as a MessageReceiver from the WebProcessProxy
and that WebProcessProxy's connection was getting closed. However, it is possible for the
WebResourceLoadStatisticsStore to get destroyed before this happens. This would lead to crashes such as
the one in <rdar://problem/42356526>.

To address the issue, we let the WebsiteDataStore take care of registering / unregistering the
WebResourceLoadStatisticsStore as a MessageReceiver with the WebProcessProxy. This is more reliable since
the WebsiteDataStore is the one that subclasses WebProcessLifetimeObserver. Make sure the
WebResourceLoadStatisticsStore is removed as a MessageReceiver whenever the WebsiteDataStore is destroyed
or WebsiteDataStore::m_resourceLoadStatistics gets cleared.

  • UIProcess/WebResourceLoadStatisticsStore.cpp:
  • UIProcess/WebResourceLoadStatisticsStore.h: Drop logic to add / remove the WebResourceLoadStatisticsStore as a receiver now that the WebsiteDataStore takes care of it.
  • UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::~WebsiteDataStore): Make sure the WebResourceLoadStatisticsStore gets unregistered as a MessageReceiver from all associated WebProcessProxy objects when the WebsiteDataStore gets destroyed.

(WebKit::WebsiteDataStore::webProcessWillOpenConnection):
(WebKit::WebsiteDataStore::webProcessDidCloseConnection):
Register / Unregister the WebResourceLoadStatisticsStore as a MessageReceiver with the WebProcessProxy.

(WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):
Make sure we unregister the WebResourceLoadStatisticsStore as a MessageReceiver with all associated
WebProcessProxy objects before we clear m_resourceLoadStatistics as this will causes the
WebResourceLoadStatisticsStore to get destroyed.

(WebKit::WebsiteDataStore::unregisterWebResourceLoadStatisticsStoreAsMessageReceiver):
(WebKit::WebsiteDataStore::registerWebResourceLoadStatisticsStoreAsMessageReceiver):
Add utility functions to register / unregister WebResourceLoadStatisticsStore as a MessageReceiver with
all associated WebProcessProxy objects.

(WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
Register the new WebResourceLoadStatisticsStore as a MessageReceiver with all associated WebProcessProxy
objects in case setResourceLoadStatisticsEnabled(true) gets called *after* we've already started
WebProcesses.

  • UIProcess/WebsiteData/WebsiteDataStore.h:

Tools:

Add API test coverage.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm: (-[DisableITPDuringNavigationDelegate webView:didCommitNavigation:]): (-[DisableITPDuringNavigationDelegate webView:didFinishNavigation:]): (TEST):
  • TestWebKitAPI/Tests/WebKitCocoa/notify-resourceLoadObserver.html: Added.

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

12:14 AM Changeset in webkit [234235] by bshafiei@apple.com
  • 6 edits
    2 adds in branches/safari-606-branch

Cherry-pick r234098. rdar://problem/42507862

fullscreen env() variables should have initial values
https://bugs.webkit.org/show_bug.cgi?id=187897
<rdar://problem/42485682>

Reviewed by Sam Weinig.

Source/WebCore:

The env() values for fullscreen properties need to be
initialized, rather than wait for values to be set from WebKit.
Without this, feature detection doesn't work, and properties
won't parse correctly.

Test: fullscreen/fullscreen-env-initial.html

  • dom/ConstantPropertyMap.cpp: (WebCore::ConstantPropertyMap::buildValues): Initialize the fullscreen values. (WebCore::ConstantPropertyMap::updateConstantsForFullscreen): Renamed function, because it also updates the duration value. (WebCore::ConstantPropertyMap::didChangeFullscreenInsets): Call new name. (WebCore::ConstantPropertyMap::updateConstantsForFullscreenInsets): Deleted.
  • dom/ConstantPropertyMap.h:
  • page/Page.cpp: (WebCore::Page::setFullscreenAutoHideDuration): Don't change the value if it doesn't need it.
  • page/Page.h: Add accessor for fullscreenAutoHideDuration. Also add a member variable. (WebCore::Page::fullscreenAutoHideDuration const):

LayoutTests:

  • fullscreen/fullscreen-env-initial-expected.html: Added.
  • fullscreen/fullscreen-env-initial.html: Added.

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

12:14 AM Changeset in webkit [234234] by bshafiei@apple.com
  • 3 edits in branches/safari-606-branch/Source/WebKit

Cherry-pick r234067. rdar://problem/42451597

Occasional crash under -[WKFormInputSession setSuggestions:]
https://bugs.webkit.org/show_bug.cgi?id=187869
<rdar://problem/41357063>

Reviewed by Dean Jackson.

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView inputDelegate]): Make inputDelegate weak.

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

12:14 AM Changeset in webkit [234233] by bshafiei@apple.com
  • 21 edits
    4 copies
    2 moves
    5 adds in branches/safari-606-branch

Cherry-pick r234064. rdar://problem/42451634

Picking a color from the color panel for typing attributes needs to inverse transform through color-filter
https://bugs.webkit.org/show_bug.cgi?id=187846

Patch by Ryosuke Niwa <rniwa@apple.com> on 2018-07-20
Reviewed by Simon Fraser.

Source/WebCore:

This patch refines the color inversion for editing introduced in r234005 so that font panels and WebKit embedders
can get and set inverted colors using attributed strings for a selected text in an editable region.

More specifically, when font panels or WebKit embedders set a font color or a background color via WebView's
_applyStyleToSelection and _applyEditingStyleToSelection, WebKit would automatically invert the color before inserting
into DOM so that the color visible to the user matches that's given to WebKit. Conversely,
[WebView attributedSubstringFromRange:nsRange] now return the color visible to the user, i.e. the color after
the color filter had been applied, so that some WebKit embedders can present the visually identical color to the user.

Because DOM never sees the color filter's effect in the computed style, etc... this patch reverts the change made to
StyleChange in r234005 to avoid inverting the color passed to execCommand. This makes editing apps which is unaware
of the dark mode or -apple-color-filter continue to function (because the color picker implemented in DOM will be
applied of the same color filter before being presented to the user).

Finally, this patch introduces a testing hook in applyCommandToFrame so that executing foreColor or backColor with
the soruce of CommandFromMenuOrKeyBinding would trigger the same code path as the one taken by Objective-C

Tests: editing/execCommand/set-backColor-with-color-filter-from-scripts.html

editing/execCommand/set-foreColor-with-color-filter-from-scripts.html
editing/mac/attributed-string/attribute-string-for-copy-with-color-filter.html
editing/style/set-backColor-with-color-filter.html
editing/style/set-foreColor-with-color-filter.html

  • editing/EditingStyle.cpp: (WebCore::EditingStyle::inverseTransformColorIfNeeded): Added. (WebCore::StyleChange::StyleChange): Revert the change made in r234005 since this code is also used by execCommand which is not desirable, and won't work for background color. (WebCore::StyleChange::extractTextStyles): Ditto.
  • editing/EditingStyle.h:
  • editing/Editor.cpp: (WebCore::Editor::applyStyle): (WebCore::Editor::applyStyleToSelection): Call EditingStyle::inverseTransformColorIfNeeded when ColorFilterMode is set to InvertColor.
  • editing/Editor.h:
  • editing/EditorCommand.cpp: (WebCore::applyCommandToFrame): Added the aforementioned testing hook.
  • editing/cocoa/HTMLConverter.mm: (WebCore::editingAttributedStringFromRange): Take the color filtr into account. Some WebKit embedders use this function to compute the font color in the selected text. Note that this function is mostly used for input methods so the color doesn't really matter, and its implementation is distinct from that of HTMLConverter.

Source/WebKitLegacy/mac:

Invert the filtered font and background colors when using font panels, font pasteboard, and other Objective-C APIs.

  • WebView/WebHTMLView.mm: (-[WebHTMLView _applyStyleToSelection:withUndoAction:]): Share code with _applyEditingStyleToSelection. (-[WebHTMLView _applyEditingStyleToSelection:withUndoAction:]):

Tools:

Fixed the bug that testRunner.execCommand was using the second argument as the value.

The second argument, aShowDefaultUI, should always be ignored in testRunner.execCommand,
and the third argument should be used as the value. DumpRenderTree's implementation does this already.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::execCommand):
  • WebKitTestRunner/InjectedBundle/TestRunner.h:

LayoutTests:

Added tests to make sure foreground or background colors specified in execCommand don't get inverted.

Fixed the test which was asserting that textInputController.attributedSubstringFromRange doesn't invert the color
since that's exactly what WebKit embedders uses to compute the style for color pickers.

Added new tests for copy & paste case using textInputController.legacyAttributedString.

  • editing/execCommand/set-backColor-with-color-filter-from-scripts-expected.txt: Added.
  • editing/execCommand/set-backColor-with-color-filter-from-scripts.html: Added.
  • editing/execCommand/set-foreColor-with-color-filter-from-scripts-expected.txt: Added.
  • editing/execCommand/set-foreColor-with-color-filter-from-scripts.html: Added.
  • editing/mac/attributed-string/attrib-string-range-with-color-filter-expected.txt:
  • editing/mac/attributed-string/attrib-string-range-with-color-filter.html: This test uses attributedSubstringFromRange, which implemented using editingAttributedStringFromRange in WebCore. Since this is exactly what WebKit embedders uses to compute the current style of the selected text, we need to invert the color here. This API's main clinet is input methods so this shouldn't affect other editing operations, in particular, copy and paste, which uses HTMLConverter.
  • editing/mac/attributed-string/attribute-string-for-copy-with-color-filter-expected.txt: Added.
  • editing/mac/attributed-string/attribute-string-for-copy-with-color-filter.html: Added. Make sure the attributed string generated for copy & paste does not invert foreground or background colors via textInputController.legacyAttributedString. This is testing HTMLConverter, not editingAttributedStringFromRange, used by WebKit embedders and input methods.
  • editing/mac/attributed-string/attributed-string-for-typing-with-color-filter-expected.txt:
  • editing/mac/attributed-string/attributed-string-for-typing-with-color-filter.html: Added background color in the test.
  • editing/style/set-backColor-with-color-filter-expected.txt: Added.
  • editing/style/set-backColor-with-color-filter.html: Added.
  • editing/style/set-foreColor-with-color-filter-expected.txt: Renamed from exec-command-foreColor-with-color-filter-expected.txt.
  • editing/style/set-foreColor-with-color-filter.html: Renamed from exec-command-foreColor-with-color-filter.html. Updated the test to use testRunner.execCommand which uses CommandFromMenuOrKeyBinding in applyCommandToFrame since we're trying to test the code path taken by WebKit embedders and font panel here.

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

12:14 AM Changeset in webkit [234232] by bshafiei@apple.com
  • 14 edits
    3 adds in branches/safari-606-branch

Cherry-pick r234055. rdar://problem/42451567

HLS resources with remote subresources will not taint canvasses.
https://bugs.webkit.org/show_bug.cgi?id=187731
<rdar://problem/42290703>

Reviewed by Brady Eidson.

Source/WebCore:

Test: http/tests/security/canvas-remote-read-remote-video-hls.html

Most media sources are single-resource; they are accessed from a single origin. HLS manifests can contain many
subresources from arbitrary origins, and canvases should be tainted when painted from media elements whose
subresources were retrieved from tainting origins.

Add a new method to HTMLMediaElement, wouldTaintOrigin(), taking a SecurityOrigin, and returning whether the
media element would taint that origin. This gets piped all the way down to MediaPlayerPrivateAVFoundationObjC
which uses WebCoreNSURLSession to track all the origins of all the responses which resulted from the media
element's load.

Drive-by fix: also fix this issue for media elements which render to an AudioContext.

Drive-by fix #2: CanvasRenderingContext2DBase::createPattern() needs to check the return value of
ImageBuffer::create() before using it.

  • Modules/webaudio/MediaElementAudioSourceNode.cpp: (WebCore::MediaElementAudioSourceNode::wouldTaintOrigin):
  • html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::didAttachRenderers): (WebCore::HTMLMediaElement::didDetachRenderers): (WebCore::HTMLMediaElement::scheduleUpdateShouldAutoplay):
  • html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::wouldTaintOrigin const):
  • html/canvas/CanvasRenderingContext.cpp: (WebCore::CanvasRenderingContext::wouldTaintOrigin):
  • html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::CanvasRenderingContext2DBase::createPattern):
  • platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::wouldTaintOrigin const):
  • platform/graphics/MediaPlayer.h:
  • platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::hasSingleSecurityOrigin const): (WebCore::MediaPlayerPrivateInterface::wouldTaintOrigin const):
  • platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm: (WebCore::CDMSessionAVContentKeySession::update):
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::wouldTaintOrigin const):
  • platform/network/cocoa/WebCoreNSURLSession.h:
  • platform/network/cocoa/WebCoreNSURLSession.mm: (-[WebCoreNSURLSession task:didReceiveResponseFromOrigin:]): (-[WebCoreNSURLSession wouldTaintOrigin:]): (-[WebCoreNSURLSessionDataTask resource:receivedResponse:]):

LayoutTests:

  • http/tests/media/resources/hls/test-vod-localhost.m3u8: Added.
  • http/tests/security/canvas-remote-read-remote-video-hls-expected.txt: Added.
  • http/tests/security/canvas-remote-read-remote-video-hls.html: Added.

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

12:14 AM Changeset in webkit [234231] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebKit

Cherry-pick r234054. rdar://problem/42451625

[macOS] Relax WebKit sandbox to permit proper App Store behavior
https://bugs.webkit.org/show_bug.cgi?id=187831
<rdar://problem/42047455>

Reviewed by Alexey Proskuryakov.

The Mac App Store is unable to perform some gift card redemption tasks on macOS due to missing sandbox permissions.
This patch adds those permissions.

  • PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:

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

12:14 AM Changeset in webkit [234230] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebCore

Cherry-pick r234053. rdar://problem/42451651

Update FrameView::paintContents to use release logging.
https://bugs.webkit.org/show_bug.cgi?id=187854
<rdar://problem/42432371>

Reviewed by Simon Fraser.

Adding release logging helps identifying blank content cases.

  • page/FrameView.cpp: (WebCore::FrameView::paintContents):

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

12:14 AM Changeset in webkit [234229] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/WebKit

Cherry-pick r234023. rdar://problem/42451655

Null pointer dereference under WebPage::autofillLoginCredentials()
https://bugs.webkit.org/show_bug.cgi?id=187823
<rdar://problem/37152195>

Reviewed by David Kilzer.

Deal with m_assistedNode being null under WebPage::autofillLoginCredentials().

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

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

Jul 25, 2018:

8:34 PM Changeset in webkit [234228] by Basuke Suzuki
  • 2 edits
    1 add in trunk/LayoutTests

[Curl] Test gardening
https://bugs.webkit.org/show_bug.cgi?id=188034

Unreviewed WinCairo gardening.

  • httpxmlhttprequest/simple-sync.html: Added.
  • platform/wincairo/TestExpectations:
7:32 PM Changeset in webkit [234227] by keith_miller@apple.com
  • 34 edits
    1 add in trunk/Source/JavaScriptCore

[JSC API] We should support the symbol type in our C/Obj-C API
https://bugs.webkit.org/show_bug.cgi?id=175836

Reviewed by Filip Pizlo.

This patch makes the following API additions:
1) Test if a JSValue/JSValueRef is a symbol via any of the methods API are able to test for the types of other JSValues.
2) Create a symbol on both APIs.
3) Get/Set/Delete/Define property now take ids in the Obj-C API.
4) Add Get/Set/Delete in the C API.

We can do 3 because it is both binary and source compatable with
the existing API. I added (4) because the current property access
APIs only have the ability to get Strings. It was possible to
merge symbols into JSStringRef but that felt confusing and exposes
implementation details of our engine. The new functions match the
same meaning that they have in JS, thus should be forward
compatible with any future language extensions.

Lastly, this patch adds the same availability preproccessing phase
in WebCore to JavaScriptCore, which enables TBA features for
testing on previous releases.

  • API/APICast.h:
  • API/JSBasePrivate.h:
  • API/JSContext.h:
  • API/JSContextPrivate.h:
  • API/JSContextRef.h:
  • API/JSContextRefInternal.h:
  • API/JSContextRefPrivate.h:
  • API/JSManagedValue.h:
  • API/JSObjectRef.cpp:

(JSObjectHasPropertyKey):
(JSObjectGetPropertyKey):
(JSObjectSetPropertyKey):
(JSObjectDeletePropertyKey):

  • API/JSObjectRef.h:
  • API/JSRemoteInspector.h:
  • API/JSTypedArray.h:
  • API/JSValue.h:
  • API/JSValue.mm:

(+[JSValue valueWithNewSymbolFromDescription:inContext:]):
(performPropertyOperation):
(-[JSValue valueForProperty:valueForProperty:]):
(-[JSValue setValue:forProperty:setValue:forProperty:]):
(-[JSValue deleteProperty:deleteProperty:]):
(-[JSValue hasProperty:hasProperty:]):
(-[JSValue defineProperty:descriptor:defineProperty:descriptor:]):
(-[JSValue isSymbol]):
(-[JSValue objectForKeyedSubscript:]):
(-[JSValue setObject:forKeyedSubscript:]):
(-[JSValue valueForProperty:]): Deleted.
(-[JSValue setValue:forProperty:]): Deleted.
(-[JSValue deleteProperty:]): Deleted.
(-[JSValue hasProperty:]): Deleted.
(-[JSValue defineProperty:descriptor:]): Deleted.

  • API/JSValueRef.cpp:

(JSValueGetType):
(JSValueIsSymbol):
(JSValueMakeSymbol):

  • API/JSValueRef.h:
  • API/WebKitAvailability.h:
  • API/tests/CurrentThisInsideBlockGetterTest.mm:
  • API/tests/CustomGlobalObjectClassTest.c:
  • API/tests/DateTests.mm:
  • API/tests/JSExportTests.mm:
  • API/tests/JSNode.c:
  • API/tests/JSNodeList.c:
  • API/tests/Node.c:
  • API/tests/NodeList.c:
  • API/tests/minidom.c:
  • API/tests/testapi.c:

(main):

  • API/tests/testapi.cpp: Added.

(APIString::APIString):
(APIString::~APIString):
(APIString::operator JSStringRef):
(APIContext::APIContext):
(APIContext::~APIContext):
(APIContext::operator JSGlobalContextRef):
(APIVector::APIVector):
(APIVector::~APIVector):
(APIVector::append):
(testCAPIViaCpp):
(TestAPI::evaluateScript):
(TestAPI::callFunction):
(TestAPI::functionReturnsTrue):
(TestAPI::check):
(TestAPI::checkJSAndAPIMatch):
(TestAPI::interestingObjects):
(TestAPI::interestingKeys):
(TestAPI::run):

  • API/tests/testapi.mm:

(testObjectiveCAPIMain):

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • config.h:
  • postprocess-headers.sh:
  • shell/CMakeLists.txt:
  • testmem/testmem.mm:
6:29 PM Changeset in webkit [234226] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Allow ActiveDOMObject's canSuspend / suspend / resume overrides to destroy ActiveDOMObjects
https://bugs.webkit.org/show_bug.cgi?id=188025

Reviewed by Alex Christensen.

Apply the same logic as in ScriptExecutionContext::stopActiveDOMObjects() to support destruction of
ActiveDOMObjects while we're calling ActiveDOMObject's canSuspend / suspend / resume overrides.

We copy m_activeDOMObjects into a Vector and iterate over the copy instead of m_activeDOMObjects.
Since ActiveDOMObject is not RefCounted or CanMakeWeakPtr, we verify that the raw pointer is still
valid by checking if m_activeDOMObjects still contains it, as we iterate. This is safe as the
ActiveDOMObject destructor removes the object from ScriptExecutionContext::m_activeDOMObjects.
New ActiveDOMObjects with the same pointer value cannot be created while we iterate as we already
prevent the construction of new ActiveDOMObjects while we iterate via RELEASE_ASSERT().

  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::canSuspendActiveDOMObjectsForDocumentSuspension):
(WebCore::ScriptExecutionContext::forEachActiveDOMObject const):
(WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
(WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
(WebCore::ScriptExecutionContext::stopActiveDOMObjects):
(WebCore::ScriptExecutionContext::willDestroyActiveDOMObject):

  • dom/ScriptExecutionContext.h:
6:08 PM Changeset in webkit [234225] by bshafiei@apple.com
  • 1 copy in tags/Safari-606.1.31

Tag Safari-606.1.31.

5:34 PM Changeset in webkit [234224] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Systems with no NSScreens hitting assertion in rendererIDForDisplay when creating WebGL context
https://bugs.webkit.org/show_bug.cgi?id=188023
<rdar://problem/42476622>

Patch by Justin Fan <Justin Fan> on 2018-07-25
Reviewed by Simon Fraser.

On systems with no NSScreens, PlatformScreenMac's screenData map is not populated; rendererIDForDisplay
will thus hit an assertion rather than returning 0. Removing the assertion for now.

Covered by existing tests.

  • platform/mac/PlatformScreenMac.mm:

(WebCore::rendererIDForDisplay):

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

[macOS] Update sandboxes for revised OpenCL calls and streaming media
https://bugs.webkit.org/show_bug.cgi?id=188013
<rdar://problem/42594262>

Reviewed by Eric Carlson.

Testing logs from recent Mojave builds shows that OpenCL is checking more CPU-specific values as part of WebKit
painting operations. We need to allow these checks in the sandbox to support these more optimized drawing operations.

I also corrected some sandbox violations I found while investigating streaming media issues.

  • WebProcess/com.apple.WebProcess.sb.in:
5:29 PM Changeset in webkit [234222] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Build fix after r234215. Unreviewed.

  • rendering/RenderTheme.cpp:
5:27 PM Changeset in webkit [234221] by bshafiei@apple.com
  • 7 edits in branches/safari-606-branch/Source

Versioning.

5:22 PM Changeset in webkit [234220] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews-build] Add build steps DownloadBuiltProduct and ExtractBuiltProduct
https://bugs.webkit.org/show_bug.cgi?id=188031

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/steps.py:

(DownloadBuiltProduct): Added build step DownloadBuiltProduct.
(ExtractBuiltProduct): Added build step ExtractBuiltProduct.

  • BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
5:19 PM Changeset in webkit [234219] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Dark Mode: Breakpoint editor in JS debugger has inconsistent background
https://bugs.webkit.org/show_bug.cgi?id=188026

Reviewed by Matt Baker.

  • UserInterface/Views/DarkMode.css:

(@media (prefers-dark-interface)):
(.edit-breakpoint-popover-condition):
(.breakpoint-action-eval-editor):

4:15 PM Changeset in webkit [234218] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews-build] Add build step UploadBuiltProduct
https://bugs.webkit.org/show_bug.cgi?id=188016

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/steps.py:

(UploadBuiltProduct): Added build step UploadBuiltProduct.

  • BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-test.
4:03 PM Changeset in webkit [234217] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews-build] Add build step ArchiveBuiltProduct
https://bugs.webkit.org/show_bug.cgi?id=188014

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/steps.py:

(ArchiveBuiltProduct): Added build step ArchiveBuiltProduct.

  • BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
3:51 PM Changeset in webkit [234216] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Mask AVBackgroundView to the corner radius.
https://bugs.webkit.org/show_bug.cgi?id=187976
rdar://problem/41810866

Patch by Jeremy Jones <jeremyj@apple.com> on 2018-07-25
Reviewed by Jon Lee.

This changes sets the appropriate mask to the layer so the corners look correct.

  • UIProcess/ios/fullscreen/WKFullscreenStackView.mm:

(-[WKFullscreenStackView init]):

3:44 PM Changeset in webkit [234215] by Alan Bujtas
  • 30 edits
    2 adds
    15 deletes in trunk

REGRESSION(r227577) Text on TV & Movies page doesn't wrap properly in iTunes
https://bugs.webkit.org/show_bug.cgi?id=188018
<rdar://problem/42517520>

Reviewed by Dean Jackson.

Source/WebCore:

Manual rollout of r227577.

Test: fast/overflow/line-clamp-with-text-shadow.html

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

(WebCore::ComputedStyleExtractor::valueForPropertyinStyle):

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

(WebCore::StyleBuilderCustom::applyValueWebkitLinesClamp): Deleted.

  • css/parser/CSSParserContext.cpp:

(WebCore::CSSParserContext::CSSParserContext):

  • css/parser/CSSParserContext.h:

(WebCore::CSSParserContextHash::hash):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::consumeLinesClamp): Deleted.

  • page/Settings.yaml:
  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::willCreateColumns const):
(WebCore::getHeightForLineCount):
(WebCore::RenderBlockFlow::heightForLineCount):
(WebCore::RenderBlockFlow::layoutExcludedChildren):
(WebCore::RenderBlockFlow::logicalHeightForLineCount): Deleted.
(WebCore::RenderBlockFlow::logicalHeightExcludingLineCount): Deleted.

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

(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):

  • rendering/RenderFragmentContainer.cpp:

(WebCore::RenderFragmentContainer::pageLogicalHeightForOffset const): Deleted.

  • rendering/RenderFragmentContainer.h:
  • rendering/RenderFragmentedFlow.cpp:

(WebCore::RenderFragmentedFlow::validateFragments):
(WebCore::RenderFragmentedFlow::pageLogicalHeightForOffset const):
(WebCore::RenderFragmentedFlow::pageRemainingLogicalHeightForOffset const):

  • rendering/RenderFragmentedFlow.h:
  • rendering/RenderLinesClampFlow.cpp: Removed.
  • rendering/RenderLinesClampFlow.h: Removed.
  • rendering/RenderLinesClampSet.cpp: Removed.
  • rendering/RenderLinesClampSet.h: Removed.
  • rendering/RenderMultiColumnFlow.cpp:

(WebCore::RenderMultiColumnFlow::isColumnSpanningDescendant const): Deleted.
(WebCore::RenderMultiColumnFlow::createMultiColumnSet): Deleted.

  • rendering/RenderMultiColumnFlow.h:

(WebCore::RenderMultiColumnFlow::multiColumnBlockFlow const): Deleted.
(WebCore::RenderMultiColumnFlow::hasColumnSpanner const): Deleted.
(WebCore::RenderMultiColumnFlow::findColumnSpannerPlaceholder const): Deleted.
(WebCore::RenderMultiColumnFlow::columnCount const): Deleted.
(WebCore::RenderMultiColumnFlow::columnWidth const): Deleted.
(WebCore::RenderMultiColumnFlow::columnHeightAvailable const): Deleted.
(WebCore::RenderMultiColumnFlow::setColumnHeightAvailable): Deleted.
(WebCore::RenderMultiColumnFlow::inBalancingPass const): Deleted.
(WebCore::RenderMultiColumnFlow::setInBalancingPass): Deleted.
(WebCore::RenderMultiColumnFlow::needsHeightsRecalculation const): Deleted.
(WebCore::RenderMultiColumnFlow::setNeedsHeightsRecalculation): Deleted.
(WebCore::RenderMultiColumnFlow::shouldRelayoutForPagination const): Deleted.
(WebCore::RenderMultiColumnFlow::setColumnCountAndWidth): Deleted.
(WebCore::RenderMultiColumnFlow::progressionIsInline const): Deleted.
(WebCore::RenderMultiColumnFlow::setProgressionIsInline): Deleted.
(WebCore::RenderMultiColumnFlow::progressionIsReversed const): Deleted.
(WebCore::RenderMultiColumnFlow::setProgressionIsReversed): Deleted.
(WebCore::RenderMultiColumnFlow::spannerMap): Deleted.

  • rendering/RenderMultiColumnSet.cpp:

(WebCore::RenderMultiColumnSet::collectLayerFragments):
(WebCore::RenderMultiColumnSet::columnTranslationForOffset const):

  • rendering/RenderMultiColumnSet.h:

(WebCore::RenderMultiColumnSet::multiColumnBlockFlow const): Deleted.
(WebCore::RenderMultiColumnSet::multiColumnFlow const): Deleted.
(WebCore::RenderMultiColumnSet::logicalTopInFragmentedFlow const): Deleted.
(WebCore::RenderMultiColumnSet::logicalBottomInFragmentedFlow const): Deleted.
(WebCore::RenderMultiColumnSet::logicalHeightInFragmentedFlow const): Deleted.
(WebCore::RenderMultiColumnSet::computedColumnCount const): Deleted.
(WebCore::RenderMultiColumnSet::computedColumnWidth const): Deleted.
(WebCore::RenderMultiColumnSet::computedColumnHeight const): Deleted.
(WebCore::RenderMultiColumnSet::columnHeightComputed const): Deleted.
(WebCore::RenderMultiColumnSet::setComputedColumnWidthAndCount): Deleted.
(WebCore::RenderMultiColumnSet::updateMinimumColumnHeight): Deleted.
(WebCore::RenderMultiColumnSet::minimumColumnHeight const): Deleted.
(WebCore::RenderMultiColumnSet::forcedBreaksCount const): Deleted.
(WebCore::RenderMultiColumnSet::hasBeenFlowed const): Deleted.
(WebCore::RenderMultiColumnSet::skipLayerFragmentCollectionForColumn const): Deleted.
(WebCore::RenderMultiColumnSet::customBlockProgressionAdjustmentForColumn const): Deleted.
(WebCore::RenderMultiColumnSet::ContentRun::ContentRun): Deleted.
(WebCore::RenderMultiColumnSet::ContentRun::assumedImplicitBreaks const): Deleted.
(WebCore::RenderMultiColumnSet::ContentRun::assumeAnotherImplicitBreak): Deleted.
(WebCore::RenderMultiColumnSet::ContentRun::breakOffset const): Deleted.
(WebCore::RenderMultiColumnSet::ContentRun::columnLogicalHeight const): Deleted.

  • rendering/RenderObject.h:

(WebCore::RenderObject::isRenderLinesClampFlow const): Deleted.
(WebCore::RenderObject::isRenderLinesClampSet const): Deleted.

  • rendering/style/LineClampValue.h:

(WebCore::LinesClampValue::LinesClampValue): Deleted.
(WebCore::LinesClampValue::isNone const): Deleted.
(WebCore::LinesClampValue::operator== const): Deleted.
(WebCore::LinesClampValue::operator!= const): Deleted.
(WebCore::LinesClampValue::start const): Deleted.
(WebCore::LinesClampValue::end const): Deleted.
(WebCore::LinesClampValue::center const): Deleted.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::lineClamp const):
(WebCore::RenderStyle::setLineClamp):
(WebCore::RenderStyle::initialLineClamp):
(WebCore::RenderStyle::hasInlineColumnAxis const):
(WebCore::RenderStyle::linesClamp const): Deleted.
(WebCore::RenderStyle::hasLinesClamp const): Deleted.
(WebCore::RenderStyle::setLinesClamp): Deleted.
(WebCore::RenderStyle::initialLinesClamp): Deleted.

  • rendering/style/StyleRareNonInheritedData.cpp:

(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator== const):

  • rendering/style/StyleRareNonInheritedData.h:
  • rendering/updating/RenderTreeBuilderMultiColumn.cpp:

(WebCore::isValidColumnSpanner):
(WebCore::RenderTreeBuilder::MultiColumn::createFragmentedFlow):
(WebCore::RenderTreeBuilder::MultiColumn::processPossibleSpannerDescendant):

Source/WebKit:

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_credentialsMessenger):

LayoutTests:

  • fast/block/lines-clamp-advanced-expected.html: Removed.
  • fast/block/lines-clamp-advanced-rl-expected.html: Removed.
  • fast/block/lines-clamp-advanced-rl.html: Removed.
  • fast/block/lines-clamp-advanced.html: Removed.
  • fast/block/lines-clamp-basic-expected.html: Removed.
  • fast/block/lines-clamp-basic-rl-expected.html: Removed.
  • fast/block/lines-clamp-basic-rl.html: Removed.
  • fast/block/lines-clamp-basic.html: Removed.
  • fast/css/lines-clamp-parsing-expected.txt: Removed.
  • fast/css/lines-clamp-parsing.html: Removed.
  • fast/overflow/line-clamp-with-text-shadow-expected.html: Added.
  • fast/overflow/line-clamp-with-text-shadow.html: Added.
  • platform/ios-simulator-wk2/fast/overflow/line-clamp-expected.txt: Removed.
2:38 PM Changeset in webkit [234214] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Fix the build.

  • UIProcess/mac/ServicesController.mm:

(WebKit::hasCompatibleServicesForItems):
I can't even.

1:56 PM Changeset in webkit [234213] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Crashing on some builds that don't have async NSSharingService API
https://bugs.webkit.org/show_bug.cgi?id=188015
<rdar://problem/42593935>

Reviewed by Eric Carlson.

  • UIProcess/mac/ServicesController.mm:

(WebKit::hasCompatibleServicesForItems):

1:46 PM Changeset in webkit [234212] by david_fenton@apple.com
  • 2 edits in trunk/LayoutTests

Layout Test media/audio-concurrent-supported.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=188017

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
1:33 PM Changeset in webkit [234211] by Chris Dumez
  • 13 edits
    1 add in trunk

navigator.userAgent may return outdated value after webView.customUserAgent is set
https://bugs.webkit.org/show_bug.cgi?id=188009
<rdar://problem/42566456>

Reviewed by Alex Christensen.

Source/WebCore:

Invalidate the navigator.userAgent cache whenever the user agent gets changed to avoid exposing
outdated values to JavaScript.

  • page/Navigator.cpp:

(WebCore::Navigator::userAgentChanged):

  • page/Navigator.h:
  • page/NavigatorID.idl:
  • page/Page.cpp:

(WebCore::Page::userAgentChanged):

  • page/Page.h:

Source/WebKit:

Let the page know when the user agent changes.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::setUserAgent):

Source/WebKitLegacy/mac:

Let the page know when the user agent changes.

  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):
(-[WebView setApplicationNameForUserAgent:]):
(-[WebView _invalidateUserAgentCache]):
(-[WebView setCustomUserAgent:]):

  • WebView/WebViewInternal.h:

Tools:

Add API test coverage.

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

(TEST):

11:32 AM Changeset in webkit [234210] by achristensen@apple.com
  • 7 edits in trunk/Source/WebKit

Use CompletionHandler for policy decisions
https://bugs.webkit.org/show_bug.cgi?id=187975

Reviewed by Chris Dumez.

  • UIProcess/WebFramePolicyListenerProxy.cpp:

(WebKit::WebFramePolicyListenerProxy::WebFramePolicyListenerProxy):
(WebKit::WebFramePolicyListenerProxy::use):
(WebKit::WebFramePolicyListenerProxy::download):
(WebKit::WebFramePolicyListenerProxy::ignore):
(WebKit::WebFramePolicyListenerProxy::receivedPolicyDecision): Deleted.
(WebKit::WebFramePolicyListenerProxy::setNavigation): Deleted.

  • UIProcess/WebFramePolicyListenerProxy.h:

(WebKit::WebFramePolicyListenerProxy::create):
(WebKit::WebFramePolicyListenerProxy::policyListenerType const): Deleted.
(WebKit::WebFramePolicyListenerProxy::listenerID const): Deleted.
(): Deleted.

  • UIProcess/WebFrameProxy.cpp:

(WebKit::WebFrameProxy::setUpPolicyListenerProxy):
(WebKit::WebFrameProxy::receivedPolicyDecision): Deleted.
(WebKit::WebFrameProxy::activePolicyListenerProxy): Deleted.
(WebKit::WebFrameProxy::changeWebsiteDataStore): Deleted.

  • UIProcess/WebFrameProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):

  • UIProcess/WebPageProxy.h:
11:04 AM Changeset in webkit [234209] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebKit

Unreviewed, rolling out r234196.
https://bugs.webkit.org/show_bug.cgi?id=188011

broke API tests (Requested by alexchristensen on #webkit).

Reverted changeset:

"Use CompletionHandler for policy decisions"
https://bugs.webkit.org/show_bug.cgi?id=187975
https://trac.webkit.org/changeset/234196

11:04 AM Changeset in webkit [234208] by Kocsen Chung
  • 1 copy in tags/Safari-607.1.1

Tag Safari-607.1.1.

10:54 AM Changeset in webkit [234207] by commit-queue@webkit.org
  • 4 edits in trunk

[INTL] Call Typed Array elements toLocaleString with locale and options
https://bugs.webkit.org/show_bug.cgi?id=185796

Patch by Andy VanWagoner <andy@vanwagoner.family> on 2018-07-25
Reviewed by Keith Miller.

JSTests:

Remove now passing TypedArray toLocaleString expectation.

  • test262/expectations.yaml:

Source/JavaScriptCore:

Improve ECMA 402 compliance of typed array toLocaleString, passing along
the locale and options to element toLocaleString calls.

  • builtins/TypedArrayPrototype.js:

(toLocaleString):

10:36 AM Changeset in webkit [234206] by Michael Catanzaro
  • 1 edit in releases/WebKitGTK/webkit-2.20/LayoutTests/platform/gtk/TestExpectations

Unreviewed, fix merge conflict from previous patch

I failed to address a merge conflict in the TestExpectations.

10:33 AM Changeset in webkit [234205] by Michael Catanzaro
  • 7 edits in releases/WebKitGTK/webkit-2.20

Merge r233080 - REGRESSION(r230950): [GTK] WebKit::CoordinatedBackingStoreTile::setBackBuffer(): WebKitWebProcess killed by SIGSEGV (ASSERTION FAILED: it != m_tiles.end())
https://bugs.webkit.org/show_bug.cgi?id=186206

Source/WebCore:

Unreviewed manual rollout of r230950

  • platform/graphics/texmap/TextureMapperLayer.h:
  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::shouldHaveBackingStore const):

Source/WebKit:

Unreviewed manual rollout of r230950

  • Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:

(WebKit::layerShouldHaveBackingStore):

LayoutTests:

Unreviewed, remove crash expectations for crashes introduced by r230950.

  • platform/gtk/TestExpectations:
10:33 AM Changeset in webkit [234204] by Michael Catanzaro
  • 8 edits in releases/WebKitGTK/webkit-2.20/Source/JavaScriptCore

Merge r232883 - Unreviewed, rolling out r232816.

Suggested by Caitlin:
"this patch clearly does get some things wrong, and it's not
easy to find what those things are"

Reverted changeset:

"[LLInt] use loadp consistently for
get_from_scope/put_to_scope"
https://bugs.webkit.org/show_bug.cgi?id=132333
https://trac.webkit.org/changeset/232816

10:10 AM Changeset in webkit [234203] by david_fenton@apple.com
  • 8 edits
    2 deletes in trunk

Unreviewed, rolling out r234187.

the layout test added with this change is flaky on the bots

Reverted changeset:

"Animation stops with object-fit:contain on an animated 2d
canvas"
https://bugs.webkit.org/show_bug.cgi?id=187840
https://trac.webkit.org/changeset/234187

10:02 AM WebKitGTK/2.20.x edited by Michael Catanzaro
Managed the rollouts (diff)
10:02 AM Changeset in webkit [234202] by commit-queue@webkit.org
  • 11 edits in trunk

[INTL] Intl constructor lengths should be configurable
https://bugs.webkit.org/show_bug.cgi?id=187960

Patch by Andy VanWagoner <andy@vanwagoner.family> on 2018-07-25
Reviewed by Saam Barati.

JSTests:

Removed fixed length expectations, and updated Intl.Locale expectations
that error differently since r234127.

  • test262/expectations.yaml:

Source/JavaScriptCore:

Removed DontDelete from Intl constructor lengths.
Fixed DateTimeFormat formatToParts length.

  • runtime/IntlCollatorConstructor.cpp:

(JSC::IntlCollatorConstructor::finishCreation):

  • runtime/IntlDateTimeFormatConstructor.cpp:

(JSC::IntlDateTimeFormatConstructor::finishCreation):

  • runtime/IntlDateTimeFormatPrototype.cpp:

(JSC::IntlDateTimeFormatPrototype::finishCreation):

  • runtime/IntlNumberFormatConstructor.cpp:

(JSC::IntlNumberFormatConstructor::finishCreation):

  • runtime/IntlPluralRulesConstructor.cpp:

(JSC::IntlPluralRulesConstructor::finishCreation):

LayoutTests:

Expect DateTimeFormat formatToParts length to be 1.

  • js/intl-datetimeformat-expected.txt:
  • js/script-tests/intl-datetimeformat.js:
10:00 AM Changeset in webkit [234201] by bshafiei@apple.com
  • 2 edits in branches/safari-606-branch/Source/bmalloc

Cherry-pick r234185. rdar://problem/42586981

Revert back to using phys_footprint to calculate isUnderMemoryPressure()
https://bugs.webkit.org/show_bug.cgi?id=187919
<rdar://problem/42552888>

Reviewed by Simon Fraser.

Currently on iOS, bmalloc will run the scavenger more frequently when it detects
that the process is under memory pressure. However, it only uses bmalloc's
own footprint as a percentage of the HW available memory to determine if
the process is under memory pressure. This is a change I recently made
in an effort to run the scavenger less when bmalloc wasn't contributing
to the dirty footprint in the process. However, this fails to run the
scavenger eagerly when the process in question has a heap split
between a lot of dirty bmalloc memory as well as a lot of dirty memory
from elsewhere. We also have evidence that we may have increased jetsams
in the Web Content process. Since my original change was not a measurable
speedup, this patch reverts isUnderMemoryPressure() to its previous
behavior of using phys_footprint to determine if 75% of the available
HW memory is being used.

  • bmalloc/AvailableMemory.cpp: (bmalloc::memoryStatus):

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

10:00 AM Changeset in webkit [234200] by bshafiei@apple.com
  • 25 edits
    2 deletes in branches/safari-606-branch

Cherry-pick r234177. rdar://problem/42586717

Unreviewed, rolling out r233496 and r233571.

Likely cause of <rdar://problem/42160890> and
<rdar://problem/42329658> as ActiveDOMObjects can now be
constructed / destroyed while we are iterating over them.

Reverted changesets:

"Nullptr crash accessing Document in
GenericEventQueue::dispatchOneEvent()"
https://bugs.webkit.org/show_bug.cgi?id=187284
https://trac.webkit.org/changeset/233496

"REGRESSION(r233496): macOS Sierra hits debug assertions in
TrackListBase::suspend"
https://bugs.webkit.org/show_bug.cgi?id=187378
https://trac.webkit.org/changeset/233571

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

9:59 AM Changeset in webkit [234199] by cturner@igalia.com
  • 2 edits in trunk/Tools

[Flatpak] Pass more environment variables to sandbox
https://bugs.webkit.org/show_bug.cgi?id=188002

Reviewed by Michael Catanzaro.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.run_in_sandbox):

9:43 AM Changeset in webkit [234198] by Michael Catanzaro
  • 2 edits in releases/WebKitGTK/webkit-2.20/Source/JavaScriptCore

[GTK][STABLE] Non-deterministic build failure (missing JavaScriptCore/JSContextRef.h)

9:12 AM Changeset in webkit [234197] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Turn assertion preventing removal of ActiveDOMObjects while we iterate over them into a RELEASE_ASSERT
https://bugs.webkit.org/show_bug.cgi?id=187978

Reviewed by Eric Carlson.

Turn assertion preventing removal of ActiveDOMObjects while we iterate over them into a RELEASE_ASSERT.
If code does this, this leads to hard to investigate crashes such as rdar://problem/42160890. With a
release assertion, we would find the culprits right away. The assertion guarding against addition of
ActiveDOMObjects while we iterate is already a RELEASE_ASSERT.

  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::canSuspendActiveDOMObjectsForDocumentSuspension):
(WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
(WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
(WebCore::ScriptExecutionContext::willDestroyActiveDOMObject):

  • dom/ScriptExecutionContext.h:
9:07 AM Changeset in webkit [234196] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebKit

Use CompletionHandler for policy decisions
https://bugs.webkit.org/show_bug.cgi?id=187975

Patch by Alex Christensen <achristensen@webkit.org> on 2018-07-25
Reviewed by Chris Dumez.

  • UIProcess/WebFramePolicyListenerProxy.cpp:

(WebKit::WebFramePolicyListenerProxy::WebFramePolicyListenerProxy):
(WebKit::WebFramePolicyListenerProxy::use):
(WebKit::WebFramePolicyListenerProxy::download):
(WebKit::WebFramePolicyListenerProxy::ignore):
(WebKit::WebFramePolicyListenerProxy::receivedPolicyDecision): Deleted.
(WebKit::WebFramePolicyListenerProxy::setNavigation): Deleted.

  • UIProcess/WebFramePolicyListenerProxy.h:

(WebKit::WebFramePolicyListenerProxy::create):
(WebKit::WebFramePolicyListenerProxy::policyListenerType const): Deleted.
(WebKit::WebFramePolicyListenerProxy::listenerID const): Deleted.
(): Deleted.

  • UIProcess/WebFrameProxy.cpp:

(WebKit::WebFrameProxy::setUpPolicyListenerProxy):
(WebKit::WebFrameProxy::receivedPolicyDecision): Deleted.
(WebKit::WebFrameProxy::activePolicyListenerProxy): Deleted.
(WebKit::WebFrameProxy::changeWebsiteDataStore): Deleted.

  • UIProcess/WebFrameProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):

  • UIProcess/WebPageProxy.h:
9:01 AM WebKitGTK/2.20.x edited by Michael Catanzaro
r229282 is overkill, I'll handle this manually (diff)
8:47 AM Changeset in webkit [234195] by Brent Fulgham
  • 4 edits
    2 moves in trunk/Source/WebKit

[macOS] PluginProcess needs TCC entitlements for media capture
https://bugs.webkit.org/show_bug.cgi?id=187981
<rdar://problem/42433634>

Reviewed by Chris Dumez.

The changes needed in Bug 185526 are also needed for the plugin process, or else the UIProcess
(e.g., Safari) is not able to pass the user's camera/microphone access permission to the plugin process.

This patch has the following changes:

  1. Rename "WebContent-OSX-restricted.entitlements" to "WebContent-or-Plugin-OSX-restricted.entitlements"
  2. Rename "process-webcontent-entitlements.sh" to "process-webcontent-or-plugin-entitlements.sh"
  3. Add a run-script step to the Plugin.64 and Plugin.32 builds to add the relevant entitlements.
  4. Silence some Flash plugin sandbox exceptions triggered after activating the camera.
  • Configurations/WebContent-or-Plugin-OSX-restricted.entitlements: Renamed from Source/WebKit/Configurations/WebContent-OSX-restricted.entitlements.
  • Resources/PlugInSandboxProfiles/com.macromedia.Flash Player ESR.plugin.sb: Address sandbox violations needed by camera use.
  • Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: Ditto.
  • Scripts/process-webcontent-or-plugin-entitlements.sh: Renamed from Source/WebKit/Scripts/process-webcontent-entitlements.sh.
  • WebKit.xcodeproj/project.pbxproj: Update for renaming, and perform entitlement steps on Plugin process.
8:43 AM Changeset in webkit [234194] by Ms2ger@igalia.com
  • 3 edits in trunk/LayoutTests

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

Unreviewed test gardening.

  • platform/gtk/TestExpectations:
    • webgl/2.0.0/conformance2/glsl3/: skip while we disable WebGL2 support
    • media/video-restricted-invisible-autoplay-allowed-when-visible.html: mark as flaky
    • compositing/backing/backing-store-attachment-fill-forwards-animation.html: mark as failing
    • http/tests/security/canvas-remote-read-remote-video-hls.html: mark as failing
  • platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt: Update for r233935.
6:26 AM Changeset in webkit [234193] by zandobersek@gmail.com
  • 9 edits in trunk/Tools

[WPE] Switch ViewBackend to using wpe_view_backend_exportable_fdo_egl APIs
https://bugs.webkit.org/show_bug.cgi?id=187997

Reviewed by Carlos Garcia Campos.

Instead of the raw wpe_view_backend_exportable_fdo API, switch to using
the EGL-oriented API that simply serves EGLImageKHR objects instead of
raw buffer resources. This allows us not to wrangle with creating and
managing lifetime of the same EGLImageKHR by ourselves.

ViewBackend now defines a wpe_view_backend_exportable_fdo_egl_client
struct and uses wpe_view_backend_exportable_fdo_egl_create() to create
the exportable object. This means that for each frame we're served an
EGLImageKHR object that is passed on to the displayBuffer()
implementation.

HeadlessViewBackend now just manages the pending and committed image
objects. Width and height values used during pixel data retrieval are
gathered from the ViewBackend's size that was specified when
constructed.

WindowViewBackend similarly only manages the committed image object,
not having to create an equivalent EGLImageKHR object from the raw
buffer resource anymore.

Unused EGL entrypoints in both HeadlessViewBackend and WindowViewBackend
classes are removed, and destructors for both classes are made virtual.

The WPEBackend-fdo version is bumped in order to have the EGL-specific
export API available.

  • flatpak/org.webkit.WPE.yaml:
  • wpe/backends/HeadlessViewBackend.cpp:

(WPEToolingBackends::HeadlessViewBackend::HeadlessViewBackend):
(WPEToolingBackends::HeadlessViewBackend::~HeadlessViewBackend):
(WPEToolingBackends::HeadlessViewBackend::createSnapshot):
(WPEToolingBackends::HeadlessViewBackend::performUpdate):
(WPEToolingBackends::HeadlessViewBackend::displayBuffer):

  • wpe/backends/HeadlessViewBackend.h:
  • wpe/backends/ViewBackend.cpp:

(WPEToolingBackends::ViewBackend::initialize):

  • wpe/backends/ViewBackend.h:
  • wpe/backends/WindowViewBackend.cpp:

(WPEToolingBackends::WindowViewBackend::WindowViewBackend):
(WPEToolingBackends::WindowViewBackend::~WindowViewBackend):
(WPEToolingBackends::WindowViewBackend::displayBuffer):

  • wpe/backends/WindowViewBackend.h:
  • wpe/jhbuild.modules:
12:11 AM Changeset in webkit [234192] by tpopela@redhat.com
  • 2 edits in trunk/Source/WTF

Correctly close the variable argument list
https://bugs.webkit.org/show_bug.cgi?id=186758

Reviewed by Michael Catanzaro.

The argcCopy is not ended when we early return. Also don't call
va_end() on args because it's closed in caller.

  • wtf/text/WTFString.cpp:

(WTF::createWithFormatAndArguments):

Note: See TracTimeline for information about the timeline view.