Timeline



Dec 14, 2018:

11:51 PM Changeset in webkit [239250] by ap@apple.com
  • 3 edits in trunk/Tools

Add a style checker rule for Xcode version macros use
https://bugs.webkit.org/show_bug.cgi?id=192703

Reviewed by Alex Christensen.

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

(check_os_version_checks):
(process_line):
(CppChecker):

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

(WebKitStyleTest.test_os_version_checks):

11:48 PM Changeset in webkit [239249] by Darin Adler
  • 2 edits in trunk/Source/WTF

Verify size is valid in USE_SYSTEM_MALLOC version of tryAllocateZeroedVirtualPages
https://bugs.webkit.org/show_bug.cgi?id=192738
rdar://problem/37502342

Reviewed by Mark Lam.

  • wtf/Gigacage.cpp:

(Gigacage::tryAllocateZeroedVirtualPages): Added a RELEASE_ASSERT just
like the one in tryLargeZeroedMemalignVirtual in bmalloc.

11:42 PM Changeset in webkit [239248] by Darin Adler
  • 3 edits in trunk/Source/JavaScriptCore

LiteralParser has a bunch of uses of String::format with untrusted data
https://bugs.webkit.org/show_bug.cgi?id=108883
rdar://problem/13666409

Reviewed by Mark Lam.

  • runtime/LiteralParser.cpp:

(JSC::LiteralParser<CharType>::Lexer::lex): Use makeString instead of String::format.
(JSC::LiteralParser<CharType>::Lexer::lexStringSlow): Ditto.
(JSC::LiteralParser<CharType>::parse): Ditto.

  • runtime/LiteralParser.h:

(JSC::LiteralParser::getErrorMessage): Use string concatenation instead of
String::format.

8:30 PM Changeset in webkit [239247] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Web Inspector: Avoid creating and evaluating in the InspectorOverlay page on iOS as it is unused
https://bugs.webkit.org/show_bug.cgi?id=192724
<rdar://problem/46745911>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2018-12-14
Reviewed by Devin Rousso.

iOS never installs the InspectorOverlay page as a page overlay.
It also uses its own node highlighting painting. Avoid any work
and resources associated with the overlay page for iOS.

  • inspector/InspectorOverlay.cpp:

(WebCore::InspectorOverlay::paint):
(WebCore::InspectorOverlay::update):
(WebCore::InspectorOverlay::overlayPage):
(WebCore::evaluateCommandInOverlay):

7:34 PM Changeset in webkit [239246] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION(r238599): Uncaught Exception: TypeError: null is not an object (evaluating 'treeElement.listItemElement.classList')
https://bugs.webkit.org/show_bug.cgi?id=192090
<rdar://problem/46318614>

Reviewed by Devin Rousso.

  • UserInterface/Views/TreeOutline.js:

(WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
Check that listItemElement is valid before accessing it to update class
names. The selection can change before the TreeElement has been attached.

7:05 PM Changeset in webkit [239245] by keith_miller@apple.com
  • 2 edits in trunk/Source/bmalloc

Gigacage runway should immediately follow the primitive cage
https://bugs.webkit.org/show_bug.cgi?id=192733

Reviewed by Saam Barati.

This patch makes sure that the Gigacage runway is always
immediately after the primitive cage. Since writing outside the
primitive gigacage is likely to be more dangerous than the JSValue
cage. The ordering of the cages is still random however.

  • bmalloc/Gigacage.cpp:

(Gigacage::ensureGigacage):

6:28 PM Changeset in webkit [239244] by mark.lam@apple.com
  • 9 edits
    1 add in trunk

CallFrame::convertToStackOverflowFrame() needs to keep the top CodeBlock alive.
https://bugs.webkit.org/show_bug.cgi?id=192717
<rdar://problem/46660677>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-192717.js: Added.

Source/JavaScriptCore:

When throwing a StackOverflowError, we convert the topCallFrame into a
StackOverflowFrame. Previously, we would nullify the codeBlock field in the frame
because a StackOverflowFrame is only a sentinel and doesn't really correspond to
any CodeBlocks. However, this is a problem because the topCallFrame may be the
only remaining place that references the CodeBlock that the stack overflow is
triggered in. The way we handle exceptions in JIT code is to return (from the
runtime operation function throwing the exception) to the JIT code to check for
the exception and if needed, do some clean up before jumping to the exception
handling thunk. As a result, we need to keep that JIT code alive, which means we
need to keep its CodeBlock alive. We only need to keep this CodeBlock alive until
we've unwound (in terms of exception handling) out of it.

We fix this issue by storing the CodeBlock to keep alive in the StackOverflowFrame
for the GC to scan while the frame is still on the stack.

We removed the call to convertToStackOverflowFrame() in
lookupExceptionHandlerFromCallerFrame() because it is redundant.
lookupExceptionHandlerFromCallerFrame() will only every be called after
a StackOverFlowError has been thrown. Hence, the top frame is already
guaranteed to be a StackOverflowFrame, and there should always be a
StackOverFlowError exception pending. We added assertions for these
instead.

  • interpreter/CallFrame.cpp:

(JSC::CallFrame::convertToStackOverflowFrame):

  • interpreter/CallFrame.h:
  • jit/JITOperations.cpp:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/CommonSlowPaths.h:

(JSC::CommonSlowPaths::codeBlockFromCallFrameCallee):
(JSC::CommonSlowPaths::arityCheckFor):

  • runtime/VM.h:

(JSC::VM::exceptionForInspection const):

5:07 PM Changeset in webkit [239243] by youenn@apple.com
  • 8 edits
    2 adds in trunk

MediaRecorderPrivateAVFImpl should have a Ref<MediaRecorderPrivateWriter> as member
https://bugs.webkit.org/show_bug.cgi?id=192720

Reviewed by Eric Carlson.

Source/WebCore:

Make sure that MediaRecorderPrivateAVFImpl takes a Ref<MediaRecorderPrivateWriter> as member,
as the latter is a ref counted object.
Made some refactoring to return early in case of error.

Also made sure that in the case of a MediaRecorder stopped by a track removal in the recorded stream
the MediaRecorder will stop listening for its tracks.
Otherwise, the tracks will continue calling the MediaRecorder even after it is dead.

Test: http/wpt/mediarecorder/MediaRecorder-onremovetrack.html

  • Modules/mediarecorder/MediaRecorder.cpp:

(WebCore::MediaRecorder::didAddOrRemoveTrack):
(WebCore::MediaRecorder::setNewRecordingState): Deleted.

  • Modules/mediarecorder/MediaRecorder.h:
  • platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp:

(WebCore::MediaRecorderPrivateAVFImpl::create):
(WebCore::MediaRecorderPrivateAVFImpl::MediaRecorderPrivateAVFImpl):
(WebCore::MediaRecorderPrivateAVFImpl::sampleBufferUpdated):
(WebCore::MediaRecorderPrivateAVFImpl::audioSamplesAvailable):
(WebCore::MediaRecorderPrivateAVFImpl::stopRecording):
(WebCore::MediaRecorderPrivateAVFImpl::fetchData):

  • platform/mediarecorder/MediaRecorderPrivateAVFImpl.h:
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:

(WebCore::MediaRecorderPrivateWriter::create):
(WebCore::MediaRecorderPrivateWriter::MediaRecorderPrivateWriter):
(WebCore::MediaRecorderPrivateWriter::appendAudioSampleBuffer):
(WebCore::MediaRecorderPrivateWriter::setupWriter): Deleted.

LayoutTests:

  • http/wpt/mediarecorder/MediaRecorder-onremovetrack-expected.txt: Added.
  • http/wpt/mediarecorder/MediaRecorder-onremovetrack.html: Added.
4:55 PM Changeset in webkit [239242] by Alan Coon
  • 9 edits
    1 copy
    2 adds in branches/safari-606-branch

Apply patch. rdar://problem/46603448

4:30 PM Changeset in webkit [239241] by Ryan Haddad
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix the build with recent SDKs.

  • UIProcess/ios/WKDrawingView.mm:

(-[WKDrawingView initWithEmbeddedViewID:webPageProxy:]):

4:06 PM Changeset in webkit [239240] by youenn@apple.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

kVTVideoEncoderSpecification_Usage should not be set if VCP is not enabled
https://bugs.webkit.org/show_bug.cgi?id=192716

Reviewed by Eric Carlson.

https://trac.webkit.org/changeset/239220 sets the usage value for all platforms, but we should only enable it for VCP.

  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm:

(-[RTCSingleVideoEncoderH264 resetCompressionSessionWithPixelFormat:]):

4:04 PM Changeset in webkit [239239] by Kocsen Chung
  • 1 edit in branches/safari-606-branch/Source/WebCore/Modules/mediastream/RTCPeerConnection.h

Apply patch. rdar://problem/46085281

3:52 PM Changeset in webkit [239238] by youenn@apple.com
  • 9 edits in trunk

getSenders/getReceivers() should not return closed transceiver senders/receivers
https://bugs.webkit.org/show_bug.cgi?id=192706

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/webrtc/RTCPeerConnection-setDescription-transceiver.html:
  • web-platform-tests/webrtc/RTCRtpTransceiver.https.html:

Source/WebCore:

Updated as per https://github.com/w3c/webrtc-pc/commit/85284b76baebf9e149d194e692be16a21768a91a
This forces us to compute the sender/receiver list at getter call time.
Updated the internal call sites of senders to use the list of transceivers instead.

Covered by updated WPT tests.

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::addTrack):
(WebCore::RTCPeerConnection::getSenders const):
(WebCore::RTCPeerConnection::getReceivers const):

  • Modules/mediastream/RTCPeerConnection.h:
  • Modules/mediastream/RTCRtpTransceiver.cpp:

(WebCore::RTCRtpTransceiver::stopped const):
(WebCore::RtpTransceiverSet::append):
(WebCore::RtpTransceiverSet::senders const):
(WebCore::RtpTransceiverSet::receivers const):

  • Modules/mediastream/RTCRtpTransceiver.h:

(WebCore::RtpTransceiverSet::senders const): Deleted.
(WebCore::RtpTransceiverSet::receivers const): Deleted.

  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::findExistingSender):
(WebCore::LibWebRTCPeerConnectionBackend::addTrack):

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

clang-tidy: Fix unnecessary copy of objects for operator==() methods
<https://webkit.org/b/192712>
<rdar://problem/46739332>

Reviewed by Andy Estes.

Source/JavaScriptCore:

  • b3/air/AirAllocateRegistersByGraphColoring.cpp:

(JSC::B3::Air::(anonymous namespace)::AbstractColoringAllocator::InterferenceEdge::operator==):

  • Change argument from const to const reference to avoid a copy.

Source/WebCore:

  • contentextensions/HashableActionList.h:

(WebCore::ContentExtensions::HashableActionList::operator== const):
(WebCore::ContentExtensions::HashableActionList::operator!= const):

  • platform/network/FormData.h:

(WebCore::FormDataElement::EncodedFileData::operator== const):
(WebCore::FormDataElement::EncodedBlobData::operator== const):

  • Change arguments from const to const reference to avoid copies.
2:59 PM Changeset in webkit [239236] by jer.noble@apple.com
  • 4 edits in trunk/Source/WebCore

CRASH in CDMInstanceSessionFairPlayStreamingAVFObjC::closeSession(WTF::String const&, WTF::Function<void ()>&&)
https://bugs.webkit.org/show_bug.cgi?id=192713
<rdar://problem/46739706>

Reviewed by Eric Carlson.

A callback is being called twice, and the second time has a null Promise. Instead of these
callbacks being WTF::Function, make them WTF::CompletionHandlers, which self-nullify and
have ASSERTS() that they are called once-and-only-once.

  • platform/encryptedmedia/CDMInstanceSession.h:
  • platform/encryptedmedia/clearkey/CDMClearKey.cpp:

(WebCore::CDMInstanceSessionClearKey::closeSession):

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

(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::closeSession):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didProvideRequest):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didProvideRenewingRequest):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didFailToProvideRequest):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::requestDidSucceed):

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

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

Reviewed by Dewei Zhu.

Part 2.

Add some additional temporary logging info. Since the failure cannot be reproduced easily by human, we have to
rely on the test infrastructure to reporoduce it. Once the bug is determined and fixed, we should remove all
logging added in this patch.

  • UIProcess/WebAuthentication/Cocoa/HidService.mm:

(WebKit::HidService::deviceAdded):

  • UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp:

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

  • UIProcess/WebAuthentication/fido/CtapHidDriver.cpp:

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

2:33 PM Changeset in webkit [239234] by Kocsen Chung
  • 7 edits in tags/Safari-607.1.16.4/Source

Versioning.

2:30 PM Changeset in webkit [239233] by Kocsen Chung
  • 1 copy in tags/Safari-607.1.16.4

New tag.

1:50 PM Changeset in webkit [239232] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WTF

clang-tidy: Fix unnecessary copy of AtomicString each time one is logged
<https://webkit.org/b/192710>
<rdar://problem/46738962>

Reviewed by Eric Carlson.

  • wtf/Logger.h:

(WTF::LogArgument::toString): Make argument a const reference to
avoid the copy.

1:40 PM Changeset in webkit [239231] by commit-queue@webkit.org
  • 34 edits
    6 deletes in trunk

Unreviewed, rolling out r239153, r239154, and r239155.
https://bugs.webkit.org/show_bug.cgi?id=192715

Caused flaky GC-related crashes seen with layout tests
(Requested by ryanhaddad on #webkit).

Reverted changesets:

"[JSC] Optimize Object.keys by caching own keys results in
StructureRareData"
https://bugs.webkit.org/show_bug.cgi?id=190047
https://trac.webkit.org/changeset/239153

"Unreviewed, build fix after r239153"
https://bugs.webkit.org/show_bug.cgi?id=190047
https://trac.webkit.org/changeset/239154

"Unreviewed, build fix after r239153, part 2"
https://bugs.webkit.org/show_bug.cgi?id=190047
https://trac.webkit.org/changeset/239155

1:12 PM Changeset in webkit [239230] by ddkilzer@apple.com
  • 7 edits in trunk/Source/WebCore

clang-tidy: Fix unnecessary object copies in WebCore/platform/graphics/avfoundation/objc/
<https://webkit.org/b/192708>
<rdar://problem/46735907>

Reviewed by Jer Noble.

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

(WebCore::toSample):

  • Make argument a const reference.
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
  • Update method signatures for implementation changes.
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::setAsset):
(WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::loadedTimeRangesDidChange):

  • Make RetainPtr<> argument an rvalue reference and use WTFMove().

(WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange):

  • Make RetainPtr<> argument a const reference.
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVolume):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setMuted):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setPreservesPitch):

  • Change for loop keys to be const references.
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
  • Update method signatures for implementation changes.
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:

(WebCore::SourceBufferPrivateAVFObjC::fastSeekTimeForMediaTime):
(WebCore::SourceBufferPrivateAVFObjC::seekToTime):

  • Make Mediatime arguments a const reference.
1:05 PM Changeset in webkit [239229] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WebKit

[GTK] Unreviewed build fix.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: Add missing WebPolicyAction.h include.
12:59 PM Changeset in webkit [239228] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix assertion failure in API test after r239210.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::createDocumentLoader):

12:53 PM Changeset in webkit [239227] by keith_miller@apple.com
  • 6 edits
    1 add in trunk

Callers of JSString::getIndex should check for OOM exceptions
https://bugs.webkit.org/show_bug.cgi?id=192709

Reviewed by Mark Lam.

JSTests:

  • stress/StringObject-define-length-getter-rope-string-oom.js: Added.

Source/JavaScriptCore:

This patch also allows Strings to OOM when the StringObject wrapper
attempts to look up an own property on the string.

Remove isExtensibleImpl because it's only used in one place and call
isStructureExtensible instead.

  • runtime/JSObject.cpp:

(JSC::JSObject::isExtensible):

  • runtime/JSObject.h:

(JSC::JSObject::isExtensibleImpl): Deleted.

  • runtime/JSString.h:

(JSC::JSString::getStringPropertySlot):

  • runtime/StringObject.cpp:

(JSC::StringObject::defineOwnProperty):

12:41 PM Changeset in webkit [239226] by Matt Baker
  • 7 edits in trunk

Web Inspector: Cookies view should use model objects instead of raw payload data
https://bugs.webkit.org/show_bug.cgi?id=189533
<rdar://problem/44364183>

Reviewed by Joseph Pecoraro and Devin Rousso.

Source/WebInspectorUI:

  • UserInterface/Models/Cookie.js:

(WI.Cookie):
(WI.Cookie.fromPayload):
(WI.Cookie.parseSetCookieResponseHeader):
(WI.Cookie.prototype.get type):
(WI.Cookie.prototype.get name):
(WI.Cookie.prototype.get value):
(WI.Cookie.prototype.get header):
(WI.Cookie.prototype.get expires):
(WI.Cookie.prototype.get maxAge):
(WI.Cookie.prototype.get path):
(WI.Cookie.prototype.get domain):
(WI.Cookie.prototype.get secure):
(WI.Cookie.prototype.get httpOnly):
(WI.Cookie.prototype.get sameSite):
(WI.Cookie.prototype.get size):
(WI.Cookie.prototype.get url):
(WI.Cookie.prototype.expirationDate):
Cleanup Cookie object; add pubic getters for data, url property,
static fromPayload method, and calculate _size if missing.

  • UserInterface/Views/CookieStorageContentView.js:

(WI.CookieStorageContentView.prototype.tableDidRemoveRows):
(WI.CookieStorageContentView.prototype._reloadCookies):
Create Cookie objects from the payload instead of using raw payload data.

LayoutTests:

  • inspector/unit-tests/cookie-expected.txt:
  • inspector/unit-tests/cookie.html:
12:06 PM Changeset in webkit [239225] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WebKit

[SOUP] Unreviewed build fix after r239219

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse): Remove
handling of PolicyAction::Suspend, which is no longer available.

11:36 AM Changeset in webkit [239224] by Joseph Pecoraro
  • 2 edits in trunk/Source/WebKit

Unreviewed, apply post-landing review comments after r239221.

  • UIProcess/WebPageDebuggable.cpp:

(WebKit::WebPageDebuggable::url const):
Switch to WTF::blankURL() instead of using "about:blank" directly.

11:29 AM Changeset in webkit [239223] by Chris Dumez
  • 7 edits in trunk

[PSON] Process-swapping on a loadHTMLString causes duplicate decidePolicyForNavigationAction delegate calls
https://bugs.webkit.org/show_bug.cgi?id=192704

Reviewed by Geoffrey Garen.

Source/WebKit:

Process-swapping on a loadHTMLString causes duplicate decidePolicyForNavigationAction delegate calls. This
is because we were failing to pass the ShouldTreatAsContinuingLoad flag to the WebContent process when
doing a LoadData.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::loadData):
(WebKit::WebPageProxy::loadDataWithNavigation):
(WebKit::WebPageProxy::continueNavigationInNewProcess):

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::loadDataImpl):
(WebKit::WebPage::loadData):
(WebKit::WebPage::loadAlternateHTML):

  • WebProcess/WebPage/WebPage.h:

Tools:

Extend existing API test to reproduce the problem.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
11:05 AM Changeset in webkit [239222] by Simon Fraser
  • 4 edits
    4 adds in trunk

REGRESSION (r233268): contents of an animated element inside overflow:hidden disappear
https://bugs.webkit.org/show_bug.cgi?id=188655
rdar://problem/43382687

Reviewed by Antoine Quint.

Source/WebCore:

The logic that computes animation extent, used by backing store attachment code, failed
to account for the behavior where a keyframe animation with a missing 0% keyframe uses
the transform from the unanimated style. This resulted in the computed extent being wrong,
which caused us to remove the layer's backing store in some scenarios.

Fix both animation code paths to use the renderer style if the first keyframe doesn't
contain a transform.

Tests: compositing/backing/backing-store-attachment-empty-keyframe.html

legacy-animation-engine/compositing/backing/backing-store-attachment-empty-keyframe.html

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::computeExtentOfTransformAnimation const):

  • page/animation/KeyframeAnimation.cpp:

(WebCore::KeyframeAnimation::computeExtentOfTransformAnimation const):

LayoutTests:

  • compositing/backing/backing-store-attachment-empty-keyframe-expected.txt: Added.
  • compositing/backing/backing-store-attachment-empty-keyframe.html: Added.
  • legacy-animation-engine/compositing/backing/backing-store-attachment-empty-keyframe-expected.txt: Added.
  • legacy-animation-engine/compositing/backing/backing-store-attachment-empty-keyframe.html: Added.
10:26 AM Changeset in webkit [239221] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Web Inspector: Prefer "about:blank" instead of an empty string for WebPageDebuggable url
https://bugs.webkit.org/show_bug.cgi?id=192691
<rdar://problem/46719798>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2018-12-14
Reviewed by Darin Adler.

  • UIProcess/WebPageDebuggable.cpp:

(WebKit::WebPageDebuggable::url const):
Instead of an empty string, return "about:blank" in bail cases.
When inspecting the page that matches the contents.

10:24 AM Changeset in webkit [239220] by youenn@apple.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

Set kVTVideoEncoderSpecification_Usage both when creating the compression session and once created
https://bugs.webkit.org/show_bug.cgi?id=192700

Reviewed by Eric Carlson.

Previously we were setting the usage value once the compression session is created.
We now also set it at creation time.

  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm:

(-[RTCSingleVideoEncoderH264 resetCompressionSessionWithPixelFormat:]):

10:23 AM Changeset in webkit [239219] by Chris Dumez
  • 21 edits
    1 add in trunk/Source

[PSON] Stop exposing PolicyAction::Suspend to WebCore
https://bugs.webkit.org/show_bug.cgi?id=192701

Reviewed by Brady Eidson.

Source/WebCore:

Drop PolicyAction::Suspend enum value and stop dealing with it in WebCore.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::continueAfterContentPolicy):

  • loader/FrameLoaderTypes.h:
  • loader/PolicyChecker.cpp:

(WebCore::PolicyChecker::checkNavigationPolicy):
(WebCore::PolicyChecker::checkNewWindowPolicy):

Source/WebKit:

Introduce a new WebPolicyAction enum that is used at WebKit2 layer and augments
WebCore::PolicyAction with a "Suspend" value.

  • NetworkProcess/NetworkDataTaskBlob.cpp:

(WebKit::NetworkDataTaskBlob::dispatchDidReceiveResponse):

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(toNSURLSessionResponseDisposition):

  • Shared/WebPolicyAction.h: Added.
  • UIProcess/WebFramePolicyListenerProxy.cpp:

(WebKit::WebFramePolicyListenerProxy::didReceiveSafeBrowsingResults):
(WebKit::WebFramePolicyListenerProxy::use):
(WebKit::WebFramePolicyListenerProxy::download):
(WebKit::WebFramePolicyListenerProxy::ignore):

  • UIProcess/WebFramePolicyListenerProxy.h:
  • UIProcess/WebFrameProxy.cpp:

(WebKit::WebFrameProxy::setUpPolicyListenerProxy):

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

(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::toPolicyAction):
(WebKit::WebFrame::didReceivePolicyDecision):

  • WebProcess/WebPage/WebFrame.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didReceivePolicyDecision):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
10:14 AM Changeset in webkit [239218] by david_quesada@apple.com
  • 2 edits in trunk/Source/WebKit

Remove a global 'using namespace WebKit' in WebViewImpl.mm
https://bugs.webkit.org/show_bug.cgi?id=192690

Reviewed by Tim Horton.

  • UIProcess/Cocoa/WebViewImpl.mm:

(-[WKTextListTouchBarViewController initWithWebViewImpl:]):
(-[WKTextListTouchBarViewController _selectList:]):
(-[WKTextListTouchBarViewController setCurrentListType:]):
(-[WKTextTouchBarItemController initWithWebViewImpl:]):

9:58 AM Changeset in webkit [239217] by Alan Bujtas
  • 3 edits in trunk/LayoutTests

Unreviewed test gardening.

LFC does not support logical to physical coordinate conversion yet.

  • fast/block/block-only/float-avoider-with-margins-expected.txt:
  • fast/block/block-only/float-avoider-with-margins.html:
9:53 AM Changeset in webkit [239216] by Kocsen Chung
  • 2 edits in tags/Safari-607.1.16.3/Source/WebKit

Cherry-pick r239197. rdar://problem/46546071

[iOS] Web Inspector: Occasional UIProcess crashes under WebPageProxy::showInspectorIndication
https://bugs.webkit.org/show_bug.cgi?id=192689
<rdar://problem/46323610>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2018-12-13
Reviewed by Simon Fraser.

  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::close):
  • UIProcess/WebPageProxy.h: Don't wait until ~WebPageProxy to destroy the WebPageProxyDebuggable which broadcasts it as a remote inspector target. Terminate this as soon as the WebPageProxy closes and becomes invalid.

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

9:53 AM Changeset in webkit [239215] by Kocsen Chung
  • 2 edits in tags/Safari-607.1.16.3/Source/WebKit

Cherry-pick r239194. rdar://problem/46546071

Unreviewed build fix for tvOS.

  • Platform/cocoa/WKCrashReporter.mm:

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

9:53 AM Changeset in webkit [239214] by Kocsen Chung
  • 2 edits in tags/Safari-607.1.16.3/Source/WebKit

Cherry-pick r239115. rdar://problem/46546071

Unreviewed build with with recent macOS SDKs.

  • Platform/cocoa/WKCrashReporter.mm:

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

9:53 AM Changeset in webkit [239213] by Kocsen Chung
  • 2 edits in tags/Safari-607.1.16.3/Source/WebKit

Cherry-pick r239112. rdar://problem/46546071

Unreviewed attempt to fix build with older SDKs after r239110.

  • Platform/cocoa/WKCrashReporter.mm:

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

9:53 AM Changeset in webkit [239212] by Kocsen Chung
  • 2 edits in tags/Safari-607.1.16.3/Source/WebKit

Cherry-pick r239110. rdar://problem/46546071

Unreviewed, fix build with recent SDKs.

  • Platform/cocoa/WKCrashReporter.mm:

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

9:44 AM Changeset in webkit [239211] by youenn@apple.com
  • 3 edits
    2 adds in trunk

IDB should store RTCCertificate
https://bugs.webkit.org/show_bug.cgi?id=192599

Reviewed by Brady Eidson.

Source/WebCore:

In case there is no script execution context, do not create a JS DOM wrapper for RTCCertificate.
Instead, create an empty object so that the deserialization can still succeed.
This should only impact IDB deserialization in the Network Process which does not need the actual JS DOM wrapper.

Test: webrtc/certificates-indexeddb.html

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneDeserializer::readTerminal):

LayoutTests:

  • webrtc/certificates-indexeddb-expected.txt: Added.
  • webrtc/certificates-indexeddb.html: Added.
9:40 AM Changeset in webkit [239210] by Chris Dumez
  • 10 edits in trunk

[PSON] WebsitePolicies are lost on process-swap
https://bugs.webkit.org/show_bug.cgi?id=192694
<rdar://problem/46715748>

Reviewed by Brady Eidson.

Source/WebKit:

In case of process-swap on navigation, instead of sending the websitePolicies to the old
process, send them to the new process as we trigger the navigation. We tell the new process
that it is continuing a load and it will therefore not re-trigger a decidePolicyForNavigationAction.

  • Shared/LoadParameters.cpp:

(WebKit::LoadParameters::encode const):
(WebKit::LoadParameters::decode):

  • Shared/LoadParameters.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::reattachToWebProcessForReload):
(WebKit::WebPageProxy::reattachToWebProcessWithItem):
(WebKit::WebPageProxy::loadRequestWithNavigation):
(WebKit::WebPageProxy::loadDataWithNavigation):
(WebKit::WebPageProxy::goToBackForwardItem):
(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
(WebKit::WebPageProxy::continueNavigationInNewProcess):

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::loadRequest):
(WebKit::WebPage::loadDataImpl):
(WebKit::WebPage::loadData):
(WebKit::WebPage::loadAlternateHTML):
(WebKit::WebPage::goToBackForwardItem):
(WebKit::WebPage::createDocumentLoader):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Tools:

Extend existing API test to reproduce the issue.

  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
9:32 AM Changeset in webkit [239209] by Kocsen Chung
  • 7 edits in tags/Safari-607.1.16.3/Source

Versioning.

9:29 AM Changeset in webkit [239208] by Kocsen Chung
  • 1 copy in tags/Safari-607.1.16.3

New tag.

9:18 AM Changeset in webkit [239207] by Michael Catanzaro
  • 5 edits
    5 deletes in trunk/Tools

[GTK] Error writing data to TLS socket in some sites when using the jhbuild
https://bugs.webkit.org/show_bug.cgi?id=192678

Reviewed by Carlos Garcia Campos.

Update our ancient versions of libsoup and glib-networking.

  • gtk/install-dependencies:
  • gtk/jhbuild.modules:
  • gtk/patches/libsoup-auth-Fix-async-authentication-when-flag-SOUP_MESSAGE.patch: Removed.
  • gtk/patches/libsoup-auth-do-not-use-cached-credentials-in-lookup-method-.patch: Removed.
  • gtk/patches/libsoup-soup-message-io-Do-not-fail-when-there-s-no-empty-li.patch: Removed.
  • gtk/patches/libsoup-soup-socket-fix-critical-warning-when-the-peer-certi.patch: Removed.
  • wpe/install-dependencies:
  • wpe/jhbuild.modules:
  • wpe/patches/libsoup-soup-socket-fix-critical-warning-when-the-peer-certi.patch: Removed.
8:52 AM Changeset in webkit [239206] by Alan Bujtas
  • 19 edits in trunk/Source/WebCore

[LFC][BFC] Transition to logical margin types.
https://bugs.webkit.org/show_bug.cgi?id=192699

Reviewed by Antti Koivisto.

This is in preparation for moving over to logical types.
(This patch also transitions to singlular margin naming (verticalMargins -> VerticalMargin))

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const):
(WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):
(WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):

  • layout/FormattingContext.h:
  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::staticVerticalPositionForOutOfFlowPositioned):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::complicatedCases):
(WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedHorizontalMarginValue):
(WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedVerticalMarginValue):

  • layout/FormattingContextQuirks.cpp:

(WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):

  • layout/MarginTypes.h:

(WebCore::Layout::VerticalMargin::usedValues const):

  • layout/Verification.cpp:

(WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::computeEstimatedMarginBefore const):
(WebCore::Layout::BlockFormattingContext::computeEstimatedMarginBeforeForAncestors const):
(WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForFormattingRootIfNeeded const):
(WebCore::Layout::hasPrecomputedMarginBefore):
(WebCore::Layout::BlockFormattingContext::computeFloatingPosition const):
(WebCore::Layout::BlockFormattingContext::computePositionToAvoidFloats const):
(WebCore::Layout::BlockFormattingContext::computeVerticalPositionForFloatClear const):
(WebCore::Layout::BlockFormattingContext::computeWidthAndMargin const):
(WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):
(WebCore::Layout::BlockFormattingContext::computeEstimatedMarginTop const): Deleted.
(WebCore::Layout::BlockFormattingContext::computeEstimatedMarginTopForAncestors const): Deleted.
(WebCore::Layout::hasPrecomputedMarginTop): Deleted.

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

(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::staticPosition):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::instrinsicWidthConstraints):
(WebCore::Layout::BlockFormattingContext::Geometry::estimatedMarginBefore):
(WebCore::Layout::BlockFormattingContext::Geometry::estimatedMarginAfter):
(WebCore::Layout::BlockFormattingContext::Geometry::estimatedMarginTop): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::estimatedMarginBottom): Deleted.

  • layout/blockformatting/BlockFormattingContextQuirks.cpp:

(WebCore::Layout::hasMarginBeforeQuirkValue):
(WebCore::Layout::BlockFormattingContext::Quirks::stretchedHeight):
(WebCore::Layout::BlockFormattingContext::Quirks::shouldIgnoreMarginBefore):
(WebCore::Layout::hasMarginTopQuirkValue): Deleted.
(WebCore::Layout::BlockFormattingContext::Quirks::shouldIgnoreMarginTop): Deleted.

  • layout/blockformatting/BlockMarginCollapse.cpp:

(WebCore::Layout::isMarginBeforeCollapsedWithSibling):
(WebCore::Layout::isMarginAfterCollapsedWithSibling):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::isMarginBeforeCollapsedWithParent):
(WebCore::Layout::isMarginAfterCollapsedThrough):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::collapsedMarginBeforeFromFirstChild):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::nonCollapsedMarginBefore):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginBefore):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginAfter):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBefore):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfter):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::isMarginAfterCollapsedWithParent):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::isMarginBeforeCollapsedWithParentMarginAfter):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::collapsedMarginAfterFromLastChild):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::nonCollapsedMarginAfter):
(WebCore::Layout::isMarginTopCollapsedWithSibling): Deleted.
(WebCore::Layout::isMarginBottomCollapsedWithSibling): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::isMarginTopCollapsedWithParent): Deleted.
(WebCore::Layout::isMarginBottomCollapsedThrough): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::collapsedMarginTopFromFirstChild): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::nonCollapsedMarginTop): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginTop): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginBottom): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginTop): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBottom): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::isMarginBottomCollapsedWithParent): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::isMarginTopCollapsedWithParentMarginBottom): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::collapsedMarginBottomFromLastChild): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::nonCollapsedMarginBottom): Deleted.

  • layout/displaytree/DisplayBox.cpp:

(WebCore::Display::Box::Box):
(WebCore::Display::Box::marginBox const):
(WebCore::Display::Box::nonCollapsedMarginBox const):

  • layout/displaytree/DisplayBox.h:

(WebCore::Display::Box::rectWithMargin const):
(WebCore::Display::Box::estimatedMarginBefore const):
(WebCore::Display::Box::setEstimatedMarginBefore):
(WebCore::Display::Box::top const):
(WebCore::Display::Box::topLeft const):
(WebCore::Display::Box::setVerticalMargin):
(WebCore::Display::Box::marginBefore const):
(WebCore::Display::Box::marginStart const):
(WebCore::Display::Box::marginAfter const):
(WebCore::Display::Box::marginEnd const):
(WebCore::Display::Box::nonCollapsedMarginBefore const):
(WebCore::Display::Box::nonCollapsedMarginAfter const):
(WebCore::Display::Box::nonComputedMarginStart const):
(WebCore::Display::Box::nonComputedMarginEnd const):
(WebCore::Display::Box::estimatedMarginTop const): Deleted.
(WebCore::Display::Box::setEstimatedMarginTop): Deleted.
(WebCore::Display::Box::marginTop const): Deleted.
(WebCore::Display::Box::marginLeft const): Deleted.
(WebCore::Display::Box::marginBottom const): Deleted.
(WebCore::Display::Box::marginRight const): Deleted.
(WebCore::Display::Box::nonCollapsedMarginTop const): Deleted.
(WebCore::Display::Box::nonCollapsedMarginBottom const): Deleted.
(WebCore::Display::Box::nonComputedMarginLeft const): Deleted.
(WebCore::Display::Box::nonComputedMarginRight const): Deleted.

  • layout/floats/FloatAvoider.cpp:

