3631 Commits

Author SHA1 Message Date
Harry Terkelsen
e0529ddd81 [canvaskit] Improve how overlays are optimized (flutter/engine#54547)
Enhances the overlay optimization by pushing new pictures to the earliest RenderCanvas they can go into. This improvement is made especially clear in the new test case I added to `embedded_views_test.dart`, with the previous algorithm we would have used an overlay for each platform view even though all of the pictures could go into the base canvas with no issue.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-08-15 22:23:00 +00:00
Oleg Magomedov
e55ebe1d32 Fix typo in AppLifecycleState documentation (flutter/engine#54544)
Fixes small typo in AppLifecycleState enum documentation. Documentation to enum references iOS article about managing app lifecycle in UIKit. So, "IOKit" is a misspelled word "UIKit"

I found out Apple has [IOKit framework](https://developer.apple.com/documentation/iokit) but it is not related to app lifecycle

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-08-15 20:27:39 +00:00
Michael Thomsen
177a661383 Update dartdoc for gpu.dart (flutter/engine#54529)
Update dartdoc for package:flutter_gpu with:
1) details on how to use the sdk dep
2) the current docs link

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-08-13 21:16:15 +00:00
Harry Terkelsen
3c7746ee1f [canvaskit] Add animation detection for GIFs (flutter/engine#54483)
Detect if a GIF is animated to determine if we need to use Skia to decode it or if we can use <img> tag decoding.

Fixes https://github.com/flutter/flutter/issues/151911

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-08-13 21:00:58 +00:00
Brandon DeRosier
b19fe31562 Revert "[Impeller] remove scene3d support." (flutter/engine#54502)
Reverts flutter/engine#54453

Not quite ready to remove Impeller Scene yet because I'm still porting
the animation functionality. Keeping it around allows me to switch back
and forth to compare without having to recompile the engine.

Over a month ago I said something like "we can revert this a couple of
weeks from now" in one of the Impeller meetings. But for better or worse
(better, I think), I ended up spending a ton of time trying to make the
PBR good first (which doesn't exist in this C++ version).
2024-08-12 10:28:51 -07:00
Jonah Williams
198d1f1077 [Impeller] remove scene3d support. (flutter/engine#54453)
Now that Flutter GPU is a preview, the technical debt from having an ifdef controlled additional rendering mode can be removed.
2024-08-09 16:38:56 +00:00
Harry Terkelsen
a7481bd5d5 [canvaskit] Detect animated WebP images (flutter/engine#54418)
Reads the WebP header to determine if the WebP image is animated or not. If it's not animated, we can use `<img>` tag decoding for less jank.

The WebP half of https://github.com/flutter/flutter/issues/151911

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-08-08 21:47:22 +00:00
Michael Thomsen
7e52a7c53b Update pubspec.yaml for package:flutter_gpu (flutter/engine#54345)
Update readme for package:flutter_gpu to have an appropriate description
and, fill out the pub [repo
field](https://dart.dev/tools/pub/pubspec#repository).

## 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
2024-08-06 12:21:38 +02:00
Jackson Gardner
2b915b5444 [skwasm] Implement platform view clipping. (flutter/engine#54201)
This implements platform view clipping for the Skwasm renderer.

This fixes https://github.com/flutter/flutter/issues/133466
2024-08-01 22:12:14 +00:00
Jason Simmons
d103053ca2 [web] Dispose a temporary image that may be created by instantiateImageCodecWithSize (flutter/engine#54096)
Fixes https://github.com/flutter/flutter/issues/147066
2024-07-31 22:40:51 +00:00
Yegor
38f3b2c83b [web] rename dialog to route to match the framework (flutter/engine#54228)
Rename "dialog" to "route" to match the framework. The ARIA role "dialog" is an implementation detail, and it might change if a better implementation comes along. The semantic node itself implements the framework's "route" concept.
2024-07-31 17:18:11 +00:00
Harry Terkelsen
55ac232563 enumify ImageType and ImageFileSignature (flutter/engine#54131)
Use enhanced enums to clarify the image detection code.

Part of a refactor towards https://github.com/flutter/flutter/issues/151911

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-07-30 23:59:22 +00:00
Alexander Aprelev
69692c0807 Remove obsolete dependency from few more targets. (flutter/engine#54181)
Follow-up to 9cfb0f4947a23937fe5d88b105645e2c1942ba85 - remove obsolete
dependency from few more places that were missed.
2024-07-29 09:37:43 -07:00
Jason Simmons
8165d2a54a [web] Fix scaledImageSize handling of a target width with no target height (flutter/engine#54122) 2024-07-29 16:27:37 +00:00
Alexander Aprelev
9cfb0f4947 Remove obsolete dependency (flutter/engine#54161)
The concurrent_api/concurrent_api_product targets were made obsolete by
95f5efc697
2024-07-27 07:18:17 -07:00
Matan Lurey
e301288885 Pub workspace-ify most of testing/ and parts of tools/ (flutter/engine#54124)
Replaces and closes https://github.com/flutter/engine/pull/53997.

This PR migrates the following packages to the pub workspace:
  - testing/benchmark
  - testing/dart
  - testing/litetest
  - testing/pkg_test_demo
  - testing/scenario_app
  - testing/skia_gold_client
  - testing/symbols
  - tools/golden_tests_harvester
  - tools/pkg/process_fakes

It also makes minor changes to the Dart build rules in order to resolve the root package_config, instead of per-package.

I am _not_ totally confident of the `_embedder.yaml` change, but I also can't explain what is needed to continue analyzing `lib/ui` without analysis failures that all of the symbols in `dart:nativewrappers` are missing.
2024-07-26 17:35:50 +00:00
Harry Terkelsen
bb753d807f Refactor detectContentType to prepare for animation detection (flutter/engine#54127)
Refactor in preparation for https://github.com/flutter/flutter/issues/151911

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-07-25 22:59:24 +00:00
Srujan Gaddam
5ba4b01dfe Initial pass to cleanup dom.dart to use newer JS interop styles (flutter/engine#54093)
This only addresses the following:

- Removes `JSVoid` in favor of `void`. `JSVoid`, which is just a
typedef, should be deprecated and removed eventually.
- Removes extra interop methods that were needed to make sure arity was
correct. These are no longer needed as interop methods are
invocation-sensitive and calls to them do not forward more arguments
than were passed by the user.
- Removes unnecessary annotations on extensions.

Still left to do (not comprehensive):

- Migrate to extension types.
- Remove forwarding methods that are only used to convert primitives in
favor of changing the interop method to include the Dart primitive type.
It might be a bit slower in dart2wasm to do this, but will need to
verify and fix it if that's the case.
- Remove usage of `js_util`.
- See if we can replace types with their `package:web` equivalent for
easier maintenance.
2024-07-25 13:10:31 -07:00
Yegor
7de2134117 [web] better class names for semantics (flutter/engine#54070)
A few non-functional clean-ups in semantics:

* Rename `RoleManager` to `SemanticBehavior`.
* Rename `PrimaryRoleManager` to `SemanticRole`.
* Remove the `Role` enum. Move the enum docs into the respective classes.

## Why?

Previous naming was confusing. It's not clear what the difference is between a "role manager" and a "primary role manager". The word "manager" is a meaningless addition; the `Semantic*` prefix is much more meaningful. The `Role` enum was only used for tests, but tests can just use `SemanticRole.runtimeType`.

## New state of the world

After this PR the semantics system has "objects" (class `SemanticsObject`), "roles" (class `SemanticRole`), and "behaviors" (class `SemanticBehavior`).

- A semantic _object_ is an object attached to the framework-side `SemanticNode`. It lives as long as the semantic node does, and provides basic functionality that's common across all nodes.
- A semantic object has exactly one semantic _role_. This role is determined from the flags set on the semantic node. Flags can change, causing a semantic object to change its role, which is why these are two separate classes. If an object had just one permanent role, we could combine these classes into one (maybe one day we'll do it, as changing roles dynamically is weird, but that needs major changes in the framework).
- A semantic role may have zero or more semantic _behaviors_. A behavior supplies a piece of functionality, such as focusability, clickability/tappability, live regions, etc. A behavior can be shared by multiple roles. For example, both `Button` and `Checkable` roles use the `Tappable` behavior. This is why there's a many-to-many relationship between roles and behaviors.

Or in entity relationship terms:

```mermaid
---
title: Semantic object relationships
---
erDiagram
    SemanticsNode ||--|| SemanticsObject : managed-by
    SemanticsObject ||--o{ SemanticRole : has-a
    SemanticRole }o--o{ SemanticBehavior : has
```
2024-07-25 02:42:05 +00:00
Chris Bracken
c100e07c9e [iOS] Build universal gen_snapshots for iOS (flutter/engine#54009)
This merges the macOS and iOS rules for creating the `gen_snapshot_arm64` and `gen_snapshot_x64` used to build for iOS devices, as well as for iOS simulators on both arm64 hosts (`gen_snapshot_arm64`) and x64 hosts (`gen_snapshot_x64`). The macOS rules have already been updated to generate universal binaries for each of these that can be run on both Apple Silicon and Intel Mac hosts.

This also updates `create_full_ios_framework.py` to bundle the newly-generated universal gen_snapshot binaries and produce the artifacts.zip archive that is uploaded via the build config in `mac_ios_engine.json`.

The `create_arm_gen_snapshot` rule remains until I'm 100% convinced it's not used for macOS host Android target builds.

Issue: https://github.com/flutter/flutter/issues/101138
Issue: https://github.com/flutter/flutter/issues/69157

This is stacked on top of https://github.com/flutter/engine/pull/54008.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-07-24 21:56:16 +00:00
Jackson Gardner
851a3e5829 [skwasm] Fix platform view occlusion logic. (flutter/engine#54061)
The occlusion rectangle for platform views was going through this `inverseMapRect` code path, which actually was giving us the wrong results. The operations should just be doing the normal transformation on the rectangles to get the right result. It actually turns out we don't need the inverse mapping function, so I removed it, and I renamed the somewhat confusingly named `cullRect` function to `mapRect` which I think makes a bit more sense.

This should resolve https://github.com/flutter/flutter/issues/152139
2024-07-24 17:48:48 +00:00
Srujan Gaddam
0f69778e71 Change JSArray.length to return int (flutter/engine#54051)
This is in preparation for
https://dart-review.googlesource.com/c/sdk/+/373884, which will add length to the extension type itself. This will shadow the extension member, so we should make sure the type signatures match.
2024-07-24 01:12:19 +00:00
Harry Terkelsen
9e797d1461 [canvaskit] Decode images using <img> tag decoding (flutter/engine#53201)
Prefer to decode images using the browser API rather than with CanvasKit to avoid jank when decoding.

Part of deprecating the HTML renderer: https://github.com/flutter/flutter/issues/145954

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-07-19 17:41:05 +00:00
auto-submit[bot]
7b931a25de Reverts "Reverts "Drop deprecated hash_code functions (#54000)" (#54002)" (flutter/engine#54004)
Reverts: flutter/engine#54002
Initiated by: kevmoo
Reason for reverting: the issue in google 3 has been fixed.
Original PR Author: auto-submit[bot]

Reviewed By: {fluttergithubbot}

This change reverts the following previous change:
Reverts: flutter/engine#54000
Initiated by: chingjun
Reason for reverting: Broke Google Testing.

See b/352191023 for more details.
Original PR Author: kevmoo

Reviewed By: {jonahwilliams}

This change reverts the following previous change:
Fixes https://github.com/flutter/flutter/issues/151679
2024-07-19 14:54:29 +00:00
auto-submit[bot]
b23bc03d6d Reverts "Drop deprecated hash_code functions (#54000)" (flutter/engine#54002)
Reverts: flutter/engine#54000
Initiated by: chingjun
Reason for reverting: Broke Google Testing.

See b/352191023 for more details.
Original PR Author: kevmoo

Reviewed By: {jonahwilliams}

This change reverts the following previous change:
Fixes https://github.com/flutter/flutter/issues/151679
2024-07-19 05:33:47 +00:00
Kevin Moore
fdd23ed3f2 Drop deprecated hash_code functions (flutter/engine#54000)
Fixes https://github.com/flutter/flutter/issues/151679
2024-07-19 02:11:17 +00:00
Jackson Gardner
f4bab93f77 [skwasm] Combine offset and transform properly. (flutter/engine#53967)
Our treatment of the interaction between offset and transform was incorrect. Modified our platform view unit tests to cover more cases of nested offsets and transforms.
2024-07-18 21:44:08 +00:00
Matan Lurey
50e4e12c2e Add a "pub workspace" to the root of the engine repository (flutter/engine#53539)
... and use it in `engine_tool` to prove everything is working, i.e. on CI and elsewhere.

Partial work towards https://github.com/flutter/flutter/issues/147883.
Supersedes and closes https://github.com/flutter/engine/pull/51782 (which was a prototype).

See also:
- https://flutter.dev/go/pub-workspace, the design doc on the feature.
- https://github.com/dart-lang/pub-dev/pull/7762, an example PR.

I'll probably end up moving the inline docs in `pubspec.yaml` to a `docs/*.md` once that's a thing.
2024-07-18 16:18:09 +00:00
David Iglesias
1960bc9b52 [web] Set touch-action:none in embedded views. (flutter/engine#53945)
This PR adds `touch-action:none` to `flutter-view` elements, so the browser lets the flutter engine fully handle all touch gestures.

This fix is more delicate than the first approach, which broke some merged taps when accessibility/semantics are enabled. 

## Issues

* Found while testing: https://github.com/flutter/flutter/issues/130950
* "More correct" fix for: https://github.com/flutter/engine/pull/53647

## Demos

* Flutter scroll: https://dit-multiview-scroll.web.app
* Semantics: https://dit-tests.web.app
* Scrollable platform views: https://dit-multiview-tests.web.app

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-07-17 02:08:37 +00:00
Yegor
27f1487a70 [web] fix unexpected scrolling in semantics (flutter/engine#53922)
Always mark scrollable containers with `role="group"` to prevent the browser from merging all child elements into one giant string. Default to `preventScroll` to true across the web engine code, because it's a better default for Flutter than otherwise.

Fixes https://github.com/flutter/flutter/issues/130950
2024-07-16 21:04:39 +00:00
Yegor
d7c9dafda7 [web] switch to SemanticsAction.focus (attempt 3) (flutter/engine#53689)
This relands https://github.com/flutter/engine/pull/53679.

The difference from the previous attempt is in the last commit, which prevents synthetic focus requests from echoing back into the framework. That part broke too many tests in g3 and needs to be revisited.

## Original description

Stop using `SemanticsAction.didGain/LoseAccessibilityFocus` on the web, start using `SemanticsAction.focus`. This is because on the web, a11y focus is not observable, only input focus is. Sending `SemanticsAction.focus` will guarantee that the framework move focus to the respective widget. There currently is no "unfocus" signal, because it seems to be already covered: either another widget gains focus, or an HTML DOM element outside the Flutter view does, both of which have their respective signals already.

More details in the discussion in the issue https://github.com/flutter/flutter/issues/83809.

Fixes https://github.com/flutter/flutter/issues/83809
Fixes https://github.com/flutter/flutter/issues/148285
Fixes https://github.com/flutter/flutter/issues/143337
2024-07-15 17:12:21 +00:00
Kevin Moore
8c1a2c2c51 Drop self-references to hash functions from doc comments (flutter/engine#53844)
Towards https://github.com/flutter/flutter/issues/151679
2024-07-13 04:33:48 +00:00
Jackson Gardner
e2b3f88cac [skwasm] Fix platform view placement. (flutter/engine#53845)
Previously, each platform view contained styling/placement information from the entire stack of the layer builder. This caused issues when using `addRetained`, since it would contain stale styling/placement information from its old parent layers. I have changed it so that platform views only contain local styling information, and that styling is combined with the parent only when the layers are merged.
2024-07-12 21:55:19 +00:00
Juanjo Tugores
93de0249f9 Relax the event assumptions for keydown events. (flutter/engine#53830)
This PR addresses an issue where autocompleting a text field, even without direct keyboard input, unexpectedly triggers keydown events. To resolve this, the code now relaxes the casting assumptions to accommodate a wider range of event types, not just keyboard events.

By just adding the following script to the console, and filling the text field using autocomplete, you can see that indeed the fired event is not of type `KeyboardEvent` but `Event`. 

```javascript
document.body.addEventListener('keydown', console.log)
```

Fixes https://github.com/flutter/flutter/issues/149968

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-07-12 17:54:55 +00:00
Jason Simmons
604637e41f Manual roll Dart SDK from fb546f313557 to 797d3df745d1 (8 revisions) (flutter/engine#53832)
Includes patches needed for the dart:concurrent package (see https://dart.googlesource.com/sdk/+/d2bc055651cf62c549933ed379d6b23d84a07598)

Manual roll requested by jsimmons@google.com

https://dart.googlesource.com/sdk.git/+log/fb546f313557..797d3df745d1

2024-07-11 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.6.0-34.0.dev 2024-07-11 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.6.0-33.0.dev 2024-07-11 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.6.0-32.0.dev 2024-07-11 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.6.0-31.0.dev 2024-07-11 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.6.0-30.0.dev 2024-07-11 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.6.0-29.0.dev 2024-07-11 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.6.0-28.0.dev 2024-07-11 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.6.0-27.0.dev

If this roll has caused a breakage, revert this CL and stop the roller using the controls here:
https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC bdero@google.com,dart-vm-team@google.com,jsimmons@google.com on the revert to ensure that a human is aware of the problem.

To file a bug in Flutter Engine: 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
2024-07-12 01:28:10 +00:00
Pavel Mazhnik
d809a1db38 [web] retrieve hostElement for an implicit view (flutter/engine#53296)
This PR updates `ui_web.views.getHostElement` API to also return `hostElement` for implicit view.

Resolves https://github.com/flutter/flutter/issues/150075
2024-07-11 22:15:20 +00:00
Jonah Williams
ac871bacc2 [dart:ui] remove expensive index assertion in Vertices. (flutter/engine#53558)
Iterating through every index value is really, really expensive. Especially if users are suppllying hundreds of thousands of vertices.
2024-07-11 22:13:04 +00:00
Srujan Gaddam
b33b900e77 Remove casts for toDartObject (flutter/engine#53621)
ExternalDartReference is now generic, so we can just type it and
toDartObject will do the cast for us if needed. Also removes now-stale
ignores.
2024-07-10 15:47:39 -07:00
Jackson Gardner
76caabd2c4 Reland (x2) "Output .js files as ES6 modules. (flutter#52023)" (flutter/engine#53718)
Second attempt to reland https://github.com/flutter/engine/pull/52023

Fixes since the previous reland attempt:
* We need to pass the skwasm main JS URI when loading the module so that it can pass that along to the worker. Since the worker uses the workaround to allow a cross script worker, it has trouble locating the main JS URI in relation to itself in a way that actually works for dynamic imports, so passing it along fixes that issue.
* Some of the Google3 tests relied on the relative default canvaskit path. Dynamic module imports seems to not handle relative paths the way we expect, so we do our own URL resolution using the URL constructor before passing it into the dynamic import API. Also cleaned up some of the other relative pathing stuff that we do around the base URI. in flutter.js
2024-07-10 16:19:28 +00:00
auto-submit[bot]
5a218a1b99 Reverts "dart:ui - drop deprecated hash functions (#53787)" (flutter/engine#53794)
Reverts: flutter/engine#53787
Initiated by: jiahaog
Reason for reverting: There are still internal users of these hash functions (b/352191023). Flutter also exports it [here](72f83d3237/packages/flutter/lib/src/painting/basic_types.dart (L58)) so its easy for developers to use them even without importing `dart:ui`. Though it's an easy fix, I'd imagine this to be a breaking change for the OSS ecosystem a
Original PR Author: kevmoo

Reviewed By: {jonahwilliams}

This change reverts the following previous change:
These were deprecated a LONG time ago
2024-07-10 03:16:50 +00:00
auto-submit[bot]
6b738ccea4 Reverts "web_ui: drop internal hash code library (#53783)" (flutter/engine#53793)
Reverts: flutter/engine#53783
Initiated by: jiahaog
Reason for reverting: There are still internal users of these hash functions (b/352191023). Flutter also exports it [here](72f83d3237/packages/flutter/lib/src/painting/basic_types.dart (L58)) so its easy for developers to use them even without importing `dart:ui`. Though it's an easy fix, I'd imagine this to be a breaking change for the OSS ecosystem a
Original PR Author: kevmoo

Reviewed By: {yjbanov}

This change reverts the following previous change:
We moved to dart:core Object functions a while ago
2024-07-10 03:16:48 +00:00
John McDole
ea09bae632 Impeller really wants premultiplied alpha (flutter/engine#53770)
Fixes flutter/flutter#151210 by premultiplying alpha in the rare case we
get straight alpha.
2024-07-09 17:07:31 -07:00
Kevin Moore
3ac0cca053 dart:ui - drop deprecated hash functions (flutter/engine#53787)
These were deprecated a LONG time ago
2024-07-09 23:50:06 +00:00
Kevin Moore
7c90831f07 web_ui: drop internal hash code library (flutter/engine#53783)
We moved to dart:core Object functions a while ago
2024-07-09 21:52:28 +00:00
Yegor
b75d1ddcac [web] use semantic tags for headings (h1, h2, etc), and fix missing secondary roles (flutter/engine#53703)
Switch to using semantic heading tags (h1, h2, etc).

Fix missing secondary roles: focus, live region, route name, and label.
Improves indexability (https://github.com/flutter/flutter/issues/46789)
2024-07-05 17:59:22 +00:00
auto-submit[bot]
a918c608b8 Reverts "fix: mask disappeared when having nested mask filter on Flutter web HTML (#45166)" (flutter/engine#53725)
Reverts: flutter/engine#45166
Initiated by: jiahaog
Reason for reverting: This commit seems to cause the debug banner of a material app to be unnecessarily blurred. For example, one of the tests runs the following flutter app:

<details>

<summary>Code</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Materia
Original PR Author: Kingtous

Reviewed By: {yjbanov, harryterkelsen}

This change reverts the following previous change:
Hi from [Dora team](https://www.dora.run/), which powers web developers to build their 3d websites in just a few seconds.

This PR fixes: https://github.com/flutter/flutter/issues/133443, related: https://github.com/flutter/flutter/issues/58546

The original codes attempts to cache the css string but it causes bugs when encountering nested the same mask filter blur. We should also set `filter` properties when currentFilter == incoming mask filter using the cached css string, not just ignore it. 

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-07-04 07:04:25 +00:00
Yegor
a314952184 [web] ignore pointer events on plain text spans (flutter/engine#53694)
A semantic node may be tappable without having a more concrete role set on it, such as "button". It will just have a tap handler. This could lead to the sized span to be chosen as the label representation. However, when pointer events land on the span the DOM `target` becomes the span rather than the tappable element, and that breaks the debouncing logic in `pointer_binding.dart`.

This PR removes pointer event handling from inert text spans. This fixes the click debounce logic.

Fixes https://github.com/flutter/flutter/issues/151265
2024-07-03 22:00:05 +00:00
Mouad Debbar
5fb88851d5 Add Semantics Property linkUrl (flutter/engine#53507)
The new property allows the user to specify a URI for their semantics link node. It's plumbed through for both web and non-web engines, but it's only used in the web engine currently. It sets the `href` of the anchor element associated with semantics node.

This is going to unlock better semantics support in the Link widget on web ([PR](https://github.com/flutter/packages/pull/6711)).

Framework counterpart: https://github.com/flutter/flutter/pull/150639

Part of https://github.com/flutter/flutter/issues/150263
2024-07-03 21:12:26 +00:00
Kingtous
2ee4fd4317 [Flutter Web(HTML)] fix: shader mask is painted incorrectly on shared offscreen canvas (flutter/engine#44998)
Hi from [Dora team](https://www.dora.run/), which powers web developers to build their 3d websites in just a few seconds.

This PR fixes https://github.com/flutter/flutter/issues/133134.

The size of the shared canvas should not only be updated if both width and height are not the same.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-07-03 18:22:59 +00:00
Kingtous
86642a856c fix: mask disappeared when having nested mask filter on Flutter web HTML (flutter/engine#45166)
Hi from [Dora team](https://www.dora.run/), which powers web developers to build their 3d websites in just a few seconds.

This PR fixes: https://github.com/flutter/flutter/issues/133443, related: https://github.com/flutter/flutter/issues/58546

The original codes attempts to cache the css string but it causes bugs when encountering nested the same mask filter blur. We should also set `filter` properties when currentFilter == incoming mask filter using the cached css string, not just ignore it. 

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-07-03 18:22:56 +00:00