WebKit.git
2 hours agoIntroduce a Vector::isolatedCopy() && master
youenn@apple.com [Fri, 7 Aug 2020 11:32:56 +0000 (11:32 +0000)]
Introduce a Vector::isolatedCopy() &&
https://bugs.webkit.org/show_bug.cgi?id=215160

Reviewed by Alex Christensen.

Source/WTF:

By introducing an isolatedCopy() &&, we remove the need to allocate a vector buffer.
This can make a Vector<String>::isolatedCopy() allocate no memory at all in cases like RegistrationDatabase::schedulePushChanges.

* wtf/Vector.h:
(WTF::Malloc>::isolatedCopy const):
(WTF::Malloc>::isolatedCopy):

Tools:

* TestWebKitAPI/Tests/WTF/Vector.cpp:
(TestWebKitAPI::TEST):

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

2 hours ago[ews] Add method to send email notifications to patch author for layout test failures
aakash_jain@apple.com [Fri, 7 Aug 2020 11:31:16 +0000 (11:31 +0000)]
[ews] Add method to send email notifications to patch author for layout test failures
https://bugs.webkit.org/show_bug.cgi?id=215231

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/steps.py:
(AnalyzeLayoutTestsResults.send_email_for_new_test_failures):

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

4 hours agoANGLE: No need to check for Catalyst in the iOS build
dino@apple.com [Fri, 7 Aug 2020 09:38:32 +0000 (09:38 +0000)]
ANGLE: No need to check for Catalyst in the iOS build
https://bugs.webkit.org/show_bug.cgi?id=215249
<rdar://problem/66655478>

Reviewed by Tim Horton.

The DisplayEAGL class is never used for Catalyst, so doesn't
need to handle it.

* src/libANGLE/renderer/gl/eagl/DisplayEAGL.mm:
(rx::DisplayEAGL::generateConfigs):

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

4 hours agoPocket City game play area is blank (WebGL is broken in Catalyst)
dino@apple.com [Fri, 7 Aug 2020 09:28:55 +0000 (09:28 +0000)]
Pocket City game play area is blank (WebGL is broken in Catalyst)
https://bugs.webkit.org/show_bug.cgi?id=215251

Reviewed by Tim Horton.

Our configuration for WebGL under Catalyst was incorrect. Since
it uses "desktop" OpenGL, it had to use the normal macOS setup
(enabling texture rectangle extension, and the correct target).

* platform/graphics/GraphicsContextGL.h: Add PLATFORM(MACCATALYST).
* platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: Ditto.
(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):

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

5 hours agoSkip test on ARM32 - test is flaky in mini-mode
pmatos@igalia.com [Fri, 7 Aug 2020 08:32:41 +0000 (08:32 +0000)]
Skip test on ARM32 - test is flaky in mini-mode

Unreviewed Gardening.

* stress/put-direct-index-broken-2.js:

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

6 hours agoFix warnings related to unsigned >=0 ASSERTs
commit-queue@webkit.org [Fri, 7 Aug 2020 07:55:10 +0000 (07:55 +0000)]
Fix warnings related to unsigned >=0 ASSERTs
https://bugs.webkit.org/show_bug.cgi?id=215223

Patch by Rob Buis <rbuis@igalia.com> on 2020-08-07
Reviewed by Sergio Villar Senin.

Fix warnings related to unsigned >=0 ASSERTs by removing the expressions. Example warning:
TextCheckingHelper.cpp:425:39: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]

* editing/Editor.cpp:
(WebCore::Editor::markAndReplaceFor):
* editing/TextCheckingHelper.cpp:
(WebCore::TextCheckingHelper::findFirstMisspelledWordOrUngrammaticalPhrase const):
(WebCore::TextCheckingHelper::findUngrammaticalPhrases const):
(WebCore::TextCheckingHelper::guessesForMisspelledWordOrUngrammaticalPhrase const):

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

8 hours ago[GTK][WPE] Gardening some tests and rebaseline after imagebitmap update
lmoura@igalia.com [Fri, 7 Aug 2020 05:29:02 +0000 (05:29 +0000)]
[GTK][WPE] Gardening some tests and rebaseline after imagebitmap update

Unreviewed test gardening.

* platform/glib/TestExpectations:
* platform/glib/animations/steps-transform-rendering-updates-expected.txt: Added.
* platform/glib/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/canvas-createImageBitmap-resize-expected.txt:
* platform/glib/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-drawImage-expected.txt:
* platform/glib/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-flipY-expected.txt:
* platform/glib/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-invalid-args-expected.txt:
* platform/glib/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-transfer-expected.txt:

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

8 hours agoUnreviewed, fix fast/css-custom-paint/out-of-memory-while-adding-worklet-module.html...
ysuzuki@apple.com [Fri, 7 Aug 2020 05:12:24 +0000 (05:12 +0000)]
Unreviewed, fix fast/css-custom-paint/out-of-memory-while-adding-worklet-module.html test

It may not throw an exception, depending on GC.

* TestExpectations:
* fast/css-custom-paint/out-of-memory-while-adding-worklet-module-expected.txt:
* fast/css-custom-paint/script-tests/out-of-memory-while-adding-worklet-module.js:

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

12 hours agoText manipulation: leading and trailing spaces should be ignored when comparing content
sihui_liu@apple.com [Fri, 7 Aug 2020 01:24:05 +0000 (01:24 +0000)]
Text manipulation: leading and trailing spaces should be ignored when comparing content
https://bugs.webkit.org/show_bug.cgi?id=214878
<rdar://problem/63735024>

Reviewed by Ryosuke Niwa.

Source/WebCore:

TextIterator does not emit collapsed space if there is no text emitted before or the last emitted character is
collapsed space. When TextManipulationController starts observing paragraphs, it iterates the whole document and
the range of TextIterator is the range of document. For some text node A in the document, if TextIterator emits
text for some other text node B before it, the collapsed space at the beginning of A will be emitted, and
TextManipulationController would think the emitted space is part of A's content. When TextManipulationController
replaces content for A, and the range of TextIterator is set to the range of A, the collapsed space is not
emitted. The check to ensure A's content is unchanged would fail.

To solve this issue, for first and last token in the paragraph, TextManipulationController checks content after
removing leading and trailing spaces.

API test: TextManipulation.CompleteTextManipulationParagraphsContainCollapsedSpaces

* editing/TextManipulationController.cpp:
(WebCore::areEqualIgnoringLeadingAndTrailingWhitespaces):
(WebCore::TextManipulationController::replace):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:
(TestWebKitAPI::TEST):

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

12 hours agoImplement createImageBitmap(ImageData)
commit-queue@webkit.org [Fri, 7 Aug 2020 01:18:37 +0000 (01:18 +0000)]
Implement createImageBitmap(ImageData)
https://bugs.webkit.org/show_bug.cgi?id=183438

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

LayoutTests/imported/w3c:

Rebaseline tests under
web-platform-tests/html/canvas/element/imagebitmap/ , which are
now either fully passing, or have progressed.

* web-platform-tests/html/canvas/element/imagebitmap/canvas-createImageBitmap-resize-expected.txt:
* web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-drawImage-expected.txt:
* web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-flipY-expected.txt:
* web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-invalid-args-expected.txt:
* web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-serializable-expected.txt:
* web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-sizeOverflow-expected.txt:
* web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-transfer-expected.txt:

Source/WebCore:

Implement createImageBitmap(ImageData), including scaling,
flipping and alpha premultiplication, and fix bugs in
createImageBitmap(ImageBitmap).

Support copying unpremultiplied-alpha data to the
unpremultiplied-alpha format in ImageBuffer::putImageData. Plumb
this change through all ImageBuffer backends and display lists.

Handle error cases exposed by W3C WPT tests now that
createImageBitmap(ImageData) is working.

* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::dumpImageBitmap):
(WebCore::CloneDeserializer::readImageBitmap):
* html/ImageBitmap.cpp:
(WebCore::ImageBitmap::create):
(WebCore::ImageBitmap::detachBitmaps):
(WebCore::alphaPremultiplicationForPremultiplyAlpha):
(WebCore::ImageBitmap::resolveWithBlankImageBuffer):
(WebCore::ImageBitmap::createPromise):
(WebCore::ImageBitmap::createFromBuffer):
* html/ImageBitmap.h:
* html/OffscreenCanvas.cpp:
(WebCore::OffscreenCanvas::transferToImageBitmap):
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::texImageSourceHelper):
(WebCore::WebGLRenderingContextBase::texImageImpl):
* html/canvas/WebGLRenderingContextBase.h:
* platform/graphics/ConcreteImageBuffer.h:
(WebCore::ConcreteImageBuffer::putImageData):
* platform/graphics/ImageBuffer.h:
(WebCore::ImageBuffer::putImageData):
* platform/graphics/ImageBufferBackend.cpp:
(WebCore::ImageBufferBackend::convertToLuminanceMask):
(WebCore::copyUnpremultipliedToUnpremultiplied):
(WebCore::ImageBufferBackend::copyImagePixels const):
(WebCore::ImageBufferBackend::putImageData):
* platform/graphics/ImageBufferBackend.h:
* platform/graphics/cairo/GraphicsContextGLCairo.cpp:
(WebCore::GraphicsContextGLOpenGL::ImageExtractor::extractImage):
* platform/graphics/cairo/ImageBufferCairoSurfaceBackend.cpp:
(WebCore::ImageBufferCairoSurfaceBackend::putImageData):
* platform/graphics/cairo/ImageBufferCairoSurfaceBackend.h:
* platform/graphics/cg/GraphicsContextGLCG.cpp:
(WebCore::GraphicsContextGLOpenGL::ImageExtractor::extractImage):
* platform/graphics/cg/ImageBufferCGBackend.cpp:
(WebCore::copyImagePixelsAccelerated):
* platform/graphics/cg/ImageBufferCGBitmapBackend.cpp:
(WebCore::ImageBufferCGBitmapBackend::putImageData):
* platform/graphics/cg/ImageBufferCGBitmapBackend.h:
* platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp:
(WebCore::ImageBufferIOSurfaceBackend::putImageData):
* platform/graphics/cg/ImageBufferIOSurfaceBackend.h:
* platform/graphics/displaylists/DisplayListItems.cpp:
(WebCore::DisplayList::PutImageData::PutImageData):
(WebCore::DisplayList::operator<<):
* platform/graphics/displaylists/DisplayListItems.h:
(WebCore::DisplayList::PutImageData::create):
(WebCore::DisplayList::PutImageData::destFormat const):
(WebCore::DisplayList::PutImageData::encode const):
(WebCore::DisplayList::PutImageData::decode):
* platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::putImageData):
* platform/graphics/displaylists/DisplayListRecorder.h:
* platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:
(WebCore::GraphicsContextGLOpenGL::ImageExtractor::ImageExtractor):
* platform/graphics/opengl/GraphicsContextGLOpenGL.h:
* platform/graphics/win/GraphicsContextGLDirect2D.cpp:
(WebCore::GraphicsContextGLOpenGL::ImageExtractor::extractImage):
* platform/graphics/win/ImageBufferDirect2DBackend.cpp:
(WebCore::ImageBufferDirect2DBackend::putImageData):
* platform/graphics/win/ImageBufferDirect2DBackend.h:

Source/WebKit:

Add "AlphaPremultiplication destFormat" argument to putImageData,
to handle creation of non-premultiplied ImageBitmaps from
ImageData.

* GPUProcess/graphics/RemoteImageBufferProxy.h:
* WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp:
(WebKit::ImageBufferShareableBitmapBackend::putImageData):
* WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h:
* WebProcess/GPU/graphics/RemoteImageBuffer.h:
(WebKit::RemoteImageBuffer::putImageData):

LayoutTests:

Rebaseline tests under:
  webgl/2.0.0/conformance/textures/image_bitmap_from_image_bitmap
  webgl/2.0.0/conformance/textures/image_bitmap_from_image_data
  webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap
  webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data
all of which are now passing.