(WebCore::Layout::FloatAvoider::setHorizontalConstraints):
(WebCore::Layout::FloatAvoider::initialHorizontalPosition const):
(WebCore::Layout::FloatAvoider::overflowsContainingBlock const):

  • layout/floats/FloatAvoider.h:

(WebCore::Layout::FloatAvoider::marginBefore const):
(WebCore::Layout::FloatAvoider::marginAfter const):
(WebCore::Layout::FloatAvoider::marginStart const):
(WebCore::Layout::FloatAvoider::marginEnd const):
(WebCore::Layout::FloatAvoider::marginBoxWidth const):
(WebCore::Layout::FloatAvoider::marginTop const): Deleted.
(WebCore::Layout::FloatAvoider::marginBottom const): Deleted.
(WebCore::Layout::FloatAvoider::marginLeft const): Deleted.
(WebCore::Layout::FloatAvoider::marginRight const): Deleted.

  • layout/floats/FloatBox.cpp:

(WebCore::Layout::FloatBox::rect const):
(WebCore::Layout::FloatBox::horizontalPositionCandidate):
(WebCore::Layout::FloatBox::verticalPositionCandidate):
(WebCore::Layout::FloatBox::initialVerticalPosition const):

  • layout/floats/FloatingContext.cpp:

(WebCore::Layout::FloatingContext::positionForFloat const):
(WebCore::Layout::FloatingContext::verticalPositionWithClearance const):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):

7:22 AM Changeset in webkit [239205] by Alan Bujtas
  • 14 edits
    1 add in trunk/Source/WebCore

[LFC][BFC] Introduce VerticalMargin and HorizontalMargin types.
https://bugs.webkit.org/show_bug.cgi?id=192692

Reviewed by Antti Koivisto.

This is in preparation for completing block margin collapsing.

  • WebCore.xcodeproj/project.pbxproj:
  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):

  • layout/FormattingContext.h:
  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::complicatedCases):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin):
(WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedHorizontalMarginValue):
(WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedVerticalMarginValue):

  • layout/LayoutState.cpp:

(WebCore::Layout::LayoutState::LayoutState):

  • layout/LayoutUnits.h:

(WebCore::Layout::HeightAndMargin::usedMarginValues const): Deleted.

  • layout/MarginTypes.h: Added.

(WebCore::Layout::VerticalMargin::nonCollapsedValues const):
(WebCore::Layout::VerticalMargin::collapsedValues const):
(WebCore::Layout::VerticalMargin::setCollapsedValues):
(WebCore::Layout::VerticalMargin::VerticalMargin):
(WebCore::Layout::VerticalMargin::usedValues const):

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

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

  • layout/blockformatting/BlockFormattingContextQuirks.cpp:

(WebCore::Layout::BlockFormattingContext::Quirks::stretchedHeight):

  • layout/displaytree/DisplayBox.cpp:

(WebCore::Display::Box::Box):

  • layout/displaytree/DisplayBox.h:

(WebCore::Display::Box::setHorizontalMargin):
(WebCore::Display::Box::setVerticalMargin):
(WebCore::Display::Box::setHorizontalNonComputedMargin):
(WebCore::Display::Box::verticalMargin const):
(WebCore::Display::Box::marginTop const):
(WebCore::Display::Box::marginLeft const):
(WebCore::Display::Box::marginBottom const):
(WebCore::Display::Box::marginRight const):
(WebCore::Display::Box::nonCollapsedMarginTop const):
(WebCore::Display::Box::nonCollapsedMarginBottom const):
(WebCore::Display::Box::setVerticalNonCollapsedMargin): Deleted.

  • layout/floats/FloatingContext.cpp:

(WebCore::Layout::FloatingContext::verticalPositionWithClearance const):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computeHeightAndMargin const):

6:38 AM Changeset in webkit [239204] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebKit

[GTK][WPE] Fix forwarding webkit socket to flatpak sandbox
https://bugs.webkit.org/show_bug.cgi?id=192622

Patch by Patrick Griffis <Patrick Griffis> on 2018-12-14
Reviewed by Michael Catanzaro.

This fixes running with the sandbox enabled in Flatpak.

  • UIProcess/Launcher/glib/FlatpakLauncher.cpp:

(WebKit::flatpakSpawn):

  • UIProcess/Launcher/glib/FlatpakLauncher.h:
  • UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:

(WebKit::ProcessLauncher::launchProcess):

4:57 AM Changeset in webkit [239203] by Carlos Garcia Campos
  • 14 edits in trunk

[WPE] Use new view state API from libwpe
https://bugs.webkit.org/show_bug.cgi?id=191906

Reviewed by Žan Doberšek.

Source/WebKit:

Remove WKViewSetViewState from the C API.

  • UIProcess/API/C/wpe/WKAPICastWPE.h:
  • UIProcess/API/C/wpe/WKView.cpp:
  • UIProcess/API/C/wpe/WKView.h:
  • UIProcess/API/wpe/WPEView.cpp:

(WKWPE::View::View): Add implementation for activity_state_changed vfunc of the view backend client.):
(WKWPE::View::setViewState): Remove the default flags.

  • UIProcess/API/wpe/WPEView.h:

(WKWPE::View::setViewState const): Make it private.

Tools:

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:

(beforeAll): Enable /webkit/WebKitWebView/page-visibility in WPE.

  • TestWebKitAPI/glib/WebKitGLib/TestMain.h:

(Test::createWebViewBackend): Make the view initially hidden for consistency with GTK+ tests.

  • TestWebKitAPI/glib/WebKitGLib/WebViewTest.h:
  • TestWebKitAPI/glib/WebKitGLib/wpe/WebViewTestWPE.cpp:

(WebViewTest::showInWindow): Add wpe_view_activity_state_visible, wpe_view_activity_state_in_window and
wpe_view_activity_state_focused state flags.
(WebViewTest::hideView): Remove wpe_view_activity_state_visible and wpe_view_activity_state_focused state flags.

  • wpe/backends/HeadlessViewBackend.cpp:

(WPEToolingBackends::HeadlessViewBackend::HeadlessViewBackend): Assume view is always visible, focused and in window.

  • wpe/backends/WindowViewBackend.cpp:

(WPEToolingBackends::WindowViewBackend::WindowViewBackend): Update the view state flags depending on state
received in configure callback.

  • wpe/jhbuild.modules: Bump libwpe to 1.1.0
4:14 AM Changeset in webkit [239202] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WTF

[GLib] RunLoop::dispatchAfter() GSource requires microsecond precision
https://bugs.webkit.org/show_bug.cgi?id=192696

Reviewed by Michael Catanzaro.

The GSource we set up in GLib's RunLoop::dispatchAfter() implementation
should support microsecond-precision delays. Such delays are common in
JSC's Watchdog implementation and missing support for them has been
causing test failures in the testapi program as well as some JSC
tests that depend on the termination determination functionality of the
JSC::Watchdog class.

RunLoop::dispatchAfter() is changed to spawn a raw GSource that uses the
existing GSourceFuncs implementation used elsewhere in GLib's RunLoop.
The GSource's ready time is set manually, now with the necessary
microsecond precision.

  • wtf/glib/RunLoopGLib.cpp:

(WTF::RunLoop::dispatchAfter):

12:09 AM Changeset in webkit [239201] by Fujii Hironori
  • 13 edits in trunk/Source/WebCore

[Win][Clang] Fix compilation warnings under Source/WebCore/platform/win
https://bugs.webkit.org/show_bug.cgi?id=192693

Reviewed by Ross Kirsling.

No new tests, no behavior changes.

  • platform/win/ClipboardUtilitiesWin.cpp: Reordered ClipboardDataItem members to match with the initializer list.
  • platform/win/CursorWin.cpp:

(WebCore::loadCursorByName): Changed the argument type of 'name' to const char*.

  • platform/win/DefWndProcWindowClass.cpp:

(WebCore::defWndProcWindowClassName): Removed an unused variable 'atom'.

  • platform/win/DragImageWin.cpp: Removed an unused variable 'MinDragLabelWidthBeforeClip'.
  • platform/win/PasteboardWin.cpp:

(WebCore::createGlobalImageFileDescriptor): Removed an unused variable 'hr'.
(WebCore::createGlobalHDropContent): Use reinterpret_cast to suppress warning.

  • platform/win/PlatformMouseEventWin.cpp:

(WebCore::PlatformMouseEvent::PlatformMouseEvent): Reordered the initializer list.

  • platform/win/PopupMenuWin.cpp:

(WebCore::PopupMenuWin::paint): Removed an unused variable 'itemCount'.

  • platform/win/PopupMenuWin.h: Marked override methods with 'override'.
  • platform/win/SSLKeyGeneratorWin.cpp:

(WebCore::getSupportedKeySizes): Removed WebCore namespace prefix in WebCore namespace.
(WebCore::signedPublicKeyAndChallengeString): Ditto.

  • platform/win/SearchPopupMenuDB.cpp:

(WebCore::SearchPopupMenuDB::createPreparedStatement): Use ASSERT_UNUSED instead of ASSERT.

  • platform/win/StructuredExceptionHandlerSuppressor.h: Enclosed m_savedExceptionRegistration with #if defined(_M_IX86).
  • platform/win/SystemInfo.cpp:

(WebCore::osVersionForUAString): Added default case.

Dec 13, 2018:

11:54 PM Changeset in webkit [239200] by Fujii Hironori
  • 4 edits in trunk

[WinCairo][Clang] DLLLauncherMain.cpp: warning: unused function 'prependPath' and 'appleApplicationSupportDirectory'
https://bugs.webkit.org/show_bug.cgi?id=192688

Reviewed by Ross Kirsling.

Source/JavaScriptCore:

These functions are used only in AppleWin port.

  • shell/DLLLauncherMain.cpp:

(copyEnvironmentVariable): Moved.
(getStringValue): Enclosed with #if !defined(WIN_CAIRO).
(applePathFromRegistry): Ditto.
(appleApplicationSupportDirectory): Ditto.
(prependPath): Ditto.

Tools:

  • win/DLLLauncher/DLLLauncherMain.cpp:

(copyEnvironmentVariable): Moved.
(getStringValue): Enclosed with #if !defined(WIN_CAIRO).
(applePathFromRegistry): Ditto.
(appleApplicationSupportDirectory): Ditto.
(prependPath): Ditto.

11:17 PM Changeset in webkit [239199] by dinfuehr@igalia.com
  • 3 edits in trunk/Source/JavaScriptCore

Improve GDB output for LLInt on Linux
https://bugs.webkit.org/show_bug.cgi?id=192660

Reviewed by Yusuke Suzuki.

Annotate assembly code generated for LLInt with the bytecode operation. When debugging
LLInt assembly code GDB is then able to show which bytecode instruction is implemented by
the current assembly code. This also works for linux-perf.

  • llint/LowLevelInterpreter.cpp:
  • offlineasm/arm.rb:
9:21 PM Changeset in webkit [239198] by mark.lam@apple.com
  • 3 edits
    1 add in trunk

Add a missing exception check.
https://bugs.webkit.org/show_bug.cgi?id=192626
<rdar://problem/46662163>

Reviewed by Keith Miller.

JSTests:

  • stress/regress-192626.js: Added.

Source/JavaScriptCore:

  • runtime/ScopedArguments.h:
8:39 PM Changeset in webkit [239197] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

[iOS] Web Inspector: Occasional UIProcess crashes under WebPageProxy::showInspectorIndication
https://bugs.webkit.org/show_bug.cgi?id=192689
<rdar://problem/46323610>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2018-12-13
Reviewed by Simon Fraser.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::close):

  • UIProcess/WebPageProxy.h:

Don't wait until ~WebPageProxy to destroy the WebPageProxyDebuggable
which broadcasts it as a remote inspector target. Terminate this
as soon as the WebPageProxy closes and becomes invalid.

8:09 PM Changeset in webkit [239196] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

[iOS] Web Inspector: Occasional UIProcess crashes under WebPageProxy::showInspectorIndication
https://bugs.webkit.org/show_bug.cgi?id=192689
<rdar://problem/46323610>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2018-12-13
Reviewed by Simon Fraser.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::close):

  • UIProcess/WebPageProxy.h:

Don't wait until ~WebPageProxy to destroy the WebPageProxyDebuggable
which broadcasts it as a remote inspector target. Terminate this
as soon as the WebPageProxy closes and becomes invalid.

8:05 PM Changeset in webkit [239195] by sbarati@apple.com
  • 8 edits in trunk/Source

The JSC shell should listen for memory pressure events and respond to them
https://bugs.webkit.org/show_bug.cgi?id=192647

Reviewed by Keith Miller.

Source/JavaScriptCore:

We want the JSC shell to behave more like the WebContent process when
it comes to running performance tests. One way to make the shell
more like this is to have it respond to memory pressure events in
a similar way as the WebContent process. This makes it easier to run
benchmarks like JetStream2 on the CLI on iOS.

  • jsc.cpp:

(jscmain):

  • runtime/VM.cpp:

(JSC::VM::drainMicrotasks):

  • runtime/VM.h:

(JSC::VM::setOnEachMicrotaskTick):

Source/WTF:

  • wtf/MemoryPressureHandler.cpp:

(WTF::MemoryPressureHandler::MemoryPressureHandler):
(WTF::MemoryPressureHandler::setDispatchQueue):
Make it so that we can customize which dispatch queue memory pressure
events get handled on.

  • wtf/MemoryPressureHandler.h:

(WTF::MemoryPressureHandler::setShouldLogMemoryMemoryPressureEvents):
Make it so that we can disable logging that happens on each memory
pressure event.

  • wtf/cocoa/MemoryPressureHandlerCocoa.mm:

(WTF::MemoryPressureHandler::install):
(WTF::MemoryPressureHandler::uninstall):
(WTF::MemoryPressureHandler::holdOff):

7:48 PM Changeset in webkit [239194] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed build fix for tvOS.

  • Platform/cocoa/WKCrashReporter.mm:
6:47 PM Changeset in webkit [239193] by Fujii Hironori
  • 2 edits in trunk/Tools

Unreviewed. Changed my status to a reviewer.

Patch by Don Olmstead <don.olmstead@sony.com> on 2018-12-13

  • Scripts/webkitpy/common/config/contributors.json:
6:19 PM Changeset in webkit [239192] by youenn@apple.com
  • 9 edits in trunk

RTCRtpTransceiver.stopped should be true when applying a remote description with the corresponding m section rejected
https://bugs.webkit.org/show_bug.cgi?id=192685

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/webrtc/RTCPeerConnection-setDescription-transceiver-expected.txt:
  • web-platform-tests/webrtc/RTCPeerConnection-setDescription-transceiver.html:

Source/WebCore:

In case the remote description contains a rejected m section,
the corresponding transceiver should be marked as stopped.
Libwebrtc backend has that information so pipe it up to JS.

Covered by updated WPT test.

  • Modules/mediastream/RTCRtpTransceiver.cpp:

(WebCore::RTCRtpTransceiver::stopped const):

  • Modules/mediastream/RTCRtpTransceiver.h:

(WebCore::RTCRtpTransceiver::stopped const): Deleted.

  • Modules/mediastream/RTCRtpTransceiverBackend.h:
  • Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.cpp:

(WebCore::LibWebRTCRtpTransceiverBackend::stopped const):

  • Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.h:
6:14 PM Changeset in webkit [239191] by mark.lam@apple.com
  • 46 edits in trunk/Source

Ensure that StructureFlags initialization always starts with Base::StructureFlags.
https://bugs.webkit.org/show_bug.cgi?id=192686

Reviewed by Keith Miller.

Source/JavaScriptCore:

This is purely a refactoring effort to make the code consistently start all
StructureFlags initialization with Base::StructureFlags. Previously, sometimes
Base::StructureFlags is appended at the end, and sometimes, it is expressed using
the name of the superclass. This patch makes the code all consistent and easier
to do a quick eye scan audit on to verify that no StructureFlags are forgetting
to inherit Base::StructureFlags.

Also added a static_assert in JSCallbackObject.h and JSBoundFunction.h. Both of
these implement a customHasInstance() method, and rely on ImplementsHasInstance
being included in the StructureFlags, and conversely, ImplementsDefaultHasInstance
has to be excluded.

JSBoundFunction.h is the only case where a bit (ImplementsDefaultHasInstance)
needs to be masked out of the inherited Base::StructureFlags.

  • API/JSCallbackObject.h:
  • runtime/ArrayConstructor.h:
  • runtime/ArrayIteratorPrototype.h:
  • runtime/Exception.h:
  • runtime/FunctionRareData.h:
  • runtime/InferredType.h:
  • runtime/InferredTypeTable.h:
  • runtime/InferredValue.h:
  • runtime/JSBoundFunction.h:
  • runtime/MapPrototype.h:
  • runtime/SetPrototype.h:
  • runtime/StringPrototype.h:
  • runtime/SymbolConstructor.h:

Source/WebCore:

No new tests needed because there's no new functionality. Just refactoring.

  • bindings/js/JSDOMWindowProperties.h:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):
(GeneratePrototypeDeclaration):

  • bindings/scripts/test/JS/JSTestActiveDOMObject.h:
  • bindings/scripts/test/JS/JSTestEnabledBySetting.h:
  • bindings/scripts/test/JS/JSTestEventTarget.h:
  • bindings/scripts/test/JS/JSTestGlobalObject.h:
  • bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h:
  • bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h:
  • bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h:
  • bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h:
  • bindings/scripts/test/JS/JSTestNamedGetterCallWith.h:
  • bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.h:
  • bindings/scripts/test/JS/JSTestObj.h:
  • bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
  • bindings/scripts/test/JS/JSTestPluginInterface.h:
  • bindings/scripts/test/JS/JSTestTypedefs.h:
5:45 PM Changeset in webkit [239190] by rniwa@webkit.org
  • 7 edits
    21 adds in trunk

Make HTMLConverter work across shadow boundaries
https://bugs.webkit.org/show_bug.cgi?id=192640

Reviewed by Wenson Hsieh.

Source/WebCore:

Made HTMLConverter work with shadow boundaries by replacing the various tree traversal functions.

Tests: editing/mac/attributed-string/attributed-string-across-shadow-boundaries-1.html

editing/mac/attributed-string/attributed-string-across-shadow-boundaries-2.html
editing/mac/attributed-string/attributed-string-across-shadow-boundaries-3.html
editing/mac/attributed-string/attributed-string-across-shadow-boundaries-4.html
editing/mac/attributed-string/attributed-string-across-shadow-boundaries-5.html
editing/mac/attributed-string/attributed-string-across-shadow-boundaries-with-style-1.html
editing/mac/attributed-string/attributed-string-across-shadow-boundaries-with-style-2.html
editing/mac/attributed-string/attributed-string-across-shadow-boundaries-with-style-3.html

  • dom/Position.cpp:

(WebCore::commonShadowIncludingAncestor): Moved from markup.cpp to be shared between HTMLConverter
and serializePreservingVisualAppearanceInternal.

  • dom/Position.h:
  • editing/cocoa/HTMLConverter.mm:

(HTMLConverter::convert):
(HTMLConverterCaches::propertyValueForNode):
(HTMLConverterCaches::floatPropertyValueForNode):
(HTMLConverter::_blockLevelElementForNode):
(HTMLConverterCaches::colorPropertyValueForNode):
(HTMLConverter::aggregatedAttributesForAncestors):
(HTMLConverter::aggregatedAttributesForElementAndItsAncestors):
(HTMLConverter::_processElement):
(HTMLConverter::_traverseNode):
(HTMLConverter::_traverseFooterNode):
(HTMLConverterCaches::cacheAncestorsOfStartToBeConverted):
(WebCore::attributedStringFromSelection):

  • editing/markup.cpp:

(WebCore::commonShadowIncludingAncestor): Moved to Position.cpp.

LayoutTests:

Added tests for generating attributed string out across shadow boundaries based on the tests
of respective names in editing/pasteboard.

  • editing/mac/attributed-string/attributed-string-across-shadow-boundaries-1-expected.txt: Added.
  • editing/mac/attributed-string/attributed-string-across-shadow-boundaries-1.html: Added.
  • editing/mac/attributed-string/attributed-string-across-shadow-boundaries-2-expected.txt: Added.
  • editing/mac/attributed-string/attributed-string-across-shadow-boundaries-2.html: Added.
  • editing/mac/attributed-string/attributed-string-across-shadow-boundaries-3-expected.txt: Added.
  • editing/mac/attributed-string/attributed-string-across-shadow-boundaries-3.html: Added.
  • editing/mac/attributed-string/attributed-string-across-shadow-boundaries-4-expected.txt: Added.
  • editing/mac/attributed-string/attributed-string-across-shadow-boundaries-4.html: Added.
  • editing/mac/attributed-string/attributed-string-across-shadow-boundaries-5-expected.txt: Added.
  • editing/mac/attributed-string/attributed-string-across-shadow-boundaries-5.html: Added.
  • editing/mac/attributed-string/attributed-string-across-shadow-boundaries-with-style-1-expected.txt: Added.
  • editing/mac/attributed-string/attributed-string-across-shadow-boundaries-with-style-1.html: Added.
  • editing/mac/attributed-string/attributed-string-across-shadow-boundaries-with-style-2-expected.txt: Added.
  • editing/mac/attributed-string/attributed-string-across-shadow-boundaries-with-style-2.html: Added.
  • editing/mac/attributed-string/resources/dump-attributed-string.js:

(window.dumpAttributedString): Now takes start and end containers and offsets.
(serializeSubtreeWithShadow): Added. This function serializes the content of shadow roots along with
start and end markers.
(serializeSubtreeWithShadow.serializeCharacterData): Added.
(serializeSubtreeWithShadow.serializeNode): Added.
(serializeSubtreeWithShadow.serializeChildNodes): Added.
(serializeSubtreeWithShadow.serializeShadowRootAndChildNodes): Added.
(dumpAttributedString): Deleted.

  • platform/mac-sierra/editing/mac/attributed-string/attributed-string-across-shadow-boundaries-1-expected.txt: Added.
  • platform/mac-sierra/editing/mac/attributed-string/attributed-string-across-shadow-boundaries-2-expected.txt: Added.
  • platform/mac-sierra/editing/mac/attributed-string/attributed-string-across-shadow-boundaries-3-expected.txt: Added.
  • platform/mac-sierra/editing/mac/attributed-string/attributed-string-across-shadow-boundaries-4-expected.txt: Added.
  • platform/mac-sierra/editing/mac/attributed-string/attributed-string-across-shadow-boundaries-5-expected.txt: Added.
  • platform/mac-sierra/editing/mac/attributed-string/attributed-string-across-shadow-boundaries-with-style-1-expected.txt: Added.
  • platform/mac-sierra/editing/mac/attributed-string/attributed-string-across-shadow-boundaries-with-style-2-expected.txt: Added.
5:17 PM Changeset in webkit [239189] by youenn@apple.com
  • 5 edits in trunk

Trying to play a media element synchronously after setting srcObject should succeed without user gesture
https://bugs.webkit.org/show_bug.cgi?id=192679

Reviewed by Eric Carlson.

Source/WebCore:

Check the srcObject mediaProvider value which is set synchronously.
Covered by updated fast/mediastream/local-audio-playing-event.html.

  • html/HTMLMediaElement.h:

(WebCore::HTMLMediaElement::hasMediaStreamSrcObject const):

LayoutTests:

  • fast/mediastream/local-audio-playing-event-expected.txt:
  • fast/mediastream/local-audio-playing-event.html:
4:53 PM Changeset in webkit [239188] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Add the JSC_traceBaselineJITExecution option for tracing baseline JIT execution.
https://bugs.webkit.org/show_bug.cgi?id=192684

Reviewed by Saam Barati.

This dataLogs the bytecode execution order of baseline JIT code when the
JSC_traceBaselineJITExecution option is true.

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):

  • runtime/Options.h:
4:19 PM Changeset in webkit [239187] by ddkilzer@apple.com
  • 9 edits in trunk/Source/JavaScriptCore

clang-tidy: Fix unnecessary object copies in JavaScriptCore
<https://webkit.org/b/192680>
<rdar://problem/46708767>

Reviewed by Mark Lam.

  • assembler/testmasm.cpp:

(JSC::invoke):

  • Make MacroAssemblerCodeRef<JSEntryPtrTag> argument a const reference.
  • b3/testb3.cpp:

(JSC::B3::checkDisassembly):

  • Make CString argument a const reference.
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileStringEquality):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::cachedGetByIdWithThis):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::cachedGetByIdWithThis):

  • Make JITCompiler::JumpList arguments a const reference.
  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::checkStructure):

  • Make RegisteredStructureSet argument a const reference.
  • jsc.cpp:

(GlobalObject::moduleLoaderImportModule): Make local auto
variables const references.
(Workers::report): Make String argument a const reference.
(addOption): Make Identifier argument a const reference.
(runJSC): Make CString loop variable a const reference.

4:18 PM Changeset in webkit [239186] by Kocsen Chung
  • 7 edits in trunk/Source

Versioning.

4:13 PM Changeset in webkit [239185] by mark.lam@apple.com
  • 2 edits in trunk/Source/bmalloc

Verify that tryLargeZeroedMemalignVirtual()'s aligned size and alignment values are valid.
https://bugs.webkit.org/show_bug.cgi?id=192682
<rdar://problem/37751522>

Reviewed by Saam Barati.

  • bmalloc/bmalloc.cpp:

(bmalloc::api::tryLargeZeroedMemalignVirtual):

3:25 PM Changeset in webkit [239184] by Wenson Hsieh
  • 9 edits in trunk

[iOS] Support dropping contact card data (public.vcard) in editable content
https://bugs.webkit.org/show_bug.cgi?id=192570
<rdar://problem/35626913>

Reviewed by Tim Horton.

Source/WebCore:

Adds support for accepting vCard (.vcf) data via drop on iOS. See below for more details.

Tests: DragAndDropTests.ExternalSourceContactIntoEditableAreas

DragAndDropTests.ExternalSourceMapItemAndContactToUploadArea
DragAndDropTests.ExternalSourceMapItemIntoEditableAreas
WKAttachmentTestsIOS.InsertDroppedContactAsAttachment
WKAttachmentTestsIOS.InsertDroppedMapItemAsAttachment

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

(WebCore::attachmentForFilePath):

Pull out logic to create an attachment from a file path out into a static helper. Use this in readFilePaths
as well as readVirtualContactFile.

(WebCore::WebContentReader::readFilePaths):
(WebCore::WebContentReader::readVirtualContactFile):

Add a pasteboard reading method that reads a vCard file (with an optional URL) as web content. The resulting
fragment consists of either an anchor and an attachment element, or just an attachment element if the URL is
empty. In the case of an MKMapItem, the URL is populated, so we generate both elements; when dragging a
contact, there is no associated URL, so we only have an attachment.

  • platform/Pasteboard.h:
  • platform/ios/PasteboardIOS.mm:

(WebCore::Pasteboard::readPasteboardWebContentDataForType):

Augment this to take the current PasteboardItemInfo as well; use this item information to get a file path for
"public.vcard" data, which is then passed on to the web content reader. Additionally, by returning
ReaderResult::DidNotReadType here, we prevent the web content reader from extracting the plain text contents
of the vCard and dumping it as plain text in the editable element (this would otherwise happen, since
"public.vcard" conforms to "public.text").

(WebCore::Pasteboard::read):
(WebCore::Pasteboard::readRespectingUTIFidelities):

  • platform/ios/WebItemProviderPasteboard.mm:

(-[NSItemProvider web_fileUploadContentTypes]):

Prevent the "com.apple.mapkit.map-item" UTI from being considered as file upload content. This special case is
tricky, since "com.apple.mapkit.map-item" conforms to "public.content", yet its corresponding data is only
suitable for deserialization into an MKMapItem.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:

Add API tests to verify that registering MKMapItems and CNContacts to item providers and dropping them in
attachment-enabled rich text editable areas inserts attachment elements (and in the case of MKMapItem,
additionally inserts a link).

  • TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:

(TestWebKitAPI::createMapItemForTesting):
(TestWebKitAPI::createContactItemForTesting):

Add API tests to verify that dropping map items and contact items into rich and plain editable areas behaves as
expected (in the case where a URL is present, e.g. dropping a map item, we insert the URL as an anchor, and when
there is no other suitable representation in the item provider, we do nothing at all, which is the case for the
dropped CNContact). Also, add a test to verify that drag and drop can be used to upload these items as .vcf
files.

3:20 PM Changeset in webkit [239183] by Devin Rousso
  • 22 edits in trunk/Source

Web Inspector: remove DOM.BackendNodeId and associated commands/events
https://bugs.webkit.org/show_bug.cgi?id=192478

Reviewed by Matt Baker.

Source/JavaScriptCore:

  • inspector/protocol/DOM.json:

Source/WebCore:

Removing unused code, so no change in functionality.

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

(WebCore::InspectorDOMAgent::discardBindings):
(WebCore::InspectorDOMAgent::backendNodeIdForNode): Deleted.
(WebCore::InspectorDOMAgent::releaseBackendNodeIds): Deleted.
(WebCore::InspectorDOMAgent::pushNodeByBackendIdToFrontend): Deleted.

Source/WebInspectorUI:

  • Versions/Inspector-iOS-8.0.json:
  • Versions/Inspector-iOS-9.0.json:
  • Versions/Inspector-iOS-9.3.json:
  • Versions/Inspector-iOS-10.0.json:
  • Versions/Inspector-iOS-10.3.json:
  • Versions/Inspector-iOS-11.0.json:
  • Versions/Inspector-iOS-11.3.json:
  • Versions/Inspector-iOS-12.0.json:
  • UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
  • UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
  • UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
  • UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
  • UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js:
  • UserInterface/Protocol/Legacy/11.0/InspectorBackendCommands.js:
  • UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js:
  • UserInterface/Protocol/Legacy/12.0/InspectorBackendCommands.js:
3:17 PM Changeset in webkit [239182] by Chris Dumez
  • 22 edits in trunk/Source

[PSON] We should not need to navigate to 'about:blank' to suspend pages
https://bugs.webkit.org/show_bug.cgi?id=192668
<rdar://problem/46701466>

Reviewed by Alex Christensen.

Source/WebCore:

  • history/PageCache.cpp:

(WebCore::PageCache::addIfCacheable):

  • history/PageCache.h:
  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::redirectReceived):
(WebCore::DocumentLoader::willSendRequest):
(WebCore::DocumentLoader::startLoadingMainResource):

  • loader/DocumentLoader.h:
  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::init):
(WebCore::FrameLoader::stopAllLoaders):
(WebCore::FrameLoader::setDocumentLoader):
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):

  • loader/FrameLoaderTypes.h:
  • loader/PolicyChecker.cpp:

(WebCore::PolicyChecker::checkNavigationPolicy):

  • loader/PolicyChecker.h:

Source/WebKit:

To support PageCache when process-swap on cross-site navigation is enabled,
we've been navigating the previous process to 'about:blank' when swapping.
This would trigger PageCaching of the page in the old process. While
convenient, this design has led to a lot of bugs because we did not really
want a navigation to happen in the old process.

To address the issue, when a WebPage is asked to suspend (for process-swap),
we now attempt to add it to PageCache and save it on the current HistoryItem,
*without* triggering any navigation. Any pending navigation gets cancelled
and we just suspend in place.

Later on, when we want to go back to this HistoryItem, we simply leverage the
existing WebPage::goToBackForwardItem() code path. The only subtlety is that
we're actually asking the WebPage to load a HistoryItem that is the current
one in the History. I had to tweak a some logic / assertions to support this
as this is not something we usually do. However, it actually works with very
little changes and successfully restores the PageCache entry on the current
HistoryItem.

There is no expected overall behavior change and ProcessSwap API tests (which
cover PageCache) still pass. This is merely a simpler design because it avoids
navigating to about:blank.

  • UIProcess/SuspendedPageProxy.cpp:

(WebKit::SuspendedPageProxy::didSuspend):
(WebKit::SuspendedPageProxy::didReceiveMessage):

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

(WebKit::WebPageProxy::didSuspendAfterProcessSwap):

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

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):

  • WebProcess/WebPage/WebDocumentLoader.cpp:

(WebKit::WebDocumentLoader::setNavigationID):

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::didReceivePolicyDecision):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::suspendForProcessSwap):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::origin):

3:06 PM Changeset in webkit [239181] by pvollan@apple.com
  • 11 edits in trunk

[macOS] Inline WebVTT styles should override styles from Captions settings in System Preferences
https://bugs.webkit.org/show_bug.cgi?id=192638

Reviewed by Eric Carlson.

Source/WebCore:

It is currently not possible to override caption styles generated from System Preferences with inline
WebVTT styles without adding !important. The reason for this is that the generated styles from
System preferences are author styles which have higher priority than the inline WebVTT styles, which
are user agent styles in the video user agent shadow tree. This can be fixed by moving the generated
styles to the video user agent shadow tree. Inline WebVTT styles will then have higher priority since
they are added after the generated styles. This patch also fixes a problem where inline styles could be
added twice to the video user agent shadow root.

Test: media/track/track-cue-css.html

  • dom/ExtensionStyleSheets.cpp:

(WebCore::ExtensionStyleSheets::updateInjectedStyleSheetCache const):

  • html/track/VTTCue.cpp:

(WebCore::VTTCue::getDisplayTree):

  • page/CaptionUserPreferences.cpp:

(WebCore::CaptionUserPreferences::setCaptionsStyleSheetOverride):

  • page/Page.cpp:

(WebCore::Page::setCaptionUserPreferencesStyleSheet):

LayoutTests:

  • media/track/captions-webvtt/css-styling.vtt:
  • media/track/captions-webvtt/no-css-styling.vtt:
  • media/track/track-css-user-override-expected.txt:
  • media/track/track-css-user-override.html:
  • media/track/track-cue-css-expected.html:
2:32 PM Changeset in webkit [239180] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Fix leak of AVPlayer boundaryTimeObserver object.
https://bugs.webkit.org/show_bug.cgi?id=192674

Reviewed by Eric Carlson.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::performTaskAtMediaTime):

2:31 PM Changeset in webkit [239179] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: experimental settings reload button disappears after changing more than one setting
https://bugs.webkit.org/show_bug.cgi?id=192645
<rdar://problem/46626204>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/SettingsTabContentView.js:

(WI.SettingsTabContentView.prototype._createExperimentalSettingsView.listenForChange):
(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):

2:29 PM Changeset in webkit [239178] by Matt Baker
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION(r238602): Elements: deleting multiple DOM nodes doesn't select the nearest node after deletion
https://bugs.webkit.org/show_bug.cgi?id=192116
<rdar://problem/46344339>

Reviewed by Devin Rousso.

  • UserInterface/Controllers/SelectionController.js:

(WI.SelectionController.prototype.removeSelectedItems):
Finding a new index to select should go through the delegate instead of
naively advancing the index.

  • UserInterface/Views/DOMTreeElement.js:

(WI.DOMTreeElement.prototype._populateNodeContextMenu):
(WI.DOMTreeElement.prototype.ondelete): Deleted.
The menu item for removing the DOM node is now managed by the parent
DOMTreeOutline, since its UI and behavior now depend on whether there
are multiple elements selected.

  • UserInterface/Views/DOMTreeOutline.js:

