Commit Graph

240929 Commits

Author SHA1 Message Date
Eric Hutchison 20f60aafed [BigSur wk2] webgl/2.0.0/conformance2/textures/image_bitmap_from_video/tex-2d-rgb565-rgb-unsigned_short_5_6_5.html.
https://bugs.webkit.org/show_bug.cgi?id=229015.

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

Canonical link: https://commits.webkit.org/240455@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280938 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 23:57:54 +00:00
Wenson Hsieh d9615c4352 [ iOS ] fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=228672
rdar://81348960

Reviewed by Simon Fraser.

On rare occasion, this test times out when the synthesized swipe gesture fails to cause the scrollable overflow
container to scroll past an arbitrary scroll position threshold (previously 400px). Mitigate this by rewriting
the test, such that we'll swipe _until_ we scroll past the threshold (which has also been lowered to just
100px).

Additionally, rewrite parts of this test to be generally easier to follow; for example, remove the scroll event
listener and instead just synthesize swipe gestures until `scroller.scrollTop` crosses 100px.

* fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body-expected.txt:
* fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body.html:
* platform/ios-wk2/TestExpectations: Remove the failing test expectation.


Canonical link: https://commits.webkit.org/240454@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280937 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 23:51:07 +00:00
Peng Liu f48d577bf7 [BigSur] TestWebKitAPI.AudioRoutingArbitration.Updating fails after r280726
https://bugs.webkit.org/show_bug.cgi?id=228966

Reviewed by Eric Carlson.

Add an IPC message `RemoteAudioSessionProxy::SetIsPlayingToBluetoothOverride`
for testing purpose, so that the test `AudioRoutingArbitration.Updating` will
work as expected when "Media in GPU Process" is enabled.

No new tests. Fix an API test failure.

* GPUProcess/media/RemoteAudioSessionProxy.cpp:
(WebKit::RemoteAudioSessionProxy::setCategory):
(WebKit::RemoteAudioSessionProxy::setIsPlayingToBluetoothOverride):
* GPUProcess/media/RemoteAudioSessionProxy.h:
* GPUProcess/media/RemoteAudioSessionProxy.messages.in:
* WebProcess/GPU/media/RemoteAudioSession.cpp:
(WebKit::RemoteAudioSession::setCategory):
(WebKit::RemoteAudioSession::setIsPlayingToBluetoothOverride):
* WebProcess/GPU/media/RemoteAudioSession.h:


Canonical link: https://commits.webkit.org/240453@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280936 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 22:54:12 +00:00
David Kilzer 82c768df47 ThreadSanitizer: data race in WTF::StringImpl::deref() under WebKit::NetworkCache::IOChannel::~IOChannel()
<https://webkit.org/b/229003>
<rdar://problem/81795626>

Reviewed by Chris Dumez.

Covered by 3245 layout tests running with TSan including:
    http/wpt/service-workers/file-upload.html

* NetworkProcess/cache/NetworkCacheIOChannel.h:
(WebKit::NetworkCache::IOChannel::open):
- Update to use #pragma once.
- Make an isolatedCopy() for m_path.
(WebKit::NetworkCache::IOChannel::IOChannel):
- Switch to using an rvalue reference.
* NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
(WebKit::NetworkCache::IOChannel::IOChannel): Ditto.
* NetworkProcess/cache/NetworkCacheIOChannelCurl.cpp:
(WebKit::NetworkCache::IOChannel::IOChannel): Ditto.
* NetworkProcess/cache/NetworkCacheIOChannelGLib.cpp:
(WebKit::NetworkCache::IOChannel::IOChannel): Ditto.
- Switch to use m_path instead of filePath to prevent
  use-after-move.


Canonical link: https://commits.webkit.org/240452@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 22:33:17 +00:00
Sihui Liu d90b20a162 Suspend WorkQueue of ResourceLoadStatistics and LocalStorage sooner
https://bugs.webkit.org/show_bug.cgi?id=228748
<rdar://problem/81626714>

Reviewed by Chris Dumez.

Source/WebKit:

When suspending ResourceLoadStatistics and LocalStorage, we dispatched a suspend task, which waits on a
condition, to their WorkQueue. That means the queue will be suspended after completing all tasks scheduled
before the suspend task. These tasks may take a long time to complete and assertion may be timed out.

When network process receives PrepareToSuspend message, we want the queues to suspend as soon as possible. To
achieve that, now we check if the queue needs to be suspended before each task, which ensures the queue
execute as most one task after suspend().

* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
(WebKit::ResourceLoadStatisticsDatabaseStore::ResourceLoadStatisticsDatabaseStore):
* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
* NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
(WebKit::ResourceLoadStatisticsMemoryStore::ResourceLoadStatisticsMemoryStore):
* NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h:
* NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:
(WebKit::ResourceLoadStatisticsStore::ResourceLoadStatisticsStore):
* NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:
(WebKit::ResourceLoadStatisticsStore::workQueue):
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::sharedStatisticsQueue):
(WebKit::WebResourceLoadStatisticsStore::suspend):
(WebKit::WebResourceLoadStatisticsStore::resume):
(WebKit::WTF_GUARDED_BY_LOCK): Deleted.
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
* NetworkProcess/WebStorage/LocalStorageDatabase.cpp:
(WebKit::LocalStorageDatabase::create):
(WebKit::LocalStorageDatabase::LocalStorageDatabase):
* NetworkProcess/WebStorage/LocalStorageDatabase.h:
* NetworkProcess/WebStorage/LocalStorageNamespace.cpp:
(WebKit::LocalStorageNamespace::getOrCreateStorageArea):
* NetworkProcess/WebStorage/LocalStorageNamespace.h:
* NetworkProcess/WebStorage/SessionStorageNamespace.cpp:
(WebKit::SessionStorageNamespace::getOrCreateStorageArea):
* NetworkProcess/WebStorage/SessionStorageNamespace.h:
* NetworkProcess/WebStorage/StorageArea.cpp:
(WebKit::StorageArea::StorageArea):
* NetworkProcess/WebStorage/StorageArea.h:
* NetworkProcess/WebStorage/StorageManager.cpp:
(WebKit::StorageManager::createLocalStorageArea):
(WebKit::StorageManager::createTransientLocalStorageArea):
(WebKit::StorageManager::createSessionStorageArea):
* NetworkProcess/WebStorage/StorageManager.h:
* NetworkProcess/WebStorage/StorageManagerSet.cpp:
(WebKit::StorageManagerSet::StorageManagerSet):
(WebKit::StorageManagerSet::suspend):
(WebKit::StorageManagerSet::resume):
* NetworkProcess/WebStorage/StorageManagerSet.h:
(WebKit::StorageManagerSet::WTF_GUARDED_BY_LOCK): Deleted.
* NetworkProcess/WebStorage/TransientLocalStorageNamespace.cpp:
(WebKit::TransientLocalStorageNamespace::getOrCreateStorageArea):
* NetworkProcess/WebStorage/TransientLocalStorageNamespace.h:

Source/WTF:

Add SuspendableWorkQueue that would perform suspend check before each task.

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/Forward.h:
* wtf/SuspendableWorkQueue.cpp: Added.
(WTF::SuspendableWorkQueue::create):
(WTF::SuspendableWorkQueue::SuspendableWorkQueue):
(WTF::SuspendableWorkQueue::suspend):
(WTF::SuspendableWorkQueue::resume):
(WTF::SuspendableWorkQueue::dispatch):
(WTF::SuspendableWorkQueue::dispatchAfter):
(WTF::SuspendableWorkQueue::dispatchSync):
(WTF::SuspendableWorkQueue::invokeAllSuspensionCompletionHandlers):
(WTF::SuspendableWorkQueue::suspendIfNeeded):
* wtf/SuspendableWorkQueue.h: Added.
* wtf/WorkQueue.h:
(): Deleted.


Canonical link: https://commits.webkit.org/240451@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280934 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 22:25:56 +00:00
Chris Dumez 47909a505b <a rel="opener noopener" target="_blank"> should create a window without opener
https://bugs.webkit.org/show_bug.cgi?id=229011

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline WPT tests that are now passing.

* web-platform-tests/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener-expected.txt:
* web-platform-tests/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener_base-expected.txt:

Source/WebCore:

<a rel="opener noopener" target="_blank"> should create a window without opener, as per:
- https://html.spec.whatwg.org/#get-an-element's-noopener (noopener is checked *before* opener).

Firefox and Chrome match the specification.

No new tests, rebaselined existing tests.

* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::handleClick):


Canonical link: https://commits.webkit.org/240450@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280933 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 22:21:57 +00:00
Chris Dumez c415300e5b http/tests/xmlhttprequest/interactive-state.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=229006
<rdar://80343834>

Reviewed by Alex Christensen.

* http/tests/xmlhttprequest/interactive-state-expected.txt:
Rebaseline test as the output is a bit different now.

* http/tests/xmlhttprequest/interactive-state.cgi:
Use sleep instead of writing a lot of data to make sure that
the data is processed in chunks.

* http/tests/xmlhttprequest/interactive-state.html:
Modernize test a bit.

* platform/mac-wk1/TestExpectations:
Unskip test as it should no longer be flaky.


Canonical link: https://commits.webkit.org/240449@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280932 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 22:18:38 +00:00
Alex Christensen 481d2a44cc REGRESSION (r278392) performance.measure should never throw an InvalidAccessError for fetchStart
https://bugs.webkit.org/show_bug.cgi?id=229008
<rdar://79960877>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-08-11
Reviewed by Chris Dumez.

Source/WebCore:

Test: http/tests/performance/performance-measure-fetch-start.html

PerformanceTiming::fetchStart is returning 0 when we get a main resource from the cache sometimes.
This is causing PerformanceUserTiming::convertMarkToTimestamp to throw an error, which it should.
Like PerformanceResourceTiming::fetchStart we need to fall back to ResourceLoadTiming::startTime
if the NetworkLoadMetrics doesn't have any useful data for us.

* page/PerformanceTiming.cpp:
(WebCore::PerformanceTiming::fetchStart const):

LayoutTests:

* http/tests/performance/performance-measure-fetch-start-expected.txt: Added.
* http/tests/performance/performance-measure-fetch-start.html: Added.

Canonical link: https://commits.webkit.org/240448@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280931 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 22:05:02 +00:00
John Wilander 0fe1e26842 PCM: Flip WebCore's FraudPreventionEnabled to true if HAVE(RSA_BSSA) to match the experimental setting
https://bugs.webkit.org/show_bug.cgi?id=228961

Reviewed by Tim Horton.

Existing tests use the affected anchor attribute.

* page/RuntimeEnabledFeatures.h:
* page/Settings.yaml:


Canonical link: https://commits.webkit.org/240447@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280930 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 20:39:42 +00:00
Dana Estra 249471fc5c Start smooth keyboard scrolling animation when pageUp or pageDown key is pressed.
https://bugs.webkit.org/show_bug.cgi?id=228156

Patch by Dana Estra <destra@apple.com> on 2021-08-11
Reviewed by Tim Horton.

Source/WebCore:

UIProcess now no longer handles scrollPageUp and scrollPageDown events. They return to eventHandler as
unhandled and the keyboard scroll animation is started.

Tests: fast/scrolling/keyboard-scrolling-distance-downArrow.html
       fast/scrolling/keyboard-scrolling-distance-pageDown.html

* page/EventHandler.cpp:
(WebCore::EventHandler::defaultKeyboardEventHandler):
* platform/KeyboardScrollingAnimator.cpp:
(WebCore::KeyboardScrollingAnimator::keyboardScrollForKeyboardEvent const):

Source/WebKit:

UIProcess now no longer handles scrollPageUp and scrollPageDown events. They return
to eventHandler as unhandled and the keyboard scroll animation is started.

* UIProcess/API/mac/WKWebViewMac.mm:
(-[WKWebView scrollPageDown:]):
(-[WKWebView scrollPageUp:]):

LayoutTests:

Tests check that at least 2 scroll events occur when the downArrow key or pageDown key is pressed, and
that with each event, the page's offset from its original position increases.

* fast/scrolling/keyboard-scrolling-distance-downArrow-expected.txt: Added.
* fast/scrolling/keyboard-scrolling-distance-downArrow.html: Added.
* fast/scrolling/keyboard-scrolling-distance-pageDown-expected.txt: Added.
* fast/scrolling/keyboard-scrolling-distance-pageDown.html: Added.

Canonical link: https://commits.webkit.org/240446@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280928 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 20:32:32 +00:00
Aditya Keerthi b768dd1774 REGRESSION (r273072): Caps lock indicator in password field is too large
https://bugs.webkit.org/show_bug.cgi?id=228970
rdar://81546781

Reviewed by Wenson Hsieh.

Source/WebCore:

r273072 made it so that flex items with an intrinsic size will honor
their aspect ratio when computing their content size. Prior to the
change, in taller password fields, the flex item representing the caps
lock indicator would be tall and narrow. The height would stretch to
fill the container, but the width would maintain its intrinsic width of
17px. Now that aspect ratio is accounted for, the width increases to
match the height, resulting in a much larger indicator in taller password
fields.

However, while r273072 regressed the appearance of the caps lock
indicator, it merely exposed an issue with the styling of the indicator.

Consider the following test case, which is a reduced version how the
caps lock indicator is styled:

<div style="display: flex; height: 100px">
    <div style="content: url(17_x_17_blue_square.svg); align-self: stretch;"></div>
</div>

Prior to r273072, this displayed a 17x17 blue square (inside a 17x100
flex item). However, in Chrome, Firefox, and WebKit after r273072, this
shows a 100x100 blue square (inside a 100x100 flex item). This is the
expected behavior now that aspect ratio is accounted for.

Consequently, to fix the issue, the width of the indicator must be
limited to a maximum value. 17px was chosen to be the max-width, as the
indicator's width would not exceed 17px prior to r273072.

Test: fast/forms/caps-lock-indicator-width.html

* css/html.css:
(input::-webkit-caps-lock-indicator):

LayoutTests:

Added a layout test to verify that the width of the caps lock indicator
adapts to the height of the password field, but does not exceed a
maximum width.

The added test is skipped on WK1, since DumpRenderTree does not support
toggling caps lock state. Implementing the testing hook in DRT is made
difficult by the fact that, in WK1, the caps lock state is queried
directly from the OS, using GetCurrentKeyModifiers.

* fast/forms/caps-lock-indicator-width-expected.txt: Added.
* fast/forms/caps-lock-indicator-width.html: Added.
* platform/ios-wk1/TestExpectations:
* platform/mac-wk1/TestExpectations:


Canonical link: https://commits.webkit.org/240445@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280927 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 20:19:33 +00:00
Kyle Piddington 98052bba59 Avoid infinite recursion when command buffer creation fails
https://bugs.webkit.org/show_bug.cgi?id=228978
<rdar://79224824>

Reviewed by Kenneth Russell.

In cases where the MTLCommandBuffer is not a valid metal object,
we can end up in an infinite recursive loop during draw call setup. Refactor setupDraw to take no more than two attempts through the setup function.

Testing: Ran WebGL tests, use case samples. Set up synthetic
repro forcing bail out path, saw WebGL content fail to render
instead of a web process crash.

* src/libANGLE/renderer/metal/ContextMtl.h:
* src/libANGLE/renderer/metal/ContextMtl.mm:
(rx::ContextMtl::setupDraw):
(rx::ContextMtl::setupDrawImpl):


Canonical link: https://commits.webkit.org/240444@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280926 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 20:04:36 +00:00
Alex Christensen 2ecede3944 Fix iOS debug build after r280875
https://bugs.webkit.org/show_bug.cgi?id=228683

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



Canonical link: https://commits.webkit.org/240443@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280925 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 20:00:46 +00:00
Chris Dumez e9d0bdb6e5 Stop evaluating <script>s moved between Documents during fetching
https://bugs.webkit.org/show_bug.cgi?id=202714
<rdar://problem/56208425>

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that more checks are passing. Note that these checks were already passing in both Firefox and Chrome.

* web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-fetch-error-external-classic-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-fetch-error-external-module-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-parse-error-external-classic-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-parse-error-external-module-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-parse-error-inline-classic-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-success-external-classic-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-success-external-module-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-success-inline-classic-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-fetch-error-external-classic-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-fetch-error-external-module-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-parse-error-external-classic-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-parse-error-external-module-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-parse-error-inline-classic-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-success-external-classic-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-success-external-module-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-success-inline-classic-expected.txt:

Source/WebCore:

Stop evaluating <script>s moved between Documents during fetching:
- https://github.com/whatwg/html/issues/2469
- https://github.com/whatwg/html/pull/2673

Both Firefox and Chrome already behave this way.

No new tests, rebaselined existing tests.

* dom/ScriptElement.cpp:
(WebCore::ScriptElement::prepareScript):
Set the element's preparation-time document to its node document, as per:
- https://html.spec.whatwg.org/multipage/scripting.html#prepare-a-script (step 11)

(WebCore::ScriptElement::executePendingScript):
If scriptElement's preparation-time document is not equal to scriptElement's node document, then return, as per:
- https://html.spec.whatwg.org/multipage/scripting.html#execute-the-script-block (step 2)

* dom/ScriptElement.h:


Canonical link: https://commits.webkit.org/240442@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280924 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 19:44:55 +00:00
Ayumi Kojima 06b7e4550d [ Win EWS ] fast/forms/input-baseline.html is flaky crashing.
https://bugs.webkit.org/show_bug.cgi?id=229009

Unreviewed Windows test gardening to seed up EWS.

* platform/win/TestExpectations:

Canonical link: https://commits.webkit.org/240441@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280923 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 18:46:37 +00:00
Youenn Fablet 95faabf3b3 Media element is not always autoplaying when going from background to foreground if it is initially not in viewport
https://bugs.webkit.org/show_bug.cgi?id=228955
Source/WebCore:

Reviewed by Eric Carlson.

In case video element is autoplayable but is paused, we should try to autoplay even if we are not interrupted due to invisible autoplay.
Covered by API test.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateShouldAutoplay):

Tools:

rdar://81751653

Reviewed by Eric Carlson.

* TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:


Canonical link: https://commits.webkit.org/240440@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280920 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 18:08:49 +00:00
Ayumi Kojima a75c04e8f7 [ Win EWS ] http/tests/xmlhttprequest/xmlhttprequest-50ms-download-dispatch.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=229007

Unreviewed Windows test gardening to seed up EWS.

* platform/win/TestExpectations:

Canonical link: https://commits.webkit.org/240439@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280919 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 17:59:01 +00:00
Arcady Goldmints-Orlov 55f4f66794 [Gstreamer] mark media/media-source/media-mp4-h264-sequence-mode.html as failing
https://bugs.webkit.org/show_bug.cgi?id=228976

Unreviewed test gardening.

Patch by Arcady Goldmints-Orlov <agoldmints@igalia.com> on 2021-08-11

* platform/glib/TestExpectations:

Canonical link: https://commits.webkit.org/240438@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280918 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 17:48:39 +00:00
Youenn Fablet 02ab7c153f Remove --no-demangle XLinker option from WebCore
https://bugs.webkit.org/show_bug.cgi?id=228949

Reviewed by Alexey Proskuryakov.

Remove options that were added inadvertently.
No change of behavior as this is changing the linker log only.

* Configurations/WebCore.xcconfig:
* Configurations/WebCoreTestSupport.xcconfig:


Canonical link: https://commits.webkit.org/240437@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280916 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 17:20:07 +00:00
Alex Christensen 0800bfbc55 Fix iOS debug build after r280875
https://bugs.webkit.org/show_bug.cgi?id=228683

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



Canonical link: https://commits.webkit.org/240436@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280915 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 16:56:24 +00:00
Per Arne Vollan 15501ab747 [macOS] Disable menu bar related code in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=229002
<rdar://problem/80408291>

Reviewed by Brent Fulgham.

Disable some menu bar related code running in the WebContent process on macOS, since it only makes sense to execute it in the UI process.

* WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-OSX.plist:


Canonical link: https://commits.webkit.org/240435@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280914 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 16:51:46 +00:00
Chris Dumez 45084466ac HTMLMetaElement http-equiv should not be processed in shadow trees
https://bugs.webkit.org/show_bug.cgi?id=228973

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Rebaseline WPT test that is now passing.

* web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/not-in-shadow-tree-expected.txt:

Source/WebCore:

HTMLMetaElement http-equiv should not be processed in shadow trees:
- https://html.spec.whatwg.org/#attr-meta-http-equiv
- https://html.spec.whatwg.org/multipage/infrastructure.html#insert-an-element-into-a-document
- https://dom.spec.whatwg.org/#in-a-document-tree

Firefox and Chrome already match the specification here.

No new tests, rebaselined existing test.

* dom/Node.h:
(WebCore::Node::isInDocumentTree const):
* html/HTMLMetaElement.cpp:
(WebCore::HTMLMetaElement::attributeChanged):
(WebCore::HTMLMetaElement::process):


Canonical link: https://commits.webkit.org/240434@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280913 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 16:39:55 +00:00
Ayumi Kojima 50433925d9 [ Win EWS ] fast/events/dropzone-005.html is flaky crashing.
https://bugs.webkit.org/show_bug.cgi?id=229005

Unreviewed Windows test gardening to seed up EWS.

* platform/win/TestExpectations:

Canonical link: https://commits.webkit.org/240433@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280912 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 16:22:33 +00:00
Chris Dumez 751931e5f8 HTMLStyleElement should create its style sheet even if its media attribute is invalid
https://bugs.webkit.org/show_bug.cgi?id=228977

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Rebaseline WPT test that is now passing.

* web-platform-tests/html/semantics/document-metadata/the-style-element/style_non_matching_media-expected.txt:

Source/WebCore:

HTMLStyleElement should create its style sheet even if its media attribute is invalid.

WebKit currently didn't and this was causing us to fail the following WPT test:
- html/semantics/document-metadata/the-style-element/style_non_matching_media.html

