WebKit.git
4 months ago[iOS] Add telemetry for message filtering
pvollan@apple.com [Thu, 19 Mar 2020 17:59:26 +0000 (17:59 +0000)]
[iOS] Add telemetry for message filtering
https://bugs.webkit.org/show_bug.cgi?id=208925
<rdar://problem/58885485>

Reviewed by Darin Adler.

On iOS, add telemetry for message filtering in the WebContent process' sandbox.

No new tests, no behavior change.

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

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

4 months agoAXIsolatedObject implementation of the title method.
andresg_22@apple.com [Thu, 19 Mar 2020 17:51:59 +0000 (17:51 +0000)]
AXIsolatedObject implementation of the title method.
https://bugs.webkit.org/show_bug.cgi?id=209291

Reviewed by Chris Fleizach.

- Implements AXIsolatedObgject::title.
- Modified implementation of AXIsolatedObject::titleAttributeValue to
use its appropriate key.

* accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::initializeAttributeData):
(WebCore::AXIsolatedObject::title const): Deleted.
* accessibility/isolatedtree/AXIsolatedObject.h:

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

4 months agoSource/WebCore:
cfleizach@apple.com [Thu, 19 Mar 2020 17:45:37 +0000 (17:45 +0000)]
Source/WebCore:
AX: VO and safari: can't press the play button
https://bugs.webkit.org/show_bug.cgi?id=209249

Reviewed by Darin Adler.

Test: accessibility/ios-simulator/has-touch-event-listener-with-shadow.html

If a node is in a shadowRoot, going up the node parent tree will stop and not check the entire tree for touch event listeners
and a touch event won't be dispatched. We need to change to use the parentInComposedTree instead to go up the chain.

* accessibility/ios/AccessibilityObjectIOS.mm:
(WebCore::AccessibilityObject::hasTouchEventListener const):

LayoutTests:
AX: VO and safari: caan't press the play button
https://bugs.webkit.org/show_bug.cgi?id=209249

Reviewed by Darin Adler.

* accessibility/ios-simulator/has-touch-event-listener-with-shadow-expected.txt: Added.
* accessibility/ios-simulator/has-touch-event-listener-with-shadow.html: Added.

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

4 months ago[JSC][BigEndians] Several JSC stress tests failing
tpopela@redhat.com [Thu, 19 Mar 2020 17:44:22 +0000 (17:44 +0000)]
[JSC][BigEndians] Several JSC stress tests failing
https://bugs.webkit.org/show_bug.cgi?id=194007

Reviewed by Michael Catanzaro.

Adapt the DataView tests to be able to pass on little endian as well
as the big endian hardware. Do so by introducing method that determine
the endianess and based on its value it saves the expected results in
the right format.

* stress/dataview-get-cse.js:
(getIsLittleEndian):
(adjustForEndianess):
(test3.foo):
(test3):
* stress/dataview-jit-get.js:
(getIsLittleEndian):
(test1.adjustForEndianess):
(test1):
(test2.adjustForEndianess):
(test2):
(test3.adjustForEndianess):
(test3):
(adjustForEndianessUint32):
(test4):
(test5):
(test6):
(test7):
(test8):
* stress/dataview-jit-neuter.js:
(getIsLittleEndian):
(adjustForEndianess):
(test):
(test2):
* stress/dataview-jit-set-nan.js:
(getIsLittleEndian):
(adjustForEndianessFloat32):
(test):
* stress/dataview-jit-set.js:
(getIsLittleEndian):
(readHex):
(adjustForEndianessUint16):
(test):
(test2):
(adjustForEndianessUint32):
(test3):
(test4):
(adjustForEndianessFloat32):
(test5):
(adjustForEndianessFloat64):
(test6):
(isLittleEndian): Deleted.

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

4 months agoFlaky Test: storage/indexeddb/cursor-leak.html and storage/indexeddb/cursor-leak...
sihui_liu@apple.com [Thu, 19 Mar 2020 17:23:58 +0000 (17:23 +0000)]
Flaky Test: storage/indexeddb/cursor-leak.html and storage/indexeddb/cursor-leak-private.html
https://bugs.webkit.org/show_bug.cgi?id=209256
<rdar://problem/60097171>

Reviewed by Geoffrey Garen.

gc() does not guarantee all objects to be collected due to our conservative GC. To make the test more stable, we
now test if there is at lease one object is collected, which is enough to show cursor does not hold strong
reference to script value properties.

* storage/indexeddb/cursor-leak-expected.txt:
* storage/indexeddb/cursor-leak-private-expected.txt:
* storage/indexeddb/resources/cursor-leak.js:
(onOpen.tx.oncomplete):
(onOpen.cursorRequest.onsuccess): Deleted.

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

4 months agoUpdate build.webkit.org link for EWS
aakash_jain@apple.com [Thu, 19 Mar 2020 17:14:23 +0000 (17:14 +0000)]
Update build.webkit.org link for EWS
https://bugs.webkit.org/show_bug.cgi?id=209280

Reviewed by Alexey Proskuryakov.

* BuildSlaveSupport/build.webkit.org-config/templates/root.html:

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

4 months ago[WinCairo] extract-built-product fails after r258612
stephan.szabo@sony.com [Thu, 19 Mar 2020 17:07:37 +0000 (17:07 +0000)]
[WinCairo] extract-built-product fails after r258612
https://bugs.webkit.org/show_bug.cgi?id=209285

extractBuiltProduct also references the old name for the
requirements on wincairo.

Reviewed by Ross Kirsling.

* BuildSlaveSupport/built-product-archive:

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

4 months ago[WebAccessibilityObjectWrapper remoteAccessibilityParentObject] must run on the main...
andresg_22@apple.com [Thu, 19 Mar 2020 17:02:26 +0000 (17:02 +0000)]
[WebAccessibilityObjectWrapper remoteAccessibilityParentObject] must run on the main thread.
https://bugs.webkit.org/show_bug.cgi?id=209284

Reviewed by Chris Fleizach.

- Dispatch [WebAccessibilityObjectWrapper remoteAccessibilityParentObject] to the main thread.
- [WebAccessibilityObjectWrapper windowElement:] must then call it outside the dispatched lambda.

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]):
(-[WebAccessibilityObjectWrapper windowElement:]):

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

4 months ago[ iOS wk2 and Mac wk2 ] imported/w3c/web-platform-tests/fetch/stale-while-revalidate...
lawrence.j@apple.com [Thu, 19 Mar 2020 16:49:56 +0000 (16:49 +0000)]
[ iOS wk2 and Mac wk2 ] imported/w3c/web-platform-tests/fetch/stale-while-revalidate/frame-removal.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209281

Unreviewed test gardening.

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

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

4 months ago[Web Animations] Mark promises as handled when rejected
commit-queue@webkit.org [Thu, 19 Mar 2020 16:42:24 +0000 (16:42 +0000)]
[Web Animations] Mark promises as handled when rejected
https://bugs.webkit.org/show_bug.cgi?id=209240
<rdar://problem/60592305>

Patch by Antoine Quint <graouts@apple.com> on 2020-03-19
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Add the new WPT tests added for this spec change (https://github.com/web-platform-tests/wpt/pull/22314) and revert some workarounds
made in our copy of WPT tests to previously silence flaky console output related to promise rejections (added in r258275 and r258276).

* web-platform-tests/web-animations/interfaces/Animation/finished-expected.txt:
* web-platform-tests/web-animations/interfaces/Animation/finished.html:
* web-platform-tests/web-animations/interfaces/Animation/ready-expected.txt:
* web-platform-tests/web-animations/interfaces/Animation/ready.html:
* web-platform-tests/web-animations/timing-model/animations/finishing-an-animation.html:
* web-platform-tests/web-animations/timing-model/animations/pausing-an-animation.html:

Source/WebCore:

Implementing the spec change discussed in https://github.com/w3c/csswg-drafts/issues/4556.

* animation/WebAnimation.cpp:
(WebCore::WebAnimation::cancel):
(WebCore::WebAnimation::resetPendingTasks):

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

4 months agoMany tests relying on eventSender.monitorWheelEvents() are no longer flaky
simon.fraser@apple.com [Thu, 19 Mar 2020 16:03:04 +0000 (16:03 +0000)]
Many tests relying on eventSender.monitorWheelEvents() are no longer flaky
https://bugs.webkit.org/show_bug.cgi?id=209272

Reviewed by Wenson Hsieh.

Remove tests from TestExpectations that were flakey because of bug 197819.

Fix some scroll-snap tests which were written before CSS OM View changes made document.body
not the scrolling element.

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:
* tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt:
* tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt:
* tiled-drawing/scrolling/frames/frameset-frame-scrollability-expected.txt:
* tiled-drawing/scrolling/frames/frameset-nested-frame-scrollability-expected.txt:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-iframe.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-then-horizontal.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html:

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

4 months agoAllow for some tolerance when checking canvas pixels in fast/mediastream tests
eric.carlson@apple.com [Thu, 19 Mar 2020 15:34:06 +0000 (15:34 +0000)]
Allow for some tolerance when checking canvas pixels in fast/mediastream tests
https://bugs.webkit.org/show_bug.cgi?id=209259
<rdar://problem/60609789>

Reviewed by Youenn Fablet.

* fast/mediastream/MediaStream-video-element-displays-buffer.html:
* fast/mediastream/MediaStream-video-element-video-tracks-disabled-then-enabled.html:
* fast/mediastream/media-stream-renders-first-frame.html:
* fast/mediastream/resize-trim.html:
* resources/platform-helper.js:
(checkPixelColorWithTolerance):
(isPixelBlack):
(isPixelTransparent):
(isPixelWhite):
(isPixelGray):

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

4 months ago[Flatpak SDK] Release logs not sent to journald when running within the SDK runtime
philn@webkit.org [Thu, 19 Mar 2020 15:24:52 +0000 (15:24 +0000)]
[Flatpak SDK] Release logs not sent to journald when running within the SDK runtime
https://bugs.webkit.org/show_bug.cgi?id=209223

Reviewed by Carlos Alberto Lopez Perez.

flatpak build doesn't expose a --socket option for white-listing
the systemd journal socket. So white-list everything in /run. 🤷

* flatpak/flatpakutils.py:
(WebkitFlatpak.run_in_sandbox):

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

4 months agoFix many warnings with Clang 7.0 on GTK x86-64 in Debug.
cturner@igalia.com [Thu, 19 Mar 2020 15:17:17 +0000 (15:17 +0000)]
Fix many warnings with Clang 7.0 on GTK x86-64 in Debug.
https://bugs.webkit.org/show_bug.cgi?id=209146

Reviewed by Darin Adler.

Source/JavaScriptCore:

* runtime/JSCellInlines.h:
(JSC::CallFrame::deprecatedVM const): A reference may not be NULL, so
this ASSERT() can never trip.

Source/WebCore:

Warning fixes, no new tests.

* Modules/encryptedmedia/MediaKeys.cpp:
(WebCore::MediaKeys::MediaKeys):
* Modules/webaudio/MediaStreamAudioSource.h: The m_numberOfFrames ivar
is platform-specific.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::load):
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGLData::getStaticVBO):
* platform/mediastream/RealtimeVideoSource.h:
* platform/mediastream/gstreamer/GStreamerAudioCapturer.h: There are
still virtual methods in this class, but no virtual destructor. Since
this won't be subclassed further (I doubt, anyway!) lets make it final
and plug the bug.
* platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
* platform/mediastream/gstreamer/GStreamerVideoCapturer.h: See
AudioCapturer.
* platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp:
(WebCore::GStreamerVideoDecoder::RegisterDecodeCompleteCallback): Deleted.
(WebCore::GStreamerVideoDecoder::ImplementationName const): Deleted.
* platform/mediastream/libwebrtc/GStreamerVideoEncoder.cpp:
* platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp: The
encoder was being used uninitialized, and hence codec support can not
be working as intended. Fix that bug.
(WebCore::GStreamerVideoEncoder::AddCodecIfSupported):
(WebCore::GStreamerVideoEncoder::InitEncode): Deleted.
(WebCore::GStreamerVideoEncoder::GetEncoderInfo const): Deleted.
* platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.h:
* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::setCookies):
* rendering/RenderLayerBacking.h: Condition the bear trap on Cocoa
platform where the crash is being seen. On GTK these traps generate
warning spam and we don't see the crash here.
* rendering/RenderThemeAdwaita.h:
* testing/Internals.cpp:
(WebCore::Internals::readPreferenceInteger):
(WebCore::Internals::encodedPreferenceValue):
(WebCore::Internals::getUTIFromMIMEType):
(WebCore::Internals::getUTIFromTag):

Source/WebDriver:

* Session.cpp:
(WebDriver::Session::newWindow):
(WebDriver::Session::elementIsFileUpload):
(WebDriver::Session::elementIsEditable):
(WebDriver::Session::setInputFileUploadFiles):

Source/WebKit:

* NetworkProcess/NetworkHTTPSUpgradeChecker.cpp:
(WebKit::NetworkHTTPSUpgradeChecker::query):
* NetworkProcess/NetworkLoadChecker.cpp: The m_isHTTPSUpgradeEnabled
ivar is only used on Cocoa platforms, on GTK it is causing warning
spam.
(WebKit::NetworkLoadChecker::NetworkLoadChecker):
* NetworkProcess/NetworkLoadChecker.h:
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::updateSceneState):
*
Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
m_inForceRepaint is not being used anymore.
(WebKit::ThreadedCompositor::forceRepaint):
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
* UIProcess/API/glib/WebKitNavigationClient.cpp:
* UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
(WebKit::RemoteInspectorProtocolHandler::RemoteInspectorProtocolHandler):
* UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.h:

Source/WTF:

