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

Timeline



Apr 6, 2020:

11:58 PM Changeset in webkit [259626] by Alan Coon
  • 1 copy in branches/safari-610.1.9-branch

New branch.

11:54 PM Changeset in webkit [259625] by Alan Coon
  • 8 edits in trunk/Source

Versioning.

11:29 PM Changeset in webkit [259624] by Jack Lee
  • 3 edits
    2 adds in trunk

Nullptr crash in CompositeEditCommand::splitTreeToNode when inserting image in anchor element that has uneditable parent
https://bugs.webkit.org/show_bug.cgi?id=210004
<rdar://problem/61206583>

Reviewed by Ryosuke Niwa.

Source/WebCore:

RemoveNodePreservingChildren can fail and leave the children dangling if the parent of the node
is uneditable. Added editability check for the to-be-removed node.

Test: editing/inserting/insert-img-anchor-uneditable-parent.html

  • editing/RemoveNodePreservingChildrenCommand.cpp:

(WebCore::RemoveNodePreservingChildrenCommand::doApply):

LayoutTests:

Added a regression test for the crash.

  • editing/inserting/insert-img-anchor-uneditable-parent-expected.txt: Added.
  • editing/inserting/insert-img-anchor-uneditable-parent.html: Added.
9:59 PM Changeset in webkit [259623] by Lauro Moura
  • 3 edits in trunk/LayoutTests

[GTK][WPE] Gardening EXIF orientation failure.

Unreviewed test gardening.

  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
8:39 PM Changeset in webkit [259622] by Peng Liu
  • 3 edits
    1 add in trunk/Tools

REGRESSION (r259531?): [iOS] TestWebKitAPI.WebKitLegacy.ScrollingDoesNotPauseMedia is timing out
https://bugs.webkit.org/show_bug.cgi?id=210013

Reviewed by Daniel Bates.

Fix mistakes in the test and make it more reliable.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitLegacy/ios/ScrollingDoesNotPauseMedia.mm:

(-[ScrollingDoesNotPauseMediaDelegate handleEvent:]):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitLegacy/ios/one-video.html: Added.
7:23 PM Changeset in webkit [259621] by mmaxfield@apple.com
  • 4 edits in trunk/LayoutTests

[Cocoa] REGRESSION(r254389): fast/text/international/system-language/declarative-language.html is failing
https://bugs.webkit.org/show_bug.cgi?id=208023
<rdar://problem/59461792>

Reviewed by Simon Fraser.

minimizedLanguagesFromLanguages() is supposed to minimize the language list;
that's its whole raison d'être

  • fast/text/international/system-language/declarative-language-expected.txt:
  • fast/text/international/system-language/declarative-language.html:
  • platform/mac/TestExpectations:
7:16 PM Changeset in webkit [259620] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

Use-after-move of Vector<ManipulationToken> in TextManipulationController::observeParagraphs()
<https://webkit.org/b/210086>

Reviewed by Ryosuke Niwa.

  • editing/TextManipulationController.cpp:

(WebCore::TextManipulationController::observeParagraphs):

  • Replace WTFMove() with std::exchange() to fix the clang static analyzer warning. For WTF::Vector, this has no change in behavior.
6:45 PM Changeset in webkit [259619] by Jack Lee
  • 3 edits
    2 adds in trunk

Nullptr crash in WebCore::lastPositionInNode when indenting text node that has user-select:all parent.
https://bugs.webkit.org/show_bug.cgi?id=210016
<rdar://problem/61014577>

Reviewed by Ryosuke Niwa.

Source/WebCore:

In rangeForParagraphSplittingTextNodesIfNeeded, added null check for previousSibling()
after splitTextNode is called, and returns empty positions to caller.

In formatSelection, check the returned positions from rangeForParagraphSplittingTextNodesIfNeeded
and stop indenting the rest of the paragraphs.

Test: fast/editing/indent-pre-user-select-all-crash.html

  • editing/ApplyBlockElementCommand.cpp:

(WebCore::ApplyBlockElementCommand::formatSelection):
(WebCore::ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded):

LayoutTests:

Added a regression test for the crash.

  • fast/editing/indent-pre-user-select-all-crash-expected.txt: Added.
  • fast/editing/indent-pre-user-select-all-crash.html: Added.
6:04 PM Changeset in webkit [259618] by Devin Rousso
  • 4 edits in trunk/Source

Web Inspector: console.log(...) appear as CONSOLE LOG LOG in the system console
https://bugs.webkit.org/show_bug.cgi?id=210083

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

  • runtime/ConsoleClient.cpp:

(JSC::appendMessagePrefix):

Source/WebCore:

  • page/PageConsoleClient.cpp:

(WebCore::PageConsoleClient::addMessage):
Use the actual MessageSource and MessageType when printing console messages.

5:58 PM Changeset in webkit [259617] by don.olmstead@sony.com
  • 5 edits in trunk

[CMake] Use WEBKIT_EXECUTABLE in DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=210059

Reviewed by Fujii Hironori.

.:

Add a DumpRenderTree derived sources directory.

  • Source/cmake/WebKitFS.cmake:

Tools:

Modify CMake code to use WEBKIT_EXECUTABLE when creating DumpRenderTree.

  • DumpRenderTree/CMakeLists.txt:
  • DumpRenderTree/PlatformWin.cmake:
5:26 PM Changeset in webkit [259616] by Jonathan Bedard
  • 2 edits in trunk/Tools

ImageDiff: Don't build with ASan in automation
https://bugs.webkit.org/show_bug.cgi?id=210057
<rdar://problem/61234753>

Reviewed by David Kilzer.

  • ImageDiff/cg/Configurations/ImageDiff.xcconfig: Disable ASan.
5:11 PM Changeset in webkit [259615] by Kate Cheney
  • 7 edits in trunk/Source/WebKit

Create a way to signal if the WKAppBoundDomains list is empty
https://bugs.webkit.org/show_bug.cgi?id=210074
<rdar://problem/61359228>

Reviewed by Brent Fulgham.

Updates the WebFramePolicyListener to return an Optional<NavigatingToAppBoundDomain>
to signal if the WKAppBoundDomains list is empty. If so, we don't want to update
any app-bound domain parameters in WebPageProxy.

  • UIProcess/WebFramePolicyListenerProxy.cpp:

(WebKit::WebFramePolicyListenerProxy::didReceiveAppBoundDomainResult):

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

(WebKit::WebFrameProxy::setUpPolicyListenerProxy):

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

(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponseShared):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::beginAppBoundDomainCheck):
Changed the WebFramePolicyListener to take a NavigatingToAppBoundDomain
type as opposed to a boolean to allow it to handle the empty value.

5:11 PM Changeset in webkit [259614] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION: 68000 JSC tests failing.
https://bugs.webkit.org/show_bug.cgi?id=210078
<rdar://problem/61364513>

Reviewed by Yusuke Suzuki.

The missing exception check is in jsc shell's GlobalObject::finishCreation().
Since this is just a debugging tool, and this exception will never be thrown in
practice, I've placated the validator by RELEASE_ASSERT'ing that the exception
will never be thrown.

  • jsc.cpp:
5:00 PM Changeset in webkit [259613] by Wenson Hsieh
  • 4 edits in trunk/Source/WebCore

REGRESSION: 4 TestWebKitAPI.DragAndDropTests.DataTransferSetData tests failing on iOS
https://bugs.webkit.org/show_bug.cgi?id=209685
<rdar://problem/60987461>

Reviewed by Megan Gardner.

After updating a WebKit open source test runner to iOS 13.4, 4 pasteboard-related API tests began to fail in
release builds on that particular bot. Logging statements added in r259465, r259518, r259534, and r259541
strongly suggest that this is due to an IPC dispatch race when clearing the platform pasteboard before writing
custom pasteboard data. On iOS, the former is dispatched asynchronously, while the latter is dispatched as sync
IPC. This means that if the UI process happens to be waiting for a sync IPC response from the web process, it
will end up handling the incoming IPC messages out of order by immediately dispatching sync IPC (in this case,
writing custom pasteboard data) before dispatching the async IPC (clearing data). This causes the custom
pasteboard data to be cleared on the platform pasteboard immediately after it is written.

To fix this, we limit clearing pasteboard data to when we would've otherwise avoided writing any custom
pasteboard data, and additionally make it so that writing custom pasteboard data always clears out any pre-
existing content on the pasteboard (obviating the need for a separate message to clear the pasteboard). Note
that writing custom pasteboard data always clears the existing pasteboard on macOS and iOS -- on macOS, we use
-declareTypes:owner:; on iOS, we use -setItemProviders:; in the case of macCatalyst, we -setItems:.

  • dom/DataTransfer.cpp:

(WebCore::DataTransfer::commitToPasteboard):

Push the call to clear the pasteboard down from the call sites of commitToPasteboard into commitToPasteboard
itself; then, only explicitly clear the pasteboard in the case where we aren't writing custom pasteboard data
(i.e. either custom pasteboard data is disabled, or there is no data to write),

(WebCore::DataTransfer::moveDragState): See above.

  • editing/Editor.cpp:

(WebCore::dispatchClipboardEvent): See above.

  • platform/ios/WebItemProviderPasteboard.mm:

(-[WebItemProviderPasteboard stageRegistrationLists:]):

Remove always-on logging added in r259541 to help diagnose the test failures.

4:39 PM Changeset in webkit [259612] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

[ Mac wk1 Debug ] inspector/debugger/evaluateOnCallFrame-errors.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=210079

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
4:34 PM Changeset in webkit [259611] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

Delete line boxes when moving text renderers between block flows
https://bugs.webkit.org/show_bug.cgi?id=210000

Reviewed by Antti Koivisto.

After style and/or tree mutation the existing line boxes are destroyed during the subsequent layout.
When the text renderer moves between block flows and the destination block flow initiates a different
type of line layout, we need to make sure the previous line content is cleaned up properly.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::layoutSimpleLines):
(WebCore::RenderBlockFlow::layoutLFCLines):

  • rendering/RenderText.cpp:

(WebCore::RenderText::removeAndDestroyTextBoxes):
(WebCore::RenderText::dirtyLineBoxes):
(WebCore::RenderText::deleteLineBoxes):

  • rendering/RenderText.h:
4:25 PM Changeset in webkit [259610] by Chris Dumez
  • 4 edits in trunk/Source/WebKit

[iOS] Transition most process assertions to RunningBoard
https://bugs.webkit.org/show_bug.cgi?id=210065
<rdar://problem/61354901>

Reviewed by Geoffrey Garen.

Transition most process assertions to RunningBoard, instead of legacy BKSProcessAssertion.
The only assertion that still uses BKSProcessAssertion is the MediaPlayback once because
we do not have a RunningBoard equivalent for this one yet (see <rdar://problem/61263147>).

  • UIProcess/ProcessAssertion.h:
  • UIProcess/ios/ProcessAssertionIOS.mm:

(-[WKRBSAssertionDelegate assertionWillInvalidate:]):
(-[WKRBSAssertionDelegate assertion:didInvalidateWithError:]):
(WebKit::runningBoardNameForAssertionType):
(WebKit::ProcessAssertion::ProcessAssertion):
(WebKit::ProcessAssertion::~ProcessAssertion):
(WebKit::ProcessAssertion::processAssertionWasInvalidated):

4:17 PM Changeset in webkit [259609] by Alan Coon
  • 1 edit in branches/safari-609.2.1.2-branch/Source/WebKit/UIProcess/WebPageProxy.cpp

Unreviewed build fix. rdar://problem/61231877

No member named 'counts' in 'WebKit::WebBackForwardList'

4:17 PM Changeset in webkit [259608] by Alan Coon
  • 1 edit in branches/safari-609.2.1.2-branch/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

Unreviewed build fix. rdar://problem/61231922

Change DoubleEqualAndOrdered to DoubleEqual to avoid build failure.

4:16 PM Changeset in webkit [259607] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Update my committer status
https://bugs.webkit.org/show_bug.cgi?id=210072

Patch by Kenneth Russell <kbr@chromium.org> on 2020-04-06
Reviewed by Dean Jackson.

Update contributors.json to reflect that my lapsed committer
status was recently reinstated.

  • Scripts/webkitpy/common/config/contributors.json:
4:15 PM Changeset in webkit [259606] by Ross Kirsling
  • 219 edits
    10 adds
    2 deletes in trunk

Update minimum ICU version to 60.2
https://bugs.webkit.org/show_bug.cgi?id=209694

Reviewed by Darin Adler.

.:

  • Source/cmake/OptionsAppleWin.cmake:
  • Source/cmake/OptionsCommon.cmake:
  • Source/cmake/OptionsFTW.cmake:
  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsJSCOnly.cmake:
  • Source/cmake/OptionsMac.cmake:
  • Source/cmake/OptionsPlayStation.cmake:
  • Source/cmake/OptionsWPE.cmake:
  • Source/cmake/OptionsWinCairo.cmake:

Indicate 60.2 as minimum version (as required by GTK for supporting Ubuntu 18.04 LTS).
Also ensure that the C++ API is hidden for all platforms.

Source/JavaScriptCore:

  • icu/LICENSE: Deleted.
  • icu/README: Deleted.

Remove leftover files following r219155.

  • runtime/IntlDateTimeFormat.cpp:

(JSC::IntlDateTimeFormat::UFieldPositionIteratorDeleter::operator() const):
(JSC::IntlDateTimeFormat::partTypeString):
(JSC::IntlDateTimeFormat::formatToParts):

  • runtime/IntlDateTimeFormat.h:
  • runtime/IntlDateTimeFormatPrototype.cpp:

(JSC::IntlDateTimeFormatPrototype::finishCreation):
(JSC::IntlDateTimeFormatPrototypeFuncFormatToParts):

  • runtime/IntlNumberFormat.cpp:

(JSC::IntlNumberFormat::partTypeString):
(JSC::IntlNumberFormat::formatToParts):

  • runtime/IntlNumberFormat.h:
  • runtime/IntlNumberFormatPrototype.cpp:

(JSC::IntlNumberFormatPrototype::finishCreation):
(JSC::IntlNumberFormatPrototypeFuncFormatToParts):

  • runtime/IntlPluralRules.cpp:

(JSC::IntlPluralRules::resolvedOptions):
(JSC::IntlPluralRules::select):

  • runtime/IntlPluralRules.h:
  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::decode):
