⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Timeline



Jul 19, 2021:

7:19 PM Changeset in webkit [280073] by Russell Epstein
  • 1 copy in tags/Safari-612.1.24.0.1

Tag Safari-612.1.24.0.1.

7:19 PM Changeset in webkit [280072] by Russell Epstein
  • 1 delete in tags/Safari-612.1.24.0.1

Delete tag.

7:18 PM Changeset in webkit [280071] by Russell Epstein
  • 12 edits in branches/safari-612.1.24.0-branch/Source

Cherry-pick r280019. rdar://problem/80788628

[iOS] [AX] Keyboard text candidates don't update when changing selection using Switch Control
https://bugs.webkit.org/show_bug.cgi?id=228051
rdar://79944295

Reviewed by Tim Horton.

Source/WebCore:

See WebKit ChangeLog for more details.

  • accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::setSelectedTextRange): (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange const):

Call the new EditorClient methods added below. Additionally, drive-by fix setSelectedVisiblePositionRange so
that it also performs a user-triggered selection change in the case where the range is not collapsed; this
matches the behavior of setSelectedTextRange as well.

  • page/EditorClient.h: (WebCore::EditorClient::willChangeSelectionForAccessibility): (WebCore::EditorClient::didChangeSelectionForAccessibility):

Add new EditorClient hooks, (will|did)ChangeSelectionForAccessibility, that accessibility code can call before
and after it triggers a selection change; we use these two codepaths above when using the "Previous/Next
Character", "Previous/Next Word", and "Previous/Next Line" Switch Control menu actions.

Source/WebKit:

Add support for updating text candidates by calling into UIKeyboardImpl when changing the selection via
accessibility UI (e.g. when using Switch Control). To achieve this, we add a new EditorState flag that indicates
whether or not the EditorState change was triggered by accessibility; in WKContentView, we then consult this
flag and call -beginSelectionChange/-endSelectionChange in the case where the updated editor state change was
triggered by accessibility and we're also not already in the scope of another selection change or gesture-based
selection change.

Note that the latter part of the check is critical in order to avoid deadlocks in UIKeyboardTaskQueue; see
r246013, r246425 and r246665, which introduced and later reverted a similar mechanism for updating
UIKeyboardImpl, but after every selection change.

  • Shared/EditorState.cpp: (WebKit::EditorState::encode const): (WebKit::EditorState::decode): (WebKit::operator<<):
  • Shared/EditorState.h:

Add the new boolean flag, triggeredByAccessibilitySelectionChange.

  • UIProcess/WebPageProxy.cpp:
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView beginSelectionChange]): (-[WKContentView endSelectionChange]):

Add a new unsigned flag, _selectionChangeNestingLevel, that lets us know if we're expecting an eventual call
to -endSelectionChange. See -_selectionChanged below for more details. Note that we don't need to reset
_selectionChangeNestingLevel to 0 when cleaning up the interaction after web process termination, because
the completion handlers that contain all the balanced calls to -endSelectionChange should be invoked after
such an event anyways.

(-[WKContentView _selectionChanged]):

If the triggeredByAccessibilitySelectionChange bit is set on the incoming (post layout data) EditorState and:
(1) UIKit isn't in the middle of handling a gesture that modifies the selection, and...
(2) We aren't expecting a call to -endSelectionChange.

...then we force UIKeyboardImpl to reload its UI (text suggestions, B/I/U state, etc.) using the incoming
EditorState. This allows accessibility-driven selection changes using Switch Control to behave like gesture-
based selection changes.

  • WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::willChangeSelectionForAccessibility): (WebKit::WebEditorClient::didChangeSelectionForAccessibility):

Implement a couple of client hooks in WebKit2 so that we set a boolean flag on WebPage,
m_isChangingSelectionForAccessibility, to true over the scope of an AX-driven selection change. See related
AX changes in WebCore for more details.

  • WebProcess/WebCoreSupport/WebEditorClient.h:
  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::hasPendingEditorStateUpdate const):

Add a helper method so that we can conveniently check whether we have a pending editor state update to flush,
since the previous boolean flag is now a tri-state enum (m_pendingEditorStateUpdateStatus).

(WebKit::WebPage::editorState const):
(WebKit::WebPage::willCommitLayerTree):
(WebKit::WebPage::sendEditorStateUpdate):
(WebKit::WebPage::scheduleFullEditorStateUpdate):

If we're in the scope of an accessibility selection change, transition m_pendingEditorStateUpdateStatus to
ScheduledDuringAccessibilitySelectionChange; otherwise, just use Scheduled.

(WebKit::WebPage::flushPendingEditorStateUpdate):

Refactor m_hasPendingEditorStateUpdate so that it now captures three states:
(1) We haven't scheduled an editor state update yet.
(2) We've scheduled an editor state update that was not triggered by accessibility.
(3) We've scheduled an editor state update that was triggered by accessibility.

The distinction between (2) and (3) allows us to populate EditorState's new
triggeredByAccessibilitySelectionChange flag.

  • WebProcess/WebPage/WebPage.h: (WebKit::WebPage::willChangeSelectionForAccessibility): (WebKit::WebPage::didChangeSelectionForAccessibility):

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

7:18 PM Changeset in webkit [280070] by Russell Epstein
  • 2 edits in branches/safari-612.1.24.0-branch/Source/WebKit

Cherry-pick r279975. rdar://problem/80788597

[iOS] WKMouseGestureRecognizer should not have failure requirements on WKDeferringGestureRecognizer
https://bugs.webkit.org/show_bug.cgi?id=228013
rdar://80342462

Reviewed by Tim Horton.

Avoid adding a gesture failure requirement between any WKDeferringGestureRecognizers and
WKMouseGestureRecognizer; It doesn't make sense to claim that WKMouseGestureRecognizer should only recognize
once active touch events have been handled by the web page. Under normal circumstances, this gesture failure
requirement is actually completely benign, since touch events should never be received by
WKMouseGestureRecognizer in the first place, and when using a trackpad, deferring gesture recognizers are not
triggered.