* wtf/LoggerHelper.h: When the RELEASE_LOG is disabled, avoid warning
spam about unused channel names. Call sites often create locals for
the channel name outside of RELEASE_LOG ifdef's, which cause many
unused variable warnings.

Tools:

* TestWebKitAPI/Tests/WebCore/TransformationMatrix.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp:
* TestWebKitAPI/Tests/WebKitGLib/TestDownloads.cpp:
(testDownloadMIMEType):
(testContextMenuDownloadActions):
* TestWebKitAPI/Tests/WebKitGtk/TestPrinting.cpp:

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

4 months agoonwebkit{animation, transition}XX handlers missing from Document
commit-queue@webkit.org [Thu, 19 Mar 2020 14:11:32 +0000 (14:11 +0000)]
onwebkit{animation, transition}XX handlers missing from Document
https://bugs.webkit.org/show_bug.cgi?id=206170
<rdar://problem/58596373>

Patch by Antoine Quint <graouts@apple.com> on 2020-03-19
Reviewed by Youenn Fablet.

Source/WebCore:

We now specify the non-standard CSS Animations and CSS Transitions event handlers on DocumentAndElementEventHandlers.idl rather than Element.idl
such that they specified on both Element and Document.

* dom/DocumentAndElementEventHandlers.idl:
* dom/Element.idl:

LayoutTests:

* fast/dom/event-handler-attributes-expected.txt:
* fast/dom/event-handler-attributes.html:

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

4 months ago[GTK][WPE] Media controls numeric position value is not automatically updated during...
carlosgc@webkit.org [Thu, 19 Mar 2020 14:05:01 +0000 (14:05 +0000)]
[GTK][WPE] Media controls numeric position value is not automatically updated during playback
https://bugs.webkit.org/show_bug.cgi?id=209051

Reviewed by Philippe Normand.

The time label is not updated because updateTime() thinks the media controls are hidden when not hovered, but
for audio elements the controls are always visible.

* Modules/mediacontrols/mediaControlsAdwaita.js:
(Controller.prototype.controlsAreAlwaysVisible): Return true for audio elements.

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

4 months ago[GTK][WPE] REGRESSION(r258626): flatpak is used even when WEBKIT_JHBUILD is set
carlosgc@webkit.org [Thu, 19 Mar 2020 14:03:50 +0000 (14:03 +0000)]
[GTK][WPE] REGRESSION(r258626): flatpak is used even when WEBKIT_JHBUILD is set
https://bugs.webkit.org/show_bug.cgi?id=209278

Reviewed by Philippe Normand.

This happens when using an external jhbuild, because shouldUseFlatpak() assumes that no command prefix always
means flatpak.

* Scripts/webkitdirs.pm:
(shouldUseFlatpak): Return early if WEBKIT_JHBUILD is set.

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

4 months ago[CMake] cache not cleared when build-webkit options change
commit-queue@webkit.org [Thu, 19 Mar 2020 13:27:18 +0000 (13:27 +0000)]
[CMake] cache not cleared when build-webkit options change
https://bugs.webkit.org/show_bug.cgi?id=209277

Patch by Philippe Normand <pnormand@igalia.com> on 2020-03-19
Reviewed by Adrian Perez de Castro.

* Scripts/webkitdirs.pm:
(shouldRemoveCMakeCache): The expected function signature never
included the cache file path. Remove it.

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

4 months ago[GTK] media/track/track-automatic-subtitles.html is timing out
eocanha@igalia.com [Thu, 19 Mar 2020 12:06:49 +0000 (12:06 +0000)]
[GTK] media/track/track-automatic-subtitles.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=116957

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Moved CaptionUserPreferencesMediaAF::textTrackSelectionScore() implementation
to the CaptionUserPreferencesMedia superclass.

Tested by existing test.

* page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::textTrackSelectionScore const):
* page/CaptionUserPreferencesMediaAF.cpp:
* page/CaptionUserPreferencesMediaAF.h:

LayoutTests:

Removed test from expectations.

* platform/gtk/TestExpectations:

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

4 months ago[GTK][WPE] Gardening, update TestExpectations
dpino@igalia.com [Thu, 19 Mar 2020 11:39:18 +0000 (11:39 +0000)]
[GTK][WPE] Gardening, update TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=209276

Unreviewed gardening.

Gardening of several WPT's css-writing-modes tests that were added for
the first time in r258661.

* platform/gtk/TestExpectations:
* platform/wpe/TestExpectations:

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

4 months ago[GTK][WPE] Unreviewed, build fixes after r258547 when disabling release logging support
philn@webkit.org [Thu, 19 Mar 2020 10:26:23 +0000 (10:26 +0000)]
[GTK][WPE] Unreviewed, build fixes after r258547 when disabling release logging support

Source/WebCore:

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:

Source/WTF:

* wtf/Logger.h:
(WTF::Logger::logAlwaysVerbose const):

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

4 months agoCherry pick usrsctp commit 790a7a2555aefb392a5a69923f1e9d17b4968467
commit-queue@webkit.org [Thu, 19 Mar 2020 10:15:02 +0000 (10:15 +0000)]
Cherry pick usrsctp commit 790a7a2555aefb392a5a69923f1e9d17b4968467
https://bugs.webkit.org/show_bug.cgi?id=209204
<rdar://problem/59362671>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-03-19
Reviewed by Youenn Fablet.

* Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_auth.c:
* Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_pcb.c:

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

4 months agoREGRESSION(r258626): webkit-dirs warning
philn@webkit.org [Thu, 19 Mar 2020 09:50:17 +0000 (09:50 +0000)]
REGRESSION(r258626): webkit-dirs warning
https://bugs.webkit.org/show_bug.cgi?id=209221

Reviewed by Adrian Perez de Castro.

* Scripts/webkitdirs.pm:
(buildCMakeProjectOrExit): Fix Perl Warning. 😎

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

4 months agoUnreviewed test gardening.
graouts@webkit.org [Thu, 19 Mar 2020 09:12:01 +0000 (09:12 +0000)]
Unreviewed test gardening.

These two platform-specific expectations are no longer necessary since we silenced the console output for these tests (see bugs 192974 and 194309).

* platform/ios/media/modern-media-controls/compact-media-controls/compact-media-controls-constructor-expected.txt: Removed.
* platform/ios/media/modern-media-controls/compact-media-controls/compact-media-controls-layout-expected.txt: Removed.

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

4 months agoAdd Chris Lord (clord@igalia.com) to the list of contributors
clord@igalia.com [Thu, 19 Mar 2020 09:02:28 +0000 (09:02 +0000)]
Add Chris Lord (clord@igalia.com) to the list of contributors
https://bugs.webkit.org/show_bug.cgi?id=209274

Unreviewed

* Scripts/webkitpy/common/config/contributors.json:

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

4 months agoDelete accidentally committed file.
fred.wang@free.fr [Thu, 19 Mar 2020 08:57:35 +0000 (08:57 +0000)]
Delete accidentally committed file.
https://bugs.webkit.org/show_bug.cgi?id=209178

Unreviewed.

Patch by Frederic Wang <fwang@igalia.com> on 2020-03-19

* TestExpectations.orig: Removed.

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

4 months agoMake URL::path() return a StringView
youenn@apple.com [Thu, 19 Mar 2020 08:29:23 +0000 (08:29 +0000)]
Make URL::path() return a StringView
https://bugs.webkit.org/show_bug.cgi?id=209173

Reviewed by Alex Christensen.

Source/WebCore:

Update code according new path return type.

* Modules/plugins/YouTubePluginReplacement.cpp:
(WebCore::processAndCreateYouTubeURL):
(WebCore::YouTubePluginReplacement::youTubeURLFromAbsoluteURL):
* html/Autofill.cpp:
(WebCore::AutofillData::createFromHTMLFormControlElement):
* html/URLUtils.h:
(WebCore::URLUtils<T>::pathname const):
* loader/FormSubmission.cpp:
(WebCore::appendMailtoPostFormDataToURL):
* loader/appcache/ManifestParser.cpp:
(WebCore::manifestPath):
* page/Location.cpp:
(WebCore::Location::pathname const):
* page/UserContentURLPattern.cpp:
(WebCore::MatchTester::MatchTester):
(WebCore::UserContentURLPattern::matchesPath const):
* page/csp/ContentSecurityPolicySource.cpp:
(WebCore::ContentSecurityPolicySource::pathMatches const):
* platform/network/curl/CookieJarDB.cpp:
(WebCore::CookieJarDB::searchCookies):
(WebCore::CookieJarDB::deleteCookie):
* platform/network/curl/CookieUtil.cpp:
(WebCore::CookieUtil::defaultPathForURL):
* platform/network/curl/CurlRequest.cpp:
(WebCore::CurlRequest::invokeDidReceiveResponseForFile):
* platform/text/TextEncoding.cpp:
(WebCore::decodeURLEscapeSequences):
* platform/text/TextEncoding.h:
* workers/WorkerLocation.cpp:
(WebCore::WorkerLocation::pathname const):
* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::addRegistration):
* workers/service/ServiceWorkerJob.cpp:
(WebCore::ServiceWorkerJob::validateServiceWorkerResponse):
* workers/service/server/RegistrationDatabase.cpp:
(WebCore::RegistrationDatabase::doPushChanges):

Source/WebKit:

Update code according new path return type.

* NetworkProcess/soup/NetworkDataTaskSoup.cpp:
(WebKit::NetworkDataTaskSoup::didSendRequest):
* Shared/API/APIURL.h:
(API::URL::path const):
* UIProcess/API/glib/WebKitURISchemeRequest.cpp:
(webkitURISchemeRequestReadCallback):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::objectContentType):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):

Source/WebKitLegacy/mac:

* Misc/WebNSURLExtras.mm:
(-[NSString _webkit_stringByReplacingValidPercentEscapes]):

Source/WTF:

* wtf/URL.cpp:
(WTF::URL::path const):
* wtf/URL.h:
* wtf/text/StringView.h:
(WTF::startsWithLettersIgnoringASCIICase):
Add an overload for StringView.

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

4 months agoCorrectly set up context for Data Detectors
megan_gardner@apple.com [Thu, 19 Mar 2020 08:14:12 +0000 (08:14 +0000)]
Correctly set up context for Data Detectors
https://bugs.webkit.org/show_bug.cgi?id=209258
Source/WebCore/PAL:

Reviewed by Tim Horton.

* pal/spi/ios/DataDetectorsUISPI.h:

Source/WebKit:

<rdar://problem/60612327>

Reviewed by Tim Horton.

Stop passing in a nil context. This is OK now, but won't be in the near future.
Also, call -updateContext:withSourceRect: so that DataDetectors can populate the context appropriately.

* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant contextMenuInteraction:configurationForMenuAtLocation:]):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView dataDetectionContextForPositionInformation:]):

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

4 months agoRemove commit queue bubble from bot watchers dashboard
ryanhaddad@apple.com [Thu, 19 Mar 2020 07:04:17 +0000 (07:04 +0000)]
Remove commit queue bubble from bot watchers dashboard
https://bugs.webkit.org/show_bug.cgi?id=209271

Reviewed by Alexey Proskuryakov.

Remove commit queue bubble from bot watchers dashboard now that it has moved to the new EWS.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:
(BubbleQueueServer):

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

4 months agoThe value of [AVPlayerViewController isPictureInPicturePossible] is NO in the first...
peng.liu6@apple.com [Thu, 19 Mar 2020 05:23:14 +0000 (05:23 +0000)]
The value of [AVPlayerViewController isPictureInPicturePossible] is NO in the first attempt to enter PiP
https://bugs.webkit.org/show_bug.cgi?id=204979

Reviewed by Jer Noble.

A follow-up patch to fix build failures.
Source/WebCore:

This patch also removes a meaningless line in the dealloc of WebAVPlayerViewController.

* platform/ios/VideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerViewController initWithFullscreenInterface:]):
(-[WebAVPlayerViewController dealloc]):
(VideoFullscreenInterfaceAVKit::doEnterFullscreen):

Source/WebCore/PAL:

* pal/spi/cocoa/AVKitSPI.h:

Source/WTF:

* wtf/PlatformHave.h:

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

4 months agoUse helper function retainPtr(T*) instead of creating one.
andresg_22@apple.com [Thu, 19 Mar 2020 05:18:29 +0000 (05:18 +0000)]
Use helper function retainPtr(T*) instead of creating one.
https://bugs.webkit.org/show_bug.cgi?id=209269

Reviewed by Chris Fleizach.