Remove obsoleted compile-time version checks.

Source/WebCore:

  • PlatformMac.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • icu/LICENSE: Deleted.
  • icu/README: Deleted.

Remove leftover files following r219155 as well as a corresponding Xcode step.

  • editing/cocoa/DataDetection.mm:

(WebCore::buildQuery):

  • page/ios/FrameIOS.mm:

(WebCore::Frame::interpretationsForCurrentRoot const):

  • platform/cocoa/KeyEventCocoa.mm:

(WebCore::keyForCharCode):

  • platform/cocoa/TelephoneNumberDetectorCocoa.cpp:

(WebCore::TelephoneNumberDetector::find):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::createFontForCharacters):
(WebCore::FontCache::prewarm):

  • platform/graphics/mac/ComplexTextControllerCoreText.mm:

(WebCore::provideStringAndAttributes):

  • platform/graphics/mac/GlyphPageMac.cpp:

(WebCore::GlyphPage::fill):
Manually convert between UChar and UniChar/unichar where needed.

  • platform/text/CharacterProperties.h:

(WebCore::isEmojiGroupCandidate):
(WebCore::isEmojiWithPresentationByDefault):
(WebCore::isEmojiModifierBase):
(WebCore::icuLibraryUnderstandsSupplementalSymbolsAndPictographs): Deleted.
Remove obsoleted compile-time and runtime version checks.

Source/WebKit:

  • WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.mm:

(-[WKDOMTextIterator currentTextPointer]):
Manually convert between UChar and UniChar/unichar where needed.

Source/WebKitLegacy/mac:

  • Misc/WebKitNSStringExtras.mm:

(-[NSString _web_drawAtPoint:font:textColor:]):
(-[NSString _web_widthWithFont:]):

  • WebCoreSupport/WebVisitedLinkStore.mm:

(WebVisitedLinkStore::addVisitedLink):

  • WebView/WebTextIterator.mm:

(-[WebTextIterator currentTextPointer]):
Manually convert between UChar and UniChar/unichar where needed.

Source/WTF:

This patch has two immediate motivations:

  1. To properly introduce a minimum ICU version for WebKit as a whole (responding to a pain point identified in bug 209579)
  2. To support the development of ECMA-402 Intl API features, which JSC is quite behind on (and which often boil down to exposing ICU functionality to JavaScript)
  • icu/LICENSE:
  • icu/README:
  • icu/unicode/:

Update ICU headers to major version 62, the version included in macOS Mojave.

  • wtf/text/AtomString.h:
  • wtf/text/WTFString.h:

Remove obsoleted compile-time version checks.

  • wtf/text/cocoa/StringCocoa.mm:

(WTF::String::String):

  • wtf/text/cocoa/StringViewCocoa.mm:

(WTF::StringView::createNSString const):
(WTF::StringView::createNSStringWithoutCopying const):
Manually convert between UChar and UniChar/unichar where needed.

Tools:

  • TestWebKitAPI/Tests/WTF/StringConcatenate.cpp:

Remove obsoleted compile-time version checks.

  • DumpRenderTree/TestRunner.cpp:

(TestRunner::runUIScript):

  • TestWebKitAPI/Tests/WebCore/LineBreaking.mm:

(breakingLocationsFromICU):
Manually convert between UChar and UniChar/unichar where needed.

4:05 PM Changeset in webkit [259605] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/WebKit

Cherry-pick r259580. rdar://problem/61352477

CrashTracer: MobileSafari at WebKit: WebKit::SystemPreviewController::updateProgress
https://bugs.webkit.org/show_bug.cgi?id=210040
rdar://51410841

Reviewed by Darin Adler.

It appears that the SystemPreviewController on WebPageProxy can
become null causing a call to an in-progress download to crash
as it tries to talk to the QuickLook delegate. Guard against this
by checking the SystemPreviewController each time.

  • UIProcess/Cocoa/DownloadClient.mm: (WebKit::systemPreviewController): (WebKit::DownloadClient::didReceiveResponse): (WebKit::DownloadClient::didReceiveData): (WebKit::DownloadClient::processDidCrash): (WebKit::DownloadClient::didFinish): (WebKit::DownloadClient::didFail): (WebKit::DownloadClient::didCancel):

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

4:05 PM Changeset in webkit [259604] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/WebCore

Cherry-pick r259538. rdar://problem/61352452

Additional sanity checks in compareAnimationsByCompositeOrder()
https://bugs.webkit.org/show_bug.cgi?id=209996

Reviewed by Geoffrey Garen.

compareAnimationsByCompositeOrder() is used by std::sort() which requires strict weak ordering.
This adds additional checks to ensure strict weak ordering is maintained, first by ensuring
the transitionProperty string is different before returning that comparison, then by only using
if the animation is a CSSTransition or CSSAnimation if the left hand and right hand sides differ.
This should leave all remaining cases to sort by the global animation list.

No new tests; this should be covered by existing tests and should not change functionality
otherwise.

  • animation/WebAnimationUtilities.cpp: (WebCore::compareAnimationsByCompositeOrder):

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

4:05 PM Changeset in webkit [259603] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/WebCore

Cherry-pick r259519. rdar://problem/61352446

ASSERTION FAILED: objectStoreInfo in SQLiteIDBBackingStore::getRecord
https://bugs.webkit.org/show_bug.cgi?id=209976
<rdar://problem/55005363>

Reviewed by Geoffrey Garen.

Return error if objectStoreInfo is null in SQLiteIDBBackingStore::getRecord, because there is a possibility
SQLiteIDBBackingStore does not have requested objectStoreInfo.

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):

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

4:05 PM Changeset in webkit [259602] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/JavaScriptCore

Cherry-pick r259424. rdar://problem/61352472

[JSC] RecordedStatuses's assignment should be guarded by CodeBlock's lock
https://bugs.webkit.org/show_bug.cgi?id=209935
<rdar://problem/59443383>

Reviewed by Mark Lam.

Previously RecordedStatuses are not touched by GC. But now, GC visits RecordedStatuses.
This means that modifying RecordedStatuses should be guarded by CodeBlock's lock if
it is reachable from CodeBlock.
In DFG::Plan::reallyAdd, we already installed DFG::JITCode into the CodeBlock so that
RecordedStatuses is reachable from CodeBlock. We should lock CodeBlock's lock while
performing WTFMove(RecordedStatuses).

We do not need to emit write-barrier here because (1) DFG::Plan::reallyAdd is executed
while GC is deferred and (2) we emit write-barrier to CodeBlock before deferred GC is executed.

  • dfg/DFGPlan.cpp: (JSC::DFG::Plan::reallyAdd):

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

4:05 PM Changeset in webkit [259601] by Alan Coon
  • 12 edits in branches/safari-609-branch/Source

Cherry-pick r259315. rdar://problem/61352448

Regression(r253357) DeviceMotionEvent acceleration and rotationRate are null
https://bugs.webkit.org/show_bug.cgi?id=209831
<rdar://problem/60720953>

Reviewed by Darin Adler.

Source/WebCore:

The issue was that DeviceMotionClientIOS::motionChanged() would only initialize the
acceleration and rotationRate if [m_motionManager gyroAvailable] returned YES. After
r253357, m_motionManager is nil because we get motion data from the UIProcess so
[m_motionManager gyroAvailable] would always resolve to NO.

To address the issue, I made the rotationRate parameters to motionChanged() optional
and we rely on them being set to know if gyro data is available. Note that I did not
make the acceleration optional because according to [1], all devices have an
accelerometer.

[1] https://developer.apple.com/documentation/coremotion/cmmotionmanager/1616094-devicemotionavailable?language=objc

  • platform/ios/DeviceMotionClientIOS.h:
  • platform/ios/DeviceMotionClientIOS.mm: (WebCore::DeviceMotionClientIOS::motionChanged):
  • platform/ios/DeviceOrientationUpdateProvider.h:
  • platform/ios/MotionManagerClient.h: (WebCore::MotionManagerClient::motionChanged):
  • platform/ios/WebCoreMotionManager.mm: (-[WebCoreMotionManager sendAccelerometerData:]):

Source/WebKit:

  • UIProcess/ios/WebDeviceOrientationUpdateProviderProxy.h:
  • UIProcess/ios/WebDeviceOrientationUpdateProviderProxy.mm: (WebKit::WebDeviceOrientationUpdateProviderProxy::motionChanged):
  • WebProcess/WebCoreSupport/WebDeviceOrientationUpdateProvider.cpp: (WebKit::WebDeviceOrientationUpdateProvider::deviceMotionChanged):
  • WebProcess/WebCoreSupport/WebDeviceOrientationUpdateProvider.h:
  • WebProcess/WebCoreSupport/WebDeviceOrientationUpdateProvider.messages.in:

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

4:05 PM Changeset in webkit [259600] by Alan Coon
  • 3 edits in branches/safari-609-branch/Source/JavaScriptCore

Cherry-pick r259264. rdar://problem/61352442

[JSC] DFGArrayMode::alreadyChecked should have NonArray check when ArrayMode is NonArray+SlowPutArrayStorage
https://bugs.webkit.org/show_bug.cgi?id=209791

Reviewed by Saam Barati.

DFGArrayMode::alreadyChecked with NonArray+SlowPutArrayStorage should check NonArray condition.

  • dfg/DFGArrayMode.cpp: (JSC::DFG::ArrayMode::alreadyChecked const):
  • dfg/DFGArrayMode.h: (JSC::DFG::ArrayMode::arrayModesWithIndexingShapes const):

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

4:05 PM Changeset in webkit [259599] by Alan Coon
  • 14 edits in branches/safari-609-branch/Source/WebCore

Cherry-pick r258434. rdar://problem/61352465

Safari sometimes crashes when switch video into PiP mode
https://bugs.webkit.org/show_bug.cgi?id=208904

Reviewed by Simon Fraser.

With this patch, MediaControlTextTrackContainerElement won't paint its subtree
to an image buffer (for the captions in video fullscreen or picture-in-picture mode)
when the cues are updated. Instead, it only sets the flag m_needsGenerateTextTrackRepresentation
to true after running layout based on the new cues. After that, it paints its subtree
to an image buffer if needed at the end of Page::updateRendering() when the layout is clean.
TextTrackRepresentationCocoa will use the image buffer to set the content of the layer
for captions in video fullscreen or picture-in-picture mode.

MediaControlTextTrackContainerElement class is responsible for rendering the captions in both:
1) a video player in the inline mode.
2) a video player in "video fullscreen" or picture-in-picture mode.
This patch refactors some functions to make their responsibilities clear.

  • Modules/mediacontrols/MediaControlsHost.cpp: (WebCore::MediaControlsHost::updateTextTrackRepresentationImageIfNeeded):
  • Modules/mediacontrols/MediaControlsHost.h:
  • dom/Document.cpp: (WebCore::Document::setMediaElementShowingTextTrack): (WebCore::Document::clearMediaElementShowingTextTrack): (WebCore::Document::updateTextTrackRepresentationImageIfNeeded):
  • dom/Document.h:

Functions textTracksAreReady(), textTrackReadyStateChanged() and configureTextTrackDisplay()
should be wrapped with "#if ENABLE(VIDEO_TRACK)".

  • html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setTextTrackRepresentation): (WebCore::HTMLMediaElement::textTracksAreReady const): (WebCore::HTMLMediaElement::textTrackReadyStateChanged): (WebCore::HTMLMediaElement::configureTextTrackDisplay): (WebCore::HTMLMediaElement::updateTextTrackRepresentationImageIfNeeded):
  • html/HTMLMediaElement.h:
  • html/shadow/MediaControlElements.cpp: (WebCore::MediaControlTextTrackContainerElement::createElementRenderer): (WebCore::MediaControlTextTrackContainerElement::updateDisplay): (WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentationImageIfNeeded): (WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentationIfNeeded): (WebCore::MediaControlTextTrackContainerElement::clearTextTrackRepresentation): (WebCore::MediaControlTextTrackContainerElement::updateTextTrackStyle): (WebCore::MediaControlTextTrackContainerElement::enteredFullscreen): (WebCore::MediaControlTextTrackContainerElement::updateVideoDisplaySize): (WebCore::MediaControlTextTrackContainerElement::updateSizes): (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage): (WebCore::MediaControlTextTrackContainerElement::textTrackRepresentationBoundsChanged): (WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentation): Deleted. (WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentationStyle): Deleted. (WebCore::MediaControlTextTrackContainerElement::layoutIfNecessary): Deleted. (WebCore::MediaControlTextTrackContainerElement::updateCueStyles): Deleted.
  • html/shadow/MediaControlElements.h:
  • html/shadow/MediaControls.cpp: (WebCore::MediaControls::updateTextTrackRepresentationImageIfNeeded):
  • html/shadow/MediaControls.h:
  • page/Page.cpp: (WebCore::Page::updateRendering):
  • rendering/RenderMediaControlElements.cpp: (WebCore::RenderMediaControlTextTrackContainer::RenderMediaControlTextTrackContainer): (WebCore::RenderMediaControlTextTrackContainer::layout): (WebCore::RenderTextTrackContainerElement::RenderTextTrackContainerElement): Deleted. (WebCore::RenderTextTrackContainerElement::layout): Deleted.
  • rendering/RenderMediaControlElements.h:

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

