Timeline



Nov 18, 2019:

10:30 PM Changeset in webkit [252623] by wilander@apple.com
  • 13 edits
    2 adds in trunk

Check if ITP is on before applying third-party cookie blocking
https://bugs.webkit.org/show_bug.cgi?id=204322
<rdar://problem/57120772>

Reviewed by Chris Dumez and Alexey Proskuryakov.

Source/WebCore:

This change makes sure WebCore::NetworkStorageSession knows
whether ITP is on or off and checks that first thing in
WebCore::NetworkStorageSession::shouldBlockCookies().

This check was never needed before since if ITP was off,
there would be no classified domains and thus the function
would always return false. However,
https://trac.webkit.org/changeset/251353/webkit introduced
full third-party cookie blocking for websites without user
interaction and that rule is checked before checking domain
classification. The effect was unconditional third-party
cookie blocking if ITP is off. This changes fixes that bug.

Note that this patch already landed as branch-specific in
https://trac.webkit.org/changeset/252549/webkit

Test: http/tests/resourceLoadStatistics/no-third-party-cookie-blocking-when-itp-is-off.html

  • platform/network/NetworkStorageSession.cpp:

(WebCore::NetworkStorageSession::shouldBlockThirdPartyCookies const):
(WebCore::NetworkStorageSession::shouldBlockThirdPartyCookiesButKeepFirstPartyCookiesFor const):
(WebCore::NetworkStorageSession::shouldBlockCookies const):

Now checks whether ITP is on or off.

  • platform/network/NetworkStorageSession.h:

(WebCore::NetworkStorageSession::setResourceLoadStatisticsEnabled):

Source/WebKit:

This change makes sure WebCore::NetworkStorageSession knows
whether ITP is on or off and checks that first thing in
WebCore::NetworkStorageSession::shouldBlockCookies().

This check was never needed before since if ITP was off,
there would be no classified domains and thus the function
would always return false. However,
https://trac.webkit.org/changeset/251353/webkit introduced
full third-party cookie blocking for websites without user
interaction and that rule is checked before checking domain
classification. The effect was unconditional third-party
cookie blocking if ITP is off. This changes fixes that bug.

Note that this patch already landed as branch-specific in
https://trac.webkit.org/changeset/252549/webkit

  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::setResourceLoadStatisticsEnabled):

Now tells WebCore::NetworkStorageSession the status of
ITP.

Tools:

This is test infrastructure to allow a layout test to
disable ITP in the network process.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setStatisticsEnabled):
(WTR::TestRunner::setStatisticsDebugMode):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::setStatisticsEnabled):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

  • http/tests/resourceLoadStatistics/no-third-party-cookie-blocking-when-itp-is-off-expected.txt: Added.
  • http/tests/resourceLoadStatistics/no-third-party-cookie-blocking-when-itp-is-off.html: Added.
7:38 PM Changeset in webkit [252622] by Simon Fraser
  • 3 edits
    2 adds in trunk

-webkit-font-smoothing: none leaves subsequent elements unantialiased
https://bugs.webkit.org/show_bug.cgi?id=204334

Reviewed by Myles C. Maxfield.

Source/WebCore:

FontCascade::drawGlyphs() never called context.setShouldAntialias(true) for the
FontSmoothingMode::AutoSmoothing state, leaving it off for later elements.

Fix this function to save and restore antialiasing and smoothing in similar ways, and rather
than handle FontSmoothingMode::AutoSmoothing as "do nothing and let the platform decide"
(which caused this bug), explicitly treat it as equivalent to
FontSmoothingMode::SubpixelAntialiased. Note that FontSmoothingMode::SubpixelAntialiased
does not render with subpixel antialiasing on macOS Mojave and later.

Test: fast/text/font-antialiasing-save-restore.html

  • platform/graphics/cocoa/FontCascadeCocoa.mm:

(WebCore::FontCascade::drawGlyphs):

LayoutTests:

  • fast/text/font-antialiasing-save-restore-expected.html: Added.
  • fast/text/font-antialiasing-save-restore.html: Added.
7:29 PM Changeset in webkit [252621] by basuke.suzuki@sony.com
  • 3 edits in trunk/Source/bmalloc

[bmalloc] Some chunks have unused region in the tail of its memory block.
https://bugs.webkit.org/show_bug.cgi?id=204286

Reviewed by Yusuke Suzuki.

When chunk is initialized, some amount of memory are not used and be kept untouched until its end.
This patch tries to decommit those region at the end of initialization.

For instance, think about the case that the pageClass is 5. Then pageSize is 24k. With this pageSize,
a chunk can hold 42 pages and its size is 24k * 42 = 1008k which is smaller than chunkSize = 1024k.
Here is the complete result:

page page page
class size count remainings
----------------------------------
0 4kB 256 0
1 8kB 128 0
2 12kB 85 4kB
3 16kB 64 0
4 20kB 51 4kB
5 24kB 42 16kB
6 28kB 36 16kB
7 32kB 32 0
8 36kB 28 16kB
9 40kB 25 24kB
10 44kB 23 12kB
11 48kB 21 16kB
12 52kB 19 36kB
13 56kB 18 16kB
14 60kB 17 4kB
15 64kB 16 0

Tested on Mac testmem and result is almost same or in error margin.

Before: After:
end score: 8.5425 MB end score: 8.5127 MB
peak score: 8.7997 MB peak score: 8.7884 MB
total memory score: 8.6702 MB total memory score: 8.6495 MB
time score: 668.19 ms time score: 666.27 ms

  • bmalloc/Chunk.h:

(bmalloc::Chunk::metadataSize):
(bmalloc::forEachPage):

  • bmalloc/Heap.cpp:

(bmalloc::Heap::allocateSmallChunk):

7:16 PM Changeset in webkit [252620] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

Flex layout triggers excessive layout on height percentage descendants
https://bugs.webkit.org/show_bug.cgi?id=204319
<rdar://problem/57236652>

Reviewed by Simon Fraser.

This is very similar to r252562, except in this case the layout is explicitly triggered by the flex layout logic.
The patch ensures that we don't try to lay out percent height descendants with out-of-flow ancestors (see r252562 or webkit.org/b/204255 for more info).
(Unfortunately this is not testable but the subsequent repaint fix will include a test which would fail if we regressed this.)

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::hasPercentHeightDescendants const):
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren):

  • rendering/RenderFlexibleBox.h:
6:50 PM Changeset in webkit [252619] by ddkilzer@apple.com
  • 3 edits in trunk/Source/WebKit

IPC::Decoder should use nullptr as invalid value
<https://webkit.org/b/203880>
<rdar://problem/53159906>

Reviewed by Brent Fulgham.

Covered by existing tests.

  • Platform/IPC/Decoder.cpp:

(IPC::alignedBufferIsLargeEnoughToContain): Add bufferStart
parameter to add beginning bounds check now that m_bufferPos
uses nullptr for an invalid value.
(IPC::Decoder::alignBufferPosition): Update to pass m_buffer to
IPC::alignedBufferIsLargeEnoughToContain().
(IPC::Decoder::bufferIsLargeEnoughToContain const): Ditto.

  • Platform/IPC/Decoder.h:

(IPC::Decoder::isInvalid const): Add beginning bounds check now
that m_bufferPos uses nullptr for an invalid value.
(IPC::Decoder::markInvalid): Make nullptr the invalid value for
m_bufferPos.

6:47 PM Changeset in webkit [252618] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Always enable Optional<OptionsStorage::Size> parse(const char* string) for OS(DARWIN).
https://bugs.webkit.org/show_bug.cgi?id=204333
<rdar://problem/57303785>

Reviewed by Yusuke Suzuki.

On OS(DARWIN), the compiler does not consider size_t and unsigned to be the same
type, even for 32-bit targets. Hence, we need the size_t version of the function
in addition to the unsigned version.

  • runtime/Options.cpp:

(JSC::parse):

6:32 PM Changeset in webkit [252617] by Fujii Hironori
  • 2 edits in trunk/Tools

[Win] kill-old-processes should kill WebKitWebProcess.exe and WebKitNetworkProcess.exe
https://bugs.webkit.org/show_bug.cgi?id=204337

Reviewed by Ross Kirsling.

  • BuildSlaveSupport/kill-old-processes:

(main): Removed WebKit2WebProcess.exe, and added WebKitWebProcess.exe and WebKitNetworkProcess.exe to
tasksToKillWin.

5:51 PM Changeset in webkit [252616] by Jonathan Bedard
  • 7 edits in trunk/Tools

Python 3: Support run-api-tests
https://bugs.webkit.org/show_bug.cgi?id=204252

Rubber-stamped by Aakash Jain.

  • Scripts/webkitpy/api_tests/manager.py:

(Manager._collect_tests): Use items over iteritems.
(Manager._print_tests_result_with_status): Use compatible iteritems.
(Manager.run): Use range over xrange, use compatible iteritems.

  • Scripts/webkitpy/api_tests/runner.py:

(Runner.run): Use compatible iteritems.
(Runner.result_map_by_status): Ditto.
(_Worker._run_single_test): Server process returns byte arrays, not strings.
(_Worker.handle): Use items over iteritems, use range over xrange.

  • Scripts/webkitpy/common/message_pool.py:

(_MessagePool.run): Use range over xrange.
(_MessagePool._start_workers): Ditto.

  • Scripts/webkitpy/common/multiprocessing_bootstrap.py: Remove version check.
  • Scripts/webkitpy/port/base.py:

(Port.check_api_test_build):Use items over iteritems.
(Port.commits_for_upload): Ditto.

  • Scripts/webkitpy/port/server_process.py:

(ServerProcess._reset): Use byte array over string.
(ServerProcess._pop_stdout_line_if_ready): Check for bytes newline.
(ServerProcess._pop_stderr_line_if_ready): Ditto.

5:35 PM Changeset in webkit [252615] by Devin Rousso
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Elements: copying multiple DOM nodes should copy more than just the last selected node
https://bugs.webkit.org/show_bug.cgi?id=204266

Reviewed by Brian Burg.

  • UserInterface/Views/DOMTreeContentView.js:

(WI.DOMTreeContentView.prototype.async handleCopyEvent): Added.
(WI.DOMTreeContentView.prototype.handleCopyEvent): Deleted.
Call DOM.getOuterHTML for each selected DOM node and join the results with newlines.

  • UserInterface/Models/DOMNode.js:

(WI.DOMNode.prototype.getOuterHTML):
(WI.DOMNode.prototype.copyNode): Deleted.
(WI.DOMNode.prototype.copyNode.copy): Deleted.

  • UserInterface/Views/DOMTreeElement.js:

(WI.DOMTreeElement.prototype.populateDOMNodeContextMenu):
(WI.DOMTreeElement.prototype._copyHTML): Deleted.
Simplify API surface.

5:30 PM Changeset in webkit [252614] by Devin Rousso
  • 16 edits in trunk

Web Inspector: Local Resource Overrides: allow substitution based on a url pattern
https://bugs.webkit.org/show_bug.cgi?id=202375

Reviewed by Brian Burg.

Source/JavaScriptCore:

Often, websites will load content with a timestamp-based URL query parameter for
cache-busting or logging purposes. If a developer is trying to override these resources (or
is trying to have an existing override also match these resources), they'd need to edit the
local override's URL to match in addition to editing the resource that loads it (e.g. change
the <script> in an HTML file), which can sometimes be tricky of the content is dynamically
loaded (e.g. an XHR with a non-hardcoded URL).

Allowing for local overrides to be set using a regular expression pattern would help resolve
this limitation.

  • inspector/protocol/Network.json:

Add isRegex parameter to Network.addInterception and Network.removeInterception.

Source/WebCore:

Test: http/tests/inspector/network/local-resource-override-isRegex.html

Often, websites will load content with a timestamp-based URL query parameter for
cache-busting or logging purposes. If a developer is trying to override these resources (or
is trying to have an existing override also match these resources), they'd need to edit the
local override's URL to match in addition to editing the resource that loads it (e.g. change
the <script> in an HTML file), which can sometimes be tricky of the content is dynamically
loaded (e.g. an XHR with a non-hardcoded URL).

Allowing for local overrides to be set using a regular expression pattern would help resolve
this limitation.

  • inspector/agents/InspectorNetworkAgent.h:

(WebCore::InspectorNetworkAgent::Intercept): Added.
(WebCore::InspectorNetworkAgent::Intercept::operator== const): Added.

  • inspector/agents/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::disable):
(WebCore::InspectorNetworkAgent::shouldIntercept): Added.
(WebCore::InspectorNetworkAgent::addInterception):
(WebCore::InspectorNetworkAgent::removeInterception):
(WebCore::InspectorNetworkAgent::willInterceptRequest):
(WebCore::InspectorNetworkAgent::shouldInterceptResponse):

Source/WebInspectorUI:

Often, websites will load content with a timestamp-based URL query parameter for
cache-busting or logging purposes. If a developer is trying to override these resources (or
is trying to have an existing override also match these resources), they'd need to edit the
local override's URL to match in addition to editing the resource that loads it (e.g. change
the <script> in an HTML file), which can sometimes be tricky of the content is dynamically
loaded (e.g. an XHR with a non-hardcoded URL).

Allowing for local overrides to be set using a regular expression pattern would help resolve
this limitation.

  • UserInterface/Models/LocalResourceOverride.js:

(WI.LocalResourceOverride):
(WI.LocalResourceOverride.create):
(WI.LocalResourceOverride.fromJSON):
(WI.LocalResourceOverride.prototype.toJSON):
(WI.LocalResourceOverride.prototype.get isCaseSensitive): Added.
(WI.LocalResourceOverride.prototype.get isRegex): Added.
(WI.LocalResourceOverride.prototype.matches): Added.
(WI.LocalResourceOverride.prototype.saveIdentityToCookie):

  • UserInterface/Controllers/NetworkManager.js:

(WI.NetworkManager):
(WI.NetworkManager.prototype.initializeTarget):
(WI.NetworkManager.prototype.get localResourceOverrides):
(WI.NetworkManager.prototype.addLocalResourceOverride):
(WI.NetworkManager.prototype.removeLocalResourceOverride):
(WI.NetworkManager.prototype.localResourceOverrideForURL):
(WI.NetworkManager.prototype.responseIntercepted):

  • UserInterface/Views/LocalResourceOverridePopover.js:

(WI.LocalResourceOverridePopover):
(WI.LocalResourceOverridePopover.prototype.get serializedData):
(WI.LocalResourceOverridePopover.prototype.show):
(WI.LocalResourceOverridePopover.prototype._createEditor):

  • UserInterface/Views/LocalResourceOverrideTreeElement.js:

(WI.LocalResourceOverrideTreeElement.prototype.get mainTitleText): Added.
(WI.LocalResourceOverrideTreeElement.prototype.onattach):
(WI.LocalResourceOverrideTreeElement.prototype.ondetach):
(WI.LocalResourceOverrideTreeElement.prototype.populateContextMenu):
(WI.LocalResourceOverrideTreeElement.prototype.willDismissPopover):

  • UserInterface/Views/SourcesNavigationSidebarPanel.js:

(WI.SourcesNavigationSidebarPanel.prototype._willDismissLocalOverridePopover):

LayoutTests:

  • http/tests/inspector/network/local-resource-override-basic.html:
  • http/tests/inspector/network/local-resource-override-basic-expected.txt:
5:12 PM Changeset in webkit [252613] by Alan Coon
  • 18 edits
    7 adds in branches/safari-608-branch

Apply patch. rdar://problem/57283569

5:12 PM Changeset in webkit [252612] by Alan Coon
  • 13 edits
    2 adds in branches/safari-608-branch

Apply patch. rdar://problem/57257755

5:12 PM Changeset in webkit [252611] by Alan Coon
  • 2 edits in branches/safari-608-branch/Source/WebKit

Apply patch. rdar://problem/57123571

5:12 PM Changeset in webkit [252610] by Alan Coon
  • 3 edits
    2 adds in branches/safari-608-branch

Cherry-pick r251680. rdar://problem/57283563

Hidden framesets should provide default edgeInfo value
https://bugs.webkit.org/show_bug.cgi?id=203506
<rdar://problem/56233726>

Reviewed by Simon Fraser.

Source/WebCore:

The grid information (and certain associated structures e.g. edegeInfo) for a frameset is updated through the layout() call.
When the used height/width computes to zero on a frameset child (frame or nested frameset), we don't run layout on the renderer thus
hidden nested framesets can only provide the default edge info.
This patch changes this behaviour and we now call layout on those hidden renderers the same way we do it on iOS.

Test: fast/frames/hidden-frameset.html

  • rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::edgeInfo const):

LayoutTests:

  • fast/frames/hidden-frameset-expected.txt: Added.
  • fast/frames/hidden-frameset.html: Added.

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

5:12 PM Changeset in webkit [252609] by Andres Gonzalez
  • 10 edits in trunk

Run AccessibilityController::rootElement on secondary thread to simulate HIServices during LayoutTests.
https://bugs.webkit.org/show_bug.cgi?id=204226

Reviewed by Chris Fleizach.

Source/WebCore:

No new tests, no new functionality.

Added AXObjectCahce::canUseSecondaryAXThread to support
WTR::AccessibilityController spawning of a secondary thread to simulate
execution of isolated tree code.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::canUseSecondaryAXThread):

  • accessibility/AXObjectCache.h:

Source/WebKit:

Added WKAccessibilityCanUseSecondaryAXThread to support
WTR::AccessibilityController spawning of a secondary thread to simulate
execution of isolated tree code.

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

(WKAccessibilityCanUseSecondaryAXThread):

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

Tools:

HIServices _AXUIElementUseSecondaryAXThread and _AXUIElementRequestServicedBySecondaryAXThread
do not work for WebKitTestRunner since this is calling directly into
WebCore/accessibility via JavaScript without going through HIServices.
Thus to simulate the behavior of HIServices, AccessibilityController is
spawning a secondary thread to service the JavaScript requests.
The very first request needs to be serviced in the main thread,
and all subsequent requests in the secondary thread. this is what
the behavior would be if using HIServices.
Once the IsolatedTree would be enabled, the first request has to be
served in the main thread in order to build the AXIsolatedTree.

  • WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:

(WTR::AccessibilityController::rootElement):
(WTR::AXThread::AXThread):
(WTR::AXThread::isCurrentThread):
(WTR::AXThread::dispatch):
(WTR::AXThread::dispatchBarrier):
(WTR::AXThread::singleton):
(WTR::AXThread::createThreadIfNeeded):
(WTR::AXThread::dispatchFunctionsFromAXThread):
(WTR::AXThread::initializeRunLoop):
(WTR::AXThread::wakeUpRunLoop):
(WTR::AXThread::threadRunLoopSourceCallback):

  • WebKitTestRunner/InjectedBundle/AccessibilityController.h:
  • WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:

(WTR::AXThread::initializeRunLoop):
(WTR::AXThread::wakeUpRunLoop):
(WTR::AXThread::threadRunLoopSourceCallback):

5:05 PM Changeset in webkit [252608] by Megan Gardner
  • 3 edits in trunk/LayoutTests

Update dismiss-picker-using-keyboard.html test to work on iPad correctly
https://bugs.webkit.org/show_bug.cgi?id=204257
<rdar://problem/57239690>

Reviewed by Wenson Hsieh.

The iPad does not use the keyboard to show the options for these form controls,
and instead uses a popover. This expands the test infrastructure to allow for
either iPhone or iPad functionality.

  • fast/forms/ios/dismiss-picker-using-keyboard.html:
  • resources/ui-helper.js:

(window.UIHelper.activateAndWaitForInputSessionAt.return.new.Promise.):
(window.UIHelper.waitForInputSessionToDismiss.return.new.Promise.):
(window.UIHelper.waitForInputSessionToDismiss.return.new.Promise):
(window.UIHelper.waitForInputSessionToDismiss):

4:54 PM Changeset in webkit [252607] by rniwa@webkit.org
  • 29 edits in trunk/Source/WebCore

Share more code between WindowEventLoop and WorkerEventLoop by introducing EventLoopTaskGroup
https://bugs.webkit.org/show_bug.cgi?id=204263

Reviewed by Antti Koivisto.

This patch abstracts the logic in WindowEventLoop to deal with a set of tasks associated with
a particular documents all suspending, resuming, or stopping at the same time using a new abstraction
called EventLoopTaskGroup in order to group tasks for media code and elsewhere.

Each task is now represented as an instance of a concrete subclass of EventLoopTask, which has
a pure virtual execute() member function. Its primary purpose is to know EventLoopTaskGroup to which
each task belongs. One of subclasss, EventLoopFunctionDispatchTask, is used to store a callback function
and another subclass, ActiveDOMObjectEventDispatchTask, is used to dispatch an async event.

ScriptExecutionContext's eventLoop() method now returns EventLoopTaskGroup. Because this group is
specific to a given ScriptExecutionContext, we no longer have to pass the ScriptExecutionContext
in each call to queueTask everywhere in our codebase.

For now, I kept all the code in WindowEventLoop.cpp to make the patch reviewable. My plan is to create
a new cpp file (e.g. AbstractEventLoop.cpp) and move most of code there instead as a follow up.

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

  • Modules/encryptedmedia/MediaKeys.cpp:

(WebCore::MediaKeys::setServerCertificate):

  • Modules/entriesapi/FileSystemDirectoryEntry.cpp:

(WebCore::FileSystemDirectoryEntry::getEntry):

  • Modules/entriesapi/FileSystemDirectoryReader.cpp:

(WebCore::FileSystemDirectoryReader::readEntries):

  • Modules/entriesapi/FileSystemEntry.cpp:

(WebCore::FileSystemEntry::getParent):

  • Modules/entriesapi/FileSystemFileEntry.cpp:

(WebCore::FileSystemFileEntry::file):

  • Modules/mediarecorder/MediaRecorder.cpp:

(WebCore::MediaRecorder::scheduleDeferredTask):

  • Modules/notifications/Notification.cpp:

(WebCore::Notification::queueTask):

  • Modules/webdatabase/Database.cpp:

(WebCore::Database::runTransaction):

  • Modules/webdatabase/DatabaseManager.cpp:

(WebCore::DatabaseManager::openDatabase):

  • Modules/webdatabase/SQLTransaction.cpp:

(WebCore::SQLTransaction::callErrorCallbackDueToInterruption):
(WebCore::SQLTransaction::deliverTransactionErrorCallback):
(WebCore::SQLTransaction::deliverSuccessCallback):

  • bindings/js/JSDOMPromiseDeferred.cpp:

(WebCore::DeferredPromise::callFunction):
(WebCore::DeferredPromise::whenSettled):

  • dom/AbstractEventLoop.h:

(WebCore::EventLoopTask): Added.
(WebCore::EventLoopTask::taskSource): Added.
(WebCore::EventLoopTask::group const): Added.
(WebCore::EventLoopTask::EventLoopTask): Added.
(WebCore::EventLoopTaskGroup): Added. This class represents a group of tasks. For now, each group is
a distinct ScriptExecutionContext.
(WebCore::EventLoopTaskGroup::matchesTask const): Added.
(WebCore::EventLoopTaskGroup::startRunning): Added.
(WebCore::EventLoopTaskGroup::stopAndDiscardAllTasks): Added.
(WebCore::EventLoopTaskGroup::suspend): Added.
(WebCore::EventLoopTaskGroup::resume): Added.
(WebCore::EventLoopTaskGroup::isStoppedPermanently): Added.
(WebCore::EventLoopTaskGroup::isSuspended): Added.
(WebCore::EventLoopTaskGroup::hasScheduledTasks const): Added.
(WebCore::EventLoopTaskGroup::queueTask): Added.

  • dom/ActiveDOMObject.cpp:

(WebCore::ActiveDOMObject::queueTaskInEventLoop):
(WebCore::ActiveDOMObjectEventDispatchTask): Added; A subclass of EventLoopTask to dispatch an async event.
(WebCore::ActiveDOMObjectEventDispatchTask::ActiveDOMObjectEventDispatchTask): Added.
(WebCore::ActiveDOMObjectEventDispatchTask::~ActiveDOMObjectEventDispatchTask): Added.
(WebCore::ActiveDOMObject::queueTaskToDispatchEventInternal): Added.

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

(WebCore::Document::suspendActiveDOMObjects):
(WebCore::Document::resumeActiveDOMObjects):
(WebCore::Document::stopActiveDOMObjects):
(WebCore::Document::eventLoop): Creates EventLoopTaskGroup for this document.

  • dom/Document.h:
  • dom/IdleCallbackController.cpp:

(WebCore::IdleCallbackController::queueTaskToStartIdlePeriod):
(WebCore::IdleCallbackController::queueTaskToInvokeIdleCallbacks):

  • dom/ScriptExecutionContext.h:
  • dom/WindowEventLoop.cpp:

(WebCore::AbstractEventLoop::queueTask): The implementation moved from WindowEventLoop to AbstractEventLoop.
(WebCore::AbstractEventLoop::suspend): Removed.
(WebCore::AbstractEventLoop::resumeGroup): Ditto.
(WebCore::AbstractEventLoop::stopGroup): Ditto.
(WebCore::WindowEventLoop::scheduleToRun): Renamed from WindowEventLoop::scheduleToRunIfNeeded.
(WebCore::AbstractEventLoop::scheduleToRunIfNeeded): Extracted from WindowEventLoop::scheduleToRunIfNeeded.
(WebCore::WindowEventLoop::isContextThread const): Added.
(WebCore::AbstractEventLoop::run): The implementation moved from WindowEventLoop to AbstractEventLoop.
(WebCore::AbstractEventLoop::clearAllTasks): Added.
(WebCore::EventLoopFunctionDispatchTask): Added; A subclass of EventLoopTask to call a function.
(WebCore::EventLoopFunctionDispatchTask::EventLoopFunctionDispatchTask): Added.
(WebCore::EventLoopTaskGroup::queueTask): Added.

  • dom/WindowEventLoop.h:
  • fileapi/FileReader.cpp:

(WebCore::FileReader::enqueueTask):

  • testing/Internals.cpp:

(WebCore::Internals::queueTask):

  • workers/WorkerEventLoop.cpp:

(WebCore::WorkerEventLoop::WorkerEventLoop):
(WebCore::WorkerEventLoop::queueTask): Deleted.
(WebCore::WorkerEventLoop::activeDOMObjectName const): Deleted.
(WebCore::WorkerEventLoop::suspend): Deleted.
(WebCore::WorkerEventLoop::resume): Deleted.
(WebCore::WorkerEventLoop::stop): Deleted.
(WebCore::WorkerEventLoop::scheduleToRun): Extracted from scheduleToRunIfNeeded.
(WebCore::WorkerEventLoop::scheduleToRunIfNeeded): Deleted.
(WebCore::WorkerEventLoop::run): Deleted.
(WebCore::WorkerEventLoop::isContextThread const): Added.

  • workers/WorkerEventLoop.h:

