WebKit-https.git
6 months ago[GTK][WPE] Websockets close-on-x tests are failing
commit-queue@webkit.org [Fri, 24 Jan 2020 18:29:28 +0000 (18:29 +0000)]
[GTK][WPE] Websockets close-on-x tests are failing
https://bugs.webkit.org/show_bug.cgi?id=206392

Unreviewed gardening.

Rebaseline after libsoup commit 35f1bac5.

Patch by Lauro Moura <lmoura@igalia.com> on 2020-01-24

* platform/gtk/TestExpectations:
* platform/gtk/http/tests/websocket/tests/hybi/close-on-navigate-new-location-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/close-on-unload-and-force-gc-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/close-on-unload-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/close-on-unload-reference-in-parent-expected.txt: Added.
* platform/gtk/http/tests/websocket/tests/hybi/send-after-close-on-unload-expected.txt: Added.

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

6 months ago[GTK][WPE] Several WPT fetch tests are failing
commit-queue@webkit.org [Fri, 24 Jan 2020 18:13:46 +0000 (18:13 +0000)]
[GTK][WPE] Several WPT fetch tests are failing
https://bugs.webkit.org/show_bug.cgi?id=206416

Patch by Rob Buis <rbuis@igalia.com> on 2020-01-24
Reviewed by Frédéric Wang.

It is better to skip these as more tests can be added
and this feature is not enabled on WPE/GTK.

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

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

6 months agoUnreviewed, rolling out r255052.
commit-queue@webkit.org [Fri, 24 Jan 2020 17:58:22 +0000 (17:58 +0000)]
Unreviewed, rolling out r255052.
https://bugs.webkit.org/show_bug.cgi?id=206758

"Broke production builds" (Requested by rmorisset on #webkit).

Reverted changeset:

"Break the dependency between jsc and DerivedSources"
https://bugs.webkit.org/show_bug.cgi?id=206720
https://trac.webkit.org/changeset/255052

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

6 months ago[Web Animations] Support multiple CSS Animations with the same name in animation...
graouts@webkit.org [Fri, 24 Jan 2020 17:35:45 +0000 (17:35 +0000)]
[Web Animations] Support multiple CSS Animations with the same name in animation-name
https://bugs.webkit.org/show_bug.cgi?id=206688

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark some new WPT progressions.

* web-platform-tests/css/css-animations/Element-getAnimations-dynamic-changes.tentative-expected.txt:
* web-platform-tests/css/css-animations/Element-getAnimations.tentative-expected.txt:
* web-platform-tests/web-animations/timing-model/timelines/update-and-send-events-replacement-expected.txt:

Source/WebCore:

AnimationTimeline would keep track of registered CSS Animations by name for a given element in m_elementToCSSAnimationByName which would map one CSSAnimation
per String (the animation-name) for a given Element. However, within the same animation-name property, the name of a given @keyframes rules may appear more
than once, and the CSS Animations specification explains how to handle this scenario.

We now correctly handle this by replacing m_elementToCSSAnimationByName with the new m_elementToCSSAnimationsCreatedByMarkupMap which simply maps an Element
to a ListHashSet of CSSAnimation objects. Removing the string that appeared in animation-name to create this animation requires us to keep the AnimationList
used for the last style update for sorting purposes, since having multiple instances of the same string would not allow disambiguation when sorting the
KeyframeEffectStack.

So we also replace m_cssAnimationNames, a Vector<String>, with m_cssAnimationList, a RefPtr<const AnimationList>, and use this to compare Animation objects
stored in the AnimationList against the backing animation of each CSSAnimation.

Storing the AnimationList on the KeyframeEffectStack also has the benefit of allowing us to use this as the previous state when updating CSS Animations in
AnimationTimeline::updateCSSAnimationsForElement(). We used to rely on the previous RenderStyle provided to that function, but it's possible that this style
is null and we would unnecessarily create additional CSSAnimation objects for animations that actually were retained since the last time CSS Animations were
invalidated. We now use the stored AnimationList on the invalidated element's KeyframeEffectStack and create a new animation list that will replace the old
list stored in the m_elementToCSSAnimationsCreatedByMarkupMap map for that element. We can also compare the old list with the new list to find out which
animations are no longer current.

Finally, we refactor things a bit to have some new aliases AnimationCollection and CSSAnimationCollection instead of using ListHashSet<> in our types.

* animation/AnimationTimeline.cpp:
(WebCore::AnimationTimeline::animationWasAddedToElement): Use the new AnimationCollection alias.
(WebCore::AnimationTimeline::removeDeclarativeAnimationFromListsForOwningElement): We no longer need to do any work for CSSAnimation here since the
m_elementToCSSAnimationByName map is no more and the m_elementToCSSAnimationsCreatedByMarkupMap that replaces it is updated in updateCSSAnimationsForElement()
and elementWasRemoved().
(WebCore::AnimationTimeline::animationsForElement const): Since animations are correctly sorted accounting for their composite order in KeyframeEffectStack,
call KeyframeEffectStack::sortedEffects() when we're called with Ordering::Sorted.
(WebCore::AnimationTimeline::removeCSSAnimationCreatedByMarkup): New method called by elementWasRemoved() to ensure that when an element is removed, we remove
its CSSAnimation objects from the new m_elementToCSSAnimationsCreatedByMarkupMap and also update the AnimationList on the relevant KeyframeEffectStack.
(WebCore::AnimationTimeline::elementWasRemoved): Call the new removeCSSAnimationCreatedByMarkup() method before canceling a CSSAnimation.
(WebCore::AnimationTimeline::cancelDeclarativeAnimationsForElement): Call the new removeCSSAnimationCreatedByMarkup() method before canceling a CSSAnimation.
(WebCore::AnimationTimeline::updateCSSAnimationsForElement): Use the AnimationList recoreded on the relevant KeyframeEffectStack to determine which CSSAnimation
objects to create, cancel or merely update depending on the AnimationList in the current style.
* animation/AnimationTimeline.h:
* animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::getAnimations const): Use compareAnimationsByCompositeOrder() to correctly sort CSS Animations since they are no longer guaranteed
to be stored in the relevant map in the expected order.
* animation/KeyframeEffectStack.cpp:
(WebCore::KeyframeEffectStack::ensureEffectsAreSorted): Use the new m_cssAnimationList instead of the old m_cssAnimationNames when sorting effects.
(WebCore::KeyframeEffectStack::setCSSAnimationList):
(WebCore::KeyframeEffectStack::setCSSAnimationNames): Deleted.
* animation/KeyframeEffectStack.h:
(WebCore::KeyframeEffectStack::cssAnimationList const):
(WebCore::KeyframeEffectStack::cssAnimationNames const): Deleted.
* animation/WebAnimation.cpp:
(WebCore::WebAnimation::commitStyles): Use the new KeyframeEffectStack::cssAnimationList() instead of the old KeyframeEffectStack::cssAnimationNames().
* animation/WebAnimationUtilities.cpp:
(WebCore::compareAnimationsByCompositeOrder): Update the composite order comparison utility to use an AnimationList rather than a list of animation names.
* animation/WebAnimationUtilities.h:
* platform/animation/AnimationList.h:
(WebCore::AnimationList::copy const):

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

6 months agorun-webkit-tests: Handle case where device socket make handle invalid
jbedard@apple.com [Fri, 24 Jan 2020 17:18:30 +0000 (17:18 +0000)]
run-webkit-tests: Handle case where device socket make handle invalid
https://bugs.webkit.org/show_bug.cgi?id=206707

Reviewed by Stephanie Lewis.

* Scripts/webkitpy/port/simulator_process.py:
(SimulatorProcess.NonBlockingFileFromSocket.close): Catch IOError when closing file.

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

6 months ago[LFC][Painting] Add Display::Run cleanup to TextPainter::clearGlyphDisplayLists
zalan@apple.com [Fri, 24 Jan 2020 16:42:26 +0000 (16:42 +0000)]
[LFC][Painting] Add Display::Run cleanup to TextPainter::clearGlyphDisplayLists
https://bugs.webkit.org/show_bug.cgi?id=206744
<rdar://problem/58867112>

Reviewed by Antti Koivisto.

* rendering/TextPainter.cpp:
(WebCore::TextPainter::clearGlyphDisplayLists):

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

6 months agoWTF: Remove old iOS version macros
jbedard@apple.com [Fri, 24 Jan 2020 16:32:26 +0000 (16:32 +0000)]
WTF: Remove old iOS version macros
https://bugs.webkit.org/show_bug.cgi?id=206634
<rdar://problem/58818561>

Reviewed by Darin Adler.

* wtf/PlatformEnable.h: Remove iOS 12 version macro.
* wtf/PlatformHave.h: Ditto.
* wtf/PlatformUse.h: Ditto.

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

6 months ago[iOS] Add missing sysctl-read permission (already available in macOS sandbox)
bfulgham@apple.com [Fri, 24 Jan 2020 15:58:45 +0000 (15:58 +0000)]
[iOS] Add missing sysctl-read permission (already available in macOS sandbox)
https://bugs.webkit.org/show_bug.cgi?id=206713
<rdar://problem/57665153>

Reviewed by Per Arne Vollan.

Correct a sandbox violation encountered when attempting to log the system hostname.
This was already handled properly on macOS, but the rule was not added to the iOS sandbox.

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

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

6 months ago[LFC][Integration] Clear inline item caches on low memory notification
antti@apple.com [Fri, 24 Jan 2020 15:26:24 +0000 (15:26 +0000)]
[LFC][Integration] Clear inline item caches on low memory notification
https://bugs.webkit.org/show_bug.cgi?id=206740
<rdar://problem/58773905>

Reviewed by Zalan Bujtas.

Clear inline item caches on low memory notification.

* layout/inlineformatting/InlineFormattingState.h:
* layout/integration/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::releaseCaches):
(WebCore::LayoutIntegration::LineLayout::releaseInlineItemCache):
* layout/integration/LayoutIntegrationLineLayout.h:

Remove inline capacity. It is rarely optimal and we can afford the heap allocation.

* page/MemoryRelease.cpp:
(WebCore::releaseNoncriticalMemory):

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

6 months agoFix various non-unified build issues introduced since r254751
aperez@igalia.com [Fri, 24 Jan 2020 15:14:28 +0000 (15:14 +0000)]
Fix various non-unified build issues introduced since r254751
https://bugs.webkit.org/show_bug.cgi?id=206736

Reviewed by Carlos Garcia Campos.

Source/JavaScriptCore:

* tools/CompilerTimingScope.cpp: Add missing inclusions of wtf/Vector.h and wtf/text/WTFString.h

Source/WebCore:

No new tests needed.

* Modules/cache/DOMCacheEngine.cpp: Move errorToException() function out from the file to
make it usable from DOMCacheStorage.cpp
* Modules/cache/DOMCacheEngine.h:
(WebCore::DOMCacheEngine::errorToException): Added.
* Modules/cache/DOMCacheStorage.cpp:
(WebCore::DOMCacheStorage::retrieveCaches): Adapt to use DOMCacheEngine::errorToException().
* platform/graphics/cairo/ImageBufferUtilitiesCairo.cpp: Add missing RefPtrCairo.h inclusion.

Source/WebKit:

* WebProcess/WebPage/WebURLSchemeHandlerProxy.cpp: Add missing WebFrame.h inclusion.

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

6 months ago[GTK] API test runner fails with error: too many open files.
clopez@igalia.com [Fri, 24 Jan 2020 15:14:04 +0000 (15:14 +0000)]
[GTK] API test runner fails with error: too many open files.
https://bugs.webkit.org/show_bug.cgi?id=206743

Reviewed by Carlos Garcia Campos.

The API test runner for google tests was leaking file descriptors because
it was not closing the file descriptor of the pseudo-terminal of the child,
which was referred in the parent because of the forkpty() call.
This was causing a small but constant increase of open file descriptors,
until the point it reached the limit of maximum open files (1024 usually)
causing this error.

Fix that by closing the reference to the fd of the child's pseudo-terminal.

* glib/api_test_runner.py:
(TestRunner._run_google_test):

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

6 months ago[LFC][Integration] LineLayout::paint should take advantage of the glyph display list...
zalan@apple.com [Fri, 24 Jan 2020 14:36:09 +0000 (14:36 +0000)]
[LFC][Integration] LineLayout::paint should take advantage of the glyph display list cache
https://bugs.webkit.org/show_bug.cgi?id=206727
<rdar://problem/58809696>

Reviewed by Antti Koivisto.

* layout/displaytree/DisplayInlineContent.cpp:
(WebCore::Display::InlineContent::~InlineContent):
* layout/displaytree/DisplayInlineContent.h:
* layout/integration/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::paint):

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

6 months agoCentralize AuxiliaryProcessMainBase implementations
don.olmstead@sony.com [Fri, 24 Jan 2020 14:11:26 +0000 (14:11 +0000)]
Centralize AuxiliaryProcessMainBase implementations
https://bugs.webkit.org/show_bug.cgi?id=206700

Reviewed by Carlos Garcia Campos.

Non-Cocoa ports share a common usage of AuxiliaryProcessMainBase but the implementations
don't share a lot of code. This patch centralizes the code and the naming used.

* NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp:
(main):
* NetworkProcess/EntryPoint/win/NetworkProcessMain.cpp:
(main):
* NetworkProcess/NetworkProcessMain.h: Renamed from Source/WebKit/NetworkProcess/win/NetworkProcessMainWin.h.
* NetworkProcess/curl/NetworkProcessMainCurl.cpp: Renamed from Source/WebKit/NetworkProcess/win/NetworkProcessMainWin.cpp.
(WebKit::initializeAuxiliaryProcess<NetworkProcess>):
(WebKit::NetworkProcessMain):
* NetworkProcess/soup/NetworkProcessMainSoup.cpp:
(WebKit::NetworkProcessMain):
(WebKit::NetworkProcessMainUnix): Deleted.
* NetworkProcess/unix/NetworkProcessMainUnix.h: Removed.
* PlatformFTW.cmake:
* PlatformGTK.cmake:
* PlatformWPE.cmake:
* PlatformWin.cmake:
* PluginProcess/EntryPoint/unix/PluginProcessMain.cpp:
(main):
* PluginProcess/PluginProcessMain.h: Renamed from Source/WebKit/PluginProcess/unix/PluginProcessMainUnix.h.
* PluginProcess/unix/PluginProcessMainUnix.cpp:
(WebKit::PluginProcessMain):
(WebKit::PluginProcessMainUnix): Deleted.
* Shared/AuxiliaryProcessMain.h: Renamed from Source/WebKit/Shared/unix/AuxiliaryProcessMain.h.
* WebProcess/EntryPoint/unix/WebProcessMain.cpp:
(main):
* WebProcess/EntryPoint/win/WebProcessMain.cpp:
(main):
* WebProcess/WebProcessMain.h: Renamed from Source/WebKit/WebProcess/win/WebProcessMainWin.h.
* WebProcess/gtk/WebProcessMainGtk.cpp:
(WebKit::WebProcessMain):
(WebKit::WebProcessMainUnix): Deleted.
* WebProcess/playstation/WebProcessMainPlayStation.cpp: Renamed from Source/WebKit/WebProcess/unix/WebProcessMainUnix.h.
(WebKit::WebProcessMain):
* WebProcess/win/WebProcessMainWin.cpp:
(WebKit::WebProcessMain):
(WebKit::WebProcessMainWin): Deleted.
* WebProcess/wpe/WebProcessMainWPE.cpp:
(WebKit::WebProcessMain):
(WebKit::WebProcessMainUnix): Deleted.
* webkitglib-symbols.map:

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

