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

Timeline



Aug 23, 2019:

8:31 PM Changeset in webkit [249080] by Simon Fraser
  • 5 edits in trunk/Source/WebCore

RenderLayerModelObject should not call private RenderLayer functions
https://bugs.webkit.org/show_bug.cgi?id=201111

Reviewed by Zalan Bujtas.

Make RenderLayerModelObject no longer a friend class of RenderLayer, giving it a public
willRemoveChildWithBlendMode() function to call. Also make the UpdateLayerPositionsFlag
enum private, providing a updateLayerPositionsAfterStyleChange() for RenderLayerModelObject,
and changing the arguments of updateLayerPositionsAfterLayout() for FrameView.

No behavior change.

  • page/FrameView.cpp:

(WebCore::FrameView::didLayout):
(WebCore::updateLayerPositionFlags): Deleted.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::updateLayerPositionsAfterStyleChange):
(WebCore::RenderLayer::updateLayerPositionsAfterLayout):
(WebCore::RenderLayer::willRemoveChildWithBlendMode):

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

(WebCore::RenderLayerModelObject::styleDidChange):

7:22 PM Changeset in webkit [249079] by rniwa@webkit.org
  • 6 edits
    2 adds in trunk

Implement StaticRange constructor
https://bugs.webkit.org/show_bug.cgi?id=201055

Reviewed by Wenson Hsieh.

LayoutTests/imported/w3c:

Added a test from https://github.com/web-platform-tests/wpt/pull/18619
with my review comment addressed.

  • web-platform-tests/dom/interfaces-expected.txt: Rebaselined.
  • web-platform-tests/dom/ranges/StaticRange-constructor-expected.txt: Added.
  • web-platform-tests/dom/ranges/StaticRange-constructor.html: Added.

Source/WebCore:

Added the constructor to StaticRange per https://github.com/whatwg/dom/pull/778.

Test: imported/w3c/web-platform-tests/dom/ranges/StaticRange-constructor.html

  • dom/StaticRange.cpp:

(WebCore::isDocumentTypeOrAttr):
(WebCore::StaticRange::create):

  • dom/StaticRange.h:
  • dom/StaticRange.idl:
5:46 PM Changeset in webkit [249078] by Devin Rousso
  • 10 edits in trunk

Web Inspector: create additional command line api functions for other console methods
https://bugs.webkit.org/show_bug.cgi?id=200971

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

Expose all console.* functions in the command line API, since they're all already able to
be referenced via the console object.

Provide a simpler interface for other injected scripts to modify the command line API.

  • inspector/InjectedScriptModule.cpp:

(Inspector::InjectedScriptModule::ensureInjected):

  • inspector/InjectedScriptSource.js:

(InjectedScript.prototype.inspectObject):
(InjectedScript.prototype.addCommandLineAPIGetter): Added.
(InjectedScript.prototype.addCommandLineAPIMethod): Added.
(InjectedScript.prototype.hasInjectedModule): Added.
(InjectedScript.prototype.injectModule):
(InjectedScript.prototype._evaluateOn):
(InjectedScript.CommandLineAPI): Added.
(InjectedScript.prototype.module): Deleted.
(InjectedScript.prototype._savedResult): Deleted.
(bind): Deleted.
(BasicCommandLineAPI): Deleted.
(clear): Deleted.
(table): Deleted.
(profile): Deleted.
(profileEnd): Deleted.
(keys): Deleted.
(values): Deleted.
(queryInstances): Deleted.
(queryObjects): Deleted.
(queryHolders): Deleted.

Source/WebCore:

Expose all console.* functions in the command line API, since they're all already able to
be referenced via the console object.

Provide a simpler interface for other injected scripts to modify the command line API.

  • inspector/CommandLineAPIModuleSource.js:

(injectedScript._inspectObject): Added.
(normalizeEventTypes): Added.
(logEvent): Added.
(canQuerySelectorOnNode): Added.
(bind): Deleted.
(value): Deleted.
(this.method.toString): Deleted.
(CommandLineAPI): Deleted.
(CommandLineAPIImpl): Deleted.
(CommandLineAPIImpl.prototype): Deleted.
(CommandLineAPIImpl.prototype._canQuerySelectorOnNode): Deleted.
(CommandLineAPIImpl.prototype.x): Deleted.
(CommandLineAPIImpl.prototype.dir): Deleted.
(CommandLineAPIImpl.prototype.dirxml): Deleted.
(CommandLineAPIImpl.prototype.keys): Deleted.
(CommandLineAPIImpl.prototype.values): Deleted.
(CommandLineAPIImpl.prototype.profile): Deleted.
(CommandLineAPIImpl.prototype.profileEnd): Deleted.
(CommandLineAPIImpl.prototype.table): Deleted.
(CommandLineAPIImpl.prototype.screenshot): Deleted.
(CommandLineAPIImpl.prototype.monitorEvents): Deleted.
(CommandLineAPIImpl.prototype.unmonitorEvents): Deleted.
(CommandLineAPIImpl.prototype.inspect): Deleted.
(CommandLineAPIImpl.prototype.queryInstances): Deleted.
(CommandLineAPIImpl.prototype.queryObjects): Deleted.
(CommandLineAPIImpl.prototype.queryHolders): Deleted.
(CommandLineAPIImpl.prototype.copy): Deleted.
(CommandLineAPIImpl.prototype.clear): Deleted.
(CommandLineAPIImpl.prototype.getEventListeners): Deleted.
(CommandLineAPIImpl.prototype._inspectedObject): Deleted.
(CommandLineAPIImpl.prototype._normalizeEventTypes): Deleted.
(CommandLineAPIImpl.prototype._logEvent): Deleted.
(CommandLineAPIImpl.prototype._inspect): Deleted.

Source/WebInspectorUI:

Expose all console.* functions in the command line API, since they're all already able to
be referenced via the console object.

Provide a simpler interface for other injected scripts to modify the command line API.

  • UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:

(WI.JavaScriptRuntimeCompletionProvider.prototype.get _commandLineAPIKeys): Added.
(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.updateLastPropertyNames):
(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedPropertyNames):

LayoutTests:

  • http/tests/inspector/dom/cross-domain-inspected-node-access-expected.txt:
  • inspector/console/command-line-api-expected.txt:
5:24 PM Changeset in webkit [249077] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Crash under TimerBase::setNextFireTime() in the NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=201097
<rdar://problem/54658339>

Reviewed by Ryosuke Niwa.

NetworkStateNotifier is a WebCore/platform class used by both WebKitLegacy and WebKit2 in the NetworkProcess.
On iOS, the lambda in the implementation of NetworkStateNotifier::startObserving() may get called by the
underlying framework on a non-main thread and we therefore want to go back to the main thread before calling
NetworkStateNotifier::singleton().updateStateSoon(). This is important because updateStateSoon() will schedule
a WebCore::Timer. The issue is that the code was using WebThreadRun() to go back the the main thread. While
this works fine in iOS WK1, it does not do what we want in WebKit2 in the network process. Indeed, before there
is no WebThread in the network process, WebThreadRun() will simply run the block on whatever thread we're one.
This would lead to crashes when trying to schedule the Timer in updateStateSoon(). To address the issue, we now
use callOnMainThread().

  • platform/network/ios/NetworkStateNotifierIOS.mm:

(WebCore::NetworkStateNotifier::startObserving):

5:20 PM Changeset in webkit [249076] by rniwa@webkit.org
  • 3 edits in trunk/Source/WebCore

REGRESSION (r248807): Objects stored in ElementRareData are leaked
https://bugs.webkit.org/show_bug.cgi?id=200954

Reviewed by David Kilzer.

NodeRareData didn't have a virtual destructor. As a result, member variables
of ElementRareData did not get destructed properly.

  • dom/NodeRareData.cpp:
  • dom/NodeRareData.h:

(WebCore::NodeRareData::~NodeRareData):

4:08 PM Changeset in webkit [249075] by Tadeu Zagallo
  • 23 edits
    2 deletes in trunk

Remove MaximalFlushInsertionPhase
https://bugs.webkit.org/show_bug.cgi?id=201036

Reviewed by Saam Barati.

JSTests:

Remove all the references to maximal flush

  • stress/arith-ceil-on-various-types.js:

(checkCompileCountForUselessNegativeZero):

  • stress/arith-floor-on-various-types.js:

(checkCompileCountForUselessNegativeZero):

  • stress/arith-negate-on-various-types.js:

(checkCompileCountForUselessNegativeZero):

  • stress/arith-round-on-various-types.js:

(checkCompileCountForUselessNegativeZero):

  • stress/arith-trunc-on-various-types.js:

(checkCompileCountForUselessNegativeZero):

  • stress/dfg-compare-eq-via-nonSpeculativeNonPeepholeCompareNullOrUndefined.js:
  • stress/has-indexed-property-should-accept-non-int32.js:
  • stress/has-indexed-property-with-worsening-array-mode.js:
  • stress/known-int32-cant-be-used-across-bytecode-boundary.js:
  • stress/read-dead-bytecode-locals-in-must-handle-values1.js:
  • stress/read-dead-bytecode-locals-in-must-handle-values2.js:
  • stress/rest-parameter-many-arguments.js:
  • stress/set-argument-maybe-maximal-flush-should-not-extend-liveness-2.js:
  • stress/set-argument-maybe-maximal-flush-should-not-extend-liveness.js:
  • stress/to-index-string-should-not-assume-incoming-value-is-uint32.js:

Source/JavaScriptCore:

Maximal flush has found too many false positives recently, so we decided it's finally time
to remove it instead of hacking it to fix the most recent false positive.

The most recent false positive was caused by a LoadVarargs followed by a SetArgumentDefinitely
for the argument count that was being flushed in a much later block. Now, since that block was
the head of a loop, and there was a SetLocal in the same block to the same variable, this
generated a Phi of both values, which then led to the unification of their VariableAccessData
in the unification phase. This caused AI to assign the Int52 type to argument count, which
broke the AI’s assumption that it should always be an Int32.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleVarargsInlining):

  • dfg/DFGMaximalFlushInsertionPhase.cpp: Removed.
  • dfg/DFGMaximalFlushInsertionPhase.h: Removed.
  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::compileInThreadImpl):

  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

  • runtime/Options.h:
4:00 PM Changeset in webkit [249074] by Wenson Hsieh
  • 6 edits
    2 adds in trunk

[iOS] [WebKit2] Tapping on the “I’m” text suggestion after typing “i’” does nothing
https://bugs.webkit.org/show_bug.cgi?id=201085
<rdar://problem/53056118>

Reviewed by Tim Horton.

Source/WebCore:

Exposes an existing quote folding function as a helper on TextIterator, and also adjusts foldQuoteMarks to take
a const String& rather than a String. See WebKit ChangeLog for more details.

  • editing/TextIterator.cpp:

(WebCore::foldQuoteMarks):
(WebCore::SearchBuffer::SearchBuffer):

  • editing/TextIterator.h:

Source/WebKit:

Currently, logic in applyAutocorrectionInternal only selects the range to autocorrect if the text of the range
matches the string to replace (delivered to us from UIKit). In the case of changing "I’" to "I’m", the string to
replace is "I'" (with a straight quote rather than an apostrophe), even though the DOM contains an apostrophe.

This is because kbd believes that the document context contains straight quotes (rather than apostrophes). For
native text views, this works out because UIKit uses relative UITextPositions to determine the replacement
range rather than by checking against the contents of the document. However, WKWebView does not have the ability
to synchronously compute and reason about arbitrary UITextPositions relative to the selection, so we instead
search for the string near the current selection when applying autocorrections.

Of course, this doesn't work in this scenario because the replacement string contains a straight quote, yet the
text node contains an apostrophe, so we bail and don't end up replacing any text. To address this, we repurpose
TextIterator helpers currently used to allow find-in-page to match straight quotes against apostrophes; instead
of matching the replacement string exactly, we instead match the quote-folded versions of these strings when
finding the range to replace.

Test: fast/events/ios/autocorrect-with-apostrophe.html

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::applyAutocorrectionInternal):

LayoutTests:

Add a new layout test to verify that "I’" can be autocorrected to "I’m".

  • fast/events/ios/autocorrect-with-apostrophe-expected.txt: Added.
  • fast/events/ios/autocorrect-with-apostrophe.html: Added.
3:56 PM Changeset in webkit [249073] by Ross Kirsling
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed WinCairo build fix following r249058.

  • API/tests/testapi.cpp:

(TestAPI::callFunction):
WinCairo chokes on JSValueRef args[sizeof...(arguments)] when there are no arguments, but AppleWin does not...
MSVC must have changed somehow.

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

