Timeline



Feb 8, 2019:

11:58 PM Changeset in webkit [241237] by ysuzuki@apple.com
  • 4 edits in trunk/Source

[WTF] Use BufferInternal StringImpl if substring StringImpl takes more memory
https://bugs.webkit.org/show_bug.cgi?id=194469

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

  • runtime/JSString.h:

(JSC::jsSubstring):

Source/WTF:

Because pointer is large and aligned in 64bit in 64bit architecture, BufferSubstring StringImpl
implementation takes more memory than BufferInternal StringImpl implementation for small strings.
And BufferInternal StringImpl does not have a problem like, small substring StringImpl keeps super
large owner StringImpl. This patch calculates the required size of memory and selects the more efficient one.

  • wtf/text/StringImpl.h:

(WTF::StringImpl::isSubString const):
(WTF::StringImpl::createSubstringSharingImpl):

11:43 PM Changeset in webkit [241236] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] CachedTypes should use jsString instead of JSString::create
https://bugs.webkit.org/show_bug.cgi?id=194471

Reviewed by Mark Lam.

Use jsString() here because JSString::create is a bit low-level API and it requires some invariant like "length is not zero".

  • runtime/CachedTypes.cpp:

(JSC::CachedJSValue::decode const):

11:04 PM Changeset in webkit [241235] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Speculative fix for Mojave API test after r241223
https://bugs.webkit.org/show_bug.cgi?id=194427

  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:

(WebKit::XPCInitializationHandler):
(WebKit::XPCServiceMain):
Set the APPLEEVENTSSERVICENAME environment variable before handling any xpc messages like we used to.
I'll worry about making things right in the daemon later.

11:01 PM Changeset in webkit [241234] by ysuzuki@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

[JSC] Increase StructureIDTable initial capacity
https://bugs.webkit.org/show_bug.cgi?id=194468

Reviewed by Mark Lam.

Currently, # of structures just after initializing JSGlobalObject (precisely, initializing GlobalObject in
JSC shell), 281, already exceeds the current initial value 256. We should increase the capacity since
unnecessary resizing requires more operations, keeps old StructureID array until GC happens, and makes
more memory dirty. We also remove some structures that are no longer used.

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::callbackObjectStructure const):
(JSC::JSGlobalObject::propertyNameIteratorStructure const): Deleted.

  • runtime/StructureIDTable.h:
  • runtime/VM.h:
8:40 PM Changeset in webkit [241233] by ysuzuki@apple.com
  • 6 edits
    1 add in trunk

[JSC] String.fromCharCode's slow path always generates 16bit string
https://bugs.webkit.org/show_bug.cgi?id=194466

Reviewed by Keith Miller.

JSTests:

  • stress/string-from-char-code-slow-path.js: Added.

(shouldBe):
(testWithLength):

Source/JavaScriptCore:

String.fromCharCode(a1) has a fast path and the most frequently used. And String.fromCharCode(a1, a2, ...)
goes to the slow path. However, in the slow path, we always create 16bit string. 16bit string takes 2x memory,
and even worse, taints ropes 16bit if 16bit string is included in the given rope. We find that acorn-wtb
creates very large strings multiple times with String.fromCharCode, and String.fromCharCode always produces
16bit string. However, only few strings are actually 16bit strings. This patch attempts to make 8bit string
as much as possible.

It improves non JIT acorn-wtb's peak and current memory footprint by 6% and 3% respectively.

  • runtime/StringConstructor.cpp:

(JSC::stringFromCharCode):

8:36 PM Changeset in webkit [241232] by Chris Dumez
  • 8 edits in trunk/Source/WebKit

[WK2][macOS] Avoid creating new CVDisplayLink objects for each WebProcess
https://bugs.webkit.org/show_bug.cgi?id=194463

Reviewed by Tim Horton.

Avoid creating new CVDisplayLink objects for each WebProcess. We really only need one per
display, creating such object is expensive and it is even worse in a PSON world where we
swap process on navigation.

This patch moves the DisplayLink storing from WebProcessProxy to WebProcessPool. Also,
a DisplayLink can now be associated to several IPC connections instead of having a 1:1
mapping. When a DisplayLink no longer has any observers, we now merely stop it instead
of destroying it.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::startDisplayLink):
(WebKit::WebProcessPool::stopDisplayLink):
(WebKit::WebProcessPool::stopDisplayLinks):

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::~WebProcessProxy):
(WebKit::WebProcessProxy::processWillShutDown):
(WebKit::WebProcessProxy::shutDown):

  • UIProcess/WebProcessProxy.h:
  • UIProcess/mac/DisplayLink.cpp:

(WebKit::DisplayLink::DisplayLink):
(WebKit::DisplayLink::addObserver):
(WebKit::DisplayLink::removeObserver):
(WebKit::DisplayLink::removeObservers):
(WebKit::DisplayLink::hasObservers const):
(WebKit::DisplayLink::displayLinkCallback):

  • UIProcess/mac/DisplayLink.h:
  • UIProcess/mac/WebProcessProxyMac.mm:

(WebKit::WebProcessProxy::startDisplayLink):
(WebKit::WebProcessProxy::stopDisplayLink):

8:06 PM Changeset in webkit [241231] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

[Cocoa] CTLineGetGlyphRuns() might return nullptr
https://bugs.webkit.org/show_bug.cgi?id=194467
<rdar://problem/42423999>

Reviewed by Simon Fraser.

Be somewhat defensive to try to make sure this sort of thing doesn't happen in the future.

Covered by find/text/find-backwards.html

  • platform/graphics/mac/ComplexTextControllerCoreText.mm:

(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):

7:56 PM Changeset in webkit [241230] by keith_miller@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

We should only make rope strings when concatenating strings long enough.
https://bugs.webkit.org/show_bug.cgi?id=194465

Reviewed by Saam Barati.

This patch stops us from allocating a rope string if the resulting
rope would be smaller than the size of the JSRopeString object we
would need to allocate.

This patch also adds paths so that we don't unnecessarily allocate
JSString cells for primitives we are going to concatenate with a
string anyway.

  • dfg/DFGOperations.cpp:
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/JSString.h:
  • runtime/Operations.cpp:

(JSC::jsAddSlowCase):

  • runtime/Operations.h:

(JSC::jsString):
(JSC::jsAdd):

7:42 PM Changeset in webkit [241229] by mmaxfield@apple.com
  • 24 edits
    2 adds
    2 deletes in trunk

[Cocoa] Ask platform for generic font family mappings
https://bugs.webkit.org/show_bug.cgi?id=187723
<rdar://problem/41892438>

Reviewed by Brent Fulgham.

Source/WebCore:

WebKit API allows setting the generic font families for the USCRIPT_COMMON script.
When trying to style a character with a generic font family, we first look to see if
we have a mapping for the particular script the character is rendered with, and if we
don't find a match, we then check USCRIPT_COMMON.

In the Cocoa ports, the only way families get set for non-USCRIPT_COMMON scripts (aka
the only scripts which won't use the API families) is in
SettingsBase::initializeDefaultFontFamilies(). That function only sets the families
for the CJK scripts.

The mappings inside SettingsBase are incorrect and conflict with our policy regarding
user-installed fonts. Instead, we should be consulting with the platform for some of
these mappings, by calling CTFontDescriptorCreateForCSSFamily(). However, the WebKit
API still has to work to set the mappings for untagged content. Therefore, we use the
system mappings for language-tagged content, and the API mappings for non-language-tagged
content. This is a good balance that makes sure we always have a good mapping for every
language, but API clients can still set the mappings, too.

Test: fast/text/ja-sans-serif.html

  • css/CSSComputedStyleDeclaration.cpp:
  • css/CSSFontSelector.cpp:

(WebCore::resolveGenericFamily):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeFontFamily):

  • page/cocoa/SettingsBaseCocoa.mm:

(WebCore::SettingsBase::initializeDefaultFontFamilies):
(WebCore::osakaMonoIsInstalled): Deleted.

  • platform/graphics/FontDescription.cpp:

(WebCore::FontDescription::platformResolveGenericFamily):

  • platform/graphics/FontDescription.h:
  • platform/graphics/cocoa/FontDescriptionCocoa.cpp:

(WebCore::computeSpecializedChineseLocale):
(WebCore::cachedSpecializedChineseLocale):
(WebCore::languageChanged):
(WebCore::FontDescription::platformResolveGenericFamily):

  • platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:

(WebCore::SystemFontDatabaseCoreText::clear):
(WebCore::SystemFontDatabaseCoreText::serifFamily):
(WebCore::SystemFontDatabaseCoreText::sansSerifFamily):
(WebCore::SystemFontDatabaseCoreText::cursiveFamily):
(WebCore::SystemFontDatabaseCoreText::fantasyFamily):
(WebCore::SystemFontDatabaseCoreText::monospaceFamily):

  • platform/graphics/cocoa/SystemFontDatabaseCoreText.h:

Source/WebCore/PAL:

  • pal/spi/cocoa/CoreTextSPI.h:

Tools:

Allow testing infrastructure to use fonts that are returned from CTFontDescriptorCreateForCSSFamily().

  • DumpRenderTree/mac/DumpRenderTree.mm:

(allowedFontFamilySet):

  • WebKitTestRunner/mac/TestControllerMac.mm:

(WTR::allowedFontFamilySet):

LayoutTests:

Update the tests to work with this new model.

  • fast/text/international/font-fallback-to-common-script-expected.html: Removed.
  • fast/text/international/font-fallback-to-common-script.html: Removed. This test is no longer testing

anything relevant.

  • fast/text/international/lang-sensitive-fonts-expected.html:
  • fast/text/international/lang-sensitive-fonts-xml-expected.html:
  • fast/text/international/lang-sensitive-fonts-xml.xhtml:
  • fast/text/international/lang-sensitive-fonts.html:
  • fast/text/international/locale-sensitive-fonts-expected.html:
  • fast/text/international/locale-sensitive-fonts.html:
  • fast/text/ja-sans-serif-expected-mismatch.html: Added.
  • fast/text/ja-sans-serif.html: Added.
7:05 PM Changeset in webkit [241228] by sbarati@apple.com
  • 14 edits
    1 add in trunk

Nodes that rely on being dominated by CheckInBounds should have a child edge to it
https://bugs.webkit.org/show_bug.cgi?id=194334
<rdar://problem/47844327>

Reviewed by Mark Lam.

JSTests:

  • stress/check-in-bounds-should-be-a-child-use.js: Added.

(func):

Source/JavaScriptCore:

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGArgumentsEliminationPhase.cpp:
  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGConstantFoldingPhase.cpp:

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

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGIntegerCheckCombiningPhase.cpp:

(JSC::DFG::IntegerCheckCombiningPhase::handleBlock):

  • dfg/DFGIntegerRangeOptimizationPhase.cpp:
  • dfg/DFGNodeType.h:
  • dfg/DFGSSALoweringPhase.cpp:

(JSC::DFG::SSALoweringPhase::lowerBoundsCheck):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileHasIndexedProperty):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCheckInBounds):
(JSC::FTL::DFG::LowerDFGToB3::compileHasIndexedProperty):

6:31 PM Changeset in webkit [241227] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Audit: show keyboard shortcut in export tooltip
https://bugs.webkit.org/show_bug.cgi?id=194454

Reviewed by Matt Baker.

  • UserInterface/Views/AuditTestContentView.js:

(WI.AuditTestContentView):
(WI.AuditTestContentView.prototype.get saveData):
(WI.AuditTestContentView.prototype._exportResult): Added.
(WI.AuditTestContentView.prototype._handleExportButtonNavigationItemClicked):
(WI.AuditTestContentView.prototype._exportAudit): Deleted.

  • Localizations/en.lproj/localizedStrings.js:
5:47 PM Changeset in webkit [241226] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Styles: easier way to select a single line
https://bugs.webkit.org/show_bug.cgi?id=193305

Reviewed by Devin Rousso.

Start property selection after mousedown when mouse cursor moves 8px,
which is ~1.5 times the width of a text character in the style editor.

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:

(WI.SpreadsheetCSSStyleDeclarationSection):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleWindowMouseMove): Added.
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._stopSelection):

5:30 PM Changeset in webkit [241225] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Debugger Popover should work with value in template string ${identifier}
https://bugs.webkit.org/show_bug.cgi?id=194459
<rdar://problem/47932564>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2019-02-08
Reviewed by Devin Rousso.

  • UserInterface/Controllers/CodeMirrorTokenTrackingController.js:

(WI.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
When walking backwards to get the full expression we were walking outside
of the interpolation group outside ${inside}. Stop walking backwards once
we cross the boundary.

5:29 PM Changeset in webkit [241224] by commit-queue@webkit.org
  • 31 edits
    2 copies
    7 moves
    1 add in trunk

[GTK] Implement back/forward touchpad gesture
https://bugs.webkit.org/show_bug.cgi?id=193919

Patch by Alexander Mikhaylenko <exalm7659@gmail.com> on 2019-02-08
Reviewed by Michael Catanzaro.

Source/WebKit:

Move ViewSnapshotStore and ViewGestureController from Cocoa/Mac directory
to UIProcess/, also move some parts of mac/ViewGestreControllerMac.mm to
ViewGestureController.cpp, split up Mac- and iOS-specific parts of
ViewSnapshotStore.cpp into mac/ViewSnapshotMac.mm, then implement 2-finger
touchpad swipe back-forward gesture for GTK based on that.

To avoid name conflict, rename existing ViewGestureController class inside
UIProcess/API/gtk/WebKitWebViewBase.cpp into TouchGestureController.

Since GTK gestures can only work with 3 or 4 fingers, treat horizontal
scrolling events as a swipe as long as there's nowhere to scroll in that
direction and web page doesn't handle the scrolling.

This is only allowed for touchpads, even though it can theoretically work
with touch mice and trackpoints.

The gesture requires every item in back-forward list to have a snapshot.
There's already an existing infrastructure for that, so the patch changes
a bunch of #if PLATFORM(COCOA) statements to also check for GTK platform.
The snapshots have to be taken in sync, so the implementation draws webview
widget into a Cairo image surface.

The gesture is disabled by default, and can be enabled by setting the newly
added 'enable-back-forward-navigation-gestures' property in WebKitSettings to
true.

Gesture drawing is implemented via Cairo. When the gesture is active, the
actual page is drawn into a Cairo group, which is then drawn together with
a given snapshot, as well as dimming and a drop shadow over the "lower" layer.

Also add a memory pressure handler that clears snapshot store when low on memory.

  • DerivedSources-input.xcfilelist:
  • PlatformGTK.cmake:
  • PlatformMac.cmake:
  • Shared/SessionState.h: Add snapshot to back-forward items for GTK.
  • Shared/WebBackForwardListItem.h: Add snapshot to back-forward items for GTK.
  • SourcesCocoa.txt:
  • SourcesGTK.txt:
  • UIProcess/API/glib/WebKitSettings.cpp:

Added 'enable-back-forward-navigation-gestures' property for enabling the gesture.
(webKitSettingsSetProperty):
(webKitSettingsGetProperty):
(webkit_settings_class_init):
(webkit_settings_get_enable_back_forward_navigation_gestures): Added, GTK only.
(webkit_settings_set_enable_back_forward_navigation_gestures): Added, GTK only.

  • UIProcess/API/glib/WebKitWebView.cpp:

(enableBackForwardNavigationGesturesChanged): Added, GTK only.
(webkitWebViewUpdateSettings):
(webkitWebViewDisconnectSettingsSignalHandlers):

  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::setViewNeedsDisplay): Redraw the whole screen instead of a region during the gesture.
(WebKit::PageClientImpl::takeViewSnapshot): Added.
(WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore): Pass unhandled events to the gesture controller.
(WebKit::PageClientImpl::didRemoveNavigationGestureSnapshot): Redraw the widget immediately after removing snapshot.
(WebKit::PageClientImpl::didStartProvisionalLoadForMainFrame): Added, send a notification to the gesture controller.
(WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame): Send a notification to the gesture controller.
(WebKit::PageClientImpl::didFinishLoadForMainFrame): Send a notification to the gesture controller.
(WebKit::PageClientImpl::didFailLoadForMainFrame): Added, send a notification to the gesture controller.
(WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame): Send a notification to the gesture controller.
(WebKit::PageClientImpl::didRestoreScrollPosition): Added, send a notification to the gesture controller.

  • UIProcess/API/gtk/PageClientImpl.h:
  • UIProcess/API/gtk/WebKitSettings.h:

Add webkit_settings_get_enable_back_forward_navigation_gestures() and webkit_settings_get_enable_back_forward_navigation_gestures()
to public API.

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseDraw): Pass drawing to ViewGestureController during the gesture.
(webkitWebViewBaseScrollEvent): Pass scroll events to ViewGestureController during the gesture.
(webkitWebViewBaseGestureController): Renamed ViewGestureController to TouchGestureController.
(webkitWebViewBaseViewGestureController): Added.
(webkitWebViewBaseCreateWebPage): Create an instance of ViewGestureController.
(webkitWebViewBaseTakeViewSnapshot): Added.
(webkitWebViewBaseDidStartProvisionalLoadForMainFrame): Added.
(webkitWebViewBaseDidFirstVisuallyNonEmptyLayoutForMainFrame): Added.
(webkitWebViewBaseDidFinishLoadForMainFrame): Added.
(webkitWebViewBaseDidFailLoadForMainFrame): Added.
(webkitWebViewBaseDidSameDocumentNavigationForMainFrame): Added.
(webkitWebViewBaseDidRestoreScrollPosition): Added.

  • UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
  • UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Mentioned the added functions in docs.
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitialize): Move the check from WebMemoryPressureHandlerCocoa.mm here.

  • UIProcess/PageClient.h: Add takeViewSnapshot() for GTK.
  • UIProcess/ViewGestureController.cpp: Renamed from Source/WebKit/UIProcess/Cocoa/ViewGestureController.cpp.

(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::~ViewGestureController):
(WebKit::ViewGestureController::disconnectFromProcess):
(WebKit::ViewGestureController::connectToProcess):
(WebKit::ViewGestureController::controllerForGesture):
(WebKit::ViewGestureController::takeNextGestureID):
(WebKit::ViewGestureController::willBeginGesture):
(WebKit::ViewGestureController::didEndGesture):
(WebKit::ViewGestureController::setAlternateBackForwardListSourcePage):
(WebKit::ViewGestureController::canSwipeInDirection const):
(WebKit::ViewGestureController::didStartProvisionalOrSameDocumentLoadForMainFrame):
(WebKit::ViewGestureController::didStartProvisionalLoadForMainFrame):
(WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame):
(WebKit::ViewGestureController::didRepaintAfterNavigation):
(WebKit::ViewGestureController::didHitRenderTreeSizeThreshold):
(WebKit::ViewGestureController::didRestoreScrollPosition):
(WebKit::ViewGestureController::didReachMainFrameLoadTerminalState):
(WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
(WebKit::ViewGestureController::checkForActiveLoads):
(WebKit::ViewGestureController::SnapshotRemovalTracker::SnapshotRemovalTracker):
(WebKit::ViewGestureController::SnapshotRemovalTracker::eventsDescription):
(WebKit::ViewGestureController::SnapshotRemovalTracker::log const):
(WebKit::ViewGestureController::SnapshotRemovalTracker::resume):
(WebKit::ViewGestureController::SnapshotRemovalTracker::start):
(WebKit::ViewGestureController::SnapshotRemovalTracker::reset):
(WebKit::ViewGestureController::SnapshotRemovalTracker::stopWaitingForEvent):
(WebKit::ViewGestureController::SnapshotRemovalTracker::eventOccurred):
(WebKit::ViewGestureController::SnapshotRemovalTracker::cancelOutstandingEvent):
(WebKit::ViewGestureController::SnapshotRemovalTracker::hasOutstandingEvent):
(WebKit::ViewGestureController::SnapshotRemovalTracker::fireRemovalCallbackIfPossible):
(WebKit::ViewGestureController::SnapshotRemovalTracker::fireRemovalCallbackImmediately):
(WebKit::ViewGestureController::SnapshotRemovalTracker::watchdogTimerFired):
(WebKit::ViewGestureController::SnapshotRemovalTracker::startWatchdog):
(WebKit::deltaShouldCancelSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::PendingSwipeTracker):
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::handleEvent):
(WebKit::ViewGestureController::PendingSwipeTracker::eventWasNotHandledByWebCore):
(WebKit::ViewGestureController::PendingSwipeTracker::tryToStartSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::reset):
(WebKit::ViewGestureController::startSwipeGesture):
(WebKit::ViewGestureController::isPhysicallySwipingLeft const):
(WebKit::ViewGestureController::shouldUseSnapshotForSize):
(WebKit::ViewGestureController::forceRepaintIfNeeded):
(WebKit::ViewGestureController::willEndSwipeGesture):
(WebKit::ViewGestureController::endSwipeGesture):
(WebKit::ViewGestureController::requestRenderTreeSizeNotificationIfNeeded):

  • UIProcess/ViewGestureController.h: Renamed from Source/WebKit/UIProcess/Cocoa/ViewGestureController.h.

(WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
(WebKit::ViewGestureController::shouldIgnorePinnedState):
(WebKit::ViewGestureController::setShouldIgnorePinnedState):
(WebKit::ViewGestureController::hasActiveMagnificationGesture const):
(WebKit::ViewGestureController::setCustomSwipeViews):
(WebKit::ViewGestureController::setCustomSwipeViewsTopContentInset):
(WebKit::ViewGestureController::setDidMoveSwipeSnapshotCallback):
(WebKit::ViewGestureController::backgroundColorForCurrentSnapshot const):
(WebKit::ViewGestureController::didFinishLoadForMainFrame):
(WebKit::ViewGestureController::didFailLoadForMainFrame):
(WebKit::ViewGestureController::setSwipeGestureEnabled):
(WebKit::ViewGestureController::isSwipeGestureEnabled):
(WebKit::ViewGestureController::SnapshotRemovalTracker::pause):
(WebKit::ViewGestureController::SnapshotRemovalTracker::isPaused const):
(WebKit::ViewGestureController::SnapshotRemovalTracker::hasRemovalCallback const):
(WebKit::ViewGestureController::SnapshotRemovalTracker::renderTreeSizeThreshold const):
(WebKit::ViewGestureController::SnapshotRemovalTracker::setRenderTreeSizeThreshold):
(WebKit::ViewGestureController::PendingSwipeTracker::shouldIgnorePinnedState):
(WebKit::ViewGestureController::PendingSwipeTracker::setShouldIgnorePinnedState):
(WebKit::ViewGestureController::SwipeProgressTracker::progress const):
(WebKit::ViewGestureController::SwipeProgressTracker::direction const):

  • UIProcess/ViewGestureController.messages.in: Renamed from Source/WebKit/UIProcess/Cocoa/ViewGestureController.messages.in.
  • UIProcess/ViewSnapshotStore.cpp: Copied from Source/WebKit/UIProcess/mac/ViewSnapshotStore.mm.

(WebKit::ViewSnapshotStore::ViewSnapshotStore):
(WebKit::ViewSnapshotStore::~ViewSnapshotStore):
(WebKit::ViewSnapshotStore::singleton):
(WebKit::ViewSnapshotStore::didAddImageToSnapshot):
(WebKit::ViewSnapshotStore::willRemoveImageFromSnapshot):
(WebKit::ViewSnapshotStore::pruneSnapshots):
(WebKit::ViewSnapshotStore::recordSnapshot):
(WebKit::ViewSnapshotStore::discardSnapshotImages):
(WebKit::ViewSnapshot::~ViewSnapshot):

  • UIProcess/ViewSnapshotStore.h: Renamed from Source/WebKit/UIProcess/mac/ViewSnapshotStore.h.

(WebKit::ViewSnapshot::setRenderTreeSize):
(WebKit::ViewSnapshot::renderTreeSize const):
(WebKit::ViewSnapshot::setBackgroundColor):
(WebKit::ViewSnapshot::backgroundColor const):
(WebKit::ViewSnapshot::setViewScrollPosition):
(WebKit::ViewSnapshot::viewScrollPosition const):
(WebKit::ViewSnapshot::setDeviceScaleFactor):
(WebKit::ViewSnapshot::deviceScaleFactor const):
(WebKit::ViewSnapshot::surface const):
(WebKit::ViewSnapshot::imageSizeInBytes const):
(WebKit::ViewSnapshot::size const):
(WebKit::ViewSnapshotStore::setDisableSnapshotVolatilityForTesting):
(WebKit::ViewSnapshotStore::disableSnapshotVolatilityForTesting const):

  • UIProcess/WebBackForwardList.cpp:

(WebKit::WebBackForwardList::didRemoveItem): Unset snapshot for GTK.

  • UIProcess/WebMemoryPressureHandler.cpp: Copied from Source/WebKit/UIProcess/Cocoa/WebMemoryPressureHandlerCocoa.mm.

(WebKit::installMemoryPressureHandler):

  • UIProcess/WebMemoryPressureHandler.h: Renamed from Source/WebKit/UIProcess/Cocoa/WebMemoryPressureHandlerCocoa.h.
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::recordNavigationSnapshot): Take snapshots for GTK.

  • UIProcess/WebPageProxy.h:
  • UIProcess/gtk/ViewGestureControllerGtk.cpp: Added. This is a port of

UIProcess/mac/ViewGestureControllerMac.mm. SwipeProgressTracker class is a
re-implementation of trackSwipeEventWithOptions.
(WebKit::isEventStop):
(WebKit::ViewGestureController::platformTeardown):
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanStartSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanEndSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanInfluenceSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventGetScrollingDeltas):
(WebKit::ViewGestureController::handleScrollWheelEvent):
(WebKit::ViewGestureController::trackSwipeGesture):
(WebKit::ViewGestureController::SwipeProgressTracker::SwipeProgressTracker):
(WebKit::ViewGestureController::SwipeProgressTracker::startTracking):
(WebKit::ViewGestureController::SwipeProgressTracker::reset):
(WebKit::ViewGestureController::SwipeProgressTracker::handleEvent):
(WebKit::ViewGestureController::SwipeProgressTracker::startAnimation):
(WebKit::easeOutCubic):
(WebKit::ViewGestureController::SwipeProgressTracker::onAnimationTick):
(WebKit::ViewGestureController::SwipeProgressTracker::endAnimation):
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::handleSwipeGesture):
(WebKit::ViewGestureController::draw):
(WebKit::ViewGestureController::removeSwipeSnapshot):
(WebKit::ViewGestureController::beginSimulatedSwipeInDirectionForTesting):
(WebKit::ViewGestureController::completeSimulatedSwipeInDirectionForTesting):

  • UIProcess/gtk/ViewSnapshotStoreGtk.cpp: Renamed from Source/WebKit/UIProcess/Cocoa/WebMemoryPressureHandlerCocoa.mm.

(WebKit::ViewSnapshot::create):
(WebKit::ViewSnapshot::ViewSnapshot):
(WebKit::ViewSnapshot::hasImage const):
(WebKit::ViewSnapshot::clearImage):
(WebKit::ViewSnapshot::imageSizeInBytes const):
(WebKit::ViewSnapshot::size const):

  • UIProcess/gtk/WebProcessPoolGtk.cpp:

(WebKit::memoryPressureMonitorDisabled): Added.
(WebKit::WebProcessPool::platformInitialize): Install memory pressure handler.
(WebKit::WebProcessPool::platformInitializeWebProcess): Use memoryPressureMonitorDisabled().

  • UIProcess/mac/ViewGestureControllerMac.mm:

Moved many functions into UIProcess/ViewGestureController.cpp
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanStartSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanEndSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanInfluenceSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventGetScrollingDeltas):
(WebKit::ViewGestureController::trackSwipeGesture):
(WebKit::scrollEventCanInfluenceSwipe): Deleted.
(WebKit::deltaShouldCancelSwipe): Deleted.
(WebKit::ViewGestureController::PendingSwipeTracker::PendingSwipeTracker): Deleted.
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe): Deleted.
(WebKit::ViewGestureController::PendingSwipeTracker::handleEvent): Deleted.
(WebKit::ViewGestureController::PendingSwipeTracker::eventWasNotHandledByWebCore): Deleted.
(WebKit::ViewGestureController::PendingSwipeTracker::tryToStartSwipe): Deleted.
(WebKit::ViewGestureController::PendingSwipeTracker::reset): Deleted.
(WebKit::ViewGestureController::willEndSwipeGesture): Deleted.
(WebKit::ViewGestureController::shouldUseSnapshotForSize): Deleted.
(WebKit::ViewGestureController::isPhysicallySwipingLeft const): Deleted.
(WebKit::ViewGestureController::endSwipeGesture): Deleted.
(WebKit::ViewGestureController::forceRepaintIfNeeded): Deleted.
(WebKit::ViewGestureController::requestRenderTreeSizeNotificationIfNeeded): Deleted.

  • UIProcess/mac/ViewSnapshotStoreMac.mm: Renamed from Source/WebKit/UIProcess/mac/ViewSnapshotStore.mm.

(WebKit::ViewSnapshotStore::snapshottingContext):
(WebKit::ViewSnapshot::create):
(WebKit::ViewSnapshot::ViewSnapshot):
(WebKit::ViewSnapshot::setSurface):
(WebKit::ViewSnapshot::hasImage const):
(WebKit::ViewSnapshot::clearImage):
(WebKit::ViewSnapshot::setVolatile):
(WebKit::ViewSnapshot::asLayerContents):
(WebKit::ViewSnapshot::asImageForTesting):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/ViewGestureGeometryCollector.cpp:

Make SetRenderTreeSizeNotificationThreshold() cross-platform.
(WebKit::ViewGestureGeometryCollector::ViewGestureGeometryCollector):
(WebKit::ViewGestureGeometryCollector::computeMinimumAndMaximumViewportScales const):
(WebKit::ViewGestureGeometryCollector::mainFrameDidLayout):

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

Start using ViewGestureGeometryCollector for GTK.
(WebKit::WebPage::mainFrameDidLayout):

  • WebProcess/WebPage/WebPage.h:

Tools:

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:

(testWebKitSettings): Add a test for 'enable-back-forward-navigation-gestures' property.

5:17 PM Changeset in webkit [241223] by achristensen@apple.com
  • 17 edits in trunk

Add SPI to use networking daemon instead of XPC service
https://bugs.webkit.org/show_bug.cgi?id=194427

Source/WebKit:

Reviewed by Geoffrey Garen.

There is still work to be done, but with the proper plist it starts and loads webpages!

  • NetworkProcess/EntryPoint/Cocoa/Daemon/DaemonEntryPoint.mm:

(WebKit::DaemonMain):

  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h:
  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:

(WebKit::XPCEventHandler):
(WebKit::XPCInitializationHandler):
(WebKit::XPCServiceMain):
(WebKit::XPCServiceEventHandler): Deleted.

  • UIProcess/API/APIProcessPoolConfiguration.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:

(-[_WKProcessPoolConfiguration usesNetworkingDaemon]):
(-[_WKProcessPoolConfiguration setUsesNetworkingDaemon:]):

  • UIProcess/AuxiliaryProcessProxy.cpp:

(WebKit::AuxiliaryProcessProxy::getLaunchOptions):

  • UIProcess/Launcher/ProcessLauncher.h:
  • UIProcess/Launcher/mac/ProcessLauncherMac.mm:

(WebKit::serviceName):
(WebKit::ProcessLauncher::launchProcess):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::getLaunchOptions):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::usesNetworkingDaemon const):

  • UIProcess/WebProcessPool.h:

Source/WTF:

Reviewed by Geoffrey Garen.

  • wtf/spi/darwin/XPCSPI.h:

Instead of using XPC bootstrap SPI, we just send a separate message.
xpc_copy_bootstrap does not seem to work in daemons.

Tools:

Reviewed by Geoffrey Garen

  • MiniBrowser/MiniBrowser.entitlements:
4:29 PM Changeset in webkit [241222] by ysuzuki@apple.com
  • 39 edits in trunk/Source

[JSC] Shrink sizeof(CodeBlock) more
https://bugs.webkit.org/show_bug.cgi?id=194419

Reviewed by Mark Lam.

Source/JavaScriptCore:

This patch further shrinks the size of CodeBlock, from 352 to 296 (304).

  1. CodeBlock copies so many data from ScriptExecutable even if ScriptExecutable

has the same information. These data is not touched in CodeBlock::~CodeBlock,
so we can just use the data in ScriptExecutable instead of holding it in CodeBlock.

  1. We remove m_instructions pointer since the ownership is managed by UnlinkedCodeBlock.

And we do not touch it in CodeBlock::~CodeBlock.

  1. We move m_calleeSaveRegisters from CodeBlock to CodeBlock::JITData. For baseline and LLInt

cases, this patch offers RegisterAtOffsetList::llintBaselineCalleeSaveRegisters() which returns
singleton to const RegisterAtOffsetList* usable for LLInt and Baseline JIT CodeBlocks.

  1. Move m_catchProfiles to RareData and materialize only when op_catch's slow path is called.
  1. Drop ownerScriptExecutable. ownerExecutable() returns ScriptExecutable*.
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::hash const):
(JSC::CodeBlock::sourceCodeForTools const):
(JSC::CodeBlock::dumpAssumingJITType const):
(JSC::CodeBlock::dumpSource):
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::finalizeLLIntInlineCaches):
(JSC::CodeBlock::setCalleeSaveRegisters):
(JSC::CodeBlock::ensureCatchLivenessIsComputedForBytecodeOffset):
(JSC::CodeBlock::ensureCatchLivenessIsComputedForBytecodeOffsetSlow):
(JSC::CodeBlock::lineNumberForBytecodeOffset):
(JSC::CodeBlock::expressionRangeForBytecodeOffset const):
(JSC::CodeBlock::hasOpDebugForLineAndColumn):
(JSC::CodeBlock::newReplacement):
(JSC::CodeBlock::replacement):
(JSC::CodeBlock::computeCapabilityLevel):
(JSC::CodeBlock::jettison):
(JSC::CodeBlock::calleeSaveRegisters const):
(JSC::CodeBlock::calleeSaveSpaceAsVirtualRegisters):
(JSC::CodeBlock::updateOSRExitCounterAndCheckIfNeedToReoptimize):
(JSC::CodeBlock::getArrayProfile):
(JSC::CodeBlock::updateAllPredictionsAndCountLiveness):
(JSC::CodeBlock::notifyLexicalBindingUpdate):
(JSC::CodeBlock::tryGetValueProfileForBytecodeOffset):
(JSC::CodeBlock::validate):
(JSC::CodeBlock::outOfLineJumpTarget):
(JSC::CodeBlock::arithProfileForBytecodeOffset):
(JSC::CodeBlock::insertBasicBlockBoundariesForControlFlowProfiler):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::specializationKind const):
(JSC::CodeBlock::isStrictMode const):
(JSC::CodeBlock::isConstructor const):
(JSC::CodeBlock::codeType const):
(JSC::CodeBlock::isKnownNotImmediate):
(JSC::CodeBlock::instructions const):
(JSC::CodeBlock::ownerExecutable const):
(JSC::CodeBlock::thisRegister const):
(JSC::CodeBlock::source const):
(JSC::CodeBlock::sourceOffset const):
(JSC::CodeBlock::firstLineColumnOffset const):
(JSC::CodeBlock::createRareDataIfNecessary):
(JSC::CodeBlock::ownerScriptExecutable const): Deleted.
(JSC::CodeBlock::setThisRegister): Deleted.
(JSC::CodeBlock::calleeSaveRegisters const): Deleted.

  • bytecode/EvalCodeBlock.h:
  • bytecode/FunctionCodeBlock.h:
  • bytecode/GlobalCodeBlock.h:

(JSC::GlobalCodeBlock::GlobalCodeBlock):

  • bytecode/ModuleProgramCodeBlock.h:
  • bytecode/ProgramCodeBlock.h:
  • debugger/Debugger.cpp:

(JSC::Debugger::toggleBreakpoint):

  • debugger/DebuggerCallFrame.cpp:

(JSC::DebuggerCallFrame::sourceID const):
(JSC::DebuggerCallFrame::sourceIDForCallFrame):

  • debugger/DebuggerScope.cpp:

(JSC::DebuggerScope::location const):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::InlineStackEntry::executable):
(JSC::DFG::ByteCodeParser::inliningCost):
(JSC::DFG::ByteCodeParser::parseCodeBlock):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::isSupportedForInlining):
(JSC::DFG::mightCompileEval):
(JSC::DFG::mightCompileProgram):
(JSC::DFG::mightCompileFunctionForCall):
(JSC::DFG::mightCompileFunctionForConstruct):
(JSC::DFG::canUseOSRExitFuzzing):

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::executableFor):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::compileFunction):

  • dfg/DFGOSREntry.cpp:

(JSC::DFG::prepareOSREntry):

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::restoreCalleeSavesFor):
(JSC::DFG::saveCalleeSavesFor):
(JSC::DFG::saveOrCopyCalleeSavesFor):

  • dfg/DFGOSRExitCompilerCommon.cpp:

(JSC::DFG::handleExitCounts):

  • dfg/DFGOperations.cpp:
  • dfg/DFGToFTLDeferredCompilationCallback.cpp:

(JSC::DFG::ToFTLDeferredCompilationCallback::compilationDidComplete):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLink.cpp:

(JSC::FTL::link):

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileStub):

  • interpreter/CallFrame.cpp:

(JSC::CallFrame::callerSourceOrigin):

  • interpreter/Interpreter.cpp:

(JSC::eval):
(JSC::UnwindFunctor::copyCalleeSavesToEntryFrameCalleeSavesBuffer const):

  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::Frame::calleeSaveRegisters):
(JSC::StackVisitor::Frame::sourceURL const):
(JSC::StackVisitor::Frame::sourceID):
(JSC::StackVisitor::Frame::computeLineAndColumn const):

  • interpreter/StackVisitor.h:
  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::emitSaveCalleeSavesFor):
(JSC::AssemblyHelpers::emitSaveOrCopyCalleeSavesFor):
(JSC::AssemblyHelpers::emitRestoreCalleeSavesFor):

  • jit/CallFrameShuffleData.cpp:

(JSC::CallFrameShuffleData::setupCalleeSaveRegisters):

  • jit/JIT.cpp:

(JSC::JIT::compileWithoutLinking):

  • jit/JITToDFGDeferredCompilationCallback.cpp:

(JSC::JITToDFGDeferredCompilationCallback::compilationDidComplete):

  • jit/JITWorklist.cpp:

(JSC::JITWorklist::Plan::finalize):
(JSC::JITWorklist::compileNow):

  • jit/RegisterAtOffsetList.cpp:

(JSC::RegisterAtOffsetList::llintBaselineCalleeSaveRegisters):

  • jit/RegisterAtOffsetList.h:

(JSC::RegisterAtOffsetList::at const):

  • runtime/ErrorInstance.cpp:

(JSC::appendSourceToError):

  • runtime/ScriptExecutable.cpp:

(JSC::ScriptExecutable::newCodeBlockFor):

  • runtime/StackFrame.cpp:

(JSC::StackFrame::sourceID const):
(JSC::StackFrame::sourceURL const):
(JSC::StackFrame::computeLineAndColumn const):

Source/WebCore:

  • testing/Internals.cpp:

(WebCore::Internals::parserMetaData):

4:28 PM Changeset in webkit [241221] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews-build] Ensure that every builder in config.json has short name
https://bugs.webkit.org/show_bug.cgi?id=194461

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/loadConfig.py:
  • BuildSlaveSupport/ews-build/loadConfig_unittest.py: Updated unit-tests.
4:26 PM Changeset in webkit [241220] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

[Cocoa] Optimize ResourceResponse::platformLazyInit()
https://bugs.webkit.org/show_bug.cgi?id=194438

Reviewed by Alex Christensen.

Optimize ResourceResponse::platformLazyInit(). Most of the CPU time currently goes into getting the
HTTP headers from CFNetwork:
"""
Sample Count, Samples %, CPU %, Symbol
46, 0.0%, 0.0%, WebCore::initializeHTTPHeaders(WebCore::OnlyCommonHeaders, NSHTTPURLResponse*, WebCore::HTTPHeaderMap&) (in WebCore)
34, 0.0%, 0.0%, HTTPHeaderDict::copyAsOrdinaryDict(CFAllocator const*) const (in CFNetwork)
11, 0.0%, 0.0%, CFDictionaryApplyFunction (in CoreFoundation)
"""

We currently have 2 levels of initialization: CommonFieldsOnly & AllFields. With WebKit2, most ResourceResponses get sent over IPC
and thus end up getting initialized twice, once with CommonFieldsOnly and then with AllFields.
This would cause us to call the expensive HTTPHeaderDict::copyAsOrdinaryDict() twice instead of once, simply to initialize the common
HTTP headers first and then the uncommon ones later.

This patch updates ResourceResponse::platformLazyInit() to initialize all HTTP headers at once, as soon as CommonFieldsOnly
initialization is requested, so that we no longer copy all HTTP headers twice.

  • platform/network/cocoa/ResourceResponseCocoa.mm:

(WebCore::initializeHTTPHeaders):
(WebCore::ResourceResponse::platformLazyInit):

4:25 PM Changeset in webkit [241219] by commit-queue@webkit.org
  • 16 edits
    2 adds in trunk

Web Inspector: Import / Export Heap Snapshots
https://bugs.webkit.org/show_bug.cgi?id=194448
<rdar://problem/47928093>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2019-02-08
Reviewed by Devin Rousso.

Source/WebInspectorUI:

  • Localizations/en.lproj/localizedStrings.js:

New strings.

  • UserInterface/Proxies/HeapSnapshotProxy.js:

(WI.HeapSnapshotProxy):
(WI.HeapSnapshotProxy.deserialize):
(WI.HeapSnapshotProxy.prototype.get imported):
(WI.HeapSnapshotProxy.prototype.get snapshotStringData):
(WI.HeapSnapshotProxy.prototype.set snapshotStringData):
Include an "imported" state on the HeapSnapshot and allow for
stashing the snapshotStringData on the main thread side.

  • UserInterface/Proxies/HeapSnapshotWorkerProxy.js:

(WI.HeapSnapshotWorkerProxy.prototype.createImportedSnapshot):

  • UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:

(HeapSnapshotWorker.prototype.clearSnapshots):
(HeapSnapshotWorker.prototype.createSnapshot):
Provide a specialized way to create an imported HeapSnapshot.
Track imported snapshots separately since they won't want to
be searched for live/dead objects due to active recording GCs.

  • UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:

(HeapSnapshot):
(HeapSnapshot.updateCategoriesAndMetadata):
(HeapSnapshot.allocationBucketCounts):
(HeapSnapshot.instancesWithClassName):
(HeapSnapshot.prototype.nodeWithIdentifier):
(HeapSnapshot.prototype.dominatedNodes):
(HeapSnapshot.prototype.retainedNodes):
(HeapSnapshot.prototype.retainers):
(HeapSnapshot.prototype.updateDeadNodesAndGatherCollectionData):
(HeapSnapshot.prototype.serialize):
(HeapSnapshot.prototype.serializeNode):
(HeapSnapshot.prototype._buildPostOrderIndexes):
(HeapSnapshot.prototype._buildDominatorIndexes):
(HeapSnapshot.prototype._buildRetainedSizes):
(HeapSnapshot.prototype._gcRootPathes.visitNode):
(HeapSnapshot.prototype._gcRootPathes):
Construct a HeapSnapshot knowinng whether or not it is imported.
Imported snapshots may be the "GCDebugging" snapshot type which
differs from "Inspector" by the number of node fields. So keep
the node field count a member instead of a global constant
in order to work with both snapshot types.

  • UserInterface/Models/HeapAllocationsInstrument.js:

(WI.HeapAllocationsInstrument.prototype._takeHeapSnapshot):

  • UserInterface/Protocol/ConsoleObserver.js:

(WI.ConsoleObserver.prototype.heapSnapshot):

  • UserInterface/Protocol/HeapObserver.js:

(WI.HeapObserver.prototype.trackingStart):
(WI.HeapObserver.prototype.trackingComplete):
Stash the original string JSON data on the main thread side
where we already have the data.

  • UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:

(WI.HeapAllocationsTimelineOverviewGraph.prototype.layout):
Don't show [S] icons for imported snapshots with no timestamp.

  • UserInterface/Views/HeapAllocationsTimelineView.js:

(WI.HeapAllocationsTimelineView):
(WI.HeapAllocationsTimelineView.prototype.get navigationItems):
(WI.HeapAllocationsTimelineView.prototype._importButtonNavigationItemClicked):
(WI.HeapAllocationsTimelineView.prototype._takeHeapSnapshotClicked):
Import button that just creates a new snapshot.

  • UserInterface/Views/HeapSnapshotContentView.js:

(WI.HeapSnapshotContentView):
(WI.HeapSnapshotContentView.prototype.get navigationItems):
(WI.HeapSnapshotContentView.prototype.get supportsSave):
(WI.HeapSnapshotContentView.prototype.get saveData):
(WI.HeapSnapshotContentView.prototype._exportSnapshot):
Export button that saves the original data.

  • UserInterface/Views/TimelineTabContentView.js:

(WI.TimelineTabContentView.displayNameForRecord):
Specialized display string for imported snapshots.

LayoutTests:

  • inspector/heap/imported-snapshot-expected.txt: Added.
  • inspector/heap/imported-snapshot.html: Added.
  • platform/mac/TestExpectations:
4:24 PM Changeset in webkit [241218] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews-build] Add short name to config.json
https://bugs.webkit.org/show_bug.cgi?id=194456

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/config.json: Added short name.
  • BuildSlaveSupport/ews-build/loadConfig.py:

(loadBuilderConfig): Set the short name as the builder description.

4:21 PM Changeset in webkit [241217] by rmorisset@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

B3LowerMacros wrongly sets m_changed to true in the case of AtomicWeakCAS on x86
https://bugs.webkit.org/show_bug.cgi?id=194460

Reviewed by Mark Lam.

Trivial fix, should already be covered by testAtomicWeakCAS in testb3.cpp.

  • b3/B3LowerMacros.cpp:
3:51 PM Changeset in webkit [241216] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Add Debug setting to show Internal Object Classes in Heap Snapshot
https://bugs.webkit.org/show_bug.cgi?id=194445

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2019-02-08
Reviewed by Devin Rousso.

  • UserInterface/Base/Setting.js:
  • UserInterface/Views/HeapSnapshotDataGridTree.js:

(WI.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):

  • UserInterface/Views/SettingsTabContentView.js:

(WI.SettingsTabContentView.prototype._createDebugSettingsView):

3:50 PM Changeset in webkit [241215] by Alan Coon
  • 1 copy in tags/Safari-607.1.34

Tag Safari-607.1.34.

3:13 PM WebKitGTK/2.22.x edited by Adrian Perez de Castro
(diff)
3:06 PM Changeset in webkit [241214] by mark.lam@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Use maxSingleCharacterString in comparisons instead of literal constants.
https://bugs.webkit.org/show_bug.cgi?id=194452

Reviewed by Yusuke Suzuki.

This way, if we ever change maxSingleCharacterString, it won't break all this code
that relies on it being 0xff implicitly.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileStringSlice):
(JSC::DFG::SpeculativeJIT::compileGetByValOnString):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileStringCharAt):
(JSC::FTL::DFG::LowerDFGToB3::compileStringSlice):

  • jit/ThunkGenerators.cpp:

(JSC::stringGetByValGenerator):
(JSC::charToString):

2:54 PM Changeset in webkit [241213] by Adrian Perez de Castro
  • 1 copy in releases/WebKitGTK/webkit-2.22.6

Release: WebKitGTK+ 2.22.6

2:53 PM Changeset in webkit [241212] by Adrian Perez de Castro
  • 1 copy in releases/WPE WebKit/webkit-2.22.4

Release: WPE WebKit 2.22.4

2:52 PM Changeset in webkit [241211] by Adrian Perez de Castro
  • 6 edits in releases/WebKitGTK/webkit-2.22

Unreviewed. Release WebKitGTK+ 2.22.6 and WPE WebKit 2.22.4

.:

  • Source/cmake/OptionsGTK.cmake: Bump version to 2.22.6
  • Source/cmake/OptionsWPE.cmake: Bump version to 2.22.4

Source/WebKit:

  • gtk/NEWS: Add release notes for 2.22.6
  • wpe/NEWS: Add release notes for 2.22.4
2:32 PM Changeset in webkit [241210] by mark.lam@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Fix DFG's doesGC() for CheckTierUp*, GetByVal, PutByVal*, and StringCharAt nodes.
https://bugs.webkit.org/show_bug.cgi?id=194446
<rdar://problem/47926792>

Reviewed by Saam Barati.

Fix doesGC() for the following nodes:

CheckTierUpAtReturn:

Calls triggerTierUpNow(), which calls triggerFTLReplacementCompile(),
which calls Worklist::completeAllReadyPlansForVM(), which uses DeferGC.

CheckTierUpInLoop:

Calls triggerTierUpNowInLoop(), which calls tierUpCommon(), which calls
Worklist::completeAllReadyPlansForVM(), which uses DeferGC.

CheckTierUpAndOSREnter:

Calls triggerOSREntryNow(), which calls tierUpCommon(), which calls
Worklist::completeAllReadyPlansForVM(), which uses DeferGC.

GetByVal:

case Array::String calls operationSingleCharacterString(), which calls
jsSingleCharacterString(), which can allocate a string.

PutByValDirect:
PutByVal:
PutByValAlias:

For the DFG only, the integer TypeArrays calls compilePutByValForIntTypedArray(),
which may call slow paths operationPutByValDirectStrict(), operationPutByValDirectNonStrict(),
operationPutByValStrict(), or operationPutByValNonStrict(). All of these
slow paths call putByValInternal(), which may create exception objects, or
call the generic JSValue::put() which may execute arbitrary code.

StringCharAt:

Can call operationSingleCharacterString(), which calls jsSingleCharacterString(),
which can allocate a string.

Also fix DFG::SpeculativeJIT::compileGetByValOnString() and FTL's compileStringCharAt()
to use the maxSingleCharacterString constant instead of a literal constant.

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileGetByValOnString):

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
(JSC::FTL::DFG::LowerDFGToB3::compilePutByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileStringCharAt):

2:17 PM Changeset in webkit [241209] by Nikita Vasilyev
  • 4 edits
    2 adds in trunk

Web Inspector: Styles: close unbalanced quotes and parenthesis when editing values
https://bugs.webkit.org/show_bug.cgi?id=182523
<rdar://problem/37260209>

Reviewed by Devin Rousso.

Source/WebInspectorUI:

Close CSS comments, append missing closed quotes and right parenthesis.

  • UserInterface/Models/CSSCompletions.js:

(WI.CSSCompletions.completeUnbalancedValue):

  • UserInterface/Models/CSSProperty.js:

(WI.CSSProperty.prototype.set rawValue):

LayoutTests:

Test common cases of unmatched quotes, parenthesis, comments, and trailing backslashes.

  • inspector/unit-tests/css-completions-expected.txt: Added.
  • inspector/unit-tests/css-completions.html: Added.
2:11 PM Changeset in webkit [241208] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

Layout Test accessibility/set-value-not-work-for-disabled-sliders.html is failing
https://bugs.webkit.org/show_bug.cgi?id=194451

Unreviewed test gardening.

  • platform/win/TestExpectations:
1:39 PM Changeset in webkit [241207] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

[Web GPU] Build fix for MTLStorageMode availability on different Cocoa platforms
https://bugs.webkit.org/show_bug.cgi?id=194443

Unreviewed build fix.

For MTLTextures, MTLStorageModeManaged is only available on macOS. Other platforms,
if not using MTLStorageModePrivate, must use MTLStorageModeShared.

Behavior unchanged.

Patch by Justin Fan <Justin Fan> on 2019-02-08

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

(WebCore::storageModeForPixelFormatAndSampleCount):

1:21 PM Changeset in webkit [241206] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Layout Test media/audio-concurrent-supported.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=188017

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations: The test is not flaky anymore. Remove expectation.
1:19 PM Changeset in webkit [241205] by Truitt Savell
  • 15 edits in trunk/Source

Unreviewed, rolling out r241197.

Broke iOS Simulator Debug build and casued 1 API failure on
High Sierra

Reverted changeset:

"Add SPI to use networking daemon instead of XPC service"
https://bugs.webkit.org/show_bug.cgi?id=194427
https://trac.webkit.org/changeset/241197

12:36 PM Changeset in webkit [241204] by Beth Dakin
  • 2 edits in trunk/Source/WebKit

Abstract and discussion comments needed for afterScreenUpdates
https://bugs.webkit.org/show_bug.cgi?id=194442

Reviewed by Wenson Hsieh.

Forgot to add these comments with https://bugs.webkit.org/show_bug.cgi?id=194362

  • UIProcess/API/Cocoa/WKSnapshotConfiguration.h:
11:48 AM Changeset in webkit [241203] by pvollan@apple.com
  • 5 edits in trunk

[WebVTT] Inline WebVTT styles should start with '::cue'
https://bugs.webkit.org/show_bug.cgi?id=194227
<rdar://problem/47791087>

Reviewed by Eric Carlson.

Source/WebCore:

Check that the CSS string starts with '::cue' and is successfully parsed before adding it
to the CSS stylesheet list. Also, the caption preferences CSS string should start with
'::cue', since it is added inside the video shadow root element.

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

  • html/track/WebVTTParser.cpp:

(WebCore::WebVTTParser::checkAndStoreStyleSheet):

  • page/CaptionUserPreferencesMediaAF.cpp:

(WebCore::CaptionUserPreferencesMediaAF::captionsStyleSheetOverride const):

LayoutTests:

  • media/track/captions-webvtt/css-styling.vtt:
11:46 AM Changeset in webkit [241202] by Jonathan Bedard
  • 4 edits in trunk/Tools

webkitpy: CrashLogs.find_all_logs may return a string or a dictionary
https://bugs.webkit.org/show_bug.cgi?id=194418

Reviewed by Lucas Forschler.

Do not include errors trying when finding crashlogs at the end of
a run-webkit-tests run since we don't process those errors.

  • Scripts/webkitpy/port/darwin.py:

(DarwinPort._look_for_all_crash_logs_in_log_dir):

  • Scripts/webkitpy/port/ios_device.py:

(IOSDevicePort._look_for_all_crash_logs_in_log_dir):

  • Scripts/webkitpy/port/watch_device.py:

(WatchDevicePort._look_for_all_crash_logs_in_log_dir):

11:18 AM Changeset in webkit [241201] by ysuzuki@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] SourceProviderCacheItem should be small
https://bugs.webkit.org/show_bug.cgi?id=194432

Reviewed by Saam Barati.

Some JetStream2 tests stress the JS parser. At that time, so many SourceProviderCacheItems are created.
While they are removed when full-GC happens, it significantly increases the peak memory usage.
This patch reduces the size of SourceProviderCacheItem from 56 to 32.

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseFunctionInfo):

  • parser/ParserModes.h:
  • parser/ParserTokens.h:
  • parser/SourceProviderCacheItem.h:

(JSC::SourceProviderCacheItem::endFunctionToken const):
(JSC::SourceProviderCacheItem::SourceProviderCacheItem):

10:49 AM Changeset in webkit [241200] by youenn@apple.com
  • 10 edits in trunk

Running RTCRtpSender.getCapabilities("video") before initial offer breaks VP8
https://bugs.webkit.org/show_bug.cgi?id=194380
<rdar://problem/47916514>

Reviewed by Eric Carlson.

Source/WebCore:

Set whether VP8 is supported at creation of the page.
This ensures that any call creating a peer connection factory will end up supporting the runtime flag configuration.

Add internal API to enable resetting the factory to enable proper testing.

Covered by updated test.

  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::createLibWebRTCPeerConnectionBackend):

  • page/Page.cpp:

(WebCore::m_applicationManifest):

  • platform/mediastream/libwebrtc/LibWebRTCProvider.h:
  • testing/Internals.cpp:

(WebCore::Internals::clearPeerConnectionFactory):

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

LayoutTests:

  • webrtc/video-mute-vp8-expected.txt:
  • webrtc/video-mute-vp8.html:
10:20 AM Changeset in webkit [241199] by Beth Dakin
  • 6 edits in trunk

Add afterScreenUpdates to WKSnapshotConfiguration
https://bugs.webkit.org/show_bug.cgi?id=194362
-and corresponding-
<rdar://problem/40655528> Please add an "after screen updates" property to
WKSnapshotConfiguration (to solve blank snapshots)

Reviewed by Tim Horton.

Source/WebKit:

This is the WebKit equivalent of - (UIView *)snapshotViewAfterScreenUpdates:(BOOL)afterUpdates;
This makes our snapshotting API more predictable and reliable on iOS devices,
which is why the new configuration property defaults to YES.

New property that defaults to YES.

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

(-[WKSnapshotConfiguration init]):
(-[WKSnapshotConfiguration copyWithZone:]):

When afterScreenUpdates is set, invoke the snapshot via
callAfterNextPresentationUpdate.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView takeSnapshotWithConfiguration:completionHandler:]):
(-[WKWebView _callCompletionHandler:withSnapshotImage:atDeviceScale:]):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewSnapshot.mm:

(TEST):

10:18 AM Changeset in webkit [241198] by aestes@apple.com
  • 6 edits in trunk

[WebIDL] Support serializing sequences and FrozenArrays of non-interfaces
https://bugs.webkit.org/show_bug.cgi?id=190997
<rdar://problem/35983035>

Reviewed by Brent Fulgham.

Source/WebCore:

Support serializing sequences and FrozenArrays of types that aren't interfaces. This is
needed to properly serialize PaymentAddress, which has a FrozenArray of DOMStrings.

We should support serializing sequences of interfaces too, but that's slightly more
complicated since it involves iterating the sequence and serializing each of its items. I
left that as a follow-up task, since I don't see any IDLs that currently need this.

We also don't support serializing sequences with the CachedAttribute or CustomGetter
extended attributes, because WebIDL specifies that a new array should be created when
converting an IDL sequence into an ECMAScript value.

Added bindings test cases to TestSerialization.idl and PaymentAddress test cases to
http/tests/paymentrequest/payment-address-attributes-and-toJSON-method.https.html.

  • bindings/scripts/CodeGenerator.pm:

(GetInterfaceForType): Renamed from GetInterfaceForAttribute.
(IsSerializableType): Modified to allow sequences and FrozenArrays of non-interface types.
(hasCachedAttributeOrCustomGetterExtendedAttribute): Added a helper to determine if an
attribute has the CachedAttribute or CustomGetter extended attributes.
(IsSerializableAttribute): Checked for sequences with the CachedAttribute or CustomGetter
extended attributes before calling IsSerializableType.
(GetInterfaceForAttribute): Renamed to GetInterfaceForType.

  • bindings/scripts/test/JS/JSTestSerialization.cpp:
  • bindings/scripts/test/TestSerialization.idl:

LayoutTests:

  • http/tests/paymentrequest/payment-address-attributes-and-toJSON-method.https.html:
9:18 AM Changeset in webkit [241197] by achristensen@apple.com
  • 15 edits in trunk/Source

Add SPI to use networking daemon instead of XPC service
https://bugs.webkit.org/show_bug.cgi?id=194427

Reviewed by Geoffrey Garen.

Source/WebKit:

There is still work to be done, but with the proper plist it starts and loads webpages!

  • NetworkProcess/EntryPoint/Cocoa/Daemon/DaemonEntryPoint.mm:

(WebKit::DaemonMain):

  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h:
  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:

(WebKit::XPCEventHandler):
(WebKit::XPCInitializationHandler):
(WebKit::XPCServiceMain):
(WebKit::XPCServiceEventHandler): Deleted.

  • UIProcess/API/APIProcessPoolConfiguration.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:

(-[_WKProcessPoolConfiguration usesNetworkingDaemon]):
(-[_WKProcessPoolConfiguration setUsesNetworkingDaemon:]):

  • UIProcess/AuxiliaryProcessProxy.cpp:

(WebKit::AuxiliaryProcessProxy::getLaunchOptions):

  • UIProcess/Launcher/ProcessLauncher.h:
  • UIProcess/Launcher/mac/ProcessLauncherMac.mm:

(WebKit::serviceName):
(WebKit::ProcessLauncher::launchProcess):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::getLaunchOptions):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::usesNetworkingDaemon const):

  • UIProcess/WebProcessPool.h:

Source/WTF:

  • wtf/spi/darwin/XPCSPI.h:

Instead of using XPC bootstrap SPI, we just send a separate message.
xpc_copy_bootstrap does not seem to work in daemons.

9:05 AM Changeset in webkit [241196] by sihui_liu@apple.com
  • 15 edits
    1 add in trunk/Source/WebCore

IndexedDB tests leak documents
https://bugs.webkit.org/show_bug.cgi?id=189435
<rdar://problem/44240043>

Reviewed by Geoffrey Garen.

Remove use of JSC::Strong in IndexedDatabase.

  • Modules/indexeddb/IDBCursor.cpp:

(WebCore::IDBCursor::update):
(WebCore::IDBCursor::continuePrimaryKey):
(WebCore::IDBCursor::continueFunction):
(WebCore::IDBCursor::deleteFunction):
(WebCore::IDBCursor::setGetResult):

  • Modules/indexeddb/IDBCursor.h:

(WebCore::IDBCursor::key):
(WebCore::IDBCursor::primaryKey):
(WebCore::IDBCursor::value):
(WebCore::IDBCursor::keyWrapper):
(WebCore::IDBCursor::primaryKeyWrapper):
(WebCore::IDBCursor::valueWrapper):
(WebCore::IDBCursor::key const): Deleted.
(WebCore::IDBCursor::primaryKey const): Deleted.
(WebCore::IDBCursor::value const): Deleted.

  • Modules/indexeddb/IDBCursor.idl:
  • Modules/indexeddb/IDBCursorWithValue.idl:
  • Modules/indexeddb/IDBObjectStore.cpp:

(WebCore::IDBObjectStore::putForCursorUpdate):

  • Modules/indexeddb/IDBObjectStore.h:
  • Modules/indexeddb/IDBRequest.cpp:

(WebCore::IDBRequest::IDBRequest):
(WebCore::IDBRequest::~IDBRequest):
(WebCore::IDBRequest::result const):
(WebCore::IDBRequest::setResult):
(WebCore::IDBRequest::setResultToStructuredClone):
(WebCore::IDBRequest::setResultToUndefined):
(WebCore::IDBRequest::resultCursor):
(WebCore::IDBRequest::willIterateCursor):
(WebCore::IDBRequest::didOpenOrIterateCursor):

  • Modules/indexeddb/IDBRequest.h:

(WebCore::IDBRequest::resultWrapper):

  • Modules/indexeddb/IDBRequest.idl:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSIDBCursorCustom.cpp:

(WebCore::JSIDBCursor::key const):
(WebCore::JSIDBCursor::primaryKey const):
(WebCore::JSIDBCursor::visitAdditionalChildren):

  • bindings/js/JSIDBCursorWithValueCustom.cpp:

(WebCore::JSIDBCursorWithValue::value const):
(WebCore::JSIDBCursorWithValue::visitAdditionalChildren):

  • bindings/js/JSIDBRequestCustom.cpp: Added.

(WebCore::JSIDBRequest::result const):
(WebCore::JSIDBRequest::visitAdditionalChildren):

  • inspector/agents/InspectorIndexedDBAgent.cpp:
6:46 AM Changeset in webkit [241195] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC] The used containing block width value is optional
https://bugs.webkit.org/show_bug.cgi?id=194428

Reviewed by Antti Koivisto.

The preferred width codepath cannot provide a valid used containing block width value.

"The percentage is calculated with respect to the width of the generated box's containing block.
If the containing block's width depends on this element's width, then the resulting layout is undefined in CSS 2.2."

Let's use 0 as used value for now.

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::computedPadding):
(WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin):

  • layout/LayoutUnits.h:

(WebCore::Layout::UsedHorizontalValues::UsedHorizontalValues):

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):

  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

(WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):

  • page/FrameViewLayoutContext.cpp:
5:57 AM Changeset in webkit [241194] by Alan Bujtas
  • 10 edits in trunk/Source/WebCore

[LFC] Horizontal geometry compute functions should take the containing block's width as a used value
https://bugs.webkit.org/show_bug.cgi?id=194424

Reviewed by Antti Koivisto.

This is in preparation for passing optional containing block width for the preferred with codepath.

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const):
(WebCore::Layout::FormattingContext::computeBorderAndPadding const):

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

(WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::computedBorder):
(WebCore::Layout::FormattingContext::Geometry::computedPadding):
(WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin):

  • layout/LayoutUnits.h:

(WebCore::Layout::UsedHorizontalValues::UsedHorizontalValues):

  • layout/blockformatting/BlockFormattingContext.cpp:

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

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPadding const):
(WebCore::Layout::InlineFormattingContext::computeWidthAndMargin const):

  • layout/inlineformatting/InlineFormattingContext.h:
  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

(WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):

1:54 AM Changeset in webkit [241193] by sbarati@apple.com
  • 2 edits in trunk/PerformanceTests

Update JetStream2 CLI to not print "ms" since we now just print the score values
https://bugs.webkit.org/show_bug.cgi?id=193981

Reviewed by Yusuke Suzuki.

  • JetStream2/JetStreamDriver.js:

(DefaultBenchmark.prototype.updateUIAfterRun):
(DefaultBenchmark):
(WSLBenchmark.prototype.updateUIAfterRun):
(WSLBenchmark):
(WasmBenchmark.prototype.updateUIAfterRun):
(WasmBenchmark):

1:46 AM Changeset in webkit [241192] by benjamin@webkit.org
  • 7 edits in trunk

clampTo(): do not convert the input to double when dealing with integers
https://bugs.webkit.org/show_bug.cgi?id=194263
<rdar://problem/47692312>

Reviewed by Darin Adler.

Source/WebCore:

Make the calls to clampTo<float>() unambiguous.

  • page/FrameView.cpp:

(WebCore::FrameView::computeUpdatedLayoutViewportRect):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::setOpacity):
(WebCore::RenderStyle::setShapeImageThreshold):

Source/WTF:

Previously, every use of clampTo() was converting the input to double,
doing the comparison in double, then casting back to whatever type was needed.

In many case, that was very wasteful. WebKit has many cases of clampTo() with
the same type as input/output, or with integer types of different size/sign.

This patch adds a few versions of clampTo() for the common cases seen in WebKit.
In each case, I tried to minimize the amount of conversion needed at runtime.

  • wtf/MathExtras.h:

(clampTo):

Tools:

  • TestWebKitAPI/Tests/WTF/MathExtras.cpp:

(TestWebKitAPI::testClampFloatingPointToFloatingPoint):
(TestWebKitAPI::testClampFloatingPointToInteger):
(TestWebKitAPI::testClampSameSignIntegers):
(TestWebKitAPI::testClampUnsignedToSigned):
(TestWebKitAPI::testClampSignedToUnsigned):

12:48 AM Changeset in webkit [241191] by Keith Rollin
  • 3 edits
    1 add in trunk/Source/WebKit

Unreviewed build fix.

r241135 modified how entitlements were built up for the macOS. Those
changes broke the iOSMac builds. Bring back some deletions in order to
fix iOSMac.

  • Configurations/PluginService.64.xcconfig:
  • Configurations/PluginService.entitlements: Added.
  • WebKit.xcodeproj/project.pbxproj:
12:37 AM Changeset in webkit [241190] by commit-queue@webkit.org
  • 5 edits
    2 adds in trunk

Source/WebCore:
When performing AXPress, check to see if the menu list is disabled.
https://bugs.webkit.org/show_bug.cgi?id=193878

Patch by Eric Liang <ericliang@apple.com> on 2019-02-08
Reviewed by Chris Fleizach.

Test: accessibility/mac/press-not-work-for-disabled-menu-list.html

  • accessibility/AXObjectCache.h:
  • accessibility/AccessibilityMenuList.cpp:

(WebCore::AccessibilityMenuList::press):

  • accessibility/mac/AXObjectCacheMac.mm:

(WebCore::AXObjectCache::postPlatformNotification):

LayoutTests:
Check if receive AXPressDidFail notification when performing AXPress action on disabled MenuList.
https://bugs.webkit.org/show_bug.cgi?id=193878

Patch by Eric Liang <ericliang@apple.com> on 2019-02-08
Reviewed by Chris Fleizach.

  • accessibility/mac/press-not-work-for-disabled-menu-list.html: Added.

Feb 7, 2019:

10:51 PM Changeset in webkit [241189] by Devin Rousso
  • 3 edits
    2 adds in trunk

PseudoElement created for any ::before/::after selector regardless of whether a content property exists
https://bugs.webkit.org/show_bug.cgi?id=194423
<rdar://problem/46787260>

Reviewed by Antti Koivisto.

Source/WebCore:

Test: inspector/css/pseudo-creation.html

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::resolvePseudoStyle):
We should only be creating PseudoElements if we actually have a content proprety in the
PseudoElement's style. Otherwise, we end up creating PseudoElements for every CSS rule
that has a ::before/::after, only to immediately destroy them as there is nothing to show.

LayoutTests:

  • inspector/css/pseudo-creation.html: Added.
  • inspector/css/pseudo-creation-expected.txt: Added.
10:39 PM Changeset in webkit [241188] by bshafiei@apple.com
  • 3 edits in branches/safari-607-branch/Source/WebCore

Cherry-pick r241170. rdar://problem/47909341

REGRESSION(r239887): Crash under IDBConnectionToClient::didDeleteDatabase(WebCore::IDBResultData const&)
https://bugs.webkit.org/show_bug.cgi?id=194402
<rdar://problem/47858241>

Reviewed by Geoffrey Garen.

r239887 removed a reference cycle of IDBConnectionToClient so that IDBConnectionToClient would no longer be
around forever. Therefore, ServerOpenRequest should keep a reference to IDBConnectionToClient to make sure it
is valid during access.

  • Modules/indexeddb/server/ServerOpenDBRequest.cpp: (WebCore::IDBServer::ServerOpenDBRequest::maybeNotifyRequestBlocked): (WebCore::IDBServer::ServerOpenDBRequest::notifyDidDeleteDatabase):
  • Modules/indexeddb/server/ServerOpenDBRequest.h:

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

9:36 PM Changeset in webkit [241187] by bshafiei@apple.com
  • 3 edits
    2 adds in branches/safari-607-branch

Cherry-pick r241171. rdar://problem/47908156

[iOS] Clicking links in Safari using Apple Pencil is much more difficult after r238475
https://bugs.webkit.org/show_bug.cgi?id=194415
<rdar://problem/47550281>

Reviewed by Tim Horton.

Source/WebKit:

Fix the bug by not firing the Apple-pencil-exclusive tap gesture recognizer in the case where editable images
are disabled. This gesture recognizer is only used for inserting editable images, and currently conflicts with
the synthetic click gesture recognizer used to recognize clicks from generic digitizer inputs.

  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView gestureRecognizerShouldBegin:]): (-[WKContentView _stylusSingleTapRecognized:]):

LayoutTests:

Add a layout test to verify that a stylus tap dispatches clicks.

  • fast/events/touch/ios/pencil-tap-dispatches-click-expected.txt: Added.
  • fast/events/touch/ios/pencil-tap-dispatches-click.html: Added.

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

9:36 PM Changeset in webkit [241186] by bshafiei@apple.com
  • 11 edits in branches/safari-607-branch

Cherry-pick r241150. rdar://problem/47908154

Overflow element scrollbar is light for dark mode content.
https://bugs.webkit.org/show_bug.cgi?id=194407
rdar://problem/45991585

Reviewed by Beth Dakin.

Source/WebCore:

Tested by css-dark-mode/supported-color-schemes-scrollbar.html.

  • page/ChromeClient.h: (WebCore::FrameView::preferredScrollbarOverlayStyle): Return WTF::nullopt by default to avoid short-circuiting auto detection in recalculateScrollbarOverlayStyle() for clients, like WK1, that do not implement preferredScrollbarOverlayStyle().
  • page/FrameView.cpp: (WebCore::FrameView::recalculateScrollbarOverlayStyle): Use WTF::nullopt in the false case to auto detect overlay style when page() is null.
  • rendering/RenderLayer.cpp: (WebCore::RenderLayer::useDarkAppearance const): Added.
  • rendering/RenderLayer.h:
  • testing/Internals.cpp: (WebCore::Internals::scrollbarOverlayStyle const): Added Node argument. (WebCore::Internals::scrollbarUsingDarkAppearance const): Added.
  • testing/Internals.h:
  • testing/Internals.idl:

LayoutTests:

Updated tests to look at overflow elements and if dark apearance
is used by the scrollbar directly.

  • css-dark-mode/supported-color-schemes-scrollbar-expected.txt:
  • css-dark-mode/supported-color-schemes-scrollbar.html:

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

9:36 PM Changeset in webkit [241185] by bshafiei@apple.com
  • 2 edits in branches/safari-607-branch/Source/WebKit

Cherry-pick r241143. rdar://problem/47908161

Permit additional IOKit Properties needed by Media PlugIns on older Mac Hardware
https://bugs.webkit.org/show_bug.cgi?id=194412
<rdar://problem/47820615>

Reviewed by Per Arne Vollan.

  • PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:

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

9:36 PM Changeset in webkit [241184] by bshafiei@apple.com
  • 2 edits in branches/safari-607-branch/Source/WebKit

Cherry-pick r241142. rdar://problem/47908158

Permit additional IOKit Properties needed by older Mac Hardware
https://bugs.webkit.org/show_bug.cgi?id=194410
<rdar://problem/47820620>

Reviewed by Per Arne Vollan.

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

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

6:38 PM Changeset in webkit [241183] by Chris Dumez
  • 173 edits in trunk/Source

Mark more heap-allocated classes as fast allocated
https://bugs.webkit.org/show_bug.cgi?id=194422

Reviewed by Ryosuke Niwa.

Source/WebCore:

  • Modules/applepay/PaymentCoordinator.h:
  • Modules/beacon/NavigatorBeacon.h:
  • Modules/cache/DOMWindowCaches.h:
  • Modules/cache/WorkerGlobalScopeCaches.h:
  • Modules/credentialmanagement/NavigatorCredentials.h:
  • Modules/encryptedmedia/legacy/LegacyCDMPrivateClearKey.h:
  • Modules/gamepad/NavigatorGamepad.h:
  • Modules/indexeddb/IDBGetAllResult.h:
  • Modules/indexeddb/IDBGetResult.h:
  • Modules/indexeddb/IDBKeyData.h:
  • Modules/indexeddb/IDBValue.h:
  • Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h:
  • Modules/indexeddb/server/IndexValueEntry.h:
  • Modules/indexeddb/server/IndexValueStore.h:
  • Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
  • Modules/indexeddb/server/MemoryCursor.h:
  • Modules/indexeddb/server/MemoryIDBBackingStore.h:
  • Modules/indexeddb/server/SQLiteIDBBackingStore.h:
  • Modules/indexeddb/server/SQLiteIDBCursor.h:
  • Modules/indexeddb/server/SQLiteIDBTransaction.h:
  • Modules/indexeddb/server/UniqueIDBDatabase.h:
  • Modules/indexeddb/shared/IDBDatabaseInfo.h:
  • Modules/indexeddb/shared/IDBResourceIdentifier.h:
  • Modules/indexeddb/shared/IDBTransactionInfo.h:
  • Modules/mediacapabilities/NavigatorMediaCapabilities.h:
  • Modules/mediasession/WebMediaSessionManager.cpp:
  • Modules/mediastream/NavigatorMediaDevices.h:
  • Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:
  • Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.h:
  • Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h:
  • Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.h:
  • Modules/navigatorcontentutils/NavigatorContentUtils.h:
  • Modules/quota/DOMWindowQuota.h:
  • Modules/quota/NavigatorStorageQuota.h:
  • Modules/quota/WorkerNavigatorStorageQuota.h:
  • Modules/speech/DOMWindowSpeechSynthesis.h:
  • Modules/webaudio/BiquadProcessor.h:
  • Modules/webaudio/DelayProcessor.h:
  • Modules/webauthn/fido/FidoHidPacket.h:
  • Modules/webdriver/NavigatorWebDriver.h:
  • Modules/webgpu/DOMWindowWebGPU.h:
  • Modules/websockets/WebSocketChannel.h:
  • Modules/webvr/NavigatorWebVR.h:
  • accessibility/AXObjectCache.h:
  • bindings/js/DOMGCOutputConstraint.h:
  • bindings/js/DOMPromiseProxy.h:
  • bridge/c/c_runtime.h:
  • contentextensions/CombinedURLFilters.cpp:
  • crypto/CryptoAlgorithmParameters.h:
  • css/CSSComputedStyleDeclaration.h:
  • css/CSSRegisteredCustomProperty.h:
  • css/DOMCSSPaintWorklet.h:
  • css/DOMCSSRegisterCustomProperty.h:
  • css/StyleRule.h:
  • dom/ConstantPropertyMap.h:
  • dom/CustomElementReactionQueue.h:
  • dom/Document.h:
  • dom/GenericEventQueue.h:
  • dom/RejectedPromiseTracker.h:
  • dom/UserGestureIndicator.h:
  • editing/ReplaceSelectionCommand.cpp:
  • editing/SelectionRectGatherer.h:
  • editing/TextIterator.h:
  • editing/cocoa/HTMLConverter.mm:
  • fileapi/AsyncFileStream.cpp:
  • fileapi/AsyncFileStream.h:
  • html/forms/FileIconLoader.h:
  • html/parser/HTMLTreeBuilder.h:
  • html/track/WebVTTParser.h:
  • inspector/DOMPatchSupport.cpp:
  • loader/FrameLoaderClient.h:
  • loader/WorkerThreadableLoader.cpp:
  • page/IntersectionObserver.h:
  • page/PerformanceMonitor.h:
  • page/PerformanceUserTiming.h:
  • page/PrintContext.h:
  • page/ValidationMessageClient.h:
  • platform/ColorChooser.h:
  • platform/ControlStates.h:
  • platform/DataListSuggestionPicker.h:
  • platform/FileStream.h:
  • platform/KeyedCoding.h:
  • platform/LowPowerModeNotifier.h:
  • platform/PlatformSpeechSynthesizer.h:
  • platform/WebGLStateTracker.h:
  • platform/audio/AudioArray.h:
  • platform/audio/AudioDestination.h:
  • platform/audio/DownSampler.h:
  • platform/audio/DynamicsCompressor.h:
  • platform/audio/FFTFrame.h:
  • platform/audio/HRTFDatabase.h:
  • platform/audio/MultiChannelResampler.h:
  • platform/audio/Panner.h:
  • platform/audio/Reverb.h:
  • platform/audio/ReverbConvolver.h:
  • platform/audio/ReverbConvolverStage.h:
  • platform/audio/UpSampler.h:
  • platform/audio/mac/AudioSessionMac.cpp:
  • platform/audio/mac/CAAudioStreamDescription.h:
  • platform/audio/mac/CARingBuffer.h:
  • platform/cocoa/ScrollSnapAnimatorState.h:
  • platform/gamepad/PlatformGamepad.h:
  • platform/graphics/GraphicsLayer.cpp:
  • platform/graphics/GraphicsLayerFactory.h:
  • platform/graphics/PlatformTimeRanges.h:
  • platform/graphics/TextTrackRepresentation.h:
  • platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.h:
  • platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.h:
  • platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
  • platform/graphics/displaylists/DisplayListRecorder.h:
  • platform/network/cocoa/WebCoreNSURLSession.mm:
  • platform/sql/SQLiteDatabase.h:
  • platform/text/TextCodecICU.h:
  • rendering/GridBaselineAlignment.h:
  • rendering/GridTrackSizingAlgorithm.h:
  • rendering/RenderObject.h:
  • rendering/style/GridArea.h:
  • workers/service/context/SWContextManager.h:

Source/WebCore/PAL:

  • pal/crypto/openssl/CryptoDigestOpenSSL.cpp:
  • pal/system/Clock.h:

Source/WebKit:

  • NetworkProcess/NetworkLoad.cpp:
  • NetworkProcess/NetworkLoadChecker.h:
  • NetworkProcess/NetworkResourceLoader.cpp:
  • Platform/IPC/Connection.h:
  • Platform/IPC/mac/ImportanceAssertion.h:
  • PluginProcess/PluginCreationParameters.h:
  • Shared/API/Cocoa/RemoteObjectRegistry.h:
  • Shared/WebEvent.h:
  • UIProcess/API/APIHTTPCookieStore.cpp:
  • UIProcess/API/APINotificationProvider.h:
  • UIProcess/API/Cocoa/PageLoadStateObserver.h:
  • UIProcess/API/Cocoa/WKHTTPCookieStore.mm:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setInputDelegate:]):

  • UIProcess/API/gtk/PageClientImpl.h:
  • UIProcess/BackingStore.h:
  • UIProcess/Cocoa/AutomationClient.h:
  • UIProcess/Cocoa/DiagnosticLoggingClient.h:
  • UIProcess/Cocoa/DownloadClient.h:
  • UIProcess/Cocoa/FindClient.h:
  • UIProcess/Cocoa/NavigationState.h:
  • UIProcess/Cocoa/UIDelegate.h:
  • UIProcess/Cocoa/ViewGestureController.h:
  • UIProcess/DeviceIdHashSaltStorage.h:
  • UIProcess/Downloads/DownloadProxyMap.h:
  • UIProcess/Gamepad/UIGamepad.h:
  • UIProcess/Notifications/WebNotificationProvider.h:
  • UIProcess/ProcessAssertion.h:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeHost.h:
  • UIProcess/WebContextInjectedBundleClient.h:
  • UIProcess/WebFormClient.h:
  • UIProcess/WebGeolocationProvider.h:
  • UIProcess/WebPageProxy.h:
  • WebProcess/Automation/WebAutomationSessionProxy.h:
  • WebProcess/InjectedBundle/API/APIInjectedBundleBundleClient.h:
  • WebProcess/InjectedBundle/API/APIInjectedBundleEditorClient.h:
  • WebProcess/InjectedBundle/API/APIInjectedBundlePageContextMenuClient.h:
  • WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h:
  • WebProcess/InjectedBundle/API/APIInjectedBundlePageResourceLoadClient.h:
  • WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
  • WebProcess/InjectedBundle/APIInjectedBundleFormClient.h:
  • WebProcess/Network/webrtc/LibWebRTCNetwork.h:
  • WebProcess/Network/webrtc/LibWebRTCSocket.h:
  • WebProcess/Network/webrtc/WebRTCResolver.h:
  • WebProcess/WebCoreSupport/WebInspectorClient.cpp:
  • WebProcess/WebPage/DrawingArea.h:

Source/WTF:

  • wtf/Function.h:

(WTF::Function<Out):

  • wtf/RefCounter.h:
  • wtf/URL.h:
  • wtf/text/StringView.cpp:
6:30 PM Changeset in webkit [241182] by msaboff@apple.com
  • 5 edits in trunk/Source/bmalloc

bmalloc uses more memory on iOS compared to macOS due to physical page size differences
https://bugs.webkit.org/show_bug.cgi?id=192389

Reviewed by Geoffrey Garen.

Changed small line allocations to be in smallPageSize "virtual page" multiples instead of physical
page size increments for sizes less that the physical page size. This required changing the small
page commit / decommit code to work in full physical page increments. For page classes that are
physical page size and larger, there isn't any functional change.

When scavenging page classes smaller than the physical page size, we need to consider whether or
not the adjacent small pages on the same physical page are also free before decommiting that
containing page. When we need to commit more memory, we commit the whole page, and add any
adjacent virtual pages that were fully committed as well.

  • bmalloc/Chunk.h:

(bmalloc::forEachPage):

  • bmalloc/Heap.cpp:

(bmalloc::Heap::initializeLineMetadata):
(bmalloc::Heap::initializePageMetadata):
(bmalloc::Heap::scavenge):
(bmalloc::attribute):
(bmalloc::Heap::commitSmallPagesInPhysicalPage):
(bmalloc::Heap::allocateSmallPage):
(bmalloc::Heap::allocateSmallBumpRangesByMetadata):

  • bmalloc/Heap.h:
  • bmalloc/SmallPage.h:

(bmalloc::SmallPage::refCount):

6:01 PM Changeset in webkit [241181] by Justin Fan
  • 16 edits
    2 copies in trunk

[Web GPU] GPUDevice::createTexture implementation prototype
https://bugs.webkit.org/show_bug.cgi?id=194409
<rdar://problem/47894312>

Reviewed by Myles C. Maxfield.

Source/WebCore:

Test: textures-textureviews.html updated to test new functionality.

Implement GPUDevice::createTexture():

  • Modules/webgpu/WebGPUDevice.cpp:

(WebCore::WebGPUDevice::createTexture const):

  • Modules/webgpu/WebGPUDevice.h:
  • Modules/webgpu/WebGPUDevice.idl:
  • Modules/webgpu/WebGPUTexture.cpp:

(WebCore::WebGPUTexture::create): Modified to return non-nullable to match direction of API.
(WebCore::WebGPUTexture::WebGPUTexture):

  • Modules/webgpu/WebGPUTexture.h:

Metal backend MTLTextureDescriptor and MTLTexture creation:

  • platform/graphics/gpu/GPUDevice.cpp:

(WebCore::GPUDevice::tryCreateTexture const):

  • platform/graphics/gpu/GPUDevice.h:
  • platform/graphics/gpu/GPUTexture.h:
  • platform/graphics/gpu/cocoa/GPUTextureMetal.mm:

(WebCore::mtlTextureTypeForGPUTextureDescriptor):
(WebCore::mtlTextureUsageForGPUTextureUsageFlags):
(WebCore::storageModeForPixelFormatAndSampleCount):
(WebCore::tryCreateMtlTextureDescriptor):
(WebCore::GPUTexture::tryCreate):
(WebCore::GPUTexture::createDefaultTextureView): Add ObjC try/catch guards.

Add GPUUtils.h/cpp for shared utility functions:

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/gpu/GPUUtils.h: Added. Moved platformTextureFormatForGPUTextureFormat here.
  • platform/graphics/gpu/cocoa/GPUSwapChainMetal.mm:

(WebCore::GPUSwapChain::setFormat):
(WebCore::platformTextureFormatForGPUTextureFormat): Moved to GPUUtils.

  • platform/graphics/gpu/cocoa/GPUUtilsMetal.mm: Added.

(WebCore::platformTextureFormatForGPUTextureFormat): Moved here to be referenced by multiple files.

LayoutTests:

Update textures-textureviews.html to WPT format and to test creation of textures via the GPUDevice.

  • webgpu/textures-textureviews-expected.txt:
  • webgpu/textures-textureviews.html:
5:45 PM Changeset in webkit [241180] by Wenson Hsieh
  • 6 edits in trunk/Source/WebKit

[iOS] [WK2] Modernize code for applying autocorrection
https://bugs.webkit.org/show_bug.cgi?id=194397

Reviewed by Tim Horton.

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

(-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
(-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):

Use BlockPtr instead of temporarily storing the completion handler.

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

Change a LegacySync to Delayed.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::applyAutocorrection):
(WebKit::WebPage::syncApplyAutocorrection):
(WebKit::WebPage::applyAutocorrectionInternal):

5:30 PM Changeset in webkit [241179] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

fast/hidpi/hidpi-long-page-with-inset-element.html is a flaky image failure
https://bugs.webkit.org/show_bug.cgi?id=172384

Unreviewed test gardening.

Patch by Shawn Roberts <Shawn Roberts> on 2019-02-07

  • platform/mac-wk1/TestExpectations:
5:21 PM Changeset in webkit [241178] by Jon Davis
  • 2 edits in trunk/Websites/webkit.org

Fixed animation positioning when homepage animation completes
https://bugs.webkit.org/show_bug.cgi?id=194395

Reviewed by Devin Rousso.

  • wp-content/themes/webkit/front-header.php:
5:15 PM Changeset in webkit [241177] by Alan Coon
  • 8 edits
    2 adds in branches/safari-607-branch

Cherry-pick r240710. rdar://problem/47776353

AX: Support color well on iOS
https://bugs.webkit.org/show_bug.cgi?id=194010

Reviewed by Joanmarie Diggs.

Source/WebCore:

Test: accessibility/ios-simulator/color-well.html

Add support for color well on iOS.

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]): (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]): (-[WebAccessibilityObjectWrapper accessibilityRoleDescription]): (-[WebAccessibilityObjectWrapper accessibilityColorStringValue]):
  • en.lproj/Localizable.strings:
  • platform/LocalizedStrings.cpp: (WebCore::AXColorWellText):
  • platform/LocalizedStrings.h:

Tools:

  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::AccessibilityUIElement::stringAttributeValue):

LayoutTests:

  • accessibility/ios-simulator/color-well-expected.txt: Added.
  • accessibility/ios-simulator/color-well.html: Added.

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

5:01 PM Changeset in webkit [241176] by rmorisset@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Fix Abs(Neg(x)) -> Abs(x) optimization in B3ReduceStrength
https://bugs.webkit.org/show_bug.cgi?id=194420

Reviewed by Saam Barati.

In https://bugs.webkit.org/show_bug.cgi?id=194250, I added an optimization: Abs(Neg(x)) -> Abs(x).
But I introduced two bugs, one is that I actually implemented Abs(Neg(x)) -> x, and the other is that the test is looking at Abs(Abs(x)) instead (both were stupid copy-paste mistakes).
This trivial patch fixes both.

  • b3/B3ReduceStrength.cpp:
  • b3/testb3.cpp:

(JSC::B3::testAbsNegArg):

5:01 PM Changeset in webkit [241175] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Make Timeline markers light gray instead of black in dark mode
https://bugs.webkit.org/show_bug.cgi?id=194417

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2019-02-07
Reviewed by Devin Rousso.

  • UserInterface/Views/RenderingFrameTimelineOverviewGraph.css:

(.timeline-overview-graph.rendering-frame > .divider):

  • UserInterface/Views/TimelineRuler.css:

(.timeline-ruler > .markers > .divider):

4:55 PM Changeset in webkit [241174] by Jon Davis
  • 2 edits in trunk/Websites/webkit.org

Disable the WP emoji polyfill
https://bugs.webkit.org/show_bug.cgi?id=194394

Reviewed by Devin Rousso.

  • wp-content/themes/webkit/functions.php:
4:52 PM Changeset in webkit [241173] by Jon Davis
  • 2 edits in trunk/Websites/webkit.org

Fixed responsive design issues for the Contribute drop-down menu and pagination
https://bugs.webkit.org/show_bug.cgi?id=194393

Reviewed by Devin Rousso.

The short viewport breakpoint styles should apply for small width
windows as well, and pagination styles need to accommodate wrapped
text labels.

  • wp-content/themes/webkit/style.css:

(.pagination .page-numbers,):
(@media only screen and (max-height: 415px) and (max-width: 920px)):
(@media only screen and (max-height: 415px)): Deleted.

4:49 PM Changeset in webkit [241172] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Better error messages for module loader SPI
https://bugs.webkit.org/show_bug.cgi?id=194421

Reviewed by Saam Barati.

  • API/JSAPIGlobalObject.mm:

(JSC::JSAPIGlobalObject::moduleLoaderImportModule):

4:49 PM Changeset in webkit [241171] by Wenson Hsieh
  • 3 edits
    2 adds in trunk

[iOS] Clicking links in Safari using Apple Pencil is much more difficult after r238475
https://bugs.webkit.org/show_bug.cgi?id=194415
<rdar://problem/47550281>

Reviewed by Tim Horton.

Source/WebKit:

Fix the bug by not firing the Apple-pencil-exclusive tap gesture recognizer in the case where editable images
are disabled. This gesture recognizer is only used for inserting editable images, and currently conflicts with
the synthetic click gesture recognizer used to recognize clicks from generic digitizer inputs.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView _stylusSingleTapRecognized:]):

LayoutTests:

Add a layout test to verify that a stylus tap dispatches clicks.

  • fast/events/touch/ios/pencil-tap-dispatches-click-expected.txt: Added.
  • fast/events/touch/ios/pencil-tap-dispatches-click.html: Added.
4:45 PM Changeset in webkit [241170] by sihui_liu@apple.com
  • 3 edits in trunk/Source/WebCore

REGRESSION(r239887): Crash under IDBConnectionToClient::didDeleteDatabase(WebCore::IDBResultData const&)
https://bugs.webkit.org/show_bug.cgi?id=194402
<rdar://problem/47858241>

Reviewed by Geoffrey Garen.

r239887 removed a reference cycle of IDBConnectionToClient so that IDBConnectionToClient would no longer be
around forever. Therefore, ServerOpenRequest should keep a reference to IDBConnectionToClient to make sure it
is valid during access.

  • Modules/indexeddb/server/ServerOpenDBRequest.cpp:

(WebCore::IDBServer::ServerOpenDBRequest::maybeNotifyRequestBlocked):
(WebCore::IDBServer::ServerOpenDBRequest::notifyDidDeleteDatabase):

  • Modules/indexeddb/server/ServerOpenDBRequest.h:
4:02 PM Changeset in webkit [241169] by pvollan@apple.com
  • 6 edits in trunk/Source

[macOS] Block coreservicesd in sandbox.
https://bugs.webkit.org/show_bug.cgi?id=192670

Reviewed by Alexey Proskuryakov.

Source/WebKit:

We should block CoreServices in newer versions of macOS. In order to achieve this we need to avoid calling
_RegisterApplication before entering the sandbox, since this call will open up a connection to CoreServices.
The call to _RegisterApplication is moved to ChildProcess::updateProcessName, since it is needed to
successfully update the process name. The call to ChildProcess::updateProcessName is made after entering
the sandbox.

  • Shared/AuxiliaryProcess.cpp:

(WebKit::AuxiliaryProcess::initialize):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::initializeProcessName):
(WebKit::WebProcess::platformInitializeProcess):

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

Source/WTF:

Add HAVE_CSCHECKFIXDISABLE define.

  • wtf/Platform.h:
3:52 PM Changeset in webkit [241168] by Kocsen Chung
  • 1 copy in tags/Safari-608.1.5.1.1

Tag Safari-608.1.5.1.1.

3:49 PM Changeset in webkit [241167] by youenn@apple.com
  • 9 edits
    2 adds in trunk

Filter out Overconstrainederror.constraint when getUserMedia is not granted
https://bugs.webkit.org/show_bug.cgi?id=194240

Reviewed by Eric Carlson.

Source/WebKit:

Make sure in UIProcess to filter out constraint if either the page was not granted gum access or it has no persistent access.

Refactor UserMediaPermissionRequestManagerProxy to make the implementation easier to understand.

Covered by added test.

  • UIProcess/UserMediaPermissionCheckProxy.cpp:

(WebKit::UserMediaPermissionCheckProxy::setUserMediaAccessInfo):

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged):
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
(WebKit::UserMediaPermissionRequestManagerProxy::grantAccess):
(WebKit::UserMediaPermissionRequestManagerProxy::getRequestAction):
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
(WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionInvalidRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionValidRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo):
(WebKit::UserMediaPermissionRequestManagerProxy::wasGrantedVideoOrAudioAccess):
(WebKit::UserMediaPermissionRequestManagerProxy::computeFilteredDeviceList):
(WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
(WebKit::UserMediaPermissionRequestManagerProxy::createPermissionRequest): Deleted.

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
  • UIProcess/UserMediaPermissionRequestProxy.h:

(WebKit::UserMediaPermissionRequestProxy::isPending const):
(WebKit::UserMediaPermissionRequestProxy::setEligibleVideoDeviceUIDs):
(WebKit::UserMediaPermissionRequestProxy::setEligibleAudioDeviceUIDs):
(WebKit::UserMediaPermissionRequestProxy::hasAudioDevice const):
(WebKit::UserMediaPermissionRequestProxy::hasVideoDevice const):
(WebKit::UserMediaPermissionRequestProxy::hasPersistentAccess const):
(WebKit::UserMediaPermissionRequestProxy::setHasPersistentAccess):
(WebKit::UserMediaPermissionRequestProxy::userMediaID const):
(WebKit::UserMediaPermissionRequestProxy::topLevelDocumentSecurityOrigin const):
(WebKit::UserMediaPermissionRequestProxy::userMediaDocumentSecurityOrigin const):
(WebKit::UserMediaPermissionRequestProxy::userRequest const):
(WebKit::UserMediaPermissionRequestProxy::setDeviceIdentifierHashSalt):
(WebKit::UserMediaPermissionRequestProxy::deviceIdentifierHashSalt const):
(WebKit::UserMediaPermissionRequestProxy::audioDevice const):
(WebKit::UserMediaPermissionRequestProxy::videoDevice const):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::requestUserMediaPermissionForFrame):

  • UIProcess/WebPageProxy.h:

LayoutTests:

  • fast/mediastream/overconstrainederror-constraint-expected.txt: Added.
  • fast/mediastream/overconstrainederror-constraint.html: Added.
3:37 PM Changeset in webkit [241166] by Alan Coon
  • 7 edits in branches/safari-607-branch/Source

Versioning.

3:37 PM Changeset in webkit [241165] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/JavaScriptCore

Cherry-pick r241140. rdar://problem/47893590

Fix more doesGC() for CheckTraps, GetMapBucket, and Switch nodes.
https://bugs.webkit.org/show_bug.cgi?id=194399
<rdar://problem/47889777>

Reviewed by Yusuke Suzuki.

Fix doesGC() for the following nodes:

CheckTraps:

We normally will not emit this node because Options::usePollingTraps() is
false by default. However, as it is implemented now, CheckTraps can GC
because it can allocate a TerminatedExecutionException. If we make the
TerminatedExecutionException a singleton allocated at initialization time,
doesGC() can return false for CheckTraps.
https://bugs.webkit.org/show_bug.cgi?id=194323

GetMapBucket:

Can call operationJSMapFindBucket() or operationJSSetFindBucket(),
which calls HashMapImpl::findBucket(), which calls jsMapHash(), which
can resolve a rope.

Switch:

If switchData kind is SwitchChar, can call operationResolveRope() .
If switchData kind is SwitchString and the child use kind is not StringIdentUse,

can call operationSwitchString() which resolves ropes.

DirectTailCall:
ForceOSRExit:
Return:
TailCallForwardVarargs:
TailCallVarargs:
Throw:

These are terminal nodes. It shouldn't really matter what doesGC() returns
for them, but following our conservative practice, unless we have a good
reason for doesGC() to return false, we should just return true.

  • dfg/DFGDoesGC.cpp: (JSC::DFG::doesGC):

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

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

Cherry-pick r241137. rdar://problem/47893603

Unable to sign in leetcode.
https://bugs.webkit.org/show_bug.cgi?id=194366
rdar://problem/47259025.

Reviewed by Chris Dumez.

Source/WebCore:

In case a signal is passed as part of a FetchRequestInit,
the IDL binding code is throwing an exception in case signal is not an AbortSignal object.
This breaks an AbortSignal shim used in some web sites.
Relaxed the IDL binding rule by marking signal as any and doing the conversion in FetchRequest.

Test: http/wpt/fetch/request-abort.html
Also covered by manually signing in to leetcode.

  • Modules/fetch/FetchRequest.cpp: (WebCore::FetchRequest::initializeWith):
  • Modules/fetch/FetchRequestInit.h: (WebCore::FetchRequestInit::hasMembers const):
  • Modules/fetch/FetchRequestInit.idl:

LayoutTests:

  • http/wpt/fetch/request-abort-expected.txt: Added.
  • http/wpt/fetch/request-abort.html: Added.

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

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

Cherry-pick r241131. rdar://problem/47893578

Print backgrounds preference should be honored instead of WKWebViewConfiguration value
https://bugs.webkit.org/show_bug.cgi?id=194364
<rdar://problem/47627599>

Reviewed by Tim Horton.

Without this patch, changing the preference for printing the background has no effect.
This patch fixes that, and I verified it manually by checking "Print backgrounds" in Safari's print menu.
Unfortunately, the only way to test this is actually printing because only values from WebPageProxy::preferences
or WebPageProxy::configuration's preferences are exposed to the API, but values from WebPageProxy::preferencesStore
are used when printing. Actually printing verifies this change fixes the bug.

  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _initializeWithConfiguration:]):

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

3:37 PM Changeset in webkit [241162] by Alan Coon
  • 17 edits in branches/safari-607-branch/Source/WebCore

Cherry-pick r241130. rdar://problem/47893594

HTMLMediaElement registers wrong ScriptExecutionContext with its ActiveDOMObject parent class
https://bugs.webkit.org/show_bug.cgi?id=194360

HTMLMediaElement registers the Document used to create it with ActiveDOMObject, when it should
really use that Document's contextDocument(). Rather than just fix this in HTMLMediaElement,
make sure that the correct document is used everywhere by adding a new ActiveDOMObject constructor
taking a Document&, and making an explicitly deleted Document* constructor to catch any new cases.

Reviewed by Geoffrey Garen.

  • Modules/applepay/ApplePaySession.cpp: (WebCore::ApplePaySession::ApplePaySession):
  • Modules/mediarecorder/MediaRecorder.cpp: (WebCore::MediaRecorder::MediaRecorder):
  • Modules/mediastream/MediaDevices.cpp: (WebCore::MediaDevices::MediaDevices):
  • Modules/mediastream/UserMediaRequest.cpp: (WebCore::UserMediaRequest::UserMediaRequest):
  • Modules/notifications/Notification.cpp: (WebCore::Notification::Notification):
  • Modules/paymentrequest/PaymentRequest.cpp: (WebCore::PaymentRequest::PaymentRequest):
  • Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::AudioContext):
  • animation/WebAnimation.cpp: (WebCore::WebAnimation::WebAnimation):
  • css/FontFaceSet.cpp: (WebCore::FontFaceSet::FontFaceSet):
  • dom/ActiveDOMObject.cpp: (WebCore::ActiveDOMObject::ActiveDOMObject):
  • dom/ActiveDOMObject.h:
  • dom/Document.h: (WebCore::ActiveDOMObject::ActiveDOMObject):
  • html/HTMLMarqueeElement.cpp: (WebCore::HTMLMarqueeElement::HTMLMarqueeElement):
  • html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement):
  • html/HTMLSourceElement.cpp: (WebCore::HTMLSourceElement::HTMLSourceElement):
  • page/IntersectionObserver.cpp: (WebCore::IntersectionObserver::IntersectionObserver):

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

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

Cherry-pick r241124. rdar://problem/47893586

Shrink and hyphenate safe browsing warning text on watchOS
https://bugs.webkit.org/show_bug.cgi?id=194361
<rdar://problem/47466549>

Reviewed by Geoffrey Garen.

Some internationalizations use long words that didn't fit on small watches.

  • UIProcess/Cocoa/WKSafeBrowsingWarning.mm: (fontOfSize): (-[WKSafeBrowsingWarning addContent]): (-[WKSafeBrowsingTextView initWithAttributedString:forWarning:]):

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

3:37 PM Changeset in webkit [241160] by Alan Coon
  • 6 edits in branches/safari-607-branch/Source/WebCore

Cherry-pick r241121. rdar://problem/47893559

Infinite recursion via CachedResource::~CachedResource
https://bugs.webkit.org/show_bug.cgi?id=194378
<rdar://problem/42023295>

Reviewed by Daniel Bates.

I don't know the exact steps to trigger this but the mechanism seems clear.

1) An existing resource is removed from or replaced in CachedResourceLoader::m_documentResources map.
2) This decrements the handle count of resource and causes it be deleted.
3) CachedResource::~CachedResource calls m_owningCachedResourceLoader->removeCachedResource(*this). This only happens with

resources that are "owned" by CachedResourceLoader which is a rare special case (used by image document and if memory cache is disabled).

4) CachedResourceLoader::removeCachedResource looks up the resource from the map which causes a temporary CachedResourceHandle to be created.

This increments the handle count of the resource from 0 back to 1.

5) When the temporary dies, CachedResource::~CachedResource is called again and we cycle back to 3).

The fix here is simply to remove CachedResourceLoader::removeCachedResource call from ~CachedResource.
It is a leftover from when the map contained raw pointers instead of owning CachedResourceHandles.

Since m_documentResources map has a handle to the resource, the only way we are in the destructor is that the resource
has been removed from the map already (or is in process of being removed like in this crash). Any call that does anything
other than bail out is going to crash.

CachedResource::n_owningCachedResourceLoader member and CachedResourceLoader::removeCachedResource function only exist to
support this erranous call so they are removed as well.

  • loader/ImageLoader.cpp: (WebCore::ImageLoader::updateFromElement):
  • loader/cache/CachedResource.cpp: (WebCore::CachedResource::~CachedResource):

This is the substantive change. The rest just removes now-dead code.

  • loader/cache/CachedResource.h: (WebCore::CachedResource::setOwningCachedResourceLoader): Deleted.
  • loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::~CachedResourceLoader): (WebCore::CachedResourceLoader::requestUserCSSStyleSheet): (WebCore::CachedResourceLoader::requestResource): (WebCore::CachedResourceLoader::loadResource): (WebCore::CachedResourceLoader::garbageCollectDocumentResources): (WebCore::CachedResourceLoader::removeCachedResource): Deleted.
  • loader/cache/CachedResourceLoader.h:

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

3:36 PM Changeset in webkit [241159] by Alan Coon
  • 29 edits
    3 copies in branches/safari-607-branch

Cherry-pick r241105. rdar://problem/47893571

[Payment Request] It should be possible to require a phonetic name for shipping contacts
https://bugs.webkit.org/show_bug.cgi?id=194311
<rdar://46733045>

Reviewed by Alex Christensen.

Source/WebCore:

It should be possible to require that a shipping contact has a phonetic name in Payment Request.
To accomplish this, move requiredShippingContactFields from ApplePayPaymentRequest to
ApplePayRequestBase so that it can be used as part of an Apple Pay payment method data.

Since required shipping contact fields can now be specified both in
requiredShippingContactFields and PaymentOptions, we merge the required fields from these
two sources such that, e.g., email is required if it is specified in either place.

So that clients can detect this new feature, the API version number is bumped from 5 to 6.

Added test cases to ApplePayRequestShippingContact.https.html and ApplePayRequestShippingContactV3.https.html.

  • DerivedSources.make:
  • Modules/applepay/ApplePayPaymentRequest.h:
  • Modules/applepay/ApplePayPaymentRequest.idl:
  • Modules/applepay/ApplePayRequestBase.cpp: (WebCore::convertAndValidate):
  • Modules/applepay/ApplePayRequestBase.h:
  • Modules/applepay/ApplePayRequestBase.idl:
  • Modules/applepay/ApplePaySession.cpp: (WebCore::convertAndValidate):
  • Modules/applepay/PaymentCoordinatorClient.cpp: Added. (WebCore::PaymentCoordinatorClient::supportsVersion):
  • Modules/applepay/PaymentCoordinatorClient.h:
  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp: (WebCore::mergePaymentOptions): (WebCore::ApplePayPaymentHandler::show):
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • loader/EmptyClients.cpp:
  • testing/MockPaymentContactFields.h: Added. (WebCore::MockPaymentContactFields::MockPaymentContactFields):
  • testing/MockPaymentContactFields.idl: Added.
  • testing/MockPaymentCoordinator.cpp: (WebCore::MockPaymentCoordinator::showPaymentUI): (WebCore::MockPaymentCoordinator::supportsVersion): Deleted.
  • testing/MockPaymentCoordinator.h:
  • testing/MockPaymentCoordinator.idl:

Source/WebKit:

  • WebProcess/ApplePay/WebPaymentCoordinator.cpp: (WebKit::WebPaymentCoordinator::supportsVersion): Deleted.
  • WebProcess/ApplePay/WebPaymentCoordinator.h:

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebPaymentCoordinatorClient.h:
  • WebCoreSupport/WebPaymentCoordinatorClient.mm: (WebPaymentCoordinatorClient::supportsVersion): Deleted.

LayoutTests:

  • http/tests/ssl/applepay/ApplePayRequestShippingContact.https-expected.txt:
  • http/tests/ssl/applepay/ApplePayRequestShippingContact.https.html:
  • http/tests/ssl/applepay/ApplePayRequestShippingContactV3.https-expected.txt:
  • http/tests/ssl/applepay/ApplePayRequestShippingContactV3.https.html:
  • http/tests/ssl/applepay/PaymentRequest.https-expected.txt:
  • http/tests/ssl/applepay/PaymentRequest.https.html:

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

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

Cherry-pick r241026. rdar://problem/47774548

Roll out parts of r238819 since it is a PLT performance regression.
https://bugs.webkit.org/show_bug.cgi?id=194346

Unreviewed performance fix.

  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm: (didStartProvisionalLoadForFrame): (didReceiveServerRedirectForProvisionalLoadForFrame): (didFinishLoadForFrame): (globalObjectIsAvailableForFrame): (didRemoveFrameFromHierarchy): (didCommitLoadForFrame): (didFinishDocumentLoadForFrame): (didFailProvisionalLoadWithErrorForFrame): (didFailLoadWithErrorForFrame): (didSameDocumentNavigationForFrame): (didLayoutForFrame): (didReachLayoutMilestone): (didFirstVisuallyNonEmptyLayoutForFrame): (didHandleOnloadEventsForFrame): (userAgentForURL): (setUpPageLoaderClient): (willSendRequestForFrame): (didInitiateLoadForResource): (didFinishLoadForResource): (didFailLoadForResource): (setUpResourceLoadClient): (-[WKWebProcessPlugInBrowserContextController setLoadDelegate:]): (ResourceLoadClient::ResourceLoadClient): Deleted. (ResourceLoadClient::loadDelegate const): Deleted. (ResourceLoadClient::pluginContextController const): Deleted. (PageLoaderClient::PageLoaderClient): Deleted. (PageLoaderClient::loadDelegate const): Deleted. (PageLoaderClient::pluginContextController const): Deleted. (PageLoaderClient::didStartProvisionalLoadForFrame): Deleted. (PageLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame): Deleted. (PageLoaderClient::didFinishLoadForFrame): Deleted. (PageLoaderClient::globalObjectIsAvailableForFrame): Deleted. (PageLoaderClient::didRemoveFrameFromHierarchy): Deleted. (PageLoaderClient::didCommitLoadForFrame): Deleted. (PageLoaderClient::didFinishDocumentLoadForFrame): Deleted. (PageLoaderClient::didFailProvisionalLoadWithErrorForFrame): Deleted. (PageLoaderClient::didFailLoadWithErrorForFrame): Deleted. (PageLoaderClient::didSameDocumentNavigationForFrame): Deleted. (PageLoaderClient::didLayoutForFrame): Deleted. (PageLoaderClient::didReachLayoutMilestone): Deleted. (PageLoaderClient::didFirstVisuallyNonEmptyLayoutForFrame): Deleted. (PageLoaderClient::layoutMilestones const): Deleted. (PageLoaderClient::didHandleOnloadEventsForFrame): Deleted. (PageLoaderClient::userAgentForURL const): Deleted. (ResourceLoadClient::willSendRequestForFrame): Deleted. (ResourceLoadClient::didInitiateLoadForResource): Deleted. (ResourceLoadClient::didFinishLoadForResource): Deleted. (ResourceLoadClient::didFailLoadForResource): Deleted.

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

3:36 PM Changeset in webkit [241157] by Alan Coon
  • 3 edits in branches/safari-607-branch/Source/WebCore

Cherry-pick r241022. rdar://problem/47893580

CoreAudioCaptureSource should not configure its audio unit until it starts producing data
https://bugs.webkit.org/show_bug.cgi?id=194310

Reviewed by Eric Carlson.

Delay the configuration of the audio unit until the source is instructed to start producing data.
This allows the UIProcess to not start changing the audio unit when
checking for constraints during getUserMedia call before the prompt.
Covered by manual testing.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp: (WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource): (WebCore::CoreAudioCaptureSource::initializeToStartProducingData): (WebCore::CoreAudioCaptureSource::startProducingData):
  • platform/mediastream/mac/CoreAudioCaptureSource.h:

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

3:36 PM Changeset in webkit [241156] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebCore

Cherry-pick r241021. rdar://problem/47893607

Disable audio ducking at Audio Unit setup time
https://bugs.webkit.org/show_bug.cgi?id=194303

Reviewed by Eric Carlson.

When creating a CoreAudioCaptureSource, the audio unit might be
reconfigured if a past audio capture was done.
This might trigger audio ducking which is undone in startInternal.
In some cases, startInternal will never call start.
In that case, the audio unit will continue ducking the other processing.
To ensure ducking is disabled, unduck in setupAudioUnit as well as startInternal.

In addition to that, once a shared unit is created, it stays alive until the UIProcess exits.
This might affect all applications.
Instead, whenever the shared unit is stopped, clean it so as to restore the state as if no capture ever happened.
This has noticeable effects in the quality of audio being played on bluetooth devices.

Covered by manual tests.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp: (WebCore::CoreAudioSharedUnit::setupAudioUnit): (WebCore::CoreAudioSharedUnit::unduck): (WebCore::CoreAudioSharedUnit::startInternal): (WebCore::CoreAudioSharedUnit::captureFailed): (WebCore::CoreAudioSharedUnit::stopProducingData):

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

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

Cherry-pick r241018. rdar://problem/47893623

RELEASE_ASSERT(!m_document.isResolvingTreeStyle()) in com.apple.WebKit.WebContent at WebCore: WebCore::StyleResolver::~StyleResolver
https://bugs.webkit.org/show_bug.cgi?id=194333
<rdar://problem/47822929>

Reviewed by Zalan Bujtas.

Source/WebCore:

Content extensions may mutate the extension stylesheet in the middle of a style resolution as a result of
the legacy animation code triggering a resource load.

Test: http/tests/contentextensions/css-display-none-keyframe.html

  • style/StyleScope.cpp: (WebCore::Style::Scope::scheduleUpdate):

Avoid clearing the style resolver if we are in the middle of a style resolution.
A better fix that avoid doing this in the first place is tracked by https://bugs.webkit.org/show_bug.cgi?id=194335.

LayoutTests:

  • http/tests/contentextensions/css-display-none-keyframe-expected.txt: Added.
  • http/tests/contentextensions/css-display-none-keyframe.html: Added.
  • http/tests/contentextensions/css-display-none-keyframe.html.json: Added.

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

3:36 PM Changeset in webkit [241154] by Alan Coon
  • 22 edits in branches/safari-607-branch

Cherry-pick r240808. rdar://problem/47774548

Revert r238819 which is unneeded and caused a performance regression.
https://bugs.webkit.org/show_bug.cgi?id=192272
<rdar://problem/46664625>

Source/WebCore:

  • loader/EmptyFrameLoaderClient.h:
  • loader/FrameLoader.cpp: (WebCore::FrameLoader::prepareForLoadStart): (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
  • loader/FrameLoader.h:
  • loader/FrameLoaderClient.h:

Source/WebKit:

  • WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h: (API::InjectedBundle::PageLoaderClient::didStartProvisionalLoadForFrame):
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
  • WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm: (PageLoaderClient::didStartProvisionalLoadForFrame):
  • WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: (WebKit::InjectedBundlePageLoaderClient::didStartProvisionalLoadForFrame):
  • WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebFrameLoaderClient.h:
  • WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::dispatchDidStartProvisionalLoad):

Source/WebKitLegacy/win:

  • WebCoreSupport/WebFrameLoaderClient.cpp: (WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
  • WebCoreSupport/WebFrameLoaderClient.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ParserYieldTokenPlugIn.mm: (-[ParserYieldTokenPlugIn webProcessPlugInBrowserContextController:didCommitLoadForFrame:]): (-[ParserYieldTokenPlugIn webProcessPlugInBrowserContextController:willStartProvisionalLoadForFrame:completionHandler:]): Deleted.

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

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

Cherry-pick r239967. rdar://problem/47776476

Bulgarian TLD should not punycode-encode URLs with Bulgarian Cyrillic characters
https://bugs.webkit.org/show_bug.cgi?id=193411
<rdar://problem/47215929>

Reviewed by Alexey Proskuryakov.

Source/WTF:

  • wtf/cocoa/NSURLExtras.mm: (WTF::allCharactersAllowedByTLDRules):

LayoutTests:

  • fast/url/user-visible/cyrillic-NFD-expected.txt:
  • fast/url/user-visible/cyrillic-NFD.html:

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

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

Cherry-pick r239831. rdar://problem/47776468

[css-grid] Let abspos items reference implicit grid lines
https://bugs.webkit.org/show_bug.cgi?id=193313

Patch by Oriol Brufau <Oriol Brufau> on 2019-01-10
Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Import test changes from WPT.

  • web-platform-tests/css/css-grid/abspos/grid-positioned-items-padding-001.html:
  • web-platform-tests/css/css-grid/abspos/grid-positioned-items-unknown-named-grid-line-001.html:

Source/WebCore:

While they can't create new implicit grid lines, abspos items
can reference existing ones as clarified in
https://github.com/w3c/csswg-drafts/commit/511bb63

This patch makes WebKit match Blink, Firefox and Edge.

Tests: web-platform-tests/css/css-grid/abspos/grid-positioned-items-padding-001.html

web-platform-tests/css/css-grid/abspos/grid-positioned-items-unknown-named-grid-line-001.html

  • rendering/RenderGrid.cpp: (WebCore::RenderGrid::populateExplicitGridAndOrderIterator const): Remove argument from spanSizeForAutoPlacedItem call. (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid const): Remove argument from spanSizeForAutoPlacedItem call. (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid const): Remove argument from spanSizeForAutoPlacedItem call. (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid const): Remove argument from spanSizeForAutoPlacedItem call. (WebCore::RenderGrid::gridAreaBreadthForOutOfFlowChild): Don't treat implicit grid lines as 'auto'.
  • rendering/RenderGrid.h: Remove unused gridPositionIsAutoForOutOfFlow.
  • rendering/style/GridPositionsResolver.cpp: (WebCore::adjustGridPositionsFromStyle): Don't treat implicit grid lines as 'auto'. Remove unused gridContainerStyle parameter. (WebCore::GridPositionsResolver::spanSizeForAutoPlacedItem): Remove argument from adjustGridPositionsFromStyle call. Remove unused gridContainerStyle parameter. (WebCore::resolveGridPositionFromStyle): Remove unnecessary assert that uses isValidNamedLineOrArea. (WebCore::GridPositionsResolver::resolveGridPositionsFromStyle): Remove argument from adjustGridPositionsFromStyle call.
  • rendering/style/GridPositionsResolver.h: Remove unused isValidNamedLineOrArea. Remove unused parameter from spanSizeForAutoPlacedItem.

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

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

Cherry-pick r239697. rdar://problem/47776479

Web Inspector: Remote inspector can crash if attempting to navigate inspector page
https://bugs.webkit.org/show_bug.cgi?id=193204
<rdar://problem/45550428>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2019-01-07
Reviewed by Devin Rousso.

  • UIProcess/mac/RemoteWebInspectorProxyMac.mm: (WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow):
  • UIProcess/mac/WKInspectorViewController.mm: (-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]):

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

3:34 PM Changeset in webkit [241150] by timothy@apple.com
  • 11 edits in trunk

Overflow element scrollbar is light for dark mode content.
https://bugs.webkit.org/show_bug.cgi?id=194407
rdar://problem/45991585

Reviewed by Beth Dakin.

Source/WebCore:

Tested by css-dark-mode/supported-color-schemes-scrollbar.html.

  • page/ChromeClient.h:

(WebCore::FrameView::preferredScrollbarOverlayStyle): Return WTF::nullopt by default to avoid
short-circuiting auto detection in recalculateScrollbarOverlayStyle() for clients, like WK1,
that do not implement preferredScrollbarOverlayStyle().

  • page/FrameView.cpp:

(WebCore::FrameView::recalculateScrollbarOverlayStyle): Use WTF::nullopt in the false case
to auto detect overlay style when page() is null.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::useDarkAppearance const): Added.

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

(WebCore::Internals::scrollbarOverlayStyle const): Added Node argument.
(WebCore::Internals::scrollbarUsingDarkAppearance const): Added.

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

LayoutTests:

Updated tests to look at overflow elements and if dark apearance
is used by the scrollbar directly.

  • css-dark-mode/supported-color-schemes-scrollbar-expected.txt:
  • css-dark-mode/supported-color-schemes-scrollbar.html:
3:23 PM Changeset in webkit [241149] by Alan Coon
  • 1 copy in tags/Safari-607.1.33

Tag Safari-607.1.33.

2:58 PM Changeset in webkit [241148] by eric.carlson@apple.com
  • 34 edits in trunk/Source

[MSE] Convert debug-only logging to runtime logging
https://bugs.webkit.org/show_bug.cgi?id=194348
<rdar://problem/47566449>

Reviewed by Jer Noble.

Source/WebCore:

No new tests, this just changes existing logging.

  • Modules/mediasource/MediaSource.cpp:

(WebCore::convertEnumerationToString):
(WebCore::MediaSource::MediaSource):
(WebCore::MediaSource::~MediaSource):
(WebCore::MediaSource::setPrivateAndOpen):
(WebCore::MediaSource::addedToRegistry):
(WebCore::MediaSource::removedFromRegistry):
(WebCore::MediaSource::durationChanged):
(WebCore::MediaSource::seekToTime):
(WebCore::MediaSource::completeSeek):
(WebCore::MediaSource::setLiveSeekableRange):
(WebCore::MediaSource::clearLiveSeekableRange):
(WebCore::MediaSource::setDuration):
(WebCore::MediaSource::setDurationInternal):
(WebCore::MediaSource::setReadyState):
(WebCore::MediaSource::endOfStream):
(WebCore::MediaSource::streamEndedWithError):
(WebCore::MediaSource::addSourceBuffer):
(WebCore::MediaSource::removeSourceBuffer):
(WebCore::MediaSource::isTypeSupported):
(WebCore::MediaSource::detachFromElement):
(WebCore::MediaSource::attachToElement):
(WebCore::MediaSource::openIfInEndedState):
(WebCore::MediaSource::suspend):
(WebCore::MediaSource::resume):
(WebCore::MediaSource::stop):
(WebCore::MediaSource::onReadyStateChange):
(WebCore::MediaSource::scheduleEvent):
(WebCore::MediaSource::logChannel const):
(WebCore::MediaSourceInternal::toString): Deleted.

  • Modules/mediasource/MediaSource.h:

(WTF::LogArgument<WebCore::MediaSource::EndOfStreamError>::toString):
(WTF::LogArgument<WebCore::MediaSource::ReadyState>::toString):

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::SourceBuffer):
(WebCore::SourceBuffer::~SourceBuffer):
(WebCore::SourceBuffer::remove):
(WebCore::SourceBuffer::seekToTime):
(WebCore::SourceBuffer::appendBufferInternal):
(WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveRenderingError):
(WebCore::removeSamplesFromTrackBuffer):
(WebCore::SourceBuffer::removeCodedFrames):
(WebCore::SourceBuffer::evictCodedFrames):
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
(WebCore::SourceBuffer::sourceBufferPrivateReenqueSamples):
(WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
(WebCore::SourceBuffer::provideMediaData):
(WebCore::SourceBuffer::trySignalAllSamplesInTrackEnqueued):
(WebCore::SourceBuffer::monitorBufferingRate):
(WebCore::SourceBuffer::logChannel const):

  • Modules/mediasource/SourceBuffer.h:
  • dom/Document.cpp:

(WebCore::messageSourceForWTFLogChannel):
(WebCore::Document::didLogMessage):

  • html/HTMLMediaElement.cpp:

(WebCore::convertEnumerationToString):
(WebCore::HTMLMediaElement::scheduleCheckPlaybackTargetCompatability):
(WebCore::HTMLMediaElement::selectMediaResource):
(WebCore::HTMLMediaElement::loadResource):
(WebCore::HTMLMediaElement::updateActiveTextTrackCues):
(WebCore::HTMLMediaElement::scheduleConfigureTextTracks):
(WebCore::HTMLMediaElement::scheduleMediaEngineWasUpdated):
(WebCore::HTMLMediaElement::scheduleUpdatePlayState):
(WebCore::HTMLMediaElement::scheduleUpdateMediaState):

  • platform/ContentType.cpp:

(WebCore::ContentType::toJSONString const):

  • platform/ContentType.h:

(WTF::LogArgument<WebCore::ContentType>::toString):

  • platform/MediaSample.h:

(WebCore::MediaSample::toJSONString const):
(WTF::LogArgument<WebCore::MediaSample>::toString):

  • platform/graphics/FloatSize.cpp:

(WebCore::FloatSize::toJSONObject const):
(WebCore::FloatSize::toJSONString const):

  • platform/graphics/FloatSize.h:

(WTF::LogArgument<WebCore::FloatSize>::toString):

  • platform/graphics/MediaSourcePrivate.h:

(WebCore::MediaSourcePrivate::mediaSourceLogIdentifier):
(WTF::LogArgument<WebCore::MediaSourcePrivate::AddStatus>::toString):
(WTF::LogArgument<WebCore::MediaSourcePrivate::EndOfStreamStatus>::toString):

  • platform/graphics/SourceBufferPrivate.h:

(WebCore::SourceBufferPrivate::sourceBufferLogger const):
(WebCore::SourceBufferPrivate::sourceBufferLogIdentifier):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::setMuted):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setClosedCaptionsVisible):
(WebCore::MediaPlayerPrivateAVFoundationObjC::isCurrentPlaybackTargetWireless const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessVideoPlaybackDisabled const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessVideoPlaybackDisabled):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldBufferData):

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

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::mediaPlayerLogIdentifier):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::mediaPlayerLogger):
(WTF::LogArgument<WebCore::MediaPlayerPrivateMediaSourceAVFObjC::SeekState>::toString):

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

(WebCore::convertEnumerationToString):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::play):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pause):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pauseInternal):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVolume):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setMuted):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVisible):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::waitForSeekCompleted):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekCompleted):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setPreservesPitch):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableVideoFrame):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateAllRenderersHaveAvailableSamples):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationChanged):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setNaturalSize):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::outputObscuredDueToInsufficientExternalProtectionChanged):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cdmInstanceAttached):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cdmInstanceDetached):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::attemptToDecryptWithInstance):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::waitingForKeyChanged):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::initializationDataEncountered):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setReadyState):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setNetworkState):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setShouldPlayToPlaybackTarget):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isCurrentPlaybackTargetWireless const):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::logChannel const):

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

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample):

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

(WebCore::MediaSampleAVFObjC::toJSONString const):

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

(WebCore::MediaSourcePrivateAVFObjC::MediaSourcePrivateAVFObjC):
(WebCore::MediaSourcePrivateAVFObjC::~MediaSourcePrivateAVFObjC):
(WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer):
(WebCore::MediaSourcePrivateAVFObjC::logChannel const):

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

(WebCore::bufferWasConsumedCallback):
(WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
(WebCore::SourceBufferPrivateAVFObjC::didFailToParseStreamDataWithError):
(WebCore::SourceBufferPrivateAVFObjC::processCodedFrame):
(WebCore::SourceBufferPrivateAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::append):
(WebCore::SourceBufferPrivateAVFObjC::abort):
(WebCore::SourceBufferPrivateAVFObjC::resetParserState):
(WebCore::SourceBufferPrivateAVFObjC::removedFromMediaSource):
(WebCore::SourceBufferPrivateAVFObjC::setReadyState):
(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
(WebCore::SourceBufferPrivateAVFObjC::setCDMSession):
(WebCore::SourceBufferPrivateAVFObjC::setCDMInstance):
(WebCore::SourceBufferPrivateAVFObjC::layerDidReceiveError):
(WebCore::SourceBufferPrivateAVFObjC::outputObscuredDueToInsufficientExternalProtectionChanged):
(WebCore::SourceBufferPrivateAVFObjC::flush):
(WebCore::SourceBufferPrivateAVFObjC::flushVideo):
(WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
(WebCore::SourceBufferPrivateAVFObjC::bufferWasConsumed):
(WebCore::SourceBufferPrivateAVFObjC::setActive):
(WebCore::SourceBufferPrivateAVFObjC::willSeek):
(WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples):
(WebCore::SourceBufferPrivateAVFObjC::canSwitchToType):
(WebCore::SourceBufferPrivateAVFObjC::setDecompressionSession):
(WebCore::SourceBufferPrivateAVFObjC::logChannel const):

Source/WTF:

  • wtf/LoggerHelper.h:

(WTF::LoggerHelper::childLogIdentifier const): Helper to generate a log identifier for an
object that is associated with another logging object.

  • wtf/MediaTime.cpp:

(WTF::MediaTime::toJSONObject const):
(WTF::MediaTime::toJSONString const):
(WTF::MediaTimeRange::toJSONString const):
(WTF::toJSONStringInternal): Deleted.

  • wtf/MediaTime.h:
2:57 PM Changeset in webkit [241147] by Jonathan Bedard
  • 2 edits in trunk/Tools

webkitpy: Respect --dedicated-simulators flag
https://bugs.webkit.org/show_bug.cgi?id=194416
<rdar://problem/47894722>

Reviewed by Lucas Forschler.

  • Scripts/webkitpy/port/device_port.py:

(DevicePort.supported_device_types): If --dedicated-simulators is passed, all
available devices can be safely ignored.

2:56 PM Changeset in webkit [241146] by Wenson Hsieh
  • 11 edits
    1 add in trunk/Source/WebKit

[iOS] [WK2] Modernize autocorrection context code
https://bugs.webkit.org/show_bug.cgi?id=194373

Reviewed by Tim Horton.

  • Shared/ios/WebAutocorrectionContext.h: Added.

(WebKit::WebAutocorrectionContext::encode const):
(WebKit::WebAutocorrectionContext::decode):

Introduce a WebAutocorrectionContext struct that encapsulates the individual pieces of autocorrection context.
Change to use this instead of a long list of arguments when propagating autocorrection context information over
IPC.

  • UIProcess/AutoCorrectionCallback.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
(+[WKAutocorrectionContext autocorrectionContextWithContext:]):
(+[WKAutocorrectionContext autocorrectionContextWithData:markedText:selectedText:afterText:selectedRangeInMarkedText:]): Deleted.

Change this constructor to take an entire WebAutocorrectionContext.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::autocorrectionContextCallback):
(WebKit::WebPageProxy::requestAutocorrectionContext):
(WebKit::WebPageProxy::autocorrectionContextSync):
(WebKit::WebPageProxy::getAutocorrectionContext): Deleted.

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Use Delayed instead of LegacySync.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::autocorrectionContext):

Renamed from computeAutocorrectionContext. This is now a private method on WebPage that uses the focused or main
frame to compute and return a WebAutocorrectionContext.

(WebKit::WebPage::requestAutocorrectionContext):
(WebKit::WebPage::autocorrectionContextSync):

Renamed getAutocorrectionContext to autocorrectionContextSync.

(WebKit::computeAutocorrectionContext): Deleted.
(WebKit::WebPage::getAutocorrectionContext): Deleted.

2:52 PM Changeset in webkit [241145] by youenn@apple.com
  • 18 edits in trunk/Source

Simplify applyConstraints callbacks
https://bugs.webkit.org/show_bug.cgi?id=194297

Reviewed by Eric Carlson.

Source/WebCore:

Make use of one callback for both success and failure cases.
No changed of behavior.

  • Modules/mediastream/MediaStreamTrack.cpp:

(WebCore::MediaStreamTrack::applyConstraints):

  • platform/mediastream/MediaStreamTrackPrivate.cpp:

(WebCore::MediaStreamTrackPrivate::applyConstraints):

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

(WebCore::RealtimeMediaSource::applyConstraints):

  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoCaptureSource::create):

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSource::create):

  • platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.cpp:

(WebCore::MockGStreamerAudioCaptureSource::applyConstraints):

  • platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.h:
  • platform/mediastream/gstreamer/MockGStreamerVideoCaptureSource.cpp:

(WebCore::MockGStreamerVideoCaptureSource::applyConstraints):

  • platform/mediastream/gstreamer/MockGStreamerVideoCaptureSource.h:

Source/WebKit:

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::applyConstraints):

  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::Source::applyConstraintsSucceeded):
(WebKit::UserMediaCaptureManager::Source::applyConstraintsFailed):
(WebKit::UserMediaCaptureManager::applyConstraintsFailed):

  • WebProcess/cocoa/UserMediaCaptureManager.h:
2:15 PM Changeset in webkit [241144] by Nikita Vasilyev
  • 2 edits in trunk/LayoutTests

Web Inspector: Fix modify-css-property-race.html flakiness
https://bugs.webkit.org/show_bug.cgi?id=194408

Reviewed by Devin Rousso.

Event listener wasn't removed property, sometimes causing it to fire one more time.

  • inspector/css/modify-css-property-race.html:
2:11 PM Changeset in webkit [241143] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

Permit additional IOKit Properties needed by Media PlugIns on older Mac Hardware
https://bugs.webkit.org/show_bug.cgi?id=194412
<rdar://problem/47820615>

Reviewed by Per Arne Vollan.

  • PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
2:04 PM Changeset in webkit [241142] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

Permit additional IOKit Properties needed by older Mac Hardware
https://bugs.webkit.org/show_bug.cgi?id=194410
<rdar://problem/47820620>

Reviewed by Per Arne Vollan.

  • WebProcess/com.apple.WebProcess.sb.in:
1:25 PM Changeset in webkit [241141] by beidson@apple.com
  • 3 edits in trunk/Source/WebKit

Rename the TAKE_DOWNLOAD_ASSERTION macro.

Rubberstamped by Andy Estes.

  • NetworkProcess/Downloads/DownloadMap.cpp:
  • NetworkProcess/Downloads/DownloadMap.h:
12:20 PM Changeset in webkit [241140] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix more doesGC() for CheckTraps, GetMapBucket, and Switch nodes.
https://bugs.webkit.org/show_bug.cgi?id=194399
<rdar://problem/47889777>

Reviewed by Yusuke Suzuki.

Fix doesGC() for the following nodes:

CheckTraps:

We normally will not emit this node because Options::usePollingTraps() is
false by default. However, as it is implemented now, CheckTraps can GC
because it can allocate a TerminatedExecutionException. If we make the
TerminatedExecutionException a singleton allocated at initialization time,
doesGC() can return false for CheckTraps.
https://bugs.webkit.org/show_bug.cgi?id=194323

GetMapBucket:

Can call operationJSMapFindBucket() or operationJSSetFindBucket(),
which calls HashMapImpl::findBucket(), which calls jsMapHash(), which
can resolve a rope.

Switch:

If switchData kind is SwitchChar, can call operationResolveRope() .
If switchData kind is SwitchString and the child use kind is not StringIdentUse,

can call operationSwitchString() which resolves ropes.

DirectTailCall:
ForceOSRExit:
Return:
TailCallForwardVarargs:
TailCallVarargs:
Throw:

These are terminal nodes. It shouldn't really matter what doesGC() returns
for them, but following our conservative practice, unless we have a good
reason for doesGC() to return false, we should just return true.

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

12:19 PM Changeset in webkit [241139] by Kocsen Chung
  • 16 edits in branches/safari-608.1.5.1-branch/Source

Cherry-pick r241113. rdar://problem/47805607

Unreviewed, rolling out r240759 and r240944.

Some timer uses are done off the main thread, WebCore::Timer
cannot be used

Reverted changesets:

"<rdar://problem/47570443> Responsiveness timers are too
expensive for frequent events"
https://bugs.webkit.org/show_bug.cgi?id=194003
https://trac.webkit.org/changeset/240759

"Use deferrable timer to restart the Responsiveness Timer on
each wheel event"
https://bugs.webkit.org/show_bug.cgi?id=194135
https://trac.webkit.org/changeset/240944

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

12:19 PM Changeset in webkit [241138] by Kocsen Chung
  • 13 edits in branches/safari-608.1.5.1-branch/Source

Cherry-pick r240944. rdar://problem/47805607

Use deferrable timer to restart the Responsiveness Timer on each wheel event
https://bugs.webkit.org/show_bug.cgi?id=194135
Source/WebCore:

<rdar://problem/47724099>

Reviewed by Simon Fraser.

The original DeferrableOneShotTimer was not really deferrable.
What it allows is to restart the count down from scratch after
firing.

For this optimization, I want to keep the correct timing but avoid
starting a real timer every time.

I renamed DeferrableOneShotTimer to ResettableOneShotTimer and
created a real DeferrableOneShotTimer that support deadlines.

  • css/CSSImageGeneratorValue.cpp:
  • html/HTMLPlugInImageElement.h:
  • loader/cache/CachedResource.h:
  • platform/Timer.cpp: (WebCore::DeferrableOneShotTimer::startOneShot): (WebCore::DeferrableOneShotTimer::fired):
  • platform/Timer.h: (WebCore::TimerBase::nextFireTime const): (WebCore::ResettableOneShotTimer::ResettableOneShotTimer): (WebCore::DeferrableOneShotTimer::DeferrableOneShotTimer): (WebCore::DeferrableOneShotTimer::stop): (WebCore::DeferrableOneShotTimer::restart): Deleted.
  • platform/graphics/ca/TileController.h:
  • platform/graphics/cg/SubimageCacheWithTimer.h:

Source/WebKit:

Reviewed by Simon Fraser.

Simon Fraser suggested a neat improvement over my previous optimization
of ResponsivenessTimer.

Instead of reseting the deadline with every event, we can let the timer
fire and add the missing time from the last start.

I implemented that behavior in the new Deferrable Timer class and use
it from ResponsivenessTimer.

  • NetworkProcess/watchos/NetworkProximityAssertion.h:
  • UIProcess/ResponsivenessTimer.h:
  • WebProcess/Plugins/PluginView.h:

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

12:14 PM Changeset in webkit [241137] by youenn@apple.com
  • 5 edits
    2 adds in trunk

Unable to sign in leetcode.
https://bugs.webkit.org/show_bug.cgi?id=194366
rdar://problem/47259025.

Reviewed by Chris Dumez.

Source/WebCore:

In case a signal is passed as part of a FetchRequestInit,
the IDL binding code is throwing an exception in case signal is not an AbortSignal object.
This breaks an AbortSignal shim used in some web sites.
Relaxed the IDL binding rule by marking signal as any and doing the conversion in FetchRequest.

Test: http/wpt/fetch/request-abort.html
Also covered by manually signing in to leetcode.

  • Modules/fetch/FetchRequest.cpp:

(WebCore::FetchRequest::initializeWith):

  • Modules/fetch/FetchRequestInit.h:

(WebCore::FetchRequestInit::hasMembers const):

  • Modules/fetch/FetchRequestInit.idl:

LayoutTests:

  • http/wpt/fetch/request-abort-expected.txt: Added.
  • http/wpt/fetch/request-abort.html: Added.
11:42 AM Changeset in webkit [241136] by Kocsen Chung
  • 7 edits in branches/safari-608.1.5.1-branch/Source

Versioning.

11:26 AM Changeset in webkit [241135] by Keith Rollin
  • 7 edits
    1 add
    11 deletes in trunk/Source/WebKit

Fix XCBuild issue related to codesigning WebContent process
https://bugs.webkit.org/show_bug.cgi?id=193799
<rdar://problem/47533890>

Reviewed by Brent Fulgham.

Building with XCBuild enabled results in the error message "cannot
read entitlement data" when trying to codesign the macOS XPC
processes. The reason for this error message is that there is a build
step that deletes any previous "stale" generated .xcent file before
building up a new one. With XCBuild enabled, the build steps got
re-ordered, such that the step that deletes this file could get
executed after the steps that build up the file. The built-up set of
entitlements is now gone, and the build process fails when codesign
tries to access it.

The apparent quick-fix to this problem -- of tweaking dependencies so
that the build steps execute in the desired order -- wouldn't work
with XCBuild. Establishing these dependencies would require both
having multiple build phases produce the same .xcent file as output,
as well as a build phase that has this file as an input and an output.
XCBuild either forbids or frowns upon these configurations.

Ultimately, the solution that worked was to take over complete control
of the codesigning process. This means (a) not specifying a base
.entitlements file that XCode uses to start with (and which was
subsequently altered via custom build scripts), (b) not letting XCode
automatically and silently inject a 'get-task-all' entitlement used to
facilitate debugging (we now add that entitlement by hand), and (c)
building up all of our entitlements by hand via a single custom
script. Because of the addition of this custom script, many other
scripts and entitlements files could now be removed.

  • Configurations/BaseXPCService.xcconfig:
  • Configurations/Databases-iOS.entitlements: Removed.
  • Configurations/Network-OSX-restricted.entitlements: Removed.
  • Configurations/Network-OSX-sandbox.entitlements: Removed.
  • Configurations/Network-OSX.entitlements: Removed.
  • Configurations/NetworkService.xcconfig:
  • Configurations/PluginService.64.xcconfig:
  • Configurations/PluginService.entitlements: Removed.
  • Configurations/WebContent-OSX-sandbox.entitlements: Removed.
  • Configurations/WebContent-OSX.entitlements: Removed.
  • Configurations/WebContent-or-Plugin-OSX-restricted.entitlements: Removed.
  • Configurations/WebContentService.xcconfig:
  • Scripts/copy-webcontent-resources-to-private-headers.sh:
  • Scripts/process-entitlements.sh: Added.
  • Scripts/process-network-sandbox-entitlements.sh: Removed.
  • Scripts/process-webcontent-or-plugin-entitlements.sh: Removed.
  • Scripts/process-webcontent-sandbox-entitlements.sh: Removed.
  • WebKit.xcodeproj/project.pbxproj:
11:24 AM Changeset in webkit [241134] by Keith Rollin
  • 2 edits
    1 delete in trunk/Tools

Remove extra copy of 100x100-red.tga
https://bugs.webkit.org/show_bug.cgi?id=194371
<rdar://problem/47873465>

Reviewed by Said Abou-Hallawa.

In order to help it pass its tests, Bug 194190 added a second copy of
the file 100x100-red.tga. However, it turns out that this additional
file wasn't actually needed, and that that sole previous copy was
sufficient. At the same time, this second copy -- which was copied to
the same location in the build output as the first copy -- now caused
XCBuild to complain because there were two production rules for the
same output file. Address this by removing the newly-added extra copy.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/mac/100x100-red.tga: Removed.
11:21 AM Changeset in webkit [241133] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Fix internal build after r241127
https://bugs.webkit.org/show_bug.cgi?id=191394

  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:

Add some (un)availability macros.

11:20 AM Changeset in webkit [241132] by youenn@apple.com
  • 11 edits in trunk/Source

Make to clear sources from UserMediaCaptureManagerProxy and UserMediaCaptureManager when no longer needed
https://bugs.webkit.org/show_bug.cgi?id=194312

Reviewed by Eric Carlson.

Source/WebCore:

Add a way for sources to know when they are ended, i.e. that they will never be started again.
No observable change of behavior.

  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::requestStop):

  • platform/mediastream/RealtimeMediaSource.h:

Source/WebKit:

Sources in UserMediaCaptureManager and Proxy are never removed once added to their HashMap.
Use the 'ended' mechanism to do the clean-up on WebProcess side.
As part of this clean-up, send IPC to UIProcess to do clean-up on proxy side.
On WebProcess crash case, clean-up the proxy as well.

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):
(WebKit::UserMediaCaptureManagerProxy::end):
(WebKit::UserMediaCaptureManagerProxy::clear):

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch):

  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::sourceEnded):

  • WebProcess/cocoa/UserMediaCaptureManager.h:
11:01 AM Changeset in webkit [241131] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Print backgrounds preference should be honored instead of WKWebViewConfiguration value
https://bugs.webkit.org/show_bug.cgi?id=194364
<rdar://problem/47627599>

Reviewed by Tim Horton.

Without this patch, changing the preference for printing the background has no effect.
This patch fixes that, and I verified it manually by checking "Print backgrounds" in Safari's print menu.
Unfortunately, the only way to test this is actually printing because only values from WebPageProxy::preferences
or WebPageProxy::configuration's preferences are exposed to the API, but values from WebPageProxy::preferencesStore
are used when printing. Actually printing verifies this change fixes the bug.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):

10:59 AM Changeset in webkit [241130] by jer.noble@apple.com
  • 17 edits in trunk/Source/WebCore

HTMLMediaElement registers wrong ScriptExecutionContext with its ActiveDOMObject parent class
https://bugs.webkit.org/show_bug.cgi?id=194360

HTMLMediaElement registers the Document used to create it with ActiveDOMObject, when it should
really use that Document's contextDocument(). Rather than just fix this in HTMLMediaElement,
make sure that the correct document is used everywhere by adding a new ActiveDOMObject constructor
taking a Document&, and making an explicitly deleted Document* constructor to catch any new cases.

Reviewed by Geoffrey Garen.

  • Modules/applepay/ApplePaySession.cpp:

(WebCore::ApplePaySession::ApplePaySession):

  • Modules/mediarecorder/MediaRecorder.cpp:

(WebCore::MediaRecorder::MediaRecorder):

  • Modules/mediastream/MediaDevices.cpp:

(WebCore::MediaDevices::MediaDevices):

  • Modules/mediastream/UserMediaRequest.cpp:

(WebCore::UserMediaRequest::UserMediaRequest):

  • Modules/notifications/Notification.cpp:

(WebCore::Notification::Notification):

  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::PaymentRequest::PaymentRequest):

  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::AudioContext):

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::WebAnimation):

  • css/FontFaceSet.cpp:

(WebCore::FontFaceSet::FontFaceSet):

  • dom/ActiveDOMObject.cpp:

(WebCore::ActiveDOMObject::ActiveDOMObject):

  • dom/ActiveDOMObject.h:
  • dom/Document.h:

(WebCore::ActiveDOMObject::ActiveDOMObject):

  • html/HTMLMarqueeElement.cpp:

(WebCore::HTMLMarqueeElement::HTMLMarqueeElement):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::HTMLMediaElement):

  • html/HTMLSourceElement.cpp:

(WebCore::HTMLSourceElement::HTMLSourceElement):

  • page/IntersectionObserver.cpp:

(WebCore::IntersectionObserver::IntersectionObserver):

10:57 AM Changeset in webkit [241129] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Mark DisplayLink as fast allocated
https://bugs.webkit.org/show_bug.cgi?id=194400

Reviewed by Geoffrey Garen.

  • UIProcess/mac/DisplayLink.h:
10:53 AM Changeset in webkit [241128] by pvollan@apple.com
  • 5 edits in trunk/Source/WebKit

[macOS] API test times out after r241026
https://bugs.webkit.org/show_bug.cgi?id=194372

Reviewed by Alex Christensen.

The API test TestWebKitAPI.RenderingProgress.FirstMeaningfulPaint times out after r241026.
A new function pointer, layoutMilestones, is added to WKBundlePageLoaderClient, in order
for clients to decide which milestones they would like to listen for.

  • WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h:
  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:

(layoutMilestones):
(setUpPageLoaderClient):

  • WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:

(WebKit::InjectedBundlePageLoaderClient::layoutMilestones const):

  • WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
10:52 AM Changeset in webkit [241127] by achristensen@apple.com
  • 9 edits in trunk

Deprecate WKBundlePageSetDefersLoading
https://bugs.webkit.org/show_bug.cgi?id=191394

Reviewed by Dean Jackson.

Source/WebKit:

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

(WKBundlePageSetDefersLoading):

  • WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:

(-[WKWebProcessPlugInBrowserContextController _defersLoading]):
(-[WKWebProcessPlugInBrowserContextController _setDefersLoading:]):

  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:

Tools:

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setDefersLoading):

LayoutTests:

  • platform/wk2/TestExpectations:
10:36 AM Changeset in webkit [241126] by rmorisset@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

B3ReduceStrength: missing peephole optimizations for Neg and Sub
https://bugs.webkit.org/show_bug.cgi?id=194250

Reviewed by Saam Barati.

Adds the following optimizations for integers:

  • Sub(x, x) => 0

Already covered by the test testSubArg

  • Sub(x1, Neg(x2)) => Add (x1, x2)

Added test: testSubNeg

  • Neg(Sub(x1, x2)) => Sub(x2, x1)

Added test: testNegSub

  • Add(Neg(x1), x2) => Sub(x2, x1)

Added test: testAddNeg1

  • Add(x1, Neg(x2)) => Sub(x1, x2)

Added test: testAddNeg2

Adds the following optimization for floating point values:

  • Abs(Neg(x)) => Abs(x)

Added test: testAbsNegArg
Adds the following optimization:

Also did some trivial refactoring, using m_value->isInteger() everywhere instead of isInt(m_value->type()), and using replaceWithNew<Value> instead of replaceWithNewValue(m_proc.add<Value(..))

  • b3/B3ReduceStrength.cpp:
  • b3/testb3.cpp:

(JSC::B3::testAddNeg1):
(JSC::B3::testAddNeg2):
(JSC::B3::testSubNeg):
(JSC::B3::testNegSub):
(JSC::B3::testAbsAbsArg):
(JSC::B3::testAbsNegArg):
(JSC::B3::run):

10:24 AM Changeset in webkit [241125] by achristensen@apple.com
  • 3 edits in trunk/Source/WebKit

Digital crown should scroll safe browsing warning on watchOS
https://bugs.webkit.org/show_bug.cgi?id=194363
<rdar://problem/47348124>

Reviewed by Wenson Hsieh.

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

(-[WKSafeBrowsingWarning initWithFrame:safeBrowsingWarning:completionHandler:]):
(-[WKSafeBrowsingWarning addContent]):

10:22 AM Changeset in webkit [241124] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Shrink and hyphenate safe browsing warning text on watchOS
https://bugs.webkit.org/show_bug.cgi?id=194361
<rdar://problem/47466549>

Reviewed by Geoffrey Garen.

Some internationalizations use long words that didn't fit on small watches.

  • UIProcess/Cocoa/WKSafeBrowsingWarning.mm:

(fontOfSize):
(-[WKSafeBrowsingWarning addContent]):
(-[WKSafeBrowsingTextView initWithAttributedString:forWarning:]):

8:45 AM Changeset in webkit [241123] by Alan Bujtas
  • 5 edits
    2 adds in trunk

[LFC][Out-of-flow] Use the containing block's padding width when computing min/max width.
https://bugs.webkit.org/show_bug.cgi?id=194391

Reviewed by Antti Koivisto.

Source/WebCore:

The spec is not clear about this but that's what matches the current behaviour.

Test: fast/block/block-only/absolute-positioned-min-max-percentage-with-parent-padding.html

  • layout/FormattingContext.cpp:

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

Tools:

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

LayoutTests:

  • fast/block/block-only/absolute-positioned-min-max-percentage-with-parent-padding-expected.html: Added.
  • fast/block/block-only/absolute-positioned-min-max-percentage-with-parent-padding.html: Added.
8:33 AM Changeset in webkit [241122] by Alan Bujtas
  • 10 edits in trunk/Source/WebCore

[LFC] Use dedicated data structures for optional used values (input to geometry functions)
https://bugs.webkit.org/show_bug.cgi?id=194376

Reviewed by Antti Koivisto.

This is in preparation for being able to pass in the containing block's width as an optional used value.
During layout we always have a valid width for the containing block, however it's not the case while computing the preferred width.

  • layout/FormattingContext.cpp:

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

  • layout/FormattingContext.h:

(WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalGeometry): Deleted.
(WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry): Deleted.
(WebCore::Layout::FormattingContext::Geometry::floatingHeightAndMargin): Deleted.
(WebCore::Layout::FormattingContext::Geometry::floatingWidthAndMargin): Deleted.
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin): Deleted.
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin): Deleted.
(): Deleted.
(WebCore::Layout::FormattingContext::Geometry::complicatedCases): Deleted.
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry): Deleted.
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry): Deleted.
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry): Deleted.
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry): Deleted.
(WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeightAndMargin): Deleted.
(WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin): Deleted.
(WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin): Deleted.

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::complicatedCases):
(WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeightAndMargin):
(WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::floatingHeightAndMargin):
(WebCore::Layout::FormattingContext::Geometry::floatingWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):

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

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

  • layout/blockformatting/BlockFormattingContext.h:

(WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin): Deleted.

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):

  • layout/inlineformatting/InlineFormattingContext.cpp:

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

  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

(WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
(WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin):

  • page/FrameViewLayoutContext.cpp:

(WebCore::layoutUsingFormattingContext):

8:07 AM Changeset in webkit [241121] by Antti Koivisto
  • 6 edits in trunk/Source/WebCore

Infinite recursion via CachedResource::~CachedResource
https://bugs.webkit.org/show_bug.cgi?id=194378
<rdar://problem/42023295>

Reviewed by Daniel Bates.

I don't know the exact steps to trigger this but the mechanism seems clear.

1) An existing resource is removed from or replaced in CachedResourceLoader::m_documentResources map.
2) This decrements the handle count of resource and causes it be deleted.
3) CachedResource::~CachedResource calls m_owningCachedResourceLoader->removeCachedResource(*this). This only happens with

resources that are "owned" by CachedResourceLoader which is a rare special case (used by image document and if memory cache is disabled).

4) CachedResourceLoader::removeCachedResource looks up the resource from the map which causes a temporary CachedResourceHandle to be created.

This increments the handle count of the resource from 0 back to 1.

5) When the temporary dies, CachedResource::~CachedResource is called again and we cycle back to 3).

The fix here is simply to remove CachedResourceLoader::removeCachedResource call from ~CachedResource.
It is a leftover from when the map contained raw pointers instead of owning CachedResourceHandles.

Since m_documentResources map has a handle to the resource, the only way we are in the destructor is that the resource
has been removed from the map already (or is in process of being removed like in this crash). Any call that does anything
other than bail out is going to crash.

CachedResource::n_owningCachedResourceLoader member and CachedResourceLoader::removeCachedResource function only exist to
support this erranous call so they are removed as well.

  • loader/ImageLoader.cpp:

(WebCore::ImageLoader::updateFromElement):

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::~CachedResource):

This is the substantive change. The rest just removes now-dead code.

  • loader/cache/CachedResource.h:

(WebCore::CachedResource::setOwningCachedResourceLoader): Deleted.

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::~CachedResourceLoader):
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::loadResource):
(WebCore::CachedResourceLoader::garbageCollectDocumentResources):
(WebCore::CachedResourceLoader::removeCachedResource): Deleted.

  • loader/cache/CachedResourceLoader.h:
6:42 AM Changeset in webkit [241120] by magomez@igalia.com
  • 18 edits
    2 adds in trunk

[WPE] Implement GStreamer based holepunch
https://bugs.webkit.org/show_bug.cgi?id=193715

Reviewed by Xabier Rodriguez-Calvar.

.:

Add GSTREAMER_HOLEPUNCH option to the WPE port with a manual test to
check the feature.

  • ManualTests/wpe/video-player-holepunch.html: Added.
  • Source/cmake/OptionsWPE.cmake:

Source/WebCore:

Implement GStreamer based holepunch functionality. Instead of getting the video frames from the
video sink and drawing then, the player just draws a transparent rectangle on the position where
the video should be. MediaPlayerPrivateGStreamerBase will instantiate a platform dependant video
sink which will be in charge of displaying the video frames in some way (usually on a plane below
the browser), and will push empty frames to the compositor indicating that the rectangle to draw
should overwrite the existent content. TextureMapperPlatformLayerBuffer::HolePunchClient is used
to tell the video sink where to position the video so it's set below the browser transparent hole.

Added ManualTest wpe/video-player-holepunch.html to test the feature.

  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::shouldIgnoreIntrinsicSize):

  • platform/graphics/MediaPlayer.h:
  • platform/graphics/MediaPlayerPrivate.h:

(WebCore::MediaPlayerPrivateInterface::shouldIgnoreIntrinsicSize):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::naturalSize const):
(WebCore::MediaPlayerPrivateGStreamerBase::swapBuffersIfNeeded):
(WebCore::setRectangleToVideoSink):
(WebCore::GStreamerHolePunchClient::GStreamerHolePunchClient):
(WebCore::MediaPlayerPrivateGStreamerBase::createHolePunchVideoSink):
(WebCore::MediaPlayerPrivateGStreamerBase::pushNextHolePunchBuffer):
(WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
  • platform/graphics/texmap/TextureMapper.h:
  • platform/graphics/texmap/TextureMapperGL.cpp:

(WebCore::TextureMapperGL::drawSolidColor):

  • platform/graphics/texmap/TextureMapperGL.h:
  • platform/graphics/texmap/TextureMapperLayer.cpp:

(WebCore::TextureMapperLayer::paintSelf):

  • platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:

(WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper):

  • platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:

(WebCore::TextureMapperPlatformLayerBuffer::setHolePunchClient):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):

  • rendering/RenderVideo.cpp:

(WebCore::RenderVideo::videoBox const):

Source/WebKit:

Add a new parameter to the calls of TextureMapper::drawSolidColor().

  • Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:

(WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):

3:28 AM Changeset in webkit [241119] by magomez@igalia.com
  • 6 edits in trunk/LayoutTests

Unreviewed GTK+ gardening after r241117.

  • platform/gtk/TestExpectations:
  • platform/gtk/compositing/iframes/invisible-nested-iframe-show-expected.txt:
  • platform/gtk/compositing/iframes/resizer-expected.txt:
  • platform/gtk/compositing/rtl/rtl-iframe-absolute-expected.txt:
  • platform/gtk/compositing/rtl/rtl-iframe-relative-expected.txt:

Feb 6, 2019:

11:04 PM Changeset in webkit [241118] by Keith Rollin
  • 2 edits in trunk/Tools

Remove Info.plist from MobileMiniBrowser.framework's Copy Bundle Resources phase
https://bugs.webkit.org/show_bug.cgi?id=193975
<rdar://problem/47643306>

Reviewed by Tim Horton.

The MobileMiniBrowser.framework's Copy Bundle Resources phase copies
the Info.plist file into the bundle. This step is not necessary as the
implicit "bundle up all the build products into a framework" build
phase does this already. Having the Copy Bundle Resources phase do
this causes a conflict under XCBuild, which objects to two build
phases producing the same file (Info.plist). Address this by removing
Info.plist from the Copy Bundle Resources phase.

  • MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj:
9:51 PM Changeset in webkit [241117] by ysuzuki@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] Use BufferInternal single character StringImpl for SmallStrings
https://bugs.webkit.org/show_bug.cgi?id=194374

Reviewed by Geoffrey Garen.

Currently, we first create a large StringImpl, and create bunch of substrings with length = 1.
But pointer is larger than single character. BufferInternal StringImpl with single character
is more memory efficient.

  • runtime/SmallStrings.cpp:

(JSC::SmallStringsStorage::SmallStringsStorage):
(JSC::SmallStrings::SmallStrings):

  • runtime/SmallStrings.h:
9:39 PM Changeset in webkit [241116] by Alan Coon
  • 1 edit in branches/safari-607-branch/Source/WebCore/loader/FrameLoaderTypes.h

Unreviewed build fix. rdar://problem/47822019

9:18 PM Changeset in webkit [241115] by mitz@apple.com
  • 9 copies
    1 add in releases/Apple/Safari Technology Preview 75

Added a tag for Safari Technology Preview release 75.

8:26 PM Changeset in webkit [241114] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] InitializeEntrypointArguments should produce SpecCellCheck if FlushFormat is FlushedCell
https://bugs.webkit.org/show_bug.cgi?id=194369
<rdar://problem/47813087>

Reviewed by Saam Barati.

JSTests:

  • stress/initialize-entrypoint-arguments-with-tdz.js: Added.

(A):

Source/JavaScriptCore:

InitializeEntrypointArguments says SpecCell if the FlushFormat is FlushedCell. But this actually has
JSEmpty if it is TDZ. This incorrectly proved type information removes necessary CheckNotEmpty in
constant folding phase.

  • dfg/DFGAbstractInterpreterInlines.h:

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

7:13 PM Changeset in webkit [241113] by benjamin@webkit.org
  • 16 edits in trunk/Source

Unreviewed, rolling out r240759 and r240944.

Some timer uses are done off the main thread, WebCore::Timer
cannot be used

Reverted changesets:

"<rdar://problem/47570443> Responsiveness timers are too
expensive for frequent events"
https://bugs.webkit.org/show_bug.cgi?id=194003
https://trac.webkit.org/changeset/240759

"Use deferrable timer to restart the Responsiveness Timer on
each wheel event"
https://bugs.webkit.org/show_bug.cgi?id=194135
https://trac.webkit.org/changeset/240944

6:53 PM Changeset in webkit [241112] by Chris Fleizach
  • 2 edits in trunk/Source/WebKit

AX: com.apple.WebKit.WebContent at WebKit: -[WKAccessibilityWebPageObjectBase axObjectCache]
https://bugs.webkit.org/show_bug.cgi?id=194306
<rdar://problem/47764549>

Reviewed by Zalan Bujtas.

Check the page reference is still valid.
Modernize code in this area.

  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
4:42 PM Changeset in webkit [241111] by Keith Rollin
  • 3 edits in trunk/Source/WebCore

Update .xcfilelist files

Unreviewed build fix.

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
4:31 PM Changeset in webkit [241110] by Devin Rousso
  • 10 edits in trunk

Web Inspector: DOM: don't send the entire function string with each event listener
https://bugs.webkit.org/show_bug.cgi?id=194293
<rdar://problem/47822809>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • inspector/protocol/DOM.json:
  • runtime/JSFunction.h:

Export calculatedDisplayName.

Source/WebCore:

Test: inspector/dom/getEventListenersForNode.html

  • inspector/agents/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::buildObjectForEventListener):

Source/WebInspectorUI:

  • UserInterface/Views/EventListenerSectionGroup.js:

(WI.EventListenerSectionGroup.prototype._functionTextOrLink):

LayoutTests:

  • inspector/dom/getEventListenersForNode.html:
  • inspector/dom/getEventListenersForNode-expected.txt:
4:23 PM Changeset in webkit [241109] by dbates@webkit.org
  • 5 edits in trunk/Source/WebKit

Move toNSEventModifierFlags() and toNSButtonNumber() to WebEventFactory.mm
https://bugs.webkit.org/show_bug.cgi?id=194321

Reviewed by Jer Noble.

Move some code to WebEventFactory so that it can be shared by both WKNavigationAction.mm
and UIDelegate.mm among other benefits.

  • Shared/mac/WebEventFactory.h:
  • Shared/mac/WebEventFactory.mm:

(WebKit::WebEventFactory::toNSEventModifierFlags):
(WebKit::WebEventFactory::toNSButtonNumber):

  • UIProcess/API/Cocoa/WKNavigationAction.mm:

(-[WKNavigationAction modifierFlags]):
(-[WKNavigationAction buttonNumber]):
(toNSEventModifierFlags): Deleted.
(toNSButtonNumber): Deleted.

  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::UIClient::mouseDidMoveOverElement):
(WebKit::toNSEventModifierFlags): Deleted.

4:03 PM Changeset in webkit [241108] by Alan Coon
  • 2 edits in branches/safari-607-branch/LayoutTests

Cherry-pick r241031. rdar://problem/47866495

Revert part of r241015 that skipped all WebGL tests

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

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

Cherry-pick r241015. rdar://problem/47866495

REGRESSION (r240909): Release assert in FrameLoader::loadURL when navigating with a non-existent target name
https://bugs.webkit.org/show_bug.cgi?id=194329

Reviewed by Geoffrey Garen.

Source/WebCore:

The bug was caused by the code path for when navigating with a specific target frame name that does not exist
never setting the load type of PolicyChecker. As a result, we would use whatever load type used in the previous
navigation, resulting in this release assertion.

Updating the load type here should in theory fix the underlying bug r240909 was meant to catch & fix.

Test: fast/loader/navigate-with-new-target-after-back-forward-navigation.html

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

LayoutTests:

Added a regression test.

  • fast/loader/navigate-with-new-target-after-back-forward-navigation-expected.txt: Added.
  • fast/loader/navigate-with-new-target-after-back-forward-navigation.html: Added.

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

4:02 PM Changeset in webkit [241106] by Alan Coon
  • 29 edits in branches/safari-607-branch/Source

Apply patch. rdar://problem/47822019

3:18 PM Changeset in webkit [241105] by aestes@apple.com
  • 29 edits
    3 copies in trunk

[Payment Request] It should be possible to require a phonetic name for shipping contacts
https://bugs.webkit.org/show_bug.cgi?id=194311
<rdar://46733045>

Reviewed by Alex Christensen.

Source/WebCore:

It should be possible to require that a shipping contact has a phonetic name in Payment Request.
To accomplish this, move requiredShippingContactFields from ApplePayPaymentRequest to
ApplePayRequestBase so that it can be used as part of an Apple Pay payment method data.

Since required shipping contact fields can now be specified both in
requiredShippingContactFields and PaymentOptions, we merge the required fields from these
two sources such that, e.g., email is required if it is specified in either place.

So that clients can detect this new feature, the API version number is bumped from 5 to 6.

Added test cases to ApplePayRequestShippingContact.https.html and ApplePayRequestShippingContactV3.https.html.

  • DerivedSources.make:
  • Modules/applepay/ApplePayPaymentRequest.h:
  • Modules/applepay/ApplePayPaymentRequest.idl:
  • Modules/applepay/ApplePayRequestBase.cpp:

(WebCore::convertAndValidate):

  • Modules/applepay/ApplePayRequestBase.h:
  • Modules/applepay/ApplePayRequestBase.idl:
  • Modules/applepay/ApplePaySession.cpp:

(WebCore::convertAndValidate):

  • Modules/applepay/PaymentCoordinatorClient.cpp: Added.

(WebCore::PaymentCoordinatorClient::supportsVersion):

  • Modules/applepay/PaymentCoordinatorClient.h:
  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:

(WebCore::mergePaymentOptions):
(WebCore::ApplePayPaymentHandler::show):

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • loader/EmptyClients.cpp:
  • testing/MockPaymentContactFields.h: Added.

(WebCore::MockPaymentContactFields::MockPaymentContactFields):

  • testing/MockPaymentContactFields.idl: Added.
  • testing/MockPaymentCoordinator.cpp:

(WebCore::MockPaymentCoordinator::showPaymentUI):
(WebCore::MockPaymentCoordinator::supportsVersion): Deleted.

  • testing/MockPaymentCoordinator.h:
  • testing/MockPaymentCoordinator.idl:

Source/WebKit:

  • WebProcess/ApplePay/WebPaymentCoordinator.cpp:

(WebKit::WebPaymentCoordinator::supportsVersion): Deleted.

  • WebProcess/ApplePay/WebPaymentCoordinator.h:

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebPaymentCoordinatorClient.h:
  • WebCoreSupport/WebPaymentCoordinatorClient.mm:

(WebPaymentCoordinatorClient::supportsVersion): Deleted.

LayoutTests:

  • http/tests/ssl/applepay/ApplePayRequestShippingContact.https-expected.txt:
  • http/tests/ssl/applepay/ApplePayRequestShippingContact.https.html:
  • http/tests/ssl/applepay/ApplePayRequestShippingContactV3.https-expected.txt:
  • http/tests/ssl/applepay/ApplePayRequestShippingContactV3.https.html:
  • http/tests/ssl/applepay/PaymentRequest.https-expected.txt:
  • http/tests/ssl/applepay/PaymentRequest.https.html:
2:58 PM Changeset in webkit [241104] by ysuzuki@apple.com
  • 26 edits in trunk

[JSC] PrivateName to PublicName hash table is wasteful
https://bugs.webkit.org/show_bug.cgi?id=194277

Reviewed by Michael Saboff.

JSTests:

This test depends on the order of JSSegmentedVariableObjects' variables, which is not guaranteed in JSC. Skipped.

  • ChakraCore.yaml:

Source/JavaScriptCore:

PrivateNames account for a lot of memory in the initial JSC footprint. BuiltinNames have Identifier fields corresponding to these PrivateNames
which makes the sizeof(BuiltinNames) about 6KB. It also maintains hash tables for "PublicName to PrivateName" and "PrivateName to PublicName",
each of which takes 16KB memory. While "PublicName to PrivateName" functionality is used in builtin JS (parsing "@xxx" and get a private
name for "xxx"), "PrivateName to PublicName" is rarely used. Holding 16KB hash table for rarely used feature is costly.

In this patch, we add some rules to remove "PrivateName to PublicName" hash table.

  1. PrivateName's content should be the same to PublicName.
  2. If PrivateName is not actually a private name (we introduced hacky mapping like "@iteratorSymbol" => Symbol.iterator), the public name should be easily crafted from the given PrivateName.

We modify the content of private names to ensure (1). And for (2), we can meet this requirement by ensuring that the "@xxxSymbol"
is converted to "Symbol.xxx". (1) and (2) allow us to convert a private name to a public name without a large hash table.

We also remove unused identifiers in CommonIdentifiers. And we also move some of them to WebCore's WebCoreBuiltinNames if it is only used in
WebCore.

  • builtins/BuiltinNames.cpp:

(JSC::BuiltinNames::BuiltinNames):

  • builtins/BuiltinNames.h:

(JSC::BuiltinNames::lookUpPrivateName const):
(JSC::BuiltinNames::getPublicName const):
(JSC::BuiltinNames::checkPublicToPrivateMapConsistency):
(JSC::BuiltinNames::appendExternalName):
(JSC::BuiltinNames::lookUpPublicName const): Deleted.

  • builtins/BuiltinUtils.h:
  • bytecode/BytecodeDumper.cpp:

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

  • bytecompiler/NodesCodegen.cpp:

(JSC::BytecodeIntrinsicNode::emit_intrinsic_getByIdDirectPrivate):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_putByIdDirectPrivate):

  • parser/Lexer.cpp:

(JSC::Lexer<LChar>::parseIdentifier):
(JSC::Lexer<UChar>::parseIdentifier):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::createGeneratorParameters):
(JSC::Parser<LexerType>::parseFunctionDeclaration):
(JSC::Parser<LexerType>::parseAsyncFunctionDeclaration):
(JSC::Parser<LexerType>::parseClassDeclaration):
(JSC::Parser<LexerType>::parseExportDeclaration):
(JSC::Parser<LexerType>::parseMemberExpression):

  • parser/ParserArena.h:

(JSC::IdentifierArena::makeIdentifier):

  • runtime/CachedTypes.cpp:

(JSC::CachedUniquedStringImpl::encode):
(JSC::CachedUniquedStringImpl::decode const):

  • runtime/CommonIdentifiers.cpp:

(JSC::CommonIdentifiers::CommonIdentifiers):
(JSC::CommonIdentifiers::lookUpPrivateName const):
(JSC::CommonIdentifiers::getPublicName const):
(JSC::CommonIdentifiers::lookUpPublicName const): Deleted.

  • runtime/CommonIdentifiers.h:
  • runtime/ExceptionHelpers.cpp:

(JSC::createUndefinedVariableError):

  • runtime/Identifier.cpp:

(JSC::Identifier::dump const):

  • runtime/Identifier.h:
  • runtime/IdentifierInlines.h:

(JSC::Identifier::fromUid):

  • runtime/JSTypedArrayViewPrototype.cpp:

(JSC::JSTypedArrayViewPrototype::finishCreation):

  • tools/JSDollarVM.cpp:

(JSC::functionGetPrivateProperty):

Source/WebCore:

Use WebCoreBuiltinNames instead of adding WebCore names to JSC CommonIdentifiers.

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::addCrossOriginPropertyNames):

  • bindings/js/JSLocationCustom.cpp:

(WebCore::getOwnPropertySlotCommon):
(WebCore::putCommon):

  • bindings/js/WebCoreBuiltinNames.h:

LayoutTests:

  • streams/readable-byte-stream-controller-expected.txt:
2:54 PM Changeset in webkit [241103] by Keith Rollin
  • 9 edits in trunk

Really enable the automatic checking and regenerations of .xcfilelists during builds
https://bugs.webkit.org/show_bug.cgi?id=194357
<rdar://problem/47861231>

Reviewed by Chris Dumez.

Bug 194124 was supposed to enable the automatic checking and
regenerating of .xcfilelist files during the build. While related
changes were included in that patch, the change to actually enable the
operation somehow was omitted. This patch actually enables the
operation. The check-xcfilelist.sh scripts now check
WK_DISABLE_CHECK_XCFILELISTS, and if it's "1", opts-out the developer
from the checking.

Source/JavaScriptCore:

  • Scripts/check-xcfilelists.sh:

Source/WebCore:

No new tests since there should be no observable behavior difference.

  • Scripts/check-xcfilelists.sh:

Source/WebKit:

  • Scripts/check-xcfilelists.sh:

Tools:

  • DumpRenderTree/Scripts/check-xcfilelists.sh:
  • WebKitTestRunner/Scripts/check-xcfilelists.sh:
2:18 PM Changeset in webkit [241102] by Alan Coon
  • 1 edit in branches/safari-607-branch/Source/WebKit/UIProcess/mac/DisplayLink.cpp

Unreviewed build fix

2:18 PM Changeset in webkit [241101] by Alan Coon
  • 2 edits in branches/safari-607-branch/Tools/WebKitTestRunner

Unreviewed build fix. rdar://problem/47810458

2:18 PM Changeset in webkit [241100] by Alan Coon
  • 1 edit in branches/safari-607-branch/Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm

Unreviewed build fix. rdar://problem/47774520

2:18 PM Changeset in webkit [241099] by Alan Coon
  • 3 edits in branches/safari-607-branch/Source/WebCore

Cherry-pick r240804. rdar://problem/47774520

[Cocoa][EME] Modern EME uses a different path for SecureStop data than Legacy EME
https://bugs.webkit.org/show_bug.cgi?id=193988

Reviewed by Jon Lee.

Modern EME is writing SecureStop data as a file at the same path as the
directory used by Legacy EME; meaning, when Modern EME attempts to write
to that file, it will fail because a directory exists at the same path.

Add a migration step to take care of those instances where Modern EME Secure
Stop data was already written to disk, and move that previously written data
to the correct file path.

  • platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h:
  • platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm: (WebCore::CDMInstanceFairPlayStreamingAVFObjC::initializeWithConfiguration): (WebCore::CDMInstanceFairPlayStreamingAVFObjC::setStorageDirectory): (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense): (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::loadSession): (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::removeSessionData): (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::ensureSession):

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

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

Cherry-pick r240746. rdar://problem/47774550

[Cocoa][EME] persistent-usage-record data not issued after MediaKeySession.remove()
https://bugs.webkit.org/show_bug.cgi?id=193984

Reviewed by Eric Carlson.

MediaKeySession.sessionId is empty during the CDMInstance->requestLicense success callback handler. The
KVO notification that AVContentKeySession.contentProtectionSessionIdentifier changed isn't called until
after the -[AVContentKeyRequest makeStreamingContentKeyRequestDataForApp:contentIdentifier:options:completionHandler:]
completion handler is called.

Explicitly ask for the -contentProtectionSessionIdentifier inside that handler, and just in case the sessionID
changes after that, add a new client callback method to notify the MediaKeySession that the ID has changed.

  • Modules/encryptedmedia/MediaKeySession.cpp: (WebCore::MediaKeySession::sessionIdChanged):
  • Modules/encryptedmedia/MediaKeySession.h:
  • platform/encryptedmedia/CDMInstanceSession.h:
  • platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm: (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didProvideRequest): (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::nextRequest):

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

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

Cherry-pick r239845. rdar://problem/47776472

[macOS] Add name of IORegistry key in sandbox.
https://bugs.webkit.org/show_bug.cgi?id=193335
<rdar://problem/47184951>

Reviewed by Alexey Proskuryakov.

The property IOGVAHEVCDecodeCapabilities was added in https://bugs.webkit.org/show_bug.cgi?id=193324.
Also, the property IOGVAHEVCEncodeCapabilities needs to be added.

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

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

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

Cherry-pick r239834. rdar://problem/47776472

[macOS] Add name of IORegistry key in sandbox.
https://bugs.webkit.org/show_bug.cgi?id=193324

Reviewed by Brent Fulgham.

IOGVAVTCapabilities key has been changed to IOGVAHEVCDecodeCapabilities.

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

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

2:18 PM Changeset in webkit [241095] by Alan Coon
  • 1 edit in branches/safari-607-branch/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp

Apply patch. rdar://problem/47850665

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

Cherry-pick r240995. rdar://problem/47843415

Reproducible crash under WKShareSheet presentWithParameters when cancelling a share
https://bugs.webkit.org/show_bug.cgi?id=194301
<rdar://problem/47719379>

Reviewed by Beth Dakin.

  • UIProcess/Cocoa/WKShareSheet.mm: (-[WKShareSheet presentWithParameters:completionHandler:]): NSSharingServicePicker's delegate callbacks can be called synchronously. We release the WKShareSheet (which holds our reference to the NSSharingServicePicker) under sharingServicePicker:didChooseSharingService:. On older versions of macOS, there was nothing keeping the NSSharingServicePicker alive inside showRelativeToRect:ofView:preferredEdge:, thus the whole chain of references would fall and result in sending a message to a released NSSharingServicePicker. To resolve this, keep an extra reference to the WKShareSheet until presentation is complete.

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

2:18 PM Changeset in webkit [241093] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebInspectorUI

Cherry-pick r241003. rdar://problem/47842660

Web Inspector: Elements tab: selection is broken after deleting the selected node
https://bugs.webkit.org/show_bug.cgi?id=194300
<rdar://problem/47829275>

Reviewed by Devin Rousso.

Deleting a TreeElement can cause an IndexSet including indexes
outside the deleted range to be passed to SelectionController,
corrupting the internal selection state.

  • UserInterface/Views/TreeOutline.js: (WI.TreeOutline.prototype._indexesForSubtree.numberOfElementsInSubtree): Added. (WI.TreeOutline.prototype._indexesForSubtree): Finding the last (rightmost leaf) TreeElement in the subtree used TreeElement.prototype.traverseNextElement to do a depth first traversal. This method did not stay within the subtree rooted at treeElement.

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

2:18 PM Changeset in webkit [241092] by Alan Coon
  • 3 edits in branches/safari-607-branch/LayoutTests

Cherry-pick r240989. rdar://problem/47842627

Web Inspector: Fix modify-css-property-race.html test failures
https://bugs.webkit.org/show_bug.cgi?id=194282

Reviewed by Matt Baker.

Fix test failures introduced by r240946 by providing a message for expectGreaterThan assert,
so it doesn't log the actual values.

  • inspector/css/modify-css-property-race-expected.txt:
  • inspector/css/modify-css-property-race.html:

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

2:18 PM Changeset in webkit [241091] by Alan Coon
  • 8 edits
    2 adds in branches/safari-607-branch

Cherry-pick r240946. rdar://problem/47830598

Web Inspector: Styles: fix race conditions when editing
https://bugs.webkit.org/show_bug.cgi?id=192739
<rdar://problem/46752925>

Reviewed by Devin Rousso.

Source/WebInspectorUI:

Editing CSS property in the style editor syncronously updates CSSStyleDeclaration on the front-end
and asyncronously updates the backend by calling CSSAgent.setStyleText. After the new style text is applied
on the backend, CSSStyleDeclaration (on the front-end) gets updated.

Unsure there's no race conditions by introducing _updatesInProgressCount:

  • Increment it before calling CSSAgent.setStyleText.
  • Decrement it after CSSAgent.setStyleText is finished.

Prevent updates of CSSStyleDeclaration when _updatesInProgressCount isn't 0.

  • UserInterface/Models/CSSProperty.js: (WI.CSSProperty.prototype._updateOwnerStyleText):
  • UserInterface/Models/CSSStyleDeclaration.js: (WI.CSSStyleDeclaration): (WI.CSSStyleDeclaration.prototype.set text): Removed. (WI.CSSStyleDeclaration.prototype.setText): Added. Change the setter to a method since it has side effects including an asynchronous backend call.
  • UserInterface/Models/DOMNodeStyles.js: (WI.DOMNodeStyles.prototype.changeStyleText):
  • UserInterface/Views/SpreadsheetStyleProperty.js: (WI.SpreadsheetStyleProperty.prototype.get nameTextField): Removed. (WI.SpreadsheetStyleProperty.prototype.get valueTextField): Removed. Drive-by: remove unused code.

LayoutTests:

  • inspector/css/modify-css-property-expected.txt:
  • inspector/css/modify-css-property-race-expected.txt: Added.
  • inspector/css/modify-css-property-race.html: Added.
  • inspector/css/modify-css-property.html:

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

2:18 PM Changeset in webkit [241090] by Alan Coon
  • 1 edit in branches/safari-607-branch/Source/WebCore/page/scrolling/ScrollingStateTree.cpp

Apply patch. rdar://problem/47383968

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

Cherry-pick r240928. rdar://problem/47810458

Capture state should be managed consistently when doing process swapping
https://bugs.webkit.org/show_bug.cgi?id=194122
<rdar://problem/47609293>

Reviewed by Eric Carlson.

Source/WebKit:

When doing PSON, WebPageProxy::resetState is called.
It resets the media state, but does not call the client delegates.
Instead of directly updating the media state, call the routine used to update it so that client delegates are called.

Covered by new API test and layout test.

  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _mediaCaptureState]):
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::resetState): (WebKit::WebPageProxy::isPlayingMediaDidChange): (WebKit::WebPageProxy::updatePlayingMediaDidChange):
  • UIProcess/WebPageProxy.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: (-[GetUserMediaUIDelegate _webView:requestUserMediaAuthorizationForDevices:url:mainFrameURL:decisionHandler:]): (-[GetUserMediaUIDelegate _webView:checkUserMediaPermissionForURL:mainFrameURL:frameIdentifier:decisionHandler:]): (-[GetUserMediaUIDelegate _webView:mediaCaptureStateDidChange:]):
  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::isDoingMediaCapture const):
  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp: (WTR::TestController::isDoingMediaCapture const):
  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
  • WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::isDoingMediaCapture const):

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

2:18 PM Changeset in webkit [241088] by Alan Coon
  • 16 edits
    2 adds in branches/safari-607-branch

Apply patch. rdar://problem/47810458

fix-194122

2:17 PM Changeset in webkit [241087] by Alan Coon
  • 29 edits
    12 adds in branches/safari-607-branch

Cherry-pick r239752. rdar://problem/47776478

[WebAuthN] Support U2F HID Authenticators on macOS
https://bugs.webkit.org/show_bug.cgi?id=191535
<rdar://problem/47102027>

Reviewed by Brent Fulgham.

Source/WebCore:

This patch changes U2fCommandConstructor to produce register commands with
enforcing test of user presence. Otherwise, authenticators would silently
generate credentials. It also renames readFromU2fSignResponse to
readU2fSignResponse.

Tests: http/wpt/webauthn/public-key-credential-create-failure-u2f-silent.https.html

http/wpt/webauthn/public-key-credential-create-failure-u2f.https.html
http/wpt/webauthn/public-key-credential-create-success-u2f.https.html
http/wpt/webauthn/public-key-credential-get-failure-u2f-silent.https.html
http/wpt/webauthn/public-key-credential-get-failure-u2f.https.html
http/wpt/webauthn/public-key-credential-get-success-u2f.https.html

  • Modules/webauthn/fido/U2fCommandConstructor.cpp: (fido::WebCore::constructU2fRegisterCommand):
  • Modules/webauthn/fido/U2fResponseConverter.cpp: (fido::readU2fSignResponse): (fido::readFromU2fSignResponse): Deleted.
  • Modules/webauthn/fido/U2fResponseConverter.h:

Source/WebKit:

This patch implements the support for U2F authenticators, and enables it for hid devices.
It follows the CTAP spec to map WebAuthN requests to U2F commands and return the responses:
https://fidoalliance.org/specs/fido-v2.0-id-20180227/fido-client-to-authenticator-protocol-v2.0-id-20180227.html#u2f-interoperability
Most of the parts are done before this patch, this patch focues on: 7.2.2 and 7.3.2.

Besides implementing the U2fHidAuthenticator, this patch also adds support in the mocking
environment for U2F authenticators. It is done by extending the stages in MockHidConnection
from 4 to indefinite as multi-round communications are expected to map WebAuthN requests
to U2F requests.

  • Sources.txt:
  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp: (WKWebsiteDataStoreSetWebAuthenticationMockConfiguration):
  • UIProcess/WebAuthentication/Cocoa/HidService.mm: (WebKit::HidService::continueAddDeviceAfterGetInfo):
  • UIProcess/WebAuthentication/fido/CtapHidDriver.cpp: (WebKit::CtapHidDriver::continueAfterChannelAllocated):
  • UIProcess/WebAuthentication/fido/CtapHidDriver.h: (WebKit::CtapHidDriver::setProtocol):
  • UIProcess/WebAuthentication/fido/U2fHidAuthenticator.cpp: Added. (WebKit::U2fHidAuthenticator::U2fHidAuthenticator): (WebKit::U2fHidAuthenticator::makeCredential): (WebKit::U2fHidAuthenticator::checkExcludeList): (WebKit::U2fHidAuthenticator::issueRegisterCommand): (WebKit::U2fHidAuthenticator::getAssertion): (WebKit::U2fHidAuthenticator::issueSignCommand): (WebKit::U2fHidAuthenticator::issueNewCommand): (WebKit::U2fHidAuthenticator::issueCommand): (WebKit::U2fHidAuthenticator::responseReceived): (WebKit::U2fHidAuthenticator::continueRegisterCommandAfterResponseReceived): (WebKit::U2fHidAuthenticator::continueCheckOnlyCommandAfterResponseReceived): (WebKit::U2fHidAuthenticator::continueBogusCommandAfterResponseReceived): (WebKit::U2fHidAuthenticator::continueSignCommandAfterResponseReceived):
  • UIProcess/WebAuthentication/fido/U2fHidAuthenticator.h: Added.
  • UIProcess/WebAuthentication/Mock/MockHidConnection.cpp: (WebKit::MockHidConnection::parseRequest): (WebKit::MockHidConnection::feedReports):
  • UIProcess/WebAuthentication/Mock/MockHidConnection.h:
  • UIProcess/WebAuthentication/Mock/MockWebAuthenticationConfiguration.h:
  • WebKit.xcodeproj/project.pbxproj:

Tools:

This patch:
1) adds support for U2F mocking mechanism;
2) updates tests to reflect U2fCommandConstructor changes.

  • TestWebKitAPI/Tests/WebCore/CtapResponseTest.cpp: (TestWebKitAPI::TEST):
  • TestWebKitAPI/Tests/WebCore/FidoTestData.h:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setWebAuthenticationMockConfiguration):

LayoutTests:

Besiding adding tests for U2F authenticators, it also changes payloadBase64 from
a string to a vector of strings. New tests are skipped for iOS.

  • http/wpt/webauthn/ctap-hid-failure.https.html:
  • http/wpt/webauthn/ctap-hid-success.https.html:
  • http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https.html:
  • http/wpt/webauthn/public-key-credential-create-failure-hid.https.html:
  • http/wpt/webauthn/public-key-credential-create-failure-u2f-silent.https-expected.txt: Added.
  • http/wpt/webauthn/public-key-credential-create-failure-u2f-silent.https.html: Added.
  • http/wpt/webauthn/public-key-credential-create-failure-u2f.https-expected.txt: Added.
  • http/wpt/webauthn/public-key-credential-create-failure-u2f.https.html: Added.
  • http/wpt/webauthn/public-key-credential-create-success-hid.https.html:
  • http/wpt/webauthn/public-key-credential-create-success-u2f.https-expected.txt: Added.
  • http/wpt/webauthn/public-key-credential-create-success-u2f.https.html: Copied from LayoutTests/http/wpt/webauthn/public-key-credential-create-success-hid.https.html.
  • http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https.html:
  • http/wpt/webauthn/public-key-credential-get-failure-hid.https.html:
  • http/wpt/webauthn/public-key-credential-get-failure-u2f-silent.https-expected.txt: Added.
  • http/wpt/webauthn/public-key-credential-get-failure-u2f-silent.https.html: Added.
  • http/wpt/webauthn/public-key-credential-get-failure-u2f.https-expected.txt: Added.
  • http/wpt/webauthn/public-key-credential-get-failure-u2f.https.html: Added.
  • http/wpt/webauthn/public-key-credential-get-success-hid.https.html:
  • http/wpt/webauthn/public-key-credential-get-success-u2f.https-expected.txt: Added.
  • http/wpt/webauthn/public-key-credential-get-success-u2f.https.html: Added.
  • http/wpt/webauthn/resources/util.js:
  • platform/ios-wk2/TestExpectations:

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

2:17 PM Changeset in webkit [241086] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebInspectorUI

Cherry-pick r240997. rdar://problem/47838594

Web Inspector: REGRESSION (r240947): Resources tab: can't select main frame after refreshing page
https://bugs.webkit.org/show_bug.cgi?id=194254
<rdar://problem/47805023>

Reviewed by Devin Rousso.

  • UserInterface/Views/TreeOutline.js: (WI.TreeOutline.prototype.selectionControllerSelectionDidChange): TreeOutline should always call the TreeElement select and deselect methods while processing selection changes. Having notifications suppressed by this._suppressNextSelectionDidChangeEvent should only affect the dispatching of TreeOutline events.

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

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

Cherry-pick r240974. rdar://problem/47830620

Protect globalWebSocketStreamMap with a Lock
https://bugs.webkit.org/show_bug.cgi?id=194224
<rdar://problem/47581081>

Reviewed by Ryosuke Niwa.

  • WebProcess/Network/WebSocketStream.cpp: (WebKit::WebSocketStream::streamWithIdentifier): (WebKit::WebSocketStream::networkProcessCrashed): (WebKit::WebSocketStream::WebSocketStream): (WebKit::WebSocketStream::~WebSocketStream):

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

2:17 PM Changeset in webkit [241084] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebInspectorUI

Cherry-pick r240947. rdar://problem/47830605

Web Inspector: REGRESSION: clicking a selected call frame doesn't re-scroll
https://bugs.webkit.org/show_bug.cgi?id=194169
<rdar://problem/47743864>

Reviewed by Devin Rousso.

  • UserInterface/Views/TreeOutline.js: (WI.TreeOutline.prototype._handleMouseDown): Add a special case for a single-selection TreeOutline with allowsRepeatSelection enabled. Since the element is already selected, bypass the SelectionCongroller and dispatch an event with event.data.selectedByUser set to true.

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

2:17 PM Changeset in webkit [241083] by Alan Coon
  • 3 edits in branches/safari-607-branch/Source/WebCore

Cherry-pick r240930. rdar://problem/47810469

Make sure to remove the device observer in AVVideoCaptureSource
https://bugs.webkit.org/show_bug.cgi?id=194181
<rdar://problem/47739247>

Reviewed by Eric Carlson.

Make sure to remove the device observer when the observer is destroyed.
To simplify things, add the observer in AVVideoCaptureSource constructor and remove it in the destructor.

Make also sure the session observer is also removed whenever the session is released by AVVideoCaptureSource.

Covered by manual test.

  • platform/mediastream/mac/AVVideoCaptureSource.h:
  • platform/mediastream/mac/AVVideoCaptureSource.mm: (WebCore::AVVideoCaptureSource::AVVideoCaptureSource): (WebCore::AVVideoCaptureSource::~AVVideoCaptureSource): (WebCore::AVVideoCaptureSource::initializeSession): (WebCore::AVVideoCaptureSource::clearSession): (WebCore::AVVideoCaptureSource::stopProducingData): (WebCore::AVVideoCaptureSource::setupSession):

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

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

Cherry-pick r240925. rdar://problem/47774545

Unreviewed, avoid -Wswitch warnings introduced in r240880
https://bugs.webkit.org/show_bug.cgi?id=193740
<rdar://problem/47527267>

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp: (WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse):

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

2:17 PM Changeset in webkit [241081] by Alan Coon
  • 1 edit in branches/safari-607-branch/Source/JavaScriptCore/ChangeLog

Cherry-pick r240917. rdar://problem/47810465

DFG's doesGC() is incorrect about the SameValue node's behavior.
https://bugs.webkit.org/show_bug.cgi?id=194211
<rdar://problem/47608913>

Reviewed by Saam Barati.

Only the DoubleRepUse case is guaranteed to not GC. The other case may GC because
it calls operationSameValue() which may allocate memory for resolving ropes.

  • dfg/DFGDoesGC.cpp: (JSC::DFG::doesGC):

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

2:17 PM Changeset in webkit [241080] by Alan Coon
  • 13 edits in branches/safari-607-branch

Cherry-pick r240880. rdar://problem/47774545

REGRESSION: Flaky ASSERTION FAILED: m_uncommittedState.state == State::Committed on http/tests/cookies/same-site/fetch-after-top-level-navigation-initiated-from-iframe-in-cross-origin-page.html
https://bugs.webkit.org/show_bug.cgi?id=193740
<rdar://problem/47527267>

Reviewed by Alex Christensen.

Source/WebCore:

  • loader/DocumentLoader.cpp: (WebCore::DocumentLoader::willSendRequest): (WebCore::DocumentLoader::continueAfterContentPolicy):
  • loader/FrameLoader.cpp: (WebCore::FrameLoader::loadURL): (WebCore::FrameLoader::loadWithDocumentLoader): (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
  • loader/FrameLoader.h:
  • loader/FrameLoaderTypes.h:
  • loader/PolicyChecker.cpp: (WebCore::PolicyChecker::checkNavigationPolicy): (WebCore::PolicyChecker::checkNewWindowPolicy):
  • loader/PolicyChecker.h:

Source/WebKit:

The issue was happening when the page is triggering a cross-site navigation while in the middle of parsing. This would cause us to
start a new provisional load in a new process before the previous process sends the DidFinishLoadForFrame() IPC to the UIProcess.
Getting such IPC after a provisional load has started would mess up our state machine and trip assertions.

This patch restores non-PSON behavior which is that the previous load in the old process now gets stopped so that no DidFinishLoadForFrame()
/ DidFailLoadForFrame() gets sent. To achieve this behavior, I introduced a new "StopAllLoads" PolicyAction that we now send the old
process when the load is continuing in a new process, instead of sending it "Ignore".

  • NetworkProcess/NetworkDataTaskBlob.cpp: (WebKit::NetworkDataTaskBlob::dispatchDidReceiveResponse):
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm: (toNSURLSessionResponseDisposition):
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::receivedNavigationPolicyDecision):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

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

2:17 PM Changeset in webkit [241079] by Alan Coon
  • 2 edits in branches/safari-607-branch/Tools

Cherry-pick r240856. rdar://problem/47774509

API Test broken: TestWebKitAPI.WebKit2.GetUserMediaReprompt
https://bugs.webkit.org/show_bug.cgi?id=194155

Reviewed by Eric Carlson.

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

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

Cherry-pick r240833. rdar://problem/47774523

[Cocoa][EME] AirPlaying a FairPlay-protected HLS stream fails to decrypt
https://bugs.webkit.org/show_bug.cgi?id=194114

Reviewed by Eric Carlson.

The AVAssetResourceLoaderDelegate must explicitly... delegate responsibility for FairPlay key
requests to the AVContentKeySession.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):

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

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

Cherry-pick r240822. rdar://problem/47774539

[Mac] Requesting PiP from two different WebViews gets PiP window "stuck"
https://bugs.webkit.org/show_bug.cgi?id=194099
<rdar://problem/47271323>

Reviewed by Eric Carlson.

When a different client requests the PiP window, the PiP framework will call -pipDidClose: without
first calling -pipActionStop:. This leaves the internal fullscreen state in a confused state where
the WebView will attempt to re-enter PiP once it gets focus, and can lead to a state where the two
WebViews will constantly try to steal PiP from one another, ad infinitum.

When receiving a notification that the PiP window closed when our internal state tells us that the
close was not requested, notify the client that PiP mode was exited, allowing them to set their
expected state to a correct and sane value.

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

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

2:17 PM Changeset in webkit [241076] by Alan Coon
  • 4 edits in branches/safari-607-branch/Source/WebInspectorUI

Cherry-pick r240819. rdar://problem/47774546

REGRESSION(r?): Web Inspector: Clicking on text doesn't move text caret when editing innerHTML/tagName/attribute
https://bugs.webkit.org/show_bug.cgi?id=192652
<rdar://problem/46684612>

Reviewed by Devin Rousso.

  • UserInterface/Views/DOMTreeElement.js: (WI.DOMTreeElement.prototype.canSelectOnMouseDown): Call to Event.preventDefault() should be made here instead of at the TreeOutline level.
  • UserInterface/Views/TreeElement.js: (WI.TreeElement.prototype.selectOnMouseDown): Deleted. Remove dead code.
  • UserInterface/Views/TreeOutline.js: (WI.TreeOutline._handleMouseDown): Do not prevent default event handling when the item cannot be selected. This matches TreeOutline behavior prior to introducing SelectionController.

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

2:17 PM Changeset in webkit [241075] by Alan Coon
  • 7 edits in branches/safari-607-branch

Cherry-pick r240818. rdar://problem/47774549

Page zoom level is lost after a process swap or a crash
https://bugs.webkit.org/show_bug.cgi?id=194105
<rdar://problem/47610781>

Reviewed by Alex Christensen.

Source/WebKit:

Previously, when the client would call setPageAndTextZoomFactors() on the WebPageProxy,
we would update the WebPageProxy's corresponding data members and send an IPC to the
WebProcess to apply the zoom factors.

The issue is that on process crash or process-swap, we never communicate those zoom factors
to the new WebProcess. Even if the client were to call setPageAndTextZoomFactors() with
the same factors again, it would be a no-op since the WebPageProxy's data members already
reflect the expected values.

To address the issue, pass both the page zoom and the text zoom factors to the WebProcess
via WebPageCreationParameters. This way, there is no need to send an extra IPC and we're
sure the WebPageProxy's factors are properly applied to the WebPage on WebContent process
side upon creation (whether after a crash or a process swap).

  • Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode const): (WebKit::WebPageCreationParameters::decode):
  • Shared/WebPageCreationParameters.h:
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::creationParameters):
  • WebProcess/WebPage/WebPage.cpp:

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: (-[PSONNavigationDelegate webView:didCommitNavigation:]):

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

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

Cherry-pick r240803. rdar://problem/47774506

Regression(PSON) Crash under WebProcessProxy::canTerminateChildProcess()
https://bugs.webkit.org/show_bug.cgi?id=194094
<rdar://problem/47580753>

Reviewed by Ryosuke Niwa.

If a SuspendedPageProxy gets destroyed while a WebPageProxy is waiting for its to finish to suspend,
call the "failure to suspend" completion handler asynchronously instead of synchronouly to make sure
the completion handler cannot try and use the suspended page proxy while it is being destroyed.

  • UIProcess/SuspendedPageProxy.cpp: (WebKit::SuspendedPageProxy::~SuspendedPageProxy):

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

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

Cherry-pick r240773. rdar://problem/47774755

ASSERTION FAILED: cache under WebCore::AXObjectCache::postTextStateChangePlatformNotification
https://bugs.webkit.org/show_bug.cgi?id=189094
<rdar://problem/43853526>

Reviewed by Zalan Bujtas.

Source/WebCore:

Protect against access to objects and cache's that can be removed while an object is still in memory.

Unskipped flaky tests on mac-wk2.

  • accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (textMarkerForVisiblePosition): (textMarkerRangeFromVisiblePositions):

LayoutTests:

Unskip flaky test with crash resolved.

  • platform/mac-wk2/TestExpectations:

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

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

Cherry-pick r240772. rdar://problem/47774490

iOS: Crash in InteractiveUpdateHandler set by ViewGestureController::beginSwipeGesture
https://bugs.webkit.org/show_bug.cgi?id=194083

Reviewed by Tim Horton.

We think this crash is a regression from r236966. Prior to r236966, we could only called
removeSwipeSnapshot() only when m_provisionalOrSameDocumentLoadCallback was set but now
we can call it either when m_snapshotRemovalTracker::start was called, or it had been reset.
This can result in m_webPageProxyForBackForwardListForCurrentSwipe getting cleared before
InteractiveUpdateHandler is called by UIGestureRecognizer, resulting in the crash.

This patch tries to restore the behavior prior to r236966 by only invoking removeSwipeSnapshot()
when SnapshotRemovalTracker has a valid removal callback set.

Unfortunately no new tests since there is no reproducible test case, and neither API tests
nor layout tests seem to have the capability to trigger swipe gestures via UIGestureRecognizer,
which is required for this crash to occur. Notably, back-forward swipe tests I enabled in
r240765 bypass UIKit and emulates the action instead.

  • UIProcess/Cocoa/ViewGestureController.cpp: (WebKit::ViewGestureController::didReachMainFrameLoadTerminalState):
  • UIProcess/Cocoa/ViewGestureController.h: (WebKit::ViewGestureController::SnapshotRemovalTracker::hasRemovalCallback const):

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

2:17 PM Changeset in webkit [241071] by Alan Coon
  • 4 edits in branches/safari-607-branch/Source/WebKit

Cherry-pick r240757. rdar://problem/47774493

[iOS] REGRESSION (r238635): Text area fails to re-focus after dismissal of keyboard on support.apple.com
https://bugs.webkit.org/show_bug.cgi?id=193987
<rdar://problem/47230785>

Reviewed by Tim Horton.

It is unnecessary to relinquish first responder status when a user explicitly dismissing
the keyboard. Moreover, doing so prevents key commands from being intercepted when a
hardware keyboard is subsequently attached.

Following r238635 a page becomes focused (accepting of keyboard input) and defocused
when the WKContentView becomes first responder and resigns first responder, respectively.
When a user explicitly dismisses the keyboard by tapping Done (iPhone) or the hide keyboard
button (iPad) then UIKit tells WKContentView to resign its first responder status only
to make its superview, WKWebView, first responder. When a person subsequently taps on the
page again, the WKContentView requests to become the first responder. However changes to
page focus are not guaranteed to be sent to the WebProcess immediately (WebPageProxy::activityStateDidChange()
will schedule an update). In particular, they are not guaranteed to be sent before the
WebProcess is told about a tap. Therefore, the WebProcess has out-of-date information on
focus state of the page. Instead we should detect when WKWebView is being asked to resign
as a result of the keyboard dismissal and refuse the request, taking care to end the current
editing session, blur the focused element, and dismiss the on-screen keyboard.

  • Platform/spi/ios/UIKitSPI.h: Expose some SPI.
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView setupInteraction]): Register to receive notifications whenever a user explicitly dismisses the keyboard. (-[WKContentView resignFirstResponderForWebView]): If we are being asked to resign as a result of a user explicitly dismissing the keyboard then refuse to resign. (-[WKContentView _keyboardDidRequestDismissal:]): Update state, if applicable.

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

2:16 PM Changeset in webkit [241070] by Alan Coon
  • 4 edits
    3 adds in branches/safari-607-branch

Cherry-pick r240750. rdar://problem/47774507

Regression(PSON) History navigations to twitter.com lead to a 403 HTTP error
https://bugs.webkit.org/show_bug.cgi?id=194023
<rdar://problem/47417981>

Reviewed by Geoffrey Garen.

Source/WebCore:

The issue was caused by the 'isTopSite' flag not getting properly set on the network request
in case of a cross-site history navigation (with process-swap). As a result, twitter.com was
not getting its same-site lax cookies.

The 'isTopSite' flag normally gets set by FrameLoader::addExtraFieldsToRequest(), but we were
bypassing this method entirely when continuing a load in a new process after a swap. This was
intentional as the network request is normally already fully populated by the previous process
and we do not want the new process to modify the request in any way (e.g. we would not want to
add a Origin header back after it was removed by the previous process). However, in case of a
History navigation, we do not actually pass a request along from one process to another. Instead,
we pass a HistoryItem and then build a fresh new request from the HistoryItem in the new process.
In this case, we *want* addExtraFieldsToRequest() to be called on the new request, even though
we are technically continuing a load in a new process.

We thus address the issue by bypassing FrameLoader::addExtraFieldsToRequest() only if we're
continuing a load with a request and not when we're continuing a load with a HistoryItem.

Test: http/tests/cookies/same-site/lax-samesite-cookie-after-cross-site-history-load.php

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::load): (WebCore::FrameLoader::loadWithDocumentLoader): (WebCore::FrameLoader::addExtraFieldsToRequest): (WebCore::FrameLoader::loadDifferentDocumentItem):
  • loader/FrameLoader.h: (WebCore::FrameLoader::shouldTreatCurrentLoadAsContinuingLoad const):

LayoutTests:

Add layout test coverage.

  • http/tests/cookies/same-site/lax-samesite-cookie-after-cross-site-history-load-expected.txt: Added.
  • http/tests/cookies/same-site/lax-samesite-cookie-after-cross-site-history-load.php: Added.
  • http/tests/cookies/same-site/resources/navigate-back.html: Added.

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

2:16 PM Changeset in webkit [241069] by Alan Coon
  • 9 edits in branches/safari-607-branch

Cherry-pick r240727. rdar://problem/47776358

LayoutTests/imported/w3c:
ServiceWorkerJob should notify its client in case its job is cancelled
https://bugs.webkit.org/show_bug.cgi?id=193747
<rdar://problem/47498196>

Reviewed by Chris Dumez.

  • web-platform-tests/service-workers/service-worker/registration-security-error.https-expected.txt:

Source/WebCore:
Refactor ServiceWorkerJob management by ServiceWorkerContainer to make it more memory safe
https://bugs.webkit.org/show_bug.cgi?id=193747
<rdar://problem/47498196>

Reviewed by Chris Dumez.

Make ServiceWorkerJob be no longer ref counted.
Instead its lifetime is fully controlled by ServiceWorkerContainer.

Make sure that a failing load will remove the job from ServiceWorkerContainer job map.
This allows to ensure that these jobs do not stay forever.
Before the patch, the jobs map was never cleared, which is creating a ref cycle whenever a job is not succesful.

Before the patch, unsetPendingActivity was only called for successful jobs finishing.
In case of failing loads, ServiceWorkerContainer would leak.
Make sure that setPendingActivity/unsetPendingActivity is balanced by storing
a pending activity in the job map next to the job.

When ServiceWorkerContainer is stopped, notify that all jobs are cancelled to NetworkProcess.
This makes these jobs in NetworkProcess-side to not stay until the corresponding WebProcess is gone.

Simplify ServiceWorkerJob promise rejection handling so that it is clear when promise is rejected and when it is not.
Update type of exception to be SecurityError when load fails due to AccessControl.

Covered by existing tests.

  • workers/service/ServiceWorkerContainer.cpp: (WebCore::ServiceWorkerContainer::addRegistration): (WebCore::ServiceWorkerContainer::removeRegistration): (WebCore::ServiceWorkerContainer::updateRegistration): (WebCore::ServiceWorkerContainer::scheduleJob): (WebCore::ServiceWorkerContainer::jobFailedWithException): (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration): (WebCore::ServiceWorkerContainer::jobResolvedWithUnregistrationResult): (WebCore::ServiceWorkerContainer::jobFailedLoadingScript): (WebCore::ServiceWorkerContainer::jobDidFinish): (WebCore::ServiceWorkerContainer::stop): (WebCore::ServiceWorkerContainer::job):
  • workers/service/ServiceWorkerContainer.h:
  • workers/service/ServiceWorkerJob.cpp: (WebCore::ServiceWorkerJob::failedWithException): (WebCore::ServiceWorkerJob::resolvedWithRegistration): (WebCore::ServiceWorkerJob::resolvedWithUnregistrationResult): (WebCore::ServiceWorkerJob::startScriptFetch): (WebCore::ServiceWorkerJob::didReceiveResponse): (WebCore::ServiceWorkerJob::notifyFinished): (WebCore::ServiceWorkerJob::cancelPendingLoad):
  • workers/service/ServiceWorkerJob.h: (WebCore::ServiceWorkerJob::hasPromise const): (WebCore::ServiceWorkerJob::takePromise):
  • workers/service/ServiceWorkerJobClient.h:
  • workers/service/server/SWServerJobQueue.cpp: (WebCore::SWServerJobQueue::scriptFetchFinished):

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

2:16 PM Changeset in webkit [241068] by Alan Coon
  • 6 edits in branches/safari-607-branch

Cherry-pick r240725. rdar://problem/47774554

Regression(PSON) Load hang can occur on history navigation
https://bugs.webkit.org/show_bug.cgi?id=194030
<rdar://problem/47656939>

Reviewed by Antti Koivisto.

Source/WebKit:

We do not support having more than one WebPage in a WebProcess with the same page ID. As a result,
if we decide to reuse an existing process on process-swap, we need to make sure that we either use
its suspended page (when possible, meaning that it is for the right HistoryItem / page) or we need
make sure we drop the existing suspended page for this process / pagePID combination, so that the
WebPage on WebProcess side gets closed before we attempt to do the new load.

We were doing this correctly in 2 places in WebProcessPool::processForNavigationInternal() but failed
to do so in a third place, when doing back to a HistoryItem which does not have a SuspendedPage but
whose process is still alive (presumably because it is kept alive by another suspended page). This
patch fixes this third place to remove any suspended page in the process for the current page before
reusing the process. An assertion was also added to the call site in
WebPageProxy::receivedNavigationPolicyDecision() to make sure we catch this more easily in the
future.

  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
  • UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::processForNavigationInternal): (WebKit::WebProcessPool::removeAllSuspendedPagesForPage): (WebKit::WebProcessPool::hasSuspendedPageFor const):
  • UIProcess/WebProcessPool.h:

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

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

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

Cherry-pick r240717. rdar://problem/47774504

Crash in WebKit::RemoteLayerTreePropertyApplier::updateChildren
https://bugs.webkit.org/show_bug.cgi?id=193897
<rdar://problem/47427750>

Reviewed by Simon Fraser.

There has been some null pointer crashes where we fail to find a remote layer tree node that matches
the transaction properties.

  • Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm: (WebKit::RemoteLayerTreePropertyApplier::updateChildren):

Null check the nodes.

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

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

Cherry-pick r240709. rdar://problem/47776349

AX: Role=switch not returning correct accessibilityValue
https://bugs.webkit.org/show_bug.cgi?id=194006

Reviewed by Joanmarie Diggs.

Source/WebCore:

Return the toggle state of a role=switch element.

Test: accessibility/ios-simulator/role-switch.html

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: (-[WebAccessibilityObjectWrapper accessibilityValue]):

LayoutTests:

  • accessibility/ios-simulator/role-switch-expected.txt: Added.
  • accessibility/ios-simulator/role-switch.html: Added.

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

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

Cherry-pick r240702. rdar://problem/47774503

iOS: Nullptr crash in WebPage::getPositionInformation dereferencing an input element for data list
https://bugs.webkit.org/show_bug.cgi?id=193996

Reviewed by Wenson Hsieh.

Added a missing nullptr check.

  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::getPositionInformation):

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

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

Cherry-pick r240697. rdar://problem/47774541

Make sure we have a frame before trying to access its loader
https://bugs.webkit.org/show_bug.cgi?id=193985
<rdar://problem/47618239>

Reviewed by Ryosuke Niwa.

  • loader/ResourceLoadObserver.cpp: (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):

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

2:16 PM Changeset in webkit [241063] by Alan Coon
  • 2 edits in branches/safari-607-branch/Tools

Cherry-pick r240695. rdar://problem/47776355

REGRESSION: ProcessSwap.DoSameSiteNavigationAfterCrossSiteProvisionalLoadStarted Failing on iOS
https://bugs.webkit.org/show_bug.cgi?id=193977
<rdar://problem/47643716>

Reviewed by Geoff Garen.

Update API test to address flakiness on iOS. Instead of doing the last navigation after receiving the
didStartProvisionalLoad, do we right after we answer the navigation policy request. Flakiness was due
to the previous provisional committing *before* we make the last load.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

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

2:16 PM Changeset in webkit [241062] by Alan Coon
  • 3 edits
    1 add in branches/safari-607-branch

Cherry-pick r240681. rdar://problem/47774514

ValueRecovery::recover() should purify NaN values it recovers.
https://bugs.webkit.org/show_bug.cgi?id=193978
<rdar://problem/47625488>

Reviewed by Saam Barati.

JSTests:

  • stress/value-recovery-of-double-displaced-in-jsstack-should-be-purified.js: Added.

Source/JavaScriptCore:

According to DFG::OSRExit::executeOSRExit() and DFG::OSRExit::compileExit(),
recovered DoubleDisplacedInJSStack values need to be purified.
ValueRecovery::recover() should do the same.

  • bytecode/ValueRecovery.cpp: (JSC::ValueRecovery::recover const):

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

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

Cherry-pick r240675. rdar://problem/47776350

Regression (r240046): [PSON] Spurious changes to [WKWebView url] and [WKWebView loading] after [WKWebView loadRequest]
https://bugs.webkit.org/show_bug.cgi?id=193967
<rdar://problem/47635348>

Reviewed by Alex Christensen.

Source/WebKit:

Update WebPageProxy::receivedPolicyDecision() to no longer clear the pending URL when we send PolicyAction::Ignore to
the old process when the load is continuing in a new process due to PSON.

  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::receivedNavigationPolicyDecision): (WebKit::WebPageProxy::receivedPolicyDecision):
  • UIProcess/WebPageProxy.h:

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: (-[PSONLoadingObserver observeValueForKeyPath:ofObject:change:context:]):

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

2:16 PM Changeset in webkit [241060] by Alan Coon
  • 6 edits in branches/safari-607-branch/Source/WebKit

Cherry-pick r240663. rdar://problem/47774492

REGRESSION (PSON): Flash on link navigation on Mac
https://bugs.webkit.org/show_bug.cgi?id=193961
<rdar://problem/47482507>

Reviewed by Chris Dumez.

The target page sends EnterAcceleratedCompositingMode message too early, before we have a valid layer tree.

  • WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::attach): Deleted.

Not needed anymore.

  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::reinitializeWebPage): (WebKit::WebPage::didCompletePageTransition): (WebKit::m_shouldAttachDrawingAreaOnPageTransition): Deleted.

Move message sending logic fully to TiledCoreAnimationDrawingArea.
Unfreezing the layer tree is sufficient to trigger the message.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):

There is no need to treat process swap case differently.

(WebKit::TiledCoreAnimationDrawingArea::sendEnterAcceleratedCompositingModeIfNeeded):

Send this after the first successful layer flush with the root layer set.

(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
(WebKit::TiledCoreAnimationDrawingArea::attach): Deleted.

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

2:16 PM Changeset in webkit [241059] by Alan Coon
  • 4 edits in branches/safari-607-branch

Cherry-pick r240660. rdar://problem/47774552

REGRESSION (PSON): Twitter link gets stuck at t.co after navigating back in tab
https://bugs.webkit.org/show_bug.cgi?id=193932
<rdar://problem/47598947>

Reviewed by Brady Eidson.

Source/WebKit:

When doing a client side redirect from origin A to origin B, we would swap process and
create a SuspendedPageProxy and save it on the source BackForwardListItem. The issue is
that the BackForwardList is locked for such redirect so we end up updating the current
BackForwardListItem with origin B's URL while origin A's suspended page remained on
the item. When going to another URL in the same origin A, we would not create a suspended
page since no process-swap would occur. When pressing the back button, we would go back
to the previous BackForwardListItem and use its SuspendedPageProxy, which is for the
wrong URL (The pre-client redirect one).

To address the issue, we no longer create a SuspendedPageProxy for cross-site client side
redirects. There will be no way no go back to this suspended page anyway since the
back/forward list item will be updated with the redirection URL.

  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::suspendCurrentPageIfPossible):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

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

2:16 PM Changeset in webkit [241058] by Alan Coon
  • 3 edits in branches/safari-607-branch/Source/WebCore

Cherry-pick r240643. rdar://problem/47774515

webkitcurrentplaybacktargetiswirelesschanged and webkitCurrentPlaybackIsWireless are non-deterministic.
https://bugs.webkit.org/show_bug.cgi?id=193923
<rdar://problem/45956595>

Reviewed by Eric Carlson.

The value of webkitCurrentPlaybackTargetIsWireless can change in between when the event is scheduled
and when it's actually dispatched. To make this more deterministic, use a GenericTaskQueue to enqueue
setting m_isPlayingToWirelessTarget and dispatch the changed event in the same run-loop.

  • html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::clearMediaPlayer): (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged): (WebCore::HTMLMediaElement::setIsPlayingToWirelessTarget): (WebCore::HTMLMediaElement::dispatchEvent):
  • html/HTMLMediaElement.h:

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

2:16 PM Changeset in webkit [241057] by Alan Coon
  • 4 edits in branches/safari-607-branch/Source/WebInspectorUI

Cherry-pick r240639. rdar://problem/47774511

Web Inspector: Elements tab should toggle visibility for all selected nodes
https://bugs.webkit.org/show_bug.cgi?id=193089
<rdar://problem/47009256>

Reviewed by Devin Rousso.

Update "Toggle Visibility" command in DOM tree for multiple selection.
When both visible and hidden elements are selected in the DOM tree,
the toggle command behaves contextually. If one or more elements are
visible, they are hidden, otherwise they are shown. The context menu
shows "Hide Elements" or "Show Elements", respectively.

When only one element is selected, or the context menu target element
is not selected, the command continues to be "Toggle Visibility".

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Views/DOMTreeElement.js: (WI.DOMTreeElement.prototype.get isNodeHidden): Added. (WI.DOMTreeElement.prototype.toggleElementVisibility.inspectedPage_node_injectStyleAndToggleClass): (WI.DOMTreeElement.prototype.toggleElementVisibility): (WI.DOMTreeElement.prototype._populateTagContextMenu):
  • UserInterface/Views/DOMTreeOutline.js: (WI.DOMTreeOutline): (WI.DOMTreeOutline.prototype.toggleSelectedElementsVisibility): Added. Provide a public method for toggling the visibility of selected DOM nodes. Used by the "H" keyboard shortcut and DOMTreeElement context menu.

(WI.DOMTreeOutline.prototype._hideElements):
(WI.DOMTreeOutline.prototype._hideElement): Deleted.
Rename for multiple selection.

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

2:16 PM Changeset in webkit [241056] by Alan Coon
  • 2 edits in branches/safari-607-branch

Cherry-pick r240616. rdar://problem/47774497

ToString node actually does GC.
https://bugs.webkit.org/show_bug.cgi?id=193920
<rdar://problem/46695900>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/dfg-to-string-on-int-does-gc.js: Added.
  • stress/dfg-to-string-on-string-object-does-not-gc.js: Added.
  • stress/dfg-to-string-on-string-or-string-object-does-not-gc.js: Added.

Source/JavaScriptCore:

Other than for StringObjectUse and StringOrStringObjectUse, ToString and
CallStringConstructor can allocate new JSStrings, and hence, can GC.

  • dfg/DFGDoesGC.cpp: (JSC::DFG::doesGC):

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

2:16 PM Changeset in webkit [241055] by Alan Coon
  • 3 edits in branches/safari-607-branch/Source/WebInspectorUI

Cherry-pick r240594. rdar://problem/47774537

REGRESSION(?): Web Inspector: Can have multiple Timelines selected after edit mode
https://bugs.webkit.org/show_bug.cgi?id=193808
<rdar://problem/47537734>

Reviewed by Devin Rousso.

  • UserInterface/Controllers/SelectionController.js: (WI.SelectionController.prototype.didRemoveItems):
  • UserInterface/Views/TreeOutline.js: (WI.TreeOutline.prototype._indexesForSubtree): Fix a bug where no IndexSet was returned when passed a TreeElement with no children. This caused the Timelines tree selection to be corrupted when entering and exiting edit mode, as TreeElements are inserted and removed.

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

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

Cherry-pick r240537. rdar://problem/47774500

<video> elements not in the DOM should be allowed to AirPlay
https://bugs.webkit.org/show_bug.cgi?id=193837
Source/WebCore:

<rdar://42559491>

Reviewed by Eric Carlson.

Test: media/airplay-allows-buffering.html

Some websites will switch between <video> elements backed by MSE to one backed by
a media file in order to implement an AirPlay control. But when a <video> element is
removed from the DOM and paused, further buffering is blocked. For some ports (namely
Cocoa ones), this keeps AirPlay from engaging. Relax this buffering restriction for
elements who have been asked to play wirelessly, but whose wireless playback has not
started yet.

  • html/MediaElementSession.cpp: (WebCore::MediaElementSession::dataBufferingPermitted const): (WebCore::MediaElementSession::setShouldPlayToPlaybackTarget):

LayoutTests:

Reviewed by Eric Carlson.

  • media/airplay-allows-buffering-expected.txt: Added.
  • media/airplay-allows-buffering.html: Added.
  • platform/ios/TestExpectations:

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

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

Cherry-pick r240448. rdar://problem/47774335

Update ARM64EHash
https://bugs.webkit.org/show_bug.cgi?id=193776
<rdar://problem/47526457>

Reviewed by Mark Lam.

See radar for details.

  • assembler/AssemblerBuffer.h: (JSC::ARM64EHash::update): (JSC::ARM64EHash::finalHash const):

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

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

Cherry-pick r239895. rdar://problem/47776475

Allow WebContent process access to some drawing-related IOKit properties
https://bugs.webkit.org/show_bug.cgi?id=193086
<rdar://problem/46568088>

Reviewed by Eric Carlson.

Add one missing IOKit property, and revise the regexp used for another.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

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

2:16 PM Changeset in webkit [241051] by Alan Coon
  • 11 edits in branches/safari-607-branch

Cherry-pick r239881. rdar://problem/47776480

[iOS] Precision drop state thrashes when dragging near the top edge of an editable element
https://bugs.webkit.org/show_bug.cgi?id=193364
<rdar://problem/47214117>

Reviewed by Tim Horton.

Source/WebCore:

Add a new helper method on DragCaretController to compute the bounds of the editable element around the drop
caret position. This is either the enclosing form control (in the case of text fields and text areas), or the
highest editable root. See WebKit ChangeLog for more details.

Test: DragAndDropTests.AvoidPreciseDropNearTopOfTextArea

  • editing/FrameSelection.cpp: (WebCore::DragCaretController::editableElementRectInRootViewCoordinates const):
  • editing/FrameSelection.h:

Source/WebKit:

On iOS, marking a UIDropProposal as precise offsets the hit-testing location of the drop by a small distance
either upwards or downwards from the actual location of the user's finger. When dragging over an editable
element, WebKit currently marks the drop proposal as precise; however, when dragging over the top edge of an
editable element, what happens is that the hit-testing location is offset to a location outside of the editable
element, which causes us to turn off precision drop mode; subsequently, turning off precision drop mode removes
the offset, which causes us to hit-test within the editable element once again and re-enable precision mode, and
the cycle continues.

In order to mitigate this, bail out of precision drop mode when dragging near the top or bottom edges of the
highest editable root that contains the current drop caret position (or, if the drop caret is inside of a text
form control, use the form control as the editable element instead).

  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didPerformDragControllerAction):
  • UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::currentDragCaretEditableElementRect const):
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView dropInteraction:sessionDidUpdate:]):

Avoid precise mode when we're less than 25pt away from the top and bottom edge of the editable element rect.
Since the drag location offset amount is a fixed offset in window coordinates, we first convert this minimum
distance to the content view's coordinate space by dividing by the content scale factor.

  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::performDragControllerAction):

Tools:

Add a test to verify that dragging near the top of a textarea element does not flag the drop proposal as
precise, whereas dragging near the middle of the textarea does.

  • TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm: (TestWebKitAPI::TEST):

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

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

Apply patch. rdar://problem/47774509

2:02 PM Changeset in webkit [241049] by wilander@apple.com
  • 9 edits in trunk/Source

Forward Ad Click Attribution data from HTMLAnchorElement::handleClick() to WebKit::NavigationActionData
https://bugs.webkit.org/show_bug.cgi?id=194325
<rdar://problem/47840283>

Reviewed by Chris Dumez.

Source/WebCore:

No new tests. This is just data forwarding. Once the data is stored, I will create
test infrastructure to query it.

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::handleClick):

  • loader/AdClickAttribution.h:

(WebCore::AdClickAttribution::encode const):
(WebCore::AdClickAttribution::decode):
(WebCore::AdClickAttribution::Conversion::encode const):
(WebCore::AdClickAttribution::Conversion::decode):

Infrastructure for IPC.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::urlSelected):
(WebCore::FrameLoader::loadURLIntoChildFrame):
(WebCore::FrameLoader::loadFrameRequest):
(WebCore::FrameLoader::loadURL):

These functions forward the optional WebCore::AdClickAttribution object
FrameLoader::loadURL() creates the NavigationAction object and sets the
WebCore::AdClickAttribution object on there.

  • loader/FrameLoader.h:

(WebCore::FrameLoader::urlSelected):
(WebCore::FrameLoader::loadURL):

  • loader/NavigationAction.h:

(WebCore::NavigationAction::adClickAttribution):
(WebCore::NavigationAction::setAdClickAttribution):

Source/WebKit:

  • Shared/NavigationActionData.cpp:

(WebKit::NavigationActionData::encode const):
(WebKit::NavigationActionData::decode):

  • Shared/NavigationActionData.h:

Now holds an optional WebCore::AdClickAttribution object.

1:52 PM Changeset in webkit [241048] by Justin Fan
  • 14 edits
    7 copies
    3 moves in trunk

[Web GPU] Implement supporting dictionaries for GPUTexture
https://bugs.webkit.org/show_bug.cgi?id=194354

Reviewed by Dean Jackson.

Source/WebCore:

Add dictionaries needed to create a GPUTextureDescriptor.

No new tests; no change in behavior.

New interface and dictionaries added:

  • Modules/webgpu/GPUExtent3D.idl:
  • Modules/webgpu/GPUTextureDescriptor.idl:
  • Modules/webgpu/GPUTextureDimension.idl:
  • Modules/webgpu/GPUTextureUsage.idl:
  • platform/graphics/gpu/GPUExtent3D.h:
  • platform/graphics/gpu/GPUTextureDescriptor.h:
  • platform/graphics/gpu/GPUTextureDimension.h:
  • platform/graphics/gpu/GPUTextureUsage.h:

Update WebGPUTextureFormatEnum to GPUTextureFormat:

  • Modules/webgpu/WebGPUTextureFormatEnum.h: Removed.
  • Modules/webgpu/GPUTextureFormat.idl: Renamed from WebGPUTextureFormatEnum.idl and updated to hyphen-case.
  • platform/graphics/gpu/GPUTextureFormat.h: Renamed from GPUTextureFormatEnum and updated for hyphen-case IDL.
  • Modules/webgpu/WebGPUSwapChain.cpp:
  • Modules/webgpu/WebGPUSwapChain.h:
  • Modules/webgpu/WebGPUSwapChain.idl:
  • platform/graphics/gpu/GPUSwapChain.h:
  • platform/graphics/gpu/cocoa/GPUSwapChainMetal.mm:

(WebCore::platformTextureFormatForGPUTextureFormat):
(WebCore::GPUSwapChain::setFormat):

Update project files with new symbols:

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

LayoutTests:

Update test files to use hyphen-case for GPUTextureFormat.

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

(async.setUpContexts):

  • webgpu/js/webgpu-functions.js:

(createBasicContext):

1:48 PM Changeset in webkit [241047] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

Fix potential build error in GPUDevice
https://bugs.webkit.org/show_bug.cgi?id=194359

Reviewed by Joseph Pecoraro.

Add an UNUSED_PARAM for non-macOS platforms.

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

(WebCore::GPUDevice::create):

1:44 PM Changeset in webkit [241046] by dbates@webkit.org
  • 2 edits in trunk/Source/WebKit

Fix the Apple Internal build. See <rdar://problem/47860943> for more details.

  • UIProcess/ios/fullscreen/WKFullscreenStackView.mm:

(-[WKFullscreenStackView init]):

1:32 PM Changeset in webkit [241045] by Kocsen Chung
  • 1 copy in tags/Safari-608.1.5.1

Tag Safari-608.1.5.1.

1:26 PM Changeset in webkit [241044] by dbates@webkit.org
  • 22 edits in trunk/Source

Standardize on ControlKey instead of CtrlKey
https://bugs.webkit.org/show_bug.cgi?id=194317

Reviewed by Tim Horton.

Source/WebCore:

  • dom/UIEventWithKeyState.cpp:

(WebCore::UIEventWithKeyState::modifiersFromInitializer):
(WebCore::UIEventWithKeyState::setModifierKeys):

  • dom/UIEventWithKeyState.h:

(WebCore::UIEventWithKeyState::ctrlKey const):

  • page/ios/EventHandlerIOS.mm:

(WebCore::EventHandler::accessKeyModifiers):

  • page/mac/EventHandlerMac.mm:

(WebCore::EventHandler::accessKeyModifiers):

  • platform/PlatformEvent.h:

(WebCore::PlatformEvent::controlKey const):
(WebCore::PlatformEvent::PlatformEvent):
(WebCore::PlatformEvent::ctrlKey const): Deleted.

  • platform/cocoa/KeyEventCocoa.mm:

(WebCore::PlatformKeyboardEvent::getCurrentModifierState):

  • platform/gtk/PlatformKeyboardEventGtk.cpp:

(WebCore::modifiersForGdkKeyEvent):

  • platform/gtk/PlatformMouseEventGtk.cpp:

(WebCore::PlatformMouseEvent::PlatformMouseEvent):

  • platform/gtk/PlatformWheelEventGtk.cpp:

(WebCore::PlatformWheelEvent::PlatformWheelEvent):

  • platform/ios/KeyEventIOS.mm:

(WebCore::PlatformKeyboardEvent::currentStateOfModifierKeys):

  • platform/ios/PlatformEventFactoryIOS.mm:

(WebCore::modifiersForEvent):

  • platform/mac/KeyEventMac.mm:

(WebCore::PlatformKeyboardEvent::currentStateOfModifierKeys):

  • platform/mac/PlatformEventFactoryMac.mm:

(WebCore::modifiersForEvent):

  • testing/Internals.cpp:

(WebCore::Internals::accessKeyModifiers const):

Source/WebKit:

  • Shared/WebEventConversion.cpp:

(WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
(WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
(WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
(WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
(WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):

  • WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:

(WebKit::WebEditorClient::handleKeyboardEvent):

  • WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp:

(WebKit::handleKeyPress):

Source/WebKitLegacy/win:

  • AccessibleBase.cpp:

(AccessibleBase::get_accKeyboardShortcut):

  • WebView.cpp:

(WebView::keyDown):

1:03 PM Changeset in webkit [241043] by Kocsen Chung
  • 7 edits in branches/safari-608.1.5.1-branch/Source

Versioning.

12:42 PM Changeset in webkit [241042] by Kocsen Chung
  • 1 copy in branches/safari-608.1.5.1-branch

New branch.

12:37 PM Changeset in webkit [241041] by Kocsen Chung
  • 1 delete in tags/Safari-608.1.5.1

Delete tag

12:13 PM Changeset in webkit [241040] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix WatchOS build
https://bugs.webkit.org/show_bug.cgi?id=194353

Rubber stamped by Tim Horton and Wenson Hsieh.

  • rendering/RenderThemeIOS.mm:

(WebCore::iconForAttachment):

11:57 AM Changeset in webkit [241039] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: "Worker not found" uncaught protocol errors
https://bugs.webkit.org/show_bug.cgi?id=194319

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2019-02-06
Reviewed by Matt Baker.

  • UserInterface/Base/Main.js:

(WI.terminatePageTarget):
Remove Worker targets associated with the Page on navigation.
Eventually we will have to associate Workers with their parent
frame, but for now a transition can only happen at the Page
level, so we can eliminate all workers on the page.

  • UserInterface/Controllers/WorkerManager.js:

(WI.WorkerManager.prototype.workerCreated):

  • UserInterface/Protocol/Connection.js:

(InspectorBackend.WorkerConnection.sendMessageToBackend):
Allow any WorkerAgent domain message to fail silently. This can
happen if a Worker is created and destroyed before the frontend
hears about it and sends messages to the backend for that Worker.

11:50 AM Changeset in webkit [241038] by ysuzuki@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

[JSC] Unify indirectEvalExecutableSpace and directEvalExecutableSpace
https://bugs.webkit.org/show_bug.cgi?id=194339

Reviewed by Michael Saboff.

DirectEvalExecutable and IndirectEvalExecutable have completely same memory layout.
They have even the same structure. This patch unifies the subspaces for them.

  • runtime/DirectEvalExecutable.h:
  • runtime/EvalExecutable.h:

(JSC::EvalExecutable::subspaceFor):

  • runtime/IndirectEvalExecutable.h:
  • runtime/VM.cpp:
  • runtime/VM.h:

(JSC::VM::forEachScriptExecutableSpace):

11:49 AM Changeset in webkit [241037] by ysuzuki@apple.com
  • 21 edits
    1 add in trunk/Source/JavaScriptCore

[JSC] NativeExecutable should be smaller
https://bugs.webkit.org/show_bug.cgi?id=194331

Reviewed by Michael Saboff.

NativeExecutable takes 88 bytes now. Since our GC rounds the size with 16, it actually takes 96 bytes in IsoSubspaces.
Since a lot of NativeExecutable are allocated, we already has two MarkedBlocks even just after JSGlobalObject initialization.
This patch makes sizeof(NativeExecutable) 64 bytes, which is 32 bytes smaller than 96 bytes. Now our JSGlobalObject initialization
only takes one MarkedBlock for NativeExecutable.

To make NativeExecutable smaller,

  1. m_numParametersForCall and m_numParametersForConstruct in ExecutableBase are only meaningful in ScriptExecutable subclasses. Since they are not touched from JIT, we can remove them from ExecutableBase and move them to ScriptExecutable.
  1. DOMJIT::Signature* is rarely used. Rather than having it in NativeExecutable, we should put it in NativeJITCode. Since NativeExecutable always has JITCode, we can safely query the value from NativeExecutable. This patch creates NativeDOMJITCode, which is a subclass of NativeJITCode, and instantiated only when DOMJIT::Signature* is given.
  1. Move Intrinsic to a member of ScriptExecutable or JITCode. Since JITCode has some paddings to put things, we can leverage this to put Intrinsic for NativeExecutable.

We also move "clearCode" code from ExecutableBase to ScriptExecutable since it is only valid for ScriptExecutable subclasses.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • bytecode/CallVariant.h:
  • interpreter/Interpreter.cpp:
  • jit/JITCode.cpp:

(JSC::DirectJITCode::DirectJITCode):
(JSC::NativeJITCode::NativeJITCode):
(JSC::NativeDOMJITCode::NativeDOMJITCode):

  • jit/JITCode.h:

(JSC::JITCode::signature const):
(JSC::JITCode::intrinsic):

  • jit/JITOperations.cpp:
  • jit/JITThunks.cpp:

(JSC::JITThunks::hostFunctionStub):

  • jit/Repatch.cpp:
  • llint/LLIntSlowPaths.cpp:
  • runtime/ExecutableBase.cpp:

(JSC::ExecutableBase::dump const):
(JSC::ExecutableBase::hashFor const):
(JSC::ExecutableBase::hasClearableCode const): Deleted.
(JSC::ExecutableBase::clearCode): Deleted.

  • runtime/ExecutableBase.h:

(JSC::ExecutableBase::ExecutableBase):
(JSC::ExecutableBase::isModuleProgramExecutable):
(JSC::ExecutableBase::isHostFunction const):
(JSC::ExecutableBase::generatedJITCodeForCall const):
(JSC::ExecutableBase::generatedJITCodeForConstruct const):
(JSC::ExecutableBase::generatedJITCodeFor const):
(JSC::ExecutableBase::generatedJITCodeForCall): Deleted.
(JSC::ExecutableBase::generatedJITCodeForConstruct): Deleted.
(JSC::ExecutableBase::generatedJITCodeFor): Deleted.
(JSC::ExecutableBase::offsetOfNumParametersFor): Deleted.
(JSC::ExecutableBase::hasJITCodeForCall const): Deleted.
(JSC::ExecutableBase::hasJITCodeForConstruct const): Deleted.
(JSC::ExecutableBase::intrinsic const): Deleted.

  • runtime/ExecutableBaseInlines.h: Added.

(JSC::ExecutableBase::intrinsic const):
(JSC::ExecutableBase::hasJITCodeForCall const):
(JSC::ExecutableBase::hasJITCodeForConstruct const):

  • runtime/JSBoundFunction.cpp:
  • runtime/JSType.cpp:

(WTF::printInternal):

  • runtime/JSType.h:
  • runtime/NativeExecutable.cpp:

(JSC::NativeExecutable::create):
(JSC::NativeExecutable::createStructure):
(JSC::NativeExecutable::NativeExecutable):
(JSC::NativeExecutable::signatureFor const):
(JSC::NativeExecutable::intrinsic const):

  • runtime/NativeExecutable.h:
  • runtime/ScriptExecutable.cpp:

(JSC::ScriptExecutable::ScriptExecutable):
(JSC::ScriptExecutable::clearCode):
(JSC::ScriptExecutable::installCode):
(JSC::ScriptExecutable::hasClearableCode const):

  • runtime/ScriptExecutable.h:

(JSC::ScriptExecutable::intrinsic const):
(JSC::ScriptExecutable::hasJITCodeForCall const):
(JSC::ScriptExecutable::hasJITCodeForConstruct const):

  • runtime/VM.cpp:

(JSC::VM::getHostFunction):

11:40 AM Changeset in webkit [241036] by mark.lam@apple.com
  • 5 edits in branches/safari-607-branch

Cherry-pick r240998. rdar://problem/47843417

2019-02-05 Mark Lam <mark.lam@apple.com>

Fix DFG's doesGC() for a few more nodes.
https://bugs.webkit.org/show_bug.cgi?id=194307
<rdar://problem/47832956>

Reviewed by Yusuke Suzuki.

Fix doesGC() for the following nodes:

NumberToStringWithValidRadixConstant:

Calls operationInt32ToStringWithValidRadix(), which calls int32ToString(),
which can allocate a string.
Calls operationInt52ToStringWithValidRadix(), which calls int52ToString(),
which can allocate a string.
Calls operationDoubleToStringWithValidRadix(), which calls numberToString(),
which can allocate a string.

RegExpExecNonGlobalOrSticky: calls createRegExpMatchesArray() which allocates

memory for all kinds of objects.

RegExpMatchFast: calls operationRegExpMatchFastString(), which calls

RegExpObject::execInline() and RegExpObject::matchGlobal(). Both of
these allocates memory for the match result.

RegExpMatchFastGlobal: calls operationRegExpMatchFastGlobalString(), which

calls RegExpObject's collectMatches(), which allocates an array amongst
other objects.

StringFromCharCode:

If the uint32 code to convert is greater than maxSingleCharacterString,
we'll call operationStringFromCharCode(), which calls jsSingleCharacterString(),
which allocates a new string if the code is greater than maxSingleCharacterString.

Also fix SpeculativeJIT::compileFromCharCode() and FTL's compileStringFromCharCode()
to use maxSingleCharacterString instead of a literal constant.

  • dfg/DFGDoesGC.cpp: (JSC::DFG::doesGC):
  • dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileFromCharCode):
  • ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileStringFromCharCode):
11:33 AM Changeset in webkit [241035] by mark.lam@apple.com
  • 3 edits in branches/safari-607-branch

Cherry-pick r240991. rdar://problem/47855123

2019-02-05 Mark Lam <mark.lam@apple.com>

Move DFG nodes that clobberize() says will write(Heap) to the doesGC() list that returns true.
https://bugs.webkit.org/show_bug.cgi?id=194298
<rdar://problem/47827555>

Reviewed by Saam Barati.

We do this for 3 reasons:

  1. It's clearer when reading doesGC()'s code that these nodes will return true.
  2. If things change in the future where clobberize() no longer reports these nodes as write(Heap), each node should be vetted first to make sure that it can never GC before being moved back to the doesGC() list that returns false.
  3. This reduces the list of nodes that we need to audit to make sure doesGC() is correct in its claims about the nodes' GCing possibility.

The list of nodes moved are:

ArrayPush
ArrayPop
Call
CallEval
CallForwardVarargs
CallVarargs
Construct
ConstructForwardVarargs
ConstructVarargs
DefineDataProperty
DefineAccessorProperty
DeleteById
DeleteByVal
DirectCall
DirectConstruct
DirectTailCallInlinedCaller
GetById
GetByIdDirect
GetByIdDirectFlush
GetByIdFlush
GetByIdWithThis
GetByValWithThis
GetDirectPname
GetDynamicVar
HasGenericProperty
HasOwnProperty
HasStructureProperty
InById
InByVal
InstanceOf
InstanceOfCustom
LoadVarargs
NumberToStringWithRadix
PutById
PutByIdDirect
PutByIdFlush
PutByIdWithThis
PutByOffset
PutByValWithThis
PutDynamicVar
PutGetterById
PutGetterByVal
PutGetterSetterById
PutSetterById
PutSetterByVal
PutStack
PutToArguments
RegExpExec
RegExpTest
ResolveScope
ResolveScopeForHoistingFuncDeclInEval
TailCall
TailCallForwardVarargsInlinedCaller
TailCallInlinedCaller
TailCallVarargsInlinedCaller
ToNumber
ToPrimitive
ValueNegate

  • dfg/DFGDoesGC.cpp: (JSC::DFG::doesGC):
11:32 AM Changeset in webkit [241034] by ddkilzer@apple.com
  • 2 edits in trunk/Tools

WTR::InjectedBundlePage::willSendRequestForFrame() leaks a WKDataRef
<https://webkit.org/b/194286>
<rdar://problem/47815558>

Reviewed by Alexey Proskuryakov.

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::InjectedBundlePage::willSendRequestForFrame): Use
WKRetainPtr<> to avoid leaking the WKDataRef.

11:23 AM Changeset in webkit [241033] by mark.lam@apple.com
  • 3 edits in branches/safari-607-branch

Cherry-pick r240917. rdar://problem/47810465

2019-02-03 Mark Lam <mark.lam@apple.com>

DFG's doesGC() is incorrect about the SameValue node's behavior.
https://bugs.webkit.org/show_bug.cgi?id=194211
<rdar://problem/47608913>

Reviewed by Saam Barati.

Only the DoubleRepUse case is guaranteed to not GC. The other case may GC because
it calls operationSameValue() which may allocate memory for resolving ropes.

  • dfg/DFGDoesGC.cpp: (JSC::DFG::doesGC):
11:09 AM Changeset in webkit [241032] by mark.lam@apple.com
  • 4 edits
    3 copies in branches/safari-607-branch

Cherry-pick r240616. rdar://problem/47774497

2019-01-28 Mark Lam <mark.lam@apple.com>

ToString node actually does GC.
https://bugs.webkit.org/show_bug.cgi?id=193920
<rdar://problem/46695900>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/dfg-to-string-on-int-does-gc.js: Added.
  • stress/dfg-to-string-on-string-object-does-not-gc.js: Added.
  • stress/dfg-to-string-on-string-or-string-object-does-not-gc.js: Added.

Source/JavaScriptCore:

Other than for StringObjectUse and StringOrStringObjectUse, ToString and
CallStringConstructor can allocate new JSStrings, and hence, can GC.

  • dfg/DFGDoesGC.cpp: (JSC::DFG::doesGC):
10:59 AM Changeset in webkit [241031] by ddkilzer@apple.com
  • 2 edits in trunk/LayoutTests

Revert part of r241015 that skipped all WebGL tests

tests.

10:39 AM Changeset in webkit [241030] by Kocsen Chung
  • 7 edits in tags/Safari-608.1.5.1/Source

Versioning.

10:37 AM Changeset in webkit [241029] by Kocsen Chung
  • 1 copy in tags/Safari-608.1.5.1

New tag.

10:35 AM EnvironmentVariables edited by Michael Catanzaro
(diff)
10:34 AM EnvironmentVariables edited by Michael Catanzaro
(diff)
10:24 AM Changeset in webkit [241028] by Jonathan Bedard
  • 3 edits in trunk/LayoutTests

[iPad] Initial test gardening (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=193767
<rdar://problem/47515175>

Unreviewed test gardening.

  • fast/forms/ios/validation-bubble-dismiss-on-tap.html: Change tap location so test is compatible with iPads.
  • platform/ipad/TestExpectations: Associate iPad specific failures with bugs.
10:22 AM Changeset in webkit [241027] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[SVG] fix SVGURIReference build by including SVGElement
https://bugs.webkit.org/show_bug.cgi?id=194292

Patch by Olivier Blin <Olivier Blin> on 2019-02-06
Reviewed by Michael Catanzaro.

  • svg/SVGURIReference.h:

SVGURIReference is making use of SVGElement in its constructor, but
it was not declared.

The issue was not seen in unified builds because it was grouped with
other files including SVGElement.

9:58 AM Changeset in webkit [241026] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

Roll out parts of r238819 since it is a PLT performance regression.
https://bugs.webkit.org/show_bug.cgi?id=194346

Unreviewed performance fix.

  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:

(didStartProvisionalLoadForFrame):
(didReceiveServerRedirectForProvisionalLoadForFrame):
(didFinishLoadForFrame):
(globalObjectIsAvailableForFrame):
(didRemoveFrameFromHierarchy):
(didCommitLoadForFrame):
(didFinishDocumentLoadForFrame):
(didFailProvisionalLoadWithErrorForFrame):
(didFailLoadWithErrorForFrame):
(didSameDocumentNavigationForFrame):
(didLayoutForFrame):
(didReachLayoutMilestone):
(didFirstVisuallyNonEmptyLayoutForFrame):
(didHandleOnloadEventsForFrame):
(userAgentForURL):
(setUpPageLoaderClient):
(willSendRequestForFrame):
(didInitiateLoadForResource):
(didFinishLoadForResource):
(didFailLoadForResource):
(setUpResourceLoadClient):
(-[WKWebProcessPlugInBrowserContextController setLoadDelegate:]):
(ResourceLoadClient::ResourceLoadClient): Deleted.
(ResourceLoadClient::loadDelegate const): Deleted.
(ResourceLoadClient::pluginContextController const): Deleted.
(PageLoaderClient::PageLoaderClient): Deleted.
(PageLoaderClient::loadDelegate const): Deleted.
(PageLoaderClient::pluginContextController const): Deleted.
(PageLoaderClient::didStartProvisionalLoadForFrame): Deleted.
(PageLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame): Deleted.
(PageLoaderClient::didFinishLoadForFrame): Deleted.
(PageLoaderClient::globalObjectIsAvailableForFrame): Deleted.
(PageLoaderClient::didRemoveFrameFromHierarchy): Deleted.
(PageLoaderClient::didCommitLoadForFrame): Deleted.
(PageLoaderClient::didFinishDocumentLoadForFrame): Deleted.
(PageLoaderClient::didFailProvisionalLoadWithErrorForFrame): Deleted.
(PageLoaderClient::didFailLoadWithErrorForFrame): Deleted.
(PageLoaderClient::didSameDocumentNavigationForFrame): Deleted.
(PageLoaderClient::didLayoutForFrame): Deleted.
(PageLoaderClient::didReachLayoutMilestone): Deleted.
(PageLoaderClient::didFirstVisuallyNonEmptyLayoutForFrame): Deleted.
(PageLoaderClient::layoutMilestones const): Deleted.
(PageLoaderClient::didHandleOnloadEventsForFrame): Deleted.
(PageLoaderClient::userAgentForURL const): Deleted.
(ResourceLoadClient::willSendRequestForFrame): Deleted.
(ResourceLoadClient::didInitiateLoadForResource): Deleted.
(ResourceLoadClient::didFinishLoadForResource): Deleted.
(ResourceLoadClient::didFailLoadForResource): Deleted.

9:57 AM Changeset in webkit [241025] by Ryan Haddad
  • 5 edits in trunk/LayoutTests

Unreviewed test gardening, rebaseline some tests for iOS after r240713.

  • fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-block-scrolling-state-expected.txt:
  • fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-document-scrolling-state-expected.txt:
  • fast/events/touch/ios/block-without-overflow-scroll-scrolling-state-expected.txt:
  • fast/events/touch/ios/tap-with-active-touch-end-listener-expected.txt:
9:32 AM Changeset in webkit [241024] by Michael Catanzaro
  • 2 edits in trunk/Tools

Unreviewed, fix a typo

  • TestWebKitAPI/Tests/WebKitGLib/TestCookieManager.cpp:
9:04 AM Changeset in webkit [241023] by Alan Bujtas
  • 6 edits
    1 add
    1 delete in trunk/Source/WebCore

[LFC][IFC] Move line layout code to a dedicated file
https://bugs.webkit.org/show_bug.cgi?id=194328

Reviewed by Antti Koivisto.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::layout const):
(WebCore::Layout::isTrimmableContent): Deleted.
(WebCore::Layout::InlineFormattingContext::initializeNewLine const): Deleted.
(WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const): Deleted.
(WebCore::Layout::InlineFormattingContext::createFinalRuns const): Deleted.
(WebCore::Layout::InlineFormattingContext::postProcessInlineRuns const): Deleted.
(WebCore::Layout::InlineFormattingContext::closeLine const): Deleted.
(WebCore::Layout::InlineFormattingContext::appendContentToLine const): Deleted.
(WebCore::Layout::InlineFormattingContext::layoutInlineContent const): Deleted.
(WebCore::Layout::InlineFormattingContext::computeFloatPosition const): Deleted.
(WebCore::Layout::InlineFormattingContext::placeInFlowPositionedChildren const): Deleted.

  • layout/inlineformatting/InlineFormattingContext.h:

(WebCore::Layout::InlineFormattingContext::LineLayout::Line::hasContent const):
(WebCore::Layout::InlineFormattingContext::LineLayout::Line::isClosed const):
(WebCore::Layout::InlineFormattingContext::LineLayout::Line::isFirstLine const):
(WebCore::Layout::InlineFormattingContext::LineLayout::Line::runs):
(WebCore::Layout::InlineFormattingContext::LineLayout::Line::contentLogicalLeft const):
(WebCore::Layout::InlineFormattingContext::LineLayout::Line::availableWidth const):
(WebCore::Layout::InlineFormattingContext::LineLayout::Line::lastRunType const):
(WebCore::Layout::InlineFormattingContext::LineLayout::Line::logicalTop const):
(WebCore::Layout::InlineFormattingContext::LineLayout::Line::logicalBottom const):
(WebCore::Layout::InlineFormattingContext::LineLayout::Line::logicalHeight const):
(WebCore::Layout::InlineFormattingContext::Line::hasContent const): Deleted.
(WebCore::Layout::InlineFormattingContext::Line::isClosed const): Deleted.
(WebCore::Layout::InlineFormattingContext::Line::isFirstLine const): Deleted.
(WebCore::Layout::InlineFormattingContext::Line::runs): Deleted.
(WebCore::Layout::InlineFormattingContext::Line::contentLogicalLeft const): Deleted.
(WebCore::Layout::InlineFormattingContext::Line::availableWidth const): Deleted.
(WebCore::Layout::InlineFormattingContext::Line::lastRunType const): Deleted.
(WebCore::Layout::InlineFormattingContext::Line::logicalTop const): Deleted.
(WebCore::Layout::InlineFormattingContext::Line::logicalBottom const): Deleted.
(WebCore::Layout::InlineFormattingContext::Line::logicalHeight const): Deleted.

  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

(WebCore::Layout::adjustedLineLogicalLeft): Deleted.
(WebCore::Layout::InlineFormattingContext::Geometry::justifyRuns): Deleted.
(WebCore::Layout::InlineFormattingContext::Geometry::computeExpansionOpportunities): Deleted.
(WebCore::Layout::InlineFormattingContext::Geometry::alignRuns): Deleted.
(WebCore::Layout::InlineFormattingContext::Geometry::runWidth): Deleted.

  • layout/inlineformatting/Line.cpp:

(WebCore::Layout::InlineFormattingContext::LineLayout::Line::init):
(WebCore::Layout::InlineFormattingContext::LineLayout::Line::adjustLogicalLeft):
(WebCore::Layout::InlineFormattingContext::LineLayout::Line::adjustLogicalRight):
(WebCore::Layout::InlineFormattingContext::LineLayout::Line::contentLogicalRight const):
(WebCore::Layout::InlineFormattingContext::LineLayout::Line::appendContent):
(WebCore::Layout::InlineFormattingContext::LineLayout::Line::close):
(WebCore::Layout::InlineFormattingContext::Line::init): Deleted.
(WebCore::Layout::InlineFormattingContext::Line::adjustLogicalLeft): Deleted.
(WebCore::Layout::InlineFormattingContext::Line::adjustLogicalRight): Deleted.
(WebCore::Layout::InlineFormattingContext::Line::contentLogicalRight const): Deleted.
(WebCore::Layout::InlineFormattingContext::Line::appendContent): Deleted.
(WebCore::Layout::InlineFormattingContext::Line::close): Deleted.

8:59 AM Changeset in webkit [241022] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

CoreAudioCaptureSource should not configure its audio unit until it starts producing data
https://bugs.webkit.org/show_bug.cgi?id=194310

Reviewed by Eric Carlson.

Delay the configuration of the audio unit until the source is instructed to start producing data.
This allows the UIProcess to not start changing the audio unit when
checking for constraints during getUserMedia call before the prompt.
Covered by manual testing.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):
(WebCore::CoreAudioCaptureSource::initializeToStartProducingData):
(WebCore::CoreAudioCaptureSource::startProducingData):

  • platform/mediastream/mac/CoreAudioCaptureSource.h:
8:58 AM Changeset in webkit [241021] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Disable audio ducking at Audio Unit setup time
https://bugs.webkit.org/show_bug.cgi?id=194303

Reviewed by Eric Carlson.

When creating a CoreAudioCaptureSource, the audio unit might be
reconfigured if a past audio capture was done.
This might trigger audio ducking which is undone in startInternal.
In some cases, startInternal will never call start.
In that case, the audio unit will continue ducking the other processing.
To ensure ducking is disabled, unduck in setupAudioUnit as well as startInternal.

In addition to that, once a shared unit is created, it stays alive until the UIProcess exits.
This might affect all applications.
Instead, whenever the shared unit is stopped, clean it so as to restore the state as if no capture ever happened.
This has noticeable effects in the quality of audio being played on bluetooth devices.

Covered by manual tests.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioSharedUnit::setupAudioUnit):
(WebCore::CoreAudioSharedUnit::unduck):
(WebCore::CoreAudioSharedUnit::startInternal):
(WebCore::CoreAudioSharedUnit::captureFailed):
(WebCore::CoreAudioSharedUnit::stopProducingData):

8:30 AM Changeset in webkit [241020] by Kocsen Chung
  • 7 edits in trunk/Source

Versioning.

7:59 AM Changeset in webkit [241019] by Kocsen Chung
  • 7 edits in trunk/Source

Versioning.

7:44 AM Changeset in webkit [241018] by Antti Koivisto
  • 3 edits
    3 adds in trunk

RELEASE_ASSERT(!m_document.isResolvingTreeStyle()) in com.apple.WebKit.WebContent at WebCore: WebCore::StyleResolver::~StyleResolver
https://bugs.webkit.org/show_bug.cgi?id=194333
<rdar://problem/47822929>

Reviewed by Zalan Bujtas.

Source/WebCore:

Content extensions may mutate the extension stylesheet in the middle of a style resolution as a result of
the legacy animation code triggering a resource load.

Test: http/tests/contentextensions/css-display-none-keyframe.html

  • style/StyleScope.cpp:

(WebCore::Style::Scope::scheduleUpdate):

Avoid clearing the style resolver if we are in the middle of a style resolution.
A better fix that avoid doing this in the first place is tracked by https://bugs.webkit.org/show_bug.cgi?id=194335.

LayoutTests:

  • http/tests/contentextensions/css-display-none-keyframe-expected.txt: Added.
  • http/tests/contentextensions/css-display-none-keyframe.html: Added.
  • http/tests/contentextensions/css-display-none-keyframe.html.json: Added.
7:40 AM Changeset in webkit [241017] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Build failure after r240315
https://bugs.webkit.org/show_bug.cgi?id=194341

Patch by Pablo Saavedra <Pablo Saavedra> on 2019-02-06
Reviewed by Wenson Hsieh.

  • bindings/js/JSUndoItemCustom.cpp:

(WebCore::JSUndoItemOwner::isReachableFromOpaqueRoots):

5:47 AM Changeset in webkit [241016] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[GTK][WPE] force libpsl build to use ICU in jhbuild
https://bugs.webkit.org/show_bug.cgi?id=194288

Patch by Olivier Blin <Olivier Blin> on 2019-02-06
Reviewed by Carlos Garcia Campos.

  • gtk/jhbuild.modules:

Require ICU for libpsl build in jhbuild, like done in WPE.

1:42 AM Changeset in webkit [241015] by rniwa@webkit.org
  • 4 edits
    2 adds in trunk

REGRESSION (r240909): Release assert in FrameLoader::loadURL when navigating with a non-existent target name
https://bugs.webkit.org/show_bug.cgi?id=194329

Reviewed by Geoffrey Garen.

Source/WebCore:

The bug was caused by the code path for when navigating with a specific target frame name that does not exist
never setting the load type of PolicyChecker. As a result, we would use whatever load type used in the previous
navigation, resulting in this release assertion.

Updating the load type here should in theory fix the underlying bug r240909 was meant to catch & fix.

Test: fast/loader/navigate-with-new-target-after-back-forward-navigation.html

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadURL):

LayoutTests:

Added a regression test.

  • fast/loader/navigate-with-new-target-after-back-forward-navigation-expected.txt: Added.
  • fast/loader/navigate-with-new-target-after-back-forward-navigation.html: Added.
1:35 AM Changeset in webkit [241014] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Build failure after r240431
https://bugs.webkit.org/show_bug.cgi?id=194330

Patch by Pablo Saavedra <Pablo Saavedra> on 2019-02-06
Reviewed by Žan Doberšek.

  • API/glib/JSCOptions.cpp:
12:05 AM Changeset in webkit [241013] by Michael Catanzaro
  • 4 edits in trunk

REGRESSION(r240785): [SOUP] Broke cookie persistent storage
https://bugs.webkit.org/show_bug.cgi?id=194209

Reviewed by Carlos Garcia Campos.

Source/WebKit:

I missed a spot when moving the persistent storage parameters from NetworkProcess to
NetworkSession. They have to be initialized separately for the default session.

  • UIProcess/soup/WebProcessPoolSoup.cpp:

(WebKit::WebProcessPool::platformInitializeNetworkProcess):

Tools:

Enhance TestCookieManager to ensure this doesn't happen again.

  • TestWebKitAPI/Tests/WebKitGLib/TestCookieManager.cpp:

(testCookieManagerPersistentStorage):
(beforeAll):

Feb 5, 2019:

11:54 PM Changeset in webkit [241012] by Claudio Saavedra
  • 2 edits in trunk/Source/WebCore

[FreeType] Build fix for Debian stable

Unreviewed build fix.

Debian stable currently has a version of fontconfig that doesn't
yet have FC_COLOR. #ifdef its use to fix the build.

  • platform/graphics/freetype/FontCacheFreeType.cpp:

(WebCore::FontCache::systemFallbackForCharacters):

10:54 PM Changeset in webkit [241011] by Nikita Vasilyev
  • 6 edits in trunk

Web Inspector: Styles: PropertiesChanged shouldn't fire when old and new text are both empty
https://bugs.webkit.org/show_bug.cgi?id=194318

Reviewed by Devin Rousso.

Source/WebInspectorUI:

Previously, WI.CSSStyleDeclaration.Event.PropertiesChanged fired when
old text and new text were empty strings.

  • UserInterface/Models/CSSStyleDeclaration.js:

LayoutTests:

Fix the flaky test on Debug.

  • inspector/css/modify-css-property-race-expected.txt:
  • inspector/css/modify-css-property-race.html:
9:52 PM Changeset in webkit [241010] by Megan Gardner
  • 5 edits
    1 move
    1 add
    3 deletes in trunk/LayoutTests

[iOS] Layout tests editing/pasteboard/smart-paste-007.html and editing/pasteboard/smart-paste-008.html are failing
https://bugs.webkit.org/show_bug.cgi?id=194275

Reviewed by Ryosuke Niwa.

Smart paste tests 7 and 8 were outputting more information that was needed
to verify correct functionality. Also cleaned up test 8 to be more similar to
the other smart copy paste tests.

  • editing/pasteboard/smart-paste-007.html:
  • editing/pasteboard/smart-paste-008.html:
  • platform/ios-wk1/editing/pasteboard/smart-paste-007-expected.txt: Removed.
  • platform/ios-wk1/editing/pasteboard/smart-paste-008-expected.txt: Removed.
  • platform/ios-wk2/editing/pasteboard/smart-paste-008-expected.txt: Removed.
  • platform/ios/editing/pasteboard/smart-paste-007-expected.txt: Renamed from LayoutTests/platform/ios-wk2/editing/pasteboard/smart-paste-007-expected.txt.
  • platform/ios/editing/pasteboard/smart-paste-008-expected.txt: Added.
  • platform/mac/editing/pasteboard/smart-paste-007-expected.txt:
  • platform/mac/editing/pasteboard/smart-paste-008-expected.txt:
8:26 PM Changeset in webkit [241009] by Wenson Hsieh
  • 5 edits in trunk

Rename TestOptions.ignoreSynchronousMessagingTimeoutsForTesting
https://bugs.webkit.org/show_bug.cgi?id=194324

Reviewed by Andy Estes.

Tools:

Rename ignoreSynchronousMessagingTimeoutsForTesting to just ignoreSynchronousMessagingTimeouts. The -ForTesting
part of the name is already implicit, since this is in testing code in TestOptions.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::generateContextConfiguration const):
(WTR::updateTestOptionsFromTestHeader):

  • WebKitTestRunner/TestOptions.h:

(WTR::TestOptions::hasSameInitializationOptions const):

LayoutTests:

  • fast/events/touch/ios/show-modal-alert-during-touch-start.html:
6:10 PM Changeset in webkit [241008] by commit-queue@webkit.org
  • 28 edits in trunk/Source

Stop using blobRegistry in NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=194027

Patch by Alex Christensen <achristensen@webkit.org> on 2019-02-05
Reviewed by Youenn Fablet.

Source/WebCore:

Also stop using NetworkBlobRegistry::singleton.
Instead, have the NetworkProcess own a NetworkBlobRegistry which owns a BlobRegistryImpl.
We now have to resolve all blob file references while we still have a
NetworkConnectionToWebProcess/NetworkProcess/NetworkBlobRegistry/BlobRegistryImpl instead of
using the singleton after we have passed everything to the loading code, but it works the same
as it did before. We must consume the sandbox extension from the BlobRegistryImpl before using
the resolved files, so I pass around a Vector<RefPtr<WebCore::BlobDataFileReference>> so we know
which extensions to revoke.

  • platform/network/BlobRegistryImpl.h:
  • platform/network/FormData.cpp:

(WebCore::appendBlobResolved):
(WebCore::FormData::resolveBlobReferences):

  • platform/network/FormData.h:
  • platform/network/cf/FormDataStreamCFNet.cpp:

(WebCore::createHTTPBodyCFReadStream):

  • platform/network/curl/CurlFormDataStream.cpp:

(WebCore::CurlFormDataStream::CurlFormDataStream):

Source/WebKit:

  • NetworkProcess/Downloads/DownloadManager.cpp:

(WebKit::DownloadManager::startDownload):

  • NetworkProcess/Downloads/PendingDownload.cpp:

(WebKit::PendingDownload::PendingDownload):

  • NetworkProcess/Downloads/PendingDownload.h:
  • NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:

(WebKit::NetworkBlobRegistry::registerFileBlobURL):
(WebKit::NetworkBlobRegistry::registerBlobURL):
(WebKit::NetworkBlobRegistry::registerBlobURLOptionallyFileBacked):
(WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
(WebKit::NetworkBlobRegistry::unregisterBlobURL):
(WebKit::NetworkBlobRegistry::blobSize):
(WebKit::NetworkBlobRegistry::writeBlobsToTemporaryFiles):
(WebKit::NetworkBlobRegistry::writeBlobToFilePath):
(WebKit::NetworkBlobRegistry::connectionToWebProcessDidClose):
(WebKit::NetworkBlobRegistry::filesInBlob):
(WebKit::NetworkBlobRegistry::singleton): Deleted.

  • NetworkProcess/FileAPI/NetworkBlobRegistry.h:

(WebKit::NetworkBlobRegistry::blobRegistry):

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::didClose):
(WebKit::NetworkConnectionToWebProcess::resolveBlobReferences):
(WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
(WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
(WebKit::NetworkConnectionToWebProcess::loadPing):
(WebKit::NetworkConnectionToWebProcess::preconnectTo):
(WebKit::NetworkConnectionToWebProcess::registerFileBlobURL):
(WebKit::NetworkConnectionToWebProcess::registerBlobURL):
(WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL):
(WebKit::NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked):
(WebKit::NetworkConnectionToWebProcess::registerBlobURLForSlice):
(WebKit::NetworkConnectionToWebProcess::unregisterBlobURL):
(WebKit::NetworkConnectionToWebProcess::blobSize):
(WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
(WebKit::NetworkConnectionToWebProcess::filesInBlob):
(WebKit::NetworkConnectionToWebProcess::blobRegistry):

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/NetworkDataTask.cpp:

(WebKit::NetworkDataTask::create):

  • NetworkProcess/NetworkDataTaskBlob.cpp:

(WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):

  • NetworkProcess/NetworkDataTaskBlob.h:
  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::NetworkLoad):
(WebKit::NetworkLoad::initialize):

  • NetworkProcess/NetworkLoad.h:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::NetworkProcess):
(WebKit::NetworkProcess::removeNetworkConnectionToWebProcess):

  • NetworkProcess/NetworkProcess.h:

(WebKit::NetworkProcess::networkBlobRegistry):

  • NetworkProcess/NetworkProcessPlatformStrategies.cpp:

(WebKit::NetworkProcessPlatformStrategies::createBlobRegistry):

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::m_shouldCaptureExtraNetworkLoadMetrics):
(WebKit::NetworkResourceLoader::startNetworkLoad):

  • NetworkProcess/PreconnectTask.cpp:
  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:

(WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):

5:44 PM Changeset in webkit [241007] by dbates@webkit.org
  • 2 edits in trunk/Source/WebKit

Fix a typo in r241006. Substitute Modifier for Modifiers.

  • Shared/mac/NativeWebGestureEventMac.mm:

(WebKit::NativeWebGestureEvent::NativeWebGestureEvent):

5:42 PM Changeset in webkit [241006] by dbates@webkit.org
  • 3 edits in trunk/Source/WebKit

Attempt to fix the build following r241000
(https://bugs.webkit.org/show_bug.cgi?id=194241)

Substitute OptionSet<WebEvent::Modifier> for Modifiers.

  • Shared/mac/NativeWebGestureEventMac.mm:

(WebKit::NativeWebGestureEvent::NativeWebGestureEvent):

  • Shared/mac/WebGestureEvent.h:

(WebKit::WebGestureEvent::WebGestureEvent):

5:02 PM Changeset in webkit [241005] by Truitt Savell
  • 27 edits in trunk/Source

Unreviewed, rolling out r240984.

Revision casued two API timeouts

Reverted changeset:

"Stop using blobRegistry in NetworkProcess"
https://bugs.webkit.org/show_bug.cgi?id=194027
https://trac.webkit.org/changeset/240984

5:01 PM Changeset in webkit [241004] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Lots of time spent updating related resources in ResourceDetailsSidebar when loading a page with lots of resources
https://bugs.webkit.org/show_bug.cgi?id=159577
<rdar://problem/27251461>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/ResourceDetailsSidebarPanel.js:

(WI.ResourceDetailsSidebarPanel.prototype._refreshRelatedResourcesSection):
(WI.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners):

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

Web Inspector: Elements tab: selection is broken after deleting the selected node
https://bugs.webkit.org/show_bug.cgi?id=194300
<rdar://problem/47829275>

Reviewed by Devin Rousso.

Deleting a TreeElement can cause an IndexSet including indexes
outside the deleted range to be passed to SelectionController,
corrupting the internal selection state.

  • UserInterface/Views/TreeOutline.js:

(WI.TreeOutline.prototype._indexesForSubtree.numberOfElementsInSubtree): Added.
(WI.TreeOutline.prototype._indexesForSubtree):
Finding the last (rightmost leaf) TreeElement in the subtree used
TreeElement.prototype.traverseNextElement to do a depth first traversal.
This method did not stay within the subtree rooted at treeElement.

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

UserMediaPermissionRequestManagerProxy lambdas should check for 'this' being valid
https://bugs.webkit.org/show_bug.cgi?id=194246

Reviewed by Eric Carlson.

With PSON enabled, the manager proxy can be destroyed.
It is thus important for its callbacks to check for 'this' to be valid.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged):
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
(WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):

4:39 PM Changeset in webkit [241001] by dbates@webkit.org
  • 8 edits in trunk/Source/WebKit

Attempt to fix the build following r241000
(https://bugs.webkit.org/show_bug.cgi?id=194241)

Substitute WebEvent::Modifier::CapsLockKey for WebEvent::CapsLockKey.

  • Shared/gtk/WebEventFactory.cpp:

(WebKit::modifiersForEvent):

  • Shared/mac/WebEventFactory.mm:

(WebKit::modifiersForEvent):

  • UIProcess/API/Cocoa/WKNavigationAction.mm:

(toNSEventModifierFlags):

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::protocolModifierToWebEventModifier):

  • UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:

(WebKit::modifiersToEventState):

  • UIProcess/Automation/mac/WebAutomationSessionMac.mm:

(WebKit::WebAutomationSession::platformSimulateMouseInteraction):

  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::toNSEventModifierFlags):

4:21 PM Changeset in webkit [241000] by dbates@webkit.org
  • 43 edits in trunk/Source/WebKit

Make WebEvent::Modifiers an OptionSet
https://bugs.webkit.org/show_bug.cgi?id=194241

Reviewed by Simon Fraser.

Use an OptionSet to represent the bitmask of keyboard modifier flags. This improves type safety
and makes debugging more enjoyable because our LLDB pretty-printers have built-in support for
OptionSet.

While I am at it, make WebEvent::Modifier an enum class. It is currently an enum. This makes
this enum more closely match WebCore::PlatformEvent::Modifier.

  • Shared/API/c/WKSharedAPICast.h:

(WebKit::toAPI):

  • Shared/NavigationActionData.cpp:

(WebKit::NavigationActionData::encode const):
(WebKit::NavigationActionData::decode):

  • Shared/NavigationActionData.h:
  • Shared/WebEvent.cpp:

(WebKit::WebEvent::WebEvent):

  • Shared/WebEvent.h:

(WebKit::WebEvent::shiftKey const):
(WebKit::WebEvent::controlKey const):
(WebKit::WebEvent::altKey const):
(WebKit::WebEvent::metaKey const):
(WebKit::WebEvent::capsLockKey const):
(WebKit::WebEvent::modifiers const):
(WebKit::WebTouchEvent::WebTouchEvent):

  • Shared/WebEventConversion.cpp:

(WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):

  • Shared/WebKeyboardEvent.cpp:

(WebKit::WebKeyboardEvent::WebKeyboardEvent):

  • Shared/WebMouseEvent.cpp:

(WebKit::WebMouseEvent::WebMouseEvent):

  • Shared/WebTouchEvent.cpp:

(WebKit::WebTouchEvent::WebTouchEvent):

  • Shared/WebWheelEvent.cpp:

(WebKit::WebWheelEvent::WebWheelEvent):

  • Shared/gtk/WebEventFactory.cpp:

(WebKit::modifiersForEvent):

  • Shared/ios/NativeWebTouchEventIOS.mm:

(WebKit::NativeWebTouchEvent::NativeWebTouchEvent):

  • Shared/ios/WebIOSEventFactory.mm:

(modifiersForEvent):
(WebIOSEventFactory::createWebKeyboardEvent):
(WebIOSEventFactory::createWebMouseEvent):

  • Shared/libwpe/WebEventFactory.cpp:

(WebKit::modifiersForEventModifiers):
(WebKit::WebEventFactory::createWebWheelEvent):
(WebKit::WebEventFactory::createWebTouchEvent):

  • Shared/mac/WebEventFactory.mm:

(WebKit::modifiersForEvent):
(WebKit::WebEventFactory::createWebMouseEvent):
(WebKit::WebEventFactory::createWebWheelEvent):
(WebKit::WebEventFactory::createWebKeyboardEvent):

  • Shared/win/WebEventFactory.cpp:

(WebKit::modifiersForEvent):
(WebKit::modifiersForCurrentKeyState):
(WebKit::WebEventFactory::createWebMouseEvent):
(WebKit::WebEventFactory::createWebWheelEvent):
(WebKit::WebEventFactory::createWebKeyboardEvent):

  • UIProcess/API/APINavigationAction.h:
  • UIProcess/API/APIUIClient.h:

(API::UIClient::mouseDidMoveOverElement):

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageUIClient):

  • UIProcess/API/Cocoa/WKNavigationAction.mm:

(toNSEventModifierFlags):

  • UIProcess/API/glib/WebKitPrivate.cpp:

(toPlatformModifiers):

  • UIProcess/API/glib/WebKitPrivate.h:
  • UIProcess/API/glib/WebKitUIClient.cpp:
  • UIProcess/API/glib/WebKitWebView.cpp:

(webkitWebViewMouseTargetChanged):

  • UIProcess/API/glib/WebKitWebViewPrivate.h:
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::simulateMouseInteraction):
(WebKit::protocolModifierToWebEventModifier):
(WebKit::WebAutomationSession::performMouseInteraction):

  • UIProcess/Automation/WebAutomationSession.h:
  • UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:

(WebKit::modifiersToEventState):
(WebKit::WebAutomationSession::platformSimulateMouseInteraction):

  • UIProcess/Automation/mac/WebAutomationSessionMac.mm:

(WebKit::WebAutomationSession::platformSimulateMouseInteraction):

  • UIProcess/Automation/wpe/WebAutomationSessionWPE.cpp:

(WebKit::modifiersToEventState):
(WebKit::WebAutomationSession::platformSimulateMouseInteraction):

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

(WebKit::toNSEventModifierFlags):
(WebKit::UIDelegate::UIClient::mouseDidMoveOverElement):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::mouseDidMoveOverElement):

  • WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:

(API::InjectedBundle::PageUIClient::mouseDidMoveOverElement):

  • WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:

(WebKit::InjectedBundleNavigationAction::modifiersForNavigationAction):

  • WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:

(WebKit::InjectedBundleNavigationAction::modifiers const):

  • WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:

(WebKit::InjectedBundlePageUIClient::mouseDidMoveOverElement):

  • WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::showContextMenuAtPoint):

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::createWebEvent const):

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::mouseDidMoveOverElement):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::simulateMouseDown):
(WebKit::WebPage::simulateMouseUp):
(WebKit::WebPage::simulateMouseMotion):

3:43 PM Changeset in webkit [240999] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] Allow * as platform for builders and workers
https://bugs.webkit.org/show_bug.cgi?id=188533

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/loadConfig.py:

(checkWorkersAndBuildersForConsistency):

3:34 PM Changeset in webkit [240998] by mark.lam@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Fix DFG's doesGC() for a few more nodes.
https://bugs.webkit.org/show_bug.cgi?id=194307
<rdar://problem/47832956>

Reviewed by Yusuke Suzuki.

Fix doesGC() for the following nodes:

NumberToStringWithValidRadixConstant:

Calls operationInt32ToStringWithValidRadix(), which calls int32ToString(),
which can allocate a string.
Calls operationInt52ToStringWithValidRadix(), which calls int52ToString(),
which can allocate a string.
Calls operationDoubleToStringWithValidRadix(), which calls numberToString(),
which can allocate a string.

RegExpExecNonGlobalOrSticky: calls createRegExpMatchesArray() which allocates

memory for all kinds of objects.

RegExpMatchFast: calls operationRegExpMatchFastString(), which calls

RegExpObject::execInline() and RegExpObject::matchGlobal(). Both of
these allocates memory for the match result.

RegExpMatchFastGlobal: calls operationRegExpMatchFastGlobalString(), which

calls RegExpObject's collectMatches(), which allocates an array amongst
other objects.

StringFromCharCode:

If the uint32 code to convert is greater than maxSingleCharacterString,
we'll call operationStringFromCharCode(), which calls jsSingleCharacterString(),
which allocates a new string if the code is greater than maxSingleCharacterString.

Also fix SpeculativeJIT::compileFromCharCode() and FTL's compileStringFromCharCode()
to use maxSingleCharacterString instead of a literal constant.

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileFromCharCode):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileStringFromCharCode):

3:33 PM Changeset in webkit [240997] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION (r240947): Resources tab: can't select main frame after refreshing page
https://bugs.webkit.org/show_bug.cgi?id=194254
<rdar://problem/47805023>

Reviewed by Devin Rousso.

  • UserInterface/Views/TreeOutline.js:

(WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
TreeOutline should always call the TreeElement select and deselect
methods while processing selection changes. Having notifications
suppressed by this._suppressNextSelectionDidChangeEvent should only
affect the dispatching of TreeOutline events.

3:17 PM Changeset in webkit [240996] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] Add few bots to config.json
https://bugs.webkit.org/show_bug.cgi?id=194304

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/config.json:
3:01 PM Changeset in webkit [240995] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Reproducible crash under WKShareSheet presentWithParameters when cancelling a share
https://bugs.webkit.org/show_bug.cgi?id=194301
<rdar://problem/47719379>

Reviewed by Beth Dakin.

  • UIProcess/Cocoa/WKShareSheet.mm:

(-[WKShareSheet presentWithParameters:completionHandler:]):
NSSharingServicePicker's delegate callbacks can be called synchronously.
We release the WKShareSheet (which holds our reference to the NSSharingServicePicker)
under sharingServicePicker:didChooseSharingService:. On older versions of macOS,
there was nothing keeping the NSSharingServicePicker alive inside
showRelativeToRect:ofView:preferredEdge:, thus the whole chain of references would
fall and result in sending a message to a released NSSharingServicePicker.
To resolve this, keep an extra reference to the WKShareSheet until
presentation is complete.

2:58 PM Changeset in webkit [240994] by Keith Rollin
  • 10 edits
    3 deletes in trunk

Enable the automatic checking and regenerations of .xcfilelists during builds
https://bugs.webkit.org/show_bug.cgi?id=194124
<rdar://problem/47721277>

Reviewed by Tim Horton.

Bug 193790 add a facility for checking -- during build time -- that
any needed .xcfilelist files are up-to-date and for updating them if
they are not. This facility was initially opt-in by setting
WK_ENABLE_CHECK_XCFILELISTS until other pieces were in place and until
the process seemed robust. Its now time to enable this facility and
make it opt-out. If there is a need to disable this facility, set and
export WK_DISABLE_CHECK_XCFILELISTS=1 in your environment before
running make or build-webkit, or before running Xcode from the
command line.

Additionally, remove the step that generates a list of source files
going into the UnifiedSources build step. It's only necessarily to
specify Sources.txt and SourcesCocoa.txt as inputs.

Source/JavaScriptCore:

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • UnifiedSources-input.xcfilelist: Removed.

Source/WebCore:

No new tests since there should be no observable behavior difference.

  • UnifiedSources-input.xcfilelist: Removed.
  • WebCore.xcodeproj/project.pbxproj:

Source/WebKit:

  • UnifiedSources-input.xcfilelist: Removed.
  • WebKit.xcodeproj/project.pbxproj:

Source/WTF:

  • Scripts/generate-unified-source-bundles.rb:

Tools:

  • Scripts/generate-xcfilelists:
2:53 PM Changeset in webkit [240993] by Keith Rollin
  • 6 edits in trunk/Source

Update .xcfilelist files
https://bugs.webkit.org/show_bug.cgi?id=194121
<rdar://problem/47720863>

Reviewed by Tim Horton.

Preparatory to enabling the facility for automatically updating the
.xcfilelist files, check in a freshly-updated set so that not everyone
runs up against having to regenerate them themselves.

Source/JavaScriptCore:

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:

Source/WebCore:

No new tests since there should be no observable behavior difference.

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
2:09 PM Changeset in webkit [240992] by andy@vanwagoner.family
  • 3 edits in trunk/Source/JavaScriptCore

[INTL] improve efficiency of Intl.NumberFormat formatToParts
https://bugs.webkit.org/show_bug.cgi?id=185557

Reviewed by Mark Lam.

Since field nesting depth is minimal, this algorithm should be effectively O(n),
where n is the number of characters in the formatted string.
It may be less memory efficient than the previous impl, since the intermediate Vector
is the length of the string, instead of the count of the fields.

  • runtime/IntlNumberFormat.cpp:

(JSC::IntlNumberFormat::formatToParts):

  • runtime/IntlNumberFormat.h:
1:59 PM Changeset in webkit [240991] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Move DFG nodes that clobberize() says will write(Heap) to the doesGC() list that returns true.
https://bugs.webkit.org/show_bug.cgi?id=194298
<rdar://problem/47827555>

Reviewed by Saam Barati.

We do this for 3 reasons:

  1. It's clearer when reading doesGC()'s code that these nodes will return true.
  2. If things change in the future where clobberize() no longer reports these nodes as write(Heap), each node should be vetted first to make sure that it can never GC before being moved back to the doesGC() list that returns false.
  3. This reduces the list of nodes that we need to audit to make sure doesGC() is correct in its claims about the nodes' GCing possibility.

The list of nodes moved are:

ArrayPush
ArrayPop
Call
CallEval
CallForwardVarargs
CallVarargs
Construct
ConstructForwardVarargs
ConstructVarargs
DefineDataProperty
DefineAccessorProperty
DeleteById
DeleteByVal
DirectCall
DirectConstruct
DirectTailCallInlinedCaller
GetById
GetByIdDirect
GetByIdDirectFlush
GetByIdFlush
GetByIdWithThis
GetByValWithThis
GetDirectPname
GetDynamicVar
HasGenericProperty
HasOwnProperty
HasStructureProperty
InById
InByVal
InstanceOf
InstanceOfCustom
LoadVarargs
NumberToStringWithRadix
PutById
PutByIdDirect
PutByIdFlush
PutByIdWithThis
PutByOffset
PutByValWithThis
PutDynamicVar
PutGetterById
PutGetterByVal
PutGetterSetterById
PutSetterById
PutSetterByVal
PutStack
PutToArguments
RegExpExec
RegExpTest
ResolveScope
ResolveScopeForHoistingFuncDeclInEval
TailCall
TailCallForwardVarargsInlinedCaller
TailCallInlinedCaller
TailCallVarargsInlinedCaller
ToNumber
ToPrimitive
ValueNegate

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

1:27 PM Changeset in webkit [240990] by beidson@apple.com
  • 6 edits
    2 adds in trunk/Source/WebKit

Add a new DownloadMap type that manages taking an assertion automatically.
https://bugs.webkit.org/show_bug.cgi?id=194294

Reviewed by Alex Christensen.

If we don't need the download assertion, we use a vanilla HashMap like today.
If we need the download assertion, we use the new DownloadMap class instead.

The new DownloadMap is a wrapper around a HashMap that also creates/destroys the assertion as needed.

  • NetworkProcess/Downloads/DownloadManager.cpp:

(WebKit::DownloadManager::dataTaskBecameDownloadTask):
(WebKit::DownloadManager::downloadFinished):

  • NetworkProcess/Downloads/DownloadManager.h:
  • NetworkProcess/Downloads/DownloadMap.cpp: Added.

(WebKit::DownloadMap::get const):
(WebKit::DownloadMap::isEmpty const):
(WebKit::DownloadMap::size const):
(WebKit::DownloadMap::contains const):
(WebKit::DownloadMap::add):
(WebKit::DownloadMap::remove):

  • NetworkProcess/Downloads/DownloadMap.h: Added.
  • Sources.txt:
  • UIProcess/ios/ProcessAssertionIOS.mm:

(WebKit::ProcessAssertion::ProcessAssertion):

  • WebKit.xcodeproj/project.pbxproj:
12:35 PM Changeset in webkit [240989] by Nikita Vasilyev
  • 3 edits in trunk/LayoutTests

Web Inspector: Fix modify-css-property-race.html test failures
https://bugs.webkit.org/show_bug.cgi?id=194282

Reviewed by Matt Baker.

Fix test failures introduced by r240946 by providing a message for expectGreaterThan assert,
so it doesn't log the actual values.

  • inspector/css/modify-css-property-race-expected.txt:
  • inspector/css/modify-css-property-race.html:
12:30 PM Changeset in webkit [240988] by andy@vanwagoner.family
  • 4 edits in trunk/LayoutTests

REGRESSION(r238848): ICU upgrade broke jsc-layout-tests.yaml/js/script-tests/intl-numberformat.js.layout
https://bugs.webkit.org/show_bug.cgi?id=193620

Reviewed by Michael Catanzaro.

Update NumberFormat tests to be more tolerant of ICU version differences.

  • js/intl-numberformat-expected.txt:
  • js/script-tests/intl-numberformat.js:
  • platform/gtk/TestExpectations:
12:28 PM Changeset in webkit [240987] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

[GTK][WPE] force libpsl build to use ICU in jhbuild
https://bugs.webkit.org/show_bug.cgi?id=194288

Patch by Olivier Blin <Olivier Blin> on 2019-02-05
Reviewed by Philippe Normand.

In jhbuild, libpsl depends on ICU, but its configure script may decide to use libidn instead of ICU.
This can cause build failures if libidn is detected but libunistring is not available.

Make sure that ICU is used for runtime and builtin PSL data.

  • gtk/jhbuild.modules:
  • wpe/jhbuild.modules:
12:19 PM Changeset in webkit [240986] by aakash_jain@apple.com
  • 4 edits in trunk/Tools

[ews-app] Modified timestamp should be updated on updating data
https://bugs.webkit.org/show_bug.cgi?id=194295

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-app/ews/models/build.py:
  • BuildSlaveSupport/ews-app/ews/models/buildermapping.py:
  • BuildSlaveSupport/ews-app/ews/models/step.py:
11:11 AM Changeset in webkit [240985] by beidson@apple.com
  • 2 edits in trunk/Source/WebKit

Fix iOS simulator build after r240954

Unreviewed.

  • UIProcess/ios/ProcessAssertionIOS.mm:

(WebKit::ProcessAssertion::ProcessAssertion): Implement the new constructor.

10:58 AM Changeset in webkit [240984] by achristensen@apple.com
  • 27 edits in trunk/Source

Stop using blobRegistry in NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=194027

Reviewed by Youenn Fablet.

Source/WebCore:

Also stop using NetworkBlobRegistry::singleton.
Instead, have the NetworkProcess own a NetworkBlobRegistry which owns a BlobRegistryImpl.
We now have to resolve all blob file references while we still have a
NetworkConnectionToWebProcess/NetworkProcess/NetworkBlobRegistry/BlobRegistryImpl instead of
using the singleton after we have passed everything to the loading code, but it works the same
as it did before. We must consume the sandbox extension from the BlobRegistryImpl before using
the resolved files, so I pass around a Vector<RefPtr<WebCore::BlobDataFileReference>> so we know
which extensions to revoke.

  • platform/network/BlobRegistryImpl.h:
  • platform/network/FormData.cpp:

(WebCore::appendBlobResolved):
(WebCore::FormData::resolveBlobReferences):

  • platform/network/FormData.h:
  • platform/network/cf/FormDataStreamCFNet.cpp:

(WebCore::createHTTPBodyCFReadStream):

  • platform/network/curl/CurlFormDataStream.cpp:

(WebCore::CurlFormDataStream::CurlFormDataStream):

Source/WebKit:

  • NetworkProcess/Downloads/DownloadManager.cpp:

(WebKit::DownloadManager::startDownload):

  • NetworkProcess/Downloads/PendingDownload.cpp:

(WebKit::PendingDownload::PendingDownload):

  • NetworkProcess/Downloads/PendingDownload.h:
  • NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:

(WebKit::NetworkBlobRegistry::registerFileBlobURL):
(WebKit::NetworkBlobRegistry::registerBlobURL):
(WebKit::NetworkBlobRegistry::registerBlobURLOptionallyFileBacked):
(WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
(WebKit::NetworkBlobRegistry::unregisterBlobURL):
(WebKit::NetworkBlobRegistry::blobSize):
(WebKit::NetworkBlobRegistry::writeBlobsToTemporaryFiles):
(WebKit::NetworkBlobRegistry::writeBlobToFilePath):
(WebKit::NetworkBlobRegistry::connectionToWebProcessDidClose):
(WebKit::NetworkBlobRegistry::filesInBlob):
(WebKit::NetworkBlobRegistry::singleton): Deleted.

  • NetworkProcess/FileAPI/NetworkBlobRegistry.h:

(WebKit::NetworkBlobRegistry::blobRegistry):

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::didClose):
(WebKit::NetworkConnectionToWebProcess::resolveBlobReferences):
(WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
(WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
(WebKit::NetworkConnectionToWebProcess::loadPing):
(WebKit::NetworkConnectionToWebProcess::preconnectTo):
(WebKit::NetworkConnectionToWebProcess::registerFileBlobURL):
(WebKit::NetworkConnectionToWebProcess::registerBlobURL):
(WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL):
(WebKit::NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked):
(WebKit::NetworkConnectionToWebProcess::registerBlobURLForSlice):
(WebKit::NetworkConnectionToWebProcess::unregisterBlobURL):
(WebKit::NetworkConnectionToWebProcess::blobSize):
(WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
(WebKit::NetworkConnectionToWebProcess::filesInBlob):
(WebKit::NetworkConnectionToWebProcess::blobRegistry):

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/NetworkDataTask.cpp:

(WebKit::NetworkDataTask::create):

  • NetworkProcess/NetworkDataTaskBlob.cpp:

(WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):

  • NetworkProcess/NetworkDataTaskBlob.h:
  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::NetworkLoad):
(WebKit::NetworkLoad::initialize):

  • NetworkProcess/NetworkLoad.h:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::NetworkProcess):
(WebKit::NetworkProcess::removeNetworkConnectionToWebProcess):

  • NetworkProcess/NetworkProcess.h:

(WebKit::NetworkProcess::networkBlobRegistry):

  • NetworkProcess/NetworkProcessPlatformStrategies.cpp:

(WebKit::NetworkProcessPlatformStrategies::createBlobRegistry):

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::m_shouldCaptureExtraNetworkLoadMetrics):
(WebKit::NetworkResourceLoader::startNetworkLoad):

  • NetworkProcess/PreconnectTask.cpp:
  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:

(WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):

10:39 AM Changeset in webkit [240983] by Ryan Haddad
  • 16 edits in trunk

Unreviewed, rolling out r240742.

Causes crashes on iOS simulator.

Reverted changeset:

"[iOS] Keyups for non-modifier keys identified as "Dead" when
not focused in a content-editable element"
https://bugs.webkit.org/show_bug.cgi?id=192824
https://trac.webkit.org/changeset/240742

10:33 AM Changeset in webkit [240982] by Jonathan Bedard
  • 3 edits in trunk/Tools

run-webkit-tests emits message "...running None" when running tests
https://bugs.webkit.org/show_bug.cgi?id=194133
<rdar://problem/47724738>

Reviewed by Lucas Forschler.

  • Scripts/webkitpy/xcode/device_type.py:

(DeviceType.str): Use both version mapping tables and use just the variant
name if no version name is available.

  • Scripts/webkitpy/xcode/device_type_unittest.py:

(DeviceTypeTest):
(DeviceTypeTest.test_unmapped_version): Test case where the version does not have
an associated named.

10:28 AM Changeset in webkit [240981] by ysuzuki@apple.com
  • 11 edits in trunk/Source

[JSC] Shrink sizeof(UnlinkedCodeBlock)
https://bugs.webkit.org/show_bug.cgi?id=194281

Reviewed by Michael Saboff.

Source/JavaScriptCore:

This patch first attempts to reduce the size of UnlinkedCodeBlock in a relatively simpler way. Reordering members, remove unused member, and
move rarely used members to RareData. This changes sizeof(UnlinkedCodeBlock) from 312 to 256.

Still we have several chances to reduce sizeof(UnlinkedCodeBlock). Making more Vectors to RefCountedArrays can be done with some restructuring
of generatorification phase. It would be possible to remove m_sourceURLDirective and m_sourceMappingURLDirective from UnlinkedCodeBlock since
they should be in SourceProvider and that should be enough. These changes require some intrusive modifications and we make them as a future work.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::bitVectors const): Deleted.

  • bytecode/CodeType.h:
  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
(JSC::UnlinkedCodeBlock::shrinkToFit):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::bitVector):
(JSC::UnlinkedCodeBlock::addBitVector):
(JSC::UnlinkedCodeBlock::addSetConstant):
(JSC::UnlinkedCodeBlock::constantRegisters):
(JSC::UnlinkedCodeBlock::numberOfConstantIdentifierSets const):
(JSC::UnlinkedCodeBlock::constantIdentifierSets):
(JSC::UnlinkedCodeBlock::codeType const):
(JSC::UnlinkedCodeBlock::didOptimize const):
(JSC::UnlinkedCodeBlock::setDidOptimize):
(JSC::UnlinkedCodeBlock::usesGlobalObject const): Deleted.
(JSC::UnlinkedCodeBlock::setGlobalObjectRegister): Deleted.
(JSC::UnlinkedCodeBlock::globalObjectRegister const): Deleted.
(JSC::UnlinkedCodeBlock::bitVectors const): Deleted.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitLoad):
(JSC::BytecodeGenerator::emitLoadGlobalObject): Deleted.

  • bytecompiler/BytecodeGenerator.h:
  • runtime/CachedTypes.cpp:

(JSC::CachedCodeBlockRareData::encode):
(JSC::CachedCodeBlockRareData::decode const):
(JSC::CachedCodeBlock::scopeRegister const):
(JSC::CachedCodeBlock::codeType const):
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
(JSC::CachedCodeBlock<CodeBlockType>::decode const):
(JSC::CachedCodeBlock<CodeBlockType>::encode):
(JSC::CachedCodeBlock::globalObjectRegister const): Deleted.

Source/WTF:

  • wtf/TriState.h:
10:23 AM Changeset in webkit [240980] by Kocsen Chung
  • 2 edits in tags/Safari-608.1.5/Source/WebCore

Revert r240738. rdar://problem/47810351

10:00 AM Changeset in webkit [240979] by Kocsen Chung
  • 1 copy in tags/Safari-608.1.5

Tag Safari-608.1.5.

9:44 AM Changeset in webkit [240978] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[WPE] require python3-setuptools for meson build in jhbuild
https://bugs.webkit.org/show_bug.cgi?id=194287

Patch by Olivier Blin <Olivier Blin> on 2019-02-05
Reviewed by Philippe Normand.

python3-setuptools is needed to build meson in jhbuild.
It is already required by the GTK port.

  • wpe/install-dependencies:
9:21 AM Changeset in webkit [240977] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-app] Add method to save BuilderMapping to database
https://bugs.webkit.org/show_bug.cgi?id=194264

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-app/ews/models/buildermapping.py:

(BuilderMapping.str):
(BuilderMapping):
(BuilderMapping.save_mapping):
(BuilderMapping.update_mapping):
(BuilderMapping.get_existing_mapping):
(BuilderMapping.is_valid_mapping):

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

[ews-app] Add timestamp fields for BuilderMappings
https://bugs.webkit.org/show_bug.cgi?id=194266

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-app/ews/models/buildermapping.py:

(BuilderMapping):

8:01 AM Changeset in webkit [240975] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] collectInlineContent should use pre-computed margins, paddings and borders
https://bugs.webkit.org/show_bug.cgi?id=194269

Reviewed by Antti Koivisto.

In this patch we pre-compute the margins padding and borders for formatting context roots, replaced boxes and non-replaced containers.
These property values are input to collectInlineContent's inline item detaching logic.

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::nextInPreOrder):
(WebCore::Layout::InlineFormattingContext::layout const):
(WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPadding const):
(WebCore::Layout::InlineFormattingContext::collectInlineContent const):

  • layout/inlineformatting/InlineFormattingContext.h:
  • layout/layouttree/LayoutBox.h: ran out bits.
7:38 AM Changeset in webkit [240974] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Protect globalWebSocketStreamMap with a Lock
https://bugs.webkit.org/show_bug.cgi?id=194224
<rdar://problem/47581081>

Reviewed by Ryosuke Niwa.

  • WebProcess/Network/WebSocketStream.cpp:

(WebKit::WebSocketStream::streamWithIdentifier):
(WebKit::WebSocketStream::networkProcessCrashed):
(WebKit::WebSocketStream::WebSocketStream):
(WebKit::WebSocketStream::~WebSocketStream):

7:36 AM Changeset in webkit [240973] by achristensen@apple.com
  • 9 edits
    2 adds in trunk/Source/WebKit

Add Networking Daemon skeleton
https://bugs.webkit.org/show_bug.cgi?id=194278

Reviewed by Zalan Bujtas.

Daemon skeletons? This is spooky stuff.

  • NetworkProcess/EntryPoint/Cocoa/Daemon/DaemonEntryPoint.h: Added.
  • NetworkProcess/EntryPoint/Cocoa/Daemon/DaemonEntryPoint.mm: Added.

(WebKit::DaemonMain):

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

(WebKit::NetworkDataTaskCocoa::restrictRequestReferrerToOriginIfNeeded):

  • Shared/API/Cocoa/WKMain.h:
  • Shared/API/Cocoa/WKMain.mm:

(WKDaemonMain):

  • Shared/EntryPointUtilities/Cocoa/AuxiliaryProcessMain.cpp:

(main):

  • SourcesCocoa.txt:
  • UnifiedSources-input.xcfilelist:
  • WebKit.xcodeproj/project.pbxproj:
6:45 AM Changeset in webkit [240972] by dinfuehr@igalia.com
  • 2 edits in trunk/JSTests

[ARM] Test running out of executable memory
https://bugs.webkit.org/show_bug.cgi?id=194285

Unreviewed. Do no execute test with LLInt disabled, test runs out of
executable memory otherwise.

  • stress/class-subclassing-function.js:
5:16 AM Changeset in webkit [240971] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

REGRESSION (r240579): com.apple.WebKit.WebContent at WebCore: WebCore::Document::absoluteEventRegionForNode
https://bugs.webkit.org/show_bug.cgi?id=194284
<rdar://problem/47774298>

Patch by Antoine Quint <Antoine Quint> on 2019-02-05
Reviewed by Antti Koivisto.

The m_touchActionElements list needs to be HashSet<RefPtr<Element>> instead of HashSet<Element*>. It was initially storing raw pointers based on m_touchEventTargets
which is an EventTargetSet (typedef’d to HashCountedSet<Node*>), but that's because these nodes have an event listener registered for them and as such are kept alive,
whereas elements with a touch-action property aren’t. Elements are removed from this list from Document::nodeWillBeRemoved() and from Document::updateTouchActionElements(),
the latter being called from Style::TreeResolver::resolveElement().

  • dom/Document.cpp:

(WebCore::Document::updateTouchActionElements):

  • dom/Document.h:

(WebCore::Document::touchActionElements const):

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

Web Inspector: Styles: remove harmless "property was unlocked" asserts
https://bugs.webkit.org/show_bug.cgi?id=194262

Reviewed by Matt Baker.

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype.remove):
(WI.SpreadsheetStyleProperty.prototype.update):
(WI.SpreadsheetStyleProperty.prototype._handleNameChange):
(WI.SpreadsheetStyleProperty.prototype._handleValueChange):

2:49 AM Changeset in webkit [240969] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WTF

[GLib] Stop URI-escaping file system representations
https://bugs.webkit.org/show_bug.cgi?id=194213

Reviewed by Carlos Garcia Campos.

Stop URI-escaping of file representation strings in
FileSystem::stringFromFileSystemRepresentation(), and URI-unescaping
of strings in FileSystem::fileSystemRepresentation().

This behavior deviates from POSIX and CF implementations and is
currently breaking IndexedDB-specific calculation of database sizes due
to directory components used in that process that are URL-based and are
as such URI-escaped. When unescaped, those single directory components
explode into multiple directory components, leading to incorrect total
database size calculation when iterating the database directory.

FileSystem::stringFromFileSystemRepresentation() now retrieves GLib's
filename charsets and in worst case converts the filesystem
representation to UTF-8 before String::fromUTF8() is used.
FileSystem::fileSystemRepresentation() reverses that process, taking
String's UTF-8 data and converting it to target charset if necessary.

Other FileSystem functions are adjusted to convert passed-in String
objects to filesystem representations.

  • wtf/glib/FileSystemGlib.cpp:

(WTF::FileSystemImpl::stringFromFileSystemRepresentation):
(WTF::FileSystemImpl::fileSystemRepresentation):
(WTF::FileSystemImpl::validRepresentation):
(WTF::FileSystemImpl::filenameForDisplay):
(WTF::FileSystemImpl::fileExists):
(WTF::FileSystemImpl::deleteFile):
(WTF::FileSystemImpl::deleteEmptyDirectory):
(WTF::FileSystemImpl::getFileStat):
(WTF::FileSystemImpl::getFileLStat):
(WTF::FileSystemImpl::makeAllDirectories):
(WTF::FileSystemImpl::createSymbolicLink):
(WTF::FileSystemImpl::pathGetFileName):
(WTF::FileSystemImpl::getVolumeFreeSpace):
(WTF::FileSystemImpl::directoryName):
(WTF::FileSystemImpl::listDirectory):
(WTF::FileSystemImpl::openFile):
(WTF::FileSystemImpl::moveFile):
(WTF::FileSystemImpl::hardLinkOrCopyFile):
(WTF::FileSystemImpl::getFileDeviceId): Align with POSIX implementation
and treat input CString as an existing filesystem representation.
(WTF::FileSystemImpl::unescapedFilename): Deleted.

12:52 AM Changeset in webkit [240968] by benjamin@webkit.org
  • 4 edits in trunk/Source/WebCore

Hit testing functions optimizations
https://bugs.webkit.org/show_bug.cgi?id=194073
<rdar://problem/47692312>

Reviewed by Zalan Bujtas.

This patch implements some easy optimizations that speed up
hit testing without changing the algorithms.

  • page/FrameViewLayoutContext.h:

The code for:

view().frameView().layoutContext().isPaintOffsetCacheEnabled()

followed by:

view().frameView().layoutContext().layoutState()

was loading all the intermediate values twice and calling layoutState()
twice.

By marking the function as pure, Clang can CSE the whole thing and
remove the duplicated code.

  • platform/graphics/LayoutRect.h:

(WebCore::LayoutRect::isInfinite const):
That one is pretty funny.

Since LayoutRect::isInfinite() was implemented before operator==() is
declared, the compiler was falling back to the implicit convertion to FloatRect()
before doing any comparison.

This explains a bunch of the convertions to float when using LayoutRect.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::mapLocalToContainer const):
Just reoder to make the register nice and clean for the optimization described above.

Feb 4, 2019:

11:48 PM Changeset in webkit [240967] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Uncaught Exception: undefined is not an object (evaluating 'classes.includes')
https://bugs.webkit.org/show_bug.cgi?id=194280
<rdar://problem/47811159>

Reviewed by Matt Baker.

  • UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:

(WI.GeneralStyleDetailsSidebarPanel.prototype._populateClassToggles):
Add a fallback value in case the class attribute isn't specified for the selected node.

10:51 PM Changeset in webkit [240966] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, add missing exception checks after r240637
https://bugs.webkit.org/show_bug.cgi?id=193546

  • tools/JSDollarVM.cpp:

(JSC::functionShadowChickenFunctionsOnStack):

10:32 PM Changeset in webkit [240965] by ysuzuki@apple.com
  • 70 edits
    1 copy in trunk/Source

[JSC] Shrink size of VM by lazily allocating IsoSubspaces for non-common types
https://bugs.webkit.org/show_bug.cgi?id=193993

Reviewed by Keith Miller.

Source/JavaScriptCore:

JSC::VM has a lot of IsoSubspaces, and each takes 504B. This unnecessarily makes VM so large.
And some of them are rarely used. We should allocate it lazily.

In this patch, we make some IsoSubspaces std::unique_ptr<IsoSubspace>. And we add ensureXXXSpace
functions which allocate IsoSubspaces lazily. This function is used by subspaceFor<> in each class.
And we also add subspaceForConcurrently<> function, which is called from concurrent JIT tiers. This
returns nullptr if the subspace is not allocated yet. JSCell::subspaceFor now takes second template
parameter which tells the function whether subspaceFor is concurrently done. If the IsoSubspace is
lazily created, we may return nullptr for the concurrent access. We ensure the space's initialization
by using WTF::storeStoreFence when lazily allocating it.

In GC's constraint solving, we may touch these lazily allocated spaces. At that time, we check the
existence of the space before touching this. This is not racy because the main thread is stopped when
the constraint solving is working.

This changes sizeof(VM) from 64736 to 56472.

Another interesting thing is that we removed PreventCollectionScope preventCollectionScope(heap); in
Subspace::initialize. This is really dangerous API since it easily causes dead-lock between the
collector and the mutator if IsoSubspace is dynamically created. We do want to make IsoSubspaces
dynamically-created ones since the requirement of the pre-allocation poses a scalability problem
of IsoSubspace adoption because IsoSubspace is large. Registered Subspace is only touched in the
EndPhase, and the peripheries should be stopped when running EndPhase. Thus, as long as the main thread
can run this IsoSubspace code, the collector is never EndPhase. So this is safe.

  • API/JSCallbackFunction.h:
  • API/ObjCCallbackFunction.h:

(JSC::ObjCCallbackFunction::subspaceFor):

  • API/glib/JSCCallbackFunction.h:
  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::visitChildren):
(JSC::CodeBlock::finalizeUnconditionally):

  • bytecode/CodeBlock.h:
  • bytecode/EvalCodeBlock.h:
  • bytecode/ExecutableToCodeBlockEdge.h:
  • bytecode/FunctionCodeBlock.h:
  • bytecode/ModuleProgramCodeBlock.h:
  • bytecode/ProgramCodeBlock.h:
  • bytecode/UnlinkedFunctionExecutable.cpp:

(JSC::UnlinkedFunctionExecutable::unlinkedCodeBlockFor):

  • bytecode/UnlinkedFunctionExecutable.h:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::emitAllocateRawObject):
(JSC::DFG::SpeculativeJIT::compileMakeRope):
(JSC::DFG::SpeculativeJIT::compileNewObject):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileMakeRope):
(JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject):
(JSC::FTL::DFG::LowerDFGToB3::allocateObject):
(JSC::FTL::DFG::LowerDFGToB3::allocateVariableSizedObject):
(JSC::FTL::DFG::LowerDFGToB3::allocateVariableSizedCell):

  • heap/Heap.cpp:

(JSC::Heap::finalizeUnconditionalFinalizers):
(JSC::Heap::deleteAllCodeBlocks):
(JSC::Heap::deleteAllUnlinkedCodeBlocks):
(JSC::Heap::addCoreConstraints):

  • heap/Subspace.cpp:

(JSC::Subspace::initialize):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::emitAllocateJSObjectWithKnownSize):
(JSC::AssemblyHelpers::emitAllocateVariableSizedCell):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_new_object):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_new_object):

  • runtime/DirectArguments.h:
  • runtime/DirectEvalExecutable.h:
  • runtime/ErrorInstance.h:

(JSC::ErrorInstance::subspaceFor):

  • runtime/ExecutableBase.h:
  • runtime/FunctionExecutable.h:
  • runtime/IndirectEvalExecutable.h:
  • runtime/InferredValue.cpp:

(JSC::InferredValue::visitChildren):

  • runtime/InferredValue.h:
  • runtime/InferredValueInlines.h:

(JSC::InferredValue::finalizeUnconditionally):

  • runtime/InternalFunction.h:
  • runtime/JSAsyncFunction.h:
  • runtime/JSAsyncGeneratorFunction.h:
  • runtime/JSBoundFunction.h:
  • runtime/JSCell.h:

(JSC::subspaceFor):
(JSC::subspaceForConcurrently):

  • runtime/JSCellInlines.h:

(JSC::allocatorForNonVirtualConcurrently):

  • runtime/JSCustomGetterSetterFunction.h:
  • runtime/JSDestructibleObject.h:
  • runtime/JSFunction.h:
  • runtime/JSGeneratorFunction.h:
  • runtime/JSImmutableButterfly.h:
  • runtime/JSLexicalEnvironment.h:

(JSC::JSLexicalEnvironment::subspaceFor):

  • runtime/JSNativeStdFunction.h:
  • runtime/JSSegmentedVariableObject.h:
  • runtime/JSString.h:
  • runtime/ModuleProgramExecutable.h:
  • runtime/NativeExecutable.h:
  • runtime/ProgramExecutable.h:
  • runtime/PropertyMapHashTable.h:
  • runtime/ProxyRevoke.h:
  • runtime/ScopedArguments.h:
  • runtime/ScriptExecutable.cpp:

(JSC::ScriptExecutable::clearCode):
(JSC::ScriptExecutable::installCode):

  • runtime/Structure.h:
  • runtime/StructureRareData.h:
  • runtime/SubspaceAccess.h: Copied from Source/JavaScriptCore/runtime/InferredValueInlines.h.
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:

(JSC::VM::SpaceAndSet::SpaceAndSet):
(JSC::VM::SpaceAndSet::setFor):
(JSC::VM::forEachScriptExecutableSpace):
(JSC::VM::SpaceAndFinalizerSet::SpaceAndFinalizerSet): Deleted.
(JSC::VM::SpaceAndFinalizerSet::finalizerSetFor): Deleted.
(JSC::VM::ScriptExecutableSpaceAndSet::ScriptExecutableSpaceAndSet): Deleted.
(JSC::VM::ScriptExecutableSpaceAndSet::clearableCodeSetFor): Deleted.
(JSC::VM::UnlinkedFunctionExecutableSpaceAndSet::UnlinkedFunctionExecutableSpaceAndSet): Deleted.
(JSC::VM::UnlinkedFunctionExecutableSpaceAndSet::clearableCodeSetFor): Deleted.

  • runtime/WeakMapImpl.h:

(JSC::WeakMapImpl::subspaceFor):

  • wasm/js/JSWebAssemblyCodeBlock.h:
  • wasm/js/JSWebAssemblyMemory.h:
  • wasm/js/WebAssemblyFunction.h:
  • wasm/js/WebAssemblyWrapperFunction.h:

Source/WebCore:

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):

  • bridge/runtime_method.h:

Source/WebKit:

  • WebProcess/Plugins/Netscape/JSNPMethod.h:
  • WebProcess/Plugins/Netscape/JSNPObject.h:
10:19 PM Changeset in webkit [240964] by Jonathan Bedard
  • 4 edits
    35 adds in trunk/LayoutTests

[iPad] Initial test gardening (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=193767
<rdar://problem/47515175>

Unreviewed test gardening.

A number of tests need to be re-baselined when run on iPad because of the larger screen.

  • fast/canvas/canvas-too-large-to-draw.html: iOS userAgent regex should match iPhones and iPads.
  • fast/events/touch/ios/target-taller-than-view.html: Move event listener since tabpPointY is the value we should compare against.
  • fast/visual-viewport/ios/min-scale-greater-than-one.html: expectedTop depends on the screen size of the device.
  • platform/ipad/fast/events: Added.
  • platform/ipad/fast/events/ios: Added.
  • platform/ipad/fast/events/ios/keyboard-should-not-trigger-resize-expected.txt: Added.
  • platform/ipad/fast/events/ios/rotation: Added.
  • platform/ipad/fast/events/ios/rotation/zz-no-rotation-expected.txt: Added.
  • platform/ipad/fast/events/touch: Added.
  • platform/ipad/fast/events/touch/ios: Added.
  • platform/ipad/fast/events/touch/ios/target-taller-than-view-expected.txt: Added.
  • platform/ipad/fast/scrolling: Added.
  • platform/ipad/fast/scrolling/ios: Added.
  • platform/ipad/fast/scrolling/ios/clipping-ancestor-with-accelerated-scrolling-ancestor-expected.txt: Added.
  • platform/ipad/fast/scrolling/ios/overflow-scrolling-ancestor-clip-expected.txt: Added.
  • platform/ipad/fast/scrolling/ios/overflow-scrolling-ancestor-clip-size-expected.txt: Added.
  • platform/ipad/fast/scrolling/ios/scrolling-content-clip-to-viewport-expected.txt: Added.
  • platform/ipad/fast/scrolling/ios/subpixel-overflow-scrolling-with-ancestor-expected.txt: Added.
  • platform/ipad/fast/scrolling/ios/touch-stacking-expected.txt: Added.
  • platform/ipad/fast/viewport/ios: Added.
  • platform/ipad/fast/viewport/ios/device-width-viewport-after-changing-view-scale-expected.txt: Added.
  • platform/ipad/fast/viewport/ios/initial-scale-after-changing-view-scale-expected.txt: Added.
  • platform/ipad/fast/viewport/ios/use-minimum-device-width-for-page-without-viewport-meta-expected.txt: Added.
  • platform/ipad/fast/viewport/ios/width-is-device-width-expected.txt: Added.
  • platform/ipad/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-expected.txt: Added.
  • platform/ipad/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall-expected.txt: Added.
  • platform/ipad/fast/viewport/ios/width-is-device-width-overflowing-expected.txt: Added.
  • platform/ipad/fast/viewport/ios/width-is-device-width-overflowing-no-shrink-to-fit-expected.txt: Added.
  • platform/ipad/platform: Added.
  • platform/ipad/platform/ios: Added.
  • platform/ipad/platform/ios/ios: Added.
  • platform/ipad/platform/ios/ios/fast: Added.
  • platform/ipad/platform/ios/ios/fast/text: Added.
  • platform/ipad/platform/ios/ios/fast/text/opticalFontWithTextStyle-expected.txt: Added.
  • platform/ipad/scrollingcoordinator: Added.
  • platform/ipad/scrollingcoordinator/ios: Added.
  • platform/ipad/scrollingcoordinator/ios/sync-layer-positions-after-scroll-expected.txt: Added.
  • platform/ipad/scrollingcoordinator/ios/ui-scrolling-tree-expected.txt: Added.
9:30 PM BuildingCairoOnWindows edited by Fujii Hironori
(diff)
8:34 PM Changeset in webkit [240963] by Simon Fraser
  • 10 edits
    4 moves in trunk/Source

Move some macOS/iOS scrolling code into the scrolling/cocoa directory
https://bugs.webkit.org/show_bug.cgi?id=194245

Reviewed by Zalan Bujtas.

Source/WebCore:

ScrollingTreeFixedNode and ScrollingTreeStickyNode are used on iOS and macOS, so move them to the cocoa
directory.

Standardize on the ordering of ENABLE(ASYNC_SCROLLING) && PLATFORM(MAC).

Stop building ScrollingThread for iOS (it's never used), and stub out some functions so things build.

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

(WebCore::ScrollingThread::initializeRunLoop):
(WebCore::ScrollingThread::wakeUpRunLoop):
(WebCore::ScrollingThread::threadRunLoopSourceCallback):

  • page/scrolling/cocoa/ScrollingTreeFixedNode.h: Renamed from Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.h.
  • page/scrolling/cocoa/ScrollingTreeFixedNode.mm: Renamed from Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.mm.
  • page/scrolling/cocoa/ScrollingTreeStickyNode.h: Renamed from Source/WebCore/page/scrolling/mac/ScrollingTreeStickyNode.h.
  • page/scrolling/cocoa/ScrollingTreeStickyNode.mm: Renamed from Source/WebCore/page/scrolling/mac/ScrollingTreeStickyNode.mm.
  • page/scrolling/mac/ScrollingThreadMac.mm:
  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h:
  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:

Source/WebKit:

Use PLATFORM(MAC), not !PLATFORM(IOS_FAMILY).

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
8:04 PM Changeset in webkit [240962] by Michael Catanzaro
  • 21 edits
    7 adds in trunk

[GTK][WPE] Need a function to convert internal URI to display ("pretty") URI
https://bugs.webkit.org/show_bug.cgi?id=174816

Patch by Ms2ger <Ms2ger@igalia.com> on 2019-02-04
Reviewed by Michael Catanzaro.

Source/WebCore:

Tests: enabled fast/url/user-visible/.

  • testing/Internals.cpp:

(WebCore::Internals::userVisibleString): Enable method on all platforms.

Source/WebKit:

Add webkit_uri_for_display for GTK and WPE.

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
  • SourcesGTK.txt:
  • SourcesWPE.txt:
  • UIProcess/API/glib/WebKitURIUtilities.cpp: Added.

(webkit_uri_for_display):

  • UIProcess/API/gtk/WebKitURIUtilities.h: Added.
  • UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
  • UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
  • UIProcess/API/gtk/webkit2.h:
  • UIProcess/API/wpe/WebKitURIUtilities.h: Added.
  • UIProcess/API/wpe/docs/wpe-0.1-sections.txt:
  • UIProcess/API/wpe/docs/wpe-docs.sgml:
  • UIProcess/API/wpe/webkit.h:

Source/WTF:

Translate userVisibleString and dependent code into platform-neutral C++
in wtf/URLHelpers.{h,cpp}.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/URLHelpers.cpp: Added.

(WTF::URLHelpers::loadIDNScriptWhiteList):
(WTF::URLHelpers::isArmenianLookalikeCharacter):
(WTF::URLHelpers::isArmenianScriptCharacter):
(WTF::URLHelpers::isASCIIDigitOrValidHostCharacter):
(WTF::URLHelpers::isLookalikeCharacter):
(WTF::URLHelpers::whiteListIDNScript):
(WTF::URLHelpers::initializeDefaultIDNScriptWhiteList):
(WTF::URLHelpers::allCharactersInIDNScriptWhiteList):
(WTF::URLHelpers::isSecondLevelDomainNameAllowedByTLDRules):
(WTF::URLHelpers::isRussianDomainNameCharacter):
(WTF::URLHelpers::allCharactersAllowedByTLDRules):
(WTF::URLHelpers::mapHostName):
(WTF::URLHelpers::collectRangesThatNeedMapping):
(WTF::URLHelpers::applyHostNameFunctionToMailToURLString):
(WTF::URLHelpers::applyHostNameFunctionToURLString):
(WTF::URLHelpers::mapHostNames):
(WTF::URLHelpers::createStringWithEscapedUnsafeCharacters):
(WTF::URLHelpers::toNormalizationFormC):
(WTF::URLHelpers::userVisibleURL):

  • wtf/URLHelpers.h: Added.
  • wtf/cocoa/NSURLExtras.mm:

(WTF::URLHelpers::loadIDNScriptWhiteList):
(WTF::decodePercentEscapes):
(WTF::decodeHostName):
(WTF::encodeHostName):
(WTF::URLWithUserTypedString):
(WTF::userVisibleString):

Tools:

Add tests for webkit_uri_for_display().

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitURIUtilities.cpp: Added.

(testURIForDisplayUnaffected):
(testURIForDisplayAffected):
(beforeAll):
(afterAll):

  • TestWebKitAPI/glib/CMakeLists.txt:

LayoutTests:

7:24 PM Changeset in webkit [240961] by ddkilzer@apple.com
  • 2 edits
    1 add in trunk/Source/ThirdParty/libwebrtc

vp8e_mr_alloc_mem() leaks LOWER_RES_FRAME_INFO if second memory allocation fails
<https://webkit.org/b/194265>

Reviewed by Youenn Fablet.

  • Source/third_party/libvpx/source/libvpx/vp8/vp8_cx_iface.c:

(vp8e_mr_alloc_mem):

  • Initialize res to VPX_CODEC_OK instead of 0.
  • Return early if first calloc() fails instead of trying the second calloc(). The function would crash dereferencing nullptr in shared_mem_loc->mb_info otherwise.
  • Call free(shared_mem_loc) if the second call to calloc() fails. This fixes the leak.
  • WebKit/0003-libwebrtc-fix-vp8e_mr_alloc_mem-leak.diff: Add.
7:23 PM Changeset in webkit [240960] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Change llint operand macros to inline functions
https://bugs.webkit.org/show_bug.cgi?id=194248

Reviewed by Mark Lam.

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::getNonConstantOperand):
(JSC::LLInt::getOperand):
(JSC::LLInt::llint_trace_value):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::getByVal):
(JSC::LLInt::genericCall):
(JSC::LLInt::varargsSetup):
(JSC::LLInt::commonCallEval):

5:36 PM Changeset in webkit [240959] by rmorisset@apple.com
  • 3 edits
    1 add in trunk

when lowering AssertNotEmpty, create the value before creating the patchpoint
https://bugs.webkit.org/show_bug.cgi?id=194231

Reviewed by Saam Barati.

JSTests:

This test is painfully fragile: it tries to test that AssertNotEmpty on a constant produces valid B3 IR.
The problem is that AssertNotEmpty is only created by DFGConstantFolding when it can simplify a CheckStructure, and constant folding is a bit capricious (https://bugs.webkit.org/show_bug.cgi?id=133947)
So even tiny changes to this test can change the path code taken.

  • stress/assert-not-empty.js: Added.

(foo):

Source/JavaScriptCore:

This is a very simple change: we should never generate B3 IR where an instruction depends on a value that comes later in the instruction stream.
AssertNotEmpty was generating some such IR, it probably slipped through until now because it is a rather rare and tricky instruction to generate.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileAssertNotEmpty):

5:34 PM Changeset in webkit [240958] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore
[curl] ASSERTION FAILED: !m_didNotifyResponse
m_multipartHandle

https://bugs.webkit.org/show_bug.cgi?id=190895

Reviewed by Ross Kirsling.

An assertion was failing in CurlRequest::invokeDidReceiveResponse
because DidReceiveResponse was already dispatched. This condition
was met if CurlRequestScheduler::completeTransfer is called while
waiting for the reply for the first DidReceiveResponse.

No new tests, covered by existing tests.

  • platform/network/curl/CurlRequest.h:

(WebCore::CurlRequest::needToInvokeDidReceiveResponse const):
Return true if m_didNotifyResponse is false disregard to
m_didReturnFromNotify.

5:31 PM Changeset in webkit [240957] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[iOS Simulator] pageoverlay/overlay tests are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=153337

Unreviewed test gardening.

Patch by Shawn Roberts <Shawn Roberts> on 2019-02-04

  • platform/ios/TestExpectations:
5:31 PM Changeset in webkit [240956] by achristensen@apple.com
  • 5 edits
    3 adds in trunk/Source/WebKit

Move XPCService main to a shared file calling a C function
https://bugs.webkit.org/show_bug.cgi?id=194256

Reviewed by Brady Eidson.

This not only reduces a few kilobytes of duplicated binary from the XPCService executables,
It will allow me to introduce a new kind of executable which will need to parse argv and call a different C function.
This is similar to r236075 but more general.

  • Shared/API/Cocoa/WKMain.h: Added.
  • Shared/API/Cocoa/WKMain.mm: Added.

(WKXPCServiceMain):

  • Shared/EntryPointUtilities/Cocoa/AuxiliaryProcessMain.cpp: Added.

(main):

  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:

(main): Deleted.

  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
5:30 PM Changeset in webkit [240955] by achristensen@apple.com
  • 32 edits in trunk/Source/WebKit

Make MessageSender functions const
https://bugs.webkit.org/show_bug.cgi?id=194247

Reviewed by Brady Eidson.

  • NetworkProcess/Downloads/Download.cpp:

(WebKit::Download::messageSenderConnection const):
(WebKit::Download::messageSenderDestinationID const):
(WebKit::Download::messageSenderConnection): Deleted.
(WebKit::Download::messageSenderDestinationID): Deleted.

  • NetworkProcess/Downloads/Download.h:
  • NetworkProcess/Downloads/PendingDownload.cpp:

(WebKit::PendingDownload::messageSenderConnection const):
(WebKit::PendingDownload::messageSenderDestinationID const):
(WebKit::PendingDownload::messageSenderConnection): Deleted.
(WebKit::PendingDownload::messageSenderDestinationID): Deleted.

  • NetworkProcess/Downloads/PendingDownload.h:
  • NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:

(WebKit::WebIDBConnectionToClient::messageSenderConnection const):
(WebKit::WebIDBConnectionToClient::messageSenderConnection): Deleted.

  • NetworkProcess/IndexedDB/WebIDBConnectionToClient.h:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::messageSenderConnection const):
(WebKit::NetworkResourceLoader::messageSenderConnection): Deleted.

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

(WebKit::NetworkSocketStream::messageSenderConnection const):
(WebKit::NetworkSocketStream::messageSenderDestinationID const):
(WebKit::NetworkSocketStream::messageSenderConnection): Deleted.
(WebKit::NetworkSocketStream::messageSenderDestinationID): Deleted.

  • NetworkProcess/NetworkSocketStream.h:
  • NetworkProcess/ServiceWorker/WebSWServerConnection.h:
  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:

(WebKit::WebSWServerToContextConnection::messageSenderConnection const):
(WebKit::WebSWServerToContextConnection::messageSenderDestinationID const):
(WebKit::WebSWServerToContextConnection::messageSenderConnection): Deleted.
(WebKit::WebSWServerToContextConnection::messageSenderDestinationID): Deleted.

  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
  • Platform/IPC/MessageSender.h:
  • Shared/AuxiliaryProcess.cpp:

(WebKit::AuxiliaryProcess::messageSenderConnection const):
(WebKit::AuxiliaryProcess::messageSenderDestinationID const):
(WebKit::AuxiliaryProcess::messageSenderConnection): Deleted.
(WebKit::AuxiliaryProcess::messageSenderDestinationID): Deleted.

  • Shared/AuxiliaryProcess.h:
  • UIProcess/WebConnectionToWebProcess.cpp:

(WebKit::WebConnectionToWebProcess::messageSenderConnection const):
(WebKit::WebConnectionToWebProcess::messageSenderDestinationID const):
(WebKit::WebConnectionToWebProcess::messageSenderConnection): Deleted.
(WebKit::WebConnectionToWebProcess::messageSenderDestinationID): Deleted.

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

(WebKit::WebPageProxy::messageSenderConnection const):
(WebKit::WebPageProxy::messageSenderDestinationID const):
(WebKit::WebPageProxy::messageSenderConnection): Deleted.
(WebKit::WebPageProxy::messageSenderDestinationID): Deleted.

  • UIProcess/WebPageProxy.h:
  • WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:

(WebKit::WebIDBConnectionToServer::messageSenderConnection const):
(WebKit::WebIDBConnectionToServer::messageSenderConnection): Deleted.

  • WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::messageSenderConnection const):
(WebKit::WebResourceLoader::messageSenderDestinationID const):
(WebKit::WebResourceLoader::messageSenderConnection): Deleted.
(WebKit::WebResourceLoader::messageSenderDestinationID): Deleted.

  • WebProcess/Network/WebResourceLoader.h:
  • WebProcess/Network/WebSocketStream.cpp:

(WebKit::WebSocketStream::messageSenderConnection const):
(WebKit::WebSocketStream::messageSenderDestinationID const):
(WebKit::WebSocketStream::messageSenderConnection): Deleted.
(WebKit::WebSocketStream::messageSenderDestinationID): Deleted.

  • WebProcess/Network/WebSocketStream.h:
  • WebProcess/Storage/WebSWClientConnection.h:
  • WebProcess/WebConnectionToUIProcess.cpp:

(WebKit::WebConnectionToUIProcess::messageSenderConnection const):
(WebKit::WebConnectionToUIProcess::messageSenderDestinationID const):
(WebKit::WebConnectionToUIProcess::messageSenderConnection): Deleted.
(WebKit::WebConnectionToUIProcess::messageSenderDestinationID): Deleted.

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

(WebKit::WebPage::messageSenderConnection const):
(WebKit::WebPage::messageSenderDestinationID const):
(WebKit::WebPage::messageSenderConnection): Deleted.
(WebKit::WebPage::messageSenderDestinationID): Deleted.

  • WebProcess/WebPage/WebPage.h:
5:27 PM Changeset in webkit [240954] by beidson@apple.com
  • 9 edits in trunk/Source/WebKit

Take additional process assertion while downloading.
<rdar://problem/47741356> and https://bugs.webkit.org/show_bug.cgi?id=194239

Reviewed by Chris Dumez.

When the first download starts, grab this new assertion.
When the last download ends, release it.

  • Configurations/Network-iOS.entitlements:
  • NetworkProcess/Downloads/DownloadManager.cpp:

(WebKit::DownloadManager::dataTaskBecameDownloadTask):
(WebKit::DownloadManager::downloadFinished):

  • NetworkProcess/Downloads/DownloadManager.h:
  • Platform/spi/ios/AssertionServicesSPI.h:
  • UIProcess/ProcessAssertion.cpp:

(WebKit::ProcessAssertion::ProcessAssertion):

  • UIProcess/ProcessAssertion.h:

(WebKit::ProcessAssertion::ProcessAssertion):

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::didSetAssertionState):

  • UIProcess/ios/ProcessAssertionIOS.mm:

(WebKit::flagsForState):
(WebKit::reasonForState):
(WebKit::ProcessAssertion::ProcessAssertion):

5:16 PM Changeset in webkit [240953] by Jonathan Bedard
  • 2 edits in trunk/Tools

webkitpy: Precedence of booted devices should match precedence in DEFAULT_DEVICE_TYPES
https://bugs.webkit.org/show_bug.cgi?id=194158
<rdar://problem/47737268>

Rubber-stamped by Aakash Jain.

  • Scripts/webkitpy/port/device_port.py:

(DevicePort.supported_device_types): Sort supported device types by the DEFAULT_DEVICE_TYPES.

5:11 PM Changeset in webkit [240952] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Resources: missing resource data for document on reload
https://bugs.webkit.org/show_bug.cgi?id=194243
<rdar://problem/47559021>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/ResourceDetailsSidebarPanel.js:

(WI.ResourceDetailsSidebarPanel.prototype.set resource):
(WI.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners):

  • UserInterface/Base/Object.js:

(WI.Object.removeEventListener):
Drive-by: there's no need to iterate over the entire table to check if thisObject exists,
as that is handled for us by ListMultimap, which we later call anyways.

5:09 PM Changeset in webkit [240951] by ysuzuki@apple.com
  • 9 edits in trunk/Source/JavaScriptCore

[JSC] ExecutableToCodeBlockEdge should be smaller
https://bugs.webkit.org/show_bug.cgi?id=194244

Reviewed by Michael Saboff.

ExecutableToCodeBlockEdge is allocated so many times. However its memory layout is not efficient.
sizeof(ExecutableToCodeBlockEdge) is 24bytes, but it discards 7bytes due to one bool m_isActive flag.
Because our size classes are rounded by 16bytes, ExecutableToCodeBlockEdge takes 32bytes. So, half of
it is wasted. We should fit it into 16bytes so that we can efficiently allocate it.

In this patch, we leverages TypeInfoMayBePrototype bit in JSTypeInfo. It is a bit special TypeInfo bit
since this is per-cell bit. We rename this to TypeInfoPerCellBit, and use it as a m_isActive mark in
ExecutableToCodeBlockEdge. In JSObject subclasses, we use it as MayBePrototype flag.

Since this flag is not changed in CAS style, we must not change this in concurrent threads. This is OK
for ExecutableToCodeBlockEdge's m_isActive flag since this is touched on the main thread (ScriptExecutable::installCode
does not touch it if it is called in non-main threads).

  • bytecode/ExecutableToCodeBlockEdge.cpp:

(JSC::ExecutableToCodeBlockEdge::finishCreation):
(JSC::ExecutableToCodeBlockEdge::visitChildren):
(JSC::ExecutableToCodeBlockEdge::activate):
(JSC::ExecutableToCodeBlockEdge::deactivate):
(JSC::ExecutableToCodeBlockEdge::isActive const):

  • bytecode/ExecutableToCodeBlockEdge.h:
  • runtime/JSCell.h:
  • runtime/JSCellInlines.h:

(JSC::JSCell::perCellBit const):
(JSC::JSCell::setPerCellBit):
(JSC::JSCell::mayBePrototype const): Deleted.
(JSC::JSCell::didBecomePrototype): Deleted.

  • runtime/JSObject.cpp:

(JSC::JSObject::setPrototypeDirect):

  • runtime/JSObject.h:
  • runtime/JSObjectInlines.h:

(JSC::JSObject::mayBePrototype const):
(JSC::JSObject::didBecomePrototype):

  • runtime/JSTypeInfo.h:

(JSC::TypeInfo::perCellBit):
(JSC::TypeInfo::mergeInlineTypeFlags):
(JSC::TypeInfo::mayBePrototype): Deleted.

5:08 PM Changeset in webkit [240950] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION: Resources: WI.TreeOutline assertions when refreshing the page
https://bugs.webkit.org/show_bug.cgi?id=194242
<rdar://problem/47802027>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/FolderizedTreeElement.js:

(WI.FolderizedTreeElement.prototype.removeChildren):
FolderTreeElements are removed by the base class call to removeChildren.
Calling removeChildren for detached TreeElements is unnecessary.

4:47 PM Changeset in webkit [240949] by Said Abou-Hallawa
  • 14 edits
    3 adds in trunk

[CG] Enable setAdditionalSupportedImageTypes for WK1
https://bugs.webkit.org/show_bug.cgi?id=194190

Reviewed by Tim Horton.

Source/WebCore:

Move the function webCoreStringVectorFromNSStringArray from WebKit to
WebCore so it can be used by both WebKit and WebKitLegacy.

  • platform/mac/StringUtilities.h:
  • platform/mac/StringUtilities.mm:

(WebCore::webCoreStringVectorFromNSStringArray):

Source/WebKit:

Move the function webCoreStringVectorFromNSStringArray from WebKit to
WebCore so it can be used by both WebKit and WebKitLegacy.

  • Platform/mac/StringUtilities.h:
  • Platform/mac/StringUtilities.mm:

(WebKit::webCoreStringVectorFromNSStringArray): Deleted.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):

Source/WebKitLegacy/mac:

  1. Define the preferences key AdditionalSupportedImageTypes.
  2. Add additionalSupportedImageTypes as a private preference property.
  3. Define the setter and the getter of the property.
  4. Add function to convert from an id to an array of strings.
  5. Call WebCore::setAdditionalSupportedImageTypes when preferences change.
  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(-[WebPreferences _stringArrayValueForKey:]):
(-[WebPreferences _setStringArrayValueForKey:forKey:]):
(-[WebPreferences setAdditionalSupportedImageTypes:]):
(-[WebPreferences additionalSupportedImageTypes]):

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Tools:

Add a test similar to the one under WebKit Cocoa but make it create a
WebView instead of a WKWebView.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/mac/100x100-red.tga: Added.
  • TestWebKitAPI/Tests/mac/AdditionalSupportedImageTypes.html: Added.
  • TestWebKitAPI/Tests/mac/AdditionalSupportedImageTypes.mm: Added.

(-[AdditionalSupportedImageTypesTest webView:didFinishLoadForFrame:]):
(TestWebKitAPI::runTest):
(TestWebKitAPI::TEST):

4:28 PM Changeset in webkit [240948] by timothy@apple.com
  • 3 edits in trunk/Source/WebKitLegacy/mac

Add WebView SPI to temporarily force light or dark appearance on a page.
https://bugs.webkit.org/show_bug.cgi?id=194230

Reviewed by Tim Horton.

  • WebView/WebView.mm:

(-[WebView _useDarkAppearance:]): Added.
(-[WebView _setUseDarkAppearance:]): Added.

  • WebView/WebViewPrivate.h:
3:32 PM Changeset in webkit [240947] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION: clicking a selected call frame doesn't re-scroll
https://bugs.webkit.org/show_bug.cgi?id=194169
<rdar://problem/47743864>

Reviewed by Devin Rousso.

  • UserInterface/Views/TreeOutline.js:

(WI.TreeOutline.prototype._handleMouseDown):
Add a special case for a single-selection TreeOutline with
allowsRepeatSelection enabled. Since the element is already
selected, bypass the SelectionCongroller and dispatch an
event with event.data.selectedByUser set to true.

3:30 PM Changeset in webkit [240946] by Nikita Vasilyev
  • 8 edits
    2 adds in trunk

Web Inspector: Styles: fix race conditions when editing
https://bugs.webkit.org/show_bug.cgi?id=192739
<rdar://problem/46752925>

Reviewed by Devin Rousso.

Source/WebInspectorUI:

Editing CSS property in the style editor syncronously updates CSSStyleDeclaration on the front-end
and asyncronously updates the backend by calling CSSAgent.setStyleText. After the new style text is applied
on the backend, CSSStyleDeclaration (on the front-end) gets updated.

Unsure there's no race conditions by introducing _updatesInProgressCount:

  • Increment it before calling CSSAgent.setStyleText.
  • Decrement it after CSSAgent.setStyleText is finished.

Prevent updates of CSSStyleDeclaration when _updatesInProgressCount isn't 0.

  • UserInterface/Models/CSSProperty.js:

(WI.CSSProperty.prototype._updateOwnerStyleText):

  • UserInterface/Models/CSSStyleDeclaration.js:

(WI.CSSStyleDeclaration):
(WI.CSSStyleDeclaration.prototype.set text): Removed.
(WI.CSSStyleDeclaration.prototype.setText): Added.
Change the setter to a method since it has side effects including an asynchronous backend call.

  • UserInterface/Models/DOMNodeStyles.js:

(WI.DOMNodeStyles.prototype.changeStyleText):

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype.get nameTextField): Removed.
(WI.SpreadsheetStyleProperty.prototype.get valueTextField): Removed.
Drive-by: remove unused code.

LayoutTests:

  • inspector/css/modify-css-property-expected.txt:
  • inspector/css/modify-css-property-race-expected.txt: Added.
  • inspector/css/modify-css-property-race.html: Added.
  • inspector/css/modify-css-property.html:
3:12 PM Changeset in webkit [240945] by Justin Fan
  • 2 edits in trunk/Source/WebCore

[Web GPU] Code clean-up for RenderPipeline backend
https://bugs.webkit.org/show_bug.cgi?id=194238

Reviewed by Dean Jackson.

Replace dot syntax setters with calls to setter methods, and remove unnecessary setter calls for
the input state's descriptor arrays.

Covered by existing tests; no change in behavior.

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

(WebCore::tryCreateMtlDepthStencilState): Refactor to use implicit setters rather than dot syntax.
(WebCore::setInputStateForPipelineDescriptor): Ditto, and remove unnecessary setter calls on array objects.

2:30 PM Changeset in webkit [240944] by benjamin@webkit.org
  • 13 edits in trunk/Source

Use deferrable timer to restart the Responsiveness Timer on each wheel event
https://bugs.webkit.org/show_bug.cgi?id=194135
Source/WebCore:

<rdar://problem/47724099>

Reviewed by Simon Fraser.

The original DeferrableOneShotTimer was not really deferrable.
What it allows is to restart the count down from scratch after
firing.

For this optimization, I want to keep the correct timing but avoid
starting a real timer every time.

I renamed DeferrableOneShotTimer to ResettableOneShotTimer and
created a real DeferrableOneShotTimer that support deadlines.

  • css/CSSImageGeneratorValue.cpp:
  • html/HTMLPlugInImageElement.h:
  • loader/cache/CachedResource.h:
  • platform/Timer.cpp:

(WebCore::DeferrableOneShotTimer::startOneShot):
(WebCore::DeferrableOneShotTimer::fired):

  • platform/Timer.h:

(WebCore::TimerBase::nextFireTime const):
(WebCore::ResettableOneShotTimer::ResettableOneShotTimer):
(WebCore::DeferrableOneShotTimer::DeferrableOneShotTimer):
(WebCore::DeferrableOneShotTimer::stop):
(WebCore::DeferrableOneShotTimer::restart): Deleted.

  • platform/graphics/ca/TileController.h:
  • platform/graphics/cg/SubimageCacheWithTimer.h:

Source/WebKit:

Reviewed by Simon Fraser.

Simon Fraser suggested a neat improvement over my previous optimization
of ResponsivenessTimer.

Instead of reseting the deadline with every event, we can let the timer
fire and add the missing time from the last start.

I implemented that behavior in the new Deferrable Timer class and use
it from ResponsivenessTimer.

  • NetworkProcess/watchos/NetworkProximityAssertion.h:
  • UIProcess/ResponsivenessTimer.h:
  • WebProcess/Plugins/PluginView.h:
2:28 PM Changeset in webkit [240943] by graouts@webkit.org
  • 4 edits in trunk/Source/WebCore

Use constants for pointer types
https://bugs.webkit.org/show_bug.cgi?id=194232

Reviewed by Dean Jackson.

We cannot use an enum for the pointer type since a custom pointer type can be created by developers when creating a
pointer event using JavaScript, but we can at least used string constants for the ones created internally.

  • dom/PointerEvent.cpp:

(WebCore::PointerEvent::mousePointerType):
(WebCore::PointerEvent::penPointerType):
(WebCore::PointerEvent::touchPointerType):

  • dom/PointerEvent.h:
  • dom/ios/PointerEventIOS.cpp:
2:19 PM Changeset in webkit [240942] by Alan Bujtas
  • 4 edits
    3 adds in trunk

[First paint] Adjust "finishedParsingMainDocument" flag by taking deferred and async scripts into account.
https://bugs.webkit.org/show_bug.cgi?id=194168

Reviewed by Simon Fraser.

Source/WebCore:

First paint should not be blocked by async or deferred scripts.

  • page/FrameView.cpp:

(WebCore::FrameView::qualifiesAsVisuallyNonEmpty const):

Tools:

Test if the firstVisuallyNoneEmpty milestone fires before the deferred script's post-message.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/FirstVisuallyNonEmptyMilestoneWithDeferredScript.mm: Added.

(-[FirstPaintMessageHandler userContentController:didReceiveScriptMessage:]):
(-[RenderingProgressNavigationDelegate _webView:renderingProgressDidChange:]):
(TEST):

  • TestWebKitAPI/Tests/WebKit/deferred-script-load.html: Added.
  • TestWebKitAPI/Tests/WebKit/deferred-script.js: Added.
1:51 PM Changeset in webkit [240941] by Simon Fraser
  • 14 edits
    6 adds in trunk

Async overflow scroll with border-radius renders incorrectly
https://bugs.webkit.org/show_bug.cgi?id=194205
<rdar://problem/47771668>

Reviewed by Zalan Bujtas.

Source/WebCore:

When an element has composited overflow:scroll and border-radius, we need to make a layer
to clip to the inside of the border radius if necessary.

Existing code simply turned off needsDescendantsClippingLayer for composited scrolling
layers, but now we check to see if the inner border is rounded. If we have both a m_childContainmentLayer
and scrolling layers, we need to adjust the location of the scrolling layers (which are parented
in m_childContainmentLayer).

Also fix offsetFromRenderer for these layers; it's positive for layers inset from the top left
of the border box.

Tests: compositing/clipping/border-radius-async-overflow-clipping-layer.html

compositing/clipping/border-radius-async-overflow-non-stacking.html
compositing/clipping/border-radius-async-overflow-stacking.html

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateConfiguration):
(WebCore::RenderLayerBacking::updateGeometry):
(WebCore::RenderLayerBacking::updateChildClippingStrategy): Layout is always up-to-date now, so remove the comment.

LayoutTests:

New baselines, mostly correcting offsetFromRenderer.

  • compositing/clipping/border-radius-async-overflow-clipping-layer-expected.txt: Added.
  • compositing/clipping/border-radius-async-overflow-clipping-layer.html: Added.
  • compositing/clipping/border-radius-async-overflow-non-stacking-expected.html: Added.
  • compositing/clipping/border-radius-async-overflow-non-stacking.html: Added.
  • compositing/clipping/border-radius-async-overflow-stacking-expected.html: Added.
  • compositing/clipping/border-radius-async-overflow-stacking.html: Added.
  • compositing/scrolling/overflow-scrolling-layers-are-self-painting-expected.txt:
  • platform/ios/compositing/overflow/scrolling-without-painting-expected.txt:
  • platform/ios/compositing/overflow/textarea-scroll-touch-expected.txt: html.css specifies a border-radius on <textarea> for iOS, so we make additional

clipping layers.

  • platform/ios/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt:
  • platform/ios/compositing/scrolling/overflow-scrolling-layers-are-self-painting-expected.txt:
1:16 PM Changeset in webkit [240940] by Simon Fraser
  • 30 edits
    3 adds in trunk

PageOverlayController's layers should be created lazily
https://bugs.webkit.org/show_bug.cgi?id=194199
Source/WebCore:

Reviewed by Tim Horton.

Expose PageOverlayController::hasDocumentOverlays() and hasViewOverlays()
and use them to only parent the overlay-hosting layers when necessary.

For document overlays, RenderLayerCompositor::appendDocumentOverlayLayers() can
simply do nothing if there are none. Updates are triggered via Page::installedPageOverlaysChanged(),
which calls FrameView::setNeedsCompositingConfigurationUpdate() to trigger the root layer
compositing updates that parents the layerWithDocumentOverlays().

View overlays are added to the layer tree via the DrawingArea. When we go between having
none and some view overlays, Page::installedPageOverlaysChanged() calls attachViewOverlayGraphicsLayer()
on the ChromeClient, and the DrawingArea responds by calling updateRootLayers() and scheduling a
compositing flush (this has to be done manually because view overlay layers are outside the
subtree managed by RenderLayerCompositor).

Now that GraphicsLayers are ref-counted, we can let the DrawingArea simply retain its m_viewOverlayRootLayer;
there is no need for RenderLayerCompositor::attachRootLayer()/detachRootLayer() to do anything with view
overlay layers. This implies that a page can navigate (new FrameView) and view overlays will persist, without
having to be manually removed and re-added. We can also remove the Frame argument to attachViewOverlayGraphicsLayer().

  • loader/EmptyClients.h:
  • page/ChromeClient.h:
  • page/FrameView.cpp:

(WebCore::FrameView::setNeedsCompositingConfigurationUpdate): These functions need to schedule a compositing flush
because there may be nothing else that does.
(WebCore::FrameView::setNeedsCompositingGeometryUpdate):

  • page/Page.cpp:

(WebCore::Page::installedPageOverlaysChanged):

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

(WebCore::PageOverlayController::hasDocumentOverlays const):
(WebCore::PageOverlayController::hasViewOverlays const):
(WebCore::PageOverlayController::attachViewOverlayLayers): PageOverlayController has the Page so it
might as well be the one to call through the ChromeClient.
(WebCore::PageOverlayController::detachViewOverlayLayers):
(WebCore::PageOverlayController::installPageOverlay):
(WebCore::PageOverlayController::uninstallPageOverlay):

  • page/PageOverlayController.h:
  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateCompositingLayers): isFullUpdate is always true; remove it.
(WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
(WebCore::RenderLayerCompositor::attachRootLayer):
(WebCore::RenderLayerCompositor::detachRootLayer):

Source/WebKit:

rdar://problem/46571593

Reviewed by Tim Horton.

Expose PageOverlayController::hasDocumentOverlays() and hasViewOverlays()
and use them to only parent the overlay-hosting layers when necessary.

For document overlays, RenderLayerCompositor::appendDocumentOverlayLayers() can
simply do nothing if there are none. Updates are triggered via Page::installedPageOverlaysChanged(),
which calls FrameView::setNeedsCompositingConfigurationUpdate() to trigger the root layer
compositing updates that parents the layerWithDocumentOverlays().

View overlays are added to the layer tree via the DrawingArea. When we go between having
none and some view overlays, Page::installedPageOverlaysChanged() calls attachViewOverlayGraphicsLayer()
on the ChromeClient, and the DrawingArea responds by calling updateRootLayers() and scheduling a
compositing flush (this has to be done manually because view overlay layers are outside the
subtree managed by RenderLayerCompositor).

Now that GraphicsLayers are ref-counted, we can let the DrawingArea simply retain its m_viewOverlayRootLayer;
there is no need for RenderLayerCompositor::attachRootLayer()/detachRootLayer() to do anything with view
overlay layers. This implies that a page can navigate (new FrameView) and view overlays will persist, without
having to be manually removed and re-added. We can also remove the Frame argument to attachViewOverlayGraphicsLayer().

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::attachViewOverlayGraphicsLayer):

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

(WebKit::AcceleratedDrawingArea::attachViewOverlayGraphicsLayer):

  • WebProcess/WebPage/AcceleratedDrawingArea.h:
  • WebProcess/WebPage/DrawingArea.h:

(WebKit::DrawingArea::attachViewOverlayGraphicsLayer):

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::attachViewOverlayGraphicsLayer):

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::attachViewOverlayGraphicsLayer):
(WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):

Source/WebKitLegacy/mac:

rdar://problem/46571593

Reviewed by Tim Horton.

  • WebCoreSupport/WebChromeClient.h:
  • WebCoreSupport/WebChromeClient.mm:

(WebChromeClient::attachViewOverlayGraphicsLayer):

Source/WebKitLegacy/win:

rdar://problem/46571593

Reviewed by Tim Horton.

Expose PageOverlayController::hasDocumentOverlays() and hasViewOverlays()
and use them to only parent the overlay-hosting layers when necessary.

For document overlays, RenderLayerCompositor::appendDocumentOverlayLayers() can
simply do nothing if there are none. Updates are triggered via Page::installedPageOverlaysChanged(),
which calls FrameView::setNeedsCompositingConfigurationUpdate() to trigger the root layer
compositing updates that parents the layerWithDocumentOverlays().

View overlays are added to the layer tree via the DrawingArea. When we go between having
none and some view overlays, Page::installedPageOverlaysChanged() calls attachViewOverlayGraphicsLayer()
on the ChromeClient, and the DrawingArea responds by calling updateRootLayers() and scheduling a
compositing flush (this has to be done manually because view overlay layers are outside the
subtree managed by RenderLayerCompositor).

Now that GraphicsLayers are ref-counted, we can let the DrawingArea simply retain its m_viewOverlayRootLayer;
there is no need for RenderLayerCompositor::attachRootLayer()/detachRootLayer() to do anything with view
overlay layers. This implies that a page can navigate (new FrameView) and view overlays will persist, without
having to be manually removed and re-added. We can also remove the Frame argument to attachViewOverlayGraphicsLayer().

  • WebCoreSupport/WebChromeClient.cpp:

(WebChromeClient::attachViewOverlayGraphicsLayer):

  • WebCoreSupport/WebChromeClient.h:

LayoutTests:

rdar://problem/46571593

Reviewed by Tim Horton.

  • pageoverlay/overlay-remove-reinsert-view-expected.txt: We no longer unparent the overlays

on view removal, so new results.

  • platform/ios-wk2/TestExpectations: Unskip some iOS tests.
  • platform/ios-wk2/pageoverlay/overlay-installation-expected.txt: Added.
  • platform/ios-wk2/pageoverlay/overlay-large-document-expected.txt: Added.
  • platform/ios-wk2/pageoverlay/overlay-large-document-scrolled-expected.txt: Added.
  • platform/ios/TestExpectations: Unskip some iOS tests.
1:03 PM Changeset in webkit [240939] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Source/WebCore:
When performing Increment or Decrement on sliders, check to see if the slider is disabled.
https://bugs.webkit.org/show_bug.cgi?id=173497

Patch by Eric Liang <ericliang@apple.com> on 2019-02-04
Reviewed by Chris Fleizach.

Test: accessibility/set-value-not-work-for-disabled-sliders.html

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::alterSliderValue):

LayoutTests:
Check if slider value changed after calling AX Increment or Decrement on disabled sliders.
https://bugs.webkit.org/show_bug.cgi?id=193497

Patch by Eric Liang <ericliang@apple.com> on 2019-02-04
Reviewed by Chris Fleizach.

  • accessibility/set-value-not-work-for-disabled-sliders.html: Added.
1:02 PM Changeset in webkit [240938] by ysuzuki@apple.com
  • 14 edits in trunk/Source/JavaScriptCore

[JSC] Shrink size of FunctionExecutable
https://bugs.webkit.org/show_bug.cgi?id=194191

Reviewed by Michael Saboff.

This patch reduces the size of FunctionExecutable. Since it is allocated in IsoSubspace, reducing the size directly
improves the allocation efficiency.

  1. ScriptExecutable (base class of FunctionExecutable) has several members, but it is meaningful only in FunctionExecutable. We remove this from ScriptExecutable, and move it to FunctionExecutable.
  1. FunctionExecutable has several data which are rarely used. One for FunctionOverrides functionality, which is typically used for JSC debugging purpose, and another is TypeSet and offsets for type profiler. We move them to RareData and reduce the size of FunctionExecutable in the common case.

This patch changes the size of FunctionExecutable from 176 to 144.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dumpSource):
(JSC::CodeBlock::finishCreation):

  • dfg/DFGNode.h:

(JSC::DFG::Node::OpInfoWrapper::as const):

  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::Frame::computeLineAndColumn const):

  • runtime/ExecutableBase.h:
  • runtime/FunctionExecutable.cpp:

(JSC::FunctionExecutable::FunctionExecutable):
(JSC::FunctionExecutable::ensureRareDataSlow):

  • runtime/FunctionExecutable.h:
  • runtime/Intrinsic.h:
  • runtime/ModuleProgramExecutable.cpp:

(JSC::ModuleProgramExecutable::ModuleProgramExecutable):

  • runtime/ProgramExecutable.cpp:

(JSC::ProgramExecutable::ProgramExecutable):

  • runtime/ScriptExecutable.cpp:

(JSC::ScriptExecutable::ScriptExecutable):
(JSC::ScriptExecutable::overrideLineNumber const):
(JSC::ScriptExecutable::typeProfilingStartOffset const):
(JSC::ScriptExecutable::typeProfilingEndOffset const):

  • runtime/ScriptExecutable.h:

(JSC::ScriptExecutable::firstLine const):
(JSC::ScriptExecutable::setOverrideLineNumber): Deleted.
(JSC::ScriptExecutable::hasOverrideLineNumber const): Deleted.
(JSC::ScriptExecutable::overrideLineNumber const): Deleted.
(JSC::ScriptExecutable::typeProfilingStartOffset const): Deleted.
(JSC::ScriptExecutable::typeProfilingEndOffset const): Deleted.

  • runtime/StackFrame.cpp:

(JSC::StackFrame::computeLineAndColumn const):

  • tools/JSDollarVM.cpp:

(JSC::functionReturnTypeFor):

12:49 PM Changeset in webkit [240937] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

Unreviewed, improve preprocessor guard
https://bugs.webkit.org/show_bug.cgi?id=194166
<rdar://problem/47694328>

AC mode is only optional in GTK port. Requested by Zan.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

11:49 AM Changeset in webkit [240936] by dean_johnson@apple.com
  • 2 edits in trunk/Tools

REGRESSION (r237269): webkit-patch what-broke is broken
https://bugs.webkit.org/show_bug.cgi?id=193025

Reviewed by Aakash Jain.

  • Scripts/webkitpy/common/host.py:

(Host.buildbot):
(Host.bugzilla): Renamed to 'buildbot'.

10:59 AM Changeset in webkit [240935] by Alan Coon
  • 7 edits in tags/Safari-608.1.4.1/Source

Versioning.

10:59 AM Changeset in webkit [240934] by Wenson Hsieh
  • 2 edits in trunk/Tools

[iOS] API test WKAttachmentTests.InsertAndRemoveDuplicateAttachment is failing after r240902
https://bugs.webkit.org/show_bug.cgi?id=194207

Reviewed by Tim Horton.

Fix this API test by making it robust against smart paste on iOS. Currently, this test pastes an attachment
element and assumes that the pasted attachment is adjacent to the original one. However, after enabling smart
paste, we now insert an extra space in between. Instead of executing "DeleteBackward" twice to test removing the
attachment elements, we delete backwards once to remove the pasted attachment, and move the selection to the
start and delete forwards to remove the original attachment.

  • TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:

(TestWebKitAPI::TEST):

10:57 AM Changeset in webkit [240933] by Alan Coon
  • 1 copy in tags/Safari-608.1.4.1

New tag.

10:55 AM Changeset in webkit [240932] by Jon Davis
  • 1 edit
    15 adds in trunk/Websites/webkit.org

Add demos for Intersection Observer API
https://bugs.webkit.org/show_bug.cgi?id=194219

Reviewed by Simon Fraser.

  • demos/intersection-observer/lazy-image-load/index.html: Added.
  • demos/intersection-observer/lazy-image-load/scripts.js: Added.

(ImageLoader):
(ImageLoader.prototype.findImages):
(ImageLoader.prototype.smallURLForImage):
(ImageLoader.prototype.largeURLForImage):
(ImageLoader.prototype.setupObserver):
(ImageLoader.prototype.intersectionsChanged):

  • demos/intersection-observer/lazy-image-load/style.css: Added.

(body):
(section):
(header):
(.main):
(.main img):
(.stories):
(.world, .local):
(.world):
(.local):
(.ad):
(.contents):
(.sidebar):
(.links):
(.main-story):
(.main-story img):
(.top-story):
(.top-story img):
(.mid-story img):
(.link-group):
(.link-group img):
(.link-group ul):
(.link-group li):
(footer):
(footer ul):
(footer a):
(.footer-col):

  • demos/intersection-observer/simple/script.js: Added.

(addToLog):
(clearLog):
(stringFromRect):
(intersectedCallback):

  • demos/intersection-observer/simple/simple-observer-iframe.html: Added.
  • demos/intersection-observer/simple/simple-observer-root-margin.html: Added.
  • demos/intersection-observer/simple/simple-observer.html: Added.
  • demos/intersection-observer/simple/styles.css: Added.

(body):
(.results):
(.results button):
(h2):
(#logging):

  • demos/intersection-observer/triggered-animation/index.html: Added.
  • demos/intersection-observer/triggered-animation/script.js: Added.

(AnimationManager):
(AnimationManager.prototype.setupObserver):
(AnimationManager.prototype.intersectionsChanged):

  • demos/intersection-observer/triggered-animation/style.css: Added.

(body):
(p):
(.animation-container h1):
(.animation-container):
(.animation-container .box):
(.slide.box):
(.animation-container.visible > .slide.box):
(.slide.animation-container div:nth-of-type(1)):
(.slide.animation-container div:nth-of-type(2)):
(.slide.animation-container div:nth-of-type(3)):
(.spin):
(.animation-container.visible .spin):
(@keyframes spin):
(to):
(.animation-container.svg):
(.animation-container.svg path):
(.animation-container.svg.visible):
(@keyframes stroke-move):
(.animation-container.svg circle):
(.animation-container.svg.visible circle):
(.animation-container.svg circle:nth-of-type(2)):
(.animation-container.svg circle:nth-of-type(3)):
(.animation-container.svg circle:nth-of-type(4)):
(.animation-container.svg circle:nth-of-type(5)):
(@keyframes circle-scale):

10:51 AM Changeset in webkit [240931] by sihui_liu@apple.com
  • 9 edits in trunk/Source

IndexedDB: leak WebIDBConnectionToServer in layout tests
https://bugs.webkit.org/show_bug.cgi?id=193688
<rdar://problem/47353263>

Reviewed by Geoffrey Garen.

Source/WebCore:

Let IDBConnectionToServer keep a WeakPtr of IDBConnectionToServerDelegate.

  • Modules/indexeddb/client/IDBConnectionToServer.cpp:

(WebCore::IDBClient::IDBConnectionToServer::IDBConnectionToServer):

  • Modules/indexeddb/client/IDBConnectionToServer.h:
  • Modules/indexeddb/client/IDBConnectionToServerDelegate.h:

Source/WebKit:

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::didClose):
(WebKit::NetworkConnectionToWebProcess::establishIDBConnectionToServer):
(WebKit::NetworkConnectionToWebProcess::removeIDBConnectionToServer): Deleted.

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/NetworkConnectionToWebProcess.messages.in:
  • WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:

(WebKit::WebIDBConnectionToServer::~WebIDBConnectionToServer):

10:47 AM Changeset in webkit [240930] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

Make sure to remove the device observer in AVVideoCaptureSource
https://bugs.webkit.org/show_bug.cgi?id=194181
<rdar://problem/47739247>

Reviewed by Eric Carlson.

Make sure to remove the device observer when the observer is destroyed.
To simplify things, add the observer in AVVideoCaptureSource constructor and remove it in the destructor.

Make also sure the session observer is also removed whenever the session is released by AVVideoCaptureSource.

Covered by manual test.

  • platform/mediastream/mac/AVVideoCaptureSource.h:
  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
(WebCore::AVVideoCaptureSource::~AVVideoCaptureSource):
(WebCore::AVVideoCaptureSource::initializeSession):
(WebCore::AVVideoCaptureSource::clearSession):
(WebCore::AVVideoCaptureSource::stopProducingData):
(WebCore::AVVideoCaptureSource::setupSession):

10:19 AM Changeset in webkit [240929] by graouts@webkit.org
  • 2 edits in trunk/Source/WebKit

<rdar://problem/47788802>

Unreviewed build fix.

  • Platform/spi/ios/UIKitSPI.h:
9:37 AM Changeset in webkit [240928] by youenn@apple.com
  • 12 edits
    2 adds in trunk

Capture state should be managed consistently when doing process swapping
https://bugs.webkit.org/show_bug.cgi?id=194122
<rdar://problem/47609293>

Reviewed by Eric Carlson.

Source/WebKit:

When doing PSON, WebPageProxy::resetState is called.
It resets the media state, but does not call the client delegates.
Instead of directly updating the media state, call the routine used to update it so that client delegates are called.

Covered by new API test and layout test.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _mediaCaptureState]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::isPlayingMediaDidChange):
(WebKit::WebPageProxy::updatePlayingMediaDidChange):

  • UIProcess/WebPageProxy.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

(-[GetUserMediaUIDelegate _webView:requestUserMediaAuthorizationForDevices:url:mainFrameURL:decisionHandler:]):
(-[GetUserMediaUIDelegate _webView:checkUserMediaPermissionForURL:mainFrameURL:frameIdentifier:decisionHandler:]):
(-[GetUserMediaUIDelegate _webView:mediaCaptureStateDidChange:]):

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

(WTR::TestRunner::isDoingMediaCapture const):

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

(WTR::TestController::isDoingMediaCapture const):

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

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::isDoingMediaCapture const):

8:22 AM Changeset in webkit [240927] by commit-queue@webkit.org
  • 12 edits
    1 add in trunk/Source

Use a dedicated type instead of int32_t for pointer identifiers
https://bugs.webkit.org/show_bug.cgi?id=194217

Patch by Antoine Quint <Antoine Quint> on 2019-02-04
Reviewed by Antti Koivisto.

Source/WebCore:

  • WebCore.xcodeproj/project.pbxproj:
  • dom/PointerEvent.h:
  • dom/PointerID.h: Added.
  • page/PointerCaptureController.cpp:

(WebCore::PointerCaptureController::setPointerCapture):
(WebCore::PointerCaptureController::releasePointerCapture):
(WebCore::PointerCaptureController::hasPointerCapture):
(WebCore::PointerCaptureController::touchEndedOrWasCancelledForIdentifier):
(WebCore::PointerCaptureController::hasCancelledPointerEventForIdentifier):
(WebCore::PointerCaptureController::cancelPointer):

  • page/PointerCaptureController.h:

Source/WebKit:

  • Scripts/webkit/messages.py:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::cancelPointer):

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

(WebKit::WebPage::cancelPointer):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
8:05 AM Changeset in webkit [240926] by Wenson Hsieh
  • 3 edits in trunk/Source/WebCore

[iOS] Unable to make a selection in jsfiddle.net using arrow keys when requesting desktop site
Followup to https://bugs.webkit.org/show_bug.cgi?id=193758

Reviewed by Daniel Bates.

Put the iOS-specific behavior behind an EditingBehavior check, rather than a compile-time guard. No change in
behavior.

  • editing/EditingBehavior.h:

(WebCore::EditingBehavior::shouldMoveSelectionToEndWhenFocusingTextInput const):

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::setDefaultSelectionAfterFocus):

8:02 AM Changeset in webkit [240925] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

Unreviewed, avoid -Wswitch warnings introduced in r240880
https://bugs.webkit.org/show_bug.cgi?id=193740
<rdar://problem/47527267>

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse):

7:49 AM Changeset in webkit [240924] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Make InlineFormattingContext::collectInlineContent non-recursive.
https://bugs.webkit.org/show_bug.cgi?id=194210

Reviewed by Antti Koivisto.

Use iterative algorithm to collect inline content (and add breaking rules).
This is in preparation for fixing the inline preferred width computation.

  • layout/Verification.cpp:

(WebCore::Layout::resolveForRelativePositionIfNeeded):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::addDetachingRules):
(WebCore::Layout::createAndAppendInlineItem):
(WebCore::Layout::InlineFormattingContext::collectInlineContent const):
(WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const): Deleted.

  • layout/inlineformatting/InlineFormattingContext.h:
7:48 AM Changeset in webkit [240923] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix unused variable warnings introduced in r240912
https://bugs.webkit.org/show_bug.cgi?id=194198
<rdar://problem/47776051>

  • page/FrameView.cpp:

(WebCore::FrameView::setNeedsCompositingConfigurationUpdate):
(WebCore::FrameView::setNeedsCompositingGeometryUpdate):

7:47 AM Changeset in webkit [240922] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[GTK] Allow pinch zoom on touchpad
https://bugs.webkit.org/show_bug.cgi?id=194201

Patch by Alexander Mikhaylenko <exalm7659@gmail.com> on 2019-02-04
Reviewed by Michael Catanzaro.

Enable touchpad events for WebkitWebViewBase, then feed touchpad
pinch events to GestureController.

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseRealize): Added GDK_TOUCHPAD_GESTURE_MASK to event mask.
(webkitWebViewBaseEvent): Added.
(webkit_web_view_base_class_init): Override event vfunc.

7:39 AM Changeset in webkit [240921] by commit-queue@webkit.org
  • 6 edits
    2 adds in trunk

[css-scroll-snap] scroll-snap-align not honored on child with non-visible overflow
https://bugs.webkit.org/show_bug.cgi?id=191816

Patch by Frederic Wang <fwang@igalia.com> on 2019-02-04
Reviewed by Wenson Hsieh.

Source/WebCore:

This patch fixes a bug that prevents children of a scroll container to create snap positions
when they have non-visible overflow. This happens because for such a child, the function
RenderBox::findEnclosingScrollableContainer() will return the child itself rather than the
scroll container. To address that issue, we introduce a new
RenderObject::enclosingScrollableContainerForSnapping() helper function that ensures that
a real RenderBox ancestor is returned.

Test: css3/scroll-snap/scroll-snap-children-with-overflow.html

  • page/scrolling/AxisScrollSnapOffsets.cpp:

(WebCore::updateSnapOffsetsForScrollableArea): Use enclosingScrollableContainerForSnapping()
so that we don't skip children with non-visible overflow.

  • rendering/RenderLayerModelObject.cpp:

(WebCore::RenderLayerModelObject::styleDidChange): Ditto. The new function calls
enclosingBox().

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::enclosingScrollableContainerForSnapping const): Return
the scrollable container of the enclosing box. If it is actually the render object itself
then start the search from the parent box instead.

  • rendering/RenderObject.h: Declare enclosingScrollableContainerForSnapping().

LayoutTests:

Add a test to verify that children with non-visible overflow create snap offsets.

  • css3/scroll-snap/scroll-snap-children-with-overflow-expected.txt: Added.
  • css3/scroll-snap/scroll-snap-children-with-overflow.html: Added.
7:36 AM Changeset in webkit [240920] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

Unreviewed, only force settings.acceleratedCompositingEnabled() to true for Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=194166
<rdar://problem/47694328>

Accelerated compositing is broken for me at least. We're a long way from being able to force
it.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

7:00 AM Changeset in webkit [240919] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

[GTK] Remove last python2 dependency from CMake build process
https://bugs.webkit.org/show_bug.cgi?id=194218

Patch by Abderrahim Kitouni <akitouni@gnome.org> on 2019-02-04
Reviewed by Michael Catanzaro.

  • InspectorGResources.cmake:
4:48 AM Changeset in webkit [240918] by Antti Koivisto
  • 14 edits in trunk/Source

Source/WebCore:
Rename GraphicsLayer and PlatformCALayer scrolling layer type enum values to be less ambiguous
https://bugs.webkit.org/show_bug.cgi?id=194215

Reviewed by Frédéric Wang.

GraphicsLayer::Type::Scrolling -> GraphicsLayer::Type::ScrollContainer
PlatformCALayer::LayerTypeScrollingLayer -> PlatformCALayer::LayerTypeScrollContainerLayer

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::supportsLayerType):

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

(WebCore::GraphicsLayer::supportsLayerType):
(WebCore::GraphicsLayerCA::initialize):

  • platform/graphics/ca/PlatformCALayer.cpp:

(WebCore::operator<<):

  • platform/graphics/ca/PlatformCALayer.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
(WebCore::PlatformCALayerCocoa::commonInit):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateScrollingLayers):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::ensureRootLayer):

Source/WebKit:
Rename GraphicsLayer and PlatformCALayer type enum values to match "scroll container layer" convention
https://bugs.webkit.org/show_bug.cgi?id=194215

Reviewed by Frédéric Wang.

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::drawInContext):

  • UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:

(WebKit::RemoteLayerTreeHost::makeNode):

  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:

(WebKit::RemoteLayerTreeHost::makeNode):

12:15 AM Changeset in webkit [240917] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

DFG's doesGC() is incorrect about the SameValue node's behavior.
https://bugs.webkit.org/show_bug.cgi?id=194211
<rdar://problem/47608913>

Reviewed by Saam Barati.

Only the DoubleRepUse case is guaranteed to not GC. The other case may GC because
it calls operationSameValue() which may allocate memory for resolving ropes.

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

Note: See TracTimeline for information about the timeline view.