Skip to content
Snippets Groups Projects
  1. Oct 21, 2024
  2. Oct 01, 2024
  3. Jul 17, 2024
  4. Sep 06, 2024
  5. Sep 11, 2024
  6. Jul 17, 2024
  7. Sep 02, 2024
  8. Oct 10, 2023
  9. Jul 18, 2023
  10. May 14, 2024
  11. Jun 20, 2024
  12. Sep 08, 2023
  13. Jun 12, 2023
    • Yoshi Cheng-Hao Huang's avatar
      Bug 1833891 - Update the WPT test for error handling behavior when worker... · f12696f5
      Yoshi Cheng-Hao Huang authored
      Bug 1833891 - Update the WPT test for error handling behavior when worker loading a cross-origin script. r=dom-worker-reviewers,smaug,zcorpan a=test-only
      
      According to the spec, when a worker is trying to load a cross-origin
      script, an onerror handler should be called. The detailed calling
      sequence from the spec will be explained in the following paragraph. For the
      legacy specification, it will be explained in the bottom.
      
      So we look into current specification first:
      (The numbers indicate the calling sequence)
      = Explain the current behavior when a worker is trying to load a cross-origin script =
      
      == 1. [run a worker](https://html.spec.whatwg.org/#run-a-worker)
      
      14) [Fetch a classic worker script](https://html.spec.whatwg.org/#fetch-a-classic-worker-script) given url, outside settings, destination, inside settings, and with onComplete and performFetch as defined below
      (Note: we use "fetch a classic worker script" as an example here)
      
      == 2. [fetch a classic worker script](https://html.spec.whatwg.org/#fetch-a-classic-worker-script)
      
      given a url, a fetch client settings object, a destination, a script settings object, an onComplete algorithm, and an optional perform the fetch hook performFetch
      
      1) Let request be a new request whose ...  mode is "same-origin", ...
      
      2) If performFetch was given, run performFetch with request, true, and with processResponseConsumeBody as defined below.
      
      Note: Run the performFetch provided in (1),
      
      == 3. performFetch defined in Step 14 of [run a worker](https://html.spec.whatwg.org/#run-a-worker)
      
      ...
      3) [Fetch](https://fetch.spec.whatwg.org/#concept-fetch) request with processResponseConsumeBody set to the following steps given response response and null, failure, or a byte sequence bodyBytes:
      
      == 4. [fetch](https://fetch.spec.whatwg.org/#concept-fetch)
      
      given a request request, ..., an optional algorithm processResponseConsumeBody
      
      7) Let fetchParams be a new fetch params whose request is request, ...,  process response consume body is processResponseConsumeBody
      ...
      17) Run [main fetch](https://fetch.spec.whatwg.org/#concept-main-fetch) given fetchParams.
      
      == 5. [main fetch](https://fetch.spec.whatwg.org/#concept-main-fetch)
      
      given a fetch params fetchParams
      
      12) If response is null, then set response to the result of running the steps corresponding to the first matching statement:
      
          - request’s current URL’s origin is same origin with request’s origin, and request’s response tainting is "basic":
      
          Note: Normal SOP script will execute this part, however in this case we are loading a script which is not the same-origin.
          So we will fallback to next statement.
      
          - request’s mode is "same-origin":
            - Return a network error.
      
      == 6. processResponseConsumeBody defined in Step 2 of (2) [fetch a classic worker script](https://html.spec.whatwg.org/#fetch-a-classic-worker-script)
      
      2) If either of the following conditions are met:
         - bodyBytes is null or failure; or
         - response's status is not an ok status,
           - then run onComplete given null, and abort these steps.
      
      Note: Run onComplete provided in (1)
      
      == 7. onComplete defined in Step 14 of (1) [run a worker](https://html.spec.whatwg.org/#run-a-worker)
      
      1) If script is null or if script's error to rethrow is non-null, then:
         1) Queue a global task on the DOM manipulation task source given worker's relevant global object to fire an event named error at worker.
      
         2) Run the environment discarding steps for inside settings.
      
         3) Abort these steps.
      
      ---
      
      So when a worker loads a cross-origin script, the worker.onerror(e) should be
      called, where e is a Event whose name is "error".
      
      = Explain the legacy behavior when a worker is trying to load a cross-origin script
      
      In the older HTML spec before 2015. Nov,
      The specification was actually defined how to handle cross-origin scripts for workers,
      see http://web.archive.org/web/20151106154945/https://html.spec.whatwg.org/#dom-worker, step 5:
      
      > If the scheme component of worker URL is not "data", and the origin of worker URL
      > is not the same as the origin specified by the incumbent settings object, then
      > throw a SecurityError exception and abort these steps.
      
      However, the statement was removed in https://github.com/whatwg/html/commit/24242406daa40cfe5d97cdfbac463c29e63433fd
      because the SOP check should be done in Fetch API.
      But WPT doesn't get updated since then, so it caused different error
      handling behavior between browsers since then.
      
      Differential Revision: https://phabricator.services.mozilla.com/D179544
      f12696f5
  14. Sep 27, 2023
  15. Apr 05, 2024
  16. Mar 30, 2024
    • Ryan VanderMeulen's avatar
      Bug 1881416 - Relax expectations for... · 9f87b3b2
      Ryan VanderMeulen authored
      Bug 1881416 - Relax expectations for /secure-payment-confirmation/enrollment.https.html to allow timeouts on all platforms. a=test-only
      
      This isn't a feature we support anyway, so let's not make things harder
      than they need to be.
      9f87b3b2
  17. Mar 08, 2024
  18. Jul 07, 2023
  19. Feb 12, 2024
  20. Feb 05, 2024
  21. Jan 05, 2024
  22. Jan 11, 2024
  23. Nov 20, 2023
    • Jonathan Kew's avatar
      Bug 1865482 - Make CSS :lang() matching more correctly follow the BCP4647... · be58953c
      Jonathan Kew authored
      Bug 1865482 - Make CSS :lang() matching more correctly follow the BCP4647 Extended Filtering algorithm. r=layout-reviewers,emilio a=RyanVM
      
      The matching behavior implemented in bug 1857742 did not quite follow the spec,
      particularly with regard to language *ranges* (as used in the :lang() pseudo)
      that are not themselves valid language *tags*.
      
      This updates the LangTagCompare function to more correctly follow the BCP4647
      "Extended Filtering" algorithm, and adjusts the relevant WPT tests (originally
      from bug 1857742) to reflect the corrected behavior.
      
      Differential Revision: https://phabricator.services.mozilla.com/D194054
      be58953c
  24. Dec 07, 2023
  25. Nov 07, 2023
  26. Nov 30, 2023
  27. Aug 11, 2023
  28. Oct 07, 2023
  29. Oct 02, 2023
Loading