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

Timeline



Feb 8, 2018:

11:31 PM Changeset in webkit [228312] by graouts@webkit.org
  • 11 edits in trunk

[Web Animations] Always expose "composite" in output of getKeyframes()
https://bugs.webkit.org/show_bug.cgi?id=182600

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Update expected results to account for a number of progressions.

  • web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt:
  • web-platform-tests/web-animations/interfaces/KeyframeEffect/composite-expected.txt:
  • web-platform-tests/web-animations/interfaces/KeyframeEffect/setKeyframes-expected.txt:

Source/WebCore:

The Web Animations spec has changed and whereas the output of getKeyframes() would not feature the "composite" property
for "null" values, it now lists "composite" in all cases.

To support this, we needed to fix an issue in the code generator such that a "null" default value for an optional enum
type was supported.

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::getKeyframes):

  • animation/KeyframeEffect.h:
  • animation/KeyframeEffect.idl:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateDefaultValue):

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

(WebCore::convertDictionary<TestObj::Dictionary>):
(WebCore::convertDictionaryToJS):

  • bindings/scripts/test/TestObj.idl:
10:46 PM Changeset in webkit [228311] by Yusuke Suzuki
  • 16 edits
    156 adds
    50 deletes in trunk/JSTests

[JSC] Update Test262 to Feb 9 version
https://bugs.webkit.org/show_bug.cgi?id=182468

Reviewed by Saam Barati.

9:05 PM Changeset in webkit [228310] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

CoreAudioCaptureSourceIOSListener should be a WebProcess singleton
https://bugs.webkit.org/show_bug.cgi?id=182606
<rdar://problem/37355283>

Patch by Youenn Fablet <youenn@apple.com> on 2018-02-08
Reviewed by Eric Carlson.

Not testable right now as this relies on iOS specific Core Audio stack.
Efforts should be made to somehow mock that part and mock interruptions.

Made CoreAudioCaptureSourceFactoryIOS responsible to receive iOS interruption messages.
Before the patch, individual capture sources were receiving these messages.
When there is only one capture source per process this is fine but with more capture sources,
this is messing up things as they all share the same shared unit and we would try to interrupt it or resume it several times.

Also, if we are suspended and there is no more capture source, the shared unit will remain suspended indefinitely, as we will
not process the interruption messages.
With the patch, we always process the messages.
We still go through the active source as done now to limit the changes.
In case of no source, we go to the shared unit.
In the future, we should directly go to the shared unit and clients of the shared unit should see their state being updated.

As a way to prevent staying suspended on iOS, we unsuspend ourselves in CoreAudioCaptureSource constructor.
This is fine as this constructor is only called when getUserMedia grants access to the camera which always goes to the UIProcess.
And the UIProcess is only processing getUserMedia calls if the WebProcess is foregrounded.

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

(-[WebCoreAudioCaptureSourceIOSListener initWithCallback:]):
(WebCore::CoreAudioCaptureSourceFactoryIOS::CoreAudioCaptureSourceFactoryIOS):
(WebCore::CoreAudioCaptureSourceFactoryIOS::~CoreAudioCaptureSourceFactoryIOS):
(WebCore::CoreAudioCaptureSourceFactory::singleton):

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSourceFactory::singleton):
(WebCore::CoreAudioCaptureSource::create):
(WebCore::CoreAudioCaptureSourceFactory::beginInterruption):
(WebCore::CoreAudioCaptureSourceFactory::endInterruption):
(WebCore::CoreAudioCaptureSourceFactory::scheduleReconfiguration):
(WebCore::CoreAudioCaptureSource::factory):
(WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):
(WebCore::CoreAudioCaptureSource::~CoreAudioCaptureSource):
(WebCore::CoreAudioCaptureSource::startProducingData):
(WebCore::CoreAudioCaptureSource::scheduleReconfiguration):
(WebCore::CoreAudioCaptureSource::beginInterruption):
(WebCore::CoreAudioCaptureSource::endInterruption):

  • platform/mediastream/mac/CoreAudioCaptureSource.h:

(WebCore::CoreAudioCaptureSourceFactory::setCoreAudioActiveSource):
(WebCore::CoreAudioCaptureSourceFactory::unsetCoreAudioActiveSource):
(WebCore::CoreAudioCaptureSourceFactory::coreAudioActiveSource):

8:59 PM WebKitGTK/2.20.x edited by Michael Catanzaro
Review safari-605-branch for backports through r228286 (diff)
8:16 PM Changeset in webkit [228309] by Chris Dumez
  • 12 edits
    3 adds in trunk

There should be a way to disable [OverrideBuiltins] behavior in a given DOMWrapperWorld
https://bugs.webkit.org/show_bug.cgi?id=182524
<rdar://problem/9057327>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Add new flag on DOMWrapperWorld indicating if the [OverrideBuiltins] behavior should
be enabled in this world or not. The behavior is enabled by default for Web-compatibility.
This flag is queried in accessVisibleNamedProperty() when doing the named property
lookup.

Covered by new API test.

  • bindings/js/DOMWrapperWorld.h:

(WebCore::DOMWrapperWorld::disableOverrideBuiltinsBehavior):
(WebCore::DOMWrapperWorld::shouldDisableOverrideBuiltinsBehavior const):

  • bindings/js/JSDOMAbstractOperations.h:

(WebCore::accessVisibleNamedProperty):

Source/WebKit:

Add C API on WKBundleScriptWorld and Cocoa API on WKWebProcessPlugInScriptWorld to
disable the [OverrideBuiltins] behavior on a given script world.

The [OverrideBuiltins] behavior [1] is legacy behavior that is needed for Web compatibility
but allowing the client to disable this behavior in a given world makes development easier
and running injected script on uncontrolled content a lot more reliable.

[1] https://heycam.github.io/webidl/#OverrideBuiltins

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.h:
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.mm:

(-[WKWebProcessPlugInScriptWorld disableOverrideBuiltinsBehavior]):

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

(WKBundleScriptWorldDisableOverrideBuiltinsBehavior):

  • WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h:
  • WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:

(WebKit::InjectedBundleScriptWorld::disableOverrideBuiltinsBehavior):

  • WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:

Tools:

Add API test coverage.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/InjectedBundleDisableOverrideBuiltinsBehavior.cpp: Added.

(TestWebKitAPI::runJavaScriptAlert):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/InjectedBundleDisableOverrideBuiltinsBehavior_Bundle.cpp: Added.

(TestWebKitAPI::InjectedBundleDisableOverrideBuiltinsBehaviorTest::InjectedBundleDisableOverrideBuiltinsBehaviorTest):
(TestWebKitAPI::InjectedBundleDisableOverrideBuiltinsBehaviorTest::initialize):

  • TestWebKitAPI/Tests/WebKit/override-builtins-test.html: Added.
7:30 PM Changeset in webkit [228308] by pvollan@apple.com
  • 9 edits
    6 moves in trunk/Source

Move WebVideoFullscreenController from WebCore to WebKitLegacy.
https://bugs.webkit.org/show_bug.cgi?id=182615

Reviewed by Eric Carlson.

It is only used by WK1. Also there are a few references to NSApp in WebVideoFullscreenController.mm.
Ideally, we should not reference NSApp in WebCore.

Source/WebCore:

No new tests. No change in behavior.

  • SourcesMac.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • html/HTMLMediaElement.h:
  • platform/mac/WebVideoFullscreenController.h: Removed.
  • platform/mac/WebVideoFullscreenController.mm: Removed.
  • platform/mac/WebVideoFullscreenHUDWindowController.h: Removed.
  • platform/mac/WebVideoFullscreenHUDWindowController.mm: Removed.
  • platform/mac/WebWindowAnimation.h: Removed.
  • platform/mac/WebWindowAnimation.mm: Removed.

Source/WebKitLegacy:

  • WebKitLegacy.xcodeproj/project.pbxproj:

Source/WebKitLegacy/mac:

  • WebView/WebFullScreenController.mm:
  • WebView/WebVideoFullscreenController.h: Copied from Source/WebCore/platform/mac/WebVideoFullscreenController.h.
  • WebView/WebVideoFullscreenController.mm: Copied from Source/WebCore/platform/mac/WebVideoFullscreenController.mm.
  • WebView/WebVideoFullscreenHUDWindowController.h: Copied from Source/WebCore/platform/mac/WebVideoFullscreenHUDWindowController.h.
  • WebView/WebVideoFullscreenHUDWindowController.mm: Copied from Source/WebCore/platform/mac/WebVideoFullscreenHUDWindowController.mm.
  • WebView/WebView.mm:
  • WebView/WebWindowAnimation.h: Copied from Source/WebCore/platform/mac/WebWindowAnimation.h.
  • WebView/WebWindowAnimation.mm: Copied from Source/WebCore/platform/mac/WebWindowAnimation.mm.
6:13 PM Changeset in webkit [228307] by Ross Kirsling
  • 2 edits in trunk/Source/WebKit

Remove WebProcessPool::platformInitialize stub.
https://bugs.webkit.org/show_bug.cgi?id=182621

Reviewed by Alex Christensen.

The #if here could be simplified to PLATFORM(WIN), but Windows too will need a proper implementation
as part of WK2 support, so this stub shouldn't need to exist at all.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::platformInitialize): Deleted.

6:13 PM Changeset in webkit [228306] by fpizlo@apple.com
  • 43 edits
    2 adds in trunk/Source

Experiment with alternative implementation of memcpy/memset
https://bugs.webkit.org/show_bug.cgi?id=182563

Reviewed by Michael Saboff and Mark Lam.

Source/bmalloc:

Add a faster x86_64-specific implementation of memcpy and memset. Ideally, this would just be
implemented in WTF, but we have to copy it into bmalloc since bmalloc sits below WTF on the
stack.

  • bmalloc/Algorithm.h:

(bmalloc::fastCopy):
(bmalloc::fastZeroFill):

  • bmalloc/Allocator.cpp:

(bmalloc::Allocator::reallocate):

  • bmalloc/Bits.h:

(bmalloc::BitsWordOwner::operator=):
(bmalloc::BitsWordOwner::clearAll):
(bmalloc::BitsWordOwner::set):

  • bmalloc/IsoPageInlines.h:

(bmalloc::IsoPage<Config>::IsoPage):

  • bmalloc/Vector.h:

(bmalloc::Vector<T>::reallocateBuffer):

Source/JavaScriptCore:

This adopts new fastCopy/fastZeroFill calls for calls to memcpy/memset that do not take a
constant size argument.

  • assembler/AssemblerBuffer.h:

(JSC::AssemblerBuffer::append):

  • runtime/ArrayBuffer.cpp:

(JSC::ArrayBufferContents::tryAllocate):
(JSC::ArrayBufferContents::copyTo):
(JSC::ArrayBuffer::createInternal):

  • runtime/ArrayBufferView.h:

(JSC::ArrayBufferView::zeroRangeImpl):

  • runtime/ArrayConventions.cpp:
  • runtime/ArrayConventions.h:

(JSC::clearArray):

  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoPrivateFuncConcatMemcpy):

  • runtime/ButterflyInlines.h:

(JSC::Butterfly::tryCreate):
(JSC::Butterfly::createOrGrowPropertyStorage):
(JSC::Butterfly::growArrayRight):
(JSC::Butterfly::resizeArray):

  • runtime/GenericTypedArrayViewInlines.h:

(JSC::GenericTypedArrayView<Adaptor>::create):

  • runtime/JSArray.cpp:

(JSC::JSArray::appendMemcpy):
(JSC::JSArray::fastSlice):

  • runtime/JSArrayBufferView.cpp:

(JSC::JSArrayBufferView::ConstructionContext::ConstructionContext):

  • runtime/JSGenericTypedArrayViewInlines.h:

(JSC::JSGenericTypedArrayView<Adaptor>::set):

  • runtime/JSObject.cpp:

(JSC::JSObject::constructConvertedArrayStorageWithoutCopyingElements):
(JSC::JSObject::shiftButterflyAfterFlattening):

  • runtime/PropertyTable.cpp:

(JSC::PropertyTable::PropertyTable):

Source/WTF:

Adds a faster x86_64-specific implementation of memcpy and memset. These versions go by
different names than memcpy/memset and have a different API:

WTF::fastCopy<T>(T* dst, T* src, size_t N): copies N values of type T from src to dst.
WTF::fastZeroFill(T* dst, size_T N): writes N * sizeof(T) zeroes to dst.

There are also *Bytes variants that take void* for dst and src and size_t numBytes. Those are
most appropriate in places where the code is already computing bytes.

These will just call memcpy/memset on platforms where the optimized versions are not supported.

These new functions are not known to the compiler to be memcpy/memset. This has the effect that
the compiler will not try to replace them with anything else. This could be good or bad:

  • It's *good* if the size is *not known* at compile time. In that case, by my benchmarks, these versions are faster than either the memcpy/memset call or whatever else the compiler could emit. This is because of a combination of inlining and the algorithm itself (see below).


  • It's *bad* if the size is *known* at compile time. In that case, the compiler could potentially emit a fully unrolled memcpy/memset. That might not happen if the size is large (even if it's known), but in this patch I avoid replacing any memcpy/memset calls when the size is a constant. In particular, this totally avoids the call overhead -- if the size is small, then the compiler will emit a nice inlined copy or set. If the size is large, then the most optimal thing to do is emit the shortest piece of code possible, and that's a call to memcpy/memset.


It's unfortunate that you have to choose between them on your own. One way to avoid that might
have been to override the memcpy/memset symbols, so that the compiler can still do its
reasoning. But that's not quite right, since then we would lose inlining in the unknonw-size
case. Also, it's possible that for some unknown-size cases, the compiler could choose to emit
something on its own because it might think that some property of aliasing or alignment could
help it. I think it's a bit better to use our own copy/set implementations even in those cases.
Another way that I tried avoiding this is to detect inside fastCopy/fastZeroFill if the size is
constant. But there is no good way to do that in C++. There is a builtin for doing that inside a
macro, but that feels janky, so I didn't want to do it in this patch.

The reason why these new fastCopy/fastZeroFill functions are faster is that:

  • They can be inlined. There is no function call. Only a few registers get clobbered. So, the impact on the quality of the code surrounding the memcpy/memset is smaller.


  • They use type information to select the implementation. For sizes that are multiples of 2, 4, or 8, the resulting code performs dramatically better on small arrays than memcpy because it uses fewer cycles. The difference is greatest for 2 and 4 byte types, since memcpy usually handles small arrays by tiering from a 8-byte word copy loop to a byte copy loop. So, for 2 or 4 byte arrays, we use an algorithm that tiers from 8-byte word down to a 2-byte or 4-byte (depending on type) copy loop. So, for example, when copying a 16-bit string that has 1, 2, or 3 characters, this means doing 1, 2, or 3 word copies rather than 2, 4, or 6 byte copies. For 8-byte types, the resulting savings are mainly that there is no check to see if a tier-down to the byte-copy loop is needed -- so really that means reducing code size. 1-byte types don't get this inherent advantage over memcpy/memset, but they still benefit from all of the other advantages of these functions. Of course, this advantage isn't inherent to our approach. The compiler could also notice that the arguments to memcpy/memset have some alignment properties. It could do it even more generally than we do - for example a copy over bytes where the size is a multiple of 4 can use the 4-byte word algorithm. But based on my tests, the compiler does not do this (even though it does other things, like turn a memset call with a zero value argument into a bzero call).


  • They use a very nicely written word copy/set loop for small arrays. I spent a lot of time getting the assembly just right. When we use memcpy/memset, sometimes we would optimize the call by having a fast path word copy loop for small sizes. That's not necessary with this implementation, since the assembly copy loop gets inlined.


  • They use rep movs or rep stos for copies of 200 bytes or more. This decision benchmarks poorly on every synthetic memcpy/memset benchmark I have built, and so unsurprisingly, it's not what system memcpy/memset does. Most system memcpy/memset implementations end up doing some SSE for medium-sized copies,. However, I previously found that this decision is bad for one of the memset calls in GC (see clearArray() and friends in ArrayConventions.h|cpp) - I was able to make the overhead of that call virtually disappear by doing rep stos more aggressively. The theory behind this change is that it's not just the GC that prefers smaller rep threshold and no SSE. I am betting that reping more is better when the heap gets chaotic and the data being copied is used in interesting ways -- hence, synthetic memcpy/memset benchmarks think it's bad (they don't do enough chaotic memory accesses) while it's good for real-world uses. Also, when I previously worked on JVMs, I had found that the best memcpy/memset heuristics when dealing with GC'd objects in a crazy heap were different than any memcpy/memset in any system library.