REGRESSION (r248974): fast/events/ios/key-command-delete-to-end-of-paragraph.html is timing out on iOS
https://bugs.webkit.org/show_bug.cgi?id=201091
<rdar://problem/54647731>

Reviewed by Megan Gardner.

  • fast/events/ios/key-command-delete-to-end-of-paragraph.html:

The test as-written doesn't actually wait for the tap to complete before
continuing on with the test - it starts immediately when the focus event
fires. This results in the selection being changed by the single click
handler *after* focusing the field.

Rewrite the test to await completion of the tap before moving forward
instead of waiting for focus.

3:17 PM Changeset in webkit [249071] by Kocsen Chung
  • 1 copy in tags/Safari-608.2.9

Tag Safari-608.2.9.

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

Remove IDBDatabaseIdentifier::m_mainFrameOrigin
https://bugs.webkit.org/show_bug.cgi?id=201078

Reviewed by Darin Adler.

No change of behavior.

  • Modules/indexeddb/IDBDatabaseIdentifier.h:
2:33 PM Changeset in webkit [249069] by Justin Michaud
  • 4 edits in trunk

[WASM-References] Do not overwrite argument registers in jsCallEntrypoint
https://bugs.webkit.org/show_bug.cgi?id=200952

Reviewed by Saam Barati.

JSTests:

  • wasm/references/func_ref.js:

(assert.throws):

Source/JavaScriptCore:

The c call that we emitted was incorrect. If we had an int argument that was supposed to be placed in GPR0 by this loop,
we would clobber it while making the call (among many other possible registers). To fix this, we just inline the call
to isWebassemblyHostFunction.

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::WebAssemblyFunction::jsCallEntrypointSlow):

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

Unreviewed, build fix after r249059

Source/WebKit:

  • UIProcess/WebAuthentication/Cocoa/NfcConnection.mm:

(WebKit::NfcConnection::NfcConnection):
Remove the HAVE() macro.

Source/WTF:

  • wtf/Platform.h:

Make HAVE_NEAR_FIELD available only on iOS 13+ and macOS Catalina+.

2:06 PM Changeset in webkit [249067] by aakash_jain@apple.com
  • 4 edits in trunk/Tools

Increase log level for watchlist result
https://bugs.webkit.org/show_bug.cgi?id=201081

Reviewed by Jonathan Bedard.

  • Scripts/webkitpy/tool/steps/applywatchlist.py: Increased log level.
  • Scripts/webkitpy/tool/steps/applywatchlist_unittest.py: Updated unit-tests.
  • Scripts/webkitpy/tool/commands/applywatchlistlocal_unittest.py: Ditto.
1:58 PM Changeset in webkit [249066] by Chris Dumez
  • 57 edits
    1 copy
    7 moves
    2 adds
    1 delete in trunk

[geolocation] Rename interfaces and remove [NoInterfaceObject]
https://bugs.webkit.org/show_bug.cgi?id=200885

Reviewed by Alex Christensen.

Source/WebCore:

Rename Geolocation interfaces and expose them on the global Window object to match the
latest specification:

Test: fast/dom/Geolocation/exposed-geolocation-interfaces.html

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Headers.cmake:
  • Modules/geolocation/GeoNotifier.cpp:

(WebCore::GeoNotifier::setFatalError):
(WebCore::GeoNotifier::runSuccessCallback):
(WebCore::GeoNotifier::runErrorCallback):
(WebCore::GeoNotifier::timerFired):

  • Modules/geolocation/GeoNotifier.h:
  • Modules/geolocation/Geolocation.cpp:

(WebCore::createGeolocationPosition):
(WebCore::createGeolocationPositionError):
(WebCore::Geolocation::lastPosition):
(WebCore::Geolocation::startRequest):
(WebCore::Geolocation::requestUsesCachedPosition):
(WebCore::Geolocation::makeCachedPositionCallbacks):
(WebCore::Geolocation::haveSuitableCachedPosition):
(WebCore::Geolocation::setIsAllowed):
(WebCore::Geolocation::sendError):
(WebCore::Geolocation::sendPosition):
(WebCore::Geolocation::cancelRequests):
(WebCore::Geolocation::handleError):
(WebCore::Geolocation::makeSuccessCallbacks):
(WebCore::Geolocation::positionChanged):
(WebCore::Geolocation::setError):
(WebCore::Geolocation::handlePendingPermissionNotifiers):

  • Modules/geolocation/Geolocation.h:
  • Modules/geolocation/Geolocation.idl:
  • Modules/geolocation/GeolocationClient.h:
  • Modules/geolocation/GeolocationController.cpp:

(WebCore::GeolocationController::positionChanged):
(WebCore::GeolocationController::lastPosition):

  • Modules/geolocation/GeolocationController.h:
  • Modules/geolocation/GeolocationCoordinates.cpp: Renamed from Source/WebCore/Modules/geolocation/Coordinates.cpp.

(WebCore::GeolocationCoordinates::GeolocationCoordinates):

  • Modules/geolocation/GeolocationCoordinates.h: Renamed from Source/WebCore/Modules/geolocation/Coordinates.h.

(WebCore::GeolocationCoordinates::create):
(WebCore::GeolocationCoordinates::isolatedCopy const):

  • Modules/geolocation/GeolocationCoordinates.idl: Renamed from Source/WebCore/Modules/geolocation/Coordinates.idl.
  • Modules/geolocation/GeolocationPosition.h:

(WebCore::GeolocationPosition::create):
(WebCore::GeolocationPosition::isolatedCopy const):
(WebCore::GeolocationPosition::timestamp const):
(WebCore::GeolocationPosition::coords const):
(WebCore::GeolocationPosition::GeolocationPosition):

  • Modules/geolocation/GeolocationPosition.idl: Renamed from Source/WebCore/Modules/geolocation/Geoposition.idl.
  • Modules/geolocation/GeolocationPositionData.h: Copied from Source/WebCore/Modules/geolocation/GeolocationPosition.h.

(WebCore::GeolocationPositionData::GeolocationPositionData):
(WebCore::GeolocationPositionData::encode const):
(WebCore::GeolocationPositionData::decode):
(WebCore::GeolocationPositionData::isValid const):

  • Modules/geolocation/GeolocationPositionError.h: Renamed from Source/WebCore/Modules/geolocation/PositionError.h.

(WebCore::GeolocationPositionError::create):
(WebCore::GeolocationPositionError::GeolocationPositionError):

  • Modules/geolocation/GeolocationPositionError.idl: Renamed from Source/WebCore/Modules/geolocation/PositionError.idl.
  • Modules/geolocation/Geoposition.h: Removed.
  • Modules/geolocation/PositionCallback.h:
  • Modules/geolocation/PositionCallback.idl:
  • Modules/geolocation/PositionErrorCallback.h:
  • Modules/geolocation/PositionErrorCallback.idl:
  • Modules/geolocation/ios/GeolocationPositionDataIOS.mm: Renamed from Source/WebCore/Modules/geolocation/ios/GeolocationPositionIOS.mm.

(WebCore::GeolocationPositionData::GeolocationPositionData):

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/mock/GeolocationClientMock.cpp:

(WebCore::GeolocationClientMock::setPosition):
(WebCore::GeolocationClientMock::lastPosition):

  • platform/mock/GeolocationClientMock.h:

Source/WebKit:

  • Shared/WebGeolocationPosition.cpp:

(WebKit::WebGeolocationPosition::create):

  • Shared/WebGeolocationPosition.h:

(WebKit::WebGeolocationPosition::corePosition const):
(WebKit::WebGeolocationPosition::WebGeolocationPosition):

  • UIProcess/API/C/WKGeolocationPosition.cpp:

(WKGeolocationPositionCreate_c):

  • UIProcess/WebGeolocationManagerProxy.h:

(WebKit::WebGeolocationManagerProxy::lastPosition const):

  • UIProcess/ios/WKGeolocationProviderIOS.mm:

(-[WKLegacyCoreLocationProvider positionChanged:]):

  • WebProcess/Geolocation/WebGeolocationManager.cpp:

(WebKit::WebGeolocationManager::didChangePosition):

  • WebProcess/Geolocation/WebGeolocationManager.h:
  • WebProcess/Geolocation/WebGeolocationManager.messages.in:
  • WebProcess/WebCoreSupport/WebGeolocationClient.cpp:

(WebKit::WebGeolocationClient::lastPosition):

  • WebProcess/WebCoreSupport/WebGeolocationClient.h:

Source/WebKitLegacy/ios:

  • Misc/WebGeolocationCoreLocationProvider.h:
  • Misc/WebGeolocationCoreLocationProvider.mm:

(-[WebGeolocationCoreLocationProvider sendLocation:]):

  • Misc/WebGeolocationProviderIOS.mm:

(-[_WebCoreLocationUpdateThreadingProxy positionChanged:]):

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebGeolocationClient.h:
  • WebCoreSupport/WebGeolocationClient.mm:

(WebGeolocationClient::lastPosition):

  • WebView/WebGeolocationPosition.mm:

(-[WebGeolocationPositionInternal initWithCoreGeolocationPosition:]):
(core):
(-[WebGeolocationPosition initWithTimestamp:latitude:longitude:accuracy:]):
(-[WebGeolocationPosition initWithGeolocationPosition:]):

  • WebView/WebGeolocationPositionInternal.h:

Tools:

  • DumpRenderTree/mac/TestRunnerMac.mm:

(TestRunner::setMockGeolocationPosition):

LayoutTests:

Add layout test coverage.

  • fast/dom/Geolocation/exposed-geolocation-interfaces-expected.txt: Added.
  • fast/dom/Geolocation/exposed-geolocation-interfaces.html: Added.
  • fast/dom/Geolocation/position-string-expected.txt:
  • fast/dom/Geolocation/position-string.html:
1:55 PM Changeset in webkit [249065] by mark.lam@apple.com
  • 6 edits in trunk/Source/bmalloc

Undo disabling of IsoHeaps when Gigacage is off.
https://bugs.webkit.org/show_bug.cgi?id=201061
<rdar://problem/54622500>

Reviewed by Saam Barati and Michael Saboff.

  • CMakeLists.txt:
  • bmalloc.xcodeproj/project.pbxproj:
  • bmalloc/IsoTLS.cpp:

(bmalloc::IsoTLS::determineMallocFallbackState):

  • bmalloc/PerThread.cpp: Removed.
  • bmalloc/PerThread.h:
1:31 PM Changeset in webkit [249064] by Chris Dumez
  • 5 edits in trunk/Source/WTF

Regression(r248533) Assertion hit in isMainThread() for some clients using WTF because the main thread is not initialized
https://bugs.webkit.org/show_bug.cgi?id=201083

Reviewed by Alex Christensen.

An assertion is hit in isMainThread() for some clients using WTF because the main thread is not initialized, since r248533.
Clients can work around this by calling WTF::initializeMainThread() before using WTF but it seems unfortunate to force them
to do so. I propose we disable the assertion until the main thread is initialized.

  • wtf/MainThread.h:
  • wtf/RefCounted.h:

(WTF::RefCountedBase::RefCountedBase):
(WTF::RefCountedBase::applyRefDerefThreadingCheck const):

  • wtf/cocoa/MainThreadCocoa.mm:

(WTF::isMainThreadInitialized):

  • wtf/generic/MainThreadGeneric.cpp:

(WTF::isMainThreadInitialized):

1:23 PM Changeset in webkit [249063] by Ryan Haddad
  • 34 edits
    5 deletes in trunk

Unreviewed, rolling out r249001.

Caused one layout test to fail on all configurations and
another to time out on Catalina / iOS 13.

Reverted changeset:

"Add a WebsiteDataStore delegate to handle
AuthenticationChallenge that do not come from pages"
https://bugs.webkit.org/show_bug.cgi?id=196870
https://trac.webkit.org/changeset/249001

12:35 PM Changeset in webkit [249062] by BJ Burg
  • 5 edits in trunk/Source/WebKit

REGRESSION(r248713): WebDriver commands which target the implicit main frame now hit an ASSERT
https://bugs.webkit.org/show_bug.cgi?id=200793
<rdar://problem/54516988>

Reviewed by Chris Dumez.

SimulatedInputDispatcher and its callers need to support Optional<FrameIdentifier>
and WTF::nullopt as an encoding for the implicit main frame.

  • UIProcess/Automation/SimulatedInputDispatcher.h:
  • UIProcess/Automation/SimulatedInputDispatcher.cpp:

(WebKit::SimulatedInputDispatcher::resolveLocation):
(WebKit::SimulatedInputDispatcher::run):

  • UIProcess/Automation/WebAutomationSession.h:
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::viewportInViewCenterPointOfElement):
(WebKit::WebAutomationSession::performInteractionSequence):
(WebKit::WebAutomationSession::cancelInteractionSequence):