* webgl/2.0.0/conformance/textures/image_bitmap_from_image_bitmap/tex-2d-rgb-rgb-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance/textures/image_bitmap_from_image_bitmap/tex-2d-rgb-rgb-unsigned_short_5_6_5-expected.txt:
* webgl/2.0.0/conformance/textures/image_bitmap_from_image_bitmap/tex-2d-rgba-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance/textures/image_bitmap_from_image_bitmap/tex-2d-rgba-rgba-unsigned_short_4_4_4_4-expected.txt:
* webgl/2.0.0/conformance/textures/image_bitmap_from_image_bitmap/tex-2d-rgba-rgba-unsigned_short_5_5_5_1-expected.txt:
* webgl/2.0.0/conformance/textures/image_bitmap_from_image_data/tex-2d-rgb-rgb-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance/textures/image_bitmap_from_image_data/tex-2d-rgb-rgb-unsigned_short_5_6_5-expected.txt:
* webgl/2.0.0/conformance/textures/image_bitmap_from_image_data/tex-2d-rgba-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance/textures/image_bitmap_from_image_data/tex-2d-rgba-rgba-unsigned_short_4_4_4_4-expected.txt:
* webgl/2.0.0/conformance/textures/image_bitmap_from_image_data/tex-2d-rgba-rgba-unsigned_short_5_5_5_1-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-r11f_g11f_b10f-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-r11f_g11f_b10f-rgb-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-r11f_g11f_b10f-rgb-unsigned_int_10f_11f_11f_rev-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-r16f-red-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-r16f-red-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-r32f-red-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-r8-red-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-r8ui-red_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rg16f-rg-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rg16f-rg-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rg32f-rg-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rg8-rg-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rg8ui-rg_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgb16f-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgb16f-rgb-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgb32f-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgb565-rgb-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgb565-rgb-unsigned_short_5_6_5-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgb5_a1-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgb5_a1-rgba-unsigned_short_5_5_5_1-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgb8-rgb-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgb8ui-rgb_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgb9_e5-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgb9_e5-rgb-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgba16f-rgba-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgba16f-rgba-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgba32f-rgba-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgba4-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgba4-rgba-unsigned_short_4_4_4_4-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgba8-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgba8ui-rgba_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-srgb8-rgb-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-srgb8_alpha8-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-r11f_g11f_b10f-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-r11f_g11f_b10f-rgb-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-r11f_g11f_b10f-rgb-unsigned_int_10f_11f_11f_rev-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-r16f-red-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-r16f-red-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-r32f-red-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-r8-red-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-r8ui-red_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rg16f-rg-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rg16f-rg-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rg32f-rg-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rg8-rg-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rg8ui-rg_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rgb16f-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rgb16f-rgb-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rgb32f-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rgb565-rgb-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rgb565-rgb-unsigned_short_5_6_5-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rgb5_a1-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rgb5_a1-rgba-unsigned_short_5_5_5_1-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rgb8-rgb-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rgb8ui-rgb_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rgb9_e5-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rgb9_e5-rgb-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rgba16f-rgba-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rgba16f-rgba-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rgba32f-rgba-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rgba4-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rgba4-rgba-unsigned_short_4_4_4_4-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rgba8-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rgba8ui-rgba_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-srgb8-rgb-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-srgb8_alpha8-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-r11f_g11f_b10f-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-r11f_g11f_b10f-rgb-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-r11f_g11f_b10f-rgb-unsigned_int_10f_11f_11f_rev-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-r16f-red-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-r16f-red-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-r32f-red-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-r8-red-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-r8ui-red_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-rg16f-rg-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-rg16f-rg-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-rg32f-rg-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-rg8-rg-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-rg8ui-rg_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-rgb16f-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-rgb16f-rgb-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-rgb32f-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-rgb565-rgb-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-rgb565-rgb-unsigned_short_5_6_5-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-rgb5_a1-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-rgb5_a1-rgba-unsigned_short_5_5_5_1-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-rgb8-rgb-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-rgb8ui-rgb_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-rgb9_e5-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-rgb9_e5-rgb-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-rgba16f-rgba-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-rgba16f-rgba-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-rgba32f-rgba-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-rgba4-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-rgba4-rgba-unsigned_short_4_4_4_4-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-rgba8-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-rgba8ui-rgba_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-srgb8-rgb-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-2d-srgb8_alpha8-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-r11f_g11f_b10f-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-r11f_g11f_b10f-rgb-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-r11f_g11f_b10f-rgb-unsigned_int_10f_11f_11f_rev-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-r16f-red-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-r16f-red-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-r32f-red-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-r8-red-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-r8ui-red_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-rg16f-rg-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-rg16f-rg-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-rg32f-rg-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-rg8-rg-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-rg8ui-rg_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-rgb16f-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-rgb16f-rgb-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-rgb32f-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-rgb565-rgb-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-rgb565-rgb-unsigned_short_5_6_5-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-rgb5_a1-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-rgb5_a1-rgba-unsigned_short_5_5_5_1-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-rgb8-rgb-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-rgb8ui-rgb_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-rgb9_e5-rgb-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-rgb9_e5-rgb-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-rgba16f-rgba-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-rgba16f-rgba-half_float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-rgba32f-rgba-float-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-rgba4-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-rgba4-rgba-unsigned_short_4_4_4_4-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-rgba8-rgba-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-rgba8ui-rgba_integer-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-srgb8-rgb-unsigned_byte-expected.txt:
* webgl/2.0.0/conformance2/textures/image_bitmap_from_image_data/tex-3d-srgb8_alpha8-rgba-unsigned_byte-expected.txt:

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

12 hours ago[macOS iOS] imported/w3c/web-platform-tests/webrtc/RTCRtpTransceiver.https.html is...
hector_i_lopez@apple.com [Fri, 7 Aug 2020 01:05:51 +0000 (01:05 +0000)]
[macOS iOS] imported/w3c/web-platform-tests/webrtc/RTCRtpTransceiver.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=214197

Unreviewed test gardening.

* TestExpectations:

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

12 hours agoAvoid triggering redundant compositing updates when trying ot run a steps() animation...
simon.fraser@apple.com [Fri, 7 Aug 2020 00:57:45 +0000 (00:57 +0000)]
Avoid triggering redundant compositing updates when trying ot run a steps() animation on transform
https://bugs.webkit.org/show_bug.cgi?id=215241
<rdar://problem/62737868>

Reviewed by Zalan Bujtas.

Source/WebCore:

With a steps() timing function and keyframes animating the transform property, KeyframeEffect::applyPendingAcceleratedActions()
tries to restart the animation every time because the GraphicsLayer reports that it didn't start an accelerated animation.
r264856 patched some of this, but we still call animationFinished() every time, and this triggers a compositing update via
the m_owningLayer.setNeeds* calls in RenderLayerBacking::animationFinished().

So don't try to remove the animation if wasn't running. This makes those compositing updates a no-op, which is important
because these animations still invalidate style on every frame (webkit.org/b/215229).

Test: animations/steps-transform-compositing-updates.html

* animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::applyPendingAcceleratedActions):

LayoutTests:

animations/steps-transform-rendering-updates.html was landed with a bug; it aliased
the global 'count' variable, and was thus testing the wrong thing. So land a failing
result for the test for now (webkit.org/b/215229 addresses the fix).

* animations/steps-transform-compositing-updates-expected.txt: Copied from LayoutTests/animations/steps-transform-rendering-updates-expected.txt.
* animations/steps-transform-compositing-updates.html: Copied from LayoutTests/animations/steps-transform-rendering-updates.html.
* animations/steps-transform-rendering-updates-expected.txt:
* animations/steps-transform-rendering-updates.html:

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

13 hours agoWeb process crashes at WebCore::FullscreenManager::didExitFullscreen
peng.liu6@apple.com [Fri, 7 Aug 2020 00:23:50 +0000 (00:23 +0000)]
Web process crashes at WebCore::FullscreenManager::didExitFullscreen
https://bugs.webkit.org/show_bug.cgi?id=215243

Reviewed by Eric Carlson.

No new tests, no functional change.

* dom/FullscreenManager.cpp:
(WebCore::FullscreenManager::didExitFullscreen):
m_fullscreenElement might be nullptr when fullscreenOrPendingElement() is not nullptr.

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

13 hours agoWeb Inspector: Media & Animations timeline shouldn't shift when sorting
nvasilyev@apple.com [Fri, 7 Aug 2020 00:19:15 +0000 (00:19 +0000)]
Web Inspector: Media & Animations timeline shouldn't shift when sorting
https://bugs.webkit.org/show_bug.cgi?id=215085

Reviewed by Devin Rousso.

* UserInterface/Views/DataGrid.css:
(.data-grid):
(.data-grid th):
(.data-grid th:matches(.sort-ascending, .sort-descending) > .header-cell-content:first-child::after):
* UserInterface/Views/TimelineDataGrid.css:
(.data-grid.timeline th.graph-column > .timeline-ruler):
Override padding defined in `.data-grid th > .header-cell-content`.

(.data-grid.timeline th > .header-cell-content.timeline-ruler > .markers):
(.data-grid.timeline th:matches(.sort-ascending, .sort-descending) > .header-cell-content.timeline-ruler:first-child::after):
`.header-cell-content.timeline-ruler` is different from `.header-cell-content` in the sense that the former takes the entire
height of DataGrid and has no padding. Place the chevron in the middle of `--data-grid-header-height`.

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

13 hours ago[ macOS ] webgpu/whlsl/dont-crash-parsing-enum.html is a flaky failure
hector_i_lopez@apple.com [Fri, 7 Aug 2020 00:00:54 +0000 (00:00 +0000)]
[ macOS ] webgpu/whlsl/dont-crash-parsing-enum.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=215247

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

13 hours agoWeakPtr threading assertion on editing/undo-manager/undo-manager-delete-stale-undo...
wenson_hsieh@apple.com [Fri, 7 Aug 2020 00:00:28 +0000 (00:00 +0000)]
WeakPtr threading assertion on editing/undo-manager/undo-manager-delete-stale-undo-items.html
https://bugs.webkit.org/show_bug.cgi?id=215221
<rdar://problem/66632111>

Reviewed by Devin Rousso.

Refactors `UndoItem` to avoid dereferencing its `m_undoManager` underneath `UndoItem::document`, which is
consulted when computing its JS wrapper's opaque roots. Instead of going through `m_undoManager` to grab the
document, store a `WeakPtr` to the `Document` upon setting the `UndoManager` and return its pointer value
directly in `document()`.

* page/UndoItem.cpp:
(WebCore::UndoItem::setUndoManager):
(WebCore::UndoItem::invalidate):
(WebCore::UndoItem::document const):
* page/UndoItem.h:

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

14 hours agoUse references instead of pointers for WidthIterator's fonts
mmaxfield@apple.com [Thu, 6 Aug 2020 23:46:49 +0000 (23:46 +0000)]
Use references instead of pointers for WidthIterator's fonts
https://bugs.webkit.org/show_bug.cgi?id=215186

Reviewed by Zalan Bujtas.

They can never be null.

No new tests because there is no behavior change.

* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::widthOfTextRange const):
(WebCore::FontCascade::layoutSimpleText const):
(WebCore::FontCascade::floatWidthForSimpleText const):
(WebCore::FontCascade::adjustSelectionRectForSimpleText const):
(WebCore::FontCascade::offsetForPositionForSimpleText const):
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::WidthIterator):
(WebCore::WidthIterator::applyFontTransforms):
(WebCore::WidthIterator::advanceInternal):
* platform/graphics/WidthIterator.h:
* rendering/svg/SVGTextMetricsBuilder.cpp:
(WebCore::SVGTextMetricsBuilder::initializeMeasurementWithTextRenderer):

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

14 hours agoBaseAudioContext.decodeAudioData() should return a Promise
cdumez@apple.com [Thu, 6 Aug 2020 23:39:31 +0000 (23:39 +0000)]
BaseAudioContext.decodeAudioData() should return a Promise
https://bugs.webkit.org/show_bug.cgi?id=215242

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

Rebaseline tests that are now passing.

* web-platform-tests/webaudio/idlharness.https.window-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-multi-channels-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-detached-execution-context.tentative-expected.txt:

Source/WebCore:

BaseAudioContext.decodeAudioData() should return a Promise as per:
- https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-decodeaudiodata

Behavior is unchanged for prefixed WebKitAudioContext.decodeAudioData() to ensure
backward compatibility.

No new tests, rebaselined existing tests.

* Modules/webaudio/AsyncAudioDecoder.cpp:
(WebCore::AsyncAudioDecoder::decodeAsync):
(WebCore::AsyncAudioDecoder::DecodingTask::DecodingTask):
(WebCore::AsyncAudioDecoder::DecodingTask::notifyComplete):
* Modules/webaudio/AsyncAudioDecoder.h:
* Modules/webaudio/BaseAudioContext.cpp:
(WebCore::BaseAudioContext::decodeAudioData):
* Modules/webaudio/BaseAudioContext.h:
* Modules/webaudio/BaseAudioContext.idl:
* Modules/webaudio/WebKitAudioContext.idl:

LayoutTests:

Unskip test that is no longer timing out.

* TestExpectations:

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

14 hours ago[ macOS wk 2 Release ] imported/w3c/web-platform-tests/content-security-policy/worker...
hector_i_lopez@apple.com [Thu, 6 Aug 2020 23:24:39 +0000 (23:24 +0000)]
[ macOS wk 2 Release ] imported/w3c/web-platform-tests/content-security-policy/worker-src/service-worker-src-child-fallback.https.sub.html  is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=215245

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

15 hours ago[webkitcorepy] Standardize setuptools version
jbedard@apple.com [Thu, 6 Aug 2020 22:41:49 +0000 (22:41 +0000)]
[webkitcorepy] Standardize setuptools version
https://bugs.webkit.org/show_bug.cgi?id=215234
<rdar://problem/66638187>

Reviewed by Darin Adler.

* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Use the same setuptools version
for Python 2 and 3.

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

15 hours agoDrop non-standard createBuffer(ArrayBuffer, boolean) overload from AudioContext
cdumez@apple.com [Thu, 6 Aug 2020 22:11:04 +0000 (22:11 +0000)]
Drop non-standard createBuffer(ArrayBuffer, boolean) overload from AudioContext
https://bugs.webkit.org/show_bug.cgi?id=215238

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that one more check is passing.

* web-platform-tests/webaudio/idlharness.https.window-expected.txt:

Source/WebCore:

Drop non-standard createBuffer(ArrayBuffer, boolean) overload from AudioContext:
- https://webaudio.github.io/web-audio-api/#BaseAudioContext

This overload is kept on WebKitAudioContext for backward-compatibility when the page
is still using the prefixed API.

No new tests, rebaselined existing test.

* Modules/webaudio/BaseAudioContext.cpp:
* Modules/webaudio/BaseAudioContext.h:
* Modules/webaudio/BaseAudioContext.idl:
* Modules/webaudio/WebKitAudioContext.cpp:
(WebCore::WebKitAudioContext::createLegacyBuffer):
* Modules/webaudio/WebKitAudioContext.h:
* Modules/webaudio/WebKitAudioContext.idl:

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

16 hours agoMediaStreamAudioDestinationNode should have a constructor
cdumez@apple.com [Thu, 6 Aug 2020 21:13:13 +0000 (21:13 +0000)]
MediaStreamAudioDestinationNode should have a constructor
https://bugs.webkit.org/show_bug.cgi?id=215233

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that more checks are passing.

* web-platform-tests/webaudio/idlharness.https.window-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-mediastreamaudiodestinationnode-interface/ctor-mediastreamaudiodestination-expected.txt:

Source/WebCore:

MediaStreamAudioDestinationNode should have a constructor:
- https://webaudio.github.io/web-audio-api/#mediastreamaudiodestinationnode

No new tests, rebaselined existing tests.