However, if an app were to (hypothetically) swizzle out -gestureRecognizer:shouldReceiveTouch: to force
WKMouseGestureRecognizer to receive normal (non-trackpad) touch events, this could cause nearly all gesture
recognizers in the window to become unresponsive, since WKMouseGestureRecognizer would be stuck in Changed state
long after other gestures in the same subgraph have transitioned to Ended or Failed state, thereby preventing
all of these gestures from being reset to Possible state.

  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]):

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

7:07 PM Changeset in webkit [280069] by Russell Epstein
  • 8 edits in branches/safari-612.1.24.0-branch/Source

Versioning.

WebKit-7612.1.24.0.1

6:51 PM Changeset in webkit [280068] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[BigSur Release Wk2 Arm64] inspector/css/node-styles-refreshed.html is a flaky failure (224788)
https://bugs.webkit.org/show_bug.cgi?id=224788

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
6:40 PM Changeset in webkit [280067] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[BigSur Wk1 Release] imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/replaced-element-017.html is a flaky image failure
https://bugs.webkit.org/show_bug.cgi?id=225420

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
6:29 PM Changeset in webkit [280066] by ysuzuki@apple.com
  • 7 edits in trunk/Source/JavaScriptCore

[JSC] StructureStubInfo's m_identifier should follow to the same protocol of inlineAccessBaseStructure
https://bugs.webkit.org/show_bug.cgi?id=228092

Reviewed by Saam Barati.

In r279813, we fixed a race condition related to inlineAccessBaseStructure: while we clear inlineAccessBaseStructure,
we still run code relying on this field's value until stub version of the code is generated. As a result,
we run the code which relies on the cells that are already collected. And we have the same problem with
m_identifier field too. This patch makes m_identifier follow to the same protocol of inlineAccessBaseStructure
so that we fix this race issue too: both fields will be alive until we switch to the code that are not relying on these
fields.

We also make inlineAccessBaseStructure to m_inlineAccessBaseStructure to easily find that this is member field.
And we also use setWithoutWriteBarrier for m_inlineAccessBaseStructure since we emit codeBlock->vm().heap.writeBarrier(codeBlock)
immediately after that.

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::fromStructureStubInfo):

  • bytecode/GetByStatus.cpp:

(JSC::GetByStatus::computeForStubInfoWithoutExitSiteFeedback):

  • bytecode/InByStatus.cpp:

(JSC::InByStatus::computeForStubInfoWithoutExitSiteFeedback):

  • bytecode/PutByIdStatus.cpp:

(JSC::PutByIdStatus::computeForStubInfo):

  • bytecode/StructureStubInfo.cpp:

(JSC::StructureStubInfo::initGetByIdSelf):
(JSC::StructureStubInfo::initArrayLength):
(JSC::StructureStubInfo::initStringLength):
(JSC::StructureStubInfo::initPutByIdReplace):
(JSC::StructureStubInfo::initInByIdSelf):
(JSC::StructureStubInfo::addAccessCase):
(JSC::StructureStubInfo::reset):
(JSC::StructureStubInfo::visitAggregateImpl):
(JSC::StructureStubInfo::visitWeakReferences):
(JSC::StructureStubInfo::propagateTransitions):
(JSC::StructureStubInfo::setCacheType): Deleted.

  • bytecode/StructureStubInfo.h:
6:27 PM Changeset in webkit [280065] by Russell Epstein
  • 1 copy in tags/Safari-612.1.24.0.1

Tag Safari-612.1.24.0.1.

6:19 PM Changeset in webkit [280064] by Russell Epstein
  • 1 copy in branches/safari-612.1.24.0-branch

New branch.

6:13 PM Changeset in webkit [280063] by Robert Jenner
  • 2 edits in trunk/LayoutTests

Update test expectations for imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-events.html.
https://bugs.webkit.org/show_bug.cgi?id=227501.

Unreviewed test gardening.

Patch by Eric Hutchison <Eric Hutchison> on 2021-07-19

  • platform/ios-wk2/TestExpectations:
6:11 PM Changeset in webkit [280062] by Russell Epstein
  • 1 delete in branches/safari-612.1.24.0-branch

Delete branch.

5:58 PM Changeset in webkit [280061] by Russell Epstein
  • 1 copy in tags/Safari-612.1.24.1.1

Tag Safari-612.1.24.1.1.

5:48 PM Changeset in webkit [280060] by mark.lam@apple.com
  • 3 edits
    1 add in trunk

DFG's parseIntResult() should check for negative zero.
https://bugs.webkit.org/show_bug.cgi?id=228068
rdar://80788603

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/dfg-parseIntResult-should-check-for-negative-zero.js: Added.

Source/JavaScriptCore:

We have to check for negative zero explicitly because C++ evaluates 0.0 == -0.0
as true.

  • dfg/DFGOperations.cpp:

(JSC::DFG::parseIntResult):

5:44 PM Changeset in webkit [280059] by Robert Jenner
  • 2 edits in trunk/LayoutTests

Update expectations for imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-stretch-properties-dynamic-001.html.
https://bugs.webkit.org/show_bug.cgi?id=228094.

Unreviewed test gardening.

Patch by Eric Hutchison <Eric Hutchison> on 2021-07-19

  • platform/mac/TestExpectations:
5:27 PM Changeset in webkit [280058] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[BigSur Wk1] svg/filters/feDiffuseLighting-bottomRightPixel.html is a flaky image failure
https://bugs.webkit.org/show_bug.cgi?id=225470

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
5:00 PM Changeset in webkit [280057] by Wenson Hsieh
  • 2 edits
    2 adds in trunk

[iOS] Tapping images on twitter.com should not toggle tab bar visibility
https://bugs.webkit.org/show_bug.cgi?id=228086
rdar://79667219

Reviewed by Geoffrey Garen.

Treat taps over elements that are explicitly marked draggable and also respond to click events as "meaningful"
with respect to the private UIDelegate method -_webView:didTapAtPoint:withResult:. In doing this, we use the
combination of responding to drags and clicks as a proxy for content that probably results in some meaningful
interaction when tapped.

Test: fast/events/ios/meaningful-click-when-tapping-draggable-content.html

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::isProbablyMeaningfulClick):

