Commit Graph

409 Commits

Author SHA1 Message Date
renovate[bot] 0e5ef32654 fix(deps): update rust dependencies 2023-12-18 08:16:28 +01:00
friedkeenan 834e745652 swf: Make avm2 Writer::write_op public 2023-12-17 15:41:44 +01:00
friedkeenan c7966cea77 swf: Add test for avm2 Writer::write_op 2023-12-17 15:41:44 +01:00
renovate[bot] e196a544dd fix(deps): update rust crate bitstream-io to v2 2023-12-11 11:25:12 +01:00
renovate[bot] 40b92e69f7 fix(deps): update rust dependencies 2023-12-05 21:08:16 +01:00
renovate[bot] 6da223a875 fix(deps): update rust dependencies 2023-11-27 09:44:47 +01:00
renovate[bot] 2a83274c7f fix(deps): update rust dependencies 2023-11-19 21:09:42 -05:00
renovate[bot] 32c65e6460 fix(deps): update rust dependencies 2023-11-13 09:10:26 +01:00
Nathan Adams 1ff23cdd77 swf: Fixed writing DefineFontInfo tags with wide chars 2023-10-29 14:31:45 +01:00
Nathan Adams 11e1d2f6be swf: Fixed writing out DefineText2 (we previously wrote it as DefineText 1) 2023-10-29 14:31:45 +01:00
Nathan Adams 878f1fc64e swf: Removed ButtonAction::key_code and fixed writing button tags 2023-10-29 14:31:45 +01:00
Nathan Adams 5b41db9138 swf: Fixed writing bevel filters 2023-10-29 14:31:45 +01:00
sleepycatcoding fc0f03a687 swf: Fix writing of a DefineButton2 with zero actions
Previously, `swf` crate always wrote out the action offset, but this should be 0 when there are no actions.
2023-10-27 20:27:12 +02:00
renovate[bot] cd01bfe7d6 fix(deps): update rust dependencies 2023-10-23 02:55:11 +02:00
renovate[bot] b427940431 fix(deps): update rust dependencies 2023-10-16 09:51:22 +02:00
renovate[bot] 18796a67fe fix(deps): update rust dependencies 2023-10-10 02:15:59 +02:00
Adrian Wielgosik cea0f1b1f1 swf: Add test for DefineFont2/3 roundtrips 2023-10-08 12:13:16 +02:00
Adrian Wielgosik 3e5482a761 swf: Better adjust offsets for has_wide_offsets in writer 2023-10-08 12:13:16 +02:00
Adrian Wielgosik 9ab50bcd74 swf: Fix writing an all-zeros straight ShapeRecord 2023-10-08 12:13:16 +02:00
Adrian Wielgosik f08ee6de58 swf: Add a missing offset to DefineFont2/3 offset table 2023-10-08 12:13:16 +02:00
Adrian Wielgosik cc5c46dda2 swf: Fix writing of an all-zeros curve ShapeRecord 2023-10-08 12:13:16 +02:00
renovate[bot] 37e2c06034 fix(deps): update rust dependencies 2023-09-18 00:00:45 +02:00
renovate[bot] 4e75c3890a fix(deps): update rust dependencies 2023-08-28 07:39:35 +02:00
renovate[bot] 93f08d7738 chore(deps): lock file maintenance rust dependencies 2023-08-14 23:58:45 +02:00
Nathan Adams f2ca88bb34 core: Readd max(0) to blur size 2023-08-12 13:00:27 +02:00
Nathan Adams 1a4a808c23 render: Make Filter::calculate_dest_rect work in Twips 2023-08-12 13:00:27 +02:00
Nathan Adams da090f0bd7 render: Move filter size calculation from wgpu to render/swf 2023-08-12 13:00:27 +02:00
renovate[bot] a4b179e1e0 chore(deps): lock file maintenance rust dependencies 2023-08-08 23:19:16 +02:00
TÖRÖK Attila 41377c5472 swf: Different blur impotency check 2023-07-26 13:03:11 +02:00
relrelb 5f6d8d72ea render: Skip unreasonably large bitmaps
Some SWFs report unreasonable bitmap dimensions, and trying to reserve
enough capacity for them always fails. To avoid panics, skip those bitmaps.

