Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion lib/web_ui/lib/src/engine/html_image_element_codec.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ abstract class HtmlImageElementCodec implements ui.Codec {
imgElement = createDomHTMLImageElement();
imgElement!.src = src;
setJsProperty<String>(imgElement!, 'decoding', 'async');
setJsProperty<String>(imgElement!, 'crossOrigin', 'anonymous');

// Ignoring the returned future on purpose because we're communicating
// through the `completer`.
Expand Down
1 change: 0 additions & 1 deletion lib/web_ui/lib/src/engine/safe_browser_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ T getJsProperty<T>(Object object, String name) {
}

const Set<String> _safeJsProperties = <String>{
'crossOrigin',
'decoding',
'__flutter_state',
};
Expand Down
13 changes: 0 additions & 13 deletions lib/web_ui/test/canvaskit/image_golden_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -253,19 +253,6 @@ Future<void> testMain() async {
}
});

test('crossOrigin requests cause an error', () async {
final String otherOrigin =
domWindow.location.origin.replaceAll('localhost', '127.0.0.1');
bool gotError = false;
try {
final ui.Codec _ = await renderer.instantiateImageCodecFromUrl(
Uri.parse('$otherOrigin/test_images/1x1.png'));
} catch (e) {
gotError = true;
}
expect(gotError, isTrue, reason: 'Should have got CORS error');
});

_testCkAnimatedImage();

test('isAvif', () {
Expand Down