Skip to content
Snippets Groups Projects
  1. Aug 14, 2024
    • Sean Feng's avatar
      Bug 1863246 - Make the page that enters BFCache not asking the parent process... · 24196ddc
      Sean Feng authored
      Bug 1863246 - Make the page that enters BFCache not asking the parent process to update the active browsing context r=peterv,dom-core a=RyanVM
      
      Currently, when a page enters BFCache, it updates the parent process
      for the active BC; however, the page that is about to show will do the
      same. These two operations are triggered in different processes with
      different active id, they are racy and problematic.
      
      This patch fixes the above issue by not updating the parent process
      when a page enters BFCache.
      
      This only applies to BFCacheInParent is enabled.
      
      Differential Revision: https://phabricator.services.mozilla.com/D215818
      24196ddc
  2. Jul 31, 2024
  3. Jul 19, 2024
    • Nika Layzell's avatar
      Bug 1834864 - Select BCG more consistently during COOP+COEP process switches,... · 07eb80a5
      Nika Layzell authored
      Bug 1834864 - Select BCG more consistently during COOP+COEP process switches, r=smaug,tabbrowser-reviewers,mak, a=dmeehan
      
      Previously it was possible to bypass specific BCG selection based on
      cross-origin isolated status if the site was allowed to load file URIs
      using enterprise policies, which could lead to a crash.
      
      This patch changes the behaviour such that BCG selection now happens
      correctly. The site will still not be cross-origin isolated due to being
      loaded into a file content process.
      
      Differential Revision: https://phabricator.services.mozilla.com/D217007
      07eb80a5
  4. Jun 27, 2024
    • Manuel Bucher's avatar
      Bug 1747230 - Fix IsUpgradeDowngradeEndlessLoop blocking legitimate redirects... · 0da5cdc8
      Manuel Bucher authored
      Bug 1747230 - Fix IsUpgradeDowngradeEndlessLoop blocking legitimate redirects when redirecting to different query parameters  a=dmeehan
      
      This changes where the IsUpgradeDowngradeEndlessLoop check triggers.
      Before this patch, it triggered during the redirect caused by the https
      upgrade. With this patch, it triggers during the downgrade for http
      redirects. META and JS redirect are still detected during upgrade.
      This should be fixed as a follow up (See Bug 1896691).
      Downgrade in this context means same url, except with the scheme http
      instead of https.
      
      Different query parameters normally lead to different responses by web servers.
      Don't consider the '#ref' part of the uri, because it doesn't get send to
      the server and therefore can't change the server response.
      
      We can't use the redirect chain anymore, because the query parameters
      are trimmed since Bug 1715785.
      
      This also removes the config option dom.security.https_only_check_path_upgrade_downgrade_endless_loop,
      because it adds unnecessary complexity. Removing it for this patch is
      easier.
      
      https-only, https-first and httpssvc_https_upgrade tests had to be
      modified, because they depended on the incorrect handling of query
      strings in loop detection.
      
      Original Revision: https://phabricator.services.mozilla.com/D193672
      
      Differential Revision: https://phabricator.services.mozilla.com/D214977
      0da5cdc8
  5. Jun 20, 2024
  6. Jun 18, 2024
    • Malte Jürgens's avatar
      Bug 1885893 - Only collect HTTPS-First telemetry on successful request a=pascalc · 11155f5b
      Malte Jürgens authored
      This patch addresses the problem that we currently collect HTTPS-First telemetry
      for sites that are not reachable at all, be it through always causing a error or
      through always timing out.
      
      - On a downgrade, do not collect telemetry instantly, but instead save the
        telemetry data in the load state for the downgraded request
      - That telemetry data will then be copied over into the document load listener
        of the new request
      - On a successful request, if we have downgrade data in the load listener, we
        collect the downgrade telemetry, as the downgrade seems to have been
        successful
      - Similar to the downgrade case, we only count the upgrade metric once we
        encounter a successful request annotated with the information that it was
        upgraded by HTTPS-First, instead of counting it instantly on the decision to
        upgrade. This also means the upgrade metric will not include loads that are
        downgraded again anymore
      - Add a testcase for a site which is neither reachable via HTTP nor HTTPS, and
        ensure no telemetry is collected
      
      Original Revision: https://phabricator.services.mozilla.com/D210792
      
      Differential Revision: https://phabricator.services.mozilla.com/D211999
      11155f5b
  7. Jun 06, 2024
    • Tamas Szentpeteri's avatar
      Backed out changeset b234ba179483 (bug 1747230) for causing mochitest failures... · c650eff9
      Tamas Szentpeteri authored
      Backed out changeset b234ba179483 (bug 1747230) for causing mochitest failures on browser_target_blank.js. CLOSED TREE
      c650eff9
    • Manuel Bucher's avatar
      Bug 1747230 - Fix IsUpgradeDowngradeEndlessLoop blocking legitimate redirects... · db9b0072
      Manuel Bucher authored
      Bug 1747230 - Fix IsUpgradeDowngradeEndlessLoop blocking legitimate redirects when redirecting to different query parameters r=necko-reviewers,kershaw,simonf,maltejur
      
      This changes where the IsUpgradeDowngradeEndlessLoop check triggers.
      Before this patch, it triggered during the redirect caused by the https
      upgrade. With this patch, it triggers during the downgrade for http
      redirects. META and JS redirect are still detected during upgrade.
      This should be fixed as a follow up (See Bug 1896691).
      Downgrade in this context means same url, except with the scheme http
      instead of https.
      
      Different query parameters normally lead to different responses by web servers.
      Don't consider the '#ref' part of the uri, because it doesn't get send to
      the server and therefore can't change the server response.
      
      We can't use the redirect chain anymore, because the query parameters
      are trimmed since Bug 1715785.
      
      This also removes the config option dom.security.https_only_check_path_upgrade_downgrade_endless_loop,
      because it adds unnecessary complexity. Removing it for this patch is
      easier.
      
      https-only, https-first and httpssvc_https_upgrade tests had to be
      modified, because they depended on the incorrect handling of query
      strings in loop detection.
      
      Differential Revision: https://phabricator.services.mozilla.com/D193672
      db9b0072
  8. Jun 05, 2024
  9. Jun 04, 2024
  10. Jun 03, 2024
  11. Jun 01, 2024
  12. May 31, 2024
  13. May 30, 2024
    • Ting-Yu Lin's avatar
      Bug 1896516 Part 7 - Remove PresShell::GetRootScrollFrameAsScrollable(). r=layout-reviewers,emilio · 63069348
      Ting-Yu Lin authored
      `PresShell::GetRootScrollFrameAsScrollable()` is equivalent to
      `PresShell::GetRootScrollContainerFrame()`.
      
      In ScrollContainerFrame.h, `DecideScrollableLayer()` has two versions, one has
      four parameters, and the other has five parameters with the fifth parameter
      `aDirtyRectHasBeenOverriden` having a default value `nullptr`. When we switch
      the caller from `nsIScrollableFrame` to `ScrollContainerFrame`, we need to
      remove the default value for the fifth parameter to avoid ambiguity.
      
      Differential Revision: https://phabricator.services.mozilla.com/D211494
      63069348
    • Ting-Yu Lin's avatar
      Bug 1896516 Part 1 - Rename PresShell::GetRootScrollFrame(), and make it... · f13f5fc5
      Ting-Yu Lin authored
      Bug 1896516 Part 1 - Rename PresShell::GetRootScrollFrame(), and make it return ScrollContainerFrame. r=layout-reviewers,emilio
      
      In theory, changing the return type from `nsIFrame*` to `ScrollContainerFrame*`
      exposes `ScrollContainerFrame` to the callers who might not needed, but almost
      all of the callers in cpp files are already exposed to `nsIScrollableFrame`, as
      demonstrated in this patch via replacing the #include from
      "nsIScrollableFrame.h" to "ScrollContainerFrame.h", so this is OK.
      
      Some callers can be simplified since we no longer need `do_QueryFrame` to
      `nsIScrollableFrame`.
      
      Differential Revision: https://phabricator.services.mozilla.com/D211488
      f13f5fc5
  14. May 29, 2024
  15. May 28, 2024
    • Ting-Yu Lin's avatar
      Bug 1896516 Part 7 - Remove PresShell::GetRootScrollFrameAsScrollable(). r=layout-reviewers,emilio · 9ab65dbb
      Ting-Yu Lin authored
      `PresShell::GetRootScrollFrameAsScrollable()` is equivalent to
      `PresShell::GetRootScrollContainerFrame()`.
      
      In ScrollContainerFrame.h, `DecideScrollableLayer()` has two versions, one has
      four parameters, and the other has five parameters with the fifth parameter
      `aDirtyRectHasBeenOverriden` having a default value `nullptr`. When we switch
      the caller from `nsIScrollableFrame` to `ScrollContainerFrame`, we need to
      remove the default value for the fifth parameter to avoid ambiguity.
      
      Differential Revision: https://phabricator.services.mozilla.com/D211494
      9ab65dbb
    • Ting-Yu Lin's avatar
      Bug 1896516 Part 1 - Rename PresShell::GetRootScrollFrame(), and make it... · 8dc08073
      Ting-Yu Lin authored
      Bug 1896516 Part 1 - Rename PresShell::GetRootScrollFrame(), and make it return ScrollContainerFrame. r=layout-reviewers,emilio
      
      In theory, changing the return type from `nsIFrame*` to `ScrollContainerFrame*`
      exposes `ScrollContainerFrame` to the callers who might not needed, but almost
      all of the callers in cpp files are already exposed to `nsIScrollableFrame`, as
      demonstrated in this patch via replacing the #include from
      "nsIScrollableFrame.h" to "ScrollContainerFrame.h", so this is OK.
      
      Some callers can be simplified since we no longer need `do_QueryFrame` to
      `nsIScrollableFrame`.
      
      Differential Revision: https://phabricator.services.mozilla.com/D211488
      8dc08073
  16. May 27, 2024
  17. May 24, 2024
  18. May 23, 2024
  19. May 22, 2024
  20. May 17, 2024
    • Jan-Niklas Jaeschke's avatar
      Bug 1895555 - Text Fragments: Implement same-document navigation. r=farre,dom-core · 87268531
      Jan-Niklas Jaeschke authored
      Same-document navigation follows a different code path than normal navigation
      and was therefore not covered in the initial implementation for text fragments.
      Same-document navigation does not set a URI in the `Document`, which
      is the way cross-document navigation would parse text directives from the URL.
      
      Instead, `nsDocShell::ScrollToAnchor()` is called via
      `nsDocShell::InternalLoad()`-> `nsDocShell::HandleSameDocumentNavigation()`.
      This code path needs to parse and remove the fragment directive from the new
      fragment to be able to find text fragments and to allow for element-id fallback.
      `nsDocShell::ScrollToAnchor()` needs to start an attempt to scroll to the text fragment
      if it exists. It must not, however, clear the uninvoked text directives,  because a
      same-document navigation could happen before the document is fully loaded,
      hence the target text might not be part of the DOM tree.
      
      As per spec, a second attempt to scroll to the text fragment is done after the load
      is completed. This is done by `Document::ScrollToRef()`, which is called by
      `nsDocumentViewer::LoadComplete()` after the load has finished.
      This call will clear the uninvoked directives.
      
      Differential Revision: https://phabricator.services.mozilla.com/D209726
      87268531
  21. May 15, 2024
  22. May 06, 2024
Loading