Migrate DeprecatedLower to LowerASCII where only compared with ASCII
This CL changes DeprecatedLower calls to LowerASCII where the result is only ever used in a comparison against one or more ASCII constants (including predicates like StartsWith) but is otherwise dead, and I believe it’s the last CL needed to finish our intent to remove Unicode case-insensitivity for ASCII constants [1]. The correctness of the image_encoder_utils.cc change isn’t obvious, but you can verify it by heading to the line in Chromium Code Search [2], hovering over lowercase_mime_type, and observing that the only reads are == MIME type literals and by two functions: • IsSupportedImageMIMETypeForEncoding (line 78), which does the same • ParseImageEncodingMimeType (line 80), which does the same These changes are potentially author-facing, except where the constant in question contains none of {s,k,S,K} [3], but I’ve optimistically made them without any additional tests based on Rick Byers’ reasoning on blink-dev [4]. Please let me know if that’s not sufficient here. [1] https://groups.google.com/a/chromium.org/d/topic/blink-dev/sFOpNuQ91UU [2] https://source.chromium.org/chromium/chromium/src/+/f7455871a37e53362183771af7de36844df73a38:third_party/blink/renderer/platform/image-encoders/image_encoder_utils.cc;l=36 [3] https://www.unicode.org/Public/UCD/latest/ucd/CaseFolding.txt [4] https://groups.google.com/a/chromium.org/d/msg/blink-dev/sFOpNuQ91UU/3u1HxbnQCQAJ Change-Id: I10e621bb2a6947bc3004d9a0c156dcae2e05a6e8 Bug: 627682 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2114510 Commit-Queue: Delan Azabani <dazabani@igalia.com> Reviewed-by:Frédéric Wang <fwang@igalia.com> Reviewed-by:
Yoshifumi Inoue <yosin@chromium.org> Reviewed-by:
Dmitry Gozman <dgozman@chromium.org> Reviewed-by:
Darwin Huang <huangdarwin@chromium.org> Cr-Commit-Position: refs/heads/master@{#753581}
Showing
Please register or sign in to comment