5:00 PM Changeset in webkit [280056] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[BigSur Wk1 Release] imported/w3c/web-platform-tests/css/css-flexbox/abspos/position-absolute-containing-block-002.html is a flaky image failure
https://bugs.webkit.org/show_bug.cgi?id=225490

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
4:50 PM Changeset in webkit [280055] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[BigSur Wk1 Release] imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/replaced-element-023.html is a flaky image failure
https://bugs.webkit.org/show_bug.cgi?id=225495

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
4:35 PM Changeset in webkit [280054] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ macOS iOS ] crypto/crypto-random-values-oom.html is a flakey timeout.
https://bugs.webkit.org/show_bug.cgi?id=223949

Unreviewed test gardening.

Updated test expectations due to test still appearing flaky.

Patch by Ayumi Kojima <Ayumi Kojima> on 2021-07-19

  • platform/ios-simulator/TestExpectations:
4:09 PM Changeset in webkit [280053] by sihui_liu@apple.com
  • 33 edits in trunk

Implement IDBTransaction.commit()
https://bugs.webkit.org/show_bug.cgi?id=227815
<rdar://problem/80651270>

Reviewed by Brady Eidson.

LayoutTests/imported/w3c:

  • web-platform-tests/IndexedDB/idb-explicit-commit-throw.any-expected.txt:
  • web-platform-tests/IndexedDB/idb-explicit-commit-throw.any.worker-expected.txt:
  • web-platform-tests/IndexedDB/idb-explicit-commit.any-expected.txt: Some test is timed out as our backend does

not support running multiple transactions simultaneously now.

  • web-platform-tests/IndexedDB/idb-explicit-commit.any.worker-expected.txt: Ditto.
  • web-platform-tests/IndexedDB/idlharness.any-expected.txt:
  • web-platform-tests/IndexedDB/idlharness.any.worker-expected.txt:

Source/WebCore:

Spec: https://www.w3.org/TR/IndexedDB/#dom-idbtransaction-commit

Commit request for IDBTransaction is created automatically after all its requests are completed and success
events of those requests are fired. IDBTransaction.commit() lets client create commit request, without waiting
for the result of requests, so the commit can happen sooner.

In our implementation, if pending requests before the commit request are completed successfully, commit request
will be executed directly in the backend and dose not affect by things happening in request event handler. If
some pending request before the commit request has error, the commit request will be treated as abort request,
as commit() means no client operation, including error handling, should happen after it.

Rebaselined existing tests.

  • Modules/indexeddb/IDBDatabase.cpp:

(WebCore::IDBDatabase::didStartTransaction):

  • Modules/indexeddb/IDBRequest.cpp:

(WebCore::IDBRequest::dispatchEvent):
(WebCore::IDBRequest::willAbortTransactionAfterDispatchingEvent const):

  • Modules/indexeddb/IDBRequest.h:
  • Modules/indexeddb/IDBTransaction.cpp:

(WebCore::IDBTransaction::abortDueToFailedRequest):
(WebCore::IDBTransaction::abort):
(WebCore::IDBTransaction::abortInternal):
(WebCore::IDBTransaction::stop):
(WebCore::IDBTransaction::handleOperationsCompletedOnServer):
(WebCore::IDBTransaction::commit): If commit() is called in event handler for error event, and the error is
handled before the call, we will create a commit requet. Otherwise, it is ignored as transaction will abort
due to the error.
(WebCore::IDBTransaction::commitInternal):
(WebCore::IDBTransaction::commitOnServer):
(WebCore::IDBTransaction::didCommit): didCommit used to be called after all requests are done and events are
fired. As commit request can now be handled and replied before other requests, we need to make sure complete
event of transaction is fired after success event of requests, by tracking completion of the last request before
commit request.
(WebCore::IDBTransaction::operationCompletedOnClient):
(WebCore::IDBTransaction::autoCommit):
(WebCore::IDBTransaction::internalAbort): Deleted.

  • Modules/indexeddb/IDBTransaction.h:
  • Modules/indexeddb/IDBTransaction.idl:
  • Modules/indexeddb/client/IDBConnectionProxy.cpp:

(WebCore::IDBClient::IDBConnectionProxy::commitTransaction):

  • Modules/indexeddb/client/IDBConnectionProxy.h:
  • Modules/indexeddb/client/IDBConnectionToServer.cpp:

(WebCore::IDBClient::IDBConnectionToServer::commitTransaction):

  • Modules/indexeddb/client/IDBConnectionToServer.h:
  • Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::commitTransaction):

  • Modules/indexeddb/server/IDBServer.h:
  • Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:

(WebCore::IDBServer::UniqueIDBDatabaseTransaction::commit):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::createObjectStore):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteObjectStore):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::renameObjectStore):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::clearObjectStore):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::createIndex):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteIndex):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::renameIndex):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::putOrAdd):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::getRecord):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::getAllRecords):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::getCount):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteRecord):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::openCursor):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::iterateCursor):

  • Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
  • loader/EmptyClients.cpp:

Source/WebKit:

  • NetworkProcess/IndexedDB/WebIDBServer.cpp:

(WebKit::WebIDBServer::commitTransaction):

  • NetworkProcess/IndexedDB/WebIDBServer.h:
  • NetworkProcess/IndexedDB/WebIDBServer.messages.in:
  • WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:

(WebKit::WebIDBConnectionToServer::commitTransaction):

  • WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:

Source/WebKitLegacy:

  • Storage/InProcessIDBServer.cpp:

(InProcessIDBServer::commitTransaction):

  • Storage/InProcessIDBServer.h:
3:59 PM Changeset in webkit [280052] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[MacOS wk1 Release] media/modern-media-controls/scrubber-support/scrubber-support-drag.html is flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=228091

Unreviewed test gardening.

Patch by Ayumi Kojima <Ayumi Kojima> on 2021-07-19

  • platform/mac-wk1/TestExpectations:
3:35 PM Changeset in webkit [280051] by Chris Dumez
  • 2 edits in trunk/LayoutTests

