Bug 255479

Summary: Combine Base64DecodeOptions and Base64DecodeMode
Product: WebKit Reporter: Anne van Kesteren <annevk>
Component: WebCore Misc.Assignee: Anne van Kesteren <annevk>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 255840    
Bug Blocks: 255467    

Description Anne van Kesteren 2023-04-15 00:25:56 PDT
Based on analyzing the code and knowledge of the web platform I want to see if we can trim these down to three modes:

* Default, which uses the normal map, validates padding, and is strict on whitespace.
* DefaultIgnoreWhitespace, like Default, but ignores ASCII whitespace. It notably does not ignore U+000B. WebKit used to ignore U+000B in some cases, but that was more an historical accident of using isASCIISpace where isHTMLSpace was warranted. See also bug 255467.
* URL, which uses the URL map, does not validate padding, but is strict on whitespace. It's common for the URL case to not validate padding as including = in URLs can sometimes be involved. Also none of the existing WebKit code would validate padding or be loose on whitespace.

I plan to put up a draft PR to see if there is any bot fallout.
Comment 1 Radar WebKit Bug Importer 2023-04-15 00:26:05 PDT
<rdar://problem/108082420>
Comment 2 Anne van Kesteren 2023-04-15 00:38:05 PDT
Pull request: https://github.com/WebKit/WebKit/pull/12768
Comment 3 EWS 2023-04-24 00:00:00 PDT
Committed 263298@main (252a605f3492): <https://commits.webkit.org/263298@main>

Reviewed commits have been landed. Closing PR #12768 and removing active labels.