(WI.DOMTreeOutline.prototype.populateContextMenu):
(WI.DOMTreeOutline.prototype.ondelete.level):
(WI.DOMTreeOutline.prototype.ondelete):
Implement ondelete to remove selected DOM nodes using the delete and
backspace keys. Also used by the DOMTreeOutline's context menu handler.

12:49 PM Changeset in webkit [239177] by ddkilzer@apple.com
  • 3 edits in trunk/Source/WTF

clang-tidy: Fix unnecessary parameter copies in ParallelHelperPool.cpp
<https://webkit.org/b/192666>
<rdar://problem/46697952>

Reviewed by Alex Christensen.

  • wtf/ParallelHelperPool.cpp:

(WTF::ParallelHelperClient::ParallelHelperClient): Use rvalue
reference and WTFMove().
(WTF::ParallelHelperClient::setTask): Ditto.
(WTF::ParallelHelperClient::runTaskInParallel): Ditto.
(WTF::ParallelHelperClient::runTask): Use const reference.

  • wtf/ParallelHelperPool.h: Update declarations to match

implementations.

12:48 PM Changeset in webkit [239176] by Michael Catanzaro
  • 15 edits
    1 add in releases/WebKitGTK/webkit-2.22

Merge r239062 - PropertyAttribute needs a CustomValue bit.
https://bugs.webkit.org/show_bug.cgi?id=191993
<rdar://problem/46264467>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-191993.js: Added.

Source/JavaScriptCore:

This is because GetByIdStatus needs to distinguish CustomValue properties from
other types, and its only means of doing so is via the property's attributes.
Previously, there's nothing in the property's attributes that can indicate that
the property is a CustomValue.

We fix this by doing the following:

  1. Added a PropertyAttribute::CustomValue bit.
  2. Added a PropertyAttribute::CustomAccessorOrValue convenience bit mask that is CustomAccessor | CustomValue.
  1. Since CustomGetterSetter properties are only set via JSObject::putDirectCustomAccessor(), we added a check in JSObject::putDirectCustomAccessor() to see if the attributes bits include PropertyAttribute::CustomAccessor. If not, then the property must be a CustomValue, and we'll add the PropertyAttribute::CustomValue bit to the attributes bits.

This ensures that the property attributes is sufficient to tell us if the
property contains a CustomGetterSetter.

  1. Updated all checks for PropertyAttribute::CustomAccessor to check for PropertyAttribute::CustomAccessorOrValue instead if their intent is to check for the presence of a CustomGetterSetter as opposed to checking specifically for one that is used as a CustomAccessor.

This includes all the Structure transition code that needs to capture the
attributes change when a CustomValue has been added.

  1. Filtered out the PropertyAttribute::CustomValue bit in PropertyDescriptor. The fact that we're using a CustomGetterSetter as a CustomValue should remain invisible to the descriptor. This is because the descriptor should describe a CustomValue no differently from a plain value.
  1. Added some asserts to ensure that property attributes are as expected, and to document some invariants.
  • bytecode/GetByIdStatus.cpp:

(JSC::GetByIdStatus::computeFromLLInt):
(JSC::GetByIdStatus::computeForStubInfoWithoutExitSiteFeedback):
(JSC::GetByIdStatus::computeFor):

  • bytecode/InByIdStatus.cpp:

(JSC::InByIdStatus::computeForStubInfoWithoutExitSiteFeedback):

  • bytecode/PropertyCondition.cpp:

(JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const):

  • bytecode/PutByIdStatus.cpp:

(JSC::PutByIdStatus::computeFor):

  • runtime/JSFunction.cpp:

(JSC::getCalculatedDisplayName):

  • runtime/JSObject.cpp:

(JSC::JSObject::putDirectCustomAccessor):
(JSC::JSObject::putDirectNonIndexAccessor):
(JSC::JSObject::putDirectIndexSlowOrBeyondVectorLength):

  • runtime/JSObject.h:

(JSC::JSObject::putDirectIndex):
(JSC::JSObject::fillCustomGetterPropertySlot):
(JSC::JSObject::putDirect):

  • runtime/JSObjectInlines.h:

(JSC::JSObject::putDirectInternal):

  • runtime/PropertyDescriptor.cpp:

(JSC::PropertyDescriptor::setDescriptor):
(JSC::PropertyDescriptor::setCustomDescriptor):
(JSC::PropertyDescriptor::setAccessorDescriptor):

  • runtime/PropertySlot.h:

(JSC::PropertySlot::setCustomGetterSetter):

Source/WebCore:

This patch revealed a bug in the CodeGenerator where a constructor property is
set with a ReadOnly attribute. This conflicts with the WebIDL link (see clause
12 in https://heycam.github.io/webidl/#interface-prototype-object) which states
that it should be [Writable]. The ReadOnly attribute is now removed.

On the WebCore side, this change is covered by existing tests.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

  • bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:

(WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor):

12:46 PM Changeset in webkit [239175] by Matt Baker
  • 7 edits in trunk

Web Inspector: Table selection becomes corrupted when deleting selected cookies
https://bugs.webkit.org/show_bug.cgi?id=192388
<rdar://problem/46472364>

Reviewed by Devin Rousso.

Source/WebInspectorUI:

  • UserInterface/Controllers/SelectionController.js:

(WI.SelectionController):
(WI.SelectionController.prototype.didRemoveItems):
(WI.SelectionController.prototype._updateSelectedItems):
(WI.SelectionController.prototype.didRemoveItem): Deleted.
Replace didRemoveItem with a method taking an IndexSet. Calling the
single-index version while iterating over multiple rows in ascending
order is unsafe, a detail best left to the SelectionController.

  • UserInterface/Views/Table.js:

(WI.Table.prototype.removeRow):
(WI.Table.prototype._removeRows):
Notify SelectionController of removed rows.

  • UserInterface/Views/TreeOutline.js:

(WI.TreeOutline.prototype.insertChild):
(WI.TreeOutline.prototype.removeChildAtIndex):
Remove the child from the element's children after calling _forgetTreeElement,
which needs to calculate the child's index to pass to the SelectionController.

(WI.TreeOutline.prototype.removeChildren):
Remove child items during iteration so that children doesn't contain
detached TreeElements while calling _forgetTreeElement.

(WI.TreeOutline.prototype._rememberTreeElement):
(WI.TreeOutline.prototype._forgetTreeElement):

LayoutTests:

  • inspector/table/table-remove-rows-expected.txt:
  • inspector/table/table-remove-rows.html:
12:30 PM Changeset in webkit [239174] by Brent Fulgham
  • 3 edits
    2 adds in trunk

Don't attempt to animate invalid CSS properties
https://bugs.webkit.org/show_bug.cgi?id=192630
<rdar://problem/46664433>

Reviewed by Antoine Quint.

Source/WebCore:

Inherited animation properties can cause child elements to think they need to animate CSS properties
that they do not support, leading to nullptr crashes.

Recognize that CSSPropertyInvalid is a potential requested animation property, and handle it
cleanly.

Tests: animations/invalid-property-animation.html

  • page/animation/CompositeAnimation.cpp:

(WebCore::CompositeAnimation::updateTransitions):

  • svg/SVGAnimateElementBase.cpp:

(WebCore::SVGAnimateElementBase::calculateAnimatedValue):

LayoutTests:

  • animations/invalid-property-animation-expected.txt: Added.
  • animations/invalid-property-animation.html: Added.
11:56 AM Changeset in webkit [239173] by timothy@apple.com
  • 10 edits in trunk/Source/WebCore

REGRESSION (r230064): Focus rings on webpages are fainter than in native UI.
https://bugs.webkit.org/show_bug.cgi?id=192639
rdar://problem/42669297

Reviewed by Tim Horton.

The focus ring color passed to CoreGraphics is expected to be opaque, since they
will apply opacity when drawing (because opacity is normally animated).
We were getting this by accident before when the old RenderThemeMac::systemColor()
used the old convertNSColorToColor(), which ignored alpha on NSColor.
Existing tests use fixed test focus ring color.

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::colorFromPrimitiveValue const): Use RenderTheme singleton for focusRingColor().

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::drawFocusIfNeededInternal): Ditto.

  • platform/graphics/cocoa/GraphicsContextCocoa.mm:

(WebCore::drawFocusRingAtTime): Use CGContextStateSaver.

  • platform/mac/ThemeMac.mm:

(WebCore::drawCellFocusRingWithFrameAtTime): Force alpha to 1 on the focus ring color. Use CGContextStateSaver.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::paintFocusRing): Use RenderTheme singleton for focusRingColor().

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::paintAreaElementFocusRing): Ditto.

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::focusRingColor const): Made const. Cache the result of platformFocusRingColor().

  • rendering/RenderTheme.h: Made focusRingColor() a member function instead of static.
  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::platformFocusRingColor const): Force alpha to 1 on the focus ring color.
(WebCore::RenderThemeMac::systemColor const): Use focusRingColor(), instead of caching color here.

11:10 AM Changeset in webkit [239172] by Kocsen Chung
  • 2 edits in branches/safari-606-branch/Source/ThirdParty/libwebrtc

Apply patch. rdar://problem/46603452

Check red packet length

11:07 AM Changeset in webkit [239171] by Ross Kirsling
  • 2 edits in trunk/Tools

Unreviewed -- update my status to "reviewer".

  • Scripts/webkitpy/common/config/contributors.json:
10:08 AM Changeset in webkit [239170] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Remove with-report from 3 services that are currently needed on macOS
https://bugs.webkit.org/show_bug.cgi?id=192593
<rdar://problem/46604752>

Reviewed by Brent Fulgham.

  • WebProcess/com.apple.WebProcess.sb.in:
9:22 AM Changeset in webkit [239169] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

[MediaStream] Calculate width or height when constraints contain only the other
https://bugs.webkit.org/show_bug.cgi?id=192632
<rdar://problem/46665734>

Unreviewed, remove an unneeded assert.

  • platform/mediastream/RealtimeVideoSource.cpp:

(WebCore::RealtimeVideoSource::dispatchMediaSampleToObservers):

9:04 AM Changeset in webkit [239168] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Update Credit Card AutoFill button icon
https://bugs.webkit.org/show_bug.cgi?id=192637
rdar://problem/46545006

Patch by Zach Li <zachli@apple.com> on 2018-12-13
Reviewed by Chris Dumez.

  • css/html.css:

(input::-webkit-credit-card-auto-fill-button):

8:59 AM Changeset in webkit [239167] by youenn@apple.com
  • 8 edits
    1 add in trunk

On page close, WebPage::m_userMediaPermissionRequestManager is nullified too early
https://bugs.webkit.org/show_bug.cgi?id=192657

Reviewed by Eric Carlson.

Source/WebKit:

Instead of nullifying the manager, make it a UniqueRef and clear it on closing the page.
This ensures we revoke the sandbox extensions as early as possible and keep the manager lifetime simple.

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:

(WebKit::UserMediaPermissionRequestManager::~UserMediaPermissionRequestManager):
(WebKit::UserMediaPermissionRequestManager::clear):

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::close):

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::userMediaPermissionRequestManager):

Tools:

Add a test that loads a page registering ondevicechange,
load another page in the same process, closes the first page.
Ensure that the process does not crash in that case.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/UserMedia.cpp:

(TestWebKitAPI::TEST):
(TestWebKitAPI::didCrashCallback):

  • TestWebKitAPI/Tests/WebKit/ondevicechange.html: Added.
8:09 AM Changeset in webkit [239166] by Chris Fleizach
  • 7 edits in trunk/Source/WebKit

[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
https://bugs.webkit.org/show_bug.cgi?id=192449
<rdar://problem/46595508>

Reviewed by Darin Adler.

Part 6: Files in plugin process and UI process.

  • PluginProcess/PluginControllerProxy.cpp:
  • PluginProcess/PluginProcess.cpp:
  • PluginProcess/WebProcessConnection.cpp:
  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
  • UIProcess/WebStorage/LocalStorageDatabase.cpp:
  • UIProcess/mac/WebPageProxyMac.mm:
8:00 AM Changeset in webkit [239165] by Adrian Perez de Castro
  • 1 copy in releases/WPE WebKit/webkit-2.22.3/webkit-2.22

WPE WebKit 2.22.3

7:59 AM Changeset in webkit [239164] by Adrian Perez de Castro
  • 4 edits in releases/WebKitGTK/webkit-2.22

Unreviewed. Update OptionsWPE.cmake for the 2.22.3 release.

.:

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

Source/WebKit:

  • wpe/NEWS: Add release notes for 2.22.3.
7:34 AM Changeset in webkit [239163] by eric.carlson@apple.com
  • 14 edits
    2 adds in trunk

[MediaStream] Calculate width or height when constraints contain only the other
https://bugs.webkit.org/show_bug.cgi?id=192632
<rdar://problem/46665734>

Reviewed by Youenn Fablet.

Source/WebCore:

Test: fast/mediastream/constraint-intrinsic-size.html

  • platform/graphics/RemoteVideoSample.cpp:

(WebCore::RemoteVideoSample::create): Log errors with RELEASE_LOG_ERROR.

  • platform/graphics/cv/ImageTransferSessionVT.h:

(WebCore::ImageTransferSessionVT::pixelFormat const): New.

  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::setSizeAndFrameRate): Replace current size with new size.
(WebCore::RealtimeMediaSource::setSize): Don't notify about width and height.
(WebCore::RealtimeMediaSource::size const): Use intrinsic size when necessary.
(WebCore::RealtimeMediaSource::setIntrinsicSize): New.
(WebCore::RealtimeMediaSource::remoteVideoSampleAvailable): Deleted.

  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/RealtimeVideoSource.cpp:

(WebCore::RealtimeVideoSource::dispatchMediaSampleToObservers): No more remoteVideoSampleAvailable.

  • platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:

(WebCore::DisplayCaptureSourceCocoa::settings): Report size correctly.
(WebCore::DisplayCaptureSourceCocoa::frameSize const): Use intrinsicSize().
(WebCore::DisplayCaptureSourceCocoa::emitFrame): No more remoteVideoSampleAvailable.
(WebCore::DisplayCaptureSourceCocoa::setIntrinsicSize): Deleted.

  • platform/mediastream/mac/DisplayCaptureSourceCocoa.h:

(WebCore::DisplayCaptureSourceCocoa::intrinsicSize const): Deleted.

  • platform/mock/MockRealtimeVideoSource.cpp:

(WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource): Report intrinsic size.
(WebCore::MockRealtimeVideoSource::setSizeAndFrameRate): Minor cleanup.
(WebCore::MockRealtimeVideoSource::setSizeAndFrameRateWithPreset): Report intrinsic size.
(WebCore::MockRealtimeVideoSource::drawText): Don't render preset info for display source.

  • platform/mock/MockRealtimeVideoSource.h:

Source/WebKit:

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::SourceProxy::remoteVideoSampleAvailable): Deleted,
replaced with videoSampleAvailable.

  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::Source::remoteVideoSampleAvailable): Use original frame
size if necessary when calculating new frame size.

LayoutTests:

  • fast/mediastream/constraint-intrinsic-size-expected.txt: Added.
  • fast/mediastream/constraint-intrinsic-size.html: Added.
7:08 AM Changeset in webkit [239162] by Adrian Perez de Castro
  • 1 copy in releases/WebKitGTK/webkit-2.22.5

WebKitGTK+ 2.22.5

7:06 AM Changeset in webkit [239161] by Adrian Perez de Castro
  • 4 edits in releases/WebKitGTK/webkit-2.22

Unreviewed. Update OptionsGTK.cmake for the 2.22.5 release.

.:

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

Source/WebKit:

  • gtk/NEWS: Add release notes for 2.22.5.
6:44 AM Changeset in webkit [239160] by ddkilzer@apple.com
  • 3 edits in trunk/Source/WebCore

clang-tidy: loop variable is copied but only used as const reference in Document.cpp, Element.cpp
<https://webkit.org/b/192661>
<rdar://problem/46694035>

Reviewed by Daniel Bates.

  • dom/Document.cpp:

(WebCore::Document::updateIntersectionObservations):
(WebCore::Document::notifyIntersectionObserversTimerFired):

  • dom/Element.cpp:

(WebCore::Element::didMoveToNewDocument):
(WebCore::Element::disconnectFromIntersectionObservers):

  • Change loop variables from auto to const auto& to prevent unnecessary copies of WeakPtr<IntersectionObserver> or struct IntersectionObserverRegistration objects.
4:35 AM Changeset in webkit [239159] by commit-queue@webkit.org
  • 2 edits
    2 adds in trunk/Tools

[GStreamer][JHBuild] update-webkit{gtk,wpe}-libs fails with libfdk-2.0.0
https://bugs.webkit.org/show_bug.cgi?id=192643

Patch by Carlos Eduardo Ramalho <cadubentzen@gmail.com> on 2018-12-13
Reviewed by Philippe Normand.

This problem happens with Arch Linux users which have libfdk-2.0.0
installed (which is anybody with gst-plugins-bad 1.14.4 installed).

The problem has already been solved upstream at
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/77.

Adding patches while this problem is not in a release yet.

  • gstreamer/jhbuild.modules: Add patches to fix build of gst-plugins-bad with libfdk-2.0.0.
  • gstreamer/patches/gst-plugins-bad-0003-fdkaacenc-Remove-MODE_2_1.patch: Added.
  • gstreamer/patches/gst-plugins-bad-0004-fdkaacdec-Use-WAV-channel-mapping-instead-of-interleave-setting.patch: Added.
4:26 AM Changeset in webkit [239158] by Caio Lima
  • 22 edits
    5 adds in trunk

[BigInt] Add ValueDiv into DFG
https://bugs.webkit.org/show_bug.cgi?id=186178

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/big-int-div-jit-osr.js: Added.
  • stress/big-int-div-jit-untyped.js: Added.
  • stress/value-div-fixup-int32-big-int.js: Added.

PerformanceTests:

  • BigIntBench/big-int-simple-div.js: Added.
  • BigIntBench/value-div-type-propagation.js: Added.

Source/JavaScriptCore:

This patch is introducing a new node type called ValueDiv. This node
is responsible to handle Untyped and Bigint specialization of division
operator, while the ArithDiv variant handles Number/Boolean cases.

BigInt specialization generates following speedup into simple
benchmark:

noSpec changes

big-int-simple-div 10.6013+-0.4682 8.4518+-0.0943 definitely 1.2543x faster

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGBackwardsPropagationPhase.cpp:

(JSC::DFG::BackwardsPropagationPhase::propagate):

  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupArithDiv):
(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGNode.h:

(JSC::DFG::Node::arithNodeFlags):

  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileValueDiv):
(JSC::DFG::SpeculativeJIT::compileArithDiv):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGValidate.cpp:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileValueDiv):
(JSC::FTL::DFG::LowerDFGToB3::compileArithDiv):
(JSC::FTL::DFG::LowerDFGToB3::compileArithBitNot):

1:43 AM Changeset in webkit [239157] by Carlos Garcia Campos
  • 11 edits
    3 deletes in trunk

[FreeType] Remove HarfBuzzFace
https://bugs.webkit.org/show_bug.cgi?id=192589

Reviewed by Michael Catanzaro.

Source/WebCore:

This was used to share the common implementation with the chromium port, but now that only freetype based ports
use it, it can be removed and use hb_ft_face_create_cached() instead. We don't need the glyph cache either,
since we are already caching glyphs in Font.

  • platform/FreeType.cmake: Remove HarfBuzzFaceCairo.cpp and HarfBuzzFace.cpp.
  • platform/graphics/FontPlatformData.h: Remove HarfBuzzFace member.
  • platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp: Add missing include.
  • platform/graphics/freetype/FontPlatformDataFreeType.cpp:

(WebCore::FontPlatformData::operator=): Remove m_harfBuzzFace handling.
(WebCore::FontPlatformData::createOpenTypeMathHarfBuzzFont const): New funtction to create a hb_font_t for
OpenType math.

  • platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:

(WebCore::floatToHarfBuzzPosition): Moved from HarfBuzzFaceCairo.cpp.
(WebCore::doubleToHarfBuzzPosition): Ditto.
(WebCore::harfBuzzFontFunctions): Also moved from HarfBuzzFaceCairo.cpp, but implement get_nominal/variation
functions when using HarfBuzz >= 1.2.3 and use Font::glyphForCharacter() to make it simpler.
(WebCore::fontFeatures): Moved from HarfBuzzFaceCairo.cpp.
(WebCore::findScriptForVerticalGlyphSubstitution): Moved from HarfBuzzFace.cpp.
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Create the HarfBuzz face and font here.

  • platform/graphics/harfbuzz/HarfBuzzFace.cpp: Removed.
  • platform/graphics/harfbuzz/HarfBuzzFace.h: Removed.
  • platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp: Removed.
  • platform/graphics/harfbuzz/HbUniquePtr.h:

(WebCore::HbPtrDeleter<hb_face_t>::operator() const): Add deleter for hb_face_t.

  • platform/graphics/opentype/OpenTypeMathData.cpp:

(WebCore::OpenTypeMathData::OpenTypeMathData): Use FontPlatformData::createOpenTypeMathHarfBuzzFont().

LayoutTests:

Rebaseline test that now matches the firefox output.

  • platform/gtk/mathml/opentype/opentype-stretchy-expected.png:
  • platform/gtk/mathml/opentype/opentype-stretchy-expected.txt:
1:17 AM Changeset in webkit [239156] by Carlos Garcia Campos
  • 19 edits
    2 adds in trunk

[FreeType] Add initial implementation of variation fonts
https://bugs.webkit.org/show_bug.cgi?id=192151

Reviewed by Michael Catanzaro.

.:

Enable variation fonts in GTK+ port when required dependencies are available.

  • Source/cmake/OptionsGTK.cmake:

Source/WebCore:

  • css/CSSFontFaceSource.cpp:

(WebCore::CSSFontFaceSource::font): Remove platform ifdefs.

  • loader/cache/CachedFont.cpp:

(WebCore::CachedFont::platformDataFromCustomData): Ditto.

  • platform/graphics/FontPlatformData.h:

(WebCore::FontPlatformData::isFixedWidth const):

  • platform/graphics/cairo/FontCustomPlatformData.h: Use RefPtr for cairo_font_face_t.
  • platform/graphics/freetype/FontCacheFreeType.cpp:

(WebCore::getFontPropertiesFromPattern): Helper function to get several font properties from the fontconfig
pattern.
(WebCore::FontCache::systemFallbackForCharacters): Use getFontPropertiesFromPattern().
(WebCore::FontCache::createFontPlatformData): Pass FC_VARIABLE to the pattern and call buildVariationSettings()
before creating the FontPlatformData to set FC_FONT_VARIATIONS on the pattern.
(WebCore::defaultVariationValues): Parse font variations table.
(WebCore::buildVariationSettings): Build a font variations string from the settings that can be passed to cairo.

  • platform/graphics/freetype/FontCacheFreeType.h: Added.
  • platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:

(WebCore::FontCustomPlatformData::FontCustomPlatformData): Use RefPtr and make freeTypeFaceKey global.
(WebCore::FontCustomPlatformData::~FontCustomPlatformData): Remove explicit destroy.
(WebCore::defaultFontconfigOptions): Moved here from FontCacheFreeType.
(WebCore::FontCustomPlatformData::fontPlatformData): Call buildVariationSettings() before creating the
FontPlatformData to set FC_FONT_VARIATIONS on the pattern.
(WebCore::FontCustomPlatformData::supportsFormat): Add variation formats.

  • platform/graphics/freetype/FontPlatformDataFreeType.cpp:

(WebCore::setCairoFontOptionsFromFontConfigPattern): Call cairo_font_options_set_variations() with the
FC_FONT_VARIATIONS value from the pattern.
(WebCore::FontPlatformData::FontPlatformData): Use a single constructor that always receives a valid fontconfig
pattern.
(WebCore::FontPlatformData::fcPattern const): Return the fontconfig pattern.
(WebCore::FontPlatformData::platformIsEqual const): Update the condition now that m_pattern can't be nullptr.
(WebCore::FontPlatformData::buildScaledFont): Use m_pattern unconditionally.

  • platform/graphics/freetype/SimpleFontDataFreeType.cpp:

(WebCore::Font::platformCreateScaledFont const): Update it to use the new FontPlatformData constructor.

  • platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp:

(WebCore::HarfBuzzFace::createFont): Pass variations to HarfBuzz.

  • platform/graphics/win/FontCustomPlatformData.cpp:

(WebCore::FontCustomPlatformData::fontPlatformData):

  • platform/graphics/win/FontCustomPlatformData.h:

Tools:

Add cairo patch to avoid crashes.

  • gtk/jhbuild.modules:
  • gtk/patches/cairo-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch: Added.

LayoutTests:

Unskip variation fonts tests that are now passing in GTK+ port.

  • platform/gtk/TestExpectations:
12:37 AM Changeset in webkit [239155] by yusukesuzuki@slowstart.org
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, build fix after r239153, part 2
https://bugs.webkit.org/show_bug.cgi?id=190047

  • runtime/StructureRareDataInlines.h:

(JSC::StructureRareData::cachedOwnKeys const):

12:06 AM Changeset in webkit [239154] by yusukesuzuki@slowstart.org
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, build fix after r239153
https://bugs.webkit.org/show_bug.cgi?id=190047

  • runtime/StructureRareDataInlines.h:

(JSC::StructureRareData::cachedOwnKeys const):

Dec 12, 2018:

11:13 PM Changeset in webkit [239153] by yusukesuzuki@slowstart.org
  • 34 edits
    6 adds in trunk

[JSC] Optimize Object.keys by caching own keys results in StructureRareData
https://bugs.webkit.org/show_bug.cgi?id=190047

Reviewed by Keith Miller.

JSTests:

  • stress/object-keys-cached-zero.js: Added.

(shouldBe):
(test):

  • stress/object-keys-changed-attribute.js: Added.

(shouldBe):
(test):

  • stress/object-keys-changed-index.js: Added.

(shouldBe):
(test):

  • stress/object-keys-changed.js: Added.

(shouldBe):
(test):

  • stress/object-keys-indexed-non-cache.js: Added.

(shouldBe):
(test):

  • stress/object-keys-overrides-get-property-names.js: Added.

(shouldBe):
(test):
(noInline):

Source/JavaScriptCore:

Object.keys is one of the most frequently used function in web-tooling-benchmarks (WTB).
Object.keys is dominant in lebab of WTB, and frequently called in babel and others.
Since our Structure knows the shape of JSObject, we can cache the result of Object.keys
in Structure (StructureRareData) as we cache JSPropertyNameEnumerator in StructureRareData.

This patch caches the result of Object.keys in StructureRareData. The cached array is created
as JSImmutableButterfly. And Object.keys creates CoW from this data. Currently, the lifetime
strategy of this JSImmutableButterfly is the same to cached JSPropertyNameEnumerator. It is
referenced from Structure, and collected when Structure is collected.

This improves several benchmarks in SixSpeed.

baseline patched

object-assign.es5 350.1710+-3.6303 226.0368+-4.7558 definitely 1.5492x faster
for-of-object.es6 269.1941+-3.3430 127.9317+-2.3875 definitely 2.1042x faster

And it improves WTB lebab by 11.8%.

Before: lebab: 6.10 runs/s
After: lebab: 6.82 runs/s

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGNode.cpp:

(JSC::DFG::Node::convertToNewArrayBuffer):

  • dfg/DFGNode.h:
  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileObjectKeys):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

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

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileObjectKeys):

  • runtime/Intrinsic.cpp:

(JSC::intrinsicName):

  • runtime/Intrinsic.h:
  • runtime/JSImmutableButterfly.h:

(JSC::JSImmutableButterfly::createSentinel):

  • runtime/ObjectConstructor.cpp:

(JSC::ownPropertyKeys):

  • runtime/Structure.cpp:

(JSC::Structure::canCachePropertyNameEnumerator const):

  • runtime/Structure.h:
  • runtime/StructureInlines.h:

(JSC::Structure::setCachedOwnKeys):
(JSC::Structure::cachedOwnKeys const):
(JSC::Structure::canCacheOwnKeys const):

  • runtime/StructureRareData.cpp:

(JSC::StructureRareData::visitChildren):
(JSC::StructureRareData::cachedPropertyNameEnumerator const): Deleted.
(JSC::StructureRareData::setCachedPropertyNameEnumerator): Deleted.

  • runtime/StructureRareData.h:
  • runtime/StructureRareDataInlines.h:

(JSC::StructureRareData::cachedPropertyNameEnumerator const):
(JSC::StructureRareData::setCachedPropertyNameEnumerator):
(JSC::StructureRareData::cachedOwnKeys const):
(JSC::StructureRareData::cachedOwnKeysConcurrently const):
(JSC::StructureRareData::setCachedOwnKeys):
(JSC::StructureRareData::previousID const): Deleted.

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
10:51 PM Changeset in webkit [239152] by Fujii Hironori
  • 3 edits in trunk/Source/WebKitLegacy/win

[Win][Clang][WebKitLegacy] warning: expected a qualified name after 'typename' of COMEnumVariant and COMPropertyBag
https://bugs.webkit.org/show_bug.cgi?id=192617

Reviewed by Alex Christensen.

  • COMEnumVariant.h:

(COMEnumVariant<ContainerType>::adopt): Removed 'typename' from non dependent names.
(COMEnumVariant<ContainerType>::createInstance): Ditto.
(COMEnumVariant<ContainerType>::Next): Prepend 'typename' for dependent names.

  • COMPropertyBag.h:

(HashType>::createInstance): Removed 'typename' from non dependent names.
(HashType>::adopt): Ditto.
(HashType>::Read): Replaced dependent name 'HashMapType::const_iterator' with 'auto'.
(HashType>::GetPropertyInfo): Ditto.

10:44 PM Changeset in webkit [239151] by Fujii Hironori
  • 65 edits in trunk

[Win][Clang][WebKitLegacy] WebFrame.cpp: warning: delete called on non-final 'WebFrame' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
https://bugs.webkit.org/show_bug.cgi?id=192618

Reviewed by Alex Christensen.

Source/WebCore:

No new tests, no behavior changes.

  • platform/win/PopupMenuWin.h:
  • platform/win/WCDataObject.cpp:
  • platform/win/WCDataObject.h:

Source/WebKitLegacy/win:

Classes which implement COM interface usually doesn't need the
virtual destructor because it has Release() virtual method to
destruct itself.

Marked 'final' such classes to suppress clang-cl's compilation
warnings.

  • COMEnumVariant.h:
  • COMPropertyBag.h:
  • DefaultDownloadDelegate.h:
  • DefaultPolicyDelegate.h:
  • MemoryStream.h:
  • WebActionPropertyBag.h:
  • WebApplicationCache.h:
  • WebArchive.h:
  • WebBackForwardList.h:
  • WebCache.h:
  • WebCoreStatistics.h:
  • WebCoreSupport/WebEditorClient.cpp:
  • WebCoreSupport/WebInspectorDelegate.h:
  • WebDataSource.h:
  • WebDatabaseManager.cpp:
  • WebDatabaseManager.h:
  • WebDownload.h:
  • WebDropSource.h:
  • WebElementPropertyBag.h:
  • WebError.h:
  • WebFrame.cpp:
  • WebFrame.h:
  • WebFramePolicyListener.h:
  • WebGeolocationPolicyListener.h:
  • WebGeolocationPosition.h:
  • WebHTMLRepresentation.h:
  • WebHistory.h:
  • WebHistoryItem.h:
  • WebInspector.h:
  • WebJavaScriptCollector.h:
  • WebKitClassFactory.h:
  • WebKitMessageLoop.h:
  • WebKitStatistics.h:
  • WebMutableURLRequest.h:
  • WebNavigationData.h:
  • WebNotification.h:
  • WebNotificationCenter.h:
  • WebPreferences.h:
  • WebResource.h:
  • WebScriptWorld.h:
  • WebSecurityOrigin.h:
  • WebSerializedJSValue.h:
  • WebTextRenderer.h:
  • WebURLAuthenticationChallenge.h:
  • WebURLAuthenticationChallengeSender.h:
  • WebURLCredential.h:
  • WebURLProtectionSpace.h:
  • WebURLResponse.h:
  • WebUserContentURLPattern.h:
  • WebView.cpp:
  • WebView.h:
  • WebWorkersPrivate.h:

Tools:

  • DumpRenderTree/win/DRTDataObject.cpp:
  • DumpRenderTree/win/DRTDataObject.h:
  • DumpRenderTree/win/DRTDesktopNotificationPresenter.h:
  • DumpRenderTree/win/DRTDropSource.h:
  • DumpRenderTree/win/EditingDelegate.h:
  • DumpRenderTree/win/PolicyDelegate.h:
  • DumpRenderTree/win/UIDelegate.h:
8:46 PM Changeset in webkit [239150] by Simon Fraser
  • 3 edits
    2 adds in trunk

REGRESSION (r238090): CAPCHA UI jumps to the wrong location
https://bugs.webkit.org/show_bug.cgi?id=192651
rdar://problem/46531919

Reviewed by Zalan Bujtas.

Source/WebCore:

When a RenderLayer becomes non-composited because of a style change, we need to set a dirty
bit to say that descendants need their geometry updated (because they now have to
compute their positions relative to a different ancestor). This wasn't happening
in the layerStyleChanged() code path.

In the code path that did do this correctly (in the computeCompositingRequirements() tree walk),
we can address a FIXME and only dirty direct children, not all descendants (that code was
written before the child-only dirty bit existed).

Test: compositing/geometry/update-child-geometry-on-compositing-change.html

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::layerStyleChanged):

LayoutTests:

Testcase that makes an intermediate layer non-composited (but still a RenderLayer).

  • compositing/geometry/update-child-geometry-on-compositing-change-expected.html: Added.
  • compositing/geometry/update-child-geometry-on-compositing-change.html: Added.
7:54 PM Changeset in webkit [239149] by rniwa@webkit.org
  • 10 edits in trunk

Make TextInputController.legacyAttributedString take DOM nodes and offsets
https://bugs.webkit.org/show_bug.cgi?id=192653

Reviewed by Wenson Hsieh.

Source/WebCore:

No new tests since there should be no observable behavioral change other than
TextInputController API in DumpRenderTree.

  • editing/cocoa/HTMLConverter.h:
  • editing/cocoa/HTMLConverter.mm:

(WebCore::attributedStringFromSelection):
(WebCore::attributedStringBetweenStartAndEnd): Added.

Source/WebKitLegacy/mac:

  • WebView/WebHTMLView.mm:

(-[WebHTMLView _legacyAttributedStringFrom:offset:to:offset:]):

Tools:

Updated TextInputController.legacyAttributedString to take DOM nodes and offsets instead of
a DOM Range object in preparation to add layout tests for HTMLConverter which crosses
shadow boundaries.

  • DumpRenderTree/mac/TextInputControllerMac.m:

(+[TextInputController isSelectorExcludedFromWebScript:]): Updated the selector signature.
(+[TextInputController webScriptNameForSelector:]): Ditto.
(-[TextInputController legacyAttributedString:offset:to:offset:]): Made this function take
start node and offset then end node and offset pairs.

LayoutTests:

Updated the tests per API change.

  • editing/mac/attributed-string/attribute-string-for-copy-with-color-filter.html:
  • editing/mac/attributed-string/resources/dump-attributed-string.js:

(dumpAttributedString):

7:21 PM Changeset in webkit [239148] by Chris Fleizach
  • 4 edits in trunk/Source/WebKit

[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
https://bugs.webkit.org/show_bug.cgi?id=192449
<rdar://problem/46595508>

Reviewed by Darin Adler.

Part 5: Files in WebProcess folder.

  • WebProcess/Cache/WebCacheStorageConnection.cpp:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:

(mediaTimeToCurrentTime):
(-[WKAnimationDelegate initWithLayerID:layerTreeHost:]):

  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:

(-[WKAccessibilityWebPageObject accessibilityHitTest:]):

7:15 PM Changeset in webkit [239147] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Fix macOS builds after r239145.

  • platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
6:35 PM Changeset in webkit [239146] by Simon Fraser
  • 4 edits
    4 adds in trunk

REGRESSION (r238357): Pins on Yelp map disappear
https://bugs.webkit.org/show_bug.cgi?id=192597
rdar://problem/46578285

Reviewed by Zalan Bujtas.
Source/WebCore:

RenderLayerCompositor::updateBackingAndHierarchy() had a bug where if a RenderLayer gained
a negative z-order child (triggering creation of a foreground layer), we'd fail to
call the "setChildren()" with the vector containing that foreground layer.

When updateBackingAndHierarchy() stops visiting descendants because none are composited,
it may still have to update the child list with the foreground layer, so make sure
the code handles this case.

Tests: compositing/z-order/add-negative-z-child.html

compositing/z-order/rebuild-sibling-of-layer-with-foreground-layer.html

  • rendering/RenderLayer.cpp:

(WebCore::outputPaintOrderTreeRecursive):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateBackingAndHierarchy):

LayoutTests:

Add tests that toggle negative z-index on a child, with and without sibling compositing layers.

  • compositing/z-order/add-negative-z-child-expected.html: Added.
  • compositing/z-order/add-negative-z-child.html: Added.
  • compositing/z-order/rebuild-sibling-of-layer-with-foreground-layer-expected.html: Added.
  • compositing/z-order/rebuild-sibling-of-layer-with-foreground-layer.html: Added.
6:34 PM Changeset in webkit [239145] by commit-queue@webkit.org
  • 15 edits
    2 copies
    5 adds in trunk

Implement non-timeslice mode encoding for MediaRecorder
https://bugs.webkit.org/show_bug.cgi?id=192069
<rdar://problem/46443290>

Patch by YUHAN WU <yuhan_wu@apple.com> on 2018-12-12
Reviewed by Eric Carlson.

Source/WebCore:

Implement the encoding for non-timeslice mode of MediaRecorder.
It only supports to record MP4 file through H264 and AAC encoding, we will need to support more MIME types and encoding methods.
Add a API in internals to allow testings to turn on the mock source.

Test: http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable.html

  • Modules/mediarecorder/MediaRecorder.cpp:

(WebCore::MediaRecorder::create):
(WebCore::MediaRecorder::setCustomPrivateRecorderCreator):
(WebCore::MediaRecorder::getPrivateImpl):
(WebCore::MediaRecorder::MediaRecorder):
(WebCore::MediaRecorder::stopRecording):
(WebCore::MediaRecorder::stopRecordingInternal):
(WebCore::MediaRecorder::createRecordingDataBlob):
(WebCore::MediaRecorder::scheduleDeferredTask):

  • Modules/mediarecorder/MediaRecorder.h:
  • Modules/mediarecorder/MediaRecorder.idl:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/mediarecorder/MediaRecorderPrivate.h:

(WebCore::MediaRecorderPrivate::stopRecording):

  • platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp: Added.

(WebCore::MediaRecorderPrivateAVFImpl::create):
(WebCore::MediaRecorderPrivateAVFImpl::MediaRecorderPrivateAVFImpl):
(WebCore::MediaRecorderPrivateAVFImpl::sampleBufferUpdated):
(WebCore::MediaRecorderPrivateAVFImpl::audioSamplesAvailable):
(WebCore::MediaRecorderPrivateAVFImpl::stopRecording):
(WebCore::MediaRecorderPrivateAVFImpl::fetchData):
(WebCore::MediaRecorderPrivateAVFImpl::mimeType):

  • platform/mediarecorder/MediaRecorderPrivateAVFImpl.h: Added.
  • platform/mediarecorder/MediaRecorderPrivateMock.cpp:

(WebCore::MediaRecorderPrivateMock::fetchData):
(WebCore::MediaRecorderPrivateMock::mimeType):

  • platform/mediarecorder/MediaRecorderPrivateMock.h:
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h: added.
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm: Added.

(WebCore::MediaRecorderPrivateWriter::clear):
(WebCore::MediaRecorderPrivateWriter::setupWriter):
(WebCore::MediaRecorderPrivateWriter::setVideoInput):
(WebCore::MediaRecorderPrivateWriter::setAudioInput):
(WebCore::copySampleBufferWithCurrentTimeStamp):
(WebCore::MediaRecorderPrivateWriter::appendVideoSampleBuffer):
(WebCore::MediaRecorderPrivateWriter::appendAudioSampleBuffer):
(WebCore::MediaRecorderPrivateWriter::stopRecording):

  • testing/Internals.cpp:

(WebCore::createRecorderMockSource):
(WebCore::Internals::setCustomPrivateRecorderCreator):

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

LayoutTests:

Create new tests for encoding of MediaRecorder. Check if the produced video and audio are correct.
Add code to turn on the mock source of MediaRecorder for the two old tests because the real source is enabled by default.

  • http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable-expected.txt: Added.
  • http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable.html: Added.
  • http/wpt/mediarecorder/MediaRecorder-dataavailable.html:
  • http/wpt/mediarecorder/MediaRecorder-mock-dataavailable.html:
6:28 PM Changeset in webkit [239144] by Ross Kirsling
  • 2 edits in trunk/Source/WebKit

[MSVC] Unreviewed build fix for r239080.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didFailToSuspendAfterProcessSwap):

6:19 PM Changeset in webkit [239143] by Chris Fleizach
  • 8 edits in trunk/Source/WebKit

[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
https://bugs.webkit.org/show_bug.cgi?id=192449
<rdar://problem/46595508>

Reviewed by Darin Adler.

Part 4: Handling NetworkProcess folder.

  • NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
  • NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
  • NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
  • NetworkProcess/ios/NetworkProcessIOS.mm:
  • NetworkProcess/mac/NetworkProcessMac.mm:
  • NetworkProcess/mac/RemoteNetworkingContext.mm:
6:09 PM Changeset in webkit [239142] by yusukesuzuki@slowstart.org
  • 21 edits
    4 adds in trunk

[DFG][FTL] Add NewSymbol
https://bugs.webkit.org/show_bug.cgi?id=192620

Reviewed by Saam Barati.

JSTests:

  • microbenchmarks/symbol-creation.js: Added.

(test):

  • stress/symbol-description-identity.js: Added.

(shouldBe):
(test):

  • stress/symbol-identity.js: Added.

(shouldBe):
(test):

  • stress/symbol-with-description-throw-error.js: Added.

(shouldBe):
(shouldThrow):
(test):
(object.toString):

Source/JavaScriptCore:

This patch introduces NewSymbol DFG node into DFG and FTL tiers. The main goal of this patch is not optimize
NewSymbol code faster. Rather than that, this patch intends to offer SpecSymbol type information into DFG's
data flow to optimize generated code in FTL backend.

We add NewSymbol DFG node, which may take an argument. If an argument is not given, NewSymbol is for Symbol().
If an argument is given, ToString is emitted to this argument before passing it to NewSymbol. So NewSymbol node
itself does not perform any type checks. ToString performs effects, but NewSymbol doesn't have any side observable
effects. So we can decouple Symbol(description) call into NewSymbol(ToString(description)).

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleConstantInternalFunction):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGClobbersExitState.cpp:

(JSC::DFG::clobbersExitState):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGMayExit.cpp:
  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileNewSymbol):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGStoreBarrierInsertionPhase.cpp:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileNewSymbol):

6:01 PM Changeset in webkit [239141] by yusukesuzuki@slowstart.org
  • 5 edits
    3 adds in trunk

[BigInt] Implement DFG/FTL typeof for BigInt
https://bugs.webkit.org/show_bug.cgi?id=192619

Reviewed by Keith Miller.

JSTests:

  • stress/big-int-boolean-proven-type.js: Added.

(assert):
(bool):

  • stress/big-int-type-of-proven-type-non-constant-including-symbol.js: Added.

(assert):
(typeOf):
(i.switch):

  • stress/big-int-type-of-proven-type-non-constant.js: Added.

(assert):
(typeOf):

  • stress/big-int-type-of.js:

(typeOf):
(func):

Source/JavaScriptCore:

This patch implements typeof for BigInt in DFG and FTL. Our DFG and FTL tiers now correctly consider about BigInt
in the code generated for typeof.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::boolify): We add (SpecCell - SpecString) type filter for proven type since isString
check is already performed here.
(JSC::FTL::DFG::LowerDFGToB3::buildTypeOf): We use (SpecCell - SpecObject - SpecString) type filter for proven type
since String and Object are already checked here. If we know the proven type does not include Symbol type here, we
can omit the code for Symbol type.

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::emitTypeOf):

5:32 PM Changeset in webkit [239140] by Chris Fleizach
  • 2 edits in trunk/Source/WebKit

[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
https://bugs.webkit.org/show_bug.cgi?id=192449
<rdar://problem/46595508>

Reviewed by Tim Horton.

Fix iosmac build.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _hoverGestureRecognizerChanged:]):

5:26 PM Changeset in webkit [239139] by Justin Fan
  • 28 edits
    13 copies
    2 moves
    3 adds in trunk

[WebGPU] Vertex buffers and WebGPUInputState
https://bugs.webkit.org/show_bug.cgi?id=192611

Reviewed by Dean Jackson.

Source/WebCore:

Test: webgpu/vertex-buffer-triangle-strip.html

Basic implementation of vertex buffers with Metal shading language in WebGPU. In
WebGPURenderPipelineDescriptor, refactor to match updated shader stage structure and add
WebGPUInputStateDescriptor. Also implement WebGPURenderPassEncoder::setVertexBuffers.

Add symbols and files for WebGPUIndexFormat, WebGPUInputStateDescriptor, WebGPUInputStepMode,
WebGPUVertexAttributeDescriptor, WebGPUVertexFormat, WebGPUVertexInputDescriptor:

  • CMakeLists.txt:
  • DerivedSources.make:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/WebCoreBuiltinNames.h:

Add and implement interfaces and dictionaries for WebGPUInputState:

  • Modules/webgpu/WebGPUBuffer.cpp:

(WebCore::WebGPUBuffer::WebGPUBuffer):

  • Modules/webgpu/WebGPUBuffer.h:

(WebCore::WebGPUBuffer::buffer const): Added getter for backing GPUBuffer.

  • Modules/webgpu/WebGPUBufferDescriptor.h:
  • Modules/webgpu/WebGPUBufferDescriptor.idl: Moving WebGPUBufferUsage out into its own IDL.
  • Modules/webgpu/WebGPUDevice.h:
  • Modules/webgpu/WebGPUIndexFormat.h: Added.
  • Modules/webgpu/WebGPUIndexFormat.idl: Added.
  • Modules/webgpu/WebGPUInputStateDescriptor.h: Added.
  • Modules/webgpu/WebGPUInputStateDescriptor.idl: Added.
  • Modules/webgpu/WebGPUInputStepMode.h: Added.
  • Modules/webgpu/WebGPUInputStepMode.idl: Added.
  • Modules/webgpu/WebGPUVertexAttributeDescriptor.h: Added.
  • Modules/webgpu/WebGPUVertexAttributeDescriptor.idl: Added.
  • Modules/webgpu/WebGPUVertexFormat.h: Added.
  • Modules/webgpu/WebGPUVertexFormat.idl: Added.
  • Modules/webgpu/WebGPUVertexInputDescriptor.h: Added.
  • Modules/webgpu/WebGPUVertexInputDescriptor.idl: Added.
  • platform/graphics/gpu/GPUInputStateDescriptor.h: Added.
  • platform/graphics/gpu/GPURenderPassEncoder.h: Added.
  • platform/graphics/gpu/GPURenderPipelineDescriptor.h: Added.
  • platform/graphics/gpu/GPUVertexAttributeDescriptor.h: Added.
  • platform/graphics/gpu/GPUVertexInputDescriptor.h: Added.

Refactor to support updated structure of pipeline descriptor in sketch IDL:

  • Modules/webgpu/WebGPUDevice.cpp:

(WebCore::validateAndConvertPipelineStage):
(WebCore::WebGPUDevice::createRenderPipeline const):

  • Modules/webgpu/WebGPUPipelineDescriptorBase.h:
  • Modules/webgpu/WebGPUPipelineDescriptorBase.idl:
  • Modules/webgpu/WebGPUPipelineStageDescriptor.h:
  • Modules/webgpu/WebGPUPipelineStageDescriptor.idl:
  • Modules/webgpu/WebGPURenderPipelineDescriptor.h:
  • Modules/webgpu/WebGPURenderPipelineDescriptor.idl:
  • Modules/webgpu/WebGPUShaderStage.*: Removed.

Add and implement setVertexBuffers:

  • Modules/webgpu/WebGPURenderPassEncoder.cpp:

(WebCore::WebGPURenderPassEncoder::setVertexBuffers): Added.

  • Modules/webgpu/WebGPURenderPassEncoder.h:
  • Modules/webgpu/WebGPURenderPassEncoder.idl:
  • platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:

(WebCore::GPURenderPassEncoder::setVertexBuffers):

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

(WebCore::setInputStateForPipelineDescriptor):
(WebCore::GPURenderPipeline::create):

LayoutTests:

Added variation of simple-triangle-strip to use a vertex buffer. Refactored aforementioned
test to share code with new test.

  • webgpu/js/basic-webgpu-functions.js:

(setUpPipelineDescriptor):

  • webgpu/js/webgpu-functions.js: Added.

(async.getBasicDevice):
(createBasicContext):
(createBasicPipeline):
(beginBasicRenderPass):

  • webgpu/render-pipelines-expected.txt:
  • webgpu/render-pipelines.html:
  • webgpu/simple-triangle-strip.html:
  • webgpu/vertex-buffer-triangle-strip-expected.html: Added.
  • webgpu/vertex-buffer-triangle-strip.html: Added.
5:23 PM Changeset in webkit [239138] by commit-queue@webkit.org
  • 2 edits
    1 move
    6 adds
    1 delete in trunk/LayoutTests

REGRESSION: [ MacOS iOS ] Layout Test http/wpt/resource-timing/rt-revalidate-requests.html is flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=191207
<rdar://problem/45818891>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2018-12-12
Reviewed by Devin Rousso.

Splitting this test up into separate tests eliminated flakiness
and timeouts for my system that would occasionally encounter them.

Remove expectation for the test now that splitting up eliminated flakiness so far.

  • http/wpt/resource-timing/resources/rt-revalidate-utilities.sub.js

Common code for the split out tests.

  • http/wpt/resource-timing/rt-revalidate-requests-1-expected.txt: Added.
  • http/wpt/resource-timing/rt-revalidate-requests-1.html: Added.
  • http/wpt/resource-timing/rt-revalidate-requests-2-expected.txt: Added.
  • http/wpt/resource-timing/rt-revalidate-requests-2.html: Added.
  • http/wpt/resource-timing/rt-revalidate-requests-3-expected.txt: Added.
  • http/wpt/resource-timing/rt-revalidate-requests-3.html: Added.
  • http/wpt/resource-timing/rt-revalidate-requests.html: Removed.
  • http/wpt/resource-timing/rt-revalidate-requests-expected.txt: Removed.

Split out into separate tests.

5:19 PM Changeset in webkit [239137] by Chris Dumez
  • 5 edits in trunk/LayoutTests

[Mojave Release Wk2] Layout Test http/tests/cache/disk-cache/disk-cache-validation-attachment.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=190323
<rdar://problem/45056253>

Reviewed by Youenn Fablet.

  • http/tests/cache/disk-cache/disk-cache-validation-attachment-expected.txt:
  • http/tests/cache/disk-cache/disk-cache-validation-attachment.html:

Simplify test a bit to only test the header combinations it cares about.

  • http/tests/cache/disk-cache/resources/cache-test.js:

(runTestsNow):
(runTests):
The flakiness was due to logic in CachedResourceLoader::determineRevalidationPolicy() which more aggressively
reuses cached resources (bypassing freshness checks) until the load event has fired. This means that the
test would give different results depending on whether or not the load event had a chance to fire before
we do the checks. To address the issue, update runTests() to wait for the load event if it has not yet
fired. This will likely address flakiness in other disk-cache tests as well.

  • platform/mac-wk2/TestExpectations:

Unskip test that is no longer flaky.

5:13 PM Changeset in webkit [239136] by youenn@apple.com
  • 7 edits
    2 adds in trunk

Recycling the m section should work if it was rejected remotely
https://bugs.webkit.org/show_bug.cgi?id=192636

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

Changes merged from https://webrtc.googlesource.com/src.git/+/5c72e71e14cfa76a2d1b0979d6b918abe187c208

  • Source/webrtc/pc/mediasession.cc:
  • Source/webrtc/pc/mediasession.h:
  • Source/webrtc/pc/mediasession_unittest.cc:
  • Source/webrtc/pc/peerconnection.cc:
  • Source/webrtc/pc/peerconnection_jsep_unittest.cc:

LayoutTests:

  • webrtc/msection-recycling-expected.txt: Added.
  • webrtc/msection-recycling.html: Added.
4:48 PM Changeset in webkit [239135] by timothy_horton@apple.com
  • 5 edits in trunk

REGRESSION (r237565): >20 Find in Page highlights in one tile results in a single giant highlight
https://bugs.webkit.org/show_bug.cgi?id=192642
<rdar://problem/46498246>

Reviewed by Geoffrey Garen.

Source/WebCore:

No new tests; adjusted an existing test instead.

  • platform/graphics/PathUtilities.cpp:

(WebCore::PathUtilities::pathsWithShrinkWrappedRects):
Instead of uniting when we fail to shrink-wrap, just return the original rects.
This seems like a more reasonable default in most cases.

LayoutTests:

  • fast/shrink-wrap/rect-shrink-wrap-expected.html:
  • fast/shrink-wrap/rect-shrink-wrap.html:

Add a test case with >20 tiny rects.

4:41 PM Changeset in webkit [239134] by achristensen@apple.com
  • 12 edits in trunk

Implement safe browsing in WebKit on WatchOS
https://bugs.webkit.org/show_bug.cgi?id=192641
<rdar://problem/46376188>

Reviewed by Geoff Garen.

Source/WebKit:

WatchOS has a few special requirements:

  1. The margin size needs to be smaller and the title font smaller to fit on the screen.
  2. The exclamation point cannot be beside the title or it won't fit on the screen. I put it above the title.
  3. The application must be told when the safe browsing warning has been shown. I added a new delegate callback.
  4. The UIScrollView's contentSize must be set even before the details are shown to be able to scroll down to the buttons. This was already an issue on small WKWebViews on iOS, so this fixes both operating systems.
  • Configurations/WebKit.xcconfig:
  • UIProcess/API/APIUIClient.h:

(API::UIClient::didShowSafeBrowsingWarning):

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

(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::didShowSafeBrowsingWarning):

  • UIProcess/Cocoa/WKSafeBrowsingWarning.mm:

(fontOfSize):
(buttonSize):
(-[WKSafeBrowsingWarning addContent]):
(-[WKSafeBrowsingWarning showDetailsClicked]):
(-[WKSafeBrowsingWarning updateContentSize]):
(buttonWidth): Deleted.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::decidePolicyForNavigationAction):

Source/WTF:

  • wtf/Platform.h:

WatchOS has safe browsing, too!

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:

(-[SafeBrowsingNavigationDelegate _webViewDidShowSafeBrowsingWarning:]):
(safeBrowsingView):
Add a test that the new delegate callback is called.

4:30 PM Changeset in webkit [239133] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

Unreviewed, rolling out r239129 and r239131.
https://bugs.webkit.org/show_bug.cgi?id=192646

Casued macOS and iOS Debug testing to fail early (Requested by
Truitt on #webkit).

Reverted changesets:

"Unreviewed build fix for WinCairo Debug after r239080(?)."
https://trac.webkit.org/changeset/239129

"Unreviewed fix for Cocoa Debug test instability following
r239129."
https://trac.webkit.org/changeset/239131

3:57 PM Changeset in webkit [239132] by commit-queue@webkit.org
  • 9 edits in trunk/Source

HTTPS Upgrade: Figure out if/how to tell clients that the HTTPS upgrade happened
https://bugs.webkit.org/show_bug.cgi?id=192375
<rdar://problem/45851159>

Patch by Vivek Seth <v_seth@apple.com> on 2018-12-12
Reviewed by Chris Dumez.

Use simulated redirect to tell clients that HTTPS Upgrade happened.

Source/WebCore:

  • platform/network/ResourceResponseBase.cpp:

(WebCore::ResourceResponseBase::syntheticRedirectResponse):

  • platform/network/ResourceResponseBase.h:
  • platform/network/mac/WebCoreURLResponse.mm:

(WebCore::synthesizeRedirectResponseIfNecessary):

Source/WebKit:

  • NetworkProcess/NetworkLoadChecker.cpp:

(WebKit::NetworkLoadChecker::NetworkLoadChecker):
(WebKit::NetworkLoadChecker::checkRedirection):
(WebKit::NetworkLoadChecker::accessControlErrorForValidationHandler):
(WebKit::NetworkLoadChecker::applyHTTPSUpgradeIfNeeded const):
(WebKit::NetworkLoadChecker::checkRequest):
(WebKit::NetworkLoadChecker::continueCheckingRequestOrDoSyntheticRedirect):
(WebKit::NetworkLoadChecker::checkCORSRequestWithPreflight):
(WebKit::NetworkLoadChecker::applyHTTPSUpgradeIfNeeded): Deleted.

  • NetworkProcess/NetworkLoadChecker.h:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::start):

  • NetworkProcess/PingLoad.cpp:
3:42 PM Changeset in webkit [239131] by Ross Kirsling
  • 3 edits in trunk/Source/WebKit

Unreviewed fix for Cocoa Debug test instability following r239129.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didFailToSuspendAfterProcessSwap): Deleted.

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::didFailToSuspendAfterProcessSwap):
Move the whole assertion to the declaration site.

2:04 PM Changeset in webkit [239130] by Chris Dumez
  • 7 edits in trunk/Source

Add a preference to enable / disable devicemotion and deviceorientation events
https://bugs.webkit.org/show_bug.cgi?id=192631
<rdar://problem/46646244>

Reviewed by Geoffrey Garen.

Add setting to toggle support for the deviceorientation / devicemotion events:

Source/WebCore:

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::addEventListener):

  • page/Settings.yaml:

Source/WebKit:

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

(-[WKPreferences _setDeviceOrientationEventEnabled:]):
(-[WKPreferences _deviceOrientationEventEnabled]):

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1:44 PM Changeset in webkit [239129] by Ross Kirsling
  • 3 edits in trunk/Source/WebKit

Unreviewed build fix for WinCairo Debug after r239080(?).

MSVC gives a redefinition error if noreturn is specified on the definition instead of the declaration.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didFailToSuspendAfterProcessSwap):

  • UIProcess/WebPageProxy.h:

Move NO_RETURN_DUE_TO_ASSERT to the declaration site.

1:21 PM Changeset in webkit [239128] by Chris Fleizach
  • 7 edits in trunk/Source/WebKit

[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
https://bugs.webkit.org/show_bug.cgi?id=192449
<rdar://problem/46595508>

Reviewed by Darin Adler.

Part 2: UIProcess/Cocoa and UIProcess/ios folders.

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

(-[WKContentView _commonInitializationWithProcessPool:configuration:]):
(-[WKContentView initWithFrame:processPool:configuration:webView:]):
(-[WKContentView dealloc]):
(-[WKContentView page]):
(-[WKContentView updateFixedClippingView:]):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
(-[WKContentView _updateForScreen:]):
(-[WKContentView _accessibilityRegisterUIProcessTokens]):
(-[WKContentView _createDrawingAreaProxy]):
(-[WKContentView _didCommitLayerTree:]):
(-[WKContentView _wk_pageCountForPrintFormatter:]):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKFocusedElementInfo initWithAssistedNodeInformation:isUserInitiated:userObject:]):
(hasAssistedNode):
(-[WKContentView setupInteraction]):
(-[WKContentView positionInformation]):
(-[WKContentView _webTouchEventsRecognized:]):
(inflateQuad):
(-[WKContentView _updateTapHighlight]):
(-[WKContentView _showTapHighlight]):
(-[WKContentView _requiresKeyboardWhenFirstResponder]):
(-[WKContentView _displayFormNodeInputView]):
(-[WKContentView inputView]):
(-[WKContentView _actionForLongPressFromPositionInformation:]):
(-[WKContentView currentPositionInformation]):
(-[WKContentView doAfterPositionInformationUpdate:forRequest:]):
(-[WKContentView _currentPositionInformationIsValidForRequest:]):
(-[WKContentView _hasValidOutstandingPositionInformationRequest:]):
(-[WKContentView _currentPositionInformationIsApproximatelyValidForRequest:]):
(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView hasSelectablePositionAtPoint:]):
(-[WKContentView pointIsNearMarkedText:]):
(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
(-[WKContentView webSelectionRectsForSelectionRects:]):
(-[WKContentView _twoFingerSingleTapGestureRecognized:]):
(-[WKContentView _stylusSingleTapRecognized:]):
(-[WKContentView _singleTapCommited:]):
(-[WKContentView _attemptClickAtLocation:]):
(-[WKContentView _positionInformationDidChange:]):
(-[WKContentView requiresAccessoryView]):
(-[WKContentView supportedPasteboardTypesForCurrentSelection]):
(-[WKContentView _lookupForWebView:]):
(-[WKContentView _shareForWebView:]):
(-[WKContentView textStylingAtPosition:inDirection:]):
(-[WKContentView canPerformActionForWebView:withSender:]):
(-[WKContentView selectForWebView:]):
(-[WKContentView _accessibilityRetrieveRectsEnclosingSelectionOffset:withGranularity:]):
(-[WKContentView _accessibilityRetrieveRectsAtSelectionOffset:withText:completionHandler:]):
(toGestureType):
(toUIWKGestureType):
(toSelectionTouch):
(toUIWKSelectionTouch):
(toGestureRecognizerState):
(toUIGestureRecognizerState):
(toUIWKSelectionFlags):
(toWKTextGranularity):
(toWKSelectionDirection):
(selectionChangedWithGesture):
(selectionChangedWithTouch):
(-[WKContentView changeSelectionWithGestureAt:withGesture:withState:withFlags:]):
(-[WKContentView autocorrectionData]):
(-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
(-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
(-[WKContentView _updateAccessory]):
(-[WKContentView selectedTextRange]):
(-[WKContentView setMarkedText:selectedRange:]):
(coreWritingDirection):
(-[WKContentView closestPositionToPoint:]):
(-[WKContentView insertText:]):
(-[WKContentView textInputTraits]):
(-[WKContentView handleKeyWebEvent:]):
(-[WKContentView handleKeyWebEvent:withCompletionHandler:]):
(-[WKContentView isScrollableForKeyboardScrollViewAnimator:]):
(-[WKContentView keyboardScrollViewAnimator:distanceForIncrement:]):
(-[WKContentView assistedNodeInformation]):
(-[WKContentView assistedNodeSelectOptions]):
(isAssistableInputType):
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
(-[WKContentView _stopAssistingNode]):
(-[WKContentView updateCurrentAssistedNodeInformation:]):
(-[WKContentView presentViewControllerForCurrentAssistedNode]):
(-[WKContentView actionNameForFocusedFormControlView:]):
(-[WKContentView selectWordForReplacement]):
(-[WKContentView _updateChangedSelection:]):
(-[WKContentView _beginSuppressingSelectionAssistantForReason:]):
(-[WKContentView _stopSuppressingSelectionAssistantForReason:]):
(-[WKContentView _showPlaybackTargetPicker:fromRect:routeSharingPolicy:routingContextUID:]):
(-[WKContentView _showRunOpenPanel:resultListener:]):
(-[WKContentView _showShareSheet:completionHandler:]):
(-[WKContentView positionInformationForActionSheetAssistant:]):
(-[WKContentView updatePositionInformationForActionSheetAssistant:]):
(-[WKContentView _startDrag:item:]):
(-[WKContentView _didHandleAdditionalDragItemsRequest:]):
(-[WKContentView _didHandleStartDataInteractionRequest:]):
(dropOperationForWebCoreDragOperation):
(-[WKContentView dragDataForDropSession:dragDestinationAction:]):
(-[WKContentView _didConcludeEditDataInteraction:]):
(-[WKContentView _didPerformDragOperation:]):
(-[WKContentView _prepareToDragPromisedAttachment:]):
(-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationList:stagedDragSource:]):
(-[WKContentView _autofillContext]):
(-[WKContentView _dragInteraction:itemsForAddingToSession:withTouchAtPoint:completion:]):
(-[WKContentView _dragInteraction:prepareForSession:completion:]):
(-[WKContentView dragInteraction:itemsForBeginningSession:]):
(-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
(-[WKContentView dragInteraction:session:didEndWithOperation:]):
(-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
(-[WKContentView dropInteraction:performDrop:]):
(-[WKContentView dropInteraction:sessionDidEnd:]):
(-[WKContentView allowsLanguageSelectionMenuForListViewController:]):
(-[WKContentView shouldDisplayInputContextViewForListViewController:]):
(-[WKContentView numericInputModeForListViewController:]):
(-[WKContentView textContentTypeForListViewController:]):
(-[WKContentView allowsDictationInputForListViewController:]):
(-[WKContentView _simulateLongPressActionAtLocation:]):
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
(-[WKContentView _presentationRectsForPreviewItemController:]):

  • UIProcess/ios/fullscreen/WKFullScreenViewController.mm:

(WKFullScreenViewControllerPlaybackSessionModelClient::setInterface):
(WKFullScreenViewControllerVideoFullscreenModelClient::setInterface):
(WKFullScreenViewControllerVideoFullscreenModelClient::interface const):
(-[WKFullScreenViewController videoControlsManagerDidChange]):
(-[WKFullScreenViewController _manager]):
(-[WKFullScreenViewController _togglePiPAction:]):

  • UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:

(-[WKFullscreenAnimationController configureInitialAndFinalStatesForTransition:]):
(-[WKFullScreenWindowController isFullScreen]):
(-[WKFullScreenWindowController enterFullScreen]):
(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController exitFullScreen]):
(-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController _completedExitFullScreen]):
(-[WKFullScreenWindowController webViewDidRemoveFromSuperviewWhileInFullscreen]):
(-[WKFullScreenWindowController _exitFullscreenImmediately]):
(-[WKFullScreenWindowController _manager]):

1:20 PM Changeset in webkit [239127] by rniwa@webkit.org
  • 4 edits in trunk/Source/WebCore

Make HTMLConverter take two Positions in preparation to make it work with shadow DOM
https://bugs.webkit.org/show_bug.cgi?id=192613

Reviewed by Darin Adler.

This patch makes HTMLConverter store two Position's instead of a Range so that HTMLConverter can work with
a selection which spans across shadow boundaries in the future.

No new tests since there should be no observable behavioral change.

  • editing/cocoa/EditorCocoa.mm:

(WebCore::Editor::writeSelectionToPasteboard): Uses the newly introduced writeSelectionToPasteboard.
(WebCore::Editor::writeSelection): Ditto.

  • editing/cocoa/HTMLConverter.h:
  • editing/cocoa/HTMLConverter.mm:

(HTMLConverter::HTMLConverter): Now takes two Position's.
(HTMLConverter::convert): Updated to work with Position's.
(HTMLConverter::_processText): Ditto.
(HTMLConverter::_traverseNode): Ditto.
(HTMLConverter::_traverseFooterNode): Ditto.
(HTMLConverterCaches::cacheAncestorsOfStartToBeConverted): Ditto.
(WebCore::attributedStringFromRange): Ditto.
(WebCore::attributedStringFromSelection): Added. For now, we first create a Range via toNormalizedRange
in order to preserve the exact behavior.

12:43 PM Changeset in webkit [239126] by Alan Coon
  • 6 edits
    4 adds in tags/Safari-607.1.16.2

Cherry-pick r238946. rdar://problem/46364206

We should ignore minimumEffectiveDeviceWidth if the page specifies device-width in viewport meta-tag.
https://bugs.webkit.org/show_bug.cgi?id=192377
<rdar://problem/46364206>

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2018-12-06
Reviewed by Tim Horton.

Source/WebCore:

If the page specifies width=device-width or initial-scale=1 in the viewport meta tag, we should use the
native device width and ignore the minimum effective device width in ViewportConfiguration. The patch
also introduces scalableNativeWebpageParameters() which uses the device width as default and also allows the page
to shrink-to-fit. If a page doesn't have viewport meta tag, or if the width argument isn't device-width
and the initial scale isn't 1, we will use scalableNativeWebpageParameters() as the default configuration.

Tests: fast/viewport/ios/ignore-minimum-device-width-for-page-with-viewport-device-width.html

fast/viewport/ios/use-minimum-device-width-for-page-without-viewport-meta.html

  • page/ViewportConfiguration.cpp: (WebCore::ViewportConfiguration::updateDefaultConfiguration): pick the default configuration based on

the page's viewport arguments. Also, we will always fall back to scalableNativeWebpageParameters() if we
can ignore scaling constraints.

(WebCore::ViewportConfiguration::setViewportArguments): When page sends us new ViewportArguments, pick

up the correponsding default configuration before updating the configuration.

(WebCore::ViewportConfiguration::setCanIgnoreScalingConstraints): When m_canIgnoreScalingConstraints is

changed, try to pick up the correponsding default configuration.

(WebCore::ViewportConfiguration::scalableNativeWebpageParameters): Add a new default set of viewport Parameters

this is very close to nativeWebpageParameters() excpet that it allows shrink to fit and its minimum scale
is 0.25. We will use this Parameters for pages that doesn't have viewport meta tag; or the width is
not device-width and initial scale is not 1.

(WebCore::ViewportConfiguration::updateConfiguration): If the page's viewport argument doesn't override

the default width, use the m_minimumLayoutSize.width().

  • page/ViewportConfiguration.h: (WebCore::ViewportConfiguration::shouldIgnoreMinimumEffectiveDeviceWidth const): A helper method to tell

if we should avoid using minimum effective device width.

(WebCore::ViewportConfiguration::canOverrideConfigurationParameters const): If we are using a default

configuration that is neither nativeWebpageParameters() nor scalableNativeWebpageParameters(), don't override
it.

(WebCore::ViewportConfiguration::minimumEffectiveDeviceWidth const): Add a helper method to return minimum

effective device width based on shouldIgnoreMinimumEffectiveDeviceWidth().

(WebCore::ViewportConfiguration::effectiveLayoutSizeScaleFactor const): Use minimumEffectiveDeviceWidth().

Source/WebKit:

Since we are using page's viewport arguments to decide the default viewport parameters and
whether we can use mininum effective device width, we should always call setViewportArguments()
regardless of shouldIgnoreMetaViewport settings.

  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::viewportPropertiesDidChange): Always call setViewportArguments(). (WebKit::WebPage::didCommitLoad): Ditto.

LayoutTests:

  • fast/viewport/ios/ignore-minimum-device-width-for-page-with-viewport-device-width-expected.txt: Added.
  • fast/viewport/ios/ignore-minimum-device-width-for-page-with-viewport-device-width.html: Added.
  • fast/viewport/ios/use-minimum-device-width-for-page-without-viewport-meta-expected.txt: Added.
  • fast/viewport/ios/use-minimum-device-width-for-page-without-viewport-meta.html: Added.

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

12:43 PM Changeset in webkit [239125] by Alan Coon
  • 9 edits
    6 adds in tags/Safari-607.1.16.2

Cherry-pick r238814. rdar://problem/46046013

[iOS] Do not handle key events that are key commands
https://bugs.webkit.org/show_bug.cgi?id=191608
<rdar://problem/46046013>

Reviewed by Ryosuke Niwa.

Source/WebKit:

A key down event may be associated with a key command. If it is then we want to execute the
key command instead of inserting or deleting text. We need to ask UIKit to handle the current
event as a key command to find out.

  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _interpretKeyEvent:isCharEvent:]): Ask UIKit to handle the current event as a key command. If it handles it then we're done. Otherwise, do what we do now.