This appears to be a 0.9% speed-up on PLT. I'm not sure if it's more because of the inlining or
the rep. I think it's both. I'll leave figuring out the exact tuning for future patches.

  • wtf/BitVector.cpp:

(WTF::BitVector::setSlow):
(WTF::BitVector::clearAll):
(WTF::BitVector::resizeOutOfLine):

  • wtf/BitVector.h:

(WTF::BitVector::wordCount):
(WTF::BitVector::OutOfLineBits::numWords const):

  • wtf/ConcurrentBuffer.h:

(WTF::ConcurrentBuffer::growExact):

  • wtf/FastBitVector.h:

(WTF::FastBitVectorWordOwner::operator=):
(WTF::FastBitVectorWordOwner::clearAll):
(WTF::FastBitVectorWordOwner::set):

  • wtf/FastCopy.h: Added.

(WTF::fastCopy):
(WTF::fastCopyBytes):

  • wtf/FastMalloc.cpp:

(WTF::fastZeroedMalloc):
(WTF::fastStrDup):
(WTF::tryFastZeroedMalloc):

  • wtf/FastZeroFill.h: Added.

(WTF::fastZeroFill):
(WTF::fastZeroFillBytes):

  • wtf/MD5.cpp:
  • wtf/OSAllocator.h:

(WTF::OSAllocator::reallocateCommitted):

  • wtf/StringPrintStream.cpp:

(WTF::StringPrintStream::increaseSize):

  • wtf/Vector.h:
  • wtf/persistence/PersistentDecoder.cpp:

(WTF::Persistence::Decoder::decodeFixedLengthData):

  • wtf/persistence/PersistentEncoder.cpp:

(WTF::Persistence::Encoder::encodeFixedLengthData):

  • wtf/text/CString.cpp:

(WTF::CString::init):
(WTF::CString::copyBufferIfNeeded):

  • wtf/text/LineBreakIteratorPoolICU.h:

(WTF::LineBreakIteratorPool::makeLocaleWithBreakKeyword):

  • wtf/text/StringBuilder.cpp:

(WTF::StringBuilder::allocateBuffer):
(WTF::StringBuilder::append):

  • wtf/text/StringConcatenate.h:
  • wtf/text/StringImpl.h:

(WTF::StringImpl::copyCharacters):

  • wtf/text/icu/UTextProvider.cpp:

(WTF::uTextCloneImpl):

  • wtf/text/icu/UTextProviderLatin1.cpp:

(WTF::uTextLatin1Clone):
(WTF::openLatin1UTextProvider):

  • wtf/threads/Signals.cpp:
5:58 PM Changeset in webkit [228305] by commit-queue@webkit.org
  • 2 edits in trunk

[Meta][Win] Support ICU 59.1+
https://bugs.webkit.org/show_bug.cgi?id=181004

Patch by Fujii Hironori <Fujii Hironori> on 2018-02-08
Reviewed by Alex Christensen.

ICU 59 changed the type of UChar from wchar_t to char16_t on
Windows. We need a lot of conversions between UChar* and wchar_t*
to call Windows API because it takes string as wchar_t*.

Fortunately, ICU is configurable to define UChar as wchar_t as
well as the prior ICU.
<http://icu-project.org/apiref/icu4c/umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac>

  • Source/cmake/OptionsWin.cmake: Add a compile option -DUCHAR_TYPE=wchar_t.
5:32 PM Changeset in webkit [228304] by Michael Catanzaro
  • 9 edits in trunk

TestController should not exercise cocoa-specific resource load statistics APIs
https://bugs.webkit.org/show_bug.cgi?id=182355

Reviewed by Alex Christensen.

Source/WebKit:

Remove the Cocoa testing SPI, since it's redundant with the C API. Also, add a couple
missing cookie partitioning callbacks to the C API.

  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreStatisticsUpdateCookiePartitioning):
(WKWebsiteDataStoreSetStatisticsShouldPartitionCookiesForHost):

  • UIProcess/API/C/WKWebsiteDataStoreRef.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _resourceLoadStatisticsSetLastSeen:forHost:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsSetIsPrevalentResource:forHost:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsIsPrevalentResource:completionHandler:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsIsRegisteredAsSubFrameUnder:topFrameHost:completionHandler:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsIsRegisteredAsRedirectingTo:hostRedirectedTo:completionHandler:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsSetHadUserInteraction:forHost:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsSetHasHadNonRecentUserInteractionForHost:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsHadUserInteraction:completionHandler:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsSetIsGrandfathered:forHost:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsIsGrandfathered:completionHandler:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsSetSubframeUnderTopFrameOrigin:forHost:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsSetSubresourceUnderTopFrameOrigin:forHost:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsSetSubresourceUniqueRedirectTo:forHost:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsSetTimeToLiveUserInteraction:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsSetTimeToLiveCookiePartitionFree:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsSetMinimumTimeBetweenDataRecordsRemoval:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsSetGrandfatheringTime:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsSetMaxStatisticsEntries:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsSetPruneEntriesDownTo:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsProcessStatisticsAndDataRecords]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsUpdateCookiePartitioning]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsUpdateCookiePartitioning:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldPartitionCookies:forHost:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldPartitionCookies:forHost:completionHandler:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsSubmitTelemetry]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsSetNotifyPagesWhenDataRecordsWereScanned:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldClassifyResourcesBeforeDataRecordsRemoval:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsSetNotifyPagesWhenTelemetryWasCaptured:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStore]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStore:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours:completionHandler:]): Deleted.
(-[WKWebsiteDataStore _resourceLoadStatisticsResetToConsistentState]): Deleted.

  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:

Tools:

Remove unnecessary use of platform-specific APIs in the TestController, since there are
cross-platform APIs to do the same thing.

Also, ensure callbacks execute before returning from TestController's functions, since
otherwise the tests are guaranteed to be flaky at best, and also since there's nothing to
prevent the TestController from being destroyed before the callbacks execute.

  • WebKitTestRunner/TestController.cpp:

(WTR::resourceStatisticsVoidResultCallback):
(WTR::resourceStatisticsBooleanResultCallback):
(WTR::TestController::isStatisticsPrevalentResource):
(WTR::TestController::isStatisticsRegisteredAsSubFrameUnder):
(WTR::TestController::isStatisticsRegisteredAsRedirectingTo):
(WTR::TestController::isStatisticsHasHadUserInteraction):
(WTR::TestController::isStatisticsGrandfathered):
(WTR::TestController::statisticsUpdateCookiePartitioning):
(WTR::TestController::statisticsSetShouldPartitionCookiesForHost):
(WTR::TestController::statisticsClearInMemoryAndPersistentStore):
(WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
(WTR::TestController::statisticsClearThroughWebsiteDataRemoval):
(WTR::resourceStatisticsCallback): Deleted.
(WTR::TestController::statisticsClearThroughWebsiteDataRemovalCallback): Deleted.

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::toNSString): Deleted.
(WTR::TestController::setStatisticsLastSeen): Deleted.
(WTR::TestController::setStatisticsPrevalentResource): Deleted.
(WTR::TestController::isStatisticsPrevalentResource): Deleted.
(WTR::TestController::isStatisticsRegisteredAsSubFrameUnder): Deleted.
(WTR::TestController::isStatisticsRegisteredAsRedirectingTo): Deleted.
(WTR::TestController::setStatisticsHasHadUserInteraction): Deleted.
(WTR::TestController::setStatisticsHasHadNonRecentUserInteraction): Deleted.
(WTR::TestController::isStatisticsHasHadUserInteraction): Deleted.
(WTR::TestController::setStatisticsGrandfathered): Deleted.
(WTR::TestController::isStatisticsGrandfathered): Deleted.
(WTR::TestController::setStatisticsSubframeUnderTopFrameOrigin): Deleted.
(WTR::TestController::setStatisticsSubresourceUnderTopFrameOrigin): Deleted.
(WTR::TestController::setStatisticsSubresourceUniqueRedirectTo): Deleted.
(WTR::TestController::setStatisticsTimeToLiveUserInteraction): Deleted.
(WTR::TestController::setStatisticsTimeToLiveCookiePartitionFree): Deleted.
(WTR::TestController::statisticsProcessStatisticsAndDataRecords): Deleted.
(WTR::TestController::statisticsUpdateCookiePartitioning): Deleted.
(WTR::TestController::statisticsSetShouldPartitionCookiesForHost): Deleted.
(WTR::TestController::statisticsSubmitTelemetry): Deleted.
(WTR::TestController::setStatisticsNotifyPagesWhenDataRecordsWereScanned): Deleted.
(WTR::TestController::setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval): Deleted.
(WTR::TestController::setStatisticsNotifyPagesWhenTelemetryWasCaptured): Deleted.
(WTR::TestController::setStatisticsMinimumTimeBetweenDataRecordsRemoval): Deleted.
(WTR::TestController::setStatisticsGrandfatheringTime): Deleted.
(WTR::TestController::setStatisticsMaxStatisticsEntries): Deleted.
(WTR::TestController::setStatisticsPruneEntriesDownTo): Deleted.
(WTR::TestController::statisticsClearInMemoryAndPersistentStore): Deleted.
(WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours): Deleted.
(WTR::TestController::statisticsClearThroughWebsiteDataRemoval): Deleted.
(WTR::TestController::statisticsResetToConsistentState): Deleted.

5:24 PM Changeset in webkit [228303] by Jonathan Bedard
  • 3 edits in trunk/Tools

webkit-patch suggest-reviewers dies with AttributeError: 'NoneType' object has no attribute 'revision'
https://bugs.webkit.org/show_bug.cgi?id=182584

Reviewed by Daniel Bates.

It is possible that a specific revision has an empty ChangeLog. In this case, Checkout.commit_info_for_revision
will return 'None'. Checkout.recent_commit_infos_for_files should never return a set with 'None' in it.

  • Scripts/webkitpy/common/checkout/checkout.py:

(Checkout.recent_commit_infos_for_files): Remove any empty commit information from the set.

  • Scripts/webkitpy/common/checkout/checkout_unittest.py: Add a file which references an empty ChangeLog.
5:09 PM Changeset in webkit [228302] by don.olmstead@sony.com
  • 4 edits
    1 delete in trunk/Source

Remove JavaScriptCore/ForwardingHeaders directory
https://bugs.webkit.org/show_bug.cgi?id=182594

Reviewed by Mark Lam.

Source/JavaScriptCore:

  • CMakeLists.txt:
  • ForwardingHeaders/JavaScriptCore/APICast.h: Removed.
  • ForwardingHeaders/JavaScriptCore/JSBase.h: Removed.
  • ForwardingHeaders/JavaScriptCore/JSCTestRunnerUtils.h: Removed.
  • ForwardingHeaders/JavaScriptCore/JSContextRef.h: Removed.
  • ForwardingHeaders/JavaScriptCore/JSObjectRef.h: Removed.
  • ForwardingHeaders/JavaScriptCore/JSObjectRefPrivate.h: Removed.
  • ForwardingHeaders/JavaScriptCore/JSRetainPtr.h: Removed.
  • ForwardingHeaders/JavaScriptCore/JSStringRef.h: Removed.
  • ForwardingHeaders/JavaScriptCore/JSStringRefCF.h: Removed.
  • ForwardingHeaders/JavaScriptCore/JSTypedArray.h: Removed.
  • ForwardingHeaders/JavaScriptCore/JSValueRef.h: Removed.
  • ForwardingHeaders/JavaScriptCore/JavaScript.h: Removed.
  • ForwardingHeaders/JavaScriptCore/JavaScriptCore.h: Removed.
  • ForwardingHeaders/JavaScriptCore/OpaqueJSString.h: Removed.
  • ForwardingHeaders/JavaScriptCore/WebKitAvailability.h: Removed.

Source/WebKit:

  • PlatformGTK.cmake:
4:52 PM Changeset in webkit [228301] by Matt Baker
  • 22 edits
    1 copy
    3 adds in trunk/Source/WebInspectorUI

Web Inspector: add listing of Canvases/Programs/Recordings to the NavigationSidebar
https://bugs.webkit.org/show_bug.cgi?id=178744
<rdar://problem/35374379>

Reviewed by Devin Rousso.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Images/Canvas2D.svg:
  • UserInterface/Images/Canvas3D.svg:
  • UserInterface/Images/Recording.svg:

Update canvas icons to be monochrome. Simplified the recording icon.

  • UserInterface/Main.html:
  • UserInterface/Models/RecordingAction.js:

(WI.RecordingAction.prototype.get state):
(WI.RecordingAction.prototype.set state):
Allow (2D) snapshot state to be associated with the action. Used by
RecordingActionDetailsSidebarPanel to retrieve the snapshot state.

  • UserInterface/Views/CanvasContentView.css:

(.content-view.canvas:not(.tab)):
(.content-view.canvas:not(.tab) > .progress): Deleted.
(.content-view.canvas:not(.tab) > .progress > .frame-count): Deleted.

  • UserInterface/Views/CanvasContentView.js:

(WI.CanvasContentView):
(WI.CanvasContentView.prototype.get navigationItems):
(WI.CanvasContentView.prototype.layout):
(WI.CanvasContentView.prototype.shown):
(WI.CanvasContentView.prototype._recordingStarted):
(WI.CanvasContentView.prototype._recordingProgress):
(WI.CanvasContentView.prototype._recordingStopped):
(WI.CanvasContentView.prototype._updateRecordNavigationItem):
(WI.CanvasContentView.prototype._updateProgressView):
Replace progress UI with a reusable ProgressView class.
When in the overview, clicking the CanvasContentView shows a dedicated
CanvasContentView for inspecting shaders and recordings. This behavior
is controlled by CollectionContentView, so we need to prevent it when
clicking inside the header and footer elements, which contain clickable UI.

  • UserInterface/Views/CanvasDetailsSidebarPanel.js:

(WI.CanvasDetailsSidebarPanel.prototype.inspect):

  • UserInterface/Views/CanvasOverviewContentView.css:

(.content-view.canvas-overview .content-view.canvas):
(.content-view.canvas-overview .content-view.canvas.is-recording):
(.content-view.canvas-overview .content-view.canvas > :matches(header, footer)):
(.content-view.canvas-overview .content-view.canvas > header):
(.content-view.canvas-overview .content-view.canvas.is-recording > header):
(.content-view.canvas-overview .content-view.canvas > header > .navigation-bar):
(.content-view.canvas-overview .content-view.canvas:matches(:hover, .is-recording) > header > .navigation-bar):
(.content-view.canvas-overview .content-view.canvas.is-recording > .progress-view,):
(.content-view.canvas-overview .content-view.canvas.is-recording > .preview):
(.content-view.canvas-overview .content-view.canvas > :matches(header, .progress, .preview, footer)): Deleted.
(.content-view.canvas-overview .content-view.canvas.selected > :matches(.progress, .preview, footer),): Deleted.
(.content-view.canvas-overview .content-view.canvas:not(:hover, .is-recording, .selected) > header > .navigation-bar): Deleted.
(.content-view.canvas-overview .content-view.canvas > :matches(.progress, .preview)): Deleted.
(.content-view.canvas-overview .content-view.canvas > .preview): Deleted.
(.content-view.canvas-overview .content-view.canvas > .progress ~ .preview): Deleted.
Clean up styles, and remove selection styles as canvases are no longer selectable in the overview.

  • UserInterface/Views/CanvasOverviewContentView.js:

(WI.CanvasOverviewContentView):
(WI.CanvasOverviewContentView.prototype.get navigationItems):
(WI.CanvasOverviewContentView.prototype.attached):
(WI.CanvasOverviewContentView.prototype.detached):
(WI.CanvasOverviewContentView.prototype.get selectionPathComponents): Deleted.
(WI.CanvasOverviewContentView.prototype._changeSelectedItemVertically): Deleted.
(WI.CanvasOverviewContentView.prototype._changeSelectedItemHorizontally): Deleted.
(WI.CanvasOverviewContentView.prototype._selectionPathComponentsChanged): Deleted.
(WI.CanvasOverviewContentView.prototype._handleUp): Deleted.
(WI.CanvasOverviewContentView.prototype._handleRight): Deleted.
(WI.CanvasOverviewContentView.prototype._handleDown): Deleted.
(WI.CanvasOverviewContentView.prototype._handleLeft): Deleted.
(WI.CanvasOverviewContentView.prototype._handleSpace): Deleted.
(WI.CanvasOverviewContentView.prototype._supplementalRepresentedObjectsDidChange): Deleted.
Disable canvas selection. Remove logic for supplemental represented objects,
path components, and selection keyboard shortcuts.

  • UserInterface/Views/CanvasSidebarPanel.css: Added.