Fixes #1191
Fixes #2759
Fixes #10701
2023-07-24 09:37:37 +03:00
Nathan Adams b201e19cc7 wgpu: Don't create an extra fresh texture for applying filters to a CAB 2023-07-20 23:19:20 +02:00
Lord-McSweeney 5975714f75 avm2+swf+tests: Store metadata on Traits and VTable, report metadata in describeType; parse ABC metadata key-value pairs correctly; add test 2023-07-19 16:24:23 +02:00
Kornelius Rohrschneider 687c0e7516 core: Complete MovieClip error state & Change uncompressed_len to i32
Previously, the MovieClip error state contained one TODO in order to be
completely implemented: The HeaderExt variable uncompressed_len needs to
be -1 in the error state, but its type has been u32.
The type has now been changed to i32, and the variable is set to -1 in
the default_error_header function. Therefore, the MovieClip error state
is now fully implemented.

Other connected functions and variables like SwfMovie::uncompressed_len
or MovieClip::total_bytes have been adjusted to this type change. Code
has been adjusted if needed where this value is used.
2023-07-17 00:08:02 +02:00
Kornelius Rohrschneider 893052c2a6 core: Add MovieClip error state
A load_error_swf function has been added to the Loader. It makes the
MovieClip enter the error state in which some attributes have certain
error values to signal that no valid file could be loaded. This happens
if no file could be loaded or if the loaded content is no valid
supported content.
The function creates an error state movie stub using the new
SwfMovie::error_movie function (which uses a new default_error_header
function) and configures remaining variables with the
movie_not_available method.
One TODO in order for the error state to be completely implemented has
been added.

Since the error state of the MovieClip includes the final URL of the SWF
file obtained after any redirects, the load_error_swf and
movie_loader_error functions (now) take an swf_url attribute.
To get this URL in case no file could be loaded, the
NavigatorBackend::fetch method has been changed to return an
ErrorResponse struct (including the url and the actual error) in the
error case. The Response struct returned in the success case has been
renamed to SuccessResponse.
All fetch implementations have been adapted accordingly. Code has been
adjusted to return the actual error where that's needed.

Documentation has been added and improved.
2023-07-17 00:08:02 +02:00
Lord-McSweeney 3e193214df swf: Ignore bad ConstantPool string reads 2023-07-15 12:10:36 +02:00
Lord-McSweeney 61a4ded851 swf: Ignore bad ActionTry opcodes 2023-07-15 12:10:36 +02:00
Nathan Adams c3fdfc17dd swf: Scale filter distances where appropriate 2023-07-12 18:51:11 +02:00
Nathan Adams 5c13d323b3 wgpu: Implement the undocumented ability to disable compositeSource for glow/shadow 2023-07-12 18:51:11 +02:00
Nathan Adams 8cb6e5bdf0 wgpu: Implement drop shadow filter 2023-07-12 18:51:11 +02:00
Nathan Adams 8f78fd410b swf: Don't require Coordinate (only Twips) for Rectangles, only when using valid-checking stuff 2023-07-12 18:51:11 +02:00
Nathan Adams 44024e77c3 swf: Add inner_blur_filter() method to filters that contain blurs 2023-07-12 18:51:11 +02:00
Nathan Adams 2459ae5230 chore: Fix clippy 'useless-vec' 2023-07-12 18:17:43 +02:00
renovate[bot] f0607d6a1f chore(deps): lock file maintenance rust dependencies 2023-07-11 22:42:51 +02:00
renovate[bot] 664227dcdf fix(deps): update rust crate libflate to v2 2023-07-10 08:20:45 +02:00
Nathan Adams 146d565c02 render: Add Filter::scale() and use it to scale filter values (currently just blur_) 2023-07-03 20:13:40 +02:00
renovate[bot] 13b1078142 chore(deps): lock file maintenance rust dependencies 2023-07-03 08:28:13 +03:00
David Wendt 34625524ad swf: Zero is a valid video codec and it indicates no codec. 2023-06-30 16:14:28 -06:00
Nathan Adams a5915a9bdb swf: Make Color Copy 2023-06-29 20:32:36 +02:00
Nathan Adams c0247c020a swf: Add write_swf_raw_tags for reconstructing a swf from its parts 2023-06-21 18:27:12 +02:00
renovate[bot] 7a21756ddb chore(deps): lock file maintenance rust dependencies 2023-06-17 11:00:52 -05:00