Unreviewed, mark imported/w3c/web-platform-tests/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html as flaky on WK1.
https://bugs.webkit.org/show_bug.cgi?id=228089

  • platform/mac-wk1/TestExpectations:
3:17 PM Changeset in webkit [280050] by ysuzuki@apple.com
  • 7 edits
    1 add in trunk

[JSC] InByStatus / InByVariant should visit CacheableIdentifier
https://bugs.webkit.org/show_bug.cgi?id=228088
rdar://80794604

Reviewed by Mark Lam.

JSTests:

  • stress/in-by-variant-should-mark-cacheable-identifier.js: Added.

(foo):
(let.handler.has):

Source/JavaScriptCore:

After r278445, InByVariant holds CacheableIdentifier. And this can have
String/Symbol cells if this variant is generated by in_by_val. In that
case, we must visit this cell as GetByStatus / GetByVariant are doing.

  • bytecode/InByStatus.cpp:

(JSC::InByStatus::visitAggregateImpl):

  • bytecode/InByStatus.h:
  • bytecode/InByVariant.cpp:

(JSC::InByVariant::visitAggregateImpl):

  • bytecode/InByVariant.h:
  • bytecode/RecordedStatuses.cpp:

(JSC::RecordedStatuses::visitAggregateImpl):

3:01 PM Changeset in webkit [280049] by ntim@apple.com
  • 3 edits in trunk/Source/WebCore

Port <dialog> close event to modern event handling code
https://bugs.webkit.org/show_bug.cgi?id=227915

Reviewed by Chris Dumez.

  • html/HTMLDialogElement.cpp:

(WebCore::HTMLDialogElement::close):
(WebCore::dialogCloseEventSender): Deleted.
(WebCore::HTMLDialogElement::~HTMLDialogElement): Deleted.
(WebCore::HTMLDialogElement::dispatchPendingEvent): Deleted.

  • html/HTMLDialogElement.h:
2:54 PM Changeset in webkit [280048] by Truitt Savell
  • 3 edits in trunk/LayoutTests

[ Mac wk2 ]Updated test expectations for media/video-seek-with-negative-playback.html and removed obsolete expectations in platforms/mac.
https://bugs.webkit.org/show_bug.cgi?id=228087.

Unreviewed test gardening.

Patch by Eric Hutchison <Eric Hutchison> on 2021-07-19

  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
2:35 PM Changeset in webkit [280047] by Chris Dumez
  • 7 edits in trunk

HTMLImageElement.decoding should reflect the decoding content attribute, limited to only known values
https://bugs.webkit.org/show_bug.cgi?id=228081

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline WPT test now that more checks are passing.

  • web-platform-tests/html/dom/reflection-embedded-expected.txt:

Source/WebCore:

HTMLImageElement.decoding should reflect the decoding content attribute, limited to only known values.
We were missing the *limited to only known values* logic:

This aligns our behavior with Firefox and Chrome.

No new tests, rebaselined existing test.

  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::setDecoding):
(WebCore::HTMLImageElement::decoding const):

  • html/HTMLImageElement.h:
  • html/HTMLImageElement.idl:
2:33 PM Changeset in webkit [280046] by Chris Dumez
  • 9 edits in trunk

FetchResponse.formData() should not reject promise if the body is null and the MIME Type is "application/x-www-form-urlencoded"
https://bugs.webkit.org/show_bug.cgi?id=228085

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that more checks are passing.

  • web-platform-tests/fetch/api/request/request-consume-empty.any-expected.txt:
  • web-platform-tests/fetch/api/request/request-consume-empty.any.worker-expected.txt:
  • web-platform-tests/fetch/api/response/response-consume-empty.any-expected.txt:
  • web-platform-tests/fetch/api/response/response-consume-empty.any.worker-expected.txt:

Source/WebCore:

FetchResponse.formData() should not reject promise if the body is null and the MIME Type is "application/x-www-form-urlencoded":

As per the specification, we should package an empty byte sequence in this case and resolve the promise with that.

No new tests, rebaselined existing tests.

  • Modules/fetch/FetchBodyConsumer.cpp:

(WebCore::FetchBodyConsumer::packageFormData):
(WebCore::resolveWithTypeAndData):
(WebCore::packageFormData): Deleted.

  • Modules/fetch/FetchBodyConsumer.h:
  • Modules/fetch/FetchBodyOwner.cpp:

(WebCore::FetchBodyOwner::formData):

1:49 PM Changeset in webkit [280045] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION(?): alpha slider doesn't match alpha input for transparent in color picker
https://bugs.webkit.org/show_bug.cgi?id=227941
<rdar://problem/80557438>

Reviewed by Devin Rousso.

  • UserInterface/Views/Slider.js:

(WI.Slider.prototype.set value):
When the initial value was set to 0, set value was exiting early when the passed value was 0.

1:45 PM Changeset in webkit [280044] by Chris Dumez
  • 11 edits
    91 adds in trunk/LayoutTests

Unreviewed, land test baselines for cross-origin-opener-policy tests
https://bugs.webkit.org/show_bug.cgi?id=228080