(.sidebar > .panel.navigation.canvas > .content):
(.sidebar > .panel.navigation.canvas > .navigation-bar > .item.record-start-stop.disabled):
(.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.canvas.canvas-2d .icon):
(.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.canvas.webgl .icon):
(.sidebar > .panel.navigation.canvas > .content > .navigation-bar):
(.sidebar > .panel.navigation.canvas.has-recordings > .content > .tree-outline.canvas):
(.sidebar > .panel.navigation.canvas:not(.has-recordings) > .filter-bar,):
(.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.recording > .icon):
(.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.shader-program > .icon):
(.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.folder-icon > .icon):
(.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.folder-icon > .status):

  • UserInterface/Views/CanvasSidebarPanel.js: Added.

(WI.CanvasSidebarPanel):
(WI.CanvasSidebarPanel.prototype.get canvas):
(WI.CanvasSidebarPanel.prototype.set canvas):
(WI.CanvasSidebarPanel.prototype.set recording):
(WI.CanvasSidebarPanel.prototype.set action):
(WI.CanvasSidebarPanel.prototype.shown):
(WI.CanvasSidebarPanel.prototype.hidden):
(WI.CanvasSidebarPanel.prototype.hasCustomFilters):
(WI.CanvasSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
(WI.CanvasSidebarPanel.prototype.initialLayout):
(WI.CanvasSidebarPanel.prototype._recordingAdded):
(WI.CanvasSidebarPanel.prototype._recordingRemoved):
(WI.CanvasSidebarPanel.prototype._scopeBarSelectionChanged):
(WI.CanvasSidebarPanel.prototype._toggleRecording):
(WI.CanvasSidebarPanel.prototype._currentRepresentedObjectsDidChange):
(WI.CanvasSidebarPanel.prototype._treeOutlineSelectionDidChange):
(WI.CanvasSidebarPanel.prototype._canvasChanged):
(WI.CanvasSidebarPanel.prototype._recordingChanged):
(WI.CanvasSidebarPanel.prototype._updateRecordNavigationItem):
(WI.CanvasSidebarPanel.prototype._updateRecordingScopeBar):
Add new navigation sidebar, split into two sections. The upper section
contains a tree with a single element for the current canvas, and child
elements for any shader programs. The maximum height of this section is 50%
of the sidebar's height. The lower section contains a tree for the selected
recording, and a scope bar for choosing between recordings.

  • UserInterface/Views/CanvasTabContentView.css:

(.content-view.tab.canvas .navigation-bar > .item .canvas-overview .icon):
(.content-view.tab.canvas .navigation-bar > .item .canvas.canvas-2d .icon):
(.content-view.tab.canvas .navigation-bar > .item .canvas.webgl .icon):
(.content-view.tab.canvas .navigation-bar > .item .shader-program > .icon):
(.content-view.tab.canvas .navigation-bar > .item > .hierarchical-path-component > .icon): Deleted.
(.content-view.tab.canvas .navigation-bar > .item .canvas .icon): Deleted.

  • UserInterface/Views/CanvasTabContentView.js:

(WI.CanvasTabContentView):
(WI.CanvasTabContentView.prototype.canShowRepresentedObject):
(WI.CanvasTabContentView.prototype.attached):
(WI.CanvasTabContentView.prototype._addCanvas):
(WI.CanvasTabContentView.prototype._removeCanvas):
(WI.CanvasTabContentView.prototype._canvasTreeOutlineSelectionDidChange):
(WI.CanvasTabContentView.prototype._recordingAdded):
(WI.CanvasTabContentView.prototype._handleSpace):
(WI.CanvasTabContentView.prototype.showRepresentedObject): Deleted.
(WI.CanvasTabContentView.prototype._navigationSidebarTreeOutlineSelectionChanged): Deleted.
(WI.CanvasTabContentView.prototype._recordingActionIndexChanged): Deleted.
(WI.CanvasTabContentView.prototype._updateActionIndex): Deleted.
The canvas tab now maintains a tree outline of all canvases, with an
"Overview" element as the root. The Overview element is always the first
item of content browser's hierarchical path.

  • UserInterface/Views/CanvasTreeElement.js:

(WI.CanvasTreeElement.createRecordingTreeElement):
(WI.CanvasTreeElement):
(WI.CanvasTreeElement.prototype.onattach):
(WI.CanvasTreeElement.prototype.onpopulate):
(WI.CanvasTreeElement.prototype._updateStatus):
(WI.CanvasTreeElement.prototype.ondetach): Deleted.
Make it possible to not show recordings under the Canvas element.
Create isRecording status element (spinner).

  • UserInterface/Views/CollectionContentView.js:

(WI.CollectionContentView.prototype.shown):
(WI.CollectionContentView.prototype.hidden):
Child ContentViews need to be updated when the collection's visibility changes.

  • UserInterface/Views/ContentView.js:

(WI.ContentView.isViewable):

  • UserInterface/Views/ProgressView.css: Added.

(.progress-view):
(.progress-view > .titles):
(.progress-view > .titles > .title):
(.progress-view > .titles > .subtitle):
(.progress-view > .titles > .subtitle::before):
(.progress-view > .indeterminate-progress-spinner):

  • UserInterface/Views/ProgressView.js: Added.

(WI.ProgressView):
(WI.ProgressView.prototype.get title):
(WI.ProgressView.prototype.set title):
(WI.ProgressView.prototype.get subtitle):
(WI.ProgressView.prototype.set subtitle):
(WI.ProgressView.prototype.get visible):
(WI.ProgressView.prototype.set visible):
(WI.ProgressView.prototype.initialLayout):
(WI.ProgressView.prototype._updateTitles):
New view class (not a ContentView) for showing a generic progress message,
with a title, subtitle, and progress spinner.

  • UserInterface/Views/RecordingContentView.css:

(.content-view:not(.tab).recording > .preview-container):
Remove unnecessary styles.

  • UserInterface/Views/RecordingContentView.js:

(WI.RecordingContentView):
(WI.RecordingContentView.prototype.get navigationItems):
(WI.RecordingContentView.prototype.get supplementalRepresentedObjects):
(WI.RecordingContentView.prototype.updateActionIndex):
(WI.RecordingContentView.prototype.get saveData):
(WI.RecordingContentView.prototype._exportRecording):
Relocate the recording export logic and UI.
(WI.RecordingContentView.prototype.async._generateContentCanvas2D):
(WI.RecordingContentView.prototype.async._generateContentCanvasWebGL):
(WI.RecordingContentView.prototype._sliderChanged):
Refactor logic for notifying the rest of the UI of changes to the action slider.
The selected action is now exposed as a supplemental represented object, and a
corresponding SupplementalRepresentedObjectsDidChange event.

  • UserInterface/Views/RecordingStateDetailsSidebarPanel.js:

(WI.RecordingStateDetailsSidebarPanel.prototype.inspect):
(WI.RecordingStateDetailsSidebarPanel.prototype.set action):
(WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D):
(WI.RecordingStateDetailsSidebarPanel):
(WI.RecordingStateDetailsSidebarPanel.prototype.updateAction): Deleted.

  • UserInterface/Views/RecordingTraceDetailsSidebarPanel.js:

(WI.RecordingTraceDetailsSidebarPanel.prototype.inspect):
(WI.RecordingTraceDetailsSidebarPanel.prototype.set action):
(WI.RecordingTraceDetailsSidebarPanel):
(WI.RecordingTraceDetailsSidebarPanel.prototype.updateAction): Deleted.
Now that the selected action is exposed to the UI as a supplemental
represented object, details sidebars can be more decoupled from the
canvas tab, and be notified of changes to the selection via inspect().

  • UserInterface/Views/ResourceIcons.css:

(.canvas > .icon): Deleted.
(.shader-program .icon): Deleted.

4:00 PM Changeset in webkit [228300] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Marked media/W3C/video/events/event_progress_manual.html as flaky on macOS WK2.
https://bugs.webkit.org/show_bug.cgi?id=177663

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
3:49 PM Changeset in webkit [228299] by Chris Dumez
  • 3 edits
    4 adds in trunk

Form submission after navigation fails when decidePolicyForNavigationAction is async
https://bugs.webkit.org/show_bug.cgi?id=182412
<rdar://problem/35181099>

Reviewed by Alex Christensen.

Source/WebCore:

When the form is submitted and schedules the load in an iframe that is already loading,
FrameLoader::stopLoading() is called as expected. However, because policy checks can
now be asynchronous, stopLoading() also needs to stop pending policy checks. Otherwise,
continueLoadAfterNavigationPolicy() gets called for a cancelled load and we're in trouble
because the FrameLoader was reused for another load since then.

Test: http/tests/navigation/sync-form-submit-iframe.html

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::stopLoading):

LayoutTests:

Import layout test coverage from Alex's earlier patch.

  • http/tests/navigation/resources/a.html: Added.
  • http/tests/navigation/resources/b.html: Added.
  • http/tests/navigation/sync-form-submit-iframe-expected.txt: Added.
  • http/tests/navigation/sync-form-submit-iframe.html: Added.
3:47 PM Changeset in webkit [228298] by jmarcell@apple.com
  • 7 edits in branches/safari-605-branch/Source

Versioning.

3:46 PM Changeset in webkit [228297] by jmarcell@apple.com
  • 1 copy in tags/Safari-605.1.27

Tag Safari-605.1.27.

3:18 PM Changeset in webkit [228296] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Styles: Typing value and quickly moving focus away may display outdated value in UI
https://bugs.webkit.org/show_bug.cgi?id=182588
<rdar://problem/37332161>

Reviewed by Matt Baker.

CSSProperty models were updated with a 250ms delay. Quickly adding a blank property after modifying
an existing property could result in outdated values being shown.

This patch removes the 250ms delay.

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidChange):

3:03 PM Changeset in webkit [228295] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

Mark accessibility/aria-hidden-updates-alldescendants.html as a failure on Windows.
https://bugs.webkit.org/show_bug.cgi?id=182626

Unreviewed test gardening.

  • platform/win/TestExpectations:
2:27 PM WebKitGTK/2.20.x edited by clopez@igalia.com
(diff)
2:27 PM WebKitGTK/2.20.x edited by clopez@igalia.com
(diff)
2:26 PM WebKitGTK/2.20.x edited by clopez@igalia.com
(diff)
2:26 PM WebKitGTK/2.18.x edited by clopez@igalia.com
(diff)
2:00 PM Changeset in webkit [228294] by wilander@apple.com
  • 3 edits in trunk/LayoutTests

Switch http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html from testRunner.installStatisticsDidModifyDataRecordsCallback() to testRunner.installStatisticsDidScanDataRecordsCallback()
https://bugs.webkit.org/show_bug.cgi?id=182624
<rdar://problem/37364749>

Unreviewed test gardening.

  • http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html:
  • platform/mac-wk2/TestExpectations:

Changed from [ Pass Timeout ] to [ Pass ] for the given test.

1:45 PM Changeset in webkit [228293] by Michael Catanzaro
  • 2 edits in trunk

Unreviewed, switch -pthread to -lpthread per recommendation from Adrian
https://bugs.webkit.org/show_bug.cgi?id=182400
<rdar://problem/37252242>

This is tested and works fine.

  • Source/cmake/WebKitCompilerFlags.cmake:
1:26 PM Changeset in webkit [228292] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark inspector/console/clearMessages.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=182620

Unreviewed test gardening.

  • platform/mac/TestExpectations:
1:12 PM Changeset in webkit [228291] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark media/modern-media-controls/tracks-support/tracks-support-show-panel-fullscreen.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=182571

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
12:52 PM Changeset in webkit [228290] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Mark webanimations/animation-opacity-animation-crash.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=181612

Unreviewed test gardening.

  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
12:49 PM Changeset in webkit [228289] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[RenderTreeBuilder] Do not use RenderTreeBuilder::current() in RenderRubyRun::takeChild
https://bugs.webkit.org/show_bug.cgi?id=182607
<rdar://problem/37355944>

Reviewed by Sam Weinig.

No change in functionality.

  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::takeChild):

12:48 PM Changeset in webkit [228288] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark fast/dom/adopt-node-crash-2.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=182589

Unreviewed test gardening.

  • platform/mac/TestExpectations:
12:38 PM Changeset in webkit [228287] by timothy_horton@apple.com
  • 4 edits in trunk/Source/WebKit

Make WebKit public headers modules-safe
https://bugs.webkit.org/show_bug.cgi?id=182611
<rdar://problem/37160164>

Reviewed by Dan Bernstein.

  • UIProcess/API/Cocoa/WKPreviewElementInfo.h:
  • UIProcess/API/Cocoa/WKSnapshotConfiguration.h:

Import headers without which these WebKit headers can not be used alone.

  • WebKit.xcodeproj/project.pbxproj:

Make WKWindowFeaturesPrivate a private header like it was supposed to be.

12:12 PM WebKitGTK/2.20.x edited by Michael Catanzaro
(diff)
11:50 AM Changeset in webkit [228286] by jmarcell@apple.com
  • 2 edits in branches/safari-605-branch/Source/WebCore

Cherry-pick r228258. rdar://problem/37355417

11:48 AM Changeset in webkit [228285] by Antti Koivisto
  • 10 edits in trunk/Source/WebCore

Use invalidation rulesets for attribute selectors
https://bugs.webkit.org/show_bug.cgi?id=182569

Reviewed by Zalan Bujtas.

Attribute change style invalidation should use invalidation rulesets, similarly how class change invalidation already does.
We'll invalidate fewer unnecessary elements immediately and enable more significant future gains.

  • css/DocumentRuleSets.cpp:

(WebCore::DocumentRuleSets::collectFeatures const):
(WebCore::DocumentRuleSets::classInvalidationRuleSets const):
(WebCore::DocumentRuleSets::attributeInvalidationRuleSets const):

Make and cache invalidation RuleSets for an attribute.

(WebCore::DocumentRuleSets::ancestorAttributeRulesForHTML const): Deleted.

  • css/DocumentRuleSets.h:
  • css/RuleFeature.cpp:

(WebCore::RuleFeatureSet::recursivelyCollectFeaturesFromSelector):

Collect attribute selectors along with match elements.

(WebCore::RuleFeatureSet::collectFeatures):
(WebCore::RuleFeatureSet::add):
(WebCore::RuleFeatureSet::registerContentAttribute):

Separate hash to deal with invalidation of content:attr(foo) special case.

(WebCore::RuleFeatureSet::clear):
(WebCore::RuleFeatureSet::shrinkToFit):
(WebCore::makeAttributeSelectorKey): Deleted.

  • css/RuleFeature.h:

(WebCore::RuleFeature::RuleFeature):

  • css/StyleBuilderCustom.h:

(WebCore::StyleBuilderCustom::applyValueContent):
(WebCore::StyleBuilderCustom::applyValueAlt):

Use registerContentAttribute()

  • html/HTMLEmbedElement.cpp:

(WebCore::hasTypeOrSrc):
(WebCore::HTMLEmbedElement::parseAttribute):

Invalidate style if both type and src attributes go missing as this changes result of rendererIsNeeded().
This was previously relying on any attribute change invalidating style.

(WebCore::HTMLEmbedElement::rendererIsNeeded):

  • style/AttributeChangeInvalidation.cpp:

(WebCore::Style::AttributeChangeInvalidation::invalidateStyle):

Collect the invalidation rulesets for this attribute change.
Also check if any attribute selector actually changes state, unlike with classes attribute changes may
often not lead to a selector becoming non-matching.

(WebCore::Style::AttributeChangeInvalidation::invalidateStyleWithRuleSets):
(WebCore::Style::AttributeChangeInvalidation::invalidateDescendants): Deleted.

  • style/AttributeChangeInvalidation.h:

(WebCore::Style::AttributeChangeInvalidation::AttributeChangeInvalidation):
(WebCore::Style::AttributeChangeInvalidation::~AttributeChangeInvalidation):

  • style/ClassChangeInvalidation.cpp:

(WebCore::Style::ClassChangeInvalidation::computeInvalidation):

Should not bail on shadow tree invalidation as we may also need to invalidate siblings.

11:42 AM Changeset in webkit [228284] by Alan Bujtas
  • 12 edits in trunk/Source/WebCore