12:25 PM Changeset in webkit [249061] by Jonathan Bedard
  • 3 edits in trunk/Tools

results.webkit.org: Escape html in changelog
https://bugs.webkit.org/show_bug.cgi?id=201025
<rdar://problem/54564837>

Reviewed by Darin Adler.

  • resultsdbpy/resultsdbpy/view/commit_view.py:

(CommitView.commit): Output a dictionary instead of a JSON encoded string.

  • resultsdbpy/resultsdbpy/view/templates/commit.html: Unpack commits dictionary

directly into a JavaScript dictionary.

12:21 PM Changeset in webkit [249060] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

REGRESSION: fast/events/pointer/ios/drag-gives-pointerdown-pointermove-pointerup.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=201075
<rdar://problem/54491246>

Patch by Antoine Quint <Antoine Quint> on 2019-08-23
Reviewed by Daniel Bates.

This test was written very early on in the process of implementing Pointer Events and assumed events would keep
firing when scrolling occured. We need to add "touch-action: none" to ensure we get pointermove and pointerup
events. We also need to ensure that the interaction occurs over content otherwise events won't fire. Finally, we
pretty up the test a bit.

  • fast/events/pointer/ios/drag-gives-pointerdown-pointermove-pointerup-expected.txt:
  • fast/events/pointer/ios/drag-gives-pointerdown-pointermove-pointerup.html:
11:56 AM Changeset in webkit [249059] by jiewen_tan@apple.com
  • 31 edits
    9 copies
    16 adds in trunk

[WebAuthn] Support NFC authenticators for iOS
https://bugs.webkit.org/show_bug.cgi?id=188624
<rdar://problem/43354214>

Reviewed by Chris Dumez.

Source/WebCore:

Tests: http/wpt/webauthn/ctap-nfc-failure.https.html

http/wpt/webauthn/public-key-credential-create-failure-nfc.https.html
http/wpt/webauthn/public-key-credential-create-success-nfc.https.html
http/wpt/webauthn/public-key-credential-get-failure-nfc.https.html
http/wpt/webauthn/public-key-credential-get-success-nfc.https.html

  • Modules/webauthn/apdu/ApduResponse.h:

Adds a new method to support moving m_data.

  • Modules/webauthn/fido/FidoConstants.h:

Adds constants for NFC applet selection.

Source/WebKit:

This patch implements support for NFC authenticators including both FIDO2 and U2F ones. It utilizes a private
framework called NearField instead of CoreNFC to be able to supply a custom UI later if necessary.

The patch follows almost the same flow as previous HID and Local authenticator support.
1) Discovery is via NfcService which will invoke NFHardwareManager to start a generic NFC reader session.
2) Once a reader session is established, a NfcConnection is created to start the polling and register the WKNFReaderSessionDelegate
to wait for 'didDetectTags'.
3) When tags are detected, NfcConnection will determine if it meets our requriements: { type, connectability, fido applet availability }.
The first tag that meets all requirement will then be returned for WebAuthn operations.
4) The first WebAuthn operation is to send authenticatorGetInfo command to determine the supported protocol, and then initialize corresponding
authenticators. Noted, the sending/receiving of this command is now abstracted into FidoService which will be shared across HidService and NfcService.
5) From then, the actual WebAuthn request, either makeCredential or getAssertion will be sent.

For testing, this patch follows the same flow as well.
1) MockNfcService overrides NfcService to mock the behavior of NFC Tags discovery.
2) The same class also swizzles methods from NFReaderSession to mock tag connection and communication.

  • Platform/spi/Cocoa/NearFieldSPI.h: Added.
  • Sources.txt:
  • SourcesCocoa.txt:
  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreSetWebAuthenticationMockConfiguration):

  • UIProcess/WebAuthentication/AuthenticatorManager.cpp:

(WebKit::AuthenticatorManagerInternal::collectTransports):

  • UIProcess/WebAuthentication/AuthenticatorTransportService.cpp:

(WebKit::AuthenticatorTransportService::create):
(WebKit::AuthenticatorTransportService::createMock):

  • UIProcess/WebAuthentication/Cocoa/HidService.h:
  • UIProcess/WebAuthentication/Cocoa/HidService.mm:

(WebKit::HidService::HidService):
(WebKit::HidService::deviceAdded):
(WebKit::HidService::continueAddDeviceAfterGetInfo): Deleted.

  • UIProcess/WebAuthentication/Cocoa/NearFieldSoftLink.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
  • UIProcess/WebAuthentication/Cocoa/NearFieldSoftLink.mm: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
  • UIProcess/WebAuthentication/Cocoa/NfcConnection.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
  • UIProcess/WebAuthentication/Cocoa/NfcConnection.mm: Added.

(WebKit::fido::compareVersion):
(WebKit::NfcConnection::NfcConnection):
(WebKit::NfcConnection::~NfcConnection):
(WebKit::NfcConnection::transact const):
(WebKit::NfcConnection::didDetectTags const):

  • UIProcess/WebAuthentication/Cocoa/NfcService.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
  • UIProcess/WebAuthentication/Cocoa/NfcService.mm: Added.

(WebKit::NfcService::NfcService):
(WebKit::NfcService::~NfcService):
(WebKit::NfcService::didConnectTag):
(WebKit::NfcService::startDiscoveryInternal):
(WebKit::NfcService::platformStartDiscovery):

  • UIProcess/WebAuthentication/Cocoa/WKNFReaderSessionDelegate.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
  • UIProcess/WebAuthentication/Cocoa/WKNFReaderSessionDelegate.mm: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.

(-[WKNFReaderSessionDelegate initWithConnection:]):
(-[WKNFReaderSessionDelegate readerSession:didDetectTags:]):

  • UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:

(WebKit::MockHidConnection::send):
(WebKit::MockHidConnection::registerDataReceivedCallbackInternal):
(WebKit::MockHidConnection::parseRequest):
(WebKit::MockHidConnection::feedReports):
(WebKit::MockHidConnection::shouldContinueFeedReports):

  • UIProcess/WebAuthentication/Mock/MockNfcService.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
  • UIProcess/WebAuthentication/Mock/MockNfcService.mm: Added.

(-[WKMockNFTag type]):
(-[WKMockNFTag initWithNFTag:]):
(-[WKMockNFTag description]):
(-[WKMockNFTag isEqualToNFTag:]):
(-[WKMockNFTag initWithType:]):
(WebKit::MockNfcService::MockNfcService):
(WebKit::MockNfcService::transceive):
(WebKit::MockNfcService::platformStartDiscovery):
(WebKit::MockNfcService::detectTags const):

  • UIProcess/WebAuthentication/Mock/MockWebAuthenticationConfiguration.h:
  • UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp:
  • UIProcess/WebAuthentication/fido/CtapAuthenticator.h:
  • UIProcess/WebAuthentication/fido/CtapNfcDriver.cpp: Added.

(WebKit::CtapNfcDriver::CtapNfcDriver):
(WebKit::CtapNfcDriver::transact):
(WebKit::CtapNfcDriver::respondAsync const):

  • UIProcess/WebAuthentication/fido/CtapNfcDriver.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
  • UIProcess/WebAuthentication/fido/FidoService.cpp: Added.

(WebKit::FidoService::FidoService):
(WebKit::FidoService::getInfo):
(WebKit::FidoService::continueAfterGetInfo):

  • UIProcess/WebAuthentication/fido/FidoService.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
  • UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp:
  • UIProcess/WebAuthentication/fido/U2fAuthenticator.h:
  • UIProcess/ios/WebPageProxyIOS.mm:
  • WebKit.xcodeproj/project.pbxproj:

Source/WTF:

  • wtf/Platform.h:

Add a feature flag for NearField.

Tools:

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setWebAuthenticationMockConfiguration):
Setup NFC mock testing configuration.

LayoutTests:

  • http/wpt/webauthn/ctap-nfc-failure.https-expected.txt: Added.
  • http/wpt/webauthn/ctap-nfc-failure.https.html: Added.
  • http/wpt/webauthn/public-key-credential-create-failure-nfc.https-expected.txt: Added.
  • http/wpt/webauthn/public-key-credential-create-failure-nfc.https.html: Added.
  • http/wpt/webauthn/public-key-credential-create-success-hid.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-success-hid.https.html:

This patch replaces the "local" keyword with "hid".

  • http/wpt/webauthn/public-key-credential-create-success-nfc.https-expected.txt: Added.
  • http/wpt/webauthn/public-key-credential-create-success-nfc.https.html: Added.
  • http/wpt/webauthn/public-key-credential-get-failure-nfc.https-expected.txt: Added.
  • http/wpt/webauthn/public-key-credential-get-failure-nfc.https.html: Added.
  • http/wpt/webauthn/public-key-credential-get-success-nfc.https-expected.txt: Added.
  • http/wpt/webauthn/public-key-credential-get-success-nfc.https.html: Added.
  • http/wpt/webauthn/resources/util.js:
  • platform/ios-simulator-wk2/TestExpectations:

Skip NFC tests for simulators.

11:51 AM Changeset in webkit [249058] by Ross Kirsling
  • 11 edits in trunk/Source

JSC should have public API for unhandled promise rejections
https://bugs.webkit.org/show_bug.cgi?id=197172

Reviewed by Keith Miller.

Source/JavaScriptCore:

This patch makes it possible to register a unhandled promise rejection callback via the JSC API.
Since there is no event loop in such an environment, this callback fires off of the microtask queue.
The callback receives the promise and rejection reason as arguments and its return value is ignored.

  • API/JSContextRef.cpp:

(JSGlobalContextSetUnhandledRejectionCallback): Added.

  • API/JSContextRefPrivate.h:

Add new C++ API call.

  • API/tests/testapi.cpp:

(TestAPI::promiseResolveTrue): Clean up test output.
(TestAPI::promiseRejectTrue): Clean up test output.
(TestAPI::promiseUnhandledRejection): Added.
(TestAPI::promiseUnhandledRejectionFromUnhandledRejectionCallback): Added.
(TestAPI::promiseEarlyHandledRejections): Added.
(testCAPIViaCpp):
Add new C++ API test.

  • jsc.cpp:

(GlobalObject::finishCreation):
(functionSetUnhandledRejectionCallback): Added.
Add corresponding global to JSC shell.

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::setUnhandledRejectionCallback): Added.
(JSC::JSGlobalObject::unhandledRejectionCallback const): Added.
Keep a strong reference to the callback.

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncHostPromiseRejectionTracker):
Add default behavior.

  • runtime/VM.cpp:

(JSC::VM::callPromiseRejectionCallback): Added.
(JSC::VM::didExhaustMicrotaskQueue): Added.
(JSC::VM::promiseRejected): Added.
(JSC::VM::drainMicrotasks):
When microtask queue is exhausted, deal with any pending unhandled rejections
(in a manner based on RejectedPromiseTracker's reportUnhandledRejections),
then make sure this didn't cause any new microtasks to be added to the queue.

  • runtime/VM.h:

Store unhandled rejections.
(This collection will always be empty in the presence of WebCore.)

Source/WebCore:

  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::JSDOMGlobalObject::promiseRejectionTracker):
Move JSInternalPromise early-out to JSC side.

11:29 AM Changeset in webkit [249057] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: transparency checkerboard is too bright in dark mode
https://bugs.webkit.org/show_bug.cgi?id=201067

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/Main.css:

(@media (prefers-color-scheme: dark) :matches(img, canvas).show-grid):

  • UserInterface/Views/ConsoleMessageView.css:

(.console-message-body > .show-grid):

11:14 AM Changeset in webkit [249056] by commit-queue@webkit.org
  • 9 edits in trunk/Source

Support ITP on a per-session basis (198923)
https://bugs.webkit.org/show_bug.cgi?id=198923

Patch by Kate Cheney <Kate Cheney> on 2019-08-23
Reviewed by Chris Dumez.

Source/WebCore:

This patch updated the data structure used to collect resource load
statistics in order to support ITP data collection on a per session
basis. Each sessionID is stored as a key-value pair with its own map
of ResourceLoadStatistics.

