https://bugs.webkit.org/show_bug.cgi?id=229375
Source/WebCore:
Reviewed by Brady Eidson.
Client may dispatch custom events to an IDBRequest, and we should only change request state based on events
created internally.
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::dispatchEvent):
Source/WTF:
Protect callee in CrossThreadTask if it inherits from ThreadSafeRefCounted<T>.
Reviewed by Brady Eidson.
* wtf/CrossThreadTask.h:
Canonical link: https://commits.webkit.org/240799@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281384 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=228186
Reviewed by Myles C. Maxfield.
Source/WebCore:
Add null check to resolve crash in FontCache::lastResortFallbackFont. Additionally, return early in BitmapImage::getHBITMAPOfSize
when the bits per pixel in the bitmap is of unexpected size, since that will cause a crash under this function. This can happen
if an event is being handled while already in the Windows paint handler.
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::FontCache::lastResortFallbackFont):
* platform/graphics/win/GraphicsContextCGWin.cpp:
(WebCore::CGContextWithHDC):
* platform/graphics/win/ImageCGWin.cpp:
(WebCore::BitmapImage::getHBITMAPOfSize):
Source/WebKitLegacy/win:
Add null check for bitmapDC. Proceeding without a valid bitmapDC will cause a crash. When painting is being done while already in the Windows paint handler,
we can end up with a bitmapDC which is null.
* WebView.cpp:
(WebView::paintIntoBackingStore):
Canonical link: https://commits.webkit.org/240795@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281380 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=186804
Reviewed by Alan Bujtas.
Source/WebCore:
Previously, single characters weren't shaped in the fast text codepath,
because shaping in the fast text codepath was just for kerning and
ligatures. Kerning didn't need to shape individual characters because
kerning only applies to pairs of characters, and ligatures didn't need
to shape individual characters because two characters are required to
form a ligature. However, now that we want to replace the complex text
codepath with a new-and-improved fast text codepath, we have to perform
all shaping in the fast text codepath, regardless of how many characters
are present.
Test: fast/text/single-character-shaping.html
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::applyFontTransforms):
(WebCore::WidthIterator::commitCurrentFontRange):
(WebCore::WidthIterator::advanceInternal):
(WebCore::WidthIterator::shouldApplyFontTransforms const): Deleted.
* platform/graphics/WidthIterator.h:
* platform/graphics/coretext/FontCoreText.cpp:
(WebCore::Font::applyTransforms): Keep kerning disabled for single glyphs,
because of performance. This will be able to be removed when rdar://82195405
is fixed.
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
Tools:
Huge thanks to Laurence Penney to contributing this test font!!!
* Scripts/webkitpy/common/config/contributors.json:
LayoutTests:
Huge thanks to Laurence Penney to contributing this test font!!!
* fast/text/resources/UniversTofu-GSUB-rvrn.ttf: Added. The license is Apache 2.0.
* fast/text/single-character-shaping-expected.html: Added.
* fast/text/single-character-shaping.html: Added.
Canonical link: https://commits.webkit.org/240793@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281378 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=228940
Reviewed by Antti Koivisto.
Translate the logical layout coordinates to physical paint coordinates by taking the writing mode into account.
(e.g. writing-mode: vertical-rl;
run logical rect: [0, 0][20x18]
in a flipped block box: [10, 10][100x50]
with the paint offset: [8, 8]
translates to: [90, 8][20x18]
)
* layout/integration/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::paint):
(WebCore::LayoutIntegration::LineLayout::paintTextRunUsingPhysicalCoordinates):
* layout/integration/LayoutIntegrationLineLayout.h:
Canonical link: https://commits.webkit.org/240792@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=227830
Reviewed by Ross Kirsling.
JSTests:
* stress/intl-locale-info.js: Added.
(shouldBe):
(throw.new.Error):
(let.enGB.new.Intl.Locale.shouldBe):
(let.l.new.Intl.Locale.shouldBe):
* test262/config.yaml:
Source/JavaScriptCore:
This patch implements Intl.Locale's extension (Intl Locale Info proposal)[1], which is already stage 3.
Intl.Locale#{calendars,collations,hourCycles,numberingSystems,timeZones} can return array of preferred
configuration for the given locale. And Intl.Locale#textInfo can return text layout direction and Intl.Locale#weekInfo
can return weekday information (e.g. when weekend starts).
[1]: https://github.com/tc39/proposal-intl-locale-info
* runtime/IntlLocale.cpp:
(JSC::createArrayFromStringVector):
(JSC::IntlLocale::calendars):
(JSC::IntlLocale::collations):
(JSC::IntlLocale::hourCycles):
(JSC::IntlLocale::numberingSystems):
(JSC::IntlLocale::timeZones):
(JSC::IntlLocale::textInfo):
(JSC::IntlLocale::weekInfo):
* runtime/IntlLocale.h:
* runtime/IntlLocalePrototype.cpp:
(JSC::JSC_DEFINE_CUSTOM_GETTER):
Canonical link: https://commits.webkit.org/240789@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281374 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=228895
<rdar://problem/81651487>
Reviewed by Antti Koivisto.
This is in preparation for removing content scanning completely.
* layout/integration/LayoutIntegrationCoverage.cpp:
(WebCore::LayoutIntegration::printReason):
(WebCore::LayoutIntegration::canUseForText):
(WebCore::LayoutIntegration::canUseForFontAndText):
* layout/integration/LayoutIntegrationCoverage.h:
Canonical link: https://commits.webkit.org/240788@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281373 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229327
<rdar://81997024>
Reviewed by Eric Carlson.
Source/WebCore:
If category is PlayAndRecord, we stick to PlayAndRecord until audio is no longer playing at which point we
transition to whatever category is most appropriate.
Introduce PlatformMediaSession::isPlaying in addition to canProduceAudio to compute whether audio is being played.
Test: http/tests/media/media-stream/audio-capture-and-category.https.html
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::isPlaying const):
* Modules/webaudio/AudioContext.h:
* html/HTMLMediaElement.h:
* platform/audio/PlatformMediaSession.cpp:
(WebCore::PlatformMediaSession::isPlaying const):
* platform/audio/PlatformMediaSession.h:
(WebCore::PlatformMediaSessionClient::isPlaying const):
* platform/audio/cocoa/MediaSessionManagerCocoa.mm:
(WebCore::MediaSessionManagerCocoa::updateSessionState):
LayoutTests:
* http/tests/media/media-stream/audio-capture-and-category.https-expected.txt: Added.
* http/tests/media/media-stream/audio-capture-and-category.https.html: Added.
Canonical link: https://commits.webkit.org/240782@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281367 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229104
Reviewed by Antti Koivisto.
<div><div style="position: absolute"></div>this is still a inline formatting context</div>
We don't allow to mix inline and block inflow content.
However out-of-flow block level boxes can certainly have inline siblings. canUseForLineLayoutWithReason should check
the content accordingly.
* layout/integration/LayoutIntegrationCoverage.cpp:
(WebCore::LayoutIntegration::canUseForLineLayoutWithReason):
Canonical link: https://commits.webkit.org/240777@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281362 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229105
Reviewed by Antti Koivisto.
Normally there are more runs than entries in the box list. It's more performant to iterate
the box list for the renderer location adjustment.
* layout/integration/LayoutIntegrationBoxTree.h:
(WebCore::LayoutIntegration::BoxTree::boxAndRendererList):
* layout/integration/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::constructContent):
Canonical link: https://commits.webkit.org/240776@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281361 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229308
Reviewed by Youenn Fablet.
Source/WebCore:
Move UserMediaRequestIdentifier to its own header.
* Headers.cmake:
* Modules/mediastream/UserMediaRequest.h:
* WebCore.xcodeproj/project.pbxproj:
Source/WebKit:
Use the existing WebCore::UserMediaRequestIdentifier in WebKit code. We need to pull
it out of the ENABLE(MEDIA_STREAM) #ifdef.
In UserMediaPermissionRequestManagerProxy use a new identifier type, MediaDevicePermissionRequestIdentifier,
which is used to identify pending permission requests (but never send to the web process).
* Scripts/webkit/messages.py:
(types_that_cannot_be_forward_declared): Sort
(headers_for_type):
* UIProcess/MediaKeySystemPermissionRequestManagerProxy.h:
* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::denyRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::grantRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::finishGrantingRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
(WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionInvalidRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionValidRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::checkUserMediaPermissionForSpeechRecognition):
(WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo):
(WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
(WebKit::generateRequestID): Deleted.
* UIProcess/UserMediaPermissionRequestManagerProxy.h:
* UIProcess/UserMediaPermissionRequestProxy.cpp:
(WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
* UIProcess/UserMediaPermissionRequestProxy.h:
(WebKit::UserMediaPermissionRequestProxy::create):
(WebKit::UserMediaPermissionRequestProxy::userMediaID const):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebKit.xcodeproj/project.pbxproj: Some files that were in Sources.txt were missing from the project.
* WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
(WebKit::UserMediaPermissionRequestManager::sendUserMediaRequest):
(WebKit::UserMediaPermissionRequestManager::userMediaAccessWasGranted):
(WebKit::UserMediaPermissionRequestManager::userMediaAccessWasDenied):
* WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::userMediaAccessWasGranted):
(WebKit::WebPage::userMediaAccessWasDenied):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Canonical link: https://commits.webkit.org/240775@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281360 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=228882
Reviewed by Antti Koivisto.
getNextSoftBreak is simply returns the position of the last item on the line unless it's a hard line break.
(endsWithBreak -> previousLineBrokeCleanly -> previousLineBrokeAtBR see https://trac.webkit.org/changeset/6107)
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks const):
(WebCore::getNextSoftBreak): Deleted. line->lineBreakPos() translates to the position where the line breaks within the run.
maximumCaretOffset() returns the same value, though the naming is a bit confusing and probably should be renamed or introduce
something similar on the line iterator.
* layout/integration/LayoutIntegrationCoverage.cpp:
(WebCore::LayoutIntegration::canUseForLineLayoutWithReason):
Canonical link: https://commits.webkit.org/240773@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281358 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229065
Reviewed by Antti Koivisto.
Source/WebCore:
When a block level box's style changes, while we mark the box itself for layout we normally don't
walk the subtree for damaged inline content. Instead during layout, we dirty these individual descendant renderers as needed.
Inline level boxes with relative width/height values are part of this group.
It's also similar to what we do in LegacyLineLayout::layoutLineBoxes.
* layout/integration/LayoutIntegrationCoverage.cpp:
(WebCore::LayoutIntegration::canUseForChild):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutModernLines):
LayoutTests:
* platform/ios/fast/frames/onlyCommentInIFrame-expected.txt:
* platform/mac/fast/frames/onlyCommentInIFrame-expected.txt:
Canonical link: https://commits.webkit.org/240772@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281357 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229351
Reviewed by Saam Barati.
MacroAssembler::moveIntsToDouble required scratch FPRReg. But it was only required for MacroAssemblerX86, and it is already removed.
This means that we no longer need this scratch FPRReg. This change makes a lot of IC code, property access code simpler.
This patch removes that scratch FPRReg, and removed scratch FPRReg of many arithmetic ICs. This patch is important for PutByVal modern
IC since some of property access requires FPRReg because of MacroAssembler::moveIntsToDouble, and it requires adding new m_scratch2FPR
to AccessCase. But after this simplification, this is no longer necessary.
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::moveIntsToDouble):
* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::moveIntsToDouble):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileValueToInt32):
(JSC::DFG::SpeculativeJIT::compileDoubleRep):
(JSC::DFG::SpeculativeJIT::emitUntypedOrBigIntRightShiftBitOp):
(JSC::DFG::SpeculativeJIT::compileValueAdd):
(JSC::DFG::SpeculativeJIT::compileValueSub):
(JSC::DFG::SpeculativeJIT::compileMathIC):
(JSC::DFG::SpeculativeJIT::compileValueNegate):
(JSC::DFG::SpeculativeJIT::compileValueMul):
(JSC::DFG::SpeculativeJIT::speculateRealNumber):
(JSC::DFG::SpeculativeJIT::compileNormalizeMapKey):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::unboxDouble):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileBinaryMathIC):
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::emitConvertValueToBoolean):
(JSC::AssemblyHelpers::branchIfValue):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::unboxDoubleNonDestructive):
(JSC::AssemblyHelpers::unboxDouble):
* jit/JITAddGenerator.cpp:
(JSC::JITAddGenerator::generateFastPath):
* jit/JITAddGenerator.h:
(JSC::JITAddGenerator::JITAddGenerator):
* jit/JITArithmetic.cpp:
(JSC::JIT::emitRightShiftFastPath):
(JSC::JIT::emitMathICFast):
* jit/JITDivGenerator.cpp:
(JSC::JITDivGenerator::loadOperand):
* jit/JITMulGenerator.cpp:
(JSC::JITMulGenerator::generateInline):
(JSC::JITMulGenerator::generateFastPath):
* jit/JITMulGenerator.h:
(JSC::JITMulGenerator::JITMulGenerator):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitFloatTypedArrayPutByVal):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emitGenericContiguousPutByVal):
* jit/JITRightShiftGenerator.cpp:
(JSC::JITRightShiftGenerator::generateFastPath):
* jit/JITRightShiftGenerator.h:
(JSC::JITRightShiftGenerator::JITRightShiftGenerator):
* jit/JITSubGenerator.cpp:
(JSC::JITSubGenerator::generateInline):
(JSC::JITSubGenerator::generateFastPath):
* jit/JITSubGenerator.h:
(JSC::JITSubGenerator::JITSubGenerator):
Canonical link: https://commits.webkit.org/240770@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281355 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229218
Reviewed by Devin Rousso.
Source/WebCore:
Test: inspector/css/getMatchedStylesForNodeLargeSelectors.html
CSS rules are limited to 8192 selector components in WebCore, and when more components are present the rule is
split into multiple `StyleRule` instances. This meant Web Inspector could not reliably resolve a `StyleRule`
back to its source data, which we do to enable things like editing, as well as to make sure we show the un-split
selector in the Styles sidebar of the Elements tab. Previously, the presences of multiple `StyleRule`s for a
single source data declaration was not accounted for, which meant that rules after the split rules would show a
mix of style information from the actual rule as well as a rule some number of declarations later in the same
style sheet. This is resolved by marking `StyleRule`s that have been split and marking the last of the split
rules. This allows us to then forgo incrementing the index for looking up raw declarations until we encounter
the last rule from a split `StyleRule`.
* css/StyleRule.cpp:
(WebCore::StyleRule::StyleRule):
(WebCore::StyleRule::createForSplitting):
(WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount const):
* css/StyleRule.h:
- Added two members to track rules that are split into multiple rules due to exceeding the 8192 component limit
for selectors in order to determine later which rules are effectively duplicates of each other. We use two
members here, one to track that the rule was split from a larger authored rule (`m_isSplitRule`), and one to
mark the last rule split from a given rule (`m_isLastRuleInSplitRule`). The second member prevents situations
where we might otherwise accidentally continue iterating into a list of `StyleRule` where two large authored
rules that had to be split are present next to each other in an ordered collection of `StyleRule`.
* inspector/InspectorStyleSheet.cpp:
(WebCore::selectorsFromSource):
- Use a vector of `CSSSelector`s for specificity information since we now collect selectors from potentially
multiple `CSSStyleRule`s.
(WebCore::InspectorStyleSheet::cssStyleRulesSplitFromSameRule):
- Find any neighboring CSSStyleRules that were split from the same original rule based on the order of rules as
well as the new flags in `StyleRule`
(WebCore::InspectorStyleSheet::selectorsForCSSStyleRule):
- Find all selectors for a given CSSStyleRule, including other `CSSStyleRule`s split from the same rule in a
style sheet.
(WebCore::InspectorStyleSheet::buildObjectForSelectorList):
- Use all CSSSelectors from for the CSSStyleRule and other rules that were split from the same rule in a style
sheet.
(WebCore::InspectorStyleSheet::ruleSourceDataFor const):
(WebCore::InspectorStyleSheet::ruleIndexByStyle const):
- When looking up an index to get rule source data, make sure we don't overcount split rules.
* inspector/InspectorStyleSheet.h:
LayoutTests:
Test very large (8192 individual component) selectors to ensure surrounding styles are correctly resolved.
* inspector/css/getMatchedStylesForNodeLargeSelectors-expected.txt: Added.
* inspector/css/getMatchedStylesForNodeLargeSelectors.html: Added.
Canonical link: https://commits.webkit.org/240769@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281354 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229344
rdar://81804638
Reviewed by Tim Horton.
Clicking on a phone number link should present data detection UI.
However, `-[WKActionSheetAssistant _elementActionForDDAction:]` always
returns nil on Catalyst, resulting in crash when attempting to add the
returned action to an NSArray.
Given that the methods used in `_elementActionForDDAction:` are available
on Catalyst, fix the crash by ensuring the method does not return nil, and
only making the method available on platforms where ENABLE(DATA_DETECTION)
is defined.
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant _elementActionForDDAction:]):
Canonical link: https://commits.webkit.org/240767@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281352 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229323
Reviewed by John Wilander.
Source/WebKit:
This allows me to run the UIEventAttribution tests on macOS.
It also makes them not time out, which they were doing since r277447.
To accomplish this, I added more test SPI to prevent the network process
suspension message, which was causing the test to time out on the iOS simulator.
* UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
* UIProcess/API/Cocoa/WKWebViewTesting.mm:
(-[WKWebView _addEventAttributionWithSourceID:destinationURL:sourceDescription:purchaser:reportEndpoint:optionalNonce:]):
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(+[WKWebsiteDataStore _preventNetworkProcessSuspensionForTesting]):
* UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
* UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h:
* UIProcess/API/ios/WKWebViewTestingIOS.mm:
(-[WKWebView _setUIEventAttributionForTesting:withNonce:]): Deleted.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::preventSuspensionForTesting):
(WebKit::NetworkProcessProxy::sendPrepareToSuspend):
* UIProcess/Network/NetworkProcessProxy.h:
Tools:
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::exampleURL):
(TestWebKitAPI::runBasicEventAttributionTest):
(TestWebKitAPI::TEST):
Canonical link: https://commits.webkit.org/240764@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281349 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229026
Reviewed by Antti Koivisto.
Surrogate pairs represent one "character" (U16_IS_LEAD + U16_IS_TAIL).
We should never break them half even when CSS tells us to break the word at arbitrary position.
This is in preparation for removing the U16_IS_SURROGATE check in canUseForCharacter.
* layout/formattingContexts/inline/InlineContentBreaker.cpp:
(WebCore::Layout::InlineContentBreaker::tryBreakingTextRun const):
* layout/formattingContexts/inline/text/TextUtil.cpp:
(WebCore::Layout::TextUtil::midWorkdBreak):
(WebCore::Layout::TextUtil::split): Deleted.
* layout/formattingContexts/inline/text/TextUtil.h:
Canonical link: https://commits.webkit.org/240758@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281341 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=200556
Reviewed by Simon Fraser.
Add a new option to print a summary listing test expectation health.
It uses the same expected results as --print-expectations.
To run it: run-webkit-tests --print-summary
You can pass the same arguments as normal run-webkit-tests and it will
return stats based on the tests collected.
It also outputs a .csv file with the data.
* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager.print_expectations): Gather the tests. Note whether the test
is marked as skip, pass, flaky, or fail, the definitions of which are
dictated by model.get_tests_with_result_type(). Output the results to
command line as well as to file.
* Scripts/webkitpy/layout_tests/run_webkit_tests.py: Add the new option.
It goes through the same path as --print-expectations.
Canonical link: https://commits.webkit.org/240757@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281340 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=228727
Reviewed by Antti Koivisto.
Let's use FontCascade::expansionOpportunityCount to figure out the number of expansion counts in a run.
It helps with finding non-breakable space in an otherwise non-whitespace content (foo bar where the contet forms one run but the because
of the non-breakable _space_ in the middle, it also produces an expansion opportunity).
This patch moves all the expansion handling over to Line::applyRunExpansion as we anyway need to walk the content to find such spaces (i.e. not worth trying to pre-compute them).
* layout/formattingContexts/inline/InlineLine.cpp:
(WebCore::Layout::Line::applyRunExpansion):
(WebCore::Layout::Line::Run::Run):
(WebCore::Layout::Line::Run::expand):
(WebCore::Layout::Line::Run::visuallyCollapseTrailingWhitespace):
(WebCore::Layout::Line::Run::setExpansionBehavior): Deleted.
(WebCore::Layout::Line::Run::expansionBehavior const): Deleted.
(WebCore::Layout::Line::Run::setHorizontalExpansion): Deleted.
* layout/formattingContexts/inline/InlineLine.h:
(WebCore::Layout::Line::Run::expansion const):
(WebCore::Layout::Line::Run::setExpansion):
(WebCore::Layout::Line::Run::hasExpansionOpportunity const): Deleted.
(WebCore::Layout::Line::Run::expansionOpportunityCount const): Deleted.
* layout/integration/LayoutIntegrationCoverage.cpp:
(WebCore::LayoutIntegration::canUseForCharacter):
(WebCore::LayoutIntegration::canUseForText):
(WebCore::LayoutIntegration::canUseForFontAndText):
(WebCore::LayoutIntegration::canUseForStyle):
Canonical link: https://commits.webkit.org/240754@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281337 268f45cc-cd09-0410-ab3c-d52691b4dbfc