(WebCore::WorkerEventLoop): This class is no longer an active DOM object. WorkerGlobalScope and WorkerGlobalScope
manually stop the task group associated with it.

  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::eventLoop): Create the default task group for this script execution context.
(WebCore::WorkerGlobalScope::prepareForTermination): Stop the default task group.

  • workers/WorkerGlobalScope.h:
  • worklets/WorkletGlobalScope.cpp:

(WebCore::WorkletGlobalScope::prepareForDestruction): Similar to WorkerGlobalScope::prepareForTermination.
(WebCore::WorkletGlobalScope::eventLoop): Similar to WorkerGlobalScope::eventLoop.

  • worklets/WorkletGlobalScope.h:
4:53 PM Changeset in webkit [252606] by Jonathan Bedard
  • 3 edits in trunk/Tools

results.webkit.org: Uncollapsed failures shouldn't include runs with no failures
https://bugs.webkit.org/show_bug.cgi?id=204315

Rubber-stamped by Aakash Jain.

  • resultsdbpy/resultsdbpy/model/failure_context.py:

(FailureContext): Do not include test runs which have no failed tests.

  • resultsdbpy/resultsdbpy/model/failure_context_unittest.py:

(FailureContextTest):
(FailureContextTest.test_no_failures):

3:59 PM Changeset in webkit [252605] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Promote main thread assertions related to sendWithAsyncReply() to be release assertions
https://bugs.webkit.org/show_bug.cgi?id=204298

Reviewed by Wenson Hsieh.

Promote main thread assertions related to sendWithAsyncReply() to be release assertions, to help identify
threading bugs such as <rdar://problem/57231170>.

  • Platform/IPC/Connection.cpp:

(IPC::addAsyncReplyHandler):
(IPC::clearAsyncReplyHandlers):
(IPC::CompletionHandler<void):

3:44 PM Changeset in webkit [252604] by Alan Coon
  • 7 edits in tags/Safari-609.1.9.6/Source

Versioning.

3:42 PM Changeset in webkit [252603] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Dedicate ews116 to macOS-High-Sierra-Debug-Build-EWS queue
https://bugs.webkit.org/show_bug.cgi?id=204256

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/config.json:
3:37 PM Changeset in webkit [252602] by Alan Coon
  • 1 copy in tags/Safari-609.1.9.6

New tag.

3:31 PM Changeset in webkit [252601] by achristensen@apple.com
  • 5 edits in trunk/Source/WebKit

Fix assertion in layout test after r252492.
https://bugs.webkit.org/show_bug.cgi?id=204199

There is still a case in a test where there is no frame identifier, so keep the status quo.
This is a partial revert of r252492.
This fixes layout test http/tests/navigation/window-open-redirect-and-remove-opener.html

  • Shared/FrameInfoData.cpp:

(WebKit::FrameInfoData::decode):

  • Shared/FrameInfoData.h:
  • UIProcess/API/APIFrameInfo.cpp:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::createNewPage):

3:25 PM Changeset in webkit [252600] by Chris Dumez
  • 2 edits in trunk/Tools

TestWebKitAPI.ProcessSwap.QuickBackForwardNavigationWithPSON is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=199645
<rdar://problem/52856112>

Reviewed by Alex Christensen.

Make sure the test waits for the history navigations to complete before checking the
back/forward list.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
3:21 PM Changeset in webkit [252599] by Antti Koivisto
  • 15 edits
    4 moves in trunk/Source/WebCore

Move RuleSet to Style namespace
https://bugs.webkit.org/show_bug.cgi?id=204307

Reviewed by Zalan Bujtas.

Also move RuleFeature.
Move to style/ directory.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSDefaultStyleSheets.cpp:

(WebCore::CSSDefaultStyleSheets::loadFullDefaultStyle):
(WebCore::CSSDefaultStyleSheets::loadSimpleDefaultStyle):

  • css/CSSDefaultStyleSheets.h:
  • css/CSSStyleRule.cpp:

(WebCore::CSSStyleRule::setSelectorText):

  • css/ElementRuleCollector.cpp:

(WebCore::MatchRequest::MatchRequest):
(WebCore::ElementRuleCollector::ElementRuleCollector):
(WebCore::ElementRuleCollector::addMatchedRule):
(WebCore::ElementRuleCollector::collectSlottedPseudoElementRulesForSlot):
(WebCore::ElementRuleCollector::matchUARules):
(WebCore::ElementRuleCollector::ruleMatches):
(WebCore::ElementRuleCollector::collectMatchingRulesForList):
(WebCore::ElementRuleCollector::hasAnyMatchingRules):

  • css/ElementRuleCollector.h:
  • css/PageRuleCollector.cpp:

(WebCore::PageRuleCollector::matchPageRules):

  • css/PageRuleCollector.h:
  • css/StyleSheetContents.cpp:

(WebCore::StyleSheetContents::parserAppendRule):
(WebCore::StyleSheetContents::wrapperInsertRule):

  • style/RuleFeature.cpp: Renamed from Source/WebCore/css/RuleFeature.cpp.
  • style/RuleFeature.h: Renamed from Source/WebCore/css/RuleFeature.h.
  • style/RuleSet.cpp: Renamed from Source/WebCore/css/RuleSet.cpp.

(WebCore::Style::computeContainsUncommonAttributeSelector):
(WebCore::Style::RuleData::RuleData):
(WebCore::Style::RuleSet::addChildRules):
(WebCore::Style::RuleSet::addRulesFromSheet):

  • style/RuleSet.h: Renamed from Source/WebCore/css/RuleSet.h.
  • style/StyleInvalidator.h:
3:13 PM Changeset in webkit [252598] by Simon Fraser
  • 295 edits in trunk

LayoutTests/imported/w3c:
Fix alpha value rounding to match the CSS Color spec
https://bugs.webkit.org/show_bug.cgi?id=203597
<rdar://problem/56728546>

Reviewed by Tim Horton.

More passing results.

  • web-platform-tests/css/css-color/color-resolving-expected.txt:
  • web-platform-tests/css/css-color/parsing/color-computed-expected.txt:
  • web-platform-tests/css/css-color/parsing/color-valid-expected.txt:
  • web-platform-tests/css/css-multicol/inheritance-expected.txt:
  • web-platform-tests/css/css-text-decor/inheritance-expected.txt:
  • web-platform-tests/css/css-ui/caret-color-021-expected.txt:
  • web-platform-tests/css/css-ui/outline-017-expected.txt:
  • web-platform-tests/css/cssom/serialize-values-expected.txt:
  • web-platform-tests/imagebitmap-renderingcontext/context-creation-with-alpha-expected.txt: failure mode now matches Firefox and Chrome (webkit.org/b/204311)
  • web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:

Source/WebCore:
Fix alpha value rounding to match the CSS Color spec
https://bugs.webkit.org/show_bug.cgi?id=203597
<rdar://problem/56728546>

Reviewed by Tim Horton.

The serialization of CSS color alpha values is described at https://drafts.csswg.org/cssom/#serializing-css-values,
so implement that. Use 255 as the multiplication factor for float alpha values in the fast and slow
parser code paths.

Based on Chromium commit 13a86c2faeebcbc12dd4a7e8dea54318da635c19.

Tested by WPT and fast/css tests.

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::parseColorIntOrPercentage):
(WebCore::parseAlphaValue):

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::parseRGBParameters):

  • platform/graphics/Color.cpp:

(WebCore::Color::cssText const):

  • rendering/shapes/Shape.cpp:

(WebCore::Shape::createRasterShape): Alpha rounding for shapes has to match alpha rounding for colors.

Tools:
Fix alpha value rounding to match the CSS Color spec
https://bugs.webkit.org/show_bug.cgi?id=203597
<rdar://problem/56728546>

Reviewed by Tim Horton.

Fix the test for rounding.

  • TestWebKitAPI/Tests/mac/FontManagerTests.mm:

(TestWebKitAPI::TEST):

LayoutTests:
Fix color component rounding to match the CSS Color spec
https://bugs.webkit.org/show_bug.cgi?id=203597
<rdar://problem/56728546>

Reviewed by Tim Horton.

New results.

  • TestExpectations:
  • css3/calc/color-hsl-expected.txt:
  • css3/calc/color-rgb-expected.txt:
  • css3/filters/backdrop/backdrop-filter-with-clip-path-expected.txt:
  • displaylists/canvas-display-list-expected.txt:
  • editing/execCommand/query-command-value-background-color-expected.txt:
  • editing/execCommand/query-command-value-background-color.html:
  • fast/block/basic/fieldset-stretch-to-legend-expected.txt:
  • fast/block/float/relative-painted-twice-expected.txt:
  • fast/borders/border-image-trumps-radius-expected.txt:
  • fast/borders/border-left-right-same-bottom-different-color-expected.txt:
  • fast/borders/border-radius-groove-03-expected.txt:
  • fast/borders/border-radius-wide-border-03-expected.txt:
  • fast/borders/border-radius-wide-border-04-expected.txt:
  • fast/borders/borderRadiusDashed05-expected.txt:
  • fast/borders/borderRadiusDotted05-expected.txt:
  • fast/borders/borderRadiusDotted06-expected.txt:
  • fast/borders/borderRadiusDouble05-expected.txt:
  • fast/borders/borderRadiusDouble09-expected.txt:
  • fast/borders/fieldsetBorderRadius-expected.txt:
  • fast/canvas/rgba-parsing-expected.txt:
  • fast/canvas/rgba-parsing.html:
  • fast/css/apple-system-control-colors-expected.txt:
  • fast/css/paint-order-shadow-expected.html:
  • fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-color-expected.txt:
  • fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-color.html:
  • fast/frames/content-opacity-1-expected.txt:
  • fast/table/border-collapsing/collapsed-borders-adjoining-sections-vertical-rl-expected.txt:
  • fast/table/border-collapsing/collapsed-borders-painted-once-on-inner-cells-expected.txt:
  • media/modern-media-controls/background-tint/background-tint-expected.txt:
  • media/modern-media-controls/background-tint/background-tint.html:
  • media/modern-media-controls/button/button-focus-state-expected.txt:
  • media/modern-media-controls/button/button-focus-state.html:
  • platform/ios-simulator/imported/w3c/web-platform-tests/svg/import/color-prop-02-f-manual-expected.txt:
  • platform/ios-simulator/imported/w3c/web-platform-tests/svg/import/color-prop-03-t-manual-expected.txt:
  • platform/ios-wk2/editing/pasteboard/4641033-expected.txt:
  • platform/ios-wk2/editing/pasteboard/4944770-1-expected.txt:
  • platform/ios-wk2/editing/selection/caret-before-select-expected.txt:
  • platform/ios-wk2/fast/block/basic/011-expected.txt:
  • platform/ios-wk2/fast/block/margin-collapse/103-expected.txt:
  • platform/ios-wk2/fast/dom/HTMLTextAreaElement/reset-textarea-expected.txt:
  • platform/ios-wk2/fast/overflow/float-in-relpositioned-expected.txt:
  • platform/ios-wk2/fast/overflow/scroll-nested-positioned-layer-in-overflow-expected.txt:
  • platform/ios-wk2/fast/overflow/scrollRevealButton-expected.txt:
  • platform/ios-wk2/fast/spatial-navigation/snav-multiple-select-focusring-expected.txt:
  • platform/ios-wk2/fast/text/shadow-no-blur-expected.txt:
  • platform/ios-wk2/fast/text/shadow-translucent-fill-expected.txt:
  • platform/ios/TestExpectations:
  • platform/ios/compositing/images/direct-image-background-color-expected.txt:
  • platform/ios/compositing/overflow/theme-affects-visual-overflow-expected.txt:
  • platform/ios/compositing/webgl/webgl-background-color-expected.txt:
  • platform/ios/css1/box_properties/acid_test-expected.txt:
  • platform/ios/css2.1/t09-c5526c-display-00-e-expected.txt:
  • platform/ios/css3/flexbox/button-expected.txt:
  • platform/ios/css3/selectors3/html/css3-modsel-19b-expected.txt:
  • platform/ios/css3/selectors3/html/css3-modsel-64-expected.txt:
  • platform/ios/css3/selectors3/xhtml/css3-modsel-19b-expected.txt:
  • platform/ios/css3/selectors3/xhtml/css3-modsel-64-expected.txt:
  • platform/ios/css3/selectors3/xml/css3-modsel-19b-expected.txt:
  • platform/ios/css3/selectors3/xml/css3-modsel-64-expected.txt:
  • platform/ios/editing/selection/3690703-2-expected.txt:
  • platform/ios/editing/selection/3690703-expected.txt:
  • platform/ios/editing/selection/3690719-expected.txt:
  • platform/ios/editing/selection/4397952-expected.txt:
  • platform/ios/editing/selection/5240265-expected.txt:
  • platform/ios/editing/selection/replaced-boundaries-3-expected.txt:
  • platform/ios/editing/selection/select-box-expected.txt:
  • platform/ios/editing/selection/select-element-paragraph-boundary-expected.txt:
  • platform/ios/editing/selection/selection-button-text-expected.txt:
  • platform/ios/fast/backgrounds/background-leakage-expected.txt:
  • platform/ios/fast/backgrounds/background-leakage-transforms-expected.txt:
  • platform/ios/fast/block/float/float-avoidance-expected.txt:
  • platform/ios/fast/block/float/intruding-painted-twice-expected.txt:
  • platform/ios/fast/block/positioning/inline-block-relposition-expected.txt:
  • platform/ios/fast/borders/mixed-border-styles-expected.txt:
  • platform/ios/fast/borders/mixed-border-styles-radius-expected.txt:
  • platform/ios/fast/borders/mixed-border-styles-radius2-expected.txt:
  • platform/ios/fast/box-shadow/inset-box-shadow-radius-expected.txt:
  • platform/ios/fast/css/continuationCrash-expected.txt:
  • platform/ios/fast/css/margin-top-bottom-dynamic-expected.txt:
  • platform/ios/fast/css/non-standard-checkbox-size-expected.txt:
  • platform/ios/fast/css/percentage-non-integer-expected.txt:
  • platform/ios/fast/css/rtl-ordering-expected.txt:
  • platform/ios/fast/css/shadow-multiple-expected.txt:
  • platform/ios/fast/css/text-transform-select-expected.txt:
  • platform/ios/fast/css/viewport-units-dynamic-expected.txt:
  • platform/ios/fast/dom/HTMLTableColElement/resize-table-using-col-width-expected.txt:
  • platform/ios/fast/dynamic/positioned-movement-with-positioned-children-expected.txt:
  • platform/ios/fast/forms/001-expected.txt:
  • platform/ios/fast/forms/003-expected.txt:
  • platform/ios/fast/forms/004-expected.txt:
  • platform/ios/fast/forms/basic-inputs-expected.txt:
  • platform/ios/fast/forms/basic-selects-expected.txt:
  • platform/ios/fast/forms/blankbuttons-expected.txt:
  • platform/ios/fast/forms/box-shadow-override-expected.txt:
  • platform/ios/fast/forms/button-align-expected.txt:
  • platform/ios/fast/forms/button-cannot-be-nested-expected.txt:
  • platform/ios/fast/forms/button-generated-content-expected.txt:
  • platform/ios/fast/forms/button-positioned-expected.txt:
  • platform/ios/fast/forms/button-sizes-expected.txt:
  • platform/ios/fast/forms/button-style-color-expected.txt:
  • platform/ios/fast/forms/button-table-styles-expected.txt:
  • platform/ios/fast/forms/button-text-transform-expected.txt:
  • platform/ios/fast/forms/button-white-space-expected.txt:
  • platform/ios/fast/forms/control-clip-expected.txt:
  • platform/ios/fast/forms/control-clip-overflow-expected.txt:
  • platform/ios/fast/forms/control-restrict-line-height-expected.txt:
  • platform/ios/fast/forms/disabled-select-change-index-expected.txt:
  • platform/ios/fast/forms/file/file-input-direction-expected.txt:
  • platform/ios/fast/forms/file/file-input-disabled-expected.txt:
  • platform/ios/fast/forms/form-element-geometry-expected.txt:
  • platform/ios/fast/forms/formmove-expected.txt:
  • platform/ios/fast/forms/formmove2-expected.txt:
  • platform/ios/fast/forms/formmove3-expected.txt:
  • platform/ios/fast/forms/hidden-listbox-expected.txt:
  • platform/ios/fast/forms/input-appearance-height-expected.txt:
  • platform/ios/fast/forms/input-button-sizes-expected.txt:
  • platform/ios/fast/forms/input-value-expected.txt:
  • platform/ios/fast/forms/listbox-bidi-align-expected.txt:
  • platform/ios/fast/forms/listbox-hit-test-zoomed-expected.txt:
  • platform/ios/fast/forms/listbox-scrollbar-incremental-load-expected.txt:
  • platform/ios/fast/forms/listbox-width-change-expected.txt:
  • platform/ios/fast/forms/menulist-clip-expected.txt:
  • platform/ios/fast/forms/menulist-deselect-update-expected.txt:
  • platform/ios/fast/forms/menulist-narrow-width-expected.txt:
  • platform/ios/fast/forms/menulist-no-overflow-expected.txt:
  • platform/ios/fast/forms/menulist-option-wrap-expected.txt:
  • platform/ios/fast/forms/menulist-separator-painting-expected.txt:
  • platform/ios/fast/forms/menulist-style-color-expected.txt:
  • platform/ios/fast/forms/menulist-width-change-expected.txt:
  • platform/ios/fast/forms/option-script-expected.txt:
  • platform/ios/fast/forms/option-strip-whitespace-expected.txt:
  • platform/ios/fast/forms/option-text-clip-expected.txt:
  • platform/ios/fast/forms/select-align-expected.txt:
  • platform/ios/fast/forms/select-baseline-expected.txt:
  • platform/ios/fast/forms/select-block-background-expected.txt:
  • platform/ios/fast/forms/select-change-listbox-size-expected.txt:
  • platform/ios/fast/forms/select-change-listbox-to-popup-expected.txt:
  • platform/ios/fast/forms/select-change-popup-to-listbox-expected.txt:
  • platform/ios/fast/forms/select-dirty-parent-pref-widths-expected.txt:
  • platform/ios/fast/forms/select-disabled-appearance-expected.txt:
  • platform/ios/fast/forms/select-empty-option-height-expected.txt:
  • platform/ios/fast/forms/select-initial-position-expected.txt:
  • platform/ios/fast/forms/select-item-background-clip-expected.txt:
  • platform/ios/fast/forms/select-list-box-with-height-expected.txt:
  • platform/ios/fast/forms/select-non-native-rendering-direction-expected.txt:
  • platform/ios/fast/forms/select-selected-expected.txt:
  • platform/ios/fast/forms/select-style-expected.txt:
  • platform/ios/fast/forms/select-visual-hebrew-expected.txt:
  • platform/ios/fast/forms/select-writing-direction-natural-expected.txt:
  • platform/ios/fast/forms/select/optgroup-rendering-expected.txt:
  • platform/ios/fast/forms/selectlist-minsize-expected.txt:
  • platform/ios/fast/forms/stuff-on-my-optgroup-expected.txt:
  • platform/ios/fast/html/details-replace-summary-child-expected.txt:
  • platform/ios/fast/html/details-replace-text-expected.txt:
  • platform/ios/fast/html/keygen-expected.txt:
  • platform/ios/fast/inline/positionedLifetime-expected.txt:
  • platform/ios/fast/invalid/014-expected.txt:
  • platform/ios/fast/multicol/client-rects-expected.txt:
  • platform/ios/fast/multicol/client-rects-spanners-complex-expected.txt:
  • platform/ios/fast/multicol/client-rects-spanners-expected.txt:
  • platform/ios/fast/multicol/newmulticol/client-rects-expected.txt:
  • platform/ios/fast/parser/bad-xml-slash-expected.txt:
  • platform/ios/fast/replaced/replaced-breaking-expected.txt:
  • platform/ios/fast/replaced/replaced-breaking-mixture-expected.txt:
  • platform/ios/fast/replaced/three-selects-break-expected.txt:
  • platform/ios/fast/replaced/width100percent-button-expected.txt:
  • platform/ios/fast/replaced/width100percent-checkbox-expected.txt:
  • platform/ios/fast/replaced/width100percent-menulist-expected.txt:
  • platform/ios/fast/replaced/width100percent-radio-expected.txt:
  • platform/ios/fast/ruby/select-ruby-expected.txt:
  • platform/ios/fast/selectors/064-expected.txt:
  • platform/ios/fast/table/append-cells2-expected.txt:
  • platform/ios/fast/table/border-collapsing/equal-precedence-resolution-expected.txt:
  • platform/ios/fast/table/border-collapsing/equal-precedence-resolution-vertical-expected.txt:
  • platform/ios/fast/table/remove-td-display-none-expected.txt:
  • platform/ios/fast/text/international/bidi-listbox-atsui-expected.txt:
  • platform/ios/fast/text/international/bidi-listbox-expected.txt:
  • platform/ios/fast/text/international/bidi-menulist-expected.txt:
  • platform/ios/fast/text/international/hindi-spacing-expected.txt:
  • platform/ios/fast/text/international/pop-up-button-text-alignment-and-direction-expected.txt:
  • platform/ios/fast/text/whitespace/normal-after-nowrap-breaking-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:
  • platform/ios/ios/fast/borders/thin-lozenge-expected.txt:
  • platform/ios/svg/W3C-SVG-1.1/color-prop-02-f-expected.txt:
  • platform/ios/svg/W3C-SVG-1.1/color-prop-03-t-expected.txt:
  • platform/ios/svg/custom/foreign-object-skew-expected.txt:
  • platform/ios/svg/custom/inline-svg-in-xhtml-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug1188-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug1318-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug138725-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug18359-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug2479-2-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug2479-3-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug2479-4-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug26178-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug28928-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug29326-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug33855-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug39209-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug4382-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug4429-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug44505-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug4527-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug46368-1-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug46368-2-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug51037-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug51727-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug52505-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug52506-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug60749-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug68912-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug7342-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug92647-2-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug96334-expected.txt:
  • platform/ios/tables/mozilla/collapsing_borders/bug41262-4-expected.txt:
  • platform/ios/tables/mozilla/core/margins-expected.txt:
  • platform/ios/tables/mozilla/dom/tableDom-expected.txt:
  • platform/ios/tables/mozilla/other/move_row-expected.txt:
  • platform/ios/tables/mozilla_expected_failures/bugs/bug1725-expected.txt:
  • platform/ios/tables/mozilla_expected_failures/bugs/bug2479-5-expected.txt:
  • platform/ios/tables/mozilla_expected_failures/bugs/bug58402-2-expected.txt:
  • platform/ios/tables/mozilla_expected_failures/collapsing_borders/bug41262-5-expected.txt:
  • platform/ios/tables/mozilla_expected_failures/collapsing_borders/bug41262-6-expected.txt:
  • platform/ios/tables/mozilla_expected_failures/core/captions1-expected.txt:
  • platform/ios/tables/mozilla_expected_failures/core/captions2-expected.txt:
  • platform/ios/transforms/3d/point-mapping/3d-point-mapping-overlapping-expected.txt:
  • platform/mac-highsierra/fast/css/apple-system-control-colors-expected.txt:
  • platform/mac-mojave/fast/css/apple-system-control-colors-expected.txt:
  • platform/mac/compositing/images/direct-image-background-color-expected.txt:
  • platform/mac/compositing/webgl/webgl-background-color-expected.txt:
  • platform/mac/fast/backgrounds/background-leakage-expected.txt:
  • platform/mac/fast/backgrounds/background-leakage-transforms-expected.txt:
  • platform/mac/fast/block/basic/fieldset-stretch-to-legend-expected.txt:
  • platform/mac/fast/block/float/intruding-painted-twice-expected.txt:
  • platform/mac/fast/borders/fieldsetBorderRadius-expected.txt:
  • platform/mac/fast/borders/mixed-border-styles-expected.txt:
  • platform/mac/fast/borders/mixed-border-styles-radius-expected.txt:
  • platform/mac/fast/borders/mixed-border-styles-radius2-expected.txt:
  • platform/mac/fast/box-shadow/inset-box-shadow-radius-expected.txt:
  • platform/mac/fast/css/apple-system-control-colors-expected.txt:
  • platform/mac/fast/css/percentage-non-integer-expected.txt:
  • platform/mac/fast/css/shadow-multiple-expected.txt:
  • platform/mac/fast/css/viewport-units-dynamic-expected.txt:
  • platform/mac/fast/multicol/client-rects-expected.txt:
  • platform/mac/fast/multicol/client-rects-spanners-complex-expected.txt:
  • platform/mac/fast/multicol/client-rects-spanners-expected.txt:
  • platform/mac/fast/multicol/newmulticol/client-rects-expected.txt:
  • platform/mac/fast/overflow/float-in-relpositioned-expected.txt:
  • platform/mac/fast/ruby/select-ruby-expected.txt:
  • platform/mac/fast/table/border-collapsing/collapsed-borders-adjoining-sections-vertical-rl-expected.txt:
  • platform/mac/fast/table/border-collapsing/collapsed-borders-painted-once-on-inner-cells-expected.txt:
  • platform/mac/fast/table/border-collapsing/equal-precedence-resolution-expected.txt:
  • platform/mac/fast/table/border-collapsing/equal-precedence-resolution-vertical-expected.txt:
  • platform/mac/fast/text/shadow-no-blur-expected.txt:
  • platform/mac/fast/text/shadow-translucent-fill-expected.txt:
  • platform/mac/imported/w3c/web-platform-tests/svg/import/color-prop-02-f-manual-expected.txt:
  • platform/mac/imported/w3c/web-platform-tests/svg/import/color-prop-03-t-manual-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/color-prop-02-f-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/color-prop-03-t-expected.txt:
  • platform/mac/transforms/3d/point-mapping/3d-point-mapping-overlapping-expected.txt:
  • platform/win/TestExpectations:
  • svg/custom/fill-opacity-rgba-expected.txt:
  • svg/custom/mask-colorspace-expected.txt:
3:07 PM Changeset in webkit [252597] by Alan Coon
  • 8 edits in tags/Safari-609.1.10.2/Source/WebCore

Cherry-pick r252315. rdar://problem/57087756

[Clipboard API] Add some infrastructure to resolve ClipboardItems into pasteboard data for writing
https://bugs.webkit.org/show_bug.cgi?id=203707

Reviewed by Ryosuke Niwa.