This WPT test is passing in both Firefox and Chrome.

No new tests, rebaselined existing tests.

* dom/InlineStyleSheetOwner.cpp:
(WebCore::InlineStyleSheetOwner::createSheet):


Canonical link: https://commits.webkit.org/240432@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 15:40:13 +00:00
Chris Dumez ed978f2e7e Dynamically changing HTMLStyleElement.type should change the rendering accordingly
https://bugs.webkit.org/show_bug.cgi?id=228980

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Rebaseline WPT test that is now passing.

* web-platform-tests/html/semantics/document-metadata/the-style-element/style_type_change-expected.txt:

Source/WebCore:

Dynamically changing HTMLStyleElement.type should change the rendering accordingly.

This is causing the following WPT test to fail in WebKit:
- html/semantics/document-metadata/the-style-element/style_type_change.html

This test is passing in both Firefox and Chrome.

No new tests, rebaselined existing test.

* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::parseAttribute):


Canonical link: https://commits.webkit.org/240431@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280909 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 15:39:04 +00:00
Youenn Fablet ec7ed5bc5e Enable WebRTC relay by default
https://bugs.webkit.org/show_bug.cgi?id=229000
<rdar://78767922>

Reviewed by Eric Carlson.

* Scripts/Preferences/WebPreferencesExperimental.yaml:


Canonical link: https://commits.webkit.org/240430@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280908 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 15:09:00 +00:00
Lauro Moura d992a30c33 Remove leftover offscreen canvas test case after r280084
Unreviewed test gardening.

This test was replaced by others in r280084 but not fully removed.

* web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.extraargs.worker.html: Removed.

Canonical link: https://commits.webkit.org/240429@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 14:13:08 +00:00
Kimmo Kinnunen c40e806df2 Cherry-pick ANGLE: Revise WebGL's shaderSource validation
https://bugs.webkit.org/show_bug.cgi?id=228951

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-08-11
Reviewed by Kenneth Russell.

Source/ThirdParty/ANGLE:

Cherry-pick ANGLE commit: b4fd46288aa65d61dc9c7140c7d1cdba3f4cdf9a
From: Kenneth Russell <kbr@chromium.org>
Date: Wed, 27 Jan 2021 15:56:58 -0800
Revise WebGL's shaderSource validation.

Per discussion in the WebGL working group, shaderSource no longer
generates INVALID_VALUE for sources containing characters outside the
ESSL character set. Compilation and/or linking is still specified to
fail when illegal constructs are used.

With this change, https://github.com/KhronosGroup/WebGL/pull/3206
passes with the passthrough command decoder.

Revise WebGL compatibility tests to follow the new rules.

* src/libANGLE/validationES2.cpp:
(gl::ValidateShaderSource):
* src/tests/gl_tests/WebGLCompatibilityTest.cpp:

LayoutTests:

Fixes tests:
webgl/1.0.x/conformance/misc/invalid-passed-params.html
webgl/1.0.x/conformance/glsl/bugs/character-set.html
webgl/2.0.y/conformance/misc/invalid-passed-params.html
webgl/2.0.y/conformance/glsl/bugs/character-set.html

* TestExpectations:

Canonical link: https://commits.webkit.org/240428@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280904 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 11:20:55 +00:00
Adrian Perez de Castro ce6ead9d7a Non-unified build fixes, mid August 2021 edition
https://bugs.webkit.org/show_bug.cgi?id=228985

Unreviewed non-unified build fixes.


* fileapi/ThreadableBlobRegistry.cpp: Add missing CrossOriginOpenerPolicy.h include.
* html/FormController.cpp: Add missing TypedElementDescendantIterator.h include.
* html/FormController.h: Add missing forward declaration for the Document type.
* loader/CrossOriginEmbedderPolicy.cpp: Add missing ResourceResponse.h include.
* loader/CrossOriginOpenerPolicy.cpp: Ditto.


Canonical link: https://commits.webkit.org/240427@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280890 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 09:47:27 +00:00
Cathie Chen b8f81c7c3c REGRESSION (r277997): Max-height not applied for image
https://bugs.webkit.org/show_bug.cgi?id=228872

Reviewed by Antti Koivisto.

Source/WebCore:

The image get stretched because constrainLogicalHeightByMinMax uses the intrinsic height for the minimum height.
According to [1], the automatic minimum size in the ratio-dependent axis of a box is its min-content size,
not the intrinsic size. To fix this, the ratio-dependent minimum height of a box should be computed from aspect-ratio
if it doesn't have any child, otherwise, then it should consider the intrinsic height.

[1] https://www.w3.org/TR/css-sizing-4/#aspect-ratio-minimum

* rendering/RenderBox.cpp:
(WebCore::RenderBox::constrainLogicalHeightByMinMax const): The minimum height is computed from aspect-ratio if it doesn't have any child.

LayoutTests:

* TestExpectations:


Canonical link: https://commits.webkit.org/240426@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280889 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 07:53:06 +00:00
Lauro Moura 5204d61c0c [WPE] Handle escape key in wpeKeySymForKeyRef
https://bugs.webkit.org/show_bug.cgi?id=228981

Reviewed by Carlos Garcia Campos.

Some dialog tests were failing due to "escape" key ref being
translated to the 'e' keysym.

Covered by existing tests.

* WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
(WTR::wpeKeySymForKeyRef):


Canonical link: https://commits.webkit.org/240425@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 07:46:55 +00:00
Rob Buis 7dcaaaedc9 [SVG] Attribute change triggers redundant (and out of order) setNeedsLayout call
https://bugs.webkit.org/show_bug.cgi?id=228125

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