Source/WebKitLegacy/ios:

Add default implementation of -handleKeyCommandForCurrentEvent that returns NO - the current
event was not handled as a key command.

  • DefaultDelegates/WebDefaultUIKitDelegate.m: (-[WebDefaultUIKitDelegate handleKeyCommandForCurrentEvent]):
  • WebView/WebUIKitDelegate.h:

Source/WebKitLegacy/mac:

A key down event may be associated with a key command. If it is then we want to execute the
key command instead of inserting or deleting text. We need to ask UIKit to handle the current
event as a key command to find out.

  • WebView/WebHTMLView.mm: (-[WebHTMLView _handleEditingKeyEvent:]):

LayoutTests:

Add tests to ensure that we process key commands correctly.

  • fast/events/ios/key-command-italic-dispatches-keydown-expected.txt: Added.
  • fast/events/ios/key-command-italic-dispatches-keydown.html: Added.
  • fast/events/ios/key-command-italic-expected.txt: Added.
  • fast/events/ios/key-command-italic.html: Added.
  • fast/events/ios/type-digits-holding-control-key-expected.txt: Added.
  • fast/events/ios/type-digits-holding-control-key.html: Added.
  • platform/ios-wk1/TestExpectations:

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

11:15 AM Changeset in webkit [239124] by Chris Fleizach
  • 30 edits in trunk/Source/WebKit

[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
https://bugs.webkit.org/show_bug.cgi?id=192449
<rdar://problem/46595508>

Reviewed by Darin Adler.

Part 1: Files in Shared folder.

  • Shared/API/c/WKRenderLayer.cpp:

(WKRenderLayerGetFrameContentsLayer):

  • Shared/API/c/cf/WKErrorCF.cpp:

(WKErrorCreateWithCFError):
(WKErrorCopyCFError):

  • Shared/API/c/cg/WKImageCG.cpp:

(WKImageCreateCGImage):
(WKImageCreateFromCGImage):

  • Shared/API/c/mac/WKWebArchive.cpp:

(WKWebArchiveGetTypeID):
(WKWebArchiveCreate):
(WKWebArchiveCreateWithData):
(WKWebArchiveCreateFromRange):
(WKWebArchiveCopyMainResource):
(WKWebArchiveCopySubresources):
(WKWebArchiveCopySubframeArchives):
(WKWebArchiveCopyData):

  • Shared/API/c/mac/WKWebArchiveResource.cpp:

(WKWebArchiveResourceGetTypeID):
(WKWebArchiveResourceCreate):
(WKWebArchiveResourceCopyData):
(WKWebArchiveResourceCopyURL):
(WKWebArchiveResourceCopyMIMEType):
(WKWebArchiveResourceCopyTextEncoding):

  • Shared/ChildProcess.cpp:
  • Shared/ContextMenuContextData.cpp:
  • Shared/EditorState.cpp:
  • Shared/Plugins/NPIdentifierData.cpp:
  • Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
  • Shared/SessionState.cpp:
  • Shared/SessionTracker.cpp:
  • Shared/ShareableBitmap.cpp:
  • Shared/ShareableResource.cpp:
  • Shared/VisibleContentRectUpdateInfo.cpp:
  • Shared/WebBackForwardListItem.cpp:
  • Shared/WebContextMenuItemData.cpp:
  • Shared/WebCoreArgumentCoders.cpp:
  • Shared/WebHitTestResultData.cpp:
  • Shared/WebImage.cpp:
  • Shared/WebMediaSessionMetadata.cpp:
  • Shared/WebMemorySampler.cpp:
  • Shared/WebMouseEvent.cpp:
  • Shared/WebRenderObject.cpp:
  • Shared/WebSQLiteDatabaseTracker.cpp:
  • Shared/WebWheelEvent.cpp:
  • Shared/cf/ArgumentCodersCF.cpp:
  • Shared/ios/WebPlatformTouchPointIOS.cpp:
11:10 AM Changeset in webkit [239123] by Michael Catanzaro
  • 4 edits in trunk

Unreviewed, fix changelog entries for previous commit

I did not roll out r239114. I rolled out r239116.

11:02 AM Changeset in webkit [239122] by Michael Catanzaro
  • 24 edits
    3 adds
    2 deletes in trunk

Unreviewed manual rollout of r239100-r239102 and r239114
https://bugs.webkit.org/show_bug.cgi?id=192151
<rdar://problem/46655586>

.:

  • Source/cmake/OptionsGTK.cmake:

Source/WebCore:

  • css/CSSFontFaceSource.cpp:

(WebCore::CSSFontFaceSource::font):

  • loader/cache/CachedFont.cpp:

(WebCore::CachedFont::platformDataFromCustomData):

  • platform/FreeType.cmake:
  • platform/graphics/FontPlatformData.h:

(WebCore::FontPlatformData::isFixedWidth const): Deleted.

  • platform/graphics/cairo/FontCustomPlatformData.h:
  • platform/graphics/freetype/FontCacheFreeType.cpp:

(WebCore::FontCache::systemFallbackForCharacters):
(WebCore::FontCache::createFontPlatformData):
(WebCore::getFontPropertiesFromPattern): Deleted.
(WebCore::defaultVariationValues): Deleted.
(WebCore::buildVariationSettings): Deleted.

  • platform/graphics/freetype/FontCacheFreeType.h: Removed.
  • platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:

(WebCore::FontCustomPlatformData::FontCustomPlatformData):
(WebCore::FontCustomPlatformData::~FontCustomPlatformData):
(WebCore::FontCustomPlatformData::fontPlatformData):
(WebCore::FontCustomPlatformData::supportsFormat):
(WebCore::defaultFontconfigOptions): Deleted.

  • platform/graphics/freetype/FontPlatformDataFreeType.cpp:

(WebCore::setCairoFontOptionsFromFontConfigPattern):
(WebCore::getDefaultFontconfigOptions):
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::operator=):
(WebCore::FontPlatformData::harfBuzzFace const):
(WebCore::FontPlatformData::platformIsEqual const):
(WebCore::FontPlatformData::buildScaledFont):
(WebCore::FontPlatformData::fcPattern const): Deleted.
(WebCore::FontPlatformData::createOpenTypeMathHarfBuzzFont const): Deleted.

  • platform/graphics/freetype/SimpleFontDataFreeType.cpp:

(WebCore::Font::platformCreateScaledFont const):

  • platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:

(WebCore::fontFeatures):
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
(WebCore::floatToHarfBuzzPosition): Deleted.
(WebCore::doubleToHarfBuzzPosition): Deleted.
(WebCore::harfBuzzFontFunctions): Deleted.
(WebCore::findScriptForVerticalGlyphSubstitution): Deleted.

  • platform/graphics/harfbuzz/HarfBuzzFace.cpp: Added.

(WebCore::HarfBuzzFace::CacheEntry::CacheEntry):
(WebCore::HarfBuzzFace::CacheEntry::~CacheEntry):
(WebCore::HarfBuzzFace::cache):
(WebCore::HarfBuzzFace::HarfBuzzFace):
(WebCore::HarfBuzzFace::~HarfBuzzFace):
(WebCore::findScriptForVerticalGlyphSubstitution):
(WebCore::HarfBuzzFace::setScriptForVerticalGlyphSubstitution):

  • platform/graphics/harfbuzz/HarfBuzzFace.h: Added.

(WebCore::HarfBuzzFace::CacheEntry::create):
(WebCore::HarfBuzzFace::CacheEntry::face):
(WebCore::HarfBuzzFace::CacheEntry::glyphCache):

  • platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp: Added.

(WebCore::floatToHarfBuzzPosition):
(WebCore::doubleToHarfBuzzPosition):
(WebCore::CairoGetGlyphWidthAndExtents):
(WebCore::harfBuzzGetGlyph):
(WebCore::harfBuzzGetGlyphHorizontalAdvance):
(WebCore::harfBuzzGetGlyphHorizontalOrigin):
(WebCore::harfBuzzGetGlyphExtents):
(WebCore::harfBuzzCairoTextGetFontFuncs):
(WebCore::harfBuzzCairoGetTable):
(WebCore::HarfBuzzFace::createFace):
(WebCore::HarfBuzzFace::createFont):

  • platform/graphics/harfbuzz/HbUniquePtr.h:

(WebCore::HbPtrDeleter<hb_face_t>::operator() const): Deleted.

  • platform/graphics/opentype/OpenTypeMathData.cpp:

(WebCore::OpenTypeMathData::OpenTypeMathData):

  • platform/graphics/win/FontCustomPlatformData.cpp:

(WebCore::FontCustomPlatformData::fontPlatformData):

  • platform/graphics/win/FontCustomPlatformData.h:
  • platform/graphics/win/FontCustomPlatformDataCairo.cpp:

(WebCore::FontCustomPlatformData::fontPlatformData):

Tools:

  • gtk/jhbuild.modules:
  • gtk/patches/cairo-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch: Removed.

LayoutTests:

  • platform/gtk/TestExpectations:
  • platform/gtk/mathml/opentype/opentype-stretchy-expected.png:
  • platform/gtk/mathml/opentype/opentype-stretchy-expected.txt:
10:52 AM Changeset in webkit [239121] by Kocsen Chung
  • 6 edits in tags/Safari-607.1.16.2/Source

Cherry-pick r239088. rdar://problem/46615532

WebCore shouldn't have a Objective-C class named NSCursor
https://bugs.webkit.org/show_bug.cgi?id=192602
<rdar://problem/46615532>

Reviewed by Wenson Hsieh.

Source/WebCore:

  • platform/ios/wak/WAKAppKitStubs.h:
  • platform/ios/wak/WAKAppKitStubs.m: (+[NSCursor setHiddenUntilMouseMoves:]): Deleted. Get rid of the class. Also remove a comment that seems to have detached from wherever it's supposed to be.

Source/WebKitLegacy/mac:

  • WebView/WebFrameView.mm: (-[WebFrameView keyDown:keyDown:]):
  • WebView/WebHTMLView.mm: (-[WebHTMLView keyDown:]): (-[WebHTMLView performKeyEquivalent:]): Only use NSCursor on macOS.

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

10:52 AM Changeset in webkit [239120] by Kocsen Chung
  • 2 edits in tags/Safari-607.1.16.2/Source/JavaScriptCore

Cherry-pick r239055. rdar://problem/45615617

LinkBuffer::copyCompactAndLinkCode() needs to be aware of ENABLE(SEPARATED_WX_HEAP).
https://bugs.webkit.org/show_bug.cgi?id=192569
<rdar://problem/45615617>

Reviewed by Saam Barati.

  • assembler/LinkBuffer.cpp: (JSC::LinkBuffer::copyCompactAndLinkCode):

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

10:52 AM Changeset in webkit [239119] by Kocsen Chung
  • 13 edits in tags/Safari-607.1.16.2

Cherry-pick r239046. rdar://problem/46500832

Add SPI to allow the client to set the user-agent at main frame level, from the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=192509
<rdar://problem/46500832>

Reviewed by Alex Christensen.

Source/WebCore:

  • loader/DocumentLoader.h: (WebCore::DocumentLoader::setCustomUserAgent): (WebCore::DocumentLoader::customUserAgent const):
  • loader/FrameLoader.cpp: (WebCore::FrameLoader::userAgent const):

Source/WebKit:

Add SPI to allow the client to set the user-agent at main frame level, from the UIProcess instead of doing
it at resource-level from the injected bundle.

The custom user-agent string can now be set on _WKWebsitePolicies during the
decidePolicyForNavigationAction for the main feame, and will impact this main resource load as well as its
future subresource loads.

  • Shared/WebsitePoliciesData.cpp: (WebKit::WebsitePoliciesData::encode const): (WebKit::WebsitePoliciesData::decode): (WebKit::WebsitePoliciesData::applyToDocumentLoader):
  • Shared/WebsitePoliciesData.h:
  • UIProcess/API/APIWebsitePolicies.cpp: (API::WebsitePolicies::data):
  • UIProcess/API/APIWebsitePolicies.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.mm: (-[_WKWebsitePolicies setCustomUserAgent:]): (-[_WKWebsitePolicies customUserAgent]):
  • UIProcess/Cocoa/NavigationState.mm: (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm: (-[DataMappingSchemeHandler addMappingFromURLString:toData:]): (-[DataMappingSchemeHandler webView:startURLSchemeTask:]): (-[DataMappingSchemeHandler webView:stopURLSchemeTask:]): (-[CustomUserAgentDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]): (-[CustomUserAgentDelegate webView:didFinishNavigation:]):

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

10:52 AM Changeset in webkit [239118] by Kocsen Chung
  • 4 edits in tags/Safari-607.1.16.2/Source/JavaScriptCore

Cherry-pick r238997. rdar://problem/46312674

Align the metadata table on all platforms
https://bugs.webkit.org/show_bug.cgi?id=192050
<rdar://problem/46312674>

Reviewed by Mark Lam.

Although certain platforms don't require the metadata to be aligned,
values were being concurrently read and written to ValueProfiles,
which caused crashes since these operations are not atomic on unaligned
addresses.

  • bytecode/Opcode.cpp: (JSC::metadataAlignment):
  • bytecode/Opcode.h:
  • bytecode/UnlinkedMetadataTableInlines.h: (JSC::UnlinkedMetadataTable::finalize):

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

10:52 AM Changeset in webkit [239117] by Kocsen Chung
  • 7 edits
    2 adds in tags/Safari-607.1.16.2

Cherry-pick r238828. rdar://problem/46353558

Regression(PSON) Google OAuth is broken in private sessions
https://bugs.webkit.org/show_bug.cgi?id=192337
<rdar://problem/46353558>

Reviewed by Alex Christensen.

Source/WebKit:

In WebPageProxy::swapToWebProcess(), we would call removeWebPage() on the old WebProcessProxy and then
addExistingWebPage() on the new WebProcessProxy, as you would expect in case of process swap.

The issue is that WebProcessProxy::removeWebPage() calls WebProcessPool::pageEndUsingWebsiteDataStore()
which would cause the session to get destroyed assuming this was the last page using it. We would
therefore lose session cookies after a process-swap in private session.

To address the issue, a parameter to WebProcessPool::pageEndUsingWebsiteDataStore() and
WebProcessPool::pageBeginUsingWebsiteDataStore() to control if we want to tell the WebProcessPool
about the page beginning / ending its use of the session. In the case of a process-swap, we make
sure the process pool is not notified.

  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::reattachToWebProcess): (WebKit::WebPageProxy::swapToWebProcess): (WebKit::WebPageProxy::finishAttachingToWebProcess): (WebKit::WebPageProxy::close):
  • UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::createWebPage): (WebKit::WebProcessProxy::addExistingWebPage): (WebKit::WebProcessProxy::removeWebPage):
  • UIProcess/WebProcessProxy.h:

Tools:

Add API test coverage.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/GetSessionCookie.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/SetSessionCookie.html: Added.

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

10:48 AM Changeset in webkit [239116] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed attempt to fix Windows Cairo build after r239100.

  • platform/graphics/win/FontCustomPlatformDataCairo.cpp:

(WebCore::FontCustomPlatformData::fontPlatformData):

10:44 AM Changeset in webkit [239115] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed build with with recent macOS SDKs.

  • Platform/cocoa/WKCrashReporter.mm:
10:37 AM Changeset in webkit [239114] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed attempt to fix GTK build after r239104.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::performDragControllerAction):

10:25 AM Changeset in webkit [239113] by Kocsen Chung
  • 7 edits in tags/Safari-607.1.16.2/Source

Versioning.

10:23 AM Changeset in webkit [239112] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed attempt to fix build with older SDKs after r239110.

  • Platform/cocoa/WKCrashReporter.mm:
10:21 AM Changeset in webkit [239111] by Kocsen Chung
  • 1 copy in tags/Safari-607.1.16.2

New tag.

10:08 AM Changeset in webkit [239110] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix build with recent SDKs.

  • Platform/cocoa/WKCrashReporter.mm:
9:52 AM Changeset in webkit [239109] by Alan Coon
  • 7 edits in branches/safari-606-branch/Source

Versioning.

9:44 AM Changeset in webkit [239108] by Kocsen Chung
  • 1 copy in tags/Safari-607.1.17

Tag Safari-607.1.17.

9:06 AM Changeset in webkit [239107] by Wenson Hsieh
  • 3 edits in trunk/Source/WebCore

[iOS] A few API tests are failing after r239086
https://bugs.webkit.org/show_bug.cgi?id=192608

Reviewed by Zalan Bujtas.

These test failures were caused by a missing Vector size check in Pasteboard::readFilePaths before accessing
the first item. Fix this by adding a helper method on PasteboardItemInfo to grab the file path for the highest
fidelity pasteboard item (returning the null string if there are none), and use this in a few places that grab
the highest fidelity path using Vector::first().

While Pasteboard::readRespectingUTIFidelities does have a bounds check before accessing the list of paths,
this patch still replaces it with a call to pathForHighestFidelityItem(), so that the intent is more clear.

  • platform/PasteboardItemInfo.h:

(WebCore::PasteboardItemInfo::pathForHighestFidelityItem const):

  • platform/ios/PasteboardIOS.mm:

(WebCore::Pasteboard::readRespectingUTIFidelities):
(WebCore::Pasteboard::readFilePaths):

9:05 AM Changeset in webkit [239106] by Darin Adler
  • 2 edits in trunk/Source/WebKit

[iOS] Zero memory containing the password for PDF documents when a WKPDFView is deallocated
https://bugs.webkit.org/show_bug.cgi?id=192536
rdar://problem/41174451

Reviewed by Tim Horton.

  • UIProcess/ios/WKPDFView.mm: Took out PLATFORM(IOSMAC) since

this class is not compiled on that platform at this time. Can always
add it back later.
(-[WKPDFView dealloc]): Zero out characters of _passwordForPrinting.
(-[WKPDFView pdfHostViewController:documentDidUnlockWithPassword:]):
Initialize _passwordForPrinting; use a CString instead of retaining
an NSString since we can zero that out easily.
(-[WKPDFView _ensureDocumentForPrinting]): Use _passwordForPrinting.

8:28 AM Changeset in webkit [239105] by commit-queue@webkit.org
  • 6 edits in trunk

Unreviewed, rolling out r239103.
https://bugs.webkit.org/show_bug.cgi?id=192627

It broke the built because it depends on another patch that
didn't land yet (Requested by KaL on #webkit).

Reverted changeset:

"[WPE] Add API to notify about frame displayed view backend
callback"
https://bugs.webkit.org/show_bug.cgi?id=192224
https://trac.webkit.org/changeset/239103

8:01 AM Changeset in webkit [239104] by Chris Dumez
  • 9 edits in trunk/Source/WebKit

Restore MESSAGE_CHECK_URL() security check on sourceURL in didPerformClientRedirect()
https://bugs.webkit.org/show_bug.cgi?id=191982
<rdar://problem/46258054>

Reviewed by Alex Christensen.

Have the WebPageProxy remember the local paths it previously visited so that the
MESSAGE_CHECK_URL() checks still work when process-swap on navigation is enabled.

Add back MESSAGE_CHECK_URL() on sourceURL in didPerformClientRedirect().

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::createSandboxExtensionsIfNeeded):

  • UIProcess/RemoteWebInspectorProxy.cpp:

(WebKit::RemoteWebInspectorProxy::createFrontendPageAndWindow):

  • UIProcess/WebInspectorProxy.cpp:

(WebKit::WebInspectorProxy::createFrontendPage):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::loadRequestWithNavigation):
(WebKit::WebPageProxy::loadFile):
(WebKit::WebPageProxy::loadDataWithNavigation):
(WebKit::WebPageProxy::loadAlternateHTML):
(WebKit::WebPageProxy::reload):
(WebKit::WebPageProxy::didPerformClientRedirect):
(WebKit::WebPageProxy::backForwardGoToItem):
(WebKit::WebPageProxy::checkURLReceivedFromCurrentOrPreviousWebProcess):
(WebKit::WebPageProxy::addPreviouslyVisitedPath):
(WebKit::WebPageProxy::willAcquireUniversalFileReadSandboxExtension):

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

(WebKit::WebProcessProxy::assumeReadAccessToBaseURL):

  • UIProcess/WebProcessProxy.h:
  • UIProcess/mac/WebPageProxyMac.mm:
2:59 AM Changeset in webkit [239103] by Carlos Garcia Campos
  • 6 edits in trunk

[WPE] Add API to notify about frame displayed view backend callback
https://bugs.webkit.org/show_bug.cgi?id=192224

Reviewed by Michael Catanzaro.

Source/WebKit:

Add API to add a callback to the view to be called when the view backend notifies that a frame has been
displayed.

  • UIProcess/API/glib/WebKitWebView.cpp:

(FrameDisplayedCallback::FrameDisplayedCallback):
(FrameDisplayedCallback::~FrameDisplayedCallback):
(webkit_web_view_add_frame_displayed_callback):
(webkit_web_view_remove_frame_displayed_callback):

  • UIProcess/API/wpe/WebKitWebView.h:

Tools:

Add a test case to check the new API.

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:

(testWebViewFrameDisplayed):
(beforeAll):

1:54 AM Changeset in webkit [239102] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

Unreviewed. Fix WPE build after r239101.

  • platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp: Include <hb-ot.h>
1:19 AM Changeset in webkit [239101] by Carlos Garcia Campos
  • 11 edits
    3 deletes in trunk

[FreeType] Remove HarfBuzzFace
https://bugs.webkit.org/show_bug.cgi?id=192589

Reviewed by Michael Catanzaro.

Source/WebCore:

This was used to share the common implementation with the chromium port, but now that only freetype based ports
use it, it can be removed and use hb_ft_face_create_cached() instead. We don't need the glyph cache either,
since we are already caching glyphs in Font.

  • platform/FreeType.cmake: Remove HarfBuzzFaceCairo.cpp and HarfBuzzFace.cpp.
  • platform/graphics/FontPlatformData.h: Remove HarfBuzzFace member.
  • platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp: Add missing include.
  • platform/graphics/freetype/FontPlatformDataFreeType.cpp:

(WebCore::FontPlatformData::operator=): Remove m_harfBuzzFace handling.
(WebCore::FontPlatformData::createOpenTypeMathHarfBuzzFont const): New funtction to create a hb_font_t for
OpenType math.

  • platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:

(WebCore::floatToHarfBuzzPosition): Moved from HarfBuzzFaceCairo.cpp.
(WebCore::doubleToHarfBuzzPosition): Ditto.
(WebCore::harfBuzzFontFunctions): Also moved from HarfBuzzFaceCairo.cpp, but implement get_nominal/variation
functions when using HarfBuzz >= 1.2.3 and use Font::glyphForCharacter() to make it simpler.
(WebCore::fontFeatures): Moved from HarfBuzzFaceCairo.cpp.
(WebCore::findScriptForVerticalGlyphSubstitution): Moved from HarfBuzzFace.cpp.
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Create the HarfBuzz face and font here.

  • platform/graphics/harfbuzz/HarfBuzzFace.cpp: Removed.
  • platform/graphics/harfbuzz/HarfBuzzFace.h: Removed.
  • platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp: Removed.
  • platform/graphics/harfbuzz/HbUniquePtr.h:

(WebCore::HbPtrDeleter<hb_face_t>::operator() const): Add deleter for hb_face_t.

  • platform/graphics/opentype/OpenTypeMathData.cpp:

(WebCore::OpenTypeMathData::OpenTypeMathData): Use FontPlatformData::createOpenTypeMathHarfBuzzFont().

LayoutTests:

Rebaseline test that now matches the firefox output.

  • platform/gtk/mathml/opentype/opentype-stretchy-expected.png:
  • platform/gtk/mathml/opentype/opentype-stretchy-expected.txt:
1:07 AM Changeset in webkit [239100] by Carlos Garcia Campos
  • 18 edits
    2 adds in trunk

[FreeType] Add initial implementation of variation fonts
https://bugs.webkit.org/show_bug.cgi?id=192151

Reviewed by Michael Catanzaro.

.:

Enable variation fonts in GTK+ port when required dependencies are available.

  • Source/cmake/OptionsGTK.cmake:

Source/WebCore:

  • css/CSSFontFaceSource.cpp:

(WebCore::CSSFontFaceSource::font): Remove platform ifdefs.

  • loader/cache/CachedFont.cpp:

(WebCore::CachedFont::platformDataFromCustomData): Ditto.

  • platform/graphics/FontPlatformData.h:

(WebCore::FontPlatformData::isFixedWidth const):

  • platform/graphics/cairo/FontCustomPlatformData.h: Use RefPtr for cairo_font_face_t.
  • platform/graphics/freetype/FontCacheFreeType.cpp:

(WebCore::getFontPropertiesFromPattern): Helper function to get several font properties from the fontconfig
pattern.
(WebCore::FontCache::systemFallbackForCharacters): Use getFontPropertiesFromPattern().
(WebCore::FontCache::createFontPlatformData): Pass FC_VARIABLE to the pattern and call buildVariationSettings()
before creating the FontPlatformData to set FC_FONT_VARIATIONS on the pattern.
(WebCore::defaultVariationValues): Parse font variations table.
(WebCore::buildVariationSettings): Build a font variations string from the settings that can be passed to cairo.

  • platform/graphics/freetype/FontCacheFreeType.h: Added.
  • platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:

(WebCore::FontCustomPlatformData::FontCustomPlatformData): Use RefPtr and make freeTypeFaceKey global.
(WebCore::FontCustomPlatformData::~FontCustomPlatformData): Remove explicit destroy.
(WebCore::defaultFontconfigOptions): Moved here from FontCacheFreeType.
(WebCore::FontCustomPlatformData::fontPlatformData): Call buildVariationSettings() before creating the
FontPlatformData to set FC_FONT_VARIATIONS on the pattern.
(WebCore::FontCustomPlatformData::supportsFormat): Add variation formats.

  • platform/graphics/freetype/FontPlatformDataFreeType.cpp:

(WebCore::setCairoFontOptionsFromFontConfigPattern): Call cairo_font_options_set_variations() with the
FC_FONT_VARIATIONS value from the pattern.
(WebCore::FontPlatformData::FontPlatformData): Use a single constructor that always receives a valid fontconfig
pattern.
(WebCore::FontPlatformData::fcPattern const): Return the fontconfig pattern.
(WebCore::FontPlatformData::platformIsEqual const): Update the condition now that m_pattern can't be nullptr.
(WebCore::FontPlatformData::buildScaledFont): Use m_pattern unconditionally.

  • platform/graphics/freetype/SimpleFontDataFreeType.cpp:

(WebCore::Font::platformCreateScaledFont const): Update it to use the new FontPlatformData constructor.

  • platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp:

(WebCore::HarfBuzzFace::createFont): Pass variations to HarfBuzz.

  • platform/graphics/win/FontCustomPlatformData.cpp:

(WebCore::FontCustomPlatformData::fontPlatformData):

  • platform/graphics/win/FontCustomPlatformData.h:

Tools:

Add cairo patch to avoid crashes.

  • gtk/jhbuild.modules:
  • gtk/patches/cairo-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch: Added.

LayoutTests:

Unskip variation fonts tests that are now passing in GTK+ port.

  • platform/gtk/TestExpectations:
12:38 AM Changeset in webkit [239099] by yusukesuzuki@slowstart.org
  • 7 edits in trunk/Source/JavaScriptCore

[BigInt] Simplify boolean context evaluation by leveraging JSString::offsetOfLength() == JSBigInt::offsetOfLength()
https://bugs.webkit.org/show_bug.cgi?id=192615

Reviewed by Saam Barati.

JSString and JSBigInt have similar concept in terms of the implementation.
Both are immutable, JSCells, and have length information. m_length is located
just after JSCell header part, we can ensure JSString::offsetOfLength() == JSBigInt::offsetOfLength(),
and it allows us to optimize the boolean context evaluation.

This patch leverages the above information to reduce the code size for the boolean context evaluation.

  • ftl/FTLAbstractHeapRepository.cpp:

(JSC::FTL::AbstractHeapRepository::AbstractHeapRepository):

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

(JSC::FTL::DFG::LowerDFGToB3::boolify):

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::emitConvertValueToBoolean):
(JSC::AssemblyHelpers::branchIfValue):

  • runtime/JSBigInt.cpp:

(JSC::JSBigInt::JSBigInt):
(JSC::JSBigInt::offsetOfLength): Deleted.

  • runtime/JSBigInt.h:

Dec 11, 2018:

9:54 PM Changeset in webkit [239098] by Justin Michaud
  • 37 edits in trunk

Implement feature flag for CSS Typed OM
https://bugs.webkit.org/show_bug.cgi?id=192610

Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:
  • bindings/js/JSTypedOMCSSStyleValueCustom.cpp:
  • css/typedom/StylePropertyMapReadOnly.h:
  • css/typedom/StylePropertyMapReadOnly.idl:
  • css/typedom/TypedOMCSSImageValue.h:
  • css/typedom/TypedOMCSSImageValue.idl:
  • css/typedom/TypedOMCSSNumericValue.h:
  • css/typedom/TypedOMCSSNumericValue.idl:
  • css/typedom/TypedOMCSSStyleValue.h:
  • css/typedom/TypedOMCSSStyleValue.idl:
  • css/typedom/TypedOMCSSUnitValue.h:
  • css/typedom/TypedOMCSSUnitValue.idl:
  • css/typedom/TypedOMCSSUnparsedValue.h:
  • css/typedom/TypedOMCSSUnparsedValue.idl:
  • features.json:
  • html/ImageBitmap.cpp:
  • html/ImageBitmap.h:
  • html/canvas/CanvasDrawImage.idl:
  • html/canvas/CanvasFillStrokeStyles.idl:
  • html/canvas/CanvasRenderingContext2DBase.cpp:
  • html/canvas/CanvasRenderingContext2DBase.h:
  • inspector/InspectorCanvas.cpp:

(WebCore::InspectorCanvas::buildAction):

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setCSSTypedOMEnabled):
(WebCore::RuntimeEnabledFeatures::cssTypedOMEnabled const):

  • page/WindowOrWorkerGlobalScope.idl:

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:
  • Shared/WebPreferences.yaml:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
9:18 PM Changeset in webkit [239097] by Fujii Hironori
  • 2 edits in trunk/Source/WebKitLegacy

[Win][WebKitLegacy][Clang] WebKit.h warning: 'IWebEditingDelegate2::shouldInsertNode' hides overloaded virtual function [-Woverloaded-virtual]
https://bugs.webkit.org/show_bug.cgi?id=192581

Reviewed by Alex Christensen.

Conventionally, WebKit COM interface adds a new interface with
same name methods with the old interface. For example, both
IWebEditingDelegate and IWebEditingDelegate2 interfaces has
shouldInsertNode method.

This is a part of public API, can't be renamed.

  • PlatformWin.cmake: Added -Wno-overloaded-virtual compiler option

for WebKitLegacy

7:58 PM Changeset in webkit [239096] by rniwa@webkit.org
  • 4 edits
    2 adds in trunk

connectedCallback is invoked during the removal of the element inside another element's connectedCallback
https://bugs.webkit.org/show_bug.cgi?id=183586
<rdar://problem/38403504>

Reviewed by Frédéric Wang.

Source/WebCore:

Align WebKit's behavior with Chrome/Firefox with regards to https://github.com/w3c/webcomponents/issues/760

After much discussion, it's unclear that there is a clear path forward to fixing the oddness that
the presence of a custom element reaction changes the timing at which another reaction callback gets invoked.
So matching Chrome/Firefox behaviors in this case seems the path of the least resistance to interoperability.

Namely, this patch makes WebKit not insert a custom element to the appropriate element queue when the element
does not have a matching reaction callback. Put it another way, steps 3-5 in would be done before step 6 in:
https://html.spec.whatwg.org/multipage/custom-elements.html#enqueue-a-custom-element-callback-reaction

  1. Let definition be element's custom element definition.
  2. Let callback be the value of the entry in definition's lifecycle callbacks with key callbackName.
  3. If callback is null, then return
  4. If callbackName is "attributeChangedCallback", then:
    1. Let attributeName be the first element of args.
    2. If definition's observed attributes does not contain attributeName, then return.
  5. Add a new callback reaction to element's custom element reaction queue, with callback function callback and arguments args.
  6. Enqueue an element on the appropriate element queue given element.

Test: fast/custom-elements/enqueue-custom-element-callback-reactions-inside-another-callback.html

  • dom/CustomElementReactionQueue.cpp:

(WebCore::CustomElementReactionQueue::enqueueElementUpgrade):
(WebCore::CustomElementReactionQueue::enqueueConnectedCallbackIfNeeded):
(WebCore::CustomElementReactionQueue::enqueueDisconnectedCallbackIfNeeded):
(WebCore::CustomElementReactionQueue::enqueueAdoptedCallbackIfNeeded):
(WebCore::CustomElementReactionQueue::enqueueAttributeChangedCallbackIfNeeded):
(WebCore::CustomElementReactionQueue::enqueuePostUpgradeReactions):
(WebCore::CustomElementReactionQueue::enqueueElementOnAppropriateElementQueue): Renamed from ensureCurrentQueue.

  • dom/CustomElementReactionQueue.h:

LayoutTests:

Added a W3C style testharness test.

  • fast/custom-elements/enqueue-custom-element-callback-reactions-inside-another-callback-expected.txt: Added.
  • fast/custom-elements/enqueue-custom-element-callback-reactions-inside-another-callback.html: Added.
6:54 PM Changeset in webkit [239095] by Chris Dumez
  • 2 edits in trunk/Tools

Unreviewed, fix bad check in API test added in r239080.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
6:24 PM WPE edited by Michael Catanzaro
Fix capitalization (diff)
5:40 PM Changeset in webkit [239094] by Justin Fan
  • 29 edits
    9 copies
    3 adds in trunk