* Modules/webaudio/AnalyserNode.cpp:
(WebCore::AnalyserNode::AnalyserNode):
* Modules/webaudio/AudioBasicInspectorNode.cpp:
(WebCore::AudioBasicInspectorNode::AudioBasicInspectorNode):
(WebCore::AudioBasicInspectorNode::pullInputs):
(WebCore::AudioBasicInspectorNode::checkNumberOfChannelsForInput):
(WebCore::AudioBasicInspectorNode::updatePullStatus):
* Modules/webaudio/AudioBasicInspectorNode.h:
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::createMediaStreamDestination):
* Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
(WebCore::MediaStreamAudioDestinationNode::create):
(WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
* Modules/webaudio/MediaStreamAudioDestinationNode.h:
* Modules/webaudio/MediaStreamAudioDestinationNode.idl:
* Modules/webaudio/WebKitAudioContext.cpp:
(WebCore::WebKitAudioContext::createMediaStreamDestination):

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

16 hours ago[CG] Avoid creating a sub-image when drawing a small scaled sub-rect from a native...
commit-queue@webkit.org [Thu, 6 Aug 2020 21:02:12 +0000 (21:02 +0000)]
[CG] Avoid creating a sub-image when drawing a small scaled sub-rect from a native image
https://bugs.webkit.org/show_bug.cgi?id=215015
<rdar://problem/63845893>

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

The reason for creating the sub-image in GraphicsContext::drawNativeImage()
is to have a better image interpolation for the scaled sub-rect. For small
destRect, the interpolation on the original image is almost the same as
the interpolation on the sub-image. So we should avoid creating the sub-
image if destRect.area() is less than some minimum value. Creating many
sub-images can affect the rendering performance.

* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawNativeImage):

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

17 hours agoUnreviewed, reverting r265325.
wenson_hsieh@apple.com [Thu, 6 Aug 2020 20:21:06 +0000 (20:21 +0000)]
Unreviewed, reverting r265325.

Caused several tests in fast/forms and editing/pasteboard to
time out

Reverted changeset:

"Remove UIScriptController.removeAllDynamicDictionaries()"
https://bugs.webkit.org/show_bug.cgi?id=215207
https://trac.webkit.org/changeset/265325

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

17 hours agoWTF::makeString() should handle enum values
ddkilzer@apple.com [Thu, 6 Aug 2020 20:09:15 +0000 (20:09 +0000)]
WTF::makeString() should handle enum values
<https://webkit.org/b/214906>

Reviewed by Sam Weinig.

Source/WebCore:

* Modules/webgpu/WHLSL/Metal/WHLSLMangledNames.h:
(WTF::MangledNameAdaptor::length):
(WTF::MangledNameAdaptor::writeTo):
- Update for function renames.

Source/WebKit:

* Platform/IPC/cocoa/ConnectionCocoa.mm:
(IPC::Connection::sendMessage):
* Shared/Cocoa/AuxiliaryProcessCocoa.mm:
(WebKit::AuxiliaryProcess::didReceiveInvalidMessage):
- Update to take advantage of enum support in WTF::makeString().

Source/WTF:

* wtf/text/IntegerToStringConversion.h:
(WTF::numberToStringSigned):
- Drive-by fix to change std::make_unsigned<>::type to
  std::make_unsigned_t<>.
(WTF::writeNumberToBufferImpl): Delete.
(WTF::writeIntegerToBufferImpl):
- Rename from WTF::writeNumberToBufferImpl().
(WTF::writeNumberToBufferSigned): Delete.
(WTF::writeNumberToBufferUnsigned): Delete.
(WTF::writeIntegerToBuffer):
- Replace WTF::writeNumberToBufferSigned() and
  WTF::writeNumberToBufferUnsigned() with a single function that
  uses constexpr checks to let the compiler eliminate code.  Had
  to use if/else if/else construct to help the compiler
  eliminate unused cases.
(WTF::lengthOfNumberAsStringImpl): Delete.
(WTF::lengthOfIntegerAsStringImpl):
- Rename from WTF::lengthOfNumberAsStringImpl().
(WTF::lengthOfNumberAsStringSigned): Delete.
(WTF::lengthOfNumberAsStringUnsigned): Delete.
(WTF::lengthOfIntegerAsString):
- Replace WTF::lengthOfNumberAsStringSigned() and
  WTF::lengthOfNumberAsStringUnsigned() with a single function
  that uses constexpr checks to let the compiler eliminate code.
  Had to use if/else if/else construct to help the compiler
  eliminate unused cases.

* wtf/text/StringConcatenateNumbers.h:
(WTF::StringTypeAdapter<SignedInt, ...>): Deleted.
(WTF::StringTypeAdapter<UnignedInt, ...>): Deleted.
(WTF::StringTypeAdapter<Integer, ...>):
- Combine signed/unsigned templated classes into a single class
  now that WTF::lengthOfIntegerAsString() and
  WTF::writeIntegerToBuffer() are templated.
(WTF::StringTypeAdapter<Enum, ...>):
- Add support for enum types to WTF::makeString().  This also
  takes advantage of templated WTF::lengthOfIntegerAsString()
  and WTF::writeIntegerToBuffer() functions since enum types may
  be either signed or unsigned.

Tools:

* TestWebKitAPI/Tests/WTF/StringConcatenate.cpp:
(TestWebKitAPI::TEST):
- Update tests for renamed functions.
- Add test for enum values.

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

17 hours agocheck-webkit-style: better algorithm to check for acronym capitalization in an identifier
ddkilzer@apple.com [Thu, 6 Aug 2020 20:06:18 +0000 (20:06 +0000)]
check-webkit-style: better algorithm to check for acronym capitalization in an identifier
<https://webkit.org/b/215026>

Reviewed by Darin Adler.

* Scripts/webkitpy/style/checkers/cpp.py:
(_split_identifier_into_words): Add.
- This method splits a identifier into individual words.
(_check_identifier_name_for_acronyms):
- Update to use _split_identifier_into_words(), which makes it
  possible to check for improperly capitalized acronyms in the
  middle of identifiers.
- Also add support for exceptions, which are valid words that
  include acronyms (like "Curl").
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTest):
- Fix a typo in a method name in another test.
(WebKitStyleTest.test_split_identifier_into_words): Add.
- Add tests for _split_identifier_into_words().
(WebKitStyleTest.test_identifier_names_with_acronyms):
- Add tests for cases that weren't possible with the previous
  algorithm.

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

17 hours agoMediaStreamAudioSourceNode should have a constructor
cdumez@apple.com [Thu, 6 Aug 2020 20:01:30 +0000 (20:01 +0000)]
MediaStreamAudioSourceNode should have a constructor
https://bugs.webkit.org/show_bug.cgi?id=215225

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that more checks are passing.

* web-platform-tests/webaudio/idlharness.https.window-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-mediastreamaudiosourcenode-interface/mediastreamaudiosourcenode-ctor-expected.txt:

Source/WebCore:

MediaStreamAudioSourceNode should have a constructor:
- https://webaudio.github.io/web-audio-api/#mediastreamaudiosourcenode

No new tests, rebaselined existing tests.

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::createMediaStreamSource):
* Modules/webaudio/MediaStreamAudioSourceNode.cpp:
(WebCore::MediaStreamAudioSourceNode::create):
* Modules/webaudio/MediaStreamAudioSourceNode.h:
* Modules/webaudio/MediaStreamAudioSourceNode.idl:
* Modules/webaudio/MediaStreamAudioSourceOptions.h: Copied from Source/WebCore/Modules/webaudio/MediaStreamAudioSourceNode.idl.
* Modules/webaudio/MediaStreamAudioSourceOptions.idl: Copied from Source/WebCore/Modules/webaudio/MediaStreamAudioSourceNode.idl.
* Modules/webaudio/WebKitAudioContext.cpp:
(WebCore::WebKitAudioContext::createMediaStreamSource):
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:

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

19 hours ago[ews] Add method to send email notifications to patch author for build failure
aakash_jain@apple.com [Thu, 6 Aug 2020 18:38:07 +0000 (18:38 +0000)]
[ews] Add method to send email notifications to patch author for build failure
https://bugs.webkit.org/show_bug.cgi?id=215219

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/steps.py:
(AnalyzeCompileWebKitResults.send_email_for_new_build_failure): Method to send the email for build failure by the patch.
(BugzillaMixin._is_bug_closed): Set bug_title as a build property so that it can be used later.

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

19 hours agoUnreviewed GStreamer MSE micro gardening
aboya@igalia.com [Thu, 6 Aug 2020 18:34:39 +0000 (18:34 +0000)]
Unreviewed GStreamer MSE micro gardening
https://bugs.webkit.org/show_bug.cgi?id=215228

* platform/gtk/TestExpectations:

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

19 hours ago[Mac,WK2] REGRESSION(r262322): ScreenTime overlay is hidden in fullscreen mode
jer.noble@apple.com [Thu, 6 Aug 2020 18:30:45 +0000 (18:30 +0000)]
[Mac,WK2] REGRESSION(r262322): ScreenTime overlay is hidden in fullscreen mode
https://bugs.webkit.org/show_bug.cgi?id=215222
<rdar://problem/65871844>

Reviewed by Eric Carlson.

During a refactor, a call to -[NSWindow setAutodisplay:YES] was dropped (in addition to a call to
NSEnableScreenUpdates(), but that has a 1s timeout so its effects aren't persistent). This meant
all NSViews added to that window need -display called on them explicitly in order to paint, and
so subviews like the ScreenTime overlay is never drawn.

* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):

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

19 hours agoRename LeadingExpansion and TrailingExpansion to LeftExpansion and RightExpansion
mmaxfield@apple.com [Thu, 6 Aug 2020 18:03:01 +0000 (18:03 +0000)]
Rename LeadingExpansion and TrailingExpansion to LeftExpansion and RightExpansion
https://bugs.webkit.org/show_bug.cgi?id=215211

Reviewed by Darin Adler.

"Leading" and "Trailing" are terms-of-art which represent logical order.
However, the behavior of these flags operates in visual order.
Instead, we should rename them to their visual order analogues: left and right.

No new tests because there is no behavior change.

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::measureText):
(WebCore::CanvasRenderingContext2D::drawTextInternal):
* layout/inlineformatting/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::justifyRuns):
(WebCore::Layout::LineBuilder::Run::expand):
(WebCore::Layout::LineBuilder::Run::visuallyCollapseTrailingWhitespace):
* platform/graphics/ComplexTextController.cpp:
(WebCore::expansionLocation):
(WebCore::ComplexTextController::adjustGlyphsAndAdvances):
* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::expansionOpportunityCountInternal):
(WebCore::FontCascade::leftExpansionOpportunity):
(WebCore::FontCascade::rightExpansionOpportunity):
(WebCore::FontCascade::leadingExpansionOpportunity): Deleted.
(WebCore::FontCascade::trailingExpansionOpportunity): Deleted.
* platform/graphics/FontCascade.h:
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::WidthIterator):
(WebCore::expansionLocation):
(WebCore::WidthIterator::advanceInternal):
* platform/text/TextFlags.h:
* rendering/ComplexLineLayout.cpp:
(WebCore::expansionBehaviorForInlineTextBox):
(WebCore::applyExpansionBehavior):
* rendering/EllipsisBox.cpp:
(WebCore::EllipsisBox::paint):
(WebCore::EllipsisBox::selectionRect):
(WebCore::EllipsisBox::paintSelection):
* rendering/InlineBox.h:
(WebCore::InlineBox::setCanHaveLeftExpansion):
(WebCore::InlineBox::setCanHaveRightExpansion):
(WebCore::InlineBox::setForceRightExpansion):
(WebCore::InlineBox::setForceLeftExpansion):
(WebCore::InlineBox::InlineBoxBitfields::InlineBoxBitfields):
(WebCore::InlineBox::hasSelectedChildren const):
(WebCore::InlineBox::setHasSelectedChildren):
(WebCore::InlineBox::canHaveLeftExpansion const):
(WebCore::InlineBox::canHaveRightExpansion const):
(WebCore::InlineBox::forceRightExpansion const):
(WebCore::InlineBox::forceLeftExpansion const):
(WebCore::InlineBox::setCanHaveLeadingExpansion): Deleted.
(WebCore::InlineBox::setCanHaveTrailingExpansion): Deleted.
(WebCore::InlineBox::setForceTrailingExpansion): Deleted.
(WebCore::InlineBox::setForceLeadingExpansion): Deleted.
(WebCore::InlineBox::canHaveLeadingExpansion const): Deleted.
(WebCore::InlineBox::canHaveTrailingExpansion const): Deleted.
(WebCore::InlineBox::forceTrailingExpansion const): Deleted.
(WebCore::InlineBox::forceLeadingExpansion const): Deleted.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::expansionBehavior const):
* rendering/InlineTextBox.h:
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::paintObject):
(WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths const):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::updateFromElement):
(WebCore::RenderListBox::paintItemForeground):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::getAverageCharWidth):
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::expansionBehavior):
* rendering/SimpleLineLayout.h:
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::initializeInlineTextBox):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::constructTextRun const):
* rendering/svg/SVGTextMetrics.cpp:
(WebCore::SVGTextMetrics::constructTextRun):

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

19 hours ago[ iOS wk2 Debug ] fast/text/basic/001.html is a flaky crash
hector_i_lopez@apple.com [Thu, 6 Aug 2020 17:58:13 +0000 (17:58 +0000)]
[ iOS wk2 Debug ] fast/text/basic/001.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=215226

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

20 hours agoDynamicsCompressorNode.reduction attribute should be a float, not an AudioParam
cdumez@apple.com [Thu, 6 Aug 2020 17:33:40 +0000 (17:33 +0000)]
DynamicsCompressorNode.reduction attribute should be a float, not an AudioParam
https://bugs.webkit.org/show_bug.cgi?id=215195

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that more checks are passing.

* web-platform-tests/webaudio/idlharness.https.window-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-dynamicscompressornode-interface/ctor-dynamicscompressor-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-dynamicscompressornode-interface/dynamicscompressor-basic-expected.txt:

Source/WebCore:

DynamicsCompressorNode.reduction attribute should be a float, not an AudioParam:
- https://webaudio.github.io/web-audio-api/#dynamicscompressornode

Backward-compatibility is maintained for the prefixed WebAudio API.

No new tests, rebaselined existing tests.

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Modules/webaudio/DynamicsCompressorNode.cpp:
(WebCore::DynamicsCompressorNode::DynamicsCompressorNode):
(WebCore::DynamicsCompressorNode::process):
* Modules/webaudio/DynamicsCompressorNode.h:
(WebCore::DynamicsCompressorNode::reduction const):
(WebCore::DynamicsCompressorNode::DynamicsCompressorNode):
(WebCore::DynamicsCompressorNode::setReduction):
* Modules/webaudio/DynamicsCompressorNode.idl:
* Modules/webaudio/WebKitAudioContext.cpp:
(WebCore::WebKitAudioContext::createWebKitDynamicsCompressor):
* Modules/webaudio/WebKitAudioContext.h:
* Modules/webaudio/WebKitAudioContext.idl:
* Modules/webaudio/WebKitDynamicsCompressorNode.h: Copied from Source/WebCore/Modules/webaudio/DynamicsCompressorNode.idl.
* Modules/webaudio/WebKitDynamicsCompressorNode.idl: Copied from Source/WebCore/Modules/webaudio/DynamicsCompressorNode.idl.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:

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

20 hours agoUnreviewed, reverting r265328.
tsavell@apple.com [Thu, 6 Aug 2020 17:32:17 +0000 (17:32 +0000)]
Unreviewed, reverting r265328.

Broke 17 MediaRecorder tests.

Reverted changeset:

"Add support for MediaRecorder bitrate options"
https://bugs.webkit.org/show_bug.cgi?id=214973
https://trac.webkit.org/changeset/265328

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

20 hours ago[ macOS iOS wk2 Debug ] editing/undo-manager/undo-manager-delete-stale-undo-items...
hector_i_lopez@apple.com [Thu, 6 Aug 2020 17:06:50 +0000 (17:06 +0000)]
[ macOS iOS wk2 Debug ] editing/undo-manager/undo-manager-delete-stale-undo-items.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=215221

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:

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

20 hours agoFixed widget method argument compatibility with WordPress
jond@apple.com [Thu, 6 Aug 2020 17:02:05 +0000 (17:02 +0000)]
Fixed widget method argument compatibility with WordPress
https://bugs.webkit.org/show_bug.cgi?id=215103

Reviewed by Devin Rousso.

* wp-content/themes/webkit/widgets/icon.php:
* wp-content/themes/webkit/widgets/page.php:
* wp-content/themes/webkit/widgets/post.php:
* wp-content/themes/webkit/widgets/twitter.php:

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

20 hours agoRemoved XML declaration from SVGs and updated copyrights
jond@apple.com [Thu, 6 Aug 2020 16:58:58 +0000 (16:58 +0000)]
Removed XML declaration from SVGs and updated copyrights
https://bugs.webkit.org/show_bug.cgi?id=215102

Reviewed by Devin Rousso.

* wp-content/themes/webkit/images/chevron-dark.svg:
* wp-content/themes/webkit/images/chevron.svg:
* wp-content/themes/webkit/images/circular.svg:
* wp-content/themes/webkit/images/compass.svg:
* wp-content/themes/webkit/images/download-white.svg:
* wp-content/themes/webkit/images/download.svg:
* wp-content/themes/webkit/images/filter.svg:
* wp-content/themes/webkit/images/icons.svg:
* wp-content/themes/webkit/images/inspector.svg:
* wp-content/themes/webkit/images/invert-lightness.svg:
* wp-content/themes/webkit/images/menu-down.svg:
* wp-content/themes/webkit/images/search.svg:
* wp-content/themes/webkit/images/spinner.svg:
* wp-content/themes/webkit/images/squirrelfish-lives.svg:
* wp-content/themes/webkit/images/template.svg:
* wp-content/themes/webkit/images/twitter.svg:
* wp-content/themes/webkit/images/webkit.svg:

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

21 hours agoMediaElementAudioSourceNode interface should have a constructor
cdumez@apple.com [Thu, 6 Aug 2020 16:18:03 +0000 (16:18 +0000)]
MediaElementAudioSourceNode interface should have a constructor
https://bugs.webkit.org/show_bug.cgi?id=215200

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Rebaseline WPT test now that more checks are passing.

* web-platform-tests/webaudio/idlharness.https.window-expected.txt:

Source/WebCore:

MediaElementAudioSourceNode interface should have a constructor:
- https://webaudio.github.io/web-audio-api/#mediaelementaudiosourcenode

Test: webaudio/mediaelementaudiosourcenode-constructor.html

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::createMediaElementSource):
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/MediaElementAudioSourceNode.cpp:
(WebCore::MediaElementAudioSourceNode::create):
(WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode):
* Modules/webaudio/MediaElementAudioSourceNode.h:
* Modules/webaudio/MediaElementAudioSourceNode.idl:
* Modules/webaudio/MediaElementAudioSourceOptions.h: Copied from Source/WebCore/Modules/webaudio/MediaElementAudioSourceNode.idl.
* Modules/webaudio/MediaElementAudioSourceOptions.idl: Copied from Source/WebCore/Modules/webaudio/MediaElementAudioSourceNode.idl.
* Modules/webaudio/WebKitAudioContext.cpp:
(WebCore::WebKitAudioContext::createMediaElementSource):
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:

LayoutTests:

Add layout test coverage.

* webaudio/mediaelementaudiosourcenode-constructor-expected.txt: Added.
* webaudio/mediaelementaudiosourcenode-constructor.html: Added.

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

22 hours ago[ iOS wk2 ] editing/pasteboard/paste-without-nesting.html is a flaky failure
rackler@apple.com [Thu, 6 Aug 2020 15:47:55 +0000 (15:47 +0000)]
[ iOS wk2 ] editing/pasteboard/paste-without-nesting.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=215218

Unreviewed test gardening.

* platform/ios-simulator-wk2/TestExpectations:

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

22 hours agoAdd support for MediaRecorder bitrate options
youenn@apple.com [Thu, 6 Aug 2020 15:25:39 +0000 (15:25 +0000)]
Add support for MediaRecorder bitrate options
https://bugs.webkit.org/show_bug.cgi?id=214973

Reviewed by Eric Carlson.

Source/WebCore:

Pipe options to MediaRecorderPrivate constructor.
For the actual implementation, pass it down to VideoSampleBufferCompressor and AudioSampleBufferCompressor.
For AudioSampleBufferCompressor, we do not handle well some bit rates, so for now, we limit to specific values.

Tests: http/wpt/mediarecorder/MediaRecorder-audio-bitrate.html
       http/wpt/mediarecorder/MediaRecorder-video-bitrate.html

* Modules/mediarecorder/MediaRecorder.cpp:
(WebCore::MediaRecorder::create):
(WebCore::MediaRecorder::createMediaRecorderPrivate):
(WebCore::MediaRecorder::MediaRecorder):
(WebCore::MediaRecorder::startRecording):
* Modules/mediarecorder/MediaRecorder.h:
* Modules/mediarecorder/MediaRecorderProvider.cpp:
(WebCore::MediaRecorderProvider::createMediaRecorderPrivate):
* Modules/mediarecorder/MediaRecorderProvider.h:
* WebCore.xcodeproj/project.pbxproj:
* loader/EmptyClients.cpp:
* platform/mediarecorder/MediaRecorderPrivate.h:
* platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp:
(WebCore::MediaRecorderPrivateAVFImpl::create):
* platform/mediarecorder/MediaRecorderPrivateAVFImpl.h:
* platform/mediarecorder/cocoa/AudioSampleBufferCompressor.h:
* platform/mediarecorder/cocoa/AudioSampleBufferCompressor.mm:
(WebCore::AudioSampleBufferCompressor::setBitsPerSecond):
(WebCore::AudioSampleBufferCompressor::outputBitRate const):
(WebCore::AudioSampleBufferCompressor::initAudioConverterForSourceFormatDescription):
Do not exit when not able to set bitrate as we still want to set m_maxOutputPacketSize.
In case of error in setting up the converter, clean it up so that we do not use a partially set up converter.
* platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
* platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
(WebCore::MediaRecorderPrivateWriter::create):
(WebCore::MediaRecorderPrivateWriter::setOptions):
* platform/mediarecorder/cocoa/VideoSampleBufferCompressor.h:
* platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm:
(WebCore::VideoSampleBufferCompressor::setBitsPerSecond):
(WebCore::setCompressionSessionProperty):
(WebCore::VideoSampleBufferCompressor::initCompressionSession):
* testing/Internals.cpp:
(WebCore::createRecorderMockSource):

Source/WebKit:

Serialize options when creating remote media recorder.

* GPUProcess/webrtc/RemoteMediaRecorder.cpp:
(WebKit::RemoteMediaRecorder::create):
* GPUProcess/webrtc/RemoteMediaRecorder.h:
* GPUProcess/webrtc/RemoteMediaRecorderManager.cpp:
(WebKit::RemoteMediaRecorderManager::createRecorder):
* GPUProcess/webrtc/RemoteMediaRecorderManager.h:
* GPUProcess/webrtc/RemoteMediaRecorderManager.messages.in:
* WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:
(WebKit::MediaRecorderPrivate::MediaRecorderPrivate):
(WebKit::MediaRecorderPrivate::startRecording):
* WebProcess/GPU/webrtc/MediaRecorderPrivate.h:
* WebProcess/GPU/webrtc/MediaRecorderProvider.cpp:
(WebKit::MediaRecorderProvider::createMediaRecorderPrivate):
* WebProcess/GPU/webrtc/MediaRecorderProvider.h:

LayoutTests:

* http/wpt/mediarecorder/MediaRecorder-audio-bitrate-expected.txt: Added.
* http/wpt/mediarecorder/MediaRecorder-audio-bitrate.html: Added.
* http/wpt/mediarecorder/MediaRecorder-video-bitrate-expected.txt: Added.
* http/wpt/mediarecorder/MediaRecorder-video-bitrate.html: Added.

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

23 hours agoScrolling tree nodes sometimes don't match layer z-order
simon.fraser@apple.com [Thu, 6 Aug 2020 14:55:55 +0000 (14:55 +0000)]
Scrolling tree nodes sometimes don't match layer z-order
https://bugs.webkit.org/show_bug.cgi?id=215210

Reviewed by Antti Koivisto.

Source/WebCore:

When adding nodes to the scrolling state tree during compositing layer traversal,
we would sometimes add then in the wrong order. For example, if the composited layer
tree was:

+ Root
  + Stacking context
    Fixed layer 1
  Fixed layer 2

we would build a scrolling tree like:

+ Root scrolling node
  Node for layer 2
  Node for layer 1

This happened because RenderLayerCompositor::updateBackingAndHierarchy() failed to propagate up
scrollingTreeState.nextChildIndex.

This is generally benign, but inserting node 1 followed by node 2 would be seen as a scrolling tree
mutation, causing us to re-commit the scrolling tree when it hadn't really changed, triggering
extra CPU usage.

Part of <rdar://problem/62737868>: higher CPU usage on instagram.com.

Test: scrollingcoordinator/scrolling-tree/sibling-node-order.html

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBackingAndHierarchy):

LayoutTests:

* platform/ios-wk2/scrollingcoordinator/scrolling-tree/sibling-node-order-expected.txt: Added.
* scrollingcoordinator/scrolling-tree/sibling-node-order-expected.txt: Added.
* scrollingcoordinator/scrolling-tree/sibling-node-order.html: Added.

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

23 hours ago[WPE][GTK] Wrong argument order for clone syscall seccomp filter on s390x
aperez@igalia.com [Thu, 6 Aug 2020 14:48:07 +0000 (14:48 +0000)]
[WPE][GTK] Wrong argument order for clone syscall seccomp filter on s390x
https://bugs.webkit.org/show_bug.cgi?id=215212

Reviewed by Michael Catanzaro.

Patch based on this Flatpak pull request:
https://github.com/flatpak/flatpak/pull/3777

No new tests needed.

* UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
(WebKit::setupSeccomp): Add preprocessor guard to choose the correct
clone() system call argument on S390.

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

23 hours agoRemove UIScriptController.removeAllDynamicDictionaries()
wenson_hsieh@apple.com [Thu, 6 Aug 2020 14:46:35 +0000 (14:46 +0000)]
Remove UIScriptController.removeAllDynamicDictionaries()
https://bugs.webkit.org/show_bug.cgi?id=215207

Reviewed by Tim Horton.

Tools:

This script controller hook was added to help reset dictionaries to a consistent state prior to running the test
`contenteditable-autocorrect.html`, which verifies that `autocorrect="no"` on a contenteditable element works as
intended by typing "ti" and expecting it to not be autocorrected to anything else (i.e. "to").

Instead of requiring each test that involves autocorrection to call this, move this reset step into
TestController::platformResetStateToConsistentValues and remove the testing hook.

* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.h:
(WTR::UIScriptController::replaceTextAtRange):
(WTR::UIScriptController::removeAllDynamicDictionaries): Deleted.
* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::platformResetStateToConsistentValues):
* WebKitTestRunner/ios/UIScriptControllerIOS.h:
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptControllerIOS::removeAllDynamicDictionaries): Deleted.

LayoutTests:

Remove the call to UIScriptController.removeAllDynamicDictionaries.

* fast/events/ios/contenteditable-autocorrect.html:

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

23 hours ago[ iOS wk2 ] imported/w3c/web-platform-tests/svg/import/interact-zoom-01-t-manual...
rackler@apple.com [Thu, 6 Aug 2020 14:28:42 +0000 (14:28 +0000)]
[ iOS wk2 ] imported/w3c/web-platform-tests/svg/import/interact-zoom-01-t-manual.svg is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=215216