Implements a new method that will be used in a future patch to aggregate data vended by ClipboardItems when
writing items to the platform pasteboard. See below for more details; no new tests, since there is no change in
behavior yet.

  • Modules/async-clipboard/ClipboardItem.cpp: (WebCore::ClipboardItem::collectDataForWriting):

Add a new virtual collectDataForWriting method, which is used when writing ClipboardItem data to the
pasteboard. This allows ClipboardItems to asynchronously convert data to a PasteboardCustomData after resolving
promises to strings or blobs; or alternately, cancel all data loading if a promise is rejected.

In order to convert items into a list of PasteboardCustomData, we do the following:

set up a PasteboardCustomData corresponding to each clipboard item
for each clipboard item:

for each type in the clipboard item:

try to resolve the promise
if the promise resolved to a string:

write the string to custom data under the type

if the promise resolved to a blob:

load the blob data as either text or an ArrayBuffer (depending on the type)
write either the loaded string or buffer to custom data under the type

if the promise rejected or resolved to an unsupported value, bail from these steps

  • Modules/async-clipboard/ClipboardItem.h:
  • Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp: (WebCore::documentFromClipboard): (WebCore::readTypeForMIMEType): (WebCore::ClipboardItemBindingsDataSource::collectDataForWriting): (WebCore::ClipboardItemBindingsDataSource::invokeCompletionHandler): (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::ClipboardItemTypeLoader): (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::~ClipboardItemTypeLoader):

Add a helper class to hold state associated with loading each clipboard type. This includes the final data
itself (a variant that holds either a String or Blob), as well as a FileReaderLoader which may be present in the
case where the clipboard item type resolves to a blob.

(WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::didFinishLoading):
(WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::didFail):

Each ClipboardItemType is also the client for its FileReaderLoader, if present; when the FileReaderLoader
finishes loading or fails, we then extract data from the loader and invoke the completion handler.

(WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::invokeCompletionHandler):
(WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::didResolveToBlob):
(WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::didFailToResolve):
(WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::didResolveToString):

One of these three methods is called when the promise corresponding to a clipboard type is either resolved or
rejected. If rejected or resolved to an incompatible type, we call the completion handler immediately with no
data; if we resolve to a string, we simply store the string in m_data and invoke the completion handler;
otherwise, if we resolve to a blob, we create a new loader to fetch either the string or data buffer for the
blob, and wait until either didFinishLoading or didFail is called.

  • Modules/async-clipboard/ClipboardItemBindingsDataSource.h: (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::create): (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::type): (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::data):
  • Modules/async-clipboard/ClipboardItemDataSource.h:
  • Modules/async-clipboard/ClipboardItemPasteboardDataSource.cpp: (WebCore::ClipboardItemPasteboardDataSource::collectDataForWriting):

For the time being, leave this unimplemented; a future patch will add support for writing ClipboardItems that
came from the platform pasteboard, as opposed to those created by the page.

  • Modules/async-clipboard/ClipboardItemPasteboardDataSource.h:

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

2:48 PM Changeset in webkit [252596] by Fujii Hironori
  • 2 edits in trunk/Source/WTF

Remove self-defined C++14 features in StdLibExtras.h
https://bugs.webkit.org/show_bug.cgi?id=204220

Reviewed by Ross Kirsling.

Remove std::conjunction, std::in_place_t and std::make_unique definitions.
Remove unsued std::clz.

  • wtf/StdLibExtras.h:

(std::make_unique): Deleted.
(std::exchange): Deleted.
(std::clz): Deleted.

2:41 PM Changeset in webkit [252595] by commit-queue@webkit.org
  • 6 edits in trunk/Source

Use SecTrustEvaluateWithError instead of SecTrustEvaluate where available
https://bugs.webkit.org/show_bug.cgi?id=204159
Source/WebCore:

<rdar://problem/45894288>

Patch by Alex Christensen <achristensen@webkit.org> on 2019-11-18
Reviewed by Darin Adler.

  • platform/network/cocoa/ResourceResponseCocoa.mm:

(WebCore::ResourceResponse::platformCertificateInfo const):

Source/WebKit:

Patch by Alex Christensen <achristensen@webkit.org> on 2019-11-18
Reviewed by Darin Adler.

  • UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:

(-[WKFullScreenWindowController _EVOrganizationName]):

Source/WTF:

<rdar://problem/45894288>

Patch by Alex Christensen <achristensen@webkit.org> on 2019-11-18
Reviewed by Darin Adler.

  • wtf/Platform.h:
2:34 PM Changeset in webkit [252594] by Alan Coon
  • 1 copy in tags/Safari-608.4.9.0.6

Tag Safari-608.4.9.0.6.

2:27 PM Changeset in webkit [252593] by Alan Coon
  • 7 edits in tags/Safari-609.1.10.1.1/Source

Versioning.

2:24 PM Changeset in webkit [252592] by Alan Coon
  • 1 copy in tags/Safari-609.1.10.1.1

New tag.

2:23 PM Changeset in webkit [252591] by Alan Coon
  • 7 edits in tags/Safari-609.1.10.1/Source

Revert "Versioning."

This reverts commit r252590.

2:21 PM Changeset in webkit [252590] by Alan Coon
  • 7 edits in tags/Safari-609.1.10.1/Source

Versioning.

1:58 PM Changeset in webkit [252589] by Alan Coon
  • 3 edits
    2 adds in tags/Safari-609.1.10.2

Cherry-pick r252478. rdar://problem/57045830

Crash when setting HTMLInputElement.checked for a disconnected radio button in a shadow root
https://bugs.webkit.org/show_bug.cgi?id=204208
<rdar://problem/57045830>

Reviewed by Tim Horton.

Source/WebCore:

r251110 refactored logic in RadioButtonGroup::updateCheckedState, such that it assumes that m_nameToGroupMap
always contains an entry for the given input element's name. Prior to r251110, it would bail if m_nameToGroupMap
didn't exist. In this particular case, a named input element is added to a shadow root that is disconnected from
the document. This means that in HTMLInputElement::didFinishInsertingNode(), we will avoid adding the element to
the radio button group, even though it has a tree scope due to the isConnected() check.

Later, when we try to set the checked attribute, we invoke updateCheckedState which sees that we have a tree
scope and assumes that we must have previously added the input element to the radio button map; this leads to a
nullptr deref, as the map is empty. Thus, to fix this, we change the isConnected() check to isInTreeScope().

Test: fast/forms/radio-input-in-shadow-root-crash.html

  • html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::didFinishInsertingNode):

LayoutTests:

Adds a new layout test to verify that we don't crash in this scenario.

  • fast/forms/radio-input-in-shadow-root-crash-expected.txt: Added.
  • fast/forms/radio-input-in-shadow-root-crash.html: Added.

2019-11-07 Youenn Fablet <youenn@apple.com>

Update libwebrtc to M78
https://bugs.webkit.org/show_bug.cgi?id=203897

Reviewed by Eric Carlson.

  • webrtc/simulcast-h264.html: Update test to remove rid information from answer.

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

1:58 PM Changeset in webkit [252588] by Alan Coon
  • 9 edits in tags/Safari-609.1.10.2/Source/WebCore

Cherry-pick r252470. rdar://problem/57005820

[iOS] Audio capture fails when a track is unmuted
https://bugs.webkit.org/show_bug.cgi?id=204202
<rdar://problem/57005820>

Reviewed by Youenn Fablet.

Tested manually.

  • platform/audio/PlatformMediaSession.cpp: (WebCore::PlatformMediaSession::canProduceAudioChanged): Remove unused "client" parameter.
  • platform/audio/PlatformMediaSessionManager.cpp: (WebCore::PlatformMediaSessionManager::sessionCanProduceAudioChanged): Ditto.
  • platform/audio/PlatformMediaSessionManager.h:
  • platform/audio/cocoa/MediaSessionManagerCocoa.h:
  • platform/audio/cocoa/MediaSessionManagerCocoa.mm: (MediaSessionManagerCocoa::sessionCanProduceAudioChanged): Ditto.
  • platform/mediastream/RealtimeMediaSource.cpp: (WebCore::RealtimeMediaSource::setMuted): Change m_muted before calling start/stop so the muted method will return the correct value.
  • platform/mediastream/mac/CoreAudioCaptureSource.cpp: (WebCore::CoreAudioSharedUnit::startInternal): Call sessionCanProduceAudioChanged before starting the audio unit so the audio session category is set correctly. ASSERT if the audio session category is incorrect.
  • platform/mock/MockRealtimeAudioSource.cpp: (WebCore::MockRealtimeAudioSource::startProducingData): Ditto.

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

1:58 PM Changeset in webkit [252587] by Alan Coon
  • 11 edits
    6 adds in tags/Safari-609.1.10.2

Cherry-pick r252450. rdar://problem/57087756

[Clipboard API] Add support for Clipboard.write()
https://bugs.webkit.org/show_bug.cgi?id=204078
<rdar://problem/57087756>

Reviewed by Ryosuke Niwa.

Source/WebCore:

This patch adds support for the write() method on Clipboard, forgoing sanitization for now (this will be added
in the next patch). See below for more details.

Tests: editing/async-clipboard/clipboard-change-data-while-writing.html

editing/async-clipboard/clipboard-write-basic.html
editing/async-clipboard/clipboard-write-items-twice.html

  • Modules/async-clipboard/Clipboard.cpp: (WebCore::Clipboard::~Clipboard): (WebCore::shouldProceedWithClipboardWrite): (WebCore::Clipboard::write):

Implement this method by creating a new ItemWriter and loading data from all the ClipboardItems that are being
written. If the previous writer is still in progress, make sure that we invalidate it first (rejecting the
promise) before proceeding.

(WebCore::Clipboard::didResolveOrReject):
(WebCore::Clipboard::ItemWriter::ItemWriter):
(WebCore::Clipboard::ItemWriter::write):
(WebCore::Clipboard::ItemWriter::invalidate):
(WebCore::Clipboard::ItemWriter::setData):
(WebCore::Clipboard::ItemWriter::didSetAllData):
(WebCore::Clipboard::ItemWriter::reject):

Introduce a private helper class to collect clipboard data for writing from a list of ClipboardItems, and
resolve or reject the given promise when finished.

  • Modules/async-clipboard/Clipboard.h:
  • platform/ios/PlatformPasteboardIOS.mm: (WebCore::createItemProviderRegistrationList):

Fix a stray bug where the empty string could not be read back as plain text or URLs from the platform pasteboard
on iOS. This is exercised by the new layout test clipboard-write-basic.html.

  • platform/mac/PlatformPasteboardMac.mm: (WebCore::PlatformPasteboard::write):

Address another issue where we would sometimes try and declare the empty string as a pasteboard type when
writing to the platform pasteboard. While benign in a real NSPasteboard, there's no reason to include it in this
list of declared pasteboard types.

Tools:

Make the LocalPasteboard in WebKitTestRunner compatible with calls to -writeObjects: with a list of pasteboard
items. Currently, attempts to -writeObjects: result in a crash, since NSPasteboard code will attempt to
communicate with pasted and fail. We fix this by implementing -writeObjects: and storing the array of
NSPasteboardItems in LocalPasteboard, the same way we do in DumpRenderTree's LocalPasteboard implementation.

  • DumpRenderTree/mac/DumpRenderTreePasteboard.mm: (-[LocalPasteboard declareTypes:owner:]): (-[LocalPasteboard _clearContentsWithoutUpdatingChangeCount]):

Factor out logic to clear the pasteboard's content into a separate helper, and clear out the list of saved
pasteboard items here as well.

(-[LocalPasteboard clearContents]):

Implement -clearContents in DumpRenderTree's LocalPasteboard, so that we can test Clipboard.write() in WebKit1.

(-[LocalPasteboard writeObjects:]):

Also make it so that we save any NSPasteboardItems we write to the local pasteboard, so that we can return them
later in -pasteboardItems.

(-[LocalPasteboard pasteboardItems]):

  • WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm: (-[LocalPasteboard initWithName:]):

Clean up this code a bit by replacing manual reference counting for typesArray and its neighboring data
structures with RetainPtr. Additionally, underscore-prefix the instance variables on LocalPasteboard to match
most of the other Objective-C objects in WebKit.

(-[LocalPasteboard name]):
(-[LocalPasteboard _clearContentsWithoutUpdatingChangeCount]):

Clear out the NSPasteboardItem list here too.

(-[LocalPasteboard clearContents]):
(-[LocalPasteboard declareTypes:owner:]):
(-[LocalPasteboard addTypes:owner:]):
(-[LocalPasteboard _addTypesWithoutUpdatingChangeCount:owner:]):
(-[LocalPasteboard changeCount]):
(-[LocalPasteboard types]):
(-[LocalPasteboard availableTypeFromArray:]):
(-[LocalPasteboard setData:forType:]):
(-[LocalPasteboard dataForType:]):
(-[LocalPasteboard pasteboardItems]):
(-[LocalPasteboard writeObjects:]):

Implement this by porting over the implementation that currently exists in DumpRenderTree. Like in
DumpRenderTree, we want to also save the NSPasteboardItem array we're given here, so that we can return it in
-pasteboardItems.

(-[LocalPasteboard dealloc]): Deleted.

LayoutTests:

Adds several new layout tests to exercise the write method on Clipboard.

  • editing/async-clipboard/clipboard-change-data-while-writing-expected.txt: Added.
  • editing/async-clipboard/clipboard-change-data-while-writing.html: Added.

Verify that if the platform pasteboard contents change while the page attempts to write to the clipboard, we
will reject the promise for writing.

  • editing/async-clipboard/clipboard-write-basic-expected.txt: Added.
  • editing/async-clipboard/clipboard-write-basic.html: Added.

Verify that writing multiple ClipboardItems to the clipboard using write() works. Among these items, one of them
contains no types, and another only contains types that resolve to empty strings. The page should be able to
read all four items back using Clipboard.read().

  • editing/async-clipboard/clipboard-write-items-twice-expected.txt: Added.
  • editing/async-clipboard/clipboard-write-items-twice.html: Added.

Verify that attempting to write a clipboard item that resolves on a long delay, and then attempting to write
another item that resolves on a short delay before the previous clipboard item has finished writing does not
cause the latter call to Clipboard.write() to fail. Additionally, the clipboard should contain the contents of
the second set of clipboard items, rather than the first.

  • editing/async-clipboard/resources/async-clipboard-helpers.js: (async.checkClipboardItemString):

Add a helper method to read a string for the given type, out of the given clipboard item, and compare it against
an expected result.

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

1:57 PM Changeset in webkit [252586] by Alan Coon
  • 2 edits in tags/Safari-609.1.10.2/Source/WebInspectorUI

Cherry-pick r252448. rdar://problem/57178710

Web Inspector: "aqua" and "fuchsia" aren't detected as colors
https://bugs.webkit.org/show_bug.cgi?id=204085

Reviewed by Devin Rousso.

  • UserInterface/Models/Color.js:

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

1:57 PM Changeset in webkit [252585] by Alan Coon
  • 4 edits in tags/Safari-609.1.10.2/Source/WebInspectorUI

Cherry-pick r252447. rdar://problem/57178290

Web Inspector: Uncaught Exception: Invalid type of argument 'eventName' for command 'DOMDebugger.setEventBreakpoint' call. It must be 'string' but it is 'object'.
https://bugs.webkit.org/show_bug.cgi?id=204176

Reviewed by Timothy Hatcher.

  • UserInterface/Views/EventBreakpointPopover.js: (WI.EventBreakpointPopover.prototype.dismiss): Only create the WI.EventBreakpoint if the <input> has a value.
  • UserInterface/Controllers/DOMDebuggerManager.js: (WI.DOMDebuggerManager.prototype.addEventBreakpoint): (WI.DOMDebuggerManager.prototype.addURLBreakpoint):
  • UserInterface/Views/SourcesNavigationSidebarPanel.js: (WI.SourcesNavigationSidebarPanel.prototype._willDismissEventBreakpointPopover): (WI.SourcesNavigationSidebarPanel.prototype._willDismissURLBreakpointPopover): Drive-by: if the configuration isn't valid (e.g. no breakpoint) or the breakpoint already

exists, beep.

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

1:57 PM Changeset in webkit [252584] by Alan Coon
  • 9 edits in tags/Safari-609.1.10.2

Cherry-pick r252442. rdar://problem/56973112

REGRESSION: WKWebView navigation fails when navigating from about:blank
https://bugs.webkit.org/show_bug.cgi?id=203852
Source/WebKit:

<rdar://problem/56973112>

Reviewed by Brent Fulgham.

Previously, WebPageProxy::loadFile would unconditionally create a sandbox extension for the resource directory URL. Currently,
this method is calling WebPageProxy::maybeInitializeSandboxExtension to create a sandbox extension if needed. The sandbox
extension for the resource URL is not created if the WebContent process already has assumed access to the resource URL, which
is the case when loading the same file for the second time. The sandbox extension still needs to be issued in this case, since
the WebContent process is revoking its extension when the load is done. This patch restore the original behaviour by adding a
flag to WebPageProxy::maybeInitializeSandboxExtension to indicate whether the method should check if the process already has
assumed access.

API test: WKWebView.LoadRelativeFileURL

  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle): (WebKit::WebPageProxy::loadRequestWithNavigationShared): (WebKit::WebPageProxy::loadFile):
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::shouldSendPendingMessage):
  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::loadRequestWaitingForProcessLaunch): (WebKit::WebPage::loadRequestWaitingForPID): Deleted.
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Tools:

Reviewed by Brent Fulgham.

  • TestWebKitAPI/Tests/WebKitCocoa/LoadFileURL.mm: (TEST):

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

1:57 PM Changeset in webkit [252583] by Alan Coon
  • 5 edits
    2 adds in tags/Safari-609.1.10.2

Cherry-pick r252439. rdar://problem/56654512

REGRESSION (r249434): flashy menus on wellsfargo.com
https://bugs.webkit.org/show_bug.cgi?id=204175
<rdar://problem/56654512>

Reviewed by Zalan Bujtas.

Source/WebCore:

Test: compositing/backing/backing-for-clipping.html

r249434 made overflow an "indirect compositing reason" (i.e. we composite for overflow:hidden
when necessary to clip a composited descendant). However this made a clause in RenderLayerCompositor::requiresOwnBackingStore()
return early when this reason is set, skipping the bounds check, so we need to do the bound check first.
This is similar to the fix in r252070.

The change to the perspective test relates to the "FIXME"; we don't use the correct ancestor for the
bounds check, so sometimes layers can have backing store when they don't need it until that's fixed.

  • rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::requiresOwnBackingStore const):

LayoutTests:

  • compositing/backing/backing-for-clipping-expected.html: Added.
  • compositing/backing/backing-for-clipping.html: Added.
  • compositing/backing/no-backing-for-perspective-expected.txt:
  • platform/ios-wk2/compositing/backing/no-backing-for-perspective-expected.txt:

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

1:57 PM Changeset in webkit [252582] by Alan Coon
  • 2 edits in tags/Safari-609.1.10.2/Source/WebKit

Cherry-pick r252434. rdar://problem/57169789

Cleanup old UIKit Staging
https://bugs.webkit.org/show_bug.cgi?id=204130

Reviewed by Wenson Hsieh.

Not new tests - linking only.

  • Platform/spi/ios/UIKitSPI.h:

Removing old staging code that should be unnecessary now.

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

1:57 PM Changeset in webkit [252581] by Alan Coon
  • 2 edits in tags/Safari-609.1.10.2/Source/WebKit

Cherry-pick r252432. rdar://problem/57138788

[iOS] Cannot open camera from websites
https://bugs.webkit.org/show_bug.cgi?id=204168
<rdar://problem/57138788>

Reviewed by Jer Noble.

The sandbox is blocking a required service.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

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

1:57 PM Changeset in webkit [252580] by Alan Coon
  • 2 edits in tags/Safari-609.1.10.2/LayoutTests

Cherry-pick r252420. rdar://problem/57161698

Web Inspector: inspector/model/remote-object-weak-collection.html is failing
https://bugs.webkit.org/show_bug.cgi?id=202932

Reviewed by Brian Burg.

  • inspector/model/remote-object-weak-collection.html: Don't generatePreview when evaluating each expression, as that can create additional references to the object. Use HeapAgent.gc() as that's guaranteed to be synchronous.

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

1:57 PM Changeset in webkit [252579] by Alan Coon
  • 3 edits
    2 adds in tags/Safari-609.1.10.2

Cherry-pick r252419. rdar://problem/57073401

Google Docs spreadsheet tiles render very slowly (because of event region painting)
https://bugs.webkit.org/show_bug.cgi?id=204160
<rdar://problem/57073401>

Reviewed by Simon Fraser.

Source/WebCore:

Content of a overflow:scroll area on this page doesn't cover the entire scrollable area and we end
up generating a complex shape for the event region. This is unnecessary as touches within scrollers
always scroll the content.

Test: fast/scrolling/ios/event-region-scrolled-contents-layer.html

  • rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateEventRegion):

Initialize event region for scrolled contents layer with layer-sized event region. This optimizes away
event region mutations. We still need to to do the event region paint to capture touch-action regions.

In future we should also improve Region type to not have pathological worst-case performance with complex
shapes.

LayoutTests:

  • fast/scrolling/ios/event-region-scrolled-contents-layer-expected.txt: Added.
  • fast/scrolling/ios/event-region-scrolled-contents-layer.html: Added.

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

1:57 PM Changeset in webkit [252578] by Alan Coon
  • 2 edits in tags/Safari-609.1.10.2/Source/JavaScriptCore

Cherry-pick r252247. rdar://problem/56973531

Remove invalid assertion in DFG's compileNewArray().
https://bugs.webkit.org/show_bug.cgi?id=204002
<rdar://problem/56973531>

Reviewed by Robin Morisset.

The assertion is in an if clause conditional on !globalObject->isHavingABadTime().
The assertion tests the IndexingType of a structure returned by
arrayStructureForIndexingTypeDuringAllocation().

However, the structures returned by arrayStructureForIndexingTypeDuringAllocation()
may have started transitioning to their SlowPut variant because the mutator will
be imminently firing the HavingABadTime watchpoint, but haven't done so yet.
In a race, the DFG may see the SlowPut variants of the structures before
isHavingABadTime() returns true. Hence, the assertion is invalid.

Note that the FTL does not have this assertion.

This issue is already tested by stress/racy-slow-put-cloned-arguments-when-having-a-bad-time.js.

  • dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileNewArray):

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

1:57 PM Changeset in webkit [252577] by Alan Coon
  • 4 edits
    1 add in tags/Safari-609.1.10.2

Cherry-pick r252160. rdar://problem/56973531

JSGlobalObject::fireWatchpointAndMakeAllArrayStructuresSlowPut() should fire its watchpoint as the last step.
https://bugs.webkit.org/show_bug.cgi?id=203867
<rdar://problem/56813514>

Reviewed by Saam Barati.

JSTests:

  • stress/racy-slow-put-cloned-arguments-when-having-a-bad-time.js: Added.

Source/JavaScriptCore:

JSGlobalObject::fireWatchpointAndMakeAllArrayStructuresSlowPut() should make all
the array structures SlowPut before firing the watchpoint. Otherwise, the
concurrent JIT may think it's grabbing the slow put version of the structure, but
is actually grabbing the non-SlowPut version because it happened to beat the
mutator in a race to read the structure before the mutator makes it SlowPut.

Also removed some assertions in DFGSpeculativeJIT.cpp that are vulnerable to races
between when the mutator makes all array structures SlowPut and when it fires the
HavingABadTime watchpoint. The FTL equivalent did not have these assertions.

  • dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileCreateRest): (JSC::DFG::SpeculativeJIT::compileNewArray): (JSC::DFG::SpeculativeJIT::compileNewArrayWithSpread):
  • runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::fireWatchpointAndMakeAllArrayStructuresSlowPut):

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

1:57 PM Changeset in webkit [252576] by Alan Coon
  • 6 edits in tags/Safari-609.1.10.2

Cherry-pick r252412. rdar://problem/56516249

[ iOS ]: Layout Test http/tests/IndexedDB/storage-limit-1.https.html is a Flaky Failure
https://bugs.webkit.org/show_bug.cgi?id=203275
<rdar://problem/56516249>

Reviewed by Alex Christensen.

Source/WebKit:

Fix flakiness by clearing the storage of each cache when the cache is being cleared.
This ensures that the storage salt gets recreated if needed.

To further improve repeatability, make sure that initialize based tasks happen after clear tasks are complete.
For that purpose, add a clear task counter and append initialize callbacks to a Vector if counter is not zero.
Increment counter at clear task creation and decrement counter at completion time.
If counter is back to 0, we can safely process the pending clear tasks.

Covered by unflaked test.

  • NetworkProcess/cache/CacheStorageEngine.cpp: (WebKit::CacheStorage::Engine::~Engine): (WebKit::CacheStorage::Engine::initialize): (WebKit::CacheStorage::CompletionHandler<void): (WebKit::CacheStorage::Engine::clearAllCaches): (WebKit::CacheStorage::Engine::clearCachesForOrigin):
  • NetworkProcess/cache/CacheStorageEngine.h:
  • NetworkProcess/cache/CacheStorageEngineCaches.cpp: (WebKit::CacheStorage::Caches::clearMemoryRepresentation):

LayoutTests:

  • platform/ios-wk2/TestExpectations:

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

1:57 PM Changeset in webkit [252575] by Alan Coon
  • 26 edits
    2 copies
    3 adds in tags/Safari-609.1.10.2

Cherry-pick r252377. rdar://problem/56653808

[iOS] WKWebView does not respect system spellchecking preference
https://bugs.webkit.org/show_bug.cgi?id=204100
<rdar://problem/56653808>

Reviewed by Tim Horton.

Source/WebKit:

Implements a platform hook on iOS (-setContinuousSpellCheckingEnabled:) to allow UIKit to inform us when the
system spellchecking preference changes, and adds logic to propagate these changes to the web process. See below
for more details.

Test: editing/spelling/toggle-spellchecking.html

  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _setContinuousSpellCheckingEnabledForTesting:]):
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:

Add testing SPI to enable or disable continuous spellchecking, for both iOS and macOS.

  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::setContinuousSpellCheckingEnabled):
  • UIProcess/TextChecker.h:
  • UIProcess/gtk/TextCheckerGtk.cpp: (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
  • UIProcess/ios/TextCheckerIOS.mm: (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView setupInteraction]): (-[WKContentView setContinuousSpellCheckingEnabled:]):