[RenderTreeBuilder] Introduce RenderTreeBuilder to moveChild(ren)To() functions
https://bugs.webkit.org/show_bug.cgi?id=182596
<rdar://problem/37340553>

Reviewed by Sam Weinig.

This is in preparation for moving mutation code out of moveChildTo/moveChildrenTo.

No change in functionality.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::dropAnonymousBoxChild):
(WebCore::RenderBlock::takeChild):

  • rendering/RenderBlock.h:

(WebCore::RenderBlock::moveAllChildrenIncludingFloatsTo):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::styleDidChange):
(WebCore::RenderBlockFlow::moveAllChildrenIncludingFloatsTo):

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

(WebCore::RenderBoxModelObject::moveChildTo):
(WebCore::RenderBoxModelObject::moveChildrenTo):

  • rendering/RenderBoxModelObject.h:

(WebCore::RenderBoxModelObject::moveChildTo):
(WebCore::RenderBoxModelObject::moveAllChildrenTo):
(WebCore::RenderBoxModelObject::moveChildrenTo):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::styleDidChange):
(WebCore::RenderElement::removeAnonymousWrappersForInlinesIfNecessary): Deleted.

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

(WebCore::RenderRubyRun::takeChild):

  • rendering/updating/RenderTreeBuilder.cpp:

(WebCore::RenderTreeBuilder::makeChildrenNonInline):
(WebCore::RenderTreeBuilder::splitAnonymousBoxesAroundChild):
(WebCore::RenderTreeBuilder::removeAnonymousWrappersForInlineChildrenIfNeeded):
(WebCore::RenderTreeBuilder::childFlowStateChangesAndNoLongerAffectsParentBlock):
(WebCore::RenderTreeBuilder::removeFromParentAndDestroyCleaningUpAnonymousWrappers):

  • rendering/updating/RenderTreeBuilder.h:
  • rendering/updating/RenderTreeBuilderMultiColumn.cpp:

(WebCore::RenderTreeBuilder::MultiColumn::createFragmentedFlow):
(WebCore::RenderTreeBuilder::MultiColumn::destroyFragmentedFlow):

  • rendering/updating/RenderTreeBuilderRuby.cpp:

(WebCore::RenderTreeBuilder::Ruby::moveInlineChildren):
(WebCore::RenderTreeBuilder::Ruby::moveBlockChildren):

  • rendering/updating/RenderTreeBuilderTable.cpp:

(WebCore::RenderTreeBuilder::Table::collapseAndDestroyAnonymousSiblingRows):

11:31 AM Changeset in webkit [228283] by Matt Lewis
  • 2 edits in trunk/Source/WebKit

Unreviewed, rolling out r228262.

This broke an internal build alongside r228261.

Reverted changeset:

"WebDriver: addCookie command should prepend a dot to domain
if missing"
https://bugs.webkit.org/show_bug.cgi?id=182328
https://trac.webkit.org/changeset/228262

10:55 AM Changeset in webkit [228282] by Matt Lewis
  • 10 edits in trunk

Unreviewed, rolling out r228261.

This broke an internal build

Reverted changeset:

"Add a way to check if a host is an IP address"
https://bugs.webkit.org/show_bug.cgi?id=182427
https://trac.webkit.org/changeset/228261

10:38 AM Changeset in webkit [228281] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

[GStreamer] WebKit improperly handles missing GStreamer elements
https://bugs.webkit.org/show_bug.cgi?id=171205

Reviewed by Michael Catanzaro.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Add a
test checking the videoflip element was correctly created. It
might not be available on some exotic distros such as Gentoo.

10:18 AM Changeset in webkit [228280] by Ryan Haddad
  • 2 edits in branches/safari-605-branch/LayoutTests

Unreviewed, land test results for rdar://problem/37331740.

  • inspector/canvas/recording-2d-expected.txt:
10:10 AM Changeset in webkit [228279] by Chris Fleizach
  • 15 edits in trunk

AX: Defer attribute computation until needed.
https://bugs.webkit.org/show_bug.cgi?id=182386
<rdar://problem/37115277>

Reviewed by Zalan Bujtas.

Source/WebCore:

Accessibility is doing too much work when handling attribute changes. Here's how we can improve this:

1) Defer attribute changes while the tree is dirty (and coalesce them).
2) Don't create AXObjects when an attribute changes unnecessarily. If no client has requested an ax object, it's likely no work needs to be done

(with the exception of a few attributes like aria-modal)

3) Stop calculating the entire accessible ARIA label when trying to decide if an element should be ignored. That's generally wasteful and the

consequence of including more AX elements in the tree is very minimal.

  • accessibility/AXObjectCache.cpp:

(WebCore::rendererNeedsDeferredUpdate):
(WebCore::nodeAndRendererAreValid):
(WebCore::AXObjectCache::remove):
(WebCore::AXObjectCache::handleAriaExpandedChange):
(WebCore::AXObjectCache::handleAriaRoleChanged):
(WebCore::AXObjectCache::deferAttributeChangeIfNeeded):
(WebCore::AXObjectCache::shouldProcessAttributeChange):
(WebCore::AXObjectCache::handleAttributeChange):
(WebCore::AXObjectCache::prepareForDocumentDestruction):
(WebCore::AXObjectCache::performDeferredCacheUpdate):
(WebCore::AXObjectCache::deferRecomputeIsIgnoredIfNeeded):
(WebCore::AXObjectCache::deferRecomputeIsIgnored):
(WebCore::AXObjectCache::deferTextChangedIfNeeded):
(WebCore::AXObjectCache::deferSelectedChildrenChangedIfNeeded):
(WebCore::AXObjectCache::handleAttributeChanged): Deleted.

  • accessibility/AXObjectCache.h:

(WebCore::AXObjectCache::deferAttributeChangeIfNeeded):
(WebCore::AXObjectCache::handleAttributeChanged): Deleted.

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::hasAttributesRequiredForInclusion const):

  • accessibility/AccessibleNode.cpp:

(WebCore::AccessibleNode::notifyAttributeChanged):

  • dom/Element.cpp:

(WebCore::Element::attributeChanged):

LayoutTests:

Update tests to reflect new world of delayed attribute handling for accessibility.

  • accessibility/canvas-fallback-content.html:

Make test async so attributes can be checked after deferred handling.

  • accessibility/mac/aria-expanded-notifications.html:

Access elements through AX tree so attribute changes generate notifications.

  • accessibility/mac/aria-listbox-selectedchildren-change.html:

Make test async so attributes can be checked after deferred handling.

  • accessibility/mac/aria-menu-item-selected-notification.html:

Access menu item through AX tree so attribute changes generate notifications.

  • accessibility/mac/aria-modal-auto-focus.html:

Access buttons after delay so attributes have time to be deferred.

  • accessibility/mac/element-busy-changed.html:

Process second attribute change after delay so we generate two notifications.

  • accessibility/mac/expanded-notification.html:

Set attributes after a delay so they generate individual notifications.

  • accessibility/notification-listeners.html:

Access elements through AX tree so attribute changes generate notifications.

10:04 AM Changeset in webkit [228278] by jmarcell@apple.com
  • 2 edits in tags/Safari-606.1.4/Source/WebKit

Revert r227436. rdar://problem/36674649

9:53 AM Changeset in webkit [228277] by Yusuke Suzuki
  • 2 edits in trunk/JSTests

Unreviewed, fix invalid line terminator in old test262 file part 2
https://bugs.webkit.org/show_bug.cgi?id=182468

  • test262/test/built-ins/Function/prototype/toString/line-terminator-normalisation-CR.js:
9:49 AM Changeset in webkit [228276] by Chris Dumez
  • 5 edits in trunk/Source/WebCore

Unreviewed, tiny partial rollout of r228260 as it caused some worker failures

  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::toJSDOMGlobalObject):

  • bindings/js/JSDOMGlobalObject.h:
  • bindings/js/JSErrorHandler.cpp:

(WebCore::JSErrorHandler::handleEvent):

  • bindings/js/JSEventListener.cpp:

(WebCore::toJSDOMGlobalObject): Deleted.

9:11 AM Changeset in webkit [228275] by Yusuke Suzuki
  • 2 edits in trunk/JSTests

Unreviewed, fix invalid line terminator in old test262 file
https://bugs.webkit.org/show_bug.cgi?id=182468

  • test262/test/language/literals/regexp/7.8.5-1.js:
7:40 AM Changeset in webkit [228274] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[RenderTreeBuilder] Move RenderElement::removeAnonymousWrappersForInlinesIfNecessary to RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=182582
<rdar://problem/37327890>

Reviewed by Antti Koivisto.

Tree mutation -> RenderTreeBuilder.

No change in functionality

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::styleDidChange):
(WebCore::RenderElement::removeAnonymousWrappersForInlinesIfNecessary): Deleted.

  • rendering/RenderElement.h:
  • rendering/updating/RenderTreeBuilder.cpp:

(WebCore::removeAnonymousWrappersForInlinesIfNecessary):
(WebCore::RenderTreeBuilder::childFlowStateChangesAndNoLongerAffectsParentBlock):
(WebCore::RenderTreeBuilder::removeFromParentAndDestroyCleaningUpAnonymousWrappers):

  • rendering/updating/RenderTreeBuilder.h:
7:13 AM WebKitGTK/Gardening/Calendar edited by magomez@igalia.com
(diff)
7:10 AM Changeset in webkit [228273] by magomez@igalia.com
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening after r228270.

  • platform/gtk/TestExpectations:
6:10 AM WebKitGTK/2.18.x edited by berto@igalia.com
(diff)
6:05 AM Changeset in webkit [228272] by magomez@igalia.com
  • 2 edits in trunk/Source/WebKit

[GTK] WaylandCompositor misusing eglGetProcAddress
https://bugs.webkit.org/show_bug.cgi?id=182490

Reviewed by Michael Catanzaro.

Check that the appropriate extensions are available before calling eglGetProcAddress, as even
getting a non null value from it, the functionality can be disabled at runtime.

  • UIProcess/gtk/WaylandCompositor.cpp:

(WebKit::WaylandCompositor::initializeEGL):

5:10 AM Changeset in webkit [228271] by Philippe Normand
  • 5 edits in trunk

[GStreamer] LayoutTest webaudio/silent-audio-interrupted-in-background.html makes its subsequent test flaky crash
https://bugs.webkit.org/show_bug.cgi?id=173916

Reviewed by Xabier Rodriguez Calvar.

Source/WebCore:

This patch fixes two crashes and a runtime warning:

  • The provider client configuration should be done from the main

thread but the no-more-pads signal of deinterleave was fired from
a non-main thread.

  • The deinterleave pad-removed signal can be fired for a not fully

configured pipeline if the audio context is interrupted. So the
peer quark of the removed pad needs to be checked, it might be a
null pointer.

  • The provider connects to the deinterleave signals only when a

client is provided, so the signal disconnection needs to check
that to avoid runtime warnings.

  • platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:

(WebCore::AudioSourceProviderGStreamer::AudioSourceProviderGStreamer):
Create a main thread notifier.
(WebCore::AudioSourceProviderGStreamer::~AudioSourceProviderGStreamer):
Invalidate notifier and check a client was set before
disconnecting from deinterleave signals.
(WebCore::AudioSourceProviderGStreamer::handleRemovedDeinterleavePad):
Check validity of the pad peer.
(WebCore::AudioSourceProviderGStreamer::deinterleavePadsConfigured):
Set client from main thread.

  • platform/audio/gstreamer/AudioSourceProviderGStreamer.h:

LayoutTests:

  • platform/gtk/TestExpectations: Unskip fixed test.
4:47 AM Changeset in webkit [228270] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Unreviewed, rolling out r228267, r228268, and r228269.
https://bugs.webkit.org/show_bug.cgi?id=182601

jhbuild socks (Requested by philn on #webkit).

Reverted changesets:

"[JHBuild] Update Mesa to version 17"
https://bugs.webkit.org/show_bug.cgi?id=182599
https://trac.webkit.org/changeset/228267

"Unreviewed, GTK build fix attempt after r228267."
https://trac.webkit.org/changeset/228268

"Unreviewed, final GTK build fix attempt after r228267."
https://trac.webkit.org/changeset/228269

4:21 AM Changeset in webkit [228269] by Philippe Normand
  • 2 edits in trunk/Tools

Unreviewed, final GTK build fix attempt after r228267.

  • gtk/jhbuild.modules: sha256sum for libdrm was for the tar.gz archive. Oops.
3:59 AM Changeset in webkit [228268] by Philippe Normand
  • 2 edits in trunk/Tools

Unreviewed, GTK build fix attempt after r228267.

  • gtk/jhbuild.modules: Update to libdrm version 2.4.89, Mesa 17 requires at least version 2.4.75.
3:28 AM Changeset in webkit [228267] by Philippe Normand
  • 2 edits in trunk/Tools

[JHBuild] Update Mesa to version 17
https://bugs.webkit.org/show_bug.cgi?id=182599

Reviewed by Carlos Alberto Lopez Perez.

  • gtk/jhbuild.modules: Update Mesa to version 17.3.3.
2:43 AM Changeset in webkit [228266] by Yusuke Suzuki
  • 10 edits
    2 adds in trunk

[JSC] Implement Array.prototype.flatMap and Array.prototype.flatten
https://bugs.webkit.org/show_bug.cgi?id=182440

Reviewed by Darin Adler.

JSTests:

  • stress/array-flatmap.js: Added.

(shouldBe):
(shouldBeArray):
(shouldThrow):
(var):

  • stress/array-flatten.js: Added.

(shouldBe):
(shouldBeArray):

  • test262.yaml:
  • test262/test/built-ins/Array/prototype/flatMap/depth-always-one.js:

(3.flatMap):
Pick test262 82c6148980332febe92a544a1fb653718e9fdb57 change.

Source/JavaScriptCore:

This patch implements Array.prototype.flatMap and Array.prototype.flatten
since they are now stage 3 [1].

[1]: https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray

  • builtins/ArrayPrototype.js:

(filter):
(map):
(globalPrivate.concatSlowPath):
(globalPrivate.arraySpeciesCreate):
(globalPrivate.flattenIntoArray):
(flatten):
(globalPrivate.flattenIntoArrayWithCallback):
We separate flattenIntoArray from flattenIntoArrayWithCallback due to performance reason.
We carefully keep both functions small to encourage inlining.

(flatMap):

  • runtime/ArrayPrototype.cpp:

(JSC::ArrayPrototype::finishCreation):

LayoutTests:

  • inspector/model/remote-object-get-properties-expected.txt:
  • js/Object-getOwnPropertyNames-expected.txt:
  • js/script-tests/Object-getOwnPropertyNames.js:
2:14 AM Changeset in webkit [228265] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

[GStreamer][WebAudio] No need for version check in each loop iteration
https://bugs.webkit.org/show_bug.cgi?id=182577

Reviewed by Xabier Rodriguez Calvar.

  • platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:

(webkit_web_audio_src_init): Detect version once only, when creating the element.
(webKitWebAudioSrcLoop): Use boolean variable instead of checking the version every time.

2:01 AM Changeset in webkit [228264] by fred.wang@free.fr
  • 24 edits in trunk/Source

Add scrolling node types to distinguish main frames and subframes.
https://bugs.webkit.org/show_bug.cgi?id=182533

Patch by Frederic Wang <fwang@igalia.com> on 2018-02-08
Reviewed by Simon Fraser.

Source/WebCore:

This patch splits FrameScrollingNode type into two types: MainFrameScrollingNode and
SubframeScrollingNode. This is needed because new places in the code are likely to
distinguish them e.g. in ScrollingTreeScrollingNodeDelegateIOS::updateChildNodesAfterScroll
or when iOS frame scrolling is introduced (see bug 173833).

No new tests, behavior unchanged.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView): This is only called
for main frames, so pass MainFrameScrollingNode.

  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::operator<<): Distinguish subframe and main frame when dumping.

  • page/scrolling/ScrollingCoordinator.h: Split FrameScrollingNode into two cases.
  • page/scrolling/ScrollingStateFrameScrollingNode.cpp: Add node type to constructor and

ASSERT it remains of type FrameScrollingNode.
(WebCore::ScrollingStateFrameScrollingNode::create):
(WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):

  • page/scrolling/ScrollingStateFrameScrollingNode.h: Add node type to constructor.
  • page/scrolling/ScrollingStateNode.h:

(WebCore::ScrollingStateNode::isFrameScrollingNode const): Includes the two cases.

  • page/scrolling/ScrollingStateTree.cpp:

(WebCore::ScrollingStateTree::createNode): Split FrameScrollingNode into two cases and pass
the node type.
(WebCore::ScrollingStateTree::attachNode): The first case only happens for main frames while
the second case only happens with subframes. Use the appriate node type.

  • page/scrolling/ScrollingTreeFrameScrollingNode.cpp: Add node type to constructor and

ASSERT it remains of type FrameScrollingNode.
(WebCore::ScrollingTreeFrameScrollingNode::ScrollingTreeFrameScrollingNode):

  • page/scrolling/ScrollingTreeFrameScrollingNode.h: Add node type to constructor.
  • page/scrolling/ScrollingTreeNode.h: Includes the two cases.

(WebCore::ScrollingTreeNode::isFrameScrollingNode const):

  • page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h: Add node type to constructor.
  • page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm: Ditto.

(WebCore::ScrollingTreeFrameScrollingNodeIOS::create):
(WebCore::ScrollingTreeFrameScrollingNodeIOS::ScrollingTreeFrameScrollingNodeIOS):

  • page/scrolling/ios/ScrollingTreeIOS.cpp: Split FrameScrollingNode into two cases.

(WebCore::ScrollingTreeIOS::createScrollingTreeNode):

  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Add node type to constructor.
  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: Ditto.

(WebCore::ScrollingTreeFrameScrollingNodeMac::create):
(WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):

  • page/scrolling/mac/ScrollingTreeMac.cpp: Split FrameScrollingNode into two cases.

(ScrollingTreeMac::createScrollingTreeNode):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::reattachSubframeScrollLayers): Distinguish the cases of
main frames and subframes.
(WebCore::scrollCoordinationRoleForNodeType): Split FrameScrollingNode into two cases.
(WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame): Distinguish the cases
of main frames and subframes.
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer): Split FrameScrollingNode into
two cases.

Source/WebKit:

  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp: Replace the case of

FrameScrollingNode with MainFrameScrollingNode and SubframeScrollingNode.
(WebKit::encodeNodeAndDescendants):
(WebKit::RemoteScrollingCoordinatorTransaction::decode):
(WebKit::dump):

  • UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp: Ditto.

(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):

  • UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp: Ditto and pass the node type to the

constructor of the frame scrolling node.
(WebKit::RemoteScrollingTree::createScrollingTreeNode):

  • UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: Replace the case of

FrameScrollingNode with MainFrameScrollingNode and SubframeScrollingNode.
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):

  • UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm: In order to

determine whether the node is a main frame or subframe, use the node type instead of checking
whether the node as a parent.
(WebKit::ScrollingTreeScrollingNodeDelegateIOS::updateChildNodesAfterScroll):

12:04 AM WebKitGTK/Gardening/Calendar edited by Ms2ger@igalia.com
(diff)
12:00 AM Changeset in webkit [228263] by Darin Adler
  • 2 edits in trunk/Source/WebCore

Try to fix ErrorEvent tests seen failing on buildbot after fix for bug 179591.

  • bindings/js/JSErrorHandler.cpp:

(WebCore::JSErrorHandler::handleEvent): Add back line of code accidentally removed.

Feb 7, 2018:

11:49 PM Changeset in webkit [228262] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

WebDriver: addCookie command should prepend a dot to domain if missing
https://bugs.webkit.org/show_bug.cgi?id=182328
<rdar://problem/37116398>

Reviewed by Michael Catanzaro.

RFC 2965: If an explicitly specified value does not start with a dot, the user agent supplies a leading dot.

Fixes: imported/w3c/webdriver/tests/cookies/add_cookie.py::test_add_domain_cookie

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::addSingleCookie):

10:37 PM Changeset in webkit [228261] by Carlos Garcia Campos
  • 10 edits in trunk

Add a way to check if a host is an IP address
https://bugs.webkit.org/show_bug.cgi?id=182427

Reviewed by Alex Christensen.

Source/WebCore:

There are several places where this is needed. We currently just assume that any host ending in a digit is an IP
address, except in PublicSuffix where platform specific code is used. This patch adds URL::hostIsIPAddress()
platform specific implementations, falling back to current assumption if there isn't an implementation for the
platform.

  • page/OriginAccessEntry.cpp:

(WebCore::OriginAccessEntry::OriginAccessEntry): Use URL::hostIsIPAddress().

  • platform/URL.cpp:

(WebCore::URL::hostIsIPAddress): Fallback implementation.

  • platform/URL.h:
  • platform/mac/PublicSuffixMac.mm:

(WebCore::topPrivatelyControlledDomain): Use URL::hostIsIPAddress().

  • platform/mac/URLMac.mm:

(WebCore::URL::hostIsIPAddress): Move implementation from PublicSuffixMac.mm.

  • platform/network/curl/CookieUtil.cpp:

(WebCore::CookieUtil::isIPAddress): Use URL::hostIsIPAddress().

  • platform/soup/URLSoup.cpp:

(WebCore::URL::hostIsIPAddress): Use g_hostname_is_ip_address().

Tools:

Add unit test for URL::hostIsIPAddress().

  • TestWebKitAPI/Tests/WebCore/URL.cpp:

(TestWebKitAPI::TEST_F):

10:06 PM Changeset in webkit [228260] by Darin Adler
  • 153 edits
    1 add in trunk

Event improvements
https://bugs.webkit.org/show_bug.cgi?id=179591

Reviewed by Chris Dumez.

Source/JavaScriptCore:

Remove all uses of ScriptValue other than in the implementation of ScriptObject.

  • bindings/ScriptFunctionCall.cpp: Removed include of ScriptValue.h.
  • bindings/ScriptObject.cpp: Removed unused overload of ScriptObject constructor.
  • bindings/ScriptObject.h: Ditto.
  • bindings/ScriptValue.cpp:

(Deprecated::ScriptValue::~ScriptValue): Deleted.
(Deprecated::ScriptValue::getString const): Deleted.
(Deprecated::ScriptValue::toString const): Deleted.
(Deprecated::ScriptValue::isEqual const): Deleted.
(Deprecated::ScriptValue::isNull const): Deleted.
(Deprecated::ScriptValue::isUndefined const): Deleted.
(Deprecated::ScriptValue::isObject const): Deleted.
(Deprecated::ScriptValue::isFunction const): Deleted.
(Deprecated::ScriptValue::toInspectorValue const): Deleted.

  • bindings/ScriptValue.h: Removed many unused functions. Made the rest

protected since this is now used only in ScriptObject.

  • inspector/ConsoleMessage.cpp:

(Inspector::ConsoleMessage::addToFrontend): Stop using ScriptValue.
(Inspector::ConsoleMessage::isEqual const): Updated for change to ScriptArguments::isEqual.

  • inspector/ScriptArguments.cpp:

(Inspector::ScriptArguments::create): Take a Vector of JSC::Strong, not ScriptValue,
use rvalue reference with move instead of lvalue reference with swap, and take execution
state by reference instead of pointer.
(Inspector::ScriptArguments::createEmpty): Deleted. Can now use create instead.
(Inspector::ScriptArguments::ScriptArguments): Ditto.
(Inspector::ScriptArguments::~ScriptArguments): Deleted.
(Inspector::ScriptArguments::argumentAt const): Updated to use JSC::Strong.
(Inspector::ScriptArguments::getFirstArgumentAsString): Ditto.
(Inspector::ScriptArguments::isEqual const): Ditto. Also changed to use JS internals
instead of calling through the C API.

  • inspector/ScriptArguments.h: Updated for the above.
  • inspector/ScriptCallStackFactory.cpp:

(Inspector::createScriptArguments): Updated for changes to ScriptArguments.

  • inspector/ScriptDebugServer.cpp: Removed include of ScriptValue.h.
  • inspector/agents/InspectorAgent.cpp: Ditto.
  • inspector/agents/InspectorDebuggerAgent.cpp: Ditto.

(Inspector::InspectorDebuggerAgent::evaluateOnCallFrame): Use JSC::Strong instead
of ScriptValue.
(Inspector::InspectorDebuggerAgent::currentCallFrames): Ditto.

  • inspector/agents/InspectorDebuggerAgent.h: Ditto.
  • runtime/ConsoleClient.cpp:

(JSC::ConsoleClient::printConsoleMessageWithArguments): Ditto.
(JSC::ConsoleClient::clear): Use ScriptArguments::create and pass an empty vector
instead of calling a separate createEmpty function.

  • runtime/VM.cpp:

(JSC::VM::createLeaked): Deleted.

  • runtime/VM.h: Deleted createLeaked.

Source/WebCore:

  • removed all use of Deprecated::ScriptValue
  • fixed uses of JSC::Strong that can lead to reference cycles in CustomEvent, MessageEvent, and PopStateEvent, refactoring to share more code
  • removed incorrect use of CachedAttribute on attributes that can change values (should have fixed a bug; can we find a way to test this?)
  • did a more thorough job of clearing state from events, including clearing certain things before dispatching, and clearing more in initKeyboardEvent (may have fixed some obscure low-severity bugs; can we find a way to test this?)
  • removed "dummy" keyboard events
  • reworked code that omits details from error events for security reasons; old approach was "sanitizing" the error by removing the details if not allowed, new approach is adding the details only if allowed
  • Modules/encryptedmedia/NavigatorEME.h: Added forward declaration needed

to compile.

  • Modules/indexeddb/IDBCursor.h: Added comment about incorrect use of JSC::Strong.
  • Modules/indexeddb/IDBRequest.h: Ditto.
  • Modules/paymentrequest/PaymentResponse.h: Ditto.
  • WebCore.xcodeproj/project.pbxproj: Added JSValueInWrappedObject.h.
  • bindings/js/CommonVM.cpp:

(WebCore::commonVMSlow): Use VM::create instead of VM::createLeaked. Also use
local variable instead of the global.

  • bindings/js/DOMWrapperWorld.h: Put the inline bodies of the currentWorld and

worldForDOMObject functions separate from the declarations; long term goal is
that the declarations serve as documentation, and are not interspersed with the
implementations. Changed currentWorld to take a reference instead of a pointer
to ExecState. Added isWorldCompatible function.

  • bindings/js/JSCustomElementInterface.cpp:

(WebCore::JSCustomElementInterface::upgradeElement): Use toJSDOMWindow instead
of toJSDOMGlobalObject and added check for null.
(WebCore::JSCustomElementInterface::invokeCallback): Ditto.

  • bindings/js/JSCustomEventCustom.cpp:

(WebCore::JSCustomEvent::detail const): Use cachedPropertyValue.
(WebCore::JSCustomEvent::visitAdditionalChildren): Added. Needed now that we are
using JSValueInWrappedObject instead of JSC::Strong.

  • bindings/js/JSDOMConvertEventListener.h:

(WebCore::Converter<IDLEventListener<T>>::convert): Pass a reference.

  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::toJSDOMGlobalObject): Ditto.

  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::JSDOMGlobalObject::JSDOMGlobalObject): Moved initialization to nullptr
to the header.
(WebCore::toJSDOMGlobalObject): Deleted.

  • bindings/js/JSDOMGlobalObject.h: Updated for the above.
  • bindings/js/JSDOMWindowBase.h: Updated includes. Added "DOMWindow.h" but also

expanded the deprecated "JSDOMBinding.h" into all the things it includes.

  • bindings/js/JSDOMWindowProxy.cpp:

(WebCore::JSDOMWindowProxy::finishCreation): Tweak argument type to match usage.
(WebCore::JSDOMWindowProxy::create): Moved here from header, rolled in the code
that creates the structure.
(WebCore::JSDOMWindowProxy::setWindow): Take a reference instead of a pointer
or a RefPtr&&.
(WebCore::JSDOMWindowProxy::toWrapped): Use ? : instead of if.
(WebCore::toJS): Pass a reference.

  • bindings/js/JSDOMWindowProxy.h: Updated for abvoe changes.
  • bindings/js/JSDOMWrapper.cpp:

(WebCore::cloneAcrossWorlds): Added.

  • bindings/js/JSDOMWrapper.h: Ditto.
  • bindings/js/JSErrorHandler.cpp:

(WebCore::JSErrorHandler::JSErrorHandler): Changed to take a reference.
Marked inline.
(WebCore::JSErrorHandler::create): Moved here from header. No longer inline, but
the constructor is now inline, so same number of levels of function calls, and
less code compiled at the call site and less to compile in the header.
(WebCore::JSErrorHandler::handleEvent): Use toJSDOMWindow instead
of toJSDOMGlobalObject.

  • bindings/js/JSErrorHandler.h: Ditto. Also made createJSErrorHandler take

references instead of pointers.

  • bindings/js/JSEventListener.cpp:

(WebCore::JSEventListener::create): Moved here from the header.
(WebCore::createEventListenerForEventHandlerAttribute): Updated for change to
currentWorld.
(WebCore::toJSDOMGlobalObject): Moved here from JSDOMGlobalObject.cpp because
this is the only place this function is used now. Also, this was one of four
different overrides and so it was good to delete the other three. Also updated
to take a reference rather than a "must not be null" pointer.
(WebCore::JSEventListener::handleEvent): Coding style tweaks.
(WebCore::JSEventListener::virtualisAttribute const): Deleted. Now isAttribute
is virtual and uses final as needed to remain inline-able and efficient.
(WebCore::JSEventListener::operator== const): Use is<> and downcast<> instead
of JSEventListener::cast.
(WebCore::eventHandlerAttribute): Updated for change to currentWorld.
(WebCore::setEventHandlerAttribute): Ditto.
(WebCore::setWindowEventHandlerAttribute): Ditto.
(WebCore::setDocumentEventHandlerAttribute): Ditto.

  • bindings/js/JSEventListener.h: Moved create functions into the cpp file.

Removed the cast function, since callers can use is<> and downcast<> instead.
Use final rather than override and made isAttribute override the virtual
function in the base class, eliminating virtualIsAttribute.

  • bindings/js/JSExtendableMessageEventCustom.cpp:

(WebCore::JSExtendableMessageEvent::data const): Use isWorldCompatible.
Still need to return here and fix the reference cycle for this class.

  • bindings/js/JSLazyEventListener.cpp:

(WebCore::eventParameterName): Moved up so it can be used by the constructor.
(WebCore::convertZeroToOne): Added, so that the constructor can fix up text
positions passed in to it as part of initializing a data member.
(WebCore::JSLazyEventListener::JSLazyEventListener): Changed to take
a CreationArguments object instead of lots of separate arguments.
(WebCore::JSLazyEventListener::initializeJSFunction const): Removed unneeded
checks of m_code and m_eventParameterName, both guaranteed not to be null
by the constructor. Tweaked coding style a bit.
(WebCore::JSLazyEventListener::create): Pass CreationArguments object.

  • bindings/js/JSLazyEventListener.h: Updated for above changes. Changed the

m_eventParameterName to be a reference since it's always a global string
that is never destroyed.

  • bindings/js/JSMessageEventCustom.cpp:

(WebCore::JSMessageEvent::data const): Use cachedPropertyValue and also
updated for the new version of MessageEvent that uses a Variant instead
of a type plus separate functions for each type.
(WebCore::JSMessageEvent::visitAdditionalChildren): Added. Needed now that we are
using JSValueInWrappedObject instead of JSC::Strong.

  • bindings/js/JSPopStateEventCustom.cpp:

(WebCore::JSPopStateEvent::state const): Use isWorldCompatible and also updated
to use JSValueInWrappedObject instead of JSC::Strong. Would be nice to share more
code with CustomEvent and MessageEvent, but at the moment they are subtly different.
Changed cacheState from a function to a lambda.
(WebCore::JSPopStateEvent::visitAdditionalChildren): Added. Needed now that we are
using JSValueInWrappedObject instead of JSC::Strong.

  • bindings/js/JSValueInWrappedObject.h: Added.
  • bindings/js/ScriptCachedFrameData.cpp:

(WebCore::ScriptCachedFrameData::restore): Updated for changes to JSDOMWindowProxy.

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::createWindowProxy): Ditto.
(WebCore::ScriptController::setDOMWindowForWindowProxy): Ditto.

  • bindings/js/WorkerScriptController.cpp: Removed include of ScriptValue.h.