This is acorrection to patch in bug: https://bugs.webkit.org/show_bug.cgi?id=209247.
Use the existing retainPtr helper funtion instead of creating a new helper.

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper attachmentView]):
(-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
(-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
(-[WebAccessibilityObjectWrapper associatedPluginParent]):
(-[WebAccessibilityObjectWrapper windowElement:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
(-[WebAccessibilityObjectWrapper textMarkerRangeAtTextMarker:forUnit:]):
(-[WebAccessibilityObjectWrapper lineTextMarkerRangeForTextMarker:forUnit:]):
(-[WebAccessibilityObjectWrapper textMarkerForTextMarker:atUnit:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
(retainWrapper): Deleted.

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

4 months ago[Multicolumn] RenderListItem::positionListMarker should not fail when the list marker...
zalan@apple.com [Thu, 19 Mar 2020 05:02:30 +0000 (05:02 +0000)]
[Multicolumn] RenderListItem::positionListMarker should not fail when the list marker is inside a spanner.
https://bugs.webkit.org/show_bug.cgi?id=209262
<rdar://problem/58447665>

Reviewed by Simon Fraser.

Source/WebCore:

When the list marker is in a column spanner and as a result it gets moved under the column flow, the
normal "let's find the list item by walking up on the ancestor chain" does not work anymore.
We need to check if this list marker is inside a spanner and climb up on the ancestor chain by
using the spanner placeholder position (see RenderListMarker::parentBox).
This patch also moves the marker's overflow computation from the list item to the marker.

Test: fast/multicol/list-item-marker-inside-column-spanner.html

* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::addOverflowFromChildren):
(WebCore::RenderListItem::positionListMarker): Deleted.
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::parentBox):
(WebCore::RenderListMarker::addOverflowFromListMarker):
(WebCore::RenderListMarker::layout):
* rendering/RenderListMarker.h:

LayoutTests:

* fast/multicol/list-item-marker-inside-column-spanner-expected.txt: Added.
* fast/multicol/list-item-marker-inside-column-spanner.html: Added.

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

4 months agoeventSender.monitorWheelEvents() is very fragile
simon.fraser@apple.com [Thu, 19 Mar 2020 04:06:37 +0000 (04:06 +0000)]
eventSender.monitorWheelEvents() is very fragile
https://bugs.webkit.org/show_bug.cgi?id=197819
<rdar://problem/51319456>

Reviewed by Tim Horton.

Source/WebCore:

Deflake tests using eventSender.monitorWheelEvents() by fixing several causes of flakiness,
adding back changes from r257844 that were reverted in r258558.

First, have EventSendingController keep track of whether it's seen then "end" event
for the scrolling and momentum phases, and pass this down to WheelEventTestMonitor, which
now waits until it sees these, which prevents premature triggering which was a common cause of
failure before.

Second, remove WheelEventTestMonitor's 1/60s timer and instead have WheelEventTestMonitor test
for completion in a callout from the end of Page::updateRendering(), which makes it test
and fire at a more consistent time.

Third, push WheelEventTestMonitor to the ScrollingTree, so that reasons for deferral
can be added on the scrolling thread. This fixes an issue where the RunLoop::main().dispatch()
used to send the "ScrollingThreadSyncNeeded" reason to the main thread would get delayed,
also resulting in a premature trigger.

* Modules/applepay/ApplePaySession.cpp: Unified sources!
* dom/WindowEventLoop.cpp: Unified sources!
* page/EventHandler.cpp:
(WebCore::EventHandler::handleWheelEvent):
* page/FrameView.cpp:
(WebCore::FrameView::scrollOffsetChangedViaPlatformWidgetImpl):
* page/Page.cpp:
(WebCore::Page::doAfterUpdateRendering):
(WebCore::Page::wheelEventTestMonitor const):
(WebCore::Page::clearWheelEventTestMonitor):
(WebCore::Page::isMonitoringWheelEvents const):
(WebCore::Page::ensureWheelEventTestMonitor):
* page/Page.h:
(WebCore::Page::wheelEventTestMonitor const): Deleted.
(WebCore::Page::clearWheelEventTestMonitor): Deleted.
(WebCore::Page::isMonitoringWheelEvents const): Deleted.
* page/WheelEventTestMonitor.cpp:
(WebCore::WheelEventTestMonitor::WheelEventTestMonitor):
(WebCore::WheelEventTestMonitor::clearAllTestDeferrals):
(WebCore::WheelEventTestMonitor::setTestCallbackAndStartMonitoring):
(WebCore::WheelEventTestMonitor::deferForReason):
(WebCore::WheelEventTestMonitor::removeDeferralForReason):
(WebCore::WheelEventTestMonitor::receivedWheelEvent):
(WebCore::WheelEventTestMonitor::scheduleCallbackCheck):
(WebCore::WheelEventTestMonitor::checkShouldFireCallbacks):
(WebCore::operator<<):
(WebCore::WheelEventTestMonitor::setTestCallbackAndStartNotificationTimer): Deleted.
(WebCore::WheelEventTestMonitor::triggerTestTimerFired): Deleted.
* page/WheelEventTestMonitor.h:
(WebCore::WheelEventTestMonitorCompletionDeferrer::WheelEventTestMonitorCompletionDeferrer):
(WebCore::WheelEventTestMonitorCompletionDeferrer::~WheelEventTestMonitorCompletionDeferrer):
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
(WebCore::AsyncScrollingCoordinator::deferWheelEventTestCompletionForReason const): Deleted.
(WebCore::AsyncScrollingCoordinator::removeWheelEventTestCompletionDeferralForReason const): Deleted.
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::startMonitoringWheelEvents):
(WebCore::ScrollingCoordinator::stopMonitoringWheelEvents):
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::handleWheelEvent):
* page/scrolling/ScrollingTree.h:
(WebCore::ScrollingTree::setWheelEventTestMonitor):
(WebCore::ScrollingTree::receivedWheelEvent):
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):
(WebCore::ThreadedScrollingTree::deferWheelEventTestCompletionForReason): Deleted.
(WebCore::ThreadedScrollingTree::removeWheelEventTestCompletionDeferralForReason): Deleted.
* page/scrolling/ThreadedScrollingTree.h:
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::startMonitoringWheelEvents):
(WebCore::ScrollingCoordinatorMac::stopMonitoringWheelEvents):
* page/scrolling/mac/ScrollingTreeMac.h:
* page/scrolling/mac/ScrollingTreeMac.mm:
(ScrollingTreeMac::setWheelEventTestMonitor):
(ScrollingTreeMac::receivedWheelEvent):
(ScrollingTreeMac::deferWheelEventTestCompletionForReason):
(ScrollingTreeMac::removeWheelEventTestCompletionDeferralForReason):
* page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
(WebCore::ScrollingTreeScrollingNodeDelegateMac::deferWheelEventTestCompletionForReason const):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::removeWheelEventTestCompletionDeferralForReason const):
* testing/js/WebCoreTestSupport.cpp:
(WebCoreTestSupport::setWheelEventMonitorTestCallbackAndStartMonitoring):
(WebCoreTestSupport::setTestCallbackAndStartNotificationTimer): Deleted.
* testing/js/WebCoreTestSupport.h:

Source/WebKit:

Deflake tests using eventSender.monitorWheelEvents() by fixing several causes of flakiness,
adding back changes from r257844 that were reverted in r258558.

First, have EventSendingController keep track of whether it's seen then "end" event
for the scrolling and momentum phases, and pass this down to WheelEventTestMonitor, which
now waits until it sees these, which prevents premature triggering which was a common cause of
failure before.

Second, remove WheelEventTestMonitor's 1/60s timer and instead have WheelEventTestMonitor test
for completion in a callout from the end of Page::updateRendering(), which makes it test
and fire at a more consistent time.

Third, push WheelEventTestMonitor to the ScrollingTree, so that reasons for deferral
can be added on the scrolling thread. This fixes an issue where the RunLoop::main().dispatch()
used to send the "ScrollingThreadSyncNeeded" reason to the main thread would get delayed,
also resulting in a premature trigger.

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageRegisterScrollOperationCompletionCallback):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:

Tools:

Deflake tests using eventSender.monitorWheelEvents() by fixing several causes of flakiness,
adding back changes from r257844 that were reverted in r258558.

First, have EventSendingController keep track of whether it's seen then "end" event
for the scrolling and momentum phases, and pass this down to WheelEventTestMonitor, which
now waits until it sees these, which prevents premature triggering which was a common cause of
failure before.

Second, remove WheelEventTestMonitor's 1/60s timer and instead have WheelEventTestMonitor test
for completion in a callout from the end of Page::updateRendering(), which makes it test
and fire at a more consistent time.

Third, push WheelEventTestMonitor to the ScrollingTree, so that reasons for deferral
can be added on the scrolling thread. This fixes an issue where the RunLoop::main().dispatch()
used to send the "ScrollingThreadSyncNeeded" reason to the main thread would get delayed,
also resulting in a premature trigger.

* DumpRenderTree/mac/EventSendingController.h:
* DumpRenderTree/mac/EventSendingController.mm:
(-[EventSendingController mouseScrollByX:andY:withWheel:andMomentumPhases:]):
(-[EventSendingController monitorWheelEvents]):
(-[EventSendingController callAfterScrollingCompletes:]):
* DumpRenderTree/win/EventSender.cpp:
(mouseScrollBy):
* WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
(WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases):
(WTR::EventSendingController::monitorWheelEvents):
(WTR::EventSendingController::callAfterScrollingCompletes):
* WebKitTestRunner/InjectedBundle/EventSendingController.h:

LayoutTests:

* platform/mac-wk2/TestExpectations:
* platform/win/TestExpectations:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html: Need to call eventSender.monitorWheelEvents()
for each subtest.

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

4 months agoAdd HTTP3 as an experimental feature
commit-queue@webkit.org [Thu, 19 Mar 2020 03:23:18 +0000 (03:23 +0000)]
Add HTTP3 as an experimental feature
https://bugs.webkit.org/show_bug.cgi?id=209267
<rdar://problem/60245262> and <rdar://problem/60245168>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-03-18
Reviewed by Brent Fulgham.

Source/WebCore/PAL:

* pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

Manually verified this sets the CFNetwork SPI as expected.

* NetworkProcess/NetworkSessionCreationParameters.cpp:
(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):
* NetworkProcess/NetworkSessionCreationParameters.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
* Shared/WebPreferences.yaml:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):
* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::parameters):
(WebKit::WebsiteDataStore::http3Enabled):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::http3Enabled):
* UIProcess/WebsiteData/WebsiteDataStore.h:

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

4 months agoSharedMemory::Handle::decode shouldn't check rounded size
sbarati@apple.com [Thu, 19 Mar 2020 03:07:05 +0000 (03:07 +0000)]
SharedMemory::Handle::decode shouldn't check rounded size
https://bugs.webkit.org/show_bug.cgi?id=209263

Reviewed by Sam Weinig.

* Platform/cocoa/SharedMemoryCocoa.cpp:
(WebKit::SharedMemory::Handle::decode):
(WebKit::SharedMemory::map):

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

4 months agoAuthenticatorResponseData::decode should check bufferIsLargeEnoughToContain before...
Hironori.Fujii@sony.com [Thu, 19 Mar 2020 03:05:17 +0000 (03:05 +0000)]
AuthenticatorResponseData::decode should check bufferIsLargeEnoughToContain before allocating buffers
https://bugs.webkit.org/show_bug.cgi?id=209133

Reviewed by Darin Adler.

Check bufferIsLargeEnoughToContain with the decoded size before
allocating buffers.

Replaced ArrayBuffer::create with ArrayBuffer::tryCreate, and
added a null check.

* Modules/webauthn/AuthenticatorResponseData.h:
(WebCore::encodeArrayBuffer): Added.
(WebCore::decodeArrayBuffer): Added.
(WebCore::AuthenticatorResponseData::encode const):
(WebCore::AuthenticatorResponseData::decode):

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

4 months agoWebCoreArgumentCoders should check bufferIsLargeEnoughToContain before allocating...
Hironori.Fujii@sony.com [Thu, 19 Mar 2020 02:58:33 +0000 (02:58 +0000)]
WebCoreArgumentCoders should check bufferIsLargeEnoughToContain before allocating buffers
https://bugs.webkit.org/show_bug.cgi?id=209219

Reviewed by Darin Adler.

* Shared/WebCoreArgumentCoders.cpp:
(IPC::decodeSharedBuffer): Added checking of bufferIsLargeEnoughToContain.
(IPC::decodeTypesAndData): Don't allocate a buffer with the
decoded size. bufferIsLargeEnoughToContain can't be used in this
case because SharedBuffer is encoded as variable length data.
Instead, append items one-by-one.

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

4 months agosvg/custom/animate-initial-pause-unpause.html is flaky
commit-queue@webkit.org [Thu, 19 Mar 2020 02:27:56 +0000 (02:27 +0000)]
svg/custom/animate-initial-pause-unpause.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=127116
<rdar://problem/59430898>

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-03-18
Reviewed by Ryosuke Niwa.

Use the 'onend' event to perform post-animation actions instead of relying
on setTimeout() which can be flaky if the bots are really slow.

* platform/gtk/TestExpectations:
* platform/ios-wk2/TestExpectations:
* platform/mac/TestExpectations:
* svg/custom/animate-initial-pause-unpause.html:

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

4 months agoSeveral TextMarker attributes need to run on the main thread.
andresg_22@apple.com [Thu, 19 Mar 2020 02:09:44 +0000 (02:09 +0000)]
Several TextMarker attributes need to run on the main thread.
https://bugs.webkit.org/show_bug.cgi?id=209247

Reviewed by Chris Fleizach.

- Dispatch several TextMarker parameterized attributes to the main
thread.
- Added helper methods to return TextMarkers and TextMarkerRanges for
diffferent units of text such as word or sentence.
- Added a helper function, retainWrapper to make code a bit more
readable in lambda definitions.

* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::textMarkerForVisiblePosition):
(WebCore::textMarkerRangeFromVisiblePositions):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(retainWrapper):
(-[WebAccessibilityObjectWrapper attachmentView]):
(-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
(-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
(-[WebAccessibilityObjectWrapper associatedPluginParent]):
(-[WebAccessibilityObjectWrapper windowElement:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
(-[WebAccessibilityObjectWrapper textMarkerRangeAtTextMarker:forUnit:]):
(-[WebAccessibilityObjectWrapper lineTextMarkerRangeForTextMarker:forUnit:]):
(-[WebAccessibilityObjectWrapper textMarkerForTextMarker:atUnit:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):

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

4 months agoWebResourceLoadStatisticsStore::requestStorageAccessUnderOpener() should call its...
wilander@apple.com [Thu, 19 Mar 2020 01:26:16 +0000 (01:26 +0000)]
WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener() should call its ephemeral counterpart when appropriate
https://bugs.webkit.org/show_bug.cgi?id=209245
<rdar://problem/60511121>

Reviewed by Chris Dumez.

Source/WebKit:

This change makes sure that WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener()
calls WebResourceLoadStatisticsStore::requestStorageAccessUnderOpenerEphemeral() for ephemeral
sessions.

Tests: http/tests/storageAccess/deny-storage-access-under-opener-ephemeral.html
       http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-ephemeral.html
       http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture-ephemeral.html

* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener):

Tools:

These changes to the TestRunner makes sure that
- statisticsClearInMemoryAndPersistentStore()
- statisticsClearInMemoryAndPersistentStoreModifiedSinceHours()
... use their own StatisticsDidClearInMemoryAndPersistentStoreCallbackID
and adds the infrastructure for that.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::statisticsClearInMemoryAndPersistentStore):
(WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
(WTR::TestRunner::statisticsCallClearInMemoryAndPersistentStoreCallback):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::statisticsClearInMemoryAndPersistentStore):
(WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didClearStatisticsInMemoryAndPersistentStore):
* WebKitTestRunner/TestInvocation.h:

LayoutTests:

There are new tests added for the code change. The rest of these change are to better
align test cases with asynchronous TestRunner functions that landed in
https://trac.webkit.org/changeset/258566 and https://trac.webkit.org/changeset/258598.

While working on the new tests, I found a crasher which Chris Dumez fixed in
https://trac.webkit.org/changeset/258562, so there's a dependency on that change.

* http/tests/resourceLoadStatistics/cookies-with-and-without-user-interaction-database.html:
* http/tests/resourceLoadStatistics/cookies-with-and-without-user-interaction.html:
* http/tests/resourceLoadStatistics/count-third-party-script-import-in-worker-database.html:
* http/tests/resourceLoadStatistics/count-third-party-script-import-in-worker.html:
* http/tests/resourceLoadStatistics/count-third-party-script-loads-database.html:
* http/tests/resourceLoadStatistics/count-third-party-script-loads.html:
* http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction-database.php:
* http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction.php:
* http/tests/resourceLoadStatistics/dont-count-third-party-image-as-third-party-script-database.html:
* http/tests/resourceLoadStatistics/dont-count-third-party-image-as-third-party-script.html:
* http/tests/resourceLoadStatistics/grandfathering-database.html:
* http/tests/resourceLoadStatistics/grandfathering.html:
* http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction-database.php:
* http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction.php:
* http/tests/storageAccess/deny-storage-access-under-opener-ephemeral-expected.txt: Added.
* http/tests/storageAccess/deny-storage-access-under-opener-ephemeral.html: Added.
* http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-ephemeral-expected.txt: Added.
* http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-ephemeral.html: Added.
* http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture-ephemeral-expected.txt: Added.
* http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture-ephemeral.html: Added.

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

4 months agoAvoid calling 'notifyThisWebProcessPoolWasCreated' inside the constructor
bfulgham@apple.com [Thu, 19 Mar 2020 00:41:36 +0000 (00:41 +0000)]
Avoid calling 'notifyThisWebProcessPoolWasCreated' inside the constructor
https://bugs.webkit.org/show_bug.cgi?id=209254
<rdar://problem/60564526>

Reviewed by Alex Christensen and Chris Dumez.

Enqueue calls to 'notifyThisWebProcessPoolWasCreated' so they are not invoked until
after the process pool is finished with its constructor.

Behavior covered by existing tests.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool):

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

4 months agoUnreviewed WinCairo build fix following r258665.
ross.kirsling@sony.com [Thu, 19 Mar 2020 00:04:50 +0000 (00:04 +0000)]
Unreviewed WinCairo build fix following r258665.

* NetworkProcess/curl/NetworkProcessCurl.cpp:
(WebKit::NetworkProcess::clearCacheForAllOrigins): Deleted.

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

4 months agosvg/as-object/object-box-sizing-no-width-height.html is a flaky failure
ryanhaddad@apple.com [Wed, 18 Mar 2020 23:45:00 +0000 (23:45 +0000)]
svg/as-object/object-box-sizing-no-width-height.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=209257

Unreviewed test gardening.

* platform/ios/TestExpectations: Mark test as flaky.
* platform/mac/TestExpectations: Ditto.

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

4 months agoUnreviewed test gardening.
ryanhaddad@apple.com [Wed, 18 Mar 2020 23:22:22 +0000 (23:22 +0000)]
Unreviewed test gardening.

* platform/ios/TestExpectations: Skip the http/wpt/notifications directory on iOS.

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

4 months agoPass isNavigatingToAppBoundDomain for speculative loads, preconnect tasks and downloads
katherine_cheney@apple.com [Wed, 18 Mar 2020 23:09:54 +0000 (23:09 +0000)]
Pass isNavigatingToAppBoundDomain for speculative loads, preconnect tasks and downloads
https://bugs.webkit.org/show_bug.cgi?id=209246
<rdar://problem/60552712>

Reviewed by Alex Christensen.

Pass isNavigatingToAppBoundDomain in 4 new places:

1) Speculative Loads
2) Preconnect Tasks
3) Downloads
4) CORS preflight checker

These loads should happen in an app-bound session if isNavigatingToAppBoundDomain
is true.

* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::startDownload):
* NetworkProcess/Downloads/DownloadManager.h:
(WebKit::DownloadManager::startDownload):
* NetworkProcess/Downloads/PendingDownload.cpp:
(WebKit::PendingDownload::PendingDownload):
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::startDownload):
(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
* NetworkProcess/NetworkConnectionToWebProcess.h:
(WebKit::NetworkConnectionToWebProcess::startDownload):
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::preconnectTo):
(WebKit::NetworkProcess::downloadRequest):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::start):
(WebKit::NetworkResourceLoader::retrieveCacheEntry):
(WebKit::NetworkResourceLoader::convertToDownload):
* NetworkProcess/PreconnectTask.cpp:
* NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp:
(WebKit::ServiceWorkerSoftUpdateLoader::ServiceWorkerSoftUpdateLoader):
The service worker script should be considered an app-bound load.

* NetworkProcess/cache/AsyncRevalidation.cpp:
(WebKit::NetworkCache::AsyncRevalidation::AsyncRevalidation):
* NetworkProcess/cache/AsyncRevalidation.h:
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::startAsyncRevalidationIfNeeded):
(WebKit::NetworkCache::Cache::retrieve):
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
(WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
(WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):
(WebKit::NetworkCache::SpeculativeLoadManager::preconnectForSubresource):
(WebKit::NetworkCache::SpeculativeLoadManager::revalidateSubresource):
(WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
(WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation):
* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::sessionWrapperForTask):
* Shared/NavigatingToAppBoundDomain.h:
Separates NavigatingToAppBoundDomain to its own file to allow for
sending over IPC.

* Shared/PolicyDecision.h:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::preconnectTo):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setIsNavigatingToAppBoundDomain):
(WebKit::WebPageProxy::preconnectTo):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::isNavigatingToAppBoundDomain const):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::download):
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::preconnectTo):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::startDownload):
(WebKit::WebFrame::convertMainResourceLoadToDownload):

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

4 months ago[MultiColumn] Ignore spanner boxes inside <legend>
zalan@apple.com [Wed, 18 Mar 2020 22:48:44 +0000 (22:48 +0000)]
[MultiColumn] Ignore spanner boxes inside <legend>
https://bugs.webkit.org/show_bug.cgi?id=209248
<rdar://problem/51857865>

Reviewed by Simon Fraser.

Source/WebCore:

<legend> boxes don't participate in the multicolumn flow, they are simply ignored.
This patch ensures that we don't include their descendants in the spanner construction.
<column>some<legend><div spanner></div></legend>content</column> <- the "spanner" div won't span the column content.

Test: fast/multicol/spanner-inside-legend-crash.html

* rendering/updating/RenderTreeBuilderMultiColumn.cpp:
(WebCore::isValidColumnSpanner):

LayoutTests:

* fast/multicol/spanner-inside-legend-crash-expected.txt: Added.
* fast/multicol/spanner-inside-legend-crash.html: Added.

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

4 months agoRemove unused IPC message NetworkProcess::ClearCacheForAllOrigins
sihui_liu@apple.com [Wed, 18 Mar 2020 22:30:11 +0000 (22:30 +0000)]
Remove unused IPC message NetworkProcess::ClearCacheForAllOrigins
https://bugs.webkit.org/show_bug.cgi?id=209152
<rdar://problem/59681717>

Reviewed by Chris Dumez.

* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/ios/NetworkProcessIOS.mm:
(WebKit::NetworkProcess::clearCacheForAllOrigins): Deleted.
* NetworkProcess/mac/NetworkProcessMac.mm:
(WebKit::NetworkProcess::clearCacheForAllOrigins): Deleted.
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::clearCacheForAllOrigins): Deleted.
* Shared/ResourceCachesToClear.h: Removed.
* UIProcess/API/C/WKAPICast.h:
(WebKit::toResourceCachesToClear): Deleted.
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::clearResourceCaches): Deleted.
* WebProcess/WebProcess.h:

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

4 months agoAdd a way to mark a rejected promise as handled
ysuzuki@apple.com [Wed, 18 Mar 2020 22:27:22 +0000 (22:27 +0000)]
Add a way to mark a rejected promise as handled
https://bugs.webkit.org/show_bug.cgi?id=209241

Reviewed by Michael Saboff.

JSTests:

* stress/reject-as-handled.js: Added.
(shouldBe):
(set new):

Source/JavaScriptCore:

Some of WebCore promise implementations (WebAnimation etc.) want to reject promise
as handled state to suppress UnhandledPromiseRejection tracking. For example, a
lot of WebCore implementations expose Promise DOM attributes which will be rejected
at some conditions. But we do not want to force users setting a handler for each such an
attribute.

This patch adds `JSPromise::rejectAsHandled` C++ function. This simply sets isHandledFlag
before executing `JSPromise::reject` if we are not calling a reject function yet.

* runtime/JSPromise.cpp:
(JSC::JSPromise::rejectAsHandled):
* runtime/JSPromise.h:
* tools/JSDollarVM.cpp:
(JSC::functionRejectPromiseAsHandled):
(JSC::JSDollarVM::finishCreation):

Source/WebCore:

This adds an interface using JSPromise::rejectAsHandled to DOMPromise classes.

* bindings/js/DOMPromiseProxy.h:
(WebCore::DOMPromiseProxy<IDLType>::reject):
(WebCore::DOMPromiseProxy<IDLVoid>::reject):
(WebCore::DOMPromiseProxyWithResolveCallback<IDLType>::reject):
* bindings/js/JSDOMPromiseDeferred.cpp:
(WebCore::DeferredPromise::callFunction):
(WebCore::DeferredPromise::reject):
* bindings/js/JSDOMPromiseDeferred.h:
(WebCore::DeferredPromise::reject):
(WebCore::DeferredPromise::rejectWithCallback):
(WebCore::DOMPromiseDeferredBase::reject):
(WebCore::DOMPromiseDeferredBase::rejectType):

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

4 months agoWebPage should own a Ref<WebFrame>
youenn@apple.com [Wed, 18 Mar 2020 20:30:02 +0000 (20:30 +0000)]
WebPage should own a Ref<WebFrame>
https://bugs.webkit.org/show_bug.cgi?id=209235

Reviewed by Geoffrey Garen.

Source/WebCore:

* loader/FrameLoaderStateMachine.h:
Export committedFirstRealDocumentLoad/

Source/WebKit:

Update code since m_mainFrame is now a Ref and no longer a RefPtr.

Update WebPage constructor to set its m_mainFrame very early.
We update WebPage::didCompletePageTransition to compute whether this is initialization or not using the frame state machine state
instead of m_mainFrame being null.

* WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction):
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithOrdinal):
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithNodeHandle):
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithName):
(WebKit::WebAutomationSessionProxy::resolveParentFrame):
(WebKit::WebAutomationSessionProxy::focusFrame):
(WebKit::WebAutomationSessionProxy::computeElementLayout):
(WebKit::WebAutomationSessionProxy::selectOptionElement):
(WebKit::WebAutomationSessionProxy::setFilesForInputFileUpload):
(WebKit::WebAutomationSessionProxy::takeScreenshot):
(WebKit::WebAutomationSessionProxy::snapshotRectForScreenshot):
(WebKit::WebAutomationSessionProxy::getCookiesForFrame):
(WebKit::WebAutomationSessionProxy::deleteCookie):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageGetMainFrame):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::findLargestFrameInFrameSet):
(WebKit::WebChromeClient::closeWindowSoon):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidReachLayoutMilestone):
(WebKit::WebFrameLoaderClient::dispatchDidLayout):
(WebKit::WebFrameLoaderClient::restoreViewState):
* WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
(WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
(WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture):
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::WebBackForwardListProxy::goToItem):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::m_processDisplayName):
(WebKit::WebPage::close):
(WebKit::WebPage::suspendForProcessSwap):
(WebKit::WebPage::loadDataInFrame):
(WebKit::WebPage::loadRequest):
(WebKit::WebPage::reload):
(WebKit::WebPage::didCompletePageTransition):
(WebKit::WebPage::runJavaScriptInFrameInScriptWorld):
(WebKit::WebPage::setIsSuspended):
(WebKit::WebPage::didLoadFromRegistrableDomain):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::mainWebFrame const):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::cancelPotentialTap):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::origin):

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

4 months agoSource/WebCore:
commit-queue@webkit.org [Wed, 18 Mar 2020 20:23:39 +0000 (20:23 +0000)]
Source/WebCore:
Fix ReplaceSelectionCommand::InsertedNodes::willRemoveNodePreservingChildren crash
https://bugs.webkit.org/show_bug.cgi?id=208312

Patch by Eugene But <eugenebut@chromium.org> on 2020-03-18
Reviewed by Ryosuke Niwa

ReplaceSelectionCommand::InsertedNodes::willRemoveNodePreservingChildren
was crashing on dereferencing m_firstNodeInserted pointer. Before the crash
ReplaceSelectionCommand::InsertedNodes object received the following calls:

respondToNodeInsertion() with node A, which set m_firstNodeInserted and m_lastNodeInserted to A
willRemoveNode() with node B, which left m_firstNodeInserted and m_lastNodeInserted unchanged (A)
(node A was destroyed setting m_firstNodeInserted and m_lastNodeInserted to null)
respondToNodeInsertion() with node C, which set m_firstNodeInserted and m_lastNodeInserted to C
willRemoveNodePreservingChildren() with node C, which set m_firstNodeInserted to null and crashed

This patch checks m_firstNodeInserted before dereferencing and sets m_lastNodeInserted to null if
m_firstNodeInserted became null. It seems like having non-null value for m_lastNodeInserted would
be an invalid state.

Test: editing/pasteboard/insert-apple-style-span-after-timeout.html

* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::InsertedNodes::willRemoveNodePreservingChildren):

LayoutTests:
Test for ReplaceSelectionCommand::InsertedNodes::willRemoveNodePreservingChildren crash fix
https://bugs.webkit.org/show_bug.cgi?id=208312

Patch by Eugene But <eugenebut@chromium.org> on 2020-03-18
Reviewed by Ryosuke Niwa

This test insers empty Apple-style-span after timeout to a non-empty document.

* editing/pasteboard/insert-apple-style-span-after-timeout.html:

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

4 months ago[CSS Writing Modes] Import css/css-writing-modes from WPT
mmaxfield@apple.com [Wed, 18 Mar 2020 19:52:37 +0000 (19:52 +0000)]
[CSS Writing Modes] Import css/css-writing-modes from WPT
https://bugs.webkit.org/show_bug.cgi?id=209088

Patch by Frank Yang <guowei_yang@apple.com> on 2020-03-18
Reviewed by Myles C. Maxfield.

LayoutTests/imported/w3c:

Imported new tests in css-writing-mode from web platform tests. Those
tests are important for testing CSS property behaviors like "text-orientation"

