Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c06ff4e993001410f3610a8e4385762f02d00ca6
      
https://github.com/WebKit/WebKit/commit/c06ff4e993001410f3610a8e4385762f02d00ca6
  Author: David Kilzer <[email protected]>
  Date:   2026-09-28 (Mon, 28 Sep 2026)

  Changed paths:
    M Source/WTF/wtf/Deque.h
    M Source/WebCore/Modules/indexeddb/server/SQLiteIDBCursor.cpp
    M Source/WebCore/cssjit/SelectorCompiler.cpp
    M Source/WebKit/UIProcess/mac/WebViewImpl.mm
    M Tools/TestWebKitAPI/Tests/WTF/Deque.cpp

  Log Message:
  -----------
  [WTF] Add Deque::constructAndAppend() to construct elements in place
<https://bugs.webkit.org/show_bug.cgi?id=325441>
<rdar://188543319>

Reviewed by Chris Dumez.

Add `Deque::constructAndAppend()`, matching `Vector`'s, so code can
append a default-constructed or argument-constructed element without
first building a temporary in the caller's frame and moving it in.
This also lets a style check recommend `constructAndAppend()` for both
containers.  Make `append()` delegate to it so the placement-new lives
in one place.

Convert the three `Deque` call sites that append a temporary.

Test: Tools/TestWebKitAPI/Tests/WTF/Deque.cpp

* Source/WTF/wtf/Deque.h:
(WTF::Deque<T, inlineCapacity>::append):
(WTF::Deque<T, inlineCapacity>::constructAndAppend): Add.
* Source/WebCore/Modules/indexeddb/server/SQLiteIDBCursor.cpp:
(WebCore::IDBServer::SQLiteIDBCursor::fetch):
* Source/WebCore/cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorCheckerExcludingPseudoElements):
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::WebViewImpl::interpretKeyEvent):
* Tools/TestWebKitAPI/Tests/WTF/Deque.cpp:
(TestWebKitAPI::TEST(WTF_Deque, ConstructAndAppendConstructsInPlace)): Add.
(TestWebKitAPI::TEST(WTF_Deque, ConstructAndAppendWithArguments)): Add.
(TestWebKitAPI::TEST(WTF_Deque, ConstructAndAppendVariantAlternativeInPlace)): 
Add.
(TestWebKitAPI::TEST(WTF_Deque, 
AppendEmptyBracesAppendsOneValueInitializedElement)): Add.

Canonical link: https://commits.webkit.org/322057@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to