(WebCore::WorkerScriptController::evaluate): Reworked to use the new
canIncludeErrorDetails instead of sanitizeScriptError. Added a FIXME about the
strange handling of the error message out argument.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateRuntimeEnableConditionalString): Pass a reference to worldForDOMObject.
(GenerateImplementation): Removed an incorrect comment about a removed error
check that is truly unneeded.
(GenerateAttributeGetterBodyDefinition): Pass a reference to worldForDOMObject.
(GenerateAttributeSetterBodyDefinition): Pass references to createJSErrorHandler
and worldForDOMObject.
(GenerateCallWith): Pass a reference to worldForDOMObject.

  • bindings/scripts/test/JS/JSTestGlobalObject.cpp: Updated for above changes.
  • bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp: Ditto.
  • bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
  • dom/CustomEvent.cpp:

(WebCore::CustomEvent::CustomEvent): Marked inline. Removed now unneeded
ExecState argument.
(WebCore::CustomEvent::create): Moved here from header. No longer inline, but
the constructor is now inline, so same number of levels of function calls, and
less code compiled at the call site and less to compile in the header.
(WebCore::CustomEvent::initCustomEvent): Updated to use JSValueInWrappedObject.
(WebCore::CustomEvent::trySerializeDetail): Deleted. Now handled by bindings.

  • dom/CustomEvent.h: Updated for the above.
  • dom/CustomEvent.idl: Added JSCustomMarkFunction and removed

CallWith=ScriptState.

  • dom/Document.cpp:

(WebCore::Document::shouldBypassMainWorldContentSecurityPolicy const):
Updated to pass reference to currentWorld but also rewrote to be more direct.

  • dom/Element.cpp:

(WebCore::Element::isKeyboardFocusable const): Take a pointer instead of a
reference to the keyboard event. This function can be called with no event;
before this patch we were using a "dummy event".

  • dom/Element.h: Ditto.
  • dom/ErrorEvent.cpp:

(WebCore::ErrorEvent::error): Use isWorldCompatible.

  • dom/Event.cpp:

(WebCore::Event::create): Moved here from header.
(WebCore::Event::createForBindings): Ditto.
(WebCore::Event::initEvent): Updated to use the name m_canceled instead of
the name m_defaultPrevented.
(WebCore::Event::resetBeforeDispatch): Added. Clears m_defaultHandled so
a value left over from a previous dispatch doesn't affect the next dispatch.

  • dom/Event.h: Renamed m_defaultPrevented to m_canceled to match specification

terminology and be slightly clearer. Added resetBeforeDispatch. Removed the
setDefaultPrevented function.

  • dom/EventDispatcher.cpp:

(WebCore::EventDispatcher::dispatchEvent): Added call to resetBeforeDispatch.

  • dom/EventListener.h: Made isAttribute virtual and got rid of virtualIsAttribute,

which was an alternative to using "final" before we had that in the language.

  • dom/EventTarget.cpp:

(WebCore::EventTarget::dispatchEvent): Added call to resetBeforeDispatch.

  • dom/KeyboardEvent.cpp:

(WebCore::KeyboardEvent::KeyboardEvent): Removed unneeded code that initializes
m_handledByInputMethod to false; we do that in the class definition now.
(WebCore::KeyboardEvent::create): Moved here from header.
(WebCore::KeyboardEvent::createForBindings): Ditto.
(WebCore::KeyboardEvent::initKeyboardEvent): Added code to reset m_charCode,
m_isComposing, m_keyCode, m_repeat, m_underlyingPlatformEvent, m_which, m_code,
and m_key. These are needed now that we can reuse an existing event; we don't
want them getting out of sync with the other data members.
(WebCore::KeyboardEvent::keyCode const): Updated for name change from m_keyEvent
to m_underlyingPlatformEvent.
(WebCore::KeyboardEvent::charCode const): Ditto.
(WebCore::findKeyboardEvent): Deleted. Was unused.

  • dom/KeyboardEvent.h: Updated for the above. Removed KeyboardEvent::createForDummy.
  • dom/MessageEvent.cpp:

(WebCore::MessageEvent::MessageEvent): Removed unnneded ExecState argument.
Simplified since m_data is now a Variant.
(WebCore::MessageEvent::create): More of the same.
(WebCore::MessageEvent::initMessageEvent): Ditto.
(WebCore::MessageEvent::trySerializeData): Deleted.
(WebCore::MessageEvent::data const): Deleted.

  • dom/MessageEvent.h: Use a Variant.
  • dom/MessageEvent.idl: Added JSCustomMarkFunction and removed

CallWith=ScriptState and CachedAttribute.

  • dom/MouseEvent.h: Removed obsolete comment.
  • dom/MouseEvent.idl: Wrap line differently.
  • dom/PopStateEvent.cpp:

(WebCore::PopStateEvent::PopStateEvent): Removed unneeded ExecState argument.
Updated to use JSValueInWrappedObject.
(WebCore::PopStateEvent::create): Ditto.
(WebCore::PopStateEvent::trySerializeState): Ditto.

  • dom/PopStateEvent.h: Ditto.
  • dom/PopStateEvent.idl: Use JSCustomMarkFunction, and don't use

ConstructorCallWith=ScriptState.

  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::sanitizeScriptError): Deleted.
(WebCore::ScriptExecutionContext::canIncludeErrorDetails): Added.
(WebCore::ScriptExecutionContext::dispatchErrorEvent): Clarify by
using canIncludeErrorDetails instead of sanitizeScriptError.

  • dom/ScriptExecutionContext.h: Ditto.
  • dom/WheelEvent.cpp:

(WebCore::WheelEvent::WheelEvent): Updated for name change and also to
eliminate m_initializedWithPlatformWheelEvent.
(WebCore::WheelEvent::create): Moved here from header.
(WebCore::WheelEvent::createForBindings): Ditto.
(WebCore::WheelEvent::initWebKitWheelEvent): Renamed from initWheelEvent.

  • dom/WheelEvent.h: Renamed initWheelEvent to initWebKitWheelEvent since

there is no standard init function for wheel events and we have this only
for backward compatibility. Got rid of the separate boolean
m_initializedWithPlatformWheelEvent and instead made the renamed
m_wheelEvent, m_underlyingPlatformEvent, optional for when there is no
underlying platform event.

  • html/BaseDateAndTimeInputType.cpp:

(WebCore::BaseDateAndTimeInputType::isKeyboardFocusable const): Take a
pointer to the event so we can handle the case where there is no event.

  • html/BaseDateAndTimeInputType.h: Ditto.
  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::isKeyboardFocusable const): Ditto.

  • html/HTMLAnchorElement.h: Ditto.
  • html/HTMLAreaElement.cpp:

(WebCore::HTMLAreaElement::isKeyboardFocusable const): Ditto.

  • html/HTMLAreaElement.h: Ditto.
  • html/HTMLDocument.cpp: Added include of "DOMWindow.h".
  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::isKeyboardFocusable const): Take
pointer to the event.

  • html/HTMLFormControlElement.h: Ditto.
  • html/HTMLFrameOwnerElement.cpp:

(WebCore::HTMLFrameOwnerElement::isKeyboardFocusable const): Ditto.

  • html/HTMLFrameOwnerElement.h: Ditto.
  • html/HTMLIFrameElement.h: Ditto.
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::isKeyboardFocusable const): Ditto.
(WebCore::HTMLInputElement::isTextFormControlKeyboardFocusable const): Ditto.

  • html/HTMLInputElement.h: Ditto.
  • html/HTMLPlugInElement.cpp:

(WebCore::HTMLPlugInElement::isKeyboardFocusable const): Ditto.

  • html/HTMLPlugInElement.h: Ditto.
  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::isKeyboardFocusable const): Ditto.

  • html/HTMLSelectElement.h: Ditto.
  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::isKeyboardFocusable const): Ditto.

  • html/HTMLTextAreaElement.h: Ditto.
  • html/InputType.cpp:

(WebCore::InputType::isKeyboardFocusable const): Ditto.

  • html/InputType.h: Ditto.
  • html/RadioInputType.cpp:

(WebCore::RadioInputType::isKeyboardFocusable const): Ditto.

  • html/RadioInputType.h: Ditto.
  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::isKeyboardFocusable const): Ditto.

  • html/TextFieldInputType.h: Ditto.
  • inspector/CommandLineAPIHost.cpp:

(WebCore::listenerEntriesFromListenerInfo): Pass reference to currentWorld.
Use is<> and downcast<> instead of JSEventListener::cast.

  • inspector/PageScriptDebugServer.cpp:

(WebCore::PageScriptDebugServer::isContentScript const): Pass reference to
currentWorld.

  • inspector/agents/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::buildObjectForEventListener):
Use is<> and downcast<> instead of JSEventListener::cast.

  • mathml/MathMLElement.cpp:

(WebCore::MathMLElement::isKeyboardFocusable const): Take a
pointer to the event so we can handle the case where there is no event.

  • mathml/MathMLElement.h: Ditto.
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::dispatchEvent): Added call to resetBeforeDispatch.
All event dispatching paths now need to do this; there are 3.

  • page/EventHandler.cpp:

(WebCore::handleWheelEventInAppropriateEnclosingBox): Use the new
underlyingPlatformEvent function, less confusing than calling a function
named wheelEvent() on an object of type WheelEvent. Also, it returns
a const& to std::optional instead of a pointer, so updated for that.
(WebCore::EventHandler::defaultWheelEventHandler): Ditto.
(WebCore::EventHandler::internalKeyEvent): Use preventDefault instead
of setDefaultPrevented(true).
(WebCore::EventHandler::tabsToLinks const): Take a pointer.
(WebCore::EventHandler::defaultArrowEventHandler): Pass a pointer.
(WebCore::EventHandler::defaultTabEventHandler): Ditto.

  • page/EventHandler.h: Updated for the above.
  • page/EventSource.cpp:

(WebCore::EventSource::dispatchMessageEvent): Pass a reference rather
than a pointer when creating a message event.

  • page/FocusController.cpp:

(WebCore::isFocusableElementOrScopeOwner): Use a pointer instead of reference
for keyboard event.
(WebCore::isNonFocusableScopeOwner): Ditto.
(WebCore::isFocusableScopeOwner): Ditto.
(WebCore::shadowAdjustedTabIndex): Ditto.
(WebCore::FocusController::findFocusableElementDescendingIntoSubframes):
Renamed to use simpler terminology than "descending down into frame document".
Changed to take a pointer instead of reference.
(WebCore::FocusController::setInitialFocus): Pass nullptr instead of
using KeyboardEvent::createForDummy.
(WebCore::FocusController::advanceFocus): Pointer instead of reference.
(WebCore::FocusController::advanceFocusInDocumentOrder): Ditto.
(WebCore::FocusController::findFocusableElementAcrossFocusScope): Ditto.
(WebCore::FocusController::findFocusableElementWithinScope): Ditto.
(WebCore::FocusController::nextFocusableElementWithinScope): Ditto.
(WebCore::FocusController::previousFocusableElementWithinScope): Ditto.
(WebCore::FocusController::findFocusableElementOrScopeOwner): Ditto.
(WebCore::FocusController::findElementWithExactTabIndex): Ditto.
(WebCore::nextElementWithGreaterTabIndex): Ditto.
(WebCore::previousElementWithLowerTabIndex): Ditto.
(WebCore::FocusController::nextFocusableElement): Ditto.
(WebCore::FocusController::previousFocusableElement): Ditto.
(WebCore::FocusController::nextFocusableElementOrScopeOwner): Ditto.
(WebCore::FocusController::previousFocusableElementOrScopeOwner): Ditto.
(WebCore::FocusController::findFocusCandidateInContainer): Ditto.
(WebCore::FocusController::advanceFocusDirectionallyInContainer): Ditto.
(WebCore::FocusController::advanceFocusDirectionally): Ditto.

  • page/FocusController.h: Updated for the above.
  • page/PageConsoleClient.cpp:

(WebCore::objectArgumentAt): Added. Helper to make functions below simpler.
(WebCore::canvasRenderingContext): Factored out logic to get the context
from either a canvas or a canvas rendering context from the functions below.
Also updated to not use ScriptValue and to use auto quite a bit more.
(WebCore::PageConsoleClient::record): Updated to use the functions above.
(WebCore::PageConsoleClient::recordEnd): Ditto.

  • page/ios/EventHandlerIOS.mm:

(WebCore::EventHandler::tabsToAllFormControls const): Take a pointer
instead of a reference.

  • page/mac/EventHandlerMac.mm:

(WebCore::EventHandler::tabsToAllFormControls const): Ditto.

  • page/win/EventHandlerWin.cpp:

(WebCore::EventHandler::tabsToAllFormControls const): Ditto.

  • platform/glib/EventHandlerGLib.cpp:

(WebCore::EventHandler::tabsToAllFormControls const): Ditto.

  • svg/SVGAElement.cpp:

(WebCore::SVGAElement::isKeyboardFocusable const): Ditto.

  • svg/SVGAElement.h: Ditto.
  • testing/Internals.cpp:

(WebCore::Internals::isFromCurrentWorld const): Use isWorldCompatible.

Source/WebKit:

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.cpp:

(webkit_dom_wheel_event_init_wheel_event): Updated to call initWebKitWheelEvent.

  • WebProcess/Plugins/PluginView.cpp: Removed include of ScriptValue.h.
  • WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:

(WebKit::WebEditorClient::executePendingEditorCommands):
Updated for name change from keyEvent to underlyingPlatformEvent.
(WebKit::WebEditorClient::handleInputMethodKeydown): Ditto.

  • WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp:

(WebKit::WebEditorClient::handleKeyboardEvent): Ditto.
(WebKit::WebEditorClient::handleInputMethodKeydown): Ditto.

  • WebProcess/WebPage/WebPage.cpp: Removed include of ScriptValue.h.
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::handleEditingKeyboardEvent): Updated for name change from
keyEvent to underlyingPlatformEvent.

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::executeKeypressCommandsInternal): Ditto.
(WebKit::WebPage::handleEditingKeyboardEvent): Ditto.

Source/WebKitLegacy/mac:

  • DOM/DOMWheelEvent.mm:

(-[DOMWheelEvent initWheelEvent:wheelDeltaY:view:screenX:screenY:clientX:clientY:ctrlKey:altKey:shiftKey:metaKey:]):
Call initWebKitWheelEvent.

  • Plugins/Hosted/NetscapePluginInstanceProxy.mm: Removed include of ScriptValue.h.
  • WebCoreSupport/WebInspectorClient.mm: Ditto.
  • WebView/WebFrame.mm: Ditto.
  • WebView/WebHTMLView.mm:

(-[WebHTMLView _interpretKeyEvent:savingCommands:]): Updated for name change from keyEvent to
underlyingPlatformEvent.
(-[WebHTMLView _handleEditingKeyEvent:]): Ditto.

  • WebView/WebScriptWorld.mm:

(+[WebScriptWorld scriptWorldForGlobalContext:]): Pass reference to currentWorld function.

  • WebView/WebView.mm: Removed include of ScriptValue.h.

Source/WebKitLegacy/win:

  • Plugins/PluginView.cpp: Removed include of ScriptValue.h.
  • WebFrame.cpp: Ditto.
  • WebScriptWorld.cpp:

(WebScriptWorld::scriptWorldForGlobalContext): Pass reference to currentWorld.

  • WebView.cpp: Removed include of ScriptValue.h.

(WebView::handleEditingKeyboardEvent): Updated for name change from
keyEvent to underlyingPlatformEvent.

Source/WTF:

  • wtf/text/OrdinalNumber.h: Added som missing const.
  • wtf/text/TextPosition.h: Ditto.

LayoutTests:

  • fast/dom/reference-cycle-leaks-expected.txt: Expect success for the

CustomEvent, MessageEvent, and PopStateEvent cycle leak checks.

9:14 PM Changeset in webkit [228259] by jmarcell@apple.com
  • 2 edits in tags/Safari-606.1.4/Source/WebInspectorUI

Cherry-pick r228251. rdar://problem/37333249

8:10 PM Changeset in webkit [228258] by aestes@apple.com
  • 2 edits in trunk/Source/WebCore

ASSERTION FAILED: vm->currentThreadIsHoldingAPILock() seen with http/tests/paymentrequest/payment-request-show-method.https.html
https://bugs.webkit.org/show_bug.cgi?id=182591

Reviewed by Youenn Fablet.

Fixes assertion failures in http/tests/paymentrequest/payment-request-show-method.https.html.

DOMPromise::whenSettled() calls the JSC API without first aquiring the API lock, and
r228195 added a call to whenSettled() where the lock is not guaranteed to be already
acquired.

Fix this by creating a JSLockHolder in DOMPromise::whenSettled().

  • bindings/js/JSDOMPromise.cpp:

(WebCore::DOMPromise::whenSettled):

7:30 PM Changeset in webkit [228257] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

REGRESSION(r227758): Webpage fails to load due to crash in com.apple.WebKit: WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse + 267
https://bugs.webkit.org/show_bug.cgi?id=182532
<rdar://problem/36414017>

Patch by Antti Koivisto <Antti Koivisto> and Youenn Fablet <youenn@apple.com> on 2018-02-07
Reviewed by Chris Dumez.

No test case, don't know how to make one. The repro involves multipart HTTP streaming and details are hazy.
We were calling a function that was WTFMoved away just a few lines above.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):

6:32 PM Changeset in webkit [228256] by Said Abou-Hallawa
  • 2 edits in trunk/LayoutTests

[iOS] Skip webgl/webgl-texture-image-buffer-reuse.html
https://bugs.webkit.org/show_bug.cgi?id=182592

Unreviewed test gardening.

  • platform/ios/TestExpectations:
6:29 PM Changeset in webkit [228255] by commit-queue@webkit.org
  • 6 edits in trunk/LayoutTests

Remove www1/www2 URLs from service worker tests
https://bugs.webkit.org/show_bug.cgi?id=182548

Patch by Youenn Fablet <youenn@apple.com> on 2018-02-07
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/service-workers/service-worker/http-to-https-redirect-and-register.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/http-to-https-redirect-and-register.https.html:
  • web-platform-tests/service-workers/service-worker/update-bytecheck.https.html:

LayoutTests:

6:25 PM Changeset in webkit [228254] by Ryan Haddad
  • 6 edits in trunk/Source/WebCore

Unreviewed, rolling out r228243.

Introduced an assertion failure with API test
FullscreenZoomInitialFrame.WebKit

Reverted changeset:

"Assert that NSApp is not running in the WebProcess."
https://bugs.webkit.org/show_bug.cgi?id=182553
https://trac.webkit.org/changeset/228243

5:27 PM Changeset in webkit [228253] by timothy_horton@apple.com
  • 4 edits
    1 move in trunk

Evernote device management web view sometimes displays at the wrong scale
https://bugs.webkit.org/show_bug.cgi?id=182590
<rdar://problem/36633687>

Reviewed by Simon Fraser.

Evernote implements the WKWebView's scroll view's delegate method
viewForZoomingInScrollView: and returns nil. This results in
WKScrollView's zoomScale always returning 1, no matter what the
WKContentView's actual scale is. This will result in us never updating
the WKContentView's scale to 1. When loading a page that has a few
scale changes during load but ends up at scale 1, we get stuck at whatever
intermediate scale immediately preceded settling on 1.

Fix this by not forwarding viewForZoomingInScrollView: to the external
WKScrollView delegate; we are in charge of the contents of the scroll
view (including which view scrollView's zoomScale should track), and
overriding viewForZoomingInScrollView: is only ever going to lead to
a broken WebKit.

  • UIProcess/ios/WKScrollView.mm:

(shouldForwardScrollViewDelegateMethodToExternalDelegate):
(-[WKScrollViewDelegateForwarder forwardInvocation:]):
(-[WKScrollViewDelegateForwarder forwardingTargetForSelector:]):

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/ios/WKScrollViewDelegate.mm: Renamed from Tools/TestWebKitAPI/Tests/ios/WKScrollViewDelegateCrash.mm.

(-[TestDelegateForScrollView dealloc]):
(TestWebKitAPI::TEST):
(-[WKScrollViewDelegateWithViewForZoomingOverridden viewForZoomingInScrollView:]):
Add a test that failed before the change that ensures that we don't
consult the external delegate for viewForZoomingInScrollView:, and that
we succesfully update the scale even if it matches that of the view
the external delegate returns for viewForZoomingInScrollView:.

5:25 PM Changeset in webkit [228252] by wilander@apple.com
  • 5 edits in trunk/LayoutTests

Switch testRunner.installStatisticsDidModifyDataRecordsCallback() to testRunner.installStatisticsDidScanDataRecordsCallback() in two tests
https://bugs.webkit.org/show_bug.cgi?id=182366
<rdar://problem/37094805>

Unreviewed test gardening.

This change is an attempt to make two flaky test cases stable.
It also skips http/tests/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time.html
because the timestamp resolution of 5 seconds is now so short that we run into timing flakiness.

  • http/tests/resourceLoadStatistics/non-prevalent-resource-with-user-interaction.html:
  • http/tests/resourceLoadStatistics/non-prevalent-resource-without-user-interaction.html:
  • platform/mac-wk2/TestExpectations:

Removed [ Skip ] entry for http/tests/resourceLoadStatistics/non-prevalent-resource-with-user-interaction.html
Added [ Skip ] entry for http/tests/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time.html

  • platform/wk2/TestExpectations:

Now both the above test cases are marked [ Pass ].

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

Web Inspector: replace isAncestor with Node.contains() in LegacyTabBar
https://bugs.webkit.org/show_bug.cgi?id=182586

Reviewed by Timothy Hatcher.

  • UserInterface/Views/LegacyTabBar.js:
4:39 PM Changeset in webkit [228250] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

[Curl] Cookie Database has some warnings when compiled in clang
https://bugs.webkit.org/show_bug.cgi?id=182583

Patch by Christopher Reid <chris.reid@sony.com> on 2018-02-07
Reviewed by Alex Christensen.

No new tests, no change in behavior.

Fixing unused-parameter, missing-field-initializers, reorder, and pragma-once-outside-header warnings.

  • platform/network/NetworkStorageSession.h:
  • platform/network/curl/CookieJarCurlDatabase.cpp:
  • platform/network/curl/CookieJarDB.cpp:
  • platform/network/curl/NetworkStorageSessionCurl.cpp:
4:11 PM Changeset in webkit [228249] by rniwa@webkit.org
  • 5 edits in trunk/Source/WebCore

Remove unused CSSParserContext in CSSParser::parseInlineStyleDeclaration
https://bugs.webkit.org/show_bug.cgi?id=182587

Reviewed by Simon Fraser.

Removed the code. There is no need to create an unused CSSParserContext in CSSParser.

  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseInlineStyleDeclaration):

  • css/parser/CSSParser.h:
  • css/parser/CSSParserImpl.cpp:

(WebCore::CSSParserImpl::parseInlineStyleDeclaration):

  • css/parser/CSSParserImpl.h:
3:51 PM Changeset in webkit [228248] by Ross Kirsling
  • 2 edits in trunk/Source/WebCore

Add missing #if ENABLE(VIDEO_TRACK) after r228201.
https://bugs.webkit.org/show_bug.cgi?id=182585

Reviewed by Chris Dumez.

  • loader/LinkPreloadResourceClients.h:
3:16 PM Changeset in webkit [228247] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skip media/modern-media-controls/tracks-support/tracks-support-show-panel-after-dragging-controls.html.
https://bugs.webkit.org/show_bug.cgi?id=169158

Unreviewed test gardening.

  • platform/mac/TestExpectations:
3:13 PM Changeset in webkit [228246] by Wenson Hsieh
  • 3 edits in trunk/Source/WebKit

[Extra zoom mode] Delegate scrolling from the content view to input view controllers
https://bugs.webkit.org/show_bug.cgi?id=182534
<rdar://problem/37276625>

Reviewed by Tim Horton.

Override -_wheelChangedWithEvent: on the content view, and give extra zoomed input view controllers a chance to
handle the event.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _wheelChangedWithEvent:]):

3:07 PM Changeset in webkit [228245] by Wenson Hsieh
  • 4 edits
    2 adds in trunk/Source/WebKit

[Extra zoom mode] Implement multiple and single select menus
https://bugs.webkit.org/show_bug.cgi?id=182525
<rdar://problem/35143016>

Reviewed by Tim Horton.

Add support for presenting picker views when focusing single or multiple select elements. See changes below for
additional detail.

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

(-[WKContentView _startAssistingKeyboard]):

Move logic for presenting view controllers when focusing elements out of _startAssistingKeyboard, and into
_startAssistingNode:(...). This is because _startAssistingKeyboard is only invoked for certain types of focused
element types; importantly, this set excludes select elements. Putting the call to present the focused view
controller there also didn't make much since, considering that these new view controllers are not tied to
keyboards in any way.

(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
(-[WKContentView _stopAssistingNode]):

Dismiss any select menu that is being presented.

(-[WKContentView presentSelectMenuViewController:]):
(-[WKContentView dismissSelectMenuViewController:]):

Introduce idempotent helpers for presenting and dismissing the select menu view controller.

(-[WKContentView presentViewControllerForAssistedNode:]):
(-[WKContentView selectMenu:didSelectItemAtIndex:]):

For single select menus. Called when the user selects a row.

(-[WKContentView didCancelSelectionInSelectMenu:]):
(-[WKContentView numberOfItemsInSelectMenu:]):
(-[WKContentView selectMenu:displayTextForItemAtIndex:]):

Indicates the text value to show at a given index.

(-[WKContentView selectMenu:didCheckItemAtIndex:checked:]):

For multiple select menus, invoked when an item is checked. The checked parameter indicates whether or not the
item is now checked.

(-[WKContentView selectMenuSupportsMultipleSelection:]):

Indicates whether this select menu is single-item-only, or allows multiple items to be selected (checked).

(-[WKContentView selectMenu:hasCheckedOptionAtIndex:]):

For multiple select menus. Determines whether an option at the given index is checked.

(-[WKContentView startingIndexForSelectMenu:]):

Determines the index to instantly scroll to when presenting the select menu.

  • UIProcess/ios/forms/WKSelectMenuViewController.h: Added.
  • UIProcess/ios/forms/WKSelectMenuViewController.mm: Added.

Add new harness files for WKSelectMenuViewController's header and implementation (see WebKitAdditions).

  • WebKit.xcodeproj/project.pbxproj:
2:53 PM Changeset in webkit [228244] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

Improve NetworkResourceLoader logging to capture redirect cases
https://bugs.webkit.org/show_bug.cgi?id=182573
<rdar://problem/37316714>

Reviewed by Chris Dumez.

Add logging for cookie partitioning or blocking during redirects.

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):

2:33 PM Changeset in webkit [228243] by pvollan@apple.com
  • 6 edits in trunk/Source/WebCore

Assert that NSApp is not running in the WebProcess.
https://bugs.webkit.org/show_bug.cgi?id=182553
<rdar://problem/37316144>

Reviewed by Simon Fraser.

In WebCore, there are a few places where NSApp is referenced. Since the WebContent process
is no longer using the NSApplication run loop, and NSApp is no longer guaranteed to be
valid, we should make sure that the NSApp is not referenced by the WebContent process or
the Network process, by asserting that the NSApplication event loop is running when NSApp
is referenced. It is still ok for the UIProcess to reference NSApp. Adding these assert
will help catch references to NSApp when the NSApplication run loop is not used.
Also, do not post a fake mouse event in PasteBoard::setDragImage when the NSApplication
run loop is not running, since this is only relevant in WK1.

No new tests, covered by existing tests.

  • page/mac/EventHandlerMac.mm:

(WebCore::lastEventIsMouseUp):
(WebCore::EventHandler::sendFakeEventsAfterWidgetTracking):

  • platform/mac/PasteboardMac.mm:

(WebCore::Pasteboard::setDragImage):

  • platform/mac/WebVideoFullscreenController.mm:

(-[WebVideoFullscreenController windowDidLoad]):
(-[WebVideoFullscreenController updateMenuAndDockForFullscreen]):

  • platform/mac/WebWindowAnimation.mm:

(WebCore::WebWindowAnimationDurationFromDuration):

2:02 PM Changeset in webkit [228242] by mitz@apple.com
  • 9 copies
    1 add in releases/Apple/Safari Technology Preview 49

Added a tag for Safari Technology Preview release 49.

1:55 PM Changeset in webkit [228241] by commit-queue@webkit.org
  • 3 edits
    3 adds in trunk

ASSERTION FAILED: m_timeOrigin in Performance::Performance()
https://bugs.webkit.org/show_bug.cgi?id=182558
<rdar://problem/37297551>

Patch by Youenn Fablet <youenn@apple.com> on 2018-02-07
Reviewed by Chris Dumez.

Source/WebCore:

Test: http/wpt/fetch/cors-preflight-star.any.serviceworker.html

  • loader/CrossOriginPreflightChecker.cpp:

(WebCore::CrossOriginPreflightChecker::startPreflight):

LayoutTests:

Make use of WPT cors-preflight-star.any.js test in service worker.
This test should be removed once WPT will run any.js tests in service workers as well as workers and window.

  • http/wpt/service-workers/cors-preflight-star.any.js: Added.
  • http/wpt/service-workers/cors-preflight-star.any.serviceworker-expected.txt: Added.
  • http/wpt/service-workers/cors-preflight-star.any.serviceworker.html: Added.
1:31 PM Changeset in webkit [228240] by Wenson Hsieh
  • 9 edits in trunk

REGRESSION(r226396): File paths are inserted when dropping image files
https://bugs.webkit.org/show_bug.cgi?id=182557
<rdar://problem/37294120>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Reverts unintended changes in <http://trac.webkit.org/r226396>. Before r226396, WebContentReader::readFilenames
(a helper function in macOS-specific code) contained logic to create and insert attachment elements if
ENABLE(ATTACHMENT_ELEMENT); otherwise, it would fall back to inserting the visible URL as a text node. Since we
enable the attachment element on all Cocoa platforms via xcconfig files, this was effectively dead code.

However, when r226396 (which moved this out from macOS to Cocoa platform code) refactored this helper function,
it also moved this chunk of code out of the !ENABLE(ATTACHMENT) conditional and into a PLATFORM(MAC) guard,
which means that we now fall back to inserting file paths as text when attachment elements are disabled. To fix
this, we simply remove the (previously) dead code.

A more subtle difference is that we no longer always return true from WebContentReader::readFilePaths. This
means that when we drop files, we no longer skip over the early return in documentFragmentFromDragData when
we've made a fragment, so we read the file path as a URL. To address this, we just restore the pre-macOS 10.13.4
behavior of initializing the document fragment.

Test: modified editing/pasteboard/drag-files-to-editable-element-as-URLs.html.

  • editing/WebContentReader.cpp:

(WebCore::WebContentReader::ensureFragment): Deleted.

Remove this helper, as it was only used in WebContentReader::readFilePaths.

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

(WebCore::WebContentReader::readFilePaths):

Tools:

Tweak some image pasting API tests to ensure that file paths are not inserted when pasting images backed by
file paths on disk.

  • TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:

(TEST):

LayoutTests:

Tweak an existing layout test that drops a file into a contenteditable, to check that no text is inserted into
the editable element after dropping.

  • editing/pasteboard/drag-files-to-editable-element-as-URLs-expected.txt:
  • editing/pasteboard/drag-files-to-editable-element-as-URLs.html:
12:09 PM Changeset in webkit [228239] by wilander@apple.com
  • 13 edits
    11 adds in trunk

Restrict Referer to just the origin for third parties in private mode and third parties ITP blocks cookies for in regular mode
https://bugs.webkit.org/show_bug.cgi?id=182559
<rdar://problem/36990337>

Reviewed by Andy Estes.

Source/WebCore:

Tests: http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-redirects.html

http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-requests.html
http/tests/security/strip-referrer-to-origin-for-third-party-redirects-in-private-mode.html
http/tests/security/strip-referrer-to-origin-for-third-party-requests-in-private-mode.html

  • page/SecurityPolicy.cpp:

(WebCore::SecurityPolicy::referrerToOriginString):

Now exposed within WebCore. This is to make sure we create a proper referrer
string in WebCore::ResourceRequestBase::setExistingHTTPReferrerToOriginString().

(WebCore::referrerToOriginString): Deleted.

Used to be internal.

  • page/SecurityPolicy.h:
  • platform/network/ResourceRequestBase.cpp:

(WebCore::ResourceRequestBase::setExistingHTTPReferrerToOriginString):

New, exported function used in WebKit. Note that this function does not
set the referrer if the request has none since before.

  • platform/network/ResourceRequestBase.h:

Source/WebKit:

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

(WebKit::NetworkDataTaskCocoa::isThirdPartyRequest):

New convenience function. Checks whether the resource shares
partition with the first party.

(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):

Now strips the referrer to just the origin for:

  1. All third party requests in private mode.
  2. Third party requests to domains that ITP blocks cookies for.

(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):

Now strips the referrer in redirects to just the origin for:

  1. All third party requests in private mode.
  2. Third party requests to domains that ITP blocks cookies for.