6 months ago[GTK] More unreviewed gardening.
commit-queue@webkit.org [Fri, 24 Jan 2020 13:53:18 +0000 (13:53 +0000)]
[GTK] More unreviewed gardening.
https://bugs.webkit.org/show_bug.cgi?id=206693

Unreviewed gardening.

Patch by Lauro Moura <lmoura@igalia.com> on 2020-01-24

* platform/gtk/TestExpectations:

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

6 months agoLayout Test animations/no-style-recalc-during-accelerated-animation.html is flaky
psaavedra@igalia.com [Fri, 24 Jan 2020 11:32:39 +0000 (11:32 +0000)]
Layout Test animations/no-style-recalc-during-accelerated-animation.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=206733

Unreviewed test gardening.

* platform/gtk/TestExpectations:

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

6 months agoImport 2 sets of grid-align-tests from WPT
commit-queue@webkit.org [Fri, 24 Jan 2020 11:18:05 +0000 (11:18 +0000)]
Import 2 sets of grid-align-tests from WPT
https://bugs.webkit.org/show_bug.cgi?id=206492

Patch by Rossana Monteriso <rmonteriso@igalia.com> on 2020-01-24
Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Add outdated grid-align tests, checked and adapted to the WPT project, to the css-grid/alignment folder for imported tests.
Add also blue-100.png support file inside the css/support folder.
Correct the test description inside <p>, for grid-align-stretching-replaced-items.html.

* web-platform-tests/css/css-grid/alignment/grid-align-content-vertical-lr.html:
* web-platform-tests/css/css-grid/alignment/grid-align-content-vertical-rl.html:
* web-platform-tests/css/css-grid/alignment/grid-align-stretching-replaced-items.html:
* web-platform-tests/css/css-grid/alignment/grid-align-content-vertical-lr-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-align-content-vertical-rl-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-align-stretching-replaced-items-expected.txt:
* web-platform-tests/css/support/blue-100.png:

LayoutTests:

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

* fast/css-grid-layout/grid-align-content-vertical-lr-expected.txt: Removed.
* fast/css-grid-layout/grid-align-content-vertical-rl-expected.txt: Removed.
* fast/css-grid-layout/grid-align-stretching-replaced-items-expected.txt: Removed.
* fast/css-grid-layout/grid-align-stretching-replaced-items.html: Removed.
* fast/css-grid-layout/grid-align-content-vertical-lr.html: Removed.
* fast/css-grid-layout/grid-align-content-vertical-rl.html: Removed.

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

6 months agoFix number of callee saved register count on MIPS
commit-queue@webkit.org [Fri, 24 Jan 2020 11:17:17 +0000 (11:17 +0000)]
Fix number of callee saved register count on MIPS
https://bugs.webkit.org/show_bug.cgi?id=206732

Patch by Paulo Matos <pmatos@igalia.com> on 2020-01-24
Reviewed by Žan Doberšek.

MIPS has been issuing illegal instruction errors due to stack corruption.
This is caused by an incorrect number of CalleeSaveRegisterCount
that should be set to 3 since r254674.

* llint/LowLevelInterpreter.asm:

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

6 months agoUnreviewed WPE dependency bump.
zandobersek@gmail.com [Fri, 24 Jan 2020 10:52:16 +0000 (10:52 +0000)]
Unreviewed WPE dependency bump.

* wpe/jhbuild.modules: Bump the libwpe checkout commit to include fixes
for configuration errors that can occur with older (but still supported)
CMake versions.

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

6 months agoUnreviewed GTK gardening. Mark /webkit/WebKitWebPage/get-uri as flaky
carlosgc@webkit.org [Fri, 24 Jan 2020 09:03:32 +0000 (09:03 +0000)]
Unreviewed GTK gardening. Mark /webkit/WebKitWebPage/get-uri as flaky

* TestWebKitAPI/glib/TestExpectations.json:

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

6 months ago[GTK] Reduce the maximum time we wait for draw events in DrawingMonitor
carlosgc@webkit.org [Fri, 24 Jan 2020 08:47:39 +0000 (08:47 +0000)]
[GTK] Reduce the maximum time we wait for draw events in DrawingMonitor
https://bugs.webkit.org/show_bug.cgi?id=206662

Reviewed by Carlos Alberto Lopez Perez.

1 second is too much, we can wait up to 100_ms instead and wait for the next frame after 16_ms. We should also
ensure there's a draw event since this is called from dispatchAfterEnsuringDrawing().

* UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:
(WebKit::DrawingAreaProxyCoordinatedGraphics::DrawingMonitor::start):
(WebKit::DrawingAreaProxyCoordinatedGraphics::DrawingMonitor::didDraw):

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

6 months ago:matches() doesn't combine correctly with pseudo elements
antti@apple.com [Fri, 24 Jan 2020 08:37:08 +0000 (08:37 +0000)]
:matches() doesn't combine correctly with pseudo elements
https://bugs.webkit.org/show_bug.cgi?id=206654

Reviewed by Simon Fraser.

Source/WebCore:

:matches() has been renamed to :is() in the spec (https://www.w3.org/TR/selectors-4/#matches).
Update the :matches implementation to spec behavior regarding pseudo element handling.

"Pseudo-elements cannot be represented by the matches-any pseudo-class; they are not valid within :is()."

Selectors like

    ::matches(foo, .parent .child)::first-letter

should work while

    ::matches(:first-letter)

shoudn't match anything.

Test: fast/selectors/matches-with-pseudo-element.html

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::matchRecursively const):
(WebCore::SelectorChecker::checkOne const):

Don't provide pseudoId into ::matches subselectors. Pseudo elements are not suppported inside ::matches.
If one if found, fail that subselector.

* css/SelectorChecker.h:

LayoutTests:

* TestExpectations:

Unskip fast/css/first-letter-and-float-crash.html which no longer hits assert due to this.

* fast/selectors/matches-with-pseudo-element-expected.html: Added.
* fast/selectors/matches-with-pseudo-element.html: Added.
* fast/css/currentColor-on-before-after-pseudo-elements.html:
* fast/css/matches-specificity-5.html:
* fast/selectors/pseudo-element-inside-matches-expected.html:
* fast/selectors/pseudo-element-inside-matches.html:

Update the existing tests to match the behavior.

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

6 months agoMake sure fetch tasks go to network if service worker never gets to activated
youenn@apple.com [Fri, 24 Jan 2020 08:23:07 +0000 (08:23 +0000)]
Make sure fetch tasks go to network if service worker never gets to activated
https://bugs.webkit.org/show_bug.cgi?id=206648

Reviewed by Chris Dumez.

Source/WebCore:

In case worker context process crashes, the SWServerWorker gets set to NotRunning.
If the SWServerWorker has pending activating completion handlers, they will never be called until the worker is destroyed.
But the worker may never be destroyed until its registration is destroyed.
This may trigger service worker fetch task hangs.

To fix this, make sure to call activating completion handlers whenever the SWServerWorker state is changed to either Terminating or NotRunning.

Covered by updated test.

* workers/service/server/SWServerWorker.cpp:
(WebCore::SWServerWorker::~SWServerWorker):
(WebCore::SWServerWorker::whenActivated):
(WebCore::SWServerWorker::setState):
* workers/service/server/SWServerWorker.h:

Source/WebKit:

In case activating completion handlers are not called, the fetch task timeout should kick in and make the load go to network process.
The issue is that our code was using the context connection to do so.
If the fetch task is waiting for the worker activation, the context connection might not be set and the timeout will be a no-op.

To fix this, the fetch task will do as if its context is closed when the timeout fires.
The fetck task now has a weak pointer to the WebSWServerConnection and will use to terminate the service worker as done previously.

We no longer handle all ongoing fetch tasks of the ongoing service worker.
Each individual fetch task timeout provides the same level of protection.
The service worker will anyway get terminated which will race to finalize the service worker fetch tasks with each of their timeout.

* NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:
(WebKit::ServiceWorkerFetchTask::ServiceWorkerFetchTask):
(WebKit::ServiceWorkerFetchTask::timeoutTimerFired):
* NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h:
* NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::createFetchTask):
(WebKit::WebSWServerConnection::fetchTaskTimedOut):
* NetworkProcess/ServiceWorker/WebSWServerConnection.h:
* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
(WebKit::WebSWServerToContextConnection::fetchTaskTimedOut):

LayoutTests:

* http/wpt/service-workers/service-worker-spinning-activate.https-expected.txt:
* http/wpt/service-workers/service-worker-spinning-activate.https.html:

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

6 months agoMake sure DOMCacheStorage::retrieveCaches always calls its completionHandler
youenn@apple.com [Fri, 24 Jan 2020 08:19:26 +0000 (08:19 +0000)]
Make sure DOMCacheStorage::retrieveCaches always calls its completionHandler
https://bugs.webkit.org/show_bug.cgi?id=206647

Reviewed by Chris Dumez.

* Modules/cache/DOMCacheStorage.cpp:
(WebCore::DOMCacheStorage::retrieveCaches):
In case of context being stopped, make sure the completion handler is still called.

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

6 months agoUnreviewed, a follow up on r254894
jiewen_tan@apple.com [Fri, 24 Jan 2020 06:37:35 +0000 (06:37 +0000)]
Unreviewed, a follow up on r254894

* UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:
(WebKit::MockLocalConnection::getAttestation const):
Includes the status code in the message.

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

6 months ago[JSC] DFG OSR exit is not marking CodeBlock::m_hasLinkedOSRExit when the exit target...
ysuzuki@apple.com [Fri, 24 Jan 2020 06:09:48 +0000 (06:09 +0000)]
[JSC] DFG OSR exit is not marking CodeBlock::m_hasLinkedOSRExit when the exit target is checkpoint
https://bugs.webkit.org/show_bug.cgi?id=206726
<rdar://problem/58827849>

Reviewed by Saam Barati.

JSTests:

* stress/exit-target-code-block-can-be-changed-between-llint-and-baseline.js: Added.
(bar):
(foo):

Source/JavaScriptCore:

The problem was that DFG OSR exit is not marking CodeBlock::m_hasLinkedOSRExit appropriately when an exit target bytecode-index is a checkpoint.
Let's consider the following scenario.

    1. The caller CodeBlock "A" has Baseline code.
    2. Compile DFG code exiting to the checkpoint of "A". We are not marking "A"'s CodeBlock::m_hasLinkedOSRExit.
    3. GC happens and we decide dropping Baseline code for "A" since it is not marked. Switching it to LLInt.
    4. However, DFG OSR exit code is compiled by assuming that "A" is Baseline. So LLInt registers are not recovered correctly.
    5. Then, exiting to LLInt of "A", LLInt sees that LLInt registers have garbage.

In this patch, we correctly set a bit of CodeBlock::m_hasLinkedOSRExit when the exit target is checkpoint.

* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::callerReturnPC):

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

6 months ago[iOS] Support setting minimum effective device width during dynamic viewport size...
wenson_hsieh@apple.com [Fri, 24 Jan 2020 05:55:54 +0000 (05:55 +0000)]
[iOS] Support setting minimum effective device width during dynamic viewport size updates
https://bugs.webkit.org/show_bug.cgi?id=206709
<rdar://problem/58713872>

Reviewed by Tim Horton.

Source/WebKit:

Changes to minimum effective device width are currently always propagated to the web process via out-of-band
updates to the web process. During animated resize, Safari currently changes the minimum effective device width
prior to updating the view size; this causes the viewport configuration to temporarily be in a state where the
new value for minimum effective device width is used, but the old viewport width and height are still used.

This subsequently breaks existing logic in WebPage::dynamicViewportSizeUpdate that attempts to keep the portion
of the unobscured content width that is visible consistent before and after rotation (see
visibleHorizontalFraction), since that code will be mislead into believing that the wrong fraction of content
width is visible.

To fix this, we roll minimum effective device width changes along with view size (and other attributes) in
dynamic viewport size updates.

Test: WebKit.ChangeFrameAndMinimumEffectiveDeviceWidthDuringAnimatedResize

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setViewScale:]):
(-[WKWebView _setMinimumEffectiveDeviceWidth:]):

During animated resize, just set m_minimumEffectiveDeviceWidth without notifying the web process; if the value
changed during the update block, we send the new minimum effective device width to the web page as a part of
the dynamic viewport size update.

Also, make a drive-by adjustment to use `_page->viewLayoutSize()` instead of recomputing the active layout
bounds when we know that only the minimum effective device width is changing. We also apply the same adjustment
above, in -_setViewScale:.

* UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::viewLayoutSize const):
(WebKit::WebPageProxy::setMinimumEffectiveDeviceWidthWithoutViewportConfigurationUpdate):

Add a helper method to update the minimum effective device width without updating the viewport configuration in
the web process. This is only used when the minimum effective device width is specified in the middle of a
dynamic viewport size update (i.e. animated resize).

* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::dynamicViewportSizeUpdate):

Plumb the new minimum effective device width over to the web process as a part of the dynamic viewport size
update, and update both the new view size and minimum effective device width on the viewport configuration at
the same time.

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dynamicViewportSizeUpdate):

Tools:

Adds a new API test that changes both the effective minimum device width and view size during animated resize.

* TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm:

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

6 months agoUnreviewed, build fix for Windows
ysuzuki@apple.com [Fri, 24 Jan 2020 05:41:56 +0000 (05:41 +0000)]
Unreviewed, build fix for Windows
https://bugs.webkit.org/show_bug.cgi?id=206706

Definition still existed.

* parser/Parser.h:

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

6 months agoBreak the dependency between jsc and DerivedSources
rmorisset@apple.com [Fri, 24 Jan 2020 04:52:29 +0000 (04:52 +0000)]
Break the dependency between jsc and DerivedSources
https://bugs.webkit.org/show_bug.cgi?id=206720

Reviewed by Mark Lam.

