This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
[web_ui] PersistedPlatformView attribute update handling to enable resizing #12227
Merged
harryterkelsen
merged 7 commits into
flutter:master
from
tauu:webui-platformview-resize
Sep 26, 2019
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
584ba08
add PersistedPlatformView attribute update handling to enable resizing
tauu a0e2869
update size of root element created by a PlatformView
tauu 7a59c4f
improved comments
tauu 76af94b
enforce effective size of PlatformView surface
tauu 2e1a015
updated formating of platform_view.dart
tauu 4759afb
stop storing root element of PlatformView in its Surface
tauu 12d94c9
move setting overflow property to createElement
tauu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should store the platform view that is created, i.e.
platformViewincreateElement()and on update, update the size and position of the platform view, rather than the shadow root element (flt-platform-view).This way, the created platform view is itself resized (imagine a
<video>element, if we just resize theflt-platform-viewelement, then the<video>won't be resized, it will just be clipped).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, so the latest version will set the size of both the shadow root element and the PlatformView root element. In addition the overflow property is set to auto on the PlatformView root element. As this property was not set currently, the default behaviour was to let the PlatformView overflow. This will haben even if we set the size of the shadow root (e.g. if a video element is wrapped in a div element).
By setting the overflow property on the shadow root, a user may still chose a different overflow behaviour for the shadow root element. Hope that's ok this way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's set the overflow to
hidden, and also set it on theelementin thecreateElementmethod so we don't reset it on everyapply.