3:47 PM Changeset in webkit [259598] by Alan Coon
  • 3 edits in branches/safari-609.2.1.2-branch/Source/JavaScriptCore

Cherry-pick r259264. rdar://problem/61352437

[JSC] DFGArrayMode::alreadyChecked should have NonArray check when ArrayMode is NonArray+SlowPutArrayStorage
https://bugs.webkit.org/show_bug.cgi?id=209791

Reviewed by Saam Barati.

DFGArrayMode::alreadyChecked with NonArray+SlowPutArrayStorage should check NonArray condition.

  • dfg/DFGArrayMode.cpp: (JSC::DFG::ArrayMode::alreadyChecked const):
  • dfg/DFGArrayMode.h: (JSC::DFG::ArrayMode::arrayModesWithIndexingShapes const):

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

2:59 PM Changeset in webkit [259597] by Simon Fraser
  • 21 edits in trunk/Source

Make ScrollableArea TextStream-loggable
https://bugs.webkit.org/show_bug.cgi?id=210042

Reviewed by Darin Adler.

ScrollableArea is a pure virtual base class, so has to dump via a virtual function,
so add debugDescription() and implement it in derived classes.

Make the common pattern be that operator<<(TextStream&, ...) calls debugDescription.

Source/WebCore:

  • page/Frame.cpp:

(WebCore::Frame::debugDescription const):
(WebCore::operator<<):

  • page/Frame.h:
  • page/FrameView.cpp:

(WebCore::FrameView::debugDescription const):
(WebCore::operator<<):

  • page/FrameView.h:
  • platform/ScrollView.cpp:

(WebCore::ScrollView::debugDescription const):

  • platform/ScrollView.h:
  • platform/ScrollableArea.cpp:

(WebCore::operator<<):

  • platform/ScrollableArea.h:
  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::debugDescription const):
(WebCore::RenderLayer::calculateClipRects const):

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

(WebCore::RenderLayerCompositor::updateCompositingLayers):

  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::debugDescription const):

  • rendering/RenderListBox.h:

Source/WebKit:

  • UIProcess/win/WebPopupMenuProxyWin.cpp:

(WebKit::WebPopupMenuProxyWin::debugDescription const):

  • UIProcess/win/WebPopupMenuProxyWin.h:
  • WebProcess/Plugins/PDF/PDFPlugin.h:
  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::debugDescription const):

2:59 PM Changeset in webkit [259596] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

storage/indexeddb/value-cursor-cycle.html is flaky failing because it incorrectly thinks our JS GC is precise.
https://bugs.webkit.org/show_bug.cgi?id=210046

Unreviewed test gardening.

  • platform/mac/TestExpectations:
2:44 PM Changeset in webkit [259595] by Jack Lee
  • 3 edits
    2 adds in trunk

Nullptr crash in CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary with draggable text
https://bugs.webkit.org/show_bug.cgi?id=209999
<rdar://problem/58978340>

Reviewed by Ryosuke Niwa.

Source/WebCore:

VisibleParagraphStart/End may return empty VisiblePosition if no proper element or node
can be used as position candidate. Add null check for the returned VisiblePositions.

Test: fast/css/style-change-draggable-text.html

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):

LayoutTests:

Added a regression test for the crash.

  • fast/css/style-change-draggable-text-expected.txt: Added.
  • fast/css/style-change-draggable-text.html: Added.
1:53 PM Changeset in webkit [259594] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Strengthen the ASSERT in ImageDecoderAVFObjC::storeSampleBuffer().
https://bugs.webkit.org/show_bug.cgi?id=209972
<rdar://problem/60727431>

Reviewed by Brent Fulgham.

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

(WebCore::ImageDecoderAVFObjC::storeSampleBuffer):

1:48 PM Changeset in webkit [259593] by jer.noble@apple.com
  • 4 edits in trunk

[ Mac wk2 ] http/tests/media/track-in-band-hls-metadata.html is flaky crashing.
https://bugs.webkit.org/show_bug.cgi?id=209490
<rdar://problem/60837555>

Reviewed by Darin Adler.

Source/WebCore:

To ensure the TaskDispatcher doesn't get destroyed on a background thread at the same time it's
executing tasks on the main thread, when a GenericTaskQueue is destroyed on a background thread,
move the TaskDispatcher into a task, and use the dispatcher itself to destroy itself on the
main thread.

  • platform/GenericTaskQueue.h:

(WebCore::GenericTaskQueue::GenericTaskQueue):
(WebCore::GenericTaskQueue::~GenericTaskQueue):
(WebCore::GenericTaskQueue::enqueueTask):

LayoutTests:

  • platform/mac-wk2/TestExpectations:
1:37 PM Changeset in webkit [259592] by Manuel Rego Casasnovas
  • 9 edits in trunk/LayoutTests

[GTK][WPE] Re-enable WPT web-animations animation-types tests and updating baselines
https://bugs.webkit.org/show_bug.cgi?id=186139

Reviewed by Carlos Alberto Lopez Perez.

These tests are no longer timing out, so this patch unflags them from TestExpectations.
Apart from that the -expected.txt baselines are updated too.

  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:
  • platform/wpe/TestExpectations:
  • platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:
1:36 PM Changeset in webkit [259591] by commit-queue@webkit.org
  • 5 edits in trunk

Unreviewed, reverting r259469.
https://bugs.webkit.org/show_bug.cgi?id=210066

Introduced media playback regression (Requested by perarne on
#webkit).

Reverted changeset:

"[iOS] Deny mach lookup access to the runningboard service in
the WebContent process"
https://bugs.webkit.org/show_bug.cgi?id=209933
https://trac.webkit.org/changeset/259469

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

Unreviewed sandbox compile fix.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1:12 PM Changeset in webkit [259589] by commit-queue@webkit.org
  • 539 edits
    258 adds
    19 deletes in trunk/Source/ThirdParty/ANGLE

Update ANGLE to 2020-03-27
https://bugs.webkit.org/show_bug.cgi?id=209689

Patch by Kenneth Russell <kbr@chromium.org> on 2020-04-06
Reviewed by Darin Adler.

Use update-angle.sh script by James Darpinian to roll ANGLE to
commit b387ce9389ede6a4ed3b831ab1b8187927fa295f in
https://chromium.googlesource.com/angle/angle .

changes.diff has been auto-updated with Apple's diffs relative to
upstream. No additional manual changes are made in this roll.
Long autogenerated file list omitted.

1:07 PM Changeset in webkit [259588] by Fujii Hironori
  • 2 edits in trunk/Source/JavaScriptCore

[Clang 10] Fix -Wimplicit-int-float-conversion compilation warnings in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=210038

Reviewed by Darin Adler.

Clang 10 reports a compilation warning in JavaScriptCore:

..\..\Source\JavaScriptCore\bytecode/CodeBlock.cpp(3002,24): warning: implicit conversion from 'unsigned long long' to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Wimplicit-int-float-conversion]

if (doubleResult > std::numeric_limits<size_t>::max())

~ ~

Use a template variable maxPlusOne<T> which was added by r259537
for the purpose.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::predictedMachineCodeSize): Replaced '>' with '>=',
and std::numeric_limits<size_t>::max() with maxPlusOne<size_t>.

12:01 PM Changeset in webkit [259587] by Alexey Shvayka
  • 7 edits
    1 delete in trunk

Remove unnecessary Test262 harness file and implement $262.IsHTMLDDA
https://bugs.webkit.org/show_bug.cgi?id=187526

Reviewed by Darin Adler.

JSTests:

  • stress/optional-chaining.js: Adjust test for callable masquerader.

Source/JavaScriptCore:

Test262 harness requires [1] $262.IsHTMLDDA to be an object with IsHTMLDDA slot [2],
much like document.all. It is used in a few tests to make sure that runtimes strictly
compare values with null and undefined.

With this change, makeMasquerader returns callable masquerader to mimic document.all
in the wild. In order to avoid masqueradesAsUndefinedWatchpoint being fired during
initialization of JSC shell, $262.IsHTMLDDA is a getter.

[1]: https://github.com/tc39/test262/blob/master/INTERPRETING.md#host-defined-functions
[2]: https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot

  • jsc.cpp:

(functionMakeMasquerader):
(functionCallMasquerader):
(JSC::Masquerader::Masquerader): Deleted.
(JSC::Masquerader::subspaceFor): Deleted.
(JSC::Masquerader::create): Deleted.
(JSC::Masquerader::createStructure): Deleted.

  • runtime/JSObject.h:

Tools:

Removed file duplicates functionality of jsc.cpp's GlobalObject::finishCreation.

  • Scripts/test262/Runner.pm:
  • Scripts/test262/agent.js: Removed.
11:55 AM Changeset in webkit [259586] by Jacob Uphoff
  • 2 edits in trunk/LayoutTests

[ macOS ] inspector/debugger/break-in-constructor-before-super.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=210062

Unreviewed test gardening.

  • platform/mac/TestExpectations:
11:54 AM Changeset in webkit [259585] by Antti Koivisto
  • 9 edits
    2 adds in trunk

'currentcolor' doesn't need setHasExplicitlyInheritedProperties marking anymore
https://bugs.webkit.org/show_bug.cgi?id=210017

Reviewed by Darin Adler.

Source/WebCore:

Removing this marking reveals problems in style update avoidance code in CSSComputedStyleDeclaration
that also need to be addressed. The problems are not specific to exlicit 'currentcolor', they also reproduce
with the initial value (thus the new test).

Test: fast/css/currentColor-initial-style-update.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::nonInheritedColorPropertyHasValueCurrentColor):

Add a helper.

(WebCore::hasValidStyleForProperty):

Treat a non-inherited color property as inherited if it is 'currentcolor'.

(WebCore::updateStyleIfNeededForProperty):

Expand shorthands so properties like border-color test correctly.

  • css/CSSProperty.cpp:

(WebCore::CSSProperty::isColorProperty):

Move here from CSSParserFastPaths.

  • css/CSSProperty.h:
  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::maybeParseValue):
(WebCore::isColorPropertyID): Deleted.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::unresolvedColorForProperty const):

Factor into a helper.
Handle all color values.

(WebCore::RenderStyle::colorResolvingCurrentColor const):

Renamed for clarity and some cleanups.

(WebCore::RenderStyle::visitedDependentColor const):
(WebCore::RenderStyle::colorIncludingFallback const): Deleted.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::isCurrentColor):

  • style/StyleBuilderState.cpp:

(WebCore::Style::BuilderState::colorFromPrimitiveValue const):

Remove setHasExplicitlyInheritedProperties marking.

LayoutTests:

  • fast/css/currentColor-initial-style-update-expected.txt: Added.
  • fast/css/currentColor-initial-style-update.html: Added.
11:48 AM Changeset in webkit [259584] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[GTK] Remove unused header in web process
https://bugs.webkit.org/show_bug.cgi?id=210053

Patch by Víctor Manuel Jáquez Leal <vjaquez@igalia.com> on 2020-04-06
Reviewed by Michael Catanzaro.

Remove unused headers from code removed in r203774.

No new tests required.

  • WebProcess/gtk/WebProcessMainGtk.cpp:
11:48 AM Changeset in webkit [259583] by Justin Michaud
  • 38 edits
    7 adds in trunk

Allow deleteById to be cached in the DFG
https://bugs.webkit.org/show_bug.cgi?id=208664

Reviewed by Saam Barati.

JSTests:

  • microbenchmarks/delete-property-allocation-sinking.js: Added.

(assert):
(noInline.assert.blackbox):
(noInline.blackbox.doAlloc1):
(noInline.doAlloc1):

  • microbenchmarks/polyvariant-delete-property.js: Added.

(assert):
(blackbox):
(noInline.blackbox.polyvariant):
(doAlloc1):
(noInline.doAlloc1.doAlloc2):
(noInline.doAlloc2):

  • stress/delete-property-dfg-inline.js: Added.