Unreviewed test gardening.

* platform/ios-simulator-wk2/TestExpectations:

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

27 hours agobuild-webkit script tries to execute command xcodebuild on Linux
commit-queue@webkit.org [Thu, 6 Aug 2020 10:55:28 +0000 (10:55 +0000)]
build-webkit script tries to execute command xcodebuild on Linux
https://bugs.webkit.org/show_bug.cgi?id=214353

Patch by Rob Buis <rbuis@igalia.com> on 2020-08-06
Reviewed by Carlos Alberto Lopez Perez.

Only call the function determineXcodeSDK() when
building for an Apple/Cocoa platform.

* Scripts/webkitdirs.pm:
(argumentsForConfiguration):

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

29 hours agoCould not find module 'WebKit' for target 'armv7-apple-ios'
james.savage@apple.com [Thu, 6 Aug 2020 08:41:53 +0000 (08:41 +0000)]
Could not find module 'WebKit' for target 'armv7-apple-ios'
<https://bugs.webkit.org/show_bug.cgi?id=215190>
<rdar://problem/65642049>

Reviewed by Brady Eidson.

* SwiftOverlay/Configurations/WebKitSwiftOverlayTests.xcconfig: Define
SWIFT_MODULE_ONLY_ARCHS to emit other architectures.

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

31 hours agoRemove the StyleResolver-specific evaluate function in MediaQueryEvaluator
commit-queue@webkit.org [Thu, 6 Aug 2020 06:16:44 +0000 (06:16 +0000)]
Remove the StyleResolver-specific evaluate function in MediaQueryEvaluator
https://bugs.webkit.org/show_bug.cgi?id=152089

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

The function mentioned in the bug is already gone (see r252736), also remove
the StyleResolver reference.

* css/MediaQueryEvaluator.h:

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

33 hours ago[GTK][WPE] Garden backdrop-filter debug crashes
lmoura@igalia.com [Thu, 6 Aug 2020 04:06:04 +0000 (04:06 +0000)]
[GTK][WPE] Garden backdrop-filter debug crashes

Unreviewed test gardening.

* platform/glib/TestExpectations:

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

34 hours agoAdd some more Animations logging
simon.fraser@apple.com [Thu, 6 Aug 2020 03:54:35 +0000 (03:54 +0000)]
Add some more Animations logging
https://bugs.webkit.org/show_bug.cgi?id=215181

Reviewed by Zalan Bujtas.

Add logging that shows when DeclarativeAnimation::tick() runs and when it invalidates style.

* animation/DeclarativeAnimation.cpp:
(WebCore::DeclarativeAnimation::tick):
* animation/DocumentTimelinesController.cpp:
(WebCore::DocumentTimelinesController::updateAnimationsAndSendEvents):
* animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::invalidate):

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

35 hours agoNetflix.com shows a scrubber that doesn't work
peng.liu6@apple.com [Thu, 6 Aug 2020 02:35:27 +0000 (02:35 +0000)]
Netflix.com shows a scrubber that doesn't work
https://bugs.webkit.org/show_bug.cgi?id=215199

Reviewed by Eric Carlson.

The "contentDuration" property of WebPlaybackControlsManager needs to be infinite
when the video is not seekable. Otherwise, AVKit will show a scrubber that doesn't
work on the Touch Bar.

* platform/mac/WebPlaybackControlsManager.mm:
(-[WebPlaybackControlsManager contentDuration]):
(-[WebPlaybackControlsManager setContentDuration:]):

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

35 hours ago[WebGL2] Upgrade vertexAttribPointer with new supported types
commit-queue@webkit.org [Thu, 6 Aug 2020 01:58:09 +0000 (01:58 +0000)]
[WebGL2] Upgrade vertexAttribPointer with new supported types
https://bugs.webkit.org/show_bug.cgi?id=215036

Patch by James Darpinian <jdarpinian@chromium.org> on 2020-08-05
Reviewed by Dean Jackson.

Tested by updated WebGL conformance tests webgl/2.0.0/conformance/attribs/gl-vertexattribpointer-offsets.html and webgl/2.0.0/conformance/attribs/gl-vertexattribpointer.html

* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::sizeInBytes):
(WebCore::WebGLRenderingContextBase::vertexAttribPointer):

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

36 hours agoRename BigSur EWS to AppleSilicon EWS
aakash_jain@apple.com [Thu, 6 Aug 2020 01:43:03 +0000 (01:43 +0000)]
Rename BigSur EWS to AppleSilicon EWS
https://bugs.webkit.org/show_bug.cgi?id=215205

Reviewed by Alexey Proskuryakov.

* BuildSlaveSupport/ews-build/config.json:

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

36 hours agoRemove all references to non-existent 10.16
timothy_horton@apple.com [Thu, 6 Aug 2020 00:58:34 +0000 (00:58 +0000)]
Remove all references to non-existent 10.16
https://bugs.webkit.org/show_bug.cgi?id=215202

Reviewed by Wenson Hsieh.

Source/bmalloc:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:

Source/JavaScriptCore:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:

Source/ThirdParty:

* gtest/xcode/Config/DebugProject.xcconfig:
* gtest/xcode/Config/ReleaseProject.xcconfig:

Source/ThirdParty/ANGLE:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:

Source/ThirdParty/libwebrtc:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:
* Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.h:

Source/WebCore:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:

Source/WebCore/PAL:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:

Source/WebInspectorUI:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:

Source/WebKit:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:
* Scripts/process-entitlements.sh:
* WebProcess/com.apple.WebProcess.sb.in:

Source/WebKitLegacy/mac:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:

Source/WTF:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* wtf/PlatformEnableCocoa.h:
* wtf/PlatformHave.h:
* wtf/PlatformUse.h:

Tools:

* ContentExtensionTester/Configurations/Base.xcconfig:
* ContentExtensionTester/Configurations/DebugRelease.xcconfig:
* DumpRenderTree/mac/Configurations/Base.xcconfig:
* DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
* ImageDiff/cg/Configurations/Base.xcconfig:
* ImageDiff/cg/Configurations/DebugRelease.xcconfig:
* MiniBrowser/Configurations/Base.xcconfig:
* MiniBrowser/Configurations/DebugRelease.xcconfig:
* TestWebKitAPI/Configurations/Base.xcconfig:
* TestWebKitAPI/Configurations/DebugRelease.xcconfig:
* TestWebKitAPI/Configurations/WebKitTargetConditionals.xcconfig:
* TestWebKitAPI/config.h:
* WebEditingTester/Configurations/Base.xcconfig:
* WebEditingTester/Configurations/DebugRelease.xcconfig:
* WebKitTestRunner/Configurations/Base.xcconfig:
* WebKitTestRunner/Configurations/DebugRelease.xcconfig:
* lldb/lldbWebKitTester/Configurations/Base.xcconfig:
* lldb/lldbWebKitTester/Configurations/DebugRelease.xcconfig:

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

37 hours ago[ iOS wk2 ] imported/w3c/web-platform-tests/svg/import/linking-a-10-f-manual.svg...
rackler@apple.com [Thu, 6 Aug 2020 00:33:21 +0000 (00:33 +0000)]
[ iOS wk2 ] imported/w3c/web-platform-tests/svg/import/linking-a-10-f-manual.svg is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=215204

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

37 hours agoFix returnEarlyFromInfiniteLoopsForFuzzing in DFG and validateDoesGC
sbarati@apple.com [Thu, 6 Aug 2020 00:24:47 +0000 (00:24 +0000)]
Fix returnEarlyFromInfiniteLoopsForFuzzing in DFG and validateDoesGC
https://bugs.webkit.org/show_bug.cgi?id=215194
<rdar://problem/66158641>

Reviewed by Mark Lam.

JSTests:

* stress/validate-does-gc-with-return-early-from-infinite-loop-2.js: Added.
(vm.useJIT):

Source/JavaScriptCore:

I already fixed this same issue in the FTL in r264330, but I forgot
to do it in the DFG.

* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):

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

38 hours agor264813 breaks Make runner on remote devices
ticaiolima@gmail.com [Wed, 5 Aug 2020 23:54:45 +0000 (23:54 +0000)]
r264813 breaks Make runner on remote devices
https://bugs.webkit.org/show_bug.cgi?id=215179

Reviewed by Saam Barati.

This patch is setting up the proper `LD_LIBRARY_PATH` value to run JSC
stress tests on remote devices.

* Scripts/run-jsc-stress-tests:

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

38 hours agoCrash in com.apple.WebKit.WebContent at com.apple.AppKit: _NSAccessibilityRemoveAllOb...
andresg_22@apple.com [Wed, 5 Aug 2020 23:21:23 +0000 (23:21 +0000)]
Crash in com.apple.WebKit.WebContent at com.apple.AppKit: _NSAccessibilityRemoveAllObserversAndSendDestroyedNotification
https://bugs.webkit.org/show_bug.cgi?id=215189
<rdar://problem/66561167>

Reviewed by Chris Fleizach.

AXIsolatedObject::detachPlatformWrapper was calling the wrapper's detach
method that in turn calls the system NSAccessibilityUnregisterUniqueIdForUIElement
on the secondary thread. This function is not thread safe and hence the
random crashes.
This changes AXIsolatedObject::detachPlatformWrapper to call the
wrapper's detachIsolatedObject, avoiding the above problem altogether.
The wrapper's detach remains the same that it was before isolated tree
mode was introduced, and should only run on the main thread.

* accessibility/AccessibilityObjectInterface.h:
* accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::applyPendingChanges):
* accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm:
(WebCore::AXIsolatedObject::detachPlatformWrapper):
* accessibility/mac/WebAccessibilityObjectWrapperBase.h:
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(-[WebAccessibilityObjectWrapperBase detach]):
(-[WebAccessibilityObjectWrapperBase detachIsolatedObject:]):
(-[WebAccessibilityObjectWrapperBase detachAXObject]): Merged back into detach.
(-[WebAccessibilityObjectWrapperBase detachIsolatedObject]): Deleted.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper unregisterUniqueIdForUIElement]):

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

38 hours agoAdd a createWebArchiveData from a custom scheme API test
beidson@apple.com [Wed, 5 Aug 2020 23:19:59 +0000 (23:19 +0000)]
Add a createWebArchiveData from a custom scheme API test
https://bugs.webkit.org/show_bug.cgi?id=215187

Reviewed by Tim Horton.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/CreateWebArchive.mm: Added.

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

38 hours ago[ macOS Release wk1 ] imported/w3c/web-platform-tests/css/css-overflow/overflow-recal...
ryanhaddad@apple.com [Wed, 5 Aug 2020 23:16:27 +0000 (23:16 +0000)]
[ macOS Release wk1 ] imported/w3c/web-platform-tests/css/css-overflow/overflow-recalc-001.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=214703

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations: Update expectatins to reflect that this is an image failure.

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

39 hours ago[GTK][WPE] media/media-source/media-source-webm.html is timing out
lmoura@igalia.com [Wed, 5 Aug 2020 22:22:43 +0000 (22:22 +0000)]
[GTK][WPE] media/media-source/media-source-webm.html is timing out

Unreviewed test gardening.

Instead of the previous missing 'update' event entries, now times out
waiting for resize event, which is not raised because the size does
not seem to be changing (all resize events return 320x240).

* platform/glib/TestExpectations:

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

39 hours agoAdd constructor for DynamicsCompressorNode
cdumez@apple.com [Wed, 5 Aug 2020 22:18:28 +0000 (22:18 +0000)]
Add constructor for DynamicsCompressorNode
https://bugs.webkit.org/show_bug.cgi?id=215180

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that more checks are passing.

* web-platform-tests/webaudio/idlharness.https.window-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-dynamics-compressor-connections-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-dynamicscompressornode-interface/ctor-dynamicscompressor-expected.txt:

Source/WebCore:

Add constructor for DynamicsCompressorNode:
- https://webaudio.github.io/web-audio-api/#dynamicscompressornode

This patch also add a new handleAudioNodeOptions() member function to
AudioNode to avoid code duplication and every node constructor.

No new tests, rebaselined existing tests.

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Modules/webaudio/AnalyserNode.cpp:
(WebCore::AnalyserNode::create):
* Modules/webaudio/AudioNode.cpp:
(WebCore::AudioNode::AudioNode):
(WebCore::AudioNode::initializeDefaultNodeOptions):
(WebCore::AudioNode::handleAudioNodeOptions):
* Modules/webaudio/AudioNode.h:
* Modules/webaudio/BaseAudioContext.cpp:
(WebCore::BaseAudioContext::createDynamicsCompressor):
* Modules/webaudio/BiquadFilterNode.cpp:
(WebCore::BiquadFilterNode::create):
* Modules/webaudio/ChannelMergerNode.cpp:
(WebCore::ChannelMergerNode::create):
* Modules/webaudio/ChannelSplitterNode.cpp:
(WebCore::ChannelSplitterNode::create):
* Modules/webaudio/ConvolverNode.cpp:
(WebCore::ConvolverNode::create):
(WebCore::ConvolverNode::ConvolverNode):
* Modules/webaudio/DefaultAudioDestinationNode.cpp:
(WebCore::DefaultAudioDestinationNode::DefaultAudioDestinationNode):
* Modules/webaudio/DelayNode.cpp:
(WebCore::DelayNode::create):
* Modules/webaudio/DynamicsCompressorNode.cpp:
(WebCore::DynamicsCompressorNode::create):
(WebCore::DynamicsCompressorNode::DynamicsCompressorNode):
(WebCore::DynamicsCompressorNode::setChannelCount):
(WebCore::DynamicsCompressorNode::setChannelCountMode):
* Modules/webaudio/DynamicsCompressorNode.h:
* Modules/webaudio/DynamicsCompressorNode.idl:
* Modules/webaudio/DynamicsCompressorOptions.h: Copied from Source/WebCore/Modules/webaudio/DynamicsCompressorNode.idl.
* Modules/webaudio/DynamicsCompressorOptions.idl: Copied from Source/WebCore/Modules/webaudio/DynamicsCompressorNode.idl.
* Modules/webaudio/GainNode.cpp:
(WebCore::GainNode::create):
* Modules/webaudio/OscillatorNode.cpp:
(WebCore::OscillatorNode::create):
* Modules/webaudio/PannerNode.cpp:
(WebCore::PannerNode::create):
(WebCore::PannerNode::PannerNode):
* Modules/webaudio/WaveShaperNode.cpp:
(WebCore::WaveShaperNode::create):
* Modules/webaudio/WebKitAudioPannerNode.cpp:
(WebCore::WebKitAudioPannerNode::WebKitAudioPannerNode):
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:

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