It also updated the statisticsForURL function call to perform lookups
of URL data based on sessionID.

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::setStatisticsUpdatedCallback):
(WebCore::ResourceLoadObserver::shouldLog const):
(WebCore::ResourceLoadObserver::logSubresourceLoading):
(WebCore::ResourceLoadObserver::logWebSocketLoading):
(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
(WebCore::ResourceLoadObserver::logFontLoad):
(WebCore::ResourceLoadObserver::logCanvasRead):
(WebCore::ResourceLoadObserver::logCanvasWriteOrMeasure):
(WebCore::ResourceLoadObserver::logNavigatorAPIAccessed):
(WebCore::ResourceLoadObserver::logScreenAPIAccessed):
(WebCore::ResourceLoadObserver::ensureResourceStatisticsForRegistrableDomain):
(WebCore::ResourceLoadObserver::statisticsForURL):
(WebCore::ResourceLoadObserver::takeStatistics):
(WebCore::ResourceLoadObserver::clearState):

  • loader/ResourceLoadObserver.h:
  • testing/Internals.cpp:

(WebCore::Internals::resourceLoadStatisticsForURL):

Source/WebKit:

The original implementation of resourceLoadStatisticsUpdated
did not allow for ITP on a per session basis due to the sessionID
not being passed to the resourceLoadStatisticsUpdated function.
This patch allows access of the correct networkSession by passing
all resourceLoadStatistics in a new data structure of key-value
pairs, where the sessionID is the key.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated):

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • WebProcess/WebProcess.cpp:
10:53 AM Changeset in webkit [249055] by Alan Coon
  • 3 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r248969. rdar://problem/54643450

Crash under StringImpl::~StringImpl() in IDBServer::computeSpaceUsedForOrigin()
https://bugs.webkit.org/show_bug.cgi?id=200989
<rdar://problem/54565546>

Reviewed by Alex Christensen.

Make sure we call isolatedCopy() on IDBServer::m_databaseDirectoryPath before using it from
background threads.

  • Modules/indexeddb/server/IDBServer.cpp: (WebCore::IDBServer::IDBServer::createBackingStore): (WebCore::IDBServer::IDBServer::performGetAllDatabaseNames): (WebCore::IDBServer::IDBServer::removeDatabasesModifiedSinceForVersion): (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesModifiedSince): (WebCore::IDBServer::IDBServer::removeDatabasesWithOriginsForVersion): (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesForOrigins): (WebCore::IDBServer::IDBServer::computeSpaceUsedForOrigin): (WebCore::IDBServer::IDBServer::upgradeFilesIfNecessary):
  • Modules/indexeddb/server/IDBServer.h: (WebCore::IDBServer::IDBServer::databaseDirectoryPath const):

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

10:53 AM Changeset in webkit [249054] by Alan Coon
  • 3 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r248971. rdar://problem/54643440

Crash under StringImpl::endsWith() in SQLiteIDBBackingStore::fullDatabaseDirectoryWithUpgrade()
https://bugs.webkit.org/show_bug.cgi?id=200990
<rdar://problem/54566439>

Reviewed by Alex Christensen.

Make sure we call isolatedCopy() on SQLiteIDBBackingStore::m_databaseRootDirectory before using
it from background threads.

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: (WebCore::IDBServer::SQLiteIDBBackingStore::fullDatabaseDirectoryWithUpgrade): (WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForOrigin const): (WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):
  • Modules/indexeddb/server/SQLiteIDBBackingStore.h: (WebCore::IDBServer::SQLiteIDBBackingStore::databaseRootDirectory const):

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

10:53 AM Changeset in webkit [249053] by Alan Coon
  • 3 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r248967. rdar://problem/54643456

Crash under StringImpl::endsWith() in RegistrationDatabase::openSQLiteDatabase()
https://bugs.webkit.org/show_bug.cgi?id=200991
<rdar://problem/54566689>

Reviewed by Geoffrey Garen.

Make sure we call isolatedCopy() on RegistrationDatabase::m_databaseDirectory before using
it from background threads.

  • workers/service/server/RegistrationDatabase.cpp: (WebCore::RegistrationDatabase::openSQLiteDatabase): (WebCore::RegistrationDatabase::clearAll):
  • workers/service/server/RegistrationDatabase.h: (WebCore::RegistrationDatabase::databaseDirectory const):

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

10:21 AM Changeset in webkit [249052] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

VirtualRegister::dump() can use more informative CallFrame header slot names.
https://bugs.webkit.org/show_bug.cgi?id=201062

Reviewed by Tadeu Zagallo.

For example, it currently dumps head3 instead of callee. This patch changes the
dump as follows (for 64-bit addressing):

head0 => callerFrame
head1 => returnPC
head2 => codeBlock
head3 => callee
head4 => argumentCount

Now, one might be wondering when would bytecode ever access callerFrame and
returnPC? The answer is never. However, I don't think its the role of the
dumper to catch a bug where these header slots are being used. The dumper's role
is to clearly report them so that we can see that these unexpected values are
being used.

  • bytecode/VirtualRegister.cpp:

(JSC::VirtualRegister::dump const):

10:15 AM Changeset in webkit [249051] by russell_e@apple.com
  • 12 edits
    7 deletes in trunk

Unreviewed, rolling out r249031.

Causes multiple test failures on iOS simulator

Reverted changeset:

"[iOS] Should show input view when became first responder if
keyboard was showing when the view was resigned"
https://bugs.webkit.org/show_bug.cgi?id=200902
https://trac.webkit.org/changeset/249031

10:06 AM Changeset in webkit [249050] by Ryan Haddad
  • 6 edits in branches/safari-608-branch/LayoutTests

Cherry-pick r249042. rdar://problem/54622280

Revert delete-in-input-in-iframe.html and typing-in-input-in-iframe.html to original behaviour after r248977 and make associated test autoscroll-input-when-very-zoomed.html more stable
https://bugs.webkit.org/show_bug.cgi?id=201058

Reviewed by Simon Fraser.

delete-in-input-in-iframe and typing-in-input-in-iframe were changed when scrolling was made to work differently in r244141.
They actually did find a bug, and that bug was fixed in r248977, so we put the tests back to test that scolls do not happen.
Also update autoscroll-input-when-very-zoomed which was added to test r248977 to be more robust.

  • fast/forms/ios/delete-in-input-in-iframe-expected.txt:
  • fast/forms/ios/delete-in-input-in-iframe.html:
  • fast/forms/ios/typing-in-input-in-iframe-expected.txt:
  • fast/forms/ios/typing-in-input-in-iframe.html:
  • fast/scrolling/ios/autoscroll-input-when-very-zoomed.html:

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

10:06 AM Changeset in webkit [249049] by Ryan Haddad
  • 2 edits in branches/safari-608-branch/LayoutTests

Cherry-pick r249028. rdar://problem/54614691

REGRESSION (r248974): fast/events/ios/select-all-with-existing-selection.html fails
https://bugs.webkit.org/show_bug.cgi?id=201050

Reviewed by Wenson Hsieh.

  • fast/events/ios/select-all-with-existing-selection.html: The test as-written doesn't actually wait for the tap to complete before continuing on with the test - it starts immediately when the focus event fires. This results in the selection being changed by the single click handler *after* focusing the field.

Rewrite the test to await completion of the tap before moving forward
instead of waiting for focus.

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

10:06 AM Changeset in webkit [249048] by Ryan Haddad
  • 4 edits in branches/safari-608-branch/LayoutTests

Cherry-pick r249017. rdar://problem/54564878

Rebaseline some editing tests after r248974
https://bugs.webkit.org/show_bug.cgi?id=200999
<rdar://problem/54564878>

  • platform/ios/editing/deleting/smart-delete-003-expected.txt:
  • platform/ios/editing/deleting/smart-delete-004-expected.txt:
  • platform/ios/editing/pasteboard/smart-paste-008-expected.txt:

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

9:53 AM Changeset in webkit [249047] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Remove unnecessary call to enclosingClippingScopes()
https://bugs.webkit.org/show_bug.cgi?id=201063

Reviewed by Zalan Bujtas.

This line of code did nothing, and was left in by mistake. Remove it.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateOverlapMap const):

8:47 AM Changeset in webkit [249046] by aakash_jain@apple.com
  • 5 edits in trunk/Tools

[ews] Enable Style queue on new EWS
https://bugs.webkit.org/show_bug.cgi?id=201071

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/config.json: Enabled the scheduler for Style queue.
  • BuildSlaveSupport/ews-app/ews/views/statusbubble.py: Enabled style queue bubble on new EWS.
  • QueueStatusServer/config/queues.py: Removed style queue from old EWS.
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:

(BubbleQueueServer): Removed style queue from bot-watcher's dashboard.

8:31 AM Changeset in webkit [249045] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Cache hasCompositedScrollableOverflow as a bit on RenderLayer
https://bugs.webkit.org/show_bug.cgi?id=201065

Reviewed by Zalan Bujtas.

hasCompositedScrollableOverflow() is pretty hot on some compositing-related code paths, and isn't
super cheap, as it checks a Setting and calls into renderer code. Optimize by computing it in
computeScrollDimensions().

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::hasCompositedScrollableOverflow const):
(WebCore::RenderLayer::computeScrollDimensions):

  • rendering/RenderLayer.h:
8:14 AM Changeset in webkit [249044] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Don't call clipCrossesPaintingBoundary() when not necessary
https://bugs.webkit.org/show_bug.cgi?id=201064

Reviewed by Zalan Bujtas.

clipCrossesPaintingBoundary() does some RenderLayer ancestor walks, so avoid
calling it when we already know that the clip rects are TemporaryClipRects.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects const):

3:53 AM Changeset in webkit [249043] by Philippe Normand
  • 3 edits in trunk/Source/WebCore

[GStreamer] Hole-punch build is broken
https://bugs.webkit.org/show_bug.cgi?id=200972

Reviewed by Žan Doberšek.

This patch fixes link issues when building with
USE_GSTREAMER_HOLEPUNCH enabled, the hole punch client destructor
was missing.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

Remove FAST_ALLOCATED annotation, because:

  • platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:

it's now in the base class, along with a default destructor.

12:25 AM Changeset in webkit [249042] by Megan Gardner
  • 6 edits in trunk/LayoutTests

Revert delete-in-input-in-iframe.html and typing-in-input-in-iframe.html to original behaviour after r248977 and make associated test autoscroll-input-when-very-zoomed.html more stable
https://bugs.webkit.org/show_bug.cgi?id=201058

Reviewed by Simon Fraser.

delete-in-input-in-iframe and typing-in-input-in-iframe were changed when scrolling was made to work differently in r244141.
They actually did find a bug, and that bug was fixed in r248977, so we put the tests back to test that scolls do not happen.
Also update autoscroll-input-when-very-zoomed which was added to test r248977 to be more robust.

  • fast/forms/ios/delete-in-input-in-iframe-expected.txt:
  • fast/forms/ios/delete-in-input-in-iframe.html:
  • fast/forms/ios/typing-in-input-in-iframe-expected.txt:
  • fast/forms/ios/typing-in-input-in-iframe.html:
  • fast/scrolling/ios/autoscroll-input-when-very-zoomed.html:

Aug 22, 2019:

9:34 PM Changeset in webkit [249041] by Alan Coon
  • 7 edits in branches/safari-608-branch/Source

Versioning.

7:06 PM Changeset in webkit [249040] by Fujii Hironori
  • 3 edits
    4 adds in trunk

[SVG] -webkit-clip-path treats url(abc#xyz) as url(#xyz) because it checks only URL fragment part
https://bugs.webkit.org/show_bug.cgi?id=201030

Reviewed by Ryosuke Niwa.

Source/WebCore:

Tests: svg/clip-path/clip-path-invalid-reference-001-expected.svg

svg/clip-path/clip-path-invalid-reference-001.svg
svg/clip-path/clip-path-invalid-reference-002-expected.svg
svg/clip-path/clip-path-invalid-reference-002.svg

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertClipPath): Use
SVGURIReference::fragmentIdentifierFromIRIString to get fragment
identifier from -webkit-clip-path.

LayoutTests:

  • svg/clip-path/clip-path-invalid-reference-001-expected.svg: Added.
  • svg/clip-path/clip-path-invalid-reference-001.svg: Added.
  • svg/clip-path/clip-path-invalid-reference-002-expected.svg: Added.
  • svg/clip-path/clip-path-invalid-reference-002.svg: Added.
6:59 PM Changeset in webkit [249039] by Fujii Hironori
  • 11 edits in trunk/Tools

[Win][MiniBrowser] URL bar should be updated for in-page navigations
https://bugs.webkit.org/show_bug.cgi?id=201032

Reviewed by Darin Adler.

  • MiniBrowser/win/BrowserWindow.h: Added activeURLChanged to BrowserWindowClient interface.
  • MiniBrowser/win/MainWindow.cpp:

(MainWindow::init):
(MainWindow::activeURLChanged): Added.

  • MiniBrowser/win/MainWindow.h:
  • MiniBrowser/win/MiniBrowserWebHost.cpp:

(MiniBrowserWebHost::didCommitLoadForFrame):
(MiniBrowserWebHost::didChangeLocationWithinPageForFrame): Added.
(MiniBrowserWebHost::updateAddressBar): Deleted.
(MiniBrowserWebHost::loadURL): Deleted.

  • MiniBrowser/win/MiniBrowserWebHost.h:

(MiniBrowserWebHost::MiniBrowserWebHost):
(MiniBrowserWebHost::didCommitLoadForFrame): Deleted.
(MiniBrowserWebHost::didChangeLocationWithinPageForFrame): Deleted.

  • MiniBrowser/win/PrintWebUIDelegate.cpp:
  • MiniBrowser/win/WebKitBrowserWindow.cpp:

(WebKitBrowserWindow::create):
(WebKitBrowserWindow::WebKitBrowserWindow):
(WebKitBrowserWindow::didChangeIsLoading): Removed an unused variable.
(WebKitBrowserWindow::didChangeActiveURL): Added.
(WebKitBrowserWindow::createNewPage):
(WebKitBrowserWindow::didCommitNavigation): Deleted.

  • MiniBrowser/win/WebKitBrowserWindow.h: Removed m_urlBarWnd.
  • MiniBrowser/win/WebKitLegacyBrowserWindow.cpp:

(WebKitLegacyBrowserWindow::create):
(WebKitLegacyBrowserWindow::WebKitLegacyBrowserWindow):
(WebKitLegacyBrowserWindow::init):
(WebKitLegacyBrowserWindow::navigateToHistory):

  • MiniBrowser/win/WebKitLegacyBrowserWindow.h: Removed m_urlBarWnd.
6:43 PM Changeset in webkit [249038] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Console: automatically select the "Evaluations" filter whenever running commands
https://bugs.webkit.org/show_bug.cgi?id=201060

Reviewed by Timothy Hatcher.

If the Console is actively being filtered (e.g. not "All"), it can be confusing to run a
command, only to not see any results. We should automatically enable the "Evaluations"
filter in addition to any other existing filters in these cases.

  • UserInterface/Views/LogContentView.js:

(WI.LogContentView.prototype.didAppendConsoleMessageView):

  • UserInterface/Views/ScopeBarItem.js:

(WI.ScopeBarItem.prototype.set selected):
(WI.ScopeBarItem.prototype.toggle): Added.

6:07 PM Changeset in webkit [249037] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION(r248485): stack overflow when viewing a source map generated from inline content
https://bugs.webkit.org/show_bug.cgi?id=201042
<rdar://problem/54509750>

Reviewed by Antoine Quint.

In r248485, WI.ResourceClusterContentView was changed to requestContent whenever the
given resource finished loading (by listening for WI.Resource.Event.LoadingDidFinish).

Even though retrieving a source map's contents uses Promises, in the case that the content
was inlined in the "original" source code, the code path would mark the source map as being
finished (which would fire a WI.Resource.Event.LoadingDidFinish) _before_ it could return
a Promise, which would've been cached (WI.SourceCode.prototype.requestContent) and
preventend any reentrancy.

Wrapping the inline code path in a Promise.resolve() gives the WI.SourceCode a chance to
cache the Promise before any events are fired.

  • UserInterface/Models/SourceMapResource.js:

(WI.SourceMapResource.prototype.requestContentFromBackend):

4:54 PM Changeset in webkit [249036] by aestes@apple.com
  • 14 edits in trunk

[watchOS] Disable Content Filtering in the simulator build
https://bugs.webkit.org/show_bug.cgi?id=201047

Reviewed by Tim Horton.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WTF:

  • wtf/Platform.h:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
4:28 PM Changeset in webkit [249035] by Chris Dumez
  • 5 edits
    1 add in trunk

Try to recover nicely when getting an unexpected schema in the service workers database
https://bugs.webkit.org/show_bug.cgi?id=201002
<rdar://problem/54574991>

Reviewed by Youenn Fablet.

Source/WebCore:

Try to recover nicely when getting an unexpected schema in the service workers database instead
of crashing the network process. To recover, we delete the database file and re-create it.

  • workers/service/server/RegistrationDatabase.cpp:

(WebCore::RegistrationDatabase::openSQLiteDatabase):
(WebCore::RegistrationDatabase::ensureValidRecordsTable):

Tools:

Add API test coverage.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
4:17 PM Changeset in webkit [249034] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: console.dir should expand objects
https://bugs.webkit.org/show_bug.cgi?id=152039
<rdar://problem/23816853>

Reviewed by Joseph Pecoraro.

Expand objects logged by console.dir but keep them collapsed when logged by console.log.

  • UserInterface/Views/ConsoleMessageView.js:

(WI.ConsoleMessageView.prototype.render):

3:51 PM Changeset in webkit [249033] by Keith Rollin
  • 8 edits in trunk

Remove support for tvOS < 13.0
https://bugs.webkit.org/show_bug.cgi?id=200963
<rdar://problem/54541355>

Reviewed by Tim Horton.

Update conditionals that reference TV_OS_VERSION_MIN_REQUIRED and
TV_OS_VERSION_MAX_ALLOWED, assuming that they both have values >=

  1. This means that expressions like "TV_OS_VERSION_MIN_REQUIRED

< 130000" are always False and "TV_OS_VERSION_MIN_REQUIRED >=
130000" are always True.

Source/WebCore/PAL:

  • pal/spi/cocoa/NSKeyedArchiverSPI.h:
  • pal/spi/cocoa/NSProgressSPI.h:

Source/WTF:

  • wtf/FeatureDefines.h:
  • wtf/Platform.h:

Tools:

  • TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm:

(TestWebKitAPI::TEST):

3:27 PM Changeset in webkit [249032] by Alan Coon
  • 1 copy in tags/Safari-608.2.8

Tag Safari-608.2.8.

3:22 PM Changeset in webkit [249031] by dbates@webkit.org
  • 12 edits
    7 adds in trunk

[iOS] Should show input view when became first responder if keyboard was showing when the view was resigned
https://bugs.webkit.org/show_bug.cgi?id=200902
<rdar://problem/54231756>

Reviewed by Wenson Hsieh.

Source/WebKit:

When resigning first responder save whether the peripheral host has an input view on screen,
including the software keyboard, so that we show the input view(s) again when the WKWebView
is made first responder. In Safari, this avoids the need for a person to explicitly focus an
editable element again to bring up the keyboard when returning to a tab they were previously
typing in. It also makes the behavior of switching tabs in Safari with a software keyboard
match the behavior of doing the same thing when a hardware keyboard attached.

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

(WebKit::PageClientImpl::focusedElementDidChangeInputMode):
Pass a diff of the activity state from the web process to the UI process so that we can
differentiate between an inputmode change as a result of page deactivation vs a change
caused by some other means. We need to differentiate these cases because we want to
ignore a page that sets inputmode "none" (i.e. a request to hide the keyboard) from inside
a focus event handler if the handler was called as part of the process of page activation
(i.e. switching to the tab). Google Docs is one example of a web site that sets inputmode
to "none" as a result of the page activation process.

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

(-[WKContentView cleanupInteraction]): Clear out state.
(-[WKContentView resignFirstResponderForWebView]): Save whether the peripheral host is on screen
into a local before ending the editing session. We then copy the local into the ivar if we
actually will resign. This ordering is explicitly done because:

  1. Ending the editing session may dismiss the keyboard => we need to query the peripheral host first.
  2. If the view is being resigned as a result of a keyboard dismissal (i.e. a person pressed the hide keyboard button on iPad) then the user has indicated that they are finished with the keyboard and we do not want to show the keyboard on page re-activation => we do not want to copy the local to the ivar.
  3. If the view refuses to resign itself then it does not make sense to save the keyboard state as responder status hasn't changed.

(-[WKContentView shouldShowAutomaticKeyboardUI]): Ignore inputmode="none", if needed.
(-[WKContentView _didCommitLoadForMainFrame]): Clear out state.
(-[WKContentView isFirstResponderOrBecomingFirstResponder]): Added.
(-[WKContentView shouldShowInputViewOnPageActivation:]): Added.
(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:]):
Update ivar if this element is being focused as a result of page activation.
(-[WKContentView _didUpdateInputMode:activityStateChanges:]): Modified to take the activity state
diff. If the input mode was changed as a result of page activation then we want to update our ivar
so that when we call -reloadInputViews and UIKit calls us back in -shouldShowAutomaticKeyboardUI we
will know to ignore inputmode set to "none" when determining whether to show the automatic keyboard UI.
Note that we do not need to check/track whether an earlier -_elementDidFocus actually started an
input session as part of updating the value of our ivar because if an input session was not started,
say the embedding client disallowed it, then we would not have a focused element => we early return from
this function. Also remove duplication and improve code readbility by making use of the convenience function
hasFocusedElement() instead of duplicating what it does.
(-[WKContentView _didUpdateInputMode:]): Deleted.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::focusedElementDidChangeInputMode): Modified to take the activity state diff
and pass it through.
(WebKit::WebPageProxy::didReleaseAllTouchPoints): Pass the empty set for the activity state diff to
keep our current behavior.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::focusedElementDidChangeInputMode): Send the activity state diff to the UI process.

LayoutTests:

Add tests to ensure that we show the keyboard when becoming first responder if the view resigned with the
keyboard on screen. Also add a test to ensure that we keep our current behavior and do NOT show the keyboard
for an autofocused text field when the view becomes first responder.

  • fast/events/ios/resources/check-keyboard-on-screen.js: Added.

(async.checkKeyboardOnScreen):
(async.checkKeyboardNotOnScreen):

  • fast/events/ios/should-not-show-keyboard-for-autofocused-field-when-becoming-first-responder-after-navigation-expected.txt: Added.
  • fast/events/ios/should-not-show-keyboard-for-autofocused-field-when-becoming-first-responder-after-navigation.html: Added.
  • fast/events/ios/show-keyboard-when-becoming-first-responder-despite-inputmode-none-expected.txt: Added.
  • fast/events/ios/show-keyboard-when-becoming-first-responder-despite-inputmode-none.html: Added.
  • fast/events/ios/show-keyboard-when-becoming-first-responder-expected.txt: Added.
  • fast/events/ios/show-keyboard-when-becoming-first-responder.html: Added.
  • resources/ui-helper.js:

(window.UIHelper.waitForKeyboardToShow.return.new.Promise): Added.
(window.UIHelper.waitForKeyboardToShow): Added.
(window.UIHelper.becomeFirstResponder): Added.

3:06 PM Changeset in webkit [249030] by dbates@webkit.org
  • 3 edits in trunk/Tools

[lldb-webkit] OptionSet summary shows size 0 sometimes for non-empty set
https://bugs.webkit.org/show_bug.cgi?id=200742

Reviewed by Simon Fraser.

The OptionSet synthetic provider must respond to requests for the value of m_storage
(i.e. GetChildMemberWithName('m_storage')) to avoid interfering with the computation
of the type summary.

Synthetic providers substitute alternative debug information (children) for the default
information for a variable. The OptionSet type summary is implemented in terms of the
OptionSet synthetic provider to maximize code reuse. If LLDB instantiates the provider
before invoking the type summary handler then evaluating GetChildMemberWithName() on
the SBValue passed to the type summary handler will access the substitute information
instead of the original debug information. As a result OptionSet's synthetic provider's
get_child_index('m_storage') returns None hence SBValue.GetChildMemberWithName('m_storage')
returned an invalid value; => WTFOptionSetProvider._bitmask() returns 0; => the size
reported in the type summary for the OptionSet is 0. Instead get_child_index('m_storage')
should return a valid value.

  • lldb/lldb_webkit.py:

(FlagEnumerationProvider.init):
(FlagEnumerationProvider):
(FlagEnumerationProvider._get_child_index): Added. WTFOptionSetProvider will override.
(FlagEnumerationProvider._get_child_at_index): Added. WTFOptionSetProvider will override.
(FlagEnumerationProvider.size): Added.
(FlagEnumerationProvider.get_child_index): Modified to call _get_child_index().
(FlagEnumerationProvider.get_child_at_index): Modified to call _get_child_at_index().
(FlagEnumerationProvider.update): Moved initialization of self._elements to the constructor
and removed self.size. For the latter we can just expose a getter that returns the size of
the list self._elements.
(WTFOptionSetProvider._get_child_index): Added. Return the index for LLDB to query for the
value of m_storage.
(WTFOptionSetProvider):
(WTFOptionSetProvider._get_child_at_index): Added. Return the value for m_storage if it
matches the specified index.

  • lldb/lldb_webkit_unittest.py:

(TestSummaryProviders.serial_test_WTFOptionSetProvider_empty): Update expected result now
that we return the value of m_storage as the last synthetic child.

2:43 PM Changeset in webkit [249029] by Keith Rollin
  • 2 edits in trunk/Source/WebKit