As explained in the bug the setNeedsLayout call is redundant, however
keep using it for embedded SVG's to update width/height of the embedder.

* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::svgAttributeChanged):

Canonical link: https://commits.webkit.org/240424@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280887 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 07:43:42 +00:00
Yusuke Suzuki b89abb4aef WTFCrash in JSC::Lexer<char16_t>::append8
https://bugs.webkit.org/show_bug.cgi?id=228982

Reviewed by Mark Lam.

JSTests:

* stress/directive-includes-non-latin1.js: Added.

Source/JavaScriptCore:

sourceURL / sourceMapURL directive should not assume Latin1 characters.

* parser/Lexer.cpp:
(JSC::Lexer<T>::parseCommentDirectiveValue):


Canonical link: https://commits.webkit.org/240423@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280886 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 07:39:26 +00:00
Peng Liu 74fbbe8a1b Disable SYSTEM_FEATURE_FLAGS on iOS 14
https://bugs.webkit.org/show_bug.cgi?id=228979
<rdar://problem/81764452>

Reviewed by Tim Horton.

Stop using feature flags mechanism on iOS 14 to avoid some issues on iOS simulators.

* wtf/PlatformHave.h:


Canonical link: https://commits.webkit.org/240422@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280885 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 06:57:42 +00:00
Peng Liu 0890748bf9 REGRESSION (r280726): [ Big Sur wk1 ] 25 imported/w3c/web-platform-tests/fetch/ failing
https://bugs.webkit.org/show_bug.cgi?id=228926

Reviewed by Jer Noble.

Revert a part of r280726 while investigating the test failures.

* WebView/WebPreferencesDefaultValues.mm:
(WebKit::isFeatureFlagEnabled):


Canonical link: https://commits.webkit.org/240421@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280884 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 06:10:27 +00:00
Tim Horton 2d22ae467f Unreviewed build fix after r280875
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel documentPicker:didPickDocumentsAtURLs:]):


Canonical link: https://commits.webkit.org/240420@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280883 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 05:28:15 +00:00
Jonathan Bedard af830f09f0 [webkitpy] Stop relying on device.plist for simulated device state
https://bugs.webkit.org/show_bug.cgi?id=228974
<rdar://problem/81749547>

Reviewed by Stephanie Lewis.

* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDeviceManager):
(SimulatedDeviceManager.populate_available_devices): Device state check is now shared between simulators.
(SimulatedDeviceManager._disambiguate_device_type): Only extract hardware family and type from candidate.
(SimulatedDevice.__init__): Device state check is now shared between simulators.
(SimulatedDevice.state): Use 'xcrun simctl list' instead of device.plist.
* Scripts/webkitpy/xcode/simulated_device_unittest.py:
(SimulatedDeviceTest.change_state_to): Deleted.
(SimulatedDeviceTest.test_swapping_devices): Deleted.


Canonical link: https://commits.webkit.org/240419@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280882 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 04:09:33 +00:00
Chris Dumez 9536d86e13 Add Cross-Origin-Opener-Policy support for Blob URLs
https://bugs.webkit.org/show_bug.cgi?id=228924

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline WPT test that is now passing.

* web-platform-tests/html/cross-origin-opener-policy/blob-popup.https-expected.txt:

Source/WebCore:

Pass ScriptExecutionContext's cross-origin-opener-policy when registering a public
Blob URL and store it in the blob registry alongside the blob data. As a result,
we are able to service the right COOP headers on the blob response later on when
doing a load of this blob. In the future, we'll pass the cross-origin-embedder-policy
as well, once we support it.

No new tests, rebaselined existing test.

* Modules/fetch/FetchLoader.cpp:
(WebCore::FetchLoader::startLoadingBlobURL):
* dom/Document.h:
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::crossOriginOpenerPolicy const):
* dom/ScriptExecutionContext.h:
* fileapi/Blob.cpp:
(WebCore::BlobURLRegistry::registerURL):
(WebCore::Blob::Blob):
* fileapi/FileReaderLoader.cpp:
(WebCore::FileReaderLoader::start):
* fileapi/ThreadableBlobRegistry.cpp:
(WebCore::ThreadableBlobRegistry::registerBlobURL):
* fileapi/ThreadableBlobRegistry.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::loadResource):

* loader/CrossOriginEmbedderPolicy.cpp:
(WebCore::obtainCrossOriginEmbedderPolicy):
For WebKit1, the initial empty document seems to have an empty URL instead of
"about:blank" so I had to extend the check so that COEP properly gets enabled.

* loader/CrossOriginOpenerPolicy.cpp:
(WebCore::obtainCrossOriginOpenerPolicy):
For WebKit1, the initial empty document seems to have an empty URL instead of
"about:blank" so I had to extend the check so that COOP properly gets enabled.

(WebCore::crossOriginOpenerPolicyToString):
(WebCore::CrossOriginOpenerPolicy::isolatedCopy const):
(WebCore::addCrossOriginOpenerPolicyHeaders):
* loader/CrossOriginOpenerPolicy.h:
(WebCore::operator==):
(WebCore::CrossOriginOpenerPolicy::encode const):
(WebCore::CrossOriginOpenerPolicy::decode):
* platform/network/BlobData.cpp:
(WebCore::BlobData::clone const):
* platform/network/BlobData.h:
(WebCore::BlobData::crossOriginOpenerPolicy const):
(WebCore::BlobData::setCrossOriginOpenerPolicy):
* platform/network/BlobRegistry.h:
* platform/network/BlobRegistryImpl.cpp:
(WebCore::BlobRegistryImpl::registerBlobURL):
(WebCore::BlobRegistryImpl::registerBlobURLOptionallyFileBacked):
* platform/network/BlobRegistryImpl.h:
* platform/network/BlobResourceHandle.cpp:
(WebCore::BlobResourceHandle::notifyResponseOnSuccess):