Implement this method to handle changes to the system spellchecking preference. This hook is also used by legacy
WebKit on iOS to turn spellchecking on or off. If the value of the preference changed, we additionally notify
the web process. In the future, we should consider refactoring TextCheckerState to be per-web view and per-page,
since Cocoa platform APIs would allow for different WKWebViews to have different spell checking preferences.

  • UIProcess/mac/TextCheckerMac.mm: (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
  • UIProcess/win/TextCheckerWin.cpp: (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
  • UIProcess/wpe/TextCheckerWPE.cpp: (WebKit::TextChecker::setContinuousSpellCheckingEnabled):

Adjusted setContinuousSpellCheckingEnabled to return whether or not the continuous spellchecking state changed.

Tools:

  • DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
  • DumpRenderTree/cocoa/UIScriptControllerCocoa.h:
  • DumpRenderTree/cocoa/UIScriptControllerCocoa.mm: (WTR::UIScriptControllerCocoa::UIScriptControllerCocoa): (WTR::UIScriptControllerCocoa::setContinuousSpellCheckingEnabled):

Add a new UIScriptControllerCocoa subclass for DumpRenderTree. For now, this will just contain the cross-
platform implementation of setContinuousSpellCheckingEnabled.

  • DumpRenderTree/ios/UIScriptControllerIOS.h: (WTR::UIScriptControllerIOS::UIScriptControllerIOS):
  • DumpRenderTree/mac/UIScriptControllerMac.h: (WTR::UIScriptControllerMac::UIScriptControllerMac):

Make both -IOS and -Mac subclasses inherit from UIScriptControllerCocoa.

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.h: (WTR::UIScriptController::setContinuousSpellCheckingEnabled):

Add a new script controller method to change the platform spell checking preference during a layout test.

  • WebKitTestRunner/TestController.cpp:
  • WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::cocoaResetStateToConsistentValues):

Adjust this to explicitly turn continuous spellchecking on or off based on the shouldShowSpellCheckingDots
test option flag, instead of toggling it on and then off when resetting state before and after the layout test.

  • WebKitTestRunner/cocoa/UIScriptControllerCocoa.h:
  • WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm: (WTR::UIScriptControllerCocoa::setContinuousSpellCheckingEnabled):

LayoutTests:

Add a new layout test to verify that the changes to platform spellchecking preferences are reflected in editable
content. See other changelogs for more information.

  • editing/spelling/toggle-spellchecking-expected.txt: Added.
  • editing/spelling/toggle-spellchecking.html: Added.
  • platform/win/TestExpectations:
  • platform/wincairo/TestExpectations:
  • resources/ui-helper.js: (window.UIHelper.async.setContinuousSpellCheckingEnabled):

Also, add a new UIHelper method to enable or disable continuous spellchecking during a layout test.

(window.UIHelper):

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

1:57 PM Changeset in webkit [252574] by Alan Coon
  • 4 edits in tags/Safari-609.1.10.2/Source/WebKit

Cherry-pick r252367. rdar://problem/57117605

Rename _textSelectionAssistant to _textInteractionAssistant to reflect the only class it can now represent
https://bugs.webkit.org/show_bug.cgi?id=204103

Reviewed by Wenson Hsieh.

No new tests - rename only.

Now that UIWKSelectionAssistant is no longer, the _textSelectionAssistant can only be a
UIWKTextInteractionAssistant. There is enough confusion around all the selection and
interaction assistants, renaming this should alleviate some of that confusion.

  • UIProcess/ios/WKContentView.mm: (-[WKContentView _didExitStableState]):
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView cleanupInteraction]): (-[WKContentView becomeFirstResponderForWebView]): (-[WKContentView endEditingAndUpdateFocusAppearanceWithReason:]): (-[WKContentView _scrollingNodeScrollingWillBegin]): (-[WKContentView _scrollingNodeScrollingDidEnd]): (-[WKContentView gestureRecognizer:canBePreventedByGestureRecognizer:]): (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]): (-[WKContentView _uiTextSelectionRects]): (-[WKContentView textInteractionGesture:shouldBeginAtPoint:]): (-[WKContentView setUpTextSelectionAssistant]): (-[WKContentView _willStartScrollingOrZooming]): (-[WKContentView _didEndScrollingOrZooming]): (-[WKContentView _lookupForWebView:]): (-[WKContentView _shareForWebView:]): (-[WKContentView _addShortcutForWebView:]): (-[WKContentView _promptForReplaceForWebView:]): (-[WKContentView _transliterateChineseForWebView:]): (-[WKContentView tintColorDidChange]): (-[WKContentView _didHideMenu:]): (-[WKContentView selectForWebView:]): (-[WKContentView selectAllForWebView:]): (-[WKContentView _showTextStyleOptionsForWebView:]): (-[WKContentView _showDictionary:]): (-[WKContentView interactionAssistant]): (-[WKContentView _showKeyboard]): (-[WKContentView _hideKeyboard]): (-[WKContentView _updateChangedSelection:]): (-[WKContentView _startSuppressingSelectionAssistantForReason:]): (-[WKContentView _stopSuppressingSelectionAssistantForReason:]): (-[WKContentView _restoreCalloutBarIfNeeded]): (-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):

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

1:57 PM Changeset in webkit [252573] by Alan Coon
  • 8 edits
    6 adds in tags/Safari-609.1.10.2

Cherry-pick r252353. rdar://problem/50095458

Captcha images render as blank white space
https://bugs.webkit.org/show_bug.cgi?id=204013
rdar://problem/50095458

Reviewed by Zalan Bujtas.
Source/WebCore:

If updating z-order lists adds layers to the paint-order lists that have
dirty bits, we need to propagate those dirty bits up the tree so that
later dirty bit propagation doesn't stop prematurely. This could happen
when content triggered visibility, and the missing dirty bits caused
subframe layers to not get parented, resulting in missing layers with reCaptcha.
We do this by accumulating dirty bits inside of collectLayers().

Test: compositing/visibility/visibility-change-in-subframe.html

  • rendering/RenderLayer.cpp: (WebCore::RenderLayer::rebuildZOrderLists): (WebCore::RenderLayer::collectLayers): (WebCore::RenderLayer::calculateClipRects const):
  • rendering/RenderLayer.h:
  • rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::computeCompositingRequirements): (WebCore::RenderLayerCompositor::traverseUnchangedSubtree): (WebCore::RenderLayerCompositor::layerTreeAsText): Log so that debugging test failures is easier.

LayoutTests:

New test. Fails in WK1 because of compositing timing differences in iframes in DRT which
has a non auto-displaying window.

  • compositing/scrolling/async-overflow-scrolling/layer-for-negative-z-in-scroller-expected.txt: Progression.
  • compositing/visibility/resources/become-composited.html: Added.
  • compositing/visibility/resources/frame-with-visibility-change.html: Added.
  • compositing/visibility/visibility-change-in-subframe-expected.txt: Added.
  • compositing/visibility/visibility-change-in-subframe.html: Added.
  • platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/layer-for-negative-z-in-scroller-expected.txt:
  • platform/ios-wk2/compositing/visibility/visibility-change-in-subframe-expected.txt: Added.
  • platform/mac-wk1/TestExpectations:

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

1:57 PM Changeset in webkit [252572] by Alan Coon
  • 7 edits
    2 adds in tags/Safari-609.1.10.2/Source/WebCore

Cherry-pick r252346. rdar://problem/56640423

ASSERT at PlatformCALayerCocoa::avPlayerLayer(): [platformLayer() sublayers].count == 1
https://bugs.webkit.org/show_bug.cgi?id=204077
<rdar://problem/56640423>

Reviewed by Simon Fraser.

Make PlatformCALayerCocoa::avPlayer() more robust against underlying layer changes.

Promote WebVideoContainerLayer to its own header file and give the class a "playerLayer" property. In
PlatformCALayerCocoa::avPlayer(), use that new property to retrieve the AVPlayerLayer.

Drive-by fix: Make PlatformCALayerCocoa::create() return a Ref<PlatformCALayerCocoa> rather than its parent class type.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/avfoundation/objc/VideoFullscreenLayerManagerObjC.h:
  • platform/graphics/avfoundation/objc/VideoFullscreenLayerManagerObjC.mm: (WebCore::VideoFullscreenLayerManagerObjC::setVideoLayer): (-[WebVideoContainerLayer setBounds:]): Deleted. (-[WebVideoContainerLayer setPosition:]): Deleted.
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: (WebCore::PlatformCALayerCocoa::create): (WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer): (WebCore::PlatformCALayerCocoa::clone const): (WebCore::PlatformCALayerCocoa::avPlayerLayer const):
  • platform/graphics/ca/cocoa/WebVideoContainerLayer.h: Added.
  • platform/graphics/ca/cocoa/WebVideoContainerLayer.mm: Added. (-[WebVideoContainerLayer initWithPlayerLayer:]): (-[WebVideoContainerLayer playerLayer]): (-[WebVideoContainerLayer setBounds:]): (-[WebVideoContainerLayer setPosition:]):

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

1:57 PM Changeset in webkit [252571] by Alan Coon
  • 2 edits in tags/Safari-609.1.10.2/Source/WebCore

Cherry-pick r252331. rdar://problem/56301651

Ensure MediaRemote callback always called.
https://bugs.webkit.org/show_bug.cgi?id=204072
<rdar://problem/56301651>

Reviewed by Eric Carlson.

MediaRemote.framework will complain if the callback passed in via MRMediaRemoteAddAsyncCommandHandlerBlock()
is not called for each invocation of the handler. Make sure we always call the completion handler, even in
the case of unsupported commands, or if the listener object has already been destroyed.

  • platform/mac/RemoteCommandListenerMac.mm: (WebCore::RemoteCommandListenerMac::RemoteCommandListenerMac):

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

1:57 PM Changeset in webkit [252570] by Alan Coon
  • 7 edits in tags/Safari-609.1.10.2

Cherry-pick r252325. rdar://problem/56965402

Unreviewed, rolling out r251460.
https://bugs.webkit.org/show_bug.cgi?id=204070

This patch caused a crash due to synchronous event firing
(Requested by jernoble on #webkit).

Reverted changeset:

"media/W3C/video/networkState/networkState_during_progress.html
is flaky"
https://bugs.webkit.org/show_bug.cgi?id=76280
https://trac.webkit.org/changeset/251460

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

1:57 PM Changeset in webkit [252569] by Alan Coon
  • 4 edits in tags/Safari-609.1.10.2/Source/WebKit

Cherry-pick r252314. rdar://problem/55342744

StorageManagerSet.m_storageAreas should use weak pointers to StorageArea
<https://webkit.org/b/204048>
<rdar://problem/55342744>

Reviewed by Geoffrey Garen.

  • NetworkProcess/WebStorage/StorageArea.h: (class WebKit::StorageArea):
  • Inherit from CanMakeWeakPtr<StorageArea>.
  • NetworkProcess/WebStorage/StorageManagerSet.cpp: (WebKit::StorageManagerSet::removeConnection): (WebKit::StorageManagerSet::waitUntilSyncingLocalStorageFinished): (WebKit::StorageManagerSet::connectToLocalStorageArea): (WebKit::StorageManagerSet::connectToTransientLocalStorageArea): (WebKit::StorageManagerSet::connectToSessionStorageArea): (WebKit::StorageManagerSet::disconnectFromStorageArea): (WebKit::StorageManagerSet::getValues): Initialize quotaError stack value since it is not guaranteed to be set. (WebKit::StorageManagerSet::setItem): (WebKit::StorageManagerSet::removeItem): (WebKit::StorageManagerSet::clear):
  • Use makeWeakPtr() to add StorageArea pointers to m_storageAreas.
  • Use const auto& to store WeakPtr<StorageArea> values from m_storageAreas.
  • Add nullptr checks before using WeakPtr<StorageArea> values.
  • NetworkProcess/WebStorage/StorageManagerSet.h: (WebKit::StorageManagerSet::m_storageAreas):
  • Use WeakPtr<StorageArea>.

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

1:56 PM Changeset in webkit [252568] by Alan Coon
  • 7 edits
    2 adds in tags/Safari-609.1.10.2

Cherry-pick r252309. rdar://problem/55614939

Clicky Orbing support.apple.com categories shows a PNG instead of the web page preview, tapping loads image asset only instead of web page
https://bugs.webkit.org/show_bug.cgi?id=204037
<rdar://55614939>

Reviewed by Simon Fraser.

Source/WebKit:

When Safari adopted the ContextMenu API they began providing a PreviewViewController that
showed the image rather than the link, for the case of <a><img></a>.

This could be fixed in Safari, but I noticed that we actually tell the delegate that the
type of the activated element is an image, which is why they treat it as such. It's not
clear that because the image also has a link attached, a client should defer to the link.

Instead, I think it makes more sense to identify this as a link, because that is the more
important information in this API.

While here I also changed the logic to make sure we call the API if both the API and SPI
are available.

New ContextMenus and WKRequestActivatedElementInfo API tests.

  • UIProcess/API/Cocoa/_WKActivatedElementInfo.mm: Identify as a link if you have a link. (-[_WKActivatedElementInfo _initWithInteractionInformationAtPosition:userInfo:]):
  • UIProcess/ios/WKContentViewInteraction.mm: Look for the API before the SPI. (-[WKContentView continueContextMenuInteraction:]):

Tools:

New tests for a link wrapping an image, and the ordering of API and SPI.

Rename these tests so that they are much easier to filter on the command line.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/ContextMenus.mm: (TEST): (-[TestContextMenuAPIBeforeSPIUIDelegate webView:contextMenuConfigurationForElement:completionHandler:]): (-[TestContextMenuAPIBeforeSPIUIDelegate _webView:contextMenuConfigurationForElement:completionHandler:]): (-[TestContextMenuAPIBeforeSPIUIDelegate webView:contextMenuWillPresentForElement:]):
  • TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm: (TestWebKitAPI::TEST):
  • TestWebKitAPI/Tests/WebKitCocoa/image.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/link-with-image.html: Added.

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

1:56 PM Changeset in webkit [252567] by Alan Coon
  • 6 edits in tags/Safari-609.1.10.2/Source/WebCore

Cherry-pick r252301. rdar://problem/56996057

Add back/forward cache quirk for Vimeo.com
https://bugs.webkit.org/show_bug.cgi?id=204025
<rdar://problem/56996057>

Reviewed by Antti Koivisto.

Vimeo.com used to bypass the back/forward cache by serving "Cache-Control: no-store" over HTTPS.
We started caching such content in r250437 but the vimeo.com content unfortunately is not currently compatible
because it changes the opacity of its body to 0 when navigating away and fails to restore the original opacity
when coming back from the back/forward cache (e.g. in 'pageshow' event handler).

To address the issue, this patch introduces a quirk to restore pre-r250437 on Vimeo.com, until they get
a chance to fix their content.

  • history/BackForwardCache.cpp: (WebCore::canCacheFrame):
  • page/DiagnosticLoggingKeys.cpp: (WebCore::DiagnosticLoggingKeys::siteSpecificQuirkKey):
  • page/DiagnosticLoggingKeys.h:
  • page/Quirks.cpp: (WebCore::Quirks::shouldBypassBackForwardCache const):
  • page/Quirks.h:

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

1:56 PM Changeset in webkit [252566] by Alan Coon
  • 5 edits in tags/Safari-609.1.10.2/Source/WebCore

Cherry-pick r252300. rdar://problem/56524235

SWServerWorker in redundant state do not need to process messages from the context process
https://bugs.webkit.org/show_bug.cgi?id=204019

Reviewed by Chris Dumez.

When a service worker is marked as redundant in network process, it might still receive some messages like didFinishActivation or didFinishInstall.
In that state, we do not need to process these messages.
Did some refactoring to directly pass the service worker to the job queue.
This makes it clear the registration and service worker are the correct ones.

  • workers/service/server/SWServer.cpp: (WebCore::SWServer::didFinishInstall): Pass the worker instead of its identifier.
  • workers/service/server/SWServerJobQueue.cpp: (WebCore::SWServerJobQueue::didFinishInstall): Now that we are given the service worker, get its registration directly.
  • workers/service/server/SWServerJobQueue.h:
  • workers/service/server/SWServerWorker.cpp: (WebCore::SWServerWorker::didFinishInstall): Exit early in redundant state. (WebCore::SWServerWorker::didFinishActivation): Exit early in redundant state.

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

1:56 PM Changeset in webkit [252565] by Alan Coon
  • 2 edits in tags/Safari-609.1.10.2/Source/WebCore

Cherry-pick r252207. rdar://problem/56908013

UserMediaController::from(document) can return nullptr
https://bugs.webkit.org/show_bug.cgi?id=203977
<rdar://problem/56908013>

Reviewed by Jer Noble.

  • Modules/mediastream/MediaDevices.cpp: (WebCore::MediaDevices::stop): NULL-check the UserMediaController.

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

1:47 PM Changeset in webkit [252564] by Keith Rollin
  • 11 edits in trunk

Move jsc from Resources to Helpers
https://bugs.webkit.org/show_bug.cgi?id=203970
<rdar://problem/55917748>

Reviewed by Keith Miller.

'jsc' is a supporting application or tool, not a resource. As such, it
should go into Helpers, per
<https://developer.apple.com/library/archive/technotes/tn2206/_index.html#//apple_ref/doc/uid/DTS40007919-CH1-TNTAG201>

Source/JavaScriptCore:

  • Configurations/Base.xcconfig:
  • Configurations/JSC.xcconfig:
  • Configurations/ToolExecutable.xcconfig:
  • JavaScriptCore.xcodeproj/project.pbxproj:

Tools:

  • Scripts/run-jsc-stress-tests:
  • Scripts/run-layout-jsc:
  • Scripts/sunspider-compare-results:

(pathToSystemJSC):

  • Scripts/test262/Runner.pm:

(getBuildPath):

  • Scripts/webkitdirs.pm:

(jscPath):

1:45 PM Changeset in webkit [252563] by commit-queue@webkit.org
  • 22 edits in trunk

Fix getTotalLength() and getPointAtLength() for optimized rect and ellipse renderers
https://bugs.webkit.org/show_bug.cgi?id=204213

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-11-18
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/svg/types/elements/SVGGeometryElement-rect-expected.txt:

Source/WebCore:

If the renderer does not create a Path to draw the shape, we need to create
a temporary Path from the SVGElement then use it to answer the questions
of these functions and finally delete it.

  • platform/graphics/Path.cpp:

(WebCore::Path::traversalStateAtLength const):
(WebCore::Path::pointAtLength const):
No need for the 'success'. It is never used.

(WebCore::Path::normalAngleAtLength const): Deleted.
This function is not used.

  • platform/graphics/Path.h:
  • rendering/svg/RenderSVGShape.cpp:

(WebCore::RenderSVGShape::updateShapeFromElement):
Creating the Path from the SVGELement is moved to createPath().

(WebCore::RenderSVGShape::getTotalLength const):
(WebCore::RenderSVGShape::getPointAtLength const):
Create a temporary Path if the renderer draws the shape without creating
the Path.

(WebCore::RenderSVGShape::createPath const):

  • rendering/svg/RenderSVGShape.h:
  • rendering/svg/SVGTextLayoutEngine.cpp:

(WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath):

  • svg/SVGAnimateMotionElement.cpp:

(WebCore::SVGAnimateMotionElement::buildTransformForProgress):
Use PathTraversalState.success() to check instead of getting the same
value through an argument to traversalStateAtLength().

LayoutTests:

The following tests were added in r231955. The SVGElements in these were
defined such that a path has to be created to render any of them. Change
all the tests, except the polygon and the polyline, such that no path is
needed to render them. This will exercise the code path where we need to
create a temporary Path to answer the questions of getTotalLength() and
getPointAtLength().

  • svg/dom/SVGGeometry-circle-expected.txt:
  • svg/dom/SVGGeometry-circle.xhtml:
  • svg/dom/SVGGeometry-ellipse-expected.txt:
  • svg/dom/SVGGeometry-ellipse.xhtml:
  • svg/dom/SVGGeometry-line-expected.txt:
  • svg/dom/SVGGeometry-line.xhtml:
  • svg/dom/SVGGeometry-polygon-expected.txt:
  • svg/dom/SVGGeometry-polygon.xhtml:
  • svg/dom/SVGGeometry-polyline-expected.txt:
  • svg/dom/SVGGeometry-polyline.xhtml:
  • svg/dom/SVGGeometry-rect-expected.txt:
  • svg/dom/SVGGeometry-rect.xhtml:
1:30 PM Changeset in webkit [252562] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Block layout invalidation logic triggers excessive layout on height percentage descendants
https://bugs.webkit.org/show_bug.cgi?id=204255
Source/WebCore:

rdar://problem/57236490

Reviewed by Simon Fraser.

This patch attempts to optimize the height percentage invalidation logic by skipping boxes with out-of-flow ancestors.

The normal box invalidation logic works at the parent-child level (a.k.a when the parent is dirty it walks its direct
children list and marks them dirty if needed). However percent height values require containing block-child type of invalidation
which atm we manage using RenderBlock's percentHeightDescendantsMap (this map contains all the height percentage descendants).
As part of this extra invalidation logic, the block container always marks all of these height descendants dirty.
In certain cases, this leads to excessive and unnecessary layouts, since the
"walk the ancestor chain and mark boxes dirty all the way to the RenderView" code ends up descending back to these height percentage boxes
marking entire subtrees dirty.

We could optimize it slightly by checking if there's a height percentage containing block in the ancestor chain.
In such cases, we know that the descendant's height used value computation will eventually stop at this out-of-flow containing block.

Test: fast/block/height-percentage-descendants-with-absolute-pos-containingblock.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::dirtyForLayoutFromPercentageHeightDescendants):

LayoutTests:

Reviewed by Simon Fraser.

  • fast/block/height-percentage-descendants-with-absolute-pos-containingblock-expected.txt: Added.
  • fast/block/height-percentage-descendants-with-absolute-pos-containingblock.html: Added.
1:22 PM Changeset in webkit [252561] by Wenson Hsieh
  • 7 edits
    4 adds in trunk

[Clipboard API] Add support for Clipboard.writeText()
https://bugs.webkit.org/show_bug.cgi?id=204287
<rdar://problem/57270440>

Reviewed by Tim Horton.

LayoutTests/imported/w3c:

Rebaseline a couple of web platform tests.

  • web-platform-tests/clipboard-apis/async-navigator-clipboard-basics.https-expected.txt:
  • web-platform-tests/clipboard-apis/async-write-text-read-dttext-manual.https-expected.txt:

Source/WebCore:

Implements the writeText method on Clipboard.

Tests: editing/async-clipboard/clipboard-write-text-requires-user-gesture.html

editing/async-clipboard/clipboard-write-text.html

  • Modules/async-clipboard/Clipboard.cpp:

(WebCore::shouldProceedWithClipboardWrite):

Move this helper function further up the file.

(WebCore::Clipboard::writeText):

Implement the API, by populating a single PasteboardCustomData and writing it to the system clipboard.

LayoutTests:

  • editing/async-clipboard/clipboard-write-text-expected.txt: Added.
  • editing/async-clipboard/clipboard-write-text-requires-user-gesture-expected.txt: Added.
  • editing/async-clipboard/clipboard-write-text-requires-user-gesture.html: Added.

Add a layout test to verify that navigator.clipboard.writeText is gated on user gesture, if the
javaScriptCanAccessClipboard preference is disabled.

  • editing/async-clipboard/clipboard-write-text.html: Added.

Add a layout test to verify that writing text to the clipboard puts a single item on the system clipboard with
the type "text/plain", which can be read back using navigator.clipboard.read.

  • platform/win/TestExpectations:

Skip clipboard-write-text.html on Windows, since custom pasteboard data is not implemented there yet.

12:54 PM Changeset in webkit [252560] by Jonathan Bedard
  • 7 edits in trunk/Tools

Python 3: Add support in webkitpy.layout_tests.views
https://bugs.webkit.org/show_bug.cgi?id=204227

Reviewed by Aakash Jain.

  • Scripts/test-webkitpy-python3: Add webkitpy.layout_tests.views.
  • Scripts/webkitpy/layout_tests/views/buildbot_results.py:

(BuildBotPrinter.print_unexpected_results): Use compatible iteritems.

  • Scripts/webkitpy/layout_tests/views/buildbot_results_unittest.py:

(BuildBotPrinterTests.get_printer): Use compatible StringIO object.

  • Scripts/webkitpy/layout_tests/views/metered_stream.py:

(MeteredStream.init): Use maxsize instead of maxint.

  • Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py:

(RegularTest.setUp): Use compatible StringIO, remove buflist.
(RegularTest.test_logging_not_included): Ditto.
(RegularTest._basic): Remove buflist.
(RegularTest.test_basic): Compare against stream value instead of buflist.
(RegularTest._log_after_update): Remove buflist.
(RegularTest.test_log_after_update): Compare against stream value
instead of buflist.
(RegularTest.test_log_args): Ditto.
(RegularTest.test_unicode): We can't join unicode strings and standard strings
in Python 2.
(RegularTest.test_stream_with_encoding): Use compatible StringIO, Python 3 uses
unicode strings.
(TtyTest.test_basic): Compare against stream value instead of buflist.
(TtyTest.test_log_after_update): Ditto.
(VerboseTest.test_basic): Ditto.
(VerboseTest.test_log_after_update): Ditto.
(VerboseTest.test_log_args): Ditto.
(VerboseWithOutTimestamp.test_basic): Ditto.

  • Scripts/webkitpy/layout_tests/views/printing_unittest.py:

(Testprinter.assertWritten): Use stream value instead of buflist.
(Testprinter.reset): Use Python 3 compatible steam reset.
(Testprinter.get_printer): Use compatible StringIO.
(Testprinter.test_print_one_line_summary): Compare against stream value instead
of buflist.
(Testprinter.test_test_status_line): Ditto.
(Testprinter.test_print_found): Ditto.

12:53 PM Changeset in webkit [252559] by keith_miller@apple.com
  • 5 edits in trunk

Enable Nullish operators by default
https://bugs.webkit.org/show_bug.cgi?id=204308

Reviewed by Yusuke Suzuki.

JSTests:

Remove feature -> option map.

  • test262/config.yaml:

Source/JavaScriptCore:

The nullish operators ?? and ?. are likely going to stage 4 at
the December TC-39 meeting so we should probably just enable them
by default.

  • parser/Lexer.cpp:

(JSC::Lexer<T>::lexWithoutClearingLineTerminator):

  • runtime/OptionsList.h:
12:35 PM Changeset in webkit [252558] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Clarify that OptionRange::operator=() is only used for initializing to 0 (i.e. state Uninitialized).
https://bugs.webkit.org/show_bug.cgi?id=204309

Reviewed by Saam Barati.

Added a RELEASE_ASSERT in OptionRange::operator=() to enforce that it should
never be called with any value other than 0.

  • runtime/OptionsList.h:

(JSC::OptionRange::operator= ):

12:06 PM Changeset in webkit [252557] by mark.lam@apple.com
  • 9 edits in trunk/Source/JavaScriptCore