Source/WebCore:
[WebGPU] Implement WebGPUBuffer, and some nullibility consistency in WebGPU
https://bugs.webkit.org/show_bug.cgi?id=192516

Reviewed by Dean Jackson.

Test: webgpu/buffers.html

Enable basic creation of WebGPUBuffers, and fix nullability inconsitencies in WebGPU implementation.

Add necessary symbols and files for Web/GPUBuffer, Web/GPUBufferUsage, and Web/GPUBufferDescriptor:

  • CMakeLists.txt:
  • DerivedSources.make:
  • Sources.txt:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/WebCoreBuiltinNames.h:
  • Modules/webgpu/WebGPUBuffer.cpp: Added.

(WebCore::WebGPUBuffer::create):
(WebCore::WebGPUBuffer::WebGPUBuffer):

  • Modules/webgpu/WebGPUBuffer.h: Added.

(WebCore::WebGPUBuffer::mapping const):
(WebCore::WebGPUBuffer::unmap): Unimplemented stub, for now, as Metal equivalent is unclear.
(WebCore::WebGPUBuffer::destroy): Unimplemented stub.

  • Modules/webgpu/WebGPUBuffer.idl: Added.
  • Modules/webgpu/WebGPUBufferDescriptor.h: Added.
  • Modules/webgpu/WebGPUBufferDescriptor.idl: Added.
  • Modules/webgpu/WebGPUDevice.cpp:

(WebCore::WebGPUDevice::createBuffer const): Added.

  • platform/graphics/gpu/GPUBuffer.h:

(WebCore::GPUBuffer::platformBuffer const):
(WebCore::GPUBuffer::mapping const):

  • platform/graphics/gpu/GPUBufferDescriptor.h: Added.
  • platform/graphics/gpu/GPUDevice.cpp:

(WebCore::GPUDevice::createBuffer const): Added.

  • platform/graphics/gpu/GPUDevice.h:
  • platform/graphics/gpu/cocoa/GPUBufferMetal.mm: Added.

(WebCore::GPUBuffer::create): Attempt to create a page-aligned Gigacage to back the GPUBuffer's ArrayBuffer.
(WebCore::GPUBuffer::GPUBuffer):
(WebCore::GPUBuffer::~GPUBuffer): Dereference mapped ArrayBuffer first.

Small benign edits, most to make nullability more consistent in WebGPU classes:

  • Modules/webgpu/WebGPUCommandBuffer.cpp:

(WebCore::WebGPUCommandBuffer::create):
(WebCore::WebGPUCommandBuffer::beginRenderPass):

  • Modules/webgpu/WebGPUCommandBuffer.h:
  • Modules/webgpu/WebGPUDevice.cpp:

(WebCore::WebGPUDevice::create):
(WebCore::WebGPUDevice::WebGPUDevice):
(WebCore::WebGPUDevice::createShaderModule const):
(WebCore::WebGPUDevice::createRenderPipeline const):
(WebCore::WebGPUDevice::createCommandBuffer const):

  • Modules/webgpu/WebGPUDevice.h:

(WebCore::WebGPUDevice::device const):

  • Modules/webgpu/WebGPUDevice.idl:
  • Modules/webgpu/WebGPUQueue.cpp:

(WebCore::WebGPUQueue::create):

  • Modules/webgpu/WebGPURenderPassEncoder.cpp:

(WebCore::WebGPURenderPassEncoder::create):

  • Modules/webgpu/WebGPURenderPassEncoder.h:
  • Modules/webgpu/WebGPUShaderModule.cpp:

(WebCore::WebGPUShaderModule::create):
(WebCore::WebGPUShaderModule::WebGPUShaderModule):

  • Modules/webgpu/WebGPUShaderModule.h:

(WebCore::WebGPUShaderModule::module const):

  • Modules/webgpu/WebGPUSwapChain.idl: Sync with IDL changes.
  • Modules/webgpu/WebGPUTexture.cpp:

(WebCore::WebGPUTexture::create):
(WebCore::WebGPUTexture::createDefaultTextureView):

  • Modules/webgpu/WebGPUTextureView.cpp:

(WebCore::WebGPUTextureView::create):

  • Modules/webgpu/WebGPUTextureView.h:
  • platform/graphics/gpu/cocoa/GPUQueueMetal.mm:

(WebCore::GPUQueue::create):

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

(WebCore::GPURenderPipeline::create):

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

(WebCore::GPUShaderModule::create):

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

(WebCore::GPUSwapChain::setDevice):

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

(WebCore::GPUTexture::GPUTexture):

LayoutTests:
[WebGPU] Implement WebGPUBuffer
https://bugs.webkit.org/show_bug.cgi?id=192516

Reviewed by Dean Jackson.

Basic test to create a WebGPUBuffer and ensure that its memory is valid.

  • webgpu/buffers-expected.txt: Added.
  • webgpu/buffers.html: Added.
5:34 PM Changeset in webkit [239093] by Fujii Hironori
  • 4 edits in trunk/Source/WTF

[Win][Clang] Fix compilation warnings of WTF
https://bugs.webkit.org/show_bug.cgi?id=192583

Reviewed by Alex Christensen.

clang-cl reports the following warnings.

[92/206] Building CXX object Source\WTF\wtf\CMakeFiles\WTF.dir\StackBounds.cpp.obj
..\..\Source\WTF\wtf\StackBounds.cpp(163,48): warning: missing field 'AllocationBase' initializer [-Wmissing-field-initializers]

MEMORY_BASIC_INFORMATION stackOrigin = { 0 };


1 warning generated.
[160/206] Building CXX object Source\WTF\wtf\CMakeFiles\WTF.dir\win\RunLoopWin.cpp.obj
..\..\Source\WTF\wtf\win\RunLoopWin.cpp(34,54): warning: ISO C++11 does not allow conversion from string literal to 'const LPWSTR' (aka 'wchar_t *const') [-Wwritable-strings]
static const LPWSTR kRunLoopMessageWindowClassName = L"RunLoopMessageWindow";


..\..\Source\WTF\wtf\win\RunLoopWin.cpp(86,32): warning: missing field 'lpfnWndProc' initializer [-Wmissing-field-initializers]

WNDCLASS windowClass = { 0 };


2 warnings generated.
[175/206] Building CXX object Source\WTF\wtf\CMakeFiles\WTF.dir\DateMath.cpp.obj
..\..\Source\WTF\wtf\DateMath.cpp(125,20): warning: unused function 'getLocalTime' [-Wunused-function]
static inline void getLocalTime(const time_t* localTime, struct tm* localTM)


1 warning generated.

  • wtf/DateMath.cpp:

(WTF::getLocalTime): Defined only if used.

  • wtf/StackBounds.cpp:

(WTF::StackBounds::currentThreadStackBoundsInternal): Initialize stackOrigin with '{ }'.

  • wtf/win/RunLoopWin.cpp: Change the type of kRunLoopMessageWindowClassName to LPCWSTR.

(WTF::RunLoop::registerRunLoopMessageWindowClass): Initialize windowClass with '{ }'.

5:15 PM Changeset in webkit [239092] by Fujii Hironori
  • 26 edits in trunk

[Win][Clang] Fix warning -Wmissing-field-initializers
https://bugs.webkit.org/show_bug.cgi?id=192584

Reviewed by Yusuke Suzuki.

Initialize a struct with '{ }' instead of '= {0}'.

Source/WebCore:

No new tests, no behavior changes.

  • platform/graphics/win/FontCacheWin.cpp:

(WebCore::FontCache::lastResortFallbackFont):

  • platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:

(WebCore::MediaPlayerPrivateFullscreenWindow::createWindow):

  • platform/win/ClipboardUtilitiesWin.cpp:

(WebCore::setFileDescriptorData):
(WebCore::setFileContentData):
(WebCore::setUCharData):
(WebCore::setUtf8Data):
(WebCore::setCFData):

  • platform/win/CursorWin.cpp:

(WebCore::createSharedCursor):

  • platform/win/DefWndProcWindowClass.cpp:

(WebCore::registerClass):

  • platform/win/DragImageWin.cpp:

(WebCore::createDragImageIconForCachedImageFilename):

  • platform/win/PasteboardWin.cpp:

(WebCore::writeURL):
(WebCore::Pasteboard::writeString):
(WebCore::Pasteboard::writeRangeToDataObject):
(WebCore::Pasteboard::writePlainTextToDataObject):
(WebCore::writeFileToDataObject):
(WebCore::Pasteboard::writeMarkup):

  • platform/win/PopupMenuWin.cpp:

(WebCore::PopupMenuWin::show):

  • platform/win/SSLKeyGeneratorWin.cpp:

(WebCore::WebCore::signedPublicKeyAndChallengeString):

Source/WebKit:

  • UIProcess/Launcher/win/ProcessLauncherWin.cpp:

(WebKit::ProcessLauncher::launchProcess):

  • UIProcess/win/WebPopupMenuProxyWin.cpp:

(WebKit::WebPopupMenuProxyWin::showPopupMenu):

  • UIProcess/win/WebView.cpp:

(WebKit::WebView::initializeToolTipWindow):
(WebKit::WebView::setToolTip):

Source/WebKitLegacy/win:

  • WebKitMessageLoop.cpp:

(WebKitMessageLoop::run):

  • WebView.cpp:

(WebView::onMenuCommand):
(WebView::gesture):
(WebView::setShouldInvertColors):
(WebView::initializeToolTipWindow):
(WebView::setToolTip):
(WebView::fullScreenClientForceRepaint):

Tools:

  • DumpRenderTree/win/DumpRenderTree.cpp:

(runTest):

  • DumpRenderTree/win/EventSender.cpp:

(makeMsg):
(replaySavedEvents):
(beginDragWithFilesCallback):

  • DumpRenderTree/win/PixelDumpSupportWin.cpp:

(createBitmapContextFromWebView):

  • MiniBrowser/win/WebKitLegacyBrowserWindow.cpp:

(updateMenuItemForHistoryItem):

  • MiniBrowser/win/WinMain.cpp:

(wWinMain):

  • TestWebKitAPI/win/HostWindow.cpp:

(TestWebKitAPI::HostWindow::clientRect const):
(TestWebKitAPI::HostWindow::registerWindowClass):

  • TestWebKitAPI/win/PlatformWebViewWin.cpp:

(TestWebKitAPI::PlatformWebView::registerWindowClass):

  • WebKitTestRunner/win/PlatformWebViewWin.cpp:

(WTR::registerWindowClass):
(WTR::PlatformWebView::windowFrame):
(WTR::PlatformWebView::windowSnapshotImage):

4:18 PM Changeset in webkit [239091] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Globally namespaced objects shouldn't use framework-prefixed names
https://bugs.webkit.org/show_bug.cgi?id=192600

Reviewed by Eric Carlson.

Rename CMSampleBufferIs... -> isCMSampleBuffer...

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

(WebCore::isCMSampleBufferRandomAccess):
(WebCore::isCMSampleBufferNonDisplaying):
(WebCore::MediaSampleAVFObjC::flags const):
(WebCore::CMSampleBufferIsRandomAccess): Deleted.
(WebCore::CMSampleBufferIsNonDisplaying): Deleted.

2:34 PM Changeset in webkit [239090] by Brent Fulgham
  • 3 edits
    2 adds in trunk

Don't attempt to compute animated values when there is no relevant animation
https://bugs.webkit.org/show_bug.cgi?id=192591
<rdar://problem/34336946>

Reviewed by Dean Jackson.

Source/WebCore:

Check if the property is supposed to be animated, or has animatable features, before
attempting to calculate the current animated value.

Test: svg/animations/avoid-calculating-for-non-animating-elements.html

  • svg/SVGAnimateElementBase.cpp:

(WebCore::SVGAnimateElementBase::calculateAnimatedValue):

LayoutTests:

  • svg/animations/avoid-calculating-for-non-animating-elements-expected.txt: Added.
  • svg/animations/avoid-calculating-for-non-animating-elements.html: Added.
2:00 PM Changeset in webkit [239089] by Chris Dumez
  • 5 edits in trunk

Unreviewed, fix typos in console log from r239087.

Source/WebCore:

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::addEventListener):

LayoutTests:

  • http/tests/events/device-orientation-motion-non-secure-context.html:
  • platform/ios/http/tests/events/device-orientation-motion-non-secure-context-expected.txt:
1:54 PM Changeset in webkit [239088] by timothy_horton@apple.com
  • 6 edits in trunk/Source

WebCore shouldn't have a Objective-C class named NSCursor
https://bugs.webkit.org/show_bug.cgi?id=192602
<rdar://problem/46615532>

Reviewed by Wenson Hsieh.

Source/WebCore:

  • platform/ios/wak/WAKAppKitStubs.h:
  • platform/ios/wak/WAKAppKitStubs.m:

(+[NSCursor setHiddenUntilMouseMoves:]): Deleted.
Get rid of the class.
Also remove a comment that seems to have detached from wherever it's supposed to be.

Source/WebKitLegacy/mac:

  • WebView/WebFrameView.mm:

(-[WebFrameView keyDown:keyDown:]):

  • WebView/WebHTMLView.mm:

(-[WebHTMLView keyDown:]):
(-[WebHTMLView performKeyEquivalent:]):
Only use NSCursor on macOS.

1:49 PM Changeset in webkit [239087] by Chris Dumez
  • 7 edits
    7 adds in trunk

Restrict DeviceMotion / DeviceOrientation APIs to secure contexts
https://bugs.webkit.org/show_bug.cgi?id=192595
<rdar://problem/46382603>

Reviewed by Dean Jackson.

Source/WebCore:

Tests: http/tests/events/device-orientation-motion-non-secure-context.html

http/tests/events/device-orientation-motion-secure-context.html

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::addEventListener):

  • page/SecurityOrigin.h:

(WebCore::SecurityOrigin::setIsPotentiallyTrustworthy):

  • testing/Internals.cpp:

(WebCore::Internals::markContextAsInsecure):
(WebCore::Internals::postTask):

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

LayoutTests:

Add layout test coverage. Note however that we currently do not have mock data providers
for these APIs.

  • http/tests/events/device-orientation-motion-non-secure-context-expected.txt: Added.
  • http/tests/events/device-orientation-motion-non-secure-context.html: Added.
  • http/tests/events/device-orientation-motion-secure-context-expected.txt: Added.
  • http/tests/events/device-orientation-motion-secure-context.html: Added.
  • platform/ios/http/tests/events/device-orientation-motion-non-secure-context-expected.txt: Added.
  • platform/ios/http/tests/events/device-orientation-motion-secure-context-expected.txt: Added.
1:13 PM Changeset in webkit [239086] by Wenson Hsieh
  • 7 edits in trunk/Source/WebCore

[iOS] Send the full list of file upload URLs and types in PasteboardItemInfo
https://bugs.webkit.org/show_bug.cgi?id=192598
Work towards <rdar://problem/35626913>

Reviewed by Tim Horton.

Refactors PasteboardItemInfo to contain lists of file URLs and corresponding pasteboard types, instead of just
a "preferred" file upload URL and type. See below for more details.

  • platform/PasteboardItemInfo.h:

(WebCore::PasteboardItemInfo::pathForContentType const):

Add a helper method to find a file upload URL corresponding to a given type.

(WebCore::PasteboardItemInfo::encode const):
(WebCore::PasteboardItemInfo::decode):

Change pathForFileUpload to pathsForFileUpload, and contentTypeForFileUpload to contentTypesForFileUpload.

  • platform/ios/AbstractPasteboard.h:
  • platform/ios/PasteboardIOS.mm:

(WebCore::Pasteboard::readRespectingUTIFidelities):

Adjust this to take the file path for the highest fidelity representation in pathsForContentType.

(WebCore::Pasteboard::readFilePaths):

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::informationForItemAtIndex):

  • platform/ios/WebItemProviderPasteboard.h:
  • platform/ios/WebItemProviderPasteboard.mm:

(-[NSItemProvider web_containsFileURLAndFileUploadContent]):
(-[NSItemProvider web_fileUploadContentTypes]):

Replace web_containsFileUploadContent with web_fileUploadContentTypes, which returns the full list of file
upload content types (rather than just a BOOL indicating whether one or more of these types exist).

(-[WebItemProviderPasteboard fileUploadURLsAtIndex:fileTypes:]):
(-[WebItemProviderPasteboard numberOfFiles]):
(-[NSItemProvider web_containsFileUploadContent]): Deleted.
(-[WebItemProviderPasteboard preferredFileUploadURLAtIndex:fileType:]): Deleted.

Replaced with -fileUploadURLsAtIndex:fileTypes:. This implementation currently just returns the highest
fidelity loaded type identifier, but this is wrong because it doesn't take into account inline data types that
shouldn't be represented as data for file uploads (for instance, it never makes sense to upload the internal
data serialization for an NSURL as a file on the web).

Instead, use existing logic in web_fileUploadContentTypes to determine which file types can be treated as file
uploads, and return all of these file types that we've loaded.

1:12 PM Changeset in webkit [239085] by Alan Coon
  • 4 edits
    1 copy
    1 add in branches/safari-606-branch

Cherry-pick r238877. rdar://problem/45997440

Don't report resource timing to parent frame for history items
https://bugs.webkit.org/show_bug.cgi?id=192273
<rdar://problem/45163764>

Reviewed by Youenn Fablet.

Source/WebCore:

We should not report history items to its parent frame as those are less
interested to its parent and might not be the first navigation in the iframes.

This change aligns the behavior when a cached document is not available for the
history item with the available case as we don't report resource timing for any
cached main document.

Test: http/tests/misc/resource-timing-navigation-in-restored-iframe-2.html

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

LayoutTests:

  • http/tests/misc/resource-timing-navigation-in-restored-iframe-2-expected.txt: Added.
  • http/tests/misc/resource-timing-navigation-in-restored-iframe-2.html: Copied from LayoutTests/http/tests/misc/resource-timing-navigation-in-restored-iframe.html.
  • http/tests/misc/resource-timing-navigation-in-restored-iframe.html:

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

1:12 PM Changeset in webkit [239084] by Alan Coon
  • 3 edits in branches/safari-606-branch/Source/WebCore

Cherry-pick r238582. rdar://problem/46085283

Refactor duplicate code for calling into media controls
https://bugs.webkit.org/show_bug.cgi?id=192040
<rdar://problem/46278931>

Reviewed by Youenn Fablet.

No new tests, no functional change.

  • html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setupAndCallJS): (WebCore::HTMLMediaElement::updateCaptionContainer): (WebCore::HTMLMediaElement::configureTextTrackDisplay): (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript): (WebCore::HTMLMediaElement::setControllerJSProperty): (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): (WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange): (WebCore::HTMLMediaElement::getCurrentMediaControlsStatus):
  • html/HTMLMediaElement.h:

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

1:12 PM Changeset in webkit [239083] by Alan Coon
  • 3 edits in branches/safari-606-branch/Source/WebCore

Cherry-pick r238232. rdar://problem/46085281

Modernize RTCPeerConnection handling of pendingActivity
https://bugs.webkit.org/show_bug.cgi?id=191661

Reviewed by Eric Carlson.

makePendingActivity is the modern way to handle set/unset of pending activity.
No change of behavior.

  • Modules/mediastream/RTCPeerConnection.cpp: (WebCore::RTCPeerConnection::create): (WebCore::RTCPeerConnection::doStop):
  • Modules/mediastream/RTCPeerConnection.h:

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

1:12 PM Changeset in webkit [239082] by Alan Coon
  • 1 edit in branches/safari-606-branch/Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/ulpfec_receiver_impl.cc

Apply patch. rdar://problem/46603462

12:25 PM Changeset in webkit [239081] by don.olmstead@sony.com
  • 4 edits in trunk/Source/WebCore

Resource Load Statistics: Use common implementation within NetworkStorageSession
https://bugs.webkit.org/show_bug.cgi?id=192592

Reviewed by Alex Christensen.

There's nothing within the resource load statistics implementation contained
in NetworkStorageSessionCFNet that was CF specific. All of the resource load
statistics methods are moved from that file to the root NetworkStorageSession
implementation.

  • platform/network/NetworkStorageSession.cpp:

(WebCore::getPartitioningDomain):
(WebCore::NetworkStorageSession::shouldBlockThirdPartyCookies const):
(WebCore::NetworkStorageSession::shouldBlockCookies const):
(WebCore::NetworkStorageSession::maxAgeCacheCap):
(WebCore::NetworkStorageSession::setAgeCapForClientSideCookies):
(WebCore::NetworkStorageSession::setPrevalentDomainsToBlockCookiesFor):
(WebCore::NetworkStorageSession::removePrevalentDomains):
(WebCore::NetworkStorageSession::hasStorageAccess const):
(WebCore::NetworkStorageSession::getAllStorageAccessEntries const):
(WebCore::NetworkStorageSession::grantStorageAccess):
(WebCore::NetworkStorageSession::removeStorageAccessForFrame):
(WebCore::NetworkStorageSession::removeStorageAccessForAllFramesOnPage):
(WebCore::NetworkStorageSession::removeAllStorageAccess):
(WebCore::NetworkStorageSession::setCacheMaxAgeCapForPrevalentResources):
(WebCore::NetworkStorageSession::resetCacheMaxAgeCapForPrevalentResources):

  • platform/network/NetworkStorageSession.h:
  • platform/network/cf/NetworkStorageSessionCFNet.cpp:

(WebCore::getPartitioningDomain): Deleted.
(WebCore::NetworkStorageSession::shouldBlockThirdPartyCookies const): Deleted.
(WebCore::NetworkStorageSession::shouldBlockCookies const): Deleted.
(WebCore::NetworkStorageSession::maxAgeCacheCap): Deleted.
(WebCore::NetworkStorageSession::setAgeCapForClientSideCookies): Deleted.
(WebCore::NetworkStorageSession::setPrevalentDomainsToBlockCookiesFor): Deleted.
(WebCore::NetworkStorageSession::removePrevalentDomains): Deleted.
(WebCore::NetworkStorageSession::hasStorageAccess const): Deleted.
(WebCore::NetworkStorageSession::getAllStorageAccessEntries const): Deleted.
(WebCore::NetworkStorageSession::grantStorageAccess): Deleted.
(WebCore::NetworkStorageSession::removeStorageAccessForFrame): Deleted.
(WebCore::NetworkStorageSession::removeStorageAccessForAllFramesOnPage): Deleted.
(WebCore::NetworkStorageSession::removeAllStorageAccess): Deleted.
(WebCore::NetworkStorageSession::setCacheMaxAgeCapForPrevalentResources): Deleted.
(WebCore::NetworkStorageSession::resetCacheMaxAgeCapForPrevalentResources): Deleted.

12:24 PM Changeset in webkit [239080] by Chris Dumez
  • 12 edits in trunk

PSON logic gets confused by concurrent decidePolicyForNavigationAction requests
https://bugs.webkit.org/show_bug.cgi?id=192482
<rdar://problem/46470145>

Reviewed by Antti Koivisto.

Source/WebKit:

It is possible to get 2 parallel decidePolicyForNavigationAction() requests from the
WebProcess when a new load is started before responding to the existing policy
decision. This would lead to several issues with regards to PSON:

  • We would decide to swap for the first policy decision and tell the WebProcess to suspend. However, because the WebProcess issued a new decidePolicyForNavigationAction since for the same frame, the previous one is invalidated and the WebProcess would ignore our request to suspend.
  • We would hit assertions later on because the navigation has been destroyed and yet we're getting a didStartProvisionalLoad for it.
  • swapToWebProcess() was asynchronous so that it would wait for the destination SuspendedPage to finish suspending before asking it to unsuspend. This led to various problems because anything can happen in the UIProcess while we're waiting for the suspension (e.g. another load). Also, we may create the SuspendedPageProxy for the current page too late and start getting IPC from the previous process about the suspension load to about:blank.

To address these issues, the following design is now implemented:

  • swapToWebProcess() is no longer asynchronous
  • instead, WebProcessPool::processForNavigation() is now asynchronous. This is better because at this point we have not yet told the WebProcess about the policy decision. We already properly deal with the policy decision being made asynchronously. This also allows us to choose another process if the SuspendedPage we'd like to use failed to suspend.
  • If the WebProcess receives a PolicyAction::Suspend but ignores it, have it send an IPC to the UIProcess so that the SuspendedPageProxy knows about it. We then destroy the SuspendedPageProxy and make sure it is not used.
  • After the asynchronous process selection, if the navigation has been destroy, abort the process-swap to avoid hitting assertions later on due to doing a load for a destroyed navigation.
  • UIProcess/SuspendedPageProxy.cpp:

(WebKit::SuspendedPageProxy::~SuspendedPageProxy):
Make sure m_whenReadyToConsume completion handler gets called if necessary if the
SuspendedPageProxy gets destroyed. We pass null so that the SuspendedPage is not
used.

(WebKit::SuspendedPageProxy::whenReadyToConsume):
Add whenReadyToConsume() utility method to get a completion handler called when
the SuspendedPageProxy is ready to be used. This basically means we have to wait
for the page to finish its about:blank suspension load. If the suspension fails
then we call the completion handler with null to indicate that the suspended
page is not usable.

(WebKit::SuspendedPageProxy::unsuspendAndConsume):
Rename unsuspend() to unsuspendAndConsume() and make it synchronous. This only gets
called after whenReadyToConsume()'s completion handler has been called and if we
do decide to use the SuspendedPageProxy. It tells the WebProcess to unsuspend and
removes the SuspendedPageProxy from the WebProcessPool.

(WebKit::SuspendedPageProxy::didFinishLoad):
rename m_finishedSuspendingHandler to m_whenReadyToConsume.

(WebKit::SuspendedPageProxy::didFailToSuspend):
Add new didFailToSuspend() that gets called when the WebProcess sends us an IPC telling
us it ignored our request to suspend. We then call m_whenReadyToConsume completion
handler with null and destroy the SuspendedPageProxy.

(WebKit::SuspendedPageProxy::didReceiveMessage):

  • UIProcess/SuspendedPageProxy.h:
  • UIProcess/WebNavigationState.h:

(WebKit::WebNavigationState::hasNavigation const):
Add utility function to query if a navigation is still valid.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::swapToWebProcess):
Update method so that it is no longer asynchronous. Some of its code was also moved to
continueNavigationInNewProcess() for clarity.

(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
Deal with WebProcessPool::processForNavigation() now being asynchronous.

(WebKit::WebPageProxy::continueNavigationInNewProcess):
Update code now that swapToWebProcess() is no longer asynchronous. Some of the swapToWebProcess()
code was also moved here for clarity.

(WebKit::WebPageProxy::didFailToSuspendAfterProcessSwap):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:

Add new DidFailToSuspendAfterProcessSwap IPC message.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::processForNavigation):
(WebKit::WebProcessPool::processForNavigationInternal):

  • UIProcess/WebProcessPool.h:

Make asynchronous. If we decide to use a SuspendedPageProxy's process, then call
whenReadyToConsume() on it to wait for it to suspend. If the SuspendedPageProxy
fails to suspend use a new process instead.

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::didReceivePolicyDecision):
If we ignore the policy decision and the decision was "Suspend", send the DidFailToSuspendAfterProcessSwap
IPC to the UIProcess so that the SuspendedPageProxy knows about it.

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
11:27 AM Changeset in webkit [239079] by Devin Rousso
  • 2 edits in trunk/Source/WebCore

Web Inspector: overlay bounds rulers don't match element when page is scrolled
https://bugs.webkit.org/show_bug.cgi?id=192577

Reviewed by Joseph Pecoraro.

When drawing the highlight for a node, the canvas is translated based on the scroll position
of the node. This translation was not applied to the bounds calculations, which meant that
the bounds always drew where the node would have been if it wasn't scrolled.

  • inspector/InspectorOverlayPage.js:

(Bounds.prototype.get minX):
(Bounds.prototype.get minY):
(Bounds.prototype.get maxX):
(Bounds.prototype.get maxY):
(Bounds.prototype.offset): Added.
(drawNodeHighlight):
Drive-by: draw bounds for every node being highlighted instead of just the first one.
Drive-by: switch the bounds color to be a semi-transparent red for more visibility/contrast.

11:21 AM Changeset in webkit [239078] by aestes@apple.com
  • 38 edits in trunk

Introduce makeBlockPtr for lambdas
https://bugs.webkit.org/show_bug.cgi?id=192594

Reviewed by Alex Christensen.

Source/WebCore:

Adopted makeBlockPtr.

  • platform/cocoa/FileMonitorCocoa.mm:

(WebCore::FileMonitor::FileMonitor):

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

(WebCore::VideoFullscreenLayerManagerObjC::setVideoFullscreenLayer):

  • platform/graphics/gpu/legacy/cocoa/GPULegacyCommandBufferMetal.mm:

(WebCore::GPULegacyCommandBuffer::GPULegacyCommandBuffer):

  • platform/network/cocoa/WebCoreNSURLSession.mm:

(-[WebCoreNSURLSession addDelegateOperation:]):
(-[WebCoreNSURLSessionDataTask resource:receivedRedirect:request:completionHandler:]):

  • platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:

(-[WebCoreResourceHandleAsOperationQueueDelegate callFunctionOnMainThread:]):

Source/WebCore/PAL:

Adopted makeBlockPtr.

  • pal/Logging.cpp:

(PAL::registerNotifyCallback):

Source/WebKit:

Adopted makeBlockPtr.

  • NetworkProcess/Downloads/cocoa/WKDownloadProgress.mm:

(-[WKDownloadProgress initWithDownloadTask:download:URL:sandboxExtension:]):

  • NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:

(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::IOChannel::write):

  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::clearDiskCache):
(WebKit::saveCookies):

  • NetworkProcess/watchos/NetworkProximityAssertion.mm:

(WebKit::BluetoothProximityAssertion::suspend):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setInputDelegate:]):

  • UIProcess/API/mac/WKView.mm:

(-[WKView maybeInstallIconLoadingClient]):

  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard):
(WebKit::WebPaymentCoordinatorProxy::platformOpenPaymentSetup):

  • UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:

(WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):

  • UIProcess/Cocoa/AutomationSessionClient.mm:

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

  • UIProcess/Cocoa/DownloadClient.mm:

(WebKit::DownloadClient::didReceiveAuthenticationChallenge):
(WebKit::DownloadClient::decideDestinationWithSuggestedFilename):

  • UIProcess/Cocoa/IconLoadingDelegate.mm:

(WebKit::IconLoadingDelegate::IconLoadingClient::getLoadDecisionForIcon):

  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::NavigationClient::decidePolicyForPluginLoad):
(WebKit::NavigationState::NavigationClient::webGLLoadPolicy const):
(WebKit::NavigationState::NavigationClient::resolveWebGLLoadPolicy const):
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationResponse):
(WebKit::NavigationState::NavigationClient::didReceiveAuthenticationChallenge):

  • 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::exceededDatabaseQuota):
(WebKit::UIDelegate::UIClient::windowFrame):
(WebKit::UIDelegate::UIClient::toolbarsAreVisible):
(WebKit::UIDelegate::UIClient::decidePolicyForNotificationPermissionRequest):
(WebKit::UIDelegate::UIClient::runOpenPanel):
(WebKit::requestUserMediaAuthorizationForDevices):
(WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):
(WebKit::UIDelegate::UIClient::checkUserMediaPermissionForOrigin):
(WebKit::UIDelegate::UIClient::reachedApplicationCacheOriginQuota):
(WebKit::UIDelegate::UIClient::requestPointerLock):

  • UIProcess/Cocoa/WKSafeBrowsingWarning.mm:

(-[WKSafeBrowsingWarning clickedOnLink:]):

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::beginSafeBrowsingCheck):

  • UIProcess/WebAuthentication/Cocoa/HidConnection.mm:

(WebKit::HidConnection::send):

  • UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:

(WebKit::LocalConnection::getUserConsent const):
(WebKit::LocalConnection::getAttestation const):

  • UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:

(WebKit::MockHidConnection::send):

  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::requestPasswordForQuickLookDocument):

  • UIProcess/ios/WKGeolocationProviderIOS.mm:

(-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):

  • UIProcess/mac/ServicesController.mm:

(WebKit::hasCompatibleServicesForItems):
(WebKit::ServicesController::refreshExistingServices):

  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:

(PageLoaderClient::didStartProvisionalLoadForFrame):

Source/WTF:

BlockPtr<...>::fromCallable is cumbersome because it requires repeating the callable's
signature as a class template argument. This patch introduces an overload of makeBlockPtr
that deduces the correct BlockPtr instantiation from a lambda's operator() signature.

  • wtf/BlockPtr.h:

(WTF::makeBlockPtr):

Adopted makeBlockPtr.

  • wtf/cocoa/WorkQueueCocoa.cpp:

(WTF::WorkQueue::dispatch):
(WTF::WorkQueue::dispatchAfter):
(WTF::WorkQueue::concurrentApply):

Tools:

Adopted makeBlockPtr and added API tests.

  • DumpRenderTree/TestRunner.cpp:

(TestRunner::callUIScriptCallback):

  • TestWebKitAPI/Tests/WTF/BlockPtr.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/DownloadProgress.mm:

(-[DownloadProgressTestRunner init]):
(-[DownloadProgressTestRunner subscribeAndWaitForProgress]):

11:10 AM Changeset in webkit [239077] by Chris Dumez
  • 2 edits in trunk/Tools

REGRESSION (r238764-238783): TestWTF.WTF.StringOperators is failing
https://bugs.webkit.org/show_bug.cgi?id=192361
<rdar://problem/46524903>

Reviewed by Alex Christensen.

Compile StringOperators.cpp with -O1 optimization level instead of -Os. This
fixes the failures for me locally.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
10:45 AM Changeset in webkit [239076] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Fix an internal build failure after r239014
https://bugs.webkit.org/show_bug.cgi?id=192205

  • UIProcess/Cocoa/WKSafeBrowsingWarning.mm:

(fontOfSize):
There's a system that doesn't have safe browsing or UIFontTextStyleLargeTitle.

10:12 AM Changeset in webkit [239075] by mark.lam@apple.com
  • 17 edits
    1 copy in branches/safari-606-branch

Cherry-pick r239062. rdar://problem/46603464

2018-12-10 Mark Lam <mark.lam@apple.com>

PropertyAttribute needs a CustomValue bit.
https://bugs.webkit.org/show_bug.cgi?id=191993
<rdar://problem/46264467>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-191993.js: Added.

Source/JavaScriptCore:

This is because GetByIdStatus needs to distinguish CustomValue properties from
other types, and its only means of doing so is via the property's attributes.
Previously, there's nothing in the property's attributes that can indicate that
the property is a CustomValue.

We fix this by doing the following:

  1. Added a PropertyAttribute::CustomValue bit.
  2. Added a PropertyAttribute::CustomAccessorOrValue convenience bit mask that is CustomAccessor | CustomValue.
  1. Since CustomGetterSetter properties are only set via JSObject::putDirectCustomAccessor(), we added a check in JSObject::putDirectCustomAccessor() to see if the attributes bits include PropertyAttribute::CustomAccessor. If not, then the property must be a CustomValue, and we'll add the PropertyAttribute::CustomValue bit to the attributes bits.