According to Tadeu, the slowdown of production builds (by more than 20%) when he landed his bytecode patch was caused by a new dependency of the jsc binary on DerivedSources/, which was needed because of DerivedSources/BytecodeStructs.h being included in CommonSlowPaths.h which is transitively included in jsc.cpp.
Now that BytecodeStructs.h is no longer included in CommonSlowPaths.h (see https://bugs.webkit.org/show_bug.cgi?id=206566), I'm trying to break the dependency, to recover from this compile time regression.

* Configurations/JSC.xcconfig:
* JavaScriptCore.xcodeproj/project.pbxproj:

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

6 months agoRemove dead option useFTLTBAA
rmorisset@apple.com [Fri, 24 Jan 2020 04:24:50 +0000 (04:24 +0000)]
Remove dead option useFTLTBAA
https://bugs.webkit.org/show_bug.cgi?id=206725

Reviewed by Mark Lam.

It is likely from when the FTL used LLVM, before B3/Air were written, making this option completely obsolete (and it is currently unused).

* runtime/OptionsList.h:

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

6 months ago[Cocoa] Media mime types map should be created in the UI process
pvollan@apple.com [Fri, 24 Jan 2020 03:18:55 +0000 (03:18 +0000)]
[Cocoa] Media mime types map should be created in the UI process
https://bugs.webkit.org/show_bug.cgi?id=206478

Reviewed by Darin Adler.

Source/WebCore:

Creating this map in the WebContent process will access the launch services daemon, which will be blocked.
This patch creates the map in the UI process and sends it to the WebContent process as part of the WebProcess
creation parameters.

API test: WebKit.MimeTypes

* platform/MIMETypeRegistry.cpp:
(WebCore::overriddenMimeTypesMap):
(WebCore::commonMediaTypes):
(WebCore::commonMimeTypesMap):
(WebCore::typesForCommonExtension):
* platform/MIMETypeRegistry.h:
* testing/Internals.cpp:
(WebCore::Internals::mediaMIMETypeForExtension):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

Send the mime type map from the UI process to the WebContent process as part of the
WebProcess creation parameters.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/MimeTypes.mm: Added.
(TEST):

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

6 months agoRemove some unneeded definitions from Platform.h family headers
darin@apple.com [Fri, 24 Jan 2020 03:11:08 +0000 (03:11 +0000)]
Remove some unneeded definitions from Platform.h family headers
https://bugs.webkit.org/show_bug.cgi?id=206642

Reviewed by Eric Carlson.

Source/WebCore:

* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h: Removed
checks of HAVE(AVFOUNDATION_MEDIA_SELECTION_GROUP) and
HAVE(AVFOUNDATION_VIDEO_OUTPUT) because both are always 1 on Cocoa platforms,
and this is Cocoa-only source code.
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm: Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: Ditto.

Source/WebCore/PAL:

* pal/spi/cf/CFNetworkSPI.h: Remove
HAVE(CFNETWORK_WITH_CONTENT_ENCODING_SNIFFING_OVERRIDE) because it was
always 1 on Cocoa platforms, and was guarding a definition that we
use unconditionally in Objective-C Cocoa-only code, and there is no
harm of defining it on Windows as long as we don't use it.

* pal/spi/cocoa/PassKitSPI.h: Remove HAVE(PASSKIT_API_TYPE) because
it was always 1 on Cocoa platforms and this is a Cocoa-only header.

Source/WebKit:

* Platform/cocoa/PaymentAuthorizationViewController.mm:
(-[WKPaymentAuthorizationViewControllerDelegate _getPaymentServicesMerchantURL:]):
Removed HAVE(PASSKIT_API_TYPE) because it's always 1 on Cocoa platforms and this
is Cocoa-only code.
* Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::toAPIType): Ditto.
(WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest): Ditto.

Source/WTF:

* wtf/PlatformEnable.h:
Removed ENABLE_RESPECT_EXIF_ORIENTATION because it was unused.

* wtf/PlatformHave.h:
Removed HAVE_PASSKIT_API_TYPE because it is now unused.
Removed HAVE_MERGESORT because it was unused.
Removed HAVE_AVFOUNDATION_VIDEO_OUTPUT because it is now unused.
Removed HAVE_AVFOUNDATION_MEDIA_SELECTION_GROUP because it is now unused.
Removed HAVE_CFNETWORK_WITH_CONTENT_ENCODING_SNIFFING_OVERRIDE because it was unused.

* wtf/PlatformUse.h:
Removed USE_ARENA_ALLOC_ALIGNMENT_INTEGER because it was unused.
Removed USE_NETWORK_CFDATA_ARRAY_CALLBACK because it is now unused.

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

6 months agoRemove dead options "dumpAllDFGNodes"/"showAllDFGNodes"
rmorisset@apple.com [Fri, 24 Jan 2020 02:57:12 +0000 (02:57 +0000)]
Remove dead options "dumpAllDFGNodes"/"showAllDFGNodes"
https://bugs.webkit.org/show_bug.cgi?id=204372

Reviewed by Keith Miller.

* runtime/OptionsList.h:

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

6 months agoGet rid of didFinishParsing and make parseInner return its results
sbarati@apple.com [Fri, 24 Jan 2020 02:54:37 +0000 (02:54 +0000)]
Get rid of didFinishParsing and make parseInner return its results
https://bugs.webkit.org/show_bug.cgi?id=206706

Reviewed by Mark Lam and Keith Miller and Yusuke Suzuki.

This is paving the way for eagerly parsing immediately invoked functions.
Before, we'd just end up setting member fields inside ::didFinishParsing,
and then read them out inside ::parse. However, this is not going to work
when we are in a world where we're generating AST nodes for more than one
function at a time. This patch paves the way for that.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::Parser):
(JSC::Parser<LexerType>::parseInner):
(JSC::Parser<LexerType>::didFinishParsing): Deleted.
* parser/Parser.h:
(JSC::Parser<LexerType>::parse):

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

6 months agomacCatalyst: I-Beam is too conservative, doesn't show up in editable areas with no...
timothy_horton@apple.com [Fri, 24 Jan 2020 02:22:11 +0000 (02:22 +0000)]
macCatalyst: I-Beam is too conservative, doesn't show up in editable areas with no text
https://bugs.webkit.org/show_bug.cgi?id=206716
<rdar://problem/58359523>

Reviewed by Simon Fraser.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::lineCaretExtent):
(WebKit::populateCaretContext):
(WebKit::WebPage::positionInformation):
Instead of uniting the caret position for the first and last position
on the line to find the I-Beam region, use the bounds of the selection
rect for the line, which extends beyond existing text, matching our
traditional behavior of showing the I-Beam over blank regions.

* editing/VisiblePosition.cpp:
(WebCore::VisiblePosition::absoluteSelectionBoundsForLine const):
* editing/VisiblePosition.h:
Expose the bounds of the possible selection for the line that the given position belongs to.

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

6 months agoSet proper TextureMapperLayer::m_contentsLayer in updateImageBacking
Hironori.Fujii@sony.com [Fri, 24 Jan 2020 02:04:09 +0000 (02:04 +0000)]
Set proper TextureMapperLayer::m_contentsLayer in updateImageBacking
https://bugs.webkit.org/show_bug.cgi?id=206212

Patch by Tomoki Imai <Tomoki.Imai@sony.com> on 2020-01-23
Reviewed by Žan Doberšek.

There is a chance to set a wrong TextureMapperLayer::m_contentsLayer.
It occurs when
- The previous content layer is removed, and it doesn't have the next content layer. (layerState.contentLayer == nullptr)
- It has an image backing, which is not visible. (layerState.imageBacking != nullptr, entry.update.isVisible == false)
In that case, it didn't call TextureMapperLayer::setContentsLayer(nullptr) even if it doesn't have a new content layer.

This patch set TextureMapperLayer::m_contentsLayer in updateImageBacking regardless of the visibility.
setBackingStore is not needed in updateImageBacking, as it should be handle only by layerState.backingStore.

Should be covered by the existing testcases.

* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::updateImageBacking): Call TextureMapperLayer::setContentsLayer(nullptr) instead of TextureMapperLayer::setBackingStore(nullptr) when it's not visible.

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

6 months agoUse the same AccessibilityObjectWrapper for associated AXObject and AXIsolatedObject.
andresg_22@apple.com [Fri, 24 Jan 2020 01:48:30 +0000 (01:48 +0000)]
Use the same AccessibilityObjectWrapper for associated AXObject and AXIsolatedObject.
https://bugs.webkit.org/show_bug.cgi?id=206384

Reviewed by Chris Fleizach.

