Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: flutter/engine
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c50eb8a65097
Choose a base ref
...
head repository: flutter/engine
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 419fb8c0ab3e
Choose a head ref
  • 17 commits
  • 18 files changed
  • 9 contributors

Commits on Sep 5, 2024

  1. Fix unexpected ViewFocus events when Text Editing utilities change fo…

    …cus in the middle of a blur call. (#54965)
    
    In [some cases][1], text editing utilities re-focus the `<input />` element during a blur event. This causes an unusual sequence of `focusin` and `focusout` events, leading to the engine sending unintended events.
    
    Consider the following HTML code:
    
    ```html
    <!DOCTYPE html>
    <html lang="en">
    <head>
      <meta charset="UTF-8">
      <title></title>
    </head>
    <body>
      <div id="container">
        <input type="" value="1" id="input1">
        <input type="" value="2" id="input2">
        <input type="" value="3" id="input3">
      </div>
    
      <script>
        container.addEventListener('focusin', (ev) => {
          console.log('focusin: focus was gained by', ev.target);
        });
        container.addEventListener('focusout', (ev) => {
          console.log('focusout: focus is leaving', ev.target, 'and it will go to', ev.relatedTarget);
        });
      </script>
    </body>
    </html>
    ```
    
    Clicking input1, then input2, then input3 produces the following console logs:
    
    ```
    // Input1 is clicked
    focusin: focus was gained by <input type value=�"1" id=�"input1">�
    
    // Input2 is clicked
    focusout: focus is leaving <input type value=�"1" id=�"input1">� and it will go to <input type value=�"2" id=�"input2">�
    focusin: focus was gained by <input type value=�"2" id=�"input2">�
    
    // Input3 is clicked
    focusout: focus is leaving <input type value=�"2" id=�"input2">� and it will go to <input type value=�"3" id=�"input3">�
    focusin: focus was gained by <input type value=�"3" id=�"input3">�
    ```
    
    Now, let's add a blur handler that changes focus:
    
    ```html
    <!DOCTYPE html>
    <html lang="en">
    <head>
      <meta charset="UTF-8">
      <title></title>
    </head>
    <body>
      <div id="container">
        <input type="" value="1" id="input1">
        <input type="" value="2" id="input2">
        <input type="" value="3" id="input3">
      </div>
    
      <script>
        container.addEventListener('focusin', (ev) => {
          console.log('focusin: focus was gained by', ev.target);
        });
        container.addEventListener('focusout', (ev) => {
          console.log('focusout: focus is leaving', ev.target, 'and it will go to', ev.relatedTarget);
        });
        input2.addEventListener('blur', (ev) => {
          input2.focus();
        });
      </script>
    </body>
    </html>
    ```
    
    The log sequence changes and gives the wrong impression that no dom element has focus:
    
    ```
    // Input1 is clicked
    focusin: focus was gained by <input type value=�"1" id=�"input1">�
    
    // Input2 is clicked
    focusout: focus is leaving <input type value=�"1" id=�"input1">� and it will go to <input type value=�"2" id=�"input2">�
    focusin: focus was gained by <input type value=�"2" id=�"input2">�
    
    // Input3 is clicked, but the handler kicks in and instead of the following line being a focusout, it results in a focusin call first.
    focusin: focus was gained by <input type value=�"2" id=�"input2">�
    focusout: focus is leaving <input type value=�"2" id=�"input2">� and it will go to null
    ```
    
    In addition to that, during `focusout` processing, `activeElement` typically points to `<body />`. However, if an element is focused during a `blur` event, `activeElement` points to that focused element.  Although, undocumented it can be verified with:
    
    ```html
    <!DOCTYPE html>
    <html lang="en">
    <head>
      <meta charset="UTF-8">
      <title></title>
    </head>
    <body>
      <div id="container">
        <input type="" value="1" id="input1">
        <input type="" value="2" id="input2">
        <input type="" value="3" id="input3">
      </div>
    
      <script>
        container.addEventListener('focusin', (ev) => {
          console.log('focusin: was gained by', ev.target);
        });
        container.addEventListener('focusout', (ev) => {
          console.log('document.hasFocus()', document.hasFocus());     
          console.log('document.activeElement', document.activeElement);
          console.log('focusout: focus is leaving', ev.target, 'and it will go to', ev.relatedTarget);
        });
        input2.addEventListener('blur', (ev) => {
          input2.focus();
        });
      </script>
    </body>
    </html>
    ```
    
    We leverage these behaviors to ignore `focusout` events when the document has focus but `activeElement` is not `<body />`.
    
    flutter/flutter#153022
    
    [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
    tugorez authored Sep 5, 2024
    1 Configuration menu
    Copy the full SHA
    0462d19 View commit details
    Browse the repository at this point in the history
  2. [engine] always force platform channel responses to schedule a task. (#…

    …54975)
    
    If we use runNowOrPostTask on platform channel responses, then we may not wake up the dart message loop. If nothing else wakes it up, then the embedder may hang on platform channel responses.
    
    This fixes several google3 integration tests when run in merged thread mode.
    Jonah Williams authored Sep 5, 2024
    Configuration menu
    Copy the full SHA
    015f3b1 View commit details
    Browse the repository at this point in the history
  3. [canvaskit] Fix incorrect calculation of ImageFilter paint bounds (#5…

    …4980)
    
    Fixes calculation of `ImageFilter` bounds by taking into account the
    offset.
    
    Fixes flutter/flutter#154303
    
    ## Pre-launch Checklist
    
    - [x] I read the [Contributor Guide] and followed the process outlined
    there for submitting PRs.
    - [x] I read the [Tree Hygiene] wiki page, which explains my
    responsibilities.
    - [x] I read and followed the [Flutter Style Guide] and the [C++,
    Objective-C, Java style guides].
    - [x] I listed at least one issue that this PR fixes in the description
    above.
    - [x] I added new tests to check the change I am making or feature I am
    adding, or the PR is [test-exempt]. See [testing the engine] for
    instructions on writing and running engine tests.
    - [x] I updated/added relevant documentation (doc comments with `///`).
    - [x] I signed the [CLA].
    - [x] All existing and new tests are passing.
    
    If you need help, consider asking for advice on the #hackers-new channel
    on [Discord].
    
    <!-- Links -->
    [Contributor Guide]:
    https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
    [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
    [test-exempt]:
    https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
    [Flutter Style Guide]:
    https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
    [C++, Objective-C, Java style guides]:
    https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
    [testing the engine]:
    https://github.com/flutter/flutter/wiki/Testing-the-engine
    [CLA]: https://cla.developers.google.com/
    [flutter/tests]: https://github.com/flutter/tests
    [breaking change policy]:
    https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
    [Discord]: https://github.com/flutter/flutter/wiki/Chat
    harryterkelsen authored Sep 5, 2024
    Configuration menu
    Copy the full SHA
    ecf2298 View commit details
    Browse the repository at this point in the history
  4. Manual Skia roll to 809f868ded1c (#54972)

    Includes a build script update required for a new source file added on Windows
    jason-simmons authored Sep 5, 2024
    Configuration menu
    Copy the full SHA
    cbfcee2 View commit details
    Browse the repository at this point in the history
  5. iOS,macOS: add unsigned_binaries.txt (#54977)

    There are three categories of binaries produced as part of the framework artifacts:
    * Those that use APIs that require entitlements and must be code-signed; e.g. gen_snapshot
    * Those that do not use APIs that require entitlements and must be code-signed; e.g. Flutter.framework dylib.
    * Those that do not need to be code-signed; e.g. Flutter.dSYM symbols.
    
    Until now, our signing infrastructure has assumed that all mach-o binaries in the artifacts we produce require a signature. dSYM files are not required to be codesigned, although the xcframework containing them are, and as such they cannot be removed or tampered with.
    
    The framework code-signing tests in `dev/bots/suite_runners/run_verify_binaries_codesigned_tests.dart` are only run on post-submit on release branches, and thus, this issue was not uncovered until the first release after all the dSYM work landed. Those tests were updated in flutter/flutter#154591. This updates the framework and artifact archive generation code to also explicitly exclude those files from signing.
    
    Issue: flutter/flutter#154571
    Related: flutter/flutter#116493
    Related: flutter/flutter#153532
    
    [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
    cbracken authored Sep 5, 2024
    Configuration menu
    Copy the full SHA
    19d2eb4 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    44fe215 View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2024

  1. Configuration menu
    Copy the full SHA
    56855cf View commit details
    Browse the repository at this point in the history
  2. iOS,macOS: Add logging of duplicate codesign binaries (#54987)

    When duplicates are found in the input lists, log them to stderr. For the case of duplicates across list, we print the whole list, sorted, rather than three separate lists, as it makes it simpler to spot the duplicate, at which point the file will be easy to spot in either `create_ios_framework.py` or `create_macos_framework.py`.
    
    [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
    cbracken authored Sep 6, 2024
    Configuration menu
    Copy the full SHA
    b51276f View commit details
    Browse the repository at this point in the history
  3. Removes the int storage from Color (#54714)

    issue: flutter/flutter#127855
    This depends on flutter/flutter#153938 being
    landed.
    ## Pre-launch Checklist
    
    - [x] I read the [Contributor Guide] and followed the process outlined
    there for submitting PRs.
    - [x] I read the [Tree Hygiene] wiki page, which explains my
    responsibilities.
    - [x] I read and followed the [Flutter Style Guide] and the [C++,
    Objective-C, Java style guides].
    - [x] I listed at least one issue that this PR fixes in the description
    above.
    - [x] I added new tests to check the change I am making or feature I am
    adding, or the PR is [test-exempt]. See [testing the engine] for
    instructions on writing and running engine tests.
    - [x] I updated/added relevant documentation (doc comments with `///`).
    - [x] I signed the [CLA].
    - [x] All existing and new tests are passing.
    
    If you need help, consider asking for advice on the #hackers-new channel
    on [Discord].
    
    <!-- Links -->
    [Contributor Guide]:
    https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
    [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
    [test-exempt]:
    https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
    [Flutter Style Guide]:
    https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
    [C++, Objective-C, Java style guides]:
    https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
    [testing the engine]:
    https://github.com/flutter/flutter/wiki/Testing-the-engine
    [CLA]: https://cla.developers.google.com/
    [flutter/tests]: https://github.com/flutter/tests
    [breaking change policy]:
    https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
    [Discord]: https://github.com/flutter/flutter/wiki/Chat
    gaaclarke authored Sep 6, 2024
    Configuration menu
    Copy the full SHA
    1cd3306 View commit details
    Browse the repository at this point in the history
  4. Roll Skia from 809f868ded1c to aec11ae18bb6 (22 revisions) (#54988)

    https://skia.googlesource.com/skia.git/+log/809f868ded1c..aec11ae18bb6
    
    2024-09-05 [email protected] [graphite] Store dst copy texture and bounds on RenderPassTask
    2024-09-05 [email protected] Roll vulkan-deps from 3763a16adf08 to a0dffec9be81 (3 revisions)
    2024-09-05 [email protected] [graphite] Update viewer's flag handling
    2024-09-05 [email protected] [graphite] Convert Uniform|TextureDataBlock to value types
    2024-09-05 [email protected] [infra] Fix infra_revision in DEPS
    2024-09-05 [email protected] Add Skia Client Search HTML source to repository
    2024-09-05 [email protected] [graphite] Add disable_robustness toggle for viewer/dm/nanobench
    2024-09-05 [email protected] [graphite] TextureDataBlock holds span of texture proxies
    2024-09-05 [email protected] [graphite] Add DrawAtlasTest.
    2024-09-05 [email protected] Roll ANGLE from d1a4b0ff5b83 to 59eff3660f81 (5 revisions)
    2024-09-05 [email protected] Roll vulkan-deps from 6256e7687963 to 3763a16adf08 (4 revisions)
    2024-09-05 [email protected] Roll Dawn from c0bc4d075afe to d3b7a448690d (17 revisions)
    2024-09-05 [email protected] [graphite] Disable SSBOs for Dawn/Vulkan
    2024-09-04 [email protected] [graphite] Move PipelineDataCache into PipelineData.h
    2024-09-04 [email protected] Add SkArenaAlloc::makeArrayCopy()
    2024-09-04 [email protected] [bazel] Add BazelBuild job for //example/external_client:use_ganesh_gl
    2024-09-04 [email protected] add build clarification to getting started docs
    2024-09-04 [email protected] Roll vulkan-deps from 725499142cb6 to 6256e7687963 (2 revisions)
    2024-09-04 [email protected] Add Dockerfile/script to build fiddler backend
    2024-09-04 [email protected] Guard both divisions in luminosity blend mode
    2024-09-04 [email protected] [infra] Add explicit DEPS entry for infra repo
    2024-09-04 [email protected] [graphite] Add jobs for testing Tint IR
    
    If this roll has caused a breakage, revert this CL and stop the roller
    using the controls here:
    https://autoroll.skia.org/r/skia-flutter-autoroll
    Please CC [email protected],[email protected],[email protected],[email protected] on the revert to ensure that a human
    is aware of the problem.
    
    To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
    To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose
    
    To report a problem with the AutoRoller itself, please file a bug:
    https://issues.skia.org/issues/new?component=1389291&template=1850622
    
    Documentation for the AutoRoller is here:
    https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
    skia-flutter-autoroll authored Sep 6, 2024
    Configuration menu
    Copy the full SHA
    fe476c8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    45930bf View commit details
    Browse the repository at this point in the history
  6. Roll Skia from aec11ae18bb6 to 368f209ccca5 (3 revisions) (#54992)

    skia-flutter-autoroll authored Sep 6, 2024
    Configuration menu
    Copy the full SHA
    b2ad94d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5cbe371 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    0f76fd4 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    1a6c47b View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    b5ff6b0 View commit details
    Browse the repository at this point in the history
  11. Reverts "[engine] always force platform channel responses to schedule…

    … a task. (#54975)" (#55000)
    
    Reverts: #54975
    Initiated by: jtmcdole
    Reason for reverting: I believe this change caused flutter/flutter to break in an engine roll. It was one of two changes - the other being a webui change.
    
    Tests broken:
    
    module_test_ios:  testDualCold
    
    router test:
    
    ```
    [2024-09-05 17:43:20.837343] [STDOUT] stderr: [ +135 ms] VMServiceFlutterDriver: Connected to Flutter application.
    [2024-09-05 17:43:20.841927] [STDOUT] stdout: [   +4 ms] 00:00 �[32m+0�[0m: 
    Original PR Author: jonahwilliams
    
    Reviewed By: {jason-simmons, johnmccutchan}
    
    This change reverts the following previous change:
    If we use runNowOrPostTask on platform channel responses, then we may not wake up the dart message loop. If nothing else wakes it up, then the embedder may hang on platform channel responses.
    
    This fixes several google3 integration tests when run in merged thread mode.
    auto-submit[bot] authored Sep 6, 2024
    Configuration menu
    Copy the full SHA
    419fb8c View commit details
    Browse the repository at this point in the history
Loading