(assert):
(noInline.assert.assert_throws):
(noInline.assert_throws.blackbox):
(noInline.blackbox.testSingleStructure.doAlloc1):
(noInline.blackbox.testSingleStructure):
(noInline.testSingleStructure.testInlineSingleStructure.doDelete2):
(noInline.testSingleStructure.testInlineSingleStructure.doAlloc2):
(noInline.testSingleStructure.testInlineSingleStructure):
(noInline.testInlineSingleStructure.testExit.doDelete3):
(noInline.testInlineSingleStructure.testExit):
(noInline.testExit.testSingleStructureMiss.doAlloc4):
(noInline.testExit.testSingleStructureMiss):
(noInline.testSingleStructureMiss.testSingleStructureMissStrict.string_appeared_here.doAlloc5):
(noInline.testSingleStructureMiss.testSingleStructureMissStrict):
(noInline.testSingleStructureMissStrict.testSingleStructureMissNonConfigurable.doAlloc6):
(noInline.testSingleStructureMissStrict.testSingleStructureMissNonConfigurable):
(noInline.testSingleStructureMissNonConfigurable.testSingleStructureEmpty.doAlloc7):
(noInline.testSingleStructureMissNonConfigurable.testSingleStructureEmpty):
(noInline.testSingleStructureEmpty.testPolymorphic.doDelete8):
(noInline.testSingleStructureEmpty.testPolymorphic):
(noInline.testPolymorphic.testPolyvariant.doDelete9):
(noInline.testPolymorphic.testPolyvariant.polyvariant):
(noInline.testPolymorphic.testPolyvariant):
(noInline.testPolyvariant.testConstantFolding.doDelete10):
(noInline.testPolyvariant.testConstantFolding):
(noInline.testConstantFolding.testObjectSinking.doAlloc11):
(noInline.testConstantFolding.testObjectSinking):
(noInline.testObjectSinking.testProxy.doAlloc12):
(noInline.testObjectSinking.testProxy.noInline.doDelete12):
(noInline.testObjectSinking.testProxy):
(noInline.testProxy.testTypedArray.doDelete12):
(noInline.testProxy.testTypedArray):
(noInline.testTypedArray.testMissMixed.doDelete13):
(noInline.testTypedArray.testMissMixed):
(noInline.testMissMixed.testMissNonMixed.doDelete14):
(noInline.testMissMixed.testMissNonMixed):
(noInline.testMissNonMixed.testByVal.doDelete15):
(noInline.testMissNonMixed.testByVal):

Source/JavaScriptCore:

When we see that the deleteById inline cache only saw one structure, we inline it into the DFG. This involves
creating a new node, FilterDeleteByStatus, and then turning these DeleteById nodes into a FilterDeleteByStatus,
CheckStructure, PutByOffset, then PutStructure (or just a CheckStructure in the case of a miss). The logic for
pessimising this optimization is the same as for PutById, giving inlined functions the opportunity to use only
the DFG profiling information, while everything else uses the DFG+Baseline information.

This also adds a MultiDeleteByOffset node, for the case when there are multiple structures seen by the delete. If
all of the cases are the same kind of miss, then we only emit a CheckStructure and constant.

Finally, if we see a delete by val with a single identifier, we inline that too.

This patch removes a dead code path from deleteProperty that checks if we need to nuke the object's butterfly.
This also fixes a bug where we were checking the neutering status of typed arrays for named properties when we should
only check for indexed properties. The behavior of this now matches for all tiers including when cached.

The benchmark shows a 2x improvement on polyvariant-delete-property, and a 50% improvement on delete-property-allocation-sinking.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • bytecode/AccessCase.cpp:

(JSC::AccessCase::createDelete):
(JSC::AccessCase::generateImpl):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::getICStatusMap):

  • bytecode/DeleteByIdVariant.cpp: Added.

(JSC::DeleteByIdVariant::DeleteByIdVariant):
(JSC::DeleteByIdVariant::~DeleteByIdVariant):
(JSC::DeleteByIdVariant::operator=):
(JSC::DeleteByIdVariant::attemptToMerge):
(JSC::DeleteByIdVariant::writesStructures const):
(JSC::DeleteByIdVariant::visitAggregate):
(JSC::DeleteByIdVariant::markIfCheap):
(JSC::DeleteByIdVariant::dump const):
(JSC::DeleteByIdVariant::finalize):
(JSC::DeleteByIdVariant::dumpInContext const):

  • bytecode/DeleteByIdVariant.h: Added.

(JSC::DeleteByIdVariant::oldStructure const):
(JSC::DeleteByIdVariant::newStructure const):
(JSC::DeleteByIdVariant::result const):
(JSC::DeleteByIdVariant::offset const):
(JSC::DeleteByIdVariant::isPropertyUnset const):
(JSC::DeleteByIdVariant::identifier const):
(JSC::DeleteByIdVariant::overlaps):

  • bytecode/DeleteByStatus.cpp: Added.

(JSC::DeleteByStatus::appendVariant):
(JSC::DeleteByStatus::computeForBaseline):
(JSC::DeleteByStatus::DeleteByStatus):
(JSC::DeleteByStatus::computeForStubInfoWithoutExitSiteFeedback):
(JSC::DeleteByStatus::computeFor):
(JSC::DeleteByStatus::slowVersion const):
(JSC::DeleteByStatus::merge):
(JSC::DeleteByStatus::filter):
(JSC::DeleteByStatus::singleIdentifier const):
(JSC::DeleteByStatus::visitAggregate):
(JSC::DeleteByStatus::markIfCheap):
(JSC::DeleteByStatus::finalize):
(JSC::DeleteByStatus::dump const):

  • bytecode/DeleteByStatus.h: Added.
  • bytecode/ICStatusMap.h:
  • bytecode/RecordedStatuses.cpp:

(JSC::RecordedStatuses::operator=):
(JSC::RecordedStatuses::addDeleteByStatus):
(JSC::RecordedStatuses::visitAggregate):
(JSC::RecordedStatuses::markIfCheap):

  • bytecode/RecordedStatuses.h:

(JSC::RecordedStatuses::forEachVector):

  • dfg/DFGAbstractInterpreterInlines.h:

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

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

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

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGClobbersExitState.cpp:

(JSC::DFG::clobbersExitState):

  • dfg/DFGConstantFoldingPhase.cpp:

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

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::dump):

  • dfg/DFGGraph.h:
  • dfg/DFGMayExit.cpp:
  • dfg/DFGNode.cpp:

(JSC::DFG::MultiDeleteByOffsetData::writesStructures const):

  • dfg/DFGNode.h:

(JSC::DFG::Node::hasMultiDeleteByOffsetData):
(JSC::DFG::Node::multiDeleteByOffsetData):
(JSC::DFG::Node::hasDeleteByStatus):
(JSC::DFG::Node::deleteByStatus):

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

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • dfg/DFGTypeCheckHoistingPhase.cpp:

(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantStructureChecks):
(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantArrayChecks):

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

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

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

  • runtime/JSGenericTypedArrayViewInlines.h:

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

  • runtime/JSObject.cpp:

(JSC::JSObject::deleteProperty):

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

(JSC::Structure::mayHaveIndexingHeader const): Deleted.
(JSC::Structure::canCacheDeleteIC const): Deleted.

11:19 AM Changeset in webkit [259582] by sbarati@apple.com
  • 36 edits
    1 add
    4 deletes in trunk

Implement 1GB of executable memory on arm64
https://bugs.webkit.org/show_bug.cgi?id=208490
<rdar://problem/60797127>

Reviewed by Keith Miller.

JSTests:

Run JetStream2 wasm tests.

  • wasm.yaml:
  • wasm/lowExecutableMemory/executable-memory-oom.js:

PerformanceTests:

  • JetStream2/JetStreamDriver.js:

(Driver.prototype.dumpJSONResultsIfNeeded):
(DefaultBenchmark.prototype.updateUIAfterRun):
(DefaultBenchmark):
(WSLBenchmark.prototype.updateUIAfterRun):
(WSLBenchmark):
(WasmBenchmark.prototype.updateUIAfterRun):
(WasmBenchmark):
(Driver.async fetchResources.statusElement.innerHTML.a.href.string_appeared_here):
(Driver.prototype.async fetchResources):

Source/JavaScriptCore:

This patch implements the 1GB executable memory space on arm64. To make this
work, we implement jumps larger than +/-128MB to use jump islands. Jump islands
work by splitting up the ~1GB region into 9 112MB chunks (1008 MB total). Each
chunk is split into two: 96MB of executable region, and 16MB of jump island region.
With this split, any jump inside a jump island region can get to the adjacent
island (forwards or backwards) in a single +/-128MB jump. When linking a jump
from A to B, where |A - B| > 128MB, we instead point the jump to an island,
where this island has a potential series of jumps that finally lands at B.

To allocate executable memory, use a MetaAllocator for each 96MB chunk. To
allocate islands, we have a bit vector we use to track used and freed islands.
We only grow this bit vector as islands are allocated, so it frequently
remains empty or very small.

The goal of this patch is to have minimal perf impact when not using islands,
so the data structures are designed to only incur overhead when actually using
islands. We expect the use of islands to be minimal. We use a red black tree
to track all island locations. This allows us to deallocate all islands when
an executable memory handle is freed. Typically, this red black tree is empty,
so freeing an executable memory handle incurs no extra overhead.

To make islands work for Wasm, we now have to link tier up code in two phases.
Previously, we would just patch jumps concurrently to Wasm threads running after
resetting the icache, knowing that we would be able to atomically update the jump
instruction to point to the new destination. However, now when repatching these
jumps in a world with jump islands, we might need to allocate islands depending
on the jump location and its target. So we now allocate and collect the set of islands,
then reset the icache, then atomically update the branch to point to the destination
(or an island that jumps to the destination). One important implementation detail
here is that for normal island repatching, if we have a jump from A to B, and it
allocates a set if islands X, we usually can deallocate X when repatching A to go to B'.
This is because the typical repatch scenario in JS happens when that code is not being
executed. For Wasm though, those islands X might be running while we want to repatch
A to go to B'. So instead of deallocating X, we just append to X in this scenario, and
we free the new set X' when the code itself is freed.

(This patch also fixes a bug in the Wasm LLInt to BBQ tier up that I spotted,
where we would publish a LLInt callee's BBQ replacement before we finished
linking the outgoing calls of the BBQ replacement.)

This patch also removes the old "CodeProfiling" code that has been unused for
a long time.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • assembler/ARM64Assembler.h:

(JSC::ARM64Assembler::b):
(JSC::ARM64Assembler::bl):
(JSC::ARM64Assembler::replaceWithJump):
(JSC::ARM64Assembler::prepareForAtomicRelinkJumpConcurrently):
(JSC::ARM64Assembler::prepareForAtomicRelinkCallConcurrently):
(JSC::ARM64Assembler::computeJumpType):
(JSC::ARM64Assembler::canEmitJump):
(JSC::ARM64Assembler::linkJumpOrCall):
(JSC::ARM64Assembler::linkCompareAndBranch):
(JSC::ARM64Assembler::linkConditionalBranch):
(JSC::ARM64Assembler::linkTestAndBranch):

  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::prepareForAtomicRepatchNearCallConcurrently):

  • assembler/LinkBuffer.cpp:

(JSC::LinkBuffer::copyCompactAndLinkCode):
(JSC::LinkBuffer::linkCode):
(JSC::LinkBuffer::allocate):
(JSC::LinkBuffer::performFinalization):

  • assembler/LinkBuffer.h:

(JSC::LinkBuffer::LinkBuffer):
(JSC::LinkBuffer::setIsJumpIsland):

  • assembler/MacroAssemblerCodeRef.h:

(JSC::MacroAssemblerCodeRef::MacroAssemblerCodeRef):

  • jit/ExecutableAllocator.cpp:

(JSC::initializeJITPageReservation):
(JSC::ExecutableAllocator::initializeUnderlyingAllocator):
(JSC::ExecutableAllocator::isValid const):
(JSC::ExecutableAllocator::allocate):
(JSC::ExecutableAllocator::getJumpIslandTo):
(JSC::ExecutableAllocator::getJumpIslandToConcurrently):
(JSC::FixedVMPoolExecutableAllocator::~FixedVMPoolExecutableAllocator): Deleted.

  • jit/ExecutableAllocator.h:

(JSC::ExecutableAllocatorBase::allocate):

  • runtime/CommonSlowPaths.cpp:
  • runtime/Completion.cpp:

(JSC::evaluate):

  • runtime/JSModuleLoader.cpp:

(JSC::moduleLoaderParseModule):

  • runtime/OptionsList.h:
  • tools/CodeProfile.cpp:

(JSC::truncateTrace): Deleted.
(JSC::CodeProfile::sample): Deleted.
(JSC::CodeProfile::report): Deleted.

  • tools/CodeProfile.h:

(JSC::CodeProfile::CodeProfile): Deleted.
(JSC::CodeProfile::parent): Deleted.
(JSC::CodeProfile::addChild): Deleted.
(): Deleted.
(JSC::CodeProfile::CodeRecord::CodeRecord): Deleted.

  • tools/CodeProfiling.cpp:

(JSC::setProfileTimer): Deleted.
(JSC::profilingTimer): Deleted.
(JSC::CodeProfiling::sample): Deleted.
(JSC::CodeProfiling::notifyAllocator): Deleted.
(JSC::CodeProfiling::getOwnerUIDForPC): Deleted.
(JSC::CodeProfiling::begin): Deleted.
(JSC::CodeProfiling::end): Deleted.

  • tools/CodeProfiling.h:

(): Deleted.
(JSC::CodeProfiling::CodeProfiling): Deleted.
(JSC::CodeProfiling::~CodeProfiling): Deleted.
(JSC::CodeProfiling::enabled): Deleted.
(JSC::CodeProfiling::beVerbose): Deleted.
(JSC::CodeProfiling::beVeryVerbose): Deleted.

  • wasm/WasmBBQPlan.cpp:

(JSC::Wasm::BBQPlan::work):

  • wasm/WasmCodeBlock.h:
  • wasm/WasmOMGForOSREntryPlan.cpp:

(JSC::Wasm::OMGForOSREntryPlan::work):

  • wasm/WasmOMGPlan.cpp:

(JSC::Wasm::OMGPlan::work):

  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::updateCallSitesToCallUs):

  • wasm/WasmPlan.h:

Source/WTF:

  • wtf/MetaAllocator.cpp:

(WTF::MetaAllocatorTracker::notify):
(WTF::MetaAllocatorTracker::release):
(WTF::MetaAllocator::release):
(WTF::MetaAllocatorHandle::MetaAllocatorHandle):
(WTF::MetaAllocatorHandle::~MetaAllocatorHandle):
(WTF::MetaAllocatorHandle::shrink):
(WTF::MetaAllocator::MetaAllocator):
(WTF::MetaAllocator::allocate):
(WTF::MetaAllocator::currentStatistics):

  • wtf/MetaAllocator.h:

(WTF::MetaAllocatorTracker::find):
(WTF::MetaAllocator::allocate):
(WTF::MetaAllocator::currentStatistics):
(WTF::MetaAllocator::getLock): Deleted.

  • wtf/MetaAllocatorHandle.h:

(WTF::MetaAllocatorHandle::allocator):
(WTF::MetaAllocatorHandle::isManaged): Deleted.
(WTF::MetaAllocatorHandle::ownerUID): Deleted.

  • wtf/PlatformEnable.h:
  • wtf/RedBlackTree.h:
  • wtf/StdLibExtras.h:

(WTF::constructFixedSizeArrayWithArgumentsImpl):
(WTF::constructFixedSizeArrayWithArguments):

Tools:

  • Scripts/run-jsc-stress-tests:
  • TestWebKitAPI/Tests/WTF/MetaAllocator.cpp:

(TestWebKitAPI::TEST_F):

  • TestWebKitAPI/Tests/WTF/RedBlackTree.cpp:

(TestWebKitAPI::TEST_F):

11:09 AM Changeset in webkit [259581] by Simon Fraser
  • 6 edits in trunk/Source/WebCore

Make RenderObject TextStream-loggable
https://bugs.webkit.org/show_bug.cgi?id=210035

Post-landing followup. More use of StringBuilder's variadic append. Have Node::debugDescription() include
its address, and have derived classes get the base class debugDescription(). Add an override in Text.

  • dom/Element.cpp:

(WebCore::Element::debugDescription const):

  • dom/Node.cpp:

(WebCore::Node::debugDescription const):

  • dom/Text.cpp:

(WebCore::Text::debugDescription const):
(WebCore::Text::formatForDebugger const):

  • dom/Text.h:
  • rendering/RenderObject.cpp:

(WebCore::RenderObject::debugDescription const):

11:08 AM Changeset in webkit [259580] by dino@apple.com
  • 2 edits in trunk/Source/WebKit

CrashTracer: MobileSafari at WebKit: WebKit::SystemPreviewController::updateProgress
https://bugs.webkit.org/show_bug.cgi?id=210040
rdar://51410841

Reviewed by Darin Adler.

It appears that the SystemPreviewController on WebPageProxy can
become null causing a call to an in-progress download to crash
as it tries to talk to the QuickLook delegate. Guard against this
by checking the SystemPreviewController each time.

  • UIProcess/Cocoa/DownloadClient.mm:

(WebKit::systemPreviewController):
(WebKit::DownloadClient::didReceiveResponse):
(WebKit::DownloadClient::didReceiveData):
(WebKit::DownloadClient::processDidCrash):
(WebKit::DownloadClient::didFinish):
(WebKit::DownloadClient::didFail):
(WebKit::DownloadClient::didCancel):

11:07 AM Changeset in webkit [259579] by Chris Dumez
  • 5 edits in trunk/Source/WebKit

ProcessAssertion should use ASCIILiteral for its reason
https://bugs.webkit.org/show_bug.cgi?id=210049

Reviewed by Alex Christensen.

ProcessAssertion should use ASCIILiteral for its reason, instead of a String.

  • Shared/ios/DependencyProcessAssertionIOS.mm:

(WebKit::DependencyProcessAssertion::DependencyProcessAssertion):

  • UIProcess/ProcessAssertion.cpp:

(WebKit::ProcessAssertion::ProcessAssertion):

  • UIProcess/ProcessAssertion.h:
  • UIProcess/ios/ProcessAssertionIOS.mm:

(WebKit::ProcessAssertion::ProcessAssertion):
(WebKit::ProcessAndUIAssertion::ProcessAndUIAssertion):

10:47 AM Changeset in webkit [259578] by cathiechen
  • 3 edits
    2 adds in trunk

The change of zoom shouldn't affect ResizeObserverSize
https://bugs.webkit.org/show_bug.cgi?id=209947

Reviewed by Simon Fraser.

Source/WebCore:

Zoom in/out shouldn't affect ResizeObserverSize. Use adjustLayoutUnitForAbsoluteZoom instead.

Test: imported/w3c/web-platform-tests/resize-observer/resize-observer-with-zoom.html

  • page/ResizeObservation.cpp:

(WebCore::ResizeObservation::computeObservedSize const):

LayoutTests:

Add test for resizeObserver with zoom. The ResizeObserverSize shouldn't be effected by zooms.

  • resize-observer/resize-observer-with-zoom-expected.txt: Added.
  • resize-observer/resize-observer-with-zoom.html: Added.
10:41 AM Changeset in webkit [259577] by graouts@webkit.org
  • 13 edits in trunk

[Web Animations] Move Document.getAnimations() to DocumentOrShadowRoot
https://bugs.webkit.org/show_bug.cgi?id=202192
<rdar://problem/55697775>

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Update the test relevant to DocumentOrShadowRoot.getAnimations() from upstream and record three new PASS results in it. We also get two new PASS from a harness test.

  • web-platform-tests/web-animations/idlharness.window-expected.txt:
  • web-platform-tests/web-animations/interfaces/DocumentOrShadowRoot/getAnimations-expected.txt:
  • web-platform-tests/web-animations/interfaces/DocumentOrShadowRoot/getAnimations.html:
  • web-platform-tests/web-animations/testcommon.js:

(async insertFrameAndAwaitLoad):

Source/WebCore:

We remove the getAnimations() declaration from the Document interface and instead move it on the DocumentOrShadowRoot interface.

We add the new method Document::matchingAnimations() which takes a lambda that is provided an animation's effect's target to determine whether
that animation should be found in the list of animations.

In the case of Document::getAnimations(), we filter out animations targeting elements hosted in shadow roots, while in ShadowRoot:getAnimations(),
we filter out animations targeting elements that are not hosted in the shadow root the method was called on.

  • dom/Document.cpp:

(WebCore::Document::getAnimations):
(WebCore::Document::matchingAnimations):

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

(WebCore::Element::getAnimations):

  • dom/ShadowRoot.cpp:

(WebCore::ShadowRoot::getAnimations):

  • dom/ShadowRoot.h:
10:35 AM Changeset in webkit [259576] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] Since ArrayBufferViewWatchpointAdaptor::add can fire watchpoints, DFG::Plan should check validity of CodeBlock after executing reallyAdd
https://bugs.webkit.org/show_bug.cgi?id=210055
<rdar://problem/61331962>

Reviewed by Keith Miller.

JSTests:

  • stress/array-buffer-view-watchpoint-can-be-fired-in-really-add-in-dfg.js: Added.

(xxx.foo):

Source/JavaScriptCore:

Since ArrayBufferViewWatchpointAdaptor::add can fire watchpoints, it is possible that the DFG CodeBlock is already invalidated after executing DFG::Plan::reallyAdd.
We should check CodeBlock's validity again and terminate DFG::Plan::finalizeWithoutNotifyingCallback with CompilationInvalidated if CodeBlock got invalidated.

  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::finalizeWithoutNotifyingCallback):

10:21 AM Changeset in webkit [259575] by Darin Adler
  • 72 edits
    5 deletes in trunk

Stop using live ranges in DocumentMarkerController
https://bugs.webkit.org/show_bug.cgi?id=209985

Reviewed by Antti Koivisto.

Source/WebCore:

  • Removed uses of live ranges from DocumentMarkerController.
  • Removed "active/inactive text match marker", which was only ever used by Chromium, and has been dead code in WebKit for while now.
  • Made a replacement for Range::absoluteTextQuads, in RenderObject, and moved all callers over.
  • Added a fast path for Node::isCharacterDataNode that makes it work without a virtual function call for the common node types.
  • Added a Node::length function that matches the DOM specification's definiton of a node's length, part of how ranges are defined.
  • Added a structure OffsetRange to represent start/end offsets within a single character data node. This is a common idiom to handle possible partial selection of text nodes at the start and end of the range when iterating text within a range.
  • Changed DocumentMarker functions to use OffsetRange.
  • Added helper functions for turning a vector of quads into a vector of bounding box rectangles, and for computing a union of all the rectangles, since both of these are common coding patterns.
  • Added an intersectingNodes function, producing a for-loop-compatible range for iterating all nodes covered by a DOM range.
  • Changed RenderObject::SetLayoutNeededForbiddenScope so it can be used without an #if at each call site, expands to nothing in release builds.
  • Eliminated uses of RetainPtr<id> instead of just id to pass arguments.
  • dom/CharacterData.h: Updated since isCharacterDataNode is no longer a

virtual function.

  • dom/Document.cpp:

(WebCore::Document::textInserted): Pass an OffsetRange to removeMarkers.
(WebCore::Document::textRemoved): Ditto.

  • dom/DocumentMarker.h: Removed most platform-specific functions.

Removed the active match boolean, which was only ever used for Chromium.
Use OffsetRange. Updated some obsolete comments.

  • dom/DocumentMarkerController.cpp: Removed include of "Range.h".

(WebCore::DocumentMarkerController::collectTextRanges): Change return value
to return a structure with a node and an offset range rather than using a
SimpleRange; adds clarity to the fact that it's guranteed to be only a
single node. May even want to consider some day moving TextIterator over
to this, but it's definitely better here for now.
(WebCore::DocumentMarkerController::addMarker): Updated for the change to
collectTextRanges and to DocumentMarker construction, and to use construction
syntax that doesn't repeat the DocumentMarker class name. Deleted overloads
that are no longer needed.
(WebCore::DocumentMarkerController::addMarkerToNode): Ditto.
(WebCore::DocumentMarkerController::addTextMatchMarker): Ditto.
(WebCore::DocumentMarkerController::addDictationPhraseWithAlternativesMarker): Deleted.
(WebCore::DocumentMarkerController::addDictationResultMarker): Deleted.
(WebCore::DocumentMarkerController::addDraggedContentMarker): Updated as above.
(WebCore::DocumentMarkerController::addPlatformTextCheckingMarker): Deleted.
(WebCore::DocumentMarkerController::copyMarkers): Fix a mistake where copying
markers would have a side effect of modifying the original.
(WebCore::DocumentMarkerController::removeMarkers): Just have this call
filterMarkers with null for the function.
(WebCore::DocumentMarkerController::filterMarkers): Updated for the change to
collectTextRanges and to pass a OffsetRange.
(WebCore::updateRenderedRectsForMarker): Use SimpleRange instead of a live
range. Use the new RenderObject::absoluteTextQuads and boundingBoxes functions
to make this clearer and simpler.
(WebCore::shouldInsertAsSeparateMarker): Update for changes to DocumentMarker.
(WebCore::DocumentMarkerController::copyMarkers): Take an OffsetRange instead
of a start and length. Also removed the unused "delta" argument since all
callers were passing 0.
(WebCore::DocumentMarkerController::removeMarkers): Removed unneeded
check if a key is still in the map.
(WebCore::DocumentMarkerController::forEach): Added. Shared logic for the multiple
functions that iterate the markers covered by a SimpleRange.
(WebCore::DocumentMarkerController::markersInRange): Call forEach.
(WebCore::DocumentMarkerController::repaintMarkers): Simplified loops.
(WebCore::DocumentMarkerController::setMarkersActive): Deleted. Was only
used for Chromium and has been dead code since.
(WebCore::DocumentMarkerController::hasMarkers): Call forEach.
(WebCore::DocumentMarkerController::clearDescriptionOnMarkersIntersectingRange):
Call forEach.

  • dom/DocumentMarkerController.h: Updated for the above.
  • dom/Element.cpp:

(WebCore::Element::boundsInRootViewSpace): Use unitedBoundingBoxes.
(WebCore::Element::absoluteEventBounds): Ditto.
(WebCore::Element::boundingAbsoluteRectWithoutLayout): Ditto.

  • dom/Node.h: Added inline fast path for isCharacterDataNode.

Moved some inline function bodies out of class definition so it's
easier to read it and get an overview.

  • dom/Range.cpp:

(WebCore::Range::absoluteRectsForRangeInText const): Use boundingBoxes.
(WebCore::Range::absoluteTextQuads const): Deleted.
(WebCore::Range::borderAndTextRects const): Use boundingBoxes.

  • dom/Range.h: Deleted absoluteTextQuads.
  • dom/RenderedDocumentMarker.h: Use rvalue references and move.
  • dom/SimpleRange.cpp:

(WebCore::fastIsCharacterData): Deleted. Moved the optimizations into
Node::isCharacterDataNode so now all callers get them.
(WebCore::length): Deleted. Moved to Node::length.
(WebCore::makeBoundaryPointAfterNodeContents): Use Node::length.
(WebCore::IntersectingNodeRange::first const): Added.
(WebCore::IntersectingNodeRange::sentinel const): Added.
(WebCore::characterDataOffsetRange): Added.
(WebCore::IntersectingNodeIterator::operator++): Added.

  • dom/SimpleRange.h: Added intersectingNodes function, and the

IntersectingNodeRange and IntersectingNodeIterator classes used
to make it work. Added the OffsetRange structure and the
characterDataOffsetRange function, also to help with iteration.

  • editing/AlternativeTextController.cpp:

(WebCore::AlternativeTextController::respondToMarkerAtEndOfWord):
Take out unneeded holds_alternative check.
(WebCore::AlternativeTextController::removeDictationAlternativesForMarker):
Removed unneeded assertion.
(WebCore::AlternativeTextController::dictationAlternativesForMarker):
Removed unneeded assertion.
(WebCore::AlternativeTextController::applyDictationAlternative):
Removed unneeded local variables.
(WebCore::AlternativeTextController::show): Pass reference to range
rather than pointer to rootViewRectForRange.
(WebCore::AlternativeTextController::timerFired): Ditto.
(WebCore::AlternativeTextController::rootViewRectForRange const):
Take a SimpleRange instead of a live range. Also use
RenderObject::absoluteTextQuads and unitedBoundingBoxes.

  • editing/AlternativeTextController.h: Updated for above.
  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
Removed most of the code since we can copy marker data without
separate code for each type. Also use SimpleRange instead of a live range.

  • editing/DictationCommand.cpp: Call addMarker instead of

addMarkerToNode.

  • editing/Editing.cpp:

(WebCore::visiblePositionForIndexUsingCharacterIterator): Use
SimpleRange instead of a live range.

  • editing/Editor.cpp:

(WebCore::Editor::updateMarkersForWordsAffectedByEditing):
Removed a local variable.

  • editing/Editor.h: Remove use of RetainPtr<id> for arguments.
  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::getTextRectangles const): Deleted.
(WebCore::FrameSelection::getClippedVisibleTextRectangles const):
Merged the logic from getTextRectangles in here, and changed to
use RenderObject::absoluteTextQuads and boundingBoxes.

  • editing/FrameSelection.h: Updated for above.
  • editing/SplitTextNodeCommand.cpp:

(WebCore::SplitTextNodeCommand::doApply): Updated for changes to
the copyMarkers function.
(WebCore::SplitTextNodeCommand::doUnapply): Ditto.

  • editing/cocoa/DataDetection.mm:

(WebCore::detectItemAtPositionWithRange): Use
RenderObject::absoluteTextQuads and unitedBoundingBoxes.

  • editing/ios/DictationCommandIOS.cpp:

(WebCore::DictationCommandIOS::DictationCommandIOS): Remove use of
RetainPtr<id> for arguments.
(WebCore::DictationCommandIOS::create): Move from header.
(WebCore::DictationCommandIOS::doApply): Updated to do the work here
since we don't have addDictationPhraseWithAlternativesMarker any more.
Specifically, remove the first interpretation, which leaves behind a
vector of alternatives. Same for addDictationResultMarker.

  • editing/ios/DictationCommandIOS.h: Updated for the above.
  • editing/ios/EditorIOS.mm:

(WebCore::Editor::insertDictationPhrases): Take id instead of
RetainPtr<id>.
(WebCore::Editor::setDictationPhrasesAsChildOfElement): Changed
around since we don't have addDictationPhraseWithAlternativesMarker
or addDictationResultMarker any more.

  • page/FrameView.cpp:

(WebCore::FrameView::paintContents): Update for changes to
SetLayoutNeededForbiddenScope.

  • page/ios/FrameIOS.mm:

(WebCore::Frame::interpretationsForCurrentRoot const):
Get alternatives directly from DocumentMarker::data, now that
there is not a separate DocumentMarker::alternatives function.

  • page/mac/ServicesOverlayController.mm:

(WebCore::textQuadsToBoundingRectForRange): Deleted.
(WebCore::ServicesOverlayController::buildPhoneNumberHighlights):
Use RenderObject::absoluteTextQuads, unitedBoundingBoxes,
and enclosingIntRect to do what textQuadsToBoundingRectForRange did.

  • platform/SerializedPlatformDataCueValue.h: Remove definition of

id since that's now done in RetainPtr.h.

  • platform/graphics/FloatQuad.cpp:

(WebCore::boundingBoxes): Added.
(WebCore::unitedBoundingBoxes): Added.

  • platform/graphics/FloatQuad.h: A couple tweaks, plus declared the

functions above.

  • platform/network/ResourceHandle.h: Remove definition of

id since that's now done in RetainPtr.h.

  • platform/network/cf/AuthenticationChallenge.h: Ditto.
  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::resolveStyleForMarkedText): Take out
isActiveMatch logic that was used for Chromium only.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::minPreferredLogicalWidth const): Update for
changes to SetLayoutNeededForbiddenScope.
(WebCore::RenderBox::maxPreferredLogicalWidth const): Ditto.

  • rendering/RenderCounter.cpp:

(WebCore::RenderCounter::computePreferredLogicalWidths): Ditto.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::paintIntoLayer): Ditto.

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::SetLayoutNeededForbiddenScope::SetLayoutNeededForbiddenScope):
Changed to take a const& instead of a *.
(WebCore::RenderObject::SetLayoutNeededForbiddenScope::~SetLayoutNeededForbiddenScope):
Ditto.
(WebCore::RenderObject::markContainingBlocksForLayout): Update for
changes to SetLayoutNeededForbiddenScope.
(WebCore::RenderObject::absoluteBoundingBoxRect const): Use
unitedBoundingBoxes and enclosingIntRect.
(WebCore::RenderObject::absoluteBoundingBoxRectForRange): Use
the new RenderObject::absoluteTextQuads and unitedBoundingBoxes.
(WebCore::RenderObject::absoluteTextQuads): Added. Moved here from
Range::absoluteTextQuads, but refactored for simplicity and removed
the unused, and mildly complex to implement, feature that would
indicate whether some or all of the quads were from fixed positioning.

  • rendering/RenderObject.h: Tweaked comments. Moved multi-line function

bodies out of the RenderObject class definition to make it easier to
read. Declared a new absoluteTextQuads function. Made
m_setNeedsLayoutForbidden so setNeedsLayoutIsForbidden can be const.
Conditionalized isSetNeedsLayoutForbidden and SetLayoutNeededForbiddenScope
so both can be used in production builds but expand to no code.

  • rendering/RenderReplaced.cpp:

(WebCore::draggedContentContainsReplacedElement): Simplified and updated
now that the dragged content data no longer has its own named structure.
(WebCore::RenderReplaced::paint): Update for changes to
SetLayoutNeededForbiddenScope.

  • rendering/RenderTableSection.cpp:

(WebCore::RenderTableSection::calcRowLogicalHeight): Ditto.
(WebCore::RenderTableSection::layoutRows): Ditto.

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::textSearchHighlightColor const): Removed the Chromium-only
concept of active vs. inactive text search highlight colors.
(WebCore::RenderTheme::platformTextSearchHighlightColor const): Ditto.
(WebCore::RenderTheme::activeTextSearchHighlightColor const): Deleted.
(WebCore::RenderTheme::inactiveTextSearchHighlightColor const): Deleted.
(WebCore::RenderTheme::platformActiveTextSearchHighlightColor const): Deleted.
(WebCore::RenderTheme::platformInactiveTextSearchHighlightColor const): Deleted.

  • rendering/RenderTheme.h: Ditto.
  • rendering/RenderThemeMac.h: Ditto.
  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::platformTextSearchHighlightColor const): Ditto.
(WebCore::RenderThemeMac::platformActiveTextSearchHighlightColor const): Deleted.
(WebCore::RenderThemeMac::platformInactiveTextSearchHighlightColor const): Deleted.

  • testing/Internals.cpp:

(WebCore::Internals::addTextMatchMarker): Deleted. Was only used for a test
of Chromium-specific scroll tick marks.

  • testing/Internals.h: Deleted addTextMatchMarker.
  • testing/Internals.idl: Ditto.

Source/WebKit:

  • UIProcess/ViewSnapshotStore.h: Removed unused "Cocoa without IOSurface" code paths.
  • UIProcess/mac/ViewSnapshotStoreMac.mm:

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

  • WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.mm:

(WebKit::TextCheckingControllerProxy::replaceRelativeToSelection): Updated since
addPlatformTextCheckingMarker no longer exists.
(WebKit::TextCheckingControllerProxy::removeAnnotationRelativeToSelection):
Updated since filterMarkers passes a reference instead of a pointer now.
(WebKit::TextCheckingControllerProxy::annotatedSubstringBetweenPositions):
Simplified code a bit by removing local variables.

  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:

(WebKit::WebPage::dictionaryPopupInfoForRange): Use
RenderObject::absoluteTextQuads.

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::performImmediateActionHitTestAtLocation): Use
RenderObject::absoluteTextQuads and unitedBoundingBoxes.

Source/WebKitLegacy/ios:

  • WebCoreSupport/WebFrameIOS.mm:

(-[WebFrame previousUnperturbedDictationResultBoundaryFromPosition:]):
Update since DocumentMarker::metadata no longer exists.
(-[WebFrame nextUnperturbedDictationResultBoundaryFromPosition:]):
Ditto.

  • WebCoreSupport/WebVisiblePosition.mm:

(-[WebVisiblePosition enclosingRangeWithDictationPhraseAlternatives:]):
Update since DocumentMarker::alternatives no longer exists.
(-[WebVisiblePosition enclosingRangeWithCorrectionIndicator]):
Ditto.

Source/WebKitLegacy/mac:

  • DOM/DOM.mm:

(-[DOMNode absoluteQuadAndInsideFixedPosition:]): Use unitedBoundingBoxes.

  • WebCoreSupport/WebEditorClient.mm:

(WebEditorClient::handleRequestedCandidates): Use RenderObject::absoluteTextQuads.

  • WebView/WebFrame.mm:

(-[WebFrame getDictationResultRanges:andMetadatas:]): Updated since DocumentMarker no
longer has a dedicated metadata member function.
(-[WebFrame dictationResultMetadataForRange:]):

  • WebView/WebImmediateActionController.mm:

(+[WebImmediateActionController _dictionaryPopupInfoForRange:inFrame:withLookupOptions:indicatorOptions:transition:]):
Use RenderObject::absoluteTextQuads.

Source/WTF:

  • wtf/RetainPtr.h: Define "id" here when compiling non-ObjC so it's easier to use

RetainPtr<id> in any header file. Lets us stop doing this many other places.
Harmless when not needed.

Tools:

  • TestWebKitAPI/Tests/WebCore/MarkedText.cpp:

(TestWebKitAPI::TEST): Update for change to DocumentMarker constructor.

LayoutTests:

  • fast/scrolling/scrollbar-tickmarks-hittest-expected.txt: Removed.
  • fast/scrolling/scrollbar-tickmarks-hittest.html: Removed.
  • fast/scrolling/scrollbar-tickmarks-styled-expected.txt: Removed.
  • fast/scrolling/scrollbar-tickmarks-styled.html: Removed.
  • platform/gtk/fast/scrolling/scrollbar-tickmarks-styled-expected.png: Removed.
  • platform/ios/TestExpectations: Removed expectation for scrollbar-tickmarks.

These were Chromium-specific tests.

  • platform/mac-wk1/TestExpectations: Updated to expect flakiness instead of

repeatable failures for tests that passed locally.

  • platform/mac/TestExpectations: Ditto.
10:01 AM Changeset in webkit [259574] by Jonathan Bedard
  • 2 edits in trunk/Tools

run-api-tests spew "setup_environ_for_server" in verbose mode
https://bugs.webkit.org/show_bug.cgi?id=210012
<rdar://problem/61306056>

Reviewed by Aakash Jain.

  • Scripts/webkitpy/port/ios_simulator.py:

(IOSSimulatorPort.setup_environ_for_server): Do not log this function when called.

9:54 AM Changeset in webkit [259573] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

Add syscall to the WebContent sandbox
https://bugs.webkit.org/show_bug.cgi?id=210048

Reviewed by Brent Fulgham.

Add a required syscall to the WebContent sandbox on iOS and macOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebProcess/com.apple.WebProcess.sb.in:
8:41 AM Changeset in webkit [259572] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Put ensureStillAliveHere for Integer TypedArrays in GetByVal
https://bugs.webkit.org/show_bug.cgi?id=210047

Reviewed by Mark Lam.

While r258381 puts ensureStillAliveHere in FTL to keep base alive for float/double TypedArrays,
we need to do the same thing for integer TypedArrays too. This patch places it.

  • ftl/FTLLowerDFGToB3.cpp:

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

8:33 AM Changeset in webkit [259571] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

Remove instance fields and methods from StyleColor
https://bugs.webkit.org/show_bug.cgi?id=210045

Reviewed by Zalan Bujtas.

They are unused. The type itself remains as a namespace for static functions.
We might want bring it back later but there is no need to leave dead code around now.

  • css/StyleColor.h:

(WebCore::StyleColor::StyleColor): Deleted.
(WebCore::StyleColor::currentColor): Deleted.
(WebCore::StyleColor::isCurrentColor const): Deleted.
(WebCore::StyleColor::getColor const): Deleted.
(WebCore::StyleColor::resolve const): Deleted.
(WebCore::operator==): Deleted.
(WebCore::operator!=): Deleted.