Associated AXObject and AXIsolatedObject need to share the same
AccessibilityObjectWrapper in order for accessibility clients to work
properly. This change implements Chris Fleizach's original approach to
have both the AXObject and IsolatedObject in the same wrapper. This
approach allows the event notification code to remain the same in
isolated tree mode, and minimizes lock contention between the main and
AX threads.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::cacheAndInitializeWrapper): Utility method that encapsulates these operations performed in the getOrCreate methods.
(WebCore::AXObjectCache::getOrCreate):
(WebCore::AXObjectCache::createIsolatedTreeHierarchy): Attaches to the IsolatedObject the same wrapper as its associated AXObject.
* accessibility/AXObjectCache.h:
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: Instead of accessing the backing object directly (m_object) or through the macro _axBackingObject, uses self.axBackingObject.
(AccessibilityUnignoredAncestor):
(-[WebAccessibilityTextMarker initWithData:accessibilityObject:]):
(-[WebAccessibilityObjectWrapper detach]):
(-[WebAccessibilityObjectWrapper dealloc]):
(-[WebAccessibilityObjectWrapper _prepareAccessibilityCall]):
(-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
(-[WebAccessibilityObjectWrapper accessibilityHitTest:]):
(-[WebAccessibilityObjectWrapper enableAttributeCaching]):
(-[WebAccessibilityObjectWrapper disableAttributeCaching]):
(-[WebAccessibilityObjectWrapper accessibilityElementCount]):
(-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):
(-[WebAccessibilityObjectWrapper indexOfAccessibilityElement:]):
(-[WebAccessibilityObjectWrapper _accessibilityPath]):
(-[WebAccessibilityObjectWrapper accessibilityHasPopup]):
(-[WebAccessibilityObjectWrapper accessibilityPopupValue]):
(-[WebAccessibilityObjectWrapper accessibilityLanguage]):
(-[WebAccessibilityObjectWrapper accessibilityIsDialog]):
(-[WebAccessibilityObjectWrapper _accessibilityTreeAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityListAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityArticleAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityLandmarkAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityIsInTableCell]):
(-[WebAccessibilityObjectWrapper _accessibilityFieldsetAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityFrameAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):
(-[WebAccessibilityObjectWrapper accessibilityIsWebInteractiveVideo]):
(-[WebAccessibilityObjectWrapper interactiveVideoDescription]):
(-[WebAccessibilityObjectWrapper accessibilityIsMediaPlaying]):
(-[WebAccessibilityObjectWrapper accessibilityIsMediaMuted]):
(-[WebAccessibilityObjectWrapper accessibilityToggleMuteForMedia]):
(-[WebAccessibilityObjectWrapper accessibilityVideoEnterFullscreen]):
(-[WebAccessibilityObjectWrapper _accessibilityTextEntryTraits]):
(-[WebAccessibilityObjectWrapper accessibilityTraits]):
(-[WebAccessibilityObjectWrapper isSVGGroupElement]):
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
(-[WebAccessibilityObjectWrapper stringValueShouldBeUsedInLabel]):
(-[WebAccessibilityObjectWrapper _accessibilityHasTouchEventListener]):
(-[WebAccessibilityObjectWrapper _accessibilityValueIsAutofilled]):
(-[WebAccessibilityObjectWrapper _accessibilityIsStrongPasswordField]):
(-[WebAccessibilityObjectWrapper _accessibilityMinValue]):
(-[WebAccessibilityObjectWrapper _accessibilityMaxValue]):
(-[WebAccessibilityObjectWrapper accessibilityRoleDescription]):
(-[WebAccessibilityObjectWrapper accessibilityLabel]):
(-[WebAccessibilityObjectWrapper tableCellParent]):
(-[WebAccessibilityObjectWrapper tableParent]):
(-[WebAccessibilityObjectWrapper accessibilityTitleElement]):
(-[WebAccessibilityObjectWrapper accessibilityRowRange]):
(-[WebAccessibilityObjectWrapper accessibilityBlockquoteLevel]):
(-[WebAccessibilityObjectWrapper accessibilityDatetimeValue]):
(-[WebAccessibilityObjectWrapper accessibilityPlaceholderValue]):
(-[WebAccessibilityObjectWrapper accessibilityColorStringValue]):
(-[WebAccessibilityObjectWrapper accessibilityValue]):
(-[WebAccessibilityObjectWrapper accessibilityIsAttachmentElement]):
(-[WebAccessibilityObjectWrapper accessibilityIsComboBox]):
(-[WebAccessibilityObjectWrapper accessibilityHint]):
(-[WebAccessibilityObjectWrapper accessibilityURL]):
(-[WebAccessibilityObjectWrapper _accessibilityScrollToVisible]):
(-[WebAccessibilityObjectWrapper accessibilityScroll:]):
(-[WebAccessibilityObjectWrapper _accessibilityRelativeFrame]):
(-[WebAccessibilityObjectWrapper accessibilityElementRect]):
(-[WebAccessibilityObjectWrapper accessibilityVisibleContentRect]):
(-[WebAccessibilityObjectWrapper accessibilityActivationPoint]):
(-[WebAccessibilityObjectWrapper accessibilityFrame]):
(-[WebAccessibilityObjectWrapper containsUnnaturallySegmentedChildren]):
(-[WebAccessibilityObjectWrapper accessibilityContainer]):
(-[WebAccessibilityObjectWrapper accessibilityFocusedUIElement]):
(-[WebAccessibilityObjectWrapper _accessibilityWebDocumentView]):
(-[WebAccessibilityObjectWrapper accessibilityCanSetValue]):
(-[WebAccessibilityObjectWrapper accessibilityLinkRelationshipType]):
(-[WebAccessibilityObjectWrapper accessibilityRequired]):
(-[WebAccessibilityObjectWrapper accessibilityFlowToElements]):
(-[WebAccessibilityObjectWrapper accessibilityLinkedElement]):
(-[WebAccessibilityObjectWrapper isAttachment]):
(-[WebAccessibilityObjectWrapper accessibilityTextualContext]):
(-[WebAccessibilityObjectWrapper _accessibilityActivate]):
(-[WebAccessibilityObjectWrapper attachmentView]):
(-[WebAccessibilityObjectWrapper _accessibilityScrollPosition]):
(-[WebAccessibilityObjectWrapper _accessibilityScrollSize]):
(-[WebAccessibilityObjectWrapper _accessibilityScrollVisibleRect]):
(-[WebAccessibilityObjectWrapper accessibilityFindMatchingObjects:]):
(-[WebAccessibilityObjectWrapper accessibilityModifySelection:increase:]):
(-[WebAccessibilityObjectWrapper accessibilityMoveSelectionToMarker:]):
(-[WebAccessibilityObjectWrapper accessibilityIncrement]):
(-[WebAccessibilityObjectWrapper accessibilityDecrement]):
(-[WebAccessibilityObjectWrapper _accessibilitySetValue:]):
(-[WebAccessibilityObjectWrapper stringForTextMarkers:]):
(-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
(-[WebAccessibilityObjectWrapper _convertToNSRange:]):
(-[WebAccessibilityObjectWrapper _convertToDOMRange:]):
(-[WebAccessibilityObjectWrapper positionForTextMarker:]):
(-[WebAccessibilityObjectWrapper textMarkerRange]):
(-[WebAccessibilityObjectWrapper textMarkerRangeForSelection]):
(-[WebAccessibilityObjectWrapper textMarkerForPosition:]):
(-[WebAccessibilityObjectWrapper stringForRange:]):
(-[WebAccessibilityObjectWrapper _accessibilitySelectedTextRange]):
(-[WebAccessibilityObjectWrapper _accessibilitySetSelectedTextRange:]):
(-[WebAccessibilityObjectWrapper accessibilityReplaceRange:withText:]):
(-[WebAccessibilityObjectWrapper accessibilityInsertText:]):
(-[WebAccessibilityObjectWrapper selectedTextMarker]):
(-[WebAccessibilityObjectWrapper lineEndMarkerForMarker:]):
(-[WebAccessibilityObjectWrapper lineStartMarkerForMarker:]):
(-[WebAccessibilityObjectWrapper misspellingTextMarkerRange:forward:]):
(-[WebAccessibilityObjectWrapper frameForTextMarkers:]):
(-[WebAccessibilityObjectWrapper rangeFromMarkers:withText:]):
(-[WebAccessibilityObjectWrapper textMarkerForPoint:]):
(-[WebAccessibilityObjectWrapper nextMarkerForCharacterOffset:]):
(-[WebAccessibilityObjectWrapper previousMarkerForCharacterOffset:]):
(-[WebAccessibilityObjectWrapper rangeForTextMarkers:]):
(-[WebAccessibilityObjectWrapper startOrEndTextMarkerForTextMarkers:isStart:]):
(-[WebAccessibilityObjectWrapper textMarkersForRange:]):
(-[WebAccessibilityObjectWrapper accessibilityExpandedTextValue]):
(-[WebAccessibilityObjectWrapper accessibilityIdentifier]):
(-[WebAccessibilityObjectWrapper accessibilityARIAIsBusy]):
(-[WebAccessibilityObjectWrapper accessibilityARIALiveRegionStatus]):
(-[WebAccessibilityObjectWrapper accessibilityARIARelevantStatus]):
(-[WebAccessibilityObjectWrapper accessibilityARIALiveRegionIsAtomic]):
(-[WebAccessibilityObjectWrapper accessibilitySupportsARIAPressed]):
(-[WebAccessibilityObjectWrapper accessibilityIsPressed]):
(-[WebAccessibilityObjectWrapper accessibilitySupportsARIAExpanded]):
(-[WebAccessibilityObjectWrapper accessibilityIsExpanded]):
(-[WebAccessibilityObjectWrapper accessibilityIsShowingValidationMessage]):
(-[WebAccessibilityObjectWrapper accessibilityInvalidStatus]):
(-[WebAccessibilityObjectWrapper accessibilityARIACurrentStatus]):
(-[WebAccessibilityObjectWrapper accessibilitySortDirection]):
(-[WebAccessibilityObjectWrapper accessibilityMathRootIndexObject]):
(-[WebAccessibilityObjectWrapper accessibilityMathRadicandObject]):
(-[WebAccessibilityObjectWrapper accessibilityMathNumeratorObject]):
(-[WebAccessibilityObjectWrapper accessibilityMathDenominatorObject]):
(-[WebAccessibilityObjectWrapper accessibilityMathBaseObject]):
(-[WebAccessibilityObjectWrapper accessibilityMathSubscriptObject]):
(-[WebAccessibilityObjectWrapper accessibilityMathSuperscriptObject]):
(-[WebAccessibilityObjectWrapper accessibilityMathUnderObject]):
(-[WebAccessibilityObjectWrapper accessibilityMathOverObject]):
(-[WebAccessibilityObjectWrapper accessibilityMathFencedOpenString]):
(-[WebAccessibilityObjectWrapper accessibilityMathFencedCloseString]):
(-[WebAccessibilityObjectWrapper accessibilityIsMathTopObject]):
(-[WebAccessibilityObjectWrapper accessibilityMathLineThickness]):
(-[WebAccessibilityObjectWrapper accessibilityMathType]):
(-[WebAccessibilityObjectWrapper accessibilityClickPoint]):
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::attachWrapper): Attaches the given IsolatedObject and wrapper.
* accessibility/mac/WebAccessibilityObjectWrapperBase.h:
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(-[WebAccessibilityObjectWrapperBase initWithAccessibilityObject:]):
(-[WebAccessibilityObjectWrapperBase attachAXObject:]):
(-[WebAccessibilityObjectWrapperBase attachIsolatedObject:]):
(-[WebAccessibilityObjectWrapperBase detach]):
(-[WebAccessibilityObjectWrapperBase updateObjectBackingStore]):
(-[WebAccessibilityObjectWrapperBase baseAccessibilityTitle]):
(-[WebAccessibilityObjectWrapperBase axBackingObject]):
(-[WebAccessibilityObjectWrapperBase baseAccessibilityDescription]):
(-[WebAccessibilityObjectWrapperBase baseAccessibilitySpeechHint]):
(-[WebAccessibilityObjectWrapperBase baseAccessibilityHelpText]):
(-[WebAccessibilityObjectWrapperBase convertRectToSpace:space:]):
(-[WebAccessibilityObjectWrapperBase ariaLandmarkRoleDescription]):
(-[WebAccessibilityObjectWrapperBase baseAccessibilitySetFocus:]):
(-[WebAccessibilityObjectWrapperBase accessibilityMathPostscriptPairs]):
(-[WebAccessibilityObjectWrapperBase accessibilityMathPrescriptPairs]):
(accessibilitySearchCriteriaForSearchPredicateParameterizedAttribute):
(-[WebAccessibilityObjectWrapperBase accessibilityObject]): Deleted, axBackingObject should be used instead.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm: Instead of accessing the backing object directly (m_object) or through the macro _axBackingObject, uses self.axBackingObject.
(-[WebAccessibilityObjectWrapper attachmentView]):
(-[WebAccessibilityObjectWrapper screenToContents:]):
(-[WebAccessibilityObjectWrapper accessibilityObjectForTextMarker:]):
(-[WebAccessibilityObjectWrapper textMarkerRangeFromRange:]):
(-[WebAccessibilityObjectWrapper startOrEndTextMarkerForRange:isStart:]):
(-[WebAccessibilityObjectWrapper nextTextMarkerForCharacterOffset:]):
(-[WebAccessibilityObjectWrapper previousTextMarkerForCharacterOffset:]):
(-[WebAccessibilityObjectWrapper textMarkerForCharacterOffset:]):
(-[WebAccessibilityObjectWrapper rangeForTextMarkerRange:]):
(-[WebAccessibilityObjectWrapper characterOffsetForTextMarker:]):
(-[WebAccessibilityObjectWrapper textMarkerForVisiblePosition:]):
(-[WebAccessibilityObjectWrapper textMarkerForFirstPositionInTextControl:]):
(-[WebAccessibilityObjectWrapper visiblePositionForTextMarker:]):
(-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
(-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
(-[WebAccessibilityObjectWrapper ALLOW_DEPRECATED_IMPLEMENTATIONS_END]):
(-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper visiblePositionRangeForTextMarkerRange:]):
(-[WebAccessibilityObjectWrapper renderWidgetChildren]):
(-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]):
(convertToVector):
(-[WebAccessibilityObjectWrapper textMarkerRangeForSelection]):
(-[WebAccessibilityObjectWrapper associatedPluginParent]):
(-[WebAccessibilityObjectWrapper path]):
(-[WebAccessibilityObjectWrapper childrenVectorSize]):
(-[WebAccessibilityObjectWrapper childrenVectorArray]):
(-[WebAccessibilityObjectWrapper position]):
(-[WebAccessibilityObjectWrapper role]):
(-[WebAccessibilityObjectWrapper subrole]):
(-[WebAccessibilityObjectWrapper roleDescription]):
(-[WebAccessibilityObjectWrapper computedRoleString]):
(-[WebAccessibilityObjectWrapper scrollViewParent]):
(-[WebAccessibilityObjectWrapper valueDescriptionForMeter]):
(-[WebAccessibilityObjectWrapper windowElement:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilityFocusedUIElement]):
(-[WebAccessibilityObjectWrapper accessibilityHitTest:]):
(-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
(-[WebAccessibilityObjectWrapper _accessibilityPerformPressAction]):
(-[WebAccessibilityObjectWrapper _accessibilityPerformIncrementAction]):
(-[WebAccessibilityObjectWrapper _accessibilityPerformDecrementAction]):
(-[WebAccessibilityObjectWrapper accessibilityPerformShowMenuAction]):
(-[WebAccessibilityObjectWrapper _accessibilityShowContextMenu]):
(-[WebAccessibilityObjectWrapper accessibilityScrollToVisible]):
(-[WebAccessibilityObjectWrapper _accessibilityScrollToMakeVisibleWithSubFocus:]):
(-[WebAccessibilityObjectWrapper _accessibilityScrollToGlobalPoint:]):
(-[WebAccessibilityObjectWrapper accessibilityReplaceRange:withText:]):
(-[WebAccessibilityObjectWrapper accessibilityInsertText:]):
(-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
(-[WebAccessibilityObjectWrapper doAXAttributedStringForRange:]):
(-[WebAccessibilityObjectWrapper _convertToNSRange:]):
(-[WebAccessibilityObjectWrapper _indexForTextMarker:]):
(-[WebAccessibilityObjectWrapper _textMarkerForIndex:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
(-[WebAccessibilityObjectWrapper accessibilityIndexOfChild:]):
(-[WebAccessibilityObjectWrapper accessibilityArrayAttributeCount:]):
(-[WebAccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):

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

6 months ago[EME] Key renewal fails when using AVContentKeyReportGroup
commit-queue@webkit.org [Fri, 24 Jan 2020 01:20:33 +0000 (01:20 +0000)]
[EME] Key renewal fails when using AVContentKeyReportGroup
https://bugs.webkit.org/show_bug.cgi?id=206694
<rdar://problem/58628345>

Patch by Jer Noble <jer.noble@apple.com> on 2020-01-23
Reviewed by Eric Carlson.

When a CDMInstanceSession has a AVContentKeyReportGroup, it doesn't have an AVContentKeySession; it has
to get the session from it's parent CDMInstance to request key renewal.

* platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense):

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

6 months agoAdd a variant of -selectPositionAtPoint that can select an arbitrary point
dbates@webkit.org [Fri, 24 Jan 2020 00:10:54 +0000 (00:10 +0000)]
Add a variant of -selectPositionAtPoint that can select an arbitrary point
https://bugs.webkit.org/show_bug.cgi?id=206712

Reviewed by Wenson Hsieh.

Adds a variant of -selectPositionAtPoint, called _selectPositionAtPoint, that takes a boolean
as to whether to constrain the specified point to stay within the focused element. I will
make use of this functionality in a subsequent patch.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView selectPositionAtPoint:completionHandler:]): Moved implementation to -_selectPositionAtPoint
and write this function in terms of it.
(-[WKContentView _selectPositionAtPoint:stayingWithinFocusedElement:completionHandler:]): Added.

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

6 months agoWebKitTestRunner: use ad hoc signing for internal Production builds
jiewen_tan@apple.com [Thu, 23 Jan 2020 23:57:37 +0000 (23:57 +0000)]
WebKitTestRunner: use ad hoc signing for internal Production builds
https://bugs.webkit.org/show_bug.cgi?id=206607
<rdar://problem/56087327>

Reviewed by Jonathan Bedard.

* WebKitTestRunner/Configurations/WebKitTestRunner.xcconfig:

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

6 months agoDon't include BytecodeStructs.h in CommonSlowPaths.h
rmorisset@apple.com [Thu, 23 Jan 2020 23:25:32 +0000 (23:25 +0000)]
Don't include BytecodeStructs.h in CommonSlowPaths.h
https://bugs.webkit.org/show_bug.cgi?id=206566

Reviewed by Tadeu Zagallo.

Simple improvement to compile times.

* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGOSREntry.cpp:
* jit/JIT.h:
* jit/JITInlines.h:
* jit/JITOperations.cpp:
* llint/LLIntSlowPaths.cpp:
* runtime/CommonSlowPaths.h:
* wasm/WasmSlowPaths.cpp:

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

6 months agoBackground thread with ITP Database should lock when the network process is suspended
katherine_cheney@apple.com [Thu, 23 Jan 2020 22:49:15 +0000 (22:49 +0000)]
Background thread with ITP Database should lock when the network process is suspended
https://bugs.webkit.org/show_bug.cgi?id=206593
rdar://problem/58713379

Reviewed by Chris Dumez.

This patch adds a function to hang the background queue when the
NetworkProcess is preparing to suspend.

* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::suspend):
(WebKit::WebResourceLoadStatisticsStore::resume):
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::prepareToSuspend):
(WebKit::NetworkProcess::resume):

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

6 months ago[iOS] Make it possible for WebKit clients to enable connections to asset services...
pvollan@apple.com [Thu, 23 Jan 2020 22:13:53 +0000 (22:13 +0000)]
[iOS] Make it possible for WebKit clients to enable connections to asset services in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=206551

Reviewed by Brent Fulgham.

Add SPI to grant and revoke access to asset services in the WebContent process.

No new tests, since this should have an API test, but API tests are not running on iOS devices. We could
create an API test for simulator, but the simulator has no sandbox.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _grantAccessToAssetServices]):
(-[WKWebView _revokeAccessToAssetServices]):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::grantAccessToAssetServices):
(WebKit::WebPageProxy::revokeAccessToAssetServices):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::grantAccessToAssetServices):
(WebKit::WebProcess::revokeAccessToAssetServices):

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

6 months agoFixed elements no longer stay fixed with elastic overscroll
simon.fraser@apple.com [Thu, 23 Jan 2020 21:51:37 +0000 (21:51 +0000)]
Fixed elements no longer stay fixed with elastic overscroll
https://bugs.webkit.org/show_bug.cgi?id=206227
rdar://problem/58707084

Reviewed by Antti Koivisto.
Source/WebCore:

Intended behavior on iOS and macOS is for position:fixed and sticky elements to maintain
their position relative to the view bounds when rubber-banding ("overscrolling"). This broke
some time back. This change restores the correct behavior with the call to layoutViewportRespectingRubberBanding()
in ScrollingTreeFixedNode::applyLayerPositions() and ScrollingTreeStickyNode::computeLayerPosition().
layoutViewportRespectingRubberBanding() computes a layout viewport without clamping.

The rest of the changes are to support testing. internals.unconstrainedScrollTo()
didn't work for main frame scrolling because of scroll position clamping in various places,
so propagate ScrollClamping in more places (and replace the redundant ScrollPositionClamp with ScrollClamping).

"requested scroll position" updates now carry along both clamping and "is programmatic" data, wrapped in a struct
which is passed around the scrolling tree. This allows us to not clamp the scroll position (for testing) in more places.

Internals::unconstrainedScrollTo() needs one weird hack to trigger a layout (and thus a scrolling tree commit),
because the layout is normally triggered by a layout viewport change, but when rubber-banding we clamp the layoutViewport
used for layout, so those layouts are never triggered.

Tests: tiled-drawing/scrolling/fixed/fixed-during-rubberband.html
       tiled-drawing/scrolling/sticky/sticky-during-rubberband.html

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* dom/Element.cpp:
(WebCore::Element::scrollTo):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::scrollTo const):
* page/FrameView.cpp:
(WebCore::FrameView::setScrollPosition):
(WebCore::FrameView::requestScrollPositionUpdate):
* page/FrameView.h:
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingCoordinator.cpp:
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
(WebCore::ScrollingStateScrollingNode::setRequestedScrollData):
(WebCore::ScrollingStateScrollingNode::dumpProperties const):
(WebCore::ScrollingStateScrollingNode::setRequestedScrollPosition): Deleted.
* page/scrolling/ScrollingStateScrollingNode.h:
(WebCore::RequestedScrollData::operator== const):
(WebCore::ScrollingStateScrollingNode::requestedScrollData const):
(WebCore::ScrollingStateScrollingNode::requestedScrollPosition const): Deleted.
(WebCore::ScrollingStateScrollingNode::requestedScrollPositionRepresentsProgrammaticScroll const): Deleted.
* page/scrolling/ScrollingTree.h:
(WebCore::ScrollingTree::scrollingTreeNodeRequestsScroll):
* page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
(WebCore::ScrollingTreeFrameScrollingNode::layoutViewportForScrollPosition const):
(WebCore::ScrollingTreeFrameScrollingNode::layoutViewportRespectingRubberBanding const):
* page/scrolling/ScrollingTreeFrameScrollingNode.h:
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::commitStateAfterChildren):
(WebCore::ScrollingTreeScrollingNode::adjustedScrollPosition const):
(WebCore::ScrollingTreeScrollingNode::scrollBy):
(WebCore::ScrollingTreeScrollingNode::scrollTo):
(WebCore::ScrollingTreeScrollingNode::wasScrolledByDelegatedScrolling):
* page/scrolling/ScrollingTreeScrollingNode.h:
* page/scrolling/cocoa/ScrollingTreeFixedNode.mm:
(WebCore::ScrollingTreeFixedNode::applyLayerPositions):
* page/scrolling/cocoa/ScrollingTreeStickyNode.mm:
(WebCore::ScrollingTreeStickyNode::computeLayerPosition const):
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateAfterChildren):
(WebCore::ScrollingTreeFrameScrollingNodeMac::adjustedScrollPosition const):
* page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
(WebCore::ScrollingTreeOverflowScrollingNodeMac::commitStateAfterChildren):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::adjustedScrollPosition const):
* page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
(WebCore::ScrollingTreeScrollingNodeDelegateMac::immediateScrollByWithoutContentEdgeConstraints):
* platform/ScrollTypes.cpp: Added.
(WebCore::operator<<):
* platform/ScrollTypes.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::setContentsScrollPosition):
(WebCore::ScrollView::setScrollPosition):
* platform/ScrollView.h:
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::setScrollOffsetFromAnimation):
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::requestScrollPositionUpdate):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollToOffset):
* testing/Internals.cpp:
(WebCore::Internals::unconstrainedScrollTo):