LayoutTests/imported/w3c:

  • web-platform-tests/html/cross-origin-opener-policy/blob-popup.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/coep-blob-popup.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/coep-navigate-popup.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/coep-redirect.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/coep.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/coop-coep-sandbox.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/coop-csp-sandbox-navigate.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/coop-csp-sandbox.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/coop-navigated-history-popup.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/coop-navigated-popup.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/coop-same-origin-allow-popups-document-write-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/coop-sandbox.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/header-parsing.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/historical/coep-navigate-popup-unsafe-inherit.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-origin-unsafe-allow-outgoing-with-cross-origin.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-origin-unsafe-allow-outgoing-with-same-origin.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-origin-unsafe-allow-outgoing-with-same-site.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-site-unsafe-allow-outgoing-with-cross-origin.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-site-unsafe-allow-outgoing-with-same-origin.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-site-unsafe-allow-outgoing-with-same-site.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-site-with-cross-origin.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-site-with-same-origin.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-site-with-same-site.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/iframe-popup-same-origin-allow-popups-to-same-origin-allow-popups.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/iframe-popup-same-origin-allow-popups-to-same-origin.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/iframe-popup-same-origin-allow-popups-to-unsafe-none.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/iframe-popup-same-origin-to-same-origin.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/iframe-popup-same-origin-to-unsafe-none.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/iframe-popup-unsafe-none-to-same-origin.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/iframe-popup-unsafe-none-to-unsafe-none.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/javascript-url.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/navigate-to-aboutblank.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/navigate-top-to-aboutblank.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/popup-coop-by-sw-from-coop.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/popup-coop-by-sw.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/popup-meta-http-equiv.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/popup-redirect-cache.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/popup-redirect-same-origin-allow-popups.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/popup-same-origin-allow-popups-with-cross-origin.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/popup-same-origin-allow-popups-with-same-origin.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/popup-same-origin-allow-popups-with-same-site.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/popup-same-origin-with-cross-origin.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/popup-same-origin-with-same-origin.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/popup-same-origin-with-same-site.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/popup-unsafe-none-with-cross-origin.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/popup-unsafe-none-with-same-origin.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/popup-unsafe-none-with-same-site.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/popup-unspecified-with-cross-origin.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/popup-unspecified-with-same-origin.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/popup-unspecified-with-same-site.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/popup-with-structured-header.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-openee_coop-ro.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-openee_coop-ro_cross-origin.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-opener_coop-ro.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-opener_coop-ro_cross-origin.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-other_coop-ro.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-other_coop-ro_cross-origin.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-openee_coop-ro.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-openee_coop-ro_cross-origin.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-opener_coop-ro.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-opener_coop-ro_cross-origin.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-other_coop-ro.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-other_coop-ro_cross-origin.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/property-blur.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/property-close.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/property-closed.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/property-focus.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/property-frames.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/property-indexed-getter.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/property-length.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/property-location-get.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/property-location-set.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/property-named-getter.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/property-opener-get.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/property-opener-set.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/property-postmessage-1.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/property-postmessage-2.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/property-self.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/property-top.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/property-window.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/report-to-both_coop-ro.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/reporting-observer-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-four-reports.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-from-unsafe-none.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-with-coep-report-only.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-with-coep.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-opener.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-popup.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-unsafe-none-report-to.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-redirect-with-same-origin-allow-popups.https-expected.txt: Added.
  • web-platform-tests/html/cross-origin-opener-policy/resource-popup.https-expected.txt: Added.

LayoutTests:

1:14 PM Changeset in webkit [280043] by Robert Jenner
  • 3 edits in trunk/LayoutTests

[MacOS wk2 & iOS] 2 fast/canvas tests are flaky timeouts
https://bugs.webkit.org/show_bug.cgi?id=228082

Unreviewed test gardening.

Patch by Ayumi Kojima <Ayumi Kojima> on 2021-07-19

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
12:38 PM Changeset in webkit [280042] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ BigSur Release wk1 ] media/video-restricted-no-preload-auto.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=228084.

Unreviewed test gardening.

Patch by Eric Hutchison <Eric Hutchison> on 2021-07-19

  • platform/mac-wk1/TestExpectations:
12:29 PM Changeset in webkit [280041] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

Revert a debug assertion that was added in r280019
https://bugs.webkit.org/show_bug.cgi?id=228051

Reviewed by Tim Horton.

Several existing (non-accessibility-related) editing tests appear to hit this debug assertion that was added in
r280019, which indicates that it's currently possible to call -selectionDidChange: without a balanced call to
-selectionWillChange:, even before the changes in r280019.

For the time being, replace this assertion with a FIXME referencing a followup bug to investigate why this is
the case: https://webkit.org/b/228083. Thankfully, since the decrementing of _selectionChangeNestingLevel is
idempotent once the level reaches 0, no other changes are needed to ensure that we don't end up with underflow
in _selectionChangeNestingLevel.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView endSelectionChange]):

11:53 AM Changeset in webkit [280040] by Ryan Haddad
  • 2 edits in trunk/Tools

[build.webkit.org] lldb-webkit-test is failing on Catalina queues
https://bugs.webkit.org/show_bug.cgi?id=227946

Reviewed by Aakash Jain.

The changes to lldb-webkit-test to support the Python 3 version of lldb present in the
Big Sur-aligned Xcode have made it incompatible with Catalin's Python 2 version.

Rather than creating and defending the results for two different versions of the lldb-webkit-test
script, disable this test step for Catalina.

  • CISupport/build-webkit-org/factories.py:

(TestFactory.init):

11:14 AM Changeset in webkit [280039] by Patrick Angle
  • 2 edits in trunk/Source/WebKit

[Cocoa] Web Inspector: Service workers can't be inspected in Safari Technology Preview
https://bugs.webkit.org/show_bug.cgi?id=228001

Reviewed by Per Arne Vollan.

For inspecting targets in the WebProcess, like Service Workers, we read the ShowDevelopMenu default on Cocoa
platforms to determine if remote inspection should be allowed, but the sandbox broker bundle identifier used to
read that preference is different for Safari Technology Preview. We need to read the preference with the
appropriate sandbox broker bundle identifier when the host application is Safari Technology Preview.

  • UIProcess/Cocoa/WebProcessProxyCocoa.mm:

(WebKit::WebProcessProxy::shouldEnableRemoteInspector):

11:13 AM Changeset in webkit [280038] by Patrick Angle
  • 3 edits in trunk/Source/WebKit

[Cocoa] Web Inspector: REGRESSION(r271294) Service workers on iOS can't be inspected
https://bugs.webkit.org/show_bug.cgi?id=227971

Reviewed by Per Arne Vollan.

r271294 fixed inspecting Service Workers on macOS, but in the process broke inspecting Service Workers on iOS.
For iOS, previously a flag was set to mark RemoteInspector as needing to wait for a Sandbox Extension handle,
but after r271294 this flag will no longer be cleared properly, as the handle is acquired and consumed prior to
the point in initialization that iOS was special cased to wait for the handle. To resolve this, we now set the
flag once based on whether we were able to acquire a handle, which due to the changes in r270326 will already
have been done by the time we are initializing a WebProcess.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

