Commit Graph

11155 Commits

Author SHA1 Message Date
Nathan Adams 08c707caa6 avm2: Implement NetConnection.close() 2023-11-09 12:39:22 +01:00
Nathan Adams 641a90b0d4 avm2: Implement connecting a NetConnection to flash remoting url 2023-11-09 12:39:22 +01:00
Nathan Adams c691b32886 core: Introduce a NetConnection struct, backing AVM1/AVM2 NetConnection objects 2023-11-09 12:39:22 +01:00
Kornelius Rohrschneider 514611451f web: Set default Polyfill allowScriptAccess value to samedomain
The default allowScriptAccess value for polyfilled elements has been set
to samedomain. This means that it's true if the SWF file has the same
domain as the player website and false otherwise.
To do this, a new isPolyfillElement parameter is given to the
RufflePlayer::load method.
2023-11-08 17:09:54 +01:00
Kornelius Rohrschneider 1b2baf3364 web: Fix Ruffle extension player not using the configuration for files
The Ruffle extension player has previously not used the extension
configuration settings when loading local SWF files.
This has been fixed.
2023-11-08 17:09:54 +01:00
Kornelius Rohrschneider 8c8367a09c web: Fix Ruffle configuration not working properly for Polyfill elements
Previously, the Ruffle configuration options weren't working properly
for polyfilled elements.

A polyfilled element can have specific configuration options which
overwrite the more general Ruffle configuration settings.
But the code handling those specific configuration options has
previously set some of them to default values if they haven't been
provided, therefore overwriting the more general configuration settings.
This has been fixed. A getPolyfillOptions function has been created and
returns a URLLoadOptions object, containing only the options that have
been set for the respective element. Helper functions have been adapted
to not return any default values anymore.
getPolyfillOptions is now used in all places where polyfilled options
need to be retrieved (therefore reducing duplicated code).

Documentation has been added to clarify that these options must not
contain any default values, since those would overwrite other
configuration settings with a lower priority.
The extension and demo code has been changed to clarify that no default
values are contained in the element configuration options.

The RuffleEmbed::attributeChangedCallback method has previously loaded
an SWF file only with the parameters and base options. This has been
fixed as well since it now also uses getPolyfillOptions.

When using RuffleObject::connectedCallback to load an SWF file, setting
an element config option to "" hasn't worked for most config options
before either. This has been fixed as well by using the new
getPolyfillOptions function.