Source/WebKit:

Intended behavior on iOS and macOS is for position:fixed and sticky elements to maintain
their position relative to the view bounds when rubber-banding ("overscrolling"). This broke
some time back. This change restores the correct behavior with the call to layoutViewportRespectingRubberBanding()
in ScrollingTreeFixedNode::applyLayerPositions() and ScrollingTreeStickyNode::computeLayerPosition().
layoutViewportRespectingRubberBanding() computes a layout viewport without clamping.

The rest of the changes are to support testing. internals.unconstrainedScrollTo()
didn't work for main frame scrolling because of scroll position clamping in various places,
so propagate ScrollClamping in more places (and replace the redundant ScrollPositionClamp with ScrollClamping).

"requested scroll position" updates now carry along both clamping and "is programmatic" data, wrapped in a struct
which is passed around the scrolling tree. This allows us to not clamp the scroll position (for testing) in more places.

* Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder<ScrollingStateScrollingNode>::encode):
(ArgumentCoder<ScrollingStateScrollingNode>::decode):
(ArgumentCoder<RequestedScrollData>::encode):
(ArgumentCoder<RequestedScrollData>::decode):
(WebKit::dump):
* UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeRequestsScroll):
* UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
* UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::scrollingTreeNodeRequestsScroll):
* UIProcess/RemoteLayerTree/RemoteScrollingTree.h:
* UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm:
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateAfterChildren):
* UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
(WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateAfterChildren):

LayoutTests:

* tiled-drawing/scrolling/fixed/fixed-during-rubberband-expected.html: Added.
* tiled-drawing/scrolling/fixed/fixed-during-rubberband.html: Added.
* tiled-drawing/scrolling/sticky/sticky-during-rubberband-expected.html: Added.
* tiled-drawing/scrolling/sticky/sticky-during-rubberband.html: Added.

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

6 months agoEnable -Wconditional-uninitialized in WebCore project
ddkilzer@apple.com [Thu, 23 Jan 2020 21:48:00 +0000 (21:48 +0000)]
Enable -Wconditional-uninitialized in WebCore project
<https://webkit.org/b/206508>

Reviewed by Darin Adler.

* Configurations/Base.xcconfig:
(WARNING_CFLAGS): Add -Wconditional-uninitialized switch.
Source/WebCore:

* Modules/webgpu/WHLSL/WHLSLIntrinsics.cpp:
(WebCore::WHLSL::Intrinsics::addFullTexture):
- Initialize `vectorLength` to zero and add release assert that
  it is in a valid range [1-4] to prevent buffer out-of-bounds
  reads.
- Change ASSERT() to ASSERT_WITH_SECURITY_IMPLICATION() since
  they all have security implications.

* Modules/webgpu/WHLSL/WHLSLParser.cpp:
(WebCore::WHLSL::Parser::parseResourceSemantic):
- Add default case to switch statement with release assert since
  `mode` is not set for all possible character values.

* accessibility/AXObjectCache.cpp:
(WebCore::characterForCharacterOffset):
- Ignore -Wconditional-warning for U16_NEXT() macro. Fix must be
  in compiler or in ICU header.

* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneDeserializer::readRSAKey):
- Initialize `hash` to CryptoAlgorithmIdentifier::SHA_1.  SHA_1
  was chosen since Optional<CryptoAlgorithmIdentifier>
  parameters use that as a default vaule in
  crypto/keys/CryptoKeyRSA.cpp.

* contentextensions/DFABytecodeCompiler.cpp:
(WebCore::ContentExtensions::DFABytecodeCompiler::transitions):
- Initialize `rangeMin` to 0.

* css/parser/CSSSupportsParser.cpp:
(WebCore::CSSSupportsParser::consumeCondition):
- Initialize `result` to false.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::modulo):
- Initialize `inputDividendCopy` to JSC::InvalidGPRReg.

* dom/Document.cpp:
(WebCore::Document::processHttpEquiv):
- Initialize `delay` to zero.

* rendering/svg/RenderSVGResourceGradient.cpp:
(WebCore::RenderSVGResourceGradient::applyResource):
- Initialize `gradientData` to nullptr.  This false positive is
  tracked by <rdar://problem/58615489>.

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

6 months ago[iOS] Remove access to 'awd' directories
bfulgham@apple.com [Thu, 23 Jan 2020 21:14:54 +0000 (21:14 +0000)]
[iOS] Remove access to 'awd' directories
https://bugs.webkit.org/show_bug.cgi?id=206098
<rdar://problem/58491816>

Reviewed by Per Arne Vollan.

Now that we have removed 'awd' features from the WebContent process, and have blocked access to the
mach service, we should remove the ability to interact with the 'awd' directories on device.

No new tests. No change in behavior.

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

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

6 months agoFix extra space between title and article body
jond@apple.com [Thu, 23 Jan 2020 20:32:11 +0000 (20:32 +0000)]
Fix extra space between title and article body
https://bugs.webkit.org/show_bug.cgi?id=206689

Reviewed by Devin Rousso.

* wp-content/themes/webkit/style.css:
(article .meta):
(article .bodycopy,):

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

6 months agoAdd missing coverage.xcconfig
commit-queue@webkit.org [Thu, 23 Jan 2020 20:18:57 +0000 (20:18 +0000)]
Add missing coverage.xcconfig
https://bugs.webkit.org/show_bug.cgi?id=206686

Patch by Tuomas Karkkainen <tuomas.webkit@apple.com> on 2020-01-23
Reviewed by Mark Lam.

* coverage/coverage.xcconfig: Added.

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

6 months agoOptimizeAssociativeExpressionTrees should reset value owners before running
sbarati@apple.com [Thu, 23 Jan 2020 20:11:33 +0000 (20:11 +0000)]
OptimizeAssociativeExpressionTrees should reset value owners before running
https://bugs.webkit.org/show_bug.cgi?id=206670
<rdar://problem/58535628>

Reviewed by Robin Morisset.

We have a crash inside OptimizeAssociativeExpressionTrees and we don't know
how to reproduce it. Also, based on Mark's auditing of the crash site's
assembly, Mark thinks we're crashing on a "currupt" basic block.

After I audited the code, I saw that we rely on value owners in this phase.
However, we don't actually reset them before running the phase. This patch
adds that as a speculative fix for the crash we're seeing.

* b3/B3OptimizeAssociativeExpressionTrees.cpp:
(JSC::B3::OptimizeAssociativeExpressionTrees::run):

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

6 months ago[Cocoa] Broker access to the PowerManagement API
pvollan@apple.com [Thu, 23 Jan 2020 20:10:47 +0000 (20:10 +0000)]
[Cocoa] Broker access to the PowerManagement API
https://bugs.webkit.org/show_bug.cgi?id=206373
Source/WebCore:

Reviewed by Darin Adler.

Code to determine if device has battery should be executed in the UI process.

API test: WebKit.SystemHasBattery

* WebCore.xcodeproj/project.pbxproj:
* platform/cocoa/SystemBattery.h: Added.
* platform/cocoa/SystemBattery.mm: Added.
(WebCore::setSystemHasBattery):
(WebCore::systemHasBattery):
* platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm:
(WebCore::systemHasBattery): Deleted.
* testing/Internals.cpp:
(WebCore::Internals::systemHasBattery const):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

<rdar://problem/34722450>

Reviewed by Darin Adler.

Send flag indicating whether device has battery to the WebContent process as part of the
WebProcess creation parameters.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Tools:

Reviewed by Darin Adler.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/Battery.mm: Added.
(TEST):

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

6 months agoUnreviewed, rolling out r254990.
ryanhaddad@apple.com [Thu, 23 Jan 2020 19:56:38 +0000 (19:56 +0000)]
Unreviewed, rolling out r254990.

Breaks watchOS / tvOS builds.

Reverted changeset:

"[iOS] Make it possible for WebKit clients to enable
connections to asset services in the WebContent process"
https://bugs.webkit.org/show_bug.cgi?id=206551
https://trac.webkit.org/changeset/254990

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

6 months ago[iOS] Unreviewed follow-up sandbox fix.
bfulgham@apple.com [Thu, 23 Jan 2020 19:50:05 +0000 (19:50 +0000)]
[iOS] Unreviewed follow-up sandbox fix.
https://bugs.webkit.org/show_bug.cgi?id=206562
<rdar://problem/58778970>

I missed a couple of rules that are being overly chatty in the logs in r254982.
This adds appropriate commands to silence them.

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

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

6 months agoReverting 254981 - Failed many tests on Mojave WK1
dino@apple.com [Thu, 23 Jan 2020 19:33:54 +0000 (19:33 +0000)]
Reverting 254981 - Failed many tests on Mojave WK1

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

6 months ago[Web Animations] Make AnimationList ref-counted
graouts@webkit.org [Thu, 23 Jan 2020 19:23:50 +0000 (19:23 +0000)]
[Web Animations] Make AnimationList ref-counted
https://bugs.webkit.org/show_bug.cgi?id=206664

Reviewed by Antti Koivisto.

* platform/animation/AnimationList.cpp:
* platform/animation/AnimationList.h:
(WebCore::AnimationList::create):
(WebCore::AnimationList::copy):
(WebCore::AnimationList::AnimationList): Deleted.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::ensureAnimations):
(WebCore::RenderStyle::ensureTransitions):
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
* rendering/style/StyleRareNonInheritedData.h:

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

6 months ago[iOS] Make it possible for WebKit clients to enable connections to asset services...
pvollan@apple.com [Thu, 23 Jan 2020 19:09:02 +0000 (19:09 +0000)]
[iOS] Make it possible for WebKit clients to enable connections to asset services in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=206551

Reviewed by Brent Fulgham.

Add SPI to grant and revoke access to asset services in the WebContent process.

No new tests, since this should have an API test, but API tests are not running on iOS devices. We could
create an API test for simulator, but the simulator has no sandbox.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _grantAccessToAssetServices]):
(-[WKWebView _revokeAccessToAssetServices]):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::grantAccessToAssetServices):
(WebKit::WebPageProxy::revokeAccessToAssetServices):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::grantAccessToAssetServices):
(WebKit::WebProcess::revokeAccessToAssetServices):

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

6 months ago[iOS] Camera is lost during WebRTC demo
bfulgham@apple.com [Thu, 23 Jan 2020 19:05:24 +0000 (19:05 +0000)]
[iOS] Camera is lost during WebRTC demo
https://bugs.webkit.org/show_bug.cgi?id=206613
<rdar://problem/58764572>

Patch by Per Arne Vollan <pvollan@apple.com> on 2020-01-23
Reviewed by Brent Fulgham.

Fix observed sandbox violations in the Networking process.

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

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

6 months agoChange the name of libANGLE in the shared workspace.
dino@apple.com [Thu, 23 Jan 2020 18:50:57 +0000 (18:50 +0000)]
Change the name of libANGLE in the shared workspace.

* WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme:

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

6 months agoContentFilter should access DocumentLoader through an interface
achristensen@apple.com [Thu, 23 Jan 2020 18:50:55 +0000 (18:50 +0000)]
ContentFilter should access DocumentLoader through an interface
https://bugs.webkit.org/show_bug.cgi?id=206564

Reviewed by Andy Estes.

This will make it easier to move, like to the NetworkProcess where there are no DocumentLoaders.
Also use WTF::Function instead of std::function and UniqueRef instead of std::unique_ptr.
No change in behavior.

* WebCore.xcodeproj/project.pbxproj:
* loader/ContentFilter.cpp:
(WebCore::ContentFilter::types):
(WebCore::ContentFilter::create):
(WebCore::ContentFilter::ContentFilter):
(WebCore::ContentFilter::continueAfterWillSendRequest):
(WebCore::ContentFilter::continueAfterResponseReceived):
(WebCore::ContentFilter::continueAfterDataReceived):
(WebCore::ContentFilter::continueAfterNotifyFinished):
(WebCore::ContentFilter::forEachContentFilterUntilBlocked):
(WebCore::ContentFilter::didDecide):
(WebCore::ContentFilter::deliverResourceData):
(WebCore::ContentFilter::handleProvisionalLoadFailure):
(): Deleted.
* loader/ContentFilter.h:
* loader/ContentFilterClient.h: Added.
(WebCore::ContentFilterClient::~ContentFilterClient):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::handleProvisionalLoadFailure):
(WebCore::DocumentLoader::didBlock):
* loader/DocumentLoader.h:
* platform/cocoa/NetworkExtensionContentFilter.h:
* platform/cocoa/NetworkExtensionContentFilter.mm:
(WebCore::NetworkExtensionContentFilter::create):
* platform/cocoa/ParentalControlsContentFilter.h:
* platform/cocoa/ParentalControlsContentFilter.mm:
(WebCore::ParentalControlsContentFilter::create):

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

6 months agoStop capturing telemetry for well-understood sandbox rules (206562)
bfulgham@apple.com [Thu, 23 Jan 2020 18:15:30 +0000 (18:15 +0000)]
Stop capturing telemetry for well-understood sandbox rules (206562)
https://bugs.webkit.org/show_bug.cgi?id=206562
<rdar://problem/58778970>

Reviewed by Per Arne Vollan.

Remove logging of sandbox rules that are now understood, and either confirmed to be needed for proper WebKit operation
or identified for removal through a future update.

No new tests. No change in behavior.

* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

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

6 months agoUpdate ANGLE
dino@apple.com [Thu, 23 Jan 2020 18:05:27 +0000 (18:05 +0000)]
Update ANGLE
https://bugs.webkit.org/show_bug.cgi?id=206318

Several important changes to fix layout test failures and timeouts in this update.
- Made expensive validation non-default in debug mode to reduce timeouts.
- Optimize disabling ARB_texture_rectangle to make shader compilation much faster.
- Flush before texture deletion to work around Mac Intel driver bug.

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

* ANGLE.plist: update commit hash
* ANGLE.xcodeproj/project.pbxproj: Add/remove files
* Compiler.cmake: Translated from compiler.gni
* GLESv2.cmake: Translated from libGLESv2.gni
* changes.diff: Now lists all changes from upstream.
* update-angle.sh: Diff command was wrong.
* Plus a whole lot of changes from upstream.

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

6 months ago[GTK] Gardening, rebaselines and update TestExpectations
dpino@igalia.com [Thu, 23 Jan 2020 17:53:10 +0000 (17:53 +0000)]
[GTK] Gardening, rebaselines and update TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=206660

Unreviewed gardening.

* platform/gtk/TestExpectations:
* platform/gtk/imported/w3c/web-platform-tests/media-source/mediasource-remove-expected.txt: Added.

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

6 months agoActually fix history link directs on dashboard and results.html
jlewis3@apple.com [Thu, 23 Jan 2020 17:51:45 +0000 (17:51 +0000)]
Actually fix history link directs on dashboard and results.html
https://bugs.webkit.org/show_bug.cgi?id=206666