Reduce the amount of memory needed to store Options.
https://bugs.webkit.org/show_bug.cgi?id=202105
<rdar://problem/55641041>

Reviewed by Robin Morisset.

Options used to be stored as an array of unions of all option types, where the
size of the array is around 349 elements. We also needed a second array for the
default option value. We now store each option (and its default value) as a type
specific field in an OptionsStorage struct. This reduces the size of storage for
Options from 16752 to 2192 bytes. This, in turn, allows JSC::Config to fit in a
single page.

The reason we previously stored options in an array of unions is to allow us to
randomly access each option by its id. We now store the offset of the option
field in the Options::s_constMetaData array (previously called s_optionsInfo).
With this offset, we can compute the address of the option value field in
the OptionsStorage struct in the JSC::Config.

In this patch, we also:

  1. Renamed Options::s_optionsInfo to Options::s_constMetaData.
  1. Refactor the Option class into the OptionReader::Option class.

Previously, the Option class provided another way to access option values,
specifically when we need to access them by id. It also provided a means to
change that option value. However, it practice, we can do without this, and
remove a lot of the code. This class now exists as OptionReader::Option which
only provides a means to read information about options, but not change them
The only client for this class is the dumpOption() function.

  1. Removed the OptionEntry class. It previously served 2 purpose:
    1. Define the option types. The types are now defined in OptionsStorage.
    2. Define a union abstract type large enough to store any option value. This is now expressed as a union member in OptionReader::Option.


OptionEntry.h also defines the OptionRange class. OptionRange is now moved
to OptionsList.h.


  1. Changed the implementation of the option value parse functions to return Optional values instead of taking a reference to the value. This makes the code cleaner and easier to read on the client side.
  1. Fixed scaleJITPolicy() to not rely on the Option class (see 2 above), and use the canonical way to read and write option values instead i.e. via the Options::<optionName>() accessors.
  1. Fixed recomputeDependentOptions() to rely on the Option class (see 2 above). We can compare the option against its default value using the canonical accessors.
  1. Fixed Options::initialize() to only compute the default option value once. The "default" value may actually be a function call. Though current uses does not have side effects if called more than once, it is best to not assume this.
  1. Moved the definition of MAXIMUM_NUMBER_OF_FTL_COMPILER_THREADS and enableWebAssemblyStreamingApi from Options.h to OptionsList.h because they are used there first.
  1. Reduced the size of the JSC::Config to 1 PageSize.


  • API/glib/JSCOptions.cpp:

(jscOptionsSetValue):
(jscOptionsGetValue):
(jsc_options_foreach):

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • runtime/JSCConfig.h:
  • runtime/OptionEntry.h: Removed.
  • runtime/Options.cpp:

(JSC::parse):
(JSC::scaleJITPolicy):
(JSC::recomputeDependentOptions):
(JSC::Options::addressOfOption):
(JSC::Options::addressOfOptionDefault):
(JSC::Options::initialize):
(JSC::Options::setOptionWithoutAlias):
(JSC::invertBoolOptionValue):
(JSC::Options::setAliasedOption):
(JSC::Options::dumpAllOptions):
(JSC::OptionReader::Option::operator!= const):
(JSC::OptionReader::Option::name const):
(JSC::OptionReader::Option::description const):
(JSC::OptionReader::Option::type const):
(JSC::OptionReader::Option::availability const):
(JSC::OptionReader::Option::isOverridden const):
(JSC::OptionReader::Option::Option):
(JSC::Options::dumpOption):
(JSC::OptionReader::optionFor):
(JSC::OptionReader::defaultFor):
(JSC::OptionReader::Option::initValue):
(JSC::OptionReader::Option::dump const):
(JSC::OptionReader::Option::operator== const):
(JSC::Option::dump const): Deleted.
(JSC::Option::operator== const): Deleted.

  • runtime/Options.h:

(JSC::Option::Option): Deleted.
(JSC::Option::operator!= const): Deleted.
(JSC::Option::id const): Deleted.
(JSC::Option::name const): Deleted.
(JSC::Option::description const): Deleted.
(JSC::Option::type const): Deleted.
(JSC::Option::availability const): Deleted.
(JSC::Option::isOverridden const): Deleted.
(JSC::Option::defaultOption const): Deleted.
(JSC::Option::boolVal): Deleted.
(JSC::Option::unsignedVal): Deleted.
(JSC::Option::doubleVal): Deleted.
(JSC::Option::int32Val): Deleted.
(JSC::Option::optionRangeVal): Deleted.
(JSC::Option::optionStringVal): Deleted.
(JSC::Option::gcLogLevelVal): Deleted.

  • runtime/OptionsList.h:

(JSC::OptionRange::operator= ):
(JSC::OptionRange::rangeString const):

11:34 AM Changeset in webkit [252556] by Alan Coon
  • 4 edits in branches/safari-608-branch/Source

Cherry-pick r252297. rdar://problem/57058406

[WebAuthn] Add quirk needed to support legacy Google NFC Titan security keys
https://bugs.webkit.org/show_bug.cgi?id=204024
<rdar://problem/56962320>

Reviewed by Brent Fulgham.

Source/WebCore:

Covered by manual tests.

  • Modules/webauthn/fido/FidoConstants.h:

Source/WebKit:

Some legacy U2F keys such as Google T1 Titan don't understand the FIDO applet command. Instead,
they are configured to only have the FIDO applet. Therefore, when the above command fails, we
use U2F_VERSION command to double check if the connected tag can actually speak U2F, indicating
we are interacting with one of these legacy keys.

  • UIProcess/WebAuthentication/Cocoa/NfcConnection.mm: (WebKit::fido::compareVersion): (WebKit::fido::trySelectFidoApplet): (WebKit::NfcConnection::transact const): (WebKit::NfcConnection::didDetectTags):

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

11:34 AM Changeset in webkit [252555] by Alan Coon
  • 5 edits in branches/safari-608-branch

Cherry-pick r252248. rdar://problem/57058392

[WebAuthn] Return NotAllowedError immediately for UI cancellations
https://bugs.webkit.org/show_bug.cgi?id=203937
<rdar://problem/56962420>

Reviewed by Brent Fulgham.

Source/WebKit:

NotAllowedError representing UI cancellations should be returned to sites
immediately such that sites could show appropriate error page immediately.

Covered by existing tests.

  • UIProcess/WebAuthentication/AuthenticatorManager.cpp: (WebKit::AuthenticatorManager::cancelRequest): (WebKit::AuthenticatorManager::clearState): (WebKit::AuthenticatorManager::resetState): Deleted.
  • UIProcess/WebAuthentication/AuthenticatorManager.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (TestWebKitAPI::TEST):

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

11:32 AM Changeset in webkit [252554] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebCore

Return value of CSSPropertyAnimation::blendProperties() isn't used anywhere
https://bugs.webkit.org/show_bug.cgi?id=204299

Patch by Antoine Quint <Antoine Quint> on 2019-11-18
Reviewed by Dean Jackson.

There is no code calling CSSPropertyAnimation::blendProperties() that uses its returen value, so we change
that function to return void. Also, since this function contains the only call site to
CSSPropertyBlendingClient::isAccelerated(), we delete that function too.

  • animation/CSSPropertyBlendingClient.h:
  • animation/KeyframeEffect.h:

(WebCore::KeyframeEffect::isAccelerated const):

  • page/animation/AnimationBase.h:

(WebCore::AnimationBase::isAccelerated const):

  • page/animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimation::blendProperties):

  • page/animation/CSSPropertyAnimation.h:
11:13 AM Changeset in webkit [252553] by Antti Koivisto
  • 12 edits
    2 moves in trunk/Source/WebCore

Rename DocumentRuleSets to Style::ScopeRuleSets
https://bugs.webkit.org/show_bug.cgi?id=204301

Reviewed by Zalan Bujtas.

The current name is misleading, these objects are per style scope, not per document.
Also switch to Style namespace and directory.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/ElementRuleCollector.cpp:

(WebCore::ElementRuleCollector::ElementRuleCollector):

  • css/ElementRuleCollector.h:
  • css/PageRuleCollector.h:

(WebCore::PageRuleCollector::PageRuleCollector):

  • style/AttributeChangeInvalidation.h:
  • style/ClassChangeInvalidation.h:
  • style/StyleInvalidationFunctions.h:
  • style/StyleResolver.h:

(WebCore::Style::Resolver::ruleSets):
(WebCore::Style::Resolver::ruleSets const):

  • style/StyleScopeRuleSets.cpp: Renamed from Source/WebCore/css/DocumentRuleSets.cpp.

(WebCore::Style::ScopeRuleSets::ScopeRuleSets):
(WebCore::Style::ScopeRuleSets::~ScopeRuleSets):
(WebCore::Style::ScopeRuleSets::userAgentMediaQueryStyle const):
(WebCore::Style::ScopeRuleSets::updateUserAgentMediaQueryStyleIfNeeded const):
(WebCore::Style::ScopeRuleSets::userStyle const):
(WebCore::Style::ScopeRuleSets::initializeUserStyle):
(WebCore::Style::ScopeRuleSets::collectRulesFromUserStyleSheets):
(WebCore::Style::ScopeRuleSets::resetAuthorStyle):
(WebCore::Style::ScopeRuleSets::resetUserAgentMediaQueryStyle):
(WebCore::Style::ScopeRuleSets::appendAuthorStyleSheets):
(WebCore::Style::ScopeRuleSets::collectFeatures const):
(WebCore::Style::ScopeRuleSets::classInvalidationRuleSets const):
(WebCore::Style::ScopeRuleSets::attributeInvalidationRuleSets const):
(WebCore::Style::ScopeRuleSets::hasComplexSelectorsForStyleAttribute const):

  • style/StyleScopeRuleSets.h: Renamed from Source/WebCore/css/DocumentRuleSets.h.

(WebCore::Style::ScopeRuleSets::features const):
(WebCore::Style::ScopeRuleSets::mutableFeatures):

  • style/StyleSharingResolver.cpp:

(WebCore::Style::SharingResolver::SharingResolver):

  • style/StyleSharingResolver.h:
11:09 AM Changeset in webkit [252552] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Delete unused visually non-empty methods from FrameView
https://bugs.webkit.org/show_bug.cgi?id=204303

Patch by Benjamin Nham <Ben Nham> on 2019-11-18
Reviewed by Zalan Bujtas.

FrameView's updateIsVisuallyNonEmpty and updateSignificantRenderedTextMilestoneIfNeeded
methods are in its header, but aren't implemented or used. Remove them.

  • page/FrameView.h:
10:55 AM Changeset in webkit [252551] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Publish JavaScriptCore as Clang module
https://bugs.webkit.org/show_bug.cgi?id=204207

Patch by Chris Polcyn <cpolcyn@apple.com> on 2019-11-18
Reviewed by Keith Miller.

  • Configurations/JavaScriptCore.xcconfig:
10:46 AM Changeset in webkit [252550] by Darin Adler
  • 2 edits in trunk/Source/WebKit

WKWebView.mediaType is nullable, not null_resettable
https://bugs.webkit.org/show_bug.cgi?id=204297

Reviewed by Anders Carlsson.

  • UIProcess/API/Cocoa/WKWebView.h: Use nullable for mediaType since this

property returns a null value when the media type is not being overridden.

10:15 AM Changeset in webkit [252549] by Kocsen Chung
  • 13 edits
    2 adds in branches/safari-608.4.9.0-branch

Apply patch. rdar://problem/57283187

10:13 AM Changeset in webkit [252548] by Kocsen Chung
  • 7 edits in branches/safari-608.4.9.0-branch/Source

Versioning.

10:01 AM Changeset in webkit [252547] by Ross Kirsling
  • 3 edits in trunk/Source/JavaScriptCore

Unreviewed, address Darin's feedback on r252520.

  • runtime/FunctionRareData.h:
  • runtime/JSFunctionInlines.h:

(JSC::JSFunction::hasReifiedLength const):
(JSC::JSFunction::hasReifiedName const):

9:37 AM Changeset in webkit [252546] by Antti Koivisto
  • 37 edits
    2 moves in trunk/Source/WebCore

Move StyleResolver to Style namespace
https://bugs.webkit.org/show_bug.cgi?id=204294

Reviewed by Zalan Bujtas.

Most subparts are already in Style namespace.

Also rename it to Style::Resolver and move files to WebCore/style subdirectory.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::updateBlendingKeyframes):

  • css/DOMCSSRegisterCustomProperty.cpp:

(WebCore::DOMCSSRegisterCustomProperty::registerProperty):

  • css/DocumentRuleSets.cpp:

(WebCore::DocumentRuleSets::DocumentRuleSets):
(WebCore::DocumentRuleSets::collectRulesFromUserStyleSheets):
(WebCore::DocumentRuleSets::appendAuthorStyleSheets):

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

(WebCore::MediaQueryEvaluator::evaluate const):

  • css/MediaQueryEvaluator.h:
  • css/PageRuleCollector.h:

(WebCore::PageRuleCollector::PageRuleCollector):

  • css/RuleSet.cpp:

(WebCore::RuleSet::addChildRules):
(WebCore::RuleSet::addRulesFromSheet):

  • css/RuleSet.h:
  • dom/Document.cpp:

(WebCore::Document::userAgentShadowTreeStyleResolver):

  • dom/Document.h:
  • dom/Element.cpp:

(WebCore::Element::styleResolver):
(WebCore::Element::resolveStyle):
(WebCore::Element::resolveCustomStyle):

  • dom/Element.h:
  • editing/EditingStyle.cpp:

(WebCore::EditingStyle::mergeStyleFromRules):
(WebCore::EditingStyle::removeStyleFromRulesAndContext):
(WebCore::EditingStyle::removePropertiesInElementDefaultStyle):

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::focusedOrActiveStateChanged):

  • html/shadow/SliderThumbElement.cpp:

(WebCore::SliderThumbElement::resolveCustomStyle):
(WebCore::SliderContainerElement::resolveCustomStyle):

  • html/shadow/SliderThumbElement.h:
  • html/shadow/TextControlInnerElements.cpp:

(WebCore::TextControlInnerContainer::resolveCustomStyle):
(WebCore::TextControlInnerElement::resolveCustomStyle):
(WebCore::TextControlInnerTextElement::resolveCustomStyle):
(WebCore::TextControlPlaceholderElement::resolveCustomStyle):

  • html/shadow/TextControlInnerElements.h:
  • inspector/agents/InspectorCSSAgent.cpp:

(WebCore::InspectorCSSAgent::getMatchedStylesForNode):
(WebCore::InspectorCSSAgent::buildObjectForRule):
(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):

  • inspector/agents/InspectorCSSAgent.h:
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::getMatchedCSSRules const):

  • page/Page.cpp:

(WebCore::Page::updateStyleAfterChangeInEnvironment):

  • page/animation/CompositeAnimation.cpp:

(WebCore::CompositeAnimation::animate):

  • rendering/RenderTheme.h:
  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::changeRequiresLayerRepaint const):

  • rendering/style/RenderStyle.h:
  • style/StyleResolver.cpp: Renamed from Source/WebCore/css/StyleResolver.cpp.

(WebCore::Style::Resolver::Resolver):
(WebCore::Style::Resolver::addCurrentSVGFontFaceRules):
(WebCore::Style::Resolver::appendAuthorStyleSheets):
(WebCore::Style::Resolver::addKeyframeStyle):
(WebCore::Style::Resolver::~Resolver):
(WebCore::Style::Resolver::State::State):
(WebCore::Style::Resolver::State::setStyle):
(WebCore::Style::Resolver::State::setParentStyle):
(WebCore::Style::Resolver::builderContext):
(WebCore::Style::Resolver::styleForElement):
(WebCore::Style::Resolver::styleForKeyframe):
(WebCore::Style::Resolver::isAnimationNameValid):
(WebCore::Style::Resolver::keyframeStylesForAnimation):
(WebCore::Style::Resolver::pseudoStyleForElement):
(WebCore::Style::Resolver::styleForPage):
(WebCore::Style::Resolver::defaultStyleForElement):
(WebCore::Style::Resolver::styleRulesForElement):
(WebCore::Style::Resolver::pseudoStyleRulesForElement):
(WebCore::Style::Resolver::invalidateMatchedDeclarationsCache):
(WebCore::Style::Resolver::clearCachedDeclarationsAffectedByViewportUnits):
(WebCore::Style::Resolver::applyMatchedProperties):
(WebCore::Style::Resolver::addViewportDependentMediaQueryResult):
(WebCore::Style::Resolver::hasMediaQueriesAffectedByViewportChange const):
(WebCore::Style::Resolver::addAccessibilitySettingsDependentMediaQueryResult):
(WebCore::Style::Resolver::hasMediaQueriesAffectedByAccessibilitySettingsChange const):
(WebCore::Style::Resolver::addAppearanceDependentMediaQueryResult):
(WebCore::Style::Resolver::hasMediaQueriesAffectedByAppearanceChange const):

  • style/StyleResolver.h: Renamed from Source/WebCore/css/StyleResolver.h.

(WebCore::Style::ElementStyle::ElementStyle):
(WebCore::Style::Resolver::hasSelectorForAttribute const):
(WebCore::Style::Resolver::hasSelectorForId const):

  • style/StyleScope.cpp:

(WebCore::Style::Scope::resolver):
(WebCore::Style::Scope::resolverIfExists):
(WebCore::Style::Scope::analyzeStyleSheetChange):
(WebCore::Style::invalidateHostAndSlottedStyleIfNeeded):
(WebCore::Style::Scope::updateActiveStyleSheets):
(WebCore::Style::Scope::updateResolver):
(WebCore::Style::Scope::scheduleUpdate):
(WebCore::Style::Scope::evaluateMediaQueriesForViewportChange):
(WebCore::Style::Scope::evaluateMediaQueriesForAccessibilitySettingsChange):
(WebCore::Style::Scope::evaluateMediaQueriesForAppearanceChange):
(WebCore::Style::Scope::updateStyleResolver): Deleted.

  • style/StyleScope.h:
  • style/StyleSharingResolver.cpp:

(WebCore::Style::elementHasDirectionAuto):

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::Scope::Scope):
(WebCore::Style::TreeResolver::Scope::~Scope):
(WebCore::Style::TreeResolver::styleForElement):
(WebCore::Style::TreeResolver::resolveElement):
(WebCore::Style::TreeResolver::resolvePseudoStyle):
(WebCore::Style::TreeResolver::resolve):

  • style/StyleTreeResolver.h:
  • svg/SVGElement.cpp:

(WebCore::SVGElement::resolveCustomStyle):

  • svg/SVGElement.h:
9:34 AM Changeset in webkit [252545] by Chris Dumez
  • 5 edits in trunk/Source/WebCore

REGRESSION (r252497): Multiple mediacapturefromelement tests are crashing on mac debug
https://bugs.webkit.org/show_bug.cgi?id=204267
<rdar://problem/57248130>

Reviewed by Eric Carlson.

No new tests, covered by fast/mediacapturefromelement/CanvasCaptureMediaStream-creation.html.

  • Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:

(WebCore::CanvasCaptureMediaStreamTrack::activeDOMObjectName const):
(WebCore::CanvasCaptureMediaStreamTrack::clone):
We were failing to call suspendIfNeeded() on the track after constructing it.

  • Modules/mediastream/CanvasCaptureMediaStreamTrack.h:
  • Modules/mediastream/MediaStreamTrack.h:
  • dom/ActiveDOMObject.cpp:

(WebCore::ActiveDOMObject::assertSuspendIfNeededWasCalled const):
Add logging when the suspendIfNeeded assertion fails to facilitate debugging such issues
in the future.

9:14 AM Changeset in webkit [252544] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][Invalidation] Force rebuild layout tree on tree mutation
https://bugs.webkit.org/show_bug.cgi?id=204295
<rdar://problem/57283650>

Reviewed by Antti Koivisto.

This should evolve into a fine grained tree invalidation.

  • rendering/updating/RenderTreeBuilder.cpp:

(WebCore::RenderTreeBuilder::attachToRenderElementInternal):
(WebCore::RenderTreeBuilder::detachFromRenderElement):

  • rendering/updating/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::updateRendererStyle):

9:13 AM Changeset in webkit [252543] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][Invalidation] Do not collect inline items multiple times
https://bugs.webkit.org/show_bug.cgi?id=204296
<rdar://problem/57283761>

Reviewed by Antti Koivisto.

When inline layout is preceded by preferred width computation, we don't need to re-collect the inline items again.

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
(WebCore::Layout::InlineFormattingContext::collectInlineContentIfNeeded):
(WebCore::Layout::InlineFormattingContext::collectInlineContent): Deleted.

  • layout/inlineformatting/InlineFormattingContext.h:
7:31 AM Changeset in webkit [252542] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix build (again) for a11y disabled, after r252417.

  • accessibility/AXObjectCache.h:

(WebCore::AXObjectCache::rootObject):

5:51 AM Changeset in webkit [252541] by Caio Lima
  • 3 edits in trunk/JSTests

Skipping wasm-error-message-cross-threads.js on architectures without WASM support
https://bugs.webkit.org/show_bug.cgi?id=204293

Unreviewed gardening.

  • stress/ensure-code-block-is-not-precise-allocation.js:

Skipping this test until we fix OSR to LLInt on MIPS.

  • stress/wasm-error-message-cross-threads.js:
2:51 AM Changeset in webkit [252540] by graouts@webkit.org
  • 1 edit
    1 add in trunk/LayoutTests

[Web Animations] Retargeted transitions targeting accelerated properties do not stop the original transition
https://bugs.webkit.org/show_bug.cgi?id=204116

Reviewed by Dean Jackson.

Rebaseline iOS test output.

  • platform/ios/imported/w3c/web-platform-tests/dom/events/Event-dispatch-on-disabled-elements-expected.txt: Added.
12:40 AM Changeset in webkit [252539] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

Automation: scrollIntoView should do nothing if element is visible
https://bugs.webkit.org/show_bug.cgi?id=204194

Reviewed by Carlos Alberto Lopez Perez.

"To scroll into view an element perform the following steps only if the element is not already in view"
https://w3c.github.io/webdriver/#dfn-scrolls-into-view

Fixes: imported/w3c/webdriver/tests/element_click/scroll_into_view.py::test_partially_visible_does_not_scroll[9]

imported/w3c/webdriver/tests/element_click/scroll_into_view.py::test_partially_visible_does_not_scroll[8]
imported/w3c/webdriver/tests/element_click/scroll_into_view.py::test_partially_visible_does_not_scroll[7]
imported/w3c/webdriver/tests/element_click/scroll_into_view.py::test_partially_visible_does_not_scroll[6]
imported/w3c/webdriver/tests/element_click/scroll_into_view.py::test_partially_visible_does_not_scroll[5]
imported/w3c/webdriver/tests/element_click/scroll_into_view.py::test_partially_visible_does_not_scroll[4]
imported/w3c/webdriver/tests/element_click/scroll_into_view.py::test_partially_visible_does_not_scroll[3]
imported/w3c/webdriver/tests/element_click/scroll_into_view.py::test_partially_visible_does_not_scroll[2]
imported/w3c/webdriver/tests/element_click/scroll_into_view.py::test_partially_visible_does_not_scroll[1]

  • WebProcess/Automation/WebAutomationSessionProxy.cpp:

(WebKit::WebAutomationSessionProxy::computeElementLayout): Use scrollIntoViewIfNotVisible instead of
scrollIntoViewIfNeeded.

12:24 AM Changeset in webkit [252538] by ysuzuki@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

BigInt should store its data in the primitive gigacage.
https://bugs.webkit.org/show_bug.cgi?id=194888

Reviewed by Mark Lam.

We should put these bits in the primitive gigacage to reduce the
value of type confusing a BigInt as a different cell and using the
digits as a way to create an arbitrary pointer. I didn't worry
about length/sign as they are not possible to forge a pointer with.

We also put JSBigInt in IsoSubspace.

  • runtime/CellSize.h:

(JSC::isDynamicallySizedType):
(JSC::cellSize):

  • runtime/JSBigInt.cpp:

(JSC::JSBigInt::JSBigInt):
(JSC::JSBigInt::destroy):
(JSC::JSBigInt::createWithLengthUnchecked):

  • runtime/JSBigInt.h:

(JSC::JSBigInt::allocationSize): Deleted.

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:

Nov 17, 2019:

10:27 PM Changeset in webkit [252537] by rniwa@webkit.org
  • 5 edits in trunk

Focusing a shadow host which delegates focus should skip inner shadow hosts which delegate focus
https://bugs.webkit.org/show_bug.cgi?id=203869

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Imported the latest test from https://github.com/web-platform-tests/wpt/pull/20079.

  • web-platform-tests/shadow-dom/focus/focus-method-delegatesFocus-expected.txt:
  • web-platform-tests/shadow-dom/focus/focus-method-delegatesFocus.html:

Source/WebCore:

Fixed the bug that WebKit doesn't skip a shadow host with delegatesFocus set when looking for
the first programatically focusable element.

Test: imported/w3c/web-platform-tests/shadow-dom/focus/focus-method-delegatesFocus.html

  • dom/Element.cpp:

(WebCore::shadowRootWithDelegatesFocus): Added.
(WebCore::isProgramaticallyFocusable): Updated to return false on a shadow host with delegatesFocus.
(WebCore::Element::focus): Don't move the focus if the shadow host only contains a focused element
per https://github.com/w3c/webcomponents/issues/840.

5:12 PM Changeset in webkit [252536] by ap@apple.com
  • 3 edits in trunk/Source/WebKit

Better build fix attempt after r252434.

We do need this variant, it was a mistake to claim that it's "old".

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

(WebKit::decidePolicyForGeolocationRequestFromOrigin):

5:06 PM Changeset in webkit [252535] by ap@apple.com
  • 3 edits in trunk/Source/WebKit

Build fix attempt after r252434.

This variant of decidePolicyForGeolocationRequestFromOrigin doesn't exist in UIKit.
Removing dead code, but someone needs to take a look at what the original intent here was.

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

(WebKit::decidePolicyForGeolocationRequestFromOrigin):

2:30 PM Changeset in webkit [252534] by Alan Bujtas
  • 10 edits in trunk/Source/WebCore

[LFC] Move layout state initialization out of LayoutContext
https://bugs.webkit.org/show_bug.cgi?id=204285
<rdar://problem/57262858>

Reviewed by Antti Koivisto.

Move layout initialization to FrameViewLayoutContext::layoutUsingFormattingContext. This is now pretty close to
what the final initialization will look like.

  • layout/LayoutContext.cpp:

(WebCore::Layout::initializeLayoutState): Deleted.
(WebCore::Layout::LayoutContext::runLayout): Deleted.
(WebCore::Layout::LayoutContext::runLayoutAndVerify): Deleted.
(WebCore::Layout::LayoutContext::createLayoutState): Deleted.

  • layout/LayoutContext.h:

(WebCore::Layout::LayoutContext::layoutState):

  • layout/LayoutState.cpp:

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

  • layout/LayoutState.h:

(WebCore::Layout::LayoutState::root const):
(WebCore::Layout::LayoutState::rootRenderer const):
(WebCore::Layout::LayoutState::setQuirksMode):
(WebCore::Layout::LayoutState::layoutBoxForRenderer const): Deleted.

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::LayoutTreeContent::LayoutTreeContent):
(WebCore::Layout::TreeBuilder::buildLayoutTree):
(WebCore::Layout::TreeBuilder::buildTree):
(WebCore::Layout::TreeBuilder::createLayoutBox):
(WebCore::Layout::printLayoutTreeForLiveDocuments):

  • layout/layouttree/LayoutTreeBuilder.h:

(WebCore::Layout::LayoutTreeContent::rootLayoutBox const):
(WebCore::Layout::LayoutTreeContent::rootLayoutBox):
(WebCore::Layout::LayoutTreeContent::rootRenderer const):
(WebCore::Layout::LayoutTreeContent::layoutBoxForRenderer):
(WebCore::Layout::LayoutTreeContent::addLayoutBoxForRenderer):

  • page/FrameViewLayoutContext.cpp:

(WebCore::FrameViewLayoutContext::layoutUsingFormattingContext):
(WebCore::FrameViewLayoutContext::invalidateLayoutTreeContent):

  • page/FrameViewLayoutContext.h:

(WebCore::FrameViewLayoutContext::layoutTreeContent const):

  • rendering/updating/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::updateRendererStyle):

1:02 PM Changeset in webkit [252533] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC] Pass in the content area to LayoutContext::layout
https://bugs.webkit.org/show_bug.cgi?id=204284
<rdar://problem/57262690>

Reviewed by Antti Koivisto.

Note that we never layout the root box. It has to have an already computed geometry (in case of ICB, it's the view geometry).

  • layout/LayoutContext.cpp:

(WebCore::Layout::LayoutContext::layout):
(WebCore::Layout::LayoutContext::runLayout):
(WebCore::Layout::LayoutContext::runLayoutAndVerify):

  • layout/LayoutContext.h:
  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::printLayoutTreeForLiveDocuments):

  • page/FrameViewLayoutContext.cpp:

(WebCore::FrameViewLayoutContext::layoutUsingFormattingContext):

12:59 PM Changeset in webkit [252532] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][Out-of-flow] Collect out-of-flow boxes lazily
https://bugs.webkit.org/show_bug.cgi?id=204282
<rdar://problem/57259302>

Reviewed by Antti Koivisto.

Eventually we need to turn it into a register-self as boxes are being inserted.

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
(WebCore::Layout::FormattingContext::collectOutOfFlowDescendantsIfNeeded):

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

(WebCore::Layout::initializeLayoutState):

12:54 PM Changeset in webkit [252531] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][Invalidation] Add support for simple inline invalidation
https://bugs.webkit.org/show_bug.cgi?id=204268
<rdar://problem/57248995>

Reviewed by Antti Koivisto.

Eventually invalidateFormattingState() will take care of cleaning up the state based on the current InvalidationState.

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::layoutInFlowContent):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
(WebCore::Layout::InlineFormattingContext::invalidateFormattingState):

  • layout/inlineformatting/InlineFormattingContext.h:
  • layout/inlineformatting/InlineFormattingState.h:

(WebCore::Layout::InlineFormattingState::resetInlineRuns):

12:01 PM Changeset in webkit [252530] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Optimize Line::isVisuallyEmpty for the most common inline content.
https://bugs.webkit.org/show_bug.cgi?id=204259
<rdar://problem/57243610>

Reviewed by Antti Koivisto.

Move the check on text content to the front.

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::isVisuallyEmpty const):

Nov 16, 2019:

8:04 PM Changeset in webkit [252529] by Wenson Hsieh
  • 5 edits in trunk

REGRESSION (r243606): Interacting with date and time pickers hangs the UI process on watchOS
https://bugs.webkit.org/show_bug.cgi?id=204280
<rdar://problem/49718359>

Reviewed by Chris Dumez.

Source/WebKit:

After r243606, interacting with date and time inputs on watchOS hangs the UI process indefinitely while
attempting to create an input peripheral (WKFormInputControl) for the date or time picker. This is because, in
the process of setting up a new WKDateTimePicker, we call into +[UIKeyboard defaultSizeForInterfaceOrientation:]
which hangs when attempting to fetch the current UIKit keyboard layout type.

To address this, we simply avoid setting _inputPeripheral on watchOS, as we did prior to r243606. Covered by the
existing layout test fast/forms/watchos/time-picker-value-change.html, which currently times out.

  • UIProcess/ios/WKContentViewInteraction.mm:

(createInputPeripheralWithView):

LayoutTests:

Clean up a few details in the layout test.

  • fast/forms/watchos/time-picker-value-change-expected.txt:
  • fast/forms/watchos/time-picker-value-change.html:

Tweak the test description, and simplify logic for completing the layout test.

4:09 PM Changeset in webkit [252528] by Wenson Hsieh
  • 10 edits in trunk

[iOS] [UIWKDocumentContext] Add the ability to request all marked text rects
https://bugs.webkit.org/show_bug.cgi?id=204278
<rdar://problem/56527803>

Reviewed by Tim Horton.

Source/WebCore:

Mark a constructor as WEBCORE_EXPORT. See WebKit ChangeLog for more details.

  • editing/TextIterator.h:

Source/WebKit:

Add support for a new UIWKDocumentRequest option to request character rects for each character in the marked
text range. Unless UIWKDocumentRequestRects is additionally specified (in which case we'll return rects for
every single character in the editable root anyways), this option will ensure that all characters in the
composition range (which should match -[UIWKDocumentContext markedTextRange]) will have known character rects
that can be retrieved using -[UIWKDocumentContext enumerateLayoutRects:] (or one of the other helper methods
that utilize -enumerateLayoutRects:).

Test: WebKit.DocumentEditingContextWithMarkedText

  • Platform/spi/ios/UIKitSPI.h:

Add a staging declaration for the new option.

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

(toWebDocumentRequestOptions):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::requestDocumentEditingContext):

Refactor logic that uses CharacterIterator to find rects for each character range into a lambda function, and
use this lambda function to handle UIWKDocumentRequestRects and the new UIWKDocumentRequestMarkedTextRects. The
marked text range is relative to the start of the context before the selection.

Tools:

Add an API test to exercise the new request option.

  • TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm:

(-[UIWKDocumentContext markedTextRects]):

  • TestWebKitAPI/ios/UIKitSPI.h:
9:58 AM WebKitGTK/2.26.x edited by Philippe Normand
(diff)
9:57 AM WebKitGTK/2.26.x edited by Philippe Normand
(diff)
9:11 AM Changeset in webkit [252527] by Philippe Normand
  • 9 edits
    5 adds in trunk

Unreviewed, rolling out r252526.

broke iOS and mac builds

Reverted changeset:

"Unreviewed, rolling out r252455."
https://bugs.webkit.org/show_bug.cgi?id=204272
https://trac.webkit.org/changeset/252526

6:28 AM Changeset in webkit [252526] by commit-queue@webkit.org
  • 9 edits
    3 deletes in trunk

Unreviewed, rolling out r252455.
https://bugs.webkit.org/show_bug.cgi?id=204272

Broke a layout-test on iOS (Requested by aakashja_ on
#webkit).

Reverted changeset:

"[Web Animations] Retargeted transitions targeting accelerated
properties do not stop the original transition"
https://bugs.webkit.org/show_bug.cgi?id=204116
https://trac.webkit.org/changeset/252455

Nov 15, 2019:

11:54 PM Changeset in webkit [252525] by ysuzuki@apple.com
  • 16 edits in trunk/Source

[JSC] Remove index-masking on ScopedArguments and put it in IsoSubspace
https://bugs.webkit.org/show_bug.cgi?id=204269

Reviewed by Saam Barati.

Source/JavaScriptCore:

We should remove index-masking for ScopedArguments. This patch reverts it.
We still use AuxiliaryBuffer, and avoid using variable sized cell. Then,
this patch also puts ScopedArguments in IsoSubspace.

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::generateWithGuard):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileGetByValOnScopedArguments):
(JSC::DFG::SpeculativeJIT::compileGetArrayLength):

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

(JSC::FTL::DFG::LowerDFGToB3::LowerDFGToB3):
(JSC::FTL::DFG::LowerDFGToB3::compileGetArrayLength):
(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileGetMyArgumentByVal):
(JSC::FTL::DFG::LowerDFGToB3::preciseIndexMask64): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::preciseIndexMask32): Deleted.

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::emitPreparePreciseIndexMask32): Deleted.

  • jit/AssemblyHelpers.h:
  • jit/JIT.cpp:

(JSC::JIT::JIT):

  • jit/JIT.h:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emitScopedArgumentsGetByVal):

  • runtime/ScopedArguments.cpp:

(JSC::ScopedArguments::ScopedArguments):
(JSC::ScopedArguments::createUninitialized):
(JSC::ScopedArguments::create):
(JSC::ScopedArguments::createByCopyingFrom):
(JSC::ScopedArguments::visitChildren):
(JSC::ScopedArguments::overrideThings):
(JSC::ScopedArguments::overrideThingsIfNecessary):
(JSC::ScopedArguments::unmapArgument):

  • runtime/ScopedArguments.h:
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:

Source/WTF:

  • wtf/MathExtras.h:

(WTF::computeIndexingMask): Deleted.
(WTF::preciseIndexMaskShiftForSize): Deleted.
(WTF::preciseIndexMaskShift): Deleted.
(WTF::opaque): Deleted.
(WTF::preciseIndexMaskPtr): Deleted.

9:45 PM Changeset in webkit [252524] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

REGRESSION (r252497): Multiple mediacapturefromelement tests are crashing on mac debug
https://bugs.webkit.org/show_bug.cgi?id=204267
<rdar://problem/57248130>

Reviewed by Alexey Proskuryakov.

Make sure the CanvasCaptureMediaStreamTrack factory function calls suspendIfNeeded()
since the class inhehits ActiveDOMObject.

  • Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:

(WebCore::CanvasCaptureMediaStreamTrack::create):

8:31 PM Changeset in webkit [252523] by Devin Rousso
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Elements: Styles: support multiline CSS property values
https://bugs.webkit.org/show_bug.cgi?id=203754
<rdar://problem/56819044>

Reviewed by Brian Burg.

  • UserInterface/Models/CSSProperty.js:

(WI.CSSProperty.prototype.update):
(WI.CSSProperty.prototype._updateStyleText):
When the property is updated from the backend, find the first newline inside the value and
preserve the indent string so it can be re-added when updating the backend.

  • UserInterface/Views/SpreadsheetTextField.js:

(WI.SpreadsheetTextField.prototype._handleKeyDown):

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:

(.spreadsheet-style-declaration-editor .property:not(.disabled) .value):
(.spreadsheet-style-declaration-editor .property:not(.disabled).has-newline .value): Added.
(.spreadsheet-style-declaration-editor .property:not(.disabled).has-newline .semicolon): Added.

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype.updateStatus):
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldAllowsNewlines): Added.
(WI.SpreadsheetStyleProperty.prototype._handleValueChange):
Support shift-enter when editing a CSS property's value to insert a newline.

8:21 PM Changeset in webkit [252522] by eric.carlson@apple.com
  • 10 edits in trunk/Source

Don't use AVCapture on watchOS and tvOS
https://bugs.webkit.org/show_bug.cgi?id=204254
<rdar://problem/45508044>

Reviewed by Youenn Fablet.

  • Configurations/FeatureDefines.xcconfig:
8:13 PM Changeset in webkit [252521] by eric.carlson@apple.com
  • 4 edits in trunk

[iOS] Audio capture fails when a track is unmuted
https://bugs.webkit.org/show_bug.cgi?id=204202
<rdar://problem/57005820>

Reviewed by Jer Noble.
Source/WebCore:

No new tests, this fixes an API test broken by r252470.

  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::setMuted):

Tools:

Make WebKit2.CaptureMute failures easier to diagnose.

  • TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:

(TestWebKitAPI::wkMediaCaptureStateString):
(TestWebKitAPI::waitUntilCaptureState):
(TestWebKitAPI::TEST):

7:44 PM Changeset in webkit [252520] by Ross Kirsling
  • 59 edits in trunk

[JSC] Anonymous built-in functions should have empty string for a name
https://bugs.webkit.org/show_bug.cgi?id=204214

Reviewed by Yusuke Suzuki.

JSTests:

  • test262/expectations.yaml:

Mark 20 test cases as passing.

  • stress/builtin-function-name.js:

(shouldThrow):

  • stress/private-name-as-anonymous-builtin.js:

Fix tests which are no longer accurate.

Source/JavaScriptCore:

Ensure that Function.prototype.name (exists and) is an empty string for various anonymous built-in functions,
following https://github.com/tc39/ecma262/pull/1490.

Specifically:

  1. for promises, resolve / reject / executor elements are lacking a name property
  2. for proxies, the revocation function is lacking a name property
  3. for certain Intl objects, function getters return a bound function named "bound <name>" instead of ""

This change also means that we no longer need the NameVisibility enum or isAnonymousBuiltinFunction logic.

  • builtins/PromiseConstructor.js:
  • builtins/PromiseOperations.js:

Ensure resolve / reject / executor elements have a name property.
(They were @-named, which resulted in no name property at all.)

  • runtime/ProxyRevoke.cpp:

(JSC::ProxyRevoke::create):
(JSC::ProxyRevoke::finishCreation):

  • runtime/ProxyRevoke.h:

Ensure revocation functions have a name property.
(NameVisibility existed solely to ensure this *wasn't* the case.)

  • runtime/IntlCollatorPrototype.cpp:

(JSC::IntlCollatorPrototypeGetterCompare):

  • runtime/IntlDateTimeFormatPrototype.cpp:

(JSC::IntlDateTimeFormatPrototypeGetterFormat):

  • runtime/IntlNumberFormatPrototype.cpp:

(JSC::IntlNumberFormatPrototypeGetterFormat):
Give these bound functions an empty name.

  • bytecode/UnlinkedFunctionExecutable.h:
  • runtime/FunctionExecutable.h:
  • runtime/FunctionRareData.cpp:

(JSC::FunctionRareData::create):
(JSC::FunctionRareData::FunctionRareData):

  • runtime/FunctionRareData.h:
  • runtime/JSFunction.cpp:

(JSC::JSFunction::allocateRareData):
(JSC::JSFunction::allocateAndInitializeRareData):
(JSC::JSFunction::reifyLazyBoundNameIfNeeded):

  • runtime/JSFunction.h:
  • runtime/JSFunctionInlines.h:

(JSC::JSFunction::hasReifiedName const): Ensure bound anonymous built-in functions can have an empty name.
(JSC::JSFunction::isAnonymousBuiltinFunction const): Deleted.
Get rid of isAnonymousBuiltinFunction logic.

  • runtime/ArrayConstructor.cpp:

(JSC::ArrayConstructor::finishCreation):

  • runtime/AsyncFunctionConstructor.cpp:

(JSC::AsyncFunctionConstructor::finishCreation):

  • runtime/AsyncGeneratorFunctionConstructor.cpp:

(JSC::AsyncGeneratorFunctionConstructor::finishCreation):

  • runtime/BigIntConstructor.cpp:

(JSC::BigIntConstructor::finishCreation):

  • runtime/BooleanConstructor.cpp:

(JSC::BooleanConstructor::finishCreation):

  • runtime/DateConstructor.cpp:

(JSC::DateConstructor::finishCreation):

  • runtime/ErrorConstructor.cpp:

(JSC::ErrorConstructor::finishCreation):

  • runtime/FunctionConstructor.cpp:

(JSC::FunctionConstructor::finishCreation):

  • runtime/FunctionPrototype.cpp:

(JSC::FunctionPrototype::finishCreation):

  • runtime/GeneratorFunctionConstructor.cpp:

(JSC::GeneratorFunctionConstructor::finishCreation):

  • runtime/InternalFunction.cpp:

(JSC::InternalFunction::finishCreation):

  • runtime/InternalFunction.h:
  • runtime/IntlCollatorConstructor.cpp:

(JSC::IntlCollatorConstructor::finishCreation):

  • runtime/IntlDateTimeFormatConstructor.cpp:

(JSC::IntlDateTimeFormatConstructor::finishCreation):

  • runtime/IntlNumberFormatConstructor.cpp:

(JSC::IntlNumberFormatConstructor::finishCreation):

  • runtime/IntlPluralRulesConstructor.cpp:

(JSC::IntlPluralRulesConstructor::finishCreation):

  • runtime/JSArrayBufferConstructor.cpp:

(JSC::JSGenericArrayBufferConstructor<sharingMode>::finishCreation):

  • runtime/JSGenericTypedArrayViewConstructorInlines.h:

(JSC::JSGenericTypedArrayViewConstructor<ViewClass>::finishCreation):

  • runtime/JSTypedArrayViewConstructor.cpp:

(JSC::JSTypedArrayViewConstructor::finishCreation):

  • runtime/MapConstructor.cpp:

(JSC::MapConstructor::finishCreation):

  • runtime/NativeErrorConstructor.cpp:

(JSC::NativeErrorConstructorBase::finishCreation):

  • runtime/NullGetterFunction.h:
  • runtime/NullSetterFunction.h:
  • runtime/NumberConstructor.cpp:

(JSC::NumberConstructor::finishCreation):

  • runtime/ObjectConstructor.cpp:

(JSC::ObjectConstructor::finishCreation):

  • runtime/ProxyConstructor.cpp:

(JSC::ProxyConstructor::finishCreation):

  • runtime/RegExpConstructor.cpp:

(JSC::RegExpConstructor::finishCreation):

  • runtime/SetConstructor.cpp:

(JSC::SetConstructor::finishCreation):

  • runtime/StringConstructor.cpp:

(JSC::StringConstructor::finishCreation):

  • runtime/SymbolConstructor.cpp:

(JSC::SymbolConstructor::finishCreation):

  • runtime/WeakMapConstructor.cpp:

(JSC::WeakMapConstructor::finishCreation):

  • runtime/WeakObjectRefConstructor.cpp:

(JSC::WeakObjectRefConstructor::finishCreation):

  • runtime/WeakSetConstructor.cpp:

(JSC::WeakSetConstructor::finishCreation):

  • wasm/js/WebAssemblyCompileErrorConstructor.cpp:

(JSC::WebAssemblyCompileErrorConstructor::finishCreation):

  • wasm/js/WebAssemblyInstanceConstructor.cpp:

(JSC::WebAssemblyInstanceConstructor::finishCreation):

  • wasm/js/WebAssemblyLinkErrorConstructor.cpp:

(JSC::WebAssemblyLinkErrorConstructor::finishCreation):

  • wasm/js/WebAssemblyMemoryConstructor.cpp:

(JSC::WebAssemblyMemoryConstructor::finishCreation):

  • wasm/js/WebAssemblyModuleConstructor.cpp:

(JSC::WebAssemblyModuleConstructor::finishCreation):

  • wasm/js/WebAssemblyRuntimeErrorConstructor.cpp:

(JSC::WebAssemblyRuntimeErrorConstructor::finishCreation):

  • wasm/js/WebAssemblyTableConstructor.cpp:

(JSC::WebAssemblyTableConstructor::finishCreation):
Get rid of NameVisibility enum.

6:34 PM Changeset in webkit [252519] by basuke.suzuki@sony.com
  • 2 edits in trunk/Source/bmalloc

[bmalloc] The tracking of freeableMemory of Heap doesn't count Chunk's metadata size.
https://bugs.webkit.org/show_bug.cgi?id=204135

Reviewed by Yusuke Suzuki.

When chunk is allocated in allocateSmallChunk(), all chunk size is added to freeableMemory.
This is wrong. Only free pages should be added to it.

  • bmalloc/Heap.cpp:

(bmalloc::Heap::allocateSmallChunk):

6:32 PM Changeset in webkit [252518] by basuke.suzuki@sony.com
  • 13 edits in trunk/Source/bmalloc

[Mac] Use better describing name for Mac's scavenger compiler flag.
https://bugs.webkit.org/show_bug.cgi?id=203922

Reviewed by Yusuke Suzuki.

Changing BPLATFORM(MAC) to BUSE(PARTIAL_SCAVENGE).

  • bmalloc/BPlatform.h:
  • bmalloc/Heap.cpp:

(bmalloc::Heap::scavenge):
(bmalloc::Heap::allocateSmallChunk):
(bmalloc::Heap::allocateSmallPage):
(bmalloc::Heap::allocateLarge):

  • bmalloc/Heap.h:
  • bmalloc/IsoDirectory.h:
  • bmalloc/IsoDirectoryInlines.h:

(bmalloc::passedNumPages>::takeFirstEligible):
(bmalloc::passedNumPages>::scavenge):

  • bmalloc/IsoHeapImpl.h:
  • bmalloc/IsoHeapImplInlines.h:
  • bmalloc/LargeMap.cpp:

(bmalloc::LargeMap::add):

  • bmalloc/LargeRange.h:

(bmalloc::LargeRange::LargeRange):
(bmalloc::merge):

  • bmalloc/Scavenger.cpp:

(bmalloc::Scavenger::Scavenger):
(bmalloc::Scavenger::scavenge):
(bmalloc::Scavenger::threadRunLoop):

  • bmalloc/Scavenger.h:
  • bmalloc/SmallPage.h:
5:58 PM Changeset in webkit [252517] by Devin Rousso
  • 6 edits in trunk/Source/WebInspectorUI

Web Inspector: Sources: move the "Local Override..." creation context menu item from the Breakpoints section options menu to the Create Resource menu
https://bugs.webkit.org/show_bug.cgi?id=204178

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/SourcesNavigationSidebarPanel.js:

(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype._willDismissLocalOverridePopover):
(WI.SourcesNavigationSidebarPanel.prototype._addLocalOverride):
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateBreakpointContextMenu):
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateResourceContextMenu):
If the Local Overrides section isn't already visible, show it. Use the Local Overrides title
as the anchor for the configuration popover. If there are no existing Local Overrides, show
placeholder "No Overrides" text temporarily.

  • UserInterface/Views/EventBreakpointPopover.js:

(WI.EventBreakpointPopover.prototype._showSuggestionsView):

  • UserInterface/Views/LocalResourceOverridePopover.js:

(WI.LocalResourceOverridePopover.prototype._presentOverTargetElement):

  • UserInterface/Views/URLBreakpointPopover.js:

(WI.URLBreakpointPopover.prototype._presentOverTargetElement):
Add some padding around the popover's anchor so the arrow doesn't overlap it.

  • Localizations/en.lproj/localizedStrings.js:
5:48 PM Changeset in webkit [252516] by mmaxfield@apple.com
  • 12 edits in trunk

[Apple] Enable variation fonts on all Apple platforms
https://bugs.webkit.org/show_bug.cgi?id=198100

Reviewed by Simon Fraser.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
5:42 PM Changeset in webkit [252515] by Chris Fleizach
  • 2 edits in trunk/Source/WebCore

AX: Update style of lambda in isolated tree
https://bugs.webkit.org/show_bug.cgi?id=204233
<rdar://problem/57232085>

Reviewed by Darin Adler.

Remove unnecessary & capture and Optional<AXID>.

  • accessibility/isolatedtree/AXIsolatedTreeNode.cpp:

(WebCore::AXIsolatedObject::initializeAttributeData):
(WebCore::AXIsolatedObject::objectAttributeValue const):
(WebCore::AXIsolatedObject::rectAttributeValue const):
(WebCore::AXIsolatedObject::doubleAttributeValue const):
(WebCore::AXIsolatedObject::unsignedAttributeValue const):
(WebCore::AXIsolatedObject::boolAttributeValue const):
(WebCore::AXIsolatedObject::stringAttributeValue const):
(WebCore::AXIsolatedObject::intAttributeValue const):

5:25 PM Changeset in webkit [252514] by ysuzuki@apple.com
  • 4 edits
    1 add in trunk

[JSC] DFG strength reduction should define "groups" for RegExp constant-folded result
https://bugs.webkit.org/show_bug.cgi?id=204264

Reviewed by Michael Saboff.

JSTests:

  • stress/dfg-strength-reduction-for-regexp-should-include-groups-property.js: Added.

(shouldBe):
(test):

Source/JavaScriptCore:

We always define "groups" property in the result of RegExp matching.
But we do not define it when DFG performs strength-reduction for the RegExp matching node.
This patch adds "groups" field correctly.

  • dfg/DFGStrengthReductionPhase.cpp:

(JSC::DFG::StrengthReductionPhase::handleNode):

  • runtime/RegExpMatchesArray.cpp:

(JSC::createEmptyRegExpMatchesArray):

4:44 PM Changeset in webkit [252513] by ysuzuki@apple.com
  • 6 edits
    1 add in trunk

Wasm error message should be cross-thread-copied
https://bugs.webkit.org/show_bug.cgi?id=204143

Reviewed by Mark Lam.

JSTests:

  • stress/wasm-error-message-cross-threads.js: Added.

(f):

Source/JavaScriptCore:

It is shared by multiple threads, so we should copy it via crossThreadCopy.

  • wasm/WasmCodeBlock.h:

(JSC::Wasm::CodeBlock::errorMessage):

  • wasm/WasmEntryPlan.cpp:

(JSC::Wasm::EntryPlan::parseAndValidateModule):

  • wasm/WasmPlan.h:

(JSC::Wasm::Plan::errorMessage const):
(JSC::Wasm::Plan::failed const):

  • wasm/WasmStreamingParser.h:

(JSC::Wasm::StreamingParser::errorMessage const):

4:42 PM Changeset in webkit [252512] by Alan Coon
  • 7 edits in branches/safari-608-branch/Source

Versioning.

4:05 PM Changeset in webkit [252511] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

CRASH in SourceBuffer::removeCodedFrames()
https://bugs.webkit.org/show_bug.cgi?id=204248

Reviewed by Eric Carlson.

Speculative fix for rare crash. It's possible that the startTime and endTime inputs to
removeCodedFrames() are out-of-order, which could lead to iterating off the end of the
SampleMap. Verify that startTime < endTime and bail out early if not true.

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::removeCodedFrames):

3:54 PM Changeset in webkit [252510] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Add more release logging for network load restarts
https://bugs.webkit.org/show_bug.cgi?id=204234