40 hours ago[ iOS wk2 ] imported/w3c/web-platform-tests/preload/single-download-preload.html...
hector_i_lopez@apple.com [Wed, 5 Aug 2020 21:30:22 +0000 (21:30 +0000)]
[ iOS wk2 ] imported/w3c/web-platform-tests/preload/single-download-preload.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=215192

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

40 hours agoresults.webkit.org: Return worker status to caller
jbedard@apple.com [Wed, 5 Aug 2020 21:12:27 +0000 (21:12 +0000)]
results.webkit.org: Return worker status to caller
https://bugs.webkit.org/show_bug.cgi?id=215086
<rdar://problem/66476525>

Rubber-stamped by Aakash Jain.

* resultsdbpy/resultsdbpy/model/model.py:
(Model.do_work): Return if process has successfully processed results.
* resultsdbpy/resultsdbpy/model/model_unittest.py:
(ModelTest.test_no_work):
* resultsdbpy/resultsdbpy/model/upload_context.py:
(UploadContext._do_job_for_key): Return if the job was successful.
(UploadContext.do_processing_work): Return true if any processed jobs were successful.
* resultsdbpy/resultsdbpy/model/upload_context_unittest.py:
(UploadContextTest.test_async_callback):

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

40 hours agoMake report-non-inclusive-language ignore files within .svn and .git
bdakin@apple.com [Wed, 5 Aug 2020 21:08:05 +0000 (21:08 +0000)]
Make report-non-inclusive-language ignore files within .svn and .git
https://bugs.webkit.org/show_bug.cgi?id=215156

Reviewed by Darin Adler.

* Scripts/report-non-inclusive-language:

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

41 hours ago[Cocoa] Sandbox extension token not cleared from memory
pvollan@apple.com [Wed, 5 Aug 2020 20:47:16 +0000 (20:47 +0000)]
[Cocoa] Sandbox extension token not cleared from memory
https://bugs.webkit.org/show_bug.cgi?id=215136

Reviewed by Geoffrey Garen.

As a security mitigation, an invalidated sandbox extension should have its token cleared from memory.

No new tests, covered by existing tests.

* Shared/Cocoa/SandboxExtensionCocoa.mm:
(WebKit::SandboxExtensionImpl::m_length):
(WebKit::SandboxExtensionImpl::~SandboxExtensionImpl):

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

41 hours agoEWS emails about build failure should include relevant error logs
aakash_jain@apple.com [Wed, 5 Aug 2020 20:41:32 +0000 (20:41 +0000)]
EWS emails about build failure should include relevant error logs
https://bugs.webkit.org/show_bug.cgi?id=215174

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/steps.py:
(AnalyzeCompileWebKitResults.start):
(AnalyzeCompileWebKitResults):
(AnalyzeCompileWebKitResults.getResults): Method to read the logs from previous build step.
(AnalyzeCompileWebKitResults.analyzeResults): Made a separate method called using deferred after reading the logs from previous steps.
(AnalyzeCompileWebKitResults.getBuildStepByName): Method to get step object from step name.
(AnalyzeCompileWebKitResults.filter_logs_containing_error): Filter the logs to include in email.
(AnalyzeCompileWebKitResults.send_email_for_preexisting_build_failure): Renamed from send_email_for_build_failure. Added
relevant error logs in email.
* BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.

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

42 hours agoEnhance feature status page origin for flexible test environments
jond@apple.com [Wed, 5 Aug 2020 19:51:59 +0000 (19:51 +0000)]
Enhance feature status page origin for flexible test environments
https://bugs.webkit.org/show_bug.cgi?id=215178

Reviewed by Devin Rousso.

* wp-content/themes/webkit/css-status.php:
* wp-content/themes/webkit/status.php:

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

42 hours ago[ iOS wk2 Release ] imported/w3c/web-platform-tests/IndexedDB/structured-clone-transa...
hector_i_lopez@apple.com [Wed, 5 Aug 2020 19:40:56 +0000 (19:40 +0000)]
[ iOS wk2 Release ] imported/w3c/web-platform-tests/IndexedDB/structured-clone-transaction-state.any.worker.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=215185

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

42 hours agoThe various AllowList options should be able to take the function name inline
keith_miller@apple.com [Wed, 5 Aug 2020 19:40:16 +0000 (19:40 +0000)]
The various AllowList options should be able to take the function name inline
https://bugs.webkit.org/show_bug.cgi?id=215184

Reviewed by Saam Barati.

Right now when I use the various AllowList JSC options I almost
always only care about a single function. Right now you need to
create a file with that single name in it. That is inconvenient, so
this patch changes the behavior to treat the string as the
function name if no file at that path exists. I'm also
speculatively assuming fopen doesn't return ENOENT when it fails
due to sandboxing... I didn't feel like testing it because this is
a debug option.

* runtime/OptionsList.h:
* tools/FunctionAllowlist.cpp:
(JSC::FunctionAllowlist::FunctionAllowlist):

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

42 hours agoAdd constructor to ConvolverNode
cdumez@apple.com [Wed, 5 Aug 2020 19:23:06 +0000 (19:23 +0000)]
Add constructor to ConvolverNode
https://bugs.webkit.org/show_bug.cgi?id=215169

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that more checks are passing.

* web-platform-tests/webaudio/idlharness.https.window-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/active-processing.https-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/ctor-convolver-expected.txt:

Source/WebCore:

Add constructor to ConvolverNode, as per specification:
- https://webaudio.github.io/web-audio-api/#ConvolverNode

No new tests, rebaselined existing tests.

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Modules/webaudio/BaseAudioContext.cpp:
(WebCore::BaseAudioContext::createConvolver):
* Modules/webaudio/ConvolverNode.cpp:
(WebCore::ConvolverNode::create):
(WebCore::ConvolverNode::ConvolverNode):
(WebCore::ConvolverNode::setBuffer):
(WebCore::ConvolverNode::setChannelCount):
(WebCore::ConvolverNode::setChannelCountMode):
* Modules/webaudio/ConvolverNode.h:
* Modules/webaudio/ConvolverNode.idl:
* Modules/webaudio/ConvolverOptions.h: Copied from Source/WebCore/Modules/webaudio/ConvolverNode.idl.
* Modules/webaudio/ConvolverOptions.idl: Copied from Source/WebCore/Modules/webaudio/ConvolverNode.idl.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:

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

42 hours agoAdd assertions / inline capacity to checkpoint side state stacks
keith_miller@apple.com [Wed, 5 Aug 2020 19:12:00 +0000 (19:12 +0000)]
Add assertions / inline capacity to checkpoint side state stacks
https://bugs.webkit.org/show_bug.cgi?id=215175

Reviewed by Saam Barati.

The inline capacity should hopefully avoid unneeded mallocs close to 100% of the time during our OSR exit ramp.

* dfg/DFGOSRExit.cpp:
(JSC::DFG::OSRExit::compileExit):
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileStub):
* runtime/VM.cpp:
(JSC::VM::pushCheckpointOSRSideState):
* runtime/VM.h:

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

43 hours ago[ macOS iOS wk2 Release ] editing/selection/navigation-clears-editor-state.html...
hector_i_lopez@apple.com [Wed, 5 Aug 2020 18:53:08 +0000 (18:53 +0000)]
[ macOS  iOS wk2 Release ] editing/selection/navigation-clears-editor-state.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=215177

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:
* platform/mac/TestExpectations:

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

43 hours ago[Cocoa] Remove obsolete sandbox extension after r264178
pvollan@apple.com [Wed, 5 Aug 2020 18:50:31 +0000 (18:50 +0000)]
[Cocoa] Remove obsolete sandbox extension after r264178
https://bugs.webkit.org/show_bug.cgi?id=215154

Reviewed by Brent Fulgham.

After r264178, the code related to issuing an extension to com.apple.lsd.mapdb is obsolete, and should be removed.

No new tests, covered by existing tests.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
* WebProcess/com.apple.WebProcess.sb.in:

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

43 hours agoRe-sync web-platform-tests (2 dirs + 2 files)
shvaikalesh@gmail.com [Wed, 5 Aug 2020 18:48:28 +0000 (18:48 +0000)]
Re-sync web-platform-tests (2 dirs + 2 files)
https://bugs.webkit.org/show_bug.cgi?id=215173

Reviewed by Carlos Alberto Lopez Perez.

LayoutTests/imported/w3c:

web-platform-tests revision: 993c1bc4c880