Reviewed by Jonathan Bedard.

* fast/harness/results.html:
* legacy-animation-engine/fast/harness/results.html:

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

6 months agoFix iOS 13.2 iphoneos build
jbedard@apple.com [Thu, 23 Jan 2020 16:23:26 +0000 (16:23 +0000)]
Fix iOS 13.2 iphoneos build
https://bugs.webkit.org/show_bug.cgi?id=206618

Reviewed by Alexey Proskuryakov.

* Scripts/webkitdirs.pm:
(XcodeOptions): Relax provisioning profile rules on embedded SDKs.

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

6 months ago[LFC][IFC] Do not special case formatting root layout
zalan@apple.com [Thu, 23 Jan 2020 16:15:15 +0000 (16:15 +0000)]
[LFC][IFC] Do not special case formatting root layout
https://bugs.webkit.org/show_bug.cgi?id=206641
<rdar://problem/58823548>

Reviewed by Antti Koivisto.

Let's move out all the formatting context layout logic from layoutFormattingContextRoot.

* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
(WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot): Deleted.
(WebCore::Layout::InlineFormattingContext::computeHorizontalAndVerticalGeometry): Deleted.
(WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForReplacedInlineBox): Deleted.
* layout/inlineformatting/InlineFormattingContext.h:
* layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::isInlineTableBox const):
(WebCore::Layout::Box::isInlineLevelBox const):
* layout/layouttree/LayoutBox.h:

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

6 months agofast/css/first-letter-and-float-crash.html asserts under ComplexLineLayout::createLin...
antti@apple.com [Thu, 23 Jan 2020 16:05:36 +0000 (16:05 +0000)]
fast/css/first-letter-and-float-crash.html asserts under ComplexLineLayout::createLineBoxes
https://bugs.webkit.org/show_bug.cgi?id=206651
<rdar://problem/54889982>

Reviewed by Anders Carlsson.

Source/WebCore:

Take care that the first-letter style has the correct styleType set even when getCachedPseudoStyle failed.
This is used for checking if there is an existing first letter renderer.

* rendering/updating/RenderTreeBuilderFirstLetter.cpp:
(WebCore::styleForFirstLetter):

LayoutTests:

* fast/css/first-letter-and-float-crash.html:

Force an additional layout in the test to make the issue easily reproducible.

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

6 months agoUnreviewed, fix calculation of kindBits
ysuzuki@apple.com [Thu, 23 Jan 2020 12:48:57 +0000 (12:48 +0000)]
Unreviewed, fix calculation of kindBits
https://bugs.webkit.org/show_bug.cgi?id=206650

* bytecode/Operands.h:

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

6 months ago[GTK] Gardening, update platform baselines for failing tests
dpino@igalia.com [Thu, 23 Jan 2020 11:50:17 +0000 (11:50 +0000)]
[GTK] Gardening, update platform baselines for failing tests
https://bugs.webkit.org/show_bug.cgi?id=206644

Unreviewed gardening.

* platform/gtk/fast/dom/Range/getBoundingClientRect-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_bits.https.any.worker-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_keys.https.any.worker-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/dom/events/Event-dispatch-redispatch-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/dom/nodes/Document-createEvent.https-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/svg/import/paths-dom-01-f-manual-expected.txt:

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

6 months agoKeyedDecoderGeneric crashes when it accesses a data with empty string key.
commit-queue@webkit.org [Thu, 23 Jan 2020 10:58:48 +0000 (10:58 +0000)]
KeyedDecoderGeneric crashes when it accesses a data with empty string key.
https://bugs.webkit.org/show_bug.cgi?id=206572

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

Source/WebCore:

Changed null string which was used for HasMap key to empty string.

Test: TestWebKitAPI/Tests/WebCore/KeyedCoding.cpp

* platform/generic/KeyedDecoderGeneric.cpp:
(WebCore::readString):

Tools:

* TestWebKitAPI/Tests/WebCore/KeyedCoding.cpp:
(TestWebKitAPI::TEST):

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

6 months agonomodule scripts are fetched in some cases (with empty cache or in new tab)
ysuzuki@apple.com [Thu, 23 Jan 2020 09:51:58 +0000 (09:51 +0000)]
nomodule scripts are fetched in some cases (with empty cache or in new tab)
https://bugs.webkit.org/show_bug.cgi?id=194337
<rdar://problem/49700924>

Reviewed by Ryosuke Niwa.

Source/WebCore:

The preloader attempt to preload "src" of script tags. However, script tag attributed with "nomodule"
will never be executed by WebKit since it already supports modules. Avoid loading this content in
the preloader.

Test: http/wpt/preload/classic-script-with-nomodule.html

* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
(WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload):

LayoutTests:

* http/wpt/preload/classic-script-with-nomodule-expected.txt: Added.
* http/wpt/preload/classic-script-with-nomodule.html: Added.
* http/wpt/preload/resources/classic.js: Added.
* http/wpt/preload/resources/module.js: Added.

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

6 months agoIt should be possible to build JavaScriptCore with LLVM Source-based Code Coverage...
commit-queue@webkit.org [Thu, 23 Jan 2020 09:46:40 +0000 (09:46 +0000)]
It should be possible to build JavaScriptCore with LLVM Source-based Code Coverage, run the tests and see the coverage data
https://bugs.webkit.org/show_bug.cgi?id=206389

Patch by Tuomas Karkkainen <tuomas.webkit@apple.com> on 2020-01-23
Reviewed by Alexey Proskuryakov.

* Scripts/run-javascriptcore-tests:
* Scripts/set-webkit-configuration:
* Scripts/webkitdirs.pm:
* coverage/coverage.xcconfig: Added.

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

6 months ago[JSC] Bits from Operand should fit in bits reserved in AbstractHeap's Payload
ysuzuki@apple.com [Thu, 23 Jan 2020 09:39:11 +0000 (09:39 +0000)]
[JSC] Bits from Operand should fit in bits reserved in AbstractHeap's Payload
https://bugs.webkit.org/show_bug.cgi?id=206619
<rdar://problem/58270260>

Reviewed by Keith Miller.

JSTests:

* stress/operand-should-fit-in-abstract-heap-encoded-payload-format.js: Added.

Source/JavaScriptCore:

We extended JSC::Operand to have an additional field representing OperandKind.
However, we have restriction in DFG::AbstractHeap's Payload that Operand's raw
bits format need to fit in reserved bits in Payload's raw bits format, 49 bits.
Since we ordered fields of Operand "m_kind" and "m_operand", in little endian
architecture, raw bits format of Operand can exceed 49 bits if m_operand is
large enough.

This patch fixes the order to ensure that Operand's raw bit format always fits
in 49 bits.

* bytecode/Operands.h:
(JSC::Operand::Operand):
(JSC::Operand::asBits const):
* dfg/DFGAbstractHeap.h:

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

6 months ago[GTK] Navigation gesture creates CSS nodes and doesn't remove them
commit-queue@webkit.org [Thu, 23 Jan 2020 09:29:10 +0000 (09:29 +0000)]
[GTK] Navigation gesture creates CSS nodes and doesn't remove them
https://bugs.webkit.org/show_bug.cgi?id=206591

Patch by Alexander Mikhaylenko <alexm@gnome.org> on 2020-01-23
Reviewed by Carlos Garcia Campos.

Even though foreign drawing uses a temporary GtkStyleContext, calling
gtk_style_context_set_parent() adds all its CSS nodes to the global
hierarchy, and then they aren't cleaned up. This shouldn't happen.

* UIProcess/gtk/ViewGestureControllerGtk.cpp:
(WebKit::ViewGestureController::createStyleContext):Stop setting GtkStyleContext parent.

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

6 months ago[GTK] Gardening HTTP tests
commit-queue@webkit.org [Thu, 23 Jan 2020 06:50:35 +0000 (06:50 +0000)]
[GTK] Gardening HTTP tests
https://bugs.webkit.org/show_bug.cgi?id=206640

Unreviewed test gardening.

Patch by Lauro Moura <lmoura@igalia.com> on 2020-01-22

* platform/gtk/TestExpectations:
* platform/gtk/http/tests/security/xss-DENIED-xsl-external-entity-redirect-expected.txt: Added.

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

6 months ago[WinCairo] Some of combining family glyphs are replaced by space glyphs
Hironori.Fujii@sony.com [Thu, 23 Jan 2020 06:46:11 +0000 (06:46 +0000)]
[WinCairo] Some of combining family glyphs are replaced by space glyphs
https://bugs.webkit.org/show_bug.cgi?id=205485

Reviewed by Myles C. Maxfield.

Source/WebCore:

Although ComplexTextControllerUniscribe requires
glyph-to-character mapping (stringIndices), Uniscribe returns
character-to-glyph mapping (clusters). So, we are converting it.
And, this is not simple task due to the following reasons.

1. ComplexTextControllerUniscribe replaces glyphs, which are
corresponding to space characters, with space glyphs.

For example, 👨‍👦 (man+boy, U+1F468 ZWJ U+1F466) consists of a 5
length UTF-16 string.

Uniscribe returns:

glyphs: [6368 6318] (father and boy glyphs)
clusters:  [0 0 1 1 1]

This means U+1F468 is mapping to the father glyph, and ZWJ U+1F466
are mapping to the boy glyph. If one simply converts this to
glyph-to-character mapping, it would be [0 2]. This means the
father glyph is mapping to U+1F468, and the boy glyph is mapping
to ZWJ. As the result, ComplexTextControllerUniscribe replaces the
boy glyph with a space glyph because it is mapped to ZWJ. So, by
somehow skipping space characters, we need to convert the clusters
to a glyph-to-character mapping [0 3].

2. Uniscribe returns the rightmost glyphs for combining glyphs in
RTL text even though it returns the leftmost one for LTR.

For example, if a string "abc" are generating combining glyphs "AB",
Uniscribe returns clusters [0 0] for LTR text, but [1 1] for RTL text.

Test: fast/text/emoji-single-parent-family-3.html

* platform/graphics/win/ComplexTextControllerUniscribe.cpp:
(WebCore::BidiRange::BidiRange): Added.
(WebCore::BidiRange::Iterator::Iterator):
(WebCore::BidiRange::Iterator::operator++):
(WebCore::BidiRange::Iterator::operator*):
(WebCore::BidiRange::Iterator::operator==):
(WebCore::BidiRange::Iterator::operator!=):
(WebCore::BidiRange::Iterator::index):
(WebCore::BidiRange::begin const):
(WebCore::BidiRange::end const):
(WebCore::stringIndicesFromClusters): Added.
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):

LayoutTests:

* fast/text/emoji-single-parent-family-3-expected-mismatch.html: Added.
* fast/text/emoji-single-parent-family-3.html: Added.
* platform/win/TestExpectations: Marked fast/text/emoji-single-parent-family-3.html as ImageOnlyFailure.
* platform/wincairo/TestExpectations: Changed the bug number for fast/text/stale-TextLayout-from-first-line.html.

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

6 months ago[Media in GPU process] Pipe more MediaPlayerPrivate and client methods
jonlee@apple.com [Thu, 23 Jan 2020 06:31:34 +0000 (06:31 +0000)]
[Media in GPU process] Pipe more MediaPlayerPrivate and client methods
https://bugs.webkit.org/show_bug.cgi?id=206468

Reviewed by Eric Carlson.

Source/WebCore:

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged):
* html/HTMLMediaElement.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::currentPlaybackTargetIsWirelessChanged):
* platform/graphics/MediaPlayer.h: Add resourceNotSupported() to call up to the client.
(WebCore::MediaPlayerClient::mediaPlayerCurrentPlaybackTargetIsWirelessChanged):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::playbackTargetIsWirelessChanged):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setShouldPlayToPlaybackTarget):

Source/WebKit:

Pipe more of the media player and client functions. Generally, these are void functions
that require no parameters.

Also, the client *changed() functions, when implemented, tend to call the accessor of the property
that just changed. This seems rather circuitous. The client methods ought to just also pass along
the value of the new changed value. This patch refactors mediaPlayerCurrentPlaybackTargetIsWirelessChanged
to do exactly that.

* GPUProcess/media/RemoteMediaPlayerProxy.cpp:
(WebKit::RemoteMediaPlayerProxy::mediaPlayerResourceNotSupported):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerEngineUpdated):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerActiveSourceBuffersChanged):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerWaitingForKeyChanged):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerCurrentPlaybackTargetIsWirelessChanged):
(WebKit::RemoteMediaPlayerProxy::setWirelessVideoPlaybackDisabled):
(WebKit::RemoteMediaPlayerProxy::setShouldPlayToPlaybackTarget):
(WebKit::RemoteMediaPlayerProxy::keyAdded):
(WebKit::RemoteMediaPlayerProxy::beginSimulatedHDCPError):
(WebKit::RemoteMediaPlayerProxy::endSimulatedHDCPError):
(WebKit::RemoteMediaPlayerProxy::notifyActiveSourceBuffersChanged):
(WebKit::RemoteMediaPlayerProxy::applicationWillResignActive):
(WebKit::RemoteMediaPlayerProxy::applicationDidBecomeActive):
* GPUProcess/media/RemoteMediaPlayerProxy.h:
* GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
* WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
(WebKit::MediaPlayerPrivateRemote::setWirelessVideoPlaybackDisabled):
(WebKit::MediaPlayerPrivateRemote::currentPlaybackTargetIsWirelessChanged): Cache value in new member variable.
(WebKit::MediaPlayerPrivateRemote::isCurrentPlaybackTargetWireless const): Return value.
(WebKit::MediaPlayerPrivateRemote::setShouldPlayToPlaybackTarget):
(WebKit::MediaPlayerPrivateRemote::keyAdded):
(WebKit::MediaPlayerPrivateRemote::waitingForKeyChanged):
(WebKit::MediaPlayerPrivateRemote::beginSimulatedHDCPError):
(WebKit::MediaPlayerPrivateRemote::endSimulatedHDCPError):
(WebKit::MediaPlayerPrivateRemote::notifyActiveSourceBuffersChanged):
(WebKit::MediaPlayerPrivateRemote::applicationWillResignActive):
(WebKit::MediaPlayerPrivateRemote::applicationDidBecomeActive):
(WebKit::MediaPlayerPrivateRemote::resourceNotSupported):
(WebKit::MediaPlayerPrivateRemote::engineUpdated):
(WebKit::MediaPlayerPrivateRemote::activeSourceBuffersChanged):
* WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
* WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in:

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

6 months agoUnreviewed, rolling out r254955.
jiewen_tan@apple.com [Thu, 23 Jan 2020 04:54:28 +0000 (04:54 +0000)]
Unreviewed, rolling out r254955.

Broke internal builds

Reverted changeset:

"WebKitTestRunner: move code sign configurations from
WebKitTestRunner.xcconfig to DebugRelease.xcconfig"
https://bugs.webkit.org/show_bug.cgi?id=206607
https://trac.webkit.org/changeset/254955

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

6 months agoRestore nullification of DFG::Plan::m_vm when the plan is cancelled.
mark.lam@apple.com [Thu, 23 Jan 2020 04:50:23 +0000 (04:50 +0000)]
Restore nullification of DFG::Plan::m_vm when the plan is cancelled.
https://bugs.webkit.org/show_bug.cgi?id=206633
<rdar://problem/58811967>

Reviewed by Robin Morisset.

In r253243, I replaced the nullification of Plan::m_vm in Plan::cancel() with
code to decorate the m_vm pointer with a nuke bit.  The thinking is that keeping
the VM pointer in nuked form allows us to do certain assertions, as well as
implementing code in support of keeping Box<Identifier>s alive.  It is only
correct to use the nuked VM pointer if and only if the VM is guaranteed to
outlive the Plan.  r253243 guarantees this condition.

