<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[287294] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/287294">287294</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2021-12-20 18:25:46 -0800 (Mon, 20 Dec 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>[WebIDL] convertVariadicArguments() should return a FixedVector
https://bugs.webkit.org/show_bug.cgi?id=232639

Patch by Alexey Shvayka <ashvayka@apple.com> on 2021-12-20
Reviewed by Yusuke Suzuki.

Source/WebCore:

Since it's highly unlikely (CSSNumericArray is immutable) that we would need to
mutate variadic arguments before processing them or storing, and we know their size
upfront, it makes the most sense to save some memory by utilizing a FixedVector.

This patch reduces sizeof(ScheduledAction) by 8, enabling memory-neutral addition
of a field like m_incumbentGlobalObject.

No new tests, no behavior change.

* Modules/mediastream/PeerConnectionBackend.cpp:
(WebCore::PeerConnectionBackend::addTrack):
* Modules/mediastream/PeerConnectionBackend.h:
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::addTrack):
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/RTCRtpSender.cpp:
(WebCore::RTCRtpSender::setStreams):
(WebCore::RTCRtpSender::setMediaStreamIds):
* Modules/mediastream/RTCRtpSender.h:
* Modules/mediastream/RTCRtpSenderBackend.h:
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::LibWebRTCMediaEndpoint::addTrack):
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
(WebCore::LibWebRTCPeerConnectionBackend::addTrack):
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
* Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:
(WebCore::LibWebRTCRtpSenderBackend::setMediaStreamIds):
* Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h:
* bindings/js/JSDOMConvertVariadic.h:
(WebCore::convertVariadicArguments):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::addArguments):
* bindings/js/ScheduledAction.h:
* css/typedom/CSSNumericValue.cpp:
(WebCore::CSSNumericValue::add):
(WebCore::CSSNumericValue::sub):
(WebCore::CSSNumericValue::mul):
(WebCore::CSSNumericValue::div):
(WebCore::CSSNumericValue::min):
(WebCore::CSSNumericValue::max):
(WebCore::CSSNumericValue::equals):
(WebCore::CSSNumericValue::toSum):
* css/typedom/CSSNumericValue.h:
* css/typedom/numeric/CSSMathMax.cpp:
(WebCore::CSSMathMax::create):
(WebCore::CSSMathMax::CSSMathMax):
* css/typedom/numeric/CSSMathMax.h:
* css/typedom/numeric/CSSMathMin.cpp:
(WebCore::CSSMathMin::create):
(WebCore::CSSMathMin::CSSMathMin):
* css/typedom/numeric/CSSMathMin.h:
* css/typedom/numeric/CSSMathProduct.cpp:
(WebCore::CSSMathProduct::create):
(WebCore::CSSMathProduct::CSSMathProduct):
* css/typedom/numeric/CSSMathProduct.h:
* css/typedom/numeric/CSSMathSum.cpp:
(WebCore::CSSMathSum::create):
(WebCore::CSSMathSum::CSSMathSum):
* css/typedom/numeric/CSSMathSum.h:
* css/typedom/numeric/CSSNumericArray.cpp:
(WebCore::CSSNumericArray::create):
(WebCore::CSSNumericArray::CSSNumericArray):
* css/typedom/numeric/CSSNumericArray.h:
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::append):
(WebCore::ContainerNode::prepend):
(WebCore::ContainerNode::replaceChildren):
* dom/ContainerNode.h:
* dom/Document.cpp:
(WebCore::Document::write):
(WebCore::Document::writeln):
* dom/Document.h:
* dom/DocumentTouch.cpp:
(WebCore::DocumentTouch::createTouchList):
* dom/DocumentTouch.h:
* dom/Node.cpp:
(WebCore::nodeSetPreTransformedFromNodeOrStringVector):
(WebCore::Node::convertNodesOrStringsIntoNode):
(WebCore::Node::before):
(WebCore::Node::after):
(WebCore::Node::replaceWith):
* dom/Node.h:
* dom/TouchList.h:
(WebCore::TouchList::create):
(WebCore::TouchList::TouchList):
* html/DOMTokenList.cpp:
(WebCore::DOMTokenList::add):
(WebCore::DOMTokenList::remove):
* html/DOMTokenList.h:
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getContext):
* html/HTMLCanvasElement.h:
* html/OffscreenCanvas.cpp:
(WebCore::OffscreenCanvas::getContext):
* html/OffscreenCanvas.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::setTimeout):
(WebCore::DOMWindow::setInterval):
* page/DOMWindow.h:
* workers/DedicatedWorkerGlobalScope.cpp:
(WebCore::DedicatedWorkerGlobalScope::importScripts):
* workers/DedicatedWorkerGlobalScope.h:
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::setTimeout):
(WebCore::WorkerGlobalScope::setInterval):
(WebCore::WorkerGlobalScope::importScripts):
* workers/WorkerGlobalScope.h:

Source/WebKit:

Add / remove tokens one by one because there is no way to retrieve
the size of va_list in advance so we could construct a FixedVector.

* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp:
(webkit_dom_dom_token_list_add):
(webkit_dom_dom_token_list_remove):

Source/WTF:

Introduce std::initializer_list constructor for FixedVector and a WTF::map() overload.

