https://bugs.webkit.org/show_bug.cgi?id=229396
Reviewed by Saam Barati.
emitArrayProfilingSiteWithCell is always loading indexingType after profiling a cell.
But (possibly) this is old code, and there is no reason to do that. This patch removes it.
* jit/JIT.h:
* jit/JITInlines.h:
(JSC::JIT::emitArrayProfilingSiteWithCell):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emit_op_get_by_id):
(JSC::JIT::emit_op_in_by_val):
(JSC::JIT::emit_op_enumerator_get_by_val):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emit_op_get_by_id):
(JSC::JIT::emit_op_in_by_val):
Canonical link: https://commits.webkit.org/240836@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281454 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229376
rdar://80384683
Reviewed by Megan Gardner.
Source/WebKit:
This iOS-specific test verifies that tapping on an element that makes itself contenteditable inside of a click
event handler both (1) brings up the software keyboard, and (2) scrolls to reveal the focused, newly editable
element such that it is not obscured by the software keyboard. This test began failing after the changes in
r271146 -- specifically, the fact that the call to `Element::setFocus()` moved to before the focus event is
dispatched, rather than afterwards.
The following timeline of events (annotated with web and UI processes) illustrates why this happens:
(WEB) 1. The click event on the element inside the subframe is handled; the element is made contentEditable,
and we make it focused, by first calling `Element::setFocus` and then `Element::dispatchFocusEvent`.
Right before dispatching the "focus" event, we call out to the client layer, via
`WebPage::elementDidFocus`, and compute a FocusedElementInformation struct to encode and send to the
UI process in the WebPageProxy::ElementDidFocus IPC message.
2. In the process of populating this struct in `WebPage::focusedElementInformation`, we observe that
layout is dirty, and immediately compute and send an EditorState underneath
`WebPage::sendEditorStateUpdate()`.
3. We then proceed to construct and send FocusedElementInformation to the UI process via
`Messages::WebPageProxy::ElementDidFocus`.
(UI) 4. We receive the EditorState that was computed and sent in step (2), which contains the up-to-date
state corresponding to the newly focused contentEditable `div`.
5. We then receive the FocusedElementInformation computed and sent in step (3), which makes us begin
waiting for the next post-layout EditorState update before zooming to reveal the focused element, by
setting WebPageProxy's `m_waitingForPostLayoutEditorStateUpdateAfterFocusingElement` flag. However,
this post-layout EditorState after focusing the `div` never arrives, since we've already computed it
and sent it in step (2).
6. The software keyboard finishes animating in, causing us to resolve the UIScriptController promise
that we began to await after calling `UIHelper.activateAndWaitForInputSessionAt` in the test.
(WEB) 7. The test finishes, calls `testRunner.notifyDone()`, and we destroy the focused subframe and clear
the editable selection as well. This selection change causes us to compute another post-layout
editor state and send it to the UI process.
(UI) 8. The UI process *finally* receives the post-layout EditorState computed in (7). However, it's too
late, since (a) the test has already finished, and (b) the post-layout EditorState is computed after
the editable selection has already been cleared, so it's missing selection rect information anyways.
Prior to r271146, the call to `Element::setFocus` came *after* step (3), and caused us to compute and send
another EditorState to the UI process, which ensured that an up-to-date post layout EditorState would arrive in
the UI process shortly after step (5).
To fix this, we should avoid immediately computing and sending an EditorState to the UI process in the middle of
`WebPage::focusedElementInformation`, and instead simply schedule an EditorState during the next rendering
update. This ensures that the editor state triggered during element focus will always arrive after
`WebPageProxy::ElementDidFocus` in the UI process, rather than before, which allows us to scroll to the correct
selection rect in the UI process when focusing an editable element.
This also has the additional benefit of avoiding redundant EditorState computation and updates in the case where
focus is programmatically thrashed between elements during the same rendering update, since all of the editor
state updates are effectively batched together and dispatched at the end of the current rendering update.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::focusedElementInformation):
LayoutTests:
Adjust test expectations for the layout test, which should now pass.
* platform/ios-wk2/TestExpectations:
* platform/ios/TestExpectations:
Canonical link: https://commits.webkit.org/240832@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281450 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229360
<rdar://problem/82192362>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py:
(TaskPoolUnittest): Skip some tests on cygwin.
* Scripts/webkitpy/common/system/abstractexecutive.py:
(AbstractExecutive.command_for_printing): Strings might be bytes on some platforms.
* Scripts/webkitpy/common/system/path.py:
(_CygPath.convert): Cygwin path process is not unicode.
* Scripts/webkitpy/common/system/platforminfo.py:
(PlatformInfo._win_version_str): Return Windows version string as unicode string.
Canonical link: https://commits.webkit.org/240831@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281448 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=164292
<rdar://problem/29054773>
Reviewed by Simon Fraser.
LayoutTests/imported/w3c:
* web-platform-tests/css/css-position/sticky/position-sticky-transforms-translate-expected.txt: Update results
of test to show pass.
Source/WebCore:
No new tests. This change is tested by the following WPT test:
web-platform-tests/css/css-position/sticky/position-sticky-transforms-translate.html
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::computeStickyPositionConstraints const): When calling localToContainerQuad,
pass 0 for the mode which means that the transformation between coordinate systems does not include
transforms.
Canonical link: https://commits.webkit.org/240829@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281446 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229012
Reviewed by Youenn Fablet.
LayoutTests/imported/w3c:
Rebaseline test that is now passing one more check.
* web-platform-tests/html/browsers/windows/noreferrer-window-name-expected.txt:
Source/WebKit:
WebKit2 could only have one active navigation policy check for a given frame
and there was a FIXME comment about this in the code. This was causing some
WPT tests to timeout in WebKit2 only because those tests would trigger
several navigations (e.g. in new windows) and only the last one would proceed
(earlier ones would get cancelled).
This patch updates the policy checking logic in WebFrame so that we can support
several concurrent policy checks.
No new tests, unskipped / rebaselined existing tests.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::cancelPolicyCheck):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::~WebFrame):
(WebKit::WebFrame::setUpPolicyListener):
(WebKit::WebFrame::setUpWillSubmitFormListener):
(WebKit::WebFrame::continueWillSubmitForm):
(WebKit::WebFrame::invalidatePolicyListeners):
(WebKit::WebFrame::didReceivePolicyDecision):
* WebProcess/WebPage/WebFrame.h:
LayoutTests:
Unskip a couple of tests that are no longer timing out in WebKit2.
* platform/ios-wk1/imported/w3c/web-platform-tests/html/browsers/windows/noreferrer-window-name-expected.txt: Removed.
* platform/mac-wk1/imported/w3c/web-platform-tests/html/browsers/windows/noreferrer-window-name-expected.txt: Removed.
* platform/wk2/TestExpectations:
Canonical link: https://commits.webkit.org/240828@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281445 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=224849
Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-08-23
Reviewed by Antti Koivisto.
Source/WebCore:
Instead of falling back to RenderElement::createFor(), create a RenderLineBreak just ignoring the unsupported
content data.
* html/HTMLBRElement.cpp:
(WebCore::HTMLBRElement::createElementRenderer):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::isContentDataSupported):
(WebCore::RenderElement::createFor):
* rendering/RenderElement.h:
LayoutTests:
* editing/execCommand/insert-image-in-composed-list-expected.txt: Rebaseline.
Canonical link: https://commits.webkit.org/240827@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281444 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=228975
Reviewed by Youenn Fablet.
LayoutTests/imported/w3c:
Rebaseline WPT test that is now passing. This test was already passing in both Firefox and Chrome.
* web-platform-tests/html/semantics/document-metadata/the-style-element/style_load_event-expected.txt:
Source/WebCore:
HTMLStyleElement should be able to fire the load event more than once. WebKit has a flag
preventing the load event to fire more than once but this behavior is not present in the
HTML specification and doesn't match other browsers.
No new tests, rebaselined existing test.
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::notifyLoadedSheetAndAllCriticalSubresources):
* html/HTMLStyleElement.h:
LayoutTests:
Unskip test that is no longer timing out.
* TestExpectations:
Canonical link: https://commits.webkit.org/240826@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229153
<rdar://problem/81989328>
Reviewed by Devin Rousso.
Dispatch an event whenever the list of modified styles changes.
Re-layout the Changes details sidebar panel in response to this event
to reflect the latest state of the modified styles.
* UserInterface/Controllers/CSSManager.js:
(WI.CSSManager.prototype.addModifiedStyle):
(WI.CSSManager.prototype.removeModifiedStyle):
* UserInterface/Views/ChangesDetailsSidebarPanel.js:
(WI.ChangesDetailsSidebarPanel.prototype.attached):
(WI.ChangesDetailsSidebarPanel.prototype.detached):
Canonical link: https://commits.webkit.org/240824@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281441 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229072
Reviewed by Xabier Rodriguez-Calvar.
Source/WebCore:
This patch adds support for SourceBuffer having more than one track in
the GStreamer port.
This fixes the following LayoutTests:
imported/w3c/web-platform-tests/media-source/mediasource-activesourcebuffers.html
media/media-source/media-source-has-audio-video.html
media/media-source/only-bcp47-language-tags-accepted-as-valid.html
* platform/graphics/gstreamer/GStreamerCommon.h:
(GstIteratorAdaptor::GstIteratorAdaptor):
(GstIteratorAdaptor::iterator::iterator):
(GstIteratorAdaptor::iterator::operator*):
(GstIteratorAdaptor::iterator::operator++):
(GstIteratorAdaptor::iterator::operator==):
(GstIteratorAdaptor::iterator::operator!=):
(GstIteratorAdaptor::begin):
(GstIteratorAdaptor::end):
* platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::AppendPipeline):
(WebCore::AppendPipeline::~AppendPipeline):
(WebCore::AppendPipeline::parseDemuxerSrcPadCaps):
(WebCore::AppendPipeline::appsinkCapsChanged):
(WebCore::AppendPipeline::handleEndOfAppend):
(WebCore::AppendPipeline::appsinkNewSample):
(WebCore::AppendPipeline::didReceiveInitializationSegment):
(WebCore::AppendPipeline::consumeAppsinksAvailableSamples):
(WebCore::AppendPipeline::resetParserState):
(WebCore::AppendPipeline::handleAppsinkNewSampleFromStreamingThread):
(WebCore::createOptionalParserForFormat):
(WebCore::AppendPipeline::generateTrackId):
(WebCore::AppendPipeline::tryCreateTrackFromPad):
(WebCore::AppendPipeline::tryMatchPadToExistingTrack):
(WebCore::AppendPipeline::linkPadWithTrack):
(WebCore::AppendPipeline::makeWebKitTrack):
(WebCore::AppendPipeline::Track::initializeElements):
(WebCore::AppendPipeline::hookTrackEvents):
(WebCore::AppendPipeline::streamTypeToString):
(WebCore::AppendPipeline::id): Deleted.
(WebCore::AppendPipeline::trackId): Deleted.
(WebCore::AppendPipeline::consumeAppsinkAvailableSamples): Deleted.
(WebCore::AppendPipeline::connectDemuxerSrcPadToAppsinkFromStreamingThread): Deleted.
(WebCore::AppendPipeline::connectDemuxerSrcPadToAppsink): Deleted.
(WebCore::AppendPipeline::disconnectDemuxerSrcPadFromAppsinkFromAnyThread): Deleted.
* platform/graphics/gstreamer/mse/AppendPipeline.h:
(WebCore::AppendPipeline::sourceBufferPrivate):
(WebCore::AppendPipeline::Track::Track):
(WebCore::AppendPipeline::appsrc):
(WebCore::AppendPipeline::appsinkCaps): Deleted.
(WebCore::AppendPipeline::track): Deleted.
(WebCore::AppendPipeline::appsink): Deleted.
(WebCore::AppendPipeline::demuxerSrcPadCaps): Deleted.
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::MediaPlayerPrivateGStreamerMSE::setInitialVideoSize):
(WebCore::MediaPlayerPrivateGStreamerMSE::trackDetected): Deleted.
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:
LayoutTests:
Update expectations and rebaseline one test is which the buffered
ranges have changed slightly due to the audio track previously
discarded now being parsed.
* platform/glib/TestExpectations:
* platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-remove-expected.txt:
Canonical link: https://commits.webkit.org/240823@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281440 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=226316
<rdar://problem/78552912>
Reviewed by Alex Christensen.
Source/WebCore:
Tests: http/tests/security/contentSecurityPolicy/report-blocked-uri-after-blocked-redirect.html
http/tests/security/contentSecurityPolicy/report-blocked-uri-after-multiple-redirects.html
Currently for a blocked redirection we report the blocked URI as the
target URL. This is not up to spec and we should actually report the
requested URL.
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::redirectReceived):
(WebCore::DocumentThreadableLoader::isAllowedByContentSecurityPolicy):
* loader/DocumentThreadableLoader.h:
* page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::allowConnectToSource const):
(WebCore::ContentSecurityPolicy::reportViolation const):
* page/csp/ContentSecurityPolicy.h:
Source/WebKit:
Currently for a blocked redirection we report the blocked URI as the
target URL. This is not up to spec and we should actually report the
requested URL.
* NetworkProcess/NetworkLoadChecker.cpp:
(WebKit::NetworkLoadChecker::check):
(WebKit::NetworkLoadChecker::checkRedirection):
(WebKit::NetworkLoadChecker::checkRequest):
(WebKit::NetworkLoadChecker::isAllowedByContentSecurityPolicy):
* NetworkProcess/NetworkLoadChecker.h:
LayoutTests:
* http/tests/security/contentSecurityPolicy/report-blocked-uri-after-blocked-redirect-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/report-blocked-uri-after-blocked-redirect.html: Added.
* http/tests/security/contentSecurityPolicy/report-blocked-uri-after-multiple-redirects-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/report-blocked-uri-after-multiple-redirects.html: Added.
* platform/mac-wk1/http/tests/security/contentSecurityPolicy/report-blocked-uri-after-multiple-redirects-expected.txt: Added.
* platform/mac-wk1/http/tests/security/contentSecurityPolicy/report-blocked-uri-after-blocked-redirect-expected.txt: Added.
* platform/win/http/tests/security/contentSecurityPolicy/report-blocked-uri-after-blocked-redirect-expected.txt: Added.
* platform/win/http/tests/security/contentSecurityPolicy/report-blocked-uri-after-multiple-redirects-expected.txt: Added.
WebKitLegacy and Win have different console logging.
Canonical link: https://commits.webkit.org/240818@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281431 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229380
Reviewed by Adrian Perez de Castro.
Tools:
r280774 added support for fullscreen in the WindowViewBackend, but
many webdriver tests started failing as they run in the headless
backend.
This commits adds basic support in HeadlessBackend to make some
tests pass. Currently, just storing the fullscreen state and
forwarding the events to the WPE backend functions.
A number of tests are still failing due to the missing multiple window
support (required through the `session` fixtures), but also there are
still some failing that expect the view to be started in
non-fullscreen mode, which does not happen in the headless backend.
* wpe/backends/HeadlessViewBackend.cpp:
(WPEToolingBackends::HeadlessViewBackend::HeadlessViewBackend):
(WPEToolingBackends::HeadlessViewBackend::onDOMFullScreenRequest):
(WPEToolingBackends::HeadlessViewBackend::dispatchFullscreenEvent):
* wpe/backends/HeadlessViewBackend.h:
WebDriverTests:
* TestExpectations.json: Skip some tests still failing, mainly due to multiple window support missing.
Canonical link: https://commits.webkit.org/240817@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281430 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229369
Reviewed by Alan Bujtas.
Use references for non-nullable pointers, and pass nullptr instead of 0 to other pointer parameters.
No new tests because there is no behavior change.
* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::parseAuthorStyleSheet):
(WebCore::StyleSheetContents::parseString):
* css/StyleSheetContents.h:
* css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseSheet):
* css/parser/CSSParser.h:
* css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::parseStyleSheet):
* css/parser/CSSParserImpl.h:
Canonical link: https://commits.webkit.org/240815@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281426 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229103
Reviewed by Antti Koivisto.
Source/WebCore:
This patch is in preparation for enabling positioned content for IFC handling.
In this patch we compute the static position for out-of-flow content inside the inline formatting context.
As per spec, the static position of an out-of-flow box is computed as if the position was set to static.
However it does not mean that the out-of-flow box should be involved in the inline layout process.
Instead we figure out this static position after the inline layout by looking at
the previous sibling (or parent) box's geometry and place the out-of-flow box at the logical right position.
* layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
(WebCore::Layout::InlineFormattingContext::lineLayoutForIntergration):
(WebCore::Layout::InlineFormattingContext::computeStaticPositionForOutOfFlowContent):
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
(WebCore::Layout::InlineFormattingContext::collectContentIfNeeded):
(WebCore::Layout::InlineFormattingContext::collectInlineContentIfNeeded): Deleted.
* layout/formattingContexts/inline/InlineFormattingContext.h:
LayoutTests:
* fast/inline/out-of-flow-with-static-position-in-ifc-expected.html: Added.
* fast/inline/out-of-flow-with-static-position-in-ifc.html: Added.
Canonical link: https://commits.webkit.org/240814@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281424 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229388
Reviewed by Alan Bujtas.
WidthIterator::applyCSSVisibilityRules() has some special handling for specific characters.
If those characters are present, we need to make sure we actually use WidthIterator::applyCSSVisibilityRules()
instead of taking the fast path in FontCascade::widthForSimpleText().
This is split out from https://bugs.webkit.org/show_bug.cgi?id=215643, and will be tested by that bug's test.
* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::canUseSimplifiedTextMeasuring):
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::characterCanUseSimplifiedTextMeasuring):
(WebCore::WidthIterator::applyCSSVisibilityRules):
* platform/graphics/WidthIterator.h:
* rendering/RenderText.cpp:
(WebCore::RenderText::computeCanUseSimplifiedTextMeasuring const):
Canonical link: https://commits.webkit.org/240813@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281423 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229316
Reviewed by Tim Horton.
Source/WebKit:
After rdar://80384564, UIKit's non-editable text tap recognizer will no longer cause us to clear the active text
selection range when tapping outside of currently selected text in the page. Instead, WebKit's synthetic click
gesture recognizer should now manages clearing the selection (unless the page has prevented the "mousedown"
event).
With just the UIKit-side change, this already mostly works as expected since `commitPotentialTapFailed()` clears
out non-editable selections. However, there is one scenario in which we do want to clear out the selection when
tapping that isn't covered by the synthetic click gesture: when tapping on an element that does not handle or
prevent "mousedown"; this behavior is exercised by the existing layout test
`editing/selection/ios/hide-selection-after-tap-on-prevent-default-element.html`. To preserve this behavior, we
add a call to `clearSelectionAfterTapIfNeeded()` when completing a synthetic click, in the case where the
"mousedown" event was not swallowed.
These 3 tests should pass after the changes in rdar://80384564:
- editing/selection/ios/change-selection-by-tapping-with-existing-selection.html
- editing/selection/preserve-selection-when-clicking-button.html
- editing/selection/ios/persist-selection-after-tapping-on-element-with-mousedown-handler.html
And these WebKit-side changes are needed to keep these 2 tests passing:
- editing/selection/ios/hide-selection-after-tap-on-prevent-default-element.html
- fast/images/text-recognition/ios/reselect-word-in-image-overlay.html
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::completeSyntheticClick):
LayoutTests:
See WebKit/ChangeLog for more details.
* fast/images/text-recognition/ios/reselect-word-in-image-overlay.html:
Add a short delay to avoid timing out, due to the second long press gesture to select text not triggering.
* platform/ios-14/TestExpectations:
Remove iOS 14-specific PASS expectations, and remove the more generic FAIL expectation in the ios directory.
Instead, just mark these three layout tests as FAIL on iOS 15, and PASS elsewhere.
* platform/ios-15/TestExpectations: Added.
* platform/ios/TestExpectations:
Canonical link: https://commits.webkit.org/240810@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281420 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=149128
<rdar://problem/79224941>
Reviewed by Alan Bujtas.
LayoutTests/imported/w3c:
These tests were erroneously marked as reference tests, when they should be reference-mismatch tests.
* web-platform-tests/css/css-text/white-space/control-chars-001-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-001-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-002-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-002-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-003-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-003-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-004-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-004-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-005-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-005-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-006-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-006-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-007-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-007-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-008-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-008-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-00B-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-00B-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-00C-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-00C-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-00E-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-00E-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-00F-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-00F-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-010-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-010-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-011-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-011-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-012-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-012-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-013-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-013-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-014-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-014-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-015-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-015-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-016-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-016-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-017-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-017-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-018-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-018-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-019-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-019-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-01A-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-01A-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-01B-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-01B-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-01C-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-01C-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-01D-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-01D-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-01E-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-01E-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-01F-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-01F-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-07F-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-07F-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-080-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-080-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-081-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-081-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-082-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-082-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-083-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-083-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-084-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-084-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-085-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-085-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-086-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-086-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-087-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-087-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-088-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-088-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-089-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-089-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-08A-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-08A-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-08B-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-08B-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-08C-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-08C-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-08D-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-08D-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-08E-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-08E-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-08F-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-08F-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-090-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-090-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-091-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-091-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-092-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-092-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-093-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-093-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-094-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-094-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-095-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-095-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-096-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-096-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-097-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-097-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-098-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-098-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-099-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-099-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-09A-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-09A-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-09B-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-09B-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-09C-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-09C-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-09D-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-09D-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-09E-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-09E-expected.html.
* web-platform-tests/css/css-text/white-space/control-chars-09F-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-09F-expected.html.
Source/WebCore:
We can map these glyphs to the .notdef glyph, which is (supposed to be) visible.
Tests: fast/dom/52776.html
fast/text/fixed-pitch-control-characters.html
fast/text/wide-zero-width-space.html
fast/text/zero-width-characters.html
imported/w3c/web-platform-tests/css/css-text/white-space*
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::applyCSSVisibilityRules):
LayoutTests:
Update existing tests.
* fast/text/fixed-pitch-control-characters-expected.txt:
* fast/text/wide-zero-width-space.html:
* fast/text/zero-width-characters.html:
* platform/ios/fast/dom/52776-expected.txt:
* platform/mac/fast/dom/52776-expected.txt:
* platform/mac/fast/text/wide-zero-width-space-expected.txt: This actually shows
that there's a difference between the fast text codepath and the complex text
codepath, but that's okay for now because the complex text codepath is going
away. Also, it's not practical to fix this in the complex text codepath,
because that would require a CoreText change. So, for now, we can just encode
the behavior difference in our test, and when the complex codepath finally
goes away, this test will be updated to be working correctly again.
Canonical link: https://commits.webkit.org/240809@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281419 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=215643
<rdar://problem/67430461>
Reviewed by Alan Bujtas.
Source/WebCore:
The CSS spec says that certain characters have to be invisible. Previously, we were doing this
by just treating these characters as if they were the zero width space character. However, this
is wrong for 2 reasons:
1. If the primary font supports the desired character but doesn't support the zero width space
character, we'll fallback past it and trigger a download for secondary fonts until
we find one that supports the ZWS character (which the page didn't even ask for!)
2. Shaping is Turing-complete, and expects that the correct glyphIDs are fed into the shaper.
We can't just arbitrarily swap out glyphIDs before shaping just because we feel like it.
Instead, the solution is to handle these invisible characters after font fallback, and after
shaping. This patch does it just like we handle adding letter-spacing, word-spacing, and
justification after shaping - by iterating over the glyphs output by the shaper and seeing if
any need to be adjusted.
This patch also includes a fix for the situation where the glyph buffer might be left in an
inconsistent state, where the array of glyphs is shorter than the array of characters -
this new codepath added in this patch revealed this existing problem, and fixes it here too.
Test: fast/text/zwj-ligature.html
* platform/graphics/Font.cpp:
(WebCore::createAndFillGlyphPage):
(WebCore::overrideControlCharacters): Deleted.
* platform/graphics/GlyphBuffer.h:
(WebCore::GlyphBuffer::glyphAt const):
(WebCore::GlyphBuffer::deleteGlyphWithoutAffectingSize):
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::applyCSSVisibilityRules):
(WebCore::WidthIterator::advance):
* platform/graphics/WidthIterator.h:
Source/WTF:
* wtf/unicode/CharacterNames.h:
LayoutTests:
* fast/text/resources/Ahem-GSUB-ligatures.ttf: Added.
* fast/text/zwj-ligature-expected.html: Added.
* fast/text/zwj-ligature.html: Added.
* platform/mac/fast/text/format-control-expected.txt: Progression! A new ligature is formed that wasn't formed before.
Also, this ligature is formed in both Chrome and Firefox, so we match them now.
* platform/win/TestExpectations:
Canonical link: https://commits.webkit.org/240804@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281389 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=228061
Reviewed by Sam Weinig.
We've got all we need in the inlineFormattingState object.
* layout/integration/LayoutIntegrationInlineContentBuilder.cpp:
(WebCore::LayoutIntegration::InlineContentBuilder::build const):
(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLineRuns const):
(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const):
* layout/integration/LayoutIntegrationInlineContentBuilder.h:
* layout/integration/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::constructContent):
Canonical link: https://commits.webkit.org/240803@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281388 268f45cc-cd09-0410-ab3c-d52691b4dbfc