Remove logging that contains a URL
https://bugs.webkit.org/show_bug.cgi?id=201052
<rdar://problem/54613204>

Reviewed by Chris Dumez.

checkURLReceivedFromWebProcess in WebProcessProxy.cpp contains an old
logging line that logs a URL. We don't log URLs any more for privacy
reasons, so remove this.

A search for WTFLogAlways.*url turns up other matches, but those are
either false positives or cases where the URLs are logged only on
demand by the developer as part of debugging.
checkURLReceivedFromWebProcess is the only place where a URL is logged
as a matter of course.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::checkURLReceivedFromWebProcess):

2:30 PM Changeset in webkit [249028] by timothy_horton@apple.com
  • 2 edits in trunk/LayoutTests

REGRESSION (r248974): fast/events/ios/select-all-with-existing-selection.html fails
https://bugs.webkit.org/show_bug.cgi?id=201050

Reviewed by Wenson Hsieh.

  • fast/events/ios/select-all-with-existing-selection.html:

The test as-written doesn't actually wait for the tap to complete before
continuing on with the test - it starts immediately when the focus event
fires. This results in the selection being changed by the single click
handler *after* focusing the field.

Rewrite the test to await completion of the tap before moving forward
instead of waiting for focus.

2:28 PM Changeset in webkit [249027] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

Logging in FileSystem::deleteFile should avoid logging unsurprising errors
https://bugs.webkit.org/show_bug.cgi?id=200831

Patch by Kate Cheney <Kate Cheney> on 2019-08-22
Reviewed by Chris Dumez.

To avoid overlogging unnecessary information, added a check to avoid logging
ENOENT (file not found) errors.

  • wtf/posix/FileSystemPOSIX.cpp:

(WTF::FileSystemImpl::deleteFile):

2:13 PM Changeset in webkit [249026] by Said Abou-Hallawa
  • 3 edits
    2 adds in trunk

Crash may happen when an SVG <feImage> element references the root <svg> element
https://bugs.webkit.org/show_bug.cgi?id=201014

Reviewed by Ryosuke Niwa.

Source/WebCore:

When an <feImage> references an <svg> element as its target image but
this <svg> element is also one of the ancestors of the <feImage>, the
parent <filter> should not be applied.

Test: svg/filters/filter-image-ref-root.html

  • svg/SVGFEImageElement.cpp:

(WebCore::SVGFEImageElement::build const):

LayoutTests:

Ensure the cyclic reference between the <feImage> renderer and its
ancestor <svg> root renderer is broken.

  • svg/filters/filter-image-ref-root-expected.txt: Added.
  • svg/filters/filter-image-ref-root.html: Added.
12:25 PM Changeset in webkit [249025] by rniwa@webkit.org
  • 5 edits in trunk/Source/WebCore

Make ImageBuffer and SVG's FilterData isoheap'ed
https://bugs.webkit.org/show_bug.cgi?id=201029

Reviewed by Simon Fraser.

Made ImageBuffer and RenderSVGResourceFilter use IsoHeap.

  • platform/graphics/ImageBuffer.cpp:
  • platform/graphics/ImageBuffer.h:
  • rendering/svg/RenderSVGResourceFilter.cpp:
  • rendering/svg/RenderSVGResourceFilter.h:
12:09 PM Changeset in webkit [249024] by Jonathan Bedard
  • 2 edits in trunk/Tools

results.webkit.org: Remove branch and repository information from commit tooltip
https://bugs.webkit.org/show_bug.cgi?id=201035

Reviewed by Aakash Jain.

  • resultsdbpy/resultsdbpy/view/static/js/timeline.js:

(xAxisFromScale): Remove branch and repository information from tooltip.

12:04 PM Changeset in webkit [249023] by Jonathan Bedard
  • 4 edits in trunk/Tools

run-webkit-tests: Use -noBulkSymbolication when calling spindump
https://bugs.webkit.org/show_bug.cgi?id=201000
<rdar://problem/53778938>

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/port/darwin.py:

(DarwinPort.sample_process): Attempt to symbolicate with -noBulkSymbolication first.

  • Scripts/webkitpy/port/darwin_testcase.py:

(DarwinTest.test_tailspin):
(DarwinTest.test_get_crash_log): Deleted.

  • Scripts/webkitpy/port/ios_device_unittest.py:

(IOSDeviceTest.test_tailspin):

11:54 AM Changeset in webkit [249022] by Adrian Perez de Castro
  • 8 edits in trunk/Source

[GTK][WPE] Fixes for non-unified builds after r248547
https://bugs.webkit.org/show_bug.cgi?id=201044

Reviewed by Philippe Normand.

Source/JavaScriptCore:

  • b3/B3ReduceLoopStrength.cpp: Add missing inclusions of B3BasicBlockInlines.h,

B3InsertionSet.h, and B3NaturalLoops.h

  • wasm/WasmOMGForOSREntryPlan.h: Include WasmCallee.h instead of forward-declaring

BBQCallee in order to avoid build failure due to incomplete definition on template
expansions.

Source/WebCore:

  • platform/audio/AudioResamplerKernel.h: Add missing inclusion of wtf/Noncopyable.h

Source/WebKit:

  • NetworkProcess/WebStorage/LocalStorageDatabaseTracker.cpp: Add missing inclusion of

the wtf/CrossThreadCopier.h header.

  • WebProcess/WebStorage/StorageNamespaceImpl.h: Add missing inclusion of the

WebCore/PageIdentifier.h header.

11:50 AM Changeset in webkit [249021] by zhifei_fang@apple.com
  • 5 edits in trunk/Tools

[results.webkit.org Webkit.css] Change input's disable style
The disable input style will always show the label like it has a value
https://bugs.webkit.org/show_bug.cgi?id=200998

Reviewed by Jonathan Bedard.

  • resultsdbpy/resultsdbpy/view/static/library/css/docs.yaml: Adding a new example for disabled input that already has a value

*resultsdbpy/resultsdbpy/view/static/library/css/generate-webkit-css-docs:

  • resultsdbpy/resultsdbpy/view/static/library/css/index.html:
  • resultsdbpy/resultsdbpy/view/static/library/css/webkit.css:

(.input>input[type="text"][required][disabled],.input>input[type="number"][required][disabled],):When disabling a text input element even without a value, the style should match the style of a text input element with a value
(.input>input[type="text"][required][disabled]~label, .input>input[type="number"][required][disabled]~label,):
(@media (prefers-color-scheme: dark)):

11:18 AM Changeset in webkit [249020] by Justin Michaud
  • 3 edits
    1 add in trunk

Add missing exception check in canonicalizeLocaleList
https://bugs.webkit.org/show_bug.cgi?id=201021

Reviewed by Mark Lam.

JSTests:

  • stress/missing-exception-check-in-canonicalizeLocaleList.js: Added.

(catch):

Source/JavaScriptCore:

  • runtime/IntlObject.cpp:

(JSC::canonicalizeLocaleList):

11:13 AM Changeset in webkit [249019] by commit-queue@webkit.org
  • 8 edits in trunk/Source

Disable legacy TLS versions and add a temporary default to re-enable it
https://bugs.webkit.org/show_bug.cgi?id=200945

Patch by Alex Christensen <achristensen@webkit.org> on 2019-08-22
Reviewed by Brady Eidson.

Source/WebKit:

  • NetworkProcess/NetworkSessionCreationParameters.cpp:

(WebKit::NetworkSessionCreationParameters::privateSessionParameters):
(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):

  • NetworkProcess/NetworkSessionCreationParameters.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeNetworkProcess):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::parameters):

Source/WTF:

  • wtf/Platform.h:
11:01 AM Changeset in webkit [249018] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

Make MediaStreamTrackPrivate WeakPtrFactoryInitialization::Eager
https://bugs.webkit.org/show_bug.cgi?id=201037

Reviewed by Darin Adler.

No change of behavior, replacing m_weakThis by the more convenient Eager.

  • platform/mediastream/MediaStreamTrackPrivate.cpp:

(WebCore::MediaStreamTrackPrivate::audioSamplesAvailable):
(WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate): Deleted.

  • platform/mediastream/MediaStreamTrackPrivate.h:
10:35 AM Changeset in webkit [249017] by timothy_horton@apple.com
  • 4 edits in trunk/LayoutTests

Rebaseline some editing tests after r248974
https://bugs.webkit.org/show_bug.cgi?id=200999
<rdar://problem/54564878>

  • platform/ios/editing/deleting/smart-delete-003-expected.txt:
  • platform/ios/editing/deleting/smart-delete-004-expected.txt:
  • platform/ios/editing/pasteboard/smart-paste-008-expected.txt:
10:23 AM Changeset in webkit [249016] by Joseph Pecoraro
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Cleanup some unused code
https://bugs.webkit.org/show_bug.cgi?id=201041

Reviewed by Alex Christensen.

  • UserInterface/Views/CPUUsageCombinedView.css:

(.cpu-usage-combined-view > .graph > .stacked-area-chart):

  • UserInterface/Views/CPUUsageCombinedView.js:

(WI.CPUUsageCombinedView):

  • UserInterface/Views/MediaTimelineOverviewGraph.js:

(WI.MediaTimelineOverviewGraph):

9:50 AM Changeset in webkit [249015] by Darin Adler
  • 3 edits in trunk/Source/WTF

Rename StringBuilder functions to avoid unclear "append uninitialized" terminology
https://bugs.webkit.org/show_bug.cgi?id=201020

Reviewed by Alex Christensen.

  • wtf/text/StringBuilder.cpp:

(WTF::StringBuilder::allocateBuffer): Use std::memcpy instead of just memcpy.
(WTF::StringBuilder::extendBufferForAppending): Renamed.
(WTF::StringBuilder::extendBufferForAppendingWithoutOverflowCheck): Ditto.
(WTF::StringBuilder::extendBufferForAppending8): Ditto.
(WTF::StringBuilder::extendBufferForAppending16): Ditto.
(WTF::StringBuilder::extendBufferForAppendingSlowPath): Ditto.
(WTF::StringBuilder::appendCharacters): Updated for new names.

  • wtf/text/StringBuilder.h: Updated for new names.
9:42 AM Changeset in webkit [249014] by Joseph Pecoraro
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Provide an engineering option to log protocol traffic as text
https://bugs.webkit.org/show_bug.cgi?id=200969

Reviewed by Devin Rousso.

  • UserInterface/Base/Setting.js:
  • UserInterface/Protocol/LoggingProtocolTracer.js:

(WI.LoggingProtocolTracer.prototype._processEntry):
(WI.LoggingProtocolTracer):

  • UserInterface/Views/SettingsTabContentView.js:

(WI.SettingsTabContentView.prototype._createDebugSettingsView):

9:26 AM Changeset in webkit [249013] by Darin Adler
  • 41 edits in trunk

Use makeString and multi-argument StringBuilder::append instead of less efficient multiple appends
https://bugs.webkit.org/show_bug.cgi?id=200862

Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

  • runtime/ExceptionHelpers.cpp:

(JSC::createUndefinedVariableError): Got rid of unnecessary local variable.
(JSC::notAFunctionSourceAppender): Use single append instead of multiple.
Eliminate unneeded and unconventional use of makeString on a single string literal.
(JSC::invalidParameterInstanceofNotFunctionSourceAppender): Ditto.
(JSC::invalidParameterInstanceofhasInstanceValueNotFunctionSourceAppender): Ditto.
(JSC::createInvalidFunctionApplyParameterError): Ditto.
(JSC::createInvalidInParameterError): Ditto.
(JSC::createInvalidInstanceofParameterErrorNotFunction): Ditto.
(JSC::createInvalidInstanceofParameterErrorHasInstanceValueNotFunction): Ditto.

  • runtime/FunctionConstructor.cpp:

(JSC::constructFunctionSkippingEvalEnabledCheck): Use single append instead of multiple.

  • runtime/Options.cpp:

(JSC::Options::dumpOption): Ditto.

  • runtime/TypeProfiler.cpp:

(JSC::TypeProfiler::typeInformationForExpressionAtOffset): Ditto.

  • runtime/TypeSet.cpp:

(JSC::StructureShape::stringRepresentation): Ditto. Also use a modern for loop.

Source/WebCore:

  • Modules/indexeddb/shared/IDBDatabaseInfo.cpp:

(WebCore::IDBDatabaseInfo::loggingString const): Use one append instead of multiple.

  • Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:

(WebCore::IDBObjectStoreInfo::loggingString const): Ditto.

  • Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:

(WebCore::toRTCCodecParameters): Ditto.

  • Modules/plugins/YouTubePluginReplacement.cpp:

(WebCore::YouTubePluginReplacement::youTubeURLFromAbsoluteURL): Ditto.

  • Modules/webdatabase/DatabaseTracker.cpp:

(WebCore::generateDatabaseFileName): Ditto.

  • Modules/websockets/WebSocketExtensionDispatcher.cpp:

(WebCore::WebSocketExtensionDispatcher::createHeaderValue const): Ditto.
(WebCore::WebSocketExtensionDispatcher::appendAcceptedExtension): Ditto.

  • Modules/websockets/WebSocketHandshake.cpp:

(WebCore::WebSocketHandshake::clientLocation const): Use makeString instead of
StringBuilder.

  • bindings/js/JSDOMExceptionHandling.cpp:

(WebCore::appendArgumentMustBe): Use one append instead of multiple.
(WebCore::throwArgumentMustBeEnumError): Ditto.
(WebCore::throwArgumentTypeError): Ditto.

  • contentextensions/CombinedURLFilters.cpp:

(WebCore::ContentExtensions::recursivePrint): Ditto.

  • css/CSSBasicShapes.cpp:

(WebCore::buildCircleString): Ditto.
(WebCore::buildEllipseString): Ditto.
(WebCore::buildPolygonString): Ditto.
(WebCore::buildInsetString): Ditto.

  • css/CSSCalculationValue.cpp:

(WebCore::buildCssText): Deleted.
(WebCore::CSSCalcValue::customCSSText const): Use makeString.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::CSSComputedStyleDeclaration::cssText const): Use one append instead of multiple.

  • css/CSSCrossfadeValue.cpp:

(WebCore::CSSCrossfadeValue::customCSSText const): Use makeString.

  • css/CSSFilterImageValue.cpp:

(WebCore::CSSFilterImageValue::customCSSText const): Ditto.

  • css/CSSFontFaceRule.cpp:

(WebCore::CSSFontFaceRule::cssText const): Ditto.

  • css/CSSFontFaceSrcValue.cpp:

(WebCore::CSSFontFaceSrcValue::customCSSText const): Ditto.

  • css/CSSGradientValue.cpp:

(WebCore::appendGradientStops): Moved code here from CSSLinearGradientValue::customCSSText
so it can be shared with CSSRadialGradientValue::customCSSText. Use one append per stop.
(WebCore::CSSLinearGradientValue::customCSSText const): Use one append instead of multiple.
(WebCore::CSSRadialGradientValue::customCSSText const): Ditto.
(WebCore::CSSConicGradientValue::customCSSText const): Ditto.

  • css/CSSMediaRule.cpp:

(WebCore::CSSMediaRule::cssText const): Ditto.

  • css/CSSNamespaceRule.cpp:

(WebCore::CSSNamespaceRule::cssText const): Ditto.

  • css/CSSPageRule.cpp:

(WebCore::CSSPageRule::selectorText const): Use makeString.

  • css/CSSPrimitiveValue.cpp:

(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const):
Use one append instead of multiple.

  • css/CSSPropertySourceData.cpp:

(WebCore::CSSPropertySourceData::CSSPropertySourceData): Initialize in the
structure definition instead of the constructor.
(WebCore::CSSPropertySourceData::toString const): Use makeString.

  • css/CSSPropertySourceData.h: Initialize in the structure definition.
  • css/CSSStyleRule.cpp:

(WebCore::CSSStyleRule::cssText const): Use makeString.

  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseFontFaceDescriptor): Use makeString.

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::font const): Use one append instead of multiple.

Source/WebKit:

  • Shared/mac/AuxiliaryProcessMac.mm:

(WebKit::setAndSerializeSandboxParameters): Use one append instead of multiple.

Source/WTF:

  • wtf/DateMath.cpp:

(WTF::makeRFC2822DateString): Use one append instead of multiple.

  • wtf/JSONValues.cpp:

(WTF::appendDoubleQuotedString): Ditto.

Tools:

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::statisticsDidRunTelemetryCallback): Use makeString.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::findAndDumpWebKitProcessIdentifiers): Ditto.
(WTR::TestController::downloadDidReceiveServerRedirectToURL): Ditto.
(WTR::TestController::downloadDidFail): Ditto.

9:20 AM Changeset in webkit [249012] by Alan Coon
  • 16 edits
    2 adds in branches/safari-608-branch

Cherry-pick r249006. rdar://problem/54600921

Typing Korean in title field after typing in the body inserts extraneous characters on blog.naver.com
https://bugs.webkit.org/show_bug.cgi?id=201023
<rdar://problem/54294794>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Ensures that we recognize the blog editor on blog.naver.com to be a hidden editable area. This website places
focus inside an editable body element of a subframe that is completely empty (width: 0 and border: 0). See the
WebKit ChangeLog for more details.

Test: editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe.html

  • rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects const):

Source/WebKit:

After r242833, we began to avoid sending redundant ElementDidFocus updates in the case where a focused element
was blurred and refocused within the same runloop. This was done to prevent the input view from flickering due
to input view reloading, as well as scrolling to reveal the focused element, when tapping to change selection on
Microsoft Word online.

However, on blog.naver.com, these ElementDidFocus messages were necessary in order to ensure that the platform
input context changes when moving between the title and body fields, or when tapping to change selection. This
is because blog.naver.com uses a hidden contenteditable area under a subframe (see WebCore ChangeLog for more
detail here). While text is never directly inserted into this hidden contenteditable, the events are observed
and used to "play back" editing in the main visible content area.

Thus, when moving between the title and body fields (or when changing selection within either), the only hint we
get is that the hidden editable element is blurred and immediately refocused. Since we no longer send
ElementDidFocus updates in this scenario, UIKeyboardImpl and kbd are not aware that the page has effectively
changed input contexts.

Combined with the fact that Korean IME on iOS may insert additional text given the document context (i.e. text
that the input manager, kbd, thinks we've previously inserted), this means that when typing several characters
into the body field on naver and then switching to edit the title, initial keystrokes may insert unexpected
text in the title field.

To fix this, we add some hooks to notify the UI process when an element that was blurred has been immediately
refocused. Upon receiving this message, the UI process then tells UIKeyboardImpl to re-retrieve its input
context, which calls into -requestAutocorrectionContextWithCompletionHandler: in WKContentView. While notorious
for being synchronous IPC, this is mitigated by (1) being limiting to only instances where we have a hidden
editable area, and (2) being limited by a batching mechanism in the web process, such that if the focused
element is blurred, refocused, re-blurred, and refocused many times in the same runloop, we'll only send a
single UpdateInputContextAfterBlurringAndRefocusingElement message (as opposed to the many ElementDidFocus
messages we would've sent in previous releases).

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:

Add a new mechanism to update the platform input context (on iOS, UIKeyboardImpl's document state) when focus
moves away from and immediately returns to a hidden editable element.

  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::updateInputContextAfterBlurringAndRefocusingElement):
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _updateInputContextAfterBlurringAndRefocusingElement]):

Tell the active UIKeyboardImpl to refetch document state from the WKContentView. While this does result in a new
autocorrection context request (which, unfortunately, triggers synchronous IPC to the web process), this request
would've still happened anyways in the case where we would previously have sent an ElementDidFocus message.

  • UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::updateInputContextAfterBlurringAndRefocusingElement):
  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::elementDidFocus):

In the case where we avoid sending a full ElementDidFocus message to the UI process due to refocusing the same
element, we should still notify the UI process so that it can synchronize state between the application process
and kbd. See above for more details.

(WebKit::WebPage::elementDidBlur):
(WebKit::WebPage::updateInputContextAfterBlurringAndRefocusingElementIfNeeded):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::updateInputContextAfterBlurringAndRefocusingElementIfNeeded):

LayoutTests:

Add a new layout test to verify that we suppress text interactions when focusing an editable element inside an
empty, borderless subframe.

  • editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe-expected.txt: Added.
  • editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe.html: Added.

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

8:47 AM Changeset in webkit [249011] by Kocsen Chung
  • 4 edits
    2 adds in branches/safari-608-branch

Cherry-pick r248977. rdar://problem/54599960

Do not adjust viewport if editing selection is already visible
https://bugs.webkit.org/show_bug.cgi?id=200907
<rdar://problem/53903417>

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/scrolling/ios/autoscroll-input-when-very-zoomed.html

Currently due to scrolling being mostly handled by integers, we are getting
issues with rounding errors when trying to adjust the viewport while
editing text when we are significantly zoomed in. The real fix would be to
start dealing with scrolling with floats/doubles, but until such time,
we should early out of adjusting selections that we are certain are currently
visible.

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

LayoutTests:

  • fast/scrolling/ios/autoscroll-input-when-very-zoomed-expected.txt: Added.
  • fast/scrolling/ios/autoscroll-input-when-very-zoomed.html: Added.
  • resources/ui-helper.js: (window.UIHelper.immediateZoomToScale):

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

8:45 AM Changeset in webkit [249010] by Kocsen Chung
  • 2 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r248997. rdar://problem/54579627

Unreviewed build fix; add a 'final' declaration on shouldOverridePauseDuringRouteChange().

  • Modules/mediastream/MediaStream.h:

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

8:45 AM Changeset in webkit [249009] by Kocsen Chung
  • 3 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r248978. rdar://problem/54579627

Adopt AVSystemController_ActiveAudioRouteDidChangeNotification
https://bugs.webkit.org/show_bug.cgi?id=200992
<rdar://problem/54408993>

Reviewed by Eric Carlson.

Follow-up to r248962: When the active audio route changes, and the
system instructs us to pause, only pause the currently audible sessions.

  • platform/audio/ios/MediaSessionManagerIOS.h:
  • platform/audio/ios/MediaSessionManagerIOS.mm: (WebCore::MediaSessionManageriOS::activeAudioRouteDidChange): (-[WebMediaSessionHelper activeAudioRouteDidChange:]): (WebCore::MediaSessionManageriOS::activeRouteDidChange): Deleted.

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

8:45 AM Changeset in webkit [249008] by Kocsen Chung
  • 6 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r248962. rdar://problem/54579627

Adopt AVSystemController_ActiveAudioRouteDidChangeNotification
https://bugs.webkit.org/show_bug.cgi?id=200992
<rdar://problem/54408993>

Reviewed by Eric Carlson.

When the system notifies us that the active audio route has changed in such a way
that necessitates pausing, pause all media sessions, exempting those that are
associated with WebRTC, since "pausing" an active audio conference isn't really
possible.

  • Modules/mediastream/MediaStream.h:
  • platform/audio/PlatformMediaSession.cpp: (WebCore::PlatformMediaSession::shouldOverridePauseDuringRouteChange const):
  • platform/audio/PlatformMediaSession.h: (WebCore::PlatformMediaSessionClient::shouldOverridePauseDuringRouteChange const):
  • platform/audio/ios/MediaSessionManagerIOS.h:
  • platform/audio/ios/MediaSessionManagerIOS.mm: (WebCore::MediaSessionManageriOS::activeRouteDidChange): (-[WebMediaSessionHelper initWithCallback:]): (-[WebMediaSessionHelper activeAudioRouteDidChange:]):

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

8:34 AM Changeset in webkit [249007] by commit-queue@webkit.org
  • 7 edits in trunk

Pass conformance/attribs WebGL conformance tests
https://bugs.webkit.org/show_bug.cgi?id=200901

Patch by Kai Ninomiya <kainino@chromium.org> on 2019-08-22
Reviewed by Alex Christensen.