This ensures that the property attributes is sufficient to tell us if the
property contains a CustomGetterSetter.

  1. Updated all checks for PropertyAttribute::CustomAccessor to check for PropertyAttribute::CustomAccessorOrValue instead if their intent is to check for the presence of a CustomGetterSetter as opposed to checking specifically for one that is used as a CustomAccessor.

This includes all the Structure transition code that needs to capture the
attributes change when a CustomValue has been added.

  1. Filtered out the PropertyAttribute::CustomValue bit in PropertyDescriptor. The fact that we're using a CustomGetterSetter as a CustomValue should remain invisible to the descriptor. This is because the descriptor should describe a CustomValue no differently from a plain value.
  1. Added some asserts to ensure that property attributes are as expected, and to document some invariants.
  • bytecode/GetByIdStatus.cpp: (JSC::GetByIdStatus::computeFromLLInt): (JSC::GetByIdStatus::computeForStubInfoWithoutExitSiteFeedback): (JSC::GetByIdStatus::computeFor):
  • bytecode/InByIdStatus.cpp: (JSC::InByIdStatus::computeForStubInfoWithoutExitSiteFeedback):
  • bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const):
  • bytecode/PutByIdStatus.cpp: (JSC::PutByIdStatus::computeFor):
  • runtime/JSFunction.cpp: (JSC::getCalculatedDisplayName):
  • runtime/JSObject.cpp: (JSC::JSObject::putDirectCustomAccessor): (JSC::JSObject::putDirectNonIndexAccessor): (JSC::JSObject::putDirectIndexSlowOrBeyondVectorLength):
  • runtime/JSObject.h: (JSC::JSObject::putDirectIndex): (JSC::JSObject::fillCustomGetterPropertySlot): (JSC::JSObject::putDirect):
  • runtime/JSObjectInlines.h: (JSC::JSObject::putDirectInternal):
  • runtime/PropertyDescriptor.cpp: (JSC::PropertyDescriptor::setDescriptor): (JSC::PropertyDescriptor::setCustomDescriptor): (JSC::PropertyDescriptor::setAccessorDescriptor):
  • runtime/PropertySlot.h: (JSC::PropertySlot::setCustomGetterSetter):

Source/WebCore:

This patch revealed a bug in the CodeGenerator where a constructor property is
set with a ReadOnly attribute. This conflicts with the WebIDL link (see clause
12 in https://heycam.github.io/webidl/#interface-prototype-object) which states
that it should be [Writable]. The ReadOnly attribute is now removed.

On the WebCore side, this change is covered by existing tests.

  • bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation):
  • bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: (WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor):
9:39 AM Changeset in webkit [239074] by BJ Burg
  • 2 edits in trunk/Source/WebKit

SimulatedInputDispatcher::transitionInputSourceToState() can reuse a moved-from completion handler
https://bugs.webkit.org/show_bug.cgi?id=191155
<rdar://problem/45745569>

Reviewed by Joseph Pecoraro.

  • UIProcess/Automation/SimulatedInputDispatcher.cpp:

(WebKit::SimulatedInputDispatcher::transitionInputSourceToState):
Add an ASSERT to guard against unexpected inputs where >1 VirtualKey changes per state.
webkitdriver needs to be updated to not produce such states in this scenario, but this will
avoid a runtime crash caused by trying to call a moved-out completion handler a second time.

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

Unreviewed, WPE build fix after r239028

The FLATPAK_USER_DIR env var is not set early enough, leading to:

Traceback (most recent call last):
File "/home/phil/WebKit/Tools/Scripts/webkit-flatpak", line 28, in <module>

sys.exit(WebkitFlatpak.load_from_args().run())

File "/home/phil/WebKit/Tools/flatpak/flatpakutils.py", line 761, in run

if not self.clean_args():

File "/home/phil/WebKit/Tools/flatpak/flatpakutils.py", line 574, in clean_args

_log.debug("Using flatpak user dir: %s" % os.environFLATPAK_USER_DIR?)

File "/usr/lib/python2.7/UserDict.py", line 40, in getitem

raise KeyError(key)

KeyError: 'FLATPAK_USER_DIR'

  • flatpak/flatpakutils.py:

(WebkitFlatpak.clean_args):

6:33 AM Changeset in webkit [239072] by commit-queue@webkit.org
  • 58 edits in trunk/Source/WebKit

Unreviewed, rolling out r239071.
https://bugs.webkit.org/show_bug.cgi?id=192588

Broke WPE build due to undefined references to toAPI() and
toImpl() inside the C API (Requested by magomez on #webkit).

Reverted changeset:

"[meta][WebKit] Remove using namespace WebCore and WebKit in
the global scope for unified source builds"
https://bugs.webkit.org/show_bug.cgi?id=192449
https://trac.webkit.org/changeset/239071

Dec 10, 2018:

10:55 PM Changeset in webkit [239071] by Chris Fleizach
  • 58 edits in trunk/Source/WebKit

[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
https://bugs.webkit.org/show_bug.cgi?id=192449

Reviewed by Darin Adler.

  • NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
  • NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
  • NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
  • NetworkProcess/ios/NetworkProcessIOS.mm:
  • NetworkProcess/mac/NetworkProcessMac.mm:
  • NetworkProcess/mac/RemoteNetworkingContext.mm:
  • Platform/spi/ios/AccessibilitySupportSPI.h:
  • PlatformMac.cmake:
  • PluginProcess/PluginControllerProxy.cpp:
  • PluginProcess/PluginProcess.cpp:
  • PluginProcess/WebProcessConnection.cpp:
  • Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb:
  • Shared/API/c/cf/WKErrorCF.cpp:

(WKErrorCreateWithCFError):
(WKErrorCopyCFError):

  • Shared/API/c/cg/WKImageCG.cpp:

(WKImageCreateCGImage):
(WKImageCreateFromCGImage):

  • Shared/ChildProcess.cpp:
  • Shared/ContextMenuContextData.cpp:
  • Shared/EditorState.cpp:
  • Shared/Plugins/NPIdentifierData.cpp:
  • Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
  • Shared/SessionState.cpp:
  • Shared/SessionTracker.cpp:
  • Shared/ShareableBitmap.cpp:
  • Shared/ShareableResource.cpp:
  • Shared/VisibleContentRectUpdateInfo.cpp:
  • Shared/WebBackForwardListItem.cpp:
  • Shared/WebContextMenuItemData.cpp:
  • Shared/WebCoreArgumentCoders.cpp:
  • Shared/WebHitTestResultData.cpp:
  • Shared/WebImage.cpp:
  • Shared/WebMediaSessionMetadata.cpp:
  • Shared/WebMemorySampler.cpp:
  • Shared/WebMouseEvent.cpp:
  • Shared/WebRenderObject.cpp:
  • Shared/WebSQLiteDatabaseTracker.cpp:
  • Shared/WebWheelEvent.cpp:
  • Shared/cf/ArgumentCodersCF.cpp:
  • Shared/ios/WebPlatformTouchPointIOS.cpp:
  • SourcesCocoa.txt:
  • UIProcess/API/APIContentRuleListStore.cpp:
  • UIProcess/API/APIHitTestResult.cpp:
  • UIProcess/API/APINavigation.cpp:
  • UIProcess/API/APIOpenPanelParameters.cpp:
  • UIProcess/API/APIPageConfiguration.cpp:
  • UIProcess/API/C/WKPage.cpp:

(WKPageLoadURLWithShouldOpenExternalURLsPolicy):
(WKPageLoadURLWithUserData):
(WKPageLoadURLRequestWithUserData):
(WKPageSetPaginationMode):
(WKPageGetPaginationMode):
(WKPageSetPageLoaderClient):
(WKPageSetPagePolicyClient):

  • UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:
  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
  • UIProcess/WebStorage/LocalStorageDatabase.cpp:
  • UIProcess/ios/WKContentView.mm:

(-[WKContentView _commonInitializationWithProcessPool:configuration:]):
(-[WKContentView initWithFrame:processPool:configuration:webView:]):
(-[WKContentView dealloc]):
(-[WKContentView page]):
(-[WKContentView updateFixedClippingView:]):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
(-[WKContentView _updateForScreen:]):
(-[WKContentView _accessibilityRegisterUIProcessTokens]):
(-[WKContentView _createDrawingAreaProxy]):
(-[WKContentView _didCommitLayerTree:]):
(-[WKContentView _wk_pageCountForPrintFormatter:]):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKFocusedElementInfo initWithAssistedNodeInformation:isUserInitiated:userObject:]):
(hasAssistedNode):
(-[WKContentView setupInteraction]):
(-[WKContentView positionInformation]):
(-[WKContentView _webTouchEventsRecognized:]):
(inflateQuad):
(-[WKContentView _updateTapHighlight]):
(-[WKContentView _showTapHighlight]):
(-[WKContentView _requiresKeyboardWhenFirstResponder]):
(-[WKContentView _displayFormNodeInputView]):
(-[WKContentView inputView]):
(-[WKContentView _actionForLongPressFromPositionInformation:]):
(-[WKContentView currentPositionInformation]):
(-[WKContentView doAfterPositionInformationUpdate:forRequest:]):
(-[WKContentView _currentPositionInformationIsValidForRequest:]):
(-[WKContentView _hasValidOutstandingPositionInformationRequest:]):
(-[WKContentView _currentPositionInformationIsApproximatelyValidForRequest:]):
(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView hasSelectablePositionAtPoint:]):
(-[WKContentView pointIsNearMarkedText:]):
(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
(-[WKContentView webSelectionRectsForSelectionRects:]):
(-[WKContentView _twoFingerSingleTapGestureRecognized:]):
(-[WKContentView _stylusSingleTapRecognized:]):
(-[WKContentView _singleTapCommited:]):
(-[WKContentView _attemptClickAtLocation:]):
(-[WKContentView _positionInformationDidChange:]):
(-[WKContentView requiresAccessoryView]):
(-[WKContentView supportedPasteboardTypesForCurrentSelection]):
(-[WKContentView _lookupForWebView:]):
(-[WKContentView _shareForWebView:]):
(-[WKContentView textStylingAtPosition:inDirection:]):
(-[WKContentView canPerformActionForWebView:withSender:]):
(-[WKContentView selectForWebView:]):
(-[WKContentView _accessibilityRetrieveRectsEnclosingSelectionOffset:withGranularity:]):
(-[WKContentView _accessibilityRetrieveRectsAtSelectionOffset:withText:completionHandler:]):
(toGestureType):
(toUIWKGestureType):
(toSelectionTouch):
(toUIWKSelectionTouch):
(toGestureRecognizerState):
(toUIGestureRecognizerState):
(toUIWKSelectionFlags):
(toWKTextGranularity):
(toWKSelectionDirection):
(selectionChangedWithGesture):
(selectionChangedWithTouch):
(-[WKContentView changeSelectionWithGestureAt:withGesture:withState:withFlags:]):
(-[WKContentView autocorrectionData]):
(-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
(-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
(-[WKContentView _updateAccessory]):
(-[WKContentView selectedTextRange]):
(-[WKContentView setMarkedText:selectedRange:]):
(coreWritingDirection):
(-[WKContentView closestPositionToPoint:]):
(-[WKContentView insertText:]):
(-[WKContentView textInputTraits]):
(-[WKContentView handleKeyWebEvent:]):
(-[WKContentView handleKeyWebEvent:withCompletionHandler:]):
(-[WKContentView isScrollableForKeyboardScrollViewAnimator:]):
(-[WKContentView keyboardScrollViewAnimator:distanceForIncrement:]):
(-[WKContentView assistedNodeInformation]):
(-[WKContentView assistedNodeSelectOptions]):
(isAssistableInputType):
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
(-[WKContentView _stopAssistingNode]):
(-[WKContentView updateCurrentAssistedNodeInformation:]):
(-[WKContentView presentViewControllerForCurrentAssistedNode]):
(-[WKContentView actionNameForFocusedFormControlView:]):
(-[WKContentView selectWordForReplacement]):
(-[WKContentView _updateChangedSelection:]):
(-[WKContentView _beginSuppressingSelectionAssistantForReason:]):
(-[WKContentView _stopSuppressingSelectionAssistantForReason:]):
(-[WKContentView _showPlaybackTargetPicker:fromRect:routeSharingPolicy:routingContextUID:]):
(-[WKContentView _showRunOpenPanel:resultListener:]):
(-[WKContentView _showShareSheet:completionHandler:]):
(-[WKContentView positionInformationForActionSheetAssistant:]):
(-[WKContentView updatePositionInformationForActionSheetAssistant:]):
(-[WKContentView _startDrag:item:]):
(-[WKContentView _didHandleAdditionalDragItemsRequest:]):
(-[WKContentView _didHandleStartDataInteractionRequest:]):
(dropOperationForWebCoreDragOperation):
(-[WKContentView dragDataForDropSession:dragDestinationAction:]):
(-[WKContentView _didConcludeEditDataInteraction:]):
(-[WKContentView _didPerformDragOperation:]):
(-[WKContentView _prepareToDragPromisedAttachment:]):
(-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationList:stagedDragSource:]):
(-[WKContentView _autofillContext]):
(-[WKContentView _dragInteraction:itemsForAddingToSession:withTouchAtPoint:completion:]):
(-[WKContentView _dragInteraction:prepareForSession:completion:]):
(-[WKContentView dragInteraction:itemsForBeginningSession:]):
(-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
(-[WKContentView dragInteraction:session:didEndWithOperation:]):
(-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
(-[WKContentView dropInteraction:performDrop:]):
(-[WKContentView dropInteraction:sessionDidEnd:]):
(-[WKContentView allowsLanguageSelectionMenuForListViewController:]):
(-[WKContentView shouldDisplayInputContextViewForListViewController:]):
(-[WKContentView numericInputModeForListViewController:]):
(-[WKContentView textContentTypeForListViewController:]):
(-[WKContentView allowsDictationInputForListViewController:]):
(-[WKContentView _simulateLongPressActionAtLocation:]):
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
(-[WKContentView _presentationRectsForPreviewItemController:]):

  • UIProcess/ios/fullscreen/WKFullScreenViewController.mm:

(WKFullScreenViewControllerPlaybackSessionModelClient::setInterface):
(WKFullScreenViewControllerVideoFullscreenModelClient::setInterface):
(WKFullScreenViewControllerVideoFullscreenModelClient::interface const):
(-[WKFullScreenViewController videoControlsManagerDidChange]):
(-[WKFullScreenViewController _manager]):
(-[WKFullScreenViewController _togglePiPAction:]):

  • UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:

(-[WKFullscreenAnimationController configureInitialAndFinalStatesForTransition:]):
(-[WKFullScreenWindowController isFullScreen]):
(-[WKFullScreenWindowController enterFullScreen]):
(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController exitFullScreen]):
(-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController _completedExitFullScreen]):
(-[WKFullScreenWindowController webViewDidRemoveFromSuperviewWhileInFullscreen]):
(-[WKFullScreenWindowController _exitFullscreenImmediately]):
(-[WKFullScreenWindowController _manager]):

  • UIProcess/mac/WebPageProxyMac.mm:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Cache/WebCacheStorageConnection.cpp:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:

(mediaTimeToCurrentTime):
(-[WKAnimationDelegate initWithLayerID:layerTreeHost:]):

  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:

(-[WKAccessibilityWebPageObjectBase accessibilityRootObjectWrapper]):

10:50 PM Changeset in webkit [239070] by Brent Fulgham
  • 11 edits
    2 copies
    2 adds in trunk

SVGViewSpec objects should mark relevant SVG elements
https://bugs.webkit.org/show_bug.cgi?id=192567
<rdar://problem/46491325>

Reviewed by Ryosuke Niwa.

Source/WebCore:

SVGViewSpec elements reflect the state of an underlying SVGElement. Teach the mark algorithm to
recognize the relevant SVGElement as active as long as the SVGViewSpec is active.

Update SVGElement so that it can vend WeakPtrs. I also noticed that SVGAttributeOwner used a bare
pointer to the SVGElement, so switched to a WeakPtr.

Test: svg/animations/view-dependency-crash.html

  • Sources.txt: Add new files.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • bindings/js/JSSVGViewSpecCustom.cpp: Added.

(WebCore::JSSVGViewSpec::visitAdditionalChildren):

  • svg/SVGElement.h:
  • svg/SVGPathElement.h:
  • svg/SVGViewSpec.cpp:

(WebCore::SVGViewSpec::SVGViewSpec): Hold a weak pointer (rather than a bare pointer) to the underlying element.

  • svg/SVGViewSpec.h:
  • svg/SVGViewSpec.idl:
  • svg/properties/SVGAttributeOwnerProxy.cpp: Added.

(WebCore::SVGAttributeOwnerProxy::SVGAttributeOwnerProxy): Hold a weak pointer (rather than a bare pointer) to
the underling SVGElement.
(WebCore::SVGAttributeOwnerProxy::element const): Ditto.

  • svg/properties/SVGAttributeOwnerProxy.h:

(WebCore::SVGAttributeOwnerProxy::SVGAttributeOwnerProxy): Move implementation to cpp file.
(WebCore::SVGAttributeOwnerProxy::element const): Ditto.

  • svg/properties/SVGAttributeOwnerProxyImpl.h: Update for WeakPtr use.

LayoutTests:

  • svg/animations/view-dependency-crash-expected.txt: Added.
  • svg/animations/view-dependency-crash.html: Added.
9:37 PM Changeset in webkit [239069] by benjamin@webkit.org
  • 3 edits
    3 adds in trunk

<rdar://problem/45296285> Content blocker rule "raw" blocks media elements from loading
https://bugs.webkit.org/show_bug.cgi?id=192439

Reviewed by Dean Jackson.

Source/WebCore:

This broken when WebKit switched to NSURLSession.
In CachedResourceLoader::requestResource(), toResourceType() was turning media load into RAW.

Test: http/tests/contentextensions/video-element-resource-type.html

  • loader/ResourceLoadInfo.cpp:

(WebCore::toResourceType):

LayoutTests:

  • http/tests/contentextensions/video-element-resource-type-expected.txt: Added.
  • http/tests/contentextensions/video-element-resource-type.html: Added.
  • http/tests/contentextensions/video-element-resource-type.html.json: Added.
8:04 PM Changeset in webkit [239068] by don.olmstead@sony.com
  • 14 edits in trunk

Move ENABLE_RESOURCE_LOAD_STATISTICS to FeatureDefines.xcconfig
https://bugs.webkit.org/show_bug.cgi?id=192573

Reviewed by Simon Fraser.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WTF:

Remove ENABLE_RESOURCE_LOAD_STATISTICS from Platform.h and instead rely
on it being set in FeatureDefines.xcconfig.

  • wtf/Platform.h:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
7:55 PM Changeset in webkit [239067] by Justin Michaud
  • 11 edits
    3 copies
    5 adds in trunk

CS Painting API should support multiple worklets.
https://bugs.webkit.org/show_bug.cgi?id=192335

Reviewed by Dean Jackson.

Source/WebCore:

Adds a new map to support separate paint worklet global scopes (one for each worklet). Also
adds some tests and a fix for a repaint bug that this oncovered, where changing a custom property required
for paint would not trigger a repaint if there had not been a valid value set before.

Test: fast/css-custom-paint/multiple-worklets.html

  • css/CSSPaintImageValue.cpp:

(WebCore::CSSPaintImageValue::image):

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::applyProperty):

  • dom/Document.cpp:

(WebCore::Document::prepareForDestruction):
(WebCore::Document::paintWorkletGlobalScope):
(WebCore::Document::setPaintWorkletGlobalScope):

  • dom/Document.h:

(WebCore::Document::paintWorkletGlobalScope): Deleted.

  • rendering/style/RenderStyle.cpp:

(WebCore::changedCustomPaintWatchedProperty):

  • worklets/Worklet.cpp:

(WebCore::Worklet::addModule):

  • worklets/WorkletGlobalScope.cpp:

(WebCore::WorkletGlobalScope::prepareForDestruction):

LayoutTests:

  • fast/css-custom-paint/animate-repaint-expected.txt:
  • fast/css-custom-paint/animate-repaint.html:
  • fast/css-custom-paint/delay-expected.html: Added.
  • fast/css-custom-paint/delay-repaint-expected.txt: Copied from LayoutTests/fast/css-custom-paint/animate-repaint-expected.txt.
  • fast/css-custom-paint/delay-repaint.html: Copied from LayoutTests/fast/css-custom-paint/animate-repaint.html.
  • fast/css-custom-paint/delay.html: Copied from LayoutTests/fast/css-custom-paint/animate-repaint.html.
  • fast/css-custom-paint/multiple-worklets-expected.html: Added.
  • fast/css-custom-paint/multiple-worklets.html: Added.
7:50 PM Changeset in webkit [239066] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION (r238599): unable to select specific timeline
https://bugs.webkit.org/show_bug.cgi?id=192443
<rdar://problem/46608087>

Reviewed by Joseph Pecoraro.

When determining the trailing horizontal edge for TreeElement mouse
events, TreeOutline should not assume that its containing DOM element
is only as wide as its <ol> element.

  • UserInterface/Views/TreeOutline.js:

(WI.TreeOutline.prototype.treeElementFromEvent):

7:46 PM Changeset in webkit [239065] by youenn@apple.com
  • 16 edits
    2 deletes in trunk/Source

Remove derived classes of RealtimeMediaSourceCenter
https://bugs.webkit.org/show_bug.cgi?id=192546

Reviewed by Eric Carlson.

Source/WebCore:

Remove virtual methods of RealtimeMediaSourceCenter and remove derived classes of it.
Instead port specific implementation directly implement the needed default factory methods.

Renamed some methods for improved consistency.
Moved some static variables as RealtimeMediaSourceCenter members.

No change of behavior.

  • WebCore.xcodeproj/project.pbxproj:
  • page/DeprecatedGlobalSettings.cpp:
  • platform/mediastream/RealtimeMediaSourceCenter.cpp:

(WebCore::RealtimeMediaSourceCenter::createMediaStream):
(WebCore::RealtimeMediaSourceCenter::getMediaStreamDevices):
(WebCore::RealtimeMediaSourceCenter::getUserMediaDevices):
(WebCore::RealtimeMediaSourceCenter::setVideoCapturePageState):
(WebCore::RealtimeMediaSourceCenter::setAudioFactory):
(WebCore::RealtimeMediaSourceCenter::unsetAudioFactory):
(WebCore::RealtimeMediaSourceCenter::audioCaptureFactory):
(WebCore::RealtimeMediaSourceCenter::setVideoFactory):
(WebCore::RealtimeMediaSourceCenter::unsetVideoFactory):
(WebCore::RealtimeMediaSourceCenter::videoCaptureFactory):
(WebCore::RealtimeMediaSourceCenter::setDisplayCaptureFactory):
(WebCore::RealtimeMediaSourceCenter::unsetDisplayCaptureFactory):
(WebCore::RealtimeMediaSourceCenter::displayCaptureFactory):

  • platform/mediastream/RealtimeMediaSourceCenter.h:
  • platform/mediastream/RealtimeVideoSource.cpp:

(WebCore::RealtimeVideoSource::~RealtimeVideoSource):
(WebCore::RealtimeVideoSource::prepareToProduceData):

  • platform/mediastream/gstreamer/RealtimeMediaSourceCenterLibWebRTC.cpp:

(WebCore::RealtimeMediaSourceCenter::singleton):
(WebCore::RealtimeMediaSourceCenter::defaultAudioCaptureFactory):
(WebCore::RealtimeMediaSourceCenter::defaultVideoCaptureFactory):
(WebCore::RealtimeMediaSourceCenter::defaultDisplayCaptureFactory):

  • platform/mediastream/gstreamer/RealtimeMediaSourceCenterLibWebRTC.h: Removed.
  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoCaptureSource::~AVVideoCaptureSource):
(WebCore::AVVideoCaptureSource::setupCaptureSession):

  • platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:

(WebCore::DisplayCaptureSourceCocoa::~DisplayCaptureSourceCocoa):
(WebCore::DisplayCaptureSourceCocoa::startProducingData):

  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:

(WebCore::RealtimeMediaSourceCenter::singleton):
(WebCore::RealtimeMediaSourceCenter::defaultAudioCaptureFactory):
(WebCore::RealtimeMediaSourceCenter::defaultVideoCaptureFactory):
(WebCore::RealtimeMediaSourceCenter::defaultDisplayCaptureFactory):

  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.h: Removed.
  • platform/mock/MockRealtimeAudioSource.cpp:

(WebCore::MockRealtimeAudioSource::~MockRealtimeAudioSource):
(WebCore::MockRealtimeAudioSource::startProducingData):

  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

(WebCore::MockRealtimeMediaSourceCenter::setMockRealtimeMediaSourceCenterEnabled):
(WebCore::MockRealtimeMediaSourceCenter::audioCaptureFactory):
(WebCore::MockRealtimeMediaSourceCenter::videoCaptureFactory):

  • platform/mock/MockRealtimeMediaSourceCenter.h:

Source/WebKit:

pdate code according WebCore changes.

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):

  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::~UserMediaCaptureManager):
(WebKit::UserMediaCaptureManager::initialize):

7:43 PM Changeset in webkit [239064] by youenn@apple.com
  • 6 edits in trunk

DataChannels created asynchronously never open and are unusable
https://bugs.webkit.org/show_bug.cgi?id=192566

Reviewed by Eric Carlson.

Source/WebCore:

For every new data channel (remote or local), we should check the underlying backend state.
This allows firing events if needed.
We were not always doing that which was prohibiting sending some open
events for data channels created after the SCTP connection is set up.

Covered by updated test.

  • Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:

(WebCore::LibWebRTCDataChannelHandler::channelEvent):
(WebCore::LibWebRTCDataChannelHandler::setClient):
(WebCore::LibWebRTCDataChannelHandler::OnStateChange):
(WebCore::LibWebRTCDataChannelHandler::checkState):

  • Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:

LayoutTests:

  • webrtc/datachannel/basic-expected.txt:
  • webrtc/datachannel/basic.html:
7:05 PM Changeset in webkit [239063] by rniwa@webkit.org
  • 4 edits in trunk/Source/WebCore

Use WeakPtr to refer to VTTCue in VTTCueBox
https://bugs.webkit.org/show_bug.cgi?id=192575

Reviewed by Eric Carlson.

Address the FIXME in VTTCue::~VTTCue by clearing VTTCueBox::m_cue when VTTCue goes away.
This is implemented by simply using WeakPtr.

No new tests since there shoul be no behaivoral change.

  • html/track/TextTrackCueGeneric.cpp:

(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):

  • html/track/VTTCue.cpp:

(WebCore::VTTCueBox::VTTCueBox):
(WebCore::VTTCueBox::getCue const):
(WebCore::VTTCueBox::applyCSSProperties):
(WebCore::VTTCue::~VTTCue):

  • html/track/VTTCue.h:

(WebCore::VTTCueBox::fontSizeFromCaptionUserPrefs const):

6:42 PM Changeset in webkit [239062] by mark.lam@apple.com
  • 15 edits
    1 add in trunk

PropertyAttribute needs a CustomValue bit.
https://bugs.webkit.org/show_bug.cgi?id=191993
<rdar://problem/46264467>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-191993.js: Added.

Source/JavaScriptCore:

This is because GetByIdStatus needs to distinguish CustomValue properties from
other types, and its only means of doing so is via the property's attributes.
Previously, there's nothing in the property's attributes that can indicate that
the property is a CustomValue.

We fix this by doing the following:

  1. Added a PropertyAttribute::CustomValue bit.
  2. Added a PropertyAttribute::CustomAccessorOrValue convenience bit mask that is CustomAccessor | CustomValue.
  1. Since CustomGetterSetter properties are only set via JSObject::putDirectCustomAccessor(), we added a check in JSObject::putDirectCustomAccessor() to see if the attributes bits include PropertyAttribute::CustomAccessor. If not, then the property must be a CustomValue, and we'll add the PropertyAttribute::CustomValue bit to the attributes bits.

This ensures that the property attributes is sufficient to tell us if the
property contains a CustomGetterSetter.

  1. Updated all checks for PropertyAttribute::CustomAccessor to check for PropertyAttribute::CustomAccessorOrValue instead if their intent is to check for the presence of a CustomGetterSetter as opposed to checking specifically for one that is used as a CustomAccessor.

This includes all the Structure transition code that needs to capture the
attributes change when a CustomValue has been added.

  1. Filtered out the PropertyAttribute::CustomValue bit in PropertyDescriptor. The fact that we're using a CustomGetterSetter as a CustomValue should remain invisible to the descriptor. This is because the descriptor should describe a CustomValue no differently from a plain value.
  1. Added some asserts to ensure that property attributes are as expected, and to document some invariants.
  • bytecode/GetByIdStatus.cpp:

(JSC::GetByIdStatus::computeFromLLInt):
(JSC::GetByIdStatus::computeForStubInfoWithoutExitSiteFeedback):
(JSC::GetByIdStatus::computeFor):

  • bytecode/InByIdStatus.cpp:

(JSC::InByIdStatus::computeForStubInfoWithoutExitSiteFeedback):

  • bytecode/PropertyCondition.cpp:

(JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const):

  • bytecode/PutByIdStatus.cpp:

(JSC::PutByIdStatus::computeFor):

  • runtime/JSFunction.cpp:

(JSC::getCalculatedDisplayName):

  • runtime/JSObject.cpp:

(JSC::JSObject::putDirectCustomAccessor):
(JSC::JSObject::putDirectNonIndexAccessor):
(JSC::JSObject::putDirectIndexSlowOrBeyondVectorLength):

  • runtime/JSObject.h:

(JSC::JSObject::putDirectIndex):
(JSC::JSObject::fillCustomGetterPropertySlot):
(JSC::JSObject::putDirect):

  • runtime/JSObjectInlines.h:

(JSC::JSObject::putDirectInternal):

  • runtime/PropertyDescriptor.cpp:

(JSC::PropertyDescriptor::setDescriptor):
(JSC::PropertyDescriptor::setCustomDescriptor):
(JSC::PropertyDescriptor::setAccessorDescriptor):

  • runtime/PropertySlot.h:

(JSC::PropertySlot::setCustomGetterSetter):

Source/WebCore:

This patch revealed a bug in the CodeGenerator where a constructor property is
set with a ReadOnly attribute. This conflicts with the WebIDL link (see clause
12 in https://heycam.github.io/webidl/#interface-prototype-object) which states
that it should be [Writable]. The ReadOnly attribute is now removed.

On the WebCore side, this change is covered by existing tests.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

  • bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:

(WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor):

5:17 PM Changeset in webkit [239061] by don.olmstead@sony.com
  • 4 edits in trunk

[CMake] Add ENABLE_RESOURCE_LOAD_STATISTICS to WebKitFeatures.cmake
https://bugs.webkit.org/show_bug.cgi?id=192574

Reviewed by Michael Catanzaro.

.:

  • Source/cmake/WebKitFeatures.cmake:

Tools:

  • Scripts/webkitperl/FeatureList.pm:
4:35 PM Changeset in webkit [239060] by Ross Kirsling
  • 2 edits in trunk

Add test262-results directory to .gitignore.
https://bugs.webkit.org/show_bug.cgi?id=192547

Reviewed by Dean Jackson.

  • .gitignore:
4:32 PM Changeset in webkit [239059] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebKit

Animated scrolling on Google Maps scrolls the page in addition to moving the map
https://bugs.webkit.org/show_bug.cgi?id=192521
<rdar://problem/46382007>

Reviewed by Sam Weinig.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/WKKeyboardScrollingAnimator.mm:

(-[WKKeyboardScrollViewAnimator rubberbandableDirections]):
Only do keyboard-based rubber-banding in directions that we can actually
scroll, not directions we can only finger-rubber-band in. This effectively
means keyboard scrolling will ignore "alwaysBounce{Vertical, Horizontal}".

4:08 PM Changeset in webkit [239058] by don.olmstead@sony.com
  • 2 edits in trunk/Tools

Sync FeatureList.pm
https://bugs.webkit.org/show_bug.cgi?id=192565

Reviewed by Michael Catanzaro.

  • Scripts/webkitperl/FeatureList.pm:
3:56 PM Changeset in webkit [239057] by Antti Koivisto
  • 9 edits in trunk/Source

Rename "forced style recalc" to "full style rebuild"
https://bugs.webkit.org/show_bug.cgi?id=192572

Reviewed by Zalan Bujtas.

Source/WebCore:

The old name is confusing.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::hasValidStyleForProperty):

  • dom/Document.cpp:

(WebCore::Document::scheduleStyleRebuild):
(WebCore::Document::scheduleStyleRecalc):
(WebCore::Document::unscheduleStyleRecalc):
(WebCore::Document::hasPendingStyleRebuild const):
(WebCore::Document::resolveStyle):
(WebCore::Document::needsStyleRecalc const):
(WebCore::Document::updateLayoutIgnorePendingStylesheets):
(WebCore::Document::invalidateMatchedPropertiesCacheAndForceStyleRecalc):
(WebCore::Document::setDesignMode):
(WebCore::Document::webkitDidExitFullScreenForElement):
(WebCore::Document::setAnimatingFullScreen):
(WebCore::Document::setFullscreenControlsHidden):
(WebCore::Document::scheduleForcedStyleRecalc): Deleted.
(WebCore::Document::hasPendingForcedStyleRecalc const): Deleted.

  • dom/Document.h:
  • dom/Element.cpp:

(WebCore::Element::needsStyleInvalidation const):

  • page/Page.cpp:

(WebCore::Page::updateStyleAfterChangeInEnvironment):

  • style/StyleScope.cpp:

(WebCore::Style::Scope::updateActiveStyleSheets):

Source/WebKitLegacy/mac:

  • WebView/WebHTMLView.mm:

(-[WebHTMLView setNeedsToApplyStyles:]):

3:36 PM Changeset in webkit [239056] by commit-queue@webkit.org
  • 15 edits in trunk/Source

Unreviewed, rolling out r239023.
https://bugs.webkit.org/show_bug.cgi?id=192571

