WebKit Bugzilla
Attachment 357817 Details for
Bug 192933
: Use Optional::valueOr() instead of Optional::value_or()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192933-20181220091028.patch (text/plain), 219.85 KB, created by
Chris Dumez
on 2018-12-20 09:10:30 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Chris Dumez
Created:
2018-12-20 09:10:30 PST
Size:
219.85 KB
patch
obsolete
>Subversion Revision: 239428 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 7017533c8041959ca35a2379a31888c0a0a4525c..107afd035568c57d5d12430b3681ac0de989b185 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,19 @@ >+2018-12-20 Chris Dumez <cdumez@apple.com> >+ >+ Use Optional::valueOr() instead of Optional::value_or() >+ https://bugs.webkit.org/show_bug.cgi?id=192933 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm: >+ (Inspector::RemoteConnectionToTarget::setup): >+ * inspector/remote/glib/RemoteConnectionToTargetGlib.cpp: >+ (Inspector::RemoteConnectionToTarget::setup): >+ * parser/SourceCodeKey.h: >+ (JSC::SourceCodeKey::SourceCodeKey): >+ * wasm/js/WebAssemblyModuleRecord.cpp: >+ (JSC::WebAssemblyModuleRecord::link): >+ > 2018-12-19 Chris Dumez <cdumez@apple.com> > > wtf/Optional.h: move-constructor and move-assignment operator should disengage the value being moved from >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 64ddbd43e28acba272971e9f358e2b6444a5bc2e..8740991b76184a7e3a60b424a18f1a5ffddbbbd5 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,13 @@ >+2018-12-20 Chris Dumez <cdumez@apple.com> >+ >+ Use Optional::valueOr() instead of Optional::value_or() >+ https://bugs.webkit.org/show_bug.cgi?id=192933 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * wtf/Optional.h: >+ (WTF::Optional<T::valueOr const): >+ > 2018-12-19 Chris Dumez <cdumez@apple.com> > > wtf/Optional.h: move-constructor and move-assignment operator should disengage the value being moved from >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 2ab911fdf7cb3446e56afa8f49fdbccd53859356..8e0576f2fc06cc6a1072214d4f762dfd2b2b9670 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,296 @@ >+2018-12-20 Chris Dumez <cdumez@apple.com> >+ >+ Use Optional::valueOr() instead of Optional::value_or() >+ https://bugs.webkit.org/show_bug.cgi?id=192933 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp: >+ (WebCore::convert): >+ (WebCore::ApplePayPaymentHandler::didAuthorizePayment): >+ * Modules/encryptedmedia/MediaKeySession.cpp: >+ (WebCore::MediaKeySession::load): >+ * Modules/indexeddb/IDBDatabaseIdentifier.h: >+ (WebCore::IDBDatabaseIdentifier::hash const): >+ * Modules/indexeddb/IDBFactory.cpp: >+ (WebCore::IDBFactory::open): >+ * Modules/mediastream/MediaStreamTrack.cpp: >+ (WebCore::MediaStreamTrack::applyConstraints): >+ * Modules/mediastream/RTCDTMFSender.cpp: >+ (WebCore::RTCDTMFSender::insertDTMF): >+ * Modules/webdatabase/SQLTransaction.cpp: >+ (WebCore::SQLTransaction::executeSql): >+ * Modules/webvr/VRFrameData.cpp: >+ (WebCore::VRFrameData::update): >+ * animation/AnimationTimeline.cpp: >+ (WebCore::AnimationTimeline::updateCSSTransitionsForElement): >+ * animation/DeclarativeAnimation.cpp: >+ (WebCore::DeclarativeAnimation::cancel): >+ (WebCore::DeclarativeAnimation::invalidateDOMEvents): >+ * animation/KeyframeEffect.cpp: >+ (WebCore::computeMissingKeyframeOffsets): >+ (WebCore::KeyframeEffect::applyPendingAcceleratedActions): >+ * animation/WebAnimation.cpp: >+ (WebCore::WebAnimation::runPendingPlayTask): >+ (WebCore::WebAnimation::runPendingPauseTask): >+ * bindings/js/SerializedScriptValue.cpp: >+ (WebCore::CloneSerializer::write): >+ * crypto/algorithms/CryptoAlgorithmHMAC.cpp: >+ (WebCore::CryptoAlgorithmHMAC::generateKey): >+ (WebCore::CryptoAlgorithmHMAC::importKey): >+ * crypto/gcrypt/CryptoAlgorithmAES_GCMGCrypt.cpp: >+ (WebCore::CryptoAlgorithmAES_GCM::platformEncrypt): >+ (WebCore::CryptoAlgorithmAES_GCM::platformDecrypt): >+ * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp: >+ (WebCore::CryptoKeyRSA::importSpki): >+ (WebCore::CryptoKeyRSA::importPkcs8): >+ * crypto/keys/CryptoKeyRSA.cpp: >+ (WebCore::CryptoKeyRSA::importJwk): >+ * crypto/mac/CryptoAlgorithmAES_GCMMac.cpp: >+ (WebCore::CryptoAlgorithmAES_GCM::platformEncrypt): >+ (WebCore::CryptoAlgorithmAES_GCM::platformDecrypt): >+ * crypto/mac/CryptoKeyRSAMac.cpp: >+ (WebCore::CryptoKeyRSA::importSpki): >+ (WebCore::CryptoKeyRSA::importPkcs8): >+ * css/CSSComputedStyleDeclaration.cpp: >+ (WebCore::counterToCSSValue): >+ * css/CSSFontFace.cpp: >+ (WebCore::calculateItalicRange): >+ * css/CSSPrimitiveValue.cpp: >+ (WebCore::CSSPrimitiveValue::doubleValue const): >+ * css/CSSStyleSheet.cpp: >+ (WebCore::CSSStyleSheet::addRule): >+ * css/DOMMatrix.cpp: >+ (WebCore::DOMMatrix::rotateSelf): >+ * css/DOMMatrixReadOnly.cpp: >+ (WebCore::DOMMatrixReadOnly::validateAndFixup): >+ * css/StyleBuilderCustom.h: >+ (WebCore::StyleBuilderCustom::applyValueCounter): >+ * css/parser/MediaQueryParser.cpp: >+ (WebCore::MediaQueryParser::commitMediaQuery): >+ * dom/Document.h: >+ (WebCore::Document::referrerPolicy const): >+ * dom/Element.cpp: >+ (WebCore::toScrollAlignment): >+ * dom/EventTarget.cpp: >+ (WebCore::EventTarget::addEventListener): >+ * dom/MutationObserver.cpp: >+ (WebCore::MutationObserver::observe): >+ * editing/cocoa/FontAttributeChangesCocoa.mm: >+ (WebCore::FontChanges::platformFontFamilyNameForCSS const): >+ * fileapi/File.cpp: >+ (WebCore::File::File): >+ * html/DOMTokenList.cpp: >+ (WebCore::DOMTokenList::toggle): >+ * html/HTMLOListElement.h: >+ * html/ImageBitmap.cpp: >+ (WebCore::croppedSourceRectangleWithFormatting): >+ * html/canvas/CanvasPattern.cpp: >+ (WebCore::CanvasPattern::setTransform): >+ * html/canvas/CanvasRenderingContext2DBase.cpp: >+ (WebCore::CanvasRenderingContext2DBase::setTransform): >+ (WebCore::CanvasRenderingContext2DBase::isPointInPathInternal): >+ (WebCore::CanvasRenderingContext2DBase::isPointInStrokeInternal): >+ * html/canvas/Path2D.cpp: >+ (WebCore::Path2D::addPath): >+ * inspector/InspectorCanvas.cpp: >+ (WebCore::InspectorCanvas::buildAction): >+ * inspector/InspectorFrontendHost.cpp: >+ (WebCore::populateContextMenu): >+ * layout/FormattingContext.cpp: >+ (WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const): >+ * layout/FormattingContextGeometry.cpp: >+ (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry): >+ (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry): >+ (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry): >+ (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry): >+ (WebCore::Layout::FormattingContext::Geometry::complicatedCases): >+ (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin): >+ (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset): >+ (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedHorizontalMarginValue): >+ (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedVerticalMarginValue): >+ * layout/FormattingContextQuirks.cpp: >+ (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight): >+ * layout/MarginTypes.h: >+ (WebCore::Layout::VerticalMargin::usedValues const): >+ * layout/blockformatting/BlockFormattingContextGeometry.cpp: >+ (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin): >+ (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin): >+ (WebCore::Layout::BlockFormattingContext::Geometry::instrinsicWidthConstraints): >+ * layout/blockformatting/BlockFormattingContextQuirks.cpp: >+ (WebCore::Layout::BlockFormattingContext::Quirks::stretchedHeight): >+ * layout/displaytree/DisplayBox.h: >+ (WebCore::Display::Box::width const): >+ (WebCore::Display::Box::height const): >+ (WebCore::Display::Box::contentBoxTop const): >+ (WebCore::Display::Box::contentBoxLeft const): >+ * layout/floats/FloatingContext.cpp: >+ (WebCore::Layout::Iterator::set): >+ * layout/inlineformatting/InlineFormattingContext.cpp: >+ (WebCore::Layout::InlineFormattingContext::appendContentToLine const): >+ (WebCore::Layout::InlineFormattingContext::placeInFlowPositionedChildren const): >+ * loader/FrameLoader.cpp: >+ (WebCore::FrameLoader::urlSelected): >+ * loader/NavigationAction.cpp: >+ * page/FrameView.cpp: >+ (WebCore::FrameView::setLayoutViewportOverrideRect): >+ (WebCore::FrameView::documentToAbsoluteScaleFactor const): >+ (WebCore::FrameView::viewportSizeForCSSViewportUnits const): >+ * page/Page.cpp: >+ (WebCore::Page::setLowPowerModeEnabledOverrideForTesting): >+ * page/SecurityOriginData.cpp: >+ (WebCore::SecurityOriginData::databaseIdentifier const): >+ * page/SecurityOriginData.h: >+ (WebCore::SecurityOriginDataHash::hash): >+ * page/SecurityOriginHash.h: >+ (WebCore::SecurityOriginHash::hash): >+ * page/ViewportConfiguration.cpp: >+ (WebCore::ViewportConfiguration::setViewLayoutSize): >+ * page/WindowFeatures.cpp: >+ (WebCore::parseDialogFeatures): >+ * page/animation/AnimationBase.cpp: >+ (WebCore::AnimationBase::updateStateMachine): >+ (WebCore::AnimationBase::fireAnimationEventsIfNeeded): >+ (WebCore::AnimationBase::getTimeToNextEvent const): >+ (WebCore::AnimationBase::freezeAtTime): >+ (WebCore::AnimationBase::getElapsedTime const): >+ * page/animation/CSSAnimationController.cpp: >+ (WebCore::CSSAnimationControllerPrivate::updateAnimationTimer): >+ * page/cocoa/ResourceUsageThreadCocoa.mm: >+ (WebCore::ResourceUsageThread::platformThreadBody): >+ * page/linux/ResourceUsageThreadLinux.cpp: >+ (WebCore::ResourceUsageThread::platformThreadBody): >+ * platform/graphics/ComplexTextController.cpp: >+ (WebCore::ComplexTextController::offsetForPosition): >+ * platform/graphics/FontCache.h: >+ (WebCore::FontDescriptionKey::computeHash const): >+ * platform/graphics/FontCascade.cpp: >+ (WebCore::FontCascade::drawText const): >+ (WebCore::FontCascade::drawEmphasisMarks const): >+ (WebCore::FontCascade::displayListForTextRun const): >+ (WebCore::FontCascade::adjustSelectionRectForText const): >+ (WebCore::FontCascade::codePath const): >+ * platform/graphics/FontSelectionAlgorithm.cpp: >+ (WebCore::FontSelectionAlgorithm::styleDistance const): >+ * platform/graphics/FontSelectionAlgorithm.h: >+ (WebCore::operator<<): >+ (WebCore::FontSelectionSpecifiedCapabilities::computeWeight const): >+ (WebCore::FontSelectionSpecifiedCapabilities::computeWidth const): >+ (WebCore::FontSelectionSpecifiedCapabilities::computeSlope const): >+ * platform/graphics/ShadowBlur.cpp: >+ (WebCore::ShadowBlur::calculateLayerBoundingRect): >+ * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp: >+ (WebCore::WebCoreAVCFResourceLoader::startLoading): >+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: >+ (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput): >+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: >+ (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext): >+ * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: >+ (WebCore::SourceBufferPrivateAVFObjC::naturalSize): >+ * platform/graphics/ca/GraphicsLayerCA.cpp: >+ (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): >+ * platform/graphics/cocoa/FontCacheCoreText.cpp: >+ (WebCore::preparePlatformFont): >+ * platform/graphics/filters/FETurbulence.cpp: >+ (WebCore::FETurbulence::fillRegion const): >+ * platform/graphics/gstreamer/GStreamerCommon.cpp: >+ (WebCore::initializeGStreamer): >+ * platform/graphics/texmap/TextureMapperLayer.cpp: >+ (WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica): >+ (WebCore::TextureMapperLayer::replicaTransform): >+ (WebCore::TextureMapperLayer::syncAnimations): >+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: >+ (WebCore::CoordinatedGraphicsLayer::transformedVisibleRect): >+ (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect): >+ * platform/graphics/transforms/TransformState.cpp: >+ (WebCore::TransformState::mappedPoint const): >+ (WebCore::TransformState::mapQuad const): >+ (WebCore::TransformState::flattenWithTransform): >+ * platform/network/CacheValidation.cpp: >+ (WebCore::computeCurrentAge): >+ (WebCore::computeFreshnessLifetimeForHTTPFamily): >+ * platform/network/NetworkStateNotifier.cpp: >+ (WebCore::NetworkStateNotifier::onLine): >+ * rendering/FloatingObjects.cpp: >+ (WebCore::FindNextFloatLogicalBottomAdapter::nextLogicalBottom const): >+ (WebCore::FindNextFloatLogicalBottomAdapter::nextShapeLogicalBottom const): >+ * rendering/GridBaselineAlignment.cpp: >+ (WebCore::GridBaselineAlignment::ascentForChild const): >+ * rendering/GridTrackSizingAlgorithm.cpp: >+ (WebCore::GridTrack::setGrowthLimit): >+ (WebCore::GridTrackSizingAlgorithm::initialBaseSize const): >+ (WebCore::GridTrackSizingAlgorithm::initialGrowthLimit const): >+ (WebCore::GridTrackSizingAlgorithm::sizeTrackToFitNonSpanningItem): >+ (WebCore::sortByGridTrackGrowthPotential): >+ (WebCore::GridTrackSizingAlgorithm::estimatedGridAreaBreadthForChild const): >+ (WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const): >+ (WebCore::GridTrackSizingAlgorithm::initializeTrackSizes): >+ * rendering/PaintInfo.h: >+ (WebCore::PaintInfo::applyTransform): >+ * rendering/RenderBox.cpp: >+ (WebCore::RenderBox::computeLogicalHeight const): >+ * rendering/RenderCounter.cpp: >+ (WebCore::planCounter): >+ * rendering/RenderDeprecatedFlexibleBox.cpp: >+ (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox): >+ * rendering/RenderFlexibleBox.cpp: >+ (WebCore::RenderFlexibleBox::baselinePosition const): >+ (WebCore::RenderFlexibleBox::marginBoxAscentForChild): >+ (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax): >+ * rendering/RenderGrid.cpp: >+ (WebCore::RenderGrid::gridGap const): >+ (WebCore::RenderGrid::baselinePosition const): >+ * rendering/RenderLayer.cpp: >+ (WebCore::RenderLayer::paintLayerByApplyingTransform): >+ * rendering/RenderListBox.cpp: >+ (WebCore::RenderListBox::paintItem): >+ (WebCore::RenderListBox::listIndexIsVisible): >+ * rendering/RenderMultiColumnSet.cpp: >+ (WebCore::RenderMultiColumnSet::calculateMaxColumnHeight const): >+ * rendering/RenderTable.cpp: >+ (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight): >+ * rendering/RenderTableCell.cpp: >+ (WebCore::RenderTableCell::cellBaselinePosition const): >+ * rendering/RenderTableSection.cpp: >+ (WebCore::RenderTableSection::firstLineBaseline const): >+ * rendering/RenderText.cpp: >+ (WebCore::RenderText::computePreferredLogicalWidths): >+ (WebCore::RenderText::previousOffset const): >+ (WebCore::RenderText::previousOffsetForBackwardDeletion const): >+ (WebCore::RenderText::nextOffset const): >+ (WebCore::RenderText::stringView const): >+ * rendering/RenderView.cpp: >+ (WebCore::RenderView::layout): >+ * rendering/mathml/RenderMathMLBlock.cpp: >+ (WebCore::RenderMathMLBlock::baselinePosition const): >+ * rendering/mathml/RenderMathMLBlock.h: >+ (WebCore::RenderMathMLBlock::ascentForChild): >+ * rendering/style/GridPosition.cpp: >+ (WebCore::GridPosition::max): >+ * rendering/style/TextUnderlineOffset.h: >+ (WebCore::TextUnderlineOffset::lengthOr const): >+ * rendering/svg/RenderSVGContainer.cpp: >+ (WebCore::RenderSVGContainer::nodeAtFloatPoint): >+ * rendering/svg/RenderSVGForeignObject.cpp: >+ (WebCore::RenderSVGForeignObject::nodeAtFloatPoint): >+ * rendering/svg/RenderSVGImage.cpp: >+ (WebCore::RenderSVGImage::nodeAtFloatPoint): >+ * rendering/svg/RenderSVGResourceClipper.cpp: >+ (WebCore::RenderSVGResourceClipper::hitTestClipContent): >+ * rendering/svg/RenderSVGResourceFilter.cpp: >+ (WebCore::RenderSVGResourceFilter::postApplyResource): >+ * rendering/svg/RenderSVGRoot.cpp: >+ (WebCore::RenderSVGRoot::nodeAtPoint): >+ * rendering/svg/RenderSVGShape.cpp: >+ (WebCore::RenderSVGShape::nodeAtFloatPoint): >+ * rendering/svg/RenderSVGText.cpp: >+ (WebCore::RenderSVGText::nodeAtFloatPoint): >+ * rendering/svg/SVGRenderingContext.cpp: >+ (WebCore::SVGRenderingContext::clipToImageBuffer): >+ * svg/SVGToOTFFontConversion.cpp: >+ (WebCore::SVGToOTFFontConverter::processGlyphElement): >+ (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): >+ > 2018-12-19 Michael Catanzaro <mcatanzaro@igalia.com> > > Unreviewed, fix GTK build after r239410 >diff --git a/Source/WebDriver/ChangeLog b/Source/WebDriver/ChangeLog >index 0f81c161a0773d9b5afb2d992c1364fe055a9885..27f525b7468fd369b736af18c74dd583efbba909 100644 >--- a/Source/WebDriver/ChangeLog >+++ b/Source/WebDriver/ChangeLog >@@ -1,3 +1,20 @@ >+2018-12-20 Chris Dumez <cdumez@apple.com> >+ >+ Use Optional::valueOr() instead of Optional::value_or() >+ https://bugs.webkit.org/show_bug.cgi?id=192933 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Session.cpp: >+ (WebDriver::Session::handleUnexpectedAlertOpen): >+ (WebDriver::Session::computeElementLayout): >+ (WebDriver::Session::selectOptionElement): >+ (WebDriver::builtAutomationCookie): >+ (WebDriver::Session::takeScreenshot): >+ * WebDriverService.cpp: >+ (WebDriver::WebDriverService::sendResponse const): >+ (WebDriver::WebDriverService::createSession): >+ > 2018-12-19 Chris Dumez <cdumez@apple.com> > > wtf/Optional.h: move-constructor and move-assignment operator should disengage the value being moved from >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 3f27a965cc6c3e2d2729bdf506e629e5267a8825..a03f54b8143ab7543d101dac4803cf819f60ab44 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,53 @@ >+2018-12-20 Chris Dumez <cdumez@apple.com> >+ >+ Use Optional::valueOr() instead of Optional::value_or() >+ https://bugs.webkit.org/show_bug.cgi?id=192933 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Shared/API/c/WKSecurityOriginRef.cpp: >+ (WKSecurityOriginGetPort): >+ * UIProcess/API/APIProcessPoolConfiguration.h: >+ * UIProcess/API/Cocoa/WKSecurityOrigin.mm: >+ (-[WKSecurityOrigin port]): >+ * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: >+ (-[WKWebViewConfiguration _cpuLimit]): >+ * UIProcess/API/glib/WebKitSecurityOrigin.cpp: >+ (webkit_security_origin_get_port): >+ * UIProcess/API/gtk/WebKitWebViewBase.cpp: >+ (webkitWebViewBaseHandleWheelEvent): >+ * UIProcess/Automation/SimulatedInputDispatcher.cpp: >+ (WebKit::SimulatedInputKeyFrame::maximumDuration const): >+ (WebKit::SimulatedInputDispatcher::transitionInputSourceToState): >+ * UIProcess/Automation/WebAutomationSession.cpp: >+ (WebKit::WebAutomationSession::setWindowFrameOfBrowsingContext): >+ (WebKit::WebAutomationSession::performInteractionSequence): >+ * UIProcess/Automation/WebAutomationSessionMacros.h: >+ * UIProcess/ServiceWorkerProcessProxy.cpp: >+ (WebKit::ServiceWorkerProcessProxy::start): >+ * UIProcess/WebAuthentication/AuthenticatorManager.cpp: >+ (WebKit::AuthenticatorManager::initTimeOutTimer): >+ * UIProcess/WebPageProxy.cpp: >+ (WebKit::WebPageProxy::deviceScaleFactor const): >+ * UIProcess/WebPageProxy.h: >+ (WebKit::WebPageProxy::viewportSizeForCSSViewportUnits const): >+ * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: >+ (WebKit::WebPopupMenuProxyGtk::activateItem): >+ * UIProcess/mac/LegacySessionStateCoding.cpp: >+ (WebKit::encodeFormDataElement): >+ * WebProcess/Network/WebLoaderStrategy.cpp: >+ (WebKit::WebLoaderStrategy::scheduleLoad): >+ * WebProcess/Plugins/PDF/PDFPlugin.mm: >+ (WebKit::PDFPlugin::convertFromPDFViewToRootView const): >+ (WebKit::PDFPlugin::boundsOnScreen const): >+ (WebKit::PDFPlugin::geometryDidChange): >+ * WebProcess/WebCoreSupport/SessionStateConversion.cpp: >+ (WebKit::toFormData): >+ * WebProcess/WebPage/ios/WebPageIOS.mm: >+ (WebKit::WebPage::updateVisibleContentRects): >+ * WebProcess/WebPage/wpe/CompositingManager.cpp: >+ (WebKit::CompositingManager::releaseConnectionFd): >+ > 2018-12-19 Chris Dumez <cdumez@apple.com> > > wtf/Optional.h: move-constructor and move-assignment operator should disengage the value being moved from >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index eb1d1100885843d02f4461b82175c51260da5a98..6f50b277dd3877fe5b2679b9aece9baa085a6ba5 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,13 @@ >+2018-12-20 Chris Dumez <cdumez@apple.com> >+ >+ Use Optional::valueOr() instead of Optional::value_or() >+ https://bugs.webkit.org/show_bug.cgi?id=192933 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebCoreSupport/WebSecurityOrigin.mm: >+ (-[WebSecurityOrigin port]): >+ > 2018-12-19 Chris Dumez <cdumez@apple.com> > > wtf/Optional.h: move-constructor and move-assignment operator should disengage the value being moved from >diff --git a/Source/WebKitLegacy/win/ChangeLog b/Source/WebKitLegacy/win/ChangeLog >index f6c126b72137339727b26f339f098b273fbefcd7..5b6a299355fe746dc457816555c320b89d6b1a26 100644 >--- a/Source/WebKitLegacy/win/ChangeLog >+++ b/Source/WebKitLegacy/win/ChangeLog >@@ -1,3 +1,13 @@ >+2018-12-20 Chris Dumez <cdumez@apple.com> >+ >+ Use Optional::valueOr() instead of Optional::value_or() >+ https://bugs.webkit.org/show_bug.cgi?id=192933 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebSecurityOrigin.cpp: >+ (WebSecurityOrigin::port): >+ > 2018-12-19 Chris Dumez <cdumez@apple.com> > > wtf/Optional.h: move-constructor and move-assignment operator should disengage the value being moved from >diff --git a/Source/JavaScriptCore/inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm b/Source/JavaScriptCore/inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm >index 87215c33ae5923c15a5cd4de6f2c389fb22b1548..2fafa1211bcfdd47c1f60401a6a33336d3ac8c37 100644 >--- a/Source/JavaScriptCore/inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm >+++ b/Source/JavaScriptCore/inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm >@@ -159,7 +159,7 @@ bool RemoteConnectionToTarget::setup(bool isAutomaticInspection, bool automatica > if (!m_target) > return false; > >- unsigned targetIdentifier = this->targetIdentifier().value_or(0); >+ unsigned targetIdentifier = this->targetIdentifier().valueOr(0); > > ref(); > dispatchAsyncOnTarget(^{ >diff --git a/Source/JavaScriptCore/inspector/remote/glib/RemoteConnectionToTargetGlib.cpp b/Source/JavaScriptCore/inspector/remote/glib/RemoteConnectionToTargetGlib.cpp >index 3b5c681555a0bfff203f697e498522820ad9fe5d..5dde88809b2541f332a205dec0addf5ee503cc42 100644 >--- a/Source/JavaScriptCore/inspector/remote/glib/RemoteConnectionToTargetGlib.cpp >+++ b/Source/JavaScriptCore/inspector/remote/glib/RemoteConnectionToTargetGlib.cpp >@@ -49,7 +49,7 @@ bool RemoteConnectionToTarget::setup(bool isAutomaticInspection, bool automatica > if (!m_target) > return false; > >- unsigned targetIdentifier = this->targetIdentifier().value_or(0); >+ unsigned targetIdentifier = this->targetIdentifier().valueOr(0); > > if (!m_target || !m_target->remoteControlAllowed()) { > RemoteInspector::singleton().setupFailed(targetIdentifier); >diff --git a/Source/JavaScriptCore/parser/SourceCodeKey.h b/Source/JavaScriptCore/parser/SourceCodeKey.h >index 2b03aa50287305032e1b2e4a0d0658699b5752b5..a8e603c26a0b60362a02deac0516169d57558021 100644 >--- a/Source/JavaScriptCore/parser/SourceCodeKey.h >+++ b/Source/JavaScriptCore/parser/SourceCodeKey.h >@@ -82,7 +82,7 @@ public: > : m_sourceCode(sourceCode) > , m_name(name) > , m_flags(codeType, strictMode, scriptMode, derivedContextType, evalContextType, isArrowFunctionContext, debuggerMode, typeProfilerEnabled, controlFlowProfilerEnabled) >- , m_functionConstructorParametersEndPosition(functionConstructorParametersEndPosition.value_or(-1)) >+ , m_functionConstructorParametersEndPosition(functionConstructorParametersEndPosition.valueOr(-1)) > , m_hash(sourceCode.hash() ^ m_flags.bits()) > { > } >diff --git a/Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp b/Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp >index c5708bcba4a58a0803f6429c2f7583c9db27257c..2dc0ae71fae37d2fb1a2516ae6bccb9bf079734e 100644 >--- a/Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp >+++ b/Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp >@@ -412,7 +412,7 @@ void WebAssemblyModuleRecord::link(ExecState* exec, JSValue, JSObject* importObj > > bool hasStart = !!moduleInformation.startFunctionIndexSpace; > if (hasStart) { >- auto startFunctionIndexSpace = moduleInformation.startFunctionIndexSpace.value_or(0); >+ auto startFunctionIndexSpace = moduleInformation.startFunctionIndexSpace.valueOr(0); > Wasm::SignatureIndex signatureIndex = module->signatureIndexFromFunctionIndexSpace(startFunctionIndexSpace); > const Wasm::Signature& signature = Wasm::SignatureInformation::get(signatureIndex); > // The start function must not take any arguments or return anything. This is enforced by the parser. >diff --git a/Source/WTF/wtf/Optional.h b/Source/WTF/wtf/Optional.h >index a605be01946a0ec9b0f5219fb0f0d0652f03fbba..6d4e2426b745d927b5b4e66dd55ba3c68dbd4786 100644 >--- a/Source/WTF/wtf/Optional.h >+++ b/Source/WTF/wtf/Optional.h >@@ -557,26 +557,12 @@ public: > return *this ? **this : detail_::convert<T>(detail_::constexpr_forward<V>(v)); > } > >- // FIXME: Remove this. >- template <class V> >- constexpr T value_or(V&& v) const& >- { >- return *this ? **this : detail_::convert<T>(detail_::constexpr_forward<V>(v)); >- } >- > template <class V> > OPTIONAL_MUTABLE_CONSTEXPR T valueOr(V&& v) && > { > return *this ? detail_::constexpr_move(const_cast<Optional<T>&>(*this).contained_val()) : detail_::convert<T>(detail_::constexpr_forward<V>(v)); > } > >- // FIXME: Remove this. >- template <class V> >- OPTIONAL_MUTABLE_CONSTEXPR T value_or(V&& v) && >- { >- return *this ? detail_::constexpr_move(const_cast<Optional<T>&>(*this).contained_val()) : detail_::convert<T>(detail_::constexpr_forward<V>(v)); >- } >- > # else > > template <class V> >@@ -585,13 +571,6 @@ public: > return *this ? **this : detail_::convert<T>(detail_::constexpr_forward<V>(v)); > } > >- // FIXME: Remove this. >- template <class V> >- constexpr T value_or(V&& v) const >- { >- return *this ? **this : detail_::convert<T>(detail_::constexpr_forward<V>(v)); >- } >- > # endif > > // 20.6.3.6, modifiers >@@ -699,7 +678,7 @@ public: > } > > template <class V> >- constexpr typename std::decay<T>::type value_or(V&& v) const >+ constexpr typename std::decay<T>::type valueOr(V&& v) const > { > return *this ? **this : detail_::convert<typename std::decay<T>::type>(detail_::constexpr_forward<V>(v)); > } >diff --git a/Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp b/Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp >index 156d08602c44d93b55efc5feaa7e492c64098f1a..ea44d5f8e14987467d6f2e912847bc185ed70042 100644 >--- a/Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp >+++ b/Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp >@@ -547,7 +547,7 @@ void ApplePayPaymentHandler::validateMerchant(URL&& validationURL) > > static Ref<PaymentAddress> convert(const ApplePayPaymentContact& contact) > { >- return PaymentAddress::create(contact.countryCode, contact.addressLines.value_or(Vector<String>()), contact.administrativeArea, contact.locality, contact.subLocality, contact.postalCode, String(), String(), contact.localizedName, contact.phoneNumber); >+ return PaymentAddress::create(contact.countryCode, contact.addressLines.valueOr(Vector<String>()), contact.administrativeArea, contact.locality, contact.subLocality, contact.postalCode, String(), String(), contact.localizedName, contact.phoneNumber); > } > > template<typename T> >@@ -562,7 +562,7 @@ void ApplePayPaymentHandler::didAuthorizePayment(const Payment& payment) > ASSERT(!m_isUpdating); > > auto applePayPayment = payment.toApplePayPayment(version()); >- auto shippingContact = applePayPayment.shippingContact.value_or(ApplePayPaymentContact()); >+ auto shippingContact = applePayPayment.shippingContact.valueOr(ApplePayPaymentContact()); > auto detailsFunction = [applePayPayment = WTFMove(applePayPayment)](JSC::ExecState& execState) { > return toJSDictionary(execState, applePayPayment); > }; >diff --git a/Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp b/Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp >index 392a37c636a8563a865800605fb09b2908df552a..4bea9a0084bee6873298dd34bea37a04eaa69fda 100644 >--- a/Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp >+++ b/Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp >@@ -342,7 +342,7 @@ void MediaKeySession::load(const String& sessionId, Ref<DeferredPromise>&& promi > > // 8.9.5. Run the Update Expiration algorithm on the session, providing expiration time. > // This must be run, and NaN is the default value if the CDM instance doesn't provide one. >- updateExpiration(expiration.value_or(std::numeric_limits<double>::quiet_NaN())); >+ updateExpiration(expiration.valueOr(std::numeric_limits<double>::quiet_NaN())); > > // 8.9.6. If message is not null, run the Queue a "message" Event algorithm on the session, providing message type and message. > if (message) >diff --git a/Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.h b/Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.h >index f42a9f9d8014d871d73eb9588190cc0bbb8b7c13..e6eb4bf071b1f64bbdd6adaf11f5df47b6e0b586 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.h >+++ b/Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.h >@@ -62,7 +62,7 @@ public: > unsigned mainFrameProtocolHash = StringHash::hash(m_mainFrameOrigin.protocol); > unsigned mainFrameHostHash = StringHash::hash(m_mainFrameOrigin.host); > >- unsigned hashCodes[8] = { nameHash, sessionIDHash, openingProtocolHash, openingHostHash, m_openingOrigin.port.value_or(0), mainFrameProtocolHash, mainFrameHostHash, m_mainFrameOrigin.port.value_or(0) }; >+ unsigned hashCodes[8] = { nameHash, sessionIDHash, openingProtocolHash, openingHostHash, m_openingOrigin.port.valueOr(0), mainFrameProtocolHash, mainFrameHostHash, m_mainFrameOrigin.port.valueOr(0) }; > return StringHasher::hashMemory<sizeof(hashCodes)>(hashCodes); > } > >diff --git a/Source/WebCore/Modules/indexeddb/IDBFactory.cpp b/Source/WebCore/Modules/indexeddb/IDBFactory.cpp >index 974c53479a933776ae1ff9b5afcbac71c308fafe..ea1f84976478c28747d767e5b4c7cc6b5121f037 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBFactory.cpp >+++ b/Source/WebCore/Modules/indexeddb/IDBFactory.cpp >@@ -79,7 +79,7 @@ ExceptionOr<Ref<IDBOpenDBRequest>> IDBFactory::open(ScriptExecutionContext& cont > if (version && !version.value()) > return Exception { TypeError, "IDBFactory.open() called with a version of 0"_s }; > >- return openInternal(context, name, version.value_or(0)); >+ return openInternal(context, name, version.valueOr(0)); > } > > ExceptionOr<Ref<IDBOpenDBRequest>> IDBFactory::openInternal(ScriptExecutionContext& context, const String& name, uint64_t version) >diff --git a/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp b/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp >index b5937c729444e091e6f7727029936834b608cf16..6a7f146ca1c4d7e515a154851df9bd37a053d183 100644 >--- a/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp >+++ b/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp >@@ -340,7 +340,7 @@ void MediaStreamTrack::applyConstraints(const Optional<MediaTrackConstraints>& c > if (!weakThis || !weakThis->m_promise) > return; > weakThis->m_promise->resolve(); >- weakThis->m_constraints = constraints.value_or(MediaTrackConstraints { }); >+ weakThis->m_constraints = constraints.valueOr(MediaTrackConstraints { }); > }; > m_private->applyConstraints(createMediaConstraints(constraints), WTFMove(successHandler), WTFMove(failureHandler)); > } >diff --git a/Source/WebCore/Modules/mediastream/RTCDTMFSender.cpp b/Source/WebCore/Modules/mediastream/RTCDTMFSender.cpp >index 3f26e65e5872cbcad9bd2830694c97df8b36fa54..53ddc12a2397a0d162831578b34d1a7218037669 100644 >--- a/Source/WebCore/Modules/mediastream/RTCDTMFSender.cpp >+++ b/Source/WebCore/Modules/mediastream/RTCDTMFSender.cpp >@@ -79,8 +79,8 @@ ExceptionOr<void> RTCDTMFSender::insertDTMF(const String&, Optional<int> duratio > if (interToneGap && interToneGap.value() < minInterToneGapMs) > return Exception { SyntaxError }; > >- m_duration = duration.value_or(defaultToneDurationMs); >- m_interToneGap = interToneGap.value_or(defaultInterToneGapMs); >+ m_duration = duration.valueOr(defaultToneDurationMs); >+ m_interToneGap = interToneGap.valueOr(defaultInterToneGapMs); > > return Exception { SyntaxError }; > } >diff --git a/Source/WebCore/Modules/webdatabase/SQLTransaction.cpp b/Source/WebCore/Modules/webdatabase/SQLTransaction.cpp >index 197798067dbbd8d4d97dfc85eb1650d523c837ec..5091c8341adcd91aa020197a4a9c846b2edacb6d 100644 >--- a/Source/WebCore/Modules/webdatabase/SQLTransaction.cpp >+++ b/Source/WebCore/Modules/webdatabase/SQLTransaction.cpp >@@ -81,7 +81,7 @@ ExceptionOr<void> SQLTransaction::executeSql(const String& sqlStatement, Optiona > else if (m_readOnly) > permissions |= DatabaseAuthorizer::ReadOnlyMask; > >- auto statement = std::make_unique<SQLStatement>(m_database, sqlStatement, arguments.value_or(Vector<SQLValue> { }), WTFMove(callback), WTFMove(callbackError), permissions); >+ auto statement = std::make_unique<SQLStatement>(m_database, sqlStatement, arguments.valueOr(Vector<SQLValue> { }), WTFMove(callback), WTFMove(callbackError), permissions); > > if (m_database->deleted()) > statement->setDatabaseDeletedError(); >diff --git a/Source/WebCore/Modules/webvr/VRFrameData.cpp b/Source/WebCore/Modules/webvr/VRFrameData.cpp >index b215b55fc6c031b07d69c72d5fa0d9e5eba71c0c..a7c7db9d63007f1b043ffa37bc578cfb74ad3b2d 100644 >--- a/Source/WebCore/Modules/webvr/VRFrameData.cpp >+++ b/Source/WebCore/Modules/webvr/VRFrameData.cpp >@@ -128,8 +128,8 @@ void VRFrameData::update(const VRPlatformTrackingInfo& trackingInfo, const VREye > m_timestamp = trackingInfo.timestamp; > m_pose->update(trackingInfo); > >- auto rotationMatrix = rotationMatrixFromQuaternion(trackingInfo.orientation.value_or(VRPlatformTrackingInfo::Quaternion(0, 0, 0, 1))); >- FloatPoint3D position = trackingInfo.position.value_or(FloatPoint3D(0, 0, 0)); >+ auto rotationMatrix = rotationMatrixFromQuaternion(trackingInfo.orientation.valueOr(VRPlatformTrackingInfo::Quaternion(0, 0, 0, 1))); >+ FloatPoint3D position = trackingInfo.position.valueOr(FloatPoint3D(0, 0, 0)); > rotationMatrix.translate3d(-position.x(), -position.y(), -position.z()); > > m_leftViewMatrix = rotationMatrix; >diff --git a/Source/WebCore/animation/AnimationTimeline.cpp b/Source/WebCore/animation/AnimationTimeline.cpp >index fcba25cbec5f01e5d7c4c0bdcd527de92a6469ad..625d4f0f5740599f42cbfca32f70343879f90ef6 100644 >--- a/Source/WebCore/animation/AnimationTimeline.cpp >+++ b/Source/WebCore/animation/AnimationTimeline.cpp >@@ -460,7 +460,7 @@ void AnimationTimeline::updateCSSTransitionsForElement(Element& element, const R > auto& reversingAdjustedStartStyle = previouslyRunningTransition->targetStyle(); > double transformedProgress = 1; > if (auto* effect = previouslyRunningTransition->effect()) >- transformedProgress = effect->iterationProgress().value_or(transformedProgress); >+ transformedProgress = effect->iterationProgress().valueOr(transformedProgress); > auto reversingShorteningFactor = std::max(std::min(((transformedProgress * previouslyRunningTransition->reversingShorteningFactor()) + (1 - previouslyRunningTransition->reversingShorteningFactor())), 1.0), 0.0); > auto delay = matchingBackingAnimation->delay() < 0 ? Seconds(matchingBackingAnimation->delay()) * reversingShorteningFactor : Seconds(matchingBackingAnimation->delay()); > auto duration = Seconds(matchingBackingAnimation->duration()) * reversingShorteningFactor; >diff --git a/Source/WebCore/animation/DeclarativeAnimation.cpp b/Source/WebCore/animation/DeclarativeAnimation.cpp >index 0c20c5287cb53a20e90a3a8b322e4d21226e7e88..76c83b42e4289673daa9400db49ce48602611de3 100644 >--- a/Source/WebCore/animation/DeclarativeAnimation.cpp >+++ b/Source/WebCore/animation/DeclarativeAnimation.cpp >@@ -199,7 +199,7 @@ void DeclarativeAnimation::cancel() > { > auto cancelationTime = 0_s; > if (auto animationEffect = effect()) >- cancelationTime = animationEffect->activeTime().value_or(0_s); >+ cancelationTime = animationEffect->activeTime().valueOr(0_s); > > WebAnimation::cancel(); > >@@ -236,7 +236,7 @@ void DeclarativeAnimation::invalidateDOMEvents(Seconds elapsedTime) > if (isPending && m_wasPending) > return; > >- auto iteration = animationEffect ? animationEffect->currentIteration().value_or(0) : 0; >+ auto iteration = animationEffect ? animationEffect->currentIteration().valueOr(0) : 0; > auto currentPhase = animationEffect ? animationEffect->phase() : phaseWithoutEffect(); > > bool wasActive = m_previousPhase == AnimationEffect::Phase::Active; >diff --git a/Source/WebCore/animation/KeyframeEffect.cpp b/Source/WebCore/animation/KeyframeEffect.cpp >index 1e6462d3b8a29db1979bbcc5d563d2c176eb0c88..13dbcd0fd133979c92351cfb0460d98211a730c3 100644 >--- a/Source/WebCore/animation/KeyframeEffect.cpp >+++ b/Source/WebCore/animation/KeyframeEffect.cpp >@@ -116,7 +116,7 @@ static inline void computeMissingKeyframeOffsets(Vector<KeyframeEffect::ParsedKe > // that a keyframe hasn't had a computed offset by checking if it has a null offset and a 0 computedOffset, since the first > // keyframe will already have a 0 computedOffset. > for (auto& keyframe : keyframes) >- keyframe.computedOffset = keyframe.offset.value_or(0); >+ keyframe.computedOffset = keyframe.offset.valueOr(0); > > // 2. If keyframes contains more than one keyframe and the computed keyframe offset of the first keyframe in keyframes is null, > // set the computed keyframe offset of the first keyframe to 0. >@@ -1314,7 +1314,7 @@ void KeyframeEffect::applyPendingAcceleratedActions() > auto* compositedRenderer = downcast<RenderBoxModelObject>(renderer); > > // To simplify the code we use a default of 0s for an unresolved current time since for a Stop action that is acceptable. >- auto timeOffset = animation()->currentTime().value_or(0_s).seconds() - delay().seconds(); >+ auto timeOffset = animation()->currentTime().valueOr(0_s).seconds() - delay().seconds(); > > for (const auto& action : pendingAcceleratedActions) { > switch (action) { >diff --git a/Source/WebCore/animation/WebAnimation.cpp b/Source/WebCore/animation/WebAnimation.cpp >index 67e9812df41d11a7f2ba3438ef5f7e800db1b2cb..338cca3da3ccca4cf8456953c468bba64898bd48 100644 >--- a/Source/WebCore/animation/WebAnimation.cpp >+++ b/Source/WebCore/animation/WebAnimation.cpp >@@ -917,7 +917,7 @@ void WebAnimation::runPendingPlayTask() > // Subsequently, the resulting readyTime value can be null. Unify behavior between C++17 and > // C++14 builds (the latter using WTF's Optional) and avoid null Optional dereferencing > // by defaulting to a Seconds(0) value. See https://bugs.webkit.org/show_bug.cgi?id=186189. >- auto newStartTime = readyTime.value_or(0_s); >+ auto newStartTime = readyTime.valueOr(0_s); > if (m_playbackRate) > newStartTime -= m_holdTime.value() / m_playbackRate; > // 3. Set the start time of animation to new start time. >@@ -928,7 +928,7 @@ void WebAnimation::runPendingPlayTask() > } else if (m_startTime && m_pendingPlaybackRate) { > // If animation's start time is resolved and animation has a pending playback rate, > // 1. Let current time to match be the result of evaluating (ready time - start time) à playback rate for animation. >- auto currentTimeToMatch = (readyTime.value_or(0_s) - m_startTime.value()) * m_playbackRate; >+ auto currentTimeToMatch = (readyTime.valueOr(0_s) - m_startTime.value()) * m_playbackRate; > // 2. Apply any pending playback rate on animation. > applyPendingPlaybackRate(); > // 3. If animation's playback rate is zero, let animation's hold time be current time to match. >@@ -936,7 +936,7 @@ void WebAnimation::runPendingPlayTask() > m_holdTime = currentTimeToMatch; > // 4. Let new start time be the result of evaluating ready time - current time to match / playback rate for animation. > // If the playback rate is zero, let new start time be simply ready time. >- auto newStartTime = readyTime.value_or(0_s); >+ auto newStartTime = readyTime.valueOr(0_s); > if (m_playbackRate) > newStartTime -= currentTimeToMatch / m_playbackRate; > // 5. Set the start time of animation to new start time. >@@ -1059,7 +1059,7 @@ void WebAnimation::runPendingPauseTask() > // Subsequently, the resulting readyTime value can be null. Unify behavior between C++17 and > // C++14 builds (the latter using WTF's Optional) and avoid null Optional dereferencing > // by defaulting to a Seconds(0) value. See https://bugs.webkit.org/show_bug.cgi?id=186189. >- m_holdTime = (readyTime.value_or(0_s) - animationStartTime.value()) * m_playbackRate; >+ m_holdTime = (readyTime.valueOr(0_s) - animationStartTime.value()) * m_playbackRate; > } > > // 3. Apply any pending playback rate on animation. >diff --git a/Source/WebCore/bindings/js/SerializedScriptValue.cpp b/Source/WebCore/bindings/js/SerializedScriptValue.cpp >index 99981085b5505c745c975a6d97abc58ceae1c5f9..72ff7ca5c94b502af37196722b8dc33159495c2f 100644 >--- a/Source/WebCore/bindings/js/SerializedScriptValue.cpp >+++ b/Source/WebCore/bindings/js/SerializedScriptValue.cpp >@@ -1262,7 +1262,7 @@ private: > write(file.url()); > write(file.type()); > write(file.name()); >- write(static_cast<double>(file.lastModifiedOverride().value_or(-1))); >+ write(static_cast<double>(file.lastModifiedOverride().valueOr(-1))); > } > > #if ENABLE(WEB_CRYPTO) >diff --git a/Source/WebCore/crypto/algorithms/CryptoAlgorithmHMAC.cpp b/Source/WebCore/crypto/algorithms/CryptoAlgorithmHMAC.cpp >index 02b21711e7fbe4bff24ad28160e35316a6fd71f2..4bfb4efb8e057ab6d97da211cb8c7a997b9649cd 100644 >--- a/Source/WebCore/crypto/algorithms/CryptoAlgorithmHMAC.cpp >+++ b/Source/WebCore/crypto/algorithms/CryptoAlgorithmHMAC.cpp >@@ -87,7 +87,7 @@ void CryptoAlgorithmHMAC::generateKey(const CryptoAlgorithmParameters& parameter > return; > } > >- auto result = CryptoKeyHMAC::generate(hmacParameters.length.value_or(0), hmacParameters.hashIdentifier, extractable, usages); >+ auto result = CryptoKeyHMAC::generate(hmacParameters.length.valueOr(0), hmacParameters.hashIdentifier, extractable, usages); > if (!result) { > exceptionCallback(OperationError); > return; >@@ -110,7 +110,7 @@ void CryptoAlgorithmHMAC::importKey(CryptoKeyFormat format, KeyData&& data, cons > RefPtr<CryptoKeyHMAC> result; > switch (format) { > case CryptoKeyFormat::Raw: >- result = CryptoKeyHMAC::importRaw(hmacParameters.length.value_or(0), hmacParameters.hashIdentifier, WTFMove(WTF::get<Vector<uint8_t>>(data)), extractable, usages); >+ result = CryptoKeyHMAC::importRaw(hmacParameters.length.valueOr(0), hmacParameters.hashIdentifier, WTFMove(WTF::get<Vector<uint8_t>>(data)), extractable, usages); > break; > case CryptoKeyFormat::Jwk: { > auto checkAlgCallback = [](CryptoAlgorithmIdentifier hash, const String& alg) -> bool { >@@ -130,7 +130,7 @@ void CryptoAlgorithmHMAC::importKey(CryptoKeyFormat format, KeyData&& data, cons > } > return false; > }; >- result = CryptoKeyHMAC::importJwk(hmacParameters.length.value_or(0), hmacParameters.hashIdentifier, WTFMove(WTF::get<JsonWebKey>(data)), extractable, usages, WTFMove(checkAlgCallback)); >+ result = CryptoKeyHMAC::importJwk(hmacParameters.length.valueOr(0), hmacParameters.hashIdentifier, WTFMove(WTF::get<JsonWebKey>(data)), extractable, usages, WTFMove(checkAlgCallback)); > break; > } > default: >diff --git a/Source/WebCore/crypto/gcrypt/CryptoAlgorithmAES_GCMGCrypt.cpp b/Source/WebCore/crypto/gcrypt/CryptoAlgorithmAES_GCMGCrypt.cpp >index 3ccc1e6dc508650f26755aa07dad16fa856efd2a..ffbc93c91e95bc09a0dce57ad7de5159a46e6dc9 100644 >--- a/Source/WebCore/crypto/gcrypt/CryptoAlgorithmAES_GCMGCrypt.cpp >+++ b/Source/WebCore/crypto/gcrypt/CryptoAlgorithmAES_GCMGCrypt.cpp >@@ -181,7 +181,7 @@ static Optional<Vector<uint8_t>> gcryptDecrypt(const Vector<uint8_t>& key, const > > ExceptionOr<Vector<uint8_t>> CryptoAlgorithmAES_GCM::platformEncrypt(const CryptoAlgorithmAesGcmParams& parameters, const CryptoKeyAES& key, const Vector<uint8_t>& plainText) > { >- auto output = gcryptEncrypt(key.key(), parameters.ivVector(), plainText, parameters.additionalDataVector(), parameters.tagLength.value_or(0) / 8); >+ auto output = gcryptEncrypt(key.key(), parameters.ivVector(), plainText, parameters.additionalDataVector(), parameters.tagLength.valueOr(0) / 8); > if (!output) > return Exception { OperationError }; > return WTFMove(*output); >@@ -189,7 +189,7 @@ ExceptionOr<Vector<uint8_t>> CryptoAlgorithmAES_GCM::platformEncrypt(const Crypt > > ExceptionOr<Vector<uint8_t>> CryptoAlgorithmAES_GCM::platformDecrypt(const CryptoAlgorithmAesGcmParams& parameters, const CryptoKeyAES& key, const Vector<uint8_t>& cipherText) > { >- auto output = gcryptDecrypt(key.key(), parameters.ivVector(), cipherText, parameters.additionalDataVector(), parameters.tagLength.value_or(0) / 8); >+ auto output = gcryptDecrypt(key.key(), parameters.ivVector(), cipherText, parameters.additionalDataVector(), parameters.tagLength.valueOr(0) / 8); > if (!output) > return Exception { OperationError }; > return WTFMove(*output); >diff --git a/Source/WebCore/crypto/gcrypt/CryptoKeyRSAGCrypt.cpp b/Source/WebCore/crypto/gcrypt/CryptoKeyRSAGCrypt.cpp >index c642ca68f3fefe1655f79b4ba584ec3077c5fb26..dfc5ba4d9be0dfe9da2254fe285583351d925400 100644 >--- a/Source/WebCore/crypto/gcrypt/CryptoKeyRSAGCrypt.cpp >+++ b/Source/WebCore/crypto/gcrypt/CryptoKeyRSAGCrypt.cpp >@@ -313,7 +313,7 @@ RefPtr<CryptoKeyRSA> CryptoKeyRSA::importSpki(CryptoAlgorithmIdentifier identifi > } > } > >- return adoptRef(new CryptoKeyRSA(identifier, hash.value_or(CryptoAlgorithmIdentifier::SHA_1), !!hash, CryptoKeyType::Public, platformKey.release(), extractable, usages)); >+ return adoptRef(new CryptoKeyRSA(identifier, hash.valueOr(CryptoAlgorithmIdentifier::SHA_1), !!hash, CryptoKeyType::Public, platformKey.release(), extractable, usages)); > } > > RefPtr<CryptoKeyRSA> CryptoKeyRSA::importPkcs8(CryptoAlgorithmIdentifier identifier, Optional<CryptoAlgorithmIdentifier> hash, Vector<uint8_t>&& keyData, bool extractable, CryptoKeyUsageBitmap usages) >@@ -408,7 +408,7 @@ RefPtr<CryptoKeyRSA> CryptoKeyRSA::importPkcs8(CryptoAlgorithmIdentifier identif > } > } > >- return adoptRef(new CryptoKeyRSA(identifier, hash.value_or(CryptoAlgorithmIdentifier::SHA_1), !!hash, CryptoKeyType::Private, platformKey.release(), extractable, usages)); >+ return adoptRef(new CryptoKeyRSA(identifier, hash.valueOr(CryptoAlgorithmIdentifier::SHA_1), !!hash, CryptoKeyType::Private, platformKey.release(), extractable, usages)); > } > > ExceptionOr<Vector<uint8_t>> CryptoKeyRSA::exportSpki() const >diff --git a/Source/WebCore/crypto/keys/CryptoKeyRSA.cpp b/Source/WebCore/crypto/keys/CryptoKeyRSA.cpp >index 73de51aeb214e164e17fd50af80f438dfb39bbfa..ec06773c449a744776ff6372bfa314ab2cb70cb6 100644 >--- a/Source/WebCore/crypto/keys/CryptoKeyRSA.cpp >+++ b/Source/WebCore/crypto/keys/CryptoKeyRSA.cpp >@@ -58,7 +58,7 @@ RefPtr<CryptoKeyRSA> CryptoKeyRSA::importJwk(CryptoAlgorithmIdentifier algorithm > // import public key > auto publicKeyComponents = CryptoKeyRSAComponents::createPublic(WTFMove(modulus), WTFMove(exponent)); > // Notice: CryptoAlgorithmIdentifier::SHA_1 is just a placeholder. It should not have any effect if hash is WTF::nullopt. >- return CryptoKeyRSA::create(algorithm, hash.value_or(CryptoAlgorithmIdentifier::SHA_1), !!hash, *publicKeyComponents, extractable, usages); >+ return CryptoKeyRSA::create(algorithm, hash.valueOr(CryptoAlgorithmIdentifier::SHA_1), !!hash, *publicKeyComponents, extractable, usages); > } > > // import private key >@@ -68,7 +68,7 @@ RefPtr<CryptoKeyRSA> CryptoKeyRSA::importJwk(CryptoAlgorithmIdentifier algorithm > if (keyData.p.isNull() && keyData.q.isNull() && keyData.dp.isNull() && keyData.dp.isNull() && keyData.qi.isNull()) { > auto privateKeyComponents = CryptoKeyRSAComponents::createPrivate(WTFMove(modulus), WTFMove(exponent), WTFMove(privateExponent)); > // Notice: CryptoAlgorithmIdentifier::SHA_1 is just a placeholder. It should not have any effect if hash is WTF::nullopt. >- return CryptoKeyRSA::create(algorithm, hash.value_or(CryptoAlgorithmIdentifier::SHA_1), !!hash, *privateKeyComponents, extractable, usages); >+ return CryptoKeyRSA::create(algorithm, hash.valueOr(CryptoAlgorithmIdentifier::SHA_1), !!hash, *privateKeyComponents, extractable, usages); > } > > if (keyData.p.isNull() || keyData.q.isNull() || keyData.dp.isNull() || keyData.dq.isNull() || keyData.qi.isNull()) >@@ -88,7 +88,7 @@ RefPtr<CryptoKeyRSA> CryptoKeyRSA::importJwk(CryptoAlgorithmIdentifier algorithm > if (!keyData.oth) { > auto privateKeyComponents = CryptoKeyRSAComponents::createPrivateWithAdditionalData(WTFMove(modulus), WTFMove(exponent), WTFMove(privateExponent), WTFMove(firstPrimeInfo), WTFMove(secondPrimeInfo), { }); > // Notice: CryptoAlgorithmIdentifier::SHA_1 is just a placeholder. It should not have any effect if hash is WTF::nullopt. >- return CryptoKeyRSA::create(algorithm, hash.value_or(CryptoAlgorithmIdentifier::SHA_1), !!hash, *privateKeyComponents, extractable, usages); >+ return CryptoKeyRSA::create(algorithm, hash.valueOr(CryptoAlgorithmIdentifier::SHA_1), !!hash, *privateKeyComponents, extractable, usages); > } > > Vector<CryptoKeyRSAComponents::PrimeInfo> otherPrimeInfos; >@@ -105,7 +105,7 @@ RefPtr<CryptoKeyRSA> CryptoKeyRSA::importJwk(CryptoAlgorithmIdentifier algorithm > > auto privateKeyComponents = CryptoKeyRSAComponents::createPrivateWithAdditionalData(WTFMove(modulus), WTFMove(exponent), WTFMove(privateExponent), WTFMove(firstPrimeInfo), WTFMove(secondPrimeInfo), WTFMove(otherPrimeInfos)); > // Notice: CryptoAlgorithmIdentifier::SHA_1 is just a placeholder. It should not have any effect if hash is WTF::nullopt. >- return CryptoKeyRSA::create(algorithm, hash.value_or(CryptoAlgorithmIdentifier::SHA_1), !!hash, *privateKeyComponents, extractable, usages); >+ return CryptoKeyRSA::create(algorithm, hash.valueOr(CryptoAlgorithmIdentifier::SHA_1), !!hash, *privateKeyComponents, extractable, usages); > } > > JsonWebKey CryptoKeyRSA::exportJwk() const >diff --git a/Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp b/Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp >index e268ff5eec97737b779c4eb1c1ad30ddb996d997..923441518e7b99a7a87cb8317052c78540e0abe4 100644 >--- a/Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp >+++ b/Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp >@@ -72,12 +72,12 @@ static ExceptionOr<Vector<uint8_t>> decyptAES_GCM(const Vector<uint8_t>& iv, con > > ExceptionOr<Vector<uint8_t>> CryptoAlgorithmAES_GCM::platformEncrypt(const CryptoAlgorithmAesGcmParams& parameters, const CryptoKeyAES& key, const Vector<uint8_t>& plainText) > { >- return encryptAES_GCM(parameters.ivVector(), key.key(), plainText, parameters.additionalDataVector(), parameters.tagLength.value_or(0) / 8); >+ return encryptAES_GCM(parameters.ivVector(), key.key(), plainText, parameters.additionalDataVector(), parameters.tagLength.valueOr(0) / 8); > } > > ExceptionOr<Vector<uint8_t>> CryptoAlgorithmAES_GCM::platformDecrypt(const CryptoAlgorithmAesGcmParams& parameters, const CryptoKeyAES& key, const Vector<uint8_t>& cipherText) > { >- return decyptAES_GCM(parameters.ivVector(), key.key(), cipherText, parameters.additionalDataVector(), parameters.tagLength.value_or(0) / 8); >+ return decyptAES_GCM(parameters.ivVector(), key.key(), cipherText, parameters.additionalDataVector(), parameters.tagLength.valueOr(0) / 8); > } > > } // namespace WebCore >diff --git a/Source/WebCore/crypto/mac/CryptoKeyRSAMac.cpp b/Source/WebCore/crypto/mac/CryptoKeyRSAMac.cpp >index 3aa701d314723717485429ee4788bbbf9c3d0274..11a7c916b612fd6339bde37b22cce259ab6a9704 100644 >--- a/Source/WebCore/crypto/mac/CryptoKeyRSAMac.cpp >+++ b/Source/WebCore/crypto/mac/CryptoKeyRSAMac.cpp >@@ -363,7 +363,7 @@ RefPtr<CryptoKeyRSA> CryptoKeyRSA::importSpki(CryptoAlgorithmIdentifier identifi > return nullptr; > > // Notice: CryptoAlgorithmIdentifier::SHA_1 is just a placeholder. It should not have any effect if hash is WTF::nullopt. >- return adoptRef(new CryptoKeyRSA(identifier, hash.value_or(CryptoAlgorithmIdentifier::SHA_1), !!hash, CryptoKeyType::Public, ccPublicKey, extractable, usages)); >+ return adoptRef(new CryptoKeyRSA(identifier, hash.valueOr(CryptoAlgorithmIdentifier::SHA_1), !!hash, CryptoKeyType::Public, ccPublicKey, extractable, usages)); > } > > ExceptionOr<Vector<uint8_t>> CryptoKeyRSA::exportSpki() const >@@ -420,7 +420,7 @@ RefPtr<CryptoKeyRSA> CryptoKeyRSA::importPkcs8(CryptoAlgorithmIdentifier identif > return nullptr; > > // Notice: CryptoAlgorithmIdentifier::SHA_1 is just a placeholder. It should not have any effect if hash is WTF::nullopt. >- return adoptRef(new CryptoKeyRSA(identifier, hash.value_or(CryptoAlgorithmIdentifier::SHA_1), !!hash, CryptoKeyType::Private, ccPrivateKey, extractable, usages)); >+ return adoptRef(new CryptoKeyRSA(identifier, hash.valueOr(CryptoAlgorithmIdentifier::SHA_1), !!hash, CryptoKeyType::Private, ccPrivateKey, extractable, usages)); > } > > ExceptionOr<Vector<uint8_t>> CryptoKeyRSA::exportPkcs8() const >diff --git a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >index 7b26e3adac5fbd61322c626f69b43d282ef43561..1d09c8a671a3699bfd90015482ff65eb72dd955a 100644 >--- a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >+++ b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >@@ -1951,7 +1951,7 @@ static Ref<CSSValue> counterToCSSValue(const RenderStyle& style, CSSPropertyID p > auto list = CSSValueList::createSpaceSeparated(); > for (auto& keyValue : *map) { > list->append(cssValuePool.createValue(keyValue.key, CSSPrimitiveValue::CSS_STRING)); >- double number = (propertyID == CSSPropertyCounterIncrement ? keyValue.value.incrementValue : keyValue.value.resetValue).value_or(0); >+ double number = (propertyID == CSSPropertyCounterIncrement ? keyValue.value.incrementValue : keyValue.value.resetValue).valueOr(0); > list->append(cssValuePool.createValue(number, CSSPrimitiveValue::CSS_NUMBER)); > } > return WTFMove(list); >diff --git a/Source/WebCore/css/CSSFontFace.cpp b/Source/WebCore/css/CSSFontFace.cpp >index 54a40480aaf1f11b604d70ace3d69e07514c390d..0eca51b3db6ef3af1177b34d5f97fbd26054ee39 100644 >--- a/Source/WebCore/css/CSSFontFace.cpp >+++ b/Source/WebCore/css/CSSFontFace.cpp >@@ -202,7 +202,7 @@ static FontSelectionRange calculateItalicRange(CSSValue& value) > { > if (value.isFontStyleValue()) { > auto result = StyleBuilderConverter::convertFontStyleFromValue(value); >- return { result.value_or(normalItalicValue()), result.value_or(normalItalicValue()) }; >+ return { result.valueOr(normalItalicValue()), result.valueOr(normalItalicValue()) }; > } > > ASSERT(value.isFontStyleRangeValue()); >diff --git a/Source/WebCore/css/CSSPrimitiveValue.cpp b/Source/WebCore/css/CSSPrimitiveValue.cpp >index 6ae62671983eb70f7139b9be5c176a091bfcd0a7..06ffb60ea46ed118f32f464f64c95fc44a35732d 100644 >--- a/Source/WebCore/css/CSSPrimitiveValue.cpp >+++ b/Source/WebCore/css/CSSPrimitiveValue.cpp >@@ -787,7 +787,7 @@ ExceptionOr<float> CSSPrimitiveValue::getFloatValue(unsigned short unitType) con > > double CSSPrimitiveValue::doubleValue(UnitType unitType) const > { >- return doubleValueInternal(unitType).value_or(0); >+ return doubleValueInternal(unitType).valueOr(0); > } > > double CSSPrimitiveValue::doubleValue() const >diff --git a/Source/WebCore/css/CSSStyleSheet.cpp b/Source/WebCore/css/CSSStyleSheet.cpp >index 12cda545d7bcc75dedb7a795351bd6f003674fc2..67c30e419182142c9c41c0dc546a6dfaffb6e74c 100644 >--- a/Source/WebCore/css/CSSStyleSheet.cpp >+++ b/Source/WebCore/css/CSSStyleSheet.cpp >@@ -316,7 +316,7 @@ ExceptionOr<int> CSSStyleSheet::addRule(const String& selector, const String& st > if (!style.isEmpty()) > text.append(' '); > text.append('}'); >- auto insertRuleResult = insertRule(text.toString(), index.value_or(length())); >+ auto insertRuleResult = insertRule(text.toString(), index.valueOr(length())); > if (insertRuleResult.hasException()) > return insertRuleResult.releaseException(); > >diff --git a/Source/WebCore/css/DOMMatrix.cpp b/Source/WebCore/css/DOMMatrix.cpp >index c354e978273ba56e2ffb547ff3918339cd0fccaf..a00f165b48373cbae0440060ca0122a1feacda61 100644 >--- a/Source/WebCore/css/DOMMatrix.cpp >+++ b/Source/WebCore/css/DOMMatrix.cpp >@@ -189,8 +189,8 @@ Ref<DOMMatrix> DOMMatrix::rotateSelf(double rotX, Optional<double> rotY, Optiona > rotX = 0; > rotY = 0; > } >- m_matrix.rotate3d(rotX, rotY.value_or(0), rotZ.value_or(0)); >- if (rotX || rotY.value_or(0)) >+ m_matrix.rotate3d(rotX, rotY.valueOr(0), rotZ.valueOr(0)); >+ if (rotX || rotY.valueOr(0)) > m_is2D = false; > return *this; > } >diff --git a/Source/WebCore/css/DOMMatrixReadOnly.cpp b/Source/WebCore/css/DOMMatrixReadOnly.cpp >index cc7f72698513ee8380398827d919b48f75313395..13996fb553ce1c6a8f72ba99e486de1a48dd5b03 100644 >--- a/Source/WebCore/css/DOMMatrixReadOnly.cpp >+++ b/Source/WebCore/css/DOMMatrixReadOnly.cpp >@@ -120,17 +120,17 @@ ExceptionOr<void> DOMMatrixReadOnly::validateAndFixup(DOMMatrix2DInit& init) > return Exception { TypeError, "init.f and init.m42 do not match"_s }; > > if (!init.m11) >- init.m11 = init.a.value_or(1); >+ init.m11 = init.a.valueOr(1); > if (!init.m12) >- init.m12 = init.b.value_or(0); >+ init.m12 = init.b.valueOr(0); > if (!init.m21) >- init.m21 = init.c.value_or(0); >+ init.m21 = init.c.valueOr(0); > if (!init.m22) >- init.m22 = init.d.value_or(1); >+ init.m22 = init.d.valueOr(1); > if (!init.m41) >- init.m41 = init.e.value_or(0); >+ init.m41 = init.e.valueOr(0); > if (!init.m42) >- init.m42 = init.f.value_or(0); >+ init.m42 = init.f.valueOr(0); > > return { }; > } >diff --git a/Source/WebCore/css/StyleBuilderCustom.h b/Source/WebCore/css/StyleBuilderCustom.h >index c7852f029d838409ab4e53ac03d1029a48e94834..48e6caba89bb76a4ba81dad96b536a7d3a6c45e4 100644 >--- a/Source/WebCore/css/StyleBuilderCustom.h >+++ b/Source/WebCore/css/StyleBuilderCustom.h >@@ -1193,7 +1193,7 @@ inline void StyleBuilderCustom::applyValueCounter(StyleResolver& styleResolver, > if (counterBehavior == Reset) > directives.resetValue = value; > else >- directives.incrementValue = saturatedAddition(directives.incrementValue.value_or(0), value); >+ directives.incrementValue = saturatedAddition(directives.incrementValue.valueOr(0), value); > } > } > >diff --git a/Source/WebCore/css/parser/MediaQueryParser.cpp b/Source/WebCore/css/parser/MediaQueryParser.cpp >index 8c3562ecf57f59b08f263af9894edaa896e3ee82..6d21d20b1dfcc2f593bf26e6bc6e02a6a117ef72 100644 >--- a/Source/WebCore/css/parser/MediaQueryParser.cpp >+++ b/Source/WebCore/css/parser/MediaQueryParser.cpp >@@ -141,7 +141,7 @@ void MediaQueryParser::commitMediaQuery() > // FIXME-NEWPARSER: Convoluted and awful, but we can't change the MediaQuerySet yet because of the > // old parser. > static const NeverDestroyed<String> defaultMediaType { "all"_s }; >- MediaQuery mediaQuery { m_mediaQueryData.restrictor(), m_mediaQueryData.mediaType().value_or(defaultMediaType), WTFMove(m_mediaQueryData.expressions()) }; >+ MediaQuery mediaQuery { m_mediaQueryData.restrictor(), m_mediaQueryData.mediaType().valueOr(defaultMediaType), WTFMove(m_mediaQueryData.expressions()) }; > m_mediaQueryData.clear(); > m_querySet->addMediaQuery(WTFMove(mediaQuery)); > } >diff --git a/Source/WebCore/dom/Document.h b/Source/WebCore/dom/Document.h >index 6d5cddb83f8ec20f0d856ef14bca18248037d4ce..8a0ffe10b459712274de7d7242860290737cf9ea 100644 >--- a/Source/WebCore/dom/Document.h >+++ b/Source/WebCore/dom/Document.h >@@ -423,7 +423,7 @@ public: > #endif > > void setReferrerPolicy(ReferrerPolicy); >- ReferrerPolicy referrerPolicy() const { return m_referrerPolicy.value_or(ReferrerPolicy::NoReferrerWhenDowngrade); } >+ ReferrerPolicy referrerPolicy() const { return m_referrerPolicy.valueOr(ReferrerPolicy::NoReferrerWhenDowngrade); } > > WEBCORE_EXPORT DocumentType* doctype() const; > >diff --git a/Source/WebCore/dom/Element.cpp b/Source/WebCore/dom/Element.cpp >index b26c41f18ea90f318ea6c7febd9f15801b680239..5ff302fbe65265586d620e26e23fe476b4652eb7 100644 >--- a/Source/WebCore/dom/Element.cpp >+++ b/Source/WebCore/dom/Element.cpp >@@ -657,7 +657,7 @@ void Element::setHovered(bool flag) > // FIXME(webkit.org/b/161611): Take into account orientation/direction. > inline ScrollAlignment toScrollAlignment(Optional<ScrollLogicalPosition> position, bool isVertical) > { >- switch (position.value_or(isVertical ? ScrollLogicalPosition::Start : ScrollLogicalPosition::Nearest)) { >+ switch (position.valueOr(isVertical ? ScrollLogicalPosition::Start : ScrollLogicalPosition::Nearest)) { > case ScrollLogicalPosition::Start: > return isVertical ? ScrollAlignment::alignTopAlways : ScrollAlignment::alignLeftAlways; > case ScrollLogicalPosition::Center: >diff --git a/Source/WebCore/dom/EventTarget.cpp b/Source/WebCore/dom/EventTarget.cpp >index ba27ad06a7ddd1170d7542b4b260dd9b4eca06fb..d1c87de5e498d59e1b2a85c698cebba1b2eb1c61 100644 >--- a/Source/WebCore/dom/EventTarget.cpp >+++ b/Source/WebCore/dom/EventTarget.cpp >@@ -82,7 +82,7 @@ bool EventTarget::addEventListener(const AtomicString& eventType, Ref<EventListe > bool listenerCreatedFromScript = listener->type() == EventListener::JSEventListenerType && !listener->wasCreatedFromMarkup(); > auto listenerRef = listener.copyRef(); > >- if (!ensureEventTargetData().eventListenerMap.add(eventType, WTFMove(listener), { options.capture, passive.value_or(false), options.once })) >+ if (!ensureEventTargetData().eventListenerMap.add(eventType, WTFMove(listener), { options.capture, passive.valueOr(false), options.once })) > return false; > > if (listenerCreatedFromScript) >diff --git a/Source/WebCore/dom/MutationObserver.cpp b/Source/WebCore/dom/MutationObserver.cpp >index 846249536eb9ca2dbd26acdb047380fe02e53ff8..6f79a74401f0d92b5da8f397b2483e2ce06ac9a3 100644 >--- a/Source/WebCore/dom/MutationObserver.cpp >+++ b/Source/WebCore/dom/MutationObserver.cpp >@@ -85,9 +85,9 @@ ExceptionOr<void> MutationObserver::observe(Node& node, const Init& init) > options |= ChildList; > if (init.subtree) > options |= Subtree; >- if (init.attributeOldValue.value_or(false)) >+ if (init.attributeOldValue.valueOr(false)) > options |= AttributeOldValue; >- if (init.characterDataOldValue.value_or(false)) >+ if (init.characterDataOldValue.valueOr(false)) > options |= CharacterDataOldValue; > > HashSet<AtomicString> attributeFilter; >diff --git a/Source/WebCore/editing/cocoa/FontAttributeChangesCocoa.mm b/Source/WebCore/editing/cocoa/FontAttributeChangesCocoa.mm >index d431f722e24aab3bd17728b4358b78698b786f4b..da02cb2c4ceff83ad455ffb2debc662994a7e76f 100644 >--- a/Source/WebCore/editing/cocoa/FontAttributeChangesCocoa.mm >+++ b/Source/WebCore/editing/cocoa/FontAttributeChangesCocoa.mm >@@ -46,8 +46,8 @@ const String& FontChanges::platformFontFamilyNameForCSS() const > RetainPtr<CFStringRef> fontNameFromDescription; > > FontDescription description; >- description.setIsItalic(m_italic.value_or(false)); >- description.setWeight(FontSelectionValue { m_bold.value_or(false) ? 900 : 500 }); >+ description.setIsItalic(m_italic.valueOr(false)); >+ description.setWeight(FontSelectionValue { m_bold.valueOr(false) ? 900 : 500 }); > if (auto font = FontCache::singleton().fontForFamily(description, m_fontFamily)) > fontNameFromDescription = adoptCF(CTFontCopyPostScriptName(font->getCTFont())); > >diff --git a/Source/WebCore/fileapi/File.cpp b/Source/WebCore/fileapi/File.cpp >index fc0fa57f0bedb9d759af79f458e50560848128d2..b73fcde79f460792c926c075fbaaf6648a724131 100644 >--- a/Source/WebCore/fileapi/File.cpp >+++ b/Source/WebCore/fileapi/File.cpp >@@ -81,7 +81,7 @@ static BlobPropertyBag convertPropertyBag(const File::PropertyBag& initialBag) > File::File(Vector<BlobPartVariant>&& blobPartVariants, const String& filename, const PropertyBag& propertyBag) > : Blob(WTFMove(blobPartVariants), convertPropertyBag(propertyBag)) > , m_name(filename) >- , m_lastModifiedDateOverride(propertyBag.lastModified.value_or(WallTime::now().secondsSinceEpoch().milliseconds())) >+ , m_lastModifiedDateOverride(propertyBag.lastModified.valueOr(WallTime::now().secondsSinceEpoch().milliseconds())) > { > } > >diff --git a/Source/WebCore/html/DOMTokenList.cpp b/Source/WebCore/html/DOMTokenList.cpp >index cea1cd309cdc35287e84e0dd07055fbba974b449..af00911e06ecc57ed38a468322293532c35a6dfa 100644 >--- a/Source/WebCore/html/DOMTokenList.cpp >+++ b/Source/WebCore/html/DOMTokenList.cpp >@@ -141,7 +141,7 @@ ExceptionOr<bool> DOMTokenList::toggle(const AtomicString& token, Optional<bool> > auto& tokens = this->tokens(); > > if (tokens.contains(token)) { >- if (!force.value_or(false)) { >+ if (!force.valueOr(false)) { > tokens.removeFirst(token); > updateAssociatedAttributeFromTokens(); > return false; >diff --git a/Source/WebCore/html/HTMLOListElement.h b/Source/WebCore/html/HTMLOListElement.h >index 5f4d9efdad5d3de0601a06a0fe30ab20ee2d6d3f..813f5e062db25b54319acd325599b000f959c954 100644 >--- a/Source/WebCore/html/HTMLOListElement.h >+++ b/Source/WebCore/html/HTMLOListElement.h >@@ -32,7 +32,7 @@ public: > static Ref<HTMLOListElement> create(Document&); > static Ref<HTMLOListElement> create(const QualifiedName&, Document&); > >- int startForBindings() const { return m_start.value_or(1); } >+ int startForBindings() const { return m_start.valueOr(1); } > WEBCORE_EXPORT void setStartForBindings(int); > > // FIXME: The reason start() does not trigger layout is because it is called >diff --git a/Source/WebCore/html/ImageBitmap.cpp b/Source/WebCore/html/ImageBitmap.cpp >index 6b2ee1849e49ef575386dedb15efdb455c84183f..9dbbb4feec51a3b994e15ad6be682fa2382ddbb6 100644 >--- a/Source/WebCore/html/ImageBitmap.cpp >+++ b/Source/WebCore/html/ImageBitmap.cpp >@@ -160,7 +160,7 @@ static ExceptionOr<IntRect> croppedSourceRectangleWithFormatting(IntSize inputSi > // Otherwise let sourceRectangle be a rectangle whose corners are the four points > // (0,0), (width of input, 0), (width of input, height of input), (0, height of > // input). >- auto sourceRectangle = rect.value_or(IntRect { 0, 0, inputSize.width(), inputSize.height() }); >+ auto sourceRectangle = rect.valueOr(IntRect { 0, 0, inputSize.width(), inputSize.height() }); > > // 4. Clip sourceRectangle to the dimensions of input. > sourceRectangle.intersect(IntRect { 0, 0, inputSize.width(), inputSize.height() }); >diff --git a/Source/WebCore/html/canvas/CanvasPattern.cpp b/Source/WebCore/html/canvas/CanvasPattern.cpp >index 9a9de9a772a71ebcd2dfbb716ca92549c44c060f..72ea1a87c6d0e26018757ee2f7bc60463c9aa805 100644 >--- a/Source/WebCore/html/canvas/CanvasPattern.cpp >+++ b/Source/WebCore/html/canvas/CanvasPattern.cpp >@@ -78,7 +78,7 @@ ExceptionOr<void> CanvasPattern::setTransform(DOMMatrix2DInit&& matrixInit) > if (checkValid.hasException()) > return checkValid.releaseException(); > >- m_pattern->setPatternSpaceTransform({ matrixInit.a.value_or(1), matrixInit.b.value_or(0), matrixInit.c.value_or(0), matrixInit.d.value_or(1), matrixInit.e.value_or(0), matrixInit.f.value_or(0) }); >+ m_pattern->setPatternSpaceTransform({ matrixInit.a.valueOr(1), matrixInit.b.valueOr(0), matrixInit.c.valueOr(0), matrixInit.d.valueOr(1), matrixInit.e.valueOr(0), matrixInit.f.valueOr(0) }); > return { }; > } > >diff --git a/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp b/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp >index 2286d3222abd7cf0e80e121d80d86edb60cd52dc..d426fac61339fec3c13f4e706dacfabd518799db 100644 >--- a/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp >+++ b/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp >@@ -915,7 +915,7 @@ ExceptionOr<void> CanvasRenderingContext2DBase::setTransform(DOMMatrix2DInit&& m > if (checkValid.hasException()) > return checkValid.releaseException(); > >- setTransform(matrixInit.a.value_or(1), matrixInit.b.value_or(0), matrixInit.c.value_or(0), matrixInit.d.value_or(1), matrixInit.e.value_or(0), matrixInit.f.value_or(0)); >+ setTransform(matrixInit.a.valueOr(1), matrixInit.b.valueOr(0), matrixInit.c.valueOr(0), matrixInit.d.valueOr(1), matrixInit.e.valueOr(0), matrixInit.f.valueOr(0)); > return { }; > } > >@@ -1204,7 +1204,7 @@ bool CanvasRenderingContext2DBase::isPointInPathInternal(const Path& path, float > if (!state().hasInvertibleTransform) > return false; > >- auto transformedPoint = state().transform.inverse().value_or(AffineTransform()).mapPoint(FloatPoint(x, y)); >+ auto transformedPoint = state().transform.inverse().valueOr(AffineTransform()).mapPoint(FloatPoint(x, y)); > > if (!std::isfinite(transformedPoint.x()) || !std::isfinite(transformedPoint.y())) > return false; >@@ -1220,7 +1220,7 @@ bool CanvasRenderingContext2DBase::isPointInStrokeInternal(const Path& path, flo > if (!state().hasInvertibleTransform) > return false; > >- auto transformedPoint = state().transform.inverse().value_or(AffineTransform()).mapPoint(FloatPoint(x, y)); >+ auto transformedPoint = state().transform.inverse().valueOr(AffineTransform()).mapPoint(FloatPoint(x, y)); > if (!std::isfinite(transformedPoint.x()) || !std::isfinite(transformedPoint.y())) > return false; > >diff --git a/Source/WebCore/html/canvas/Path2D.cpp b/Source/WebCore/html/canvas/Path2D.cpp >index 215b7d3bad2b854331f64b3f1c03345f2c2ce057..385e9dabf5dcbca3bd22feaa95f784d2f4794b31 100644 >--- a/Source/WebCore/html/canvas/Path2D.cpp >+++ b/Source/WebCore/html/canvas/Path2D.cpp >@@ -42,7 +42,7 @@ ExceptionOr<void> Path2D::addPath(Path2D& path, DOMMatrix2DInit&& matrixInit) > if (checkValid.hasException()) > return checkValid.releaseException(); > >- m_path.addPath(path.path(), { matrixInit.a.value_or(1), matrixInit.b.value_or(0), matrixInit.c.value_or(0), matrixInit.d.value_or(1), matrixInit.e.value_or(0), matrixInit.f.value_or(0) }); >+ m_path.addPath(path.path(), { matrixInit.a.valueOr(1), matrixInit.b.valueOr(0), matrixInit.c.valueOr(0), matrixInit.d.valueOr(1), matrixInit.e.valueOr(0), matrixInit.f.valueOr(0) }); > return { }; > } > >diff --git a/Source/WebCore/inspector/InspectorCanvas.cpp b/Source/WebCore/inspector/InspectorCanvas.cpp >index 9b68c4b05c3b63ea1eff71b01ae9b159fbce67d3..52b0bcb9b22b488a1012218cc622778f0672e3b7 100644 >--- a/Source/WebCore/inspector/InspectorCanvas.cpp >+++ b/Source/WebCore/inspector/InspectorCanvas.cpp >@@ -582,12 +582,12 @@ Ref<JSON::ArrayOf<JSON::Value>> InspectorCanvas::buildAction(const String& name, > [&] (CanvasTextBaseline value) { addParameter(indexForData(convertEnumerationToString(value)), RecordingSwizzleTypes::String); }, > [&] (const DOMMatrix2DInit& value) { > auto array = JSON::ArrayOf<double>::create(); >- array->addItem(value.a.value_or(1)); >- array->addItem(value.b.value_or(0)); >- array->addItem(value.c.value_or(0)); >- array->addItem(value.d.value_or(1)); >- array->addItem(value.e.value_or(0)); >- array->addItem(value.f.value_or(0)); >+ array->addItem(value.a.valueOr(1)); >+ array->addItem(value.b.valueOr(0)); >+ array->addItem(value.c.valueOr(0)); >+ array->addItem(value.d.valueOr(1)); >+ array->addItem(value.e.valueOr(0)); >+ array->addItem(value.f.valueOr(0)); > addParameter(array.ptr(), RecordingSwizzleTypes::DOMMatrix); > }, > [&] (const Element*) { >diff --git a/Source/WebCore/inspector/InspectorFrontendHost.cpp b/Source/WebCore/inspector/InspectorFrontendHost.cpp >index 874f384c3a3f7c14cc4ac36a2a1f08a8c59ec861..c080a56c6861f3e398979a7b123d562b8b90f46a 100644 >--- a/Source/WebCore/inspector/InspectorFrontendHost.cpp >+++ b/Source/WebCore/inspector/InspectorFrontendHost.cpp >@@ -373,7 +373,7 @@ static void populateContextMenu(Vector<InspectorFrontendHost::ContextMenuItem>&& > } > > auto type = item.type == "checkbox" ? CheckableActionType : ActionType; >- auto action = static_cast<ContextMenuAction>(ContextMenuItemBaseCustomTag + item.id.value_or(0)); >+ auto action = static_cast<ContextMenuAction>(ContextMenuItemBaseCustomTag + item.id.valueOr(0)); > ContextMenuItem menuItem = { type, action, item.label }; > if (item.enabled) > menuItem.setEnabled(*item.enabled); >diff --git a/Source/WebCore/layout/FormattingContext.cpp b/Source/WebCore/layout/FormattingContext.cpp >index b3c57624eb15f6f2d03847e8184c7d0eb8767b99..11efc4618b91aa8f61ff0325ca76480e48c95926 100644 >--- a/Source/WebCore/layout/FormattingContext.cpp >+++ b/Source/WebCore/layout/FormattingContext.cpp >@@ -224,16 +224,16 @@ void FormattingContext::validateGeometryConstraintsAfterLayout() const > if ((layoutBox.isBlockLevelBox() || layoutBox.isOutOfFlowPositioned()) && !layoutBox.replaced()) { > // margin-left + border-left-width + padding-left + width + padding-right + border-right-width + margin-right = width of containing block > auto containingBlockWidth = containingBlockDisplayBox.contentBoxWidth(); >- ASSERT(displayBox.marginStart() + displayBox.borderLeft() + displayBox.paddingLeft().value_or(0) + displayBox.contentBoxWidth() >- + displayBox.paddingRight().value_or(0) + displayBox.borderRight() + displayBox.marginEnd() == containingBlockWidth); >+ ASSERT(displayBox.marginStart() + displayBox.borderLeft() + displayBox.paddingLeft().valueOr(0) + displayBox.contentBoxWidth() >+ + displayBox.paddingRight().valueOr(0) + displayBox.borderRight() + displayBox.marginEnd() == containingBlockWidth); > } > > // 10.6.4 Absolutely positioned, non-replaced elements > if (layoutBox.isOutOfFlowPositioned() && !layoutBox.replaced()) { > // top + margin-top + border-top-width + padding-top + height + padding-bottom + border-bottom-width + margin-bottom + bottom = height of containing block > auto containingBlockHeight = containingBlockDisplayBox.contentBoxHeight(); >- ASSERT(displayBox.top() + displayBox.marginBefore() + displayBox.borderTop() + displayBox.paddingTop().value_or(0) + displayBox.contentBoxHeight() >- + displayBox.paddingBottom().value_or(0) + displayBox.borderBottom() + displayBox.marginAfter() == containingBlockHeight); >+ ASSERT(displayBox.top() + displayBox.marginBefore() + displayBox.borderTop() + displayBox.paddingTop().valueOr(0) + displayBox.contentBoxHeight() >+ + displayBox.paddingBottom().valueOr(0) + displayBox.borderBottom() + displayBox.marginAfter() == containingBlockHeight); > } > } > } >diff --git a/Source/WebCore/layout/FormattingContextGeometry.cpp b/Source/WebCore/layout/FormattingContextGeometry.cpp >index e03d83d073880f592629c54966576e1b36c212c8..c339f9780fc40eff608f92579cc4700d911e4e3e 100644 >--- a/Source/WebCore/layout/FormattingContextGeometry.cpp >+++ b/Source/WebCore/layout/FormattingContextGeometry.cpp >@@ -282,8 +282,8 @@ VerticalGeometry FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeomet > auto height = usedHeight ? usedHeight.value() : computedHeightValue(layoutState, layoutBox, HeightType::Normal); > auto marginBefore = computedValueIfNotAuto(style.marginBefore(), containingBlockWidth); > auto marginAfter = computedValueIfNotAuto(style.marginAfter(), containingBlockWidth); >- auto paddingTop = displayBox.paddingTop().value_or(0); >- auto paddingBottom = displayBox.paddingBottom().value_or(0); >+ auto paddingTop = displayBox.paddingTop().valueOr(0); >+ auto paddingBottom = displayBox.paddingBottom().valueOr(0); > auto borderTop = displayBox.borderTop(); > auto borderBottom = displayBox.borderBottom(); > >@@ -307,45 +307,45 @@ VerticalGeometry FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeomet > if (!top && !height && bottom) { > // #1 > height = contentHeightForFormattingContextRoot(layoutState, layoutBox); >- marginBefore = marginBefore.value_or(0); >- marginAfter = marginAfter.value_or(0); >+ marginBefore = marginBefore.valueOr(0); >+ marginAfter = marginAfter.valueOr(0); > top = containingBlockHeight - (*marginBefore + borderTop + paddingTop + *height + paddingBottom + borderBottom + *marginAfter + *bottom); > } > > if (!top && !bottom && height) { > // #2 > top = staticVerticalPositionForOutOfFlowPositioned(layoutState, layoutBox); >- marginBefore = marginBefore.value_or(0); >- marginAfter = marginAfter.value_or(0); >+ marginBefore = marginBefore.valueOr(0); >+ marginAfter = marginAfter.valueOr(0); > bottom = containingBlockHeight - (*top + *marginBefore + borderTop + paddingTop + *height + paddingBottom + borderBottom + *marginAfter); > } > > if (!height && !bottom && top) { > // #3 > height = contentHeightForFormattingContextRoot(layoutState, layoutBox); >- marginBefore = marginBefore.value_or(0); >- marginAfter = marginAfter.value_or(0); >+ marginBefore = marginBefore.valueOr(0); >+ marginAfter = marginAfter.valueOr(0); > bottom = containingBlockHeight - (*top + *marginBefore + borderTop + paddingTop + *height + paddingBottom + borderBottom + *marginAfter); > } > > if (!top && height && bottom) { > // #4 >- marginBefore = marginBefore.value_or(0); >- marginAfter = marginAfter.value_or(0); >+ marginBefore = marginBefore.valueOr(0); >+ marginAfter = marginAfter.valueOr(0); > top = containingBlockHeight - (*marginBefore + borderTop + paddingTop + *height + paddingBottom + borderBottom + *marginAfter + *bottom); > } > > if (!height && top && bottom) { > // #5 >- marginBefore = marginBefore.value_or(0); >- marginAfter = marginAfter.value_or(0); >+ marginBefore = marginBefore.valueOr(0); >+ marginAfter = marginAfter.valueOr(0); > height = containingBlockHeight - (*top + *marginBefore + borderTop + paddingTop + paddingBottom + borderBottom + *marginAfter + *bottom); > } > > if (!bottom && top && height) { > // #6 >- marginBefore = marginBefore.value_or(0); >- marginAfter = marginAfter.value_or(0); >+ marginBefore = marginBefore.valueOr(0); >+ marginAfter = marginAfter.valueOr(0); > bottom = containingBlockHeight - (*top + *marginBefore + borderTop + paddingTop + *height + paddingBottom + borderBottom + *marginAfter); > } > >@@ -400,10 +400,10 @@ HorizontalGeometry FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGe > auto width = computedValueIfNotAuto(usedWidth ? Length { usedWidth.value(), Fixed } : style.logicalWidth(), containingBlockWidth); > auto marginStart = computedValueIfNotAuto(style.marginStart(), containingBlockWidth); > auto marginEnd = computedValueIfNotAuto(style.marginEnd(), containingBlockWidth); >- auto nonComputedMarginStart = marginStart.value_or(0); >- auto nonComputedMarginEnd = marginEnd.value_or(0); >- auto paddingLeft = displayBox.paddingLeft().value_or(0); >- auto paddingRight = displayBox.paddingRight().value_or(0); >+ auto nonComputedMarginStart = marginStart.valueOr(0); >+ auto nonComputedMarginEnd = marginEnd.valueOr(0); >+ auto paddingLeft = displayBox.paddingLeft().valueOr(0); >+ auto paddingRight = displayBox.paddingRight().valueOr(0); > auto borderLeft = displayBox.borderLeft(); > auto borderRight = displayBox.borderRight(); > >@@ -411,8 +411,8 @@ HorizontalGeometry FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGe > // If all three of 'left', 'width', and 'right' are 'auto': First set any 'auto' values for 'margin-left' and 'margin-right' to 0. > // Then, if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static > // position and apply rule number three below; otherwise, set 'right' to the static position and apply rule number one below. >- marginStart = marginStart.value_or(0); >- marginEnd = marginEnd.value_or(0); >+ marginStart = marginStart.valueOr(0); >+ marginEnd = marginEnd.valueOr(0); > > auto staticHorizontalPosition = staticHorizontalPositionForOutOfFlowPositioned(layoutState, layoutBox); > if (isLeftToRightDirection) >@@ -459,8 +459,8 @@ HorizontalGeometry FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGe > } > } else { > // Otherwise, set 'auto' values for 'margin-left' and 'margin-right' to 0, and pick the one of the following six rules that applies. >- marginStart = marginStart.value_or(0); >- marginEnd = marginEnd.value_or(0); >+ marginStart = marginStart.valueOr(0); >+ marginEnd = marginEnd.valueOr(0); > } > > ASSERT(marginStart); >@@ -530,8 +530,8 @@ VerticalGeometry FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry( > auto height = inlineReplacedHeightAndMargin(layoutState, layoutBox, usedHeight).height; > auto marginBefore = computedValueIfNotAuto(style.marginBefore(), containingBlockWidth); > auto marginAfter = computedValueIfNotAuto(style.marginAfter(), containingBlockWidth); >- auto paddingTop = displayBox.paddingTop().value_or(0); >- auto paddingBottom = displayBox.paddingBottom().value_or(0); >+ auto paddingTop = displayBox.paddingTop().valueOr(0); >+ auto paddingBottom = displayBox.paddingBottom().valueOr(0); > auto borderTop = displayBox.borderTop(); > auto borderBottom = displayBox.borderBottom(); > >@@ -542,8 +542,8 @@ VerticalGeometry FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry( > > if (!bottom) { > // #2 >- marginBefore = marginBefore.value_or(0); >- marginAfter = marginAfter.value_or(0); >+ marginBefore = marginBefore.valueOr(0); >+ marginAfter = marginAfter.valueOr(0); > } > > if (!marginBefore && !marginAfter) { >@@ -602,11 +602,11 @@ HorizontalGeometry FormattingContext::Geometry::outOfFlowReplacedHorizontalGeome > auto right = computedValueIfNotAuto(style.logicalRight(), containingBlockWidth); > auto marginStart = computedValueIfNotAuto(style.marginStart(), containingBlockWidth); > auto marginEnd = computedValueIfNotAuto(style.marginEnd(), containingBlockWidth); >- auto nonComputedMarginStart = marginStart.value_or(0); >- auto nonComputedMarginEnd = marginEnd.value_or(0); >+ auto nonComputedMarginStart = marginStart.valueOr(0); >+ auto nonComputedMarginEnd = marginEnd.valueOr(0); > auto width = inlineReplacedWidthAndMargin(layoutState, layoutBox, usedWidth).width; >- auto paddingLeft = displayBox.paddingLeft().value_or(0); >- auto paddingRight = displayBox.paddingRight().value_or(0); >+ auto paddingLeft = displayBox.paddingLeft().valueOr(0); >+ auto paddingRight = displayBox.paddingRight().valueOr(0); > auto borderLeft = displayBox.borderLeft(); > auto borderRight = displayBox.borderRight(); > >@@ -621,8 +621,8 @@ HorizontalGeometry FormattingContext::Geometry::outOfFlowReplacedHorizontalGeome > > if (!left || !right) { > // #2 >- marginStart = marginStart.value_or(0); >- marginEnd = marginEnd.value_or(0); >+ marginStart = marginStart.valueOr(0); >+ marginEnd = marginEnd.valueOr(0); > } > > if (!marginStart && !marginEnd) { >@@ -697,8 +697,8 @@ HeightAndMargin FormattingContext::Geometry::complicatedCases(const LayoutState& > auto marginAfter = computedValueIfNotAuto(style.marginAfter(), containingBlockWidth); > > // #1 >- marginBefore = marginBefore.value_or(0); >- marginAfter = marginAfter.value_or(0); >+ marginBefore = marginBefore.valueOr(0); >+ marginAfter = marginAfter.valueOr(0); > // #2 > if (!height) { > ASSERT(isHeightAuto(layoutBox)); >@@ -873,14 +873,14 @@ WidthAndMargin FormattingContext::Geometry::inlineReplacedWidthAndMargin(const L > if (precomputedMarginEnd) > return precomputedMarginEnd.value(); > auto marginEnd = computedValueIfNotAuto(style.marginEnd(), containingBlockWidth); >- return marginEnd.value_or(0_lu); >+ return marginEnd.valueOr(0_lu); > }; > > auto computeMarginStart = [&]() { > if (precomputedMarginStart) > return precomputedMarginStart.value(); > auto marginStart = computedValueIfNotAuto(style.marginStart(), containingBlockWidth); >- return marginStart.value_or(0_lu); >+ return marginStart.valueOr(0_lu); > }; > > auto replaced = layoutBox.replaced(); >@@ -888,8 +888,8 @@ WidthAndMargin FormattingContext::Geometry::inlineReplacedWidthAndMargin(const L > > auto marginStart = computeMarginStart(); > auto marginEnd = computeMarginEnd(); >- auto nonComputedMarginStart = computedValueIfNotAuto(style.marginStart(), containingBlockWidth).value_or(0); >- auto nonComputedMarginEnd = computedValueIfNotAuto(style.marginEnd(), containingBlockWidth).value_or(0); >+ auto nonComputedMarginStart = computedValueIfNotAuto(style.marginStart(), containingBlockWidth).valueOr(0); >+ auto nonComputedMarginEnd = computedValueIfNotAuto(style.marginEnd(), containingBlockWidth).valueOr(0); > auto width = computedValueIfNotAuto(usedWidth ? Length { usedWidth.value(), Fixed } : style.logicalWidth(), containingBlockWidth); > > auto heightIsAuto = isHeightAuto(layoutBox); >@@ -901,7 +901,7 @@ WidthAndMargin FormattingContext::Geometry::inlineReplacedWidthAndMargin(const L > } else if ((!width && heightIsAuto && !replaced->hasIntrinsicWidth() && replaced->hasIntrinsicHeight() && replaced->hasIntrinsicRatio()) > || (!width && height && replaced->hasIntrinsicRatio())) { > // #2 >- width = height.value_or(replaced->hasIntrinsicHeight()) * replaced->intrinsicRatio(); >+ width = height.valueOr(replaced->hasIntrinsicHeight()) * replaced->intrinsicRatio(); > } else if (!width && heightIsAuto && replaced->hasIntrinsicRatio() && !replaced->hasIntrinsicWidth() && !replaced->hasIntrinsicHeight()) { > // #3 > // FIXME: undefined but surely doable. >@@ -990,7 +990,7 @@ LayoutSize FormattingContext::Geometry::inFlowPositionedPositionOffset(const Lay > ASSERT(!left || *left == -*right); > > auto topPositionOffset = *top; >- auto leftPositionOffset = left.value_or(-*right); >+ auto leftPositionOffset = left.valueOr(-*right); > > LOG_WITH_STREAM(FormattingContextLayout, stream << "[Position] -> positioned inflow -> top offset(" << topPositionOffset << "px) left offset(" << leftPositionOffset << "px) layoutBox(" << &layoutBox << ")"); > return { leftPositionOffset, topPositionOffset }; >@@ -1025,8 +1025,8 @@ HorizontalMargin FormattingContext::Geometry::computedNonCollapsedHorizontalMarg > auto& style = layoutBox.style(); > auto containingBlockWidth = layoutState.displayBoxForLayoutBox(*layoutBox.containingBlock()).contentBoxWidth(); > >- auto marginStart = computedValueIfNotAuto(style.marginStart(), containingBlockWidth).value_or(0_lu); >- auto marginEnd = computedValueIfNotAuto(style.marginEnd(), containingBlockWidth).value_or(0_lu); >+ auto marginStart = computedValueIfNotAuto(style.marginStart(), containingBlockWidth).valueOr(0_lu); >+ auto marginEnd = computedValueIfNotAuto(style.marginEnd(), containingBlockWidth).valueOr(0_lu); > > LOG_WITH_STREAM(FormattingContextLayout, stream << "[Margin] -> non collapsed horizontal -> margin(" << marginStart << "px, " << marginEnd << "px) -> layoutBox: " << &layoutBox); > return { marginStart, marginEnd }; >@@ -1037,8 +1037,8 @@ VerticalMargin::ComputedValues FormattingContext::Geometry::computedNonCollapsed > auto& style = layoutBox.style(); > auto containingBlockWidth = layoutState.displayBoxForLayoutBox(*layoutBox.containingBlock()).contentBoxWidth(); > >- auto marginBefore = computedValueIfNotAuto(style.marginBefore(), containingBlockWidth).value_or(0_lu); >- auto marginAfter = computedValueIfNotAuto(style.marginAfter(), containingBlockWidth).value_or(0_lu); >+ auto marginBefore = computedValueIfNotAuto(style.marginBefore(), containingBlockWidth).valueOr(0_lu); >+ auto marginAfter = computedValueIfNotAuto(style.marginAfter(), containingBlockWidth).valueOr(0_lu); > > LOG_WITH_STREAM(FormattingContextLayout, stream << "[Margin] -> non collapsed vertical -> margin(" << marginBefore << "px, " << marginAfter << "px) -> layoutBox: " << &layoutBox); > return { marginBefore, marginAfter }; >diff --git a/Source/WebCore/layout/FormattingContextQuirks.cpp b/Source/WebCore/layout/FormattingContextQuirks.cpp >index d10abe27655ad9d9b939eda108c1a1534dcb9829..b4f44a825ef3aa58ad2b36a0e2ad21475f2e87d5 100644 >--- a/Source/WebCore/layout/FormattingContextQuirks.cpp >+++ b/Source/WebCore/layout/FormattingContextQuirks.cpp >@@ -52,7 +52,7 @@ LayoutUnit FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFix > auto& displayBox = layoutState.displayBoxForLayoutBox(*containingBlock); > > auto verticalMargin = FormattingContext::Geometry::computedNonCollapsedVerticalMarginValue(layoutState, *containingBlock); >- auto verticalPadding = displayBox.paddingTop().value_or(0) + displayBox.paddingBottom().value_or(0); >+ auto verticalPadding = displayBox.paddingTop().valueOr(0) + displayBox.paddingBottom().valueOr(0); > auto verticalBorder = displayBox.borderTop() + displayBox.borderBottom(); > bodyAndDocumentVerticalMarginPaddingAndBorder += verticalMargin.before + verticalMargin.after + verticalPadding + verticalBorder; > } >diff --git a/Source/WebCore/layout/MarginTypes.h b/Source/WebCore/layout/MarginTypes.h >index fe68f2979a581031cffa4ee8d0782f9303f00d6e..85ffed6596867893f7d6e7df586524d687c31497 100644 >--- a/Source/WebCore/layout/MarginTypes.h >+++ b/Source/WebCore/layout/MarginTypes.h >@@ -80,8 +80,8 @@ inline VerticalMargin::ComputedValues VerticalMargin::usedValues() const > { > if (!m_collapsed) > return m_nonCollapsed; >- return { m_collapsed->before.value_or(m_nonCollapsed.before), >- m_collapsed->after.value_or(m_nonCollapsed.after) }; >+ return { m_collapsed->before.valueOr(m_nonCollapsed.before), >+ m_collapsed->after.valueOr(m_nonCollapsed.after) }; > } > > } >diff --git a/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp b/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp >index 56fab5523b48ccf290b2e088bda827ec9123e3af..ee43872eab6e500be8ac72b15af9010beebf8106 100644 >--- a/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp >+++ b/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp >@@ -61,10 +61,10 @@ HeightAndMargin BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMarg > auto containingBlockWidth = layoutState.displayBoxForLayoutBox(*layoutBox.containingBlock()).contentBoxWidth(); > auto& displayBox = layoutState.displayBoxForLayoutBox(layoutBox); > >- auto nonCollapsedMargin = VerticalMargin::ComputedValues { computedValueIfNotAuto(style.marginBefore(), containingBlockWidth).value_or(0), >- computedValueIfNotAuto(style.marginAfter(), containingBlockWidth).value_or(0) }; >+ auto nonCollapsedMargin = VerticalMargin::ComputedValues { computedValueIfNotAuto(style.marginBefore(), containingBlockWidth).valueOr(0), >+ computedValueIfNotAuto(style.marginAfter(), containingBlockWidth).valueOr(0) }; > auto collapsedMargin = VerticalMargin::CollapsedValues { MarginCollapse::marginBefore(layoutState, layoutBox), MarginCollapse::marginAfter(layoutState, layoutBox) }; >- auto borderAndPaddingTop = displayBox.borderTop() + displayBox.paddingTop().value_or(0); >+ auto borderAndPaddingTop = displayBox.borderTop() + displayBox.paddingTop().valueOr(0); > > auto height = usedHeight ? usedHeight.value() : computedHeightValue(layoutState, layoutBox, HeightType::Normal); > if (height) >@@ -143,19 +143,19 @@ WidthAndMargin BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin > auto width = computedValueIfNotAuto(usedWidth ? Length { usedWidth.value(), Fixed } : style.logicalWidth(), containingBlockWidth); > auto marginStart = computedValueIfNotAuto(style.marginStart(), containingBlockWidth); > auto marginEnd = computedValueIfNotAuto(style.marginEnd(), containingBlockWidth); >- auto nonComputedMarginStart = marginStart.value_or(0); >- auto nonComputedMarginEnd = marginEnd.value_or(0); >+ auto nonComputedMarginStart = marginStart.valueOr(0); >+ auto nonComputedMarginEnd = marginEnd.valueOr(0); > auto borderLeft = displayBox.borderLeft(); > auto borderRight = displayBox.borderRight(); >- auto paddingLeft = displayBox.paddingLeft().value_or(0); >- auto paddingRight = displayBox.paddingRight().value_or(0); >+ auto paddingLeft = displayBox.paddingLeft().valueOr(0); >+ auto paddingRight = displayBox.paddingRight().valueOr(0); > > // #1 > if (width) { >- auto horizontalSpaceForMargin = containingBlockWidth - (marginStart.value_or(0) + borderLeft + paddingLeft + *width + paddingRight + borderRight + marginEnd.value_or(0)); >+ auto horizontalSpaceForMargin = containingBlockWidth - (marginStart.valueOr(0) + borderLeft + paddingLeft + *width + paddingRight + borderRight + marginEnd.valueOr(0)); > if (horizontalSpaceForMargin < 0) { >- marginStart = marginStart.value_or(0); >- marginEnd = marginEnd.value_or(0); >+ marginStart = marginStart.valueOr(0); >+ marginEnd = marginEnd.valueOr(0); > } > } > >@@ -177,8 +177,8 @@ WidthAndMargin BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin > > // #4 > if (!width) { >- marginStart = marginStart.value_or(0); >- marginEnd = marginEnd.value_or(0); >+ marginStart = marginStart.valueOr(0); >+ marginEnd = marginEnd.valueOr(0); > width = containingBlockWidth - (*marginStart + borderLeft + paddingLeft + paddingRight + borderRight + *marginEnd); > } > >@@ -308,12 +308,12 @@ FormattingContext::InstrinsicWidthConstraints BlockFormattingContext::Geometry:: > ASSERT(childInstrinsicWidthConstraints); > > auto& style = child.style(); >- auto horizontalMarginBorderAndPadding = fixedValue(style.marginStart()).value_or(0) >+ auto horizontalMarginBorderAndPadding = fixedValue(style.marginStart()).valueOr(0) > + LayoutUnit { style.borderLeftWidth() } >- + fixedValue(style.paddingLeft()).value_or(0) >- + fixedValue(style.paddingRight()).value_or(0) >+ + fixedValue(style.paddingLeft()).valueOr(0) >+ + fixedValue(style.paddingRight()).valueOr(0) > + LayoutUnit { style.borderRightWidth() } >- + fixedValue(style.marginEnd()).value_or(0); >+ + fixedValue(style.marginEnd()).valueOr(0); > > minimumIntrinsicWidth = std::max(minimumIntrinsicWidth, childInstrinsicWidthConstraints->minimum + horizontalMarginBorderAndPadding); > maximumIntrinsicWidth = std::max(maximumIntrinsicWidth, childInstrinsicWidthConstraints->maximum + horizontalMarginBorderAndPadding); >diff --git a/Source/WebCore/layout/blockformatting/BlockFormattingContextQuirks.cpp b/Source/WebCore/layout/blockformatting/BlockFormattingContextQuirks.cpp >index fb71b7c080ff3e98ddb3cc499b03e0ec09df6dfe..4606f9dc6628ee03f30c7a95f439fb13e740709d 100644 >--- a/Source/WebCore/layout/blockformatting/BlockFormattingContextQuirks.cpp >+++ b/Source/WebCore/layout/blockformatting/BlockFormattingContextQuirks.cpp >@@ -73,7 +73,7 @@ HeightAndMargin BlockFormattingContext::Quirks::stretchedHeight(const LayoutStat > auto& documentBox = layoutBox.isDocumentBox() ? layoutBox : *layoutBox.parent(); > auto& documentBoxDisplayBox = layoutState.displayBoxForLayoutBox(documentBox); > auto documentBoxVerticalBorders = documentBoxDisplayBox.borderTop() + documentBoxDisplayBox.borderBottom(); >- auto documentBoxVerticalPaddings = documentBoxDisplayBox.paddingTop().value_or(0) + documentBoxDisplayBox.paddingBottom().value_or(0); >+ auto documentBoxVerticalPaddings = documentBoxDisplayBox.paddingTop().valueOr(0) + documentBoxDisplayBox.paddingBottom().valueOr(0); > > auto strechedHeight = layoutState.displayBoxForLayoutBox(initialContainingBlock(layoutBox)).contentBoxHeight(); > strechedHeight -= documentBoxVerticalBorders + documentBoxVerticalPaddings; >diff --git a/Source/WebCore/layout/displaytree/DisplayBox.h b/Source/WebCore/layout/displaytree/DisplayBox.h >index fde094b3c58a85823b0d20b9f60a879bf831b21a..56392f47ee79e30d3f0e21894d3f14bb875d7e89 100644 >--- a/Source/WebCore/layout/displaytree/DisplayBox.h >+++ b/Source/WebCore/layout/displaytree/DisplayBox.h >@@ -133,8 +133,8 @@ public: > LayoutPoint bottomRight() const { return { right(), bottom() }; } > > LayoutSize size() const { return { width(), height() }; } >- LayoutUnit width() const { return borderLeft() + paddingLeft().value_or(0) + contentBoxWidth() + paddingRight().value_or(0) + borderRight(); } >- LayoutUnit height() const { return borderTop() + paddingTop().value_or(0) + contentBoxHeight() + paddingBottom().value_or(0) + borderBottom(); } >+ LayoutUnit width() const { return borderLeft() + paddingLeft().valueOr(0) + contentBoxWidth() + paddingRight().valueOr(0) + borderRight(); } >+ LayoutUnit height() const { return borderTop() + paddingTop().valueOr(0) + contentBoxHeight() + paddingBottom().valueOr(0) + borderBottom(); } > Rect rect() const { return { top(), left(), width(), height() }; } > Rect rectWithMargin() const { return { top() - marginBefore(), left() - marginStart(), marginStart() + width() + marginEnd(), marginBefore() + height() + marginAfter() }; } > >@@ -161,8 +161,8 @@ public: > Optional<LayoutUnit> paddingBottom() const; > Optional<LayoutUnit> paddingRight() const; > >- LayoutUnit contentBoxTop() const { return borderTop() + paddingTop().value_or(0); } >- LayoutUnit contentBoxLeft() const { return borderLeft() + paddingLeft().value_or(0); } >+ LayoutUnit contentBoxTop() const { return borderTop() + paddingTop().valueOr(0); } >+ LayoutUnit contentBoxLeft() const { return borderLeft() + paddingLeft().valueOr(0); } > LayoutUnit contentBoxBottom() const { return contentBoxTop() + contentBoxHeight(); } > LayoutUnit contentBoxRight() const { return contentBoxLeft() + contentBoxWidth(); } > LayoutUnit contentBoxHeight() const; >diff --git a/Source/WebCore/layout/floats/FloatingContext.cpp b/Source/WebCore/layout/floats/FloatingContext.cpp >index d9dc8e6c3da511cfafa4f294fac844b84738e9ec..71fc0606522780dbad23a98f5994a8538ca32e39 100644 >--- a/Source/WebCore/layout/floats/FloatingContext.cpp >+++ b/Source/WebCore/layout/floats/FloatingContext.cpp >@@ -464,7 +464,7 @@ void Iterator::set(PositionInContextRoot verticalPosition) > > auto index = floatingType == Float::Left ? m_current.m_leftIndex : m_current.m_rightIndex; > // Start from the end if we don't have current yet. >- index = index.value_or(m_floats.size()); >+ index = index.valueOr(m_floats.size()); > while (true) { > index = previousFloatingIndex(floatingType, m_floats, *index); > if (!index) >diff --git a/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp b/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp >index 6f86264efefd031712c009fb28eb498b43fd3b0c..e21b874072756ade164bb8f70605759805069743 100644 >--- a/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp >+++ b/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp >@@ -264,7 +264,7 @@ void InlineFormattingContext::appendContentToLine(Line& line, const InlineRunPro > line.appendContent(run, runSize); > > if (root().style().textAlign() == TextAlignMode::Justify) >- Geometry::computeExpansionOpportunities(line, run, lastRunType.value_or(InlineRunProvider::Run::Type::NonWhitespace)); >+ Geometry::computeExpansionOpportunities(line, run, lastRunType.valueOr(InlineRunProvider::Run::Type::NonWhitespace)); > } > > void InlineFormattingContext::layoutInlineContent(const InlineRunProvider& inlineRunProvider) const >@@ -415,7 +415,7 @@ void InlineFormattingContext::placeInFlowPositionedChildren(unsigned fistRunInde > for (auto* box = &layoutBox; box != &root(); box = box->parent()) { > if (!box->isInFlowPositioned()) > continue; >- offset = offset.value_or(LayoutSize()) + Geometry::inFlowPositionedPositionOffset(layoutState(), *box); >+ offset = offset.valueOr(LayoutSize()) + Geometry::inFlowPositionedPositionOffset(layoutState(), *box); > } > return offset; > }; >diff --git a/Source/WebCore/loader/FrameLoader.cpp b/Source/WebCore/loader/FrameLoader.cpp >index 0d673e9091a4b19c1754dff13e274119e4cadda5..2dbe6ae806a5bbd32db1b61070bf7276f2e370d6 100644 >--- a/Source/WebCore/loader/FrameLoader.cpp >+++ b/Source/WebCore/loader/FrameLoader.cpp >@@ -384,7 +384,7 @@ void FrameLoader::urlSelected(const URL& url, const String& passedTarget, Event* > auto* frame = lexicalFrameFromCommonVM(); > auto initiatedByMainFrame = frame && frame->isMainFrame() ? InitiatedByMainFrame::Yes : InitiatedByMainFrame::Unknown; > >- NewFrameOpenerPolicy newFrameOpenerPolicy = openerPolicy.value_or(shouldSendReferrer == NeverSendReferrer ? NewFrameOpenerPolicy::Suppress : NewFrameOpenerPolicy::Allow); >+ NewFrameOpenerPolicy newFrameOpenerPolicy = openerPolicy.valueOr(shouldSendReferrer == NeverSendReferrer ? NewFrameOpenerPolicy::Suppress : NewFrameOpenerPolicy::Allow); > urlSelected(FrameLoadRequest(*m_frame.document(), m_frame.document()->securityOrigin(), { url }, passedTarget, lockHistory, lockBackForwardList, shouldSendReferrer, AllowNavigationToInvalidURL::Yes, newFrameOpenerPolicy, shouldOpenExternalURLsPolicy, initiatedByMainFrame, DoNotReplaceDocumentIfJavaScriptURL, downloadAttribute, systemPreviewInfo), triggeringEvent); > } > >diff --git a/Source/WebCore/loader/NavigationAction.cpp b/Source/WebCore/loader/NavigationAction.cpp >index ba157991414528bdfdd460b6e337bedef5df61de..54544d6bb9efc524ad902b1d7ff434d732443047 100644 >--- a/Source/WebCore/loader/NavigationAction.cpp >+++ b/Source/WebCore/loader/NavigationAction.cpp >@@ -40,7 +40,7 @@ namespace WebCore { > NavigationAction::Requester::Requester(const Document& document) > : m_url { URL { document.url() } } > , m_origin { makeRefPtr(document.securityOrigin()) } >- , m_pageIDAndFrameIDPair { document.frame() ? std::make_pair(document.frame()->loader().client().pageID().value_or(0), document.frame()->loader().client().frameID().value_or(0)) : std::make_pair<uint64_t, uint64_t>(0, 0) } >+ , m_pageIDAndFrameIDPair { document.frame() ? std::make_pair(document.frame()->loader().client().pageID().valueOr(0), document.frame()->loader().client().frameID().valueOr(0)) : std::make_pair<uint64_t, uint64_t>(0, 0) } > { > } > >diff --git a/Source/WebCore/page/FrameView.cpp b/Source/WebCore/page/FrameView.cpp >index 4542f0bf7549562700a6b62c1bcd51f6dde414db..a7e0a5e6008e8c3c7ae6ee1818ed57b093a32c0c 100644 >--- a/Source/WebCore/page/FrameView.cpp >+++ b/Source/WebCore/page/FrameView.cpp >@@ -1671,7 +1671,7 @@ void FrameView::setLayoutViewportOverrideRect(Optional<LayoutRect> rect, Trigger > if (oldRect.height() != layoutViewportRect().height()) > layoutTriggering = TriggerLayoutOrNot::Yes; > >- LOG_WITH_STREAM(Scrolling, stream << "\nFrameView " << this << " setLayoutViewportOverrideRect() - changing override layout viewport from " << oldRect << " to " << m_layoutViewportOverrideRect.value_or(LayoutRect()) << " layoutTriggering " << (layoutTriggering == TriggerLayoutOrNot::Yes ? "yes" : "no")); >+ LOG_WITH_STREAM(Scrolling, stream << "\nFrameView " << this << " setLayoutViewportOverrideRect() - changing override layout viewport from " << oldRect << " to " << m_layoutViewportOverrideRect.valueOr(LayoutRect()) << " layoutTriggering " << (layoutTriggering == TriggerLayoutOrNot::Yes ? "yes" : "no")); > > if (oldRect != layoutViewportRect() && layoutTriggering == TriggerLayoutOrNot::Yes) > setViewportConstrainedObjectsNeedLayout(); >@@ -4823,7 +4823,7 @@ IntPoint FrameView::convertFromContainingView(const IntPoint& parentPoint) const > float FrameView::documentToAbsoluteScaleFactor(Optional<float> effectiveZoom) const > { > // If effectiveZoom is passed, it already factors in pageZoomFactor(). >- return effectiveZoom.value_or(frame().pageZoomFactor()) * frame().frameScaleFactor(); >+ return effectiveZoom.valueOr(frame().pageZoomFactor()) * frame().frameScaleFactor(); > } > > float FrameView::absoluteToDocumentScaleFactor(Optional<float> effectiveZoom) const >@@ -5370,16 +5370,16 @@ IntSize FrameView::viewportSizeForCSSViewportUnits() const > > if (useFixedLayout()) { > auto fixedLayoutSize = this->fixedLayoutSize(); >- viewportSize.width = viewportSize.width.value_or(fixedLayoutSize.width()); >- viewportSize.height = viewportSize.height.value_or(fixedLayoutSize.height()); >+ viewportSize.width = viewportSize.width.valueOr(fixedLayoutSize.width()); >+ viewportSize.height = viewportSize.height.valueOr(fixedLayoutSize.height()); > return { *viewportSize.width, *viewportSize.height }; > } > > // FIXME: the value returned should take into account the value of the overflow > // property on the root element. > auto visibleContentSizeIncludingScrollbars = visibleContentRectIncludingScrollbars().size(); >- viewportSize.width = viewportSize.width.value_or(visibleContentSizeIncludingScrollbars.width()); >- viewportSize.height = viewportSize.height.value_or(visibleContentSizeIncludingScrollbars.height()); >+ viewportSize.width = viewportSize.width.valueOr(visibleContentSizeIncludingScrollbars.width()); >+ viewportSize.height = viewportSize.height.valueOr(visibleContentSizeIncludingScrollbars.height()); > return { *viewportSize.width, *viewportSize.height }; > } > >diff --git a/Source/WebCore/page/Page.cpp b/Source/WebCore/page/Page.cpp >index e7251ee1a15fe2e1d803fece598e4c3bf2c63ba6..63d6e94862ea9df0fba084f5cb26bd467482d371 100644 >--- a/Source/WebCore/page/Page.cpp >+++ b/Source/WebCore/page/Page.cpp >@@ -1128,7 +1128,7 @@ bool Page::isLowPowerModeEnabled() const > void Page::setLowPowerModeEnabledOverrideForTesting(Optional<bool> isEnabled) > { > m_lowPowerModeEnabledOverrideForTesting = isEnabled; >- handleLowModePowerChange(m_lowPowerModeEnabledOverrideForTesting.value_or(false)); >+ handleLowModePowerChange(m_lowPowerModeEnabledOverrideForTesting.valueOr(false)); > } > > void Page::setTopContentInset(float contentInset) >diff --git a/Source/WebCore/page/SecurityOriginData.cpp b/Source/WebCore/page/SecurityOriginData.cpp >index 12364424527962b89f4780c51bc6baa3a3704456..05f8b19dae5879d0cdfda7c7649eca2b44c398a6 100644 >--- a/Source/WebCore/page/SecurityOriginData.cpp >+++ b/Source/WebCore/page/SecurityOriginData.cpp >@@ -80,7 +80,7 @@ String SecurityOriginData::databaseIdentifier() const > stringBuilder.append(separatorCharacter); > stringBuilder.append(FileSystem::encodeForFileName(host)); > stringBuilder.append(separatorCharacter); >- stringBuilder.appendNumber(port.value_or(0)); >+ stringBuilder.appendNumber(port.valueOr(0)); > > return stringBuilder.toString(); > } >diff --git a/Source/WebCore/page/SecurityOriginData.h b/Source/WebCore/page/SecurityOriginData.h >index 59251022aa28ac50dd8ee2b3669707d0894cc543..244371e20b1adf1ec5ce35b819ead9479633f85b 100644 >--- a/Source/WebCore/page/SecurityOriginData.h >+++ b/Source/WebCore/page/SecurityOriginData.h >@@ -134,7 +134,7 @@ struct SecurityOriginDataHash { > unsigned hashCodes[3] = { > data.protocol.impl() ? data.protocol.impl()->hash() : 0, > data.host.impl() ? data.host.impl()->hash() : 0, >- data.port.value_or(0) >+ data.port.valueOr(0) > }; > return StringHasher::hashMemory<sizeof(hashCodes)>(hashCodes); > } >diff --git a/Source/WebCore/page/SecurityOriginHash.h b/Source/WebCore/page/SecurityOriginHash.h >index e0148a2d05d99b0dddf06a23d246d53452cb2c13..f9a52fa1f413a712d8aee895818f8f351ae93e7a 100644 >--- a/Source/WebCore/page/SecurityOriginHash.h >+++ b/Source/WebCore/page/SecurityOriginHash.h >@@ -40,7 +40,7 @@ struct SecurityOriginHash { > unsigned hashCodes[3] = { > origin->protocol().impl() ? origin->protocol().impl()->hash() : 0, > origin->host().impl() ? origin->host().impl()->hash() : 0, >- origin->port().value_or(0) >+ origin->port().valueOr(0) > }; > return StringHasher::hashMemory<sizeof(hashCodes)>(hashCodes); > } >diff --git a/Source/WebCore/page/ViewportConfiguration.cpp b/Source/WebCore/page/ViewportConfiguration.cpp >index 1d36b8eeb0bec052e6100d0edeb311326326e711..ca9cd96850c7f46bc16349b9205c81e0de87b11c 100644 >--- a/Source/WebCore/page/ViewportConfiguration.cpp >+++ b/Source/WebCore/page/ViewportConfiguration.cpp >@@ -116,8 +116,8 @@ bool ViewportConfiguration::setContentsSize(const IntSize& contentSize) > > bool ViewportConfiguration::setViewLayoutSize(const FloatSize& viewLayoutSize, Optional<double>&& scaleFactor, Optional<double>&& minimumEffectiveDeviceWidth) > { >- double newScaleFactor = scaleFactor.value_or(m_layoutSizeScaleFactor); >- double newEffectiveWidth = minimumEffectiveDeviceWidth.value_or(m_minimumEffectiveDeviceWidth); >+ double newScaleFactor = scaleFactor.valueOr(m_layoutSizeScaleFactor); >+ double newEffectiveWidth = minimumEffectiveDeviceWidth.valueOr(m_minimumEffectiveDeviceWidth); > if (m_viewLayoutSize == viewLayoutSize && m_layoutSizeScaleFactor == newScaleFactor && newEffectiveWidth == m_minimumEffectiveDeviceWidth) > return false; > >diff --git a/Source/WebCore/page/WindowFeatures.cpp b/Source/WebCore/page/WindowFeatures.cpp >index 1dbbd56cdfdf6e51ae0b71c6b11cb8e115c94f55..078f897ba9fa602feb61de6158902e88be8f0d12 100644 >--- a/Source/WebCore/page/WindowFeatures.cpp >+++ b/Source/WebCore/page/WindowFeatures.cpp >@@ -182,8 +182,8 @@ WindowFeatures parseDialogFeatures(const String& dialogFeaturesString, const Flo > features.locationBarVisible = false; > features.dialog = true; > >- float width = floatFeature(featuresMap, "dialogwidth", 100, screenAvailableRect.width()).value_or(620); // default here came from frame size of dialog in MacIE >- float height = floatFeature(featuresMap, "dialogheight", 100, screenAvailableRect.height()).value_or(450); // default here came from frame size of dialog in MacIE >+ float width = floatFeature(featuresMap, "dialogwidth", 100, screenAvailableRect.width()).valueOr(620); // default here came from frame size of dialog in MacIE >+ float height = floatFeature(featuresMap, "dialogheight", 100, screenAvailableRect.height()).valueOr(450); // default here came from frame size of dialog in MacIE > > features.width = width; > features.height = height; >@@ -191,16 +191,16 @@ WindowFeatures parseDialogFeatures(const String& dialogFeaturesString, const Flo > features.x = floatFeature(featuresMap, "dialogleft", screenAvailableRect.x(), screenAvailableRect.maxX() - width); > features.y = floatFeature(featuresMap, "dialogtop", screenAvailableRect.y(), screenAvailableRect.maxY() - height); > >- if (boolFeature(featuresMap, "center").value_or(true)) { >+ if (boolFeature(featuresMap, "center").valueOr(true)) { > if (!features.x) > features.x = screenAvailableRect.x() + (screenAvailableRect.width() - width) / 2; > if (!features.y) > features.y = screenAvailableRect.y() + (screenAvailableRect.height() - height) / 2; > } > >- features.resizable = boolFeature(featuresMap, "resizable").value_or(false); >- features.scrollbarsVisible = boolFeature(featuresMap, "scroll").value_or(true); >- features.statusBarVisible = boolFeature(featuresMap, "status").value_or(false); >+ features.resizable = boolFeature(featuresMap, "resizable").valueOr(false); >+ features.scrollbarsVisible = boolFeature(featuresMap, "scroll").valueOr(true); >+ features.statusBarVisible = boolFeature(featuresMap, "status").valueOr(false); > > return features; > } >diff --git a/Source/WebCore/page/animation/AnimationBase.cpp b/Source/WebCore/page/animation/AnimationBase.cpp >index 90be9840ecc7709d81fe19263bd906f982988bf2..3a74f96934869d33d6c952c12d668ef6306043af 100644 >--- a/Source/WebCore/page/animation/AnimationBase.cpp >+++ b/Source/WebCore/page/animation/AnimationBase.cpp >@@ -207,7 +207,7 @@ void AnimationBase::updateStateMachine(AnimationStateInput input, double param) > if (input == AnimationStateInput::ResumeOverride) { > if (m_animationState == AnimationState::Looping || m_animationState == AnimationState::Ending) { > // Start the animation >- startAnimation(beginAnimationUpdateTime() - m_startTime.value_or(0)); >+ startAnimation(beginAnimationUpdateTime() - m_startTime.valueOr(0)); > } > return; > } >@@ -313,7 +313,7 @@ void AnimationBase::updateStateMachine(AnimationStateInput input, double param) > // We are pausing while waiting for a start response. Cancel the animation and wait. When > // we unpause, we will act as though the start timer just fired > m_pauseTime = beginAnimationUpdateTime(); >- pauseAnimation(beginAnimationUpdateTime() - m_startTime.value_or(0)); >+ pauseAnimation(beginAnimationUpdateTime() - m_startTime.valueOr(0)); > LOG(Animations, "%p AnimationState %s -> PausedWaitResponse", this, nameForState(m_animationState)); > m_animationState = AnimationState::PausedWaitResponse; > } >@@ -333,7 +333,7 @@ void AnimationBase::updateStateMachine(AnimationStateInput input, double param) > } else { > // We are pausing while running. Cancel the animation and wait > m_pauseTime = beginAnimationUpdateTime(); >- pauseAnimation(beginAnimationUpdateTime() - m_startTime.value_or(0)); >+ pauseAnimation(beginAnimationUpdateTime() - m_startTime.valueOr(0)); > LOG(Animations, "%p AnimationState %s -> PausedRun", this, nameForState(m_animationState)); > m_animationState = AnimationState::PausedRun; > } >@@ -365,7 +365,7 @@ void AnimationBase::updateStateMachine(AnimationStateInput input, double param) > } else { > // We are pausing while running. Cancel the animation and wait > m_pauseTime = beginAnimationUpdateTime(); >- pauseAnimation(beginAnimationUpdateTime() - m_startTime.value_or(0)); >+ pauseAnimation(beginAnimationUpdateTime() - m_startTime.valueOr(0)); > LOG(Animations, "%p AnimationState %s -> PausedRun", this, nameForState(m_animationState)); > m_animationState = AnimationState::PausedRun; > } >@@ -375,7 +375,7 @@ void AnimationBase::updateStateMachine(AnimationStateInput input, double param) > ASSERT(input == AnimationStateInput::PlayStateRunning); > ASSERT(paused()); > // Update the times >- m_startTime = m_startTime.value_or(0) + beginAnimationUpdateTime() - m_pauseTime.value_or(0); >+ m_startTime = m_startTime.valueOr(0) + beginAnimationUpdateTime() - m_pauseTime.valueOr(0); > m_pauseTime = WTF::nullopt; > > // we were waiting for the start timer to fire, go back and wait again >@@ -407,7 +407,7 @@ void AnimationBase::updateStateMachine(AnimationStateInput input, double param) > > // Update the times > if (m_animationState == AnimationState::PausedRun) >- m_startTime = m_startTime.value_or(0) + beginAnimationUpdateTime() - m_pauseTime.value_or(0); >+ m_startTime = m_startTime.valueOr(0) + beginAnimationUpdateTime() - m_pauseTime.valueOr(0); > else > m_startTime = 0; > >@@ -430,7 +430,7 @@ void AnimationBase::updateStateMachine(AnimationStateInput input, double param) > updateStateMachine(AnimationStateInput::StartTimeSet, beginAnimationUpdateTime()); > m_isAccelerated = true; > } else { >- bool started = startAnimation(beginAnimationUpdateTime() - m_startTime.value_or(0)); >+ bool started = startAnimation(beginAnimationUpdateTime() - m_startTime.valueOr(0)); > m_compositeAnimation->animationController().addToAnimationsWaitingForStartTimeResponse(this, started); > m_isAccelerated = started; > } >@@ -447,7 +447,7 @@ void AnimationBase::updateStateMachine(AnimationStateInput input, double param) > m_animationState = AnimationState::PausedRun; > ASSERT(!m_startTime); > m_startTime = param; >- m_pauseTime = m_pauseTime.value_or(0) + param; >+ m_pauseTime = m_pauseTime.valueOr(0) + param; > break; > } > >@@ -494,7 +494,7 @@ void AnimationBase::fireAnimationEventsIfNeeded() > return; > } > >- double elapsedDuration = beginAnimationUpdateTime() - m_startTime.value_or(0); >+ double elapsedDuration = beginAnimationUpdateTime() - m_startTime.valueOr(0); > > // FIXME: we need to ensure that elapsedDuration is never < 0. If it is, this suggests that > // we had a recalcStyle() outside of beginAnimationUpdate()/endAnimationUpdate(). >@@ -631,9 +631,9 @@ double AnimationBase::progress(double scale, double offset, const TimingFunction > void AnimationBase::getTimeToNextEvent(Seconds& time, bool& isLooping) const > { > // Decide when the end or loop event needs to fire >- const double elapsedDuration = std::max(beginAnimationUpdateTime() - m_startTime.value_or(0), 0.0); >+ const double elapsedDuration = std::max(beginAnimationUpdateTime() - m_startTime.valueOr(0), 0.0); > double durationLeft = 0; >- double nextIterationTime = m_totalDuration.value_or(0); >+ double nextIterationTime = m_totalDuration.valueOr(0); > > if (!m_totalDuration || elapsedDuration < m_totalDuration.value()) { > durationLeft = m_animation->duration() > 0 ? (m_animation->duration() - fmod(elapsedDuration, m_animation->duration())) : 0; >@@ -675,9 +675,9 @@ void AnimationBase::freezeAtTime(double t) > > ASSERT(m_startTime); // If m_startTime is zero, we haven't started yet, so we'll get a bad pause time. > if (t <= m_animation->delay()) >- m_pauseTime = m_startTime.value_or(0); >+ m_pauseTime = m_startTime.valueOr(0); > else >- m_pauseTime = m_startTime.value_or(0) + t - m_animation->delay(); >+ m_pauseTime = m_startTime.valueOr(0) + t - m_animation->delay(); > > if (auto* renderer = compositedRenderer()) > renderer->suspendAnimations(MonotonicTime::fromRawSeconds(m_pauseTime.value())); >@@ -695,16 +695,16 @@ double AnimationBase::getElapsedTime() const > { > if (paused()) { > double delayOffset = (!m_startTime && m_animation->delay() < 0) ? m_animation->delay() : 0; >- return m_pauseTime.value_or(0) - m_startTime.value_or(0) - delayOffset; >+ return m_pauseTime.valueOr(0) - m_startTime.valueOr(0) - delayOffset; > } > > if (!m_startTime) > return 0; > > if (postActive() || fillingForwards()) >- return m_totalDuration.value_or(0); >+ return m_totalDuration.valueOr(0); > >- return beginAnimationUpdateTime() - m_startTime.value_or(0); >+ return beginAnimationUpdateTime() - m_startTime.valueOr(0); > } > > void AnimationBase::setElapsedTime(double time) >diff --git a/Source/WebCore/page/animation/CSSAnimationController.cpp b/Source/WebCore/page/animation/CSSAnimationController.cpp >index 250e6d68028eef91811225e3956b8f9fcbc644e8..dc1ceab3ab2094a4a627f563df98757eb60104a3 100644 >--- a/Source/WebCore/page/animation/CSSAnimationController.cpp >+++ b/Source/WebCore/page/animation/CSSAnimationController.cpp >@@ -178,7 +178,7 @@ void CSSAnimationControllerPrivate::updateAnimationTimer(SetChanged callSetChang > { > Optional<Seconds> timeToNextService = updateAnimations(callSetChanged); > >- LOG(Animations, "updateAnimationTimer: timeToNextService is %.2f", timeToNextService.value_or(Seconds { -1 }).value()); >+ LOG(Animations, "updateAnimationTimer: timeToNextService is %.2f", timeToNextService.valueOr(Seconds { -1 }).value()); > > // If we don't need service, we want to make sure the timer is no longer running > if (!timeToNextService) { >diff --git a/Source/WebCore/page/cocoa/ResourceUsageThreadCocoa.mm b/Source/WebCore/page/cocoa/ResourceUsageThreadCocoa.mm >index efd836afd68d32394fe54727449d68db9f43d486..698fb8de64deb11f43dca5b31999a4ea1bedb348 100644 >--- a/Source/WebCore/page/cocoa/ResourceUsageThreadCocoa.mm >+++ b/Source/WebCore/page/cocoa/ResourceUsageThreadCocoa.mm >@@ -249,8 +249,8 @@ void ResourceUsageThread::platformThreadBody(JSC::VM* vm, ResourceUsageData& dat > data.totalExternalSize = currentGCOwnedExternal; > > auto now = MonotonicTime::now(); >- data.timeOfNextEdenCollection = now + vm->heap.edenActivityCallback()->timeUntilFire().value_or(Seconds(std::numeric_limits<double>::infinity())); >- data.timeOfNextFullCollection = now + vm->heap.fullActivityCallback()->timeUntilFire().value_or(Seconds(std::numeric_limits<double>::infinity())); >+ data.timeOfNextEdenCollection = now + vm->heap.edenActivityCallback()->timeUntilFire().valueOr(Seconds(std::numeric_limits<double>::infinity())); >+ data.timeOfNextFullCollection = now + vm->heap.fullActivityCallback()->timeUntilFire().valueOr(Seconds(std::numeric_limits<double>::infinity())); > } > > } >diff --git a/Source/WebCore/page/linux/ResourceUsageThreadLinux.cpp b/Source/WebCore/page/linux/ResourceUsageThreadLinux.cpp >index dcafb6f8affedb94b58a7639fc03a346506414a5..1562a08c57991dedae71066f0cfec39c81984e64 100644 >--- a/Source/WebCore/page/linux/ResourceUsageThreadLinux.cpp >+++ b/Source/WebCore/page/linux/ResourceUsageThreadLinux.cpp >@@ -170,8 +170,8 @@ void ResourceUsageThread::platformThreadBody(JSC::VM* vm, ResourceUsageData& dat > data.totalExternalSize = currentGCOwnedExternal; > > auto now = MonotonicTime::now(); >- data.timeOfNextEdenCollection = now + vm->heap.edenActivityCallback()->timeUntilFire().value_or(Seconds(std::numeric_limits<double>::infinity())); >- data.timeOfNextFullCollection = now + vm->heap.fullActivityCallback()->timeUntilFire().value_or(Seconds(std::numeric_limits<double>::infinity())); >+ data.timeOfNextEdenCollection = now + vm->heap.edenActivityCallback()->timeUntilFire().valueOr(Seconds(std::numeric_limits<double>::infinity())); >+ data.timeOfNextFullCollection = now + vm->heap.fullActivityCallback()->timeUntilFire().valueOr(Seconds(std::numeric_limits<double>::infinity())); > } > > } // namespace WebCore >diff --git a/Source/WebCore/platform/graphics/ComplexTextController.cpp b/Source/WebCore/platform/graphics/ComplexTextController.cpp >index f479f9bec9ce3d62617b739ac5a78d52e60e88df..9a9c97686126f31c4dca92ec3a9935904ec55378 100644 >--- a/Source/WebCore/platform/graphics/ComplexTextController.cpp >+++ b/Source/WebCore/platform/graphics/ComplexTextController.cpp >@@ -222,12 +222,12 @@ unsigned ComplexTextController::offsetForPosition(float h, bool includePartialGl > if (cursorPositionIterator.isBoundary(hitIndex)) > clusterStart = hitIndex; > else >- clusterStart = cursorPositionIterator.preceding(hitIndex).value_or(0); >+ clusterStart = cursorPositionIterator.preceding(hitIndex).valueOr(0); > > if (!includePartialGlyphs) > return complexTextRun.stringLocation() + clusterStart; > >- unsigned clusterEnd = cursorPositionIterator.following(hitIndex).value_or(stringLength); >+ unsigned clusterEnd = cursorPositionIterator.following(hitIndex).valueOr(stringLength); > > float clusterWidth; > // FIXME: The search stops at the boundaries of complexTextRun. In theory, it should go on into neighboring ComplexTextRuns >diff --git a/Source/WebCore/platform/graphics/FontCache.h b/Source/WebCore/platform/graphics/FontCache.h >index d40d3b9b23d7502bf16e240a60f4c310b28c16fd..b635a13cc48840f08e371f7c882cedbe00215a66 100644 >--- a/Source/WebCore/platform/graphics/FontCache.h >+++ b/Source/WebCore/platform/graphics/FontCache.h >@@ -113,7 +113,7 @@ struct FontDescriptionKey { > hasher.add(m_size); > hasher.add(m_fontSelectionRequest.weight); > hasher.add(m_fontSelectionRequest.width); >- hasher.add(m_fontSelectionRequest.slope.value_or(normalItalicValue())); >+ hasher.add(m_fontSelectionRequest.slope.valueOr(normalItalicValue())); > hasher.add(m_locale.existingHash()); > for (unsigned flagItem : m_flags) > hasher.add(flagItem); >diff --git a/Source/WebCore/platform/graphics/FontCascade.cpp b/Source/WebCore/platform/graphics/FontCascade.cpp >index 3432dca62ed92d064de259230f8630886f1c7ec8..b3b64681fc466ba69dcc63d4e96c450414e310bc 100644 >--- a/Source/WebCore/platform/graphics/FontCascade.cpp >+++ b/Source/WebCore/platform/graphics/FontCascade.cpp >@@ -286,7 +286,7 @@ float FontCascade::glyphBufferForTextRun(CodePath codePathToUse, const TextRun& > > float FontCascade::drawText(GraphicsContext& context, const TextRun& run, const FloatPoint& point, unsigned from, Optional<unsigned> to, CustomFontNotReadyAction customFontNotReadyAction) const > { >- unsigned destination = to.value_or(run.length()); >+ unsigned destination = to.valueOr(run.length()); > GlyphBuffer glyphBuffer; > float startX = point.x() + glyphBufferForTextRun(codePath(run, from, to), run, from, destination, glyphBuffer); > // We couldn't generate any glyphs for the run. Give up. >@@ -303,7 +303,7 @@ void FontCascade::drawEmphasisMarks(GraphicsContext& context, const TextRun& run > if (isLoadingCustomFonts()) > return; > >- unsigned destination = to.value_or(run.length()); >+ unsigned destination = to.valueOr(run.length()); > if (codePath(run, from, to) != Complex) > drawEmphasisMarksForSimpleText(context, run, mark, point, from, destination); > else >@@ -313,7 +313,7 @@ void FontCascade::drawEmphasisMarks(GraphicsContext& context, const TextRun& run > std::unique_ptr<DisplayList::DisplayList> FontCascade::displayListForTextRun(GraphicsContext& context, const TextRun& run, unsigned from, Optional<unsigned> to, CustomFontNotReadyAction customFontNotReadyAction) const > { > ASSERT(!context.paintingDisabled()); >- unsigned destination = to.value_or(run.length()); >+ unsigned destination = to.valueOr(run.length()); > > // FIXME: Use the fast code path once it handles partial runs with kerning and ligatures. See http://webkit.org/b/100050 > CodePath codePathToUse = codePath(run); >@@ -545,7 +545,7 @@ bool FontCascade::fastAverageCharWidthIfAvailable(float& width) const > > void FontCascade::adjustSelectionRectForText(const TextRun& run, LayoutRect& selectionRect, unsigned from, Optional<unsigned> to) const > { >- unsigned destination = to.value_or(run.length()); >+ unsigned destination = to.valueOr(run.length()); > if (codePath(run, from, to) != Complex) > return adjustSelectionRectForSimpleText(run, selectionRect, from, destination); > >@@ -619,7 +619,7 @@ FontCascade::CodePath FontCascade::codePath(const TextRun& run, Optional<unsigne > > #if !USE(FREETYPE) > // FIXME: Use the fast code path once it handles partial runs with kerning and ligatures. See http://webkit.org/b/100050 >- if ((enableKerning() || requiresShaping()) && (from.value_or(0) || to.value_or(run.length()) != run.length())) >+ if ((enableKerning() || requiresShaping()) && (from.valueOr(0) || to.valueOr(run.length()) != run.length())) > return Complex; > #else > UNUSED_PARAM(from); >diff --git a/Source/WebCore/platform/graphics/FontSelectionAlgorithm.cpp b/Source/WebCore/platform/graphics/FontSelectionAlgorithm.cpp >index 357b4023ee08da0cde89682d8dcc778e1c8efe03..6e5f8b49b7c4a4a74b89ee40643f1c8bd12d256c 100644 >--- a/Source/WebCore/platform/graphics/FontSelectionAlgorithm.cpp >+++ b/Source/WebCore/platform/graphics/FontSelectionAlgorithm.cpp >@@ -66,7 +66,7 @@ auto FontSelectionAlgorithm::stretchDistance(Capabilities capabilities) const -> > auto FontSelectionAlgorithm::styleDistance(Capabilities capabilities) const -> DistanceResult > { > auto slope = capabilities.slope; >- auto requestSlope = m_request.slope.value_or(normalItalicValue()); >+ auto requestSlope = m_request.slope.valueOr(normalItalicValue()); > ASSERT(slope.isValid()); > if (slope.includes(requestSlope)) > return { FontSelectionValue(), requestSlope }; >diff --git a/Source/WebCore/platform/graphics/FontSelectionAlgorithm.h b/Source/WebCore/platform/graphics/FontSelectionAlgorithm.h >index ab47057a14c1779e58fb9720e39ad38a1b74d7ec..6b11b9a3188ec5a49d52091ae713bd1d5f248bd7 100644 >--- a/Source/WebCore/platform/graphics/FontSelectionAlgorithm.h >+++ b/Source/WebCore/platform/graphics/FontSelectionAlgorithm.h >@@ -353,7 +353,7 @@ inline TextStream& operator<<(TextStream& ts, const FontSelectionValue& fontSele > > inline TextStream& operator<<(TextStream& ts, const Optional<FontSelectionValue>& optionalFontSelectionValue) > { >- ts << optionalFontSelectionValue.value_or(normalItalicValue()); >+ ts << optionalFontSelectionValue.valueOr(normalItalicValue()); > return ts; > } > >@@ -432,17 +432,17 @@ struct FontSelectionSpecifiedCapabilities { > > constexpr Range computeWeight() const > { >- return weight.value_or(Range { normalWeightValue() }); >+ return weight.valueOr(Range { normalWeightValue() }); > } > > constexpr Range computeWidth() const > { >- return width.value_or(Range { normalStretchValue() }); >+ return width.valueOr(Range { normalStretchValue() }); > } > > constexpr Range computeSlope() const > { >- return slope.value_or(Range { normalItalicValue() }); >+ return slope.valueOr(Range { normalItalicValue() }); > } > > OptionalRange weight; >diff --git a/Source/WebCore/platform/graphics/ShadowBlur.cpp b/Source/WebCore/platform/graphics/ShadowBlur.cpp >index fe049a4b8e6703d61bc1adb5006885fcc7ed3fa5..fdc2b78bc65b0fb629a564c103d1984cd2865d4c 100644 >--- a/Source/WebCore/platform/graphics/ShadowBlur.cpp >+++ b/Source/WebCore/platform/graphics/ShadowBlur.cpp >@@ -390,7 +390,7 @@ IntSize ShadowBlur::calculateLayerBoundingRect(const AffineTransform& transform, > if (m_shadowsIgnoreTransforms && !transform.isIdentity()) { > FloatQuad transformedPolygon = transform.mapQuad(FloatQuad(shadowedRect)); > transformedPolygon.move(m_offset); >- layerRect = transform.inverse().value_or(AffineTransform()).mapQuad(transformedPolygon).boundingBox(); >+ layerRect = transform.inverse().valueOr(AffineTransform()).mapQuad(transformedPolygon).boundingBox(); > } else { > layerRect = shadowedRect; > layerRect.move(m_offset); >diff --git a/Source/WebCore/platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp b/Source/WebCore/platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp >index 1656458c453ae384f1c2ec9d358dd9c38b811f52..5d6a937b8664a31fcc6270079f6fca67b32c25ba 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp >+++ b/Source/WebCore/platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp >@@ -89,7 +89,7 @@ void WebCoreAVCFResourceLoader::startLoading() > CachingPolicy::DisallowCaching)); > > CachedResourceLoader* loader = m_parent->player()->cachedResourceLoader(); >- m_resource = loader ? loader->requestRawResource(WTFMove(request)).value_or(nullptr) : nullptr; >+ m_resource = loader ? loader->requestRawResource(WTFMove(request)).valueOr(nullptr) : nullptr; > if (m_resource) > m_resource->addClient(*this); > else { >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >index 7b935bf1b326658567c82e7aa4e9b9cff6692c20..cf7dc0c4d896b5590c210f29dbf8e1c16959c106 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >@@ -2350,7 +2350,7 @@ void MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput(GraphicsContext& c > GraphicsContextStateSaver stateSaver(context); > FloatRect imageRect(0, 0, CGImageGetWidth(m_lastImage.get()), CGImageGetHeight(m_lastImage.get())); > AffineTransform videoTransform = [firstEnabledVideoTrack preferredTransform]; >- FloatRect transformedOutputRect = videoTransform.inverse().value_or(AffineTransform()).mapRect(outputRect); >+ FloatRect transformedOutputRect = videoTransform.inverse().valueOr(AffineTransform()).mapRect(outputRect); > > context.concatCTM(videoTransform); > context.drawNativeImage(m_lastImage.get(), imageRect.size(), transformedOutputRect, imageRect); >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm >index 1b07b4eb80240ed6d50d0773b8763d44dab97d5f..238a2ea3958c31b66bfd4867ddaad8a585d9a539 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm >@@ -1119,7 +1119,7 @@ void MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext(GraphicsCo > auto image = m_imagePainter.cgImage.get(); > FloatRect imageRect(0, 0, CGImageGetWidth(image), CGImageGetHeight(image)); > AffineTransform videoTransform = videoTransformationMatrix(*m_imagePainter.mediaSample); >- FloatRect transformedDestRect = videoTransform.inverse().value_or(AffineTransform()).mapRect(destRect); >+ FloatRect transformedDestRect = videoTransform.inverse().valueOr(AffineTransform()).mapRect(destRect); > context.concatCTM(videoTransform); > context.drawNativeImage(image, imageRect.size(), transformedDestRect, imageRect); > } >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm b/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm >index a2e07cf6f3217b3adf895c92b0239494294585c1..65cfb24ae400686ef07080d5409fedf87c2f1f7a 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm >@@ -1173,7 +1173,7 @@ void SourceBufferPrivateAVFObjC::willSeek() > > FloatSize SourceBufferPrivateAVFObjC::naturalSize() > { >- return m_cachedSize.value_or(FloatSize()); >+ return m_cachedSize.valueOr(FloatSize()); > } > > void SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples(int trackID) >diff --git a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp >index 6a5152962a6465e64fe9c05814e6e235e11e26af..650eb6c8e54ab7225ea8940c1d8213becdb0fd95 100644 >--- a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp >+++ b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp >@@ -1462,7 +1462,7 @@ void GraphicsLayerCA::setVisibleAndCoverageRects(const VisibleAndCoverageRects& > auto bounds = FloatRect(m_boundsOrigin, size()); > if (auto extent = animationExtent()) { > // Adjust the animation extent to match the current animation position. >- bounds = rects.animatingTransform.inverse().value_or(TransformationMatrix()).mapRect(*extent); >+ bounds = rects.animatingTransform.inverse().valueOr(TransformationMatrix()).mapRect(*extent); > } > > // FIXME: we need to take reflections into account when determining whether this layer intersects the coverage rect. >diff --git a/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp b/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp >index 50bdb5f5f25a67b36fcce32c5a4c657a67bc3be8..e258141e99ad28a5414c6a45de83b279e47796c5 100644 >--- a/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp >+++ b/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp >@@ -598,7 +598,7 @@ RetainPtr<CTFontRef> preparePlatformFont(CTFontRef originalFont, const FontDescr > if (applyWeightWidthSlopeVariations && !fontIsSystemFont(originalFont)) { > float weight = fontSelectionRequest.weight; > float width = fontSelectionRequest.width; >- float slope = fontSelectionRequest.slope.value_or(normalItalicValue()); >+ float slope = fontSelectionRequest.slope.valueOr(normalItalicValue()); > if (auto weightValue = fontFaceCapabilities.weight) > weight = std::max(std::min(weight, static_cast<float>(weightValue->maximum)), static_cast<float>(weightValue->minimum)); > if (auto widthValue = fontFaceCapabilities.width) >diff --git a/Source/WebCore/platform/graphics/filters/FETurbulence.cpp b/Source/WebCore/platform/graphics/filters/FETurbulence.cpp >index 4d0ded4e4bb4e102e0f54dfd035fe9d4ac59faba..8227879f5786de63505436f1b48017c0add28ef6 100644 >--- a/Source/WebCore/platform/graphics/filters/FETurbulence.cpp >+++ b/Source/WebCore/platform/graphics/filters/FETurbulence.cpp >@@ -373,7 +373,7 @@ void FETurbulence::fillRegion(Uint8ClampedArray& pixelArray, const PaintingData& > filterRegion.scale(filter().filterScale()); > FloatPoint point(0, filterRegion.y() + startY); > int indexOfPixelChannel = startY * (filterRegion.width() << 2); >- AffineTransform inverseTransfrom = filter().absoluteTransform().inverse().value_or(AffineTransform()); >+ AffineTransform inverseTransfrom = filter().absoluteTransform().inverse().valueOr(AffineTransform()); > > for (int y = startY; y < endY; ++y) { > point.setY(point.y() + 1); >diff --git a/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp b/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp >index 1fe8b881e199806b122da56f70f80c35eaacd62a..0ba4739a1de5d42168feed7a05b8682d6057a8b1 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp >+++ b/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp >@@ -223,7 +223,7 @@ bool initializeGStreamer(Optional<Vector<String>>&& options) > isGStreamerInitialized = false; > > #if ENABLE(VIDEO) || ENABLE(WEB_AUDIO) >- Vector<String> parameters = options.value_or(extractGStreamerOptionsFromCommandLine()); >+ Vector<String> parameters = options.valueOr(extractGStreamerOptionsFromCommandLine()); > char** argv = g_new0(char*, parameters.size() + 2); > int argc = parameters.size() + 1; > argv[0] = g_strdup(getCurrentExecutableName().data()); >diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp b/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp >index 196297bd85cd43680d0ed26bc11954312e8039ac..890da9d62b34f77ceb3b047608658efd04d84974 100644 >--- a/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp >+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp >@@ -236,7 +236,7 @@ void TextureMapperLayer::paintSelfAndChildrenWithReplica(const TextureMapperPain > TextureMapperPaintOptions replicaOptions(options); > replicaOptions.transform > .multiply(m_state.replicaLayer->m_layerTransforms.combined) >- .multiply(m_layerTransforms.combined.inverse().value_or(TransformationMatrix())); >+ .multiply(m_layerTransforms.combined.inverse().valueOr(TransformationMatrix())); > paintSelfAndChildren(replicaOptions); > } > >@@ -246,7 +246,7 @@ void TextureMapperLayer::paintSelfAndChildrenWithReplica(const TextureMapperPain > TransformationMatrix TextureMapperLayer::replicaTransform() > { > return TransformationMatrix(m_state.replicaLayer->m_layerTransforms.combined) >- .multiply(m_layerTransforms.combined.inverse().value_or(TransformationMatrix())); >+ .multiply(m_layerTransforms.combined.inverse().valueOr(TransformationMatrix())); > } > > static void resolveOverlaps(Region& newRegion, Region& overlapRegion, Region& nonOverlapRegion) >@@ -647,9 +647,9 @@ bool TextureMapperLayer::syncAnimations(MonotonicTime time) > TextureMapperAnimation::ApplicationResult applicationResults; > m_animations.apply(applicationResults, time); > >- m_layerTransforms.localTransform = applicationResults.transform.value_or(m_state.transform); >- m_currentOpacity = applicationResults.opacity.value_or(m_state.opacity); >- m_currentFilters = applicationResults.filters.value_or(m_state.filters); >+ m_layerTransforms.localTransform = applicationResults.transform.valueOr(m_state.transform); >+ m_currentOpacity = applicationResults.opacity.valueOr(m_state.opacity); >+ m_currentFilters = applicationResults.filters.valueOr(m_state.filters); > > return applicationResults.hasRunningAnimations; > } >diff --git a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp >index 15ae46f60d7264e1ab57c581938a5b465be3ecff..45ff95156eb4c3e685ade5a912a5cdefbaae6e04 100644 >--- a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp >+++ b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp >@@ -825,7 +825,7 @@ IntRect CoordinatedGraphicsLayer::transformedVisibleRect() > // Return a projection of the visible rect (surface coordinates) onto the layer's plane (layer coordinates). > // The resulting quad might be squewed and the visible rect is the bounding box of this quad, > // so it might spread further than the real visible area (and then even more amplified by the cover rect multiplier). >- ASSERT(m_cachedInverseTransform == m_layerTransform.combined().inverse().value_or(TransformationMatrix())); >+ ASSERT(m_cachedInverseTransform == m_layerTransform.combined().inverse().valueOr(TransformationMatrix())); > FloatRect rect = m_cachedInverseTransform.clampedBoundsOfProjectedQuad(FloatQuad(m_coordinator->visibleContentsRect())); > clampToContentsRectIfRectIsInfinite(rect, size()); > return enclosingIntRect(rect); >@@ -1089,7 +1089,7 @@ void CoordinatedGraphicsLayer::computeTransformedVisibleRect() > m_layerTransform.setChildrenTransform(childrenTransform()); > m_layerTransform.combineTransforms(parent() ? downcast<CoordinatedGraphicsLayer>(*parent()).m_layerTransform.combinedForChildren() : TransformationMatrix()); > >- m_cachedInverseTransform = m_layerTransform.combined().inverse().value_or(TransformationMatrix()); >+ m_cachedInverseTransform = m_layerTransform.combined().inverse().valueOr(TransformationMatrix()); > > // The combined transform will be used in tiledBackingStoreVisibleRect. > setNeedsVisibleRectAdjustment(); >diff --git a/Source/WebCore/platform/graphics/transforms/TransformState.cpp b/Source/WebCore/platform/graphics/transforms/TransformState.cpp >index f0e2da3193c4e89911ff7fcb6db8ea84648790e7..e763cc1393dbcde61132118ffb43191c648e45e4 100644 >--- a/Source/WebCore/platform/graphics/transforms/TransformState.cpp >+++ b/Source/WebCore/platform/graphics/transforms/TransformState.cpp >@@ -170,7 +170,7 @@ FloatPoint TransformState::mappedPoint(bool* wasClamped) const > if (m_direction == ApplyTransformDirection) > return m_accumulatedTransform->mapPoint(point); > >- return m_accumulatedTransform->inverse().value_or(TransformationMatrix()).projectPoint(point, wasClamped); >+ return m_accumulatedTransform->inverse().valueOr(TransformationMatrix()).projectPoint(point, wasClamped); > } > > FloatQuad TransformState::mappedQuad(bool* wasClamped) const >@@ -218,7 +218,7 @@ void TransformState::mapQuad(FloatQuad& quad, TransformDirection direction, bool > if (direction == ApplyTransformDirection) > quad = m_accumulatedTransform->mapQuad(quad); > >- quad = m_accumulatedTransform->inverse().value_or(TransformationMatrix()).projectQuad(quad, wasClamped); >+ quad = m_accumulatedTransform->inverse().valueOr(TransformationMatrix()).projectQuad(quad, wasClamped); > } > > void TransformState::flattenWithTransform(const TransformationMatrix& t, bool* wasClamped) >@@ -233,7 +233,7 @@ void TransformState::flattenWithTransform(const TransformationMatrix& t, bool* w > } > > } else { >- TransformationMatrix inverseTransform = t.inverse().value_or(TransformationMatrix()); >+ TransformationMatrix inverseTransform = t.inverse().valueOr(TransformationMatrix()); > if (m_mapPoint) > m_lastPlanarPoint = inverseTransform.projectPoint(m_lastPlanarPoint); > if (m_mapQuad) { >diff --git a/Source/WebCore/platform/network/CacheValidation.cpp b/Source/WebCore/platform/network/CacheValidation.cpp >index 0212bc9f1c7e311b616534de13ec90142489ed59..ef25e9f7178e3683b3bc24775c90a02881d4c62e 100644 >--- a/Source/WebCore/platform/network/CacheValidation.cpp >+++ b/Source/WebCore/platform/network/CacheValidation.cpp >@@ -103,7 +103,7 @@ Seconds computeCurrentAge(const ResourceResponse& response, WallTime responseTim > // No compensation for latency as that is not terribly important in practice. > auto dateValue = response.date(); > auto apparentAge = dateValue ? std::max(0_us, responseTime - *dateValue) : 0_us; >- auto ageValue = response.age().value_or(0_us); >+ auto ageValue = response.age().valueOr(0_us); > auto correctedInitialAge = std::max(apparentAge, ageValue); > auto residentTime = WallTime::now() - responseTime; > return correctedInitialAge + residentTime; >@@ -121,7 +121,7 @@ Seconds computeFreshnessLifetimeForHTTPFamily(const ResourceResponse& response, > return *maxAge; > > auto date = response.date(); >- auto effectiveDate = date.value_or(responseTime); >+ auto effectiveDate = date.valueOr(responseTime); > if (auto expires = response.expires()) > return *expires - effectiveDate; > >diff --git a/Source/WebCore/platform/network/NetworkStateNotifier.cpp b/Source/WebCore/platform/network/NetworkStateNotifier.cpp >index b9673de9841293b474a9da4fbc1589f0dc8c7ff2..822e8b06ed42482b616eeee0c225df5d4f74c9cb 100644 >--- a/Source/WebCore/platform/network/NetworkStateNotifier.cpp >+++ b/Source/WebCore/platform/network/NetworkStateNotifier.cpp >@@ -50,7 +50,7 @@ bool NetworkStateNotifier::onLine() > { > if (!m_isOnLine) > updateState(); >- return m_isOnLine.value_or(true); >+ return m_isOnLine.valueOr(true); > } > > void NetworkStateNotifier::addListener(WTF::Function<void(bool)>&& listener) >diff --git a/Source/WebCore/rendering/FloatingObjects.cpp b/Source/WebCore/rendering/FloatingObjects.cpp >index de28d67dd4b382083fccb543ce70db78f7797e52..35ec17c18b900d573c97776f9720e46f654c90b3 100644 >--- a/Source/WebCore/rendering/FloatingObjects.cpp >+++ b/Source/WebCore/rendering/FloatingObjects.cpp >@@ -195,8 +195,8 @@ public: > LayoutUnit highValue() const { return LayoutUnit::max(); } > void collectIfNeeded(const IntervalType&); > >- LayoutUnit nextLogicalBottom() const { return m_nextLogicalBottom.value_or(0); } >- LayoutUnit nextShapeLogicalBottom() const { return m_nextShapeLogicalBottom.value_or(nextLogicalBottom()); } >+ LayoutUnit nextLogicalBottom() const { return m_nextLogicalBottom.valueOr(0); } >+ LayoutUnit nextShapeLogicalBottom() const { return m_nextShapeLogicalBottom.valueOr(nextLogicalBottom()); } > > private: > WeakPtr<const RenderBlockFlow> m_renderer; >diff --git a/Source/WebCore/rendering/GridBaselineAlignment.cpp b/Source/WebCore/rendering/GridBaselineAlignment.cpp >index 1dbb3a4a1d30086f10c6cc6dffde9bc812143ed9..290faca049dcb63dca0eaf490ff7766b1eb82845 100644 >--- a/Source/WebCore/rendering/GridBaselineAlignment.cpp >+++ b/Source/WebCore/rendering/GridBaselineAlignment.cpp >@@ -64,7 +64,7 @@ LayoutUnit GridBaselineAlignment::logicalAscentForChild(const RenderBox& child, > LayoutUnit GridBaselineAlignment::ascentForChild(const RenderBox& child, GridAxis baselineAxis) const > { > LayoutUnit margin = isDescentBaselineForChild(child, baselineAxis) ? marginUnderForChild(child, baselineAxis) : marginOverForChild(child, baselineAxis); >- LayoutUnit baseline(isParallelToBaselineAxisForChild(child, baselineAxis) ? child.firstLineBaseline().value_or(-1) : -1); >+ LayoutUnit baseline(isParallelToBaselineAxisForChild(child, baselineAxis) ? child.firstLineBaseline().valueOr(-1) : -1); > // We take border-box's under edge if no valid baseline. > if (baseline == -1) { > if (isHorizontalBaselineAxis(baselineAxis)) >diff --git a/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp b/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp >index f75376b390baa37ed29fe4052a7babfee2a4f2a6..88c4f5957bccd88f2a028a11e410be2e2820681f 100644 >--- a/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp >+++ b/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp >@@ -54,7 +54,7 @@ void GridTrack::setBaseSize(LayoutUnit baseSize) > > void GridTrack::setGrowthLimit(LayoutUnit growthLimit) > { >- m_growthLimit = growthLimit == infinity ? growthLimit : std::min(growthLimit, m_growthLimitCap.value_or(growthLimit)); >+ m_growthLimit = growthLimit == infinity ? growthLimit : std::min(growthLimit, m_growthLimitCap.valueOr(growthLimit)); > ensureGrowthLimitIsBiggerThanBaseSize(); > } > >@@ -216,7 +216,7 @@ LayoutUnit GridTrackSizingAlgorithm::initialBaseSize(const GridTrackSize& trackS > > const Length& trackLength = gridLength.length(); > if (trackLength.isSpecified()) >- return valueForLength(trackLength, std::max<LayoutUnit>(availableSpace().value_or(0), 0)); >+ return valueForLength(trackLength, std::max<LayoutUnit>(availableSpace().valueOr(0), 0)); > > ASSERT(trackLength.isMinContent() || trackLength.isAuto() || trackLength.isMaxContent()); > return 0; >@@ -230,7 +230,7 @@ LayoutUnit GridTrackSizingAlgorithm::initialGrowthLimit(const GridTrackSize& tra > > const Length& trackLength = gridLength.length(); > if (trackLength.isSpecified()) >- return valueForLength(trackLength, std::max<LayoutUnit>(availableSpace().value_or(0), 0)); >+ return valueForLength(trackLength, std::max<LayoutUnit>(availableSpace().valueOr(0), 0)); > > ASSERT(trackLength.isMinContent() || trackLength.isAuto() || trackLength.isMaxContent()); > return infinity; >@@ -254,7 +254,7 @@ void GridTrackSizingAlgorithm::sizeTrackToFitNonSpanningItem(const GridSpan& spa > } else if (trackSize.hasMaxContentOrAutoMaxTrackBreadth()) { > LayoutUnit growthLimit = m_strategy->maxContentForChild(gridItem); > if (trackSize.isFitContent()) >- growthLimit = std::min(growthLimit, valueForLength(trackSize.fitContentTrackBreadth().length(), availableSpace().value_or(0))); >+ growthLimit = std::min(growthLimit, valueForLength(trackSize.fitContentTrackBreadth().length(), availableSpace().valueOr(0))); > track.setGrowthLimit(std::max(track.growthLimit(), growthLimit)); > } > } >@@ -483,8 +483,8 @@ static bool sortByGridTrackGrowthPotential(const GridTrack* track1, const GridTr > if (track1HasInfiniteGrowthPotentialWithoutCap || track2HasInfiniteGrowthPotentialWithoutCap) > return track2HasInfiniteGrowthPotentialWithoutCap; > >- LayoutUnit track1Limit = track1->growthLimitCap().value_or(track1->growthLimit()); >- LayoutUnit track2Limit = track2->growthLimitCap().value_or(track2->growthLimit()); >+ LayoutUnit track1Limit = track1->growthLimitCap().valueOr(track1->growthLimit()); >+ LayoutUnit track2Limit = track2->growthLimitCap().valueOr(track2->growthLimit()); > return (track1Limit - track1->baseSize()) < (track2Limit - track2->baseSize()); > } > >@@ -569,7 +569,7 @@ LayoutUnit GridTrackSizingAlgorithm::estimatedGridAreaBreadthForChild(const Rend > if (maxTrackSize.isContentSized() || maxTrackSize.isFlex() || isRelativeGridLengthAsAuto(maxTrackSize, direction)) > gridAreaIsIndefinite = true; > else >- gridAreaSize += valueForLength(maxTrackSize.length(), availableSize.value_or(0_lu)); >+ gridAreaSize += valueForLength(maxTrackSize.length(), availableSize.valueOr(0_lu)); > } > > gridAreaSize += m_renderGrid->guttersSize(m_grid, direction, span.startLine(), span.integerSpan(), availableSize); >@@ -810,7 +810,7 @@ LayoutUnit GridTrackSizingAlgorithmStrategy::minSizeForChild(RenderBox& child) c > GridTrackSize trackSize = m_algorithm.gridTrackSize(direction(), trackPosition); > if (!trackSize.hasFixedMaxTrackBreadth()) > return minSize; >- maxBreadth += valueForLength(trackSize.maxTrackBreadth().length(), availableSpace().value_or(0_lu)); >+ maxBreadth += valueForLength(trackSize.maxTrackBreadth().length(), availableSpace().valueOr(0_lu)); > } > if (minSize > maxBreadth) { > auto marginAndBorderAndPadding = GridLayoutFunctions::marginLogicalSizeForChild(*renderGrid(), direction(), child); >@@ -831,7 +831,7 @@ LayoutUnit GridTrackSizingAlgorithmStrategy::minSizeForChild(RenderBox& child) c > bool overrideSizeHasChanged = updateOverrideContainingBlockContentSizeForChild(child, childInlineDirection, gridAreaSize); > layoutGridItemForMinSizeComputation(child, overrideSizeHasChanged); > >- return child.computeLogicalHeightUsing(MinSize, childMinSize, WTF::nullopt).value_or(0) + child.marginLogicalHeight() + child.scrollbarLogicalHeight() + baselineShim; >+ return child.computeLogicalHeightUsing(MinSize, childMinSize, WTF::nullopt).valueOr(0) + child.marginLogicalHeight() + child.scrollbarLogicalHeight() + baselineShim; > } > > bool GridTrackSizingAlgorithm::canParticipateInBaselineAlignment(const RenderBox& child, GridAxis baselineAxis) const >@@ -1101,7 +1101,7 @@ void GridTrackSizingAlgorithm::initializeTrackSizes() > Vector<GridTrack>& allTracks = tracks(m_direction); > const bool hasDefiniteFreeSpace = !!availableSpace(); > const bool indefiniteHeight = m_direction == ForRows && !m_renderGrid->hasDefiniteLogicalHeight(); >- LayoutUnit maxSize = std::max(0_lu, availableSpace().value_or(0_lu)); >+ LayoutUnit maxSize = std::max(0_lu, availableSpace().valueOr(0_lu)); > // 1. Initialize per Grid track variables. > for (unsigned i = 0; i < allTracks.size(); ++i) { > GridTrack& track = allTracks[i]; >diff --git a/Source/WebCore/rendering/PaintInfo.h b/Source/WebCore/rendering/PaintInfo.h >index 2321d4fa64c1e5245da2f3543be11123435a99be..4e1cfeee609a349a0a3d3d19544b5158edd9a5f9 100644 >--- a/Source/WebCore/rendering/PaintInfo.h >+++ b/Source/WebCore/rendering/PaintInfo.h >@@ -115,7 +115,7 @@ struct PaintInfo { > if (rect.isInfinite()) > return; > >- FloatRect tranformedRect(localToAncestorTransform.inverse().value_or(AffineTransform()).mapRect(rect)); >+ FloatRect tranformedRect(localToAncestorTransform.inverse().valueOr(AffineTransform()).mapRect(rect)); > rect.setLocation(LayoutPoint(tranformedRect.location())); > rect.setSize(LayoutSize(tranformedRect.size())); > } >diff --git a/Source/WebCore/rendering/RenderBox.cpp b/Source/WebCore/rendering/RenderBox.cpp >index aa737e490a4884f5ae2fc6f06ee4fa606df573df..a671111659e521562fef74db45743ef9bbfddce9 100644 >--- a/Source/WebCore/rendering/RenderBox.cpp >+++ b/Source/WebCore/rendering/RenderBox.cpp >@@ -2754,7 +2754,7 @@ RenderBox::LogicalExtentComputedValues RenderBox::computeLogicalHeight(LayoutUni > LayoutUnit heightResult; > if (checkMinMaxHeight) { > LayoutUnit intrinsicHeight = computedValues.m_extent - borderAndPaddingLogicalHeight(); >- heightResult = computeLogicalHeightUsing(MainOrPreferredSize, style().logicalHeight(), intrinsicHeight).value_or(computedValues.m_extent); >+ heightResult = computeLogicalHeightUsing(MainOrPreferredSize, style().logicalHeight(), intrinsicHeight).valueOr(computedValues.m_extent); > heightResult = constrainLogicalHeightByMinMax(heightResult, intrinsicHeight); > } else { > // The only times we don't check min/max height are when a fixed length has >diff --git a/Source/WebCore/rendering/RenderCounter.cpp b/Source/WebCore/rendering/RenderCounter.cpp >index 150ac065abd893fcb71ec20f1cf26305f8a94ed4..e5cde49006529a3aa7c8388cacc72cdf6532c07f 100644 >--- a/Source/WebCore/rendering/RenderCounter.cpp >+++ b/Source/WebCore/rendering/RenderCounter.cpp >@@ -167,7 +167,7 @@ static Optional<CounterPlan> planCounter(RenderElement& renderer, const AtomicSt > } > > if (directives.resetValue) >- return CounterPlan { true, saturatedAddition(*directives.resetValue, directives.incrementValue.value_or(0)) }; >+ return CounterPlan { true, saturatedAddition(*directives.resetValue, directives.incrementValue.valueOr(0)) }; > if (directives.incrementValue) > return CounterPlan { false, *directives.incrementValue }; > return WTF::nullopt; >diff --git a/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp b/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp >index 3483cba2b4fff594392d14ba9002b70251f6972c..b315e09459dc218e57dcce65f322ac8799839efb 100644 >--- a/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp >+++ b/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp >@@ -435,7 +435,7 @@ void RenderDeprecatedFlexibleBox::layoutHorizontalBox(bool relayoutChildren) > > // Update our height and overflow height. > if (style().boxAlign() == BoxAlignment::Baseline) { >- LayoutUnit ascent = child->firstLineBaseline().value_or(child->height() + child->marginBottom()); >+ LayoutUnit ascent = child->firstLineBaseline().valueOr(child->height() + child->marginBottom()); > ascent += child->marginTop(); > LayoutUnit descent = (child->height() + child->verticalMarginExtent()) - ascent; > >@@ -510,7 +510,7 @@ void RenderDeprecatedFlexibleBox::layoutHorizontalBox(bool relayoutChildren) > childY += child->marginTop() + std::max<LayoutUnit>(0, (contentHeight() - (child->height() + child->verticalMarginExtent())) / 2); > break; > case BoxAlignment::Baseline: { >- LayoutUnit ascent = child->firstLineBaseline().value_or(child->height() + child->marginBottom()); >+ LayoutUnit ascent = child->firstLineBaseline().valueOr(child->height() + child->marginBottom()); > ascent += child->marginTop(); > childY += child->marginTop() + (maxAscent - ascent); > break; >diff --git a/Source/WebCore/rendering/RenderFlexibleBox.cpp b/Source/WebCore/rendering/RenderFlexibleBox.cpp >index 7949fbf3407f466fa66e5120f41a6f04d2ea978e..b30fc7f92f786e9943a9a9709e1deaa25309473a 100644 >--- a/Source/WebCore/rendering/RenderFlexibleBox.cpp >+++ b/Source/WebCore/rendering/RenderFlexibleBox.cpp >@@ -172,7 +172,7 @@ static int synthesizedBaselineFromContentBox(const RenderBox& box, LineDirection > > int RenderFlexibleBox::baselinePosition(FontBaseline, bool, LineDirectionMode direction, LinePositionMode) const > { >- int baseline = firstLineBaseline().value_or(synthesizedBaselineFromContentBox(*this, direction)); >+ int baseline = firstLineBaseline().valueOr(synthesizedBaselineFromContentBox(*this, direction)); > > int marginAscent = direction == HorizontalLine ? marginTop() : marginRight(); > return baseline + marginAscent; >@@ -1036,7 +1036,7 @@ bool RenderFlexibleBox::updateAutoMarginsInCrossAxis(RenderBox& child, LayoutUni > > LayoutUnit RenderFlexibleBox::marginBoxAscentForChild(const RenderBox& child) > { >- LayoutUnit ascent = child.firstLineBaseline().value_or(crossAxisExtentForChild(child)); >+ LayoutUnit ascent = child.firstLineBaseline().valueOr(crossAxisExtentForChild(child)); > return ascent + flowAwareMarginBeforeForChild(child); > } > >@@ -1074,12 +1074,12 @@ LayoutUnit RenderFlexibleBox::adjustChildSizeForMinAndMax(const RenderBox& child > Optional<LayoutUnit> maxExtent = WTF::nullopt; > if (max.isSpecifiedOrIntrinsic()) { > maxExtent = computeMainAxisExtentForChild(child, MaxSize, max); >- childSize = std::min(childSize, maxExtent.value_or(childSize)); >+ childSize = std::min(childSize, maxExtent.valueOr(childSize)); > } > > Length min = isHorizontalFlow() ? child.style().minWidth() : child.style().minHeight(); > if (min.isSpecifiedOrIntrinsic()) >- return std::max(childSize, std::max(0_lu, computeMainAxisExtentForChild(child, MinSize, min).value_or(childSize))); >+ return std::max(childSize, std::max(0_lu, computeMainAxisExtentForChild(child, MinSize, min).valueOr(childSize))); > > if (!isFlexibleBoxImpl() && min.isAuto() && mainAxisOverflowForChild(child) == Overflow::Visible && !(isColumnFlow() && is<RenderFlexibleBox>(child))) { > // FIXME: For now, we do not handle min-height: auto for nested >@@ -1089,17 +1089,17 @@ LayoutUnit RenderFlexibleBox::adjustChildSizeForMinAndMax(const RenderBox& child > // css-flexbox section 4.5 > // FIXME: If the min value is expected to be valid here, we need to come up with a non optional version of computeMainAxisExtentForChild and > // ensure it's valid through the virtual calls of computeIntrinsicLogicalContentHeightUsing. >- LayoutUnit contentSize = computeMainAxisExtentForChild(child, MinSize, Length(MinContent)).value_or(0); >+ LayoutUnit contentSize = computeMainAxisExtentForChild(child, MinSize, Length(MinContent)).valueOr(0); > ASSERT(contentSize >= 0); > if (child.hasAspectRatio() && child.intrinsicSize().height() > 0) > contentSize = adjustChildSizeForAspectRatioCrossAxisMinAndMax(child, contentSize); >- contentSize = std::min(contentSize, maxExtent.value_or(contentSize)); >+ contentSize = std::min(contentSize, maxExtent.valueOr(contentSize)); > > Length mainSize = isHorizontalFlow() ? child.style().width() : child.style().height(); > if (mainAxisLengthIsDefinite(child, mainSize)) { >- LayoutUnit resolvedMainSize = computeMainAxisExtentForChild(child, MainOrPreferredSize, mainSize).value_or(0); >+ LayoutUnit resolvedMainSize = computeMainAxisExtentForChild(child, MainOrPreferredSize, mainSize).valueOr(0); > ASSERT(resolvedMainSize >= 0); >- LayoutUnit specifiedSize = std::min(resolvedMainSize, maxExtent.value_or(resolvedMainSize)); >+ LayoutUnit specifiedSize = std::min(resolvedMainSize, maxExtent.valueOr(resolvedMainSize)); > return std::max(childSize, std::min(specifiedSize, contentSize)); > } > >diff --git a/Source/WebCore/rendering/RenderGrid.cpp b/Source/WebCore/rendering/RenderGrid.cpp >index 04bb2b6cba21a9e91f4a7936e78915a0ec97eef4..35a610b29973ccd9e68c654c8a45bed0cc3a5a6f 100644 >--- a/Source/WebCore/rendering/RenderGrid.cpp >+++ b/Source/WebCore/rendering/RenderGrid.cpp >@@ -310,7 +310,7 @@ LayoutUnit RenderGrid::gridGap(GridTrackSizingDirection direction, Optional<Layo > if (gapLength.isNormal()) > return 0_lu; > >- return valueForLength(gapLength.length(), availableSize.value_or(0)); >+ return valueForLength(gapLength.length(), availableSize.valueOr(0)); > } > > LayoutUnit RenderGrid::gridGap(GridTrackSizingDirection direction) const >@@ -1226,7 +1226,7 @@ int RenderGrid::baselinePosition(FontBaseline, bool, LineDirectionMode direction > #else > UNUSED_PARAM(mode); > #endif >- return firstLineBaseline().value_or(synthesizedBaselineFromMarginBox(*this, direction)); >+ return firstLineBaseline().valueOr(synthesizedBaselineFromMarginBox(*this, direction)); > } > > Optional<int> RenderGrid::firstLineBaseline() const >diff --git a/Source/WebCore/rendering/RenderLayer.cpp b/Source/WebCore/rendering/RenderLayer.cpp >index c26e6b79fd61f66ef2589d096c6a230dcf3c8d49..0e2e0f16b4490034f3b9af7b4c3dbfd51034bc01 100644 >--- a/Source/WebCore/rendering/RenderLayer.cpp >+++ b/Source/WebCore/rendering/RenderLayer.cpp >@@ -4457,7 +4457,7 @@ void RenderLayer::paintLayerByApplyingTransform(GraphicsContext& context, const > LayoutSize adjustedSubpixelOffset = offsetForThisLayer - LayoutSize(devicePixelSnappedOffsetForThisLayer); > LayerPaintingInfo transformedPaintingInfo(paintingInfo); > transformedPaintingInfo.rootLayer = this; >- transformedPaintingInfo.paintDirtyRect = LayoutRect(encloseRectToDevicePixels(transform.inverse().value_or(AffineTransform()).mapRect(paintingInfo.paintDirtyRect), deviceScaleFactor)); >+ transformedPaintingInfo.paintDirtyRect = LayoutRect(encloseRectToDevicePixels(transform.inverse().valueOr(AffineTransform()).mapRect(paintingInfo.paintDirtyRect), deviceScaleFactor)); > transformedPaintingInfo.subpixelOffset = adjustedSubpixelOffset; > paintLayerContentsAndReflection(context, transformedPaintingInfo, paintFlags); > context.setCTM(oldTransfrom); >diff --git a/Source/WebCore/rendering/RenderListBox.cpp b/Source/WebCore/rendering/RenderListBox.cpp >index 670e374655c13c5e8badd28fe18237cd3846f264..63ade7e23e4367fceabe01f46683db32fe81ad61 100644 >--- a/Source/WebCore/rendering/RenderListBox.cpp >+++ b/Source/WebCore/rendering/RenderListBox.cpp >@@ -302,7 +302,7 @@ LayoutRect RenderListBox::itemBoundingBoxRect(const LayoutPoint& additionalOffse > void RenderListBox::paintItem(PaintInfo& paintInfo, const LayoutPoint& paintOffset, const PaintFunction& paintFunction) > { > int listItemsSize = numItems(); >- int firstVisibleItem = m_indexOfFirstVisibleItemInsidePaddingTopArea.value_or(m_indexOffset); >+ int firstVisibleItem = m_indexOfFirstVisibleItemInsidePaddingTopArea.valueOr(m_indexOffset); > int endIndex = firstVisibleItem + numVisibleItems(ConsiderPadding::Yes); > for (int i = firstVisibleItem; i < listItemsSize && i < endIndex; ++i) > paintFunction(paintInfo, paintOffset, i); >@@ -621,7 +621,7 @@ bool RenderListBox::scrollToRevealElementAtListIndex(int index) > > bool RenderListBox::listIndexIsVisible(int index) > { >- int firstIndex = m_indexOfFirstVisibleItemInsidePaddingTopArea.value_or(m_indexOffset); >+ int firstIndex = m_indexOfFirstVisibleItemInsidePaddingTopArea.valueOr(m_indexOffset); > int endIndex = m_indexOfFirstVisibleItemInsidePaddingBottomArea > ? m_indexOfFirstVisibleItemInsidePaddingBottomArea.value() + numberOfVisibleItemsInPaddingBottom() > : m_indexOffset + numVisibleItems(); >diff --git a/Source/WebCore/rendering/RenderMultiColumnSet.cpp b/Source/WebCore/rendering/RenderMultiColumnSet.cpp >index dbb8ac58a1fde8b4ae269d65b0d151b882bdc227..28dfeb31264c20a846d72c935f30f41f99205cc2 100644 >--- a/Source/WebCore/rendering/RenderMultiColumnSet.cpp >+++ b/Source/WebCore/rendering/RenderMultiColumnSet.cpp >@@ -420,7 +420,7 @@ LayoutUnit RenderMultiColumnSet::calculateMaxColumnHeight() const > LayoutUnit availableHeight = multiColumnFlow()->columnHeightAvailable(); > LayoutUnit maxColumnHeight = availableHeight ? availableHeight : RenderFragmentedFlow::maxLogicalHeight(); > if (!multicolStyle.logicalMaxHeight().isUndefined()) >- maxColumnHeight = std::min(maxColumnHeight, multicolBlock->computeContentLogicalHeight(MaxSize, multicolStyle.logicalMaxHeight(), WTF::nullopt).value_or(maxColumnHeight)); >+ maxColumnHeight = std::min(maxColumnHeight, multicolBlock->computeContentLogicalHeight(MaxSize, multicolStyle.logicalMaxHeight(), WTF::nullopt).valueOr(maxColumnHeight)); > return heightAdjustedForSetOffset(maxColumnHeight); > } > >diff --git a/Source/WebCore/rendering/RenderTable.cpp b/Source/WebCore/rendering/RenderTable.cpp >index 0b03604293901b32cd0577ce3557ce75d4a7e295..99ad8da48f24d2fc2564774d252547fdbe001069 100644 >--- a/Source/WebCore/rendering/RenderTable.cpp >+++ b/Source/WebCore/rendering/RenderTable.cpp >@@ -322,9 +322,9 @@ LayoutUnit RenderTable::convertStyleLogicalHeightToComputedHeight(const Length& > } > return styleLogicalHeight.value() - borders; > } else if (styleLogicalHeight.isPercentOrCalculated()) >- return computePercentageLogicalHeight(styleLogicalHeight).value_or(0); >+ return computePercentageLogicalHeight(styleLogicalHeight).valueOr(0); > else if (styleLogicalHeight.isIntrinsic()) >- return computeIntrinsicLogicalContentHeightUsing(styleLogicalHeight, logicalHeight() - borderAndPadding, borderAndPadding).value_or(0); >+ return computeIntrinsicLogicalContentHeightUsing(styleLogicalHeight, logicalHeight() - borderAndPadding, borderAndPadding).valueOr(0); > else > ASSERT_NOT_REACHED(); > return 0_lu; >diff --git a/Source/WebCore/rendering/RenderTableCell.cpp b/Source/WebCore/rendering/RenderTableCell.cpp >index 8dd66a46c10b45e0dda9dabfdef66bdae7c5b785..f5a0fd0d3126cabcbcc7a7d73de004a8f37f4583 100644 >--- a/Source/WebCore/rendering/RenderTableCell.cpp >+++ b/Source/WebCore/rendering/RenderTableCell.cpp >@@ -410,7 +410,7 @@ LayoutUnit RenderTableCell::cellBaselinePosition() const > // <http://www.w3.org/TR/2007/CR-CSS21-20070719/tables.html#height-layout>: The baseline of a cell is the baseline of > // the first in-flow line box in the cell, or the first in-flow table-row in the cell, whichever comes first. If there > // is no such line box or table-row, the baseline is the bottom of content edge of the cell box. >- return firstLineBaseline().value_or(borderAndPaddingBefore() + contentLogicalHeight()); >+ return firstLineBaseline().valueOr(borderAndPaddingBefore() + contentLogicalHeight()); > } > > static inline void markCellDirtyWhenCollapsedBorderChanges(RenderTableCell* cell) >diff --git a/Source/WebCore/rendering/RenderTableSection.cpp b/Source/WebCore/rendering/RenderTableSection.cpp >index 9119312549c1dc3f09406f96af021e0bccc3f109..d1db9f285f9962814f8b77b2210fe3e8e3a5c61e 100644 >--- a/Source/WebCore/rendering/RenderTableSection.cpp >+++ b/Source/WebCore/rendering/RenderTableSection.cpp >@@ -888,7 +888,7 @@ Optional<int> RenderTableSection::firstLineBaseline() const > // Only cells with content have a baseline > if (cell && cell->contentLogicalHeight()) { > int candidate = roundToInt(cell->logicalTop() + cell->borderAndPaddingBefore() + cell->contentLogicalHeight()); >- result = std::max(result.value_or(candidate), candidate); >+ result = std::max(result.valueOr(candidate), candidate); > } > } > >diff --git a/Source/WebCore/rendering/RenderText.cpp b/Source/WebCore/rendering/RenderText.cpp >index 431b8fe73b7b8f4692b14eb0eb4e39e55791a768..8c1788a2376d972c9f5960c74fb8cdb186ab2cfa 100644 >--- a/Source/WebCore/rendering/RenderText.cpp >+++ b/Source/WebCore/rendering/RenderText.cpp >@@ -1004,7 +1004,7 @@ void RenderText::computePreferredLogicalWidths(float leadWidth, HashSet<const Fo > } > } > >- glyphOverflow.left = firstGlyphLeftOverflow.value_or(glyphOverflow.left); >+ glyphOverflow.left = firstGlyphLeftOverflow.valueOr(glyphOverflow.left); > > if ((needsWordSpacing && length > 1) || (ignoringSpaces && !firstWord)) > currMaxWidth += wordSpacing; >@@ -1510,13 +1510,13 @@ int RenderText::previousOffset(int current) const > return current - 1; > > CachedTextBreakIterator iterator(text(), TextBreakIterator::Mode::Caret, nullAtom()); >- return iterator.preceding(current).value_or(current - 1); >+ return iterator.preceding(current).valueOr(current - 1); > } > > int RenderText::previousOffsetForBackwardDeletion(int current) const > { > CachedTextBreakIterator iterator(text(), TextBreakIterator::Mode::Delete, nullAtom()); >- return iterator.preceding(current).value_or(0); >+ return iterator.preceding(current).valueOr(0); > } > > int RenderText::nextOffset(int current) const >@@ -1525,7 +1525,7 @@ int RenderText::nextOffset(int current) const > return current + 1; > > CachedTextBreakIterator iterator(text(), TextBreakIterator::Mode::Caret, nullAtom()); >- return iterator.following(current).value_or(current + 1); >+ return iterator.following(current).valueOr(current + 1); > } > > bool RenderText::computeCanUseSimpleFontCodePath() const >@@ -1547,7 +1547,7 @@ void RenderText::momentarilyRevealLastTypedCharacter(unsigned offsetAfterLastTyp > > StringView RenderText::stringView(unsigned start, Optional<unsigned> stop) const > { >- unsigned destination = stop.value_or(text().length()); >+ unsigned destination = stop.valueOr(text().length()); > ASSERT(start <= length()); > ASSERT(destination <= length()); > ASSERT(start <= destination); >diff --git a/Source/WebCore/rendering/RenderView.cpp b/Source/WebCore/rendering/RenderView.cpp >index 967692ee0a2c33457d777732424ec791a4fccead..e8dd849f169122d2553d8bc9f544dbd16b4148e0 100644 >--- a/Source/WebCore/rendering/RenderView.cpp >+++ b/Source/WebCore/rendering/RenderView.cpp >@@ -234,7 +234,7 @@ void RenderView::layout() > if (!needsLayout()) > return; > >- LayoutStateMaintainer statePusher(*this, { }, false, m_pageLogicalSize.value_or(LayoutSize()).height(), m_pageLogicalHeightChanged); >+ LayoutStateMaintainer statePusher(*this, { }, false, m_pageLogicalSize.valueOr(LayoutSize()).height(), m_pageLogicalHeightChanged); > > m_pageLogicalHeightChanged = false; > >diff --git a/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp b/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp >index c9e3513133a7a3e0bb6349ca5b34a35afd29192f..8e356b6b696670cf5556d193b61751e42dd5c1d6 100644 >--- a/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp >+++ b/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp >@@ -102,7 +102,7 @@ int RenderMathMLBlock::baselinePosition(FontBaseline baselineType, bool firstLin > if (linePositionMode == PositionOfInteriorLineBoxes) > return 0; > >- return firstLineBaseline().value_or(RenderBlock::baselinePosition(baselineType, firstLine, direction, linePositionMode)); >+ return firstLineBaseline().valueOr(RenderBlock::baselinePosition(baselineType, firstLine, direction, linePositionMode)); > } > > #if ENABLE(DEBUG_MATH_LAYOUT) >diff --git a/Source/WebCore/rendering/mathml/RenderMathMLBlock.h b/Source/WebCore/rendering/mathml/RenderMathMLBlock.h >index 048c7ec885288c194dae2d2db1110a971cc482ca..2d4393b52dffcb821bfd7c94851cd779a19eb740 100644 >--- a/Source/WebCore/rendering/mathml/RenderMathMLBlock.h >+++ b/Source/WebCore/rendering/mathml/RenderMathMLBlock.h >@@ -80,7 +80,7 @@ protected: > > static LayoutUnit ascentForChild(const RenderBox& child) > { >- return child.firstLineBaseline().value_or(child.logicalHeight()); >+ return child.firstLineBaseline().valueOr(child.logicalHeight()); > } > > void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0_lu) override; >diff --git a/Source/WebCore/rendering/style/GridPosition.cpp b/Source/WebCore/rendering/style/GridPosition.cpp >index f12d3afe6fcfc825705c9c4c96847e17b4b10d21..d4e731a090a22da6f61cc312fe160882580f7850 100644 >--- a/Source/WebCore/rendering/style/GridPosition.cpp >+++ b/Source/WebCore/rendering/style/GridPosition.cpp >@@ -85,7 +85,7 @@ int GridPosition::spanPosition() const > > int GridPosition::max() > { >- return gMaxPositionForTesting.value_or(kGridMaxPosition); >+ return gMaxPositionForTesting.valueOr(kGridMaxPosition); > } > > int GridPosition::min() >diff --git a/Source/WebCore/rendering/style/TextUnderlineOffset.h b/Source/WebCore/rendering/style/TextUnderlineOffset.h >index 807e4db8b798843f337536f95e888c780af92499..38ed93c91f6cb9f64c2cf20b3cbaf042b4a81b6b 100644 >--- a/Source/WebCore/rendering/style/TextUnderlineOffset.h >+++ b/Source/WebCore/rendering/style/TextUnderlineOffset.h >@@ -68,7 +68,7 @@ public: > > float lengthOr(float defaultValue) const > { >- return m_length.value_or(defaultValue); >+ return m_length.valueOr(defaultValue); > } > > bool operator==(const TextUnderlineOffset& other) const >diff --git a/Source/WebCore/rendering/svg/RenderSVGContainer.cpp b/Source/WebCore/rendering/svg/RenderSVGContainer.cpp >index cbe270b11c8331a47fe88f8ba5e01a7ab8262bb9..98b315d67443e56ba404c2512ec125a45a608bdc 100644 >--- a/Source/WebCore/rendering/svg/RenderSVGContainer.cpp >+++ b/Source/WebCore/rendering/svg/RenderSVGContainer.cpp >@@ -161,7 +161,7 @@ bool RenderSVGContainer::nodeAtFloatPoint(const HitTestRequest& request, HitTest > if (!pointIsInsideViewportClip(pointInParent)) > return false; > >- FloatPoint localPoint = localToParentTransform().inverse().value_or(AffineTransform()).mapPoint(pointInParent); >+ FloatPoint localPoint = localToParentTransform().inverse().valueOr(AffineTransform()).mapPoint(pointInParent); > > if (!SVGRenderSupport::pointInClippingArea(*this, localPoint)) > return false; >diff --git a/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp b/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp >index dfb4b8766e8d37082350aa7a5c0151dea457855f..585c7be797eaa4cb22ee214c010a766f68f6b407 100644 >--- a/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp >+++ b/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp >@@ -185,7 +185,7 @@ bool RenderSVGForeignObject::nodeAtFloatPoint(const HitTestRequest& request, Hit > if (hitTestAction != HitTestForeground) > return false; > >- FloatPoint localPoint = localTransform().inverse().value_or(AffineTransform()).mapPoint(pointInParent); >+ FloatPoint localPoint = localTransform().inverse().valueOr(AffineTransform()).mapPoint(pointInParent); > > // Early exit if local point is not contained in clipped viewport area > if (SVGRenderSupport::isOverflowHidden(*this) && !m_viewport.contains(localPoint)) >diff --git a/Source/WebCore/rendering/svg/RenderSVGImage.cpp b/Source/WebCore/rendering/svg/RenderSVGImage.cpp >index 0a58f8fd1ad249483dd50dbbdb391fd7af94f3e4..2c6f3178eeb26c7b2c0d95ae108b7efcc6e22c4e 100644 >--- a/Source/WebCore/rendering/svg/RenderSVGImage.cpp >+++ b/Source/WebCore/rendering/svg/RenderSVGImage.cpp >@@ -193,7 +193,7 @@ bool RenderSVGImage::nodeAtFloatPoint(const HitTestRequest& request, HitTestResu > PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_IMAGE_HITTESTING, request, style().pointerEvents()); > bool isVisible = (style().visibility() == Visibility::Visible); > if (isVisible || !hitRules.requireVisible) { >- FloatPoint localPoint = localToParentTransform().inverse().value_or(AffineTransform()).mapPoint(pointInParent); >+ FloatPoint localPoint = localToParentTransform().inverse().valueOr(AffineTransform()).mapPoint(pointInParent); > > if (!SVGRenderSupport::pointInClippingArea(*this, localPoint)) > return false; >diff --git a/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp b/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp >index 7398ef32b3860c2365554344ddfa30412a48a80a..2cf86e25f626ee2bde25859659fc1e06676e00f5 100644 >--- a/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp >+++ b/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp >@@ -268,10 +268,10 @@ bool RenderSVGResourceClipper::hitTestClipContent(const FloatRect& objectBoundin > AffineTransform transform; > transform.translate(objectBoundingBox.location()); > transform.scale(objectBoundingBox.size()); >- point = transform.inverse().value_or(AffineTransform()).mapPoint(point); >+ point = transform.inverse().valueOr(AffineTransform()).mapPoint(point); > } > >- point = clipPathElement().animatedLocalTransform().inverse().value_or(AffineTransform()).mapPoint(point); >+ point = clipPathElement().animatedLocalTransform().inverse().valueOr(AffineTransform()).mapPoint(point); > > for (Node* childNode = clipPathElement().firstChild(); childNode; childNode = childNode->nextSibling()) { > RenderObject* renderer = childNode->renderer(); >diff --git a/Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp b/Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp >index 36406921be80d78139bd69a5205236258d72a054..1b3ef24cc92d2052a34aad20882330e1a123b84f 100644 >--- a/Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp >+++ b/Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp >@@ -276,7 +276,7 @@ void RenderSVGResourceFilter::postApplyResource(RenderElement& renderer, Graphic > > ImageBuffer* resultImage = lastEffect->imageBufferResult(); > if (resultImage) { >- context->concatCTM(filterData.shearFreeAbsoluteTransform.inverse().value_or(AffineTransform())); >+ context->concatCTM(filterData.shearFreeAbsoluteTransform.inverse().valueOr(AffineTransform())); > > context->scale(FloatSize(1 / filterData.filter->filterResolution().width(), 1 / filterData.filter->filterResolution().height())); > context->drawImageBuffer(*resultImage, lastEffect->absolutePaintRect()); >diff --git a/Source/WebCore/rendering/svg/RenderSVGRoot.cpp b/Source/WebCore/rendering/svg/RenderSVGRoot.cpp >index e1502ef75bebf677f617c42184450b680f7100a8..df0ef6f6f3ed8e3d4212994a9e0337642510cb59 100644 >--- a/Source/WebCore/rendering/svg/RenderSVGRoot.cpp >+++ b/Source/WebCore/rendering/svg/RenderSVGRoot.cpp >@@ -405,7 +405,7 @@ bool RenderSVGRoot::nodeAtPoint(const HitTestRequest& request, HitTestResult& re > // Test SVG content if the point is in our content box or it is inside the visualOverflowRect and the overflow is visible. > // FIXME: This should be an intersection when rect-based hit tests are supported by nodeAtFloatPoint. > if (contentBoxRect().contains(pointInBorderBox) || (!shouldApplyViewportClip() && visualOverflowRect().contains(pointInParent))) { >- FloatPoint localPoint = localToParentTransform().inverse().value_or(AffineTransform()).mapPoint(FloatPoint(pointInParent)); >+ FloatPoint localPoint = localToParentTransform().inverse().valueOr(AffineTransform()).mapPoint(FloatPoint(pointInParent)); > > for (RenderObject* child = lastChild(); child; child = child->previousSibling()) { > // FIXME: nodeAtFloatPoint() doesn't handle rect-based hit tests yet. >diff --git a/Source/WebCore/rendering/svg/RenderSVGShape.cpp b/Source/WebCore/rendering/svg/RenderSVGShape.cpp >index fa3bc9170c3503b40a6b12cb0515ccd395504013..34b0ae75bdc0056576d51380185efe6bc72c706e 100644 >--- a/Source/WebCore/rendering/svg/RenderSVGShape.cpp >+++ b/Source/WebCore/rendering/svg/RenderSVGShape.cpp >@@ -368,7 +368,7 @@ bool RenderSVGShape::nodeAtFloatPoint(const HitTestRequest& request, HitTestResu > if (hitTestAction != HitTestForeground) > return false; > >- FloatPoint localPoint = m_localTransform.inverse().value_or(AffineTransform()).mapPoint(pointInParent); >+ FloatPoint localPoint = m_localTransform.inverse().valueOr(AffineTransform()).mapPoint(pointInParent); > > if (!SVGRenderSupport::pointInClippingArea(*this, localPoint)) > return false; >diff --git a/Source/WebCore/rendering/svg/RenderSVGText.cpp b/Source/WebCore/rendering/svg/RenderSVGText.cpp >index 637d8c4fd844a44fed9492ffc9e5188d0723b28d..c80e956d55d8da48368a5db46918b3b56a533e5f 100644 >--- a/Source/WebCore/rendering/svg/RenderSVGText.cpp >+++ b/Source/WebCore/rendering/svg/RenderSVGText.cpp >@@ -439,7 +439,7 @@ bool RenderSVGText::nodeAtFloatPoint(const HitTestRequest& request, HitTestResul > if (isVisible || !hitRules.requireVisible) { > if ((hitRules.canHitStroke && (style().svgStyle().hasStroke() || !hitRules.requireStroke)) > || (hitRules.canHitFill && (style().svgStyle().hasFill() || !hitRules.requireFill))) { >- FloatPoint localPoint = localToParentTransform().inverse().value_or(AffineTransform()).mapPoint(pointInParent); >+ FloatPoint localPoint = localToParentTransform().inverse().valueOr(AffineTransform()).mapPoint(pointInParent); > > if (!SVGRenderSupport::pointInClippingArea(*this, localPoint)) > return false; >diff --git a/Source/WebCore/rendering/svg/SVGRenderingContext.cpp b/Source/WebCore/rendering/svg/SVGRenderingContext.cpp >index 495b134bb36f0da0474cc709b7cd196f5996c7a1..aa92d634ecef80e9068a81157837028e6c61f3ed 100644 >--- a/Source/WebCore/rendering/svg/SVGRenderingContext.cpp >+++ b/Source/WebCore/rendering/svg/SVGRenderingContext.cpp >@@ -316,7 +316,7 @@ void SVGRenderingContext::clipToImageBuffer(GraphicsContext& context, const Affi > > // The mask image has been created in the absolute coordinate space, as the image should not be scaled. > // So the actual masking process has to be done in the absolute coordinate space as well. >- context.concatCTM(absoluteTransform.inverse().value_or(AffineTransform())); >+ context.concatCTM(absoluteTransform.inverse().valueOr(AffineTransform())); > context.clipToImageBuffer(*imageBuffer, absoluteTargetRect); > context.concatCTM(absoluteTransform); > >diff --git a/Source/WebCore/svg/SVGToOTFFontConversion.cpp b/Source/WebCore/svg/SVGToOTFFontConversion.cpp >index 902e54cb9e27adbe4502bee6276b3cdfec016b65..dfe875578aae0b62c58b75db96edd777bea1f648 100644 >--- a/Source/WebCore/svg/SVGToOTFFontConversion.cpp >+++ b/Source/WebCore/svg/SVGToOTFFontConversion.cpp >@@ -1297,7 +1297,7 @@ void SVGToOTFFontConverter::processGlyphElement(const SVGElement& glyphOrMissing > if (glyphBoundingBox) > m_minRightSideBearing = std::min(m_minRightSideBearing, horizontalAdvance - glyphBoundingBox.value().maxX()); > >- m_glyphs.append(GlyphData(WTFMove(path), glyphElement, horizontalAdvance, verticalAdvance, glyphBoundingBox.value_or(FloatRect()), codepoints)); >+ m_glyphs.append(GlyphData(WTFMove(path), glyphElement, horizontalAdvance, verticalAdvance, glyphBoundingBox.valueOr(FloatRect()), codepoints)); > } > > void SVGToOTFFontConverter::appendLigatureGlyphs() >@@ -1421,7 +1421,7 @@ SVGToOTFFontConverter::SVGToOTFFontConverter(const SVGFontElement& fontElement) > processGlyphElement(glyphElement, &glyphElement, defaultHorizontalAdvance, defaultVerticalAdvance, unicodeAttribute, boundingBox); > } > >- m_boundingBox = boundingBox.value_or(FloatRect()); >+ m_boundingBox = boundingBox.valueOr(FloatRect()); > > appendLigatureGlyphs(); > >diff --git a/Source/WebDriver/Session.cpp b/Source/WebDriver/Session.cpp >index 0c63a20aa1241cf9a9f74e3c6100aa4578bfda34..df28199a6f43b812cd99503e8ea833f5ddb8171e 100644 >--- a/Source/WebDriver/Session.cpp >+++ b/Source/WebDriver/Session.cpp >@@ -219,7 +219,7 @@ void Session::handleUserPrompts(Function<void (CommandResult&&)>&& completionHan > > void Session::handleUnexpectedAlertOpen(Function<void (CommandResult&&)>&& completionHandler) > { >- switch (capabilities().unhandledPromptBehavior.value_or(UnhandledPromptBehavior::DismissAndNotify)) { >+ switch (capabilities().unhandledPromptBehavior.valueOr(UnhandledPromptBehavior::DismissAndNotify)) { > case UnhandledPromptBehavior::Dismiss: > dismissAlert(WTFMove(completionHandler)); > break; >@@ -911,7 +911,7 @@ void Session::computeElementLayout(const String& elementID, OptionSet<ElementLay > > RefPtr<JSON::Object> parameters = JSON::Object::create(); > parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); >- parameters->setString("frameHandle"_s, m_currentBrowsingContext.value_or(emptyString())); >+ parameters->setString("frameHandle"_s, m_currentBrowsingContext.valueOr(emptyString())); > parameters->setString("nodeHandle"_s, elementID); > parameters->setBoolean("scrollIntoViewIfNeeded"_s, options.contains(ElementLayoutOption::ScrollIntoViewIfNeeded)); > parameters->setString("coordinateSystem"_s, options.contains(ElementLayoutOption::UseViewportCoordinates) ? "LayoutViewport"_s : "Page"_s); >@@ -1496,7 +1496,7 @@ void Session::selectOptionElement(const String& elementID, Function<void (Comman > { > RefPtr<JSON::Object> parameters = JSON::Object::create(); > parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); >- parameters->setString("frameHandle"_s, m_currentBrowsingContext.value_or(emptyString())); >+ parameters->setString("frameHandle"_s, m_currentBrowsingContext.valueOr(emptyString())); > parameters->setString("nodeHandle"_s, elementID); > m_host->sendCommandToBackend("selectOptionElement"_s, WTFMove(parameters), [protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError) { >@@ -2004,12 +2004,12 @@ static RefPtr<JSON::Object> builtAutomationCookie(const Session::Cookie& cookie) > RefPtr<JSON::Object> cookieObject = JSON::Object::create(); > cookieObject->setString("name"_s, cookie.name); > cookieObject->setString("value"_s, cookie.value); >- cookieObject->setString("path"_s, cookie.path.value_or("/")); >- cookieObject->setString("domain"_s, cookie.domain.value_or(emptyString())); >- cookieObject->setBoolean("secure"_s, cookie.secure.value_or(false)); >- cookieObject->setBoolean("httpOnly"_s, cookie.httpOnly.value_or(false)); >+ cookieObject->setString("path"_s, cookie.path.valueOr("/")); >+ cookieObject->setString("domain"_s, cookie.domain.valueOr(emptyString())); >+ cookieObject->setBoolean("secure"_s, cookie.secure.valueOr(false)); >+ cookieObject->setBoolean("httpOnly"_s, cookie.httpOnly.valueOr(false)); > cookieObject->setBoolean("session"_s, !cookie.expiry); >- cookieObject->setDouble("expires"_s, cookie.expiry.value_or(0)); >+ cookieObject->setDouble("expires"_s, cookie.expiry.valueOr(0)); > return cookieObject; > } > >@@ -2466,7 +2466,7 @@ void Session::takeScreenshot(Optional<String> elementID, Optional<bool> scrollIn > parameters->setString("nodeHandle"_s, elementID.value()); > else > parameters->setBoolean("clipToViewport"_s, true); >- if (scrollIntoView.value_or(false)) >+ if (scrollIntoView.valueOr(false)) > parameters->setBoolean("scrollIntoViewIfNeeded"_s, true); > m_host->sendCommandToBackend("takeScreenshot"_s, WTFMove(parameters), [protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) mutable { > if (response.isError || !response.responseObject) { >diff --git a/Source/WebDriver/WebDriverService.cpp b/Source/WebDriver/WebDriverService.cpp >index f04f4fdea80a6ab3c6cdc84b2e9f146d27171573..e526882c3ae3a13cb7aa78a1e98b158947b04424 100644 >--- a/Source/WebDriver/WebDriverService.cpp >+++ b/Source/WebDriver/WebDriverService.cpp >@@ -268,7 +268,7 @@ void WebDriverService::sendResponse(Function<void (HTTPRequestHandler::Response& > // Let body be a new JSON Object initialised with the following properties: "error", "message", "stacktrace". > auto errorObject = JSON::Object::create(); > errorObject->setString("error"_s, result.errorString()); >- errorObject->setString("message"_s, result.errorMessage().value_or(emptyString())); >+ errorObject->setString("message"_s, result.errorMessage().valueOr(emptyString())); > errorObject->setString("stacktrace"_s, emptyString()); > // If the error data dictionary contains any entries, set the "data" field on body to a new JSON Object populated with the dictionary. > if (auto& additionalData = result.additionalErrorData()) >@@ -695,12 +695,12 @@ void WebDriverService::createSession(Vector<Capabilities>&& capabilitiesList, st > resultObject->setString("sessionId"_s, m_session->id()); > RefPtr<JSON::Object> capabilitiesObject = JSON::Object::create(); > const auto& capabilities = m_session->capabilities(); >- capabilitiesObject->setString("browserName"_s, capabilities.browserName.value_or(emptyString())); >- capabilitiesObject->setString("browserVersion"_s, capabilities.browserVersion.value_or(emptyString())); >- capabilitiesObject->setString("platformName"_s, capabilities.platformName.value_or(emptyString())); >- capabilitiesObject->setBoolean("acceptInsecureCerts"_s, capabilities.acceptInsecureCerts.value_or(false)); >- capabilitiesObject->setBoolean("setWindowRect"_s, capabilities.setWindowRect.value_or(true)); >- switch (capabilities.unhandledPromptBehavior.value_or(UnhandledPromptBehavior::DismissAndNotify)) { >+ capabilitiesObject->setString("browserName"_s, capabilities.browserName.valueOr(emptyString())); >+ capabilitiesObject->setString("browserVersion"_s, capabilities.browserVersion.valueOr(emptyString())); >+ capabilitiesObject->setString("platformName"_s, capabilities.platformName.valueOr(emptyString())); >+ capabilitiesObject->setBoolean("acceptInsecureCerts"_s, capabilities.acceptInsecureCerts.valueOr(false)); >+ capabilitiesObject->setBoolean("setWindowRect"_s, capabilities.setWindowRect.valueOr(true)); >+ switch (capabilities.unhandledPromptBehavior.valueOr(UnhandledPromptBehavior::DismissAndNotify)) { > case UnhandledPromptBehavior::Dismiss: > capabilitiesObject->setString("unhandledPromptBehavior"_s, "dismiss"); > break; >@@ -717,7 +717,7 @@ void WebDriverService::createSession(Vector<Capabilities>&& capabilitiesList, st > capabilitiesObject->setString("unhandledPromptBehavior"_s, "ignore"); > break; > } >- switch (capabilities.pageLoadStrategy.value_or(PageLoadStrategy::Normal)) { >+ switch (capabilities.pageLoadStrategy.valueOr(PageLoadStrategy::Normal)) { > case PageLoadStrategy::None: > capabilitiesObject->setString("pageLoadStrategy"_s, "none"); > break; >diff --git a/Source/WebKit/Shared/API/c/WKSecurityOriginRef.cpp b/Source/WebKit/Shared/API/c/WKSecurityOriginRef.cpp >index 5e6be74b8da6d4b93603790ca4ad176d1f662c66..d07539b58be2e60ae0c0054d236bdbd5a4fbe714 100644 >--- a/Source/WebKit/Shared/API/c/WKSecurityOriginRef.cpp >+++ b/Source/WebKit/Shared/API/c/WKSecurityOriginRef.cpp >@@ -76,5 +76,5 @@ WKStringRef WKSecurityOriginCopyHost(WKSecurityOriginRef securityOrigin) > > unsigned short WKSecurityOriginGetPort(WKSecurityOriginRef securityOrigin) > { >- return WebKit::toImpl(securityOrigin)->securityOrigin().port().value_or(0); >+ return WebKit::toImpl(securityOrigin)->securityOrigin().port().valueOr(0); > } >diff --git a/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h b/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h >index 4ceba880bdd87faf9c5e41ac071f4efdcff60458..dad1c05c06158ee525a3e957af023b636a3d237d 100644 >--- a/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h >+++ b/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h >@@ -61,7 +61,7 @@ public: > > bool isAutomaticProcessWarmingEnabled() const > { >- return m_isAutomaticProcessWarmingEnabledByClient.value_or(m_clientWouldBenefitFromAutomaticProcessPrewarming); >+ return m_isAutomaticProcessWarmingEnabledByClient.valueOr(m_clientWouldBenefitFromAutomaticProcessPrewarming); > } > > bool wasAutomaticProcessWarmingSetByClient() const { return !!m_isAutomaticProcessWarmingEnabledByClient; } >@@ -157,7 +157,7 @@ public: > > bool processSwapsOnNavigation() const > { >- return m_processSwapsOnNavigationFromClient.value_or(m_processSwapsOnNavigationFromExperimentalFeatures); >+ return m_processSwapsOnNavigationFromClient.valueOr(m_processSwapsOnNavigationFromExperimentalFeatures); > } > void setProcessSwapsOnNavigation(bool swaps) { m_processSwapsOnNavigationFromClient = swaps; } > void setProcessSwapsOnNavigationFromExperimentalFeatures(bool swaps) { m_processSwapsOnNavigationFromExperimentalFeatures = swaps; } >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKSecurityOrigin.mm b/Source/WebKit/UIProcess/API/Cocoa/WKSecurityOrigin.mm >index b7112cee17bdcc269bc9f9e271d2402da2166822..c5543a20b71e8c976e2122b9b4bea48b3751fc70 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKSecurityOrigin.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKSecurityOrigin.mm >@@ -58,7 +58,7 @@ - (NSString *)host > > - (NSInteger)port > { >- return _securityOrigin->securityOrigin().port().value_or(0); >+ return _securityOrigin->securityOrigin().port().valueOr(0); > } > > #pragma mark WKObject protocol implementation >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm b/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm >index d287fd95bdc79bc9486c3ed4f836e6ec003203ec..9ad93fb6b419cec2c414056eb00bd15ba924ff6b 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm >@@ -946,7 +946,7 @@ - (void)_setCPULimit:(double)cpuLimit > > - (double)_cpuLimit > { >- return _pageConfiguration->cpuLimit().value_or(0); >+ return _pageConfiguration->cpuLimit().valueOr(0); > } > > #endif // PLATFORM(MAC) >diff --git a/Source/WebKit/UIProcess/API/glib/WebKitSecurityOrigin.cpp b/Source/WebKit/UIProcess/API/glib/WebKitSecurityOrigin.cpp >index e4d065f918b3520818d906376ffca776693fc291..2e0789d4301f8a88159e8bee03067c156aa2f774 100644 >--- a/Source/WebKit/UIProcess/API/glib/WebKitSecurityOrigin.cpp >+++ b/Source/WebKit/UIProcess/API/glib/WebKitSecurityOrigin.cpp >@@ -217,7 +217,7 @@ guint16 webkit_security_origin_get_port(WebKitSecurityOrigin* origin) > { > g_return_val_if_fail(origin, 0); > >- return origin->securityOrigin->port().value_or(0); >+ return origin->securityOrigin->port().valueOr(0); > } > > /** >diff --git a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp >index d7d0a6d49840af7124090b5b28458c0b02ce617d..d5fddab65618075a551862a055b9bad337bd5d85 100644 >--- a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp >+++ b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp >@@ -813,7 +813,7 @@ static void webkitWebViewBaseHandleWheelEvent(WebKitWebViewBase* webViewBase, Gd > WebKitWebViewBasePrivate* priv = webViewBase->priv; > ASSERT(!priv->dialog); > if (phase) >- priv->pageProxy->handleWheelEvent(NativeWebWheelEvent(event, phase.value(), momentum.value_or(WebWheelEvent::Phase::PhaseNone))); >+ priv->pageProxy->handleWheelEvent(NativeWebWheelEvent(event, phase.value(), momentum.valueOr(WebWheelEvent::Phase::PhaseNone))); > else > priv->pageProxy->handleWheelEvent(NativeWebWheelEvent(event)); > } >diff --git a/Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.cpp b/Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.cpp >index dbe8397209da168db119baf460c5f2d8b695ff3f..0590c57b297df639d8465b64d5e872f04b3446b6 100644 >--- a/Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.cpp >+++ b/Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.cpp >@@ -59,7 +59,7 @@ Seconds SimulatedInputKeyFrame::maximumDuration() const > // The "compute the tick duration" algorithm (§17.4 Dispatching Actions). > Seconds result; > for (auto& entry : states) >- result = std::max(result, entry.second.duration.value_or(Seconds(0))); >+ result = std::max(result, entry.second.duration.valueOr(Seconds(0))); > > return result; > } >@@ -259,7 +259,7 @@ void SimulatedInputDispatcher::transitionInputSourceToState(SimulatedInputSource > eventDispatchFinished(WTF::nullopt); > break; > case SimulatedInputSourceType::Mouse: { >- resolveLocation(a.location.value_or(WebCore::IntPoint()), b.location, b.origin.value_or(MouseMoveOrigin::Viewport), b.nodeHandle, [this, &a, &b, eventDispatchFinished = WTFMove(eventDispatchFinished)](Optional<WebCore::IntPoint> location, Optional<AutomationCommandError> error) mutable { >+ resolveLocation(a.location.valueOr(WebCore::IntPoint()), b.location, b.origin.valueOr(MouseMoveOrigin::Viewport), b.nodeHandle, [this, &a, &b, eventDispatchFinished = WTFMove(eventDispatchFinished)](Optional<WebCore::IntPoint> location, Optional<AutomationCommandError> error) mutable { > if (error) { > eventDispatchFinished(error); > return; >@@ -282,7 +282,7 @@ void SimulatedInputDispatcher::transitionInputSourceToState(SimulatedInputSource > } else if (a.location != b.location) { > LOG(Automation, "SimulatedInputDispatcher[%p]: simulating MouseMove for transition to %d.%d", this, m_keyframeIndex, m_inputSourceStateIndex); > // FIXME: This does not interpolate mousemoves per the "perform a pointer move" algorithm (§17.4 Dispatching Actions). >- m_client.simulateMouseInteraction(m_page, MouseInteraction::Move, b.pressedMouseButton.value_or(MouseButton::NoButton), b.location.value(), WTFMove(eventDispatchFinished)); >+ m_client.simulateMouseInteraction(m_page, MouseInteraction::Move, b.pressedMouseButton.valueOr(MouseButton::NoButton), b.location.value(), WTFMove(eventDispatchFinished)); > } else > eventDispatchFinished(WTF::nullopt); > }); >diff --git a/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp b/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp >index 370b21ed6da03232aacaeb8204fcb657ae6b690a..57df5f3e0318103c42fb9dc9d0ddb1778b86a0eb 100644 >--- a/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp >+++ b/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp >@@ -387,7 +387,7 @@ void WebAutomationSession::setWindowFrameOfBrowsingContext(const String& handle, > this->restoreWindowForPage(webPage, [callback = WTFMove(callback), page = WTFMove(page), width, height, x, y]() mutable { > auto& webPage = *page; > webPage.getWindowFrameWithCallback([callback = WTFMove(callback), page = WTFMove(page), width, height, x, y](WebCore::FloatRect originalFrame) mutable { >- WebCore::FloatRect newFrame = WebCore::FloatRect(WebCore::FloatPoint(x.value_or(originalFrame.location().x()), y.value_or(originalFrame.location().y())), WebCore::FloatSize(width.value_or(originalFrame.size().width()), height.value_or(originalFrame.size().height()))); >+ WebCore::FloatRect newFrame = WebCore::FloatRect(WebCore::FloatPoint(x.valueOr(originalFrame.location().x()), y.valueOr(originalFrame.location().y())), WebCore::FloatSize(width.valueOr(originalFrame.size().width()), height.valueOr(originalFrame.size().height()))); > if (newFrame != originalFrame) > page->setWindowFrame(newFrame); > >@@ -1834,7 +1834,7 @@ void WebAutomationSession::performInteractionSequence(const String& handle, cons > String pressedButtonString; > if (stateObject->getString("pressedButton"_s, pressedButtonString)) { > auto protocolButton = Inspector::Protocol::AutomationHelpers::parseEnumValueFromString<Inspector::Protocol::Automation::MouseButton>(pressedButtonString); >- sourceState.pressedMouseButton = protocolMouseButtonToWebMouseEventButton(protocolButton.value_or(Inspector::Protocol::Automation::MouseButton::None)); >+ sourceState.pressedMouseButton = protocolMouseButtonToWebMouseEventButton(protocolButton.valueOr(Inspector::Protocol::Automation::MouseButton::None)); > } > > String originString; >diff --git a/Source/WebKit/UIProcess/Automation/WebAutomationSessionMacros.h b/Source/WebKit/UIProcess/Automation/WebAutomationSessionMacros.h >index 3487fa9152f0428a60a2e27a96975d6480a74306..93af5abc708bd598f0f40bcc294852a3705297ae 100644 >--- a/Source/WebKit/UIProcess/Automation/WebAutomationSessionMacros.h >+++ b/Source/WebKit/UIProcess/Automation/WebAutomationSessionMacros.h >@@ -28,7 +28,7 @@ > #define errorNameAndDetailsSeparator ";" > > // Make sure the predefined error name is valid, otherwise use InternalError. >-#define VALIDATED_ERROR_MESSAGE(errorString) Inspector::Protocol::AutomationHelpers::parseEnumValueFromString<Inspector::Protocol::Automation::ErrorMessage>(errorString).value_or(Inspector::Protocol::Automation::ErrorMessage::InternalError) >+#define VALIDATED_ERROR_MESSAGE(errorString) Inspector::Protocol::AutomationHelpers::parseEnumValueFromString<Inspector::Protocol::Automation::ErrorMessage>(errorString).valueOr(Inspector::Protocol::Automation::ErrorMessage::InternalError) > > // If the error name is incorrect for these macros, it will be a compile-time error. > #define STRING_FOR_PREDEFINED_ERROR_NAME(errorName) Inspector::Protocol::AutomationHelpers::getEnumConstantValue(Inspector::Protocol::Automation::ErrorMessage::errorName) >diff --git a/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp b/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp >index 86206bac9dbacad641c092f8324fd6df02eb92df..726883b3cf80f48f2dbfa563fc9bf7c55d57006f 100644 >--- a/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp >+++ b/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp >@@ -77,7 +77,7 @@ void ServiceWorkerProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& > > void ServiceWorkerProcessProxy::start(const WebPreferencesStore& store, Optional<PAL::SessionID> initialSessionID) > { >- send(Messages::WebProcess::EstablishWorkerContextConnectionToNetworkProcess { processPool().defaultPageGroup().pageGroupID(), m_serviceWorkerPageID, store, initialSessionID.value_or(PAL::SessionID::defaultSessionID()) }, 0); >+ send(Messages::WebProcess::EstablishWorkerContextConnectionToNetworkProcess { processPool().defaultPageGroup().pageGroupID(), m_serviceWorkerPageID, store, initialSessionID.valueOr(PAL::SessionID::defaultSessionID()) }, 0); > } > > void ServiceWorkerProcessProxy::setUserAgent(const String& userAgent) >diff --git a/Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp b/Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp >index b4e23994adfc6086725446c5b617db81bd10b673..73f55a4835f128831bc3288c8ad254370578c2f4 100644 >--- a/Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp >+++ b/Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp >@@ -224,7 +224,7 @@ void AuthenticatorManager::initTimeOutTimer(const Optional<unsigned>& timeOutInM > { > using namespace AuthenticatorManagerInternal; > >- unsigned timeOutInMsValue = std::min(maxTimeOutValue, timeOutInMs.value_or(maxTimeOutValue)); >+ unsigned timeOutInMsValue = std::min(maxTimeOutValue, timeOutInMs.valueOr(maxTimeOutValue)); > // FIXME(192061) > LOG_ERROR("Start timer. %d", timeOutInMsValue); > m_requestTimeOutTimer.startOneShot(Seconds::fromMilliseconds(timeOutInMsValue)); >diff --git a/Source/WebKit/UIProcess/WebPageProxy.cpp b/Source/WebKit/UIProcess/WebPageProxy.cpp >index 4b01252ebb8fe927c5aaf4c570da8e455f8ecb6d..ab61fc24166cb6e4ed8ad51554de65d34aad7f96 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.cpp >+++ b/Source/WebKit/UIProcess/WebPageProxy.cpp >@@ -3056,7 +3056,7 @@ void WebPageProxy::windowScreenDidChange(PlatformDisplayID displayID) > > float WebPageProxy::deviceScaleFactor() const > { >- return m_customDeviceScaleFactor.value_or(m_intrinsicDeviceScaleFactor); >+ return m_customDeviceScaleFactor.valueOr(m_intrinsicDeviceScaleFactor); > } > > void WebPageProxy::setCustomDeviceScaleFactor(float customScaleFactor) >diff --git a/Source/WebKit/UIProcess/WebPageProxy.h b/Source/WebKit/UIProcess/WebPageProxy.h >index ca5104885a46cef301ee6ab1f36bec81e3de62cb..a158b1f721ee2b0d9b1e4bd3fd42b09e6f513357 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.h >+++ b/Source/WebKit/UIProcess/WebPageProxy.h >@@ -1169,7 +1169,7 @@ public: > void setAutoSizingShouldExpandToViewHeight(bool); > > void setViewportSizeForCSSViewportUnits(const WebCore::IntSize&); >- WebCore::IntSize viewportSizeForCSSViewportUnits() const { return m_viewportSizeForCSSViewportUnits.value_or(WebCore::IntSize()); } >+ WebCore::IntSize viewportSizeForCSSViewportUnits() const { return m_viewportSizeForCSSViewportUnits.valueOr(WebCore::IntSize()); } > > void didReceiveAuthenticationChallengeProxy(uint64_t frameID, Ref<AuthenticationChallengeProxy>&&); > >diff --git a/Source/WebKit/UIProcess/gtk/WebPopupMenuProxyGtk.cpp b/Source/WebKit/UIProcess/gtk/WebPopupMenuProxyGtk.cpp >index a6b1c9136a702c8335279d6d52fcf70b7dc660d9..e74601cd095d7724c16b2e45241df76f58223356 100644 >--- a/Source/WebKit/UIProcess/gtk/WebPopupMenuProxyGtk.cpp >+++ b/Source/WebKit/UIProcess/gtk/WebPopupMenuProxyGtk.cpp >@@ -69,7 +69,7 @@ void WebPopupMenuProxyGtk::selectItem(unsigned itemIndex) > void WebPopupMenuProxyGtk::activateItem(Optional<unsigned> itemIndex) > { > if (m_client) >- m_client->valueChangedForPopupMenu(this, itemIndex.value_or(m_selectedItem.value_or(-1))); >+ m_client->valueChangedForPopupMenu(this, itemIndex.valueOr(m_selectedItem.valueOr(-1))); > } > > bool WebPopupMenuProxyGtk::activateItemAtPath(GtkTreePath* path) >diff --git a/Source/WebKit/UIProcess/mac/LegacySessionStateCoding.cpp b/Source/WebKit/UIProcess/mac/LegacySessionStateCoding.cpp >index 01c6069a7582be0f889afac044fcfa72e5e3df5a..ea6c3777e50136cca586c3740c7ca4b2966e9943 100644 >--- a/Source/WebKit/UIProcess/mac/LegacySessionStateCoding.cpp >+++ b/Source/WebKit/UIProcess/mac/LegacySessionStateCoding.cpp >@@ -284,8 +284,8 @@ static void encodeFormDataElement(HistoryEntryDataEncoder& encoder, const HTTPBo > encoder << false; > > encoder << element.fileStart; >- encoder << element.fileLength.value_or(-1); >- encoder << element.expectedFileModificationTime.value_or(WallTime::nan()).secondsSinceEpoch().value(); >+ encoder << element.fileLength.valueOr(-1); >+ encoder << element.expectedFileModificationTime.valueOr(WallTime::nan()).secondsSinceEpoch().value(); > break; > > case HTTPBody::Element::Type::Blob: >diff --git a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp >index 1623b200908be20a26d90f2102a0a85e667a3379..3a40d206a01ebd9615a0208621bff6a55841f024 100644 >--- a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp >+++ b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp >@@ -156,8 +156,8 @@ void WebLoaderStrategy::scheduleLoad(ResourceLoader& resourceLoader, CachedResou > auto& frameLoaderClient = resourceLoader.frameLoader()->client(); > > WebResourceLoader::TrackingParameters trackingParameters; >- trackingParameters.pageID = frameLoaderClient.pageID().value_or(0); >- trackingParameters.frameID = frameLoaderClient.frameID().value_or(0); >+ trackingParameters.pageID = frameLoaderClient.pageID().valueOr(0); >+ trackingParameters.frameID = frameLoaderClient.frameID().valueOr(0); > trackingParameters.resourceID = identifier; > auto sessionID = frameLoaderClient.sessionID(); > >diff --git a/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm b/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm >index e88845740a88c66b31df7e2e4cd5268aca1c512c..c398ebe1995e468027bdaccd2ab49292d898d506 100644 >--- a/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm >+++ b/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm >@@ -1286,7 +1286,7 @@ IntPoint PDFPlugin::convertFromRootViewToPlugin(const IntPoint& point) const > IntPoint PDFPlugin::convertFromPDFViewToRootView(const IntPoint& point) const > { > IntPoint pointInPluginCoordinates(point.x(), size().height() - point.y()); >- return m_rootViewToPluginTransform.inverse().value_or(AffineTransform()).mapPoint(pointInPluginCoordinates); >+ return m_rootViewToPluginTransform.inverse().valueOr(AffineTransform()).mapPoint(pointInPluginCoordinates); > } > > IntPoint PDFPlugin::convertFromRootViewToPDFView(const IntPoint& point) const >@@ -1315,7 +1315,7 @@ IntRect PDFPlugin::boundsOnScreen() const > return IntRect(); > > FloatRect bounds = FloatRect(FloatPoint(), size()); >- FloatRect rectInRootViewCoordinates = m_rootViewToPluginTransform.inverse().value_or(AffineTransform()).mapRect(bounds); >+ FloatRect rectInRootViewCoordinates = m_rootViewToPluginTransform.inverse().valueOr(AffineTransform()).mapRect(bounds); > return frameView->contentsToScreen(enclosingIntRect(rectInRootViewCoordinates)); > } > >@@ -1325,7 +1325,7 @@ void PDFPlugin::geometryDidChange(const IntSize& pluginSize, const IntRect&, con > return; > > m_size = pluginSize; >- m_rootViewToPluginTransform = pluginToRootViewTransform.inverse().value_or(AffineTransform()); >+ m_rootViewToPluginTransform = pluginToRootViewTransform.inverse().valueOr(AffineTransform()); > [m_pdfLayerController setFrameSize:pluginSize]; > > [CATransaction begin]; >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/SessionStateConversion.cpp b/Source/WebKit/WebProcess/WebCoreSupport/SessionStateConversion.cpp >index f283c728630ed4e424d6d0bdd4e2806e28234802..400d8325edee57c8f45c668f591f3eef0dd1f17c 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/SessionStateConversion.cpp >+++ b/Source/WebKit/WebProcess/WebCoreSupport/SessionStateConversion.cpp >@@ -128,7 +128,7 @@ static Ref<FormData> toFormData(const HTTPBody& httpBody) > break; > > case HTTPBody::Element::Type::File: >- formData->appendFileRange(element.filePath, element.fileStart, element.fileLength.value_or(BlobDataItem::toEndOfFile), element.expectedFileModificationTime); >+ formData->appendFileRange(element.filePath, element.fileStart, element.fileLength.valueOr(BlobDataItem::toEndOfFile), element.expectedFileModificationTime); > break; > > case HTTPBody::Element::Type::Blob: >diff --git a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >index 9f91731f43bfb11224757efb1017e4625c148f7f..c87b65953d7dc0d0f546727beb4d5bcd42addc57 100644 >--- a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >+++ b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >@@ -2992,7 +2992,7 @@ void WebPage::updateVisibleContentRects(const VisibleContentRectUpdateInfo& visi > m_oldestNonStableUpdateVisibleContentRectsTimestamp = oldestTimestamp; > } > >- float scaleToUse = scaleFromUIProcess.value_or(m_page->pageScaleFactor()); >+ float scaleToUse = scaleFromUIProcess.valueOr(m_page->pageScaleFactor()); > FloatRect exposedContentRect = visibleContentRectUpdateInfo.exposedContentRect(); > FloatRect adjustedExposedContentRect = adjustExposedRectForNewScale(exposedContentRect, visibleContentRectUpdateInfo.scale(), scaleToUse); > m_drawingArea->setExposedContentRect(adjustedExposedContentRect); >diff --git a/Source/WebKit/WebProcess/WebPage/wpe/CompositingManager.cpp b/Source/WebKit/WebProcess/WebPage/wpe/CompositingManager.cpp >index 9fb0104dee70616545846a2f21ae167cf682e5ba..d515a0b58eb82183c60176c703e2241ae2f8a832 100644 >--- a/Source/WebKit/WebProcess/WebPage/wpe/CompositingManager.cpp >+++ b/Source/WebKit/WebProcess/WebPage/wpe/CompositingManager.cpp >@@ -47,7 +47,7 @@ void CompositingManager::establishConnection(WebPage& webPage) > > int CompositingManager::releaseConnectionFd() > { >- int fd = m_connectionFd.value_or(-1); >+ int fd = m_connectionFd.valueOr(-1); > m_connectionFd = WTF::nullopt; > return fd; > } >diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebSecurityOrigin.mm b/Source/WebKitLegacy/mac/WebCoreSupport/WebSecurityOrigin.mm >index 067f56cde3942c2ea71b1f4b52f871a5d4613cc5..b66948a19b538fd13714594e0c0de722780b4853 100644 >--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebSecurityOrigin.mm >+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebSecurityOrigin.mm >@@ -88,7 +88,7 @@ - (NSString *)stringValue > > - (unsigned short)port > { >- return reinterpret_cast<SecurityOrigin*>(_private)->port().value_or(0); >+ return reinterpret_cast<SecurityOrigin*>(_private)->port().valueOr(0); > } > > // FIXME: Overriding isEqual: without overriding hash will cause trouble if this ever goes into an NSSet or is the key in an NSDictionary, >diff --git a/Source/WebKitLegacy/win/WebSecurityOrigin.cpp b/Source/WebKitLegacy/win/WebSecurityOrigin.cpp >index 945b86923f6b1fca7d0b4777f0cd0600246a1000..57ca80e173dd9b5325f92f349fa894d1ae642684 100644 >--- a/Source/WebKitLegacy/win/WebSecurityOrigin.cpp >+++ b/Source/WebKitLegacy/win/WebSecurityOrigin.cpp >@@ -120,7 +120,7 @@ HRESULT WebSecurityOrigin::port(_Out_ unsigned short* result) > if (!result) > return E_POINTER; > >- *result = m_securityOrigin->port().value_or(0); >+ *result = m_securityOrigin->port().valueOr(0); > > return S_OK; > } >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index d069393c3432179af7494fd45c965f0e1e9adffe..1ead344e3bf9420f09c9db706e46060e7aad47a4 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,18 @@ >+2018-12-20 Chris Dumez <cdumez@apple.com> >+ >+ Use Optional::valueOr() instead of Optional::value_or() >+ https://bugs.webkit.org/show_bug.cgi?id=192933 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * TestWebKitAPI/Tests/WTF/URLParser.cpp: >+ (TestWebKitAPI::checkURL): >+ (TestWebKitAPI::checkRelativeURL): >+ (TestWebKitAPI::checkURLDifferences): >+ (TestWebKitAPI::checkRelativeURLDifferences): >+ * TestWebKitAPI/Tests/WebCore/URLParserTextEncoding.cpp: >+ (TestWebKitAPI::checkURL): >+ > 2018-12-19 Chris Dumez <cdumez@apple.com> > > wtf/Optional.h: move-constructor and move-assignment operator should disengage the value being moved from >diff --git a/Tools/TestWebKitAPI/Tests/WTF/URLParser.cpp b/Tools/TestWebKitAPI/Tests/WTF/URLParser.cpp >index f8085d02dfe92aededadce5e57b941f6cd71a2d0..fb9fe64e3823e545c12f19c1ca00b037ef5f4171 100644 >--- a/Tools/TestWebKitAPI/Tests/WTF/URLParser.cpp >+++ b/Tools/TestWebKitAPI/Tests/WTF/URLParser.cpp >@@ -94,7 +94,7 @@ static void checkURL(const String& urlString, const ExpectedParts& parts, TestTa > EXPECT_TRUE(eq(parts.user, url.user())); > EXPECT_TRUE(eq(parts.password, url.pass())); > EXPECT_TRUE(eq(parts.host, url.host())); >- EXPECT_EQ(parts.port, url.port().value_or(0)); >+ EXPECT_EQ(parts.port, url.port().valueOr(0)); > EXPECT_TRUE(eq(parts.path, url.path())); > EXPECT_TRUE(eq(parts.query, url.query())); > EXPECT_TRUE(eq(parts.fragment, url.fragmentIdentifier())); >@@ -121,7 +121,7 @@ static void checkRelativeURL(const String& urlString, const String& baseURLStrin > EXPECT_TRUE(eq(parts.user, url.user())); > EXPECT_TRUE(eq(parts.password, url.pass())); > EXPECT_TRUE(eq(parts.host, url.host())); >- EXPECT_EQ(parts.port, url.port().value_or(0)); >+ EXPECT_EQ(parts.port, url.port().valueOr(0)); > EXPECT_TRUE(eq(parts.path, url.path())); > EXPECT_TRUE(eq(parts.query, url.query())); > EXPECT_TRUE(eq(parts.fragment, url.fragmentIdentifier())); >@@ -150,7 +150,7 @@ static void checkURLDifferences(const String& urlString, const ExpectedParts& pa > EXPECT_TRUE(eq(partsNew.user, url.user())); > EXPECT_TRUE(eq(partsNew.password, url.pass())); > EXPECT_TRUE(eq(partsNew.host, url.host())); >- EXPECT_EQ(partsNew.port, url.port().value_or(0)); >+ EXPECT_EQ(partsNew.port, url.port().valueOr(0)); > EXPECT_TRUE(eq(partsNew.path, url.path())); > EXPECT_TRUE(eq(partsNew.query, url.query())); > EXPECT_TRUE(eq(partsNew.fragment, url.fragmentIdentifier())); >@@ -179,7 +179,7 @@ static void checkRelativeURLDifferences(const String& urlString, const String& b > EXPECT_TRUE(eq(partsNew.user, url.user())); > EXPECT_TRUE(eq(partsNew.password, url.pass())); > EXPECT_TRUE(eq(partsNew.host, url.host())); >- EXPECT_EQ(partsNew.port, url.port().value_or(0)); >+ EXPECT_EQ(partsNew.port, url.port().valueOr(0)); > EXPECT_TRUE(eq(partsNew.path, url.path())); > EXPECT_TRUE(eq(partsNew.query, url.query())); > EXPECT_TRUE(eq(partsNew.fragment, url.fragmentIdentifier())); >diff --git a/Tools/TestWebKitAPI/Tests/WebCore/URLParserTextEncoding.cpp b/Tools/TestWebKitAPI/Tests/WebCore/URLParserTextEncoding.cpp >index f892853d28b00a475a52c54adde9cb783d370f11..f6c3dea3b3cd96ac72d92581047363f6527f9886 100644 >--- a/Tools/TestWebKitAPI/Tests/WebCore/URLParserTextEncoding.cpp >+++ b/Tools/TestWebKitAPI/Tests/WebCore/URLParserTextEncoding.cpp >@@ -96,7 +96,7 @@ static void checkURL(const String& urlString, const TextEncoding* encoding, cons > EXPECT_TRUE(eq(parts.user, url.user())); > EXPECT_TRUE(eq(parts.password, url.pass())); > EXPECT_TRUE(eq(parts.host, url.host())); >- EXPECT_EQ(parts.port, url.port().value_or(0)); >+ EXPECT_EQ(parts.port, url.port().valueOr(0)); > EXPECT_TRUE(eq(parts.path, url.path())); > EXPECT_TRUE(eq(parts.query, url.query())); > EXPECT_TRUE(eq(parts.fragment, url.fragmentIdentifier())); >@@ -120,7 +120,7 @@ static void checkURL(const String& urlString, const String& baseURLString, const > EXPECT_TRUE(eq(parts.user, url.user())); > EXPECT_TRUE(eq(parts.password, url.pass())); > EXPECT_TRUE(eq(parts.host, url.host())); >- EXPECT_EQ(parts.port, url.port().value_or(0)); >+ EXPECT_EQ(parts.port, url.port().valueOr(0)); > EXPECT_TRUE(eq(parts.path, url.path())); > EXPECT_TRUE(eq(parts.query, url.query())); > EXPECT_TRUE(eq(parts.fragment, url.fragmentIdentifier()));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192933
:
357817
|
357839