Source/WebKit:

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL):
(WebKit::NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkDataTaskBlob.cpp:
(WebKit::NetworkDataTaskBlob::dispatchDidReceiveResponse):
* NetworkProcess/NetworkProcessPlatformStrategies.cpp:
(WebKit::NetworkProcessPlatformStrategies::createBlobRegistry):
* WebProcess/FileAPI/BlobRegistryProxy.cpp:
(WebKit::BlobRegistryProxy::registerBlobURL):
* WebProcess/FileAPI/BlobRegistryProxy.h:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebPlatformStrategies.mm:

Source/WebKitLegacy/win:

* WebCoreSupport/WebPlatformStrategies.cpp:

Canonical link: https://commits.webkit.org/240418@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280881 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 02:58:01 +00:00
Lauro Moura e097b7b916 [WPE] Garden new css-counter imageonly failures
Unreviewed test gardening.

Some width issues in some specific cases of upper/lower roman style.

* platform/wpe/TestExpectations:

Canonical link: https://commits.webkit.org/240417@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 01:55:16 +00:00
Tim Horton 612e15145f Unreviewed build fix.
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(stringForTLSProtocolVersion):
(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
Ignore some slightly less unconventional deprecation warnings.


Canonical link: https://commits.webkit.org/240416@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 01:51:25 +00:00
Tim Horton 03378bfe6d Unreviewed build fix.
* pal/spi/ios/CelestialSPI.h:
Ignore unconventional deprecation warnings until they can be fixed properly.


Canonical link: https://commits.webkit.org/240415@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 01:34:53 +00:00
Arcady Goldmints-Orlov 57532f2550 [GLIB] Update test expectations after r280742
https://bugs.webkit.org/show_bug.cgi?id=228972

Unreviewed test gardening.

Patch by Arcady Goldmints-Orlov <agoldmints@igalia.com> on 2021-08-10

* platform/glib/TestExpectations:
* platform/glib/compositing/backing/form-controls-backing-expected.txt: Removed.

Canonical link: https://commits.webkit.org/240414@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 00:54:26 +00:00
Alex Christensen f875ce196d WebKitBlobResource error 1 exactly after 60 seconds when trying to read file input
https://bugs.webkit.org/show_bug.cgi?id=228683
<rdar://78448610>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-08-10
Reviewed by Tim Horton.

To prevent UIKit from deleting our files to upload after 60 seconds, copy them to a temporary directory,
then delete the files when cleaning up the WKContentView.

I manually verified this makes the files able to upload after more than 60 seconds, then deletes them when you close the tab.

* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView dealloc]):
(-[WKContentView _removeTemporaryFilesIfNecessary]):
(-[WKContentView _removeTemporaryFilesWhenDeallocated:]):
* UIProcess/ios/WKContentViewInteraction.h.orig: Added.
* UIProcess/ios/WKContentViewInteraction.mm.orig: Added.
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel documentPicker:didPickDocumentsAtURLs:]):

Canonical link: https://commits.webkit.org/240413@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 00:12:16 +00:00
Cameron McCormack b4c62f6750 Remove unused ColorSync SPI
https://bugs.webkit.org/show_bug.cgi?id=228306
<rdar://problem/81136866>

Reviewed by Darin Adler.

We now use -[NSScreen canRepresentDisplayGamut:displayGamut] and
kMGQHasExtendedColorDisplay.

* pal/spi/cg/CoreGraphicsSPI.h:


Canonical link: https://commits.webkit.org/240412@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-10 23:53:44 +00:00
Wenson Hsieh b94da50685 [Live Text] Unable to start drag on image when the first piece of text inside the image is selected
https://bugs.webkit.org/show_bug.cgi?id=228967
rdar://80471465

Reviewed by Tim Horton.

When selecting text inside an image element using Live Text, if the text selection contains the very first
character (in DOM order) that appears in the image element's shadow root, the user will be unable to start an
image drag on the same image by clicking another part of the image that does not contain Live Text. This happens
because `DragController::startDrag` to handle the drag as a selection drag rather than an image drag, which (in
turn) happens because `DragController::draggableElement` computes a drag source type of
`DragSourceAction::Selection`.

This occurs because `FrameSelection::contains(const LayoutPoint&)` returns `true` for any point inside the
shadow root of an image element with Live Text that does NOT hit-test to a text node, because we end up hit-
testing to the image overlay container `div` as our `innerNode`, which means that the DOM position for the given
point is going to be at the first position inside the image overlay container. Since this canonicalizes to the
beginning of the first text node (in DOM order) inside the image overlay, if that first text node happens to be
selected, we'll end up believing that the layout point (which is not over any text inside the image) is inside
the selection.

To avoid this, we make a minor adjustment to the logic in `FrameSelection::contains`, so that we handle text
inside image overlays by mapping the selected text range to absolute quads, and then checking whether the given
point (in absolute coordinates) is contained in any of those quads.

While we could theoretically use this approach for all selections, it's both more expensive than a hit-test and
might result in compatibility issues, so we just limit it to the case where we know (a-prior) that all
selectable text is arbitrarily positioned using transforms.

This change fixes an API test that currently fails on macOS: DragAndDropTests.DragElementWithImageOverlay

* editing/FrameSelection.cpp:
(WebCore::FrameSelection::contains const):