LayoutTests:

New tests marked as [ Skip ]. The change only applies to iOS and Mac.

  • http/tests/resourceLoadStatistics/resources/echo-referrer.php: Added.
  • http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-redirects-expected.txt: Added.
  • http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-redirects.html: Added.
  • http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-requests-expected.txt: Added.
  • http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-requests.html: Added.
  • http/tests/security/resources/echo-referrer.php: Added.
  • http/tests/security/resources/redirect.php: Added.
  • http/tests/security/strip-referrer-to-origin-for-third-party-redirects-in-private-mode-expected.txt: Added.
  • http/tests/security/strip-referrer-to-origin-for-third-party-redirects-in-private-mode.html: Added.
  • http/tests/security/strip-referrer-to-origin-for-third-party-requests-in-private-mode-expected.txt: Added.
  • http/tests/security/strip-referrer-to-origin-for-third-party-requests-in-private-mode.html: Added.
  • platform/ios/TestExpectations:

New tests marked as [ Pass ].

  • platform/mac-wk2/TestExpectations:

New tests marked as [ Pass ].

  • platform/wk2/TestExpectations:

New tests marked as [ Skip ].

11:52 AM Changeset in webkit [228238] by Alan Bujtas
  • 7 edits in trunk/Source/WebCore

[RenderTreeBuilder] Remove RenderElement::destroyLeftoverChildren.
https://bugs.webkit.org/show_bug.cgi?id=182518
<rdar://problem/37256035>

Reviewed by Antti Koivisto.

Remove leftover children before we call takeChild() on the parent (as opposed to when
we finally call destroy() on the parent).
This patch also explicitly destroys the top level pagination renderers.

Covered by existing tests.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::removeAndDestroyChild):
(WebCore::RenderElement::destroyLeftoverChildren): Deleted.

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

(WebCore::RenderObject::destroy):

  • rendering/updating/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::tearDownRenderers):
(WebCore::RenderTreeUpdater::tearDownLeftoverPaginationRenderersIfNeeded):

  • rendering/updating/RenderTreeUpdater.h:
11:35 AM JSCOnly/CrossBuildAndRemoteTestJSCLinux edited by clopez@igalia.com
(diff)
11:33 AM Changeset in webkit [228237] by Antti Koivisto
  • 3 edits in trunk/PerformanceTests

StyleBench: Attribute selectors and other improvements
https://bugs.webkit.org/show_bug.cgi?id=182387

Reviewed by Joseph Pecoraro.

  • Add some attributes to elements in all tests
  • Add some attribute selectors to stylesheets in all tests
  • Also add some * selectors to all stylesheets.
  • Add attribute mutation step to all suites
  • Make test steps do more mutations (25->100) and reduce the number of steps to keep testing time in check. Too fast steps were running into timer resolution limits.
  • StyleBench/resources/style-bench.js:

(defaultConfiguration):
(prototype.randomAttributeName):
(prototype.randomAttributeValue):
(prototype.randomAttributeSelector):
(prototype.makeCompoundSelector):
(prototype.makeElement):
(prototype.addClasses):
(prototype.removeClasses):
(prototype.mutateAttributes):
(prototype.async.runForever):

  • StyleBench/resources/tests.js:

(makeSteps):
(makeSuite):

11:28 AM Changeset in webkit [228236] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Adjusted test expectations for storage/indexeddb/modern/idbtransaction-objectstore-failures.html.
https://bugs.webkit.org/show_bug.cgi?id=171862

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
11:23 AM Changeset in webkit [228235] by jmarcell@apple.com
  • 7 edits in trunk/Source

Versioning.

11:14 AM Changeset in webkit [228234] by jmarcell@apple.com
  • 1 copy in tags/Safari-606.1.4

Tag Safari-606.1.4.

11:07 AM Changeset in webkit [228233] by jmarcell@apple.com
  • 12 edits in branches/safari-605-branch

Cherry-pick r228230. rdar://problem/37319241

11:01 AM Changeset in webkit [228232] by Nikita Vasilyev
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Styles: completion popover doesn't hide when switching panels
https://bugs.webkit.org/show_bug.cgi?id=182464
<rdar://problem/37202763>

Reviewed by Timothy Hatcher.

Hide completion popover by triggering blur event on the focused text field.
Removing text fields from the DOM tree would hide the completion popovers as well,
but switching sidebar panels doesn't remove them from the DOM.

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:

(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.hidden):

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:

(WI.SpreadsheetCSSStyleDeclarationSection.prototype.hidden):

  • UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:

(WI.SpreadsheetRulesStyleDetailsPanel.prototype.hidden):

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype.hidden):

10:56 AM Changeset in webkit [228231] by dbates@webkit.org
  • 19 edits
    9 adds in trunk

Log error when authentication challenge is blocked due to an insecure request
https://bugs.webkit.org/show_bug.cgi?id=182358

Reviewed by Andy Estes.

Source/WebCore:

Emit an error message to Web Inspector console that explains why an authentication
challenge was blocked so that a developer can fix up their site.

Tests: http/tests/security/mixedContent/insecure-basic-auth-image.https.html

http/tests/security/mixedContent/secure-page-navigates-to-basic-auth-insecure-page.https.html
http/tests/security/mixedContent/secure-page-navigates-to-basic-auth-secure-page-via-insecure-redirect.https.html

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::receivedFirstData): Log to the console an error message
if the document we are loading was forbidden from prompting for credentials.
Also removed duplicate assertion to ensure document is non-null and update
call to LinkLoader::loadLinksFromHeader() to use local variable to access
the document we are loading instead of asking the frame for it, again.
(WebCore::FrameLoader::reportAuthenticationChallengeBlocked): Added.

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

(WebCore::ResourceLoader::init):
(WebCore::ResourceLoader::willSendRequestInternal):
Track the decision to forbid asking for credentials due to Fetch spec. requirements (m_canAskClientForCredentials)
independently from the decision to forbid them due to making an insecure request (m_wasInsecureRequestSeen)
so that we know the reason why we blocked asking for credentials when we receive an authentication challenge.

(WebCore::ResourceLoader::didBlockAuthenticationChallenge): Added.
(WebCore::ResourceLoader::isAllowedToAskUserForCredentials const): Modified code now that we track
whether we have seen an insecure request so far independently from decision to forbid prompting for
credentials due to a Fetch spec. requirement.

(WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
Store a bit whether we have seen an insecure request when loading the resource so far. Disallow
asking for credentials if we have seen an insecure request so far. Once we receive a response

  • loader/ResourceLoader.h:

(WebCore::ResourceLoader::wasAuthenticationChallengeBlocked const): Added.
(WebCore::ResourceLoader::wasInsecureRequestSeen const): Added.

Source/WebKit:

Have network process notify the web process when it blocks an authentication challenge.

  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::completeAuthenticationChallenge):

  • NetworkProcess/NetworkLoadClient.h:

(WebKit::NetworkLoadClient::didBlockAuthenticationChallenge):

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::didBlockAuthenticationChallenge):

  • NetworkProcess/NetworkResourceLoader.h:
  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::didBlockAuthenticationChallenge):

  • WebProcess/Network/WebResourceLoader.h:
  • WebProcess/Network/WebResourceLoader.messages.in:

LayoutTests:

Add more tests and update expected results of existing tests now that we emit console messages.

Also fixed a typo in LayoutTests/http/tests/security/mixedContent/secure-redirect-to-secure-redirect-to-basic-auth-insecure-image.https.html
so that it tests what it actually claims to test and made the test programmatically load the image
to avoid output flakiness caused by the preload scanner preloading it. The preload scanner performs
mixed content checks and this can cause duplicate mixed content warnings in the test output.

  • http/tests/security/mixedContent/insecure-basic-auth-image.https-expected.txt: Added.
  • http/tests/security/mixedContent/insecure-basic-auth-image.https.html: Copied from LayoutTests/http/tests/security/mixedContent/secure-redirect-to-secure-redirect-to-basic-auth-insecure-image.https.html.
  • http/tests/security/mixedContent/insecure-download-redirects-to-basic-auth-secure-download.https-expected.txt:
  • http/tests/security/mixedContent/insecure-image-redirects-to-basic-auth-secure-image-expected.txt:
  • http/tests/security/mixedContent/resources/subresource/protected-page.php: Added.
  • http/tests/security/mixedContent/resources/subresource2/protected-image.php: Added.
  • http/tests/security/mixedContent/secure-page-navigates-to-basic-auth-insecure-page.https-expected.txt: Added.
  • http/tests/security/mixedContent/secure-page-navigates-to-basic-auth-insecure-page.https.html: Added.
  • http/tests/security/mixedContent/secure-page-navigates-to-basic-auth-secure-page-via-insecure-redirect.https-expected.txt: Added.
  • http/tests/security/mixedContent/secure-page-navigates-to-basic-auth-secure-page-via-insecure-redirect.https.html: Added.
  • http/tests/security/mixedContent/secure-redirect-to-insecure-redirect-to-basic-auth-secure-image.https-expected.txt:
  • http/tests/security/mixedContent/secure-redirect-to-secure-redirect-to-basic-auth-insecure-image.https-expected.txt:
  • http/tests/security/mixedContent/secure-redirect-to-secure-redirect-to-basic-auth-insecure-image.https.html:
10:51 AM Changeset in webkit [228230] by Chris Dumez
  • 12 edits in trunk

IndexedDB in service workers is using a memory backed store
https://bugs.webkit.org/show_bug.cgi?id=182574
<rdar://problem/37316205>

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Rebaseline WPT test that is now passing.

  • web-platform-tests/service-workers/service-worker/indexeddb.https-expected.txt:

Source/WebKit:

Make sure we pass a proper WebDatabaseProvider to the ServiceWorkerProcess via
PageConfiguration. Otherwise, we end up using the default EmptyDatabaseProvider
which uses an InProcessIDBServer and a memory-backed store for IndexedDB.

  • UIProcess/ServiceWorkerProcessProxy.cpp:

(WebKit::ServiceWorkerProcessProxy::start):

  • UIProcess/WebProcessPool.h:
  • WebProcess/Storage/WebSWContextManagerConnection.cpp:

(WebKit::WebSWContextManagerConnection::WebSWContextManagerConnection):
(WebKit::WebSWContextManagerConnection::installServiceWorker):

  • WebProcess/Storage/WebSWContextManagerConnection.h:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::establishWorkerContextConnectionToStorageProcess):

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

LayoutTests:

Unskip test that no longer times out.

10:13 AM Changeset in webkit [228229] by Matt Lewis
  • 2 edits in trunk/Source/WebCore

Removed the assertions from VideoFullscreenInterfaceAVKit.mm temporarily to stop the resulting crashes during debugging.
https://bugs.webkit.org/show_bug.cgi?id=182527

Unreviewed build fix.

  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(VideoFullscreenInterfaceAVKit::exitFullscreen):
(VideoFullscreenInterfaceAVKit::cleanupFullscreen):

9:18 AM Changeset in webkit [228228] by Ms2ger@igalia.com
  • 2 edits in trunk/LayoutTests

[WPE] Enable http/wpt/fetch/response-status-text.html
https://bugs.webkit.org/show_bug.cgi?id=177872

Unreviewed test gardening.

  • platform/wpe/TestExpectations: the test appears to pass since r227900.
8:48 AM Changeset in webkit [228227] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

[GTK] Typo in a translatable string
https://bugs.webkit.org/show_bug.cgi?id=182570

Unreviewed. Fix a typo.

  • UIProcess/API/glib/WebKitWebsiteDataManager.cpp:

(webkit_website_data_manager_class_init):

8:13 AM Changeset in webkit [228226] by Ms2ger@igalia.com
  • 3 edits in trunk/LayoutTests

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

Unreviewed test gardening.

  • platform/wpe/TestExpectations:
    • imported/w3c/web-platform-tests/css/css-shapes/shape-outside/values/shape-margin-001.html: fixed in r226404.
    • imported/w3c/web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-shape-arguments-000.html: fixed in r226404.
    • imported/w3c/web-platform-tests/XMLHttpRequest/getallresponseheaders.htm: fixed in r227900.
    • imported/w3c/web-platform-tests/XMLHttpRequest/status-async.htm: fixed in r227900.
    • imported/w3c/web-platform-tests/XMLHttpRequest/status-basic.htm: fixed in r227900.
    • imported/w3c/web-platform-tests/XMLHttpRequest/status-error.htm: fixed in r227900.
    • svg/custom/filter-update-different-root.html: fixed in r225797.
    • svg/filters/color-space-conversion.svg: fixed in r225797.
    • svg/filters/container-with-filters.svg: fixed in r225797.
    • svg/filters/feComposite-background-rect-control-operators.svg: fixed in r225797.
    • svg/filters/feDisplacementMap-filterUnits.svg: fixed in r225797.
  • platform/wpe/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt: update for error message change, probably in r227900.
8:09 AM Changeset in webkit [228225] by Ms2ger@igalia.com
  • 2 edits in trunk/Tools

[GTK] Enable WebKit.GeolocationTransitionTo{High,Low}Accuracy tests
https://bugs.webkit.org/show_bug.cgi?id=125068

Unreviewed test gardening.

They do not appear to have failed since we started running them again in r226944.

  • TestWebKitAPI/glib/TestExpectations.json:
7:40 AM Changeset in webkit [228224] by Alan Bujtas
  • 13 edits in trunk/Source/WebCore

[RenderTreeBuilder] Move RenderBlock::removeLeftoverAnonymousBlock to RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=182510
<rdar://problem/37250037>

Reviewed by Antti Koivisto.

Do not reinvent subtree reparenting.

Covered by existing tests.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::removeLeftoverAnonymousBlock): Deleted.

  • rendering/RenderBlock.h:
  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::moveAllChildrenToInternal):

  • rendering/RenderBoxModelObject.h:
  • rendering/RenderButton.h:
  • rendering/RenderElement.cpp:

(WebCore::RenderElement::detachRendererInternal):
(WebCore::RenderElement::attachRendererInternal):
(WebCore::RenderElement::insertChildInternal):
(WebCore::RenderElement::takeChildInternal):

  • rendering/RenderElement.h:
  • rendering/RenderRuby.h:
  • rendering/RenderRubyRun.h:
  • rendering/RenderTextControl.h:
  • rendering/updating/RenderTreeBuilderBlock.cpp:

(WebCore::RenderTreeBuilder::Block::insertChildIgnoringContinuation):
(WebCore::RenderTreeBuilder::Block::childBecameNonInline):
(WebCore::RenderTreeBuilder::Block::removeLeftoverAnonymousBlock):

  • rendering/updating/RenderTreeBuilderBlock.h:
6:47 AM Changeset in webkit [228223] by Ms2ger@igalia.com
  • 2 edits in trunk/Tools

[GTK] Enable WebKit.InjectedBundleFrameHitTest test
https://bugs.webkit.org/show_bug.cgi?id=120303

Unreviewed test gardening.

It does not appear to have failed since we started running it again in r226944.

  • TestWebKitAPI/glib/TestExpectations.json:
6:40 AM JSCOnly/CrossBuildAndRemoteTestJSCLinux edited by clopez@igalia.com
(diff)
5:53 AM Changeset in webkit [228222] by Ms2ger@igalia.com
  • 2 edits in trunk/Tools

[GTK] Enable WebKit.ForceRepaint test
https://bugs.webkit.org/show_bug.cgi?id=105532

Unreviewed test gardening.

It does not appear to have failed since we started running it again in r226944.

  • TestWebKitAPI/glib/TestExpectations.json:
3:32 AM Changeset in webkit [228221] by Philippe Normand
  • 4 edits in trunk/Tools

[JHBuild] Add libva in moduleset
https://bugs.webkit.org/show_bug.cgi?id=182384

Reviewed by Xabier Rodriguez-Calvar.

  • gstreamer/jhbuild.modules: Add libva and disable spurious message output.
  • gtk/install-dependencies: Remove libva from dependencies.
  • wpe/install-dependencies: Ditto.
3:18 AM Changeset in webkit [228220] by Ms2ger@igalia.com
  • 2 edits in trunk/Tools

[GTK] Enable WebKit.NewFirstVisuallyNonEmptyLayoutFrames test
https://bugs.webkit.org/show_bug.cgi?id=85037

Unreviewed test gardening.

It does not appear to have failed since we started running it again in r226944.

  • TestWebKitAPI/glib/TestExpectations.json:
Note: See TracTimeline for information about the timeline view.