Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a4e626a2b14f7600fd7f65c2aa2d09bb4dd76583
      
https://github.com/WebKit/WebKit/commit/a4e626a2b14f7600fd7f65c2aa2d09bb4dd76583
  Author: Devin Rousso <[email protected]>
  Date:   2024-06-17 (Mon, 17 Jun 2024)

  Changed paths:
    M Source/JavaScriptCore/jsc.cpp
    M Source/WTF/wtf/text/Base64.cpp
    M Source/WTF/wtf/text/Base64.h
    M Source/WebCore/page/Base64Utilities.cpp
    M Source/WebCore/page/Page.cpp
    M Source/WebCore/platform/graphics/avfoundation/CDMFairPlayStreaming.cpp
    M Source/WebCore/platform/network/DataURLDecoder.cpp
    M Source/WebKit/UIProcess/Inspector/gtk/RemoteWebInspectorUIProxyGtk.cpp
    M Source/WebKit/UIProcess/Inspector/gtk/WebInspectorUIProxyGtk.cpp
    M Source/WebKit/UIProcess/Inspector/mac/WebInspectorUIProxyMac.mm
    M Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm
    M Tools/TestWebKitAPI/CMakeLists.txt
    M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
    A Tools/TestWebKitAPI/Tests/WTF/Base64.cpp

  Log Message:
  -----------
  [WTF] reorganize `Base64DecodeMode` into flags for more extensibility
https://bugs.webkit.org/show_bug.cgi?id=275558

Reviewed by Darin Adler.

This will assist with implementing `Uint8Array.fromBase64` since that has a 
couple of other extra behavior modes when decoding base64 content 
<https://webkit.org/b/275593>.

* Source/WTF/wtf/text/Base64.h:
(WTF::base64Decode):
(WTF::base64URLDecode):
* Source/WTF/wtf/text/Base64.cpp:
(WTF::base64DecodeInternal):
(WTF::base64Decode):
(WTF::base64DecodeToString):
Introduce a `Base64DecodeOption` that's wrapped in an `OptionSet` (for future 
extensibility) as a parameter for adjusting base64 decoding.

* Source/JavaScriptCore/jsc.cpp:
(functionAtob):
(functionDisassembleBase64):
* Source/WebCore/page/Base64Utilities.cpp:
(WebCore::Base64Utilities::atob):
* Source/WebCore/page/Page.cpp:
(WebCore::Page::userStyleSheetLocationChanged):
* Source/WebCore/platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:
(WebCore::extractSinfData):
* Source/WebCore/platform/network/DataURLDecoder.cpp:
(WebCore::DataURLDecoder::decodeSynchronously):
* Source/WebKit/UIProcess/Inspector/gtk/RemoteWebInspectorUIProxyGtk.cpp:
(WebKit::RemoteWebInspectorUIProxy::platformSave):
* Source/WebKit/UIProcess/Inspector/gtk/WebInspectorUIProxyGtk.cpp:
(WebKit::WebInspectorUIProxy::platformSave):
* Source/WebKit/UIProcess/Inspector/mac/WebInspectorUIProxyMac.mm:
(WebKit::WebInspectorUIProxy::showSavePanel):
* Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm:
(WebInspectorFrontendClient::save):
Replace `Base64EncodeMode::DefaultIgnorePadding` with no options (i.e. default 
behavior).
Replace `Base64EncodeMode::DefaultValidatePadding` with 
`Base64EncodeOption::ValidatePadding`.
Replace `Base64EncodeMode::DefaultValidatePaddingAndIgnoreWhitespace` with 
`Base64EncodeOption::ValidatePadding` and 
`Base64EncodeOption::IgnoreWhitespace`.
Replace `Base64EncodeMode::DefaultIgnoreWhitespaceForQuirk` with 
`Base64EncodeOption::IgnoreWhitespace`.
Replace `Base64EncodeMode::URL` with `Base64EncodeOption::URL`.

* Tools/TestWebKitAPI/Tests/WTF/Base64.cpp: Added.
(TestWebKitAPI::TEST(Base64, Decode)):
(TestWebKitAPI::TEST(Base64, DecodeValidatePadding)):
(TestWebKitAPI::TEST(Base64, DecodeIgnoreWhitespace)):
(TestWebKitAPI::TEST(Base64, DecodeValidatePaddingIgnoreWhitespace)):
(TestWebKitAPI::TEST(Base64, DecodeURL)):
(TestWebKitAPI::TEST(Base64, DecodeURLValidatePadding)):
(TestWebKitAPI::TEST(Base64, DecodeURLIgnoreWhitespace)):
(TestWebKitAPI::TEST(Base64, DecodeURLValidatePaddingIgnoreWhitespace)):

* Tools/TestWebKitAPI/CMakeLists.txt:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to