The default WindowMode value of the default Ruffle web config has been
set to Window (as it is in the desktop version and according to the
documentation). It has previously been set to Opaque (which causes the
same functionality).
2023-11-08 17:09:54 +01:00
Nathan Adams 1ed1dba88e tests: Document log_fetch option 2023-11-08 16:50:24 +01:00
sleepycatcoding f334963b47 avm2: Handle single element XMLLists in XML.insertChildBefore/After 2023-11-07 23:23:53 +01:00
sleepycatcoding cea636da30 avm2: Include CData nodes in XMLList.text output 2023-11-07 23:23:53 +01:00
sleepycatcoding d5df3e27a2 avm2: Fix pretty printing of CData nodes 2023-11-07 23:23:53 +01:00
sleepycatcoding fb34aaea40 avm2: Call toXMLString directly in EscXElem op
The previous method, which used `coerce_to_string`, calls `toString` on the object,
which has special handling for simple content, which is not used here.
2023-11-07 23:23:53 +01:00
Tom Schuster e99eaafcd0 avm2: Fix two bugs in XML/XMLList set_property_local 2023-11-07 18:12:59 +01:00
Nathan Adams bc1121c4ac chore: Add 'content location' as a required field to issue reports 2023-11-07 13:02:36 +01:00
Crowdin Bot 1c4380f633 chore: Update translations from Crowdin 2023-11-07 12:40:56 +01:00
renovate[bot] acadb2b2d3 fix(deps): update wasm-bindgen 2023-11-07 12:18:50 +01:00
Tom Schuster fca17a0061 avm2: Add a E4XNode::is_text helper 2023-11-04 21:45:31 +01:00
Tom Schuster 28476d83be avm2: Add a E4XNode::is_element helper 2023-11-04 21:45:31 +01:00
Tom Schuster 1953ab3cf0 avm2: Add a E4XNode::is_attribute helper 2023-11-04 21:45:31 +01:00
Wumbo 4403848a4b
web: Extension UI improvements (#13473)
* web: Improve styling of extension pop-up menu

* web: Improve styling of extension settings page

* web: Improve styling of extension player

* web: Make styling more consistent across browsers

* web: Run eslint, fix some problems

* web: Move version text near top of pop-up menu, add to settings menu

* web: Improve logo hover bounds in pop-up and settings

* web: Improve styling of extension status indicator

* web: Update extension pop-up text strings

* web: Misc. sizing/padding changes to extension UI

* web: chore: Add a stylelint exception for #backgroundColor in player.css

Because it's not kebab-case, to match the keys of the metadata object in JS.

---------

Co-authored-by: TÖRÖK Attila <torokati44@gmail.com>
2023-11-03 23:07:25 +01:00
TÖRÖK Attila 2059492d77 avm2: Remove default width and height values from BitmapData ctor 2023-11-03 21:41:39 +01:00
CUB3D b0d88645bc avm1: Implement FileReference 2023-11-03 19:32:24 +01:00
TÖRÖK Attila 8f15aa3200 ci: Test weekly that the Dockerfile in web is able to build the browser extensions 2023-11-03 17:47:10 +01:00
Nathan Adams dad39631cf avm2: Don't add ClassDefinition to AMF0 objects 2023-11-03 02:17:40 +01:00
Tom Schuster 8138b68919 avm2: Implement XML.setChildren 2023-11-02 13:40:16 +01:00
Tom Schuster 3572367c8e avm2: Allow assigning XML objects without a name (eg. text) 2023-11-01 18:44:36 +01:00
renovate[bot] da06e1c67d chore(deps): update actions/setup-node action to v4 2023-11-01 11:55:52 +01:00
renovate[bot] 9b3df944ad chore(deps): update node.js dependencies 2023-11-01 11:18:48 +01:00
Aaron Hill 8d75f98214 core: Remove unused exports (fix nightly warnings) 2023-11-01 00:21:59 -04:00
Nathan Adams 432a63250b core: Update our xmlns/xml namespace detection for new quick-xml 0.31.0 2023-11-01 00:45:43 +01:00
renovate[bot] 1377a5b07b fix(deps): update rust dependencies 2023-11-01 00:45:43 +01:00
Nathan Adams 36eda35197 avm2: Implement Font.registerFont 2023-10-30 15:49:07 +01:00
Nathan Adams 9ecb7d221f avm2: Implement Font.enumerateFonts 2023-10-30 15:49:07 +01:00
Nathan Adams 8be05d8673 avm2: Made a FontObject type and switch Font to use that instead of looking up per getter 2023-10-30 15:49:07 +01:00
Nathan Adams 5682e0101d web: Add defaultFonts config option for specifying the default _sans etc 2023-10-30 15:15:57 +01:00
Nathan Adams 857f65d077 web: Add fontSources config option for loading extra device fonts than our defaults 2023-10-30 15:15:57 +01:00
Tom Schuster 780489903a amv2: Implement flash.xml.XMLDocument createTextNode 2023-10-30 14:30:59 +01:00
Tom Schuster 72965b3689 amv2: Implement flash.xml.XMLNode removeNode 2023-10-30 14:30:59 +01:00
Tom Schuster 445643fedb amv2: Implement flash.xml.XMLNode cloneNode 2023-10-30 14:30:59 +01:00
sleepycatcoding fb3c4cd307 avm2: Fix E4X [[Replace]] implementation bug
We were incorrectly returning for XML attributes. Fixes #13780.
2023-10-30 14:05:23 +01:00
sleepycatcoding 5bebebddbe avm2: Add SWFv21 and above XML special case 2023-10-29 09:43:14 -07:00
nosamu 6f5eb48ec2 avm2: Fix return value of SharedObject.flush 2023-10-29 16:08:24 +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
Lord-McSweeney 911f1c29db avm2: Correctly set `caller_movie` in `Activation::from_script` 2023-10-28 21:30:40 -04:00
Aaron Hill 46320c6238
wgpu: Round down Context3D sample count to nearest power of 2 (#13762) 2023-10-29 00:18:52 +00:00
Aaron Hill cc49aaee58 avm2: Add UTF-16 BOM handling to ByteArray.toString
When a UTF-16 BOM is present, ByteArray.toString automatically
strips it out, and treats the remaining data as a UTF-16 string
with the specified endianness.
2023-10-29 01:13:05 +02:00
Tom Schuster ef627babfd avm2: Stub undocumented XML notification functions 2023-10-28 14:17:34 -07:00
Aaron Hill 84f788c2d2
avm2: Use RawTable to implement 'public index' iteration (#12470)
* avm2: Use RawTable to implement 'public index' iteration

This makes our implementation more closely aligned with avmplus.
In particular, it's now possible to delete keys from an object
while iterating without disturbing the iteration order (as long
as those keys were already produced by the iterator).

This is based on @Bale001's work on RawTable-based iteration

A few tests had their output changed (they depend on the exact
object iteration order, and don't neccessarily match Flash Player
exactly).

* Use Cell to store index fields

* Remove outdated comment
2023-10-28 20:44:01 +00:00