Reviewed by Youenn Fablet.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::willSendRedirectedRequest):
(WebKit::NetworkResourceLoader::restartNetworkLoad):
(WebKit::NetworkResourceLoader::continueWillSendRequest):
(WebKit::NetworkResourceLoader::serviceWorkerDidNotHandle):

3:43 PM Changeset in webkit [252509] by Alan Coon
  • 1 copy in tags/Safari-608.4.9.0.5

Tag Safari-608.4.9.0.5.

3:38 PM Changeset in webkit [252508] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Fix sysctl-read sandbox violation
https://bugs.webkit.org/show_bug.cgi?id=204238
<rdar://problem/57198954>

Reviewed by Brent Fulgham.

There is missing a rule for reading a specific sysctl property in the WebContent process on iOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
3:22 PM Changeset in webkit [252507] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

Layout test animations/no-style-recalc-during-accelerated-animation.html is failing
https://bugs.webkit.org/show_bug.cgi?id=204253

Unreviewed test gardening.

  • platform/win/TestExpectations:
3:19 PM Changeset in webkit [252506] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[EWS] Update windows bots in config.json
https://bugs.webkit.org/show_bug.cgi?id=204245

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/config.json:
3:15 PM Changeset in webkit [252505] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Windows EWS should not upload archives
https://bugs.webkit.org/show_bug.cgi?id=204229

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/factories.py:
3:05 PM Changeset in webkit [252504] by rniwa@webkit.org
  • 4 edits
    2 adds in trunk

JS wrappers of scroll event targets can get prematurely collected by GC
https://bugs.webkit.org/show_bug.cgi?id=204219

Reviewed by Keith Miller.

Source/WebCore:

This patch addresses the bug that the JS wrappers of the pending scroll event targets can be
collected by GC before scroll events are fired. This bug has always existed but it's worse after
r252205 because there is more of a time delay between an element is scrolled in RenderLayer sense
and when the corresponding scroll event is fired on the element.

Fixed the bug by using GCReachableRef to store the pending scroll event targets introduced in r252205
to keep the JS wrappers of those elements & document alive.

Test: fast/scrolling/scrolling-event-target-gc.html

  • dom/Document.cpp:

(WebCore::Document::PendingScrollEventTargetList): Added. Wraps Vector<GCReachableRef<ContainerNode>>
to avoid including GCReachableRef.h in Document.h.
(WebCore::Document::commonTeardown): Clear m_pendingScrollEventTargetList to avoid document leaks.
(WebCore::Document::addPendingScrollEventTarget):
(WebCore::Document::runScrollSteps):

  • dom/Document.h:

LayoutTests:

Added a regression test for adding elements as pending scroll event targets,
and removing them from the document before scroll events are fired.

  • fast/scrolling/scrolling-event-target-gc-expected.txt: Added.
  • fast/scrolling/scrolling-event-target-gc.html: Added.
3:00 PM Changeset in webkit [252503] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed Mojave build fix after r252501; wrap calls to AVContentKeyRequest.options in
ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN / ALLOW_NEW_API_WITHOUT_GUARDS_END.

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

(WebCore::initTypeForRequest):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didProvideRequests):

2:10 PM Changeset in webkit [252502] by mark.lam@apple.com
  • 9 edits in trunk/Source/JavaScriptCore

Rename InPlaceAbstractState's m_foundConstant to m_shouldTryConstantFolding.
https://bugs.webkit.org/show_bug.cgi?id=204244

Reviewed by Saam Barati.

m_shouldTryConstantFolding is a more accurate description of what this flag really
means i.e. that the AbstractInterpreter thinks that we may benefit from constant
folding, and therefore, should attempt it. It doesn't always mean that it found
constants to be folded. It also doesn't guarantee that the constant folding phase
will succeed in folding any constants.

  • dfg/DFGAbstractInterpreter.h:

(JSC::DFG::AbstractInterpreter::setConstant):

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGAtTailAbstractState.h:

(JSC::DFG::AtTailAbstractState::setShouldTryConstantFolding):
(JSC::DFG::AtTailAbstractState::setFoundConstants): Deleted.

  • dfg/DFGBasicBlock.cpp:

(JSC::DFG::BasicBlock::BasicBlock):

  • dfg/DFGBasicBlock.h:
  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::run):

  • dfg/DFGInPlaceAbstractState.cpp:

(JSC::DFG::InPlaceAbstractState::beginBasicBlock):
(JSC::DFG::InPlaceAbstractState::initialize):
(JSC::DFG::InPlaceAbstractState::endBasicBlock):

  • dfg/DFGInPlaceAbstractState.h:

(JSC::DFG::InPlaceAbstractState::setShouldTryConstantFolding):
(JSC::DFG::InPlaceAbstractState::setFoundConstants): Deleted.

1:57 PM Changeset in webkit [252501] by jer.noble@apple.com
  • 3 edits in trunk/Source/WebCore

REGRESSION(r251895) - 'sinf' init data flow generates 'cenc' style encrypted messages
https://bugs.webkit.org/show_bug.cgi?id=204239
<rdar://problem/57166445>

Reviewed by Eric Carlson.

Track what kind of initialization data was used for a given AVContentKeyRequest, and
generate that initialiazation data type of MediaKeySession message.

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

(WebCore::keyIDsForRequest):
(WebCore::initTypeForRequest):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::requestLicense):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::closeSession):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didProvideRequest):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didProvideRequests):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didProvideRenewingRequest):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didFailToProvideRequest):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::requestDidSucceed):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::nextRequest):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::lastKeyRequest const):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::keyStatuses const):

1:51 PM Changeset in webkit [252500] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

Add SPI to clear web process cache
https://bugs.webkit.org/show_bug.cgi?id=204210

Patch by Benjamin Nham <Ben Nham> on 2019-11-15
Reviewed by Chris Dumez.

This adds an SPI to clear cached web processes. The intended use case is to add a lukewarm mode to
Mac PLT5 in which web pages load in a new WebProcess and load resources from the disk cache.

  • UIProcess/API/Cocoa/WKProcessPool.mm:

(-[WKProcessPool _clearWebProcessCache]):

  • UIProcess/API/Cocoa/WKProcessPoolPrivate.h:

(-[WKProcessPool _clearWebProcessCache]):

1:35 PM Changeset in webkit [252499] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Fix sandbox violation in the WebContent process related to WebRTC audio captures
https://bugs.webkit.org/show_bug.cgi?id=204240
<rdar://problem/57170333>

Reviewed by Brent Fulgham.

The WebContent process needs access to read a new audio related preference domain.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
12:13 PM Changeset in webkit [252498] by Pablo Saavedra
  • 2 edits in trunk/LayoutTests

[WPE][GTK] Gardening after r252487
https://bugs.webkit.org/show_bug.cgi?id=204235

Unreviewed WPE and GTK+ gardening after r252487.

  • platform/gtk/TestExpectations:
12:08 PM Changeset in webkit [252497] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Regression: http/tests/navigation/page-cache-getUserMedia-pending-promise.html is crashing in Debug
https://bugs.webkit.org/show_bug.cgi?id=204232

Reviewed by Eric Carlson.

No new tests, covered by http/tests/navigation/page-cache-getUserMedia-pending-promise.html.

  • Modules/mediastream/MediaStreamTrack.cpp:

(WebCore::MediaStreamTrack::create):
(WebCore::MediaStreamTrack::MediaStreamTrack):
Call suspendIfNeeded() in the factory and not in the constructor. It is never safe to call
suspendIfNeeded() from inside the constructor because it may call the suspend() method, which
may ref |this|.

  • Modules/mediastream/UserMediaRequest.cpp:

(WebCore::UserMediaRequest::allow):
Queue a task on the HTML event loop when the user media request is approved. This way, if the
page is suspended when this happens, we delay constructing the media stream (among other things)
until the page actually resumes.

11:56 AM Changeset in webkit [252496] by Wenson Hsieh
  • 6 edits in trunk/LayoutTests

[iOS] Two layout tests in editing/selection/ios time out when waiting for selection views to appear
https://bugs.webkit.org/show_bug.cgi?id=204231
<rdar://problem/56096961>

Reviewed by Megan Gardner.

Adjust these layout tests to select text by long pressing, instead of selecting text by tapping a button that
programmatically selects a range of text. The latter only results in platform selection views if the user (or,
in this case, a previous test in the same web view) has already manually selected text. This isn't guaranteed,
given that the previous test may have timed out, or may have different test options which require a new
WKWebView to have been created.

  • editing/selection/ios/clear-selection-after-tap-in-large-selected-non-editable-text.html:
  • editing/selection/ios/toggle-callout-bar-after-tap-in-selected-non-editable-text-expected.txt:
  • editing/selection/ios/toggle-callout-bar-after-tap-in-selected-non-editable-text.html:
  • resources/ui-helper.js:

(window.UIHelper.async.longPressElement):
(window.UIHelper.async.longPressAtPoint.return.new.Promise.):
(window.UIHelper.async.longPressAtPoint.return.new.Promise):
(window.UIHelper.async.longPressAtPoint):

Also add helper methods in ui-helper.js to trigger long press gestures, so that we can start moving away from
the helper methods in basic-gestures.js.

(window.UIHelper):

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

Web Inspector: Local Overrides: add context menu item to reveal the local override when a resource is loaded from it
https://bugs.webkit.org/show_bug.cgi?id=204206

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/ContextMenuUtilities.js:

(WI.appendContextMenuItemsForSourceCode):

  • Localizations/en.lproj/localizedStrings.js:
11:39 AM Changeset in webkit [252494] by Alan Coon
  • 7 edits in tags/Safari-609.1.10.2/Source

Versioning.

11:38 AM Changeset in webkit [252493] by Alan Coon
  • 1 copy in tags/Safari-609.1.10.2

New tag.

11:36 AM Changeset in webkit [252492] by commit-queue@webkit.org
  • 28 edits in trunk/Source/WebKit

Reduce structure copies when creating an API::FrameInfo
https://bugs.webkit.org/show_bug.cgi?id=204199

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

Use WTFMove and references where possible. This is cleanup needed for a future patch.

  • Shared/FrameInfoData.cpp:

(WebKit::FrameInfoData::decode):

  • Shared/FrameInfoData.h:
  • UIProcess/API/APIFrameInfo.cpp:

(API::FrameInfo::create):
(API::FrameInfo::FrameInfo):
(API::FrameInfo::~FrameInfo): Deleted.
(API::FrameInfo::clearPage): Deleted.

  • UIProcess/API/APIFrameInfo.h:
  • UIProcess/API/APINavigationClient.h:

(API::NavigationClient::didFailProvisionalLoadInSubframeWithError):

  • UIProcess/API/APIUIClient.h:

(API::UIClient::runJavaScriptAlert):
(API::UIClient::runJavaScriptConfirm):
(API::UIClient::runJavaScriptPrompt):
(API::UIClient::runBeforeUnloadConfirmPanel):
(API::UIClient::runOpenPanel):
(API::UIClient::runWebAuthenticationPanel):

  • UIProcess/API/C/WKFrame.cpp:

(WKFrameCreateFrameInfo):

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageUIClient):
(WKPageSetPageNavigationClient):

  • UIProcess/API/Cocoa/WKFrameInfo.mm:

(-[WKFrameInfo webView]):

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

(WebKit::NavigationState::NavigationClient::didFailProvisionalLoadInSubframeWithError):

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

(WebKit::UIDelegate::UIClient::runJavaScriptAlert):
(WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
(WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
(WebKit::UIDelegate::UIClient::decidePolicyForGeolocationPermissionRequest):
(WebKit::UIDelegate::UIClient::runBeforeUnloadConfirmPanel):
(WebKit::UIDelegate::UIClient::runOpenPanel):
(WebKit::UIDelegate::UIClient::runWebAuthenticationPanel):

  • UIProcess/ProvisionalPageProxy.cpp:

(WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame):
(WebKit::ProvisionalPageProxy::decidePolicyForResponse):

  • UIProcess/ProvisionalPageProxy.h:
  • UIProcess/UserContent/WebScriptMessageHandler.h:
  • UIProcess/UserContent/WebUserContentControllerProxy.cpp:

(WebKit::WebUserContentControllerProxy::didPostMessage):

  • UIProcess/UserContent/WebUserContentControllerProxy.h:
  • UIProcess/WebAuthentication/AuthenticatorManager.cpp:

(WebKit::AuthenticatorManager::runPanel):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::decidePolicyForResponseShared):
(WebKit::WebPageProxy::createNewPage):
(WebKit::WebPageProxy::runJavaScriptAlert):
(WebKit::WebPageProxy::runJavaScriptConfirm):
(WebKit::WebPageProxy::runJavaScriptPrompt):
(WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
(WebKit::WebPageProxy::runOpenPanel):

  • UIProcess/WebPageProxy.h:
11:34 AM Changeset in webkit [252491] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Sources: "Style Sheet" appears twice in the resource type scope bar
https://bugs.webkit.org/show_bug.cgi?id=204172

Reviewed by Joseph Pecoraro.

  • UserInterface/Models/Resource.js:

(WI.Resource):
(WI.Resource.prototype.updateForResponse):
Remove compatibility WI.Resource.Type.Stylesheet (which previously existed since the
protocol values for Page.ResourceType match the keys) and instead add compatibility cases
at the necessary callsites.

11:18 AM Changeset in webkit [252490] by Jonathan Bedard
  • 3 edits in trunk/Tools

results.webkit.org: Report JSC tests to the results database
https://bugs.webkit.org/show_bug.cgi?id=204091
<rdar://problem/49778900>

Reviewed by Aakash Jain.

Upload results to the specified results database.

DEMONSTRATION OF FAILURE IN EWS BEHAVIOR, DO NOT LAND!

  • Scripts/run-javascriptcore-tests:

(runTest): Parse binary output to mark individual tests as passing
or failing.
(uploadConfiguration): Return a hash map representing the configuration
For this specific test run.
(uploadResults): If a report URL is defined, upload test results to that URL.

  • Scripts/webkitdirs.pm:

(splitVersionString): splitVersionString is supposed to be a generally used
function, so should not set a global variable.
(determineOSXVersion): Remove newline from version number.

10:00 AM Changeset in webkit [252489] by Jonathan Bedard
  • 3 edits in trunk/Tools

run-webkit-tests loads committers.py 4 times, taking about 40ms
https://bugs.webkit.org/show_bug.cgi?id=204211

Reviewed by Aakash Jain.

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

(ChangeLogEntry): Don't create CommitterList on import.

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

(CommitInfo.init): Ditto.

9:14 AM Changeset in webkit [252488] by Alan Coon
  • 7 edits in branches/safari-608.4.9.0-branch/Source

Versioning.

9:00 AM Changeset in webkit [252487] by Alan Bujtas
  • 10 edits in trunk/Source/WebCore

[LFC][Invalidation] Reuse FrameViewLayoutContext::m_layoutState for incremental layout
https://bugs.webkit.org/show_bug.cgi?id=204225
<rdar://problem/57227259>

Reviewed by Antti Koivisto.

Let's rely on the invalidation logic instead of reconstructing the layout state on each layout frame.

  • layout/LayoutContext.cpp:

(WebCore::Layout::initializeLayoutState):
(WebCore::Layout::LayoutContext::runLayoutAndVerify):
(WebCore::Layout::LayoutContext::createLayoutState):

  • layout/LayoutContext.h:
  • layout/LayoutState.h:

(WebCore::Layout::LayoutState::rootRenderer const):

  • layout/Verification.cpp:

(WebCore::Layout::LayoutContext::verifyAndOutputMismatchingLayoutTree):

  • page/FrameView.cpp:

(WebCore::FrameView::paintContents):

  • page/FrameViewLayoutContext.cpp:

(WebCore::FrameViewLayoutContext::layoutUsingFormattingContext):

  • page/FrameViewLayoutContext.h:

(WebCore::FrameViewLayoutContext::layoutFormattingState const):
(WebCore::FrameViewLayoutContext::initialLayoutState const): Deleted.

  • rendering/updating/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::updateRendererStyle):

8:58 AM Changeset in webkit [252486] by Simon Fraser
  • 4 edits
    2 adds in trunk

The image is flashing if falls out and has an animation transform: rotate
https://bugs.webkit.org/show_bug.cgi?id=203613

Reviewed by Antti Koivisto.
Source/WebCore:

Code added in r218735 that maps the animation extent through the current animating transform
worked for translations, but not rotation where anchor point matters. This matrix
needs to take anchor point into account.

Shared some code that applies anchor point to a matrix.

Test: compositing/backing/backing-store-attachment-with-rotation.html

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::layerTransform const):
(WebCore::GraphicsLayerCA::transformByApplyingAnchorPoint const):
(WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):

  • platform/graphics/ca/GraphicsLayerCA.h:

LayoutTests:

  • compositing/backing/backing-store-attachment-with-rotation-expected.txt: Added.
  • compositing/backing/backing-store-attachment-with-rotation.html: Added.
8:39 AM Changeset in webkit [252485] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews] Perform validation of patch before retrying JSC tests
https://bugs.webkit.org/show_bug.cgi?id=204222

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps.py:

(RunJavaScriptCoreTests.evaluateCommand): Add a ValidatePatch step before retrying.
(ReRunJavaScriptCoreTests.evaluateCommand): Ditto.

8:36 AM Changeset in webkit [252484] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Regression(r244361) iOS: Layout test http/tests/quicklook/rtf-document-domain-is-empty-string.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=204205
<rdar://problem/51864314>

Reviewed by Alex Christensen.

In this test, NSHTMLWriter ends up creating a WebArchive providing file:///index.html as URL. The page's script
then calls document.open(), which triggers a DidExplicitOpenForFrame() IPC to the UIProcess with this URL.
This trips our MESSAGE_CHECK_URL() check in the UIProcess when this path is not within the WebContent process'
sandbox, and we kill the WebContent process. To address the issue, this patch replaces the MESSAGE_CHECK_URL()
with an if check and an early return so that we ignore the IPC if the URL does not make sense, without actually
terminating the WebContent process.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didExplicitOpenForFrame):

7:41 AM Changeset in webkit [252483] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][Invalidation] Introduce LayoutBox::updateStyle
https://bugs.webkit.org/show_bug.cgi?id=204224
<rdar://problem/57226354>

Reviewed by Antti Koivisto.

This is in preparation for being able to do incremental layouts on partial style change (currently we re-build the tree on each layout frame).

  • layout/LayoutState.h:

(WebCore::Layout::LayoutState::layoutBoxForRenderer const):

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::updateStyle):

  • layout/layouttree/LayoutBox.h:
  • rendering/updating/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::updateRendererStyle):

6:26 AM Changeset in webkit [252482] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[LFC][Invalidation] Add a temporary RenderObject to Layout::Box map
https://bugs.webkit.org/show_bug.cgi?id=204218
<rdar://problem/57215201>

Reviewed by Antti Koivisto.

LayoutTreeContent::renderObjectToLayoutBox map enables us to find the associated Layout::Box when style changes on a renderer.
This is temporary until after we implement fully integrate LFC with the style system.

  • layout/LayoutContext.cpp:

(WebCore::Layout::LayoutContext::runLayoutAndVerify):

  • layout/LayoutState.cpp:

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

  • layout/LayoutState.h:

(WebCore::Layout::LayoutState::root const):

  • layout/blockformatting/BlockFormattingContext.cpp:

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

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::TreeBuilder::buildLayoutTree):
(WebCore::Layout::LayoutTreeContent::LayoutTreeContent):
(WebCore::Layout::TreeBuilder::TreeBuilder):
(WebCore::Layout::TreeBuilder::buildTree):
(WebCore::Layout::TreeBuilder::createLayoutBox):
(WebCore::Layout::TreeBuilder::buildTableStructure):
(WebCore::Layout::TreeBuilder::buildSubTree):
(WebCore::Layout::printLayoutTreeForLiveDocuments):
(WebCore::Layout::TreeBuilder::createLayoutTree): Deleted.
(WebCore::Layout::TreeBuilder::createTableStructure): Deleted.
(WebCore::Layout::TreeBuilder::createSubTree): Deleted.

  • layout/layouttree/LayoutTreeBuilder.h:
1:28 AM Changeset in webkit [252481] by Philippe Normand
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

Unreviewed, GTK/WPE Debug build fix after r252472.

  • CMakeLists.txt:
12:29 AM Changeset in webkit [252480] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

IDL: remove [PrimaryGlobal]
https://bugs.webkit.org/show_bug.cgi?id=180469

Patch by Rob Buis <rbuis@igalia.com> on 2019-11-15
Reviewed by Sam Weinig.

Remove support for [PrimaryGlobal] from the code
generator and the existing IDL.

  • bindings/scripts/CodeGeneratorJS.pm:

(IsGlobalOrPrimaryGlobalInterface):

  • page/DOMWindow.idl:
  • page/RemoteDOMWindow.idl:

Nov 14, 2019:

10:50 PM Changeset in webkit [252479] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Make gcSafeMemcpy/gcSafeMemmove/gcSafeZeroMemory work properly on arm64_32
https://bugs.webkit.org/show_bug.cgi?id=204217

Reviewed by Mark Lam.

We need to be explicit in the code about using 64-bit types and pointer types.

  • heap/GCMemoryOperations.h:

(JSC::gcSafeMemcpy):
(JSC::gcSafeMemmove):
(JSC::gcSafeZeroMemory):

7:26 PM Changeset in webkit [252478] by Wenson Hsieh
  • 3 edits
    2 adds in trunk

Crash when setting HTMLInputElement.checked for a disconnected radio button in a shadow root
https://bugs.webkit.org/show_bug.cgi?id=204208
<rdar://problem/57045830>

Reviewed by Tim Horton.

Source/WebCore:

r251110 refactored logic in RadioButtonGroup::updateCheckedState, such that it assumes that m_nameToGroupMap
always contains an entry for the given input element's name. Prior to r251110, it would bail if m_nameToGroupMap
didn't exist. In this particular case, a named input element is added to a shadow root that is disconnected from
the document. This means that in HTMLInputElement::didFinishInsertingNode(), we will avoid adding the element to
the radio button group, even though it has a tree scope due to the isConnected() check.

Later, when we try to set the checked attribute, we invoke updateCheckedState which sees that we have a tree
scope and assumes that we must have previously added the input element to the radio button map; this leads to a
nullptr deref, as the map is empty. Thus, to fix this, we change the isConnected() check to isInTreeScope().

Test: fast/forms/radio-input-in-shadow-root-crash.html

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::didFinishInsertingNode):

LayoutTests:

Adds a new layout test to verify that we don't crash in this scenario.

  • fast/forms/radio-input-in-shadow-root-crash-expected.txt: Added.
  • fast/forms/radio-input-in-shadow-root-crash.html: Added.

2019-11-07 Youenn Fablet <youenn@apple.com>

Update libwebrtc to M78
https://bugs.webkit.org/show_bug.cgi?id=203897

Reviewed by Eric Carlson.

  • webrtc/simulcast-h264.html:

Update test to remove rid information from answer.

7:14 PM Changeset in webkit [252477] by Jonathan Bedard
  • 4 edits in trunk/Tools

Python 3: Add support in webkitpy.layout_tests.layout_package
https://bugs.webkit.org/show_bug.cgi?id=204212

Reviewed by Stephanie Lewis.

  • Scripts/test-webkitpy-python3: Add webkitpy.layout_tests.layout_package.
  • Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:

(convert_trie_to_flat_paths): Use compatible iteritems.
(JSONResultsGenerator._insert_failure_summaries): Use compatible iterkeys.
(JSONResultsGenerator._convert_json_to_current_version): Use compatible iteritems.
(JSONResultsGenerator._convert_tests_to_trie): Use compatible iterkeys.

  • Scripts/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py:

(JSONGeneratorTest._verify_json_results): Use items instead of iteritems.
(JSONGeneratorTest.test_test_timings_trie): Python 3's json decoder is sensitive to ordering.

6:57 PM Changeset in webkit [252476] by commit-queue@webkit.org
  • 6 edits
    2 adds in trunk/Tools

Flaky API Test TestWebKitAPI.ServiceWorkers.ThrottleCrash
https://bugs.webkit.org/show_bug.cgi?id=203734

Patch by Alex Christensen <achristensen@webkit.org> on 2019-11-14
Reviewed by Youenn Fablet.

Some API tests using TCPServer have multiple concurrent HTTP requests in flight at the same time.
When this happens, sometimes NSURLSession will make multiple TCP connections to the same server.
TCPServer is not the right tool for this because it handles all its connections manually.
To make the test server agnostic to how many connections are initiated, I introduce HTTPServer,
which uses the Network framework to handle as many responses and as many connections as happen.

  • TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:

(TEST):

  • TestWebKitAPI/cocoa/HTTPServer.h: Added.

(TestWebKitAPI::HTTPServer::HTTPResponse::HTTPResponse):

  • TestWebKitAPI/cocoa/HTTPServer.mm: Added.

(TestWebKitAPI::HTTPServer::HTTPServer):
(TestWebKitAPI::HTTPServer::respondToRequests):
(TestWebKitAPI::HTTPServer::port const):
(TestWebKitAPI::HTTPServer::request const):

  • TestWebKitAPI/config.h:
6:56 PM Changeset in webkit [252475] by Jonathan Bedard
  • 4 edits in trunk/Tools

Python 3: Add support in webkitpy.layout_tests.servers
https://bugs.webkit.org/show_bug.cgi?id=204209

Reviewed by Stephanie Lewis.

  • Scripts/test-webkitpy-python3: Add webkitpy.layout_tests.servers.
  • Scripts/webkitpy/layout_tests/servers/apache_http_server.py:

(LayoutTestApacheHttpd.init): Use compatible iteritems.

  • Scripts/webkitpy/layout_tests/servers/http_server.py:

(Lighttpd._prepare_config): Ditto.

6:55 PM Changeset in webkit [252474] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, update the feature status of WebAuthn

  • features.json:
6:12 PM Changeset in webkit [252473] by youenn@apple.com
  • 1248 adds in trunk/Source/ThirdParty/libwebrtc

Add missing file from https://trac.webkit.org/changeset/252472
https://bugs.webkit.org/show_bug.cgi?id=203897

Unreviewed, fixing the build

5:03 PM Changeset in webkit [252472] by youenn@apple.com
  • 2540 edits in trunk

Update libwebrtc to M78
https://bugs.webkit.org/show_bug.cgi?id=203897

Patch by Youenn Fablet <youenn@apple.com> on 2019-11-07

LayoutTest/ChangeLog

  • webrtc/simulcast-h264.html: Update test to remove rid information from answer.

LayoutTests/imported/w3c/ChangeLog

  • web-platform-tests/webrtc/RTCPeerConnection-createDataChannel-expected.txt:
  • web-platform-tests/webrtc/RTCRtpSender-getStats.https-expected.txt:

Source/ThirdParty/libwebrtc/ChangeLog

  • webrtc: Updated

Source/WebCore/ChangeLog

Update include paths and binding code.
Covered by existing tests.

  • Modules/mediastream/RTCStatsReport.idl: Removed no longer standard codec stat.
  • Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp:
  • Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:
  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: (WebCore::LibWebRTCMediaEndpoint::setConfiguration):
  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
  • Modules/mediastream/libwebrtc/LibWebRTCObservers.h:
  • Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.h:
  • Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h:
  • Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.h:
  • Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp: (WebCore::fillInboundRTPStreamStats): (WebCore::fillOutboundRTPStreamStats): (WebCore::fillRTCCodecStats):
  • Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.h:
  • Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
  • platform/mediastream/RealtimeIncomingAudioSource.h:
  • platform/mediastream/RealtimeIncomingVideoSource.h:
  • platform/mediastream/RealtimeOutgoingAudioSource.h:
  • platform/mediastream/RealtimeOutgoingVideoSource.h:
  • platform/mediastream/gstreamer/GStreamerCapturer.cpp:
  • platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
  • platform/mediastream/gstreamer/GStreamerVideoFrameLibWebRTC.h:
  • platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp:
  • platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:
  • platform/mediastream/libwebrtc/LibWebRTCAudioModule.h:
  • platform/mediastream/libwebrtc/LibWebRTCDTMFSenderBackend.h:
  • platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::BasicPacketSocketFactory::CreateClientTcpSocket):
  • platform/mediastream/libwebrtc/LibWebRTCProvider.h:
  • platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
  • testing/MockLibWebRTCPeerConnection.cpp:
  • testing/MockLibWebRTCPeerConnection.h:

Source/WebKit/ChangeLog

  • NetworkProcess/webrtc/LibWebRTCSocketClient.h:
  • NetworkProcess/webrtc/NetworkRTCProvider.cpp: (WebKit::NetworkRTCProvider::createClientTCPSocket):
  • NetworkProcess/webrtc/NetworkRTCProvider.h:
  • NetworkProcess/webrtc/NetworkRTCProvider.mm:
  • NetworkProcess/webrtc/NetworkRTCSocket.h:
  • Shared/RTCPacketOptions.h:
  • WebProcess/Network/webrtc/LibWebRTCProvider.cpp: (WebKit::RTCSocketFactory::CreateClientTcpSocket):
  • WebProcess/Network/webrtc/LibWebRTCResolver.h:
  • WebProcess/Network/webrtc/LibWebRTCSocket.h:
  • WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp: (WebKit::LibWebRTCSocketFactory::createClientTcpSocket):
  • WebProcess/Network/webrtc/LibWebRTCSocketFactory.h:
  • WebProcess/Network/webrtc/WebRTCMonitor.cpp:
  • WebProcess/Network/webrtc/WebRTCMonitor.h:
5:02 PM Changeset in webkit [252471] by Megan Gardner
  • 2 edits in trunk/Tools

Fix another build error from r252449
https://bugs.webkit.org/show_bug.cgi?id=204173

Unreviewed Build Fix for r252449

  • TestWebKitAPI/ios/UIKitSPI.h:
4:34 PM Changeset in webkit [252470] by eric.carlson@apple.com
  • 9 edits in trunk/Source/WebCore

[iOS] Audio capture fails when a track is unmuted
https://bugs.webkit.org/show_bug.cgi?id=204202
<rdar://problem/57005820>

Reviewed by Youenn Fablet.

Tested manually.

  • platform/audio/PlatformMediaSession.cpp:

(WebCore::PlatformMediaSession::canProduceAudioChanged): Remove unused "client" parameter.

  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::sessionCanProduceAudioChanged): Ditto.

  • platform/audio/PlatformMediaSessionManager.h:
  • platform/audio/cocoa/MediaSessionManagerCocoa.h:
  • platform/audio/cocoa/MediaSessionManagerCocoa.mm:

(MediaSessionManagerCocoa::sessionCanProduceAudioChanged): Ditto.

  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::setMuted): Change m_muted before calling start/stop so the
muted method will return the correct value.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioSharedUnit::startInternal): Call sessionCanProduceAudioChanged before
starting the audio unit so the audio session category is set correctly. ASSERT if the
audio session category is incorrect.

  • platform/mock/MockRealtimeAudioSource.cpp:

(WebCore::MockRealtimeAudioSource::startProducingData): Ditto.

4:31 PM Changeset in webkit [252469] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Make NetworkResourceLoader::didReceiveResponse more straightforward after r244700
https://bugs.webkit.org/show_bug.cgi?id=204134

Patch by Alex Christensen <achristensen@webkit.org> on 2019-11-14
Reviewed by Youenn Fablet.

If m_isKeptAlive is true, we do not want to receive any HTTP body.
Rather than storing the CompletionHandler and relying on the destructor to call it, just call it.

No change in behavior.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::didReceiveResponse):

4:16 PM Changeset in webkit [252468] by Jonathan Bedard
  • 13 edits in trunk/Tools

Python 3: Add support in webkitpy.style
https://bugs.webkit.org/show_bug.cgi?id=203762

Reviewed by Stephanie Lewis.

  • Scripts/check-webkit-style: Remove Python 2 version check.
  • Scripts/test-webkitpy-python3: Add webkitpy.style.
  • Scripts/webkitpy/style/checker.py: Use explicit imports.
  • Scripts/webkitpy/style/checker_unittest.py:

(GlobalVariablesTest.test_max_reports_per_category): Use keys() over iterkeys.

  • Scripts/webkitpy/style/checkers/contributors.py: Use explicit imports.
  • Scripts/webkitpy/style/checkers/test_expectations.py:

(TestExpectationsChecker._should_log_linter_warning): Use compatible iteritems.

  • Scripts/webkitpy/style/error_handlers_unittest.py: Use explicit imports.
  • Scripts/webkitpy/style/filter.py:

(FilterConfiguration._get_path_specific_lower): Return list instead of iterator.
(FilterConfiguration._filter_from_path): Avoid confusion with filter builtin.

  • Scripts/webkitpy/style/filter_unittest.py: Use explicit imports.
  • Scripts/webkitpy/style/main.py:

(CheckWebKitStyle._engage_awesome_stderr_hacks): No reason to apply encoding to stderr
in Python 3.

  • Scripts/webkitpy/style/main_unittest.py: Use explicit imports.
  • Scripts/webkitpy/style/patchreader.py:

(PatchReader.check): Ensure that the provided patch is a string, use items over iteritems.

2:45 PM Changeset in webkit [252467] by commit-queue@webkit.org
  • 13 edits in trunk

The CSSParser should not consume negative or unit-less lengths for the SVG properties 'r', 'rx' and 'ry'
https://bugs.webkit.org/show_bug.cgi?id=204200

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-11-14
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/svg/geometry/parsing/r-computed-expected.txt:
  • web-platform-tests/svg/geometry/parsing/r-invalid-expected.txt:
  • web-platform-tests/svg/geometry/parsing/rx-computed-expected.txt:
  • web-platform-tests/svg/geometry/parsing/rx-invalid-expected.txt:
  • web-platform-tests/svg/geometry/parsing/ry-computed-expected.txt:
  • web-platform-tests/svg/geometry/parsing/ry-invalid-expected.txt:

Source/WebCore:

Both the CSSParser and SVGElement::parseAttribute() should be consistent
when parsing these properties.

The type of these properties is <length-percentage>, which requires specifying
the unit for the length: https://www.w3.org/TR/css-values/#length-value.

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::isSimpleLengthPropertyID):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeRxOrRy):
(WebCore::CSSPropertyParser::parseSingleValue):

LayoutTests:

  • svg/css/parse-length-expected.txt:
  • svg/css/parse-length.html:
2:18 PM Changeset in webkit [252466] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

[iOS] Crash under WebProcess::processTaskStateDidChange(WebKit::ProcessTaskStateObserver::TaskState)
https://bugs.webkit.org/show_bug.cgi?id=204177

Reviewed by Jer Noble.

Delay creating the ProcessTaskStateObserver until the WebProcess's connection to its parent had been
initialized. This is necessary because ProcessTaskStateObserver may call WebProcess::processTaskStateDidChange()
on a background thread, which will deference the IPC connection.

  • WebProcess/WebProcess.cpp:

(WebKit::m_webSQLiteDatabaseTracker):
(WebKit::WebProcess::~WebProcess):
(WebKit::WebProcess::initializeConnection):
(WebKit::m_taskStateObserver): Deleted.

  • WebProcess/WebProcess.h:
2:01 PM Changeset in webkit [252465] by Megan Gardner
  • 2 edits in trunk/Tools

Fix build error from r252449
https://bugs.webkit.org/show_bug.cgi?id=204173

Reviewed by Wenson Hsieh.

Include needed header for all platforms, not just iPhone.

  • TestWebKitAPI/ios/UIKitSPI.h:
1:59 PM Changeset in webkit [252464] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Use toLength() and getIndexQuickly() in JSON.stringify
https://bugs.webkit.org/show_bug.cgi?id=204122

Patch by Alexey Shvayka <Alexey Shvayka> on 2019-11-14
Reviewed by Yusuke Suzuki.

JSTests:

  • microbenchmarks/json-stringify-array-replacer.js: Added.
  • microbenchmarks/json-stringify-empty-array.js: Added.

Source/JavaScriptCore:

Using toLength() is semantically equivalent and performance-neutral, while adding
JSObject::getIndexQuickly() advances microbenchmarks/json-stringify-array-replacer.js
by 34%.

  • runtime/JSONObject.cpp:

(JSC::Stringifier::Stringifier):
(JSC::Stringifier::Holder::appendNextProperty):

12:51 PM Changeset in webkit [252463] by Caio Lima
  • 5 edits in trunk

Support or16(TrustedImm32, AbsoluteAddress) in the MIPS MacroAssembler
https://bugs.webkit.org/show_bug.cgi?id=204126

Reviewed by Mark Lam.

JSTests:

Decreasing the number of iterations of test to avoid timeout into slow
ports.

  • stress/regress-57020338.js:

Source/JavaScriptCore:

This is adjusting the implementation of or16 for MIPS. This required
the addition of load16 and store16 for this macro assembler as
well. This is also fixing build issue on ARMv7 or16 implementation.

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::or16):

  • assembler/MacroAssemblerMIPS.h:

(JSC::MacroAssemblerMIPS::or16):
(JSC::MacroAssemblerMIPS::load16):
(JSC::MacroAssemblerMIPS::store16):

12:32 PM Changeset in webkit [252462] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][Invalidation] Skip non-dirty out-of-flow boxes.
https://bugs.webkit.org/show_bug.cgi?id=204196

Reviewed by Antti Koivisto.

Use the InvalidationState to decide whether the current out-of-flow box needs layout.

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::layoutOutOfFlowContent):

12:16 PM Changeset in webkit [252461] by graouts@webkit.org
  • 6 edits
    2 adds in trunk

[Web Animations] Accelerated transitions do not always remove their backing accelerated animation
https://bugs.webkit.org/show_bug.cgi?id=204198
<rdar://problem/45847205>

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark some WPT progressions.

  • web-platform-tests/dom/events/Event-dispatch-on-disabled-elements-expected.txt:

Source/WebCore:

Test: webanimations/accelerated-animation-removal-upon-transition-completion.html

There could be several calls to KeyframeEffect::updateAcceleratedAnimationState() made after an animation had completed but
before any pending accelerated actions would be processed during the next animation frame. In the first call, we would correctly
set add Accelerated::Stop to the list of pending accelerated actions, but on a further call, wrongly assuming that the fact that
we'd already recorded an Accelerated::Stop action meant that it had been committed, we would clear that action and the animation
would never be explicitly removed.

Additionally, we would schedule animation resolution on the DocumentTimeline in the wrong function, we now do that in the function
where animations with an effect pending accelerated actions is added rather than in the function where we track which elements have
accelerated animations.

  • animation/DocumentTimeline.cpp:

(WebCore::DocumentTimeline::animationAcceleratedRunningStateDidChange):
(WebCore::DocumentTimeline::updateListOfElementsWithRunningAcceleratedAnimationsForElement):

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::updateAcceleratedAnimationState):

LayoutTests:

Add a new test that checks that a CSS Transition targeting the transform property which requires a layer correctly clears the
accelerated animation upon completion.

  • webanimations/accelerated-animation-removal-upon-transition-completion-expected.txt: Added.
  • webanimations/accelerated-animation-removal-upon-transition-completion.html: Added.
11:42 AM Changeset in webkit [252460] by Alan Bujtas
  • 13 edits in trunk/Source/WebCore

[LFC][Invalidation] Use InvalidationState to populate LayoutQueue
https://bugs.webkit.org/show_bug.cgi?id=204191
<rdar://problem/57179614>

Reviewed by Antti Koivisto.

Start using the InvalidationState in BlockFormattingContext::layoutInFlowContent() to filter out
non-dirty boxes (currently InvalidationState returns true for every box).

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::layoutOutOfFlowContent):

  • layout/FormattingContext.h: InvalidationState should not be const as we keep adding additional dirty boxes during layout.
  • layout/LayoutContext.cpp:

(WebCore::Layout::LayoutContext::layout):
(WebCore::Layout::LayoutContext::layoutFormattingContextSubtree):

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

(WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
(WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):

  • layout/blockformatting/BlockFormattingContext.h:
  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
(WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):

  • layout/inlineformatting/InlineFormattingContext.h:
  • layout/invalidation/InvalidationState.cpp:

(WebCore::Layout::InvalidationState::needsLayout const):

  • layout/invalidation/InvalidationState.h:
  • layout/tableformatting/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::layoutInFlowContent):
(WebCore::Layout::TableFormattingContext::layoutTableCellBox):

  • layout/tableformatting/TableFormattingContext.h:
10:09 AM Changeset in webkit [252459] by beidson@apple.com
  • 14 edits
    1 add in trunk

Summary: WKWebView is missing an equivalent to WebKit 1's API to set the media style.
<rdar://problem/49862107> and https://bugs.webkit.org/show_bug.cgi?id=203974

Reviewed by Alex Christensen.

Source/WebKit:

Covered by new API test.

This is basically:

  • Expose a read/write property on WKWebView.
  • Pipe the new media type to the WebProcess.
  • Force a style recalc.
  • UIProcess/API/Cocoa/WKWebView.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView setMediaType:]):
(-[WKWebView mediaType]):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setOverriddenMediaType):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::overriddenMediaType const):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::overrideMediaType const):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::setOverriddenMediaType):

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::overriddenMediaType const):

  • WebProcess/WebPage/WebPage.messages.in:

Tools:

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

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
10:07 AM Changeset in webkit [252458] by beidson@apple.com
  • 6 edits
    1 add in trunk

pageZoom/setPageZoom: should not be in a Mac-only part of WKWebView.mm
https://bugs.webkit.org/show_bug.cgi?id=204128

Reviewed by Alex Christensen.

Source/WebKit:

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView setPageZoom:]):
(-[WKWebView pageZoom]):

Tools:

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

(TestWebKitAPI::getClientWidth):

  • TestWebKitAPI/cocoa/TestWKWebView.h:
  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(-[WKWebView waitUntilClientWidthIs:]):

7:28 AM Changeset in webkit [252457] by Chris Fleizach
  • 3 edits in trunk/Source/WebCore

AX: Implement isolated tree support for math objects
https://bugs.webkit.org/show_bug.cgi?id=204056
<rdar://problem/57054644>

Reviewed by Zalan Bujtas.

Implement isolated tree support for math objects.
Add a method for setting and getting objects.

  • accessibility/isolatedtree/AXIsolatedTreeNode.cpp:

(WebCore::AXIsolatedObject::AXIsolatedObject):
(WebCore::AXIsolatedObject::create):
(WebCore::AXIsolatedObject::initializeAttributeData):
(WebCore::AXIsolatedObject::setObjectProperty):
(WebCore::AXIsolatedObject::objectAttributeValue const):

  • accessibility/isolatedtree/AXIsolatedTreeNode.h:
6:58 AM Changeset in webkit [252456] by Jonathan Bedard
  • 2 edits in trunk/Tools

webkitpy: Clarify webkitpy/style/optparser_unittest.py by removing parse variables
https://bugs.webkit.org/show_bug.cgi?id=204183

Reviewed by Stephanie Lewis.

  • Scripts/webkitpy/style/optparser_unittest.py:

(ArgumentParserTest.test_parse_documentation): Remove parse variable.
(ArgumentParserTest.test_parse_bad_values): Ditto.
(ArgumentParserTest.test_parse_default_arguments): Ditto.
(ArgumentParserTest.test_parse_explicit_arguments): Ditto.
(ArgumentParserTest.test_parse_files): Ditto.

6:25 AM Changeset in webkit [252455] by graouts@webkit.org
  • 9 edits
    5 adds in trunk

[Web Animations] Retargeted transitions targeting accelerated properties do not stop the original transition
https://bugs.webkit.org/show_bug.cgi?id=204116
<rdar://problem/57116961>

Reviewed by Dean Jackson.

Source/WebCore:

Test: webanimations/css-transition-in-flight-reversal-accelerated.html

There were two problems with the reversal of in-flight transitions targeting accelerated properties. The first issue
was that the animated value for the accelerated property would be missing from the before-change style since animating
acceelerated properties do not update RenderStyle while running. As such, we would not detect the need to reverse a
transition, but rather simply cancel the initial transition with no new transition to reverse its effect, since the
value in the before-change and after-change styles were the same. We now fix this by figuring out whether the running
transition for that property is accelerated in AnimationTimeline::updateCSSTransitionsForElementAndProperty() and
applying the animated value to the before-change style.

The second issue was that canceling an accelerated transition had no visible effect since the accelerated animation
was not stopped. We now have a new AnimationEffect::animationWasCanceled() virtual method which KeyframeEffect overrides
to add AcceleratedAction::Stop to the list of pending acceleration actions for this effect. We also ensure that the document
timeline knows to run DocumentTimeline::updateAnimationsAndSendEvents() if there are pending accelerated actions, even if
there aren't any animations waiting to be resolved, since a single canceled transition would prevent this method from
completing.

  • animation/AnimationEffect.h:
  • animation/AnimationTimeline.cpp:

(WebCore::AnimationTimeline::updateCSSTransitionsForElementAndProperty):

  • animation/DocumentTimeline.cpp:

(WebCore::DocumentTimeline::removeAnimation):
(WebCore::DocumentTimeline::scheduleAnimationResolution):
(WebCore::DocumentTimeline::shouldRunUpdateAnimationsAndSendEventsIgnoringSuspensionState const):
(WebCore::DocumentTimeline::updateAnimationsAndSendEvents):
(WebCore::DocumentTimeline::updateListOfElementsWithRunningAcceleratedAnimationsForElement):

  • animation/DocumentTimeline.h:
  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::animationWasCanceled):

  • animation/KeyframeEffect.h:
  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::cancel):

LayoutTests:

Add a new test that checks that reversing an in-flight transition for "opacity" and "transform" correctly reverses the transition.

  • platform/mac-wk1/imported/w3c/web-platform-tests/dom/events/Event-dispatch-on-disabled-elements-expected.txt: Added.
  • webanimations/css-transition-in-flight-reversal-accelerated-expected.txt: Added.
  • webanimations/css-transition-in-flight-reversal-accelerated.html: Added.
3:44 AM Changeset in webkit [252454] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

Add support for remotes file for EWS builders (follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=203899

Unreviewed follow-up fix.

  • BuildSlaveSupport/ews-build/factories.py:

(JSCTestsFactory.init): Passed remotes parameter to JSCTestsFactory as well.

  • BuildSlaveSupport/ews-build/loadConfig_unittest.py: Updated unit-test.
3:29 AM Changeset in webkit [252453] by aakash_jain@apple.com
  • 5 edits in trunk/Tools

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

Reviewed by Jonathan Bedard.

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

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

1:37 AM Changeset in webkit [252452] by ysuzuki@apple.com
  • 29 edits
    1 add in trunk/Source

[JSC] BlockDirectory's bits should be compact
https://bugs.webkit.org/show_bug.cgi?id=204149

Reviewed by Robin Morisset.

Source/JavaScriptCore:

We start applying IsoSubspace to all JSCells. This means that IsoSubspace should be small enough,
so that we can hold many IsoSubspaces without considering about memory regression.

In this patch, we introduce several things to shrink sizeof(IsoSubspace) from 528 to 384.

  1. Adjusting members to remove some paddings.
  2. Remove m_heap field since this can be got from the caller easily.
  3. Make MarkedSpace::heap() efficient: just doing pointer arithmetic.
  4. Remove m_size field from IsoSubspace since BlockDirectory knows cellSize.
  5. Introduce BlockDirectoryBits, which repalces 9 FastBitVector in BlockDirectory to this one class. Since all FastBitVector has the same size, we should not have a size field for each FastBitVector. We reuse FastBitVector's View mechanism to keep the same ergonomics while making BlockDirectoryBits much smaller. We put 9 uint32_t as Segment, and manage Vector<Segment> in this data structure. Since we touch several bits at the same time for the same block-index, this data structure is compact and efficient.
  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • heap/AlignedMemoryAllocator.cpp:

(JSC::AlignedMemoryAllocator::registerDirectory):

  • heap/AlignedMemoryAllocator.h:
  • heap/Allocator.h:
  • heap/AllocatorInlines.h:

(JSC::Allocator::allocate const):

  • heap/BlockDirectory.cpp:

(JSC::BlockDirectory::BlockDirectory):
(JSC::BlockDirectory::findEmptyBlockToSteal):
(JSC::BlockDirectory::findBlockForAllocation):
(JSC::BlockDirectory::tryAllocateBlock):
(JSC::BlockDirectory::addBlock):
(JSC::BlockDirectory::removeBlock):
(JSC::BlockDirectory::prepareForAllocation):
(JSC::BlockDirectory::beginMarkingForFullCollection):
(JSC::BlockDirectory::endMarking):
(JSC::BlockDirectory::snapshotUnsweptForEdenCollection):
(JSC::BlockDirectory::snapshotUnsweptForFullCollection):
(JSC::BlockDirectory::findBlockToSweep):
(JSC::BlockDirectory::sweep):
(JSC::BlockDirectory::shrink):
(JSC::BlockDirectory::assertNoUnswept):
(JSC::BlockDirectory::parallelNotEmptyBlockSource):
(JSC::BlockDirectory::dumpBits):

  • heap/BlockDirectory.h:

(JSC::BlockDirectory::cellKind const):
(JSC::BlockDirectory::forEachBitVector):
(JSC::BlockDirectory::forEachBitVectorWithName):
(JSC::BlockDirectory::heap): Deleted.

  • heap/BlockDirectoryBits.h: Added.

(JSC::BlockDirectoryBits::BlockDirectoryBitVectorWordView::BlockDirectoryBitVectorWordView):
(JSC::BlockDirectoryBits::BlockDirectoryBitVectorWordView::numBits const):
(JSC::BlockDirectoryBits::BlockDirectoryBitVectorWordView::word const):
(JSC::BlockDirectoryBits::BlockDirectoryBitVectorWordView::word):
(JSC::BlockDirectoryBits::BlockDirectoryBitVectorWordView::clearAll):
(JSC::BlockDirectoryBits::BlockDirectoryBitVectorWordView::view const):
(JSC::BlockDirectoryBits::numBits const):
(JSC::BlockDirectoryBits::resize):
(JSC::BlockDirectoryBits::forEachSegment):

  • heap/BlockDirectoryInlines.h:

(JSC::BlockDirectory::forEachBlock):
(JSC::BlockDirectory::forEachNotEmptyBlock):

  • heap/CompleteSubspace.cpp:

(JSC::CompleteSubspace::allocatorForSlow):
(JSC::CompleteSubspace::tryAllocateSlow):

  • heap/CompleteSubspaceInlines.h:

(JSC::CompleteSubspace::allocateNonVirtual):

  • heap/IsoCellSet.cpp:

(JSC::IsoCellSet::parallelNotEmptyMarkedBlockSource):

  • heap/IsoCellSetInlines.h:

(JSC::IsoCellSet::forEachMarkedCell):

  • heap/IsoSubspace.cpp:

(JSC::IsoSubspace::IsoSubspace):
(JSC::IsoSubspace::tryAllocateFromLowerTier):

  • heap/IsoSubspace.h:

(JSC::IsoSubspace::cellSize):
(JSC::IsoSubspace::allocatorForNonVirtual):
(JSC::IsoSubspace::size const): Deleted.
(): Deleted.

  • heap/IsoSubspaceInlines.h:

(JSC::IsoSubspace::allocateNonVirtual):

  • heap/IsoSubspacePerVM.cpp:

(JSC::IsoSubspacePerVM::AutoremovingIsoSubspace::~AutoremovingIsoSubspace):

  • heap/LocalAllocator.cpp:

(JSC::LocalAllocator::allocateSlowCase):
(JSC::LocalAllocator::doTestCollectionsIfNeeded):

  • heap/LocalAllocator.h:
  • heap/LocalAllocatorInlines.h:

(JSC::LocalAllocator::allocate):

  • heap/MarkedBlock.cpp:

(JSC::MarkedBlock::Handle::dumpState):

  • heap/MarkedSpace.cpp:

(JSC::MarkedSpace::MarkedSpace):
(JSC::MarkedSpace::sweepBlocks):
(JSC::MarkedSpace::prepareForAllocation):
(JSC::MarkedSpace::visitWeakSets):
(JSC::MarkedSpace::reapWeakSets):
(JSC::MarkedSpace::prepareForMarking):
(JSC::MarkedSpace::beginMarking):
(JSC::MarkedSpace::snapshotUnswept):

  • heap/MarkedSpace.h:

(JSC::MarkedSpace::heap const): Deleted.

  • heap/MarkedSpaceInlines.h:

(JSC::MarkedSpace::heap const):

  • heap/Subspace.cpp:

(JSC::Subspace::initialize):

  • heap/Subspace.h:

Source/WTF:

  • wtf/FastBitVector.h:

(WTF::fastBitVectorArrayLength):
(WTF::FastBitVectorImpl::unsafeWords):
(WTF::FastBitVectorImpl::unsafeWords const):
(WTF::FastBitReference::FastBitReference):
(WTF::FastBitReference::operator bool const):
(WTF::FastBitReference::operator=):
(WTF::FastBitVector::at):
(WTF::FastBitVector::operator[]):
(WTF::FastBitVector::BitReference::BitReference): Deleted.
(WTF::FastBitVector::BitReference::operator bool const): Deleted.
(WTF::FastBitVector::BitReference::operator=): Deleted.

Note: See TracTimeline for information about the timeline view.