[webkit-changes] [WebKit/WebKit] 3cc2bc: Merge 255268 at main - Accept image/jpg for compatibi...

q66 noreply at github.com
Sat Oct 8 23:11:44 PDT 2022


  Branch: refs/heads/webkitglib/2.38
  Home:   https://github.com/WebKit/WebKit
  Commit: 3cc2bc30192c84cd2935346018be29dccc8f4eef
      https://github.com/WebKit/WebKit/commit/3cc2bc30192c84cd2935346018be29dccc8f4eef
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    A LayoutTests/http/tests/images/jpg-invalid-content-type-expected.html
    A LayoutTests/http/tests/images/jpg-invalid-content-type.html
    M Source/WebCore/platform/MIMETypeRegistry.cpp
    M Source/WebCore/platform/graphics/cg/ImageBufferUtilitiesCG.cpp

  Log Message:
  -----------
  Merge 255268 at main - Accept image/jpg for compatibility reasons
https://bugs.webkit.org/show_bug.cgi?id=246131
rdar://100835192

Reviewed by Said Abou-Hallawa and Darin Adler.

Blink & Gecko seem to render JPEG images served with `Content-Type: image/jpg`
while WebKit decides to download it because the correct content type is
supposed to be `image/jpeg`. This is an interoperability risk so we should
align.

In this patch, we now treat `image/jpg` as a valid JPEG content type to align
with other browser engines.

Also revert a couple of unintended changes that were made in 237163 at main:
- The logic in normalizedImageMIMEType() was for CURL only but the condition got
  mistakenly reversed.
- The normalized MIME type was previously used for both supportedImageMIMETypeSet
  and additionalSupportedImageMIMETypes. However, 237163 at main stopped using the
  normalized MIME type for supportedImageMIMETypeSet.

* LayoutTests/http/tests/images/jpg-invalid-content-type-expected.html: Added.
* LayoutTests/http/tests/images/jpg-invalid-content-type.html: Added.
* Source/WebCore/platform/MIMETypeRegistry.cpp:
(WebCore::MIMETypeRegistry::isSupportedImageMIMEType):

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

(cherry picked from commit 0d17dc0c310f9b1d05268ab63e967c38133892f0)


  Commit: 3142c4b379eeb83037e945e316c9fe224609789d
      https://github.com/WebKit/WebKit/commit/3142c4b379eeb83037e945e316c9fe224609789d
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    A LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/require-corp-worker-script-revalidation-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/require-corp-worker-script-revalidation.html
    A LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/resources/dedicated-worker-supporting-revalidation.py
    M Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp

  Log Message:
  -----------
  Merge 255302 at main - Cross-Origin-Embedder-Policy incorrectly blocks scripts on cache hit
https://bugs.webkit.org/show_bug.cgi?id=245346
rdar://100389164

Reviewed by Brent Fulgham.

* LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/require-corp-worker-script-revalidation-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/require-corp-worker-script-revalidation.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/resources/dedicated-worker-supporting-revalidation.py: Added.
(main):
Add WPT test coverage (which I will upstream).

* Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::shouldInterruptWorkerLoadForCrossOriginEmbedderPolicy):
(WebKit::NetworkResourceLoader::didReceiveResponse):
If the response is a 304 revalidation response, make sure we get its COEP header from the cached
response to avoid blocking by the COEP logic. This is similar to what we were already doing for
the CORP header.

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

(cherry picked from commit 126473bd1f9b742a3748fac9d58549504db485d0)


  Commit: 9c701ef2caa1f0f55d1cdf220a268f7a71c179e1
      https://github.com/WebKit/WebKit/commit/9c701ef2caa1f0f55d1cdf220a268f7a71c179e1
  Author: Daniel Kolesa <dkolesa at igalia.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M Source/JavaScriptCore/offlineasm/riscv64.rb

  Log Message:
  -----------
  Merge 255311 at main - [JSC][RISCV64] Use GOT for non-local symbols in backend

https://bugs.webkit.org/show_bug.cgi?id=246157

Reviewed by Žan Doberšek.

The lla and la pseudo-instructions are identical when non-PIC,
but in PIC lla enforces pc-relative addressing unconditionally.
This works with bfd for some reason (likely silently rewriting it
or emitting textrels) but with lld it fails to build with messages
like:

ld: error: relocation R_RISCV_PCREL_HI20 cannot be used against symbol 'g_opcodeMap'; recompile with -fPIC

This is because g_opcodeMap (and others) are global, thus a GOT
lookup is necessary (as there is no relative address we can load).

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

(cherry picked from commit 3127e0a5094b9cff04a6e37f123122a1e5dec036)


Compare: https://github.com/WebKit/WebKit/compare/f0945863f2ed...9c701ef2caa1


More information about the webkit-changes mailing list