Timeline



Jan 20, 2020:

11:21 PM Changeset in webkit [254844] by Diego Pino Garcia
  • 2 edits
    8 adds in trunk/LayoutTests

[GTK] Gardening, update TestExpectations and baselines
https://bugs.webkit.org/show_bug.cgi?id=206501

Unreviewed gardening.

  • platform/gtk/TestExpectations:
  • platform/gtk/compositing/visibility/visibility-change-in-subframe-expected.txt: Added.
  • platform/gtk/editing/input/scroll-to-edge-if-line-break-at-end-of-document-contenteditable-expected.txt: Added.
  • platform/gtk/fast/block/basic/fieldset-stretch-to-legend-expected.txt: Added.
  • platform/gtk/js/dom/navigator-maxtouchpoints-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/color-prop-02-f-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/color-prop-03-t-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/shapes-circle-02-t-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/shapes-ellipse-02-t-expected.txt: Added.
8:01 PM Changeset in webkit [254843] by weinig@apple.com
  • 40 edits in trunk

Platform.h is out of control Part 8: Macros are used inconsistently
https://bugs.webkit.org/show_bug.cgi?id=206425

Reviewed by Darin Adler.

Source/bmalloc:

  • bmalloc/BPlatform.h:

Update OS_EFFECTIVE_ADDRESS_WIDTH to match WTF definition, add needed OS macros.

Source/JavaScriptCore:

  • assembler/ARM64Assembler.h:

(JSC::ARM64Assembler::cacheFlush):
(JSC::ARM64Assembler::xOrSp):
(JSC::ARM64Assembler::xOrZr):

  • assembler/ARM64Registers.h:
  • assembler/ARMv7Assembler.h:

(JSC::ARMv7Assembler::cacheFlush):

  • assembler/ARMv7Registers.h:
  • assembler/AssemblerCommon.h:

(JSC::isDarwin):

  • b3/air/AirCCallingConvention.cpp:
  • jit/ExecutableAllocator.h:
  • jit/ThunkGenerators.cpp:
  • jsc.cpp:
  • runtime/MathCommon.cpp:

Use OS(DARWIN) more consistently for darwin level functionality.

  • bytecode/CodeOrigin.h:
  • runtime/JSString.h:

Update to use OS_CONSTANT.

  • disassembler/ARM64/A64DOpcode.cpp:
  • disassembler/ARM64Disassembler.cpp:
  • disassembler/UDis86Disassembler.cpp:
  • disassembler/UDis86Disassembler.h:
  • disassembler/X86Disassembler.cpp:
  • disassembler/udis86/udis86.c:
  • disassembler/udis86/udis86_decode.c:
  • disassembler/udis86/udis86_itab_holder.c:
  • disassembler/udis86/udis86_syn-att.c:
  • disassembler/udis86/udis86_syn-intel.c:
  • disassembler/udis86/udis86_syn.c:
  • interpreter/Interpreter.cpp:
  • interpreter/Interpreter.h:
  • interpreter/InterpreterInlines.h:

(JSC::Interpreter::getOpcodeID):

  • llint/LowLevelInterpreter.cpp:
  • tools/SigillCrashAnalyzer.cpp:

Switch to using ENABLE rather than USE for features internal to WebKit

Source/WTF:

Start addressing FIXMEs added to Platform.h (and helper files) during previous
cleanup work.

  • Renames WTF_CPU_EFFECTIVE_ADDRESS_WIDTH to WTF_OS_CONSTANT_EFFECTIVE_ADDRESS_WIDTH, making it available via new macro OS_CONSTANT(...), and syncs bmalloc redefinition.
  • Renames:

USE_LLINT_EMBEDDED_OPCODE_ID to ENABLE_LLINT_EMBEDDED_OPCODE_ID
USE_UDIS86 to ENABLE_UDIS86
USE_ARM64_DISASSEMBLER to ENABLE_ARM64_DISASSEMBLER

Enable is more appropriate here as these enable functionality within webkit.

  • Removes undefs that are no longer needed due to only defining the macro once now.
  • Removes dead defined(LP64) check after PLATFORM(MAC) macOS is always 64-bit these days.
  • wtf/Packed.h:

(WTF::alignof):

  • wtf/Platform.h:
  • wtf/PlatformEnable.h:
  • wtf/PlatformOS.h:
  • wtf/WTFAssertions.cpp:
  • wtf/text/StringCommon.h:

Tools:

  • TestWebKitAPI/Tests/WTF/Packed.cpp:

(TestWebKitAPI::TEST):
Update to use OS_CONSTANT.

7:48 PM Changeset in webkit [254842] by commit-queue@webkit.org
  • 9 edits
    1 add in trunk

Remove own toString from NativeError prototype
https://bugs.webkit.org/show_bug.cgi?id=204629

Patch by Gus Caplan <me@gus.host> on 2020-01-20
Reviewed by Ross Kirsling.

NativeError prototypes are expected to inherit toString from
Error.prototype. See https://github.com/tc39/ecma262/issues/1794
for additional details.

JSTests:

  • stress/nativeerror-prototype-tostring.js:

Source/JavaScriptCore:

  • runtime/ErrorPrototype.cpp:

(JSC::ErrorPrototypeBase::ErrorPrototypeBase):
(JSC::ErrorPrototypeBase::finishCreation):
(JSC::ErrorPrototype::ErrorPrototype):
(JSC::ErrorPrototype::create): Deleted.
(JSC::ErrorPrototype::finishCreation): Deleted.

  • runtime/ErrorPrototype.h:

(JSC::ErrorPrototype::createStructure): Deleted.

  • runtime/NativeErrorPrototype.cpp:

(JSC::NativeErrorPrototype::NativeErrorPrototype):

  • runtime/NativeErrorPrototype.h:

LayoutTests:

  • http/tests/security/regress-52192-expected.txt:
  • http/tests/security/regress-52192.html:
6:54 PM Changeset in webkit [254841] by commit-queue@webkit.org
  • 9 edits
    6 adds in trunk

EXIF orientation is ignored for some CSS images
https://bugs.webkit.org/show_bug.cgi?id=203355

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-01-20
Reviewed by Simon Fraser.

Source/WebCore:

Unlike GraphicsContext::drawNativeImage(), GraphicsContext::drawPattern()
can't change the coordinates system before drawing the image to respect
the EXIF orientation. Drawing a pattern tries to fill the destination
rectangle with the image according to the GraphicsContext origin and the
direction of its axes. So we need to create temporary NativeImage with
respecting the EXIF orientation and then use it to draw the pattern.

Tests: fast/images/exif-orientation-background-image-no-repeat.html

fast/images/exif-orientation-background-image-repeat.html
fast/images/exif-orientation-border-image.html

  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::nativeImageForCurrentFrameRespectingOrientation):
(WebCore::BitmapImage::drawPattern):

  • platform/graphics/BitmapImage.h:
  • platform/graphics/Image.h:

(WebCore::Image::nativeImage):
(WebCore::Image::nativeImageForCurrentFrameRespectingOrientation):
(WebCore::Image::nativeImageOfSize):

  • platform/graphics/ImageBuffer.h:
  • platform/graphics/cg/GraphicsContextCG.cpp:

(WebCore::GraphicsContext::drawPattern):

  • platform/graphics/cg/NativeImageCG.cpp:

(WebCore::drawNativeImage):

  • rendering/style/NinePieceImage.cpp:

(WebCore::NinePieceImage::paint const):

LayoutTests:

  • fast/images/exif-orientation-background-image-no-repeat-expected.html: Added.
  • fast/images/exif-orientation-background-image-no-repeat.html: Added.
  • fast/images/exif-orientation-background-image-repeat-expected.html: Added.
  • fast/images/exif-orientation-background-image-repeat.html: Added.
  • fast/images/exif-orientation-border-image-expected.html: Added.
  • fast/images/exif-orientation-border-image.html: Added.
5:48 PM Changeset in webkit [254840] by mjs@apple.com
  • 2 edits in trunk/Source/WebCore

Update status of Resize Observer to "Supported In Preview"
https://bugs.webkit.org/show_bug.cgi?id=206513

Reviewed by Darin Adler.

No new tests. Just updating status.

  • features.json: Update Resize Observer to "Supported In Preview"
5:35 PM Changeset in webkit [254839] by Fujii Hironori
  • 47 edits in trunk

Unreviewed, rolling out r254807.

Breaks Apple internal builds.

Reverted changeset:

"Add support for scroll behavior relies on ScrollAnimation of
the Web process"
https://bugs.webkit.org/show_bug.cgi?id=204882
https://trac.webkit.org/changeset/254807

3:55 PM Changeset in webkit [254838] by sbarati@apple.com
  • 2 edits in trunk/Tools

REGRESSION(r254788): mozilla-tests.yaml/js1_5/Regress/regress-191633.js.mozilla fails
https://bugs.webkit.org/show_bug.cgi?id=206477
<rdar://problem/58714886>

Unreviewed.

In r232603 when we added test specific options, the implementation did not
clear the test specific options before parsing each test inside a yaml
file. It only worked for tests where we ran each js file inside a directory.
This patch makes it also work for yaml files.

  • Scripts/run-jsc-stress-tests:
3:32 PM Changeset in webkit [254837] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] InlineFormattingContext::lineLayout should take a InlineItem range
https://bugs.webkit.org/show_bug.cgi?id=206507
<rdar://problem/58742468>

Reviewed by Antti Koivisto.

This is in preparation for being able to run inline layout on partial IFC content.

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
(WebCore::Layout::InlineFormattingContext::lineLayout):
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):

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

(WebCore::Layout::nextWrapOpportunity):
(WebCore::Layout::LineLayoutContext::layoutLine):
(WebCore::Layout::LineLayoutContext::close):
(WebCore::Layout::LineLayoutContext::nextContentForLine):

  • layout/inlineformatting/LineLayoutContext.h:
1:21 PM Changeset in webkit [254836] by ddkilzer@apple.com
  • 42 edits
    5 deletes in trunk

Fix missing header guards and clean up empty files in WebCore, WebKitLegacy, WebKit, Tools
<https://webkit.org/b/206505>

Reviewed by Eric Carlson.

Source/WebCore:

  • bindings/js/StructuredClone.h:
  • bridge/npruntime_internal.h:
  • editing/cocoa/AutofillElements.h:
  • platform/graphics/FormatConverter.h:
  • platform/graphics/ImageBufferData.h:
  • platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h:
  • platform/ios/wak/WebCoreThreadSystemInterface.h:
  • platform/network/mac/WebCoreURLResponse.h:
  • Add #pragma once statement.
  • platform/cocoa/SystemVersion.h:
  • platform/mac/WebNSAttributedStringExtras.h:
  • Add @class declarations as hint that this header is only used by Objective-C[++] source files.
  • platform/mediastream/libwebrtc/VideoToolBoxDecoderFactory.cpp: Remove.
  • platform/mediastream/libwebrtc/VideoToolBoxDecoderFactory.h: Remove.
  • platform/mediastream/libwebrtc/VideoToolBoxEncoderFactory.cpp: Remove.
  • platform/mediastream/libwebrtc/VideoToolBoxEncoderFactory.h: Remove.
  • Remove unused, empty files.
  • platform/network/HTTPStatusCodes.h: Remove.
  • Remove unused header.

Source/WebCore/PAL:

  • pal/ios/QuickLookSoftLink.h:
  • pal/spi/ios/SQLite3SPI.h:
  • Add #pragma once statement.