11:06 AM Changeset in webkit [280037] by Patrick Angle
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Elements: selecting a sibling node in the breadcrumb navigation doesn't do anything
https://bugs.webkit.org/show_bug.cgi?id=227893

Reviewed by Devin Rousso.

The WI.HierarchicalPathComponent.Event.Clicked event is only fired when there are no sibling path components
to select, therefor we must also listen for the WI.HierarchicalPathComponent.Event.SiblingWasSelected event to
be able to then reveal and highlight the correct DOM node in the tree.

  • UserInterface/Views/DOMTreeContentView.js:

(WI.DOMTreeContentView.prototype.get selectionPathComponents):
(WI.DOMTreeContentView.prototype._handlePathComponentSelected):
Drive-by to match our style of _handle* event handler naming.

11:06 AM Changeset in webkit [280036] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Fix the build.

  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:

(WebKit::nameForBackingStoreType):

11:00 AM Changeset in webkit [280035] by Patrick Angle
  • 1 edit
    3 adds in trunk/Source/WebInspectorUI

Web Inspector: Add another Protocol Version (iOS 15.0)
https://bugs.webkit.org/show_bug.cgi?id=228079

Reviewed by Devin Rousso.

  • UserInterface/Protocol/Legacy/15.0/InspectorBackendCommands.js: Added.
  • Versions/Inspector-iOS-15.0.json: Added.
10:51 AM Changeset in webkit [280034] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[MacOS Wk1] media/video-pause-immediately.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=227136.

Unreviewed test gardening.

Patch by Eric Hutchison <Eric Hutchison> on 2021-07-19

  • platform/mac-wk1/TestExpectations:
10:40 AM Changeset in webkit [280033] by Russell Epstein
  • 12 edits in branches/safari-612.1.24.0-branch/Source

Cherry-pick r280019. rdar://problem/80788628

[iOS] [AX] Keyboard text candidates don't update when changing selection using Switch Control
https://bugs.webkit.org/show_bug.cgi?id=228051
rdar://79944295

Reviewed by Tim Horton.

Source/WebCore:

See WebKit ChangeLog for more details.

  • accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::setSelectedTextRange): (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange const):

Call the new EditorClient methods added below. Additionally, drive-by fix setSelectedVisiblePositionRange so
that it also performs a user-triggered selection change in the case where the range is not collapsed; this
matches the behavior of setSelectedTextRange as well.

  • page/EditorClient.h: (WebCore::EditorClient::willChangeSelectionForAccessibility): (WebCore::EditorClient::didChangeSelectionForAccessibility):

Add new EditorClient hooks, (will|did)ChangeSelectionForAccessibility, that accessibility code can call before
and after it triggers a selection change; we use these two codepaths above when using the "Previous/Next
Character", "Previous/Next Word", and "Previous/Next Line" Switch Control menu actions.

Source/WebKit:

Add support for updating text candidates by calling into UIKeyboardImpl when changing the selection via
accessibility UI (e.g. when using Switch Control). To achieve this, we add a new EditorState flag that indicates
whether or not the EditorState change was triggered by accessibility; in WKContentView, we then consult this
flag and call -beginSelectionChange/-endSelectionChange in the case where the updated editor state change was
triggered by accessibility and we're also not already in the scope of another selection change or gesture-based
selection change.

Note that the latter part of the check is critical in order to avoid deadlocks in UIKeyboardTaskQueue; see
r246013, r246425 and r246665, which introduced and later reverted a similar mechanism for updating
UIKeyboardImpl, but after every selection change.

  • Shared/EditorState.cpp: (WebKit::EditorState::encode const): (WebKit::EditorState::decode): (WebKit::operator<<):
  • Shared/EditorState.h:

Add the new boolean flag, triggeredByAccessibilitySelectionChange.

  • UIProcess/WebPageProxy.cpp:
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView beginSelectionChange]): (-[WKContentView endSelectionChange]):

Add a new unsigned flag, _selectionChangeNestingLevel, that lets us know if we're expecting an eventual call
to -endSelectionChange. See -_selectionChanged below for more details. Note that we don't need to reset
_selectionChangeNestingLevel to 0 when cleaning up the interaction after web process termination, because
the completion handlers that contain all the balanced calls to -endSelectionChange should be invoked after
such an event anyways.

(-[WKContentView _selectionChanged]):

If the triggeredByAccessibilitySelectionChange bit is set on the incoming (post layout data) EditorState and:
(1) UIKit isn't in the middle of handling a gesture that modifies the selection, and...
(2) We aren't expecting a call to -endSelectionChange.

...then we force UIKeyboardImpl to reload its UI (text suggestions, B/I/U state, etc.) using the incoming
EditorState. This allows accessibility-driven selection changes using Switch Control to behave like gesture-
based selection changes.

  • WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::willChangeSelectionForAccessibility): (WebKit::WebEditorClient::didChangeSelectionForAccessibility):

Implement a couple of client hooks in WebKit2 so that we set a boolean flag on WebPage,
m_isChangingSelectionForAccessibility, to true over the scope of an AX-driven selection change. See related
AX changes in WebCore for more details.

  • WebProcess/WebCoreSupport/WebEditorClient.h:
  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::hasPendingEditorStateUpdate const):

Add a helper method so that we can conveniently check whether we have a pending editor state update to flush,
since the previous boolean flag is now a tri-state enum (m_pendingEditorStateUpdateStatus).

(WebKit::WebPage::editorState const):
(WebKit::WebPage::willCommitLayerTree):
(WebKit::WebPage::sendEditorStateUpdate):
(WebKit::WebPage::scheduleFullEditorStateUpdate):

If we're in the scope of an accessibility selection change, transition m_pendingEditorStateUpdateStatus to
ScheduledDuringAccessibilitySelectionChange; otherwise, just use Scheduled.

(WebKit::WebPage::flushPendingEditorStateUpdate):

Refactor m_hasPendingEditorStateUpdate so that it now captures three states:
(1) We haven't scheduled an editor state update yet.
(2) We've scheduled an editor state update that was not triggered by accessibility.
(3) We've scheduled an editor state update that was triggered by accessibility.

