Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[web] Render PlatformViews with SLOT tags. #25747

Merged
merged 37 commits into from
May 21, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
6ea7e48
Wrap all the contents of the glass-pane in a shadow root.
ditman Apr 7, 2021
61ed861
Make analyzer happy
ditman Apr 8, 2021
5e1720d
Tweak semantics_test so it is shadow-DOM aware.
ditman Apr 10, 2021
7b76403
Render all text_editing primitives inside the new shadow root.
ditman Apr 13, 2021
0d11719
Tweak text_editing_test so it is shadow-DOM aware.
ditman Apr 13, 2021
b5b4ec8
dartfmt -w .
ditman Apr 13, 2021
149debf
Do not select flt-glass-pane all the time. Reuse the reference inside .
ditman Apr 13, 2021
a1de790
Don't mess with the dart version in tests
ditman Apr 13, 2021
6daf5c6
Revert fanciness
ditman Apr 13, 2021
e51ad1d
Ensure the glass-pane and its shadow root exist before testing.
ditman Apr 13, 2021
bb97136
Make dom_renderer_test shadow-root aware.
ditman Apr 13, 2021
1ade522
Do not use flt-glass-pane selectors across the code. Expose the shado…
ditman Apr 13, 2021
9e9820d
Make canvas_golden_test shadow-DOM aware.
ditman Apr 13, 2021
172fddc
Add a root Node parameter to text measurement, and pass the correct o…
ditman Apr 15, 2021
da4317e
[wip] Platform views in slots!
ditman Apr 17, 2021
6412db7
Remove flag to enable/disable feature. Cleanup unused code.
ditman Apr 24, 2021
6a9258a
Ensure all positioning happens in the slot container.
ditman Apr 27, 2021
0d41b5c
Make content height:100% if it isn't set by the user. Warn the user.
ditman Apr 27, 2021
a57a5c3
Prevent re-creating the same view multiple times in the CK renderer. …
ditman Apr 28, 2021
63370d5
Make flt-glass-pane tag name configurable.
ditman Apr 28, 2021
bb68314
Noop _compositeWithParams for disposed views, so all the disposed vie…
ditman Apr 28, 2021
1203eb3
Adapt tests to look for PlatformViews in their new locations.
ditman Apr 28, 2021
15bc192
Volkswagen the framework tests (replicate old behavior of returning a…
ditman Apr 29, 2021
8c5a13a
Decouple rendering of platform view contents and slots lifecycle, sim…
ditman Apr 29, 2021
3c55ce8
Remove unused var.
ditman Apr 30, 2021
38d3191
Add unit tests for the new platform_views classes.
ditman May 4, 2021
6397962
Appease analyzer
ditman May 5, 2021
314e246
Make semantics/text_field_test Shadow-DOM aware.
ditman May 12, 2021
518b2e2
Add licenses for new files.
ditman May 12, 2021
ea60e8c
Address PR feedback.
ditman May 13, 2021
d060e90
Fix embedded_views.dart imports.
ditman May 14, 2021
4bca48c
Use Object? as the type for the ParameterizedPlatformViewFactory, ins…
ditman May 17, 2021
3d819ca
Separate slot rendering from platform view content management.
ditman May 17, 2021
4959eea
Add ViewClipChain class to encapsulate the clip root, the contents, a…
ditman May 17, 2021
8d0bac1
Fix semantics_test after rebase.
ditman May 17, 2021
1697d17
Ensure user supplied content is correctly sized.
ditman May 17, 2021
f374b1f
Update Dartdoc so it is aware of the new createPlatformViewSlot funct…
ditman May 18, 2021
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
Prev Previous commit
Update Dartdoc so it is aware of the new createPlatformViewSlot funct…
…ion everywhere.
  • Loading branch information
ditman committed May 20, 2021
commit f374b1f91f634bc533af7c2e261e6ac7961c92a1
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class PlatformViewManager {

/// Returns `true` if the passed in `viewId` has been rendered (and not disposed) before.
///
/// See [renderContent] and [renderSlot] to understand how platform views are
/// See [renderContent] and [createPlatformViewSlot] to understand how platform views are
/// rendered.
bool knowsViewId(int viewId) {
return _contents.containsKey(viewId);
Expand Down
5 changes: 2 additions & 3 deletions lib/web_ui/lib/src/engine/platform_views/message_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ typedef PlatformViewContentHandler = void Function(html.Element);
/// function (passed from the outside) will decide where in the DOM to inject
/// said content.
///
/// The rendering/compositing of Platform Views will have access to the other "half"
/// of the Platform View: the `slot`, through the shared `contentManager` object,
/// through its [PlatformViewManager.renderSlot] method.
/// The rendering/compositing of Platform Views can create the other "half" of a
/// Platform View: the `slot`, through the [createPlatformViewSlot] method.
///
/// When a Platform View is disposed of, it is removed from the cache (and DOM)
/// directly by the `contentManager`. The canvaskit rendering backend needs to do
Expand Down
2 changes: 1 addition & 1 deletion lib/web_ui/lib/src/engine/platform_views/slots.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

part of engine;

/// Returns the name of a Slot from its viewId.
/// Returns the name of a slot from its `viewId`.
///
/// This is used by the [renderContent] function of the [PlatformViewManager]
/// class, and the [createPlatformViewSlot] method below, to keep the slot name
Expand Down