In r254464, I replaced the use of Box<Identifier> with CacheableIdentifier.
This obviated all the support code added above, and rolled out most of it.
However, I opted to keep the nuked VM pointer in the DFG::Plan to as a debugging
aid (it's nice to be able to know which VM the Plan came from).

However, r254464 also undid the guarantee that the VM will outlive the Plan.
As a result, a nuked VM pointer is no longer guaranteed to point to a valid VM.
Some worker layout tests, run on an ASAN build, detected that the pointer is
pointing to an already freed VM and failed with a crash.

This patch fixes this issue by completely reverting the nuked VM pointer code,
and restores nullification of the m_vm pointer in Plan::cancel().

* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::computeCompileTimes const):
(JSC::DFG::Plan::cancel):
* dfg/DFGPlan.h:
(JSC::DFG::Plan::vm const):
(JSC::DFG::Plan::unnukedVM const): Deleted.
(JSC::DFG::Plan::nuke): Deleted.
(JSC::DFG::Plan::unnuke): Deleted.

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

6 months ago[LFC][IFC] Use "inline box" or "atomic inline level box" instead of inline container
zalan@apple.com [Thu, 23 Jan 2020 04:49:27 +0000 (04:49 +0000)]
[LFC][IFC] Use "inline box" or "atomic inline level box" instead of inline container
https://bugs.webkit.org/show_bug.cgi?id=206592
<rdar://problem/58799970>

Reviewed by Antti Koivisto.

Inline container is not a spec term.

* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::computeHorizontalAndVerticalGeometry):
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
(WebCore::Layout::InlineFormattingContext::collectInlineContentIfNeeded):
* layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::isInlineBox const):
(WebCore::Layout::Box::isAtomicInlineLevelBox const):
* layout/layouttree/LayoutBox.h:
(WebCore::Layout::Box::isContainer const):
(WebCore::Layout::Box::isBlockContainer const): Deleted.
(WebCore::Layout::Box::isInlineContainer const): Deleted.
* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::outputLayoutBox):

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

6 months agoRemove DFGAbstractHeap::typeInfoType since it's immutable
keith_miller@apple.com [Thu, 23 Jan 2020 03:52:05 +0000 (03:52 +0000)]
Remove DFGAbstractHeap::typeInfoType since it's immutable
https://bugs.webkit.org/show_bug.cgi?id=206638

Reviewed by Yusuke Suzuki.

* dfg/DFGAbstractHeap.h:
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):

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

6 months agoInternalField and CheckNeutered DFG nodes are not always safe to execute
keith_miller@apple.com [Thu, 23 Jan 2020 02:58:51 +0000 (02:58 +0000)]
InternalField and CheckNeutered DFG nodes are not always safe to execute
https://bugs.webkit.org/show_bug.cgi?id=206632

Reviewed by Saam Barati.

JSTests:

* stress/for-of-bad-internal-field-hoist.js: Added.
(foo):

Source/JavaScriptCore:

We currently mark (Get/Set)InternalField/CheckNeutered nodes as safe to execute everywhere. However,
GetInternalField, etc. rely on a proof that the cell passed to it is a subclass of InteralFieldObject.
This combination means we may hoist the nodes past the check guarding them.

Also, remove a bogus assertion that we will have proven the value passed to CheckNeutered is a TypedArray.
It's not valid to require that AI preserve a precise model of all invariants since phases can make changes
that AI doesn't understand.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCheckNeutered):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCheckNeutered):

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

6 months ago[OpenSSL] Add stubs and build for Web Crypto
don.olmstead@sony.com [Thu, 23 Jan 2020 02:45:17 +0000 (02:45 +0000)]
[OpenSSL] Add stubs and build for Web Crypto
https://bugs.webkit.org/show_bug.cgi?id=206449

Reviewed by Jiewen Tan.

.:

Enable Web Crypto as an experiment for WinCairo and PlayStation. Add the USE_OPENSSL
definition to platforms using OpenSSL.

* Source/cmake/OptionsFTW.cmake:
* Source/cmake/OptionsPlayStation.cmake:
* Source/cmake/OptionsWin.cmake:
* Source/cmake/OptionsWinCairo.cmake:

Source/WebCore:

Add stubs for an OpenSSL implementation of Web Crypto. Add the associated CMake
files for OpenSSL platforms and reference them on the platforms using OpenSSL.

Tests will be enabled as functionality lands.

* PlatformFTW.cmake:
* PlatformPlayStation.cmake:
* PlatformWinCairo.cmake:
* crypto/keys/CryptoKeyEC.h:
* crypto/keys/CryptoKeyRSA.h:
* crypto/openssl/CryptoAlgorithmAES_CBCOpenSSL.cpp: Added.
(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
* crypto/openssl/CryptoAlgorithmAES_CFBOpenSSL.cpp: Added.
(WebCore::CryptoAlgorithmAES_CFB::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CFB::platformDecrypt):
* crypto/openssl/CryptoAlgorithmAES_CTROpenSSL.cpp: Added.
(WebCore::CryptoAlgorithmAES_CTR::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CTR::platformDecrypt):
* crypto/openssl/CryptoAlgorithmAES_GCMOpenSSL.cpp: Added.
(WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
(WebCore::CryptoAlgorithmAES_GCM::platformDecrypt):
* crypto/openssl/CryptoAlgorithmAES_KWOpenSSL.cpp: Added.
(WebCore::CryptoAlgorithmAES_KW::platformWrapKey):
(WebCore::CryptoAlgorithmAES_KW::platformUnwrapKey):
* crypto/openssl/CryptoAlgorithmECDHOpenSSL.cpp: Added.
(WebCore::CryptoAlgorithmECDH::platformDeriveBits):
* crypto/openssl/CryptoAlgorithmECDSAOpenSSL.cpp: Added.
(WebCore::CryptoAlgorithmECDSA::platformSign):
(WebCore::CryptoAlgorithmECDSA::platformVerify):
* crypto/openssl/CryptoAlgorithmHKDFOpenSSL.cpp: Added.
(WebCore::CryptoAlgorithmHKDF::platformDeriveBits):
* crypto/openssl/CryptoAlgorithmHMACOpenSSL.cpp: Added.
(WebCore::CryptoAlgorithmHMAC::platformSign):
(WebCore::CryptoAlgorithmHMAC::platformVerify):
* crypto/openssl/CryptoAlgorithmPBKDF2OpenSSL.cpp: Added.
(WebCore::CryptoAlgorithmPBKDF2::platformDeriveBits):
* crypto/openssl/CryptoAlgorithmRSAES_PKCS1_v1_5OpenSSL.cpp: Added.
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
* crypto/openssl/CryptoAlgorithmRSASSA_PKCS1_v1_5OpenSSL.cpp: Added.
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify):
* crypto/openssl/CryptoAlgorithmRSA_OAEPOpenSSL.cpp: Added.
(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):
* crypto/openssl/CryptoAlgorithmRSA_PSSOpenSSL.cpp: Added.
(WebCore::CryptoAlgorithmRSA_PSS::platformSign):
(WebCore::CryptoAlgorithmRSA_PSS::platformVerify):
* crypto/openssl/CryptoAlgorithmRegistryOpenSSL.cpp: Added.
(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
* crypto/openssl/CryptoKeyECOpenSSL.cpp: Added.
(WebCore::CryptoKeyEC::keySizeInBits const):
(WebCore::CryptoKeyEC::platformSupportedCurve):
(WebCore::CryptoKeyEC::platformGeneratePair):
(WebCore::CryptoKeyEC::platformImportRaw):
(WebCore::CryptoKeyEC::platformImportJWKPublic):
(WebCore::CryptoKeyEC::platformImportJWKPrivate):
(WebCore::CryptoKeyEC::platformImportSpki):
(WebCore::CryptoKeyEC::platformImportPkcs8):
(WebCore::CryptoKeyEC::platformExportRaw const):
(WebCore::CryptoKeyEC::platformAddFieldElements const):
(WebCore::CryptoKeyEC::platformExportSpki const):
(WebCore::CryptoKeyEC::platformExportPkcs8 const):
* crypto/openssl/CryptoKeyRSAOpenSSL.cpp: Added.
(WebCore::CryptoKeyRSA::create):
(WebCore::CryptoKeyRSA::isRestrictedToHash const):
(WebCore::CryptoKeyRSA::keySizeInBits const):
(WebCore::CryptoKeyRSA::generatePair):
(WebCore::CryptoKeyRSA::importSpki):
(WebCore::CryptoKeyRSA::importPkcs8):
(WebCore::CryptoKeyRSA::exportSpki const):
(WebCore::CryptoKeyRSA::exportPkcs8 const):
(WebCore::CryptoKeyRSA::exportData const):
* crypto/openssl/SerializedCryptoKeyWrapOpenSSL.cpp: Added.
(WebCore::getDefaultWebCryptoMasterKey):
(WebCore::wrapSerializedCryptoKey):
(WebCore::unwrapSerializedCryptoKey):
* platform/OpenSSL.cmake: Added.

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

6 months agoAdd an option for logging total phase times
sbarati@apple.com [Thu, 23 Jan 2020 02:27:26 +0000 (02:27 +0000)]
Add an option for logging total phase times
https://bugs.webkit.org/show_bug.cgi?id=206623

Reviewed by Robin Morisset and Keith Miller.

* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
* jsc.cpp:
(runJSC):
* runtime/OptionsList.h:
* tools/CompilerTimingScope.cpp:
(JSC::CompilerTimingScope::CompilerTimingScope):
(JSC::CompilerTimingScope::~CompilerTimingScope):
(JSC::logTotalPhaseTimes):
* tools/CompilerTimingScope.h:

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

6 months agouniqueLogIdentifier() should generate a unique identifiers
eric.carlson@apple.com [Thu, 23 Jan 2020 02:25:23 +0000 (02:25 +0000)]
uniqueLogIdentifier() should generate a unique identifiers
https://bugs.webkit.org/show_bug.cgi?id=206612

Reviewed by Brent Fulgham.

* wtf/LoggerHelper.h:
(WTF::LoggerHelper::uniqueLogIdentifier):

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

6 months agoWebKitTestRunner: move code sign configurations from WebKitTestRunner.xcconfig to...
jiewen_tan@apple.com [Thu, 23 Jan 2020 02:14:54 +0000 (02:14 +0000)]
WebKitTestRunner: move code sign configurations from WebKitTestRunner.xcconfig to DebugRelease.xcconfig
https://bugs.webkit.org/show_bug.cgi?id=206607
<rdar://problem/56087327>

Reviewed by Alexey Proskuryakov.

* WebKitTestRunner/Configurations/WebKitTestRunner.xcconfig:

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

6 months agopreprocess-idls.pl: CygwinPathIfNeeded should use Cygwin::win_to_posix_path instead...
Hironori.Fujii@sony.com [Thu, 23 Jan 2020 01:53:18 +0000 (01:53 +0000)]
preprocess-idls.pl: CygwinPathIfNeeded should use Cygwin::win_to_posix_path instead of invoking cygpath
https://bugs.webkit.org/show_bug.cgi?id=206407

Reviewed by Chris Dumez.

preprocess-idls.pl was invoking cygpath command for all input IDL
files. Use Cygwin::win_to_posix_path function instead.

* bindings/scripts/preprocess-idls.pl: Changed the way to load idlFilesList as well as generate-bindings-all.pl does.
(CygwinPathIfNeeded): Copied from CygwinPathIfNeeded of generate-bindings-all.pl.

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

6 months agoREGRESSION (r253926): webgl/1.0.3/conformance/rendering/many-draw-calls.html is much...
dino@apple.com [Thu, 23 Jan 2020 00:27:43 +0000 (00:27 +0000)]
REGRESSION (r253926): webgl/1.0.3/conformance/rendering/many-draw-calls.html is much slower, times out in debug
https://bugs.webkit.org/show_bug.cgi?id=205668

Disable asserts when compiling ANGLE in release mode by defining
NDEBUG.

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

* Configurations/ANGLE.xcconfig:

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

6 months agoLegacy WebKit: Add SPI variant of -setSelectedDOMRange that can perform the selection...
dbates@webkit.org [Thu, 23 Jan 2020 00:24:24 +0000 (00:24 +0000)]
Legacy WebKit: Add SPI variant of -setSelectedDOMRange that can perform the selection as if triggered by the user
https://bugs.webkit.org/show_bug.cgi?id=206622

Reviewed by Wenson Hsieh.

Add a new -setSelectedDOMRange SPI variant that takes a boolean to indicate whether the selection
was triggered by the user.

While I am here, I simplified and modernized the code. This includes moving the null check of
Frame::page() to the top of the function. This let me eliminate the null check for Frame::view()
because every frame that has a page must have a non-null view. I imported WebEditorClient.h
to get WebKit::core(NSSelectionAffinity) and remove a C-style cast to WebCore::EAffinity.
I also used more "auto".

* WebView/WebFrame.mm:
(-[WebFrame setSelectedDOMRange:affinity:closeTyping:]): Modified to call the newly added variant,
passing "userTriggered:NO" to keep the current behavior.
(-[WebFrame setSelectedDOMRange:affinity:closeTyping:userTriggered:]): Added.
* WebView/WebFramePrivate.h:

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

6 months agoMake a Ref to WindowEventLoop when the timer to run tasks fires
rniwa@webkit.org [Thu, 23 Jan 2020 00:20:24 +0000 (00:20 +0000)]
Make a Ref to WindowEventLoop when the timer to run tasks fires
https://bugs.webkit.org/show_bug.cgi?id=206568

Reviewed by Antti Koivisto.

Keep WindowEventLoop alive explicitly while invoking EventLoop::run.

* dom/WindowEventLoop.cpp:
(WebCore::WindowEventLoop::WindowEventLoop):
(WebCore::WindowEventLoop::didReachTimeToRun):
* dom/WindowEventLoop.h:

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

6 months agoREGRESSION (r253519): [WKWebView evaluateJavaScript:completionHandler:] gives a non...
beidson@apple.com [Wed, 22 Jan 2020 23:48:29 +0000 (23:48 +0000)]
REGRESSION (r253519): [WKWebView evaluateJavaScript:completionHandler:] gives a non-nil, non-Error result even when JavaScript cannot be evaluated
<rdar://problem/58544942> and https://bugs.webkit.org/show_bug.cgi?id=206608

Reviewed by Alex Christensen.

Source/WebCore:

Covered by new API test.

* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::executeScriptInWorld): Address a FIXME added in 253519 which had predicted this problem.

Tools:

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

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

6 months agoREGRESSION: [ Mac WK2 ] webgpu/vertex-buffer-triangle-strip.html is a flakey image...
tsavell@apple.com [Wed, 22 Jan 2020 23:38:21 +0000 (23:38 +0000)]
REGRESSION: [ Mac WK2 ] webgpu/vertex-buffer-triangle-strip.html is a flakey image failure
https://bugs.webkit.org/show_bug.cgi?id=198942

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

6 months agoRemove unused enable macro ENABLE_JIT_CONSTANT_BLINDING
commit-queue@webkit.org [Wed, 22 Jan 2020 23:25:46 +0000 (23:25 +0000)]
Remove unused enable macro ENABLE_JIT_CONSTANT_BLINDING
https://bugs.webkit.org/show_bug.cgi?id=206415

Patch by Sam Weinig <weinig@apple.com> on 2020-01-22
Reviewed by Anders Carlsson.

* wtf/PlatformEnable.h:
ENABLE_JIT_CONSTANT_BLINDING is not used anywhere in WebKit so can be removed.

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

6 months ago[32-bits][JIT] Fix build issues.
ticaiolima@gmail.com [Wed, 22 Jan 2020 23:12:57 +0000 (23:12 +0000)]
[32-bits][JIT] Fix build issues.
https://bugs.webkit.org/show_bug.cgi?id=206603

Reviewed by Yusuke Suzuki.

This patch is adjusting places to use VirtualRegister instead of
offset directly, to make 32-bit JIT compilable again. Original authors
of this patch are Paulo Matos and Guillaume Emont.

* jit/JIT.h:
* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emit_compareAndJump):
(JSC::JIT::emit_compareUnsignedAndJump):
(JSC::JIT::emit_compareUnsigned):
(JSC::JIT::emit_compareAndJumpSlow):
(JSC::JIT::emit_op_unsigned):
(JSC::JIT::emit_op_inc):
(JSC::JIT::emit_op_dec):
(JSC::JIT::emitBinaryDoubleOp):
* jit/JITCall32_64.cpp:
(JSC::JIT::emitPutCallResult):
(JSC::JIT::emit_op_ret):
(JSC::JIT::compileSetupFrame):
(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCall):
* jit/JITInlines.h:
(JSC::JIT::emitLoadTag):
(JSC::JIT::emitLoadPayload):
(JSC::JIT::emitGetVirtualRegister):
(JSC::JIT::emitJumpSlowCaseIfNotJSCell):
(JSC::JIT::getOperandConstantInt):
(JSC::JIT::emitGet): Deleted.
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_mov):
(JSC::JIT::emit_op_end):
(JSC::JIT::emit_op_new_object):
(JSC::JIT::emitSlow_op_new_object):
(JSC::JIT::emit_op_overrides_has_instance):
(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof_custom):
(JSC::JIT::emit_op_is_empty):
(JSC::JIT::emit_op_is_undefined):
(JSC::JIT::emit_op_is_undefined_or_null):
(JSC::JIT::emit_op_is_boolean):
(JSC::JIT::emit_op_is_number):
(JSC::JIT::emit_op_is_cell_with_type):
(JSC::JIT::emit_op_is_object):
(JSC::JIT::emit_op_to_primitive):
(JSC::JIT::emit_op_set_function_name):
(JSC::JIT::emit_op_not):
(JSC::JIT::emit_op_jfalse):
(JSC::JIT::emit_op_jtrue):
(JSC::JIT::emit_op_jeq_null):
(JSC::JIT::emit_op_jneq_null):
(JSC::JIT::emit_op_jundefined_or_null):
(JSC::JIT::emit_op_jnundefined_or_null):
(JSC::JIT::emit_op_jneq_ptr):
(JSC::JIT::emit_op_eq):
(JSC::JIT::emitSlow_op_eq):
(JSC::JIT::emit_op_jeq):
(JSC::JIT::emit_op_neq):
(JSC::JIT::emitSlow_op_neq):
(JSC::JIT::emit_op_jneq):
(JSC::JIT::compileOpStrictEq):
(JSC::JIT::compileOpStrictEqJump):
(JSC::JIT::emit_op_eq_null):
(JSC::JIT::emit_op_neq_null):
(JSC::JIT::emit_op_throw):
(JSC::JIT::emit_op_to_number):
(JSC::JIT::emit_op_to_numeric):
(JSC::JIT::emit_op_to_string):
(JSC::JIT::emit_op_to_object):
(JSC::JIT::emit_op_catch):
(JSC::JIT::emit_op_get_parent_scope):
(JSC::JIT::emit_op_switch_imm):
(JSC::JIT::emit_op_switch_char):
(JSC::JIT::emit_op_switch_string):
(JSC::JIT::emit_op_enter):
(JSC::JIT::emit_op_get_scope):
(JSC::JIT::emit_op_create_this):
(JSC::JIT::emit_op_to_this):
(JSC::JIT::emit_op_check_tdz):
(JSC::JIT::emit_op_has_structure_property):
(JSC::JIT::emit_op_has_indexed_property):
(JSC::JIT::emitSlow_op_has_indexed_property):
(JSC::JIT::emit_op_get_direct_pname):
(JSC::JIT::emit_op_enumerator_structure_pname):
(JSC::JIT::emit_op_enumerator_generic_pname):
(JSC::JIT::emit_op_profile_type):
(JSC::JIT::emit_op_log_shadow_chicken_prologue):
(JSC::JIT::emit_op_log_shadow_chicken_tail):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_put_getter_by_id):
(JSC::JIT::emit_op_put_setter_by_id):
(JSC::JIT::emit_op_put_getter_setter_by_id):
(JSC::JIT::emit_op_put_getter_by_val):
(JSC::JIT::emit_op_put_setter_by_val):
(JSC::JIT::emit_op_del_by_id):
(JSC::JIT::emit_op_del_by_val):
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emitSlow_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emitGenericContiguousPutByVal):
(JSC::JIT::emitArrayStoragePutByVal):
(JSC::JIT::emitPutByValWithCachedId):
(JSC::JIT::emitSlow_op_put_by_val):
(JSC::JIT::emit_op_try_get_by_id):
(JSC::JIT::emitSlow_op_try_get_by_id):
(JSC::JIT::emit_op_get_by_id_direct):
(JSC::JIT::emitSlow_op_get_by_id_direct):
(JSC::JIT::emit_op_get_by_id):
(JSC::JIT::emitSlow_op_get_by_id):
(JSC::JIT::emit_op_get_by_id_with_this):
(JSC::JIT::emitSlow_op_get_by_id_with_this):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emitSlow_op_put_by_id):
(JSC::JIT::emit_op_in_by_id):
(JSC::JIT::emitSlow_op_in_by_id):
(JSC::JIT::emitResolveClosure):
(JSC::JIT::emit_op_resolve_scope):
(JSC::JIT::emitLoadWithStructureCheck):
(JSC::JIT::emitGetClosureVar):
(JSC::JIT::emit_op_get_from_scope):
(JSC::JIT::emitSlow_op_get_from_scope):
(JSC::JIT::emitPutGlobalVariable):
(JSC::JIT::emitPutGlobalVariableIndirect):
(JSC::JIT::emitPutClosureVar):
(JSC::JIT::emit_op_put_to_scope):
(JSC::JIT::emit_op_get_from_arguments):
(JSC::JIT::emit_op_put_to_arguments):
(JSC::JIT::emit_op_get_internal_field):
(JSC::JIT::emit_op_put_internal_field):
* jit/JSInterfaceJIT.h:
(JSC::JSInterfaceJIT::emitJumpIfNotJSCell):
(JSC::JSInterfaceJIT::emitLoadInt32):
(JSC::JSInterfaceJIT::emitLoadDouble):

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