The distinction between (2) and (3) allows us to populate EditorState's new
triggeredByAccessibilitySelectionChange flag.

  • WebProcess/WebPage/WebPage.h: (WebKit::WebPage::willChangeSelectionForAccessibility): (WebKit::WebPage::didChangeSelectionForAccessibility):

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

10:40 AM Changeset in webkit [280032] by Russell Epstein
  • 2 edits in branches/safari-612.1.24.0-branch/Source/WebKit

Cherry-pick r279975. rdar://problem/80788597

[iOS] WKMouseGestureRecognizer should not have failure requirements on WKDeferringGestureRecognizer
https://bugs.webkit.org/show_bug.cgi?id=228013
rdar://80342462

Reviewed by Tim Horton.

Avoid adding a gesture failure requirement between any WKDeferringGestureRecognizers and
WKMouseGestureRecognizer; It doesn't make sense to claim that WKMouseGestureRecognizer should only recognize
once active touch events have been handled by the web page. Under normal circumstances, this gesture failure
requirement is actually completely benign, since touch events should never be received by
WKMouseGestureRecognizer in the first place, and when using a trackpad, deferring gesture recognizers are not
triggered.

However, if an app were to (hypothetically) swizzle out -gestureRecognizer:shouldReceiveTouch: to force
WKMouseGestureRecognizer to receive normal (non-trackpad) touch events, this could cause nearly all gesture
recognizers in the window to become unresponsive, since WKMouseGestureRecognizer would be stuck in Changed state
long after other gestures in the same subgraph have transitioned to Ended or Failed state, thereby preventing
all of these gestures from being reset to Possible state.

  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]):

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

10:21 AM Changeset in webkit [280031] by Russell Epstein
  • 2 edits in branches/safari-612.1.24.1-branch/Source/WebKit

Cherry-pick r280001. rdar://problem/80788656

macOS Safari network sessions not being marked as being from a browser
https://bugs.webkit.org/show_bug.cgi?id=228028
<rdar://problem/80648664>

Reviewed by Brent Fulgham.

Move WebKitAdditions to open source to communicate full web browser
status to the networking stack. In the macOS case, we don't have
a full browser entitlement, so we should check for Safari.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm: (WebKit::SessionWrapper::initialize): The name com.apple.WebKit.InAppBrowser is not the most accurate name, but changing it would require syncing with other parts of the network stack. We should do this in a separate bug.

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

10:12 AM Changeset in webkit [280030] by Russell Epstein
  • 8 edits in branches/safari-612.1.24.0-branch/Source

Versioning.

WebKit-7612.1.24.0.1

10:12 AM Changeset in webkit [280029] by Russell Epstein
  • 8 edits in branches/safari-612.1.24.1-branch/Source

Versioning.

WebKit-7612.1.24.1.1

9:49 AM Changeset in webkit [280028] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[Mac wk1 Debug] webaudio/audioworket-out-of-memory.html is a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=227845.

Unreviewed test gardening.

Patch by Eric Hutchison <Eric Hutchison> on 2021-07-19

  • platform/mac-wk1/TestExpectations:
9:34 AM Changeset in webkit [280027] by Russell Epstein
  • 1 copy in branches/safari-612.1.24.1-branch

New branch.

9:33 AM Changeset in webkit [280026] by Russell Epstein
  • 1 copy in branches/safari-612.1.24.0-branch

New branch.

9:15 AM Changeset in webkit [280025] by Ryan Haddad
  • 2 edits in trunk/Tools

Unreviewed infrastructure fix, remove bot that is out for hardware repair.

  • CISupport/ews-build/config.json:
7:25 AM Changeset in webkit [280024] by Ziran Sun
  • 11 edits in trunk

[css-grid] Images as grid items should use the overridingLogicalHeight when defined to compute the logical width
https://bugs.webkit.org/show_bug.cgi?id=227984

Reviewed by Javier Fernandez.
LayoutTests/imported/w3c:

  • web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-011-expected.txt:
  • web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-012-expected.txt:
  • web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-013-expected.txt:
  • web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-014-expected.txt:
  • web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-017-expected.txt:
  • web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-018-expected.txt:

Source/WebCore:

As discussed in https://github.com/w3c/csswg-drafts/issues/5713, for images as grid items, when
stretch alignment is only applied in one axis we should respect aspect-ratio on the other.

When computing the logical width using an intrinsic aspect ratio, RenderReplaced should use the
overridingLogicalHeight whenever defined just as how it does for flex items. This change is to
replace the use of intrinsic (non-stretched) logical height in current code with the overridingLogicalHeight.

This allows us to pass an additional of 9 grid WPT tests.

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::computeReplacedLogicalWidth const):

LayoutTests:

9 grid WPT tests are now passing.

6:55 AM Changeset in webkit [280023] by Ziran Sun
  • 5 edits in trunk

[css-grid] Use correct block-size to resolve min-content
https://bugs.webkit.org/show_bug.cgi?id=227167

Reviewed by Javier Fernandez.

LayoutTests/imported/w3c:

The following test is passing -

  • web-platform-tests/css/css-grid/grid-items/grid-item-inline-contribution-001.html:

Source/WebCore:

When the min/max depends on block-size, We need to make sure that min/max widths are set dirty for
replaced element when block-size changes so that the correct block-size is used to get min/max widths.

Test: imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-item-inline-contribution-001.html

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::layout):

1:39 AM Changeset in webkit [280022] by Ziran Sun
  • 5 edits in trunk

[CSS-grid] Ignore the aspect-ratio of a replaced element if stretch alignments are applied to both axes
https://bugs.webkit.org/show_bug.cgi?id=227573

Reviewed by Javier Fernandez.

Source/WebCore:

As discussed in https://github.com/w3c/csswg-drafts/issues/5713, for the replaced element as a grid item,
when both axes have stretch alignments applied and there is no auto margin(s) presented, the aspect ratio
should be ignored if there is any.

Part of this patch is an import of Chromium CL at
https://chromium-review.googlesource.com/c/chromium/src/+/2651651

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::hasStretchedLogicalHeight const):
(WebCore::RenderBox::shouldComputeLogicalWidthFromAspectRatio const):

  • rendering/RenderBox.h:

LayoutTests:

Two grid WPT tests are now passing.

Jul 18, 2021:

3:59 PM Changeset in webkit [280021] by ddkilzer@apple.com
  • 3 edits in trunk/Tools

Ignore weak external symbols in clang coverage builds using check-for-weak-vtables-and-externals
<https://webkit.org/b/228063>
<rdar://problem/80477138>

Reviewed by Alexey Proskuryakov.

  • Scripts/check-for-weak-vtables-and-externals:
  • Ignore weak symbols from llvm when building with coverage enabled. This fixes the build.
  • coverage/coverage.xcconfig:

(UNEXPORTED_SYMBOL_LDFLAGS_FOR_COVERAGE): Remove.

  • Can't use -unexported_symbol and -exported_symbol together, so remove this.
12:18 PM Changeset in webkit [280020] by weinig@apple.com
  • 3 edits in trunk/Source/WebCore

Fix canvas overflow checking to use CheckedArithmatic rather than adhoc floating point mechanism
https://bugs.webkit.org/show_bug.cgi?id=228058

Reviewed by Dean Jackson.

We have CheckedArithmatic just for this case. Use it.

  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::shouldAccelerate const):
(WebCore::HTMLCanvasElement::createImageBuffer const):

  • html/HTMLCanvasElement.h:
8:41 AM Changeset in webkit [280019] by Wenson Hsieh
  • 12 edits in trunk/Source

[iOS] [AX] Keyboard text candidates don't update when changing selection using Switch Control
https://bugs.webkit.org/show_bug.cgi?id=228051
rdar://79944295

Reviewed by Tim Horton.

Source/WebCore:

See WebKit ChangeLog for more details.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::setSelectedTextRange):
(WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange const):

Call the new EditorClient methods added below. Additionally, drive-by fix setSelectedVisiblePositionRange so
that it also performs a user-triggered selection change in the case where the range is not collapsed; this
matches the behavior of setSelectedTextRange as well.

  • page/EditorClient.h:

(WebCore::EditorClient::willChangeSelectionForAccessibility):
(WebCore::EditorClient::didChangeSelectionForAccessibility):

Add new EditorClient hooks, (will|did)ChangeSelectionForAccessibility, that accessibility code can call before
and after it triggers a selection change; we use these two codepaths above when using the "Previous/Next
Character", "Previous/Next Word", and "Previous/Next Line" Switch Control menu actions.

Source/WebKit:

Add support for updating text candidates by calling into UIKeyboardImpl when changing the selection via
accessibility UI (e.g. when using Switch Control). To achieve this, we add a new EditorState flag that indicates
whether or not the EditorState change was triggered by accessibility; in WKContentView, we then consult this
flag and call -beginSelectionChange/-endSelectionChange in the case where the updated editor state change was
triggered by accessibility and we're also not already in the scope of another selection change or gesture-based
selection change.

Note that the latter part of the check is critical in order to avoid deadlocks in UIKeyboardTaskQueue; see
r246013, r246425 and r246665, which introduced and later reverted a similar mechanism for updating
UIKeyboardImpl, but after every selection change.

  • Shared/EditorState.cpp:

(WebKit::EditorState::encode const):
(WebKit::EditorState::decode):
(WebKit::operator<<):

  • Shared/EditorState.h:

Add the new boolean flag, triggeredByAccessibilitySelectionChange.

  • UIProcess/WebPageProxy.cpp:
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView beginSelectionChange]):
(-[WKContentView endSelectionChange]):

Add a new unsigned flag, _selectionChangeNestingLevel, that lets us know if we're expecting an eventual call
to -endSelectionChange. See -_selectionChanged below for more details. Note that we don't need to reset
_selectionChangeNestingLevel to 0 when cleaning up the interaction after web process termination, because
the completion handlers that contain all the balanced calls to -endSelectionChange should be invoked after
such an event anyways.

(-[WKContentView _selectionChanged]):

If the triggeredByAccessibilitySelectionChange bit is set on the incoming (post layout data) EditorState and:
(1) UIKit isn't in the middle of handling a gesture that modifies the selection, and...
(2) We aren't expecting a call to -endSelectionChange.

...then we force UIKeyboardImpl to reload its UI (text suggestions, B/I/U state, etc.) using the incoming
EditorState. This allows accessibility-driven selection changes using Switch Control to behave like gesture-
based selection changes.

  • WebProcess/WebCoreSupport/WebEditorClient.cpp:

(WebKit::WebEditorClient::willChangeSelectionForAccessibility):
(WebKit::WebEditorClient::didChangeSelectionForAccessibility):

Implement a couple of client hooks in WebKit2 so that we set a boolean flag on WebPage,
m_isChangingSelectionForAccessibility, to true over the scope of an AX-driven selection change. See related
AX changes in WebCore for more details.

  • WebProcess/WebCoreSupport/WebEditorClient.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::hasPendingEditorStateUpdate const):

Add a helper method so that we can conveniently check whether we have a pending editor state update to flush,
since the previous boolean flag is now a tri-state enum (m_pendingEditorStateUpdateStatus).

(WebKit::WebPage::editorState const):
(WebKit::WebPage::willCommitLayerTree):
(WebKit::WebPage::sendEditorStateUpdate):
(WebKit::WebPage::scheduleFullEditorStateUpdate):

If we're in the scope of an accessibility selection change, transition m_pendingEditorStateUpdateStatus to
ScheduledDuringAccessibilitySelectionChange; otherwise, just use Scheduled.

(WebKit::WebPage::flushPendingEditorStateUpdate):

Refactor m_hasPendingEditorStateUpdate so that it now captures three states:
(1) We haven't scheduled an editor state update yet.
(2) We've scheduled an editor state update that was not triggered by accessibility.
(3) We've scheduled an editor state update that was triggered by accessibility.

The distinction between (2) and (3) allows us to populate EditorState's new
triggeredByAccessibilitySelectionChange flag.

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::willChangeSelectionForAccessibility):
(WebKit::WebPage::didChangeSelectionForAccessibility):

Note: See TracTimeline for information about the timeline view.