Tested by
LayoutTests/webgl/*/conformance/attribs/gl-vertexattribpointer.html,
LayoutTests/webgl/2.0.0/conformance/more/functions/vertexAttribPointerBadArgs.html,
and other conformance/attribs/* tests not included in LayoutTests.
LayoutTests/webgl/1.0.2/conformance/more/functions/vertexAttribPointerBadArgs.html
fails as expected because it is an old snapshot of an incorrect test.

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::validateVertexAttributes):
(WebCore::WebGLRenderingContextBase::vertexAttribPointer):

  • html/canvas/WebGLVertexArrayObjectBase.cpp:

(WebCore::WebGLVertexArrayObjectBase::setVertexAttribState):

  • html/canvas/WebGLVertexArrayObjectBase.h:
8:09 AM Changeset in webkit [249006] by Wenson Hsieh
  • 16 edits
    2 adds in trunk

Typing Korean in title field after typing in the body inserts extraneous characters on blog.naver.com
https://bugs.webkit.org/show_bug.cgi?id=201023
<rdar://problem/54294794>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Ensures that we recognize the blog editor on blog.naver.com to be a hidden editable area. This website places
focus inside an editable body element of a subframe that is completely empty (width: 0 and border: 0). See the
WebKit ChangeLog for more details.

Test: editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects const):

Source/WebKit:

After r242833, we began to avoid sending redundant ElementDidFocus updates in the case where a focused element
was blurred and refocused within the same runloop. This was done to prevent the input view from flickering due
to input view reloading, as well as scrolling to reveal the focused element, when tapping to change selection on
Microsoft Word online.

However, on blog.naver.com, these ElementDidFocus messages were necessary in order to ensure that the platform
input context changes when moving between the title and body fields, or when tapping to change selection. This
is because blog.naver.com uses a hidden contenteditable area under a subframe (see WebCore ChangeLog for more
detail here). While text is never directly inserted into this hidden contenteditable, the events are observed
and used to "play back" editing in the main visible content area.

Thus, when moving between the title and body fields (or when changing selection within either), the only hint we
get is that the hidden editable element is blurred and immediately refocused. Since we no longer send
ElementDidFocus updates in this scenario, UIKeyboardImpl and kbd are not aware that the page has effectively
changed input contexts.

Combined with the fact that Korean IME on iOS may insert additional text given the document context (i.e. text
that the input manager, kbd, thinks we've previously inserted), this means that when typing several characters
into the body field on naver and then switching to edit the title, initial keystrokes may insert unexpected
text in the title field.

To fix this, we add some hooks to notify the UI process when an element that was blurred has been immediately
refocused. Upon receiving this message, the UI process then tells UIKeyboardImpl to re-retrieve its input
context, which calls into -requestAutocorrectionContextWithCompletionHandler: in WKContentView. While notorious
for being synchronous IPC, this is mitigated by (1) being limiting to only instances where we have a hidden
editable area, and (2) being limited by a batching mechanism in the web process, such that if the focused
element is blurred, refocused, re-blurred, and refocused many times in the same runloop, we'll only send a
single UpdateInputContextAfterBlurringAndRefocusingElement message (as opposed to the many ElementDidFocus
messages we would've sent in previous releases).

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:

Add a new mechanism to update the platform input context (on iOS, UIKeyboardImpl's document state) when focus
moves away from and immediately returns to a hidden editable element.

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

(WebKit::PageClientImpl::updateInputContextAfterBlurringAndRefocusingElement):

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

(-[WKContentView _updateInputContextAfterBlurringAndRefocusingElement]):

Tell the active UIKeyboardImpl to refetch document state from the WKContentView. While this does result in a new
autocorrection context request (which, unfortunately, triggers synchronous IPC to the web process), this request
would've still happened anyways in the case where we would previously have sent an ElementDidFocus message.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::updateInputContextAfterBlurringAndRefocusingElement):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::elementDidFocus):

In the case where we avoid sending a full ElementDidFocus message to the UI process due to refocusing the same
element, we should still notify the UI process so that it can synchronize state between the application process
and kbd. See above for more details.

(WebKit::WebPage::elementDidBlur):
(WebKit::WebPage::updateInputContextAfterBlurringAndRefocusingElementIfNeeded):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::updateInputContextAfterBlurringAndRefocusingElementIfNeeded):

LayoutTests:

Add a new layout test to verify that we suppress text interactions when focusing an editable element inside an
empty, borderless subframe.

  • editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe-expected.txt: Added.
  • editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe.html: Added.
6:42 AM Changeset in webkit [249005] by mitz@apple.com
  • 9 copies
    1 add in releases/Apple/Safari Technology Preview/Safari Technology Preview 90

Added a tag for Safari Technology Preview release 90.

4:41 AM Changeset in webkit [249004] by clopez@igalia.com
  • 3 edits in trunk/Tools

[GTK][WPE] Support for command "--version" on the MiniBrowser (follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=200978

Unreviewed follow-up fix.

Update the string format specifier for unsigned it.

Patch by clopez@igalia.com <clopez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc> on 2019-08-22

  • MiniBrowser/gtk/main.c:

(main):

  • MiniBrowser/wpe/main.cpp:

(main):

4:18 AM Changeset in webkit [249003] by clopez@igalia.com
  • 3 edits in trunk/Tools

[GTK][WPE] Support for command "--version" on the MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=200978

Reviewed by Žan Doberšek.

Printing the engine version used from the MiniBrowser is useful.
For example, the test scripts on WPT can use this info to better
tag the generated results.

  • MiniBrowser/gtk/main.c: Print the engine version when called with --version or -v.

(main):

  • MiniBrowser/wpe/main.cpp: Ditto.

(main):

4:05 AM Changeset in webkit [249002] by youenn@apple.com
  • 5 edits in trunk/Source/WebCore

CaptureDeviceManager does not need to be CanMakeWeakPtr
https://bugs.webkit.org/show_bug.cgi?id=200936

Reviewed by Alex Christensen.

CaptureDeviceManager does not need to create a weak pointer in deviceChanged
since it directly calls RealtimeMediaSourceCenter singleton.

CoreAudioCaptureDeviceManager does not need to create a weak pointer since its only
instance is NeverDestroyed.
No change of behavior.

  • platform/mediastream/CaptureDeviceManager.cpp:

(WebCore::CaptureDeviceManager::deviceChanged):

  • platform/mediastream/CaptureDeviceManager.h:
  • platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:

(WebCore::createAudioObjectPropertyListenerBlock):
(WebCore::CoreAudioCaptureDeviceManager::coreAudioCaptureDevices):
(WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices):

  • platform/mediastream/mac/CoreAudioCaptureDeviceManager.h:
4:05 AM Changeset in webkit [249001] by youenn@apple.com
  • 34 edits
    2 copies
    3 adds in trunk

Add a WebsiteDataStore delegate to handle AuthenticationChallenge that do not come from pages
https://bugs.webkit.org/show_bug.cgi?id=196870

Reviewed by Alex Christensen.

Source/WebKit:

Make NetworkProcess provide the session ID for any authentication challenge.
In case there is no associated page for the authentication challenge or this is related to a service worker,
ask the website data store to take a decision.
Add website data store delegate to allow applications to make the decision.
Restrict using the delegate to server trust evaluation only.

Make ping loads reuse the same mechanism.

Covered by service worker tests and updated beacon test.

  • NetworkProcess/NetworkCORSPreflightChecker.cpp:

(WebKit::NetworkCORSPreflightChecker::didReceiveChallenge):

  • NetworkProcess/NetworkDataTask.cpp:

(WebKit::NetworkDataTask::sessionID const):

  • NetworkProcess/NetworkDataTask.h:
  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::didReceiveChallenge):

  • NetworkProcess/NetworkLoadChecker.h:

(WebKit::NetworkLoadChecker::networkProcess):

  • NetworkProcess/PingLoad.cpp:

(WebKit::PingLoad::didReceiveChallenge):

  • Shared/Authentication/AuthenticationManager.cpp:

(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):

  • Shared/Authentication/AuthenticationManager.h:
  • Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.h: Copied from Tools/WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.h.
  • Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.mm: Copied from Source/WebKit/Shared/Authentication/cocoa/ClientCertificateAuthenticationXPCConstants.h.

(WebKit::toAuthenticationChallengeDisposition):

  • SourcesCocoa.txt:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(WebsiteDataStoreClient::WebsiteDataStoreClient):

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

(WebKit::NavigationState::NavigationClient::didReceiveAuthenticationChallenge):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::didReceiveAuthenticationChallenge):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
  • UIProcess/ServiceWorkerProcessProxy.cpp:
  • UIProcess/ServiceWorkerProcessProxy.h:
  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::isServiceWorkerPageID const):

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebsiteData/WebsiteDataStoreClient.h:

(WebKit::WebsiteDataStoreClient::didReceiveAuthenticationChallenge):

  • WebKit.xcodeproj/project.pbxproj:

Tools:

Implement the new delegate by respecting the value set by testRunner.setAllowsAnySSLCertificate
Accept any server certificate by default.

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

(WTR::TestController::cocoaResetStateToConsistentValues):
(WTR::TestController::setAllowsAnySSLCertificate):

  • WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.h:
  • WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.mm:

(-[TestWebsiteDataStoreDelegate didReceiveAuthenticationChallenge:completionHandler:]):
(-[TestWebsiteDataStoreDelegate setAllowAnySSLCertificate:]):

LayoutTests:

Add tests to validate that the delegate decision is respected for beacons and service worker loads.

  • http/wpt/beacon/cors/crossorigin-arraybufferview-no-preflight-expected.txt:
  • http/wpt/beacon/cors/crossorigin-arraybufferview-no-preflight.html:
  • http/wpt/beacon/resources/beacon-preflight.py:

(main):

  • http/wpt/service-workers/resources/lengthy-pass.py:

(main):

  • http/wpt/service-workers/server-trust-evaluation.https-expected.txt: Added.
  • http/wpt/service-workers/server-trust-evaluation.https.html: Added.
  • http/wpt/service-workers/server-trust-worker.js: Added.
2:41 AM Changeset in webkit [249000] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Fix unsafe usage of MediaStreamTrackPrivate from background thread in MediaStreamTrackPrivate::audioSamplesAvailable()
https://bugs.webkit.org/show_bug.cgi?id=200924

Reviewed by Youenn Fablet.

MediaStreamTrackPrivate is constructed / destructed on the main thread but its MediaStreamTrackPrivate::audioSamplesAvailable()
gets called on a background thread. The audioSamplesAvailable() method may get called until the MediaStreamTrackPrivate
destructor unregisters |this| as an observer from m_source. Event though MediaStreamTrackPrivate subclasses ThreadSafeRefCounted,
ref'ing |this| on the background thread inside audioSamplesAvailable() is still unsafe as the destructor may already be running
on the main thread.

  • platform/mediastream/MediaStreamTrackPrivate.cpp:

(WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate):
(WebCore::MediaStreamTrackPrivate::~MediaStreamTrackPrivate):
(WebCore::MediaStreamTrackPrivate::audioSamplesAvailable):

  • platform/mediastream/MediaStreamTrackPrivate.h:
2:40 AM Changeset in webkit [248999] by Claudio Saavedra
  • 2 edits in trunk/Source/WebKit

[SOUP] NetworkProcessSoup does not initialize CacheOptions correctly
https://bugs.webkit.org/show_bug.cgi?id=200886

Reviewed by Philippe Normand.

r247567 wrongly initializes CacheOptions in a local variable that is never used
instead of using NetworkProcess's member variable, that is later used by the
NetworkSession to initialize the cache.

  • NetworkProcess/soup/NetworkProcessSoup.cpp:

(WebKit::NetworkProcess::platformInitializeNetworkProcess):

2:12 AM Changeset in webkit [248998] by Fujii Hironori
  • 9 edits in trunk/Source/WebCore

Remove the dead code of ScalableImageDecoder for scaling
https://bugs.webkit.org/show_bug.cgi?id=200498

Reviewed by Daniel Bates.

No ports are using the down scaling feature of
ScalableImageDecoder now. Removed it.

No behavior change.

  • platform/image-decoders/ScalableImageDecoder.cpp:

(WebCore::ScalableImageDecoder::prepareScaleDataIfNecessary): Deleted.
(WebCore::ScalableImageDecoder::upperBoundScaledX): Deleted.
(WebCore::ScalableImageDecoder::lowerBoundScaledX): Deleted.
(WebCore::ScalableImageDecoder::upperBoundScaledY): Deleted.
(WebCore::ScalableImageDecoder::lowerBoundScaledY): Deleted.
(WebCore::ScalableImageDecoder::scaledY): Deleted.

  • platform/image-decoders/ScalableImageDecoder.h:

(WebCore::ScalableImageDecoder::scaledSize): Deleted.

  • platform/image-decoders/gif/GIFImageDecoder.cpp:

(WebCore::GIFImageDecoder::setSize):
(WebCore::GIFImageDecoder::findFirstRequiredFrameToDecode):
(WebCore::GIFImageDecoder::haveDecodedRow):
(WebCore::GIFImageDecoder::frameComplete):
(WebCore::GIFImageDecoder::initFrameBuffer):

  • platform/image-decoders/jpeg/JPEGImageDecoder.cpp:

(WebCore::JPEGImageDecoder::outputScanlines):
(WebCore::JPEGImageDecoder::setSize): Deleted.

  • platform/image-decoders/jpeg/JPEGImageDecoder.h:
  • platform/image-decoders/jpeg2000/JPEG2000ImageDecoder.cpp:

(WebCore::JPEG2000ImageDecoder::decode):

  • platform/image-decoders/png/PNGImageDecoder.cpp:

(WebCore::PNGImageDecoder::rowAvailable):
(WebCore::PNGImageDecoder::initFrameBuffer):
(WebCore::PNGImageDecoder::frameComplete):
(WebCore::PNGImageDecoder::setSize): Deleted.

  • platform/image-decoders/png/PNGImageDecoder.h:
Note: See TracTimeline for information about the timeline view.