Speculative rollout due to broken perf test (Requested by
deanj on #webkit).

Reverted changeset:

"Enable HTTP and HTTPS proxies on iOS and make it a property
of the NSURLSession"
https://bugs.webkit.org/show_bug.cgi?id=192374
https://trac.webkit.org/changeset/239023

3:14 PM Changeset in webkit [239055] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

LinkBuffer::copyCompactAndLinkCode() needs to be aware of ENABLE(SEPARATED_WX_HEAP).
https://bugs.webkit.org/show_bug.cgi?id=192569
<rdar://problem/45615617>

Reviewed by Saam Barati.

  • assembler/LinkBuffer.cpp:

(JSC::LinkBuffer::copyCompactAndLinkCode):

3:05 PM Changeset in webkit [239054] by ap@apple.com
  • 2 edits in trunk/Source/WebCore

Include CoreGraphics.h from WebCorePrefix.h
https://bugs.webkit.org/show_bug.cgi?id=192557

Reviewed by Tim Horton.

The theory is that this will improve build time. Let's try and see what bots say.

  • WebCorePrefix.h:
2:18 PM Changeset in webkit [239053] by Wenson Hsieh
  • 5 edits in trunk

[iOS] Unable to upload data that conforms to "public.item" but not "public.content"
https://bugs.webkit.org/show_bug.cgi?id=192555
<rdar://problem/35204990>

Reviewed by Tim Horton.

Source/WebCore:

Add support for uploading content that conforms to "public.item" via drag and drop. Currently, iOS WebKit only
supports data that conforms to "public.content", but there exist several types of files that conform to
"public.item" but not "public.content". See below for more detail.

Test: DragAndDropTests.ExternalSourcePKCS12ToSingleFileInput

  • platform/ios/PasteboardIOS.mm:

(WebCore::Pasteboard::supportedFileUploadPasteboardTypes):

Update this to include "public.item", and remove "public.folder", which is now redundant because "public.folder"
conforms to "public.item".

  • platform/ios/WebItemProviderPasteboard.mm:

(-[NSItemProvider web_containsFileURLAndFileUploadContent]):

Pull out the "contains content that is supported for file uploads" part of this helper method into a separate
method, and use it within -web_containsFileURLAndFileUploadContent. Note that this prevents "public.url"-
conformant data from being uploaded as files (i.e., we never want to upload a URL string *itself* as a file).
Drawing this distinction ensures that we don't confuse item providers that contain just a URL as files when
dropping into a file upload area or file input (see API test: ExternalSourceZIPArchiveAndURLToSingleFileInput
for an example of this corner case).

(-[NSItemProvider web_containsFileUploadContent]):
(-[WebItemProviderPasteboard numberOfFiles]):

Refactor this to use -web_containsFileUploadContent.

Tools:

Add a test to verify that .p12 files may be uploaded as files via drag and drop. "com.rsa.pkcs-12" is an
example of a data type that conforms to "public.item", but not "public.content"; before this patch, we would
only support uploading "public.content", so files such as these would not be accepted when dropping into file
inputs, or be exposed as files on DataTransfer.

  • TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:

(TestWebKitAPI::TEST):

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

Unreviewed, fix the iOS build after r239039.
https://bugs.webkit.org/show_bug.cgi?id=192568

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView dropInteraction:sessionDidUpdate:]):

2:03 PM Changeset in webkit [239051] by Matt Baker
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Move TreeOutlineGroup coordination out of TreeElement
https://bugs.webkit.org/show_bug.cgi?id=192487
<rdar://problem/46543431>

Reviewed by Devin Rousso.

  • UserInterface/Views/TreeElement.js:

(WI.TreeElement.prototype.select):
(WI.TreeElement.prototype.deselect):

  • UserInterface/Views/TreeOutlineGroup.js:

(WI.TreeOutlineGroup):
(WI.TreeOutlineGroup.prototype.itemAdded):
(WI.TreeOutlineGroup.prototype.itemRemoved):
(WI.TreeOutlineGroup.prototype._removeConflictingTreeSelections):
(WI.TreeOutlineGroup.prototype._treeOutlineSelectionDidChange):
(WI.TreeOutlineGroup.groupForTreeOutline): Deleted.
(WI.TreeOutlineGroup.prototype.didSelectTreeElement): Deleted.
make the group responsible for listening to selection changes from the
TreeOutlines it manages, and synchronizing the selection between them.

1:55 PM Changeset in webkit [239050] by ddkilzer@apple.com
  • 2 edits in trunk/Tools

Injected bundle for WebKitTestRunner leaks WKTypeRef objects
<https://webkit.org/b/192481>
<rdar://problem/46539059>

Follow-up to address Darin's feedback.

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::shouldDumpPixels const):
(WTR::TestRunner::whatToDump const):
(WTR::TestRunner::shouldWaitUntilDone const):
(WTR::TestRunner::shouldDumpFrameLoadCallbacks):
(WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const):
(WTR::TestRunner::secureEventInputIsEnabled const):
(WTR::TestRunner::isStatisticsPrevalentResource):
(WTR::TestRunner::isStatisticsVeryPrevalentResource):
(WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder):
(WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder):
(WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo):
(WTR::TestRunner::isStatisticsHasHadUserInteraction):
(WTR::TestRunner::isStatisticsGrandfathered):
(WTR::TestRunner::hasDOMCache):
(WTR::TestRunner::keyExistsInKeychain):

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

Fix WatchOS build.

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

(-[WKContentView actionNameForFocusedFormControlView:]):

1:48 PM Changeset in webkit [239048] by Jonathan Bedard
  • 3 edits in trunk/Tools

webkitpy: Ref tests don't respect platform specific expectations
https://bugs.webkit.org/show_bug.cgi?id=192515
<rdar://problem/46564839>

Reviewed by Lucas Forschler.

  • Scripts/webkitpy/port/base.py:

(Port._expected_baselines_for_suffixes): Accept multiple suffixes so ref tests can use this function.
(Port.expected_baselines): Move implementation to _expected_baselines_for_suffixes.
(Port.expected_filename): Remove irrelevant FIXME, code clean-up.
(Port.reference_files): Instead of just searching a single directory, use _expected_baselines_for_suffixes to
search all platform expectations as well.

  • Scripts/webkitpy/port/base_unittest.py:

(test_ref_tests_platform_directory):

1:30 PM Changeset in webkit [239047] by Matt Lewis
  • 57 edits in trunk/Source/WebKit

Unreviewed, rolling out r239029.

This patch caused internal build failures.

Reverted changeset:

"[meta][WebKit] Remove using namespace WebCore and WebKit in
the global scope for unified source builds"
https://bugs.webkit.org/show_bug.cgi?id=192449
https://trac.webkit.org/changeset/239029

1:26 PM Changeset in webkit [239046] by Chris Dumez
  • 13 edits in trunk

Add SPI to allow the client to set the user-agent at main frame level, from the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=192509
<rdar://problem/46500832>

Reviewed by Alex Christensen.

Source/WebCore:

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::setCustomUserAgent):
(WebCore::DocumentLoader::customUserAgent const):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::userAgent const):

Source/WebKit:

Add SPI to allow the client to set the user-agent at main frame level, from the UIProcess instead of doing
it at resource-level from the injected bundle.

The custom user-agent string can now be set on _WKWebsitePolicies during the
decidePolicyForNavigationAction for the main feame, and will impact this main resource load as well as its
future subresource loads.

  • Shared/WebsitePoliciesData.cpp:

(WebKit::WebsitePoliciesData::encode const):
(WebKit::WebsitePoliciesData::decode):
(WebKit::WebsitePoliciesData::applyToDocumentLoader):

  • Shared/WebsitePoliciesData.h:
  • UIProcess/API/APIWebsitePolicies.cpp:

(API::WebsitePolicies::data):

  • UIProcess/API/APIWebsitePolicies.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.mm:

(-[_WKWebsitePolicies setCustomUserAgent:]):
(-[_WKWebsitePolicies customUserAgent]):

  • UIProcess/Cocoa/NavigationState.mm:

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

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:

(-[DataMappingSchemeHandler addMappingFromURLString:toData:]):
(-[DataMappingSchemeHandler webView:startURLSchemeTask:]):
(-[DataMappingSchemeHandler webView:stopURLSchemeTask:]):
(-[CustomUserAgentDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
(-[CustomUserAgentDelegate webView:didFinishNavigation:]):

1:11 PM Changeset in webkit [239045] by Caio Lima
  • 22 edits
    5 adds in trunk

[BigInt] Add ValueMul into DFG
https://bugs.webkit.org/show_bug.cgi?id=186175

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/big-int-mul-jit-osr.js: Added.
  • stress/big-int-mul-jit-untyped.js: Added.
  • stress/value-mul-fixup-int32-big-int.js: Added.

PerformanceTests:

  • BigIntBench/big-int-simple-mul.js: Added.
  • BigIntBench/value-mul-type-propagation.js: Added.

Source/JavaScriptCore:

This patch is adding a new DFG node called ValueMul. This node is
responsible to handle multiplication operations that can result into
non-number values. We emit such node during DFGByteCodeParser when the
operands are not numbers. During FixupPhase, we change this
operation to ArithMul if we can speculate Number/Boolean operands.

The BigInt specialization shows a small progression:

noSpec changes

big-int-simple-mul 18.8090+-1.0435 17.4305+-0.2673 definitely 1.0791x faster

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGBackwardsPropagationPhase.cpp:

(JSC::DFG::BackwardsPropagationPhase::propagate):

  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupMultiplication):
(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGNode.h:

(JSC::DFG::Node::arithNodeFlags):

  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileValueMul):
(JSC::DFG::SpeculativeJIT::compileArithMul):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGValidate.cpp:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileValueMul):
(JSC::FTL::DFG::LowerDFGToB3::compileArithMul):

12:56 PM Changeset in webkit [239044] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Safe browsing warning should layout buttons vertically in narrow WKWebViews
https://bugs.webkit.org/show_bug.cgi?id=192535
<rdar://problem/46308364>

Reviewed by Tim Horton.

They're usually next to each other, but in narrow WKWebViews they currently get clipped.
In order to make it more likely that both buttons are completely visible, put one above
the other if the WKWebView is too narrow to completely show both. This also helps with
languages where the translations of "Go Back" or "Show Details" are rendered wider than English.

  • UIProcess/Cocoa/WKSafeBrowsingWarning.mm:

(buttonWidth):
(-[WKSafeBrowsingWarning addContent]):

12:46 PM Changeset in webkit [239043] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WebCore

[GLib] FileSystem::moveFile() should fall back to copying
https://bugs.webkit.org/show_bug.cgi?id=192562

Reviewed by Michael Catanzaro.

No new tests needed.

  • platform/glib/FileSystemGlib.cpp:

(WebCore::FileSystem::moveFile): Use g_file_move() instead of a plain g_rename(), which
provides a fall-back which does copy+delete when a direct move or rename cannot be done.

12:43 PM Changeset in webkit [239042] by Simon Fraser
  • 12 edits in trunk

Allow control over child order when adding nodes to the scrolling tree
https://bugs.webkit.org/show_bug.cgi?id=176914
<rdar://problem/46542237>

Re-land r239010 after over-zealous rollout.

Source/WebCore:

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::attachToStateTree):
(WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):

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

(WebCore::ScrollingCoordinator::attachToStateTree):

  • page/scrolling/ScrollingStateNode.cpp:

(WebCore::ScrollingStateNode::insertChild):
(WebCore::ScrollingStateNode::indexOfChild const):

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

(WebCore::ScrollingStateTree::nodeTypeAndParentMatch const):
(WebCore::ScrollingStateTree::attachNode):

  • page/scrolling/ScrollingStateTree.h:

Source/WebKit:

  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:

(WebKit::RemoteScrollingCoordinatorTransaction::decode):

LayoutTests:

  • platform/mac-wk2/TestExpectations:
12:42 PM Changeset in webkit [239041] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

Document should throttle style recalc even when m_pendingStyleRecalcShouldForce is true.
https://bugs.webkit.org/show_bug.cgi?id=191695

Reviewed by Zalan Bujtas.

  • dom/Document.cpp:

(WebCore::Document::scheduleStyleRecalc):

Don't test for m_pendingStyleRecalcShouldForce.

(WebCore::Document::hasPendingStyleRecalc const):
(WebCore::Document::hasPendingForcedStyleRecalc const):

Don't base the pending status of these function on whether the timer is running.
Instead check if the style is invalid.

12:31 PM Changeset in webkit [239040] by commit-queue@webkit.org
  • 8 edits in trunk

XMLHttpRequest removes spaces from content-types before processing
https://bugs.webkit.org/show_bug.cgi?id=8644

Patch by Rob Buis <rbuis@igalia.com> on 2018-12-10
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Update improved test expectations.

  • web-platform-tests/mimesniff/mime-types/parsing.any-expected.txt:
  • web-platform-tests/mimesniff/mime-types/parsing.any.worker-expected.txt:

Source/WebCore:

Stop trimming white space characters from the middle of
type/subtype value. Also make sure whitespace being parsed
adheres to OWS definition from RFC 7230 Section 3.2.3
(referenced by RFC 7231), i.e. space or HT.

Based on http://crrev.com/416586.

Behavior matches Firefox and Chrome.

Tests: http/tests/xmlhttprequest/supported-xml-content-types.html

web-platform-tests/mimesniff/mime-types/parsing.any.html
web-platform-tests/mimesniff/mime-types/parsing.any.worker.html

  • platform/network/HTTPParsers.cpp:

(WebCore::extractMIMETypeFromMediaType):

LayoutTests:

Update improved test expectation and remove comment.

  • http/tests/xmlhttprequest/supported-xml-content-types-expected.txt:
  • http/tests/xmlhttprequest/supported-xml-content-types.html:
12:27 PM Changeset in webkit [239039] by Wenson Hsieh
  • 17 edits in trunk

[iOS] Caret is obscured by finger when dragging over an editable element
https://bugs.webkit.org/show_bug.cgi?id=192499
<rdar://problem/46570101>

Reviewed by Tim Horton.

Source/WebCore:

  • page/DragActions.h:

Move DragHandlingMethod to DragActions.h, and drive-by fix some minor issues (i.e. make a couple of enum classes
use 8 bits, fix the indentation levels, and update the copyright year). Also add EnumTraits for
DragHandlingMethod so that it may be encoded over IPC.

  • page/DragController.cpp:

(WebCore::dragIsHandledByDocument):

Simplify this helper function.

(WebCore::DragController::tryDocumentDrag):

  • page/DragController.h:

Expose the current DragHandlingMethod via a const getter method.

(WebCore::DragController::dragHandlingMethod const):

Source/WebKit:

Add support for setting the precise property of UIDropProposal to YES when dragging over an editable area.
When enabled, this property shifts the drop location up by a small amount, allowing the user to see the drop
caret (currently, this is not the case, and it's difficult to drop text at a precise location on iOS). Changes
are covered by adding to existing API tests.

  • Scripts/webkit/messages.py:
  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:

Add a new version of -_webView:willUpdateDataInteractionOperationToOperation:forSession: that receives and
returns a UIDropProposal, so that Mail can more easily port over existing logic in its legacy-WebKit-based
compose implementation. iOS Safari is currently the only client of this private delegate, so the old version can
be easily removed once Safari adopts this new version.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didPerformDragControllerAction):

Add plumbing to send the latest drag handling method from WebPage to WebPageProxy.

(WebKit::WebPageProxy::resetCurrentDragInformation):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::currentDragHandlingMethod const):

  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView dropInteraction:sessionDidUpdate:]):

Call the new UI delegate hook when determining the drop proposal to return to UIKit. Additionally set the
precise bit on the drop proposal in the case where the drop handling method is either "editing rich text" or
"editing plain text".

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::performDragControllerAction):

  • WebProcess/WebPage/WebPage.h:

Tools:

Augment some existing API tests to check that the precise flag is either on or off on UIDropProposal.

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

(-[DragAndDropSimulator _resetSimulatedState]):
(-[DragAndDropSimulator lastKnownDropProposal]):

Rename currentDropProposal to lastKnownDropProposal, and expose it as a readonly property.

(-[DragAndDropSimulator _concludeDropAndPerformOperationIfNecessary]):
(-[DragAndDropSimulator _advanceProgress]):
(-[DragAndDropSimulator setShowCustomActionSheetBlock:]):
(-[DragAndDropSimulator showCustomActionSheetBlock]):
(-[DragAndDropSimulator setConvertItemProvidersBlock:]):
(-[DragAndDropSimulator convertItemProvidersBlock]):
(-[DragAndDropSimulator setOverridePerformDropBlock:]):
(-[DragAndDropSimulator overridePerformDropBlock]):
(-[DragAndDropSimulator setOverrideDragUpdateBlock:]):
(-[DragAndDropSimulator overrideDragUpdateBlock]):
(-[DragAndDropSimulator setDropCompletionBlock:]):
(-[DragAndDropSimulator dropCompletionBlock]):

Refactor these properties to return and take normal Objective-C blocks, rather than BlockPtrs. However, use
BlockPtr instance variables to manage the lifetimes of these blocks.

(-[DragAndDropSimulator _webView:willUpdateDropProposalToProposal:forSession:]):
(-[DragAndDropSimulator _webView:willUpdateDataInteractionOperationToOperation:forSession:]): Deleted.

Update this to use the new WebKit delegate hook for overriding the drop proposal.

11:53 AM Changeset in webkit [239038] by youenn@apple.com
  • 5 edits in trunk/Source

Make mock capture happen in the process used for real capture
https://bugs.webkit.org/show_bug.cgi?id=192544

Reviewed by Eric Carlson.

Source/WebCore:

MockRealtimeMediaSourceCenter previously was setting its factories whenever mock capture is on.
Add booleans to choose which source (audio, video, display) will actually be toggled on.

Covered by existing tests.

  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

(WebCore::MockRealtimeMediaSourceCenter::setMockRealtimeMediaSourceCenterEnabled):

  • platform/mock/MockRealtimeMediaSourceCenter.h:

(WebCore::MockRealtimeMediaSourceCenter::setMockAudioCaptureEnabled):
(WebCore::MockRealtimeMediaSourceCenter::setMockVideoCaptureEnabled):
(WebCore::MockRealtimeMediaSourceCenter::setMockDisplayCaptureEnabled):

Source/WebKit:

Make mock capture happen in the right process by only overriding
factories by mock factories for source types that UserMediaCaptureManager will not override.
That way, UserMediaCaptureManager will be used to go to UIProcess, where mock will be used as if it was the real capture.

  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::initialize):

11:45 AM Changeset in webkit [239037] by dino@apple.com
  • 7 edits in trunk/Source

Use text/javascript as recommended by the HTML specification
https://bugs.webkit.org/show_bug.cgi?id=192525
<rdar://problem/46569636>

Reviewed by Jon Lee.

The HTML specification says we should use text/javascript for
JavaScript files:
https://html.spec.whatwg.org/multipage/scripting.html#scriptingLanguages:javascript-mime-type

Source/WebCore:

  • loader/cache/CachedScript.cpp: Replace application/javascript with text/javascript.

(WebCore::CachedScript::CachedScript):

  • platform/network/ios/WebCoreURLResponseIOS.mm: Ditto.

(WebCore::createExtensionToMIMETypeMap):

  • platform/network/mac/WebCoreURLResponse.mm: Ditto.

(WebCore::createExtensionToMIMETypeMap):

Source/WebInspectorUI:

  • UserInterface/Base/MIMETypeUtilities.js:

(WI.mimeTypeForFileExtension):

  • UserInterface/Views/TextEditor.js:

(WI.TextEditor.prototype._attemptToDetermineMIMEType):

11:37 AM Changeset in webkit [239036] by dino@apple.com
  • 6 edits
    2 adds in trunk/Source/WebCore

[iOS] Make WebGPU work with remote layer hosting
https://bugs.webkit.org/show_bug.cgi?id=192508
<rdar://problem/46560649>

Reviewed by Tim Horton.

WebGPU wasn't working on iOS because we were not correctly
identifying the CALayers for remote hosting. Fix this by
adding a new CALayer type, WebGPULayer. This will also
eventually hold the code to render WebGPU into a canvas.

Covered by the existing reference tests (on device).

  • SourcesCocoa.txt: Add new files.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: Recognise the WebGPULayer

class for remote hosting.
(WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
(WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):

  • platform/graphics/cocoa/WebGPULayer.h: Added. Very simple inheritance

from CAMetalLayer.

  • platform/graphics/cocoa/WebGPULayer.mm: Added.

(-[WebGPULayer init]):
(-[WebGPULayer copyImageSnapshotWithColorSpace:]):

  • platform/graphics/gpu/GPUSwapChain.h: Reference WebGPULayer rather

than CALayer.

  • platform/graphics/gpu/cocoa/GPUSwapChainMetal.mm: Ensure that

the WebGPULayer has a reference back to this object, which it
will use in the future.
(WebCore::GPUSwapChain::create):
(WebCore::GPUSwapChain::GPUSwapChain):

10:06 AM Changeset in webkit [239035] by ap@apple.com
  • 4 edits in trunk/Source

Move ENABLE_SEC_ITEM_SHIM out of WebKit's config.h
https://bugs.webkit.org/show_bug.cgi?id=192428

Reviewed by Tim Horton.

Source/WebKit:

  • config.h:

Source/WTF:

  • wtf/Platform.h:
9:55 AM Changeset in webkit [239034] by ap@apple.com
  • 4 edits in trunk/Source

Move more macros out of WebKit's config.h
https://bugs.webkit.org/show_bug.cgi?id=192430

Reviewed by Tim Horton.

Source/WebKit:

  • config.h:

Source/WTF:

  • wtf/Platform.h:
9:51 AM Changeset in webkit [239033] by Chris Dumez
  • 4 edits in trunk/Source

[macOS] MSHCreateMIGServerSource invocation does not handle send/receive rights correctly
https://bugs.webkit.org/show_bug.cgi?id=192533
rdar://problem/45732710

Patch by Darin Adler <Darin Adler> on 2018-12-10
Reviewed by Anders Carlsson.

Source/WebCore/PAL:

  • pal/spi/mac/HIServicesSPI.h: Added kMSHDoNotCreateSendRightOption.

Source/WebKitLegacy/mac:

  • Plugins/Hosted/NetscapePluginHostProxy.mm:

(WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy): Pass kMSHDoNotCreateSendRightOption.

9:50 AM Changeset in webkit [239032] by Chris Dumez
  • 3 edits in trunk/Source/WebKitLegacy/mac

[macOS] Use mach_port_mod_refs instead of mach_port_destroy
https://bugs.webkit.org/show_bug.cgi?id=192532
rdar://problem/45731047

Patch by Darin Adler <Darin Adler> on 2018-12-10
Reviewed by Chris Dumez.

  • Plugins/Hosted/NetscapePluginHostManager.mm:

(WebKit::NetscapePluginHostManager::hostForPlugin): Use mach_port_mod_refs.

  • Plugins/Hosted/NetscapePluginHostProxy.mm:

(WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy): Ditto.

9:17 AM Changeset in webkit [239031] by Truitt Savell
  • 6 edits
    2 deletes in trunk/Source/WebCore

Unreviewed, rolling out r238965.

Caused internal iOS build failures

Reverted changeset:

"[iOS] Make WebGPU work with remote layer hosting"
https://bugs.webkit.org/show_bug.cgi?id=192508
https://trac.webkit.org/changeset/238965

8:30 AM Changeset in webkit [239030] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

MockLibWebRTCPeerConnectionFactory should isolate copy its test case
https://bugs.webkit.org/show_bug.cgi?id=192545

Reviewed by Eric Carlson.

Isolate copy the test case member so that it can be destroyed on another thread.
Covered by existing test that should no longer crash.

  • testing/MockLibWebRTCPeerConnection.cpp:

(WebCore::useMockRTCPeerConnectionFactory):
(WebCore::MockLibWebRTCPeerConnectionFactory::MockLibWebRTCPeerConnectionFactory):

  • testing/MockLibWebRTCPeerConnection.h:

(WebCore::MockLibWebRTCPeerConnectionFactory::create):

8:07 AM Changeset in webkit [239029] by Chris Fleizach
  • 57 edits in trunk/Source/WebKit

[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
https://bugs.webkit.org/show_bug.cgi?id=192449

Reviewed by Darin Adler.

  • NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
  • NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
  • NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
  • NetworkProcess/ios/NetworkProcessIOS.mm:
  • NetworkProcess/mac/NetworkProcessMac.mm:
  • NetworkProcess/mac/RemoteNetworkingContext.mm:
  • Platform/spi/ios/AccessibilitySupportSPI.h:
  • PlatformMac.cmake:
  • PluginProcess/PluginControllerProxy.cpp:
  • PluginProcess/PluginProcess.cpp:
  • PluginProcess/WebProcessConnection.cpp:
  • Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb:
  • Shared/API/c/cf/WKErrorCF.cpp:

(WKErrorCreateWithCFError):
(WKErrorCopyCFError):

  • Shared/API/c/cg/WKImageCG.cpp:

(WKImageCreateCGImage):
(WKImageCreateFromCGImage):

  • Shared/ChildProcess.cpp:
  • Shared/ContextMenuContextData.cpp:
  • Shared/EditorState.cpp:
  • Shared/Plugins/NPIdentifierData.cpp:
  • Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
  • Shared/SessionState.cpp:
  • Shared/SessionTracker.cpp:
  • Shared/ShareableBitmap.cpp:
  • Shared/ShareableResource.cpp:
  • Shared/VisibleContentRectUpdateInfo.cpp:
  • Shared/WebBackForwardListItem.cpp:
  • Shared/WebContextMenuItemData.cpp:
  • Shared/WebCoreArgumentCoders.cpp:
  • Shared/WebHitTestResultData.cpp:
  • Shared/WebImage.cpp:
  • Shared/WebMediaSessionMetadata.cpp:
  • Shared/WebMemorySampler.cpp:
  • Shared/WebMouseEvent.cpp:
  • Shared/WebRenderObject.cpp:
  • Shared/WebSQLiteDatabaseTracker.cpp:
  • Shared/WebWheelEvent.cpp:
  • Shared/cf/ArgumentCodersCF.cpp:
  • Shared/ios/WebPlatformTouchPointIOS.cpp:
  • SourcesCocoa.txt:
  • UIProcess/API/APIContentRuleListStore.cpp:
  • UIProcess/API/APIHitTestResult.cpp:
  • UIProcess/API/APINavigation.cpp:
  • UIProcess/API/APIOpenPanelParameters.cpp:
  • UIProcess/API/APIPageConfiguration.cpp:
  • UIProcess/API/C/WKPage.cpp:

(WKPageLoadURLWithShouldOpenExternalURLsPolicy):
(WKPageLoadURLWithUserData):
(WKPageLoadURLRequestWithUserData):
(WKPageSetPaginationMode):
(WKPageGetPaginationMode):
(WKPageSetPageLoaderClient):
(WKPageSetPagePolicyClient):

  • UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:
  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
  • UIProcess/WebStorage/LocalStorageDatabase.cpp:
  • UIProcess/ios/WKContentView.mm:

(-[WKContentView _commonInitializationWithProcessPool:configuration:]):
(-[WKContentView initWithFrame:processPool:configuration:webView:]):
(-[WKContentView dealloc]):
(-[WKContentView page]):
(-[WKContentView updateFixedClippingView:]):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
(-[WKContentView _updateForScreen:]):
(-[WKContentView _accessibilityRegisterUIProcessTokens]):
(-[WKContentView _createDrawingAreaProxy]):
(-[WKContentView _didCommitLayerTree:]):
(-[WKContentView _wk_pageCountForPrintFormatter:]):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKFocusedElementInfo initWithAssistedNodeInformation:isUserInitiated:userObject:]):
(hasAssistedNode):
(-[WKContentView setupInteraction]):
(-[WKContentView positionInformation]):
(-[WKContentView _webTouchEventsRecognized:]):
(inflateQuad):
(-[WKContentView _updateTapHighlight]):
(-[WKContentView _showTapHighlight]):
(-[WKContentView _requiresKeyboardWhenFirstResponder]):
(-[WKContentView _displayFormNodeInputView]):
(-[WKContentView inputView]):
(-[WKContentView _actionForLongPressFromPositionInformation:]):
(-[WKContentView currentPositionInformation]):
(-[WKContentView doAfterPositionInformationUpdate:forRequest:]):
(-[WKContentView _currentPositionInformationIsValidForRequest:]):
(-[WKContentView _hasValidOutstandingPositionInformationRequest:]):
(-[WKContentView _currentPositionInformationIsApproximatelyValidForRequest:]):
(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView hasSelectablePositionAtPoint:]):
(-[WKContentView pointIsNearMarkedText:]):
(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
(-[WKContentView webSelectionRectsForSelectionRects:]):
(-[WKContentView _twoFingerSingleTapGestureRecognized:]):
(-[WKContentView _stylusSingleTapRecognized:]):
(-[WKContentView _singleTapCommited:]):
(-[WKContentView _attemptClickAtLocation:]):
(-[WKContentView _positionInformationDidChange:]):
(-[WKContentView requiresAccessoryView]):
(-[WKContentView supportedPasteboardTypesForCurrentSelection]):
(-[WKContentView _lookupForWebView:]):
(-[WKContentView _shareForWebView:]):
(-[WKContentView textStylingAtPosition:inDirection:]):
(-[WKContentView canPerformActionForWebView:withSender:]):
(-[WKContentView selectForWebView:]):
(-[WKContentView _accessibilityRetrieveRectsEnclosingSelectionOffset:withGranularity:]):
(-[WKContentView _accessibilityRetrieveRectsAtSelectionOffset:withText:completionHandler:]):
(toGestureType):
(toUIWKGestureType):
(toSelectionTouch):
(toUIWKSelectionTouch):
(toGestureRecognizerState):
(toUIGestureRecognizerState):
(toUIWKSelectionFlags):
(toWKTextGranularity):
(toWKSelectionDirection):
(selectionChangedWithGesture):
(selectionChangedWithTouch):
(-[WKContentView changeSelectionWithGestureAt:withGesture:withState:withFlags:]):
(-[WKContentView autocorrectionData]):
(-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
(-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
(-[WKContentView _updateAccessory]):
(-[WKContentView selectedTextRange]):
(-[WKContentView setMarkedText:selectedRange:]):
(coreWritingDirection):
(-[WKContentView closestPositionToPoint:]):
(-[WKContentView insertText:]):
(-[WKContentView textInputTraits]):
(-[WKContentView handleKeyWebEvent:]):
(-[WKContentView handleKeyWebEvent:withCompletionHandler:]):
(-[WKContentView isScrollableForKeyboardScrollViewAnimator:]):
(-[WKContentView keyboardScrollViewAnimator:distanceForIncrement:]):
(-[WKContentView assistedNodeInformation]):
(-[WKContentView assistedNodeSelectOptions]):
(isAssistableInputType):
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
(-[WKContentView _stopAssistingNode]):
(-[WKContentView updateCurrentAssistedNodeInformation:]):
(-[WKContentView presentViewControllerForCurrentAssistedNode]):
(-[WKContentView actionNameForFocusedFormControlView:]):
(-[WKContentView selectWordForReplacement]):
(-[WKContentView _updateChangedSelection:]):
(-[WKContentView _beginSuppressingSelectionAssistantForReason:]):
(-[WKContentView _stopSuppressingSelectionAssistantForReason:]):
(-[WKContentView _showPlaybackTargetPicker:fromRect:routeSharingPolicy:routingContextUID:]):
(-[WKContentView _showRunOpenPanel:resultListener:]):
(-[WKContentView _showShareSheet:completionHandler:]):
(-[WKContentView positionInformationForActionSheetAssistant:]):
(-[WKContentView updatePositionInformationForActionSheetAssistant:]):
(-[WKContentView _startDrag:item:]):
(-[WKContentView _didHandleAdditionalDragItemsRequest:]):
(-[WKContentView _didHandleStartDataInteractionRequest:]):
(dropOperationForWebCoreDragOperation):
(-[WKContentView dragDataForDropSession:dragDestinationAction:]):
(-[WKContentView _didConcludeEditDataInteraction:]):
(-[WKContentView _didPerformDragOperation:]):
(-[WKContentView _prepareToDragPromisedAttachment:]):
(-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationList:stagedDragSource:]):
(-[WKContentView _autofillContext]):
(-[WKContentView _dragInteraction:itemsForAddingToSession:withTouchAtPoint:completion:]):
(-[WKContentView _dragInteraction:prepareForSession:completion:]):
(-[WKContentView dragInteraction:itemsForBeginningSession:]):
(-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
(-[WKContentView dragInteraction:session:didEndWithOperation:]):
(-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
(-[WKContentView dropInteraction:performDrop:]):
(-[WKContentView dropInteraction:sessionDidEnd:]):
(-[WKContentView allowsLanguageSelectionMenuForListViewController:]):
(-[WKContentView shouldDisplayInputContextViewForListViewController:]):
(-[WKContentView numericInputModeForListViewController:]):
(-[WKContentView textContentTypeForListViewController:]):
(-[WKContentView allowsDictationInputForListViewController:]):
(-[WKContentView _simulateLongPressActionAtLocation:]):
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
(-[WKContentView _presentationRectsForPreviewItemController:]):

  • UIProcess/ios/fullscreen/WKFullScreenViewController.mm:

(WKFullScreenViewControllerPlaybackSessionModelClient::setInterface):
(WKFullScreenViewControllerVideoFullscreenModelClient::setInterface):
(WKFullScreenViewControllerVideoFullscreenModelClient::interface const):
(-[WKFullScreenViewController videoControlsManagerDidChange]):
(-[WKFullScreenViewController _manager]):
(-[WKFullScreenViewController _togglePiPAction:]):

  • UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:

(-[WKFullscreenAnimationController configureInitialAndFinalStatesForTransition:]):
(-[WKFullScreenWindowController isFullScreen]):
(-[WKFullScreenWindowController enterFullScreen]):
(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController exitFullScreen]):
(-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController _completedExitFullScreen]):
(-[WKFullScreenWindowController webViewDidRemoveFromSuperviewWhileInFullscreen]):
(-[WKFullScreenWindowController _exitFullscreenImmediately]):
(-[WKFullScreenWindowController _manager]):

  • UIProcess/mac/WebPageProxyMac.mm:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Cache/WebCacheStorageConnection.cpp:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:

(mediaTimeToCurrentTime):
(-[WKAnimationDelegate initWithLayerID:layerTreeHost:]):

  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:

(-[WKAccessibilityWebPageObjectBase accessibilityRootObjectWrapper]):

6:58 AM Changeset in webkit [239028] by Michael Catanzaro
  • 2 edits in trunk/Tools

[WPE][GTK] run-minibrowser improperly creates webkit-flatpak environment
https://bugs.webkit.org/show_bug.cgi?id=190241

Reviewed by Carlos Garcia Campos.

run-minibrowser calls into webkit-flatpak to check if a flatpak environment is available.
Currently this actually creates the directories needed for the flatpak environment. Fix it.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.clean_args):
(WebkitFlatpak.run):

6:56 AM Changeset in webkit [239027] by Michael Catanzaro
  • 2 edits in trunk/Tools

[GTK] Don't use the slice allocator
https://bugs.webkit.org/show_bug.cgi?id=192360

Reviewed by Carlos Garcia Campos.

  • MiniBrowser/gtk/main.c:

(aboutDataRequestFree):
(aboutDataRequestNew):

1:05 AM Changeset in webkit [239026] by timothy_horton@apple.com
  • 6 edits in trunk

WKWebView should support custom tintColor
https://bugs.webkit.org/show_bug.cgi?id=192518
<rdar://problem/37243261>

Reviewed by Wenson Hsieh.

Source/WebKit:

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView insertionPointColor]):
(-[WKContentView selectionBarColor]):
(-[WKContentView selectionHighlightColor]):
Grab insertion point and selection colors from UITextInputTraits.

(-[WKContentView _updateInteractionTintColor]):
Determine our effective tint color:

  • transparent if interaction is disabled
  • a CSS-derived color if caret-color style is applied
  • the _inheritedInteractionTintColor, which climbs up to the tintColor API

Apply it to our UITextInputTraits.

(-[WKContentView tintColorDidChange]):
(-[WKContentView textInputTraits]):
Call _updateInteractionTintColor whenever we create a new UITextInputTraits
or when the tint color changes.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/SystemColors.mm:

(TestWebKitAPI::TEST):
Add a test that tintColor affects UITextInputTraits' interaction colors.

Note: See TracTimeline for information about the timeline view.