* resources/import-expectations.json:
* resources/resource-files.json:
* web-platform-tests/css/css-writing-modes/*: Added.

LayoutTests:

Turns out that the imported tests from w3c in LayoutTests doesn't included
css-writing-modes, which is a set of tests that checks the behavior of
css properties like "text-orientation". This patch is for importing those
tests in LayoutTests/import/w3c/css.

* TestExpectations:

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

4 months agoCrossOriginPreflightResultCacheItem::allows methods should not use out parameters
youenn@apple.com [Wed, 18 Mar 2020 19:40:23 +0000 (19:40 +0000)]
CrossOriginPreflightResultCacheItem::allows methods should not use out parameters
https://bugs.webkit.org/show_bug.cgi?id=209224

Reviewed by Alex Christensen.

Instead of having an out parameter for the error description, either return whether there is an error or not.
Covered by existing tests.

* loader/CrossOriginPreflightResultCache.cpp:
(WebCore::CrossOriginPreflightResultCacheItem::validateMethodAndHeaders const):
(WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginMethod const):
(WebCore::CrossOriginPreflightResultCacheItem::validateCrossOriginHeaders const):
(WebCore::CrossOriginPreflightResultCacheItem::allowsRequest const):
(WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders const): Deleted.
* loader/CrossOriginPreflightResultCache.h:

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

4 months agoREGRESSION (r257214): Targeted preview animates to the wrong place when dropping...
wenson_hsieh@apple.com [Wed, 18 Mar 2020 19:31:20 +0000 (19:31 +0000)]
REGRESSION (r257214): Targeted preview animates to the wrong place when dropping in editable content
https://bugs.webkit.org/show_bug.cgi?id=209218
<rdar://problem/60560831>

Reviewed by Tim Horton.

Source/WebKit:

In r257214, we split out the context menu hint preview container view into two views: one for drag and drop, and
another for the context menu hint. The container view used for both drag and drop previews was removed under
-cleanUpDragSourceSessionState, which is invoked after both drag and drop sessions have ended; however, in the
case of a drop in editable content where the drop preview is delayed, the drop animation can end up finishing
after -cleanUpDragSourceSessionState is invoked. This means we end up prematurely unparenting the preview
container, which results in a broken drop animation.

To fix this, split the drag and drop container views further, into separate container views for dragging and for
dropping. The drag preview container will continue to be removed under -cleanUpDragSourceSessionState, and the
drop preview container will now be removed under the delegate call to -dropInteraction:concludeDrop:, which is
invoked by UIKit after all drop previews are finished animating.

Covered by adding additional test assertions while running existing API tests (see Tools/ChangeLog for more
details).

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

Pull out common logic for creating and setting up a preview container view into a helper method. This is used by
the three methods below, which ensure container views for each of the types of previews we create when showing
the context menu, dragging an element, and dropping.

(-[WKContentView containerForDropPreviews]):
(-[WKContentView containerForDragPreviews]):
(-[WKContentView containerForContextMenuHintPreviews]):

Add a third preview container view for drop previews, and factor duplicated code in these three methods into a
common helper (see above).

(-[WKContentView _hideTargetedPreviewContainerViews]):
(-[WKContentView _deliverDelayedDropPreviewIfPossible:]):

Instead of using the container for drag previews, use the container for drop previews.

(-[WKContentView dropInteraction:concludeDrop:]):

Remove the drop preview container after the drop has concluded (i.e. all animations are complete).

Tools:

Augment the drag and drop test harness to verify that for all targeted previews, if they have container views,
those views must be parented (i.e. they must be connected to a UIWindow).

* TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
(-[DragAndDropSimulator _concludeDropAndPerformOperationIfNecessary]):
(-[DragAndDropSimulator _expectNoDropPreviewsWithUnparentedContainerViews]):
(-[DragAndDropSimulator _invokeDropAnimationCompletionBlocksAndConcludeDrop]):

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

4 months agoREGRESSION(r254389): Cordova throws an exception because it expects a hyphen inside...
mmaxfield@apple.com [Wed, 18 Mar 2020 19:28:39 +0000 (19:28 +0000)]
REGRESSION(r254389): Cordova throws an exception because it expects a hyphen inside navigator.locale
https://bugs.webkit.org/show_bug.cgi?id=208969
<rdar://problem/59845517>

Reviewed by Darin Adler.

We want to thwart fingerprinting by minimizing the list of locales, but we also don't want to break existing apps.
We can achieve both by a linked-on-or-after check.

* wtf/cocoa/LanguageCocoa.mm:
(WTF::canMinimizeLanguages):

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

4 months ago[macOS WK1] Layout Test media/modern-media-controls/compact-media-controls/compact...
graouts@webkit.org [Wed, 18 Mar 2020 19:24:22 +0000 (19:24 +0000)]
[macOS WK1] Layout Test media/modern-media-controls/compact-media-controls/compact-media-controls-constructor.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=192974
<rdar://problem/59063969>

Reviewed by Dean Jackson.

Since the console output is not guaranteed to appear in a deterministic order, we supress it.

* media/modern-media-controls/compact-media-controls/compact-media-controls-constructor-expected.txt:
* media/modern-media-controls/compact-media-controls/compact-media-controls-constructor.html:
* platform/mac-wk1/TestExpectations:

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

4 months ago[ Mac WK1 ] Layout Test media/modern-media-controls/compact-media-controls/compact...
graouts@webkit.org [Wed, 18 Mar 2020 19:22:30 +0000 (19:22 +0000)]
[ Mac WK1 ] Layout Test media/modern-media-controls/compact-media-controls/compact-media-controls-layout.html is a flaky text diff failure
https://bugs.webkit.org/show_bug.cgi?id=194309
<rdar://problem/48012947>

Reviewed by Dean Jackson.

Since the console output is not guaranteed to appear in a deterministic order, we supress it.

* media/modern-media-controls/compact-media-controls/compact-media-controls-layout-expected.txt:
* media/modern-media-controls/compact-media-controls/compact-media-controls-layout.html:
* platform/mac-wk1/TestExpectations:

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

4 months agoThe value of [AVPlayerViewController isPictureInPicturePossible] is NO in the first...
peng.liu6@apple.com [Wed, 18 Mar 2020 19:18:37 +0000 (19:18 +0000)]
The value of [AVPlayerViewController isPictureInPicturePossible] is NO in the first attempt to enter PiP
https://bugs.webkit.org/show_bug.cgi?id=204979

Reviewed by Jer Noble.

Source/WebCore:

Since [AVPlayerViewControl isPictureInPicturePossible] can be NO initially, we may fail to enter
the Picture-in-Picture mode.

This patch implements the mechanism to observe [AVPlayerViewControl isPictureInPicturePossible] after
a user requests to enter the Picture-in-Picture mode, and call [AVPlayerViewController startPictureInPicture]
when [AVPlayerViewController isPictureInPicturePossible] changes to YES.
A timer is added to monitor the status. If [AVPlayerViewController isPictureInPicturePossible] does not
change to YES in 0.5 second, we will give up the attempt.

* platform/ios/VideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerViewController initWithFullscreenInterface:]):
(-[WebAVPlayerViewController dealloc]):
(-[WebAVPlayerViewController MY_NO_RETURN]):
(VideoFullscreenInterfaceAVKit::doEnterFullscreen):

Source/WebCore/PAL:

import AVKit/AVObservationController.h

* pal/spi/cocoa/AVKitSPI.h:

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

4 months agoUnreviewed, fix iOS build with recent SDKs.
cdumez@apple.com [Wed, 18 Mar 2020 19:09:15 +0000 (19:09 +0000)]
Unreviewed, fix iOS build with recent SDKs.

* Platform/cocoa/PaymentAuthorizationViewController.mm:

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

4 months agoRemove unneeded and incorrect respondsToSelector checks.
megan_gardner@apple.com [Wed, 18 Mar 2020 18:15:41 +0000 (18:15 +0000)]
Remove unneeded and incorrect respondsToSelector checks.
https://bugs.webkit.org/show_bug.cgi?id=209208
<rdar://problem/60512470>

Reviewed by Tim Horton.

No behaviour change, no tests needed.

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

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

4 months ago[ews] commit-queue should comment on bug in case of test failures
aakash_jain@apple.com [Wed, 18 Mar 2020 18:15:34 +0000 (18:15 +0000)]
[ews] commit-queue should comment on bug in case of test failures
https://bugs.webkit.org/show_bug.cgi?id=209226

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/steps.py:
(AnalyzeLayoutTestsResults.report_failure): Comment on bug and set cq- in case of test failure on commit-queue.
(BuildLogLineObserver.outLineReceived): Drive-by fix to use single quotes instead of double quotes.
(SetBuildSummary): Ditto.
* BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-test.

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

4 months agoframe/iframe scrolling attribute does to recognize value "noscroll" or "off"
commit-queue@webkit.org [Wed, 18 Mar 2020 18:12:38 +0000 (18:12 +0000)]
frame/iframe scrolling attribute does to recognize value "noscroll" or "off"
https://bugs.webkit.org/show_bug.cgi?id=208570

Patch by Frederic Wang <fwang@igalia.com> on 2020-03-18
Reviewed by Rob Buis.

Source/WebCore:

Tests: imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/the-page/iframe-scrolling-attribute.html
       imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/the-page/iframe-scrolling-attribute-values.html

* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::scrollingMode const): Treat "noscroll" and "off" the same as "no".

LayoutTests:

* TestExpectations: Remove expectation failures.

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

4 months ago[ Mac ] imported/w3c/web-platform-tests/web-animations/timing-model/timelines/update...
lawrence.j@apple.com [Wed, 18 Mar 2020 18:09:54 +0000 (18:09 +0000)]
[ Mac ] imported/w3c/web-platform-tests/web-animations/timing-model/timelines/update-and-send-events-replacement.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209239

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

4 months ago[ Mac wk2 ] http/wpt/beacon/beacon-quota.html is flaky failing
cdumez@apple.com [Wed, 18 Mar 2020 17:57:45 +0000 (17:57 +0000)]
[ Mac wk2 ] http/wpt/beacon/beacon-quota.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207894
<rdar://problem/59551688>

Reviewed by Geoffrey Garen.

Source/WebCore:

Add internals API exposing the number of inflight beacon loads for a given navigator object
so that the test can rely on it.

* Modules/beacon/NavigatorBeacon.h:
* testing/Internals.cpp:
(WebCore::Internals::inflightBeaconsCount const):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

Update test to address flakiness and unskip it.

* http/wpt/beacon/beacon-quota-expected.txt:
* http/wpt/beacon/beacon-quota.html:
* platform/mac-wk2/TestExpectations:

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

4 months ago[intersection-observer] Accept a Document as an explicit root
commit-queue@webkit.org [Wed, 18 Mar 2020 17:55:12 +0000 (17:55 +0000)]
[intersection-observer] Accept a Document as an explicit root
https://bugs.webkit.org/show_bug.cgi?id=208047

Patch by Frederic Wang <fwang@igalia.com> on 2020-03-18
Reviewed by Rob Buis.

No new tests, no behavior change.

* page/IntersectionObserver.cpp:
(WebCore::IntersectionObserver::create):
(WebCore::IntersectionObserver::IntersectionObserver):
* page/IntersectionObserver.h:
(WebCore::IntersectionObserver::root const):

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

4 months agoSwitch from debug ASSERT to RELEASE_ASSERT in toNPObjectProxy
bfulgham@apple.com [Wed, 18 Mar 2020 17:40:22 +0000 (17:40 +0000)]
Switch from debug ASSERT to RELEASE_ASSERT in toNPObjectProxy
https://bugs.webkit.org/show_bug.cgi?id=209212
<rdar://problem/59595502>

Reviewed by Alex Christensen.

* Shared/Plugins/NPObjectProxy.h:
(WebKit::NPObjectProxy::toNPObjectProxy):

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

4 months agoSwitch to release asserts for MediaDeviceSandboxExtension class
bfulgham@apple.com [Wed, 18 Mar 2020 17:37:00 +0000 (17:37 +0000)]
Switch to release asserts for MediaDeviceSandboxExtension class
https://bugs.webkit.org/show_bug.cgi?id=209211
<rdar://problem/59595299>

Reviewed by Eric Carlson.

Switch from debug ASSERT to RELEASE_ASSERT.

* WebProcess/MediaStream/MediaDeviceSandboxExtensions.cpp:
(WebKit::MediaDeviceSandboxExtensions::MediaDeviceSandboxExtensions):
(WebKit::MediaDeviceSandboxExtensions::operator[]):

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

4 months agoSwitch from debug ASSERT to RELEASE_ASSERT in PluginQuirks.h
bfulgham@apple.com [Wed, 18 Mar 2020 17:24:01 +0000 (17:24 +0000)]
Switch from debug ASSERT to RELEASE_ASSERT in PluginQuirks.h
https://bugs.webkit.org/show_bug.cgi?id=209213
<rdar://problem/59595834>

Reviewed by Alex Christensen.

* Shared/Plugins/PluginQuirks.h:
(WebKit::PluginQuirks::add):

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

4 months agoREGRESSION (r258626): test262 tests failing to run on macOS with error 'Undefined...
philn@webkit.org [Wed, 18 Mar 2020 17:09:33 +0000 (17:09 +0000)]
REGRESSION (r258626): test262 tests failing to run on macOS with error 'Undefined subroutine &Test262::Runner::setConfiguration'
https://bugs.webkit.org/show_bug.cgi?id=209238

Reviewed by Jonathan Bedard.

* Scripts/test262-runner: Perform the flatpak check on Linux only.

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

4 months ago[WinCairo] archive-built-product fails after r258612
stephan.szabo@sony.com [Wed, 18 Mar 2020 17:07:08 +0000 (17:07 +0000)]
[WinCairo] archive-built-product fails after r258612
https://bugs.webkit.org/show_bug.cgi?id=209237

Reviewed by Alex Christensen.

* BuildSlaveSupport/built-product-archive:
Update name of version file for requirements version
file for wincairo.

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

4 months agocommit-queue should allow patches which are reviewed by patch author
aakash_jain@apple.com [Wed, 18 Mar 2020 17:02:27 +0000 (17:02 +0000)]
commit-queue should allow patches which are reviewed by patch author
https://bugs.webkit.org/show_bug.cgi?id=209231

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/steps.py:
(BugzillaMixin._does_patch_have_acceptable_review_flag):

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

4 months ago[JHBuild] Flatpak used for run-minibrowser even when forcing jhbuild
philn@webkit.org [Wed, 18 Mar 2020 16:18:57 +0000 (16:18 +0000)]
[JHBuild] Flatpak used for run-minibrowser even when forcing jhbuild
https://bugs.webkit.org/show_bug.cgi?id=209222

Reviewed by Carlos Alberto Lopez Perez.

* Scripts/webkitdirs.pm:
(runInFlatpakIfAvailable): If a command wrapper is required it
means Flatpak shouldn't be used.

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

4 months agoDefault attachment icon is not necessarily the same as the file attachment icon whose...
commit-queue@webkit.org [Wed, 18 Mar 2020 16:07:25 +0000 (16:07 +0000)]
Default attachment icon is not necessarily the same as the file attachment icon whose extension is ".dat"
https://bugs.webkit.org/show_bug.cgi?id=209210
<rdar://problem/59606671>

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-03-18
Reviewed by Daniel Bates.

Ensure that the default attachment icon is the one which iconForFileType
returns for "public.data" icon.

* fast/attachment/attachment-default-icon-expected.html:

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

4 months ago[macOS iOS ] animations/animation-direction-normal.html is flaky failing
graouts@webkit.org [Wed, 18 Mar 2020 15:59:03 +0000 (15:59 +0000)]
[macOS iOS ] animations/animation-direction-normal.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=206685
<rdar://problem/58841791>

Reviewed by Antti Koivisto.

To make this test robust we animate a non-accelerated property and we use the Web Animations API to set the time
at which we want to pause the animation (2.5s).

* animations/animation-direction-normal-expected.txt:
* animations/animation-direction-normal.html:
* platform/ios-wk2/TestExpectations:
* platform/mac/TestExpectations:

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

4 months ago[ iOS wk2 Release ] platform/ios/ios/plugin/youtube-flash-plugin-iframe-no-height...
lawrence.j@apple.com [Wed, 18 Mar 2020 15:38:13 +0000 (15:38 +0000)]
[ iOS wk2 Release ] platform/ios/ios/plugin/youtube-flash-plugin-iframe-no-height-or-width.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209234

Unreviewed test gardening.

* platform/ios-simulator-wk2/TestExpectations:

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

4 months ago[ews] commit-queue should comment on bug in case patch fails to build
aakash_jain@apple.com [Wed, 18 Mar 2020 15:35:05 +0000 (15:35 +0000)]
[ews] commit-queue should comment on bug in case patch fails to build
https://bugs.webkit.org/show_bug.cgi?id=209227

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/steps.py:
(AnalyzeCompileWebKitResults.start):
* BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-test.

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

4 months agoRemove status-bubble iframe from old EWS
aakash_jain@apple.com [Wed, 18 Mar 2020 15:31:18 +0000 (15:31 +0000)]
Remove status-bubble iframe from old EWS
https://bugs.webkit.org/show_bug.cgi?id=209215

Reviewed by Jonathan Bedard.

* code-review.js:
* js/status-bubble.js:
(handleStatusBubbleLoadNewEWS): Deleted.
* template/en/default/attachment/edit.html.tmpl: Removed old EWS iframe.
* template/en/default/attachment/list.html.tmpl: Ditto.
* template/en/default/attachment/reviewform.html.tmpl: Ditto.

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

4 months agoUnreviewed. Remove the build warnings below since r256756
jh718.park@samsung.com [Wed, 18 Mar 2020 15:30:09 +0000 (15:30 +0000)]
Unreviewed. Remove the build warnings below since r256756
warning: unused parameter ‘foo’ [-Wunused-parameter]

no new tests, no new behaviours.

* testing/Internals.cpp:
(WebCore::Internals::readPreferenceInteger):
(WebCore::Internals::encodedPreferenceValue):
(WebCore::Internals::getUTIFromMIMEType):
(WebCore::Internals::getUTIFromTag):

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

4 months agoanimations/animation-direction-reverse.html is flaky failing
commit-queue@webkit.org [Wed, 18 Mar 2020 15:26:51 +0000 (15:26 +0000)]
animations/animation-direction-reverse.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=206671
<rdar://problem/58838216>

Patch by Antoine Quint <graouts@apple.com> on 2020-03-18
Reviewed by Antti Koivisto.

To make this test robust we animate a non-accelerated property.

* animations/animation-direction-reverse-expected.txt:
* animations/animation-direction-reverse.html:
* platform/ios/TestExpectations:
* platform/mac/TestExpectations:

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

4 months agoUnreviewed. Remove the build warning below since r256196
jh718.park@samsung.com [Wed, 18 Mar 2020 15:17:47 +0000 (15:17 +0000)]
Unreviewed. Remove the build warning below since r256196
warning: variable ‘highlightEnd’ set but not used [-Wunused-but-set-variable]

no new tests, no new behaviours.

* rendering/HighlightData.cpp:
(WebCore::HighlightData::highlightStateForRenderer):

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

4 months agoUpdate some fast/mediastream to make failures easier to diagnose.
eric.carlson@apple.com [Wed, 18 Mar 2020 15:11:09 +0000 (15:11 +0000)]
Update some fast/mediastream to make failures easier to diagnose.
https://bugs.webkit.org/show_bug.cgi?id=209205
<rdar://problem/60561372>

Log more state when a test fails.

Reviewed by Alex Christensen.

* fast/mediastream/MediaStream-video-element-displays-buffer.html:
* fast/mediastream/MediaStream-video-element-video-tracks-disabled-then-enabled.html:
* fast/mediastream/resize-trim.html:

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

4 months agoMake sure a preflight fails if response headers are invalid
youenn@apple.com [Wed, 18 Mar 2020 14:49:37 +0000 (14:49 +0000)]
Make sure a preflight fails if response headers are invalid
https://bugs.webkit.org/show_bug.cgi?id=208924

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/fetch/api/cors/cors-preflight-response-validation.any-expected.txt: Added.
* web-platform-tests/fetch/api/cors/cors-preflight-response-validation.any.html: Added.
* web-platform-tests/fetch/api/cors/cors-preflight-response-validation.any.js: Added.
(corsPreflightResponseValidation):
* web-platform-tests/fetch/api/cors/cors-preflight-response-validation.any.worker-expected.txt: Added.
* web-platform-tests/fetch/api/cors/cors-preflight-response-validation.any.worker.html: Added.

Source/WebCore:

Implement https://fetch.spec.whatwg.org/#cors-preflight-fetch-0 step 7.3.
In case header parsing is wrong, fail the preflight with a meaningful message.
Update parsing of headers to return an Optional so that parsing error is handled as a nullopt.
Minor refactoring to return Expected/Optional for error handlng instead of passing an out parameter.
Also, adding preflight cache entry if it is valid, no matter whether preflight succeeds or not.

Tests: imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-response-validation.any.html
       imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-response-validation.any.worker.html

* loader/CrossOriginAccessControl.cpp:
(WebCore::validatePreflightResponse):
* loader/CrossOriginPreflightResultCache.cpp:
(WebCore::CrossOriginPreflightResultCacheItem::create):
(WebCore::CrossOriginPreflightResultCacheItem::validateMethodAndHeaders const):
* loader/CrossOriginPreflightResultCache.h:
(WebCore::CrossOriginPreflightResultCacheItem::CrossOriginPreflightResultCacheItem):
* platform/network/HTTPParsers.h:
(WebCore::parseAccessControlAllowList):
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::filter):
(WebCore::ResourceResponseBase::sanitizeHTTPHeaderFieldsAccordingToTainting):

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

4 months agoUnreviewed. Remove the build warning below since r258458
jh718.park@samsung.com [Wed, 18 Mar 2020 14:28:46 +0000 (14:28 +0000)]
Unreviewed. Remove the build warning below since r258458
warning: unused variable ‘frame’ [-Wunused-variable]

No new tests, no new behaviors.

* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::didReceiveResponse):

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

4 months agoREGRESSION (r257472): Can't start old Safari with new WebKit (dyld: Symbol not found...
youenn@apple.com [Wed, 18 Mar 2020 14:24:19 +0000 (14:24 +0000)]
REGRESSION (r257472): Can't start old Safari with new WebKit (dyld: Symbol not found: _WKContextConfigurationSetShouldCaptureAudioInUIProcess)
https://bugs.webkit.org/show_bug.cgi?id=209155

Reviewed by Eric Carlson.

Add a no-op WKContextConfigurationSetShouldCaptureAudioInUIProcess to allow latest WebKit being run on older Safari.

* UIProcess/API/C/WKContextConfigurationRef.cpp:
(WKContextConfigurationSetShouldCaptureAudioInUIProcess):
* UIProcess/API/C/WKContextConfigurationRef.h:

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

4 months agoSource/WebCore:
youenn@apple.com [Wed, 18 Mar 2020 13:59:23 +0000 (13:59 +0000)]
Source/WebCore:
FrameLoader should own its FrameLoaderClient
https://bugs.webkit.org/show_bug.cgi?id=208918

Reviewed by Geoff Garen.

Update Frame/FrameLoader constructors to get a UniqueRef<FrameLoaderClient>.
This makes the lifetime management much clearer and allows some WebKit1/WebKit2 clean-up.

Covered by existing tests.

* loader/EmptyClients.cpp:
(WebCore::pageConfigurationWithEmptyClients):
* loader/EmptyFrameLoaderClient.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::FrameLoader):
(WebCore::FrameLoader::~FrameLoader):
(WebCore::FrameLoader::init):
(WebCore::FrameLoader::initForSynthesizedDocument):
(WebCore::FrameLoader::didExplicitOpen):
(WebCore::FrameLoader::receivedFirstData):
(WebCore::FrameLoader::finishedParsing):
(WebCore::FrameLoader::loadArchive):
(WebCore::FrameLoader::setOpener):
(WebCore::FrameLoader::provisionalLoadStarted):
(WebCore::FrameLoader::loadInSameDocument):
(WebCore::FrameLoader::prepareForLoadStart):
(WebCore::FrameLoader::setupForReplace):
(WebCore::FrameLoader::load):
(WebCore::FrameLoader::loadWithNavigationAction):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::willLoadMediaElementURL):
(WebCore::FrameLoader::reloadWithOverrideEncoding):
(WebCore::FrameLoader::reload):
(WebCore::FrameLoader::setDocumentLoader):
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::transitionToCommitted):
(WebCore::FrameLoader::clientRedirectCancelledOrFinished):
(WebCore::FrameLoader::clientRedirected):
(WebCore::FrameLoader::closeOldDataSources):
(WebCore::FrameLoader::willChangeTitle):
(WebCore::FrameLoader::dispatchDidFailProvisionalLoad):
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):
(WebCore::FrameLoader::didReachLayoutMilestone):
(WebCore::FrameLoader::didReachVisuallyNonEmptyState):
(WebCore::FrameLoader::frameLoadCompleted):
(WebCore::FrameLoader::checkLoadComplete):
(WebCore::FrameLoader::userAgent const):
(WebCore::FrameLoader::dispatchOnloadEvents):
(WebCore::FrameLoader::detachViewsAndDocumentLoader):
(WebCore::FrameLoader::receivedMainResourceError):
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
(WebCore::FrameLoader::loadedResourceFromMemoryCache):
(WebCore::FrameLoader::loadDifferentDocumentItem):
(WebCore::FrameLoader::cancelledError const):
(WebCore::FrameLoader::blockedByContentBlockerError const):
(WebCore::FrameLoader::blockedError const):
(WebCore::FrameLoader::blockedByContentFilterError const):
(WebCore::FrameLoader::connectionProperties):
(WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
(WebCore::FrameLoader::dispatchGlobalObjectAvailableInAllWorlds):
(WebCore::FrameLoader::didChangeTitle):
(WebCore::FrameLoader::dispatchDidCommitLoad):
(WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads):
(WebCore::FrameLoader::completePageTransitionIfNeeded):
* loader/FrameLoader.h:
* loader/FrameLoaderClient.h:
* page/Frame.cpp:
(WebCore::Frame::Frame):
(WebCore::Frame::create):
* page/Frame.h:
* page/Page.cpp:
(WebCore::Page::Page):
* page/PageConfiguration.cpp:
(WebCore::PageConfiguration::PageConfiguration):
* page/PageConfiguration.h:
* workers/service/context/SWContextManager.cpp:
* workers/service/context/SWContextManager.h:

Source/WebKit:
FrameLoader should own its FrameLoaderClient
https://bugs.webkit.org/show_bug.cgi?id=208918

Reviewed by Geoff Garen.

Pass a UniqueRef to the PageConfiguration.
Update WebFrameLoaderClient according updated FrameLoaderClient interface.

WebFrame no longer needs to ref/unref itself to keep the loader client alive.
Update WebFrame construction to not need a static_cast at initialization of the main frame.

The ownership is now that a WebCore::FrameLoader owns a FrameLoaderClient who owns a WebFrame.

* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::tryLoadingUsingURLSchemeHandler):
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
(WebKit::WebLoaderStrategy::tryLoadingSynchronouslyUsingURLSchemeHandler):
(WebKit::WebLoaderStrategy::loadResourceSynchronously):
(WebKit::WebLoaderStrategy::startPingLoad):
(WebKit::WebLoaderStrategy::preconnectTo):
* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::installServiceWorker):
* WebProcess/Storage/WebSWContextManagerConnection.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
(WebKit::WebFrameLoaderClient::~WebFrameLoaderClient):
(WebKit::WebFrameLoaderClient::webPageProxyID const):
(WebKit::WebFrameLoaderClient::pageID const):
(WebKit::WebFrameLoaderClient::frameID const):
(WebKit::WebFrameLoaderClient::detachedFromParent2):
(WebKit::WebFrameLoaderClient::assignIdentifierToInitialRequest):
(WebKit::WebFrameLoaderClient::dispatchWillSendRequest):
(WebKit::WebFrameLoaderClient::shouldUseCredentialStorage):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveResponse):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveContentLength):
(WebKit::WebFrameLoaderClient::dispatchDidFinishLoading):
(WebKit::WebFrameLoaderClient::dispatchDidFailLoading):
(WebKit::WebFrameLoaderClient::dispatchDidDispatchOnloadEvents):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidCancelClientRedirect):
(WebKit::WebFrameLoaderClient::dispatchWillPerformClientRedirect):
(WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):
(WebKit::WebFrameLoaderClient::dispatchDidReachLayoutMilestone):
(WebKit::WebFrameLoaderClient::dispatchDidLayout):
(WebKit::WebFrameLoaderClient::dispatchShow):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebKit::WebFrameLoaderClient::applyToDocumentLoader):
(WebKit::WebFrameLoaderClient::allowsContentJavaScriptFromMostRecentNavigation const):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebKit::WebFrameLoaderClient::dispatchUnableToImplementPolicy):
(WebKit::WebFrameLoaderClient::dispatchWillSendSubmitEvent):
(WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
(WebKit::WebFrameLoaderClient::willReplaceMultipartContent):
(WebKit::WebFrameLoaderClient::didReplaceMultipartContent):
(WebKit::WebFrameLoaderClient::didDisplayInsecureContent):
(WebKit::WebFrameLoaderClient::didRunInsecureContent):
(WebKit::WebFrameLoaderClient::didDetectXSS):
(WebKit::WebFrameLoaderClient::cancelledError const):
(WebKit::WebFrameLoaderClient::blockedError const):
(WebKit::WebFrameLoaderClient::blockedByContentBlockerError const):
(WebKit::WebFrameLoaderClient::cannotShowURLError const):
(WebKit::WebFrameLoaderClient::interruptedForPolicyChangeError const):
(WebKit::WebFrameLoaderClient::blockedByContentFilterError const):
(WebKit::WebFrameLoaderClient::cannotShowMIMETypeError const):
(WebKit::WebFrameLoaderClient::fileDoesNotExistError const):
(WebKit::WebFrameLoaderClient::pluginWillHandleLoadError const):
(WebKit::WebFrameLoaderClient::shouldFallBack const):
(WebKit::WebFrameLoaderClient::restoreViewState):
(WebKit::WebFrameLoaderClient::didFinishLoad):
(WebKit::WebFrameLoaderClient::userAgent const):
(WebKit::WebFrameLoaderClient::createPlugin):
(WebKit::WebFrameLoaderClient::webGLPolicyForURL const):
(WebKit::WebFrameLoaderClient::resolveWebGLPolicyForURL const):
(WebKit::WebFrameLoaderClient::objectContentType):
(WebKit::WebFrameLoaderClient::overrideMediaType const):
(WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
(WebKit::WebFrameLoaderClient::dispatchGlobalObjectAvailable):
(WebKit::WebFrameLoaderClient::willInjectUserScript):
(WebKit::WebFrameLoaderClient::willCacheResponse const):
(WebKit::WebFrameLoaderClient::createNetworkingContext):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::initWithCoreMainFrame):
(WebKit::WebFrame::createSubframe):
(WebKit::WebFrame::WebFrame):
(WebKit::WebFrame::frameLoaderClient const):
(WebKit::WebFrame::fromCoreFrame):
(WebKit::WebFrame::didReceivePolicyDecision):
* WebProcess/WebPage/WebFrame.h:
(WebKit::WebFrame::create):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_processDisplayName):

Source/WebKitLegacy/mac:
FrameLoader should own its FrameLoaderClient
https://bugs.webkit.org/show_bug.cgi?id=208918

Reviewed by Geoff Garen.

Update according new Frame/FrameLoader constructors and FrameLoaderClient interface.

* WebCoreSupport/WebFrameLoaderClient.h:
(WebFrameLoaderClient::setWebFrame):
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::~WebFrameLoaderClient):
(WebFrameLoaderClient::cancelledError const):
(WebFrameLoaderClient::blockedError const):
(WebFrameLoaderClient::blockedByContentBlockerError const):
(WebFrameLoaderClient::cannotShowURLError const):
(WebFrameLoaderClient::interruptedForPolicyChangeError const):
(WebFrameLoaderClient::blockedByContentFilterError const):
(WebFrameLoaderClient::cannotShowMIMETypeError const):
(WebFrameLoaderClient::fileDoesNotExistError const):
(WebFrameLoaderClient::pluginWillHandleLoadError const):
(WebFrameLoaderClient::shouldFallBack const):
(WebFrameLoaderClient::userAgent const):
* WebView/WebFrame.mm:
(+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]):
(+[WebFrame _createMainFrameWithPage:frameName:frameView:]):
(+[WebFrame _createMainFrameWithSimpleHTMLDocumentWithPage:frameView:style:]):
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

Source/WebKitLegacy/win:
Make sure a preflight fails if response headers are invalid
https://bugs.webkit.org/show_bug.cgi?id=208924

Reviewed by Geoff Garen.

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::cancelledError const):
(WebFrameLoaderClient::blockedError const):
(WebFrameLoaderClient::blockedByContentBlockerError const):
(WebFrameLoaderClient::cannotShowURLError const):
(WebFrameLoaderClient::interruptedForPolicyChangeError const):
(WebFrameLoaderClient::cannotShowMIMETypeError const):
(WebFrameLoaderClient::fileDoesNotExistError const):
(WebFrameLoaderClient::pluginWillHandleLoadError const):
(WebFrameLoaderClient::shouldFallBack const):
(WebFrameLoaderClient::userAgent const):
(WebFrameLoaderClient::frameLoaderDestroyed): Deleted.
(WebFrameLoaderClient::cancelledError): Deleted.
(WebFrameLoaderClient::blockedError): Deleted.
(WebFrameLoaderClient::blockedByContentBlockerError): Deleted.
(WebFrameLoaderClient::cannotShowURLError): Deleted.
(WebFrameLoaderClient::interruptedForPolicyChangeError): Deleted.
(WebFrameLoaderClient::cannotShowMIMETypeError): Deleted.
(WebFrameLoaderClient::fileDoesNotExistError): Deleted.
(WebFrameLoaderClient::pluginWillHandleLoadError): Deleted.
(WebFrameLoaderClient::shouldFallBack): Deleted.
(WebFrameLoaderClient::userAgent): Deleted.
* WebCoreSupport/WebFrameLoaderClient.h:
* WebFrame.cpp:
(WebFrame::createSubframeWithOwnerElement):

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

4 months ago[ macOS iOS ] animations/play-state-paused.html is flaky failing
commit-queue@webkit.org [Wed, 18 Mar 2020 13:34:29 +0000 (13:34 +0000)]
[ macOS iOS ] animations/play-state-paused.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=206682
<rdar://problem/58840950>

Patch by Antoine Quint <graouts@apple.com> on 2020-03-18
Reviewed by Antti Koivisto.

To make this test robust we animate a non-accelerated property and we use the Web Animations API to set the time
at which we want to pause the animation (1s).

* animations/play-state-paused-expected.txt:
* animations/play-state-paused.html:
* platform/ios-wk2/TestExpectations:
* platform/mac/TestExpectations:

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

4 months ago[GTK][WPE] Migrate to Flatpak-based dev SDK
philn@webkit.org [Wed, 18 Mar 2020 09:54:55 +0000 (09:54 +0000)]
[GTK][WPE] Migrate to Flatpak-based dev SDK
https://bugs.webkit.org/show_bug.cgi?id=205658

Reviewed by Carlos Alberto Lopez Perez.

Source/WebCore:

* platform/text/hyphen/HyphenationLibHyphen.cpp:
(WebCore::scanTestDictionariesDirectoryIfNecessary): Check for flatpak-installed dictionaries.

Tools:

JHBuild will now be used only if the WEBKIT_JHBUILD environment
variable is set to 1, which is the case for the time being on the
GTK and WPE EWS/build bots.

By default the build dependencies are now locally installed from a
Flatpak repository hosted at https://software.igalia.com. The
repository can be regenerated with the scripts from the
webkit-flatpak-sdk Github project
(https://github.com/Igalia/webkit-flatpak-sdk). This is done
transparently with the update-webkit{gtk,wpe}-libs scripts. As
there is no need to rebuild the dependencies from scratch, the
developer user-experience should now be much more friendly and
overall build times reduced.

As an additional commodity, the new environment supports the
GStreamer gst-build-based workflow. Just set the GST_BUILD_PATH
environment variable to your gst-build path. This feature was
contributed by Thibault Saunier.

The JHBuild infrastructure will be removed once all the bots have
been switched over to Flatpak.

* BuildSlaveSupport/ews-build/steps.py:
(InstallGtkDependencies):
(InstallWpeDependencies):
(CompileWebKit.start):
* BuildSlaveSupport/gtk/buildbot/run:
* Scripts/build-webkit:
* Scripts/run-bindings-tests:
* Scripts/run-builtins-generator-tests:
* Scripts/run-gtk-tests:
* Scripts/run-javascriptcore-tests:
* Scripts/run-minibrowser:
* Scripts/run-qt-wpe-minibrowser:
* Scripts/run-webdriver-tests:
* Scripts/run-wpe-tests:
* Scripts/test-webkitperl:
* Scripts/test-webkitpy:
* Scripts/test262-runner:
* Scripts/update-webkit-flatpak: Renamed from Tools/Scripts/update-webkitgtk-flatpak.
* Scripts/update-webkitgtk-libs:
* Scripts/update-webkitwpe-flatpak: Removed.
* Scripts/update-webkitwpe-libs:
* Scripts/webkitdirs.pm:
(getUserFlatpakPath):
(inFlatpakSandbox):
(runInFlatpakIfAvailable):
(wrapperPrefixIfNeeded):
(shouldUseJhbuild):
(shouldUseFlatpak):
(shouldRemoveCMakeCache):
* Scripts/webkitpy/common/system/executive.py:
(Executive.kill_all):
* Scripts/webkitpy/port/base.py:
(Port._path_to_apache):
(Port._should_run_as_pixel_test):
(Port._in_flatpak_sandbox):
* Scripts/webkitpy/port/gtk.py:
(GtkPort.setup_environ_for_server):
(GtkPort._get_crash_log):
* Scripts/webkitpy/port/linux_get_crash_log.py:
(GDBCrashLogGenerator):
(GDBCrashLogGenerator.__init__):
(GDBCrashLogGenerator.generate_crash_log):
* Scripts/webkitpy/port/linux_get_crash_log_unittest.py:
(GDBCrashLogGeneratorTest.test_generate_crash_log):
* Scripts/webkitpy/port/wpe.py:
(WPEPort.setup_environ_for_server):
(WPEPort._get_crash_log):
* Scripts/webkitpy/port/xvfbdriver.py:
(XvfbDriver._setup_environ_for_test):
* WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp:
(WTR::getFontsPath):
* WebKitTestRunner/InjectedBundle/wpe/ActivateFontsWPE.cpp:
(WTR::getFontsPath):
* flatpak/files/default.xkm: Removed.
* flatpak/files/httpd-autogen.sh: Removed.
* flatpak/flatpakutils.py:
(check_flatpak):
(FlatpakRepos.update):
(FlatpakPackage.__repr__):
(FlatpakPackage.__str__):
(WebkitFlatpak.load_from_args):
(WebkitFlatpak.__init__):
(WebkitFlatpak.clean_args):
(WebkitFlatpak.setup_builddir):
(WebkitFlatpak):
(WebkitFlatpak.setup_gstbuild):
(WebkitFlatpak.run_in_sandbox):
(WebkitFlatpak.run):
(WebkitFlatpak.has_environment):
(WebkitFlatpak.save_config):
(WebkitFlatpak.setup_dev_env):
(WebkitFlatpak.install_all):
(WebkitFlatpak.run_gdb):
* flatpak/org.webkit.CommonModules.yaml: Removed.
* flatpak/org.webkit.GTK.yaml: Removed.
* flatpak/org.webkit.WPE.yaml: Removed.
* flatpak/org.webkit.WPEModules.yaml: Removed.
* flatpak/org.webkit.WPEQT.yaml: Removed.
* flatpak/org.webkit.WebKit.yaml: Removed.
* flatpak/patches/httpd-0001-configure-use-pkg-config-for-PCRE-detection.patch: Removed.
* flatpak/patches/libgcrypt-0001-Use-pkg-config-to-detect-gpg-error.patch: Removed.
* flatpak/patches/xvfb-0001-HACK-Avoid-compiling-a-kbm-file.patch: Removed.

LayoutTests:

* http/conf/flatpak-httpd.conf: Adjust paths.

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

4 months agoCrash in CSSPrimitiveValue::cleanup
commit-queue@webkit.org [Wed, 18 Mar 2020 05:47:14 +0000 (05:47 +0000)]
Crash in CSSPrimitiveValue::cleanup
https://bugs.webkit.org/show_bug.cgi?id=208316

Patch by Pinki Gyanchandani <pgyanchandani@apple.com> on 2020-03-17
Reviewed by Ryosuke Niwa.

Source/WebCore:

Added a NULL check before calling deref() for CSSUnitType :: CSS_CALC.

During initialization of CSSCalcValue, createCSS returns nullptr when processing min() operator
and there is a category mismatch between length and percent for min() operator
as seen in this newly added test case.

Test: editing/execCommand/primitive-value-cleanup-minimal.html

* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::cleanup):

LayoutTests:

Added modified version of testcase attached in 208316. Minimized version provided by Ryosuke Niwa.

* editing/execCommand/primitive-value-cleanup-minimal-expected.txt: Added.
* editing/execCommand/primitive-value-cleanup-minimal.html: Added.

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

4 months ago[CMake] libopus 1.1 its enough for building WebKitGTK with ENABLE_WEB_RTC
clopez@igalia.com [Wed, 18 Mar 2020 04:45:56 +0000 (04:45 +0000)]
[CMake] libopus 1.1 its enough for building WebKitGTK with ENABLE_WEB_RTC
https://bugs.webkit.org/show_bug.cgi?id=209209

Reviewed by Konstantin Tokarev.

Ubuntu 18.04 ships libopus 1.1.2 which its enough for building with -DENABLE_WEB_RTC=ON

* CMakeLists.txt:

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

4 months agoWeb Inspector: the width of `WI.TabBarItem` can change if the detached window is...
drousso@apple.com [Wed, 18 Mar 2020 04:30:22 +0000 (04:30 +0000)]
Web Inspector: the width of `WI.TabBarItem` can change if the detached window is resized
https://bugs.webkit.org/show_bug.cgi?id=209200

Reviewed by Timothy Hatcher.

* UserInterface/Views/TabBar.js:
(WI.TabBar.prototype.layout):
(WI.TabBar.prototype.layout.measureWidth): Renamed from `measureItemWidth`.
When undocked, `WI.TabBarItem` grow to fill any available space. As a result, if a
`WI.TabBarItem` is added or removed, the width of all `WI.TabBarItem` will change.
Wait to measure widths until all `WI.TabBarItem` are un-hidden for the reason above.

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

4 months agoWeb Inspector: Network: we should prefer showing "Preserve Log" over "Group Media...
drousso@apple.com [Wed, 18 Mar 2020 04:14:52 +0000 (04:14 +0000)]
Web Inspector: Network: we should prefer showing "Preserve Log" over "Group Media Requests"
https://bugs.webkit.org/show_bug.cgi?id=209199

Reviewed by Timothy Hatcher.

* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView):
Change the `WI.NavigationItem.VisibilityPriority` of the various `WI.NavigationItem`:
  High:
   - URL filter
   - resource type filter
   - live/HAR view switcher
   - disable resource caching toggle
  Normal:
   - Preserve Log checkbox
   - clear button
  Low:
   - Group Media Requests checkbox
   - HAR import/export buttons
This way, items that have alternate ways of being triggered (e.g. keyboard shortcuts) are
hidden first, and vica versa.

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

4 months agoWeb Inspector: Sources: hovering the title of an object preview popup for a DOM node...
drousso@apple.com [Wed, 18 Mar 2020 03:59:13 +0000 (03:59 +0000)]
Web Inspector: Sources: hovering the title of an object preview popup for a DOM node doesn't highlight it
https://bugs.webkit.org/show_bug.cgi?id=209159

Reviewed by Timothy Hatcher.

* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype._showPopoverForObject):

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

4 months agoSharedMemory::Handle::m_size should be more consistent
ddkilzer@apple.com [Wed, 18 Mar 2020 03:32:31 +0000 (03:32 +0000)]
SharedMemory::Handle::m_size should be more consistent
<https://webkit.org/b/209007>
<rdar://problem/60340890>

Reviewed by Darin Adler.

* Platform/cocoa/SharedMemoryCocoa.cpp:
(WebKit::SharedMemory::Handle::decode):
- Return early if an invalid `size` is decoded.
(WebKit::SharedMemory::map):
- Drive-by fix to change '0' to 'nullptr'.
- Since all known methods of creating a SharedMemory::Handle()
  set SharedMemory::Handle::m_size to a value of round_page(),
  this means we can also change `round_page(handle.m_size)` to
  `handle.m_size` in the call to mach_vm_map() since we know
  they're equal.

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

4 months ago[WPE] Gardening
lmoura@igalia.com [Wed, 18 Mar 2020 03:18:11 +0000 (03:18 +0000)]
[WPE] Gardening

Unreviewed test gardening.

* platform/wpe/TestExpectations:

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

4 months ago[WPE] Rebaseline after r258492.
lmoura@igalia.com [Wed, 18 Mar 2020 03:15:19 +0000 (03:15 +0000)]
[WPE] Rebaseline after r258492.

Unreviewed test gardening.

* platform/wpe/imported/w3c/web-platform-tests/svg/import/text-path-01-b-manual-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/svg/import/text-path-02-b-manual-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/svg/painting/marker-008-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/svg/painting/reftests/paint-order-001-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/svg/text/reftests/textpath-shape-001-expected.txt:
* platform/wpe/svg/W3C-SVG-1.1/text-path-01-b-expected.txt:
* platform/wpe/svg/text/text-path-01-b-expected.txt:

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

4 months agoUnreviewed, reverting r258496.
commit-queue@webkit.org [Wed, 18 Mar 2020 03:12:50 +0000 (03:12 +0000)]
Unreviewed, reverting r258496.
https://bugs.webkit.org/show_bug.cgi?id=209217

Introduced sandbox regression (Requested by perarne on
#webkit).

Reverted changeset:

"[iOS] Add telemetry for message filtering"
https://bugs.webkit.org/show_bug.cgi?id=208925
https://trac.webkit.org/changeset/258496

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

4 months agoExpand In-App-Browser-Privacy testing
katherine_cheney@apple.com [Wed, 18 Mar 2020 00:45:40 +0000 (00:45 +0000)]
Expand In-App-Browser-Privacy testing
https://bugs.webkit.org/show_bug.cgi?id=209142
<rdar://problem/60496618>

Reviewed by Darin Adler.

Source/WebKit:

Adds a testing API to check whether a navigation was classified as
app-bound.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isNavigatingToAppBoundDomain:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::isNavigatingToAppBoundDomainTesting):
* UIProcess/WebPageProxy.h:

Tools:

Expanded test coverage by adding new tests and creating a custom url
scheme handler to get around the fact that local file loads are
always classified as app-bound.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
(-[InAppBrowserSchemeHandler webView:startURLSchemeTask:]):
If the path indicates testing user scripts on load, notify the script message
handler that the navigation has finished. If the path indicates
testing user-agent scripts, set the window.wkUserScriptInjected
variable to true. A user agent script will attempt to read this
variable and should fail.

(-[InAppBrowserSchemeHandler webView:stopURLSchemeTask:]):
(initializeInAppBrowserPrivacyTestSettings):
Basic test setup. Initialize the main run loop and make sure we are
starting with a clean state.

(TEST):
Add tests for all protocols checked in shouldBeTreatedAsAppBound,
except for blob files which must be generated within the web content.

* TestWebKitAPI/Tests/WebKitCocoa/in-app-browser-privacy-local-file.html: Added.
Basic html document to test local file loads are classified as
app-bound.

* TestWebKitAPI/Tests/WebKitCocoa/in-app-browser-privacy-test-user-agent-script.html: Removed.
* TestWebKitAPI/Tests/WebKitCocoa/in-app-browser-privacy-test-user-script.html: Removed.
These files are no longer needed as their content is directly copied
into the URL scheme handler.

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

4 months agoSerializedScriptValue::decode should check bufferIsLargeEnoughToContain before alloca...
Hironori.Fujii@sony.com [Wed, 18 Mar 2020 00:29:42 +0000 (00:29 +0000)]
SerializedScriptValue::decode should check bufferIsLargeEnoughToContain before allocating a buffer
https://bugs.webkit.org/show_bug.cgi?id=209132

Reviewed by Darin Adler.

* bindings/js/SerializedScriptValue.h:
(WebCore::SerializedScriptValue::decode): Added bufferIsLargeEnoughToContain check.
Added a null check for Gigacage::tryMalloc.

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

4 months agoREGRESSION: [ macOS wk1 ] ASSERTION FAILED: _notifications.contains(notificationID...
cdumez@apple.com [Wed, 18 Mar 2020 00:12:47 +0000 (00:12 +0000)]
REGRESSION: [ macOS wk1 ] ASSERTION FAILED: _notifications.contains(notificationID) imported/w3c/web-platform-tests/notifications/constructor-basic.html is flaky crashing
https://bugs.webkit.org/show_bug.cgi?id=207307
<rdar://problem/59206964>

Reviewed by Alex Christensen.

Source/WebKitLegacy/mac:

* WebView/WebNotification.h:
* WebView/WebNotification.mm:
(-[WebNotification finalize]):

Tools:

When [MockWebNotificationProvider reset] was called at the end of the test, it would remove all
notifications from the map but not tell WebCore that the notification were discarded. As a result,
WebCore would later tell the MockWebNotificationProvider to cancel the notification but this
notification would no longer be in the map, causing us to hit an assertion in debug.

To address the issue, we now call Notification::finalize() in [MockWebNotificationProvider reset]
to let WebCore know the notification was discarded. This is similar to what is already done for
WebKit2 in WebNotificationManager::clearNotifications().

* DumpRenderTree/mac/MockWebNotificationProvider.mm:
(-[MockWebNotificationProvider reset]):

LayoutTests:

Add test coverage.

* http/wpt/notifications/constructor-basic-bfcache-expected.txt: Added.
* http/wpt/notifications/constructor-basic-bfcache.html: Added.
* platform/mac/TestExpectations:

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

4 months ago[WinCairo][FTW] Update path to requirements download
don.olmstead@sony.com [Wed, 18 Mar 2020 00:06:14 +0000 (00:06 +0000)]
[WinCairo][FTW] Update path to requirements download
https://bugs.webkit.org/show_bug.cgi?id=209202

Reviewed by Ross Kirsling.

Repository was renamed from WinCairoRequirements to WebKitRequirements in the
WebKitForWindows org on GitHub. Additionally the .zip file was renamed to
WebKitRequirementsWin64.zip.

* Scripts/update-webkit-wincairo-libs.py:

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

4 months ago[ews] Resubmit patches to commit-queue which were cq- by commit-queue and later cq+
aakash_jain@apple.com [Wed, 18 Mar 2020 00:01:42 +0000 (00:01 +0000)]
[ews] Resubmit patches to commit-queue which were cq- by commit-queue and later cq+
https://bugs.webkit.org/show_bug.cgi?id=208920

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-app/ews/common/buildbot.py:
(Buildbot.update_builder_name_to_id_mapping): Method to generate builder name to id mapping.
(Buildbot.fetch_pending_and_inprogress_builds): Method to fetch pendign and in-progress builds from buildbot.
(Buildbot.get_patches_in_queue): Method to fetch list of patches which are pending or are in-progress on buildbot.
* BuildSlaveSupport/ews-app/ews/common/bugzilla.py:
(Bugzilla.get_cq_plus_timestamp): Get UTC timestamp when cq+ flag was set.
* BuildSlaveSupport/ews-app/ews/fetcher.py:
(FetchLoop.run): Update builder name to id mapping. We just need to update it one-time, since we need the id only
for commit-queue which isn't expected to change.
(BugzillaPatchFetcher.fetch_commit_queue_patches):
(BugzillaPatchFetcher.send_patches_to_buildbot): Allow sending the patch again to commit-queue.
(BugzillaPatchFetcher.patches_to_send_to_commit_queue): Find patches which needs to be sent to commit-queue. Filter
out patches which are already waiting or in-progress on commit-queue, or whose recent build was completed after
setting cq+ flag on bugzilla.

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