Canonical link: https://commits.webkit.org/240411@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280872 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-10 23:51:41 +00:00
Cameron McCormack 05339fcdde Restore color profiles correctly on displays with multiple named modes
https://bugs.webkit.org/show_bug.cgi?id=228313
<rdar://problem/81146417>

Reviewed by Alexey Proskuryakov.

Look up a device's current color profile by checking the default mode
rather than assuming it is "1".  The device info dictionary returned
by ColorSyncDeviceCopyDeviceInfo has this shape:

{
    CustomProfiles = {
        ModeName1 = "file:///path/to/custom/profile.ics";
    };
    FactoryProfiles = {
        DeviceDefaultProfileID = "ModeName1";
        ModeName1 = {
            DeviceModeDescription = "Mode Name 1";
            DeviceProfileURL = "file:///path/to/factory/profile1.ics";
        };
        ModeName2 = {
            DeviceModeDescription = "Mode Name 2";
            DeviceProfileURL = "file:///path/to/factory/profile2.ics";
        };
    };
}

where CustomProfiles is only present if a custom profile has been
selected, and the default mode name is "1".  Displays connected over
HDMI don't use the default mode name.

* DumpRenderTree/mac/LayoutTestHelper.m:
(colorProfileURLForDisplay):


Canonical link: https://commits.webkit.org/240410@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-10 23:51:39 +00:00
Chris Dumez f96021a8dc Meta HTTP refresh should not navigate if document has sandboxed automatic features browsing context flag set
https://bugs.webkit.org/show_bug.cgi?id=228965

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline WPT tests that are now passing.

* web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-1-expected.txt:
* web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-2-expected.txt:

Source/WebCore:

Meta HTTP refresh should not navigate if document has sandboxed automatic features browsing context flag set:
- https://html.spec.whatwg.org/multipage/semantics.html#shared-declarative-refresh-steps (Step 13)

Firefox and Chrome already behave this way.

No new tests, rebaselined existing tests.

* dom/Document.cpp:
(WebCore::Document::processMetaHttpEquiv):
* dom/Document.h:
* html/HTMLMetaElement.cpp:
(WebCore::HTMLMetaElement::process):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::responseReceived):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::receivedFirstData):
(WebCore::FrameLoader::scheduleRefreshIfNeeded):
* loader/FrameLoader.h:
* loader/FrameLoaderTypes.h:
* loader/NavigationScheduler.cpp:
(WebCore::ScheduledRedirect::ScheduledRedirect):
(WebCore::NavigationScheduler::scheduleRedirect):
* loader/NavigationScheduler.h:

LayoutTests:

Unskip tests that should no longer be flaky now that they are passing.

* TestExpectations:


Canonical link: https://commits.webkit.org/240409@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280870 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-10 23:19:03 +00:00
Jonathan Bedard 8ca4746937 [resultsdbpy] Add results-summary API
https://bugs.webkit.org/show_bug.cgi?id=226894
<rdar://problem/79155181>

Reviewed by Aakash Jain.

* Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py: Bump version.
* Scripts/libraries/resultsdbpy/resultsdbpy/controller/api_routes.py:
(APIRoutes.__init__): Add aggregate-results endpoint.
* Scripts/libraries/resultsdbpy/resultsdbpy/controller/commit_controller.py:
(commit_for_query): Add decorator which converts a set of arguments into a single commit.
* Scripts/libraries/resultsdbpy/resultsdbpy/controller/test_controller.py:
(TestController):
(TestController.summarize_test_results): Given a single commit and suite/test combination, compute
the liklihood of each potential result.
* Scripts/libraries/resultsdbpy/resultsdbpy/controller/test_controller_unittest.py:
(TestControllerTest.test_summarize_general): Added.
(TestControllerTest.test_summarize_specific): Added.
(TestControllerTest.test_summarize_expectations): Added.
* Scripts/libraries/resultsdbpy/resultsdbpy/model/commit_context.py:
(CommitContext.find_commits_in_range): Use ascended table if user only provides lower bound.
* Scripts/libraries/resultsdbpy/resultsdbpy/model/commit_context_unittest.py:
(CommitContextTest.test_stash_commits_before): Verify upper bound.
(CommitContextTest.test_svn_commits_before): Ditto.
(CommitContextTest.test_stash_commits_after): Verify lower bound.
(CommitContextTest.test_svn_commits_after): Ditto.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/documentation.html: Add aggregate-results
documentation.
* Scripts/libraries/resultsdbpy/setup.py: Bump version.


Canonical link: https://commits.webkit.org/240408@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280869 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-10 22:41:13 +00:00
Tim Horton 1ca2c1a71f macCatalyst: Flexible viewport tests that dump the window size fail because it doesn't match iPad
https://bugs.webkit.org/show_bug.cgi?id=228964

Reviewed by Darin Adler.

* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::platformConfigureViewForTest):
For platforms where we control the size of the window/scene, resize it
to match the chosen default testing iPad size (768x1024), but with the
default testing iPad's status bar subtracted out, and the current platform's
added in, so that the end result is a WKWebView of identical size to
one on the default testing iPad.


Canonical link: https://commits.webkit.org/240407@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280867 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-10 22:17:32 +00:00
Stephan Szabo 894ef64697 [WTF][PlayStation] REGRESSION(r280795) error: undefined symbol: WTF::logLevelString()
https://bugs.webkit.org/show_bug.cgi?id=228959

Reviewed by Fujii Hironori.

As per followup win fix, for declspec platforms, LoggingUnix needs
to include LogInitialization to get the export declaration.

* wtf/unix/LoggingUnix.cpp:


Canonical link: https://commits.webkit.org/240406@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280866 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-10 21:53:12 +00:00