* wtf/FixedVector.h:
(WTF::FixedVector::FixedVector):
(WTF::map):
* wtf/VectorTraits.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfFixedVectorh">trunk/Source/WTF/wtf/FixedVector.h</a></li>
<li><a href="#trunkSourceWTFwtfVectorTraitsh">trunk/Source/WTF/wtf/VectorTraits.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamPeerConnectionBackendcpp">trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamPeerConnectionBackendh">trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCPeerConnectioncpp">trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCPeerConnectionh">trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCRtpSendercpp">trunk/Source/WebCore/Modules/mediastream/RTCRtpSender.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCRtpSenderh">trunk/Source/WebCore/Modules/mediastream/RTCRtpSender.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCRtpSenderBackendh">trunk/Source/WebCore/Modules/mediastream/RTCRtpSenderBackend.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCMediaEndpointcpp">trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCMediaEndpointh">trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCPeerConnectionBackendcpp">trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCPeerConnectionBackendh">trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCRtpSenderBackendcpp">trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCRtpSenderBackendh">trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertVariadich">trunk/Source/WebCore/bindings/js/JSDOMConvertVariadic.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsScheduledActioncpp">trunk/Source/WebCore/bindings/js/ScheduledAction.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsScheduledActionh">trunk/Source/WebCore/bindings/js/ScheduledAction.h</a></li>
<li><a href="#trunkSourceWebCorecsstypedomCSSNumericValuecpp">trunk/Source/WebCore/css/typedom/CSSNumericValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecsstypedomCSSNumericValueh">trunk/Source/WebCore/css/typedom/CSSNumericValue.h</a></li>
<li><a href="#trunkSourceWebCorecsstypedomnumericCSSMathMaxcpp">trunk/Source/WebCore/css/typedom/numeric/CSSMathMax.cpp</a></li>
<li><a href="#trunkSourceWebCorecsstypedomnumericCSSMathMaxh">trunk/Source/WebCore/css/typedom/numeric/CSSMathMax.h</a></li>
<li><a href="#trunkSourceWebCorecsstypedomnumericCSSMathMincpp">trunk/Source/WebCore/css/typedom/numeric/CSSMathMin.cpp</a></li>
<li><a href="#trunkSourceWebCorecsstypedomnumericCSSMathMinh">trunk/Source/WebCore/css/typedom/numeric/CSSMathMin.h</a></li>
<li><a href="#trunkSourceWebCorecsstypedomnumericCSSMathProductcpp">trunk/Source/WebCore/css/typedom/numeric/CSSMathProduct.cpp</a></li>
<li><a href="#trunkSourceWebCorecsstypedomnumericCSSMathProducth">trunk/Source/WebCore/css/typedom/numeric/CSSMathProduct.h</a></li>
<li><a href="#trunkSourceWebCorecsstypedomnumericCSSMathSumcpp">trunk/Source/WebCore/css/typedom/numeric/CSSMathSum.cpp</a></li>
<li><a href="#trunkSourceWebCorecsstypedomnumericCSSMathSumh">trunk/Source/WebCore/css/typedom/numeric/CSSMathSum.h</a></li>
<li><a href="#trunkSourceWebCorecsstypedomnumericCSSNumericArraycpp">trunk/Source/WebCore/css/typedom/numeric/CSSNumericArray.cpp</a></li>
<li><a href="#trunkSourceWebCorecsstypedomnumericCSSNumericArrayh">trunk/Source/WebCore/css/typedom/numeric/CSSNumericArray.h</a></li>
<li><a href="#trunkSourceWebCoredomContainerNodecpp">trunk/Source/WebCore/dom/ContainerNode.cpp</a></li>
<li><a href="#trunkSourceWebCoredomContainerNodeh">trunk/Source/WebCore/dom/ContainerNode.h</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumenth">trunk/Source/WebCore/dom/Document.h</a></li>
<li><a href="#trunkSourceWebCoredomDocumentTouchcpp">trunk/Source/WebCore/dom/DocumentTouch.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumentTouchh">trunk/Source/WebCore/dom/DocumentTouch.h</a></li>
<li><a href="#trunkSourceWebCoredomNodecpp">trunk/Source/WebCore/dom/Node.cpp</a></li>
<li><a href="#trunkSourceWebCoredomNodeh">trunk/Source/WebCore/dom/Node.h</a></li>
<li><a href="#trunkSourceWebCoredomTouchListh">trunk/Source/WebCore/dom/TouchList.h</a></li>
<li><a href="#trunkSourceWebCorehtmlDOMTokenListcpp">trunk/Source/WebCore/html/DOMTokenList.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlDOMTokenListh">trunk/Source/WebCore/html/DOMTokenList.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLCanvasElementcpp">trunk/Source/WebCore/html/HTMLCanvasElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLCanvasElementh">trunk/Source/WebCore/html/HTMLCanvasElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlOffscreenCanvascpp">trunk/Source/WebCore/html/OffscreenCanvas.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlOffscreenCanvash">trunk/Source/WebCore/html/OffscreenCanvas.h</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowcpp">trunk/Source/WebCore/page/DOMWindow.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowh">trunk/Source/WebCore/page/DOMWindow.h</a></li>
<li><a href="#trunkSourceWebCoreworkersDedicatedWorkerGlobalScopecpp">trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersDedicatedWorkerGlobalScopeh">trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.h</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerGlobalScopecpp">trunk/Source/WebCore/workers/WorkerGlobalScope.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerGlobalScopeh">trunk/Source/WebCore/workers/WorkerGlobalScope.h</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitWebProcessInjectedBundleAPIgtkDOMWebKitDOMDOMTokenListcpp">trunk/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog       2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WTF/ChangeLog  2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2021-12-20  Alexey Shvayka  <ashvayka@apple.com>
+
+        [WebIDL] convertVariadicArguments() should return a FixedVector
+        https://bugs.webkit.org/show_bug.cgi?id=232639
+
+        Reviewed by Yusuke Suzuki.
+
+        Introduce std::initializer_list constructor for FixedVector and a WTF::map() overload.
+
+        * wtf/FixedVector.h:
+        (WTF::FixedVector::FixedVector):
+        (WTF::map):
+        * wtf/VectorTraits.h:
+
</ins><span class="cx"> 2021-12-20  Fujii Hironori  <Hironori.Fujii@sony.com>
</span><span class="cx"> 
</span><span class="cx">         MSVC reports "wtf/RetainPtr.h(196): error C3861: 'CFAutorelease': identifier not found " with /permissive- on Windows
</span></span></pre></div>
<a id="trunkSourceWTFwtfFixedVectorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/FixedVector.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/FixedVector.h       2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WTF/wtf/FixedVector.h  2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -47,6 +47,16 @@
</span><span class="cx">     { }
</span><span class="cx">     FixedVector(FixedVector&& other) = default;
</span><span class="cx"> 
</span><ins>+    FixedVector(std::initializer_list<T> initializerList)
+        : m_storage(initializerList.size() ? Storage::create(initializerList.size()).moveToUniquePtr() : nullptr)
+    {
+        size_t index = 0;
+        for (const auto& element : initializerList) {
+            m_storage->at(index) = element;
+            index++;
+        }
+    }
+
</ins><span class="cx">     FixedVector& operator=(const FixedVector& other)
</span><span class="cx">     {
</span><span class="cx">         FixedVector tmp(other);
</span><span class="lines">@@ -167,6 +177,20 @@
</span><span class="cx">     a.swap(b);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+template<typename T, typename MapFunction, typename ReturnType = typename std::invoke_result<MapFunction, const T&>::type>
+FixedVector<ReturnType> map(const FixedVector<T>& source, MapFunction&& mapFunction)
+{
+    FixedVector<ReturnType> result(source.size());
+
+    size_t resultIndex = 0;
+    for (const auto& item : source) {
+        result[resultIndex] = mapFunction(item);
+        resultIndex++;
+    }
+
+    return result;
+}
+
</ins><span class="cx"> } // namespace WTF
</span><span class="cx"> 
</span><span class="cx"> using WTF::FixedVector;
</span></span></pre></div>
<a id="trunkSourceWTFwtfVectorTraitsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/VectorTraits.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/VectorTraits.h      2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WTF/wtf/VectorTraits.h 2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -70,6 +70,7 @@
</span><span class="cx"> 
</span><span class="cx">     template<typename P> struct VectorTraits<RefPtr<P>> : SimpleClassVectorTraits { };
</span><span class="cx">     template<typename P> struct VectorTraits<std::unique_ptr<P>> : SimpleClassVectorTraits { };
</span><ins>+    template<typename P> struct VectorTraits<std::reference_wrapper<P>> : SimpleClassVectorTraits { };
</ins><span class="cx">     template<typename P> struct VectorTraits<Ref<P>> : SimpleClassVectorTraits { };
</span><span class="cx">     template<> struct VectorTraits<AtomString> : SimpleClassVectorTraits { };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/ChangeLog      2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -1,5 +1,121 @@
</span><span class="cx"> 2021-12-20  Alexey Shvayka  <ashvayka@apple.com>
</span><span class="cx"> 
</span><ins>+        [WebIDL] convertVariadicArguments() should return a FixedVector
+        https://bugs.webkit.org/show_bug.cgi?id=232639
+
+        Reviewed by Yusuke Suzuki.
+
+        Since it's highly unlikely (CSSNumericArray is immutable) that we would need to
+        mutate variadic arguments before processing them or storing, and we know their size
+        upfront, it makes the most sense to save some memory by utilizing a FixedVector.
+
+        This patch reduces sizeof(ScheduledAction) by 8, enabling memory-neutral addition
+        of a field like m_incumbentGlobalObject.
+
+        No new tests, no behavior change.
+
+        * Modules/mediastream/PeerConnectionBackend.cpp:
+        (WebCore::PeerConnectionBackend::addTrack):
+        * Modules/mediastream/PeerConnectionBackend.h:
+        * Modules/mediastream/RTCPeerConnection.cpp:
+        (WebCore::RTCPeerConnection::addTrack):
+        * Modules/mediastream/RTCPeerConnection.h:
+        * Modules/mediastream/RTCRtpSender.cpp:
+        (WebCore::RTCRtpSender::setStreams):
+        (WebCore::RTCRtpSender::setMediaStreamIds):
+        * Modules/mediastream/RTCRtpSender.h:
+        * Modules/mediastream/RTCRtpSenderBackend.h:
+        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
+        (WebCore::LibWebRTCMediaEndpoint::addTrack):
+        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
+        * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
+        (WebCore::LibWebRTCPeerConnectionBackend::addTrack):
+        * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
+        * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:
+        (WebCore::LibWebRTCRtpSenderBackend::setMediaStreamIds):
+        * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h:
+        * bindings/js/JSDOMConvertVariadic.h:
+        (WebCore::convertVariadicArguments):
+        * bindings/js/ScheduledAction.cpp:
+        (WebCore::ScheduledAction::addArguments):
+        * bindings/js/ScheduledAction.h:
+        * css/typedom/CSSNumericValue.cpp:
+        (WebCore::CSSNumericValue::add):
+        (WebCore::CSSNumericValue::sub):
+        (WebCore::CSSNumericValue::mul):
+        (WebCore::CSSNumericValue::div):
+        (WebCore::CSSNumericValue::min):
+        (WebCore::CSSNumericValue::max):
+        (WebCore::CSSNumericValue::equals):
+        (WebCore::CSSNumericValue::toSum):
+        * css/typedom/CSSNumericValue.h:
+        * css/typedom/numeric/CSSMathMax.cpp:
+        (WebCore::CSSMathMax::create):
+        (WebCore::CSSMathMax::CSSMathMax):
+        * css/typedom/numeric/CSSMathMax.h:
+        * css/typedom/numeric/CSSMathMin.cpp:
+        (WebCore::CSSMathMin::create):
+        (WebCore::CSSMathMin::CSSMathMin):
+        * css/typedom/numeric/CSSMathMin.h:
+        * css/typedom/numeric/CSSMathProduct.cpp:
+        (WebCore::CSSMathProduct::create):
+        (WebCore::CSSMathProduct::CSSMathProduct):
+        * css/typedom/numeric/CSSMathProduct.h:
+        * css/typedom/numeric/CSSMathSum.cpp:
+        (WebCore::CSSMathSum::create):
+        (WebCore::CSSMathSum::CSSMathSum):
+        * css/typedom/numeric/CSSMathSum.h:
+        * css/typedom/numeric/CSSNumericArray.cpp:
+        (WebCore::CSSNumericArray::create):
+        (WebCore::CSSNumericArray::CSSNumericArray):
+        * css/typedom/numeric/CSSNumericArray.h:
+        * dom/ContainerNode.cpp:
+        (WebCore::ContainerNode::append):
+        (WebCore::ContainerNode::prepend):
+        (WebCore::ContainerNode::replaceChildren):
+        * dom/ContainerNode.h:
+        * dom/Document.cpp:
+        (WebCore::Document::write):
+        (WebCore::Document::writeln):
+        * dom/Document.h:
+        * dom/DocumentTouch.cpp:
+        (WebCore::DocumentTouch::createTouchList):
+        * dom/DocumentTouch.h:
+        * dom/Node.cpp:
+        (WebCore::nodeSetPreTransformedFromNodeOrStringVector):
+        (WebCore::Node::convertNodesOrStringsIntoNode):
+        (WebCore::Node::before):
+        (WebCore::Node::after):
+        (WebCore::Node::replaceWith):
+        * dom/Node.h:
+        * dom/TouchList.h:
+        (WebCore::TouchList::create):
+        (WebCore::TouchList::TouchList):
+        * html/DOMTokenList.cpp:
+        (WebCore::DOMTokenList::add):
+        (WebCore::DOMTokenList::remove):
+        * html/DOMTokenList.h:
+        * html/HTMLCanvasElement.cpp:
+        (WebCore::HTMLCanvasElement::getContext):
+        * html/HTMLCanvasElement.h:
+        * html/OffscreenCanvas.cpp:
+        (WebCore::OffscreenCanvas::getContext):
+        * html/OffscreenCanvas.h:
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::setTimeout):
+        (WebCore::DOMWindow::setInterval):
+        * page/DOMWindow.h:
+        * workers/DedicatedWorkerGlobalScope.cpp:
+        (WebCore::DedicatedWorkerGlobalScope::importScripts):
+        * workers/DedicatedWorkerGlobalScope.h:
+        * workers/WorkerGlobalScope.cpp:
+        (WebCore::WorkerGlobalScope::setTimeout):
+        (WebCore::WorkerGlobalScope::setInterval):
+        (WebCore::WorkerGlobalScope::importScripts):
+        * workers/WorkerGlobalScope.h:
+
+2021-12-20  Alexey Shvayka  <ashvayka@apple.com>
+
</ins><span class="cx">         Introduce a fast path for replacing an attribute event listener
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=234441
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamPeerConnectionBackendcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp       2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp  2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -414,7 +414,7 @@
</span><span class="cx">     m_peerConnection.updateNegotiationNeededFlag(eventId);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr<Ref<RTCRtpSender>> PeerConnectionBackend::addTrack(MediaStreamTrack&, Vector<String>&&)
</del><ins>+ExceptionOr<Ref<RTCRtpSender>> PeerConnectionBackend::addTrack(MediaStreamTrack&, FixedVector<String>&&)
</ins><span class="cx"> {
</span><span class="cx">     return Exception { NotSupportedError, "Not implemented"_s };
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamPeerConnectionBackendh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h 2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h    2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -39,6 +39,7 @@
</span><span class="cx"> #include "RTCRtpSendParameters.h"
</span><span class="cx"> #include "RTCSessionDescription.h"
</span><span class="cx"> #include "RTCSignalingState.h"
</span><ins>+#include <wtf/FixedVector.h>
</ins><span class="cx"> #include <wtf/LoggerHelper.h>
</span><span class="cx"> #include <wtf/WeakPtr.h>
</span><span class="cx"> 
</span><span class="lines">@@ -114,7 +115,7 @@
</span><span class="cx">     virtual void getStats(RTCRtpSender&, Ref<DeferredPromise>&&) = 0;
</span><span class="cx">     virtual void getStats(RTCRtpReceiver&, Ref<DeferredPromise>&&) = 0;
</span><span class="cx"> 
</span><del>-    virtual ExceptionOr<Ref<RTCRtpSender>> addTrack(MediaStreamTrack&, Vector<String>&&);
</del><ins>+    virtual ExceptionOr<Ref<RTCRtpSender>> addTrack(MediaStreamTrack&, FixedVector<String>&&);
</ins><span class="cx">     virtual void removeTrack(RTCRtpSender&) { }
</span><span class="cx"> 
</span><span class="cx">     virtual ExceptionOr<Ref<RTCRtpTransceiver>> addTransceiver(const String&, const RTCRtpTransceiverInit&);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCPeerConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp   2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp      2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -131,7 +131,7 @@
</span><span class="cx">     stop();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr<Ref<RTCRtpSender>> RTCPeerConnection::addTrack(Ref<MediaStreamTrack>&& track, const Vector<std::reference_wrapper<MediaStream>>& streams)
</del><ins>+ExceptionOr<Ref<RTCRtpSender>> RTCPeerConnection::addTrack(Ref<MediaStreamTrack>&& track, const FixedVector<std::reference_wrapper<MediaStream>>& streams)
</ins><span class="cx"> {
</span><span class="cx">     INFO_LOG(LOGIDENTIFIER);
</span><span class="cx"> 
</span><span class="lines">@@ -143,11 +143,9 @@
</span><span class="cx">             return Exception { InvalidAccessError };
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    Vector<String> mediaStreamIds;
-    for (auto stream : streams)
-        mediaStreamIds.append(stream.get().id());
-
-    return m_backend->addTrack(track.get(), WTFMove(mediaStreamIds));
</del><ins>+    return m_backend->addTrack(track.get(), WTF::map(streams, [](auto& stream) -> String {
+        return stream.get().id();
+    }));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ExceptionOr<void> RTCPeerConnection::removeTrack(RTCRtpSender& sender)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCPeerConnectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h     2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h        2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -148,7 +148,7 @@
</span><span class="cx"> 
</span><span class="cx">     const Vector<RefPtr<RTCRtpTransceiver>>& currentTransceivers() const { return m_transceiverSet.list(); }
</span><span class="cx"> 
</span><del>-    ExceptionOr<Ref<RTCRtpSender>> addTrack(Ref<MediaStreamTrack>&&, const Vector<std::reference_wrapper<MediaStream>>&);
</del><ins>+    ExceptionOr<Ref<RTCRtpSender>> addTrack(Ref<MediaStreamTrack>&&, const FixedVector<std::reference_wrapper<MediaStream>>&);
</ins><span class="cx">     ExceptionOr<void> removeTrack(RTCRtpSender&);
</span><span class="cx"> 
</span><span class="cx">     using AddTransceiverTrackOrKind = std::variant<RefPtr<MediaStreamTrack>, String>;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCRtpSendercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCRtpSender.cpp (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCRtpSender.cpp        2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/Modules/mediastream/RTCRtpSender.cpp   2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -162,7 +162,7 @@
</span><span class="cx">     return m_backend->setParameters(parameters, WTFMove(promise));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr<void> RTCRtpSender::setStreams(const Vector<std::reference_wrapper<MediaStream>>& streams)
</del><ins>+ExceptionOr<void> RTCRtpSender::setStreams(const FixedVector<std::reference_wrapper<MediaStream>>& streams)
</ins><span class="cx"> {
</span><span class="cx">     return setMediaStreamIds(WTF::map(streams, [](auto& stream) -> String {
</span><span class="cx">         return stream.get().id();
</span><span class="lines">@@ -169,7 +169,7 @@
</span><span class="cx">     }));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr<void> RTCRtpSender::setMediaStreamIds(const Vector<String>& streamIds)
</del><ins>+ExceptionOr<void> RTCRtpSender::setMediaStreamIds(const FixedVector<String>& streamIds)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_connection || m_connection->isClosed() || !m_backend)
</span><span class="cx">         return Exception { InvalidStateError, "connection is closed"_s };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCRtpSenderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCRtpSender.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCRtpSender.h  2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/Modules/mediastream/RTCRtpSender.h     2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -71,8 +71,8 @@
</span><span class="cx">     const String& trackId() const { return m_trackId; }
</span><span class="cx">     const String& trackKind() const { return m_trackKind; }
</span><span class="cx"> 
</span><del>-    ExceptionOr<void> setMediaStreamIds(const Vector<String>&);
-    ExceptionOr<void> setStreams(const Vector<std::reference_wrapper<MediaStream>>&);
</del><ins>+    ExceptionOr<void> setMediaStreamIds(const FixedVector<String>&);
+    ExceptionOr<void> setStreams(const FixedVector<std::reference_wrapper<MediaStream>>&);
</ins><span class="cx"> 
</span><span class="cx">     bool isStopped() const { return !m_backend; }
</span><span class="cx">     void stop();
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCRtpSenderBackendh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCRtpSenderBackend.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCRtpSenderBackend.h   2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/Modules/mediastream/RTCRtpSenderBackend.h      2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -26,8 +26,8 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEB_RTC)
</span><span class="cx"> 
</span><ins>+#include <wtf/FixedVector.h>
</ins><span class="cx"> #include <wtf/Forward.h>
</span><del>-#include <wtf/Vector.h>
</del><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx">     virtual void setParameters(const RTCRtpSendParameters&, DOMPromiseDeferred<void>&&) = 0;
</span><span class="cx">     virtual std::unique_ptr<RTCDTMFSenderBackend> createDTMFBackend() = 0;
</span><span class="cx">     virtual Ref<RTCRtpTransformBackend> rtcRtpTransformBackend() = 0;
</span><del>-    virtual void setMediaStreamIds(const Vector<String>&) = 0;
</del><ins>+    virtual void setMediaStreamIds(const FixedVector<String>&) = 0;
</ins><span class="cx">     virtual std::unique_ptr<RTCDtlsTransportBackend> dtlsTransportBackend() = 0;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCMediaEndpointcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp    2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp       2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -185,7 +185,7 @@
</span><span class="cx">     startLoggingStats();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool LibWebRTCMediaEndpoint::addTrack(LibWebRTCRtpSenderBackend& sender, MediaStreamTrack& track, const Vector<String>& mediaStreamIds)
</del><ins>+bool LibWebRTCMediaEndpoint::addTrack(LibWebRTCRtpSenderBackend& sender, MediaStreamTrack& track, const FixedVector<String>& mediaStreamIds)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_backend);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCMediaEndpointh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h      2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h 2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx">     void stop();
</span><span class="cx">     bool isStopped() const { return !m_backend; }
</span><span class="cx"> 
</span><del>-    bool addTrack(LibWebRTCRtpSenderBackend&, MediaStreamTrack&, const Vector<String>&);
</del><ins>+    bool addTrack(LibWebRTCRtpSenderBackend&, MediaStreamTrack&, const FixedVector<String>&);
</ins><span class="cx">     void removeTrack(LibWebRTCRtpSenderBackend&);
</span><span class="cx"> 
</span><span class="cx">     struct Backends {
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCPeerConnectionBackendcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp    2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp       2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -322,7 +322,7 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr<Ref<RTCRtpSender>> LibWebRTCPeerConnectionBackend::addTrack(MediaStreamTrack& track, Vector<String>&& mediaStreamIds)
</del><ins>+ExceptionOr<Ref<RTCRtpSender>> LibWebRTCPeerConnectionBackend::addTrack(MediaStreamTrack& track, FixedVector<String>&& mediaStreamIds)
</ins><span class="cx"> {
</span><span class="cx">     auto senderBackend = makeUnique<LibWebRTCRtpSenderBackend>(*this, nullptr);
</span><span class="cx">     if (!m_endpoint->addTrack(*senderBackend, track, mediaStreamIds))
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCPeerConnectionBackendh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h      2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h 2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -83,7 +83,7 @@
</span><span class="cx"> 
</span><span class="cx">     void getStatsSucceeded(const DeferredPromise&, Ref<RTCStatsReport>&&);
</span><span class="cx"> 
</span><del>-    ExceptionOr<Ref<RTCRtpSender>> addTrack(MediaStreamTrack&, Vector<String>&&) final;
</del><ins>+    ExceptionOr<Ref<RTCRtpSender>> addTrack(MediaStreamTrack&, FixedVector<String>&&) final;
</ins><span class="cx">     void removeTrack(RTCRtpSender&) final;
</span><span class="cx"> 
</span><span class="cx">     ExceptionOr<Ref<RTCRtpTransceiver>> addTransceiver(const String&, const RTCRtpTransceiverInit&) final;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCRtpSenderBackendcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp 2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp    2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -163,7 +163,7 @@
</span><span class="cx">     return backend ? makeUnique<LibWebRTCDtlsTransportBackend>(WTFMove(backend)) : nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void LibWebRTCRtpSenderBackend::setMediaStreamIds(const Vector<String>& streamIds)
</del><ins>+void LibWebRTCRtpSenderBackend::setMediaStreamIds(const FixedVector<String>& streamIds)
</ins><span class="cx"> {
</span><span class="cx">     std::vector<std::string> ids;
</span><span class="cx">     for (auto& id : streamIds)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCRtpSenderBackendh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h   2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h      2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx">     std::unique_ptr<RTCDTMFSenderBackend> createDTMFBackend() final;
</span><span class="cx">     Ref<RTCRtpTransformBackend> rtcRtpTransformBackend() final;
</span><span class="cx">     std::unique_ptr<RTCDtlsTransportBackend> dtlsTransportBackend() final;
</span><del>-    void setMediaStreamIds(const Vector<String>&) final;
</del><ins>+    void setMediaStreamIds(const FixedVector<String>&) final;
</ins><span class="cx"> 
</span><span class="cx">     void startSource();
</span><span class="cx">     void stopSource();
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertVariadich"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMConvertVariadic.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertVariadic.h  2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertVariadic.h     2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include "IDLTypes.h"
</span><span class="cx"> #include "JSDOMConvertBase.h"
</span><ins>+#include <wtf/FixedVector.h>
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -46,7 +47,7 @@
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template<typename IDLType> Vector<typename VariadicConverter<IDLType>::Item> convertVariadicArguments(JSC::JSGlobalObject& lexicalGlobalObject, JSC::CallFrame& callFrame, size_t startIndex)
</del><ins>+template<typename IDLType> FixedVector<typename VariadicConverter<IDLType>::Item> convertVariadicArguments(JSC::JSGlobalObject& lexicalGlobalObject, JSC::CallFrame& callFrame, size_t startIndex)
</ins><span class="cx"> {
</span><span class="cx">     auto& vm = JSC::getVM(&lexicalGlobalObject);
</span><span class="cx">     auto scope = DECLARE_THROW_SCOPE(vm);
</span><span class="lines">@@ -55,15 +56,16 @@
</span><span class="cx">     if (startIndex >= length)
</span><span class="cx">         return { };
</span><span class="cx"> 
</span><del>-    Vector<typename VariadicConverter<IDLType>::Item> result;
-    result.reserveInitialCapacity(length - startIndex);
</del><ins>+    FixedVector<typename VariadicConverter<IDLType>::Item> result(length - startIndex);
</ins><span class="cx"> 
</span><ins>+    size_t resultIndex = 0;
</ins><span class="cx">     for (size_t i = startIndex; i < length; ++i) {
</span><span class="cx">         auto value = VariadicConverter<IDLType>::convert(lexicalGlobalObject, callFrame.uncheckedArgument(i));
</span><span class="cx">         EXCEPTION_ASSERT_UNUSED(scope, !!scope.exception() == !value);
</span><span class="cx">         if (!value)
</span><span class="cx">             return { };
</span><del>-        result.uncheckedAppend(WTFMove(*value));
</del><ins>+        result[resultIndex] = WTFMove(*value);
+        resultIndex++;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return result;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsScheduledActioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ScheduledAction.cpp (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ScheduledAction.cpp     2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/bindings/js/ScheduledAction.cpp        2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx"> 
</span><span class="cx"> ScheduledAction::~ScheduledAction() = default;
</span><span class="cx"> 
</span><del>-void ScheduledAction::addArguments(Vector<JSC::Strong<JSC::Unknown>>&& arguments)
</del><ins>+void ScheduledAction::addArguments(FixedVector<JSC::Strong<JSC::Unknown>>&& arguments)
</ins><span class="cx"> {
</span><span class="cx">     m_arguments = WTFMove(arguments);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsScheduledActionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ScheduledAction.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ScheduledAction.h       2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/bindings/js/ScheduledAction.h  2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -22,7 +22,6 @@
</span><span class="cx"> #include <JavaScriptCore/Strong.h>
</span><span class="cx"> #include <JavaScriptCore/StrongInlines.h>
</span><span class="cx"> #include <memory>
</span><del>-#include <wtf/Vector.h>
</del><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="lines">@@ -43,7 +42,7 @@
</span><span class="cx">     static std::unique_ptr<ScheduledAction> create(DOMWrapperWorld&, String&&);
</span><span class="cx">     ~ScheduledAction();
</span><span class="cx"> 
</span><del>-    void addArguments(Vector<JSC::Strong<JSC::Unknown>>&&);
</del><ins>+    void addArguments(FixedVector<JSC::Strong<JSC::Unknown>>&&);
</ins><span class="cx"> 
</span><span class="cx">     enum class Type { Code, Function };
</span><span class="cx">     Type type() const;
</span><span class="lines">@@ -60,7 +59,7 @@
</span><span class="cx"> 
</span><span class="cx">     Ref<DOMWrapperWorld> m_isolatedWorld;
</span><span class="cx">     JSC::Strong<JSC::Unknown> m_function;
</span><del>-    Vector<JSC::Strong<JSC::Unknown>> m_arguments;
</del><ins>+    FixedVector<JSC::Strong<JSC::Unknown>> m_arguments;
</ins><span class="cx">     String m_code;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecsstypedomCSSNumericValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/typedom/CSSNumericValue.cpp (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/typedom/CSSNumericValue.cpp     2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/css/typedom/CSSNumericValue.cpp        2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx"> 
</span><span class="cx"> WTF_MAKE_ISO_ALLOCATED_IMPL(CSSNumericValue);
</span><span class="cx"> 
</span><del>-Ref<CSSNumericValue> CSSNumericValue::add(Vector<CSSNumberish>&& values)
</del><ins>+Ref<CSSNumericValue> CSSNumericValue::add(FixedVector<CSSNumberish>&& values)
</ins><span class="cx"> {
</span><span class="cx">     UNUSED_PARAM(values);
</span><span class="cx">     // FIXME: add impl.
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx">     return *this;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref<CSSNumericValue> CSSNumericValue::sub(Vector<CSSNumberish>&& values)
</del><ins>+Ref<CSSNumericValue> CSSNumericValue::sub(FixedVector<CSSNumberish>&& values)
</ins><span class="cx"> {
</span><span class="cx">     UNUSED_PARAM(values);
</span><span class="cx">     // FIXME: add impl.
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx">     return *this;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref<CSSNumericValue> CSSNumericValue::mul(Vector<CSSNumberish>&& values)
</del><ins>+Ref<CSSNumericValue> CSSNumericValue::mul(FixedVector<CSSNumberish>&& values)
</ins><span class="cx"> {
</span><span class="cx">     UNUSED_PARAM(values);
</span><span class="cx">     // FIXME: add impl.
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx">     return *this;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref<CSSNumericValue> CSSNumericValue::div(Vector<CSSNumberish>&& values)
</del><ins>+Ref<CSSNumericValue> CSSNumericValue::div(FixedVector<CSSNumberish>&& values)
</ins><span class="cx"> {
</span><span class="cx">     UNUSED_PARAM(values);
</span><span class="cx">     // FIXME: add impl.
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx"> 
</span><span class="cx">     return *this;
</span><span class="cx"> }
</span><del>-Ref<CSSNumericValue> CSSNumericValue::min(Vector<CSSNumberish>&& values)
</del><ins>+Ref<CSSNumericValue> CSSNumericValue::min(FixedVector<CSSNumberish>&& values)
</ins><span class="cx"> {
</span><span class="cx">     UNUSED_PARAM(values);
</span><span class="cx">     // FIXME: add impl.
</span><span class="lines">@@ -82,7 +82,7 @@
</span><span class="cx"> 
</span><span class="cx">     return *this;
</span><span class="cx"> }
</span><del>-Ref<CSSNumericValue> CSSNumericValue::max(Vector<CSSNumberish>&& values)
</del><ins>+Ref<CSSNumericValue> CSSNumericValue::max(FixedVector<CSSNumberish>&& values)
</ins><span class="cx"> {
</span><span class="cx">     UNUSED_PARAM(values);
</span><span class="cx">     // FIXME: add impl.
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool CSSNumericValue::equals(Vector<CSSNumberish>&& value)
</del><ins>+bool CSSNumericValue::equals(FixedVector<CSSNumberish>&& value)
</ins><span class="cx"> {
</span><span class="cx">     UNUSED_PARAM(value);
</span><span class="cx">     // https://drafts.css-houdini.org/css-typed-om/#dom-cssnumericvalue-equals
</span><span class="lines">@@ -116,7 +116,7 @@
</span><span class="cx">     return CSSUnitValue::create(1.0, "number");
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref<CSSMathSum> CSSNumericValue::toSum(Vector<String>&& units)
</del><ins>+Ref<CSSMathSum> CSSNumericValue::toSum(FixedVector<String>&& units)
</ins><span class="cx"> {
</span><span class="cx">     UNUSED_PARAM(units);
</span><span class="cx">     // https://drafts.css-houdini.org/css-typed-om/#dom-cssnumericvalue-tosum
</span></span></pre></div>
<a id="trunkSourceWebCorecsstypedomCSSNumericValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/typedom/CSSNumericValue.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/typedom/CSSNumericValue.h       2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/css/typedom/CSSNumericValue.h  2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include "CSSStyleValue.h"
</span><span class="cx"> #include <variant>
</span><ins>+#include <wtf/FixedVector.h>
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -44,17 +45,17 @@
</span><span class="cx"> public:
</span><span class="cx">     using CSSNumberish = std::variant<double, RefPtr<CSSNumericValue>>;
</span><span class="cx"> 
</span><del>-    Ref<CSSNumericValue> add(Vector<CSSNumberish>&&);
-    Ref<CSSNumericValue> sub(Vector<CSSNumberish>&&);
-    Ref<CSSNumericValue> mul(Vector<CSSNumberish>&&);
-    Ref<CSSNumericValue> div(Vector<CSSNumberish>&&);
-    Ref<CSSNumericValue> min(Vector<CSSNumberish>&&);
-    Ref<CSSNumericValue> max(Vector<CSSNumberish>&&);
</del><ins>+    Ref<CSSNumericValue> add(FixedVector<CSSNumberish>&&);
+    Ref<CSSNumericValue> sub(FixedVector<CSSNumberish>&&);
+    Ref<CSSNumericValue> mul(FixedVector<CSSNumberish>&&);
+    Ref<CSSNumericValue> div(FixedVector<CSSNumberish>&&);
+    Ref<CSSNumericValue> min(FixedVector<CSSNumberish>&&);
+    Ref<CSSNumericValue> max(FixedVector<CSSNumberish>&&);
</ins><span class="cx">     
</span><del>-    bool equals(Vector<CSSNumberish>&&);
</del><ins>+    bool equals(FixedVector<CSSNumberish>&&);
</ins><span class="cx">     
</span><span class="cx">     Ref<CSSUnitValue> to(String&&);
</span><del>-    Ref<CSSMathSum> toSum(Vector<String>&&);
</del><ins>+    Ref<CSSMathSum> toSum(FixedVector<String>&&);
</ins><span class="cx">     CSSNumericType type();
</span><span class="cx">     
</span><span class="cx">     static ExceptionOr<Ref<CSSNumericValue>> parse(String&&);
</span></span></pre></div>
<a id="trunkSourceWebCorecsstypedomnumericCSSMathMaxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/typedom/numeric/CSSMathMax.cpp (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/typedom/numeric/CSSMathMax.cpp  2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/css/typedom/numeric/CSSMathMax.cpp     2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -36,12 +36,12 @@
</span><span class="cx"> 
</span><span class="cx"> WTF_MAKE_ISO_ALLOCATED_IMPL(CSSMathMax);
</span><span class="cx"> 
</span><del>-Ref<CSSMathMax> CSSMathMax::create(Vector<CSSNumberish>&& numberishes)
</del><ins>+Ref<CSSMathMax> CSSMathMax::create(FixedVector<CSSNumberish>&& numberishes)
</ins><span class="cx"> {
</span><span class="cx">     return adoptRef(*new CSSMathMax(WTFMove(numberishes)));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CSSMathMax::CSSMathMax(Vector<CSSNumberish>&& numberishes)
</del><ins>+CSSMathMax::CSSMathMax(FixedVector<CSSNumberish>&& numberishes)
</ins><span class="cx">     : CSSMathValue(CSSMathOperator::Max)
</span><span class="cx">     , m_values(CSSNumericArray::create(WTFMove(numberishes)))
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorecsstypedomnumericCSSMathMaxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/typedom/numeric/CSSMathMax.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/typedom/numeric/CSSMathMax.h    2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/css/typedom/numeric/CSSMathMax.h       2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -37,11 +37,11 @@
</span><span class="cx"> class CSSMathMax : public CSSMathValue {
</span><span class="cx">     WTF_MAKE_ISO_ALLOCATED(CSSMathMax);
</span><span class="cx"> public:
</span><del>-    static Ref<CSSMathMax> create(Vector<CSSNumberish>&&);
</del><ins>+    static Ref<CSSMathMax> create(FixedVector<CSSNumberish>&&);
</ins><span class="cx">     const CSSNumericArray& values() const;
</span><span class="cx">     
</span><span class="cx"> private:
</span><del>-    CSSMathMax(Vector<CSSNumberish>&&);
</del><ins>+    CSSMathMax(FixedVector<CSSNumberish>&&);
</ins><span class="cx">     Ref<CSSNumericArray> m_values;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecsstypedomnumericCSSMathMincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/typedom/numeric/CSSMathMin.cpp (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/typedom/numeric/CSSMathMin.cpp  2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/css/typedom/numeric/CSSMathMin.cpp     2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -36,12 +36,12 @@
</span><span class="cx"> 
</span><span class="cx"> WTF_MAKE_ISO_ALLOCATED_IMPL(CSSMathMin);
</span><span class="cx"> 
</span><del>-Ref<CSSMathMin> CSSMathMin::create(Vector<CSSNumberish>&& numberishes)
</del><ins>+Ref<CSSMathMin> CSSMathMin::create(FixedVector<CSSNumberish>&& numberishes)
</ins><span class="cx"> {
</span><span class="cx">     return adoptRef(*new CSSMathMin(WTFMove(numberishes)));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CSSMathMin::CSSMathMin(Vector<CSSNumberish>&& numberishes)
</del><ins>+CSSMathMin::CSSMathMin(FixedVector<CSSNumberish>&& numberishes)
</ins><span class="cx">     : CSSMathValue(CSSMathOperator::Min)
</span><span class="cx">     , m_values(CSSNumericArray::create(WTFMove(numberishes)))
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorecsstypedomnumericCSSMathMinh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/typedom/numeric/CSSMathMin.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/typedom/numeric/CSSMathMin.h    2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/css/typedom/numeric/CSSMathMin.h       2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -37,11 +37,11 @@
</span><span class="cx"> class CSSMathMin : public CSSMathValue {
</span><span class="cx">     WTF_MAKE_ISO_ALLOCATED(CSSMathMin);
</span><span class="cx"> public:
</span><del>-    static Ref<CSSMathMin> create(Vector<CSSNumberish>&&);
</del><ins>+    static Ref<CSSMathMin> create(FixedVector<CSSNumberish>&&);
</ins><span class="cx">     const CSSNumericArray& values() const;
</span><span class="cx">     
</span><span class="cx"> private:
</span><del>-    CSSMathMin(Vector<CSSNumberish>&&);
</del><ins>+    CSSMathMin(FixedVector<CSSNumberish>&&);
</ins><span class="cx">     Ref<CSSNumericArray> m_values;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecsstypedomnumericCSSMathProductcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/typedom/numeric/CSSMathProduct.cpp (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/typedom/numeric/CSSMathProduct.cpp      2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/css/typedom/numeric/CSSMathProduct.cpp 2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -36,12 +36,12 @@
</span><span class="cx"> 
</span><span class="cx"> WTF_MAKE_ISO_ALLOCATED_IMPL(CSSMathProduct);
</span><span class="cx"> 
</span><del>-Ref<CSSMathProduct> CSSMathProduct::create(Vector<CSSNumberish>&& numberishes)
</del><ins>+Ref<CSSMathProduct> CSSMathProduct::create(FixedVector<CSSNumberish>&& numberishes)
</ins><span class="cx"> {
</span><span class="cx">     return adoptRef(*new CSSMathProduct(WTFMove(numberishes)));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CSSMathProduct::CSSMathProduct(Vector<CSSNumberish>&& numberishes)
</del><ins>+CSSMathProduct::CSSMathProduct(FixedVector<CSSNumberish>&& numberishes)
</ins><span class="cx">     : CSSMathValue(CSSMathOperator::Product)
</span><span class="cx">     , m_values(CSSNumericArray::create(WTFMove(numberishes)))
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorecsstypedomnumericCSSMathProducth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/typedom/numeric/CSSMathProduct.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/typedom/numeric/CSSMathProduct.h        2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/css/typedom/numeric/CSSMathProduct.h   2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -37,13 +37,13 @@
</span><span class="cx"> class CSSMathProduct : public CSSMathValue {
</span><span class="cx">     WTF_MAKE_ISO_ALLOCATED(CSSMathProduct);
</span><span class="cx"> public:
</span><del>-    static Ref<CSSMathProduct> create(Vector<CSSNumberish>&&);
</del><ins>+    static Ref<CSSMathProduct> create(FixedVector<CSSNumberish>&&);
</ins><span class="cx">     const CSSNumericArray& values() const;
</span><span class="cx">     
</span><span class="cx">     CSSMathOperator getOperator() const final { return CSSMathOperator::Product; }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    CSSMathProduct(Vector<CSSNumberish>&&);
</del><ins>+    CSSMathProduct(FixedVector<CSSNumberish>&&);
</ins><span class="cx">     Ref<CSSNumericArray> m_values;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecsstypedomnumericCSSMathSumcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/typedom/numeric/CSSMathSum.cpp (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/typedom/numeric/CSSMathSum.cpp  2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/css/typedom/numeric/CSSMathSum.cpp     2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -36,12 +36,12 @@
</span><span class="cx"> 
</span><span class="cx"> WTF_MAKE_ISO_ALLOCATED_IMPL(CSSMathSum);
</span><span class="cx"> 
</span><del>-Ref<CSSMathSum> CSSMathSum::create(Vector<CSSNumberish>&& numberishes)
</del><ins>+Ref<CSSMathSum> CSSMathSum::create(FixedVector<CSSNumberish>&& numberishes)
</ins><span class="cx"> {
</span><span class="cx">     return adoptRef(*new CSSMathSum(WTFMove(numberishes)));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CSSMathSum::CSSMathSum(Vector<CSSNumberish>&& numberishes)
</del><ins>+CSSMathSum::CSSMathSum(FixedVector<CSSNumberish>&& numberishes)
</ins><span class="cx">     : CSSMathValue(CSSMathOperator::Sum)
</span><span class="cx">     , m_values(CSSNumericArray::create(WTFMove(numberishes)))
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorecsstypedomnumericCSSMathSumh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/typedom/numeric/CSSMathSum.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/typedom/numeric/CSSMathSum.h    2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/css/typedom/numeric/CSSMathSum.h       2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -38,11 +38,11 @@
</span><span class="cx"> class CSSMathSum : public CSSMathValue {
</span><span class="cx">     WTF_MAKE_ISO_ALLOCATED(CSSMathSum);
</span><span class="cx"> public:
</span><del>-    static Ref<CSSMathSum> create(Vector<CSSNumberish>&&);
</del><ins>+    static Ref<CSSMathSum> create(FixedVector<CSSNumberish>&&);
</ins><span class="cx">     const CSSNumericArray& values() const;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    CSSMathSum(Vector<CSSNumberish>&&);
</del><ins>+    CSSMathSum(FixedVector<CSSNumberish>&&);
</ins><span class="cx">     Ref<CSSNumericArray> m_values;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecsstypedomnumericCSSNumericArraycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/typedom/numeric/CSSNumericArray.cpp (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/typedom/numeric/CSSNumericArray.cpp     2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/css/typedom/numeric/CSSNumericArray.cpp        2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -38,22 +38,19 @@
</span><span class="cx"> 
</span><span class="cx"> WTF_MAKE_ISO_ALLOCATED_IMPL(CSSNumericArray);
</span><span class="cx"> 
</span><del>-Ref<CSSNumericArray> CSSNumericArray::create(Vector<CSSNumberish>&& numberishes)
</del><ins>+Ref<CSSNumericArray> CSSNumericArray::create(const FixedVector<CSSNumberish>& numberishes)
</ins><span class="cx"> {
</span><del>-    Vector<Ref<CSSNumericValue>> values;
-    values.reserveInitialCapacity(numberishes.size());
-    for (auto&& numberish : numberishes)
-        values.uncheckedAppend(CSSNumericValue::rectifyNumberish(WTFMove(numberish)));
-    
-    return adoptRef(*new CSSNumericArray(WTFMove(values)));
</del><ins>+    return adoptRef(*new CSSNumericArray(WTF::map(numberishes, [](auto& numberish) -> Ref<CSSNumericValue> {
+        return CSSNumericValue::rectifyNumberish(const_cast<CSSNumberish&&>(numberish));
+    })));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref<CSSNumericArray> CSSNumericArray::create(Vector<Ref<CSSNumericValue>>&& values)
</del><ins>+Ref<CSSNumericArray> CSSNumericArray::create(FixedVector<Ref<CSSNumericValue>>&& values)
</ins><span class="cx"> {
</span><span class="cx">     return adoptRef(*new CSSNumericArray(WTFMove(values)));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CSSNumericArray::CSSNumericArray(Vector<Ref<CSSNumericValue>>&& values)
</del><ins>+CSSNumericArray::CSSNumericArray(FixedVector<Ref<CSSNumericValue>>&& values)
</ins><span class="cx">     : m_array(WTFMove(values))
</span><span class="cx"> {
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecsstypedomnumericCSSNumericArrayh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/typedom/numeric/CSSNumericArray.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/typedom/numeric/CSSNumericArray.h       2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/css/typedom/numeric/CSSNumericArray.h  2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -40,14 +40,14 @@
</span><span class="cx"> class CSSNumericArray : public RefCounted<CSSNumericArray> {
</span><span class="cx">     WTF_MAKE_ISO_ALLOCATED(CSSNumericArray);
</span><span class="cx"> public:
</span><del>-    static Ref<CSSNumericArray> create(Vector<CSSNumberish>&&);
-    static Ref<CSSNumericArray> create(Vector<Ref<CSSNumericValue>>&&);
</del><ins>+    static Ref<CSSNumericArray> create(const FixedVector<CSSNumberish>&);
+    static Ref<CSSNumericArray> create(FixedVector<Ref<CSSNumericValue>>&&);
</ins><span class="cx">     size_t length() const { return m_array.size(); };
</span><span class="cx">     ExceptionOr<Ref<CSSNumericValue>> item(size_t index);
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    Vector<Ref<CSSNumericValue>> m_array;
-    CSSNumericArray(Vector<Ref<CSSNumericValue>>&&);
</del><ins>+    FixedVector<Ref<CSSNumericValue>> m_array;
+    CSSNumericArray(FixedVector<Ref<CSSNumericValue>>&&);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoredomContainerNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ContainerNode.cpp (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ContainerNode.cpp       2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/dom/ContainerNode.cpp  2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -1000,7 +1000,7 @@
</span><span class="cx">     return std::distance(children.begin(), { });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr<void> ContainerNode::append(Vector<NodeOrString>&& vector)
</del><ins>+ExceptionOr<void> ContainerNode::append(FixedVector<NodeOrString>&& vector)
</ins><span class="cx"> {
</span><span class="cx">     auto result = convertNodesOrStringsIntoNode(WTFMove(vector));
</span><span class="cx">     if (result.hasException())
</span><span class="lines">@@ -1013,7 +1013,7 @@
</span><span class="cx">     return appendChild(*node);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr<void> ContainerNode::prepend(Vector<NodeOrString>&& vector)
</del><ins>+ExceptionOr<void> ContainerNode::prepend(FixedVector<NodeOrString>&& vector)
</ins><span class="cx"> {
</span><span class="cx">     auto result = convertNodesOrStringsIntoNode(WTFMove(vector));
</span><span class="cx">     if (result.hasException())
</span><span class="lines">@@ -1027,7 +1027,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // https://dom.spec.whatwg.org/#dom-parentnode-replacechildren
</span><del>-ExceptionOr<void> ContainerNode::replaceChildren(Vector<NodeOrString>&& vector)
</del><ins>+ExceptionOr<void> ContainerNode::replaceChildren(FixedVector<NodeOrString>&& vector)
</ins><span class="cx"> {
</span><span class="cx">     // step 1
</span><span class="cx">     auto result = convertNodesOrStringsIntoNode(WTFMove(vector));
</span></span></pre></div>
<a id="trunkSourceWebCoredomContainerNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ContainerNode.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ContainerNode.h 2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/dom/ContainerNode.h    2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -129,10 +129,10 @@
</span><span class="cx">     WEBCORE_EXPORT Element* firstElementChild() const;
</span><span class="cx">     WEBCORE_EXPORT Element* lastElementChild() const;
</span><span class="cx">     WEBCORE_EXPORT unsigned childElementCount() const;
</span><del>-    ExceptionOr<void> append(Vector<NodeOrString>&&);
-    ExceptionOr<void> prepend(Vector<NodeOrString>&&);
</del><ins>+    ExceptionOr<void> append(FixedVector<NodeOrString>&&);
+    ExceptionOr<void> prepend(FixedVector<NodeOrString>&&);
</ins><span class="cx"> 
</span><del>-    ExceptionOr<void> replaceChildren(Vector<NodeOrString>&&);
</del><ins>+    ExceptionOr<void> replaceChildren(FixedVector<NodeOrString>&&);
</ins><span class="cx"> 
</span><span class="cx">     ExceptionOr<void> ensurePreInsertionValidity(Node& newChild, Node* refChild);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp    2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/dom/Document.cpp       2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -3337,7 +3337,7 @@
</span><span class="cx">     return { };
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr<void> Document::write(Document* entryDocument, Vector<String>&& strings)
</del><ins>+ExceptionOr<void> Document::write(Document* entryDocument, FixedVector<String>&& strings)
</ins><span class="cx"> {
</span><span class="cx">     if (!isHTMLDocument() || m_throwOnDynamicMarkupInsertionCount)
</span><span class="cx">         return Exception { InvalidStateError };
</span><span class="lines">@@ -3349,7 +3349,7 @@
</span><span class="cx">     return write(entryDocument, WTFMove(text));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr<void> Document::writeln(Document* entryDocument, Vector<String>&& strings)
</del><ins>+ExceptionOr<void> Document::writeln(Document* entryDocument, FixedVector<String>&& strings)
</ins><span class="cx"> {
</span><span class="cx">     if (!isHTMLDocument() || m_throwOnDynamicMarkupInsertionCount)
</span><span class="cx">         return Exception { InvalidStateError };
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.h      2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/dom/Document.h 2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -57,6 +57,7 @@
</span><span class="cx"> #include "ViewportArguments.h"
</span><span class="cx"> #include "VisibilityState.h"
</span><span class="cx"> #include <wtf/Deque.h>
</span><ins>+#include <wtf/FixedVector.h>
</ins><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx"> #include <wtf/HashCountedSet.h>
</span><span class="cx"> #include <wtf/HashSet.h>
</span><span class="lines">@@ -693,8 +694,8 @@
</span><span class="cx">     void cancelParsing();
</span><span class="cx"> 
</span><span class="cx">     ExceptionOr<void> write(Document* entryDocument, SegmentedString&&);
</span><del>-    WEBCORE_EXPORT ExceptionOr<void> write(Document* entryDocument, Vector<String>&&);
-    WEBCORE_EXPORT ExceptionOr<void> writeln(Document* entryDocument, Vector<String>&&);
</del><ins>+    WEBCORE_EXPORT ExceptionOr<void> write(Document* entryDocument, FixedVector<String>&&);
+    WEBCORE_EXPORT ExceptionOr<void> writeln(Document* entryDocument, FixedVector<String>&&);
</ins><span class="cx"> 
</span><span class="cx">     bool wellFormed() const { return m_wellFormed; }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentTouchcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DocumentTouch.cpp (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DocumentTouch.cpp       2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/dom/DocumentTouch.cpp  2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx">     return Touch::create(frame, target, identifier, screenX, screenY, pageX, pageY, radiusX, radiusY, rotationAngle, force);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref<TouchList> DocumentTouch::createTouchList(Document&, Vector<std::reference_wrapper<Touch>>&& touches)
</del><ins>+Ref<TouchList> DocumentTouch::createTouchList(Document&, FixedVector<std::reference_wrapper<Touch>>&& touches)
</ins><span class="cx"> {
</span><span class="cx">     return TouchList::create(WTFMove(touches));
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentTouchh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DocumentTouch.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DocumentTouch.h 2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/dom/DocumentTouch.h    2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #elif ENABLE(TOUCH_EVENTS)
</span><span class="cx"> 
</span><span class="cx"> #include <functional>
</span><ins>+#include <wtf/FixedVector.h>
</ins><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -43,7 +44,7 @@
</span><span class="cx"> class DocumentTouch {
</span><span class="cx"> public:
</span><span class="cx">     static Ref<Touch> createTouch(Document&, RefPtr<WindowProxy>&&, EventTarget*, int identifier, int pageX, int pageY, int screenX, int screenY, int radiusX, int radiusY, float rotationAngle, float force);
</span><del>-    static Ref<TouchList> createTouchList(Document&, Vector<std::reference_wrapper<Touch>>&&);
</del><ins>+    static Ref<TouchList> createTouchList(Document&, FixedVector<std::reference_wrapper<Touch>>&&);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.cpp (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.cpp        2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/dom/Node.cpp   2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -513,7 +513,7 @@
</span><span class="cx">     return downcast<ContainerNode>(*this).appendChild(newChild);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static HashSet<RefPtr<Node>> nodeSetPreTransformedFromNodeOrStringVector(const Vector<NodeOrString>& vector)
</del><ins>+static HashSet<RefPtr<Node>> nodeSetPreTransformedFromNodeOrStringVector(const FixedVector<NodeOrString>& vector)
</ins><span class="cx"> {
</span><span class="cx">     HashSet<RefPtr<Node>> nodeSet;
</span><span class="cx">     for (const auto& variant : vector) {
</span><span class="lines">@@ -543,7 +543,7 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr<RefPtr<Node>> Node::convertNodesOrStringsIntoNode(Vector<NodeOrString>&& nodeOrStringVector)
</del><ins>+ExceptionOr<RefPtr<Node>> Node::convertNodesOrStringsIntoNode(FixedVector<NodeOrString>&& nodeOrStringVector)
</ins><span class="cx"> {
</span><span class="cx">     if (nodeOrStringVector.isEmpty())
</span><span class="cx">         return nullptr;
</span><span class="lines">@@ -569,7 +569,7 @@
</span><span class="cx">     return RefPtr<Node> { WTFMove(nodeToReturn) };
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr<void> Node::before(Vector<NodeOrString>&& nodeOrStringVector)
</del><ins>+ExceptionOr<void> Node::before(FixedVector<NodeOrString>&& nodeOrStringVector)
</ins><span class="cx"> {
</span><span class="cx">     RefPtr<ContainerNode> parent = parentNode();
</span><span class="cx">     if (!parent)
</span><span class="lines">@@ -593,7 +593,7 @@
</span><span class="cx">     return parent->insertBefore(*node, viablePreviousSibling.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr<void> Node::after(Vector<NodeOrString>&& nodeOrStringVector)
</del><ins>+ExceptionOr<void> Node::after(FixedVector<NodeOrString>&& nodeOrStringVector)
</ins><span class="cx"> {
</span><span class="cx">     RefPtr<ContainerNode> parent = parentNode();
</span><span class="cx">     if (!parent)
</span><span class="lines">@@ -612,7 +612,7 @@
</span><span class="cx">     return parent->insertBefore(*node, viableNextSibling.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr<void> Node::replaceWith(Vector<NodeOrString>&& nodeOrStringVector)
</del><ins>+ExceptionOr<void> Node::replaceWith(FixedVector<NodeOrString>&& nodeOrStringVector)
</ins><span class="cx"> {
</span><span class="cx">     RefPtr<ContainerNode> parent = parentNode();
</span><span class="cx">     if (!parent)
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.h  2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/dom/Node.h     2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include "TreeScope.h"
</span><span class="cx"> #include <wtf/CompactPointerTuple.h>
</span><span class="cx"> #include <wtf/CompactUniquePtrTuple.h>
</span><ins>+#include <wtf/FixedVector.h>
</ins><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx"> #include <wtf/IsoMalloc.h>
</span><span class="cx"> #include <wtf/ListHashSet.h>
</span><span class="lines">@@ -184,9 +185,9 @@
</span><span class="cx">     WEBCORE_EXPORT Element* nextElementSibling() const;
</span><span class="cx"> 
</span><span class="cx">     // From the ChildNode - https://dom.spec.whatwg.org/#childnode
</span><del>-    ExceptionOr<void> before(Vector<NodeOrString>&&);
-    ExceptionOr<void> after(Vector<NodeOrString>&&);
-    ExceptionOr<void> replaceWith(Vector<NodeOrString>&&);
</del><ins>+    ExceptionOr<void> before(FixedVector<NodeOrString>&&);
+    ExceptionOr<void> after(FixedVector<NodeOrString>&&);
+    ExceptionOr<void> replaceWith(FixedVector<NodeOrString>&&);
</ins><span class="cx">     WEBCORE_EXPORT ExceptionOr<void> remove();
</span><span class="cx"> 
</span><span class="cx">     // Other methods (not part of DOM)
</span><span class="lines">@@ -691,7 +692,7 @@
</span><span class="cx">     void invalidateStyle(Style::Validity, Style::InvalidationMode = Style::InvalidationMode::Normal);
</span><span class="cx">     void updateAncestorsForStyleRecalc();
</span><span class="cx"> 
</span><del>-    ExceptionOr<RefPtr<Node>> convertNodesOrStringsIntoNode(Vector<NodeOrString>&&);
</del><ins>+    ExceptionOr<RefPtr<Node>> convertNodesOrStringsIntoNode(FixedVector<NodeOrString>&&);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     virtual PseudoId customPseudoId() const
</span></span></pre></div>
<a id="trunkSourceWebCoredomTouchListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/TouchList.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/TouchList.h     2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/dom/TouchList.h        2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #elif ENABLE(TOUCH_EVENTS)
</span><span class="cx"> 
</span><span class="cx"> #include "Touch.h"
</span><ins>+#include <wtf/FixedVector.h>
</ins><span class="cx"> #include <wtf/Ref.h>
</span><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="cx"> #include <wtf/Vector.h>
</span><span class="lines">@@ -41,7 +42,7 @@
</span><span class="cx">     {
</span><span class="cx">         return adoptRef(*new TouchList);
</span><span class="cx">     }
</span><del>-    static Ref<TouchList> create(Vector<std::reference_wrapper<Touch>>&& touches)
</del><ins>+    static Ref<TouchList> create(FixedVector<std::reference_wrapper<Touch>>&& touches)
</ins><span class="cx">     {
</span><span class="cx">         return adoptRef(*new TouchList(WTFMove(touches)));
</span><span class="cx">     }
</span><span class="lines">@@ -56,7 +57,7 @@
</span><span class="cx"> private:
</span><span class="cx">     TouchList() = default;
</span><span class="cx"> 
</span><del>-    explicit TouchList(Vector<std::reference_wrapper<Touch>>&& touches)
</del><ins>+    explicit TouchList(FixedVector<std::reference_wrapper<Touch>>&& touches)
</ins><span class="cx">     {
</span><span class="cx">         m_values.reserveInitialCapacity(touches.size());
</span><span class="cx">         for (auto& touch : touches)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlDOMTokenListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/DOMTokenList.cpp (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/DOMTokenList.cpp       2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/html/DOMTokenList.cpp  2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx">     return { };
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr<void> DOMTokenList::add(const Vector<String>& tokens)
</del><ins>+ExceptionOr<void> DOMTokenList::add(const FixedVector<String>& tokens)
</ins><span class="cx"> {
</span><span class="cx">     return addInternal(tokens.data(), tokens.size());
</span><span class="cx"> }
</span><span class="lines">@@ -122,7 +122,7 @@
</span><span class="cx">     return { };
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr<void> DOMTokenList::remove(const Vector<String>& tokens)
</del><ins>+ExceptionOr<void> DOMTokenList::remove(const FixedVector<String>& tokens)
</ins><span class="cx"> {
</span><span class="cx">     return removeInternal(tokens.data(), tokens.size());
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlDOMTokenListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/DOMTokenList.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/DOMTokenList.h 2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/html/DOMTokenList.h    2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><span class="cx"> #include "Element.h"
</span><ins>+#include <wtf/FixedVector.h>
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -44,9 +45,9 @@
</span><span class="cx">     const AtomString& item(unsigned index) const;
</span><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT bool contains(const AtomString&) const;
</span><del>-    ExceptionOr<void> add(const Vector<String>&);
</del><ins>+    ExceptionOr<void> add(const FixedVector<String>&);
</ins><span class="cx">     ExceptionOr<void> add(const AtomString&);
</span><del>-    ExceptionOr<void> remove(const Vector<String>&);
</del><ins>+    ExceptionOr<void> remove(const FixedVector<String>&);
</ins><span class="cx">     ExceptionOr<void> remove(const AtomString&);
</span><span class="cx">     WEBCORE_EXPORT ExceptionOr<bool> toggle(const AtomString&, std::optional<bool> force);
</span><span class="cx">     ExceptionOr<bool> replace(const AtomString& token, const AtomString& newToken);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLCanvasElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLCanvasElement.cpp (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLCanvasElement.cpp  2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/html/HTMLCanvasElement.cpp     2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -245,7 +245,7 @@
</span><span class="cx">     maxCanvasAreaForTesting = size;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr<std::optional<RenderingContext>> HTMLCanvasElement::getContext(JSC::JSGlobalObject& state, const String& contextId, Vector<JSC::Strong<JSC::Unknown>>&& arguments)
</del><ins>+ExceptionOr<std::optional<RenderingContext>> HTMLCanvasElement::getContext(JSC::JSGlobalObject& state, const String& contextId, FixedVector<JSC::Strong<JSC::Unknown>>&& arguments)
</ins><span class="cx"> {
</span><span class="cx">     if (m_context) {
</span><span class="cx">         if (m_context->isPlaceholder())
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLCanvasElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLCanvasElement.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLCanvasElement.h    2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/html/HTMLCanvasElement.h       2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -74,7 +74,7 @@
</span><span class="cx">     void setSize(const IntSize& newSize) override;
</span><span class="cx"> 
</span><span class="cx">     CanvasRenderingContext* renderingContext() const final { return m_context.get(); }
</span><del>-    ExceptionOr<std::optional<RenderingContext>> getContext(JSC::JSGlobalObject&, const String& contextId, Vector<JSC::Strong<JSC::Unknown>>&& arguments);
</del><ins>+    ExceptionOr<std::optional<RenderingContext>> getContext(JSC::JSGlobalObject&, const String& contextId, FixedVector<JSC::Strong<JSC::Unknown>>&& arguments);
</ins><span class="cx"> 
</span><span class="cx">     CanvasRenderingContext* getContext(const String&);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlOffscreenCanvascpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/OffscreenCanvas.cpp (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/OffscreenCanvas.cpp    2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/html/OffscreenCanvas.cpp       2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -213,7 +213,7 @@
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(WEBGL)
</span><span class="cx"> 
</span><del>-ExceptionOr<std::optional<OffscreenRenderingContext>> OffscreenCanvas::getContext(JSC::JSGlobalObject& state, RenderingContextType contextType, Vector<JSC::Strong<JSC::Unknown>>&& arguments)
</del><ins>+ExceptionOr<std::optional<OffscreenRenderingContext>> OffscreenCanvas::getContext(JSC::JSGlobalObject& state, RenderingContextType contextType, FixedVector<JSC::Strong<JSC::Unknown>>&& arguments)
</ins><span class="cx"> {
</span><span class="cx">     if (m_detached)
</span><span class="cx">         return Exception { InvalidStateError };
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlOffscreenCanvash"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/OffscreenCanvas.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/OffscreenCanvas.h      2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/html/OffscreenCanvas.h 2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> #include "ImageBufferPipe.h"
</span><span class="cx"> #include "IntSize.h"
</span><span class="cx"> #include "ScriptWrappable.h"
</span><ins>+#include <wtf/FixedVector.h>
</ins><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="cx"> #include <wtf/ThreadSafeRefCounted.h>
</span><span class="lines">@@ -126,7 +127,7 @@
</span><span class="cx"> 
</span><span class="cx">     CanvasRenderingContext* renderingContext() const final { return m_context.get(); }
</span><span class="cx"> 
</span><del>-    ExceptionOr<std::optional<OffscreenRenderingContext>> getContext(JSC::JSGlobalObject&, RenderingContextType, Vector<JSC::Strong<JSC::Unknown>>&& arguments);
</del><ins>+    ExceptionOr<std::optional<OffscreenRenderingContext>> getContext(JSC::JSGlobalObject&, RenderingContextType, FixedVector<JSC::Strong<JSC::Unknown>>&& arguments);
</ins><span class="cx">     ExceptionOr<RefPtr<ImageBitmap>> transferToImageBitmap();
</span><span class="cx">     void convertToBlob(ImageEncodeOptions&&, Ref<DeferredPromise>&&);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.cpp (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.cpp  2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/page/DOMWindow.cpp     2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -1794,7 +1794,7 @@
</span><span class="cx">     page->chrome().setWindowRect(adjustWindowRect(*page, update));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr<int> DOMWindow::setTimeout(std::unique_ptr<ScheduledAction> action, int timeout, Vector<JSC::Strong<JSC::Unknown>>&& arguments)
</del><ins>+ExceptionOr<int> DOMWindow::setTimeout(std::unique_ptr<ScheduledAction> action, int timeout, FixedVector<JSC::Strong<JSC::Unknown>>&& arguments)
</ins><span class="cx"> {
</span><span class="cx">     RefPtr context = scriptExecutionContext();
</span><span class="cx">     if (!context)
</span><span class="lines">@@ -1819,7 +1819,7 @@
</span><span class="cx">     DOMTimer::removeById(*context, timeoutId);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr<int> DOMWindow::setInterval(std::unique_ptr<ScheduledAction> action, int timeout, Vector<JSC::Strong<JSC::Unknown>>&& arguments)
</del><ins>+ExceptionOr<int> DOMWindow::setInterval(std::unique_ptr<ScheduledAction> action, int timeout, FixedVector<JSC::Strong<JSC::Unknown>>&& arguments)
</ins><span class="cx"> {
</span><span class="cx">     RefPtr context = scriptExecutionContext();
</span><span class="cx">     if (!context)
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.h    2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/page/DOMWindow.h       2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx"> #include "WindowOrWorkerGlobalScope.h"
</span><span class="cx"> #include <JavaScriptCore/HandleTypes.h>
</span><span class="cx"> #include <JavaScriptCore/Strong.h>
</span><ins>+#include <wtf/FixedVector.h>
</ins><span class="cx"> #include <wtf/Function.h>
</span><span class="cx"> #include <wtf/HashSet.h>
</span><span class="cx"> #include <wtf/MonotonicTime.h>
</span><span class="lines">@@ -293,9 +294,9 @@
</span><span class="cx">     VisualViewport& visualViewport();
</span><span class="cx"> 
</span><span class="cx">     // Timers
</span><del>-    ExceptionOr<int> setTimeout(std::unique_ptr<ScheduledAction>, int timeout, Vector<JSC::Strong<JSC::Unknown>>&& arguments);
</del><ins>+    ExceptionOr<int> setTimeout(std::unique_ptr<ScheduledAction>, int timeout, FixedVector<JSC::Strong<JSC::Unknown>>&& arguments);
</ins><span class="cx">     void clearTimeout(int timeoutId);
</span><del>-    ExceptionOr<int> setInterval(std::unique_ptr<ScheduledAction>, int timeout, Vector<JSC::Strong<JSC::Unknown>>&& arguments);
</del><ins>+    ExceptionOr<int> setInterval(std::unique_ptr<ScheduledAction>, int timeout, FixedVector<JSC::Strong<JSC::Unknown>>&& arguments);
</ins><span class="cx">     void clearInterval(int timeoutId);
</span><span class="cx"> 
</span><span class="cx">     int requestAnimationFrame(Ref<RequestAnimationFrameCallback>&&);
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersDedicatedWorkerGlobalScopecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.cpp (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.cpp      2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.cpp 2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -95,7 +95,7 @@
</span><span class="cx">     return { };
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr<void> DedicatedWorkerGlobalScope::importScripts(const Vector<String>& urls)
</del><ins>+ExceptionOr<void> DedicatedWorkerGlobalScope::importScripts(const FixedVector<String>& urls)
</ins><span class="cx"> {
</span><span class="cx">     auto result = Base::importScripts(urls);
</span><span class="cx">     thread().workerObjectProxy().reportPendingActivity(hasPendingActivity());
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersDedicatedWorkerGlobalScopeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.h        2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.h   2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx"> 
</span><span class="cx">     Type type() const final { return Type::DedicatedWorker; }
</span><span class="cx"> 
</span><del>-    ExceptionOr<void> importScripts(const Vector<String>& urls) final;
</del><ins>+    ExceptionOr<void> importScripts(const FixedVector<String>& urls) final;
</ins><span class="cx">     EventTargetInterface eventTargetInterface() const final;
</span><span class="cx"> 
</span><span class="cx">     void prepareForDestruction() final;
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerGlobalScopecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.cpp (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerGlobalScope.cpp       2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.cpp  2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -302,7 +302,7 @@
</span><span class="cx">         m_navigator->setIsOnline(isOnline);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr<int> WorkerGlobalScope::setTimeout(std::unique_ptr<ScheduledAction> action, int timeout, Vector<JSC::Strong<JSC::Unknown>>&& arguments)
</del><ins>+ExceptionOr<int> WorkerGlobalScope::setTimeout(std::unique_ptr<ScheduledAction> action, int timeout, FixedVector<JSC::Strong<JSC::Unknown>>&& arguments)
</ins><span class="cx"> {
</span><span class="cx">     // FIXME: Should this check really happen here? Or should it happen when code is about to eval?
</span><span class="cx">     if (action->type() == ScheduledAction::Type::Code) {
</span><span class="lines">@@ -320,7 +320,7 @@
</span><span class="cx">     DOMTimer::removeById(*this, timeoutId);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr<int> WorkerGlobalScope::setInterval(std::unique_ptr<ScheduledAction> action, int timeout, Vector<JSC::Strong<JSC::Unknown>>&& arguments)
</del><ins>+ExceptionOr<int> WorkerGlobalScope::setInterval(std::unique_ptr<ScheduledAction> action, int timeout, FixedVector<JSC::Strong<JSC::Unknown>>&& arguments)
</ins><span class="cx"> {
</span><span class="cx">     // FIXME: Should this check really happen here? Or should it happen when code is about to eval?
</span><span class="cx">     if (action->type() == ScheduledAction::Type::Code) {
</span><span class="lines">@@ -338,7 +338,7 @@
</span><span class="cx">     DOMTimer::removeById(*this, timeoutId);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr<void> WorkerGlobalScope::importScripts(const Vector<String>& urls)
</del><ins>+ExceptionOr<void> WorkerGlobalScope::importScripts(const FixedVector<String>& urls)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(contentSecurityPolicy());
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerGlobalScopeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.h (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerGlobalScope.h 2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.h    2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> #include "WorkerType.h"
</span><span class="cx"> #include <JavaScriptCore/ConsoleMessage.h>
</span><span class="cx"> #include <memory>
</span><ins>+#include <wtf/FixedVector.h>
</ins><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx"> #include <wtf/MemoryPressureHandler.h>
</span><span class="cx"> #include <wtf/URL.h>
</span><span class="lines">@@ -107,14 +108,14 @@
</span><span class="cx">     WorkerLocation& location() const;
</span><span class="cx">     void close();
</span><span class="cx"> 
</span><del>-    virtual ExceptionOr<void> importScripts(const Vector<String>& urls);
</del><ins>+    virtual ExceptionOr<void> importScripts(const FixedVector<String>& urls);
</ins><span class="cx">     WorkerNavigator& navigator();
</span><span class="cx"> 
</span><span class="cx">     void setIsOnline(bool);
</span><span class="cx"> 
</span><del>-    ExceptionOr<int> setTimeout(std::unique_ptr<ScheduledAction>, int timeout, Vector<JSC::Strong<JSC::Unknown>>&& arguments);
</del><ins>+    ExceptionOr<int> setTimeout(std::unique_ptr<ScheduledAction>, int timeout, FixedVector<JSC::Strong<JSC::Unknown>>&& arguments);
</ins><span class="cx">     void clearTimeout(int timeoutId);
</span><del>-    ExceptionOr<int> setInterval(std::unique_ptr<ScheduledAction>, int timeout, Vector<JSC::Strong<JSC::Unknown>>&& arguments);
</del><ins>+    ExceptionOr<int> setInterval(std::unique_ptr<ScheduledAction>, int timeout, FixedVector<JSC::Strong<JSC::Unknown>>&& arguments);
</ins><span class="cx">     void clearInterval(int timeoutId);
</span><span class="cx"> 
</span><span class="cx">     bool isSecureContext() const final;
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebKit/ChangeLog       2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2021-12-20  Alexey Shvayka  <ashvayka@apple.com>
+
+        [WebIDL] convertVariadicArguments() should return a FixedVector
+        https://bugs.webkit.org/show_bug.cgi?id=232639
+
+        Reviewed by Yusuke Suzuki.
+
+        Add / remove tokens one by one because there is no way to retrieve
+        the size of va_list in advance so we could construct a FixedVector.
+
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp:
+        (webkit_dom_dom_token_list_add):
+        (webkit_dom_dom_token_list_remove):
+
</ins><span class="cx"> 2021-12-20  Fujii Hironori  <Hironori.Fujii@sony.com>
</span><span class="cx"> 
</span><span class="cx">         WC variant RemoteGraphicsContextGL::platformLayer() should be removed
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessInjectedBundleAPIgtkDOMWebKitDOMDOMTokenListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp (287293 => 287294)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp      2021-12-21 02:15:25 UTC (rev 287293)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp 2021-12-21 02:25:46 UTC (rev 287294)
</span><span class="lines">@@ -189,16 +189,16 @@
</span><span class="cx">     g_return_if_fail(!error || !*error);
</span><span class="cx">     WebCore::DOMTokenList* item = WebKit::core(self);
</span><span class="cx">     va_list variadicParameterList;
</span><del>-    Vector<WTF::String> convertedTokens;
</del><span class="cx">     va_start(variadicParameterList, error);
</span><del>-    while (gchar* variadicParameter = va_arg(variadicParameterList, gchar*))
-        convertedTokens.append(WTF::String::fromUTF8(variadicParameter));
</del><ins>+    while (gchar* variadicParameter = va_arg(variadicParameterList, gchar*)) {
+        auto result = item->add(WTF::String::fromUTF8(variadicParameter));
+        if (result.hasException()) {
+            auto description = WebCore::DOMException::description(result.releaseException().code());
+            g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), description.legacyCode, description.name);
+            break;
+        }
+    }
</ins><span class="cx">     va_end(variadicParameterList);
</span><del>-    auto result = item->add(WTFMove(convertedTokens));
-    if (result.hasException()) {
-        auto description = WebCore::DOMException::description(result.releaseException().code());
-        g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), description.legacyCode, description.name);
-    }
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void webkit_dom_dom_token_list_remove(WebKitDOMDOMTokenList* self, GError** error, ...)
</span><span class="lines">@@ -210,14 +210,15 @@
</span><span class="cx">     va_list variadicParameterList;
</span><span class="cx">     Vector<WTF::String> convertedTokens;
</span><span class="cx">     va_start(variadicParameterList, error);
</span><del>-    while (gchar* variadicParameter = va_arg(variadicParameterList, gchar*))
-        convertedTokens.append(WTF::String::fromUTF8(variadicParameter));
</del><ins>+    while (gchar* variadicParameter = va_arg(variadicParameterList, gchar*)) {
+        auto result = item->remove(WTF::String::fromUTF8(variadicParameter));
+        if (result.hasException()) {
+            auto description = WebCore::DOMException::description(result.releaseException().code());
+            g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), description.legacyCode, description.name);
+            break;
+        }
+    }
</ins><span class="cx">     va_end(variadicParameterList);
</span><del>-    auto result = item->remove(WTFMove(convertedTokens));
-    if (result.hasException()) {
-        auto description = WebCore::DOMException::description(result.releaseException().code());
-        g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), description.legacyCode, description.name);
-    }
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> gboolean webkit_dom_dom_token_list_toggle(WebKitDOMDOMTokenList* self, const gchar* token, gboolean force, GError** error)
</span></span></pre>
</div>
</div>

</body>
</html>