Source/WebKit:

  • Platform/IPC/Attachment.h:
  • Fix "# pragma" formatting. (It functioned, but WebKit style doesn't indent macros like this.)
  • Platform/ios/AccessibilityIOS.h:
  • Shared/ShareSheetCallbackID.h:
  • Shared/mac/SecItemShim.h:
  • UIProcess/API/C/WKPageRenderingProgressEventsInternal.h:
  • UIProcess/API/Cocoa/WKNavigationData.h:
  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:
  • UIProcess/API/Cocoa/WKWebArchive.h:
  • Add #pragma once statement.

Source/WebKitLegacy:

  • WebCoreSupport/WebViewGroup.h:
  • Add #pragma once statement.

Source/WebKitLegacy/mac:

  • Misc/WebKitStatisticsPrivate.h:
  • Misc/WebLocalizableStrings.h: Modernize OBJC and cplusplus checks.
  • Misc/WebTypesInternal.h:
  • WebView/WebMediaPlaybackTargetPicker.h:
  • Add #pragma once statement.

Source/WebKitLegacy/win:

  • WebCoreSupport/WebChromeClient.h:
  • WebCoreSupport/WebContextMenuClient.h:
  • WebCoreSupport/WebDesktopNotificationsDelegate.h:
  • WebCoreSupport/WebDragClient.h:
  • WebDocumentLoader.h:
  • WebKitStatisticsPrivate.h:
  • WebPreferenceKeysPrivate.h:
  • Add #pragma once statement.

Tools:

  • DumpRenderTree/TestNetscapePlugIn/TestObject.h:
  • TestWebKitAPI/JavaScriptTest.h:
  • TestWebKitAPI/Tests/WebCore/DFAHelpers.h:
  • Add #pragma once statement.
1:00 PM Changeset in webkit [254835] by Devin Rousso
  • 4 edits in trunk/LayoutTests

inspector/heap/getRemoteObject.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=156077
<rdar://problem/25469998>

Reviewed by Darin Adler.

Instead of blindly assuming that the first object is the window global object, iterate all
the objects found by WI.HeapSnapshotProxy.prototype.instancesWithClassName and check that
we see at least one window global object.

  • inspector/heap/getRemoteObject.html:
  • inspector/heap/getRemoteObject-expected.txt:
  • platform/mac-wk2/TestExpectations:
12:51 PM Changeset in webkit [254834] by Devin Rousso
  • 4 edits in trunk/LayoutTests

REGRESSION (r250655?): [ Mac Debug ] inspector/runtime/promise-native-getter.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=206303
<rdar://problem/58612520>

Reviewed by Darin Adler.

Rework the test to not be reliant on real world timing.

  • inspector/runtime/promise-native-getter.html:
  • inspector/runtime/promise-native-getter-expected.txt:
  • platform/mac/TestExpectations:
12:24 PM Changeset in webkit [254833] by Wenson Hsieh
  • 2 edits
    2 adds in trunk/LayoutTests

Add a test to verify that the callout bar appears after selecting a word
https://bugs.webkit.org/show_bug.cgi?id=206488
<rdar://problem/58661768>

Reviewed by Darin Adler.

  • editing/selection/ios/show-callout-bar-after-selecting-word-expected.txt: Added.
  • editing/selection/ios/show-callout-bar-after-selecting-word.html: Added.

Add the new layout test.

  • resources/ui-helper.js:

(window.UIHelper.rectForMenuAction):

Wrap this UI script in its own function scope, such that it can be used multiple times in the same layout test.

12:17 PM Changeset in webkit [254832] by ddkilzer@apple.com
  • 10 edits
    4 deletes in trunk/Source

Fix missing header guards and clean up empty files in bmalloc, WTF, JavaScriptCore
<https://webkit.org/b/206481>

Reviewed by Darin Adler.

Source/bmalloc:

  • bmalloc/PerThread.cpp: Remove empty file.
  • bmalloc/ScopeExit.h: Add #pragma once.

Source/JavaScriptCore:

  • dfg/DFGPrePostNumbering.cpp: Remove empty file.
  • dfg/DFGPrePostNumbering.h: Remove empty file.
  • runtime/OptionEntry.h: Remove empty file.
  • API/JSCallbackObjectFunctions.h:
  • b3/testb3.h:
  • heap/IsoInlinedHeapCellType.h:
  • wasm/WasmGeneratorTraits.h:
  • Add #pragma once.

Source/WTF:

  • wtf/cocoa/Entitlements.h:
  • wtf/win/PathWalker.h:
  • Add #pragma once.
10:07 AM Changeset in webkit [254831] by ddkilzer@apple.com
  • 3 edits in trunk/Tools

check-webkit-style: Improve header guard checks
<https://webkit.org/b/206480>

Reviewed by Darin Adler.

  • Scripts/webkitpy/style/checkers/cpp.py:

(check_for_header_guard):

  • Add file_path (filename) argument to check for config.h and *Prefix.h headers.
  • Use hints in header file to determine if this is a header file only used by Objective-C or not.
  • Change #ifndef/#define check to use both lines instead of assuming a format for the macro.
  • Emit new 'build/header_guard_missing' error.

(_process_lines):

  • Pass filename argument to check_for_header_guard().

(CppChecker):

  • Enable new 'build/header_guard_missing' check.
  • Scripts/webkitpy/style/checkers/cpp_unittest.py:

(CppStyleTestBase.perform_header_guard_check):
(CppStyleTestBase.assert_header_guard):

  • Move default filename argument from perform_header_guard_check() to assert_header_guard() so tests may pass in different values for header paths.

(CppStyleTest):

  • Add tests for config.h, *Prefix.h headers.
  • Update test for `build/header_guard' (legacy header guard) error.
  • Update test for missing header guard so that it now expects a 'build/header_guard_missing' error message.
  • Add tests for Objective-C headers with and without OBJC checks.
8:56 AM Changeset in webkit [254830] by Adrian Perez de Castro
  • 1 copy in releases/WPE WebKit/webkit-2.27.4

WPE WebKit 2.27.4

8:55 AM Changeset in webkit [254829] by Adrian Perez de Castro
  • 4 edits in trunk

Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.27.4 release

.:

  • Source/cmake/OptionsWPE.cmake: Bump version numbers.

Source/WebKit:

  • wpe/NEWS: Add release notes for 2.27.4
8:17 AM Changeset in webkit [254828] by zandobersek@gmail.com
  • 12 edits
    2 adds in trunk

[WPE] Add WebKitRectangle, use it for WebKitWebView's SHOW_MENU signal
https://bugs.webkit.org/show_bug.cgi?id=206495

Reviewed by Carlos Garcia Campos.

Source/WebKit:

Add WebKitRectangle, a new boxed-type API containing information about
a simple rectangle consisting of integer coordinates. This would
correspond to types like GdkRectangle or cairo_rectangle_int_t.

Objects of this type are for now needed to inform the position and size
of the option menu. The show-menu signal signature is adjusted
accordingly.

No new tests -- the relevant test was updated.

  • PlatformWPE.cmake:
  • SourcesWPE.txt:
  • UIProcess/API/glib/WebKitWebView.cpp:

(WebKitWebViewClient::showOptionMenu):
(webkit_web_view_class_init):
(webkitWebViewShowOptionMenu):

  • UIProcess/API/glib/WebKitWebViewPrivate.h:
  • UIProcess/API/wpe/WebKitPopupMenu.cpp:

(WebKit::WebKitPopupMenu::showPopupMenu):

  • UIProcess/API/wpe/WebKitRectangle.cpp: Added.

(webkit_rectangle_copy):
(webkit_rectangle_free):

  • UIProcess/API/wpe/WebKitRectangle.h: Added.
  • UIProcess/API/wpe/WebKitWebView.h:
  • UIProcess/API/wpe/WebKitWebViewClient.h:
  • UIProcess/API/wpe/docs/wpe-1.0-sections.txt:
  • UIProcess/API/wpe/docs/wpe-docs.sgml:

Tools:

Update the TestOptionMenu test case for WPE now that a rectangle object
is also passed through to the signal handler.

  • TestWebKitAPI/Tests/WebKitGLib/TestOptionMenu.cpp:

(OptionMenuTest::showOptionMenuCallback):
(OptionMenuTest::showOptionMenu):

8:06 AM Changeset in webkit [254827] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] Add support for the rare case of revert
https://bugs.webkit.org/show_bug.cgi?id=206486
<rdar://problem/58720638>

Reviewed by Antti Koivisto.

This patch re-introduces the support for revert when a previous wrap position turns out to be the line end position.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::initialize):
(WebCore::Layout::LineBuilder::clearContent):

  • layout/inlineformatting/InlineLineBuilder.h:
  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::LineLayoutContext::layoutLine):
(WebCore::Layout::LineLayoutContext::rebuildLineForRevert):

  • layout/inlineformatting/LineLayoutContext.h:
7:52 AM Changeset in webkit [254826] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit

[GTK][WPE] InputMethodFilter: do not notify about focus in when only content type changed
https://bugs.webkit.org/show_bug.cgi?id=206502

Reviewed by Adrian Perez de Castro.

That's unbalancing the focus in/out notifications.

  • UIProcess/API/glib/InputMethodFilter.cpp:

(WebKit::InputMethodFilter::setContext): Always call notifyContentType().
(WebKit::InputMethodFilter::setState): Only call notifyFocusedIn() and notifyFocusedOut when there's a focus change.
(WebKit::InputMethodFilter::notifyContentType): Notify content type if changed.
(WebKit::InputMethodFilter::notifyFocusedIn): Move the content type notification to its own function.

  • UIProcess/API/glib/InputMethodFilter.h:
7:43 AM Changeset in webkit [254825] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WebCore

Invalid usage of ENABLE() before it's defined in WebCore/layout/integration/LayoutIntegrationBoxTree.cpp
https://bugs.webkit.org/show_bug.cgi?id=206500

Reviewed by Žan Doberšek.

No new tests needed.

  • layout/integration/LayoutIntegrationBoxTree.cpp: Include "config.h"

before using the ENABLE() macro, to make sure that it gets defined.

7:20 AM Changeset in webkit [254824] by Diego Pino Garcia
  • 3 edits in trunk/LayoutTests

[GTK] Gardening, remove expected to fail but pass
https://bugs.webkit.org/show_bug.cgi?id=206493

Unreviewed gardening.

  • platform/gtk/TestExpectations:
7:07 AM Changeset in webkit [254823] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

REGRESSION: ( r254256 ) [ Mojave wk2 ] http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable-gpuprocess.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=206437
<rdar://problem/58692880>

Reviewed by Eric Carlson.

Hypothesis from flakiness is that, in GPUProcess, the call to stopRecording is not synchronously followed by a call to fetchData.
If too much time happened between the two calls, stopRecording will trigger setting m_isStopped and m_hasStartedWriting to false.
Any further call to fetchData will then fail.

To circumvent this issue, we add a flag m_isStopping.
If we are stopping, the completionHandler to fetchData call is delayed until stopRecording is fully finished.
When stopping will be finished, the completionHandler will send back the data.
This also allows to read the file in a background thread.

No new tests, this should unflake the flaky test.

  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:

(WebCore::MediaRecorderPrivateWriter::stopRecording):
(WebCore::MediaRecorderPrivateWriter::fetchData):

6:46 AM Changeset in webkit [254822] by Carlos Garcia Campos
  • 14 edits in trunk

[GTK][WPE] Also include the selection index in webkit_input_method_context_notify_surrounding()
https://bugs.webkit.org/show_bug.cgi?id=206497

Reviewed by Adrian Perez de Castro.

Source/WebKit:

Input methods also want to know the selection.

  • Shared/EditorState.cpp:

(WebKit::EditorState::PostLayoutData::encode const): Encode paragraphContextSelectionPosition.
(WebKit::EditorState::PostLayoutData::decode): Decode paragraphContextSelectionPosition.

  • Shared/EditorState.h: Add paragraphContextSelectionPosition.
  • UIProcess/API/glib/InputMethodFilter.cpp:

(WebKit::InputMethodFilter::notifySurrounding): Also include the selection index.

  • UIProcess/API/glib/InputMethodFilter.h:
  • UIProcess/API/glib/WebKitInputMethodContext.cpp:

(webkit_input_method_context_notify_surrounding):

  • UIProcess/API/gtk/WebKitInputMethodContext.h:
  • UIProcess/API/gtk/WebKitInputMethodContextImplGtk.cpp:

(webkitInputMethodContextImplGtkNotifySurrounding): Ignore the selection index, since GtkIMContext doesn't
support it.

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseUpdateTextInputState): Pass paragraphContextSelectionPosition to InputMethodFilter::notifySurrounding().

  • UIProcess/API/wpe/WPEView.cpp:

(WKWPE::View::selectionDidChange): Ditto.

  • UIProcess/API/wpe/WebKitInputMethodContext.h:
  • WebProcess/WebPage/glib/WebPageGLib.cpp:

(WebKit::WebPage::platformEditorState const): Get the selection index too.

Tools:

Add new test case to check the selection index when there's a selection.

  • TestWebKitAPI/Tests/WebKitGLib/TestInputMethodContext.cpp:

(webkitInputMethodContextMockNotifySurrounding):
(webkitInputMethodContextMockReset):
(testWebKitInputMethodContextSurrounding):

6:43 AM Changeset in webkit [254821] by commit-queue@webkit.org
  • 4 edits in trunk

Implement "create a potential-CORS request"
https://bugs.webkit.org/show_bug.cgi?id=205326

Patch by Rob Buis <rbuis@igalia.com> on 2020-01-20
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Update improved test result.

  • web-platform-tests/html/semantics/scripting-1/the-script-element/script-crossorigin-network-expected.txt:

Source/WebCore:

The storedCredentialsPolicy should be calculated using a same origin
check when credentials are computed as same-origin.

Test: imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-crossorigin-network.html

  • loader/CrossOriginAccessControl.cpp:

(WebCore::createPotentialAccessControlRequest):

6:28 AM Changeset in webkit [254820] by Caio Lima
  • 9 edits in trunk/JSTests

Skip tests when there is no JIT build on ARMv7 and MIPS
https://bugs.webkit.org/show_bug.cgi?id=206496

Unreviewed gardening.

  • microbenchmarks/bit-test-constant.js:
  • microbenchmarks/bit-test-nonconstant.js:
  • microbenchmarks/memcpy-typed-loop-large.js:
  • microbenchmarks/memcpy-typed-loop-small.js:
  • microbenchmarks/mul-immediate-sub.js:
  • stress/dont-range-based-iterate-vector-that-is-mutated.js:
  • stress/int8-repeat-in-then-out-of-bounds.js:
  • stress/sampling-profiler-richards.js:
3:24 AM Changeset in webkit [254819] by zandobersek@gmail.com
  • 14 edits
    6 adds
    1 delete in trunk

[WPE] Expose the WebKitOptionMenu APIs
https://bugs.webkit.org/show_bug.cgi?id=206287

Source/WebKit:

Reviewed by Carlos Garcia Campos.

Enable the GLib-based API covering option menu functionality for WPE.

Most of this can be shared with the GTK port. The only difference is in
the two additional parameters emitted on the WebKitWebView's "show-menu"
signal (GdkEvent and GdkRectangle) that WPE doesn't support at the
moment. The rectangle information will be possible to emit in the near
future once a usable API type is available for this information.

The WebKitPopupMenu implementation for WPE would only work with the
GLib-based API. To avoid using it with other APIs, this is implemented
only on the WebKitWebViewClient interface (renamed from 'WebViewClient'
and its declaration moved into a separate header file) inheriting from
API::ViewClient.

The relevant API test is enabled for WPE.

  • PlatformWPE.cmake:
  • SourcesWPE.txt:
  • UIProcess/API/glib/WebKitWebView.cpp:

(WebKitWebViewClient::WebKitWebViewClient):
(WebKitWebViewClient::showOptionMenu):
(WebKitWebViewClient::handleDownloadRequest):
(WebKitWebViewClient::frameDisplayed):
(WebKitWebViewClient::willStartLoad):
(WebKitWebViewClient::didChangePageID):
(WebKitWebViewClient::didReceiveUserMessage):
(webkitWebViewConstructed):
(webkit_web_view_class_init):
(webkitWebViewShowOptionMenu):

  • UIProcess/API/glib/WebKitWebViewPrivate.h:
  • UIProcess/API/wpe/APIViewClient.h:

(API::ViewClient::isGLibBasedAPI):

  • UIProcess/API/wpe/PageClientImpl.cpp:

(WebKit::PageClientImpl::createPopupMenuProxy):

  • UIProcess/API/wpe/WPEView.h:

(WKWPE::View::client const):

  • UIProcess/API/wpe/WebKitOptionMenu.h: Added.
  • UIProcess/API/wpe/WebKitOptionMenuItem.h: Added.
  • UIProcess/API/wpe/WebKitPopupMenu.cpp: Added.

(WebKit::WebKitPopupMenu::create):
(WebKit::WebKitPopupMenu::WebKitPopupMenu):
(WebKit::menuCloseCallback):
(WebKit::WebKitPopupMenu::showPopupMenu):
(WebKit::WebKitPopupMenu::hidePopupMenu):
(WebKit::WebKitPopupMenu::cancelTracking):
(WebKit::WebKitPopupMenu::selectItem):
(WebKit::WebKitPopupMenu::activateItem):

  • UIProcess/API/wpe/WebKitPopupMenu.h: Added.
  • UIProcess/API/wpe/WebKitWebView.h:
  • UIProcess/API/wpe/WebKitWebViewClient.h: Added.
  • UIProcess/API/wpe/docs/wpe-1.0-sections.txt:
  • UIProcess/API/wpe/webkit.h:

Tools:

Move TestOptionMenu under the WebKitGLib directory, adding the
appropriate adjustments for the WPE variant of the API

  • TestWebKitAPI/Tests/WebKitGLib/TestOptionMenu.cpp: Renamed from Tools/TestWebKitAPI/Tests/WebKitGtk/TestOptionMenu.cpp.

(OptionMenuTest::OptionMenuTest):
(OptionMenuTest::~OptionMenuTest):
(OptionMenuTest::destroyMenu):
(OptionMenuTest::showOptionMenuCallback):
(OptionMenuTest::menuCloseCallback):
(OptionMenuTest::showOptionMenu):
(OptionMenuTest::clickAtPositionAndWaitUntilOptionMenuShown):
(OptionMenuTest::close):
(OptionMenuTest::activateItem):
(OptionMenuTest::selectItem):
(testOptionMenuSimple):
(testOptionMenuGroups):
(testOptionMenuActivate):
(testOptionMenuSelect):
(beforeAll):
(afterAll):

  • TestWebKitAPI/glib/CMakeLists.txt:
  • TestWebKitAPI/glib/PlatformGTK.cmake:
2:59 AM Changeset in webkit [254818] by commit-queue@webkit.org
  • 5 edits in trunk

Make isValidUserAgentHeaderValue GLib only
https://bugs.webkit.org/show_bug.cgi?id=206475

Patch by Rob Buis <rbuis@igalia.com> on 2020-01-20
Reviewed by Youenn Fablet.

Source/WebCore:

The function isValidUserAgentHeaderValue is only used
by code that requires GLib, so move it behind USE(GLIB).

  • platform/network/HTTPParsers.cpp:
  • platform/network/HTTPParsers.h:

Tools:

Make the unit test that tests isValidUserAgentHeaderValue
depend on USE(GLIB) as well.

  • TestWebKitAPI/Tests/WebCore/HTTPParsers.cpp:
2:39 AM Changeset in webkit [254817] by youenn@apple.com
  • 26 edits
    3 copies
    10 adds in trunk/Source

Add support for MediaStream video track rendering in GPUProcess
https://bugs.webkit.org/show_bug.cgi?id=206286

Reviewed by Eric Carlson.

Source/WebCore:

Add a way for WebKit layer to create its own specific SampleBufferDisplayLayer.
WebKit layer can set a function pointer that will be used to create SampleBufferDisplayLayer.
If none is provided, LocalSampleBufferDisplayLayer is used.

Update MediaPlayerPrivateMediaStreamAVFObjC to monitor itself its root layer bounds change.
Conversely, LocalSampleBufferDisplayLayer no longer monitors its root layer bounds change.
This removes the need for SampleBufferDisplayLayer::Client to be notified of bounds change.
We add an API to update the root layer bounds of a LocalSampleBufferDisplayLayer as well,
this API being used by GPUProcess to mirror changes done to WebProcess root layer.

WebRTC incoming video tracks do not have presentation timestamps so we mark them as kCMSampleAttachmentKey_DisplayImmediately.
This is currently lost when doing IPC from WebProcess to NetworkProcess. Add this information for every enqueued sample in LocalSampleBufferDisplayLayer.
We might want in the future to serialize all attachments of the sample.

Manually tested.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/avfoundation/SampleBufferDisplayLayer.cpp: Added.

(WebCore::SampleBufferDisplayLayer::setCreator):
(WebCore::SampleBufferDisplayLayer::create):

  • platform/graphics/avfoundation/SampleBufferDisplayLayer.h:
  • platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h:
  • platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm:

(-[WebAVSampleBufferStatusChangeListener invalidate]):
(-[WebAVSampleBufferStatusChangeListener start]):
(-[WebAVSampleBufferStatusChangeListener stop]):
(-[WebAVSampleBufferStatusChangeListener observeValueForKeyPath:ofObject:change:context:]):
(WebCore::LocalSampleBufferDisplayLayer::LocalSampleBufferDisplayLayer):
(WebCore::LocalSampleBufferDisplayLayer::~LocalSampleBufferDisplayLayer):
(WebCore::LocalSampleBufferDisplayLayer::updateBoundsAndPosition):
(WebCore::LocalSampleBufferDisplayLayer::enqueueSample):

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

(-[WebRootSampleBufferBoundsChangeListener initWithParent:]):
(-[WebRootSampleBufferBoundsChangeListener dealloc]):
(-[WebRootSampleBufferBoundsChangeListener invalidate]):
(-[WebRootSampleBufferBoundsChangeListener start]):
(-[WebRootSampleBufferBoundsChangeListener stop]):
(-[WebRootSampleBufferBoundsChangeListener observeValueForKeyPath:ofObject:change:context:]):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::rootLayer const):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayLayer):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::rootLayerBoundsDidChange):

  • platform/graphics/cg/PDFDocumentImage.cpp:

Unified build fix.

Source/WebKit:

Implement WebProcess SampleBufferDisplayLayer and GPUProcess RemoteSampleBufferDisplayLayer.
RemoteSampleBufferDisplayLayer is a wrapper around LocalSampleBufferDisplayLayer.

A synchronous IPC is used at creation time of the layer to make sure we have a shared layer synchronously.
Future refactoring should allow to remove that constraint as done in regular video playing.

Override SampleBufferDisplayLayer create function pointer when rendering is to be done in GPUProcess.

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::sampleBufferDisplayLayerManager):
(WebKit::GPUConnectionToWebProcess::didReceiveMessage):
(WebKit::GPUConnectionToWebProcess::didReceiveSyncMessage):

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp: Added.

(WebKit::RemoteSampleBufferDisplayLayer::create):
(WebKit::RemoteSampleBufferDisplayLayer::RemoteSampleBufferDisplayLayer):
(WebKit::RemoteSampleBufferDisplayLayer::~RemoteSampleBufferDisplayLayer):
(WebKit::RemoteSampleBufferDisplayLayer::contextID):
(WebKit::RemoteSampleBufferDisplayLayer::bounds const):
(WebKit::RemoteSampleBufferDisplayLayer::updateDisplayMode):
(WebKit::RemoteSampleBufferDisplayLayer::updateAffineTransform):
(WebKit::RemoteSampleBufferDisplayLayer::updateBoundsAndPosition):
(WebKit::RemoteSampleBufferDisplayLayer::flush):
(WebKit::RemoteSampleBufferDisplayLayer::flushAndRemoveImage):
(WebKit::RemoteSampleBufferDisplayLayer::enqueueSample):
(WebKit::RemoteSampleBufferDisplayLayer::clearEnqueuedSamples):
(WebKit::RemoteSampleBufferDisplayLayer::messageSenderConnection const):
(WebKit::RemoteSampleBufferDisplayLayer::sampleBufferDisplayLayerStatusDidChange):
(WebKit::RemoteSampleBufferDisplayLayer::streamTime const):

  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.h: Added.
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.messages.in: Added.
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp: Added.

(WebKit::RemoteSampleBufferDisplayLayerManager::RemoteSampleBufferDisplayLayerManager):
(WebKit::RemoteSampleBufferDisplayLayerManager::didReceiveLayerMessage):
(WebKit::RemoteSampleBufferDisplayLayerManager::createLayer):
(WebKit::RemoteSampleBufferDisplayLayerManager::releaseLayer):

  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.h: Added.
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.messages.in: Added.
  • Scripts/webkit/messages.py:
  • Shared/WebCoreArgumentCoders.h:
  • Shared/mac/WebCoreArgumentCodersMac.mm:

(IPC::ArgumentCoder<CGRect>::encode):
(IPC::ArgumentCoder<CGRect>::decode):
(IPC::ArgumentCoder<CGSize>::encode):
(IPC::ArgumentCoder<CGSize>::decode):
(IPC::ArgumentCoder<CGPoint>::encode):
(IPC::ArgumentCoder<CGPoint>::decode):
(IPC::ArgumentCoder<CGAffineTransform>::encode):
(IPC::ArgumentCoder<CGAffineTransform>::decode):

  • Sources.txt:
  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/GPUProcessConnection.cpp:

(WebKit::GPUProcessConnection::sampleBufferDisplayLayerManager):
(WebKit::GPUProcessConnection::didReceiveMessage):

  • WebProcess/GPU/GPUProcessConnection.h:
  • WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:

(WebKit::RemoteMediaPlayerManager::updatePreferences):

  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp: Added.

(WebKit::SampleBufferDisplayLayer::create):
(WebKit::SampleBufferDisplayLayer::SampleBufferDisplayLayer):
(WebKit::SampleBufferDisplayLayer::~SampleBufferDisplayLayer):
(WebKit::SampleBufferDisplayLayer::didFail const):
(WebKit::SampleBufferDisplayLayer::updateDisplayMode):
(WebKit::SampleBufferDisplayLayer::bounds const):
(WebKit::SampleBufferDisplayLayer::updateAffineTransform):
(WebKit::SampleBufferDisplayLayer::updateBoundsAndPosition):
(WebKit::SampleBufferDisplayLayer::flush):
(WebKit::SampleBufferDisplayLayer::flushAndRemoveImage):
(WebKit::SampleBufferDisplayLayer::enqueueSample):
(WebKit::SampleBufferDisplayLayer::clearEnqueuedSamples):
(WebKit::SampleBufferDisplayLayer::rootLayer):
(WebKit::SampleBufferDisplayLayer::setDidFail):
(WebKit::SampleBufferDisplayLayer::boundsChanged):

  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h: Added.
  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.messages.in: Added.
  • WebProcess/GPU/webrtc/SampleBufferDisplayLayerIdentifier.h: Added.
  • WebProcess/GPU/webrtc/SampleBufferDisplayLayerManager.cpp: Added.

(WebKit::SampleBufferDisplayLayerManager::didReceiveLayerMessage):
(WebKit::SampleBufferDisplayLayerManager::createLayer):
(WebKit::SampleBufferDisplayLayerManager::addLayer):
(WebKit::SampleBufferDisplayLayerManager::removeLayer):

  • WebProcess/GPU/webrtc/SampleBufferDisplayLayerManager.h: Added.
  • WebProcess/WebProcess.h:
1:49 AM Changeset in webkit [254816] by commit-queue@webkit.org
  • 2 edits
    6 moves in trunk/LayoutTests

[css-grid] Import grid-align-content-distribution tests to WebKit
https://bugs.webkit.org/show_bug.cgi?id=205926

Patch by Rossana Monteriso <rmonteriso@igalia.com> on 2020-01-20
Reviewed by Javier Fernandez.

LayoutTests/imported/w3c:

Add align-content-distribution tests, checked and adapted to the WPT project,
to the css-grid/alignment folder for imported tests inside WebKit.

  • web-platform-tests/css/css-grid/alignment/grid-align-content-distribution-expected.txt:
  • web-platform-tests/css/css-grid/alignment/grid-align-content-distribution-vertical-lr-expected.txt:
  • web-platform-tests/css/css-grid/alignment/grid-align-content-distribution-vertical-rl-expected.txt:
  • web-platform-tests/css/css-grid/alignment/grid-align-content-distribution-vertical-lr.html:
  • web-platform-tests/css/css-grid/alignment/grid-align-content-distribution-vertical-rl.html:
  • web-platform-tests/css/css-grid/alignment/grid-align-content-distribution.html:

LayoutTests:

Remove align-content-distribution tests that are being replaced by newer tests, adapted to the WPT project and imported
to the corresponding css-grid folder inside WebKit.

  • fast/css-grid-layout/grid-align-content-distribution-expected.txt: Removed.
  • fast/css-grid-layout/grid-align-content-distribution-vertical-lr-expected.txt: Removed.
  • fast/css-grid-layout/grid-align-content-distribution-vertical-rl-expected.txt: Removed.
  • fast/css-grid-layout/grid-align-content-distribution.html: Removed.
  • fast/css-grid-layout/grid-align-content-distribution-vertical-lr.html: Removed.
  • fast/css-grid-layout/grid-align-content-distribution-vertical-rl.html: Removed.
1:44 AM Changeset in webkit [254815] by youenn@apple.com
  • 3 edits in trunk/Source/ThirdParty/libwebrtc

Setting kVTCompressionPropertyKey_DataRateLimits on RTCVideoEncoderH264 fails
https://bugs.webkit.org/show_bug.cgi?id=206402

Reviewed by Eric Carlson.

Add helper routine dedicated to setting VTB/VCP array value properties.
Logging shows the bitrate is then set appropriately.

  • Source/webrtc/sdk/objc/components/video_codec/helpers.cc:
  • Source/webrtc/sdk/objc/components/video_codec/helpers.h:
1:23 AM Changeset in webkit [254814] by youenn@apple.com
  • 4 edits
    4 adds in trunk

Video sound sometimes keeps playing in page cache
https://bugs.webkit.org/show_bug.cgi?id=206408
<rdar://problem/58654047>

Reviewed by Eric Carlson.

Source/WebCore:

In r253375, we made sure to enqueue calls that would trigger state changes, to ensure we would not start playing while in page cache.
But this delayed the order to pause the video when entering page cache.
Fix this by synchronously updating playing state when being suspended for page cache.

Test: http/tests/navigation/page-cache-video.html

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::pauseAndUpdatePlayStateImmediately):
(WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer):

  • html/HTMLMediaElement.h:

LayoutTests:

  • http/tests/media/resources/sound_5.mp3: Added.

File comes from WPT and is 5 seconds long.

  • http/tests/navigation/page-cache-video-expected.txt: Added.
  • http/tests/navigation/page-cache-video.html: Added.
  • http/tests/navigation/resources/page-cache-video-helper.html: Added.
1:19 AM Changeset in webkit [254813] by youenn@apple.com
  • 5 edits
    3 adds in trunk/Source/WebCore

Introduce an abstract SampleBufferDisplayLayer
https://bugs.webkit.org/show_bug.cgi?id=206066

Reviewed by Eric Carlson.

Move use of display layers in MediaPlayerPrivateMediaStreamAVFObjC to a new class LocalSampleBufferDisplayLayer
that implements an interface named SampleBufferDisplayLayer.
A future patch will implement this interface by IPCing to GPUProcess.
We move both layers and handling of the sample queue to LocalSampleBufferDisplayLayer.

Contrary to previously, we do not call again enqueueVideoSample in case we enqueued a sample for later use in the display layer.
Instead, we directly render it, which should not change much since this is a realtime track and in the future the buffer will be in GPUProcess anyway.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/avfoundation/SampleBufferDisplayLayer.h: Added.

(WebCore::SampleBufferDisplayLayer::SampleBufferDisplayLayer):

  • platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h: Added.
  • platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm: Added.

(-[WebAVSampleBufferStatusChangeListener initWithParent:]):
(-[WebAVSampleBufferStatusChangeListener dealloc]):
(-[WebAVSampleBufferStatusChangeListener invalidate]):
(-[WebAVSampleBufferStatusChangeListener beginObservingLayers]):
(-[WebAVSampleBufferStatusChangeListener stopObservingLayers]):
(-[WebAVSampleBufferStatusChangeListener observeValueForKeyPath:ofObject:change:context:]):
(WebCore::runWithoutAnimations):
(WebCore::LocalSampleBufferDisplayLayer::LocalSampleBufferDisplayLayer):
(WebCore::LocalSampleBufferDisplayLayer::~LocalSampleBufferDisplayLayer):
(WebCore::LocalSampleBufferDisplayLayer::layerStatusDidChange):
(WebCore::LocalSampleBufferDisplayLayer::layerErrorDidChange):
(WebCore::LocalSampleBufferDisplayLayer::rootLayerBoundsDidChange):
(WebCore::LocalSampleBufferDisplayLayer::displayLayer):
(WebCore::LocalSampleBufferDisplayLayer::rootLayer):
(WebCore::LocalSampleBufferDisplayLayer::didFail const):
(WebCore::LocalSampleBufferDisplayLayer::updateDisplayMode):
(WebCore::LocalSampleBufferDisplayLayer::bounds const):
(WebCore::LocalSampleBufferDisplayLayer::updateAffineTransform):
(WebCore::LocalSampleBufferDisplayLayer::updateBoundsAndPosition):
(WebCore::LocalSampleBufferDisplayLayer::ensureLayers):
(WebCore::LocalSampleBufferDisplayLayer::flush):
(WebCore::LocalSampleBufferDisplayLayer::flushAndRemoveImage):
(WebCore::LocalSampleBufferDisplayLayer::enqueueSample):
(WebCore::LocalSampleBufferDisplayLayer::removeOldSamplesFromPendingQueue):
(WebCore::LocalSampleBufferDisplayLayer::addSampleToPendingQueue):
(WebCore::LocalSampleBufferDisplayLayer::clearEnqueuedSamples):
(WebCore::LocalSampleBufferDisplayLayer::requestNotificationWhenReadyForVideoData):

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

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueCorrectedVideoSample):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::sampleBufferDisplayLayerStatusDidChange):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::applicationDidBecomeActive):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::flushRenderers):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::destroyLayers):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformLayer const):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::displayLayer):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayMode):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::checkSelectedVideoTrack):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setBufferingPolicy):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayLayer):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::sampleBufferDisplayLayerBoundsDidChange):

1:02 AM Changeset in webkit [254812] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

ASSERT in case a service worker cannot be terminated in a timely manner
https://bugs.webkit.org/show_bug.cgi?id=206413

Reviewed by Alexey Proskuryakov.

No change of behavior, the process will still exit if it does not succeed in stopping a service worker.
In Debug, a crash log will be collected which will allow to help identifying other crashes.

  • workers/service/context/SWContextManager.cpp:

(WebCore::SWContextManager::serviceWorkerFailedToTerminate):

12:07 AM Changeset in webkit [254811] by commit-queue@webkit.org
  • 6 edits
    1 add in trunk

KeyedDecoderGeneric crashes when it accesses data with non-existing key
https://bugs.webkit.org/show_bug.cgi?id=205902

Patch by Takashi Komori <Takashi.Komori@sony.com> on 2020-01-20
Reviewed by Fujii Hironori.

Source/WebCore:

Add null check function for KeyedDecoderGeneric.

Test: TestWebKitAPI/Tests/WebCore/KeyedCodingGeneric.cpp

  • platform/generic/KeyedDecoderGeneric.cpp:

(WebCore::KeyedDecoderGeneric::Dictionary::get):
(WebCore::KeyedDecoderGeneric::getPointerFromDictionaryStack):
(WebCore::KeyedDecoderGeneric::decodeSimpleValue):
(WebCore::KeyedDecoderGeneric::decodeBytes):
(WebCore::KeyedDecoderGeneric::decodeBool):
(WebCore::KeyedDecoderGeneric::decodeUInt32):
(WebCore::KeyedDecoderGeneric::decodeUInt64):
(WebCore::KeyedDecoderGeneric::decodeInt32):
(WebCore::KeyedDecoderGeneric::decodeInt64):
(WebCore::KeyedDecoderGeneric::decodeFloat):
(WebCore::KeyedDecoderGeneric::decodeDouble):
(WebCore::KeyedDecoderGeneric::decodeString):
(WebCore::KeyedDecoderGeneric::beginObject):
(WebCore::KeyedDecoderGeneric::beginArray):

  • platform/generic/KeyedDecoderGeneric.h:

Tools:

  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/KeyedCoding.cpp: Added.

(TestWebKitAPI::checkDecodedBytes):
(TestWebKitAPI::TEST):
(TestWebKitAPI::testSimpleValue):
(TestWebKitAPI::KeyedCodingTestObject::encode):
(TestWebKitAPI::KeyedCodingTestObject::decode):
(TestWebKitAPI::KeyedCodingTestObject::KeyedCodingTestObject):
(TestWebKitAPI::KeyedCodingTestObject::equals const):
(TestWebKitAPI::operator==):

Jan 19, 2020:

11:12 PM Changeset in webkit [254810] by zandobersek@gmail.com
  • 8 edits in trunk/Tools

[WPE] HeadlessViewBackend should hande SHM-based buffer exports
https://bugs.webkit.org/show_bug.cgi?id=206283

Reviewed by Adrian Perez de Castro.

The ViewBackend class should also handle any SHM-based exports from
the wpe_view_backend_exportable_fdo_egl instance. In case of such an
export, the buffer is transported down into the implementing object.

For WindowViewBackend, we do nothing with this yet, except emit a
warning. For HeadlessViewBackend, we repeat what's currently done with
EGL exports, storing pending updates until the update timer is fired
and we move the buffer into the locked position, clearing up any
previous locked buffer.

Upon creating a snapshot of the current contents, we add additional
separation in how EGL and SHM exports are handled. Nothing changes
for the former, while for the latter we simply retrieve the
wl_shm_buffer object, map it, copy data from it into the pixel data
storage that's basis for the returned Cairo surface, and unmap it.

  • Scripts/webkitpy/port/wpe.py:

(WPEPort.setup_environ_for_server): Copy the LIBGL_ALWAYS_SOFTWARE
environment variable, if present. This variable is normally used to
force Mesa into software rasterizing mode.

  • wpe/backends/HeadlessViewBackend.cpp:

(WPEToolingBackends::HeadlessViewBackend::~HeadlessViewBackend):
(WPEToolingBackends::HeadlessViewBackend::createSnapshot):
(WPEToolingBackends::HeadlessViewBackend::createEGLSnapshot):
(WPEToolingBackends::HeadlessViewBackend::createSHMSnapshot):
(WPEToolingBackends::HeadlessViewBackend::performUpdate):
(WPEToolingBackends::HeadlessViewBackend::displayBuffer):

  • wpe/backends/HeadlessViewBackend.h:
  • wpe/backends/ViewBackend.cpp:

(WPEToolingBackends::ViewBackend::initialize):

  • wpe/backends/ViewBackend.h:
  • wpe/backends/WindowViewBackend.cpp:
  • wpe/backends/WindowViewBackend.h:
7:18 PM Changeset in webkit [254809] by eric.carlson@apple.com
  • 16 edits
    1 add in trunk/Source/WebKit

Make MediaPlayerPrivateRemote a message receiver
https://bugs.webkit.org/show_bug.cgi?id=206487
<rdar://problem/58721559>

Reviewed by Dean Jackson.

Make MediaPlayerPrivateRemote a message receiver so we don't need a trampoline
for every method in the MediaPlayerPrivateRemoteManager.

No new tests, no change of behavior.

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • GPUProcess/media/RemoteAudioTrackProxy.cpp:

(WebKit::RemoteAudioTrackProxy::RemoteAudioTrackProxy):
(WebKit::RemoteAudioTrackProxy::configurationChanged):
(WebKit::RemoteAudioTrackProxy::willRemove):

  • GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp:
  • GPUProcess/media/RemoteMediaPlayerProxy.cpp:

(WebKit::RemoteMediaPlayerProxy::requestResource):
(WebKit::RemoteMediaPlayerProxy::removeResource):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerNetworkStateChanged):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerReadyStateChanged):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerVolumeChanged):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerMuteChanged):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerTimeChanged):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerDurationChanged):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerRateChanged):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerEngineFailedToLoad const):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerPlaybackStateChanged):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerCharacteristicChanged):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerFirstVideoFrameAvailable):
(WebKit::RemoteMediaPlayerProxy::sendCachedState):

  • GPUProcess/media/RemoteMediaResourceManager.cpp:
  • GPUProcess/media/RemoteVideoTrackProxy.cpp:

(WebKit::RemoteVideoTrackProxy::RemoteVideoTrackProxy):
(WebKit::RemoteVideoTrackProxy::configurationChanged):
(WebKit::RemoteVideoTrackProxy::willRemove):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/GPUProcessConnection.cpp:

(WebKit::GPUProcessConnection::didReceiveMessage):

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::requestResource):

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
  • WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in: Added.
  • WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:

(WebKit::RemoteMediaPlayerManager::didReceivePlayerMessage):
(WebKit::RemoteMediaPlayerManager::networkStateChanged): Deleted.
(WebKit::RemoteMediaPlayerManager::readyStateChanged): Deleted.
(WebKit::RemoteMediaPlayerManager::volumeChanged): Deleted.
(WebKit::RemoteMediaPlayerManager::muteChanged): Deleted.
(WebKit::RemoteMediaPlayerManager::timeChanged): Deleted.
(WebKit::RemoteMediaPlayerManager::durationChanged): Deleted.
(WebKit::RemoteMediaPlayerManager::rateChanged): Deleted.
(WebKit::RemoteMediaPlayerManager::playbackStateChanged): Deleted.
(WebKit::RemoteMediaPlayerManager::engineFailedToLoad): Deleted.
(WebKit::RemoteMediaPlayerManager::characteristicChanged): Deleted.
(WebKit::RemoteMediaPlayerManager::sizeChanged): Deleted.
(WebKit::RemoteMediaPlayerManager::addRemoteAudioTrack): Deleted.
(WebKit::RemoteMediaPlayerManager::removeRemoteAudioTrack): Deleted.
(WebKit::RemoteMediaPlayerManager::remoteAudioTrackConfigurationChanged): Deleted.
(WebKit::RemoteMediaPlayerManager::addRemoteVideoTrack): Deleted.
(WebKit::RemoteMediaPlayerManager::removeRemoteVideoTrack): Deleted.
(WebKit::RemoteMediaPlayerManager::remoteVideoTrackConfigurationChanged): Deleted.
(WebKit::RemoteMediaPlayerManager::firstVideoFrameAvailable): Deleted.
(WebKit::RemoteMediaPlayerManager::requestResource): Deleted.
(WebKit::RemoteMediaPlayerManager::removeResource): Deleted.
(WebKit::RemoteMediaPlayerManager::updateCachedState): Deleted.

  • WebProcess/GPU/media/RemoteMediaPlayerManager.h:

(WebKit::RemoteMediaPlayerManager::didReceiveMessageFromGPUProcess): Deleted.

  • WebProcess/GPU/media/RemoteMediaPlayerManager.messages.in:
9:08 AM Changeset in webkit [254808] by Antti Koivisto
  • 7 edits in trunk/Source/WebCore

[LFC] Devirtualize FormattingState
https://bugs.webkit.org/show_bug.cgi?id=206485

Reviewed by Zalan Bujtas.

The only reason it is virtual is the destructor.

  • layout/FormattingState.h:
  • layout/LayoutState.cpp:

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

  • layout/LayoutState.h:
  • layout/blockformatting/BlockFormattingState.h:
  • layout/inlineformatting/InlineFormattingState.h:
  • layout/tableformatting/TableFormattingState.h:
8:43 AM Changeset in webkit [254807] by cathiechen
  • 47 edits in trunk

Add support for scroll behavior relies on ScrollAnimation of the Web process
https://bugs.webkit.org/show_bug.cgi?id=204882

Reviewed by Frédéric Wang

Based on the patch by Frédéric Wang.

LayoutTests/imported/w3c:

Enable CSSOMViewSmoothScrollingEnabled on scroll behavior tests and update expectations.

  • web-platform-tests/css/cssom-view/scroll-behavior-default-css-expected.txt:
  • web-platform-tests/css/cssom-view/scroll-behavior-default-css.html:
  • web-platform-tests/css/cssom-view/scroll-behavior-element-expected.txt:
  • web-platform-tests/css/cssom-view/scroll-behavior-element.html:
  • web-platform-tests/css/cssom-view/scroll-behavior-main-frame-root-expected.txt:
  • web-platform-tests/css/cssom-view/scroll-behavior-main-frame-root.html:
  • web-platform-tests/css/cssom-view/scroll-behavior-main-frame-window-expected.txt:
  • web-platform-tests/css/cssom-view/scroll-behavior-main-frame-window.html:
  • web-platform-tests/css/cssom-view/scroll-behavior-scrollintoview-nested-expected.txt:
  • web-platform-tests/css/cssom-view/scroll-behavior-scrollintoview-nested.html:
  • web-platform-tests/css/cssom-view/scroll-behavior-smooth-positions.html:
  • web-platform-tests/css/cssom-view/scroll-behavior-subframe-root-expected.txt:
  • web-platform-tests/css/cssom-view/scroll-behavior-subframe-root.html:
  • web-platform-tests/css/cssom-view/scroll-behavior-subframe-window-expected.txt:
  • web-platform-tests/css/cssom-view/scroll-behavior-subframe-window.html:

Source/WebCore:

This patch introduces a programmatic smooth scrolling in WebKit from the CSSOM View
specification [1]. To use this effect, web developers can pass a behavior parameter (auto,
smooth, or instant) to Element.scroll, Element.scrollTo, Element.scrollBy,
Element.scrollIntoView, Window.scroll, Window.scrollTo or Window.scrollBy [2]. When behavior
is auto, the instant/smooth characteristic is actually taken from the value of a new CSS
scroll-behavior property [3]. Both the new CSS and DOM behavior are protected by a runtime
flag.

[1] https://drafts.csswg.org/cssom-view
[2] https://drafts.csswg.org/cssom-view/#dictdef-scrolloptions
[3] https://drafts.csswg.org/cssom-view/#propdef-scroll-behavior

Tests: imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-default-css.html

imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-element.html
imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-root.html
imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-window.html
imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-scrollintoview-nested.html
imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-smooth-positions.html
imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-root.html
imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-window.html

  • Sources.txt: Build ScrollAnimationSmooth.cpp on all platforms.
  • SourcesGTK.txt: Remove ScrollAnimationSmooth.cpp since it is built on all platforms now.
  • dom/Element.cpp:

(WebCore::Element::scrollIntoView): Pass scroll behavior, if any.
(WebCore::Element::scrollBy):
(WebCore::Element::scrollTo): Handle the case when scroll behavior is smooth.
(WebCore::Element::setScrollLeft): Handle the case when scroll behavior is smooth.
(WebCore::Element::setScrollTop): Handle the case when scroll behavior is smooth.

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::scrollBy const):
(WebCore::DOMWindow::scrollTo const): Handle the case when scroll behavior is smooth.
The optimization of cancel (0, 0) scrolling is skipped if an animated scroll is in progress.
Otherwise, the previous scroll won't be stopped by a follow-up scroll.

  • page/FrameView.cpp:

(WebCore::FrameView::setScrollPosition):
(WebCore::FrameView::scrollToOffsetWithAnimation): Start an animated scroll.

  • page/FrameView.h:
  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):

  • platform/ScrollAnimation.h:

(WebCore::ScrollAnimation::scroll): Function to animate scrolling to a specified position.

  • platform/ScrollAnimationSmooth.cpp: Build this file on all platforms. Add a

smoothFactorForProgrammaticScroll parameter to slow down the smooth scrolling.
(WebCore::ScrollAnimationSmooth::scroll):
(WebCore::ScrollAnimationSmooth::updatePerAxisData): Scale the time parameters of the
animation so that it looks smoother.

  • platform/ScrollAnimationSmooth.h: Declare the class on all platforms.
  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::ScrollAnimator): Initialize animation member for programmatic scrolling.
(WebCore::ScrollAnimator::scrollToOffset): Animate scrolling to the specified position.
(WebCore::ScrollAnimator::cancelAnimations): Copy logic from ScrollAnimationSmooth.cpp.
(WebCore::ScrollAnimator::serviceScrollAnimations): Ditto.
(WebCore::ScrollAnimator::willEndLiveResize): Ditto.
(WebCore::ScrollAnimator::didAddVerticalScrollbar): Ditto.
(WebCore::ScrollAnimator::didAddHorizontalScrollbar): Ditto.

  • platform/ScrollAnimator.h: New animation member for smooth programmatic scrolling.

(WebCore::ScrollAnimator::ScrollAnimator::cancelAnimations): Deleted.
(WebCore::ScrollAnimator::ScrollAnimator::serviceScrollAnimations): Deleted.
(WebCore::ScrollAnimator::ScrollAnimator::willEndLiveResize): Deleted.
(WebCore::ScrollAnimator::ScrollAnimator::didAddVerticalScrollbar): Deleted.
(WebCore::ScrollAnimator::ScrollAnimator::didAddHorizontalScrollbar): Deleted.

  • platform/ScrollTypes.h: Add ScrollBehaviorStatus to indicate the status of scrolling.
  • platform/ScrollView.cpp:

(WebCore::ScrollView::setScrollPosition): Follow the CSSOM View spec: If a scroll is in
progress, we interrupt it and continue the scroll call (even when we are at the final position).

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

(WebCore::ScrollableArea::scrollToOffsetWithAnimation):
(WebCore::ScrollableArea::setScrollOffsetFromInternals):
(WebCore::ScrollableArea::setScrollOffsetFromAnimation): To avoid iterate calling,
move the requestScrollPositionUpdate(position) checking out of setScrollOffsetFromAnimation().

  • platform/ScrollableArea.h:

(WebCore::ScrollableArea::currentScrollBehaviorStatus const): Maintain currentScrollBehaviorStatus.
(WebCore::ScrollableArea::setScrollBehaviorStatus):

  • platform/generic/ScrollAnimatorGeneric.cpp:

(WebCore::ScrollAnimatorGeneric::updatePosition):

  • platform/mac/ScrollAnimatorMac.mm:

(WebCore::ScrollAnimatorMac::cancelAnimations): Call parent member to handle programmatic scrolling.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::setScrollLeft): Add flag to indicate animated or not.
(WebCore::RenderBox::setScrollTop): Ditto.
(WebCore::RenderBox::setScrollPosition):

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

(WebCore::RenderLayer::scrollToXPosition): Ditto.
(WebCore::RenderLayer::scrollToYPosition): Ditto.
(WebCore::RenderLayer::scrollToPosition):
(WebCore::RenderLayer::scrollToOffset): Follow the CSSOM View spec: If a scroll is in
progress, we interrupt it and continue the scroll call (even when we are at the final
position). It's ScrollBehaviorType::Instant scroll.
(WebCore::RenderLayer::requestScrollPositionUpdate):
(WebCore::RenderLayer::scrollToOffsetWithAnimation): Ditto. This is similar to scrollToOffset
but animates the scroll. It's ScrollBehaviorType::Smooth scroll.
(WebCore::RenderLayer::scrollTo):
(WebCore::RenderLayer::scrollRectToVisible): Again don't do an early return if scroll is in
progress. We call scrollToOffsetWithAnimation instead of scrollToOffset when appropriate.
Note that this function may not work well for several nested scroll boxes with at least one
element with smooth behavior. It will handled in bug Follow.

  • rendering/RenderLayer.h: Add scroll behavior to ScrollTectToVisibleOptions.
  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::setScrollLeft): Add animated flag.
(WebCore::RenderListBox::setScrollTop): Ditto.

  • rendering/RenderListBox.h:
  • rendering/RenderTextControlSingleLine.cpp:

(WebCore::RenderTextControlSingleLine::setScrollLeft):
(WebCore::RenderTextControlSingleLine::setScrollTop):

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

(WebCore::Internals::unconstrainedScrollTo):

LayoutTests:

  • platform/mac-wk1/TestExpectations: Skip these tests on WK1 as they don't work for now.
8:30 AM Changeset in webkit [254806] by Antti Koivisto
  • 11 edits
    1 copy
    1 add in trunk/Source/WebCore

[LFC][Integration] Use integration specific layout tree builder and data structures
https://bugs.webkit.org/show_bug.cgi?id=206483

Reviewed by Zalan Bujtas.

The generic tree builder and the LayoutTreeContent class are not optimal for integrated layout.

This patch adds LayoutIntegration::BoxTree type for building and owning Layout::Boxes for a single flow.
It also devirtualizes Layout::Box for faster destruction (the only virtual function was the destructor).

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • layout/integration/LayoutIntegrationBoxTree.cpp: Added.

(WebCore::LayoutIntegration::BoxTree::BoxTree):
(WebCore::LayoutIntegration::BoxTree::buildTree):

Only handle supported content.

(WebCore::LayoutIntegration::BoxTree::layoutBoxForRenderer const):
(WebCore::LayoutIntegration::BoxTree::rendererForLayoutBox const):

For small content just traverse the vector. Construct lookup maps lazily for larger content.

  • layout/integration/LayoutIntegrationBoxTree.h: Copied from Source/WebCore/layout/layouttree/LayoutContainer.h.

(WebCore::LayoutIntegration::BoxTree::rootLayoutBox const):
(WebCore::LayoutIntegration::BoxTree::rootLayoutBox):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::LineLayout):
(WebCore::LayoutIntegration::LineLayout::layout):
(WebCore::LayoutIntegration::LineLayout::textBoxesFor const):
(WebCore::LayoutIntegration::LineLayout::elementBoxFor const):
(WebCore::LayoutIntegration::LineLayout::rootLayoutBox const):
(WebCore::LayoutIntegration::LineLayout::rootLayoutBox):
(WebCore::LayoutIntegration::LineLayout::hitTest):

  • layout/integration/LayoutIntegrationLineLayout.h:
  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::~Box):

  • layout/layouttree/LayoutBox.h:

Devirtualize.

  • layout/layouttree/LayoutContainer.cpp:

(WebCore::Layout::Container::appendChild):

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

(WebCore::Layout::TreeBuilder::createBox):
(WebCore::Layout::TreeBuilder::createTextBox):
(WebCore::Layout::TreeBuilder::createContainer):
(WebCore::Layout::TreeBuilder::createLayoutBox):

Factor ownership handling to these create functions.

(WebCore::Layout::TreeBuilder::buildTableStructure):
(WebCore::Layout::TreeBuilder::buildSubTree):

  • layout/layouttree/LayoutTreeBuilder.h:

(WebCore::Layout::LayoutTreeContent::addBox):
(WebCore::Layout::LayoutTreeContent::addContainer):

Put Boxes and Containers to different maps for correct destruction.

8:02 AM Changeset in webkit [254805] by Alan Bujtas
  • 7 edits in trunk/Source/WebCore

[LFC][IFC] Move away from placing individual InlineItems on the line
https://bugs.webkit.org/show_bug.cgi?id=206479
<rdar://problem/58716223>

Reviewed by Antti Koivisto.

<div> text content and more </div>
[ ][text][ ][content][ ][and][ ]more[ ]

Instead of placing all these inline items on the line (LineBuilder::InlineItemRun) and merge them at InlineBuilder::close(),
let's expand existing runs(LineBuilder::Run) when possible ([text content and ][more]).
This helps performance and memory consumption when the line ends up having many inline itmes (e.g. white-space: nowrap).

  • layout/displaytree/DisplayRun.h:

(WebCore::Display::Run::TextContext::expand):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):

  • layout/inlineformatting/InlineFormattingContextQuirks.cpp:

(WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::LineBuilder):
(WebCore::Layout::LineBuilder::initialize):
(WebCore::Layout::LineBuilder::close):
(WebCore::Layout::LineBuilder::alignContentVertically):
(WebCore::Layout::LineBuilder::justifyRuns):
(WebCore::Layout::LineBuilder::alignHorizontally):
(WebCore::Layout::LineBuilder::removeTrailingTrimmableContent):
(WebCore::Layout::LineBuilder::visuallyCollapsePreWrapOverflowContent):
(WebCore::Layout::LineBuilder::collectHangingContent):
(WebCore::Layout::LineBuilder::append):
(WebCore::Layout::LineBuilder::appendNonBreakableSpace):
(WebCore::Layout::LineBuilder::appendInlineContainerEnd):
(WebCore::Layout::LineBuilder::appendTextContent):
(WebCore::Layout::LineBuilder::appendNonReplacedInlineBox):
(WebCore::Layout::LineBuilder::appendLineBreak):
(WebCore::Layout::LineBuilder::isVisuallyNonEmpty const):
(WebCore::Layout::LineBuilder::TrimmableTrailingContent::TrimmableTrailingContent):
(WebCore::Layout::LineBuilder::TrimmableTrailingContent::addFullyTrimmableContent):
(WebCore::Layout::LineBuilder::TrimmableTrailingContent::addPartiallyTrimmableContent):
(WebCore::Layout::LineBuilder::TrimmableTrailingContent::remove):
(WebCore::Layout::LineBuilder::TrimmableTrailingContent::removePartiallyTrimmableContent):
(WebCore::Layout::LineBuilder::Run::Run):
(WebCore::Layout::m_textContext):
(WebCore::Layout::LineBuilder::Run::expand):
(WebCore::Layout::LineBuilder::Run::hasTrailingLetterSpacing const):
(WebCore::Layout::LineBuilder::Run::trailingLetterSpacing const):
(WebCore::Layout::LineBuilder::Run::removeTrailingLetterSpacing):
(WebCore::Layout::LineBuilder::Run::removeTrailingWhitespace):
(WebCore::Layout::LineBuilder::Run::visuallyCollapseTrailingWhitespace):
(WebCore::Layout::LineBuilder::Run::adjustExpansionBehavior):
(WebCore::Layout::LineBuilder::Run::expansionBehavior const):
(WebCore::Layout::LineBuilder::Run::setComputedHorizontalExpansion):
(WebCore::Layout::LineBuilder::ContinuousContent::canInlineItemRunBeExpanded): Deleted.
(WebCore::Layout::LineBuilder::ContinuousContent::ContinuousContent): Deleted.
(WebCore::Layout::LineBuilder::ContinuousContent::isEligible const): Deleted.
(WebCore::Layout::LineBuilder::ContinuousContent::append): Deleted.
(WebCore::Layout::LineBuilder::ContinuousContent::close): Deleted.
(WebCore::Layout::m_isCollapsedToVisuallyEmpty): Deleted.
(WebCore::Layout::shouldPreserveLeadingContent): Deleted.
(WebCore::Layout::LineBuilder::revert): Deleted.
(WebCore::Layout::LineBuilder::justifyRuns const): Deleted.
(WebCore::Layout::LineBuilder::TrimmableTrailingContent::append): Deleted.
(WebCore::Layout::LineBuilder::TrimmableTrailingContent::removeTrailingRun): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::InlineItemRun): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::isTrimmableWhitespace const): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::hasTrailingLetterSpacing const): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::trailingLetterSpacing const): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::setCollapsesToZeroAdvanceWidth): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::removeTrailingLetterSpacing): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::hasEmptyTextContent const): Deleted.

  • layout/inlineformatting/InlineLineBuilder.h:

(WebCore::Layout::LineBuilder::Run::logicalWidth const):
(WebCore::Layout::LineBuilder::Run::shrinkHorizontally):
(WebCore::Layout::LineBuilder::Run::adjustLogicalTop):
(WebCore::Layout::LineBuilder::Run::hasTrailingWhitespace const):
(WebCore::Layout::LineBuilder::Run::hasCollapsibleTrailingWhitespace const):
(WebCore::Layout::LineBuilder::Run::hasCollapsedTrailingWhitespace const):
(WebCore::Layout::LineBuilder::Run::trailingWhitespaceWidth const):
(WebCore::Layout::LineBuilder::TrimmableTrailingContent::width const):
(WebCore::Layout::LineBuilder::TrimmableTrailingContent::isTrailingRunFullyTrimmable const):
(WebCore::Layout::LineBuilder::TrimmableTrailingContent::isTrailingRunPartiallyTrimmable const):
(WebCore::Layout::LineBuilder::TrimmableTrailingContent::reset):
(WebCore::Layout::LineBuilder::Run::trailingWhitespaceType const):
(WebCore::Layout::LineBuilder::Run::isCollapsedToVisuallyEmpty const): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::layoutBox const): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::style const): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::logicalLeft const): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::logicalWidth const): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::textContext const): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::isText const): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::isBox const): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::isContainerStart const): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::isContainerEnd const): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::isLineBreak const): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::type const): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::isCollapsed const): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::moveHorizontally): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::adjustLogicalWidth): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::isCollapsedToZeroAdvanceWidth const): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::isCollapsible const): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::isWhitespace const): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::hasExpansionOpportunity const): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::operator== const): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::operator!= const): Deleted.
(WebCore::Layout::LineBuilder::TrimmableTrailingContent::firstRunIndex): Deleted.

  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::LineLayoutContext::layoutLine):

7:19 AM Changeset in webkit [254804] by Claudio Saavedra
  • 4 edits in trunk/Source

[GTK] Remove usage of deprecated GTimeVal
https://bugs.webkit.org/show_bug.cgi?id=206358

Reviewed by Žan Doberšek.

Source/WebKit:

Use g_get_monotonic_time() for counting clicks instead of
deprecated and unsafe API.

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(ClickCounter::currentClickCountForGdkButtonEvent):

Source/WTF:

Use g_get_real_time() directly instead of deprecated and unsafe API.

  • wtf/CurrentTime.cpp:

(WTF::currentTime):

5:52 AM Changeset in webkit [254803] by Diego Pino Garcia
  • 15 edits in trunk/LayoutTests

[WPE] Gardening, rebase lines and lint TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=206482

Unreviewed gardening.

  • platform/wpe/TestExpectations: Removed duplicated entries and

references to non-existing files

  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-events.https-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/idlharness.https-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/fetch/api/basic/request-headers.any.worker-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.any-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.any.worker-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/color-prop-02-f-manual-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/color-prop-03-t-manual-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/shapes-intro-01-t-manual-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/types-dom-08-f-manual-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/svg/path/distance/pathLength-positive-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/svg/path/distance/pathLength-positive-percentage-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/svg/shapes/reftests/pathlength-003-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/svg/shapes/scripted/disabled-shapes-not-hit-expected.txt:

Jan 18, 2020:

10:02 PM Changeset in webkit [254802] by ddkilzer@apple.com
  • 3 edits in trunk/Source/WebCore

REGRESSION (r254790): Update DerivedSources-{input,output}.xcfilelist to fix build

Add support for scroll behavior parsing
<https://bugs.webkit.org/show_bug.cgi?id=205009>

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • Update after commit r254790.
3:14 PM Changeset in webkit [254801] by caitp@igalia.com
  • 21 edits
    6 adds in trunk

[JSC] add DFG/FTL support for op_to_property_key
https://bugs.webkit.org/show_bug.cgi?id=206368

JSTests:

Reviewed by Saam Barati.

  • stress/class-fields-to-property-key-const-string-ftl.js: Added.
  • stress/class-fields-to-property-key-const-symbol-ftl.js: Added.
  • stress/class-fields-to-property-key-slow-object-tostring-ftl.js: Added.
  • stress/class-fields-to-property-key-slow-object-valueof-ftl.js: Added.
  • stress/class-fields-to-property-key-string-object-ftl.js: Added.
  • stress/class-fields-to-property-key-string-or-string-object-ftl.js: Added.

Source/JavaScriptCore:

Reviewed by Saam Barati.

Implement DFG/FTL support for the op_to_property_key opcode. This operates
similar to the LLInt and base JIT implementations, in which we avoid invoking
the full ToPropertyKey operation if the source operand is already a String or
Symbol at runtime.

If DFG/FTL are confident the value will be a String or Symbol at compile time,
the operation is omitted entirely in the final graph.

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGConstantFoldingPhase.cpp:

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

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGNode.h:

(JSC::DFG::Node::convertToToString):

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

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileToPrimitive):
(JSC::DFG::SpeculativeJIT::compileToPropertyKey):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

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

12:35 PM Changeset in webkit [254800] by Wenson Hsieh
  • 8 edits in trunk/Source/WebCore

Make pasteboard markup sanitization more robust
https://bugs.webkit.org/show_bug.cgi?id=206379
<rdar://problem/58660859>

Reviewed by Ryosuke Niwa.

Makes markup sanitization when copying and pasting more robust in some circumstances (see the bug for additional
details).

  • editing/markup.cpp:

(WebCore::createPageForSanitizingWebContent):

Adopt the new setting when creating the temporary web page used to sanitize markup coming from the pasteboard.

  • html/parser/HTMLParserOptions.cpp:

(WebCore::HTMLParserOptions::HTMLParserOptions):

  • html/parser/HTMLParserOptions.h:

Rename scriptEnabled to scriptingFlag, since parsing script elements may now be allowed even when JavaScript
execution is disabled. The term "scripting flag" also closely matches the wording of the HTML parsing
specification.

  • html/parser/HTMLTokenizer.cpp:

(WebCore::HTMLTokenizer::updateStateFor):

  • html/parser/HTMLTreeBuilder.cpp:

(WebCore::HTMLTreeBuilder::processStartTagForInBody):
(WebCore::HTMLTreeBuilder::processStartTagForInHead):

  • page/Settings.yaml:

Add a new setting to determine whether to consider the scripting flag on when parsing HTML. By default, we will
only turn the scripting flag on if script execution is enabled; however, this may be set such that we may
consider the scripting flag set, even though script execution is disabled.

  • page/SettingsBase.h:
11:43 AM Changeset in webkit [254799] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[WPE] Gardening, synchronize with GTK TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=206473

Unreviewed gardening.

  • platform/wpe/TestExpectations:
9:51 AM Changeset in webkit [254798] by Kocsen Chung
  • 1 copy in tags/Safari-610.1.1.1

Tag Safari-610.1.1.1.

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

[LFC] LayoutState constructor shouldn't take LayoutTreeContent
https://bugs.webkit.org/show_bug.cgi?id=206471

Reviewed by Zalan Bujtas.

It just needs the root container.

This is preparation for more performant layout box construction and ownership model in the integration code.

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

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

Take Document (to compute quirks mode) and the root box only.

(WebCore::Layout::LayoutState::displayBoxForRootLayoutBox):
(WebCore::Layout::LayoutState::setViewportSize):
(WebCore::Layout::LayoutState::viewportSize const):
(WebCore::Layout::LayoutState::setIsIntegratedRootBoxFirstChild):
(WebCore::Layout::LayoutState::isIntegratedRootBoxFirstChild const): Deleted.

Make this a bit set by the integration code.

  • layout/LayoutState.h:

(WebCore::Layout::LayoutState::root const):
(WebCore::Layout::LayoutState::isIntegratedRootBoxFirstChild const):
(WebCore::Layout::LayoutState::rootRenderer const): Deleted.

  • layout/Verification.cpp:

(WebCore::Layout::LayoutContext::verifyAndOutputMismatchingLayoutTree):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::constraintsForLine):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::layout):

Also allocate LayoutState directly from LineLayout using Optional.

  • layout/integration/LayoutIntegrationLineLayout.h:
  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::printLayoutTreeForLiveDocuments):

  • page/FrameViewLayoutContext.cpp:

(WebCore::FrameViewLayoutContext::layoutUsingFormattingContext):

  • rendering/updating/RenderTreeUpdater.cpp:
8:46 AM Changeset in webkit [254796] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Rename trailing collapsible content to trailing trimmable
https://bugs.webkit.org/show_bug.cgi?id=206447
<rdar://problem/58697414>

Reviewed by Antti Koivisto.

Trimming is the spec term for removing trailing inline content (also this helps to not confuse
trailing trimming and whitespace collapsing.)

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::LineBuilder):
(WebCore::Layout::LineBuilder::initialize):
(WebCore::Layout::LineBuilder::close):
(WebCore::Layout::LineBuilder::revert):
(WebCore::Layout::LineBuilder::removeTrailingTrimmableContent):
(WebCore::Layout::LineBuilder::visuallyCollapsePreWrapOverflowContent):
(WebCore::Layout::LineBuilder::collectHangingContent):
(WebCore::Layout::LineBuilder::appendInlineContainerEnd):
(WebCore::Layout::LineBuilder::appendTextContent):
(WebCore::Layout::LineBuilder::appendNonReplacedInlineBox):
(WebCore::Layout::LineBuilder::TrimmableTrailingContent::TrimmableTrailingContent):
(WebCore::Layout::LineBuilder::TrimmableTrailingContent::append):
(WebCore::Layout::LineBuilder::TrimmableTrailingContent::remove):
(WebCore::Layout::LineBuilder::TrimmableTrailingContent::removeTrailingRun):
(WebCore::Layout::LineBuilder::InlineItemRun::isTrimmableWhitespace const):
(WebCore::Layout::LineBuilder::removeTrailingCollapsibleContent): Deleted.
(WebCore::Layout::LineBuilder::CollapsibleContent::CollapsibleContent): Deleted.
(WebCore::Layout::LineBuilder::CollapsibleContent::append): Deleted.
(WebCore::Layout::LineBuilder::CollapsibleContent::collapse): Deleted.
(WebCore::Layout::LineBuilder::CollapsibleContent::collapseTrailingRun): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::isCollapsibleWhitespace const): Deleted.

  • layout/inlineformatting/InlineLineBuilder.h:

(WebCore::Layout::LineBuilder::trimmableTrailingWidth const):
(WebCore::Layout::LineBuilder::isTrailingRunFullyTrimmable const):
(WebCore::Layout::LineBuilder::TrimmableTrailingContent::isTrailingRunFullyTrimmable const):
(WebCore::Layout::LineBuilder::TrimmableTrailingContent::isTrailingRunPartiallyTrimmable const):
(WebCore::Layout::LineBuilder::TrimmableTrailingContent::reset):
(WebCore::Layout::LineBuilder::trailingCollapsibleWidth const): Deleted.
(WebCore::Layout::LineBuilder::isTrailingRunFullyCollapsible const): Deleted.
(WebCore::Layout::LineBuilder::CollapsibleContent::width const): Deleted.
(WebCore::Layout::LineBuilder::CollapsibleContent::firstRunIndex): Deleted.
(WebCore::Layout::LineBuilder::CollapsibleContent::isEmpty const): Deleted.
(WebCore::Layout::LineBuilder::CollapsibleContent::isTrailingRunFullyCollapsible const): Deleted.
(WebCore::Layout::LineBuilder::CollapsibleContent::isTrailingRunPartiallyCollapsible const): Deleted.
(WebCore::Layout::LineBuilder::CollapsibleContent::reset): Deleted.

  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::LineLayoutContext::tryAddingFloatItems):
(WebCore::Layout::LineLayoutContext::tryAddingInlineItems):

8:20 AM Changeset in webkit [254795] by Kocsen Chung
  • 8 edits in branches/safari-610.1.1-branch/Source

Versioning.

6:01 AM Changeset in webkit [254794] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

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

fast/css/content/content-none.html asserts in
LineBuilder::CollapsibleContent::collapse() (Requested by
zalan on #webkit).

Reverted changeset:

"[LFC][IFC] Do not construct a dedicated run for the trailing
(fully) collapsed whitespace."
https://bugs.webkit.org/show_bug.cgi?id=206428
https://trac.webkit.org/changeset/254780

Jan 17, 2020:

11:21 PM Changeset in webkit [254793] by Simon Fraser
  • 4 edits in trunk/LayoutTests

REGRESSION (r252205?): [ Mac wk2 ] tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html became very flaky
https://bugs.webkit.org/show_bug.cgi?id=206296

Reviewed by Ryosuke Niwa.

Attempt to de-flake this test. It was using js-test-pre/post, but not jsTestIsAsync/finishJSTest(), and seemed to sometimes
dump testPassed() a second even after notifyDone() was called. The <pre> is made fixed size so that the length of the layer
tree dump doesn't change the layer sizes.

Also clean it up to remove unused CSS and script.

  • platform/mac-wk2/TestExpectations:
  • tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt:
  • tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html:
11:09 PM Changeset in webkit [254792] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GTK] Gardening mouse cursor style change tests
https://bugs.webkit.org/show_bug.cgi?id=206455

Unreviewed gardening.

Patch by Lauro Moura <Lauro Moura> on 2020-01-17

  • platform/gtk/TestExpectations:
10:56 PM Changeset in webkit [254791] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GTK] Garden webrtc b/f cache tests
https://bugs.webkit.org/show_bug.cgi?id=206465

Unreviewed gardening.

Patch by Lauro Moura <Lauro Moura> on 2020-01-17

  • platform/gtk/TestExpectations:
9:49 PM Changeset in webkit [254790] by cathiechen
  • 46 edits
    5 adds in trunk

Add support for scroll behavior parsing
https://bugs.webkit.org/show_bug.cgi?id=205009

Reviewed by Frédéric Wang.

Based on the patch by Frédéric Wang.

LayoutTests/imported/w3c:

  • web-platform-tests/css/cssom-view/inheritance-expected.txt:
  • web-platform-tests/css/cssom-view/inheritance.html:
  • web-platform-tests/css/cssom-view/parsing/scroll-behavior-computed-expected.txt:
  • web-platform-tests/css/cssom-view/parsing/scroll-behavior-computed.html:
  • web-platform-tests/css/cssom-view/parsing/scroll-behavior-valid-expected.txt:
  • web-platform-tests/css/cssom-view/parsing/scroll-behavior-valid.html:

Source/WebCore:

Add support for parsing scroll-behavior css property and ScrollOptions.

Tests: LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/inheritance.html

LayoutTests/web-platform-tests/css/cssom-view/parsing/scroll-behavior-computed.html
LayoutTests/web-platform-tests/css/cssom-view/parsing/scroll-behavior-valid.html

  • CMakeLists.txt: Add IDL files for ScrollOptions and ScrollBehavior.
  • DerivedSources.make:
  • Headers.cmake: Add headers for ScrollBehavor and ScrollOptions.
  • Sources.txt: Add ScrollBehavor and ScrollOptions implementation.
  • WebCore.xcodeproj/project.pbxproj: Add files to the build system.
  • css/CSSComputedStyleDeclaration.cpp: Handle scroll-behavior.

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSProperties.json: Add scroll-behavior.
  • css/CSSValueKeywords.in: Add keywords for scroll-behavior.
  • css/parser/CSSParserContext.cpp: Add runtime config for scroll-behavior.

(WebCore::CSSParserContext::CSSParserContext):
(WebCore::operator==):

  • css/parser/CSSParserContext.h: Ditto.

(WebCore::CSSParserContextHash::hash):

  • css/parser/CSSParserFastPaths.cpp: Remove scroll-behavior templates. It is handled in the slow path since property can be disabled.

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeScrollBehavior):
(WebCore::CSSPropertyParser::parseSingleValue): Parse scroll-behavior (only if enabled).

  • page/ScrollBehavior.cpp: Added.

(WebCore::useSmoothScrolling): Helper funciton to determine the scroll behavior to apply to an element from the CSS and DOM behavior.

  • page/ScrollBehavior.h: Added.
  • page/ScrollBehavior.idl: Added.
  • page/ScrollIntoViewOptions.h: Make this class inherits from ScrollOption. Also remove unnecessary forward declaration.
  • page/ScrollIntoViewOptions.idl: Make this class inherits from ScrollOption.
  • page/ScrollOptions.h: Added.
  • page/ScrollOptions.idl: Added.
  • page/ScrollToOptions.h: Make this struct inherits from ScrollOptions.

(WebCore::ScrollToOptions::ScrollToOptions):
(WebCore::normalizeNonFiniteCoordinatesOrFallBackTo): Copy the current ScrollToOptions so that the scroll behavior is preserved.

  • page/ScrollToOptions.idl: Make this class inherit from ScrollOptions.
  • page/Settings.yaml: New setting for CSSOM View smooth scrolling.
  • rendering/style/RenderStyle.h: Handle 'smooth scrolling' boolean data.

(WebCore::RenderStyle::useSmoothScrolling const):
(WebCore::RenderStyle::setUseSmoothScrolling):
(WebCore::RenderStyle::initialUseSmoothScrolling):

  • rendering/style/StyleRareNonInheritedData.cpp:

(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator== const):

  • rendering/style/StyleRareNonInheritedData.h:
  • style/StyleBuilderConverter.h:

(WebCore::Style::BuilderConverter::convertSmoothScrolling):

Source/WebKit:

Add CSSOM smooth scrolling as an experimental feature.

  • Shared/WebPreferences.yaml:

Source/WebKitLegacy/mac:

Add run time flag for CSSOMViewSmoothScrolling.

  • WebView/WebPreferenceKeysPrivate.h: Handle CSSOMViewSmoothScrolling by.
  • WebView/WebPreferences.mm:

([WebPreferences initialize]): Disable CSSOMViewSmoothScrolling by default.
(-[WebPreferences CSSOMViewSmoothScrollingEnabled]): Getter.
(-[WebPreferences setCSSOMViewSmoothScrollingEnabled:]): Setter.

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKitLegacy/win:

  • Interfaces/IWebPreferencesPrivate.idl: Handle smooth scrolling option.
  • WebPreferenceKeysPrivate.h: Ditto.
  • WebPreferences.cpp: Ditto.

(WebPreferences::initializeDefaultSettings):
(WebPreferences::CSSOMViewSmoothScrollingEnabled):
(WebPreferences::setCSSOMViewSmoothScrollingEnabled):

  • WebPreferences.h: Ditto.
  • WebView.cpp: Ditto.

(WebView::notifyPreferencesChanged):

Tools:

  • DumpRenderTree/TestOptions.cpp:

(TestOptions::TestOptions): Parse CSSOMViewSmoothScrollingEnabled.

  • DumpRenderTree/TestOptions.h: Add CSSOMViewSmoothScrollingEnabled, disabled by default.
  • DumpRenderTree/mac/DumpRenderTree.mm:

(enableExperimentalFeatures):
(setWebPreferencesForTestOptions): Set CSSOMViewSmoothScrollingEnabled from the test options.

9:42 PM Changeset in webkit [254789] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

iOS: Prepare deploying Ref/RefPtr in touch event code
https://bugs.webkit.org/show_bug.cgi?id=206466

Reviewed by Wenson Hsieh.

Introduce a new variant of dispatchTouchEvent, which takes EventTargetTouchArrayMap that uses
Ref<EventTarget> as keys instead of raw pointers to EventTarget as is the case in EventTargetTouchMap.

  • page/EventHandler.h:

(WebCore::EventHandler::EventTargetTouchArrayMap): Added.
(WebCore::EventHandler::dispatchTouchEvent): Added the declaration for new variant.

7:24 PM Changeset in webkit [254788] by sbarati@apple.com
  • 5 edits
    1 add in trunk

Air O0 should have better stack allocation
https://bugs.webkit.org/show_bug.cgi?id=206436

Reviewed by Tadeu Zagallo.

JSTests:

  • wasm/stress/dont-stack-overflow-in-air.js: Added.

Source/JavaScriptCore:

This patch adds a simple stack slot allocator to Air O0 to make code
use smaller stack frames. The huge stack frames from the old stack
allocator were leading to stack overflows in some programs. Before,
each Tmp got its own stack slot. The new allocator works similar to O0's
register allocator. This stack allocator linearizes the program and uses live
range end as an opportunity to place the stack slot on a free list of
available stack slots. This patch also fixes an issue in our linearization code
where the head of a block and the tail of another block would share the
same linearization index. This didn't matter for register allocation, but
does matter for the stack allocator. So "live at head", and "live at tail"
now get their own linearization index.

  • b3/air/AirAllocateRegistersAndStackAndGenerateCode.cpp:

(JSC::B3::Air::GenerateAndAllocateRegisters::buildLiveRanges):
(JSC::B3::Air::GenerateAndAllocateRegisters::prepareForGeneration):
(JSC::B3::Air::GenerateAndAllocateRegisters::generate):

  • b3/air/AirAllocateRegistersAndStackAndGenerateCode.h:
  • b3/air/AirLiveness.h:
6:49 PM Changeset in webkit [254787] by ddkilzer@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] Add missing header guards
<https://webkit.org/b/206448>

Reviewed by Mark Lam.

  • heap/IsoHeapCellType.h:
  • wasm/WasmFaultSignalHandler.h:
  • Add #pragma once header guard.
6:22 PM Changeset in webkit [254786] by Simon Fraser
  • 5 edits in trunk

Tools:
fast/forms/ios/zoom-after-input-tap-wide-input.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=206313

Reviewed by Wenson Hsieh.

The timeout was caused by the previous test, fast/forms/ios/validation-bubble-dismiss-on-tap.html,
which puts up a validation bubble whose implementation involves showing a modal UIViewController.
That view controller disappears with an animation, which happened after we're proceeded to the next
test, and the overlay view could intercept touches thus breaking any subsequent touch-based test.

Fix by having platformResetStateToConsistentValues() wait for the presentedViewController to
go to nil, which requires spinning the runloop.

platformResetStateToConsistentValues() will return false if we fail to remove the presented view controller,
which will trigger a timeout with a log.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::platformResetStateToConsistentValues):

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

(WTR::TestController::cocoaResetStateToConsistentValues):

  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformResetStateToConsistentValues):

  • WebKitTestRunner/mac/TestControllerMac.mm:

(WTR::TestController::platformResetStateToConsistentValues):

LayoutTests:
Some iOS tests using UIHelper.dragFromPointToPoint() are flakey
https://bugs.webkit.org/show_bug.cgi?id=206441

Reviewed by Wenson Hsieh.

Unskip tests.

  • platform/ios-wk2/TestExpectations:
  • platform/ios/TestExpectations:
6:13 PM Changeset in webkit [254785] by Megan Gardner
  • 16 edits in trunk

Use Visible Position to calculate Positions for highlights
https://bugs.webkit.org/show_bug.cgi?id=206314

Reviewed by Ryosuke Niwa.

Source/WebCore:

When after layout is complete create a VisibleSelection from and highlight StaticRanges which
don't have position data yet. This will make sure that the information is availble when
rendering, as Visible Positions and Visible Selections cannot be made while rendering.
Also, add the ability to make a VisibleSelection from a Static Range to simplify the code.

Updated Test:

  • LayoutTests/http/wpt/css/css-highlight-api/highlight-text-across-elements.html:
  • LayoutTests/http/wpt/css/css-highlight-api/highlight-text-cascade.html:
  • LayoutTests/http/wpt/css/css-highlight-api/highlight-text-replace.html:
  • LayoutTests/http/wpt/css/css-highlight-api/highlight-text.html:
  • Modules/highlight/HighlightRangeGroup.cpp:

(WebCore::HighlightRangeGroup::HighlightRangeGroup):
(WebCore::HighlightRangeGroup::create):
(WebCore::HighlightRangeGroup::initializeSetLike):
(WebCore::HighlightRangeGroup::removeFromSetLike):
(WebCore::HighlightRangeGroup::clearFromSetLike):
(WebCore::HighlightRangeGroup::addToSetLike):

  • Modules/highlight/HighlightRangeGroup.h:

(WebCore::HighlightRangeData::create):
(WebCore::HighlightRangeData::HighlightRangeData):
(WebCore::HighlightRangeGroup::rangesData const):
(WebCore::HighlightRangeGroup::ranges const): Deleted.

  • Modules/highlight/HighlightRangeGroup.idl:
  • editing/VisibleSelection.cpp:

(WebCore::VisibleSelection::create):

  • editing/VisibleSelection.h:
  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::collectMarkedTextsForHighlights const):

  • rendering/SelectionRangeData.cpp:

(WebCore::SelectionRangeData::selectionStateForRenderer):

LayoutTests:

  • highlight/resources/highlight-frame.html:
  • http/wpt/css/css-highlight-api/highlight-text-across-elements.html:
  • http/wpt/css/css-highlight-api/highlight-text-cascade.html:
  • http/wpt/css/css-highlight-api/highlight-text-replace.html:
  • http/wpt/css/css-highlight-api/highlight-text.html:
6:00 PM Changeset in webkit [254784] by Peng Liu
  • 3 edits in trunk/Source/WebKit

Fix a build failure related to the feature flag (GPU_PROCESS)
https://bugs.webkit.org/show_bug.cgi?id=206453

Reviewed by Eric Carlson.

No new tests - no added or changed functionality.

  • GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in:
  • GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
5:00 PM Changeset in webkit [254783] by mark.lam@apple.com
  • 3 edits
    1 add in trunk

JSModuleLoader's printableModuleKey() should never throw.
https://bugs.webkit.org/show_bug.cgi?id=206461
<rdar://problem/58696678>

Reviewed by Michael Saboff.

JSTests:

  • stress/printableModuleKey-should-never-throw.js: Added.

Source/JavaScriptCore:

Hence, it should be using a CatchScope instead of a ThrowScope.

  • runtime/JSModuleLoader.cpp:

(JSC::printableModuleKey):

4:48 PM Changeset in webkit [254782] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

AX: Unable to use AccessibilityObject::replaceTextInRange to insert text at first time when the text fields are empty
https://bugs.webkit.org/show_bug.cgi?id=206093
<rdar://problem/58491448>

Patch by Canhai Chen <canhai_chen@apple.com> on 2020-01-17
Reviewed by Chris Fleizach.

Source/WebCore:

When we are trying to insert text in an empty text field with (0, 0) range, the frame selection will create a
new VisibleSelection in FrameSelection::setSelectedRange, and the container node that this new VisibleSelection
returns is the parent node of the text field element, which could be a HTMLDivElement or HTMLBodyElement.
Because the container node is not editable, it failed to insert text in Editor::replaceSelectionWithText later.

Return nullptr if the range is (0, 0) and the text length is 0 in AccessibilityObject::rangeForPlainTextRange,
so that when the frame selection is trying to setSelectedRange before replacing text, instead of creating an
uneditable VisibleSelection, it will just return and later in Editor::replaceSelectionWithText, it will use
the default VisibleSelection, of which the container node is an editable TextControlInnerTextElement.

This change does not affect the existing behaviors of text replacement. Add a new test for text replacement
with empty range in editable div, text input, and textarea.

Test: accessibility/mac/replace-text-with-empty-range.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::rangeForPlainTextRange const):

LayoutTests:

Test text replacement with empty range in editable div, text input, and textarea.

  • accessibility/mac/replace-text-with-empty-range-expected.txt: Added.
  • accessibility/mac/replace-text-with-empty-range.html: Added.
4:43 PM Changeset in webkit [254781] by basuke.suzuki@sony.com
  • 49 edits in trunk/Source/bmalloc

[bmalloc] Define alias for std::lock_guard and std::unique_lock for better readability
https://bugs.webkit.org/show_bug.cgi?id=206443

Reviewed by Yusuke Suzuki.

There are two types of lock holder in bmalloc: std::lock_guard and std::unique_lock. Their names are relatively long
and a bit harder to distinguish them each other. Define simple type name for them, LockHolder and UniqueLockHolder.

  • bmalloc/AllIsoHeaps.cpp:

(bmalloc::AllIsoHeaps::AllIsoHeaps):
(bmalloc::AllIsoHeaps::add):
(bmalloc::AllIsoHeaps::head):

  • bmalloc/AllIsoHeaps.h:
  • bmalloc/Allocator.cpp:

(bmalloc::Allocator::reallocateImpl):
(bmalloc::Allocator::refillAllocatorSlowCase):
(bmalloc::Allocator::allocateLarge):

  • bmalloc/CryptoRandom.cpp:

(bmalloc::ARC4RandomNumberGenerator::ARC4RandomNumberGenerator):
(bmalloc::ARC4RandomNumberGenerator::randomValues):

  • bmalloc/Deallocator.cpp:

(bmalloc::Deallocator::scavenge):
(bmalloc::Deallocator::processObjectLog):
(bmalloc::Deallocator::deallocateSlowCase):

  • bmalloc/Deallocator.h:

(bmalloc::Deallocator::lineCache):

  • bmalloc/DebugHeap.cpp:

(bmalloc::DebugHeap::DebugHeap):
(bmalloc::DebugHeap::memalignLarge):
(bmalloc::DebugHeap::freeLarge):

  • bmalloc/DebugHeap.h:
  • bmalloc/DeferredTrigger.h:
  • bmalloc/DeferredTriggerInlines.h:

(bmalloc::DeferredTrigger<trigger>::didBecome):
(bmalloc::DeferredTrigger<trigger>::handleDeferral):

  • bmalloc/Environment.cpp:

(bmalloc::Environment::Environment):

  • bmalloc/Environment.h:
  • bmalloc/Gigacage.cpp:

(bmalloc::PrimitiveDisableCallbacks::PrimitiveDisableCallbacks):
(Gigacage::disablePrimitiveGigacage):
(Gigacage::addPrimitiveDisableCallback):
(Gigacage::removePrimitiveDisableCallback):

  • bmalloc/Heap.cpp:

(bmalloc::Heap::Heap):
(bmalloc::Heap::freeableMemory):
(bmalloc::Heap::markAllLargeAsEligibile):
(bmalloc::Heap::decommitLargeRange):
(bmalloc::Heap::scavenge):
(bmalloc::Heap::scavengeToHighWatermark):
(bmalloc::Heap::deallocateLineCache):
(bmalloc::Heap::allocateSmallChunk):
(bmalloc::Heap::allocateSmallPage):
(bmalloc::Heap::deallocateSmallLine):
(bmalloc::Heap::allocateSmallBumpRangesByMetadata):
(bmalloc::Heap::allocateSmallBumpRangesByObject):
(bmalloc::Heap::splitAndAllocate):
(bmalloc::Heap::allocateLarge):
(bmalloc::Heap::isLarge):
(bmalloc::Heap::largeSize):
(bmalloc::Heap::shrinkLarge):
(bmalloc::Heap::deallocateLarge):
(bmalloc::Heap::externalCommit):
(bmalloc::Heap::externalDecommit):

  • bmalloc/Heap.h:

(bmalloc::Heap::allocateSmallBumpRanges):
(bmalloc::Heap::derefSmallLine):

  • bmalloc/HeapConstants.cpp:

(bmalloc::HeapConstants::HeapConstants):

  • bmalloc/HeapConstants.h:
  • bmalloc/IsoAllocatorInlines.h:

(bmalloc::IsoAllocator<Config>::allocateSlow):
(bmalloc::IsoAllocator<Config>::scavenge):

  • bmalloc/IsoDeallocatorInlines.h:

(bmalloc::IsoDeallocator<Config>::deallocate):
(bmalloc::IsoDeallocator<Config>::scavenge):

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

(bmalloc::passedNumPages>::takeFirstEligible):
(bmalloc::passedNumPages>::didBecome):
(bmalloc::passedNumPages>::didDecommit):
(bmalloc::passedNumPages>::scavengePage):
(bmalloc::passedNumPages>::scavenge):
(bmalloc::passedNumPages>::scavengeToHighWatermark):
(bmalloc::passedNumPages>::forEachCommittedPage):

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

(bmalloc::IsoHeapImpl<Config>::takeFirstEligible):
(bmalloc::IsoHeapImpl<Config>::didBecomeEligibleOrDecommited):
(bmalloc::IsoHeapImpl<Config>::scavenge):
(bmalloc::IsoHeapImpl<Config>::scavengeToHighWatermark):
(bmalloc::IsoHeapImpl<Config>::numLiveObjects):
(bmalloc::IsoHeapImpl<Config>::numCommittedPages):
(bmalloc::IsoHeapImpl<Config>::forEachDirectory):
(bmalloc::IsoHeapImpl<Config>::forEachCommittedPage):
(bmalloc::IsoHeapImpl<Config>::forEachLiveObject):
(bmalloc::IsoHeapImpl<Config>::allocateFromShared):

  • bmalloc/IsoPage.h:
  • bmalloc/IsoPageInlines.h:

(bmalloc::IsoPage<Config>::free):
(bmalloc::IsoPage<Config>::startAllocating):
(bmalloc::IsoPage<Config>::stopAllocating):
(bmalloc::IsoPage<Config>::forEachLiveObject):

  • bmalloc/IsoSharedHeap.h:

(bmalloc::IsoSharedHeap::IsoSharedHeap):

  • bmalloc/IsoSharedHeapInlines.h:

(bmalloc::IsoSharedHeap::allocateNew):
(bmalloc::IsoSharedHeap::allocateSlow):

  • bmalloc/IsoSharedPage.h:
  • bmalloc/IsoSharedPageInlines.h:

(bmalloc::IsoSharedPage::free):
(bmalloc::IsoSharedPage::startAllocating):
(bmalloc::IsoSharedPage::stopAllocating):

  • bmalloc/IsoTLSDeallocatorEntry.h:
  • bmalloc/IsoTLSDeallocatorEntryInlines.h:

(bmalloc::IsoTLSDeallocatorEntry<Config>::IsoTLSDeallocatorEntry):

  • bmalloc/IsoTLSInlines.h:

(bmalloc::IsoTLS::ensureHeap):

  • bmalloc/IsoTLSLayout.cpp:

(bmalloc::IsoTLSLayout::IsoTLSLayout):
(bmalloc::IsoTLSLayout::add):

  • bmalloc/IsoTLSLayout.h:
  • bmalloc/Mutex.h:

(bmalloc::sleep):
(bmalloc::waitUntilFalse):

  • bmalloc/ObjectType.cpp:

(bmalloc::objectType):

  • bmalloc/PerProcess.cpp:

(bmalloc::getPerProcessData):

  • bmalloc/PerProcess.h:

(bmalloc::PerProcess::getSlowCase):

  • bmalloc/Scavenger.cpp:

(bmalloc::Scavenger::Scavenger):
(bmalloc::Scavenger::run):
(bmalloc::Scavenger::runSoon):
(bmalloc::Scavenger::scheduleIfUnderMemoryPressure):
(bmalloc::Scavenger::schedule):
(bmalloc::Scavenger::timeSinceLastFullScavenge):
(bmalloc::Scavenger::timeSinceLastPartialScavenge):
(bmalloc::Scavenger::scavenge):
(bmalloc::Scavenger::partialScavenge):
(bmalloc::Scavenger::freeableMemory):
(bmalloc::Scavenger::threadRunLoop):

  • bmalloc/Scavenger.h:
  • bmalloc/SmallLine.h:

(bmalloc::SmallLine::refCount):
(bmalloc::SmallLine::ref):
(bmalloc::SmallLine::deref):

  • bmalloc/SmallPage.h:

(bmalloc::SmallPage::refCount):
(bmalloc::SmallPage::hasFreeLines const):
(bmalloc::SmallPage::setHasFreeLines):
(bmalloc::SmallPage::ref):
(bmalloc::SmallPage::deref):

  • bmalloc/StaticPerProcess.h:
  • bmalloc/VMHeap.cpp:

(bmalloc::VMHeap::VMHeap):

  • bmalloc/VMHeap.h:
  • bmalloc/Zone.cpp:

(bmalloc::Zone::Zone):

  • bmalloc/Zone.h:
  • bmalloc/bmalloc.cpp:

(bmalloc::api::tryLargeZeroedMemalignVirtual):
(bmalloc::api::freeLargeVirtual):
(bmalloc::api::setScavengerThreadQOSClass):

4:42 PM Changeset in webkit [254780] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Do not construct a dedicated run for the trailing (fully) collapsed whitespace.
https://bugs.webkit.org/show_bug.cgi?id=206428
<rdar://problem/58687058>

Reviewed by Antti Koivisto.

This patch reduces the final run count on a line from 2 to 1 in the common cases where the line ends in a collapsed trailing whitespace.
~3% progression on PerformanceTests/Layout/line-layout-simple.html.

  • layout/inlineformatting/InlineFormattingContextQuirks.cpp:

(WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::ContinuousContent::isEligible const):
(WebCore::Layout::LineBuilder::ContinuousContent::expand):
(WebCore::Layout::LineBuilder::close):
(WebCore::Layout::LineBuilder::alignContentVertically):
(WebCore::Layout::LineBuilder::runContentHeight const):
(WebCore::Layout::LineBuilder::CollapsibleContent::collapse):
(WebCore::Layout::LineBuilder::ContinuousContent::append): Deleted.

4:41 PM Changeset in webkit [254779] by Matt Lewis
  • 5 edits
    3 deletes in trunk/Source/WebCore

Unreviewed, rolling out r254564.

This caused internal test crashes.

Reverted changeset:

"Introduce an abstract SampleBufferDisplayLayer"
https://bugs.webkit.org/show_bug.cgi?id=206066
https://trac.webkit.org/changeset/254564

4:40 PM Changeset in webkit [254778] by Matt Lewis
  • 26 edits
    13 deletes in trunk/Source

Unreviewed, rolling out r254688.

This caused internal test crashes.

Reverted changeset:

"Add support for MediaStream video track rendering in
GPUProcess"
https://bugs.webkit.org/show_bug.cgi?id=206286
https://trac.webkit.org/changeset/254688

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

[EWS] Print disk space usage for windows bots
https://bugs.webkit.org/show_bug.cgi?id=206421

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps.py:

(PrintConfiguration): Windows bot use cygwin, so df command works.

4:30 PM Changeset in webkit [254776] by Alan Coon
  • 3 edits
    4 deletes in branches/safari-608.5.7.3-branch

Revert "Cherry-pick r254349. rdar://problem/58529694"

This reverts commit r254451.

4:27 PM Changeset in webkit [254775] by Alan Coon
  • 3 edits
    4 deletes in branches/safari-608-branch

Revert "Cherry-pick r254349. rdar://problem/58529693"

This reverts commit 254443.

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

[ews] Perform validation of patch before running layout-tests on Windows
https://bugs.webkit.org/show_bug.cgi?id=206424

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/factories.py:
4:16 PM Changeset in webkit [254773] by Nikita Vasilyev
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Unchecking Enable Preview Features on Engineering and Preview builds does not affect WI.arePreviewFeaturesEnabled()
https://bugs.webkit.org/show_bug.cgi?id=204026

Reviewed by Brian Burg.

Make WI.arePreviewFeaturesEnabled() return false when Enable Preview Features is unchecked.

  • UserInterface/Base/Setting.js:

(WI.canShowPreviewFeatures):
(WI.arePreviewFeaturesEnabled):
(WI.isTechnologyPreviewBuild): Deleted.
(WI.canShowPreviewFeatures): Added.

  • UserInterface/Views/SettingsTabContentView.js:
3:57 PM Changeset in webkit [254772] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Don't call CFURLRequestSetShouldStartSynchronously from Catalyst WebKit
https://bugs.webkit.org/show_bug.cgi?id=206446
<rdar://problem/57382980>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-01-17
Reviewed by Tim Horton.

We call it sometimes on iOS but Catalyst WebKit uses macOS CFNetwork, which doesn't like starting synchronously.

  • platform/network/mac/ResourceHandleMac.mm:

(WebCore::ResourceHandle::createNSURLConnection):

3:37 PM Changeset in webkit [254771] by Alan Coon
  • 5 edits in branches/safari-609-branch

Re-apply patch. rdar://problem/58353217

This reverts commit r254768.

3:36 PM Changeset in webkit [254770] by Alan Coon
  • 1 edit in branches/safari-609-branch/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in

Unreviewed build fix. rdar://problem/58353217

3:35 PM Changeset in webkit [254769] by dbates@webkit.org
  • 2 edits in trunk/Source/WebKit

[iOS] ASSERTION FAILED: ASSERT_NOT_REACHED() in selectionChangedWithTouch(WKContentView*, WebCore::IntPoint const&, unsigned int, unsigned int, WebKit::CallbackBase::Error)
https://bugs.webkit.org/show_bug.cgi?id=206427

Reviewed by Wenson Hsieh.

Remove ASSERT_NOT_REACHED() usage in callbacks selectionChangedWithTouch() and selectionChangedWithGesture().
These callbacks can handle being- and should expect to sometimes be- invoked with a non-None error value.
In particular, if the WebProcess crashes then these callbacks will be invoked with error CallbackBase::Error::ProcessExited.

  • UIProcess/ios/WKContentViewInteraction.mm:

(selectionChangedWithGesture): Remove ASSERT_NOT_REACHED() when an error occurs. This
function is capable of handling this error.
(selectionChangedWithTouch): Ditto.

3:02 PM Changeset in webkit [254768] by Alan Coon
  • 5 edits in branches/safari-609-branch

Revert "Apply patch. rdar://problem/58353217"

This reverts commit r254665.

2:31 PM Changeset in webkit [254767] by eric.carlson@apple.com
  • 5 edits in trunk/Source/WebCore

REGRESSION (r254483): media/track/track-cues-sorted-before-dispatch.html became very flaky
https://bugs.webkit.org/show_bug.cgi?id=206225
<rdar://problem/58634315>

Reviewed by Jer Noble.

The list of text track cues that are to fire events are sorted before events are
fired. Cue were being sorted by track, then by start time, and then by end time.
This meant that the sort order of two cues in the same track with identical start
and end times was not stable, causing this test to be flaky. The spec says to sort
by a cue's position in the track cue list when start and end times are identical,
so do that.

No new tests, this fixes a flaky test.

  • html/track/TextTrackCue.cpp:

(WebCore::TextTrackCue::cueIndex const):
(WebCore::TextTrackCue::isOrderedBefore const):

  • html/track/TextTrackCue.h:
  • html/track/TextTrackCueList.cpp:

(WebCore::cueSortsBefore):
(WebCore::TextTrackCueList::cueIndex const):
(WebCore::TextTrackCueList::add):
(WebCore::TextTrackCueList::updateCueIndex):
(WebCore::compareCues): Deleted.

  • html/track/TextTrackCueList.h:
2:07 PM Changeset in webkit [254766] by Andres Gonzalez
  • 8 edits
    2 moves in trunk/Source/WebCore

Rename AXIsolatedTreeNode.cpp/h to match AXIsolatedObject class name.
https://bugs.webkit.org/show_bug.cgi?id=206434

Reviewed by Chris Fleizach.

File renaming to match AXIsolatedObject class name.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • accessibility/AXObjectCache.cpp:
  • accessibility/isolatedtree/AXIsolatedObject.cpp: Renamed from Source/WebCore/accessibility/isolatedtree/AXIsolatedTreeNode.cpp.
  • accessibility/isolatedtree/AXIsolatedObject.h: Renamed from Source/WebCore/accessibility/isolatedtree/AXIsolatedTreeNode.h.
  • accessibility/isolatedtree/AXIsolatedTree.cpp:
  • accessibility/isolatedtree/AXIsolatedTree.h:
  • accessibility/mac/AXObjectCacheMac.mm:
1:57 PM Changeset in webkit [254765] by Megan Gardner
  • 2 edits in trunk/Tools

Fix assertion when test fast/events/ios/rotation/basic-rotation.html is followed by fast/events/ios/rotation/do-not-shrink-to-fit-content-after-rotation.html
https://bugs.webkit.org/show_bug.cgi?id=206383
<rdar://problem/58618513>

Reviewed by Tim Horton.

Rotation tests are asserting because _didEndRotation is being called multiple times.
The call is at the end of viewWillTransitionToSize, which is called with the same
size that the view already is. Therefore, if no size is changing, early out,
which keeps this double call from happening.

  • WebKitTestRunner/ios/PlatformWebViewIOS.mm:

(-[PlatformWebViewController viewWillTransitionToSize:withTransitionCoordinator:]):

1:43 PM Changeset in webkit [254764] by ysuzuki@apple.com
  • 2 edits in trunk/Source/bmalloc

[bmalloc] Fix IsoHeapImpl's assertion introduced in r254708
https://bugs.webkit.org/show_bug.cgi?id=206440
<rdar://problem/58688794>

Reviewed by Mark Lam.

The assertion introduced in r254708 was wrong.
Fixing it to check the invariant we actually want to ensure.
This fixes TestWTF crash in Debug build.

  • bmalloc/IsoHeapImplInlines.h:

(bmalloc::IsoHeapImpl<Config>::takeFirstEligible):

1:10 PM Changeset in webkit [254763] by Alan Coon
  • 7 edits in branches/safari-609-branch/Source/WebKit

Cherry-pick r254433. rdar://problem/58686757

[macCatalyst] UI process crashes on launch after r254101
https://bugs.webkit.org/show_bug.cgi?id=206156
<rdar://problem/58514942>

Reviewed by Brent Fulgham.

Fixes the crash by not soft-linking BackBoardServices in an attempt to invoke BKSDisplayBrightnessGetCurrent on
macCatalyst. Prior to r254101, this was only defined on iOS and not watchOS or tvOS; after this change, it
should be defined only on iOS, watchOS and tvOS.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::registerNotificationObservers):
  • UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::initializeNewWebProcess):
  • UIProcess/WebProcessPool.h:
  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
  • WebProcess/cocoa/WebProcessCocoa.mm:

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

1:06 PM Changeset in webkit [254762] by Jonathan Bedard
  • 2 edits in trunk/Tools

Python 3: Add support to run-webkit-tests (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=205291

Unreviewed follow-up fix.

  • Scripts/webkitpy/common/unicode_compatibility.py:

(decode_for): Handle case where provided value is None.

1:03 PM Changeset in webkit [254761] by jer.noble@apple.com
  • 5 edits
    2 adds in trunk

[MSE] Decode glitches when watching videos on CNN.com
https://bugs.webkit.org/show_bug.cgi?id=206412
<rdar://problem/55685630>

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Test: media/media-source/media-source-samples-out-of-order.html

The "Coded frame processing" algorithm has a known shortcoming <https://github.com/w3c/media-source/issues/187>
when dealing appends of with "SAP Type 2" content, or in general terms, appending data where the resulting samples
have presentation times that do not increase monotonically. When this occurs, the ordering of samples in presentation
time will be different from the ordering of samples in decode time. The decoder requires samples to be enqueued in
decode time order, but the MSE specification only checks for overlapping samples in presentation time order. During
appends of out-of-order samples, this can lead to new samples being inserted between a previously appended sample and
the sample on which that sample depends.

To resolve this, add a new step in the implementation of the "coded frame processing" algorithm in
SourceBuffer::sourceBufferPrivateDidReceiveSample(). When the incoming frame is a sync sample, search forward
in the TrackBuffer for all previous samples in between the new sync sample, and the next sync sample. All the
samples found in this step would fail to decode correctly if enqueued after the new (possibly different resolution)
sync sample, so they are removed in this step.

  • Modules/mediasource/SampleMap.cpp:

(WebCore::DecodeOrderSampleMap::findSampleAfterDecodeKey):

  • Modules/mediasource/SampleMap.h:
  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):

LayoutTests:

  • media/media-source/media-source-samples-out-of-order-expected.txt: Added.
  • media/media-source/media-source-samples-out-of-order.html: Added.
12:38 PM Changeset in webkit [254760] by Justin Michaud
  • 12 edits in trunk/Source/JavaScriptCore

Separate storage of Structure::m_offset into transition and max offset
https://bugs.webkit.org/show_bug.cgi?id=206365

Reviewed by Saam Barati.

Right now, deleteProperty/removePropertyTransition causes a structure transition to uncacheable dictionary. Other transitions
assume that the transition offset (m_offset) is monotonically increasing. In order to support structure transitions for deletion that
do not involve turning into a dictionary (<https://bugs.webkit.org/show_bug.cgi?id=206430>), we first need to separate the transition
offset (the offset of the property that was added/deleted) from the maximum offset.

For example, suppose we have the following operations:

Structure 1 (pinned property table, transitionOffset = _, maxOffset = 2): x y z (delete y, assuming that deletion transitions have been added)
Structure 2 (transitionOffset = 1, maxOffset = 2): x _ z (add w)
Structure 3 (transitionOffset = 1, maxOffset = 2): x w z

Note that without splitting the two, Structures 2/3 would be impossible to represent.

This change:

We split the existing Structure::m_offset into two 16-bit fields, transitionOffset and maxOffset, and put them in 32-bit rare data fields if they overflow. We also rename _inPrevious fields to
transition_ and lastOffset to maxOffset to make the code more clear.

  • runtime/ClonedArguments.cpp:

(JSC::ClonedArguments::createStructure):

  • runtime/JSObject.cpp:

(JSC::JSObject::markAuxiliaryAndVisitOutOfLineProperties):
(JSC::JSObject::visitButterflyImpl):

  • runtime/JSObject.h:
  • runtime/JSObjectInlines.h:

(JSC::JSObject::prepareToPutDirectWithoutTransition):

  • runtime/ObjectInitializationScope.cpp:

(JSC::ObjectInitializationScope::verifyPropertiesAreInitialized):

  • runtime/PropertyOffset.h:

(JSC::numberOfOutOfLineSlotsForMaxOffset):
(JSC::numberOfSlotsForMaxOffset):
(JSC::numberOfOutOfLineSlotsForLastOffset): Deleted.
(JSC::numberOfSlotsForLastOffset): Deleted.

  • runtime/Structure.cpp:

(JSC::StructureTransitionTable::contains const):
(JSC::StructureTransitionTable::get const):
(JSC::StructureTransitionTable::add):
(JSC::Structure::Structure):
(JSC::Structure::create):
(JSC::Structure::materializePropertyTable):
(JSC::Structure::addPropertyTransitionToExistingStructureImpl):
(JSC::Structure::addNewPropertyTransition):
(JSC::Structure::changePrototypeTransition):
(JSC::Structure::attributeChangeTransition):
(JSC::Structure::toDictionaryTransition):
(JSC::Structure::nonPropertyTransitionSlow):
(JSC::Structure::flattenDictionaryStructure):
(JSC::Structure::pin):
(JSC::Structure::pinForCaching):
(JSC::Structure::add):

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

(JSC::Structure::forEachPropertyConcurrently):
(JSC::Structure::checkOffsetConsistency const):
(JSC::Structure::add):

  • runtime/StructureRareData.cpp:

(JSC::StructureRareData::StructureRareData):

  • runtime/StructureRareData.h:
12:37 PM Changeset in webkit [254759] by Brent Fulgham
  • 3 edits in trunk/Source/WebKit

[iOS] Remove the IOHIDEventServiceFastPathUserClient IOKit class
https://bugs.webkit.org/show_bug.cgi?id=206387
<rdar://problem/58663849>

Reviewed by Per Arne Vollan.

After Bug 204770, we no longer interact with the device motion or geolocation systems inside
the WebContent process. Testing and telemetry shows that we no longer access the
IOHIDEventServiceFastPathUserClient, and so should remove access to it.

No new tests because there is no change in behavior.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
12:26 PM Changeset in webkit [254758] by commit-queue@webkit.org
  • 2 edits
    1 add in trunk/LayoutTests

REGRESSION: [iOS 13] svg/custom/glyph-selection-arabic-forms.svg is failing
https://bugs.webkit.org/show_bug.cgi?id=201901

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-01-17
Reviewed by Simon Fraser.

Create a new test expectation for iOS for this test.

  • platform/ios/TestExpectations:
  • platform/ios/svg/custom/glyph-selection-arabic-forms-expected.txt: Added.
12:21 PM Changeset in webkit [254757] by Alexey Shvayka
  • 4 edits in trunk

JSON.parse should lookup prototype chains during revival
https://bugs.webkit.org/show_bug.cgi?id=205769

Reviewed by Saam Barati.

JSTests:

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

Source/JavaScriptCore:

This patch makes JSON.parse use Get? instead of GetOwnProperty? during revival,
aligning JSC with the spec (step 1 of https://tc39.es/ecma262/#sec-internalizejsonproperty),
SpiderMonkey, and V8.

User-provided reviver can delete properties that are not yet inspected by itself,
making usage GetOwnProperty? non-compliant to the spec.

  • runtime/JSONObject.cpp:

(JSC::Walker::walk):

12:06 PM Changeset in webkit [254756] by beidson@apple.com
  • 5 edits in trunk

TestWebKitAPI.AsyncFunction.Promise times out on slower machines in debug builds.
<rdar://problem/58445164> and https://bugs.webkit.org/show_bug.cgi?id=206012

Reviewed by Keith Miller.

Source/WebKit:

For existing API test.

  • UIProcess/API/Cocoa/WKProcessPool.mm:

(-[WKProcessPool _garbageCollectJavaScriptObjectsForTesting]):

  • UIProcess/API/Cocoa/WKProcessPoolPrivate.h:

Tools:

Previously, to force GC, over 30,000 function calls would be made.
This was too slow on slower machines in debug builds. It eventually would've worked given enough time, but...
It turns just a few hundred function calls with an API call to force GC seems reliable and is much faster.

  • TestWebKitAPI/Tests/WebKitCocoa/AsyncFunction.mm:

(TestWebKitAPI::TEST):
(TestWebKitAPI::tryGCPromise): Deleted.

10:59 AM Changeset in webkit [254755] by dbates@webkit.org
  • 2 edits in trunk/Source/WebKit

[iOS] Focusing editable element with WebPage::selectPositionAtPoint() does not bring up keyboard
https://bugs.webkit.org/show_bug.cgi?id=206385
<rdar://problem/57414380>

Reviewed by Wenson Hsieh.

Update the view's state to indicate that the user is performing an interaction for the scope of
WebPage::selectPositionAtPoint(). This permits WebKit to show the keyboard if selecting the
position causes a change in focus (say, the point is inside an unfocused text field).

We likely should do a similar change for all other WebKit IPIs that perform a WebCore::EUserTriggered::UserTriggered
tagged selection change though the callers should be audited to ensure they weren't accidentally
depending on the existing behavior that prevents such selections from bringing up the keyboard.
For now, I only fix WebPage::selectPositionAtPoint() as I've audited that all callers expect it
to bring up the keyboard, if needed.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::selectPositionAtPoint):

10:52 AM Changeset in webkit [254754] by Antti Koivisto
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] Use Optional for partialLeading/TrailingTextItem
https://bugs.webkit.org/show_bug.cgi?id=206423

Reviewed by Zalan Bujtas.

Remove the remaining InlineItem heap allocation.

  • layout/inlineformatting/InlineItem.h:
  • layout/inlineformatting/InlineTextItem.cpp:

(WebCore::Layout::InlineTextItem::left const): Deleted.
(WebCore::Layout::InlineTextItem::right const): Deleted.

  • layout/inlineformatting/InlineTextItem.h:

Constructor can now be private.

(WebCore::Layout::InlineTextItem::left const):
(WebCore::Layout::InlineTextItem::right const):

  • layout/inlineformatting/LineLayoutContext.h:
10:45 AM Changeset in webkit [254753] by Chris Dumez
  • 6 edits in trunk/Source/WebCore

Drop dead code related to local storage prewarming
https://bugs.webkit.org/show_bug.cgi?id=206418

Reviewed by Sam Weinig.

Drop dead code related to local storage prewarming. Sihui neutered it in <https://trac.webkit.org/changeset/248734>
but did not remove the code.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::commitData):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::prewarmLocalStorageIfNecessary): Deleted.

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

(WebCore::Frame::didPrewarmLocalStorage): Deleted.
(WebCore::Frame::mayPrewarmLocalStorage const): Deleted.

  • page/Frame.h:
10:22 AM Changeset in webkit [254752] by Diego Pino Garcia
  • 3 edits in trunk/LayoutTests

[GTK][WPE] Mark several WPT fetch tests as failure
https://bugs.webkit.org/show_bug.cgi?id=206417

Unreviewed gardening.

  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
10:09 AM Changeset in webkit [254751] by Adrian Perez de Castro
  • 4 edits in trunk/Source

Fix various non-unified build issues introduced since r254327
https://bugs.webkit.org/show_bug.cgi?id=206356

Reviewed by Chris Dumez.

Source/WebCore:

No new tests needed.

  • html/LinkRelAttribute.h: Add missing inclusion of wtf/Markable.h

Source/WebKit:

  • WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:

(WebKit::WebContextMenuClient::insertEmoji): Add missing namespace to WebCore::Frame parameter.

8:24 AM Changeset in webkit [254750] by Alan Bujtas
  • 8 edits in trunk/Source/WebCore

[LFC][IFC] Optimize LineBuilder::appendTextContent for the most common inline content
https://bugs.webkit.org/show_bug.cgi?id=206397
<rdar://problem/58671338>

Reviewed by Antti Koivisto.

~2% progression on PerformanceTests/Layout/line-layout-simple.html.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::LineBuilder):
(WebCore::Layout::shouldPreserveLeadingContent):
(WebCore::Layout::LineBuilder::appendTextContent):
(WebCore::Layout::LineBuilder::appendLineBreak):
(WebCore::Layout::LineBuilder::InlineItemRun::InlineItemRun):

  • layout/inlineformatting/InlineLineBuilder.h:

(WebCore::Layout::LineBuilder::InlineItemRun::setIsCollapsed): Deleted.

  • layout/inlineformatting/InlineTextItem.cpp:

(WebCore::Layout::InlineTextItem::InlineTextItem):

  • layout/inlineformatting/InlineTextItem.h:

(WebCore::Layout::InlineTextItem::isCollapsible const):

  • layout/inlineformatting/text/TextUtil.cpp:

(WebCore::Layout::TextUtil::shouldPreserveTrailingWhitespace): Deleted.

  • layout/inlineformatting/text/TextUtil.h:

(WebCore::Layout::TextUtil::shouldPreserveTrailingWhitespace):

8:16 AM Changeset in webkit [254749] by Antti Koivisto
  • 10 edits in trunk/Source/WebCore

[LFC][IFC] Allocate InlineItems in a vector
https://bugs.webkit.org/show_bug.cgi?id=206411

Reviewed by Zalan Bujtas.

Even the largest InlineItem (InlineTextItem) is small (fits to 24 bytes), and they are allocated
in large numbers (one per word and per whitespace typically). Reduce heap allocations by turning
InlineItem into a fixed size type.

The InlineItem vector is immutable during layout so pointer to items can still be safely used.

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::collectInlineContentIfNeeded):

  • layout/inlineformatting/InlineFormattingState.h:

(WebCore::Layout::InlineFormattingState::addInlineItem):

  • layout/inlineformatting/InlineItem.cpp:

(WebCore::Layout::InlineItem::InlineItem): Deleted.

  • layout/inlineformatting/InlineItem.h:

(WebCore::Layout::InlineItem::layoutBox const):
(WebCore::Layout::InlineItem::style const):
(WebCore::Layout::InlineItem::InlineItem):

Gather members from the subclasses as protected fields.

  • layout/inlineformatting/InlineSoftLineBreakItem.h:

Move the field to the base class.

(WebCore::Layout::InlineSoftLineBreakItem::position const):
(WebCore::Layout::InlineSoftLineBreakItem::createSoftLineBreakItem):
(WebCore::Layout::InlineSoftLineBreakItem::InlineSoftLineBreakItem):
(): Deleted.

  • layout/inlineformatting/InlineTextItem.cpp:

(WebCore::Layout::InlineTextItem::createWhitespaceItem): Deleted.
(WebCore::Layout::InlineTextItem::createNonWhitespaceItem): Deleted.
(WebCore::Layout::InlineTextItem::createEmptyItem): Deleted.
(WebCore::Layout::InlineTextItem::InlineTextItem): Deleted.

  • layout/inlineformatting/InlineTextItem.h:

Move the fields to the base class.

(WebCore::Layout::InlineTextItem::start const):
(WebCore::Layout::InlineTextItem::width const):

Place width optional into a separate bit and a value as this allows better packing of members.

(WebCore::Layout::InlineTextItem::createWhitespaceItem):
(WebCore::Layout::InlineTextItem::createNonWhitespaceItem):
(WebCore::Layout::InlineTextItem::createEmptyItem):
(WebCore::Layout::InlineTextItem::InlineTextItem):

Inline construction functions.

(): Deleted.

  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::nextWrapOpportunity):
(WebCore::Layout::LineCandidateContent::appendFloat):

Use a raw pointer instead of a WeakPtr. InlineItems are immuttable during layout.

(WebCore::Layout::LineLayoutContext::close):
(WebCore::Layout::LineLayoutContext::nextContentForLine):

  • layout/inlineformatting/LineLayoutContext.h:
8:14 AM Changeset in webkit [254748] by Caio Lima
  • 2 edits in trunk/Source/JavaScriptCore

Bytecode checkpoints break 32bit tests
https://bugs.webkit.org/show_bug.cgi?id=206404

Unreviewed.

  • llint/LowLevelInterpreter32_64.asm:

Reverting change introduced by r254735 that makes 32-bit codes crash
when calling into LLInt slow path.

8:04 AM Changeset in webkit [254747] by Diego Pino Garcia
  • 3 edits
    19 adds in trunk/LayoutTests

[GTK][WPE] Update baselines for several CSS tests
https://bugs.webkit.org/show_bug.cgi?id=206410

Unreviewed gardening.

  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/css/css-position/position-absolute-in-inline-002-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/css/css-values/line-break-ch-unit-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/css/css-values/minmax-angle-computed-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/css/css-values/minmax-length-computed-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/css/css-values/minmax-length-percent-computed-expected.txt: Added.
  • platform/wpe/TestExpectations:
  • platform/wpe/imported/w3c/web-platform-tests/css/css-position/position-absolute-in-inline-002-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-sizing/button-min-width-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-transitions/before-load-001-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-transitions/properties-value-auto-001-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-values/line-break-ch-unit-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-values/minmax-angle-computed-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-values/minmax-length-computed-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-values/minmax-length-percent-computed-expected.txt: Added.
8:00 AM Changeset in webkit [254746] by Fujii Hironori
  • 2 edits in trunk/Source/WebKit

[WinCairo][WK2] ASSERT(isUIThread()) is failing since r254723
https://bugs.webkit.org/show_bug.cgi?id=206394

Reviewed by Carlos Alberto Lopez Perez.

AtomString::init() should be called after
WTF::initializeThreading() is called on Windows because it has
ASSERT(isUIThread()) and Windows doesn't have a API to get main
thread handle like pthread_main_np.

  • Shared/WebKit2Initialize.cpp:

(WebKit::InitializeWebKit2): Call AtomString::init() after JSC::initializeThreading().

7:56 AM Changeset in webkit [254745] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

IPC hardening for WebPasteboardProxy::SetPasteboardBufferForType message
https://bugs.webkit.org/show_bug.cgi?id=206381

Reviewed by Anders Carlsson.

IPC hardening for WebPasteboardProxy::SetPasteboardBufferForType message. Make sure that the Strings passed over IPC are not
null and that the SharedBuffer returned by SharedBuffer::map() is not null.

  • UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:

(WebKit::WebPasteboardProxy::setPasteboardBufferForType):

7:17 AM Changeset in webkit [254744] by Diego Pino Garcia
  • 7 edits
    5 adds in trunk/LayoutTests

[GTK] Update baselines for SVG tests
https://bugs.webkit.org/show_bug.cgi?id=206406

Unreviewed gardening.

  • platform/gtk/imported/w3c/web-platform-tests/svg/geometry/parsing/height-computed-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/svg/geometry/parsing/width-computed-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/svg/path/distance/pathLength-positive-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/svg/path/distance/pathLength-positive-percentage-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/svg/path/distance/pathLength-zero-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/svg/path/distance/pathLength-zero-percentage-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/svg/shapes/reftests/pathlength-003-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/svg/shapes/scripted/disabled-shapes-not-hit-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/svg/text/reftests/textpath-shape-001-expected.txt:
7:03 AM Changeset in webkit [254743] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Optimize nextWrapOpportunity/isAtSoftWrapOpportunity for the most common inline content
https://bugs.webkit.org/show_bug.cgi?id=206395
<rdar://problem/58670070>

Reviewed by Antti Koivisto.

~2% progression on PerformanceTests/Layout/line-layout-simple.html.

  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::isAtSoftWrapOpportunity):
(WebCore::Layout::nextWrapOpportunity):

6:00 AM Changeset in webkit [254742] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

[GTK][WPE] Composition underline color is not applied
https://bugs.webkit.org/show_bug.cgi?id=206353

Reviewed by Sergio Villar Senin.

CompositionUnderline::compositionUnderlineColor is not encoded/decoded in IPC messages, so the web process
always uses CompositionUnderlineColor::TextColor ignoring the given color.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<CompositionUnderline>::encode): Encode compositionUnderlineColor.
(IPC::ArgumentCoder<CompositionUnderline>::decode): Decode compositionUnderlineColor.

3:59 AM Changeset in webkit [254741] by clopez@igalia.com
  • 5 edits in trunk/Source/WebCore

[GTK] Turn off antialiasing when rendering with Ahem (v2)
https://bugs.webkit.org/show_bug.cgi?id=204671

Reviewed by Carlos Garcia Campos.

Fix leak caused by r254567 where a RefPtr its created from a FcPattern without adoptRef().
Meanwhile at it, also change defaultFontconfigOptions() to return a RefPtr,
because after r254567 we always modify the pattern.
Change also the FontPlatformData() constructor to take an rvalue reference,
and some of its callers to move the RefPtr, avoiding extra not needed
reference increments/decrements.

Covered by existing tests.

  • platform/graphics/FontPlatformData.h:
  • platform/graphics/freetype/FontCacheFreeType.cpp:

(WebCore::FontCache::systemFallbackForCharacters):
(WebCore::FontCache::createFontPlatformData):

  • platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:

(WebCore::defaultFontconfigOptions):
(WebCore::FontCustomPlatformData::fontPlatformData):

  • platform/graphics/freetype/FontPlatformDataFreeType.cpp:

(WebCore::FontPlatformData::FontPlatformData):

2:04 AM Changeset in webkit [254740] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GTK] Gardening websockets close-on-x tests
https://bugs.webkit.org/show_bug.cgi?id=206393

Unreviewed gardening.

Patch by Lauro Moura <Lauro Moura> on 2020-01-17

  • platform/gtk/TestExpectations:

Jan 16, 2020:

11:32 PM Changeset in webkit [254739] by ysuzuki@apple.com
  • 11 edits in trunk/Source/WebCore

Compact sizeof(HTMLAnchorElement) and sizeof(HTMLLinkElement)
https://bugs.webkit.org/show_bug.cgi?id=206343

Reviewed by Ryosuke Niwa.

Data from Membuster is saying that HTMLAnchorElement is relatively frequently allocated
element (1252 elements are kept) while sizeof(HTMLAnchorElement) is not optimized well.
We also found that HTMLLinkElement is too large while it has so many paddings and opportunities
to optimize it. This patch shrinks them.

We also found that SharedStringHashHash's upper 32bit is always zero, and nobody is using this
effectively. We make it 32bit.

No behavior change.

  • html/HTMLAnchorElement.h:
  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::HTMLLinkElement):
(WebCore::HTMLLinkElement::process):

  • html/HTMLLinkElement.h:
  • html/LinkIconCollector.h:
  • html/LinkIconType.h:
  • html/LinkRelAttribute.cpp:

(WebCore::LinkRelAttribute::LinkRelAttribute):

  • html/LinkRelAttribute.h:

(): Deleted.

  • page/Page.h:
  • page/VisitedLinkStore.h:
  • platform/SharedStringHash.h:

(WebCore::SharedStringHashHash::avoidDeletedValue): Deleted.

11:16 PM Changeset in webkit [254738] by rmorisset@apple.com
  • 5 edits
    1 add in trunk

[ESNext] Enables a way to throw an error on ByteCodeGenerator step
https://bugs.webkit.org/show_bug.cgi?id=180139

Reviewed by Mark Lam.

JSTests:

  • stress/eval-huge-big-int-memory-overflow.js: Added.

Source/JavaScriptCore:

This is a minimal fix that only deals with overly huge BigInts.
A more thorough solution is rather low priority (since it has neither securities nor performance impact).

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::addBigIntConstant):

  • bytecompiler/NodesCodegen.cpp:

(JSC::ConstantNode::emitBytecode):

  • runtime/JSBigInt.cpp:

(JSC::JSBigInt::parseInt):

10:59 PM Changeset in webkit [254737] by zandobersek@gmail.com
  • 2 edits
    4 moves in trunk/Source/WebKit

Unreviewed. Move the common WebKitOptionMenu GLib API implementation
parts out from the GTK-specific directory and under UIProcess/API/glib/.

  • SourcesGTK.txt:
  • UIProcess/API/glib/WebKitOptionMenu.cpp: Copied from Source/WebKit/UIProcess/API/gtk/WebKitOptionMenu.cpp.
  • UIProcess/API/glib/WebKitOptionMenuItem.cpp: Copied from Source/WebKit/UIProcess/API/gtk/WebKitOptionMenuItem.cpp.
  • UIProcess/API/glib/WebKitOptionMenuItemPrivate.h: Copied from Source/WebKit/UIProcess/API/gtk/WebKitOptionMenuItemPrivate.h.
  • UIProcess/API/glib/WebKitOptionMenuPrivate.h: Copied from Source/WebKit/UIProcess/API/gtk/WebKitOptionMenuPrivate.h.
  • UIProcess/API/gtk/WebKitOptionMenu.cpp: Removed.
  • UIProcess/API/gtk/WebKitOptionMenuItem.cpp: Removed.
  • UIProcess/API/gtk/WebKitOptionMenuItemPrivate.h: Removed.
  • UIProcess/API/gtk/WebKitOptionMenuPrivate.h: Removed.
8:52 PM Changeset in webkit [254736] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Optimize LineLayoutContext::tryAddingInlineItems for the most common inline content
https://bugs.webkit.org/show_bug.cgi?id=206372
<rdar://problem/58657525>

Reviewed by Simon Fraser.

~4% progression on PerformanceTests/Layout/line-layout-simple.html.

  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::endsWithSoftWrapOpportunity):
(WebCore::Layout::isAtSoftWrapOpportunity):
(WebCore::Layout::nextWrapOpportunity):
(WebCore::Layout::LineCandidateContent::appendInlineContent):
(WebCore::Layout::LineCandidateContent::reset):
(WebCore::Layout::LineLayoutContext::tryAddingInlineItems):
(WebCore::Layout::LineLayoutContext::commitPartialContent):
(WebCore::Layout::LineLayoutContext::commitContent): Deleted.

  • layout/inlineformatting/LineLayoutContext.h:
8:09 PM Changeset in webkit [254735] by keith_miller@apple.com
  • 185 edits
    2 copies
    5 adds in trunk

Reland bytecode checkpoints since bugs have been fixed
https://bugs.webkit.org/show_bug.cgi?id=206361

Unreviewed, reland.

The watch bugs have been fixed by https://trac.webkit.org/changeset/254674

JSTests:

  • stress/apply-osr-exit-should-get-length-once-exceptions-occasionally.js: Added.

(expectedArgCount):
(callee):
(test):
(let.array.get length):

  • stress/apply-osr-exit-should-get-length-once.js: Added.

(expectedArgCount):
(callee):
(test):
(let.array.get length):

  • stress/load-varargs-then-inlined-call-and-exit-strict.js:

(checkEqual):

  • stress/recursive-tail-call-with-different-argument-count.js:
  • stress/rest-varargs-osr-exit-to-checkpoint.js: Added.

(foo):
(bar):

Source/JavaScriptCore:

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • assembler/MacroAssemblerCodeRef.h:
  • assembler/ProbeFrame.h:

(JSC::Probe::Frame::operand):
(JSC::Probe::Frame::setOperand):

  • b3/testb3.h:

(populateWithInterestingValues):
(floatingPointOperands):

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::generateImpl):

  • bytecode/AccessCaseSnippetParams.cpp:

(JSC::SlowPathCallGeneratorWithArguments::generateImpl):

  • bytecode/BytecodeDumper.cpp:

(JSC::BytecodeDumperBase::dumpValue):
(JSC::BytecodeDumper<Block>::registerName const):
(JSC::BytecodeDumper<Block>::constantName const):
(JSC::Wasm::BytecodeDumper::constantName const):

  • bytecode/BytecodeDumper.h:
  • bytecode/BytecodeIndex.cpp:

(JSC::BytecodeIndex::dump const):

  • bytecode/BytecodeIndex.h:

(JSC::BytecodeIndex::BytecodeIndex):
(JSC::BytecodeIndex::offset const):
(JSC::BytecodeIndex::checkpoint const):
(JSC::BytecodeIndex::asBits const):
(JSC::BytecodeIndex::hash const):
(JSC::BytecodeIndex::operator bool const):
(JSC::BytecodeIndex::pack):
(JSC::BytecodeIndex::fromBits):

  • bytecode/BytecodeList.rb:
  • bytecode/BytecodeLivenessAnalysis.cpp:

(JSC::enumValuesEqualAsIntegral):
(JSC::tmpLivenessForCheckpoint):

  • bytecode/BytecodeLivenessAnalysis.h:
  • bytecode/BytecodeLivenessAnalysisInlines.h:

(JSC::virtualRegisterIsAlwaysLive):
(JSC::virtualRegisterThatIsNotAlwaysLiveIsLive):
(JSC::virtualRegisterIsLive):
(JSC::operandIsAlwaysLive): Deleted.
(JSC::operandThatIsNotAlwaysLiveIsLive): Deleted.
(JSC::operandIsLive): Deleted.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::bytecodeIndexForExit const):
(JSC::CodeBlock::ensureCatchLivenessIsComputedForBytecodeIndexSlow):
(JSC::CodeBlock::updateAllValueProfilePredictionsAndCountLiveness):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::numTmps const):
(JSC::CodeBlock::isKnownNotImmediate):
(JSC::CodeBlock::isTemporaryRegister):
(JSC::CodeBlock::constantRegister):
(JSC::CodeBlock::getConstant const):
(JSC::CodeBlock::constantSourceCodeRepresentation const):
(JSC::CodeBlock::replaceConstant):
(JSC::CodeBlock::isTemporaryRegisterIndex): Deleted.
(JSC::CodeBlock::isConstantRegisterIndex): Deleted.

  • bytecode/CodeOrigin.h:
  • bytecode/FullBytecodeLiveness.h:

(JSC::FullBytecodeLiveness::virtualRegisterIsLive const):
(JSC::FullBytecodeLiveness::operandIsLive const): Deleted.

  • bytecode/InlineCallFrame.h:

(JSC::InlineCallFrame::InlineCallFrame):
(JSC::InlineCallFrame::setTmpOffset):
(JSC::CodeOrigin::walkUpInlineStack const):
(JSC::CodeOrigin::inlineStackContainsActiveCheckpoint const):
(JSC::remapOperand):
(JSC::unmapOperand):
(JSC::CodeOrigin::walkUpInlineStack): Deleted.

  • bytecode/LazyOperandValueProfile.h:

(JSC::LazyOperandValueProfileKey::LazyOperandValueProfileKey):
(JSC::LazyOperandValueProfileKey::hash const):
(JSC::LazyOperandValueProfileKey::operand const):

  • bytecode/MethodOfGettingAValueProfile.cpp:

(JSC::MethodOfGettingAValueProfile::fromLazyOperand):
(JSC::MethodOfGettingAValueProfile::emitReportValue const):
(JSC::MethodOfGettingAValueProfile::reportValue):

  • bytecode/MethodOfGettingAValueProfile.h:
  • bytecode/Operands.h:

(JSC::Operand::Operand):
(JSC::Operand::tmp):
(JSC::Operand::kind const):
(JSC::Operand::value const):
(JSC::Operand::virtualRegister const):
(JSC::Operand::asBits const):
(JSC::Operand::isTmp const):
(JSC::Operand::isArgument const):
(JSC::Operand::isLocal const):
(JSC::Operand::isHeader const):
(JSC::Operand::isConstant const):
(JSC::Operand::toArgument const):
(JSC::Operand::toLocal const):
(JSC::Operand::operator== const):
(JSC::Operand::isValid const):
(JSC::Operand::fromBits):
(JSC::Operands::Operands):
(JSC::Operands::numberOfLocals const):
(JSC::Operands::numberOfTmps const):
(JSC::Operands::tmpIndex const):
(JSC::Operands::argumentIndex const):
(JSC::Operands::localIndex const):
(JSC::Operands::tmp):
(JSC::Operands::tmp const):
(JSC::Operands::argument):
(JSC::Operands::argument const):
(JSC::Operands::local):
(JSC::Operands::local const):
(JSC::Operands::sizeFor const):
(JSC::Operands::atFor):
(JSC::Operands::atFor const):
(JSC::Operands::ensureLocals):
(JSC::Operands::ensureTmps):
(JSC::Operands::getForOperandIndex):
(JSC::Operands::getForOperandIndex const):
(JSC::Operands::operandIndex const):
(JSC::Operands::operand):
(JSC::Operands::operand const):
(JSC::Operands::hasOperand const):
(JSC::Operands::setOperand):
(JSC::Operands::at const):
(JSC::Operands::at):
(JSC::Operands::operator[] const):
(JSC::Operands::operator[]):
(JSC::Operands::operandForIndex const):
(JSC::Operands::operator== const):
(JSC::Operands::isArgument const): Deleted.
(JSC::Operands::isLocal const): Deleted.
(JSC::Operands::virtualRegisterForIndex const): Deleted.
(JSC::Operands::setOperandFirstTime): Deleted.

  • bytecode/OperandsInlines.h:

(JSC::Operand::dump const):
(JSC::Operands<T>::dumpInContext const):
(JSC::Operands<T>::dump const):

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::hasCheckpoints const):
(JSC::UnlinkedCodeBlock::setHasCheckpoints):
(JSC::UnlinkedCodeBlock::constantRegister const):
(JSC::UnlinkedCodeBlock::getConstant const):
(JSC::UnlinkedCodeBlock::isConstantRegisterIndex const): Deleted.

  • bytecode/ValueProfile.h:

(JSC::ValueProfileAndVirtualRegisterBuffer::ValueProfileAndVirtualRegisterBuffer):
(JSC::ValueProfileAndVirtualRegisterBuffer::~ValueProfileAndVirtualRegisterBuffer):
(JSC::ValueProfileAndOperandBuffer::ValueProfileAndOperandBuffer): Deleted.
(JSC::ValueProfileAndOperandBuffer::~ValueProfileAndOperandBuffer): Deleted.
(JSC::ValueProfileAndOperandBuffer::forEach): Deleted.

  • bytecode/ValueRecovery.cpp:

(JSC::ValueRecovery::recover const):

  • bytecode/ValueRecovery.h:
  • bytecode/VirtualRegister.h:

(JSC::virtualRegisterIsLocal):
(JSC::virtualRegisterIsArgument):
(JSC::VirtualRegister::VirtualRegister):
(JSC::VirtualRegister::isValid const):
(JSC::VirtualRegister::isLocal const):
(JSC::VirtualRegister::isArgument const):
(JSC::VirtualRegister::isConstant const):
(JSC::VirtualRegister::toConstantIndex const):
(JSC::operandIsLocal): Deleted.
(JSC::operandIsArgument): Deleted.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::initializeNextParameter):
(JSC::BytecodeGenerator::initializeParameters):
(JSC::BytecodeGenerator::emitEqualityOpImpl):
(JSC::BytecodeGenerator::emitCallVarargs):

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::setUsesCheckpoints):

  • bytecompiler/RegisterID.h:

(JSC::RegisterID::setIndex):

  • dfg/DFGAbstractHeap.cpp:

(JSC::DFG::AbstractHeap::Payload::dumpAsOperand const):
(JSC::DFG::AbstractHeap::dump const):

  • dfg/DFGAbstractHeap.h:

(JSC::DFG::AbstractHeap::Payload::Payload):
(JSC::DFG::AbstractHeap::AbstractHeap):
(JSC::DFG::AbstractHeap::operand const):

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGArgumentPosition.h:

(JSC::DFG::ArgumentPosition::dump):

  • dfg/DFGArgumentsEliminationPhase.cpp:
  • dfg/DFGArgumentsUtilities.cpp:

(JSC::DFG::argumentsInvolveStackSlot):
(JSC::DFG::emitCodeToGetArgumentsArrayLength):

  • dfg/DFGArgumentsUtilities.h:
  • dfg/DFGAtTailAbstractState.h:

(JSC::DFG::AtTailAbstractState::operand):

  • dfg/DFGAvailabilityMap.cpp:

(JSC::DFG::AvailabilityMap::pruneByLiveness):

  • dfg/DFGAvailabilityMap.h:

(JSC::DFG::AvailabilityMap::closeStartingWithLocal):

  • dfg/DFGBasicBlock.cpp:

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

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

(JSC::DFG::BlockInsertionSet::insert):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::ByteCodeParser):
(JSC::DFG::ByteCodeParser::ensureTmps):
(JSC::DFG::ByteCodeParser::progressToNextCheckpoint):
(JSC::DFG::ByteCodeParser::newVariableAccessData):
(JSC::DFG::ByteCodeParser::getDirect):
(JSC::DFG::ByteCodeParser::get):
(JSC::DFG::ByteCodeParser::setDirect):
(JSC::DFG::ByteCodeParser::injectLazyOperandSpeculation):
(JSC::DFG::ByteCodeParser::getLocalOrTmp):
(JSC::DFG::ByteCodeParser::setLocalOrTmp):
(JSC::DFG::ByteCodeParser::setArgument):
(JSC::DFG::ByteCodeParser::findArgumentPositionForLocal):
(JSC::DFG::ByteCodeParser::findArgumentPosition):
(JSC::DFG::ByteCodeParser::flushImpl):
(JSC::DFG::ByteCodeParser::flushForTerminalImpl):
(JSC::DFG::ByteCodeParser::flush):
(JSC::DFG::ByteCodeParser::flushDirect):
(JSC::DFG::ByteCodeParser::addFlushOrPhantomLocal):
(JSC::DFG::ByteCodeParser::phantomLocalDirect):
(JSC::DFG::ByteCodeParser::flushForTerminal):
(JSC::DFG::ByteCodeParser::addToGraph):
(JSC::DFG::ByteCodeParser::InlineStackEntry::remapOperand const):
(JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal):
(JSC::DFG::ByteCodeParser::DelayedSetLocal::execute):
(JSC::DFG::ByteCodeParser::allocateTargetableBlock):
(JSC::DFG::ByteCodeParser::allocateUntargetableBlock):
(JSC::DFG::ByteCodeParser::handleRecursiveTailCall):
(JSC::DFG::ByteCodeParser::inlineCall):
(JSC::DFG::ByteCodeParser::handleVarargsInlining):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
(JSC::DFG::ByteCodeParser::parse):
(JSC::DFG::ByteCodeParser::getLocal): Deleted.
(JSC::DFG::ByteCodeParser::setLocal): Deleted.

  • dfg/DFGCFAPhase.cpp:

(JSC::DFG::CFAPhase::injectOSR):

  • dfg/DFGCPSRethreadingPhase.cpp:

(JSC::DFG::CPSRethreadingPhase::run):
(JSC::DFG::CPSRethreadingPhase::canonicalizeGetLocal):
(JSC::DFG::CPSRethreadingPhase::canonicalizeFlushOrPhantomLocalFor):
(JSC::DFG::CPSRethreadingPhase::canonicalizeFlushOrPhantomLocal):
(JSC::DFG::CPSRethreadingPhase::canonicalizeSet):
(JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlock):
(JSC::DFG::CPSRethreadingPhase::propagatePhis):
(JSC::DFG::CPSRethreadingPhase::phiStackFor):

  • dfg/DFGCSEPhase.cpp:
  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGCombinedLiveness.cpp:

(JSC::DFG::addBytecodeLiveness):

  • dfg/DFGCommonData.cpp:

(JSC::DFG::CommonData::addCodeOrigin):
(JSC::DFG::CommonData::addUniqueCallSiteIndex):
(JSC::DFG::CommonData::lastCallSite const):

  • dfg/DFGConstantFoldingPhase.cpp:

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

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGDriver.cpp:

(JSC::DFG::compileImpl):

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGForAllKills.h:

(JSC::DFG::forAllKilledOperands):
(JSC::DFG::forAllKilledNodesAtNodeIndex):
(JSC::DFG::forAllKillsInBlock):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::dump):
(JSC::DFG::Graph::dumpBlockHeader):
(JSC::DFG::Graph::substituteGetLocal):
(JSC::DFG::Graph::isLiveInBytecode):
(JSC::DFG::Graph::localsAndTmpsLiveInBytecode):
(JSC::DFG::Graph::methodOfGettingAValueProfileFor):
(JSC::DFG::Graph::localsLiveInBytecode): Deleted.

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::forAllLocalsAndTmpsLiveInBytecode):
(JSC::DFG::Graph::forAllLiveInBytecode):
(JSC::DFG::Graph::forAllLocalsLiveInBytecode): Deleted.

  • dfg/DFGInPlaceAbstractState.cpp:

(JSC::DFG::InPlaceAbstractState::InPlaceAbstractState):

  • dfg/DFGInPlaceAbstractState.h:

(JSC::DFG::InPlaceAbstractState::operand):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::linkOSRExits):
(JSC::DFG::JITCompiler::noticeOSREntry):

  • dfg/DFGJITCompiler.h:

(JSC::DFG::JITCompiler::emitStoreCallSiteIndex):

  • dfg/DFGLiveCatchVariablePreservationPhase.cpp:

(JSC::DFG::LiveCatchVariablePreservationPhase::isValidFlushLocation):
(JSC::DFG::LiveCatchVariablePreservationPhase::handleBlockForTryCatch):
(JSC::DFG::LiveCatchVariablePreservationPhase::newVariableAccessData):

  • dfg/DFGMovHintRemovalPhase.cpp:
  • dfg/DFGNode.h:

(JSC::DFG::StackAccessData::StackAccessData):
(JSC::DFG::Node::hasArgumentsChild):
(JSC::DFG::Node::argumentsChild):
(JSC::DFG::Node::operand):
(JSC::DFG::Node::hasUnlinkedOperand):
(JSC::DFG::Node::unlinkedOperand):
(JSC::DFG::Node::hasLoadVarargsData):
(JSC::DFG::Node::local): Deleted.
(JSC::DFG::Node::hasUnlinkedLocal): Deleted.
(JSC::DFG::Node::unlinkedLocal): Deleted.

  • dfg/DFGNodeType.h:
  • dfg/DFGOSRAvailabilityAnalysisPhase.cpp:

(JSC::DFG::OSRAvailabilityAnalysisPhase::run):
(JSC::DFG::LocalOSRAvailabilityCalculator::executeNode):

  • dfg/DFGOSREntry.cpp:

(JSC::DFG::prepareOSREntry):
(JSC::DFG::prepareCatchOSREntry):

  • dfg/DFGOSREntrypointCreationPhase.cpp:

(JSC::DFG::OSREntrypointCreationPhase::run):

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::OSRExit::emitRestoreArguments):
(JSC::DFG::OSRExit::compileExit):
(JSC::DFG::jsValueFor): Deleted.
(JSC::DFG::restoreCalleeSavesFor): Deleted.
(JSC::DFG::saveCalleeSavesFor): Deleted.
(JSC::DFG::restoreCalleeSavesFromVMEntryFrameCalleeSavesBuffer): Deleted.
(JSC::DFG::copyCalleeSavesToVMEntryFrameCalleeSavesBuffer): Deleted.
(JSC::DFG::saveOrCopyCalleeSavesFor): Deleted.
(JSC::DFG::createDirectArgumentsDuringExit): Deleted.
(JSC::DFG::createClonedArgumentsDuringExit): Deleted.
(JSC::DFG::emitRestoreArguments): Deleted.
(JSC::DFG::OSRExit::executeOSRExit): Deleted.
(JSC::DFG::reifyInlinedCallFrames): Deleted.
(JSC::DFG::adjustAndJumpToTarget): Deleted.
(JSC::DFG::printOSRExit): Deleted.

  • dfg/DFGOSRExit.h:
  • dfg/DFGOSRExitBase.h:

(JSC::DFG::OSRExitBase::isExitingToCheckpointHandler const):

  • dfg/DFGOSRExitCompilerCommon.cpp:

(JSC::DFG::callerReturnPC):
(JSC::DFG::reifyInlinedCallFrames):
(JSC::DFG::adjustAndJumpToTarget):

  • dfg/DFGObjectAllocationSinkingPhase.cpp:
  • dfg/DFGOpInfo.h:

(JSC::DFG::OpInfo::OpInfo):

  • dfg/DFGOperations.cpp:
  • dfg/DFGPhantomInsertionPhase.cpp:
  • dfg/DFGPreciseLocalClobberize.h:

(JSC::DFG::PreciseLocalClobberizeAdaptor::read):
(JSC::DFG::PreciseLocalClobberizeAdaptor::write):
(JSC::DFG::PreciseLocalClobberizeAdaptor::def):
(JSC::DFG::PreciseLocalClobberizeAdaptor::callIfAppropriate):

  • dfg/DFGPredictionInjectionPhase.cpp:

(JSC::DFG::PredictionInjectionPhase::run):

  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGPutStackSinkingPhase.cpp:
  • dfg/DFGSSAConversionPhase.cpp:

(JSC::DFG::SSAConversionPhase::run):

  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileMovHint):
(JSC::DFG::SpeculativeJIT::compileCurrentBlock):
(JSC::DFG::SpeculativeJIT::checkArgumentTypes):
(JSC::DFG::SpeculativeJIT::compileVarargsLength):
(JSC::DFG::SpeculativeJIT::compileLoadVarargs):
(JSC::DFG::SpeculativeJIT::compileForwardVarargs):
(JSC::DFG::SpeculativeJIT::compileCreateDirectArguments):
(JSC::DFG::SpeculativeJIT::compileGetArgumentCountIncludingThis):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::recordSetLocal):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • dfg/DFGStackLayoutPhase.cpp:

(JSC::DFG::StackLayoutPhase::run):
(JSC::DFG::StackLayoutPhase::assign):

  • dfg/DFGStrengthReductionPhase.cpp:

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

  • dfg/DFGThunks.cpp:

(JSC::DFG::osrExitThunkGenerator): Deleted.

  • dfg/DFGThunks.h:
  • dfg/DFGTypeCheckHoistingPhase.cpp:

(JSC::DFG::TypeCheckHoistingPhase::run):
(JSC::DFG::TypeCheckHoistingPhase::disableHoistingAcrossOSREntries):

  • dfg/DFGValidate.cpp:
  • dfg/DFGVarargsForwardingPhase.cpp:
  • dfg/DFGVariableAccessData.cpp:

(JSC::DFG::VariableAccessData::VariableAccessData):
(JSC::DFG::VariableAccessData::shouldUseDoubleFormatAccordingToVote):
(JSC::DFG::VariableAccessData::tallyVotesForShouldUseDoubleFormat):
(JSC::DFG::VariableAccessData::couldRepresentInt52Impl):

  • dfg/DFGVariableAccessData.h:

(JSC::DFG::VariableAccessData::operand):
(JSC::DFG::VariableAccessData::local): Deleted.

  • dfg/DFGVariableEvent.cpp:

(JSC::DFG::VariableEvent::dump const):

  • dfg/DFGVariableEvent.h:

(JSC::DFG::VariableEvent::spill):
(JSC::DFG::VariableEvent::setLocal):
(JSC::DFG::VariableEvent::movHint):
(JSC::DFG::VariableEvent::spillRegister const):
(JSC::DFG::VariableEvent::operand const):
(JSC::DFG::VariableEvent::bytecodeRegister const): Deleted.

  • dfg/DFGVariableEventStream.cpp:

(JSC::DFG::VariableEventStream::logEvent):
(JSC::DFG::VariableEventStream::reconstruct const):

  • dfg/DFGVariableEventStream.h:

(JSC::DFG::VariableEventStream::appendAndLog):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLForOSREntryJITCode.cpp:

(JSC::FTL::ForOSREntryJITCode::ForOSREntryJITCode):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::lower):
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileExtractOSREntryLocal):
(JSC::FTL::DFG::LowerDFGToB3::compileGetStack):
(JSC::FTL::DFG::LowerDFGToB3::compileGetCallee):
(JSC::FTL::DFG::LowerDFGToB3::compileSetCallee):
(JSC::FTL::DFG::LowerDFGToB3::compileSetArgumentCountIncludingThis):
(JSC::FTL::DFG::LowerDFGToB3::compileVarargsLength):
(JSC::FTL::DFG::LowerDFGToB3::compileLoadVarargs):
(JSC::FTL::DFG::LowerDFGToB3::compileForwardVarargs):
(JSC::FTL::DFG::LowerDFGToB3::getSpreadLengthFromInlineCallFrame):
(JSC::FTL::DFG::LowerDFGToB3::compileForwardVarargsWithSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileLogShadowChickenPrologue):
(JSC::FTL::DFG::LowerDFGToB3::getArgumentsLength):
(JSC::FTL::DFG::LowerDFGToB3::getCurrentCallee):
(JSC::FTL::DFG::LowerDFGToB3::callPreflight):
(JSC::FTL::DFG::LowerDFGToB3::appendOSRExitDescriptor):
(JSC::FTL::DFG::LowerDFGToB3::buildExitArguments):
(JSC::FTL::DFG::LowerDFGToB3::addressFor):
(JSC::FTL::DFG::LowerDFGToB3::payloadFor):
(JSC::FTL::DFG::LowerDFGToB3::tagFor):

  • ftl/FTLOSREntry.cpp:

(JSC::FTL::prepareOSREntry):

  • ftl/FTLOSRExit.cpp:

(JSC::FTL::OSRExitDescriptor::OSRExitDescriptor):

  • ftl/FTLOSRExit.h:
  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileStub):

  • ftl/FTLOperations.cpp:

(JSC::FTL::operationMaterializeObjectInOSR):

  • ftl/FTLOutput.cpp:

(JSC::FTL::Output::select):

  • ftl/FTLOutput.h:
  • ftl/FTLSelectPredictability.h: Copied from Source/JavaScriptCore/ftl/FTLForOSREntryJITCode.cpp.
  • ftl/FTLSlowPathCall.h:

(JSC::FTL::callOperation):

  • generator/Checkpoints.rb: Added.
  • generator/Opcode.rb:
  • generator/Section.rb:
  • heap/Heap.cpp:

(JSC::Heap::gatherScratchBufferRoots):

  • interpreter/CallFrame.cpp:

(JSC::CallFrame::callSiteAsRawBits const):
(JSC::CallFrame::unsafeCallSiteAsRawBits const):
(JSC::CallFrame::callSiteIndex const):
(JSC::CallFrame::unsafeCallSiteIndex const):
(JSC::CallFrame::setCurrentVPC):
(JSC::CallFrame::bytecodeIndex):
(JSC::CallFrame::codeOrigin):

  • interpreter/CallFrame.h:

(JSC::CallSiteIndex::CallSiteIndex):
(JSC::CallSiteIndex::operator bool const):
(JSC::CallSiteIndex::operator== const):
(JSC::CallSiteIndex::bits const):
(JSC::CallSiteIndex::fromBits):
(JSC::CallSiteIndex::bytecodeIndex const):
(JSC::DisposableCallSiteIndex::DisposableCallSiteIndex):
(JSC::CallFrame::callee const):
(JSC::CallFrame::unsafeCallee const):
(JSC::CallFrame::addressOfCodeBlock const):
(JSC::CallFrame::argumentCountIncludingThis const):
(JSC::CallFrame::offsetFor):
(JSC::CallFrame::setArgumentCountIncludingThis):
(JSC::CallFrame::setReturnPC):

  • interpreter/CallFrameInlines.h:

(JSC::CallFrame::r):
(JSC::CallFrame::uncheckedR):
(JSC::CallFrame::guaranteedJSValueCallee const):
(JSC::CallFrame::jsCallee const):
(JSC::CallFrame::codeBlock const):
(JSC::CallFrame::unsafeCodeBlock const):
(JSC::CallFrame::setCallee):
(JSC::CallFrame::setCodeBlock):

  • interpreter/CheckpointOSRExitSideState.h: Copied from Source/JavaScriptCore/dfg/DFGThunks.h.
  • interpreter/Interpreter.cpp:

(JSC::eval):
(JSC::sizeOfVarargs):
(JSC::loadVarargs):
(JSC::setupVarargsFrame):
(JSC::UnwindFunctor::operator() const):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):

  • interpreter/Interpreter.h:
  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::readInlinedFrame):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::emitGetFromCallFrameHeaderPtr):
(JSC::AssemblyHelpers::emitGetFromCallFrameHeader32):
(JSC::AssemblyHelpers::emitGetFromCallFrameHeader64):
(JSC::AssemblyHelpers::emitPutToCallFrameHeader):
(JSC::AssemblyHelpers::emitPutToCallFrameHeaderBeforePrologue):
(JSC::AssemblyHelpers::emitPutPayloadToCallFrameHeaderBeforePrologue):
(JSC::AssemblyHelpers::emitPutTagToCallFrameHeaderBeforePrologue):
(JSC::AssemblyHelpers::addressFor):
(JSC::AssemblyHelpers::tagFor):
(JSC::AssemblyHelpers::payloadFor):
(JSC::AssemblyHelpers::calleeFrameSlot):
(JSC::AssemblyHelpers::calleeArgumentSlot):
(JSC::AssemblyHelpers::calleeFrameTagSlot):
(JSC::AssemblyHelpers::calleeFramePayloadSlot):
(JSC::AssemblyHelpers::calleeFrameCallerFrame):
(JSC::AssemblyHelpers::argumentCount):

  • jit/CallFrameShuffler.cpp:

(JSC::CallFrameShuffler::CallFrameShuffler):

  • jit/CallFrameShuffler.h:

(JSC::CallFrameShuffler::setCalleeJSValueRegs):
(JSC::CallFrameShuffler::assumeCalleeIsCell):

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

(JSC::JIT::emit_op_unsigned):
(JSC::JIT::emit_compareAndJump):
(JSC::JIT::emit_compareAndJumpImpl):
(JSC::JIT::emit_compareUnsignedAndJump):
(JSC::JIT::emit_compareUnsignedAndJumpImpl):
(JSC::JIT::emit_compareUnsigned):
(JSC::JIT::emit_compareUnsignedImpl):
(JSC::JIT::emit_compareAndJumpSlow):
(JSC::JIT::emit_compareAndJumpSlowImpl):
(JSC::JIT::emit_op_inc):
(JSC::JIT::emit_op_dec):
(JSC::JIT::emit_op_mod):
(JSC::JIT::emitBitBinaryOpFastPath):
(JSC::JIT::emit_op_bitnot):
(JSC::JIT::emitRightShiftFastPath):
(JSC::JIT::emitMathICFast):
(JSC::JIT::emitMathICSlow):
(JSC::JIT::emit_op_div):

  • jit/JITCall.cpp:

(JSC::JIT::emitPutCallResult):
(JSC::JIT::compileSetupFrame):
(JSC::JIT::compileOpCall):

  • jit/JITExceptions.cpp:

(JSC::genericUnwind):

  • jit/JITInlines.h:

(JSC::JIT::isOperandConstantDouble):
(JSC::JIT::getConstantOperand):
(JSC::JIT::emitPutIntToCallFrameHeader):
(JSC::JIT::appendCallWithExceptionCheckSetJSValueResult):
(JSC::JIT::appendCallWithExceptionCheckSetJSValueResultWithProfile):
(JSC::JIT::linkSlowCaseIfNotJSCell):
(JSC::JIT::isOperandConstantChar):
(JSC::JIT::getOperandConstantInt):
(JSC::JIT::getOperandConstantDouble):
(JSC::JIT::emitInitRegister):
(JSC::JIT::emitLoadTag):
(JSC::JIT::emitLoadPayload):
(JSC::JIT::emitGet):
(JSC::JIT::emitPutVirtualRegister):
(JSC::JIT::emitLoad):
(JSC::JIT::emitLoad2):
(JSC::JIT::emitLoadDouble):
(JSC::JIT::emitLoadInt32ToDouble):
(JSC::JIT::emitStore):
(JSC::JIT::emitStoreInt32):
(JSC::JIT::emitStoreCell):
(JSC::JIT::emitStoreBool):
(JSC::JIT::emitStoreDouble):
(JSC::JIT::emitJumpSlowCaseIfNotJSCell):
(JSC::JIT::isOperandConstantInt):
(JSC::JIT::emitGetVirtualRegister):
(JSC::JIT::emitGetVirtualRegisters):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_mov):
(JSC::JIT::emit_op_end):
(JSC::JIT::emit_op_new_object):
(JSC::JIT::emitSlow_op_new_object):
(JSC::JIT::emit_op_overrides_has_instance):
(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof):
(JSC::JIT::emit_op_is_empty):
(JSC::JIT::emit_op_is_undefined):
(JSC::JIT::emit_op_is_undefined_or_null):
(JSC::JIT::emit_op_is_boolean):
(JSC::JIT::emit_op_is_number):
(JSC::JIT::emit_op_is_cell_with_type):
(JSC::JIT::emit_op_is_object):
(JSC::JIT::emit_op_ret):
(JSC::JIT::emit_op_to_primitive):
(JSC::JIT::emit_op_set_function_name):
(JSC::JIT::emit_op_not):
(JSC::JIT::emit_op_jfalse):
(JSC::JIT::emit_op_jeq_null):
(JSC::JIT::emit_op_jneq_null):
(JSC::JIT::emit_op_jundefined_or_null):
(JSC::JIT::emit_op_jnundefined_or_null):
(JSC::JIT::emit_op_jneq_ptr):
(JSC::JIT::emit_op_eq):
(JSC::JIT::emit_op_jeq):
(JSC::JIT::emit_op_jtrue):
(JSC::JIT::emit_op_neq):
(JSC::JIT::emit_op_jneq):
(JSC::JIT::emit_op_throw):
(JSC::JIT::compileOpStrictEq):
(JSC::JIT::compileOpStrictEqJump):
(JSC::JIT::emit_op_to_number):
(JSC::JIT::emit_op_to_numeric):
(JSC::JIT::emit_op_to_string):
(JSC::JIT::emit_op_to_object):
(JSC::JIT::emit_op_catch):
(JSC::JIT::emit_op_get_parent_scope):
(JSC::JIT::emit_op_switch_imm):
(JSC::JIT::emit_op_switch_char):
(JSC::JIT::emit_op_switch_string):
(JSC::JIT::emit_op_eq_null):
(JSC::JIT::emit_op_neq_null):
(JSC::JIT::emit_op_enter):
(JSC::JIT::emit_op_get_scope):
(JSC::JIT::emit_op_to_this):
(JSC::JIT::emit_op_create_this):
(JSC::JIT::emit_op_check_tdz):
(JSC::JIT::emitSlow_op_eq):
(JSC::JIT::emitSlow_op_neq):
(JSC::JIT::emitSlow_op_instanceof_custom):
(JSC::JIT::emit_op_new_regexp):
(JSC::JIT::emitNewFuncCommon):
(JSC::JIT::emitNewFuncExprCommon):
(JSC::JIT::emit_op_new_array):
(JSC::JIT::emit_op_new_array_with_size):
(JSC::JIT::emit_op_has_structure_property):
(JSC::JIT::emit_op_has_indexed_property):
(JSC::JIT::emitSlow_op_has_indexed_property):
(JSC::JIT::emit_op_get_direct_pname):
(JSC::JIT::emit_op_enumerator_structure_pname):
(JSC::JIT::emit_op_enumerator_generic_pname):
(JSC::JIT::emit_op_profile_type):
(JSC::JIT::emit_op_log_shadow_chicken_prologue):
(JSC::JIT::emit_op_log_shadow_chicken_tail):
(JSC::JIT::emit_op_argument_count):
(JSC::JIT::emit_op_get_rest_length):
(JSC::JIT::emit_op_get_argument):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_catch):

  • jit/JITOperations.cpp:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emitSlow_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emitGenericContiguousPutByVal):
(JSC::JIT::emitArrayStoragePutByVal):
(JSC::JIT::emitPutByValWithCachedId):
(JSC::JIT::emitSlow_op_put_by_val):
(JSC::JIT::emit_op_put_getter_by_id):
(JSC::JIT::emit_op_put_setter_by_id):
(JSC::JIT::emit_op_put_getter_setter_by_id):
(JSC::JIT::emit_op_put_getter_by_val):
(JSC::JIT::emit_op_put_setter_by_val):
(JSC::JIT::emit_op_del_by_id):
(JSC::JIT::emit_op_del_by_val):
(JSC::JIT::emit_op_try_get_by_id):
(JSC::JIT::emitSlow_op_try_get_by_id):
(JSC::JIT::emit_op_get_by_id_direct):
(JSC::JIT::emitSlow_op_get_by_id_direct):
(JSC::JIT::emit_op_get_by_id):
(JSC::JIT::emit_op_get_by_id_with_this):
(JSC::JIT::emitSlow_op_get_by_id):
(JSC::JIT::emitSlow_op_get_by_id_with_this):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emit_op_in_by_id):
(JSC::JIT::emitSlow_op_in_by_id):
(JSC::JIT::emitResolveClosure):
(JSC::JIT::emit_op_resolve_scope):
(JSC::JIT::emitLoadWithStructureCheck):
(JSC::JIT::emitGetClosureVar):
(JSC::JIT::emit_op_get_from_scope):
(JSC::JIT::emitSlow_op_get_from_scope):
(JSC::JIT::emitPutGlobalVariable):
(JSC::JIT::emitPutGlobalVariableIndirect):
(JSC::JIT::emitPutClosureVar):
(JSC::JIT::emit_op_put_to_scope):
(JSC::JIT::emit_op_get_from_arguments):
(JSC::JIT::emit_op_put_to_arguments):
(JSC::JIT::emitWriteBarrier):
(JSC::JIT::emit_op_get_internal_field):
(JSC::JIT::emit_op_put_internal_field):
(JSC::JIT::emitIntTypedArrayPutByVal):
(JSC::JIT::emitFloatTypedArrayPutByVal):

  • jit/JSInterfaceJIT.h:

(JSC::JSInterfaceJIT::emitLoadJSCell):
(JSC::JSInterfaceJIT::emitJumpIfNotJSCell):
(JSC::JSInterfaceJIT::emitLoadInt32):
(JSC::JSInterfaceJIT::emitLoadDouble):
(JSC::JSInterfaceJIT::emitGetFromCallFrameHeaderPtr):
(JSC::JSInterfaceJIT::emitPutToCallFrameHeader):
(JSC::JSInterfaceJIT::emitPutCellToCallFrameHeader):

  • jit/SetupVarargsFrame.cpp:

(JSC::emitSetupVarargsFrameFastCase):

  • jit/SpecializedThunkJIT.h:

(JSC::SpecializedThunkJIT::loadDoubleArgument):
(JSC::SpecializedThunkJIT::loadCellArgument):
(JSC::SpecializedThunkJIT::loadInt32Argument):

  • jit/ThunkGenerators.cpp:

(JSC::absThunkGenerator):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::getNonConstantOperand):
(JSC::LLInt::getOperand):
(JSC::LLInt::genericCall):
(JSC::LLInt::varargsSetup):
(JSC::LLInt::commonCallEval):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::handleVarargsCheckpoint):
(JSC::LLInt::dispatchToNextInstruction):
(JSC::LLInt::slow_path_checkpoint_osr_exit_from_inlined_call):
(JSC::LLInt::slow_path_checkpoint_osr_exit):
(JSC::LLInt::llint_throw_stack_overflow_error):

  • llint/LLIntSlowPaths.h:
  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/ArgList.h:

(JSC::MarkedArgumentBuffer::fill):

  • runtime/CachedTypes.cpp:

(JSC::CachedCodeBlock::hasCheckpoints const):
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
(JSC::CachedCodeBlock<CodeBlockType>::encode):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/ConstructData.cpp:

(JSC::construct):

  • runtime/ConstructData.h:
  • runtime/DirectArguments.cpp:

(JSC::DirectArguments::copyToArguments):

  • runtime/DirectArguments.h:
  • runtime/GenericArguments.h:
  • runtime/GenericArgumentsInlines.h:

(JSC::GenericArguments<Type>::copyToArguments):

  • runtime/JSArray.cpp:

(JSC::JSArray::copyToArguments):

  • runtime/JSArray.h:
  • runtime/JSImmutableButterfly.cpp:

(JSC::JSImmutableButterfly::copyToArguments):

  • runtime/JSImmutableButterfly.h:
  • runtime/JSLock.cpp:

(JSC::JSLock::willReleaseLock):

  • runtime/ModuleProgramExecutable.cpp:

(JSC::ModuleProgramExecutable::create):

  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

  • runtime/ScopedArguments.cpp:

(JSC::ScopedArguments::copyToArguments):

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

(JSC::VM::scanSideState const):
(JSC::VM::addCheckpointOSRSideState):
(JSC::VM::findCheckpointOSRSideState):

  • runtime/VM.h:

(JSC::VM::hasCheckpointOSRSideState const):

  • tools/VMInspector.cpp:

(JSC::VMInspector::dumpRegisters):

  • wasm/WasmFunctionCodeBlock.h:

(JSC::Wasm::FunctionCodeBlock::getConstant const):
(JSC::Wasm::FunctionCodeBlock::getConstantType const):

  • wasm/WasmLLIntGenerator.cpp:

(JSC::Wasm::LLIntGenerator::setUsesCheckpoints const):

  • wasm/WasmOperations.cpp:

(JSC::Wasm::operationWasmToJSException):

  • wasm/WasmSlowPaths.cpp:

Source/WTF:

  • WTF.xcodeproj/project.pbxproj:
  • wtf/Bitmap.h:

(WTF::WordType>::invert):
(WTF::WordType>::operator):
(WTF::WordType>::operator const const):

  • wtf/CMakeLists.txt:
  • wtf/EnumClassOperatorOverloads.h: Added.
  • wtf/FastBitVector.h:

(WTF::FastBitReference::operator bool const):
(WTF::FastBitReference::operator|=):
(WTF::FastBitReference::operator&=):
(WTF::FastBitVector::fill):
(WTF::FastBitVector::grow):

  • wtf/UnalignedAccess.h:

(WTF::unalignedLoad):
(WTF::unalignedStore):

Tools:

  • Scripts/run-jsc-stress-tests:
7:55 PM Changeset in webkit [254734] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

[iOS] Add telemetry for IOKIt classes not seen in test runs
https://bugs.webkit.org/show_bug.cgi?id=206386
<rdar://problem/58663519>

Reviewed by Per Arne Vollan.

Capture telemetry to show which IOKit classes are acitvely used in WebKit.

No new tests because this does not change behavior.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
7:47 PM Changeset in webkit [254733] by keith_miller@apple.com
  • 3 edits
    1 delete in trunk

Revert 254725 since it breaks tests
https://bugs.webkit.org/show_bug.cgi?id=206391

Unreviewed, revert.

JSTests:

  • stress/allocation-sinking-puthint-control-flow-2.js: Removed.

Source/JavaScriptCore:

  • dfg/DFGObjectAllocationSinkingPhase.cpp:
7:03 PM Changeset in webkit [254732] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WTF

Fix the build after r254701
<rdar://problem/58667355>

  • wtf/Platform.h:
  • wtf/PlatformEnable.h:

AdditionalFeatureDefines has to come first.

5:30 PM Changeset in webkit [254731] by Jon Davis
  • 2 edits in trunk/Websites/webkit.org

Ensure full URLs for relative path images for social meta data
https://bugs.webkit.org/show_bug.cgi?id=206382

Reviewed by Devin Rousso.

  • wp-content/plugins/social-meta.php:
5:24 PM Changeset in webkit [254730] by Devin Rousso
  • 17 edits in trunk/Source/WebInspectorUI

Web Inspector: add links to reference pages
https://bugs.webkit.org/show_bug.cgi?id=206309

Reviewed by Timothy Hatcher.

  • UserInterface/Base/Main.js:

(WI._handleDeviceSettingsToolbarButtonClicked):
(WI.createReferencePageLink): Added.

  • UserInterface/Views/Main.css:

(.reference-page-link): Added.
(.reference-page-link:active): Added.
(@media (-webkit-device-pixel-ratio: 1) .reference-page-link): Added.
(@media (prefers-color-scheme: dark) .reference-page-link): Added.
(@media (prefers-color-scheme: dark) .reference-page-link:active): Added.
(.device-settings-content):
(.device-settings-content > table): Added.
(.device-settings-content > table > tr > td:first-child): Added.
(.device-settings-content > .reference-page-link-container): Added.
(body[dir=ltr] .device-settings-content > .reference-page-link-container): Added.
(body[dir=rtl] .device-settings-content > .reference-page-link-container): Added.
(.device-settings-content > tr > td:first-child): Deleted.

  • UserInterface/Controllers/NetworkManager.js:

(WI.NetworkManager.prototype.async createBootstrapScript):

  • UserInterface/Controllers/BreakpointPopoverController.js:

(WI.BreakpointPopoverController.prototype._createPopoverContent):
(WI.BreakpointPopoverController.prototype._popoverActionsCreateAddActionButton):

  • UserInterface/Views/BreakpointPopoverController.css:

(.popover .edit-breakpoint-popover-content > table > tr > td.options): Added.
(.popover .edit-breakpoint-popover-content > table > tr > td.options > .reference-page-link-container): Added.
(body[dir=ltr] .popover .edit-breakpoint-popover-content > table > tr > td.options > .reference-page-link-container): Added.
(body[dir=rtl] .popover .edit-breakpoint-popover-content > table > tr > td.options > .reference-page-link-container): Added.
(body[dir=ltr] .popover .edit-breakpoint-popover-content .reference-page-link-container): Added.
(body[dir=rtl] .popover .edit-breakpoint-popover-content .reference-page-link-container): Added.

  • UserInterface/Views/EventBreakpointPopover.js:

(WI.EventBreakpointPopover.prototype.show):

  • UserInterface/Views/EventBreakpointPopover.css:

(.popover .event-breakpoint-content .reference-page-link-container): Added.

  • UserInterface/Views/URLBreakpointPopover.js:

(WI.URLBreakpointPopover.prototype.show):

  • UserInterface/Views/URLBreakpointPopover.css:

(.popover .url-breakpoint-content .reference-page-link-container): Added.

  • UserInterface/Views/LocalResourceOverridePopover.js:

(WI.LocalResourceOverridePopover.prototype.show):

  • UserInterface/Views/LocalResourceOverridePopover.css:

(.popover .local-resource-override-popover-content .reference-page-link-container): Added.
(body[dir=ltr] .popover .local-resource-override-popover-content .reference-page-link-container): Added.
(body[dir=rtl] .popover .local-resource-override-popover-content .reference-page-link-container): Added.

  • UserInterface/Views/SettingsTabContentView.js:

(WI.SettingsTabContentView.prototype.initialLayout):
(WI.SettingsTabContentView.prototype._createGeneralSettingsView):
(WI.SettingsTabContentView.prototype._createElementsSettingsView):
(WI.SettingsTabContentView.prototype._createSourcesSettingsView):
(WI.SettingsTabContentView.prototype._createConsoleSettingsView):
(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
(WI.SettingsTabContentView.prototype._createReferenceLink): Added.

  • UserInterface/Views/SettingsTabContentView.css:

(.content-view.tab.settings): Added.
(.content-view.tab.settings .navigation-bar): Added.
(.content-view.tab.settings .navigation-bar.invisible): Added.
(.content-view.tab.settings .navigation-bar .item.radio.button.text-only): Added.
(.content-view.tab.settings .navigation-bar .item.radio.button.text-only:before): Added.
(.content-view.tab.settings .navigation-bar .item.radio.button.text-only.selected): Added.
(.content-view.tab.settings > .settings-view): Added.
(.content-view.tab.settings > .settings-view > .separator): Added.
(.content-view.tab.settings > .settings-view > .container): Added.
(.content-view.tab.settings > .settings-view > .container.hidden): Added.
(.content-view.tab.settings > .settings-view > .container-centered): Added.
(.content-view.tab.settings > .settings-view > .container button): Added.
(.content-view.tab.settings > .settings-view > .container > .title): Added.
(.content-view.tab.settings > .settings-view > .container > .editor-group): Added.
(.content-view.tab.settings > .settings-view > .container > .editor-group > .editor): Added.
(.content-view.tab.settings > .settings-view > .container > .editor-group > .editor:first-child > *): Added.
(.content-view.tab.settings > .settings-view > .container > .editor-group > .editor input): Added.
(.content-view.tab.settings > .settings-view > .container > .editor-group > .editor input[type="checkbox"]): Added.
(.content-view.tab.settings > .settings-view > .container > .editor-group > .editor select): Added.
(.content-view.tab.settings > .settings-view > .container > .editor-group > .editor input[type="number"]): Added.
(.content-view.tab.settings > .settings-view > .container > .editor-group > .editor input[type="text"]): Added.
(.content-view.tab.settings > .settings-view > .container.reference): Added.
(.content-view.tab.settings > .settings-view > .container.reference > .reference-page-link): Added.
(.content-view.tab.settings > .settings-view > .container.reference > .reference-page-link > .go-to-arrow): Added.
(.content-view.settings .navigation-bar): Deleted.
(.content-view.settings .navigation-bar.invisible): Deleted.
(.content-view.settings .navigation-bar .item.radio.button.text-only): Deleted.
(.content-view.settings .navigation-bar .item.radio.button.text-only:before): Deleted.
(.content-view.settings .navigation-bar .item.radio.button.text-only.selected): Deleted.
(.content-view.settings > .settings-view): Deleted.
(.content-view.settings > .settings-view > .separator): Deleted.
(.content-view.settings > .settings-view > .container): Deleted.
(.content-view.settings > .settings-view > .container.hidden): Deleted.
(.content-view.settings > .settings-view > .container-centered): Deleted.
(.content-view.settings > .settings-view > .container button): Deleted.
(.content-view.settings > .settings-view > .container > .title): Deleted.
(.content-view.settings > .settings-view > .container > .editor-group): Deleted.
(.content-view.settings > .settings-view > .container > .editor-group > .editor): Deleted.
(.content-view.settings > .settings-view > .container > .editor-group > .editor:first-child > *): Deleted.
(.content-view.settings > .settings-view > .container > .editor-group > .editor input): Deleted.
(.content-view.settings > .settings-view > .container > .editor-group > .editor input[type="checkbox"]): Deleted.
(.content-view.settings > .settings-view > .container > .editor-group > .editor select): Deleted.
(.content-view.settings > .settings-view > .container > .editor-group > .editor input[type="number"]): Deleted.
(.content-view.settings > .settings-view > .container > .editor-group > .editor input[type="text"]): Deleted.
(@media (prefers-color-scheme: dark) .content-view.settings .navigation-bar): Deleted.
(@media (prefers-color-scheme: dark) .content-view.settings .navigation-bar .item.radio.button.text-only.selected): Deleted.

  • UserInterface/Views/BlackboxSettingsView.js:

(WI.BlackboxSettingsView.prototype.initialLayout):

  • UserInterface/Views/BlackboxSettingsView.css:

(.settings-view.blackbox > table > tbody td.url): Added.
(.settings-view.blackbox > table > tbody td.url > .CodeMirror):

  • Localizations/en.lproj/localizedStrings.js:
5:24 PM Changeset in webkit [254729] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

Unreviewed removing a stale FIXME comment
https://bugs.webkit.org/show_bug.cgi?id=204884

Follows-up for r254323.

  • platform/graphics/win/ComplexTextControllerUniscribe.cpp:

(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
Removed a stale FIXME comment. This comment was added by r23154. r23199
fixed the issue.

5:16 PM Changeset in webkit [254728] by weinig@apple.com
  • 10 edits
    1 copy in trunk/Source/WTF

Platform.h is out of control Part 7: Split calling convention macro definitions out of Platform.h and into a new PlatformCallingConventions.h
https://bugs.webkit.org/show_bug.cgi?id=206377

Reviewed by Anders Carlsson.

As a another step towards cleaning up Platform.h, split out all the calling convention
macros into their own file.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:

Add new header.

  • wtf/Platform.h:
  • wtf/PlatformCPU.h:
  • wtf/PlatformEnable.h:
  • wtf/PlatformHave.h:
  • wtf/PlatformLegacy.h:
  • wtf/PlatformOS.h:
  • wtf/PlatformUse.h:

Unify indirect inclusion guard.

  • wtf/PlatformCallingConventions.h: Copied from Source/WTF/wtf/Platform.h.
5:14 PM Changeset in webkit [254727] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: show the device settings menu when Web Inspector's debug mode is enabled
https://bugs.webkit.org/show_bug.cgi?id=206311

Reviewed by Brian Burg.

This only has an effect when Web Inspector is opened and the debug mode is enabled. If so,
the device settings toolbar icon will appear regardless of whether the inspected target is
a remote device or not. Disabling debug mode will not immediately remove the device settings
toolbar icon, but it will not reappear when Web Inspector is next opened (to allow for taking
screenshots and other such things).

  • UserInterface/Base/Main.js:

(WI.contentLoaded):

5:08 PM Changeset in webkit [254726] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

REGRESSION(r251487): Web Inspector: selected color in color picker has wrong lightness
https://bugs.webkit.org/show_bug.cgi?id=206202

Reviewed by Devin Rousso.

Currently, tintedColor setter has two code paths:

  • rgb2hsv convertion if the color is defined using color(...) syntax.
  • HSL to HSV convertion for any other color.

The latter was defined in the view, was untested, and incorrect.
This patch uses WI.Color.rgb2hsv convertion for all colors. This method is
already covered by tests.

  • UserInterface/Views/ColorSquare.js:

(WI.ColorSquare.prototype.set tintedColor):

4:55 PM Changeset in webkit [254725] by Tadeu Zagallo
  • 3 edits
    1 add in trunk

JSTests:
Object allocation sinking is missing PutHint for allocations unreachable in the graph
https://bugs.webkit.org/show_bug.cgi?id=203799
<rdar://problem/56852162>

Reviewed by Saam Barati.

  • stress/allocation-sinking-puthint-control-flow-2.js: Added.

(f.handler.construct):
(f):

Source/JavaScriptCore:
Object allocation sinking is missing PutHint for sunken allocations
https://bugs.webkit.org/show_bug.cgi?id=203799
<rdar://problem/56852162>

Reviewed by Saam Barati.

Consider the following graph:

Block #0:

1: PhantomCreateActivation()
2: PhantomNewFunction()
PutHint(@2, @1, FunctionActivationPLoc)
Branch(#1, #2)

Block #1:

3: MaterializeCreateActivation()
PutHint(@2, @3, FunctionActivationPLoc)
Upsilon(@3, 5)
Jump(#3)

Block #2:

4: MaterializeCreateActivation()
PutHint(@2, @4, FunctionActivationPLoc)
Upsilon(@4, 5)
Jump(#3)

Block #3:

5: Phi()
ExitOK()

On Block #3, we need to emit a PutHint after the Phi, since we might exit after it. However,
object allocation sinking skipped this Phi because it was checking whether the base of the
location that caused us to create this Phi (@2) was live, but it's dead in the graph (there
are no pointers to it). The issue is that, even though there are no pointers to the base, the
location PromotedHeapLocation(@2, FunctionActivationPLoc) is still live, so we should PutHint
to it. We fix it by checking for liveness of the location rather than its base.

  • dfg/DFGObjectAllocationSinkingPhase.cpp:
4:54 PM Changeset in webkit [254724] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

IPC hardening for WebPageProxy::SetPromisedDataForImage message
https://bugs.webkit.org/show_bug.cgi?id=206380
<rdar://problem/58625196>

Reviewed by Geoffrey Garen.

IPC hardening for WebPageProxy::SetPromisedDataForImage message. Make sure the shared memory handle sent over IPC is not null
and null check the SharedMemory object after calling SharedMemory::map().

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::setPromisedDataForImage):

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

Call AtomString::init in WebKit2Initialize.
<https://webkit.org/b/206375>
<rdar://problem/58646578>

Patch by Daniel Chen <thedanielchen@apple.com> on 2020-01-16
Reviewed by Timothy Hatcher.

  • Shared/Cocoa/WebKit2InitializeCocoa.mm:

(WebKit::runInitializationCode):

  • Shared/WebKit2Initialize.cpp:

(WebKit::InitializeWebKit2):

4:47 PM Changeset in webkit [254722] by rniwa@webkit.org
  • 3 edits
    2 adds in trunk

REGRESSION (r251110): Crash on https://developer.apple.com/tutorials/swiftui/creating-and-combining-views
https://bugs.webkit.org/show_bug.cgi?id=206337

Reviewed by Geoffrey Garen.

Source/WebCore:

The crash was caused by RadioButtonGroups::hasCheckedButton getting called by RadioInputType's
matchesIndeterminatePseudoClass during a style update which happens before the input element had a chance
to register itself with RadioButtonGroups in HTMLInputElement::didFinishInsertingNode.

This happens, in particular, when didFinishInsertingNode of other nodes that appear before the input element
executes arbitrary author scripts or otherwise update the style.

Test: fast/forms/match-pseudo-on-radio-before-finalizing-tree-insertion-crash.html

  • dom/RadioButtonGroups.cpp:

(WebCore::RadioButtonGroups::hasCheckedButton const):

LayoutTests:

Added a regression test. The test crashes on trunk and causes an infinite loop before r251110.

  • fast/forms/match-pseudo-on-radio-before-finalizing-tree-insertion-crash-expected.txt: Added.
  • fast/forms/match-pseudo-on-radio-before-finalizing-tree-insertion-crash.html: Added.
4:41 PM Changeset in webkit [254721] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Optimize LineCandidateContent for the most common type of content
https://bugs.webkit.org/show_bug.cgi?id=206371
<rdar://problem/58656853>

Reviewed by Antti Koivisto.

Optimize LineCandidateContent and the caller for the most common type of content (text) and also reduce the RunList vector initial size.
We normally pass one or 2 inline items to the LineBreaker in there.

  • layout/inlineformatting/InlineLineBreaker.h:
  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::LineCandidateContent::appendLineBreak):
(WebCore::Layout::LineCandidateContent::appendFloat):
(WebCore::Layout::LineCandidateContent::appendInlineContent):
(WebCore::Layout::LineLayoutContext::inlineItemWidth const):
(WebCore::Layout::LineLayoutContext::nextContentForLine):
(WebCore::Layout::LineLayoutContext::tryAddingFloatItems):
(WebCore::Layout::LineCandidateContent::append): Deleted.
(WebCore::Layout::inlineItemWidth): Deleted.

  • layout/inlineformatting/LineLayoutContext.h:
4:38 PM Changeset in webkit [254720] by Fujii Hironori
  • 6 edits
    1 delete in trunk

Unreviewed, rolling out r254678.

API tests failures for Mac port

Reverted changeset:

"KeyedDecoderGeneric crashes when it accesses data with non-
existing key"
https://bugs.webkit.org/show_bug.cgi?id=205902
https://trac.webkit.org/changeset/254678

4:15 PM Changeset in webkit [254719] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

IPC hardening for WebPageProxy::savePDFToTemporaryFolder* / WebPageProxy::openPDFFromTemporaryFolder* messages
https://bugs.webkit.org/show_bug.cgi?id=206378
<rdar://problem/58622919>

Reviewed by Geoffrey Garen.

IPC hardening for WebPageProxy::savePDFToTemporaryFolder* / WebPageProxy::openPDFFromTemporaryFolder* messages.
Make sure the UUID passed over IPC is a valid HashMap key.

  • UIProcess/WebPageProxy.h:
  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplication):
(WebKit::WebPageProxy::openPDFFromTemporaryFolderWithNativeApplication):

4:13 PM Changeset in webkit [254718] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

IPC hardening for WebPageProxy::RegisterAttachmentIdentifier*
https://bugs.webkit.org/show_bug.cgi?id=206376
<rdar://problem/58622645>

Reviewed by David Kilzer.

IPC hardening for WebPageProxy::RegisterAttachmentIdentifier*, validate identifiers sent over
IPC to make sure they are valid keys in our HashMap.

  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebPageProxy.h:
4:06 PM Changeset in webkit [254717] by rmorisset@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

Try to simplify the template deduction used by callOperation in DFGSpeculativeJIT
https://bugs.webkit.org/show_bug.cgi?id=206329

Reviewed by Keith Miller.

The change is very simple: stop using NoResultTag in callOperation, since it is redundant with FunctionTraits<OperationType>::hasResult

  • dfg/DFGSlowPathGenerator.h:

(JSC::DFG::CallResultAndArgumentsSlowPathGenerator::unpackAndGenerate):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compilePutAccessorById):
(JSC::DFG::SpeculativeJIT::compilePutGetterSetterById):
(JSC::DFG::SpeculativeJIT::compilePutDynamicVar):
(JSC::DFG::SpeculativeJIT::compilePutAccessorByVal):
(JSC::DFG::SpeculativeJIT::compileDefineDataProperty):
(JSC::DFG::SpeculativeJIT::compileDefineAccessorProperty):
(JSC::DFG::SpeculativeJIT::compilePutByIdWithThis):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::callOperation):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

3:53 PM Changeset in webkit [254716] by rmorisset@apple.com
  • 4 edits
    1 add in trunk

Teach the bytecode that arithmetic operations can return bigints
https://bugs.webkit.org/show_bug.cgi?id=205416

Reviewed by Yusuke Suzuki.

JSTests:

This file crashes in debug mode without the fix.

  • stress/big-int-arithmetic-return-big-int.js: Added.

(fooAdd):
(fooSub):
(fooMul):
(fooDiv):

Source/JavaScriptCore:

Add already has the correct ResultType, but previously Sub/Mult/Div/Mod/Pow/Negate were always claimed to return Number,
and when BigInt is enabled they can also return BigInt.
UnaryPlus is left unchanged as it is invalid on a BigInt (to keep asm.js working as intended).

  • parser/NodeConstructors.h:

(JSC::NegateNode::NegateNode):
(JSC::PowNode::PowNode):
(JSC::MultNode::MultNode):
(JSC::DivNode::DivNode):
(JSC::ModNode::ModNode):
(JSC::SubNode::SubNode):

  • parser/ResultType.h:

(JSC::ResultType::bigIntOrNumberType): Added.
(JSC::ResultType::forNonAddArith):
(JSC::ResultType::forUnaryArith):

3:26 PM Changeset in webkit [254715] by Alan Coon
  • 1 copy in tags/Safari-610.1.1

Tag Safari-610.1.1.

3:24 PM Changeset in webkit [254714] by rmorisset@apple.com
  • 46 edits in trunk/Source

Use dataLogIf more regularly
https://bugs.webkit.org/show_bug.cgi?id=206332

Reviewed by Keith Miller.

Source/JavaScriptCore:

There is lots of code that reads

if (Options::foobar())

dataLogLn("...")

There are a couple of benefits to replacing those by dataLogLnIf(Options::foobar(), "..."):

  • Readability, by reducing the number of lines taken by logging
  • Less lines appearing as not-taken in test coverage wrongly (wrongly because we probably don't care for the coverage of logging code)
  • possibly a tiny perf benefit since dataLogIf correctly uses UNLIKELY.

This patch is a fairly trivial refactoring where I looked for that pattern and replaced it everywhere it appeared in JSC.

  • bytecode/BytecodeGeneratorification.cpp:

(JSC::performGeneratorification):

  • bytecode/BytecodeLivenessAnalysis.cpp:

(JSC::BytecodeLivenessAnalysis::BytecodeLivenessAnalysis):

  • bytecode/CallLinkInfo.cpp:

(JSC::CallLinkInfo::visitWeak):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finalizeLLIntInlineCaches):
(JSC::CodeBlock::noticeIncomingCall):
(JSC::CodeBlock::optimizationThresholdScalingFactor):
(JSC::CodeBlock::optimizeNextInvocation):
(JSC::CodeBlock::dontOptimizeAnytimeSoon):
(JSC::CodeBlock::optimizeAfterWarmUp):
(JSC::CodeBlock::optimizeAfterLongWarmUp):
(JSC::CodeBlock::optimizeSoon):
(JSC::CodeBlock::forceOptimizationSlowPathConcurrently):
(JSC::CodeBlock::setOptimizationThresholdBasedOnCompilationResult):
(JSC::CodeBlock::shouldOptimizeNow):

  • bytecode/DFGExitProfile.cpp:

(JSC::DFG::ExitProfile::add):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseCodeBlock):

  • dfg/DFGCFAPhase.cpp:
  • dfg/DFGJITCode.cpp:

(JSC::DFG::JITCode::optimizeNextInvocation):
(JSC::DFG::JITCode::dontOptimizeAnytimeSoon):
(JSC::DFG::JITCode::optimizeAfterWarmUp):
(JSC::DFG::JITCode::optimizeSoon):
(JSC::DFG::JITCode::forceOptimizationSlowPathConcurrently):
(JSC::DFG::JITCode::setOSREntryBlock):

  • dfg/DFGJumpReplacement.cpp:

(JSC::DFG::JumpReplacement::fire):

  • dfg/DFGOSREntry.cpp:

(JSC::DFG::prepareOSREntry):

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::OSRExit::compileExit):

  • dfg/DFGObjectAllocationSinkingPhase.cpp:
  • dfg/DFGOperations.cpp:
  • dfg/DFGPlan.cpp:

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

  • dfg/DFGToFTLDeferredCompilationCallback.cpp:

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

  • dfg/DFGToFTLForOSREntryDeferredCompilationCallback.cpp:

(JSC::DFG::ToFTLForOSREntryDeferredCompilationCallback::compilationDidBecomeReadyAsynchronously):
(JSC::DFG::ToFTLForOSREntryDeferredCompilationCallback::compilationDidComplete):

  • dfg/DFGWorklist.cpp:

(JSC::DFG::Worklist::completeAllReadyPlansForVM):

  • ftl/FTLOSREntry.cpp:

(JSC::FTL::prepareOSREntry):

  • heap/Heap.cpp:

(JSC::Heap::lastChanceToFinalize):
(JSC::Heap::sweepSynchronously):
(JSC::Heap::collectNow):
(JSC::Heap::runBeginPhase):
(JSC::Heap::runFixpointPhase):
(JSC::Heap::runReloopPhase):
(JSC::Heap::runEndPhase):
(JSC::Heap::finalize):
(JSC::Heap::willStartCollection):
(JSC::Heap::updateAllocationLimits):
(JSC::Heap::notifyIsSafeToCollect):

  • heap/MarkStackMergingConstraint.cpp:

(JSC::MarkStackMergingConstraint::prepareToExecuteImpl):

  • heap/MarkedSpace.cpp:
  • heap/MarkingConstraint.cpp:

(JSC::MarkingConstraint::prepareToExecute):

  • heap/MarkingConstraintSet.cpp:

(JSC::MarkingConstraintSet::executeConvergence):
(JSC::MarkingConstraintSet::executeConvergenceImpl):
(JSC::MarkingConstraintSet::executeAll):

  • heap/MarkingConstraintSolver.cpp:

(JSC::MarkingConstraintSolver::execute):

  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::appendToMarkStack):
(JSC::SlotVisitor::visitChildren):
(JSC::SlotVisitor::didRace):

  • heap/StochasticSpaceTimeMutatorScheduler.cpp:

(JSC::StochasticSpaceTimeMutatorScheduler::beginCollection):
(JSC::StochasticSpaceTimeMutatorScheduler::didExecuteConstraints):

  • jit/JIT.cpp:

(JSC::JIT::link):

  • jit/JITExceptions.cpp:

(JSC::genericUnwind):

  • jit/JITOperations.cpp:
  • jit/JITToDFGDeferredCompilationCallback.cpp:

(JSC::JITToDFGDeferredCompilationCallback::compilationDidBecomeReadyAsynchronously):
(JSC::JITToDFGDeferredCompilationCallback::compilationDidComplete):

  • jit/JITWorklist.cpp:

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

  • jit/PolymorphicCallStubRoutine.cpp:

(JSC::PolymorphicCallNode::unlink):

  • jit/Repatch.cpp:

(JSC::unlinkFor):
(JSC::linkVirtualFor):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::jitCompileAndSetHeuristics):
(JSC::LLInt::entryOSR):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • parser/ModuleAnalyzer.cpp:

(JSC::ModuleAnalyzer::analyze):

  • runtime/JSModuleLoader.cpp:

(JSC::JSModuleLoader::importModule):
(JSC::JSModuleLoader::resolveSync):
(JSC::JSModuleLoader::fetch):
(JSC::JSModuleLoader::evaluate):
(JSC::moduleLoaderModuleDeclarationInstantiation):

  • runtime/ScriptExecutable.cpp:

(JSC::ScriptExecutable::installCode):

  • runtime/VM.cpp:

(JSC::VM::throwException):

  • tools/CompilerTimingScope.cpp:

(JSC::CompilerTimingScope::CompilerTimingScope):
(JSC::CompilerTimingScope::~CompilerTimingScope):

  • wasm/WasmMemory.cpp:
  • wasm/js/JSWebAssembly.cpp:

(JSC::resolve):

  • yarr/YarrJIT.cpp:

(JSC::Yarr::jitCompile):

  • yarr/YarrPattern.cpp:

(JSC::Yarr::YarrPattern::compile):

Source/WTF:

  • wtf/DataLog.h:

(WTF::dataLog): Marked NEVER_INLINE, since it should never be perf-sensitive

3:14 PM Changeset in webkit [254713] by don.olmstead@sony.com
  • 4 edits
    15 adds in trunk

[PlayStation] Enable WebKit
https://bugs.webkit.org/show_bug.cgi?id=205965

Reviewed by Ross Kirsling.

.:

Turn on build WebKit for the PlayStation port. Temporarily turn off API tests
until the WebKit tests are added.

  • Source/cmake/OptionsPlayStation.cmake:

Source/WebKit:

Add the CMake platform for PlayStation. Add stubs for platform specific bits.
This gets us to linking through WebKit.

  • Platform/unix/ModuleUnix.cpp: Added.

(WebKit::Module::load):
(WebKit::Module::unload):
(WebKit::Module::platformFunctionPointer const):

  • PlatformPlayStation.cmake: Added.
  • UIProcess/Launcher/playstation/ProcessLauncherPlayStation.cpp: Added.

(WebKit::ProcessLauncher::launchProcess):
(WebKit::ProcessLauncher::terminateProcess):
(WebKit::ProcessLauncher::platformInvalidate):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebsiteData/playstation/WebsiteDataStorePlayStation.cpp: Added.

(WebKit::WebsiteDataStore::platformInitialize):
(WebKit::WebsiteDataStore::platformDestroy):
(WebKit::WebsiteDataStore::platformRemoveRecentSearches):
(WebKit::WebsiteDataStore::defaultApplicationCacheDirectory):
(WebKit::WebsiteDataStore::defaultCacheStorageDirectory):
(WebKit::WebsiteDataStore::defaultNetworkCacheDirectory):
(WebKit::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
(WebKit::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory):
(WebKit::WebsiteDataStore::defaultLocalStorageDirectory):
(WebKit::WebsiteDataStore::defaultMediaKeysStorageDirectory):
(WebKit::WebsiteDataStore::defaultWebSQLDatabaseDirectory):
(WebKit::WebsiteDataStore::defaultResourceLoadStatisticsDirectory):
(WebKit::WebsiteDataStore::cacheDirectoryFileSystemRepresentation):
(WebKit::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):

  • UIProcess/playstation/WebPageProxyPlayStation.cpp: Added.

(WebKit::WebPageProxy::platformInitialize):
(WebKit::WebPageProxy::viewBackend):
(WebKit::WebPageProxy::standardUserAgent):
(WebKit::WebPageProxy::saveRecentSearches):
(WebKit::WebPageProxy::loadRecentSearches):
(WebKit::WebPageProxy::updateEditorState):

  • UIProcess/playstation/WebProcessPoolPlayStation.cpp: Added.

(WebKit::WebProcessPool::platformInitialize):
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::platformInvalidateContext):
(WebKit::WebProcessPool::platformResolvePathsForSandboxExtensions):

  • WebProcess/InjectedBundle/playstation/InjectedBundlePlayStation.cpp: Added.

(WebKit::InjectedBundle::initialize):
(WebKit::InjectedBundle::setBundleParameter):
(WebKit::InjectedBundle::setBundleParameters):

  • WebProcess/WebPage/playstation/WebPagePlayStation.cpp: Added.

(WebKit::WebPage::platformInitialize):
(WebKit::WebPage::platformReinitialize):
(WebKit::WebPage::platformDetach):
(WebKit::WebPage::performDefaultBehaviorForKeyEvent):
(WebKit::WebPage::platformCanHandleRequest):
(WebKit::WebPage::platformUserAgent const):
(WebKit::WebPage::handleEditingKeyboardEvent):
(WebKit::WebPage::platformEditorState const):

  • WebProcess/playstation/WebProcessPlayStation.cpp: Added.

(WebKit::WebProcess::platformInitializeWebProcess):
(WebKit::WebProcess::platformSetWebsiteDataStoreParameters):
(WebKit::WebProcess::platformTerminate):
(WebKit::WebProcess::platformSetCacheModel):

3:04 PM Changeset in webkit [254712] by rmorisset@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Reduce the code generated by DFGSlowPathGenerator.h
https://bugs.webkit.org/show_bug.cgi?id=206330

Reviewed by Mark Lam.

The FunctionType parameter is only needed by CallResultAndArgumentsSlowPathGenerator, not by its base class CallSlowPathGenerator.
Moving it allows saving about 200kB from JavaScriptCore (in Release mode), by reducing the number of instantiations of the methods of CallSlowPathGenerator.

  • dfg/DFGSlowPathGenerator.h:

(JSC::DFG::CallSlowPathGenerator::CallSlowPathGenerator):
(JSC::DFG::CallResultAndArgumentsSlowPathGenerator::CallResultAndArgumentsSlowPathGenerator):

2:57 PM Changeset in webkit [254711] by Chris Dumez
  • 7 edits
    1 add in trunk

Regression(r253224) No longer able to prevent a tab from closing via the beforeunload prompt
https://bugs.webkit.org/show_bug.cgi?id=206366
<rdar://problem/58537467>

Reviewed by Geoffrey Garen.

Source/WebKit:

Change is covered by new API test.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _tryClose]):
(-[WKWebView _isClosed]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:

Add new _tryClose / _isClosed SPI on WKWebView in order to write an API test to cover
the change.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
In WebPageProxy::tryClose(), we start a timer before sending the TryClose async IPC to the
WebProcess. We would then stop the timer when receiving the response to the TryClose IPC.
If the timer fires, we would forcefully close the page. The issue was that before answering
the TryClose IPC, the WebContent process would send a sync RunBeforeUnloadConfirmPanel IPC
to the UIProcess to show the confirmation prompt, and this would fail to stop the timer.
WebPageProxy::runBeforeUnloadConfirmPanel() would spin a nested run loop to show the prompt
and we would time out while showing the prompt.

Tools:

tryClose_timeout_fix

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/beforeunload.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/ModalAlerts.mm:

(-[SlowBeforeUnloadPromptUIDelegate _webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:completionHandler:]):
(-[SlowBeforeUnloadPromptUIDelegate webViewDidClose:]):
(TEST):

2:54 PM Changeset in webkit [254710] by jiewen_tan@apple.com
  • 5 edits in trunk

[WebAuthn] User Verification (UV) option present on a CTAP2 authenticatorMakeCredential while the authenticator has not advertised support for it
https://bugs.webkit.org/show_bug.cgi?id=204111
<rdar://problem/57019604>

Reviewed by Brent Fulgham.

Source/WebCore:

Covered by API tests.

  • Modules/webauthn/fido/DeviceRequestConverter.cpp:

(fido::encodeMakeCredenitalRequestAsCBOR):
(fido::encodeGetAssertionRequestAsCBOR):
Only set UV if RP requires it.

Tools:

  • TestWebKitAPI/Tests/WebCore/CtapRequestTest.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebCore/FidoTestData.h:
2:26 PM Changeset in webkit [254709] by Jon Davis
  • 3 edits in trunk/Websites/webkit.org

Add support for categories and custom post types to the social meta plugin
https://bugs.webkit.org/show_bug.cgi?id=206327

Reviewed by Devin Rousso.

  • wp-content/plugins/social-meta.php:
  • wp-content/plugins/web-inspector-pages.php:
  • wp-content/themes/webkit/archive-web_inspector_page.php:
2:05 PM Changeset in webkit [254708] by ysuzuki@apple.com
  • 48 edits
    1 add in trunk

[bmalloc] IsoHeap's initial setup should be small
https://bugs.webkit.org/show_bug.cgi?id=206214

Reviewed by Michael Saboff.

Source/bmalloc:

Keep IsoHeap related data structures small by using Packed technique. We start using IsoHeap for many classes,
then it is important that we keep metadata for IsoHeap small because these data persistently exists.

  1. We pass IsoHeapImpl<> as a parameter instead of holding it unnecessarily.
  2. We make some of pointers Packed so that we can keep sizeof(IsoHeapImpl<Config>) small.
  3. One of the drawback of PackedPtr is that loading and storing are not atomic. And we pass const std::lock_guard<Mutex>& to functions if functions need to be called with lock so that we ensure that PackedPtr are accessed only when lock is held correctly.
  • CMakeLists.txt:
  • bmalloc.xcodeproj/project.pbxproj:
  • bmalloc/Algorithm.h:

(bmalloc::ctzConstexpr):
(bmalloc::getLSBSetNonZeroConstexpr):

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

(bmalloc::DebugHeap::DebugHeap):

  • bmalloc/DebugHeap.h:
  • bmalloc/DeferredTrigger.h:
  • bmalloc/DeferredTriggerInlines.h:

(bmalloc::DeferredTrigger<trigger>::didBecome):
(bmalloc::DeferredTrigger<trigger>::handleDeferral):

  • bmalloc/Environment.cpp:

(bmalloc::Environment::Environment):

  • bmalloc/Environment.h:
  • bmalloc/Gigacage.cpp:

(bmalloc::PrimitiveDisableCallbacks::PrimitiveDisableCallbacks):

  • bmalloc/Heap.cpp:

(bmalloc::Heap::freeableMemory):
(bmalloc::Heap::markAllLargeAsEligibile):
(bmalloc::Heap::decommitLargeRange):
(bmalloc::Heap::scavenge):
(bmalloc::Heap::scavengeToHighWatermark):

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

(bmalloc::HeapConstants::HeapConstants):

  • bmalloc/HeapConstants.h:
  • bmalloc/IsoAllocator.h:
  • bmalloc/IsoAllocatorInlines.h:

(bmalloc::IsoAllocator<Config>::IsoAllocator):
(bmalloc::IsoAllocator<Config>::allocate):
(bmalloc::IsoAllocator<Config>::allocateSlow):
(bmalloc::IsoAllocator<Config>::scavenge):

  • bmalloc/IsoDeallocatorInlines.h:

(bmalloc::IsoDeallocator<Config>::scavenge):

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

(bmalloc::passedNumPages>::IsoDirectory):
(bmalloc::passedNumPages>::takeFirstEligible):
(bmalloc::passedNumPages>::didBecome):
(bmalloc::passedNumPages>::didDecommit):
(bmalloc::passedNumPages>::scavengePage):
(bmalloc::passedNumPages>::scavenge):
(bmalloc::passedNumPages>::scavengeToHighWatermark):
(bmalloc::passedNumPages>::forEachCommittedPage):

  • bmalloc/IsoHeapImpl.cpp:

(bmalloc::IsoHeapImplBase::IsoHeapImplBase):

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

(bmalloc::IsoHeapImpl<Config>::IsoHeapImpl):
(bmalloc::IsoHeapImpl<Config>::takeFirstEligible):
(bmalloc::IsoHeapImpl<Config>::didBecomeEligibleOrDecommited):
(bmalloc::IsoHeapImpl<Config>::scavenge):
(bmalloc::IsoHeapImpl<Config>::scavengeToHighWatermark):
(bmalloc::IsoHeapImplBase::freeableMemory):
(bmalloc::IsoHeapImpl<Config>::numLiveObjects):
(bmalloc::IsoHeapImpl<Config>::numCommittedPages):
(bmalloc::IsoHeapImpl<Config>::forEachDirectory):
(bmalloc::IsoHeapImpl<Config>::forEachCommittedPage):
(bmalloc::IsoHeapImpl<Config>::forEachLiveObject):
(bmalloc::IsoHeapImplBase::footprint):
(bmalloc::IsoHeapImplBase::didCommit):
(bmalloc::IsoHeapImplBase::didDecommit):
(bmalloc::IsoHeapImplBase::isNowFreeable):
(bmalloc::IsoHeapImplBase::isNoLongerFreeable):
(bmalloc::IsoHeapImpl<Config>::allocateFromShared):
(bmalloc::IsoHeapImpl<Config>::freeableMemory): Deleted.
(bmalloc::IsoHeapImpl<Config>::footprint): Deleted.
(bmalloc::IsoHeapImpl<Config>::didCommit): Deleted.
(bmalloc::IsoHeapImpl<Config>::didDecommit): Deleted.
(bmalloc::IsoHeapImpl<Config>::isNowFreeable): Deleted.
(bmalloc::IsoHeapImpl<Config>::isNoLongerFreeable): Deleted.

  • bmalloc/IsoPage.h:

(bmalloc::IsoPageBase::IsoPageBase):

  • bmalloc/IsoPageInlines.h:

(bmalloc::IsoPage<Config>::IsoPage):
(bmalloc::IsoPage<Config>::free):
(bmalloc::IsoPage<Config>::startAllocating):
(bmalloc::IsoPage<Config>::stopAllocating):
(bmalloc::IsoPage<Config>::forEachLiveObject):

  • bmalloc/IsoSharedHeap.h:

(bmalloc::IsoSharedHeap::IsoSharedHeap):

  • bmalloc/IsoSharedHeapInlines.h:

(bmalloc::IsoSharedHeap::allocateNew):
(bmalloc::IsoSharedHeap::allocateSlow):

  • bmalloc/IsoSharedPage.h:
  • bmalloc/IsoSharedPageInlines.h:

(bmalloc::IsoSharedPage::free):
(bmalloc::IsoSharedPage::startAllocating):
(bmalloc::IsoSharedPage::stopAllocating):

  • bmalloc/IsoTLS.h:
  • bmalloc/IsoTLSAllocatorEntry.h:
  • bmalloc/IsoTLSAllocatorEntryInlines.h:

(bmalloc::IsoTLSAllocatorEntry<Config>::scavenge):

  • bmalloc/IsoTLSDeallocatorEntry.h:
  • bmalloc/IsoTLSDeallocatorEntryInlines.h:

(bmalloc::IsoTLSDeallocatorEntry<Config>::scavenge):

  • bmalloc/IsoTLSEntry.cpp:

(bmalloc::IsoTLSEntry::IsoTLSEntry):

  • bmalloc/IsoTLSEntry.h:
  • bmalloc/IsoTLSEntryInlines.h:

(bmalloc::DefaultIsoTLSEntry<EntryType>::DefaultIsoTLSEntry):
(bmalloc::DefaultIsoTLSEntry<EntryType>::~DefaultIsoTLSEntry): Deleted.
(bmalloc::DefaultIsoTLSEntry<EntryType>::scavenge): Deleted.

  • bmalloc/IsoTLSInlines.h:

(bmalloc::IsoTLS::scavenge):
(bmalloc::IsoTLS::allocateImpl):
(bmalloc::IsoTLS::allocateFast):
(bmalloc::IsoTLS::allocateSlow):

  • bmalloc/IsoTLSLayout.cpp:

(bmalloc::IsoTLSLayout::add):

  • bmalloc/Packed.h: Added.

(bmalloc::Packed::Packed):
(bmalloc::Packed::get const):
(bmalloc::Packed::set):
(bmalloc::Packed::operator=):
(bmalloc::Packed::exchange):
(bmalloc::Packed::swap):
(bmalloc::alignof):
(bmalloc::PackedPtrTraits::exchange):
(bmalloc::PackedPtrTraits::swap):
(bmalloc::PackedPtrTraits::unwrap):

  • bmalloc/Scavenger.cpp:

(bmalloc::Scavenger::Scavenger):

  • bmalloc/Scavenger.h:
  • bmalloc/VMHeap.cpp:

(bmalloc::VMHeap::VMHeap):

  • bmalloc/VMHeap.h:
  • bmalloc/Zone.cpp:

(bmalloc::Zone::Zone):

  • bmalloc/Zone.h:

Tools:

  • TestWebKitAPI/Tests/WTF/bmalloc/IsoHeap.cpp:

(assertHasObjects):
(assertHasOnlyObjects):
(assertClean):
(TEST):

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

[GTK] Gardening indexeddb tests
https://bugs.webkit.org/show_bug.cgi?id=206370

Unreviewed gardening.

Patch by Lauro Moura <Lauro Moura> on 2020-01-16

  • platform/gtk/TestExpectations:
1:45 PM Changeset in webkit [254706] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebKit

Add finite timeout when synchronously terminating a service worker
https://bugs.webkit.org/show_bug.cgi?id=206325
<rdar://problem/58183380>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-01-16
Reviewed by Youenn Fablet.

When this message reply is never received, it hangs everything.
If we haven't received verification that a service worker was terminated in 10 seconds, unhang everything
and tell the UI process to terminate the hanging service worker process. Continue handling messages during
these 10 seconds to hopefully turn a bad hang into no perceptible hang.

  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:

(WebKit::WebSWServerToContextConnection::syncTerminateWorker):

1:31 PM Changeset in webkit [254705] by commit-queue@webkit.org
  • 2 edits
    1 add
    1 delete in trunk/LayoutTests

REGRESSION: [ Mac WK2 ] fast/text/international/unicode-bidi-other-neutrals.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=205808

Patch by Doug Kelly <Doug Kelly> on 2020-01-16
Reviewed by Maciej Stachowiak.

Update the testcase for bidi text runs ending with other neutrals to dumpAsText, instead of trying
to compare visual content.

  • fast/text/international/unicode-bidi-other-neutrals-expected.html: Removed.
  • fast/text/international/unicode-bidi-other-neutrals-expected.txt: Added.
  • fast/text/international/unicode-bidi-other-neutrals.html:
1:30 PM Changeset in webkit [254704] by beidson@apple.com
  • 6 edits in trunk

Make the callAsyncJavaScriptFunction function actually be async (so await works).
<rdar://problem/58571682> and https://bugs.webkit.org/show_bug.cgi?id=206364

Reviewed by Geoffrey Garen.

Source/WebCore:

Covered by API tests.

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::callInWorld):

Source/WebKit:

  • UIProcess/API/Cocoa/WKWebViewPrivate.h: Update callAsyncJavaScriptFunction: header docs.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/AsyncFunction.mm:

(TestWebKitAPI::TEST):

1:02 PM Changeset in webkit [254703] by don.olmstead@sony.com
  • 26 edits
    1 delete in trunk/Source

Non-unified build fixes mid January 2020 edition
https://bugs.webkit.org/show_bug.cgi?id=206363

Unreviewed build fix.

Source/JavaScriptCore:

  • interpreter/StackVisitor.cpp:

Source/WebCore:

  • Headers.cmake:
  • css/CSSFontVariationValue.cpp:
  • css/CSSValuePool.cpp:
  • css/TransformFunctions.cpp:
  • css/TransformFunctions.h:
  • platform/graphics/ExtendedColor.cpp:
  • rendering/svg/SVGRenderSupport.cpp:
  • style/StyleResolver.cpp:
  • svg/SVGPathByteStreamBuilder.cpp:
  • svg/SVGPathByteStreamSource.cpp:
  • svg/SVGPathSegListBuilder.cpp:
  • svg/SVGPathSegListSource.cpp:
  • svg/SVGPreserveAspectRatioValue.cpp:
  • svg/SVGZoomAndPan.cpp:
  • svg/SVGZoomEvent.cpp:

Source/WebKit:

  • NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
  • NetworkProcess/curl/NetworkDataTaskCurl.cpp:
  • PlatformFTW.cmake:
  • PlatformWin.cmake:
  • UIProcess/API/APIContentWorld.cpp:
  • UIProcess/Automation/WebAutomationSession.cpp:
  • WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp:
  • WebProcess/WebCoreSupport/win/WebContextMenuClientWin.cpp: Removed.
12:39 PM Changeset in webkit [254702] by Diego Pino Garcia
  • 16 edits
    1 delete in trunk/LayoutTests

[GTK] Rebaseline several tests
https://bugs.webkit.org/show_bug.cgi?id=206355

Unreviewed gardening.

  • platform/gtk/css1/text_properties/text_indent-expected.txt:
  • platform/gtk/css2.1/t1601-c547-indent-01-d-expected.txt:
  • platform/gtk/css3/blending/svg-blend-hard-light-expected.txt:
  • platform/gtk/editing/selection/select-bidi-run-expected.txt: Removed.
  • platform/gtk/fast/dom/Range/getClientRects-expected.txt:
  • platform/gtk/fast/writing-mode/border-styles-vertical-lr-expected.txt:
  • platform/gtk/fast/writing-mode/english-bt-text-expected.txt:
  • platform/gtk/fast/writing-mode/text-orientation-basic-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/dom/nodes/Node-cloneNode-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/basic/request-headers.any.worker-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/mathml/relations/html5-tree/tabindex-002-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/svg/import/shapes-ellipse-02-t-manual-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/svg/import/types-dom-08-f-manual-expected.txt:
  • platform/gtk/js/dom/dom-static-property-for-in-iteration-expected.txt:
  • platform/gtk/mathml/presentation/bug159513-expected.txt:
12:35 PM Changeset in webkit [254701] by weinig@apple.com
  • 5 edits
    1 copy in trunk/Source/WTF

Platform.h is out of control Part 6: Split USE_* macro definitions out of Platform.h and into a new PlatformUse.h
https://bugs.webkit.org/show_bug.cgi?id=206354

Reviewed by Dan Bernstein.

As a another step towards cleaning up Platform.h, split out all the legacy platform
macros into their own file.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:

Add new file.

  • wtf/Platform.h: In addition to removing all the USE_* macros, consolidate

all the sub-includes at the top.

  • wtf/PlatformEnable.h: Moved ASSERT_ENABLED here from Platform.h,

as it makes more sense here. Eventually should be renamed ro ENABLE_ASSERT
for consistency.

  • wtf/PlatformUse.h: Copied from Source/WTF/wtf/Platform.h.
11:55 AM Changeset in webkit [254700] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

WK1: arbitrary JS execution while tearing down renderers in Element::addShadowRoot
https://bugs.webkit.org/show_bug.cgi?id=206335

Reviewed by Antti Koivisto.

Delay the widget hierarchy updates until we're done attaching a shadow root.
Otherwise, WK1 would retry to update the focus synchronously.

  • dom/Element.cpp:

(WebCore::Element::addShadowRoot):

11:27 AM Changeset in webkit [254699] by Simon Fraser
  • 6 edits in trunk/Tools

fast/forms/ios/zoom-after-input-tap-wide-input.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=206313

Reviewed by Wenson Hsieh.

The timeout was caused by the previous test, fast/forms/ios/validation-bubble-dismiss-on-tap.html,
which puts up a validation bubble whose implementation involves showing a modal UIViewController.
That view controller disappears with an animation, which happened after we're proceeded to the next
test, and the overlay view could intercept touches thus breaking any subsequent touch-based test.

Fix by having platformResetStateToConsistentValues() wait for the presentedViewController to
go to nil, which requires spinning the runloop.

platformResetStateToConsistentValues() will return false if we fail to remove the presented view controller,
which will trigger a timeout with a log.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::platformResetStateToConsistentValues):

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

(WTR::TestController::cocoaResetStateToConsistentValues):

  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformResetStateToConsistentValues):

  • WebKitTestRunner/mac/TestControllerMac.mm:

(WTR::TestController::platformResetStateToConsistentValues):

11:17 AM Changeset in webkit [254698] by beidson@apple.com
  • 6 edits
    1 copy in trunk/Source/WebKit

REGRESSION: (r254668) [Mac Debug wk2] 21 http/tests/navigation/* tests are crashing with ASSERTION FAILED: world.first != 1.
https://bugs.webkit.org/show_bug.cgi?id=206357

Unreviewed followup to r254668 to fix tests.

ASSERT is no longer valid.
Also, having the magic constant "1" in code is mysterious. Make it properly named everywhere.

  • Shared/ContentWorldShared.h: Copied from Source/WebKit/UIProcess/API/APIUserContentWorld.cpp.
  • UIProcess/API/APIContentWorld.cpp:

(API::ContentWorld::pageContentWorld):

  • UIProcess/API/APIUserContentWorld.cpp:

(API::UserContentWorld::generateIdentifier):
(API::UserContentWorld::UserContentWorld):

  • UIProcess/API/APIUserContentWorld.h:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/UserContent/WebUserContentController.cpp:

(WebKit::WebUserContentController::addUserContentWorld):

11:15 AM Changeset in webkit [254697] by Truitt Savell
  • 2 edits in trunk/LayoutTests

REGRESSION: [ Mac Debug WK1 ] inspector/page/overrideSetting-ICECandidateFilteringEnabled.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=206362

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
11:07 AM Changeset in webkit [254696] by Alan Coon
  • 2 edits in branches/safari-610.1.1-branch/Source/WebCore

Cherry-pick r254692. rdar://problem/58480028

REGRESSION (r254291): [ Catalina wk2 Debug ] Flaky ASSERT on fast/images/animated-image-loop-count.html
https://bugs.webkit.org/show_bug.cgi?id=206068
<rdar://problem/58480028>

Patch by Chris Lord <Chris Lord> on 2020-01-16
Reviewed by Chris Dumez.

No new tests, covered by existing tests.

  • platform/graphics/ImageSource.cpp: (WebCore::ImageSource::startAsyncDecodingQueue):

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

11:03 AM Changeset in webkit [254695] by Alan Coon
  • 1 copy in tags/Safari-609.1.14.2

Tag Safari-609.1.14.2.

10:57 AM Changeset in webkit [254694] by Alan Coon
  • 8 edits in branches/safari-609.1.14-branch/Source

Versioning.

10:30 AM Changeset in webkit [254693] by Truitt Savell
  • 2 edits in trunk/LayoutTests

REGRESSION (r250655?): [ Mac Debug ] inspector/runtime/promise-native-getter.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=206303

Unreviewed test gardening.

  • platform/mac/TestExpectations:
10:30 AM Changeset in webkit [254692] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

REGRESSION (r254291): [ Catalina wk2 Debug ] Flaky ASSERT on fast/images/animated-image-loop-count.html
https://bugs.webkit.org/show_bug.cgi?id=206068
<rdar://problem/58480028>

Patch by Chris Lord <Chris Lord> on 2020-01-16
Reviewed by Chris Dumez.

No new tests, covered by existing tests.

  • platform/graphics/ImageSource.cpp:

(WebCore::ImageSource::startAsyncDecodingQueue):

10:24 AM Changeset in webkit [254691] by Truitt Savell
  • 2 edits in trunk/LayoutTests

Marking storage/indexeddb/modern/objectstore-autoincrement-types.html as flaky on Debug WK1
https://bugs.webkit.org/show_bug.cgi?id=199117

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
10:15 AM Changeset in webkit [254690] by Truitt Savell
  • 2 edits in trunk/LayoutTests

REGRESSION: WK1 Accessibility: ASSERTION FAILED: FontCache::singleton().generation() == m_generation
https://bugs.webkit.org/show_bug.cgi?id=206241

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
10:14 AM Changeset in webkit [254689] by Jonathan Bedard
  • 3 edits in trunk/Source/JavaScriptCore

Pass JSToken by const reference
https://bugs.webkit.org/show_bug.cgi?id=206321

Reviewed by Saam Barati.

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::createBindingPattern): Pass JSToken by const reference.

  • parser/Parser.h: Ditto.
10:09 AM Changeset in webkit [254688] by youenn@apple.com
  • 26 edits
    3 copies
    10 adds in trunk/Source

Add support for MediaStream video track rendering in GPUProcess
https://bugs.webkit.org/show_bug.cgi?id=206286

Reviewed by Eric Carlson.

Source/WebCore:

Add a way for WebKit layer to create its own specific SampleBufferDisplayLayer.
WebKit layer can set a function pointer that will be used to create SampleBufferDisplayLayer.
If none is provided, LocalSampleBufferDisplayLayer is used.

Update MediaPlayerPrivateMediaStreamAVFObjC to monitor itself its root layer bounds change.
Conversely, LocalSampleBufferDisplayLayer no longer monitors its root layer bounds change.
This removes the need for SampleBufferDisplayLayer::Client to be notified of bounds change.
We add an API to update the root layer bounds of a LocalSampleBufferDisplayLayer as well,
this API being used by GPUProcess to mirror changes done to WebProcess root layer.

WebRTC incoming video tracks do not have presentation timestamps so we mark them as kCMSampleAttachmentKey_DisplayImmediately.
This is currently lost when doing IPC from WebProcess to NetworkProcess. Add this information for every enqueued sample in LocalSampleBufferDisplayLayer.
We might want in the future to serialize all attachments of the sample.

Manually tested.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/avfoundation/SampleBufferDisplayLayer.cpp: Added.

(WebCore::SampleBufferDisplayLayer::setCreator):
(WebCore::SampleBufferDisplayLayer::create):

  • platform/graphics/avfoundation/SampleBufferDisplayLayer.h:
  • platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h:
  • platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm:

(-[WebAVSampleBufferStatusChangeListener invalidate]):
(-[WebAVSampleBufferStatusChangeListener start]):
(-[WebAVSampleBufferStatusChangeListener stop]):
(-[WebAVSampleBufferStatusChangeListener observeValueForKeyPath:ofObject:change:context:]):
(WebCore::LocalSampleBufferDisplayLayer::LocalSampleBufferDisplayLayer):
(WebCore::LocalSampleBufferDisplayLayer::~LocalSampleBufferDisplayLayer):
(WebCore::LocalSampleBufferDisplayLayer::updateBoundsAndPosition):
(WebCore::LocalSampleBufferDisplayLayer::enqueueSample):

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

(-[WebRootSampleBufferBoundsChangeListener initWithParent:]):
(-[WebRootSampleBufferBoundsChangeListener dealloc]):
(-[WebRootSampleBufferBoundsChangeListener invalidate]):
(-[WebRootSampleBufferBoundsChangeListener start]):
(-[WebRootSampleBufferBoundsChangeListener stop]):
(-[WebRootSampleBufferBoundsChangeListener observeValueForKeyPath:ofObject:change:context:]):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::rootLayer const):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayLayer):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::rootLayerBoundsDidChange):

  • platform/graphics/cg/PDFDocumentImage.cpp:

Unified build fix.

Source/WebKit:

Implement WebProcess SampleBufferDisplayLayer and GPUProcess RemoteSampleBufferDisplayLayer.
RemoteSampleBufferDisplayLayer is a wrapper around LocalSampleBufferDisplayLayer.

A synchronous IPC is used at creation time of the layer to make sure we have a shared layer synchronously.
Future refactoring should allow to remove that constraint as done in regular video playing.

Override SampleBufferDisplayLayer create function pointer when rendering is to be done in GPUProcess.

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::sampleBufferDisplayLayerManager):
(WebKit::GPUConnectionToWebProcess::didReceiveMessage):
(WebKit::GPUConnectionToWebProcess::didReceiveSyncMessage):

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp: Added.

(WebKit::RemoteSampleBufferDisplayLayer::create):
(WebKit::RemoteSampleBufferDisplayLayer::RemoteSampleBufferDisplayLayer):
(WebKit::RemoteSampleBufferDisplayLayer::~RemoteSampleBufferDisplayLayer):
(WebKit::RemoteSampleBufferDisplayLayer::contextID):
(WebKit::RemoteSampleBufferDisplayLayer::bounds const):
(WebKit::RemoteSampleBufferDisplayLayer::updateDisplayMode):
(WebKit::RemoteSampleBufferDisplayLayer::updateAffineTransform):
(WebKit::RemoteSampleBufferDisplayLayer::updateBoundsAndPosition):
(WebKit::RemoteSampleBufferDisplayLayer::flush):
(WebKit::RemoteSampleBufferDisplayLayer::flushAndRemoveImage):
(WebKit::RemoteSampleBufferDisplayLayer::enqueueSample):
(WebKit::RemoteSampleBufferDisplayLayer::clearEnqueuedSamples):
(WebKit::RemoteSampleBufferDisplayLayer::messageSenderConnection const):
(WebKit::RemoteSampleBufferDisplayLayer::sampleBufferDisplayLayerStatusDidChange):
(WebKit::RemoteSampleBufferDisplayLayer::streamTime const):

  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.h: Added.
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.messages.in: Added.
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp: Added.

(WebKit::RemoteSampleBufferDisplayLayerManager::RemoteSampleBufferDisplayLayerManager):
(WebKit::RemoteSampleBufferDisplayLayerManager::didReceiveLayerMessage):
(WebKit::RemoteSampleBufferDisplayLayerManager::createLayer):
(WebKit::RemoteSampleBufferDisplayLayerManager::releaseLayer):

  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.h: Added.
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.messages.in: Added.
  • Scripts/webkit/messages.py:
  • Shared/WebCoreArgumentCoders.h:
  • Shared/mac/WebCoreArgumentCodersMac.mm:

(IPC::ArgumentCoder<CGRect>::encode):
(IPC::ArgumentCoder<CGRect>::decode):
(IPC::ArgumentCoder<CGSize>::encode):
(IPC::ArgumentCoder<CGSize>::decode):
(IPC::ArgumentCoder<CGPoint>::encode):
(IPC::ArgumentCoder<CGPoint>::decode):
(IPC::ArgumentCoder<CGAffineTransform>::encode):
(IPC::ArgumentCoder<CGAffineTransform>::decode):

  • Sources.txt:
  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/GPUProcessConnection.cpp:

(WebKit::GPUProcessConnection::sampleBufferDisplayLayerManager):
(WebKit::GPUProcessConnection::didReceiveMessage):

  • WebProcess/GPU/GPUProcessConnection.h:
  • WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:

(WebKit::RemoteMediaPlayerManager::updatePreferences):

  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp: Added.

(WebKit::SampleBufferDisplayLayer::create):
(WebKit::SampleBufferDisplayLayer::SampleBufferDisplayLayer):
(WebKit::SampleBufferDisplayLayer::~SampleBufferDisplayLayer):
(WebKit::SampleBufferDisplayLayer::didFail const):
(WebKit::SampleBufferDisplayLayer::updateDisplayMode):
(WebKit::SampleBufferDisplayLayer::bounds const):
(WebKit::SampleBufferDisplayLayer::updateAffineTransform):
(WebKit::SampleBufferDisplayLayer::updateBoundsAndPosition):
(WebKit::SampleBufferDisplayLayer::flush):
(WebKit::SampleBufferDisplayLayer::flushAndRemoveImage):
(WebKit::SampleBufferDisplayLayer::enqueueSample):
(WebKit::SampleBufferDisplayLayer::clearEnqueuedSamples):
(WebKit::SampleBufferDisplayLayer::rootLayer):
(WebKit::SampleBufferDisplayLayer::setDidFail):
(WebKit::SampleBufferDisplayLayer::boundsChanged):

  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h: Added.
  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.messages.in: Added.
  • WebProcess/GPU/webrtc/SampleBufferDisplayLayerIdentifier.h: Added.
  • WebProcess/GPU/webrtc/SampleBufferDisplayLayerManager.cpp: Added.

(WebKit::SampleBufferDisplayLayerManager::didReceiveLayerMessage):
(WebKit::SampleBufferDisplayLayerManager::createLayer):
(WebKit::SampleBufferDisplayLayerManager::addLayer):
(WebKit::SampleBufferDisplayLayerManager::removeLayer):

  • WebProcess/GPU/webrtc/SampleBufferDisplayLayerManager.h: Added.
  • WebProcess/WebProcess.h:
9:26 AM Changeset in webkit [254687] by mark.lam@apple.com
  • 3 edits
    1 add in trunk

operationToObject() should check for a null errorMessage.
https://bugs.webkit.org/show_bug.cgi?id=206339
<rdar://problem/58449666>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/operationToObject-should-check-for-null-errorMessage.js: Added.

Source/JavaScriptCore:

r224280 introduced operationToObject() with an option to specify a custom error
message. r254252 added a scenario where the passed in error message is null but
did not update operationToObject() to allow for this. This patch adds the
missing null check.

  • dfg/DFGOperations.cpp:
9:06 AM Changeset in webkit [254686] by Diego Pino Garcia
  • 1 edit
    8 deletes in trunk/LayoutTests

[WPE] Rebaseline of several tests
https://bugs.webkit.org/show_bug.cgi?id=206351

Unreviewed gardening.

  • platform/wpe/fast/history/page-cache-webdatabase-pending-transaction-expected.txt: Removed.
  • platform/wpe/fast/visual-viewport/rubberbanding-viewport-rects-extended-background-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-frame-resource.https-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/websockets/closing-handshake/003-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/xhr/send-redirect-infinite-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/xhr/send-redirect-infinite-sync-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/xhr/xmlhttprequest-network-error-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/xhr/xmlhttprequest-network-error-sync-expected.txt: Removed.
8:27 AM Changeset in webkit [254685] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

[Texmap] Remove unused private variable
https://bugs.webkit.org/show_bug.cgi?id=206230

Patch by Víctor Manuel Jáquez Leal <vjaquez@igalia.com> on 2020-01-16
Reviewed by David Kilzer.

Remove m_textureID, an unused private variable.

No functional changes.

  • platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
8:14 AM Changeset in webkit [254684] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[GStreamer] Several buffering fixes
https://bugs.webkit.org/show_bug.cgi?id=206234

Patch by Thibault Saunier <tsaunier@igalia.com> on 2020-01-16
Reviewed by Xabier Rodriguez-Calvar.

No new tests as this is already tested.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::durationChanged): Minor typo fix
(WebCore::MediaPlayerPrivateGStreamer::fillTimerFired): Query buffering on the pipeline not the source

otherwise GstBaseSrc returns some useless values before downloadbuffer actually gives us the
info about DOWNLOAD buffering status.

(WebCore::MediaPlayerPrivateGStreamer::handleMessage):

  • Detect when DOWNLOAD is done by using the downloadbuffer GstCacheDownloadComplete element message which is what is supposed to be used for that purpose.
  • Fix the way we detect that buffering is done (mostly when using a downloadbuffer) by relying on a buffering query to check if it is still buffering.

(WebCore::MediaPlayerPrivateGStreamer::updateBufferingStatus): Ensure that we properly pause the pipeline when

restarting buffering. There were cases when not using downloadbuffer where we didn't pause the pipeline
leading to pretty bad user experience.

(WebCore::MediaPlayerPrivateGStreamer::updateStates): Buffering should happen only on non live pipelines.

8:04 AM Changeset in webkit [254683] by ddkilzer@apple.com
  • 10 edits in trunk/Source

Enable -Wconditional-uninitialized in WebInspectorUI, WebKitLegacy, WebKit projects
<https://webkit.org/b/206270>
<rdar://problem/58589767>

Reviewed by Tim Horton.

  • Configurations/Base.xcconfig:

(WARNING_CFLAGS): Add -Wconditional-uninitialized switch.
Source/WebKit:

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::performInteractionSequence):
Initialize x, y stack variables since the compiler can't
reason about the behavior of JSON::Object::getInteger().

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::getAllScriptsInPDFDocument): Initialize length stack
variable. Also add check that length is non-zero.

Source/WebKitLegacy/mac:

  • Plugins/WebNetscapePluginView.mm:

(-[WebNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]):
Initialize slot stack variable.

  • WebView/WebPDFDocumentExtras.mm:

(allScriptsInPDFDocument): Initialize length stack variable.
Also add check that length is non-zero.

7:57 AM Changeset in webkit [254682] by Philippe Normand
  • 15 edits in trunk

[GStreamer][WPE] Client-side video rendering support
https://bugs.webkit.org/show_bug.cgi?id=206289

Patch by Philippe Normand <philn@igalia.com> on 2020-01-16
Reviewed by Xabier Rodriguez-Calvar.

.:

Add a new compile-time option to enable client-side video
rendering support. With this feature enabled the UIProcess will be
in charge of positioning and rendering video surfaces, thanks to
the WPEBackend-FDO video-plane-display-dmabuf protocol.

  • Source/cmake/GStreamerDefinitions.cmake: Add

USE_WPE_VIDEO_PLANE_DISPLAY_DMABUF CMake option, disabled by
default.

  • Source/cmake/GStreamerDependencies.cmake: This new option

depends on GStreamer-GL.

  • Source/cmake/OptionsWPE.cmake: It depends also on the presence

of the WPEBackend-FDO library.

Source/WebCore:

With the WPE_VIDEO_PLANE_DISPLAY_DMABUF option enabled the player
will render a transparent placeholder for videos, using the
HolePunch code path. Then it is up to the UIProcess to listen to
the incoming video dmabufs and render them. This allows the
browser to use Wayland protocols related with Protection (HDCP,
for instance).

  • PlatformWPE.cmake:
  • platform/graphics/gstreamer/GRefPtrGStreamer.cpp:

(WTF::adoptGRef):
(WTF::refGPtr<GstEGLImage>):
(WTF::derefGPtr<GstEGLImage>):

  • platform/graphics/gstreamer/GRefPtrGStreamer.h:
  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
(WebCore::GstVideoFrameHolder::handoffVideoDmaBuf):
(WebCore::GstVideoFrameHolder::waitForCPUSync):
(WebCore::GstVideoFrameHolder::updateTexture):
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::didEnd):
(WebCore::GStreamerDMABufHolePunchClient::GStreamerDMABufHolePunchClient):
(WebCore::MediaPlayerPrivateGStreamer::pushTextureToCompositor):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

Tools:

  • wpe/jhbuild.modules: Bump to libwpe and wpebackend-fdo git

snapshots, until 1.5.x releases are published.

7:56 AM Changeset in webkit [254681] by pvollan@apple.com
  • 13 edits
    2 adds in trunk

[Win] Fix AppleWin build
https://bugs.webkit.org/show_bug.cgi?id=206299

Reviewed by Brent Fulgham.

.:

This patch has been created by don.olmstead@sony.com and pvollan@apple.com. Add target files for WTF and
JavaScriptCore. Also, to make sure headers are copied to the forwarding headers directory, add the CMake
keywork ALL when adding custom target for copying files.

  • Source/cmake/TargetJavaScriptCore.cmake: Added.
  • Source/cmake/TargetWTF.cmake: Added.
  • Source/cmake/WebKitMacros.cmake:

Source/JavaScriptCore:

Include required target. Build internal builds with VS2019.

Source/WebCore:

Include required targets. Build internal builds with VS2019.

  • CMakeLists.txt:
  • WebCore.vcxproj/WebCore.proj:

Source/WebKitLegacy:

Include required targets. Build internal builds with VS2019.

  • CMakeLists.txt:
  • WebKitLegacy.vcxproj/WebKitLegacy.proj:

Source/WTF:

Build internal builds with VS2019.

  • WTF.vcxproj/WTF.proj:
7:43 AM Changeset in webkit [254680] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

Do not detect the stopped animations in Nicosia::Animation to avoid flashback
https://bugs.webkit.org/show_bug.cgi?id=206280

Patch by Tomoki Imai <Tomoki Imai> on 2020-01-16
Reviewed by Carlos Garcia Campos.

This fixes the animation flashback issue found in https://webkit.org/blog-files/3d-transforms/morphing-cubes.html.
The flashback was caused by using the old layer transform matrix saved when the animation has been started.

The root cause is an inconsistency of animation state in Nicosia::Animation and CoordinatedGraphicsLayer.
For Nicosia::Animation, ThreadedCompositor increases MonitonicTime for animation every frame, and calls Nicosia::Animation::apply.
For CoordinatedGraphicsLayer, CSSAnimationController updates animations list and if the animation has been finished it updates CSS value.
There is a chance to use old layer state while the Nicosia::Animation stopped, but CoordinatedGraphicsLayer still obtains old CSS value and animations.

In this patch, all the Nicosia::Animation is considered to have "AnimationFillMode::Forwards" or "AnimationFillMode::Both",
which means they are active and use the last position when the animation is stopped.
Stopping and removing animations should be only done by CSSAnimationController and CoordinatedGraphicsScene
as they can remove the animation from the list and update the CSS value at the same time.

Mac implementation GraphicsLayerCA has a similar logic, it replaces AnimationFillMode with Forwards or Both.
https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp?rev=254502#L3248

Tested manually with https://webkit.org/blog-files/3d-transforms/morphing-cubes.html

  • platform/graphics/nicosia/NicosiaAnimation.cpp:

(Nicosia::Animation::apply): Return the last value for stopped animations to avoid flickering
(Nicosia::Animation::isActive const): Removed. It should always return true because
all the animations are considered as fillsForwards in Nicosia::Animation to avoid flashback.
(Nicosia::Animations::hasActiveAnimationsOfType const): Remove isActive check.
(Nicosia::Animations::getActiveAnimations() const): Removed. It returns whole animations list because all the animations are active.

  • platform/graphics/nicosia/NicosiaAnimation.h:
  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):

7:38 AM Changeset in webkit [254679] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] TextUtil::width should use StringView for substrings
https://bugs.webkit.org/show_bug.cgi?id=206346

Reviewed by Zalan Bujtas.

  • layout/inlineformatting/text/TextUtil.cpp:

(WebCore::Layout::TextUtil::width):

7:01 AM Changeset in webkit [254678] by commit-queue@webkit.org
  • 6 edits
    1 add in trunk

KeyedDecoderGeneric crashes when it accesses data with non-existing key
https://bugs.webkit.org/show_bug.cgi?id=205902

Patch by Takashi Komori <Takashi.Komori@sony.com> on 2020-01-16
Reviewed by Fujii Hironori.

Source/WebCore:

Add null check function for KeyedDecoderGeneric.

Test: TestWebKitAPI/Tests/WebCore/KeyedCodingGeneric.cpp

  • platform/generic/KeyedDecoderGeneric.cpp:

(WebCore::KeyedDecoderGeneric::Dictionary::get):
(WebCore::KeyedDecoderGeneric::getPointerFromDictionaryStack):
(WebCore::KeyedDecoderGeneric::decodeSimpleValue):
(WebCore::KeyedDecoderGeneric::decodeBytes):
(WebCore::KeyedDecoderGeneric::decodeBool):
(WebCore::KeyedDecoderGeneric::decodeUInt32):
(WebCore::KeyedDecoderGeneric::decodeUInt64):
(WebCore::KeyedDecoderGeneric::decodeInt32):
(WebCore::KeyedDecoderGeneric::decodeInt64):
(WebCore::KeyedDecoderGeneric::decodeFloat):
(WebCore::KeyedDecoderGeneric::decodeDouble):
(WebCore::KeyedDecoderGeneric::decodeString):
(WebCore::KeyedDecoderGeneric::beginObject):
(WebCore::KeyedDecoderGeneric::beginArray):

  • platform/generic/KeyedDecoderGeneric.h:

Tools:

  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/KeyedCoding.cpp: Added.

(TestWebKitAPI::checkDecodedBytes):
(TestWebKitAPI::TEST):
(TestWebKitAPI::testSimpleValue):
(TestWebKitAPI::KeyedCodingTestObject::encode):
(TestWebKitAPI::KeyedCodingTestObject::decode):
(TestWebKitAPI::KeyedCodingTestObject::KeyedCodingTestObject):
(TestWebKitAPI::KeyedCodingTestObject::equals const):
(TestWebKitAPI::operator==):

6:47 AM Changeset in webkit [254677] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

[GTK][WPE] Web process crash when IM tries to delete surrounding text
https://bugs.webkit.org/show_bug.cgi?id=206352

Reviewed by Adrian Perez de Castro.

TextIterator::rangeFromLocationAndLength() can return nullptr when the start of the range can't be found.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::deleteSurrounding): Return early if selectionRange is nullptr.

6:47 AM Changeset in webkit [254676] by weinig@apple.com
  • 4 edits
    1 copy in trunk/Source/WTF

Platform.h is out of control Part 5: Split HAVE_* macro definitions out of Platform.h and into a new PlatformHave.h
https://bugs.webkit.org/show_bug.cgi?id=206307

Reviewed by Anders Carlsson.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/Platform.h:
  • wtf/PlatformHave.h: Copied from Source/WTF/wtf/Platform.h.
6:44 AM Changeset in webkit [254675] by Carlos Garcia Campos
  • 4 edits in trunk

[GTK][WPE] Password field doesn't get input method
https://bugs.webkit.org/show_bug.cgi?id=34285

Reviewed by Žan Doberšek.

Source/WebCore:

Allow input methods in password fields for GTK and WPE ports, since the input methods are notified that the
active editable element is a password field.

  • html/PasswordInputType.cpp:

(WebCore::PasswordInputType::shouldUseInputMethod const):

Tools:

Enable the test case for password field.

  • TestWebKitAPI/Tests/WebKitGLib/TestInputMethodContext.cpp:

(testWebKitInputMethodContextContentType):

5:21 AM Changeset in webkit [254674] by Caio Lima
  • 13 edits in trunk/Source/JavaScriptCore

[JSC] 32-bit platforms should use a PC base register
https://bugs.webkit.org/show_bug.cgi?id=203563

Reviewed by Keith Miller.

We are moving 32-bits LLInt implementation to follow the model useb by
64-bits architectures. It means that we now use PC and PB registers to
represent current Instruction. This patch will reduce the changes
we have from those architectures and mainly allow the usage of new
version of BytecodeIndex::m_packedBits. This also allow us remove
divergences on CallSiteIndex.
The change required the inclusion of a new callee-save register on
ARMv7 (r10), MIPS($s1) and CLOOP. Further changes necessary for
Baseline and DFG will come in a following patch.

  • assembler/MIPSRegisters.h:
  • interpreter/CallFrame.cpp:
  • jit/GPRInfo.h:

(JSC::GPRInfo::toRegister):
(JSC::GPRInfo::toIndex):

  • jit/RegisterSet.cpp:

(JSC::RegisterSet::vmCalleeSaveRegisters):
(JSC::RegisterSet::llintBaselineCalleeSaveRegisters):

  • llint/LLIntData.h:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter.cpp:

(JSC::CLoop::execute):

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • offlineasm/arm.rb:
  • offlineasm/mips.rb:
4:44 AM Changeset in webkit [254673] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix for curl.
https://bugs.webkit.org/show_bug.cgi?id=206261

ResourceHandleCurl.cpp(157): error C2664: cannot convert argument 6 from 'WTF::RefPtr<WebCore::SynchronousLoaderMessageQueue,WTF::DumbPtrTraits<T>>' to 'WTF::RefPtr<WebCore::SynchronousLoaderMessageQueue,WTF::DumbPtrTraits<T>> &&'

  • platform/network/curl/ResourceHandleCurl.cpp:

(WebCore::ResourceHandle::createCurlRequest):

4:13 AM Changeset in webkit [254672] by commit-queue@webkit.org
  • 11 edits in trunk

Fetch: URL parser not always using UTF-8
https://bugs.webkit.org/show_bug.cgi?id=178008

Patch by Rob Buis <rbuis@igalia.com> on 2020-01-16
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Update improved test result.

  • web-platform-tests/fetch/api/request/url-encoding-expected.txt:

Source/WebCore:

Make sure fetch requests run the URL parser with a UTF-8 decoder.

Test: web-platform-tests/fetch/api/request/url-encoding.html

  • Modules/fetch/FetchRequest.cpp:

(WebCore::FetchRequest::initializeWith):

  • dom/Document.cpp:

(WebCore::Document::completeURL const):

  • dom/Document.h:
  • dom/ScriptExecutionContext.h:
  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::completeURL const):

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

(WebCore::WorkletGlobalScope::completeURL const):

  • worklets/WorkletGlobalScope.h:
3:36 AM Changeset in webkit [254671] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore/PAL

Attempt to fix internal iOS Debug builds

Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:2723:46: error: multiple methods named 'name' found [-Werror,-Wobjc-multiple-method-names]

auto outputDeviceName = adoptNS([[outputDevice name] copy]);


  • pal/spi/mac/AVFoundationSPI.h: Import header that defines

-[AVOutputDevice name].

2:43 AM Changeset in webkit [254670] by aboya@igalia.com
  • 3 edits
    6 adds in trunk

[MSE] Don't enqueue samples that start at a big discontinuity
https://bugs.webkit.org/show_bug.cgi?id=201323

Source/WebCore:

With the old logic SourceBuffer was enqueueing the first frame to be
appended in any circumstances. This was a bug because the user could
append first [5, 10) and then [0, 5). With the old behavior [5, 10)
would be enqueued first despite being clearly ahead of the initial
playback time (zero). By the time [0, 5) is enqueued it can't be
enqueued anymore because the decodeQueue is already ahead.

This patch fixes that logic to work when the first segments are
appended unordered. The test media-source-first-append-not-starting-at-zero.html
validates it.

The test media-source-append-presentation-durations.html checks the
new logic does not break in presence of presentation duration !=
decode duration.

As part of the same logic block, the lastEnqueuedPresentationTime was
used to decide when it's necessary to perform reenqueue after an
.erase() (it is necessary if any enqueued frames are replaced). Using
lastEnqueuedPresentationTime was not entirely accurate in presence of
B-frames, as you could erase a frame that has a presentation time
higher than the last enqueued one. That logic is replaced with a
monotonicly increasing highestEnqueuedPresentationTime and is tested
by media-source-remove-b-frame.html.

Reviewed by Xabier Rodriguez-Calvar.

Tests: media/media-source/media-source-append-presentation-durations.html

media/media-source/media-source-first-append-not-starting-at-zero.html
media/media-source/media-source-remove-b-frame.html

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::TrackBuffer::TrackBuffer):
(WebCore::SourceBuffer::removeCodedFrames):
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
(WebCore::SourceBuffer::provideMediaData):
(WebCore::SourceBuffer::reenqueueMediaForTime):
(WebCore::SourceBuffer::TrackBuffer::lastEnqueuedDecodeDuration): Deleted.

LayoutTests:

Reviewed by Xabier Rodriguez-Calvar.

  • media/media-source/media-source-append-presentation-durations.html: Added.
  • media/media-source/media-source-first-append-not-starting-at-zero.html: Added.
  • media/media-source/media-source-remove-b-frame.html: Added.
2:32 AM Changeset in webkit [254669] by cathiechen
  • 27 edits in trunk

Mapping HTML attributes width/height to the default aspect ratio of <img>
https://bugs.webkit.org/show_bug.cgi?id=201641

Reviewed by Frédéric Wang

LayoutTests/imported/w3c:

assert_ratio(images[5], 133/106) in img-aspect-ratio.html still fails because of bug 206161.

  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/canvas-aspect-ratio.html:
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/content-aspect-ratio.html:
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio-expected.txt:
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html:
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-aspect-ratio.html:

Source/WebCore:

According to [1], if HTML width and height attributes have valid values, not a percentage, and non-zero,
the value width/height is the default intrinsic aspect ratio for an <img> element. This will help to calculate
img element's layout size before loading. The value will be overridden if img is loaded. Also see [2].
This is currently limited in <img> element. Other elements like <canvas>, <video> and <input type=image>,
currently their aspect-ratio won't be affected.[3] While <picture> is still under discuss.[4]

[1]: https://html.spec.whatwg.org/multipage/rendering.html#attributes-for-embedded-content-and-images
[2]: https://github.com/WICG/intrinsicsize-attribute/issues/16
[3]: https://github.com/whatwg/html/issues/4961
[4]: https://github.com/whatwg/html/issues/4968

Tests: imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/canvas-aspect-ratio.html

imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html
imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-aspect-ratio.html
imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/content-aspect-ratio.html

  • page/Settings.yaml:
  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::computeIntrinsicRatioInformation const):

Source/WebKit:

Add experimental flag: AspectRatioOfImgFromWidthAndHeightEnabled.

  • Shared/WebPreferences.yaml:

Source/WebKitLegacy/mac:

Add experimental flag: AspectRatioOfImgFromWidthAndHeightEnabled.

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

([WebPreferences initialize]):
(-[WebPreferences aspectRatioOfImgFromWidthAndHeightEnabled]):
(-[WebPreferences setAspectRatioOfImgFromWidthAndHeightEnabled:]):

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKitLegacy/win:

Add experimental flag: AspectRatioOfImgFromWidthAndHeightEnabled.

  • Interfaces/IWebPreferencesPrivate.idl:
  • WebPreferenceKeysPrivate.h:
  • WebPreferences.cpp:

(WebPreferences::initializeDefaultSettings):
(WebPreferences::aspectRatioOfImgFromWidthAndHeightEnabled):
(WebPreferences::setAspectRatioOfImgFromWidthAndHeightEnabled):

  • WebPreferences.h:
  • WebView.cpp:

(WebView::notifyPreferencesChanged):

Tools:

Add experimental flag: AspectRatioOfImgFromWidthAndHeightEnabled.

(enableExperimentalFeatures):
(setWebPreferencesForTestOptions):

  • DumpRenderTree/win/DumpRenderTree.cpp:

(enableExperimentalFeatures):

Note: See TracTimeline for information about the timeline view.