* web-platform-tests/css/cssom/*: Updated.
* web-platform-tests/dom/idlharness.window-expected.txt:
* web-platform-tests/dom/idlharness.window.js:
* web-platform-tests/intersection-observer/*: Updated.
* web-platform-tests/performance-timeline/po-observe.any.*: Added.

LayoutTests:

Remove a duplicate test added in r259800 that was manually exported [1] and synced.

[1]: https://github.com/web-platform-tests/wpt/pull/23101

* js/getOwnPropertyDescriptor-host-object-proxy-expected.txt: Removed.
* js/getOwnPropertyDescriptor-host-object-proxy.html: Removed.

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

44 hours agoREGRESSION (r265266) DumpRenderTree crash at WebKitAudioListener::dopplerFactor
cdumez@apple.com [Wed, 5 Aug 2020 17:51:47 +0000 (17:51 +0000)]
REGRESSION (r265266) DumpRenderTree crash at WebKitAudioListener::dopplerFactor
https://bugs.webkit.org/show_bug.cgi?id=215171
<rdar://problem/66556999>

Reviewed by Eric Carlson.

We were calling the isWebKitAudioContext() virtual function from the BaseAudioContext
constructor, which was not OK. We now initialize the listener lazily so that we can
know if we are a WebKitAudioContext or not at the time of creation.

Also use downcast<> instead of static_cast<> to cast from AudioListener to
WebKitAudioListener for extra safety. Finally, AudioListener was missing a virtual
destructor even though we were using polymorphism.

No new tests, covered by existing tests that are crashing on the bots.

* Modules/webaudio/AudioListener.h:
(WebCore::AudioListener::isWebKitAudioListener const):
* Modules/webaudio/AudioListener.idl:
* Modules/webaudio/BaseAudioContext.cpp:
(WebCore::BaseAudioContext::constructCommon):
(WebCore::WebCore::BaseAudioContext::listener):
* Modules/webaudio/BaseAudioContext.h:
(WebCore::BaseAudioContext::listener): Deleted.
* Modules/webaudio/PannerNode.cpp:
(WebCore::PannerNode::listener):
(WebCore::PannerNode::getAzimuthElevation):
(WebCore::PannerNode::distanceConeGain):
* Modules/webaudio/PannerNode.h:
* Modules/webaudio/WebKitAudioContext.h:
(WebCore::WebKitAudioContext::listener):
* Modules/webaudio/WebKitAudioListener.h:
(isType):
* Modules/webaudio/WebKitAudioListener.idl:
* Modules/webaudio/WebKitAudioPannerNode.cpp:
(WebCore::WebKitAudioPannerNode::listener):
(WebCore::WebKitAudioPannerNode::getAzimuthElevation):
(WebCore::WebKitAudioPannerNode::dopplerRate):
(WebCore::WebKitAudioPannerNode::distanceConeGain):
* Modules/webaudio/WebKitAudioPannerNode.h:

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

45 hours agoAlign BiquadFilterNode.getFrequencyResponse() with the specification
cdumez@apple.com [Wed, 5 Aug 2020 16:54:48 +0000 (16:54 +0000)]
Align BiquadFilterNode.getFrequencyResponse() with the specification
https://bugs.webkit.org/show_bug.cgi?id=215148

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that all checks are passing.

* web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-basic-expected.txt:

Source/WebCore:

Align BiquadFilterNode.getFrequencyResponse() with the specification:
- https://webaudio.github.io/web-audio-api/#dom-biquadfilternode-getfrequencyresponse

In particular, the 3 argument arrays should not be nullable and we should throw
if they have different lengths.

No new tests, rebaselined existing tests.

* Modules/webaudio/BiquadFilterNode.cpp:
(WebCore::BiquadFilterNode::getFrequencyResponse):
* Modules/webaudio/BiquadFilterNode.h:
* Modules/webaudio/BiquadFilterNode.idl:

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

45 hours agoAdd constructor to BiquadFilterNode
cdumez@apple.com [Wed, 5 Aug 2020 16:52:17 +0000 (16:52 +0000)]
Add constructor to BiquadFilterNode
https://bugs.webkit.org/show_bug.cgi?id=215144

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that more checks are passing.

* web-platform-tests/webaudio/idlharness.https.window-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-getFrequencyResponse-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/ctor-biquadfilter-expected.txt:

Source/WebCore:

Add constructor to BiquadFilterNode:
- https://webaudio.github.io/web-audio-api/#biquadfilternode

No new tests, rebaselined existing tests..

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Modules/webaudio/BaseAudioContext.cpp:
(WebCore::BaseAudioContext::createBiquadFilter):
* Modules/webaudio/BiquadDSPKernel.cpp:
(WebCore::BiquadDSPKernel::updateCoefficientsIfNecessary):
* Modules/webaudio/BiquadFilterNode.cpp:
(WebCore::BiquadFilterNode::create):
(WebCore::BiquadFilterNode::BiquadFilterNode):
* Modules/webaudio/BiquadFilterNode.h:
* Modules/webaudio/BiquadFilterNode.idl:
* Modules/webaudio/BiquadFilterOptions.h: Copied from Source/WebCore/Modules/webaudio/BiquadFilterNode.idl.
* Modules/webaudio/BiquadFilterOptions.idl: Copied from Source/WebCore/Modules/webaudio/BiquadFilterNode.idl.
* Modules/webaudio/BiquadFilterType.h: Copied from Source/WebCore/Modules/webaudio/BiquadFilterNode.idl.
* Modules/webaudio/BiquadFilterType.idl: Copied from Source/WebCore/Modules/webaudio/BiquadFilterNode.idl.
* Modules/webaudio/BiquadProcessor.cpp:
(WebCore::BiquadProcessor::BiquadProcessor):
* Modules/webaudio/BiquadProcessor.h:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:

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

45 hours agoUpdate event regions only once per frame
simon.fraser@apple.com [Wed, 5 Aug 2020 16:36:43 +0000 (16:36 +0000)]
Update event regions only once per frame
https://bugs.webkit.org/show_bug.cgi?id=215132
<rdar://problem/66533779>

Reviewed by Darin Adler.

Source/WebCore:

Event regions (for touch-action, editable areas etc) were updated as part of
compositing updates, but we only need their output once per rendering update, so
move their computation out of RenderLayerCompositor::updateBackingAndHierarchy()
and into a new RenderLayer tree walk that is called from Page::doAfterUpdateRendering().

RenderLayerBacking stores a dirty bit to track when regions need to be updated.

Reduces the amount of time spent in rendering updates when scrolling on facebook.com
on iPad, which has lots of discontiguous touch-action regions.

* dom/Document.cpp:
(WebCore::Document::updateEventRegions):
* dom/Document.h:
* page/Frame.cpp:
(WebCore::Frame::layerTreeAsText const):
* page/Page.cpp:
(WebCore::Page::doAfterUpdateRendering):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects const):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::maintainsEventRegion const):
(WebCore::RenderLayerBacking::updateEventRegion):
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateEventRegions):
(WebCore::RenderLayerCompositor::updateBackingAndHierarchy):
* rendering/RenderLayerCompositor.h:

LayoutTests:

Tests that dispatch mouseWheel events in a way that tests event regions need to wait
now for a rendering update. `await UIHelper.animationFrame()` is not enough, because
the function resumes inside a microtask at the end of the requestAnimationFrame callback,
which is before we've completed the rest of the rendering update, and thus before
the event regions have been updated.

In addition, `await UIHelper.animationFrame()` followed by eventSender calls to issue
wheel events actually trigger Page::updateRendering() re-entrancy, via the
WKBundlePageForceRepaint() in EventSendingController::mouseScrollByWithWheelAndMomentumPhases().

To fix this, add and use UIHelper.renderingUpdate(), which waits for a rAF and uses a setTimeout()
to get past the end of the current rendering update.

* fast/scrolling/mac/absolute-in-overflow-scroll-dynamic-expected.html:
* fast/scrolling/mac/absolute-in-overflow-scroll-dynamic.html:
* fast/scrolling/mac/absolute-in-overflow-scroll.html:
* fast/scrolling/mac/async-scroll-overflow-hidden-on-one-axis.html:
* fast/scrolling/mac/async-scroll-overflow-rtl-zoomed.html:
* fast/scrolling/mac/async-scroll-overflow-top-inset.html:
* fast/scrolling/mac/async-scroll-overflow.html:
* fast/scrolling/mac/clip-path-hit-test.html:
* fast/scrolling/mac/move-node-in-overflow-scroll.html:
* fast/scrolling/mac/overflow-scrolled-document.html:
* fast/scrolling/mac/overflow-zoomed-document.html:
* fast/scrolling/mac/overlapped-overflow-scroll.html:
* resources/ui-helper.js:
(window.UIHelper.async renderingUpdate):

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

45 hours ago[ macOS wk2 ] webrtc/datachannel/gather-candidates-networkprocess-crash.html is a...
youenn@apple.com [Wed, 5 Aug 2020 16:11:59 +0000 (16:11 +0000)]
[ macOS wk2 ] webrtc/datachannel/gather-candidates-networkprocess-crash.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=215088
<rdar://problem/66489006>

Reviewed by Eric Carlson.

* platform/mac-wk2/TestExpectations:
* webrtc/datachannel/gather-candidates-networkprocess-crash.html:
Sending IPC to the network process is now happening in a background thread and in case of network process crash
we might need to wait a little bit longer since the socket creation/sending is not blocked on getting a proper connection.

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

46 hours agoUnreviewed non-unified build fix.
aperez@igalia.com [Wed, 5 Aug 2020 15:50:58 +0000 (15:50 +0000)]
Unreviewed non-unified build fix.

No new tests needed.

* Modules/webaudio/AudioListener.h: Add forward declaration for BaseAudioSharedUnit.

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

46 hours agoTextManipulationController should observe newly inserted or displayed text
commit-queue@webkit.org [Wed, 5 Aug 2020 15:46:59 +0000 (15:46 +0000)]
TextManipulationController should observe newly inserted or displayed text
https://bugs.webkit.org/show_bug.cgi?id=215157

Patch by Sihui Liu <sihui_liu@appe.com> on 2020-08-05
Reviewed by Wenson Hsieh.

Source/WebCore:

TextManipulationController already tracks renderer state of Element, but the case where Text children of an
Element is newly inserted and displayed is not covered. Therefore, TextManipulationController also needs to
know when render of Text is created.

API test: TextManipulation.CompleteTextManipulationForNewlyDisplayedText

* editing/TextManipulationController.cpp:
(WebCore::TextManipulationController::didCreateRendererForTextNode):
(WebCore::TextManipulationController::scheduleObservationUpdate):
(WebCore::TextManipulationController::removeNode):
* editing/TextManipulationController.h:
* rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::createTextRenderer):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:
(TestWebKitAPI::TEST):

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

46 hours ago[ iOS ] imported/mozilla/svg/image/image-filter-01.svg is a constant failure
hector_i_lopez@apple.com [Wed, 5 Aug 2020 15:19:07 +0000 (15:19 +0000)]
[ iOS ] imported/mozilla/svg/image/image-filter-01.svg is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=215167

Unreviewed test gardening.

* TestExpectations:
* platform/ios-wk2/TestExpectations:

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

47 hours ago[iOS] Keyboard shortcuts and arrow key scrolling stop working after navigating via...
wenson_hsieh@apple.com [Wed, 5 Aug 2020 14:43:49 +0000 (14:43 +0000)]
[iOS] Keyboard shortcuts and arrow key scrolling stop working after navigating via swipe gesture
https://bugs.webkit.org/show_bug.cgi?id=215137
<rdar://problem/65082979>

Reviewed by Tim Horton.

Source/WebKit:

The process of starting a navigation swipe gesture causes the first responder (in this case, WKContentView) to
resign. Subsequently, nothing makes the content view first responder again once the navigation gesture ends,
even if the gesture is cancelled and we don't end up navigating. This results in several symptoms, two of which
are that keyboard shortcuts stop working, and pressing arrow keys does not scroll the web view after ending the
swipe gesture.

To mitigate this, add a mechanism to have the web view remember that our content view was first responder before
calling `-startInteractiveTransition:`; after ending the interactive transition (i.e. swipe gesture), we then
restore the web view's content view as first responder if it is not already first responder (and it is also
parented, which is not the case when swiping back to close a newly opened tab in Safari).

Test:   NavigationSwipeTests.RestoreFirstResponderAfterNavigationSwipe
        NavigationSwipeTests.DoNotBecomeFirstResponderAfterNavigationSwipeIfWebViewIsUnparented

* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _navigationGestureDidBegin]):
(-[WKWebView _navigationGestureDidEnd]):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/ios/NavigationSwipeTests.mm: Added.
(-[TestNavigationInteractiveTransition startInteractiveTransition:]):

Add an API test that exercises the bug by resigning first responder underneath `-startInteractiveTransition:`,
and checking that we have become first responder once again after completing the transition.

* TestWebKitAPI/ios/UIKitSPI.h:

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

2 days agoRegistrationDatabase::openSQLiteDatabase can spin
youenn@apple.com [Wed, 5 Aug 2020 11:03:08 +0000 (11:03 +0000)]
RegistrationDatabase::openSQLiteDatabase can spin
https://bugs.webkit.org/show_bug.cgi?id=215120
<rdar://problem/64850347>

Reviewed by Geoffrey Garen.

In case we fail opening the database when importing, we delete the database, the file and retry.
We do not need to retry in that case since there is nothing to import. Update the code to proceed with sending an import failure to SWServer.

In case of pushing changes to the database, it might be useful to retry but it is best to do this asynchronously.
For instance, there might be a script deleting the files/folders where is stored the database.
In that case, we check the result of pushing changes.
If they succeed, we call the completion handler and stop.
Otherwise, we will retry pushing the changes if changes were not pushed again in the meantime.
We introduce a push counter for that purpose.

* workers/service/server/RegistrationDatabase.cpp:
(WebCore::RegistrationDatabase::postTaskToWorkQueue):
(WebCore::RegistrationDatabase::openSQLiteDatabase):
(WebCore::RegistrationDatabase::importRecordsIfNecessary):
(WebCore::RegistrationDatabase::pushChanges):
(WebCore::RegistrationDatabase::schedulePushChanges):
(WebCore::RegistrationDatabase::doPushChanges):
* workers/service/server/RegistrationDatabase.h:
* workers/service/server/SWServer.cpp:
(WebCore::SWServer::registrationStoreDatabaseFailedToOpen):

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

2 days agoSWServerJobQueue::didResolveRegistrationPromise should not assume its registration...
youenn@apple.com [Wed, 5 Aug 2020 08:33:35 +0000 (08:33 +0000)]
SWServerJobQueue::didResolveRegistrationPromise should not assume its registration key relates to an existing worker
https://bugs.webkit.org/show_bug.cgi?id=215123
<rdar://problem/65096786>

Reviewed by Geoffrey Garen.

We know that in some cases, the registration is null in SWServerJobQueue::didResolveRegistrationPromise.
This might happen for instance in case a worker gets terminated, thus removing a job and the next job is clearing the registration.
Also, SWServerJobQueue::didResolveRegistrationPromise is not checking that the job identifier is the same in SWServerJobQueue::install
and SWServerJobQueue::didResolveRegistrationPromise while other code paths do.

A future refactoring might allow to call SWServerJobQueue::didResolveRegistrationPromise code synchronously from SWServerJobQueue::install.
In the meantime, let's add a null check and add release logging for that case.

* workers/service/server/SWServerJobQueue.cpp:
(WebCore::SWServerJobQueue::install):
(WebCore::SWServerJobQueue::didResolveRegistrationPromise):

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

2 days agoAllow multiple calls to PerformanceObserver.observe with different types
commit-queue@webkit.org [Wed, 5 Aug 2020 08:22:02 +0000 (08:22 +0000)]
Allow multiple calls to PerformanceObserver.observe with different types
https://bugs.webkit.org/show_bug.cgi?id=214884

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

LayoutTests/imported/w3c:

Update improved test expectations.

* web-platform-tests/performance-timeline/po-observe-type.any-expected.txt:
* web-platform-tests/performance-timeline/po-observe-type.any.worker-expected.txt:

Source/WebCore:

Allow multiple calls to PerformanceObserver.observe with different type, but
throw an exception if the observer type is changed [1].

Behavior matches Firefox and Chrome.

Test: imported/web-platform-tests/performance-timeline/po-observe-type.any.html

[1] https://w3c.github.io/performance-timeline/#observe-method

* page/PerformanceObserver.cpp:
(WebCore::PerformanceObserver::observe):
* page/PerformanceObserver.h:

LayoutTests:

Unskip po-observe-type.any.html.

* TestExpectations:

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

2 days agoUpdate AudioSampleDataSource offset computation
youenn@apple.com [Wed, 5 Aug 2020 08:11:50 +0000 (08:11 +0000)]
Update AudioSampleDataSource offset computation
https://bugs.webkit.org/show_bug.cgi?id=215127
<rdar://problem/65938265>

Reviewed by Eric Carlson.

As per logs, it sometimes happens that the offset is so big that the timestamp is below the start of the window.
In that case, our logic is not able to catch up and reduce the offset.
To handle this, we special case if the timestamp is below the start frame and do as if we were starting from scratch.
Otherwise, we continue our logic to fine tune the offset by slowly making it bigger to not hit the end of the window but still be close to it.
Updated logging to help further debugging this issue if needed.

* platform/audio/mac/AudioSampleDataSource.h:
* platform/audio/mac/AudioSampleDataSource.mm:
(WebCore::AudioSampleDataSource::pushSamplesInternal):
(WebCore::computeOffsetDelay):
(WebCore::AudioSampleDataSource::pullSamplesInternal):
(WebCore::AudioSampleDataSource::pullAvalaibleSamplesAsChunks):
* platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:
(WebCore::RealtimeIncomingAudioSourceCocoa::OnData):

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

2 days agoUnreviewed, skip private field test
ysuzuki@apple.com [Wed, 5 Aug 2020 08:03:45 +0000 (08:03 +0000)]
Unreviewed, skip private field test

Private field has a bug and this test is failing. We skip it since private field is not enabled.

* stress/put-by-val-direct-putprivate.js:

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

2 days agoAX: WebCore should provide a way to get raw role for accessibility objects
commit-queue@webkit.org [Wed, 5 Aug 2020 07:22:07 +0000 (07:22 +0000)]
AX: WebCore should provide a way to get raw role for accessibility objects
https://bugs.webkit.org/show_bug.cgi?id=215149

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

Added a conversion from WebRole to string for accessibility.
This allows us to get it in the WebKit bundle.

* accessibility/AXLogger.cpp:
(WebCore::operator<<):
* accessibility/AccessibilityObjectInterface.h:
(WebCore::accessibilityRoleToString):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityElementCount]):
(-[WebAccessibilityObjectWrapper _accessibilityWebRoleAsString]):
(-[WebAccessibilityObjectWrapper accessibilityTraits]):

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

2 days ago[webkitcorepy] Add mocks.ContextStack
jbedard@apple.com [Wed, 5 Aug 2020 05:15:29 +0000 (05:15 +0000)]
[webkitcorepy] Add mocks.ContextStack
https://bugs.webkit.org/show_bug.cgi?id=214484

Reviewed by Dewei Zhu.

Add a class which allows a context leveraging mock to stack. This is useful when
mocking requests or subprocess, where a single function (or class of functions)
is handling calls that are destined for different for different mock handlers.

* Scripts/libraries/webkitcorepy/webkitcorepy/mocks: Added.
* Scripts/libraries/webkitcorepy/webkitcorepy/mocks/__init__.py: Added.
* Scripts/libraries/webkitcorepy/webkitcorepy/mocks/context_stack.py: Added.
(ContextStack): Class which stacks mock handlers.
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/mocks: Added.
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/mocks/__init__.py: Added.
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/mocks/context_stack_unittest.py: Added.
(to_be_replaced): Function to be mocked
(ExampleStack): Example mock handler.
(ContextStack): Test suite.

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

2 days ago[JSC] Use LazyNeverDestroyed & std::call_once for complex singletons
ysuzuki@apple.com [Wed, 5 Aug 2020 04:19:05 +0000 (04:19 +0000)]
[JSC] Use LazyNeverDestroyed & std::call_once for complex singletons
https://bugs.webkit.org/show_bug.cgi?id=215153
<rdar://problem/65718983>

Reviewed by Mark Lam.

Source/JavaScriptCore:

We are getting some crashes in RemoteInspector and this speculatively fixes the crash.
My guess is that NeverDestroyed<RemoteInspector> calls constructor twice in heavily contended situation:
WebKit's static does not have thread-safety. If two threads come here at the same time, it is possible that
constructor is invoked twice. In that case, later constructor will clear members, which involves clearing
Lock m_mutex field. This makes Lock's invariant broken.
This patch uses LazyNeverDestroyed and std::call_once to ensure invoking constructor only once.

* API/glib/JSCVirtualMachine.cpp:
* dfg/DFGCommonData.cpp:
* disassembler/Disassembler.cpp:
* inspector/remote/RemoteInspector.h:
* inspector/remote/cocoa/RemoteInspectorCocoa.mm:
(Inspector::RemoteInspector::singleton):
* inspector/remote/glib/RemoteInspectorGlib.cpp:
(Inspector::RemoteInspector::singleton):
* inspector/remote/socket/RemoteInspectorServer.cpp:
(Inspector::RemoteInspectorServer::singleton):
* inspector/remote/socket/RemoteInspectorServer.h:
* inspector/remote/socket/RemoteInspectorSocket.cpp:
(Inspector::RemoteInspector::singleton):
* inspector/remote/socket/RemoteInspectorSocketEndpoint.cpp:
(Inspector::RemoteInspectorSocketEndpoint::singleton):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::opcodeIDTable):
* runtime/IntlObject.cpp:
(JSC::intlAvailableLocales):
(JSC::intlCollatorAvailableLocales):
(JSC::defaultLocale):
(JSC::numberingSystemsForLocale):

Source/WTF:

Add lock's bits in crash information to investigate if this speculative fix does not work.

* wtf/LockAlgorithmInlines.h:
(WTF::Hooks>::lockSlow):
(WTF::Hooks>::unlockSlow):

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

2 days agoDisable isolated-tree-mode-on-off.html because it is causing other test failures..
andresg_22@apple.com [Wed, 5 Aug 2020 02:32:36 +0000 (02:32 +0000)]
Disable isolated-tree-mode-on-off.html because it is causing other test failures..
https://bugs.webkit.org/show_bug.cgi?id=215151
<rdar://problem/66542837>

Reviewed by Chris Fleizach.

This test turns isolated tree mode on and causes other concurrent test
to also run in isolated tree mode, and thus random failures. Will enable
once all tests succeed in isolated tree mode, or we can turn the mode on
only for a particular test without affecting others.

* platform/mac/TestExpectations:

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

2 days ago[webkitcorepy] REGRESSION(r265254): autoinstaller is failing to execute setup.py...
Hironori.Fujii@sony.com [Wed, 5 Aug 2020 01:56:26 +0000 (01:56 +0000)]
[webkitcorepy] REGRESSION(r265254): autoinstaller is failing to execute setup.py on win32 Python
https://bugs.webkit.org/show_bug.cgi?id=215152

Reviewed by Jonathan Bedard.

There were two problems. Win32 Python needs SYSTEMROOT environment
variable to run setup.py. win-inet-pton is using `_` for the
directory name (win_inet_pton-1.1.0).

* Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
(Package.install): Add a new candidate directory by replacing '-'
with '_'. Pass through SYSTEMROOT env var.

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

2 days agoREGRESSION(r265167): media/media-source/media-source-webm.html failing
jer.noble@apple.com [Wed, 5 Aug 2020 01:41:55 +0000 (01:41 +0000)]
REGRESSION(r265167): media/media-source/media-source-webm.html failing
https://bugs.webkit.org/show_bug.cgi?id=215142
<rdar://problem/66487888>

Reviewed by Eric Carlson.

Once we started checking the "codecs=" parameter of the MIME type in MediaSource.isTypeSupported(),
the media-source-webm.html test started failing, as the codecs string didn't include some mandatory
entries. Also re-wrote the test to use a single try/catch block to catch errors without timing out.

* media/media-source/content/test-vp9-manifest.json:
* media/media-source/media-source-webm.html:

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

2 days agoCheckpointSideState shoud play nicely with StackOverflowException unwinding.
keith_miller@apple.com [Wed, 5 Aug 2020 01:32:52 +0000 (01:32 +0000)]
CheckpointSideState shoud play nicely with StackOverflowException unwinding.
https://bugs.webkit.org/show_bug.cgi?id=215114

Reviewed by Saam Barati.

JSTests:

* stress/stack-overflow-into-frame-with-pending-checkpoint.js: Added.
(foo.catch.async bar):
(foo.catch):
(foo):

Source/JavaScriptCore:

This patch fixes an issue where we the StackVisitor would
automatically unwind into the first frame before calling into the
provided functor. As a note, we do this because the first frame is
not fully initialized at the time we check for stack
overflow. When this happened we would fail to clear the side state
causing a memory leak. To fix this the unwind function now clears
every checkpoint up to and including the call frame containing our
handler. Some care needs to be taken that we don't clear
checkpoint side state for other threads, which could happen if
there are no checkpoints on the current thread and an API
miggrated us from another thread below the current thread.

This patch also makes two refacorings. The first is to make the
checkpoint side state into a stack, which is how we used it
anyway. The second is that CallFrame::dump and everything associated
with it is now marked const so we can PointerDump a CallFrame*.

* dfg/DFGOSRExit.cpp:
(JSC::DFG::OSRExit::compileExit):
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileStub):
* interpreter/CallFrame.cpp:
(JSC::CallFrame::bytecodeIndex const):
(JSC::CallFrame::codeOrigin const):
(JSC::CallFrame::dump const):
(JSC::CallFrame::bytecodeIndex): Deleted.
(JSC::CallFrame::codeOrigin): Deleted.
(JSC::CallFrame::dump): Deleted.
* interpreter/CallFrame.h:
(JSC::CallFrame::argument const):
(JSC::CallFrame::uncheckedArgument const):
(JSC::CallFrame::getArgumentUnsafe const):
(JSC::CallFrame::thisValue const):
(JSC::CallFrame::newTarget const):
(JSC::CallFrame::argument): Deleted.
(JSC::CallFrame::uncheckedArgument): Deleted.
(JSC::CallFrame::getArgumentUnsafe): Deleted.
(JSC::CallFrame::thisValue): Deleted.
(JSC::CallFrame::newTarget): Deleted.
* interpreter/CheckpointOSRExitSideState.h:
(JSC::CheckpointOSRExitSideState::CheckpointOSRExitSideState):
* interpreter/Interpreter.cpp:
(JSC::UnwindFunctor::operator() const):
(JSC::Interpreter::unwind):
(): Deleted.
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::slow_path_checkpoint_osr_exit_from_inlined_call):
(JSC::LLInt::slow_path_checkpoint_osr_exit):
* runtime/VM.cpp:
(JSC::VM::scanSideState const):
(JSC::VM::pushCheckpointOSRSideState):
(JSC::VM::popCheckpointOSRSideState):
(JSC::VM::popAllCheckpointOSRSideStateUntil):
(JSC::VM::addCheckpointOSRSideState): Deleted.
(JSC::VM::findCheckpointOSRSideState): Deleted.
* runtime/VM.h:

Source/WTF:

Add a helper so we can have soft stack bounds.

* wtf/StackBounds.h:
(WTF::StackBounds::withSoftOrigin const):

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

2 days agoMove poseAsClass() into the TestRunnerShared directory
wenson_hsieh@apple.com [Wed, 5 Aug 2020 01:27:12 +0000 (01:27 +0000)]
Move poseAsClass() into the TestRunnerShared directory
https://bugs.webkit.org/show_bug.cgi?id=215147

Reviewed by Tim Horton.

Move the duplicated implementations of `poseAsClass()` out of WebKitTestRunner and DumpRenderTree,
and into helper files in TestRunnerShared instead.

No change in behavior.

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
* DumpRenderTree/mac/DumpRenderTree.mm:
(poseAsClass): Deleted.
(setPersistentUserStyleSheetLocation): Deleted.
* TestRunnerShared/cocoa/PoseAsClass.h: Renamed from Tools/WebKitTestRunner/mac/PoseAsClass.h.
* TestRunnerShared/cocoa/PoseAsClass.mm: Renamed from Tools/WebKitTestRunner/mac/PoseAsClass.mm.
(swizzleAllMethods):
(poseAsClass):
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:

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

2 days agoUnreviewed build fix after r265263
bfulgham@apple.com [Wed, 5 Aug 2020 00:43:32 +0000 (00:43 +0000)]
Unreviewed build fix after r265263
https://bugs.webkit.org/show_bug.cgi?id=215139
<rdar://problem/66501746>

* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):

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

2 days ago"DoubleDown Casino" respin button stops working with trackpad
drousso@apple.com [Tue, 4 Aug 2020 23:48:36 +0000 (23:48 +0000)]
"DoubleDown Casino" respin button stops working with trackpad
https://bugs.webkit.org/show_bug.cgi?id=215146
<rdar://problem/64668138>

Reviewed by Tim Horton.

Source/WebCore:

* platform/RuntimeApplicationChecks.h:
* platform/cocoa/RuntimeApplicationChecksCocoa.mm:
(WebCore::IOSApplication::isDoubleDown): Added.

Source/WebKit:

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView shouldUseMouseGestureRecognizer]):

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

2 days ago[iOS] Issue a temporary extension to the MobileGestalt daemon when the MobileGestalt...
pvollan@apple.com [Tue, 4 Aug 2020 23:10:17 +0000 (23:10 +0000)]
[iOS] Issue a temporary extension to the MobileGestalt daemon when the MobileGestalt cache is invalid
https://bugs.webkit.org/show_bug.cgi?id=214965

Unreviewed, address review comments.

Add comment explaining why a set of MobileGestalt queries are performed when starting up the WebContent process on iOS.

* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

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

2 days agoAlign AudioListener with the W3C specification
cdumez@apple.com [Tue, 4 Aug 2020 23:01:49 +0000 (23:01 +0000)]
Align AudioListener with the W3C specification
https://bugs.webkit.org/show_bug.cgi?id=215134

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that more checks are passing.

* web-platform-tests/webaudio/historical-expected.txt:
* web-platform-tests/webaudio/idlharness.https.window-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/ctor-panner-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/panner-automation-basic-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/panner-automation-position-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/pannernode-basic-expected.txt:

Source/WebCore:

Align AudioListener with the W3C specification:
- https://webaudio.github.io/web-audio-api/#audiolistener

Note that the prefixed API still behaves the way it used to. I have maintained
the old version of the AudioListener API by moving it to a new
WebKitAudioListener interface.

No new tests, rebaselined existing tests.

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Modules/webaudio/AudioListener.cpp:
(WebCore::AudioListener::AudioListener):
(WebCore::AudioListener::setPosition):
(WebCore::AudioListener::position const):
(WebCore::AudioListener::setOrientation):
(WebCore::AudioListener::orientation const):
(WebCore::AudioListener::upVector const):
* Modules/webaudio/AudioListener.h:
(WebCore::AudioListener::create):
(WebCore::AudioListener::positionX):
(WebCore::AudioListener::positionY):
(WebCore::AudioListener::positionZ):
(WebCore::AudioListener::forwardX):
(WebCore::AudioListener::forwardY):
(WebCore::AudioListener::forwardZ):
(WebCore::AudioListener::upX):
(WebCore::AudioListener::upY):
(WebCore::AudioListener::upZ):
* Modules/webaudio/AudioListener.idl:
* Modules/webaudio/BaseAudioContext.cpp:
(WebCore::BaseAudioContext::constructCommon):
* Modules/webaudio/PannerNode.cpp:
(WebCore::PannerNode::dopplerRate):
* Modules/webaudio/WebKitAudioContext.h:
(WebCore::WebKitAudioContext::listener):
* Modules/webaudio/WebKitAudioContext.idl:
* Modules/webaudio/WebKitAudioListener.h: Copied from Source/WebCore/Modules/webaudio/AudioListener.h.
* Modules/webaudio/WebKitAudioListener.idl: Copied from Source/WebCore/Modules/webaudio/AudioListener.idl.
* Modules/webaudio/WebKitAudioPannerNode.cpp:
(WebCore::WebKitAudioPannerNode::listener):
* Modules/webaudio/WebKitAudioPannerNode.h:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:

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