6 months agoUnreviewed, fix build with recent SDKs.
cdumez@apple.com [Wed, 22 Jan 2020 22:31:58 +0000 (22:31 +0000)]
Unreviewed, fix build with recent SDKs.

* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
(WebCore::MediaPlaybackTargetPickerMac::externalOutputDeviceAvailable):
(WebCore::MediaPlaybackTargetPickerMac::devicePicker):
(WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker):

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

6 months agoAutomatic link replacement via "Smart links" should emit "insertLink" input events
commit-queue@webkit.org [Wed, 22 Jan 2020 22:00:43 +0000 (22:00 +0000)]
link replacement via "Smart links" should emit "insertLink" input events
https://bugs.webkit.org/show_bug.cgi?id=191306
Source/WebCore:

<rdar://problem/58491514>

Patch by Nikos Mouchtaris <nmouchtaris@apple.com> on 2020-01-22
Reviewed by Wenson Hsieh.

Added support for outputting "insertLink" for input type and the url for the
data of the input event when smart link is used.

Test: fast/events/input-event-insert-link.html

* editing/CreateLinkCommand.h:
* editing/EditCommand.cpp:
(WebCore::inputTypeNameForEditingAction):

LayoutTests:

Patch by Nikos Mouchtaris <nmouchtaris@apple.com> on 2020-01-22
Reviewed by Wenson Hsieh.

Due to webkit.org/b/162081 this test is skipped for WebKit2.

* fast/events/input-event-insert-link-expected.txt: Added.
* fast/events/input-event-insert-link.html: Added.
* platform/gtk/TestExpectations:
* platform/ios/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:

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

6 months agowebkitpy: WebSocket server doesn't support Python 3 (Workaround)
jbedard@apple.com [Wed, 22 Jan 2020 21:58:37 +0000 (21:58 +0000)]
webkitpy: WebSocket server doesn't support Python 3 (Workaround)
https://bugs.webkit.org/show_bug.cgi?id=206546

Reviewed by Alexey Proskuryakov.

websocket_server.py doesn't support Python 3, and needs to be run with
Python 2.

* Scripts/webkitpy/layout_tests/servers/websocket_server.py:
(PyWebSocket._prepare_config): Use Python 2 explicitly.

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

6 months ago[ARMv7] Assembler is generating wrong instruction for ldr r2, [r3, #7]
ticaiolima@gmail.com [Wed, 22 Jan 2020 21:42:58 +0000 (21:42 +0000)]
[ARMv7] Assembler is generating wrong instruction for ldr r2, [r3, #7]
https://bugs.webkit.org/show_bug.cgi?id=206231

Reviewed by Mark Lam.

When generating code for `ldr` on ARMv7, we were encoding immediates not
multiple of 4 using Encoding T1, which only accepts multiple of 4 as
immediates. This patch fixes such issue and allow us generate proper
code when offset imemdiates are not multiple of 4.

* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::ldr):

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

6 months ago[build-webkit] Add option for toggling unified build
basuke.suzuki@sony.com [Wed, 22 Jan 2020 21:33:19 +0000 (21:33 +0000)]
[build-webkit] Add option for toggling unified build
https://bugs.webkit.org/show_bug.cgi?id=206597

Reviewed by Adrian Perez de Castro.

Added command line option for build-webkit script to toggle unified build.

* Scripts/webkitperl/FeatureList.pm:

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

6 months agoRemove ImageBuffer::sizeForDestinationSize()
commit-queue@webkit.org [Wed, 22 Jan 2020 21:32:11 +0000 (21:32 +0000)]
Remove ImageBuffer::sizeForDestinationSize()
https://bugs.webkit.org/show_bug.cgi?id=206541

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-01-22
Reviewed by Tim Horton.

-- Remove ImageBuffer::sizeForDestinationSize() since it is currently
   doing nothing. For CG and D2D ports, it scales a rect by the ratio
   backingStoreSize / internalSize which is always 1. The constructor
   ImageBuffer::ImageBuffer() sets m_size and m_data.backingStoreSize
   to the same value always.

-- Remove ImageBuffer::isCompatibleWithContext() since it is not used.

-- Remove ImageBuffer::fastCopyImageMode() since it returns
   DontCopyBackingStore on all ports.

* html/CustomPaintCanvas.cpp:
(WebCore::CustomPaintCanvas::copiedImage const):
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::texSubImage2D):
(WebCore::WebGLRenderingContextBase::texImage2D):
(WebCore::WebGLRenderingContextBase::drawImageIntoBuffer):
* platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::sizeForDestinationSize const): Deleted.
(WebCore::ImageBuffer::isCompatibleWithContext const): Deleted.
* platform/graphics/ImageBuffer.h:
(WebCore::ImageBuffer::logicalSize const):
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::fastCopyImageMode): Deleted.
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::clipToImageBuffer):
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::ImageBuffer):
(WebCore::createBitmapImageAfterScalingIfNeeded):
(WebCore::ImageBuffer::copyImage const):
(WebCore::ImageBuffer::sinkIntoImage):
(WebCore::ImageBuffer::toCFData const):
(WebCore::scaleSizeToUserSpace): Deleted.
(WebCore::ImageBuffer::sizeForDestinationSize const): Deleted.
(WebCore::ImageBuffer::fastCopyImageMode): Deleted.
* platform/graphics/win/ImageBufferDirect2D.cpp:
(WebCore::scaleSizeToUserSpace): Deleted.
(WebCore::ImageBuffer::sizeForDestinationSize const): Deleted.
(WebCore::ImageBuffer::fastCopyImageMode): Deleted.

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

6 months agoShare InjectedBundleController::platformInitialize
don.olmstead@sony.com [Wed, 22 Jan 2020 21:21:58 +0000 (21:21 +0000)]
Share InjectedBundleController::platformInitialize
https://bugs.webkit.org/show_bug.cgi?id=206598

Reviewed by Konstantin Tokarev.

Add a stub for platformInitialize in InjectedBundleController.cpp which is
used for non-Cocoa ports. Remove the platform specific stubs.

* TestWebKitAPI/InjectedBundleController.cpp:
(TestWebKitAPI::InjectedBundleController::platformInitialize):
* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/PlatformWPE.cmake:
* TestWebKitAPI/PlatformWin.cmake:
* TestWebKitAPI/gtk/InjectedBundleControllerGtk.cpp: Removed.
* TestWebKitAPI/win/InjectedBundleControllerWin.cpp: Removed.
* TestWebKitAPI/wpe/InjectedBundleControllerWPE.cpp: Removed.

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

6 months ago[JSC] DateMath should accept more ISO-8601 timezone designators even if they are...
ysuzuki@apple.com [Wed, 22 Jan 2020 20:55:31 +0000 (20:55 +0000)]
[JSC] DateMath should accept more ISO-8601 timezone designators even if they are not included in ECMA262 to produce expected results in the wild code
https://bugs.webkit.org/show_bug.cgi?id=160287

Reviewed by Ross Kirsling.

JSTests:

* stress/relaxed-timezone-designators.js: Added.
(shouldBe):
(parsedDate):

Source/WTF:

While ECMA262[1] always requires ":" in a timezone designator between hours and minutes (like, "hh:mm"),
ISO-8601 can accept additional forms, "+hh" and "+hhmm". This patch relaxes our Date parsing to accept this
type of timezone designators so that we can accept wider forms of date time formats. This addition does not
break the existing parsing rules since '+-' prefix can clarify that following sequences are timezones.

[1]: https://tc39.es/ecma262/#sec-date-time-string-format
[2]: https://en.wikipedia.org/wiki/ISO_8601#Time_zone_designators

* wtf/DateMath.cpp:
(WTF::parseES5TimePortion):
(WTF::parseES5DateFromNullTerminatedCharacters):

LayoutTests:

* js/date-parse-test-expected.txt:
* js/script-tests/date-parse-test.js:

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

6 months agoFix SDK availability macros
krollin@apple.com [Wed, 22 Jan 2020 20:52:50 +0000 (20:52 +0000)]
Fix SDK availability macros
https://bugs.webkit.org/show_bug.cgi?id=206463
<rdar://problem/58581906>

Reviewed by Timothy Hatcher.

Bug 197841 updated WebKit.xcconfig with regards to when it runs a
header post-processing script. This post-processing script grovels
over our exported headers, changing macros like WK_API_AVAILABLE to
the standard API_AVAILABLE. Because of the change in Bug 197841, the
script was no longer being run when preparing macOS 10.15 SDKs, which
was breaking those SDKs. Fix this by reverting the change, allowing
the macros to be replaced for macOS 10.15.

We also need to touch WKFoundation.h in order to support incremental
builds. If we don't, then the version of WKFoundation.h that was
exported in the previous build and that was incorrectly post-processed
would remain incorrectly post-processed. Touch the file so that it
will get re-exported and re-post-processed.

No new tests - no added or changed functionality.

* Configurations/WebKit.xcconfig:
* Shared/API/Cocoa/WKFoundation.h:

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