8:27 AM Changeset in webkit [259570] by Jacob Uphoff
  • 3 edits in trunk/LayoutTests

[ macOS debug ] REGRESSION (r259463): http/tests/media/clearkey/collect-webkit-media-session.html is failing
https://bugs.webkit.org/show_bug.cgi?id=209989

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
  • platform/mac-wk2/TestExpectations:
8:16 AM Changeset in webkit [259569] by graouts@webkit.org
  • 2 edits in trunk/Tools

[macOS] TestWebKitAPI.WKUserContentController.UserStyleSheetAffectingOnlySpecificWebViewSharedConfiguration is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=209934
<rdar://problem/61229832>

Reviewed by Antti Koivisto.

Fix a couple of tests which would use -[WKWebView _test_waitForDidFinishNavigation] in a way where the navigation may have finished before the method was called.

  • TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm:

(TEST):

2:57 AM Changeset in webkit [259568] by youenn@apple.com
  • 16 edits
    1 copy
    1 add in trunk/Source

Add HEVC support in GPU Process for WebRTC
https://bugs.webkit.org/show_bug.cgi?id=209857

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

  • Configurations/libwebrtc.iOS.exp:
  • Configurations/libwebrtc.iOSsim.exp:
  • Configurations/libwebrtc.mac.exp:
  • Source/webrtc/sdk/WebKit/WebKitDecoder.h: Copied from Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitUtilities.h.
  • Source/webrtc/sdk/WebKit/WebKitDecoder.mm: Added.

(-[WK_RTCLocalVideoH264H265Decoder initH264DecoderWithCallback:]):
(-[WK_RTCLocalVideoH264H265Decoder initH265DecoderWithCallback:]):
(-[WK_RTCLocalVideoH264H265Decoder decodeData:size:timeStamp:]):
(-[WK_RTCLocalVideoH264H265Decoder releaseDecoder]):
(webrtc::videoDecoderCallbacks):
(webrtc::setVideoDecoderCallbacks):
(webrtc::RemoteVideoDecoder::RemoteVideoDecoder):
(webrtc::RemoteVideoDecoder::decodeComplete):
(webrtc::RemoteVideoDecoder::InitDecode):
(webrtc::RemoteVideoDecoder::Decode):
(webrtc::RemoteVideoDecoder::RegisterDecodeCompleteCallback):
(webrtc::RemoteVideoDecoder::Release):
(webrtc::RemoteVideoDecoderFactory::RemoteVideoDecoderFactory):
(webrtc::RemoteVideoDecoderFactory::GetSupportedFormats const):
(webrtc::RemoteVideoDecoderFactory::CreateVideoDecoder):
(webrtc::createWebKitDecoderFactory):
(webrtc::createLocalH264Decoder):
(webrtc::createLocalH265Decoder):
(webrtc::releaseLocalDecoder):
(webrtc::decodeFrame):

  • Source/webrtc/sdk/WebKit/WebKitEncoder.mm:

(-[WK_RTCLocalVideoH264H265Encoder initWithCodecInfo:]):
(-[WK_RTCLocalVideoH264H265Encoder setCallback:]):
(-[WK_RTCLocalVideoH264H265Encoder releaseEncoder]):
(-[WK_RTCLocalVideoH264H265Encoder startEncodeWithSettings:numberOfCores:]):
(-[WK_RTCLocalVideoH264H265Encoder encode:codecSpecificInfo:frameTypes:]):
(-[WK_RTCLocalVideoH264H265Encoder setBitrate:framerate:]):
(webrtc::createLocalEncoder):
(webrtc::releaseLocalEncoder):
(webrtc::initializeLocalEncoder):
(webrtc::encodeLocalEncoderFrame):
(webrtc::setLocalEncoderRates):

  • Source/webrtc/sdk/WebKit/WebKitUtilities.h:

(): Deleted.

  • Source/webrtc/sdk/WebKit/WebKitUtilities.mm:

(webrtc::videoDecoderCallbacks): Deleted.
(webrtc::setVideoDecoderCallbacks): Deleted.
(webrtc::RemoteVideoDecoder::RemoteVideoDecoder): Deleted.
(webrtc::RemoteVideoDecoder::decodeComplete): Deleted.
(webrtc::RemoteVideoDecoder::InitDecode): Deleted.
(webrtc::RemoteVideoDecoder::Decode): Deleted.
(webrtc::RemoteVideoDecoder::RegisterDecodeCompleteCallback): Deleted.
(webrtc::RemoteVideoDecoder::Release): Deleted.
(webrtc::RemoteVideoDecoderFactory::RemoteVideoDecoderFactory): Deleted.
(webrtc::RemoteVideoDecoderFactory::GetSupportedFormats const): Deleted.
(webrtc::RemoteVideoDecoderFactory::CreateVideoDecoder): Deleted.
(webrtc::createWebKitDecoderFactory): Deleted.
(webrtc::createLocalDecoder): Deleted.
(webrtc::releaseLocalDecoder): Deleted.
(webrtc::decodeFrame): Deleted.

  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH265.h:
  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH265.mm:

(-[RTCVideoDecoderH265 decode:missingFrames:codecSpecificInfo:renderTimeMs:]):
(-[RTCVideoDecoderH265 decodeData:size:timeStamp:]):

  • libwebrtc.xcodeproj/project.pbxproj:

Source/WebKit:

  • GPUProcess/webrtc/LibWebRTCCodecsProxy.h:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.messages.in:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:

(WebKit::LibWebRTCCodecsProxy::createH264Decoder):
(WebKit::LibWebRTCCodecsProxy::createH265Decoder):
(WebKit::LibWebRTCCodecsProxy::createEncoder):
(WebKit::LibWebRTCCodecsProxy::createDecoder): Deleted.

  • WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:

(WebKit::createVideoDecoder):
(WebKit::createVideoEncoder):
(WebKit::LibWebRTCCodecs::createDecoder):
(WebKit::formatNameFromCodecType):
(WebKit::LibWebRTCCodecs::createEncoder):

  • WebProcess/GPU/webrtc/LibWebRTCCodecs.h:
1:03 AM Changeset in webkit [259567] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

CanvasRenderingContext2D.drawImage should ignore the EXIF orientation if the image-orientation is none
https://bugs.webkit.org/show_bug.cgi?id=209849

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-04-06
Reviewed by Darin Adler.

Source/WebCore:

drawImage() will get the image-orientation of the HTMLImageElement from
its computed style. This will be passed to GraphicsContext::drawImage()
in the ImagePaintingOptions. Previously we were passing FromImage always.

Test: fast/images/image-orientation-none-canvas.html

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::drawImage):

  • html/canvas/CanvasRenderingContext2DBase.h:

LayoutTests:

  • fast/images/image-orientation-none-canvas-expected.html: Added.
  • fast/images/image-orientation-none-canvas.html: Added.

Apr 5, 2020:

11:04 PM Changeset in webkit [259566] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Remove code that has no effect from loadURL
https://bugs.webkit.org/show_bug.cgi?id=210029

Patch by Rob Buis <rbuis@igalia.com> on 2020-04-05
Reviewed by Darin Adler.

Remove setDomainForCachePartition from loadURL since it will be
overwritten in DocumentLoader::loadMainResource, this was
introduced by r213126.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadURL):

11:02 PM Changeset in webkit [259565] by Ross Kirsling
  • 4 edits in trunk

DLLLauncherMain print to console instead of opening window on fatal error
https://bugs.webkit.org/show_bug.cgi?id=206537

Reviewed by Fujii Hironori.

Source/JavaScriptCore:

  • shell/DLLLauncherMain.cpp:

(fatalError):

Tools:

  • win/DLLLauncher/DLLLauncherMain.cpp:

(fatalError):

9:34 PM Changeset in webkit [259564] by Ross Kirsling
  • 5 edits
    1 add in trunk

JSC shell shouldn't treat NUL as a terminator when printing a JS string
https://bugs.webkit.org/show_bug.cgi?id=210037

Reviewed by Darin Adler.

JSTests:

  • .gitattributes:
  • ChakraCore.yaml:
  • ChakraCore/test/es5/hasItem.baseline-jsc: Added.

Update baseline and mark it diffable (as plaintext) in spite of containing \0.

Source/JavaScriptCore:

Since JS strings aren't null-terminated, it's probably a better experience to not stop printing when we see \0.
That is, 'abc\0def' should be printed as abcdef and not abc.

This patch updates our printing of evaluation results as well as the print / printErr / debug functions.

  • jsc.cpp:

(printInternal):
(functionDebug):
(runInteractive):

9:22 PM Changeset in webkit [259563] by don.olmstead@sony.com
  • 6 edits in trunk

[CMake] Use WEBKIT_EXECUTABLE in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=206894

Reviewed by Adrian Perez de Castro.

.:

Add a MiniBrowser derived sources directory.

  • Source/cmake/WebKitFS.cmake:

Tools:

Modify CMake ports to use WEBKIT_EXECUTABLE when creating their respective
MiniBrowsers.

  • MiniBrowser/gtk/CMakeLists.txt:
  • MiniBrowser/win/CMakeLists.txt:
  • MiniBrowser/wpe/CMakeLists.txt:
9:14 PM Changeset in webkit [259562] by Manuel Rego Casasnovas
  • 11 edits
    2 adds in trunk

Computed style for "outline-offset" is wrong when "outline-style" is "none"
https://bugs.webkit.org/show_bug.cgi?id=209913

Reviewed by Daniel Bates.

LayoutTests/imported/w3c:

Imported css/css-ui/parsing/outline-offset-computed.html from WPT.
And update baselines for web-animations tests.

  • web-platform-tests/css/css-ui/parsing/outline-offset-computed-expected.txt: Added.
  • web-platform-tests/css/css-ui/parsing/outline-offset-computed.html: Added.
  • web-platform-tests/css/css-ui/parsing/w3c-import.log:
  • web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:

Source/WebCore:

Computed style for outline-offset was not returning the proper value
if "outline-style" was "none".
This was due to a check in RenderStyle::outlineOffset()
that this patch removes.

This code could be there because this is needed for "outline-width"
as specified in the spec (https://drafts.csswg.org/css-ui/#outline-props),
however there's nothing about this on the "outline-offset" property.

Test: imported/w3c/web-platform-tests/css/css-ui/parsing/outline-offset-computed.html

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::outlineOffset const):

LayoutTests:

Update baselines for web-animations tests.

  • platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:
9:02 PM Changeset in webkit [259561] by Peng Liu
  • 4 edits in trunk/Source/WebCore

The value of [AVPlayerViewController isPictureInPicturePossible] is NO in the first attempt to enter PiP
https://bugs.webkit.org/show_bug.cgi?id=204979

Reviewed by Darin Adler.

We should use "#if HAVE(AVOBSERVATIONCONTROLLER)" instead of
"#if HAVE(HAVE_AVOBSERVATIONCONTROLLER)".

Source/WebCore:

  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(-[WebAVPlayerViewController initWithFullscreenInterface:]):
(VideoFullscreenInterfaceAVKit::doEnterFullscreen):

Source/WebCore/PAL:

  • pal/spi/cocoa/AVKitSPI.h:
8:02 PM Changeset in webkit [259560] by don.olmstead@sony.com
  • 16 edits
    1 copy in trunk

[CMake] Add WebKit::WebKit target
https://bugs.webkit.org/show_bug.cgi?id=210033

Reviewed by Fujii Hironori.

.:

Use SET_AND_EXPOSE_TO_BUILD for the Plugin process since ENABLE(PLUGIN_PROCESS)
is used in the source code.

  • Source/cmake/OptionsGTK.cmake:

Source/WebKit:

Use WEBKIT_EXECUTABLE macros for the Process executables. Rename the output
file names to fit with the macro's expectations.

Add Headers.cmake which lists out all the public headers that are currently
shared by the PlayStation and Windows ports. This is then included on each
platform that is using it. Additionally use WEBKIT_COPY_FILES to create a
target which copies headers.

Finally use WEBKIT_FRAMEWORK_TARGET to create a WebKit target. Its dependent
on the WebKit library itself, the processes being built, and any headers that
are copied. This ensures that everything is built for dependent targets.

  • CMakeLists.txt:
  • Headers.cmake: Copied from Source/WebKit/PlatformPlayStation.cmake.
  • PlatformFTW.cmake:
  • PlatformGTK.cmake:
  • PlatformMac.cmake:
  • PlatformPlayStation.cmake:
  • PlatformWPE.cmake:
  • PlatformWin.cmake:

Tools:

Use the WebKit::WebKit target for MiniBrowser and TestWebKit. This removes
the need to have WebProcess and NetworkProcess as dependencies since they are
attached to the WebKit::WebKit target.

Remove references to WebKitFrameworkHeaders as it is now WebKit_CopyHeaders.
It is also a dependency of WebKit::WebKit so it does not need to be listed
as a dependency.

  • MiniBrowser/win/CMakeLists.txt:
  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/PlatformPlayStation.cmake:
  • TestWebKitAPI/PlatformWin.cmake:
  • WebKitTestRunner/CMakeLists.txt:
5:28 PM Changeset in webkit [259559] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

Address review comments after r259550
https://bugs.webkit.org/show_bug.cgi?id=208472

Reviewed by Darin Adler.

  • platform/ios/ValidationBubbleIOS.mm:

Change a few named constants to be constexpr instead, and add comments describing their purpose.

(label):
(updateLabelFrame):

Rename these helper functions and move them up the file. Turn what was previously named
WebValidationBubbleViewController_labelFrame into updateLabelFrame, and have it additionally update the
view controller's label's frame to avoid repeating this logic in the subclassed method implementations below.

(callSuper):
(WebValidationBubbleViewController_viewDidLoad):
(WebValidationBubbleViewController_viewWillLayoutSubviews):
(WebValidationBubbleViewController_viewSafeAreaInsetsDidChange):
(allocWebValidationBubbleViewControllerInstance):

Instead of using -valueForKey, use objc_getAssociatedObject and objc_setAssociatedObject, with
OBJC_ASSOCIATION_RETAIN_NONATOMIC.

(WebCore::ValidationBubble::ValidationBubble):
(invokeUIViewControllerSelector): Deleted.
(WebValidationBubbleViewController_dealloc): Deleted.

Remove the -dealloc override. We don't need this anymore, since we're now using associated objects with
OBJC_ASSOCIATION_RETAIN_NONATOMIC to hold on to and keep track of our label.

(WebValidationBubbleViewController_labelFrame): Deleted.
(WebValidationBubbleViewController_label): Deleted.

4:25 PM Changeset in webkit [259558] by ysuzuki@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Putting "memory" back to ensureStillAliveHere
https://bugs.webkit.org/show_bug.cgi?id=210028

Reviewed by Keith Miller.

We put "memory" back to make ensureStillAliveHere compiler-barrier.

  • runtime/EnsureStillAliveHere.h:

(JSC::ensureStillAliveHere):

  • runtime/JSCJSValue.h:

(JSC::ensureStillAliveHere):

4:23 PM Changeset in webkit [259557] by Simon Fraser
  • 8 edits in trunk/Source/WebCore

Make RenderObject TextStream-loggable
https://bugs.webkit.org/show_bug.cgi?id=210035

Reviewed by Zalan Bujtas.

Add operator<<(TextStream, const RenderObject&) and add virtual debugDescription() functions on
Node and RenderObject which should eventually replace the awkward formatForDebugger(char* buffer, unsigned length).

Convert RenderLayer to use renderer's debug description.

  • dom/Element.cpp:

(WebCore::Element::debugDescription const):

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

(WebCore::Node::debugDescription const):
(WebCore::operator<<):

  • dom/Node.h:
  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::name const):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::debugDescription const):
(WebCore::operator<<):

  • rendering/RenderObject.h:
3:59 PM Changeset in webkit [259556] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

ARM64 moveConditionallyDouble() for DoubleNotEqualAndOrdered is wrong.
https://bugs.webkit.org/show_bug.cgi?id=210039
<rdar://problem/61321778>

Reviewed by Yusuke Suzuki.

For the scenario where the dest register is same as the then case register, there
is one csel instruction that should be checking the overflow condition to test
for unordered operands. Instead, we were testing for the not equal condition.
This patch fixes it to check for the overflow condition.

This bug was caught by testmasm.

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::moveConditionallyAfterFloatingPointCompare):

3:01 PM Changeset in webkit [259555] by ddkilzer@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Sort JavaScriptCore Xcode project file

file to try to force buildbots to rebuild and resign
JavaScriptCore.framework. Some bots are stuck with a codesign
error after r259545.

11:23 AM Changeset in webkit [259554] by keith_miller@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

ensureStillAliveHere can take the value in any location
https://bugs.webkit.org/show_bug.cgi?id=210028

Reviewed by Mark Lam.

It shouldn't matter if the value is on the stack or in a register
because we're not going to do anything with it. Also, there's no
reason to clobber memory.

  • runtime/EnsureStillAliveHere.h:

(JSC::ensureStillAliveHere):

11:21 AM Changeset in webkit [259553] by zandobersek@gmail.com
  • 9 edits in trunk/Source

Unreviewed, adding missing header inclusions to get
non-unified build building.

Source/JavaScriptCore:

  • heap/HeapSnapshotBuilder.h:
  • tools/Integrity.h:

Source/WebCore:

  • html/HTMLCanvasElement.cpp:
  • loader/ResourceLoadNotifier.h:
  • workers/service/ServiceWorkerProvider.h:

Source/WebKit:

  • Shared/UserContentControllerParameters.cpp:
11:11 AM Changeset in webkit [259552] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Change s_entropyBitsShiftForStructurePointer to 48 bits.
https://bugs.webkit.org/show_bug.cgi?id=210022
<rdar://problem/61310696>

Reviewed by Keith Miller.

This is ok because the top 16 bits of the 64-bit address is not used. We can
fill out the top 16-bits of the encodedStructureBits with the lowest 16-bits of
the StructureID (which includes the 7-bits of entropy).

  • runtime/StructureIDTable.h:
9:49 AM Changeset in webkit [259551] by dbates@webkit.org
  • 4 edits in trunk/Tools

RequestTextInputContext.Simple iframe sub-tests may sometimes fail
https://bugs.webkit.org/show_bug.cgi?id=210010
<rdar://problem/61303697>

Reviewed by Simon Fraser and Darin Adler.

Make the iframe sub tests wait until the DOM Load event has fired in the main frame.
When it fires this means that all immediate child frames (like the one added by these
sub tests) have fired their DOM Load event. This ensures deterministic results.

Also while I am here, extract out the iframe sub-tests into their own TEST() method
for testing and debugging convenience. I also fixed up -performAfterLoading so that
it wouldn't leak the user script string and made it work if called more than once in the
same TEST() by caching this script and only adding it to the user content controller
once. Moreover, removed duplication by writing it in terms of -performAfterReceivingMessage.

  • TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm:

(TEST):
(webViewLoadHTMLStringAndWaitForDOMLoadEvent): Helper function to load an HTML string
into a web view and wait until a DOM Load event is fired at the main frame.

  • TestWebKitAPI/cocoa/TestWKWebView.h:
  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(-[TestWKWebView performAfterLoading:]): Modernized and simplified. Modified user script
to use addEventListener() instead of onload as the latter overrides any existing load handler.
This user script is also added only to the main frame since all existing callers just
want to know that all main frame and immediate child frames loaded. Also listen for the load
event during the capture phase, which is a tiny bit faster to receive, instead of the bubbling
phase. See second paragraph above for more details on the changes I made to this function.

9:34 AM Changeset in webkit [259550] by Wenson Hsieh
  • 3 edits in trunk/Source/WebCore

[iOS] Ugly and misaligned form validation bubble
https://bugs.webkit.org/show_bug.cgi?id=208472
<rdar://problem/59984027>

Reviewed by Tim Horton.

In iOS 13, the view of a UIViewController that is presented as a popover encompasses the arrow (connected to
the popover) that points to the target rect. This means that our current logic for laying out the inner text
label of a form validation bubble on iOS no longer works, since it sets a frame that is offset vertically and
horizontally from the bounds of the view controller's view.

To fix this, we need to respect the safe area insets of the view controller's view when laying out the label.
The idiomatic way to do this is to subclass -viewSafeAreaInsetsDidChange and -viewWillLayoutSubviews on the view
controller, and update the subview's (i.e. label's) frame; unfortunately, since ValidationBubble is implemented
in WebCore, we can't explicitly link against UIKit, so we need to dynamically create a UIViewController subclass
and override these subclassing hooks to get our desired behavior.

  • platform/ValidationBubble.h:
  • platform/ios/ValidationBubbleIOS.mm:

(invokeUIViewControllerSelector):
(WebValidationBubbleViewController_dealloc):
(WebValidationBubbleViewController_viewDidLoad):
(WebValidationBubbleViewController_viewWillLayoutSubviews):
(WebValidationBubbleViewController_viewSafeAreaInsetsDidChange):
(WebValidationBubbleViewController_labelFrame):
(WebValidationBubbleViewController_label):
(allocWebValidationBubbleViewControllerInstance):

Subclass and create a custom UIViewController to ensure that the label is vertically centered in its popover.
See above for more details.

(WebCore::ValidationBubble::ValidationBubble):
(WebCore::ValidationBubble::show):

Minor style fixes: remove extraneous .get()s on RetainPtr, and use property syntax when possible.

(WebCore::ValidationBubble::setAnchorRect):

Additionally remove a line of code that currently forces the form validation popover to present below its target
rect (and therefore have an arrow pointing up). It wasn't apparent why this logic was added in r208361, but it
seems the intention wasn't to restrict the popover to presenting below the target.

This allows the form validation popover to show up in the case where the input element is aligned to the very
bottom of the web view, such that there isn't enough space below the field to show the validation bubble.

1:59 AM Changeset in webkit [259549] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] JSArrayIterator's size is wrong
https://bugs.webkit.org/show_bug.cgi?id=210020

Reviewed by Mark Lam.

Internal-size of JSArrayIterator should be 3, not 4.

  • runtime/JSArrayIterator.h:
1:41 AM Changeset in webkit [259548] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Rolling out r259545: causing CodeSigning error in jsc EWS bot.
https://bugs.webkit.org/show_bug.cgi?id=210018

Not reviewed.

1:34 AM Changeset in webkit [259547] by mark.lam@apple.com
  • 24 edits
    2 adds in trunk/Source/JavaScriptCore

Add some structureID integrity checks to various runtime functions.
https://bugs.webkit.org/show_bug.cgi?id=210015
<rdar://problem/58116514>

Reviewed by Keith Miller.

Specifically, implementations of toString(), toValue(), and a few others.
I also moved the HeapCell version of ensureStillAliveHere() into the new
EnsureStillAliveHere.h/cpp since it's useful for any pointers, not just HeapCells.

This change is performance neutral on JetStream 2.0, Speedometer-2, and PLT5.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • heap/HeapCell.cpp:

(JSC::ensureStillAliveHere): Deleted.

  • heap/HeapCell.h:

(JSC::ensureStillAliveHere): Deleted.

  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::appendJSCellOrAuxiliary):

  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncToString):

  • runtime/BigIntPrototype.cpp:

(JSC::bigIntProtoFuncToStringImpl):
(JSC::bigIntProtoFuncValueOf):

  • runtime/BooleanPrototype.cpp:

(JSC::booleanProtoFuncToString):
(JSC::booleanProtoFuncValueOf):

  • runtime/DatePrototype.cpp:

(JSC::formatLocaleDate):
(JSC::formateDateInstance):
(JSC::dateProtoFuncToISOString):
(JSC::dateProtoFuncToPrimitiveSymbol):

  • runtime/EnsureStillAliveHere.cpp: Added.

(JSC::ensureStillAliveHere):

  • runtime/EnsureStillAliveHere.h: Added.

(JSC::ensureStillAliveHere):

  • runtime/ErrorInstance.cpp:

(JSC::ErrorInstance::sanitizedToString):

  • runtime/ErrorPrototype.cpp:

(JSC::errorProtoFuncToString):

  • runtime/FunctionPrototype.cpp:

(JSC::functionProtoFuncToString):

  • runtime/JSCell.cpp:

(JSC::JSCell::toObjectSlow const):

  • runtime/NumberPrototype.cpp:

(JSC::toThisNumber):

  • runtime/ObjectPrototype.cpp:

(JSC::objectProtoFuncValueOf):
(JSC::objectProtoFuncToString):

  • runtime/RegExpPrototype.cpp:

(JSC::regExpProtoFuncToString):

  • runtime/StringPrototype.cpp:

(JSC::stringProtoFuncToString):

  • runtime/StructureIDTable.h:

(JSC::StructureIDTable::validate):
(JSC::StructureIDTable::isValid): Deleted.

  • runtime/SymbolPrototype.cpp:

(JSC::symbolProtoGetterDescription):
(JSC::symbolProtoFuncToString):
(JSC::symbolProtoFuncValueOf):

  • tools/Integrity.h:
  • tools/IntegrityInlines.h:

(JSC::Integrity::auditStructureID):

  • wasm/js/WebAssemblyGlobalPrototype.cpp:

(JSC::getGlobal):

1:12 AM Changeset in webkit [259546] by Alexey Shvayka
  • 10 edits in trunk

Octal escapes should be max 3 digits and syntax errors in Unicode patterns
https://bugs.webkit.org/show_bug.cgi?id=167067

Reviewed by Ross Kirsling.

JSTests:

  • test262/expectations.yaml: Mark 4 test cases as passing.

Source/JavaScriptCore:

This patch:

a) Adds SyntaxError for octal escapes in Unicode patterns, while preserving /\0/u
being parsed as null character escape. Grammar: https://tc39.es/ecma262/#prod-CharacterEscape

b) Limits consumeOctal() to 3 digits only, preventing it from consuming leading zeros.
Grammar: https://tc39.es/ecma262/#prod-annexB-LegacyOctalEscapeSequence

Both changes align JSC with V8 and SpiderMonkey.

  • yarr/YarrErrorCode.cpp:

(JSC::Yarr::errorMessage):
(JSC::Yarr::errorToThrow):

  • yarr/YarrErrorCode.h:
  • yarr/YarrParser.h:

(JSC::Yarr::Parser::parseEscape):
(JSC::Yarr::Parser::consumeOctal):

LayoutTests:

  • fast/regex/script-tests/pcre-test-1.js:
  • js/regexp-unicode-expected.txt:
  • js/script-tests/regexp-unicode.js:
Note: See TracTimeline for information about the timeline view.